$(document).ready(function() {
	
	hideHome();	hideMail(); normalMandN();

	$("#menu_0").mouseenter(showHome).mouseleave(hideHome);
	function showHome(){  
		$("#text_0").stop().animate({opacity:1},800);
		$("#icon_0").stop().animate({opacity:0},800);
		}
	function hideHome(){  
		$("#text_0").stop().animate({opacity:0},800);
		$("#icon_0").stop().animate({opacity:1},800); 
		}
	$("#menu_5").mouseenter(showMail).mouseleave(hideMail);
	function showMail(){  
		$("#text_5").stop().animate({opacity:1},800);
		$("#icon_5").stop().animate({opacity:0},800);
		}
	function hideMail(){  
		$("#text_5").stop().animate({opacity:0},800);
		$("#icon_5").stop().animate({opacity:1},800); 
		}
	
	$("#lang_select").mouseenter(showLangs).mouseleave(hideLangs);
	function showLangs(){  
		$(this).stop().animate({height:44},400);
		}
	function hideLangs(){  
		$(this).stop().animate({height:18},1000);
		}
		
	$("#marburg").mouseenter(highMarburg).mouseleave(normalMandN);
	$("#nmc").mouseenter(highNmc).mouseleave(normalMandN);
	function highMarburg(){  
		$(this).stop().animate({opacity:1},400);
		$("#nmc").stop().animate({opacity:0.35},400);
		}
	function highNmc(){  
		$(this).stop().animate({opacity:1},400);
		$("#marburg").stop().animate({opacity:0.35},400);
		}
	function normalMandN(){  
		$("#marburg").stop().animate({opacity:0.75},400);
		$("#nmc").stop().animate({opacity:0.75},400);
		}
	
	$("#marburg_small.inactive").mouseenter(highMarburgS).mouseleave(activeNS);
	$("#nmc_small.inactive").mouseenter(highNmcS).mouseleave(activeMS);
	function highMarburgS(){  
		$("#marburg_small").stop().animate({opacity:0.9},400);
		$("#nmc_small").stop().animate({opacity:0.35},400);
		$("#content div.right").stop().animate({opacity:0.35},400);
		}
	function activeNS(){  
		$("#marburg_small").stop().animate({opacity:0.2},400);
		$("#nmc_small").stop().animate({opacity:1},400);
		$("#content div.right").stop().animate({opacity:1},400);
		}
	function highNmcS(){  
		$("#nmc_small").stop().animate({opacity:0.9},400);
		$("#marburg_small").stop().animate({opacity:0.35},400);
		$("#content div.right").stop().animate({opacity:0.35},400);
		}
	function activeMS(){  
		$("#marburg_small").stop().animate({opacity:1},400);
		$("#nmc_small").stop().animate({opacity:0.2},400);
		$("#content div.right").stop().animate({opacity:1},400);
		}			
});
