/**** REL = EXTERNAL ***/
addLoadEvent(function() {
	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"; 
		}
	} 
})
/**** NAV MENU DROPDOWNS ***/
addLoadEvent(function() {
	var navLIs = document.getElementById("navWrap").getElementsByTagName("LI");
	for (var i=0; i<navLIs.length; i++) {
		navLIs[i].onmouseover = function() {
			if (this.className.match("parent") != null) {
				this.className += " both";
			} 
			this.className += " active";
		}
		navLIs[i].onmouseout = function() {
			this.className = this.className.replace(/active/g,"");
			this.className = this.className.replace(/both/g,"");
		}
	}
})
/**** HOME SELECT DROPDOWNS ***/
addLoadEvent(function() {
	createPopup("selectTopic", "topicSelect");
})



addLoadEvent(
	function(){
		jQuery('#homepagePhotoSlideshow ul').innerfade({
			speed: 2000,
			timeout: 5000,
			type: 'sequence'
		});
		jQuery('.homepagePhotoSlideshowElement ul').innerfade({
			speed: 2000,
			timeout: 5000,
			type: 'sequence'
		});
		jQuery('#donorPartners IMG').each( function() {
			jQuery(this).css("paddingTop",(92 - jQuery(this).height())/2 + "px");
		});
	}
);