function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

var vanityTable = 
 {
     studiorental : "http://www.gwagdesigns.com/gallery/7372713_QfaUi",
     evergreendrift051709 : "http://www.gwagdesigns.com/gallery/8246246_EB5hS",
     longwinter09 : "http://www.gwagdesigns.com/gallery/7132586_63hRQ",
     tacomascouting : "http://www.gwagdesigns.com/gallery/7626007_KSGbc",
     weddingassistant : "http://www.gwagdesigns.com/gallery/5713937_4vd3V",
     milsim : "http://www.gwagdesigns.com/Military%20Simulation",
     breakingpoint : "http://gwagdesigns.smugmug.com/gallery/9196404_KJmC4",
     round3 : "http://www.gwagdesigns.com/gallery/9307615_nYSzw",
     jumptodestiny09 : "http://gwagdesigns.com/gallery/8494729_gJL9F"
 };


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
         }
     }
 }



















