// Author: Kevin Yank | sitepoint.com
// Description: Targets blank in xhtml strict

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";
 }
}


// Author: Travis Beckham | squidfingers.com
// Description: Remove anchor outlines from all links in the document

function blurAnchors() {
  if(document.getElementsByTagName){
    var a = document.getElementsByTagName("a");
    for(var i = 0; i < a.length; i++){
      a[i].onfocus = function(){this.blur()};
    }
  }
}


// run all scripts

function runScripts()
{
  externalLinks();
  blurAnchors();
} 

window.onload = runScripts;
