$(document).ready(function(){

	$("#navigation li.active a + ul").hide().css({ height : 0 });
	
	$("#navigation li#team a + ul.expand").animate({ 
		height: "220px",
		opacity: "show"
	}, 1000 );
	
	$("#navigation li#portfolio a + ul.expand").animate({ 
		height: "140px",
		opacity: "show"
	}, 1000 );
	
	$("#navigation li > ul.expand").show();
	
	$('#content div#flash').show();
	
	
/* ********* animation for team site's ********* */	
	
	if($("#content").hasClass('')){
		$("#content div#cv").animate({ 
			marginLeft: "50px",
			opacity: "show"
		}, 2500 );

		$("#content div#job").animate({ 
			marginLeft: "-100px",
			opacity: "show"
		}, 1700 );
		
		$("#content div#links").animate({ 
			marginLeft: "-100px",
			opacity: "show"
		}, 1400 );
		
		$("#content div#clip").animate({ 
			marginLeft: "-100px",
			opacity: "show"
		}, 1000 );
	} else if($("#content").hasClass('switched')){
		$("#content div#cv").animate({ 
			marginLeft: "-100px",
			opacity: "show"
		}, 2500 );

		$("#content div#job").animate({ 
			marginLeft: "30px",
			opacity: "show"
		}, 1700 );
		
		$("#content div#links").animate({ 
			marginLeft: "50px",
			opacity: "show"
		}, 1400 );
		
		$("#content div#clip").animate({ 
			marginLeft: "50px",
			opacity: "show"
		}, 1000 );
	};
	
	
/* ********* animation for contact site ********* */

	$("#content #imprint").show();
	$("#content div#imprint div#1").animate({ 
		marginLeft: "-50px",
		opacity: "show"
	}, 2000 );
	$("#content div#imprint div#2").animate({ 
		marginLeft: "-50px",
		opacity: "show"
	}, 1500 );
	$("#content div#imprint div#3").animate({ 
		marginLeft: "-50px",
		opacity: "show"
	}, 1000 );
	
	$("#content #contact").show();
	$("#content div#contact div#info").animate({ 
		marginLeft: "80px",
		opacity: "show"
	}, 1500 );
	$("#content div#contact div#office").animate({ 
		marginLeft: "80px",
		opacity: "show"
	}, 2000 );
	$("#content div#contact div#map").animate({ 
		marginLeft: "80px",
		opacity: "show"
	}, 1000 );
	
	$("#content div#copy").fadeIn(2500);
	
	
/* ********* other animations ********* */	
	
	if($("#content div#infotext").hasClass('')){
		$("#infotext").animate({ 
			marginLeft: "60px",
			opacity: "show"
		}, 1500 );
	} else if($("#content div#infotext").hasClass('switched')){
		$("#infotext").animate({ 
			marginLeft: "-50px",
			opacity: "show"
		}, 1500 );
	};
	
	
	$("#content div#portfolioText").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1500 );
	
	$("#content #topIntro").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1500 );
	
	$("#content #topLinks").fadeIn(2500);
	

/* ********* home (index.html) animations ********* */	
	
	$("#content #ausnahmezustand").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1700 );
	$("#content #missionStatement").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1700 );
	$("#content #galerie").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1700 );
	$("#content #lgvSpots").animate({ 
		marginLeft: "50px",
		opacity: "show"
	}, 1700 );
	
/* ********* team intro-site animations ********* */	
	
	$("#content #uniKrems").fadeIn(2500);
	$("#content #setTele").fadeIn(2500);
	$("#content #koop_kRose").fadeIn(2500);

});
