/*---------------------------*/
/*--[ Suckerfish Dropdown ]--*/
/*---------------------------*/
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 links ]--*/
/*----------------------*/

function transform_rel() {
	var W3CDOM = (document.createElement && document.getElementsByTagName);
	if (!W3CDOM) return; // If the browser doesn't support the W3C DOM, don't do anything.

	var links = document.getElementsByTagName('a');
	for(var i = 0; i < links.length; i++) {
		if(links[i].getAttribute('href') && links[i].getAttribute('rel') == 'external') {
			links[i].target = '_blank';
		}
		if(links[i].getAttribute('href') && links[i].getAttribute('rel') == 'popup') {
			links[i].onclick = function() {
				popup(this.href, this.className);
				return false;
			}
		}
	}
}
window.onload = function onLoader(){transform_rel();}
