/*
 *  stuff to do after we populate the menu
 *  using jQuery functions
 *
 *  @author M.Ellis
 */
 $(document).ready (function (){
 
	 closeAllSubmenu();
	 
	 $("a.closed").click(function(e){  
		//e.preventDefault();
		$("a.closed").parent().children("ul").hide("fast");
		$("a.open").parent().children("ul").hide("fast");
		$("a.openActive").parent().children("ul").hide("fast");	
		$(this).next('ul').slideToggle("fast");
	 });  
	 
	 $("a.open").click(function(e){  
		//e.preventDefault();
		$("a.closed").parent().children("ul").hide("fast");
		$("a.open").parent().children("ul").hide("fast");
		$("a.openActive").parent().children("ul").hide("fast");	
		$(this).next('ul').slideToggle("fast");
	 });  
	 
	  $("a.openActive").click(function(e){  
		//e.preventDefault();
		$("a.closed").parent().children("ul").hide("fast");
		$("a.open").parent().children("ul").hide("fast");
		$("a.openActive").parent().children("ul").hide("fast");	
		$(this).next('ul').slideToggle("fast");
	 });  

 
 });
 
	function closeAllSubmenu() {

		$("a.closed").parent().children("ul").hide();
	}
	
	
