sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			hoverNav(this);
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			resetNav();
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function hoverNav(button) {

	var navBg = document.getElementById("main_nav");

	if ( button.id == "btn_home" ) {
		navBg.style.backgroundPosition = "0px -34px";
	} else if ( button.id == "btn_products" ) {
		navBg.style.backgroundPosition = "0px -68px";
	} else if ( button.id == "btn_why_vibration" ) {
		navBg.style.backgroundPosition = "0px -102px";
	} else if ( button.id == "btn_demo" ) {
		navBg.style.backgroundPosition = "0px -136px";
	} else if ( button.id == "btn_testimonials" ) {
		navBg.style.backgroundPosition = "0px -170px";
	} else if ( button.id == "btn_faqs" ) {
		navBg.style.backgroundPosition = "0px -204px";
	} else if ( button.id == "btn_about" ) {
		navBg.style.backgroundPosition = "0px -238px";
	} else if ( button.id == "btn_contact" ) {
		navBg.style.backgroundPosition = "0px -272px";
	}
}

function resetNav() {
	document.getElementById("main_nav").style.backgroundPosition = "0px 0px";
}

function mouseOer() {
	this.className+=" sfhover";
}

function mouseOot() {
	this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}