function redirectPath() {
  re = /((www.)?drdavid.smugmug.com)/;
  res = /(www.wolfsnap.com\/gallery\/7221836_RPgy5)/;
  tmp = window.location.href;
  if (re.test(tmp)) {
    tmp = tmp.replace(re, 'photos.wolfsnap.com');
    window.location.href = tmp;
  }
  if (res.test(tmp)) {
    tmp = tmp.replace(res, 'smugization.wolfsnap.com');
    window.location.href = tmp;
  }
}
//redirectPath();

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

var vanityTable =
 {
     pricing : "/gallery/7550041_Zaafr",
     about : "/gallery/3943391_kkBLJ",
     gym : "/Sports/424203",
     color : "/gallery/4338079_VgZY2",
     samples : "/gallery/4696195_DuPhF",
     hcll : "/Horsethief%20Canyon%20Little%20League",
     icc : "/Photo%20Services",
     smugization : "/gallery/4650775_dNFKq",
     deposit : "/gallery/6506282_X5X5p",
     homebiz : "/gallery/5593431_HVjLD",
     smuglite : "/gallery/7751541_awGVt"
 };

 function IsHomePage()
 {
    return(YD.hasClass(document.body, 'homepage'));
 }
 
 function CheckRedirects()
 {
     if (IsHomePage())    // 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
         }
     }
 }

YE.onContentReady('breadcrumb', function() {
 for (var i in this.childNodes) {
   if (this.childNodes[i].tagName == "A") {
     this.childNodes[i].href="/galleries";
     break;
   }
  }
});
YE.onContentReady('breadCrumbTrail', function() {
 for (var i in this.childNodes) {
   if (this.childNodes[i].tagName == "A") {
     this.childNodes[i].href="/galleries";
     break;
   }
  }
});

var dA = new Array(1);
dA[0] = "<b><center><font size=4 color=red>NEW!! Get a 4x6 Glossy for only $1.95! or, a 5x7 Glossy for $2.95.</font><br>Glossy images are not retouched before printing. Lustre print images include full-service retouching. Both are 100% satisfaction guaranteed.<br>Need help? Call us at 951-443-5240!</center></b>";
