
sfHovers = function() {
	var sfEls = document.getElementById("ja-cssmenu").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; ++i) {
		sfEls[i].onmouseover=function() {
			clearTimeout(this.timer);
			if(this.className.indexOf("sfhover") == -1)
				this.className+="sfhover";
		}
		sfEls[i].onmouseout=function() {
			try {
				this.timer = setTimeout(sfHoverOut.bind(this), 20);
				//sfHoverOut();
				//alert(sfHoverOut.bind(this));
			} 
			catch (e) { // 
				alert(e);
			}
		}
	}
}


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

//if (window.attachEvent) window.attachEvent("onload", sfHovers);

if (window.attachEvent) {
	window.onload = function () {
				try {
					clearTimeOut(this.timer);
					this.className = this.className.replace(new RegExp("sfhover\\b"), "");
				}
				catch (e) {
					//
				}
			}
}

