$(document).ready(function() {
//SHOW	
	//$('#mainslide').show();
	$('#topslide').show();
	$('#tabvanilla').show();
	$('#newsbilderslide').show();
	$('#terminbilderslide').show();
	$('#stadien_topslide').show();
	
	$('#stadien_topslide').cycle({
		fx:    'fade', 
		speed:  2500,
		timeout:  4000 
	});

	$('#topslide').cycle({
		fx:    'fade', 
		speed:  2500,
		timeout:  4000 
	});

	//alert ($('#mainslide').height());

	$('#newsbilderslide').cycle({
	    fx:    'fade', 
	    speed:  2500,
	    pause:  1,
	    timeout:  6000 
	});
	
	$('#terminbilderslide').cycle({
	    fx:    'fade', 
	    speed:  2500,
	    pause:  1,
	    timeout:  6000 
	});
	


	//SELECTION 
     $('.selection').hover(
      function () {
        $(this).animate({ opacity: "0.5" });
        $(this).addClass("cursor_hand");
      }, 
      function () {
        $(this).animate({ opacity: "1" }, "fast")
        $(this).removeClass("cursor_hand");
      }
    );
     
     $('.selection2').hover(
    	      function () {
    	        $(this).animate({ opacity: "0.3" });
    	        $(this).addClass("cursor_hand");
    	      }, 
    	      function () {
    	        $(this).animate({ opacity: "1" }, "fast")
    	        $(this).removeClass("cursor_hand");
    	      }
    	    );

     //reSetContentHeight();
 	//EVENT FOR LOAD FINISHED
 	$(window).load(function() {
 		reSetContentHeight();
 	});
     
});

function reSetContentHeight() {
	//SET NEW HEIGHT
	var maxHeight = $('#main_content').height();
	//alert (maxHeight);
	if ($('#googleads_right').height() > maxHeight){
		 maxHeight = $('#googleads_right').height();
	}
	$("#main_content").height(maxHeight);
}
