//turn links with rel=external into new window links and add an icon or alt text
//window.onload = 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("class") == "external") {
     anchor.target = "_blank";
     anchor.className = "external";
     anchor.title = (anchor.title != "") ? anchor.title+" (opens in a new window)" : "opens in a new window";
 }}
}
window.onload = externalLinks;

