var vanityTable = 
{
    haileyburgess : "http://piercingperceptions.smugmug.com/gallery/7545584_kSY9j#487478239_mif2U",

    photographer : "http://piercingperceptions.smugmug.com/gallery/7140168_cQPHK",

    information : "http://piercingperceptions.smugmug.com/gallery/7138999_dDoYm",

    contact : "http://piercingperceptions.smugmug.com/gallery/6398996_KE9bK",

  artandcontext: "http://piercingperceptions.smugmug.com/gallery/8068576_2mSPC",

    bartlows : "http://piercingperceptions.smugmug.com/gallery/7874466_VxnoD#510463417_D32gL",

    logan: "http://piercingperceptions.smugmug.com/gallery/7924796_MVfv8#513918440_Lxuoe",

    birthday: "http://piercingperceptions.smugmug.com/gallery/8170270_DF6Jf#533862206_TrwJr",

    babyasher : "http://piercingperceptions.smugmug.com/gallery/7737071_orsdv#500158727_tvXE7",

    kaylaself : "http://piercingperceptions.smugmug.com/gallery/7761305_DKVd8#502008092_A9orB",

    mommyday : "http://piercingperceptions.smugmug.com/gallery/8157777_RokkD#532361717_wzhNe",

    guestbook : "http://piercingperceptions.smugmug.com/gallery/6107160_cXbg5"




};

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
        }
    }
}

function ModifyText () 
{
 if (YD.hasClass(document.body, "gallery_6107160")) 
 {
   var objElement = YD.get("comment")
   if (objElement != null) 
   {
     var str = new String(objElement.innerHTML);
     str = str.replace(/\gallery/gi, 'Guestbook');
     objElement.innerHTML = str;
   }
 }
}
