rightClickWarning = "These photographs are protected by copyright!";

function norobotmail(aUser, aDomain) { document.location = "mailto:" + aUser + "@" + aDomain; }

function redirectPath() { 
  re = /((www.)?populus.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'photos.kimmerer.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath();  

var vanityTable = 
 {
     pirates: "http://photos.kimmerer.com/Pinnacle%20Pirates",
     leah: "http://photos.kimmerer.com/gallery/7539748_FwzaS#487001239",
     dolphins: "http://photos.kimmerer.com/Lexington%20Dolphins",
     sayre: "http://photos.kimmerer.com/Sayre%20School",
     contact: "http://photos.kimmerer.com/gallery/5167193_5GgWG",
     thanks: "http://photos.kimmerer.com/gallery/5167339_uV5CL",
     pannell: "http://photos.kimmerer.com/gallery/5444565_YpVPj",
     reforest: "http://photos.kimmerer.com/gallery/7890241_VaFjP",
     larkin: "http://photos.kimmerer.com/gallery/8279795_HG6tu"
 }

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
         }
     }
 }
