$(document).ready(function(){ // die Haupt Menüpunkte 

	
   $("#nav_home ul li").each(function () 
			{
			
			$(this).mouseover( function()
					{		
					
					$(this).children("div").css("display", "block"); //Menü sichtbar machen
					
					//$(this).children("div").slideDown(200)
					$(this).css("background", "url(/img/nav_main/current.gif)"); //hintergrund für das li						
					})
			})	
			$(this).mouseout(function()
					{			
					$("#nav_home ul li div.subnav").css("display", "none")//aufgeklappte Menüs schließen
					//$("#nav_home ul li div.subnav").children("div").slideUp(10)
				
					$("#nav_home ul li").css("background", "");
					})
 });
 
 function popup(url, width, height, name) {
		var appendix;
		if(url.indexOf('?') > 0) {
			appendix = '&';
		} else {
			appendix = '?';
		}
		if(url.indexOf('#') > 0) {
			url = url.substring(0, url.indexOf('#')) + appendix + 'popup=true' + url.substring(url.indexOf('#'));
		} else {
			url = url + appendix + 'popup=true';
		}
        var p = window.open(url, name, 'width='+width+',height='+height+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
		if (p)
			p.focus();
}
 function popup2(url, width, height, name) {
		var appendix;
		if(url.indexOf('?') > 0) {
			appendix = '&';
		} else {
			appendix = '?';
		}
		if(url.indexOf('#') > 0) {
			url = url.substring(0, url.indexOf('#')) + appendix + 'popup=true' + url.substring(url.indexOf('#'));
		} else {
			url = url + appendix + 'popup=true';
		}
        var p = window.open(url, name, 'width='+width+',height='+height+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
		if (p)
			p.focus();
}

