$(document).ready(function() { 
//	externalLinks();
});

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") == "file_pdf"){
//			anchor.setAttribute("alt", anchor.innerHTML);
			anchor.setAttribute("title", "opens in a new window");
			anchor.target = "_blank";
			anchor.innerHTML = anchor.innerHTML + "&nbsp;(opens in a new window)";
		}
		else if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external_site"){
//			anchor.setAttribute("class", "external-site");
			anchor.setAttribute("alt", "opens in a new window");
//			anchor.setAttribute("title", "opens in a new window");
			anchor.target = "_blank";
			anchor.innerHTML = anchor.innerHTML + '<img height="11" width="12" alt="This link will open in a new window" src="img/custom/icons/link_icon_white.gif" />';
		}
	}
}
