﻿// Fix :hover
var sfHover = function(){
	if (document.all && document.getElementById){
		var navs = ['main-nav'];
		for (var i=0, len=navs.length; i<len; i++){
			var nav = document.getElementById(navs[i]);
			var navRoot = nav.getElementsByTagName('ul')[0];
			if (!navRoot) return;
			for (var j=0, clen=navRoot.childNodes.length; j<clen; j++) {
				var node = navRoot.childNodes[j];
				if (node.nodeName == 'LI'){
					node.onmouseover = function(){
						this.className += ' hover';
					}
					node.onmouseout = function(){
						this.className = this.className.replace(' hover', '');
					}
				}
			}
		}
	}
}

if (window.attachEvent) window.attachEvent('onload', function(){
	sfHover();
});
