// code for vanity urls

var vanityTable = 
 {
     therundown: "http://www.scottryanphotography.com/gallery/7435913_msEpR",
     contact: "http://www.scottryanphotography.com/gallery/7631865_UEHiG",
     bigshots: "http://www.scottryanphotography.com/gallery/8920343_xEdf2"
 };

 function CheckRedirects()
 {
     if (YD.hasClass(document.body, 'homepage'))    // only run this code on the home page
     {
         // get the path from the current URL, 
         // convert it to lowercase and remove the leading slash
         var path = window.location.pathname.toLowerCase().substr(1);
         
         var newURL = vanityTable[path];        // look it up in our table
         
         // if we found it in the table && newURL is different than where we are
         if (newURL && (newURL != window.location))
         {
             window.location.replace(newURL);        // go to the new URL
         }
     }
 }

// change the link on the SmugMug Logo

YE.onAvailable('homelink', function(e) {
    this.href = "http://scottryanphotography.smugmug.com/";
    this.firstChild.alt = "Scott Ryan Photography";
    this.firstChild.title = "Scott Ryan Photography";
});


// removes the pipes characters in the toolbar header

YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
