$(document).ready(function() {
  // Accordion - Expand a Collapse Elements	
  $('.trigger').next().hide().end().click(function(){
    if($(this).hasClass('open')) {
      $(this).removeClass('open').next().slideUp();
    } else {
      hideAll();
      $(this).addClass('open').next().slideDown();
    }
  });
  $('.open').trigger('click');

    // zobrazovani fotek
    $().piroBox({
      my_speed: 600, //animation speed
      bg_alpha: 0.5, //background opacity
      radius: 4, //caption rounded corner
      scrollImage : false, // true == image follows the page, false == image remains in the same open position
      pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
      pirobox_prev : 'piro_prev',// Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
      close_all : '.piro_close',// add class .piro_overlay(with comma)if you want overlay click close piroBox
      slideShow : 'slideshow', // just delete slideshow between '' if you don't want it.
      slideSpeed : 4 //slideshow duration in seconds(3 to 6 Recommended)
      });

	var $test1 = $('#topObr'),
		$test2 = $('#test2'),
		$test3 = $('#test3'),
		$test4 = $('#test4'),
		$caption = $('div.caption'),
		$pause = $('#pause'),
		$resume = $('#resume'),
		$freeze = $('#freeze'),
		$stop = $('#stop'),
		$restart = $('#restart'),
		captions = ['Sand Castle', 'Sunflower', 'Flip Flops', 'Rubber Ring'],
		STOP = 1, RUN = 1, PAUSE = 3;

	$test1.crossSlide({
		sleep: 5,
		fade: 1
	}, [
		{ src: '/pic/top_foto/prolinani/01.jpg' },
		{ src: '/pic/top_foto/prolinani/02.jpg' },
		{ src: '/pic/top_foto/prolinani/03.jpg' },
		{ src: '/pic/top_foto/prolinani/04.jpg' },
		{ src: '/pic/top_foto/prolinani/05.jpg' },
		{ src: '/pic/top_foto/prolinani/06.jpg' }
	]);
	
});
