sfHover = function() {
	var sfEls = document.getElementById("nav-list").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			setHover(this);
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			removeHover(this);	
		}
	}
}
if (window.attachEvent) { window.attachEvent("onload", sfHover) };

function setHover(el) {
    if (el.className.length > 0) {
        el.className += " over";
    }
    else {
        el.className = "over";
    }
}

function removeHover(el) {
    if (el.className.length == 4) {
        el.className=el.className.replace("over", "");
    }
    else {
        el.className=el.className.replace(" over", "");
    }
}

function initNav() {
	
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	if (isIE) return;
	if (!document.getElementById) return;
	
	var aLists = document.getElementsByTagName('li');
	for (var i = 0; i < aLists.length; i++) {
		if (aLists[i].className == 'top-nav') {
			
			aLists[i].onmouseover = function() {
				setHover(this);
			}
			aLists[i].onmouseout = function() {
				removeHover(this);
			}
			
		}
	}
}

addLoadEvent(initNav);