$(document).ready(function(){
	setInterval(function(){change();}, 4500);
	var imgs = $("#bandpic > img").hide();
	var i = 0;
	function change() {
		if(i == imgs.length) {
			$(imgs[i-1]).fadeOut(1200);
			i = 0;
		}
		else {
			
			$(imgs[i]).fadeIn(1200);
			if(i > 0) {
				$(imgs[i-1]).fadeOut(1200);
			}
			i++;
		}
	}
	
	/* TOURDATEN: Runde Ecken beim Element mit der größten Höhe */
	
	var wo = $(".wo");
	var info = $(".info");
	var anz = wo.length;
	for(x=0;x<anz;x++) {
		if($(wo[x]).height() > $(info[x]).height()) {
			$(wo[x]).addClass("longest");
		} else if($(wo[x]).height() < $(info[x]).height()) {
				$(info[x]).addClass("longest");
			}
	}
	
	/*
	$("body").click(function(){
		$("#mainContent").slideUp(function(){
			$(this).load("index.htm #mainContent", function(){
				$(this).slideDown();
			});
		});
	});
	*/
	/*
	$("#bandpic").click(function(){
		$("#mainContent").animate({opacity: 0.0},500,function(){
			$(this).load("index.htm #mainContent", function(){
				$(this).animate({opacity: 1},500);
			});
		});
		winHoehe = $(window).height();
		winBreite = $(window).width();
		$("body").append('<div id="slideWallTop" style="position:absolute;top:0px;left:0px;width:'+winBreite+'px;background:black;z-index:150;opacity:0.7;"></div>');
		$("body").append('<div id="slideWallBottom" style="position:absolute;top:'+winHoehe+'px;left:0px;width:'+winBreite+'px;background:black;z-index:150;opacity:0.7;"></div>');
		$("#slideWallTop").animate({height: winHoehe/2+"px"},500);
		$("#slideWallBottom").animate({height: winHoehe/2+"px", top: winHoehe/2+"px"},500);
	});
	$("body").delegate("#slideWallTop, #slideWallBottom","click",function(){
		$("#slideWallTop").animate({height: "0px"},500);
		$("#slideWallBottom").animate({height: "0px", top: winHoehe+"px"},500);
	});
	*/
	


	$("div.menu").each(function(){
		$(this).mouseenter(function(){
			$(this).css({'background':'url(images/navi_hover.png','color':'white','background-repeat':'no-repeat'});
		});
		$(this).mouseleave(function(){
			$(this).css({'background':'','color':'#E9F47B'});
		});
	});
	
});
