var vanityTable = 
 {
     availability: "http://images.enkophoto.com/gallery/4300649_oKze8",
     studio: "http://images.enkophoto.com/gallery/4240029_EWjMn",
     wedding: "http://images.enkophoto.com/gallery/4240029_EWjMn",
     leschelon: "http://images.enkophoto.com/share/JclYe4ZIYosGY",
     internet: "http://images.enkophoto.com/gallery/7478922_a3gBZ",
 };

 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
         }
     }
 }

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "3862636")) //
  removeLinkFromImg();
}

function removeLinkFromImg() {
  oList = YD.getElementsByClassName("photo", "div");

  for (i=0; i < oList.length ; i++) {
    if (oList[i].childNodes) {
      oList[i].firstChild.removeAttribute("href");
      oList[i].firstChild.firstChild.removeAttribute("alt");
      oList[i].firstChild.firstChild.removeAttribute("title");
    }
  }
}


CheckRedirects();
