$(document).ready(function() {
	/* ################# stridani obrazku na uvodni strance ########### */
	/* privni interval je potreba provest "rucne" */
	setTimeout(function(){ 
			$(".poster01").animate({ opacity: 0 }, 4000);
		}, 8000);
		setTimeout(function(){ 
			$(".poster02").animate({ opacity: 0 }, 5000);
		}, 16000);
		setTimeout(function(){ 
			$(".poster03").animate({ opacity: 0 }, 5000);
		}, 24000);
		setTimeout(function(){ 
			$(".poster03").animate({ opacity: 1 }, 4000);
		}, 32000);
		setTimeout(function(){ 
			$(".poster02").animate({ opacity: 1 }, 4000);
		}, 40000);
		setTimeout(function(){ 
			$(".poster01").animate({ opacity: 1 }, 4000);
		}, 48000);
	/* po 48 vterinach se pusti smycka */
	setInterval(function(){ 	
		setTimeout(function(){ 
			$(".poster01").animate({ opacity: 0 }, 4000);
		}, 8000);
		setTimeout(function(){ 
			$(".poster02").animate({ opacity: 0 }, 5000);
		}, 16000);
		setTimeout(function(){ 
			$(".poster03").animate({ opacity: 0 }, 5000);
		}, 24000);
		setTimeout(function(){ 
			$(".poster03").animate({ opacity: 1 }, 4000);
		}, 32000);
		setTimeout(function(){ 
			$(".poster02").animate({ opacity: 1 }, 4000);
		}, 40000);
		setTimeout(function(){ 
			$(".poster01").animate({ opacity: 1 }, 4000);
		}, 48000);
	}, 48000);
	
	/* ################# stridani - vsechny ostatni stranky ########### */
	/* privni interval je potreba provest "rucne" */
	setTimeout(function(){ 
			$(".poster05").animate({ opacity: 0 }, 4000);
		}, 8000);
		setTimeout(function(){ 
			$(".poster06").animate({ opacity: 0 }, 5000);
		}, 16000);
		setTimeout(function(){ 
			$(".poster07").animate({ opacity: 0 }, 5000);
		}, 24000);
		setTimeout(function(){ 
			$(".poster07").animate({ opacity: 1 }, 4000);
		}, 32000);
		setTimeout(function(){ 
			$(".poster06").animate({ opacity: 1 }, 4000);
		}, 40000);
		setTimeout(function(){ 
			$(".poster05").animate({ opacity: 1 }, 4000);
		}, 48000);
	/* po 48 vterinach se pusti smycka */
	setInterval(function(){ 	
		setTimeout(function(){ 
			$(".poster05").animate({ opacity: 0 }, 4000);
		}, 8000);
		setTimeout(function(){ 
			$(".poster06").animate({ opacity: 0 }, 5000);
		}, 16000);
		setTimeout(function(){ 
			$(".poster07").animate({ opacity: 0 }, 5000);
		}, 24000);
		setTimeout(function(){ 
			$(".poster07").animate({ opacity: 1 }, 4000);
		}, 32000);
		setTimeout(function(){ 
			$(".poster06").animate({ opacity: 1 }, 4000);
		}, 40000);
		setTimeout(function(){ 
			$(".poster05").animate({ opacity: 1 }, 4000);
		}, 48000);
	}, 48000);
	


	//obrazky
	$("a[rel='obrazky']").colorbox();


	$('a.podmenu_1').click(function(event) {
		event.preventDefault();
		$(".obsah_podmenu_1").show();
		$(".obsah_podmenu_2").hide();
		$(".podmenu_1").addClass("focus");
		$(".podmenu_1").blur();
		$(".podmenu_2").removeClass("focus");
 	});
	$('a.podmenu_2').click(function(event) {
		event.preventDefault();
		$(".obsah_podmenu_1").hide();
		$(".obsah_podmenu_2").show();
		$(".podmenu_1").removeClass("focus");
		$(".podmenu_2").addClass("focus");
		$(".podmenu_2").blur();
 	});

 	$('a.podmenu').click(function(e){
 		e.preventDefault();
 		var id = $(this).attr('id'); 
		$(".podobsah").hide();
		$(".podmenu").removeClass("focus");
		$(this).addClass("focus");
		$(".obsah_"+ id +"").slideDown();
	});

	$(".prehrej_video").colorbox({iframe:true, width:"685px", height:"435px"});
	$(".prehrej_audio").colorbox({iframe:true, width:"400px", height:"200px"});
  
   
 });


