function sfHover() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}

function scrollFix()
{
	if (getBrowserWidth() < 805)
		window.scroll(300,1);
}	
	
function getBrowserWidth()
{
    if (window.innerWidth)
	{
        return window.innerWidth;
	}  
    
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
        return document.documentElement.clientWidth;    
	}
    
	else if (document.body)
	{
		return document.body.clientWidth;
	}      
        return 0;
}

function wrapper ()
{
	if (window.attachEvent)
	{
		sfHover();
		scrollFix();
	}
	else
	{
		scrollFix();
	}
}

if (window.addEventListener) //DOM method for binding an event
window.addEventListener("load", wrapper, false)
else if (window.attachEvent) //IE exclusive method for binding an event
window.attachEvent("onload", wrapper)
else if (document.getElementById) //support older modern browsers
window.onload=wrapper




