/* new accessible, unobtrusive popup code */

function windowLinks() {                      
    if(!document.getElementsByTagName) {
         return;
    }
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) { 
         var anchor = anchors[i];
         var relIndex = anchor.rel;
   		 if (relIndex){                               
    		 var relSplit = relIndex.split(":"); 
    		 linkType = relSplit[0];

             if (linkType != "" ) { /*add a class name for all anchors*/
                 anchor.className += " "+linkType; 
             }
            
             if (linkType == "external" ) {            
                 anchor.target = "_blank";              
    		 	 anchor.title = "Load in new window: "+ anchor.href;
    		 }       
        }
    }
    
  //unobtrusive mouseover 
   
    function imgOver(obj) {
        srcStr = obj.firstChild.src.replace(".gif","_over.gif"); 
        obj.firstChild.src = srcStr;
    }
    function imgOut(obj) {
        srcStr = obj.firstChild.src.replace("_over.gif",".gif");
        obj.firstChild.src = srcStr;
    }
       
    var resume = document.getElementById("resume_link");
    if ( resume ) {
        resume.onmouseover = function() { imgOver(this) };
        resume.onmouseout = function() { imgOut(this) };
    }
    var blog = document.getElementById("blog_link");
    if ( blog ) {
        blog.onmouseover = function() { imgOver(this) };
        blog.onmouseout = function() { imgOut(this) };
    }
    
    var contact = document.getElementById("contact");
    if ( contact ) {
        contact.onmouseover = function() { imgOver(this) };
        contact.onmouseout = function() { imgOut(this) };
    }
} 

addLoadListener(windowLinks);

  