// JS code for 3 levels of rollover menus, based on Suckerfish Dropdowns. 
/* ## removed this because <div id="nav"> does not exist in new Commerce design, appears to cause errors ##
sfhover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfhover);*/

sfhover_commerce = function() {
	var sfEls = document.getElementById("commerce_nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover_commerce";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover_commerce\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfhover_commerce);

sfhover2 = function() {
	var sfEls = document.getElementById("subnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover2";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover2\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfhover2);
