window.onload = function() {
	
	header_H = $("#logo_header").height();
	menu_H = $("#menu_container").height();
	poster_H = $("#poster_fix0").height();
	t_space = 94;
	b_space = 40;
	poster_space = 20;
	
	top1 = header_H+menu_H+t_space+b_space;
	top2 = header_H+menu_H+t_space+b_space+poster_space+poster_H;
	top3 = header_H+menu_H+t_space+b_space+(2*poster_space)+(2*poster_H);
	
	$("#poster_fix0").css({'top' : top1});
	$("#poster_fix1").css({'top' : top2});
	$("#poster_fix2").css({'top' : top3});
	$("#fb_container").css({'top' : top3+130});
	//alert(menu_H); 	
	
	$("#slideshow").css({'background-color' : '#000000'});
	$("#menu .level1").dropShadow({left: -5, top: 7, opacity: 0.4, blur: 5});
	$("#menu .level2").dropShadow({left: 4, top: 7, opacity: 0.3, blur: 5});		
	$("#slideshow").dropShadow({left: 4, top: 7, opacity: 0.5, blur: 5});	

	$("#hechtplatz-logo").dropShadow({left: 4, top: 2, opacity: 0.5, blur: 5});	
	$("#poster_fix0").dropShadow({left: 4, top: 7, opacity: 0.5, blur: 5});
	$("#poster_fix1").dropShadow({left: 4, top: 7, opacity: 0.5, blur: 5});	
	$("#poster_fix2").dropShadow({left: 4, top: 7, opacity: 0.5, blur: 5});		
	
				
	$("#theater_bgimg").height($(document).height());
	$("#theater_bgimg").width($(window).width());

					
	$(window).resize();

	$(".theater_play").hover(
		function () {
			$(this).addClass("hover");
		 }, 
		 function () {
			$(this).removeClass("hover");
		 }
	);
				
	$(".kalender_play").hover(
		function () {
			$(this).css({'background-color' : '#e8e8e8', 'cursor': 'pointer'});
		}, 
		 function () {
			$(this).css({'background-color' : '#ffffff', 'cursor': 'normal'});
	});	
	
	$(".menu li a").hover(
		function () {
			$(this).css({'background-color' : 'white', 'color' : '#e22435'});
		}, 
		function () {
			$(this).css({'background-color' : '#e22435', 'color' : 'white'});
		}
	);
				
	$(".theater_play").click(
		function () {
			window.open($(".stueck_link", this).attr("href"), "_self")
		});
	
	$(".dieses_stueck").click(
			function () {
				window.open($(".fix_link",this).attr("href"), "_self");
		});


}

function doSomething() {
	$("#theater_bgimg").height($(document).height());
	$("#theater_bgimg").width($(window).width());
};

var resizeTimer = null;
	$(window).bind('resize', function() {
		if (resizeTimer) clearTimeout(resizeTimer);
			resizeTimer = setTimeout(doSomething, 100);
		}
	);	
