function daumenKino() {
    var $alt = $('#animation_container img.obersteebene');
    var $neu = $alt.next().length ? $alt.next() : $('#animation_container img:first');
    $alt.addClass('mittlereebene');
	  $alt.removeClass('obersteebene');
    $neu.css({opacity: 0.0});
    $neu.addClass('obersteebene');
    $alt.animate({opacity: 0.0}, 2500);    
    $neu.animate({opacity: 1.0}, 3000, function() {
    $alt.removeClass('mittlereebene');
    });
}

$(document).ready(function() {
	$(".rundgang").click(function(){
      $('#anfang_bild').animate({
				opacity: 'hide'
			}, 'slow');
     setInterval( "daumenKino()", 3000 );
   });
  
  $("#news_popup").load("/index.php?id=12 #news_container");
   
  $(".button_popup").click(function(){
       
  			$('#news_background').animate({opacity: 0.0}, 0); 
        $('#news_background').animate({
  				opacity: 'show'
  			}, 'slow'); 
  			$('#news_background').animate({opacity: 0.7}, 500);  
  			
  			$('#news_popup').animate({opacity: 0.0}, 0); 
        $('#news_popup').animate({
  				opacity: 'show'
  			}, 'slow');
  			$('#news_popup').animate({opacity: 1.0}, 3000);  
    
  			
  			$(".news_close_button").click(function(){
        $('#news_popup').animate({
  				opacity: 'hide'
  			}, 'slow');
        $('#news_background').animate({
  				opacity: 'hide'
  			}, 'slow');
     });
  });
});


