var over = 0;
function fadeEngine(x) {
     var total_divs = $("#headerbild ul li").size();
     var y=x;
     if ( over != 1 ) {
          if(x==total_divs) y=1; else y++;
             $("#headerbild ul li:nth-child("+x+")").fadeOut(2500);
             $("#headerbild ul li:nth-child("+y+")").fadeIn(2500);
     }
     setTimeout("fadeEngine("+y+")",5000);
}
fadeEngine(0); 



$(document).ready(function(){

       
	$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000, theme:'dark_rounded'});
	



	$("ul.dropdown li").hover(function(){
   		$(this).addClass("hover");
   		$('> .dir',this).addClass("open");
   		$('ul:first',this).css('visibility', 'visible');
 	},function(){
   		$(this).removeClass("hover");
   		$('.open',this).removeClass("open");
   		$('ul:first',this).css('visibility', 'hidden');
 	});


});


