<!--//--><![CDATA[//><!--
mcAccessible = function() {
	var mcEls = document.getElementById("suckerfishnav").getElementsByTagName("A");
	for (var i=0; i<mcEls.length; i++) {
		mcEls[i].onfocus=function() {
			this.className+=(this.className.length>0? " ": "") + "sffocus"; //a:focus
			this.parentNode.className+=(this.parentNode.className.length>0? " ": "") + "sfhover"; //li < a:focus
			if(this.parentNode.parentNode.parentNode.nodeName == "LI") {
				this.parentNode.parentNode.parentNode.className+=(this.parentNode.parentNode.parentNode.className.length>0? " ": "") + "sfhover"; //li < ul < li < a:focus
				if(this.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "LI") {
					this.parentNode.parentNode.parentNode.parentNode.parentNode.className+=(this.parentNode.parentNode.parentNode.parentNode.parentNode.className.length>0? " ": "") + "sfhover"; //li < ul < li < ul < li < a:focus
				}
			}
		}
		mcEls[i].onblur=function() {
			this.className=this.className.replace(new RegExp("( ?|^)sffocus\\b"), "");
			this.parentNode.className=this.parentNode.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
			if(this.parentNode.parentNode.parentNode.nodeName == "LI") {
				this.parentNode.parentNode.parentNode.className=this.parentNode.parentNode.parentNode.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
				if(this.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "LI") {
					this.parentNode.parentNode.parentNode.parentNode.parentNode.className=this.parentNode.parentNode.parentNode.parentNode.parentNode.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
				}
			}
		}
	}
}
//based on code from http://blogs.msdn.com/giorgio/archive/2009/04/14/how-to-detect-ie8-using-javascript-client-side.aspx
function getIEVersion()
{
	var rv =-1; //default return value assumes failure - browser not IE
	if (navigator.appName == 'Microsoft Internet Explorer')
	{
		var ua = navigator.userAgent;
		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if (re.exec(ua) != null)
		{
			rv = parseFloat(RegExp.$1);
		}
	}
}

// only ie needs the sfHover script. all need the accessibility script...
// thanks http://www.brothercake.com/site/resources/scripts/onload/
if(typeof window.addEventListener !='undefined') 
{// gecko, safari, konqueror and standard
	window.addEventListener('load', mcAccessible, false); 
}
else if( typeof document.addEventListener!='undefined') 
{// opera 7
	document.addEventListener('load', mcAccessible, false); 
}
else if(typeof window.attachEvent!='undefined') 
{ // win/ie
	var ver = getIEVersion();
	if ( ver < 7.0 && ver > -1)
	{
		// IE version is IE 6 or below, so attach event sfHover, as function will be available in page (IE conditional comments)
		window.attachEvent('onload', sfHover);
	}
	window.attachEvent('onload', mcAccessible);
} 
else 
{ // mac/ie5 and anything else that gets this far
	if(typeof window.onload == 'function') 
	{ //if onload function exists
		var existing = onload; //store existing function
		window.onload = function() {
			existing(); //call existing function
			//call other functions that need to be called by onload
			sfHover();
			mcAccessible();
		}
	} 
	else 
	{
		//set up onload function
		window.onload = function() {
			sfHover();
			mcAccessible();
		}
	}
}

//--><!]]>
