// JavaScript Document


  function closeAll(){
	$(document).ready(function(){ $("#graetzel li").hide(); });
	$(document).ready(function(){ $("#kindergarten li").hide(); });
	$(document).ready(function(){ $("#schule li").hide(); });
	$(document).ready(function(){ $("#betrieb li").hide(); });
	$(document).ready(function(){ $("#krankenhaus li").hide(); });
	$(document).ready(function(){ $("#freizeit li").hide(); });
	$(document).ready(function(){ $("#altern li").hide(); });
	$(document).ready(function(){ $("#selbsthilfe li").hide(); });
	$(document).ready(function(){ $("#geschlecht li").hide(); });
	$(document).ready(function(){ $("#stadt li").hide(); });
	$(document).ready(function(){ $("#stadt2 li").hide(); });
        $(document).ready(function(){ $("#ernaehrung li").hide(); });
        $(document).ready(function(){ $("#bewegung li").hide(); });
        $(document).ready(function(){ $("#seelischegesundheit li").hide(); });
        $(document).ready(function(){ $("#ueberdiewig li").hide(); });
	}

/*
// Gesundes Grätzel
 $(document).ready(function(){ $("#graetzel li").hide(); });
 $(document).ready(function(){ $("#graetzel a.hauptmenu").click(function(){ closeAll(); $("#graetzel li").slideToggle("fast"); }); });

// Gesunder Kindergarten
 $(document).ready(function(){ $("#kindergarten li").hide(); });
 $(document).ready(function(){ $("#kindergarten a.hauptmenu").click(function(){ closeAll(); $("#kindergarten li").slideToggle("fast"); }); });
 
// Gesunde Schule
 $(document).ready(function(){ $("#schule li").hide(); });
 $(document).ready(function(){ $("#schule a.hauptmenu").click(function(){closeAll();  $("#schule li").slideToggle("fast"); }); });
 
// Gesunder Betrieb
 $(document).ready(function(){ $("#betrieb li").hide(); });
 $(document).ready(function(){ $("#betrieb a.hauptmenu").click(function(){closeAll();  $("#betrieb li").slideToggle("fast"); }); });
 
// Gesundes Krankenhaus
 $(document).ready(function(){ $("#krankenhaus li").hide(); });
 $(document).ready(function(){ $("#krankenhaus a.hauptmenu").click(function(){closeAll();  $("#krankenhaus li").slideToggle("fast"); }); });
 
// Gesundes Altern
 $(document).ready(function(){ $("#altern li").hide(); });
 $(document).ready(function(){ $("#altern a.hauptmenu").click(function(){closeAll();  $("#altern li").slideToggle("fast"); }); });
 
// Selbsthilfe
 $(document).ready(function(){ $("#selbsthilfe li").hide(); });
 $(document).ready(function(){ $("#selbsthilfe a.hauptmenu").click(function(){closeAll();  $("#selbsthilfe li").slideToggle("fast"); }); });

// Gesund hat ein Geschlecht
 $(document).ready(function(){ $("#geschlecht li").hide(); });
 $(document).ready(function(){ $("#geschlecht a.hauptmenu").click(function(){closeAll();  $("#geschlecht li").slideToggle("fast"); }); });
 
// Gesunde Stadt (WHO)
 $(document).ready(function(){ $("#stadt li").hide(); });
 $(document).ready(function(){ $("#stadt a.hauptmenu").click(function(){closeAll();  $("#stadt li").slideToggle("fast"); }); });
*/

function getUrlVars() {
	var vars = {};
	var parts = window.location.href.replace(/[\#]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
		vars[key] = value;
	});
	return vars;
}


 $(document).ready(function(){
	 first = getUrlVars()["open"];
	 closeAll();
	 setTimeout($("#" + first + " li").slideToggle("slow"),3000);

	 second = getUrlVars()["parent"];
	 $("#" + second + " li").show();

});

