/* 
 * Derived from http://www.sitepoint.com/article/1041/3
 * Purpose: a standards-compliant way to make external links open
 * in new windows.  
 */

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")) {
      if (!(anchor.href.match("audiointuition.com"))) {
        anchor.target = "_blank";
        /* Only change the class if it's not explicitly set */
	if (anchor.className == "")
          anchor.className = "external";
      }
    }
  }
}

SafeAddOnload(externalLinks);
