$(document).ready(function() {
	ausblenden();
	bg();
	
	
	
	$(".bildergalerie a").attr("rel", "lightbox");	
	
	$(".bildergalerie img").attr("rel", "lightbox");
	
	
	$("a[rel='lightbox']").colorbox({
					maxWidth:"90%",
					maxHeight:"90%"});
	$(".iframe").colorbox({width:"650px", height:"590px", iframe:true});
	$(".video").colorbox({width:"520px", height:"370px", iframe:true});
	
	$(".contentMain ul li:odd").addClass("odd");	
	$(".bildergalerie img:nth-child(6n)").css("margin-right","0");
	

	
	$("table tr:nth-child(1)").addClass("firstRow");
	
	
	
	
});

function ausblenden(){
	
	var ausblenden = false;
	$(".btn").click(function(){
							 
		if(ausblenden == false){
			$("#content, #footer, #nav, .branding, .banner, .sprachen").fadeOut("fast");			
			$(this).css("opacity","0.5").html("Inhalte einblenden").draggable().css("cursor","move");
			ausblenden = true;
		}
		else{
			$("#content, #footer, #nav, .branding, .banner, .sprachen").fadeIn("fast");
			$(this).css("opacity","1").html("Inhalte ausblenden");			
			ausblenden = false;
		}
	
	});	
	
}

function bg(){
	$(".backgroundImg").css("background-image", "url(images/bg/0" + (Math.floor(Math.random()*10)+1) + ".jpg)");
	
}

function slider(){
	$(".test").hide();
	$(".testbtn").click(function(){
		$(".test").slideDown("slow");
				$(".close").click(function(){
					$(".test").slideUp();		
					return false;
				});
				
		return false;
	});
}


