function initMenus() {	$j('ul.menu ul').hide();	$j.each($j('ul.menu'), function(){		$j('#' + this.id + '.expandfirst ul:first').show();	});	$j('ul.menu li a').click(		function() {			var checkElement = $j(this).next();			var parent = this.parentNode.parentNode.id;			if($j('#' + parent).hasClass('noaccordion')) {				$j(this).next().slideToggle('normal');				return false;			}			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {				if($j('#' + parent).hasClass('collapsible')) {					$j('#' + parent + ' ul:visible').slideUp('normal');				}				return false;			}			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {				$j('#' + parent + ' ul:visible').slideUp('normal');				checkElement.slideDown('normal');				return false;			}		}	);}$j(document).ready(function() {initMenus();});function initMenus() {	 $j('ul.menu ul').hide();	 $j.each($j('ul.menu'), function(){		var cookie = $j.cookie(this.id);		if(cookie === null || String(cookie).length < 1) {			$j('#' + this.id + '.expandfirst ul:first').show();	}	else {		$j('#' + this.id + ' .' + cookie).next().show();	 }	});	$j.each($j('.current_page_item').parents('ul'),function () { 		$j(this).show();	}); 	$j('ul.menu li a').click(		function() {		 var checkElement = $j(this).next();		 var parent = this.parentNode.parentNode.id;		if($j('#' + parent).hasClass('noaccordion')) {			if((String(parent).length > 0) && (String(this.className).length > 0)) {				if($j(this).next().is(':visible')) {$j.cookie(parent, null);		 }		else {$j.cookie(parent, this.className, { path: "/", domain:"safeasmilk.org"});		 }		$j(this).next().slideToggle('normal');		}	}	if((checkElement.is('ul')) && (checkElement.is(':visible'))) {		if($j('#' + parent).hasClass('collapsible')) {			$j('#' + parent + ' ul:visible').slideUp('normal');		}		return false;		}	if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {		$j('#' + parent + ' ul:visible').slideUp('normal');		if((String(parent).length > 0) && (String(this.className).length > 0)) {			$j.cookie(parent, this.className, { path: "/" , domain:"safeasmilk.org"});	}	checkElement.slideDown('normal');	return false;	}   }  ); }$j(document).ready(function() {initMenus();});