

/* -------------------------- suckerFish Script for IE ------------------------- */

sfHover = function() {
	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);


/* -------------------------- External Linking --------------------------------- */

/*
This is a script that I'm testing for the purposes of openeing links in new windows. Although this is easily done with the target='_blank' tag in the <a> element, it does not validate as XHTML Strict. To be honest it doesn't really matter it just always bugged me that my pages didn't get that nice green Congratulations when I validated through no fault of my own. I like that green color, it makes everything nice and warm and fuzzy. Anyway, instead of target='_blank' in the anchor, use:

	rel='external'

*/

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;