﻿$(function(){
	$(".grid tbody tr:odd, .grid:not(:has(tbody)) tr.even").addClass("alt");
	$("#quickTools")
		.hover(
			function(){ $("ul", this).hide().fadeIn("fast"); }, 
			function() { } 
		)
		.hoverClass("sfHover")
		.focus(function(){$(this).hover();})
		.each(function(){ $("ul", this).hide(); })
		;
});

$(function(){
	$(".grid tbody tr:odd, .grid:not(:has(tbody)) tr.even").addClass("alt");
	$("#other")
		.hover(
			function(){ $("ul", this).hide().fadeIn("fast"); }, 
			function() { } 
		)
		.hoverClass("sfHover")
		.focus(function(){$(this).hover();})
		.each(function(){ $("ul", this).hide(); })
		;
});


$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};

sfHover = function() 
{
	if(document.getElementById("dropdownnav") != null)
	{
		var sfEls = document.getElementById("dropdownnav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

