﻿// Simple function to allow shorthand for getElementById
// $ and $$ were already taken by MooTools.
function $$$(id) { return document.getElementById(id); }

/*
  "Suckerfish" drop down work-around for IE5/6 lack of support for :hover on
  anything but <A> tags.  This dynamically sets a the "sfhover" class on LI 
  elements within the nav menu when the mouse is over them.
  http://www.htmldog.com/articles/suckerfish/dropdowns/    
*/
sfHover = function() {
    if (document.getElementById("nav"))
    {
	    var sfEls = document.getElementById("nav").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);