startup = function()
    {
        // fix IE layout bug
        if (document.body && document.body.clientWidth && document.body.clientWidth % 2 == 1)
        {
            window.resizeBy(1, 0);
        }
        
        addMouseHoverClass("nav", "sfhover");
    }
    
    function addMouseHoverClass(elementId, className)
    {
	    var elements = document.getElementById(elementId).getElementsByTagName("LI");
	    for (var i = 0; i < elements.length; i++)
	    {
		    elements[i].onmouseover = function()
		    {
			    this.className += " " + className;
		    }
		    elements[i].onmouseout = function()
		    {
			    this.className = this.className.replace(new RegExp(" " + className + "\\b"), "");
		    }
	    }
    }
    
    if (window.attachEvent) window.attachEvent("onload", startup);