function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

rightClickWarning = "All photos property of Concepts Photography & Design. All rights reserved. Unauthorized use is prohibited. This includes not-for-profit and personal use.";


var vanityTable = 
 {
     weddings00: "http://conceptspd.smugmug.com/gallery/4828673_vpZ9K",
     clients00: "http://conceptspd.smugmug.com/gallery/4833429_dic2W",
     portraits00: "http://conceptspd.smugmug.com/gallery/4892186_8DbQy",
     events00: "http://conceptspd.smugmug.com/gallery/4933270_eh5V7",
     landscapes00: "http://conceptspd.smugmug.com/gallery/4933649_WTnN6",
     architecture00: "http://conceptspd.smugmug.com/gallery/4933708_VRi3S",
     miscellaneous00: "http://conceptspd.smugmug.com/gallery/4933884_AYY33",
     projects00: "http://conceptspd.smugmug.com/gallery/4934386_UqSiE",
     yabs00: "http://conceptspd.smugmug.com/gallery/4934496_33aQb",
     testimonials00: "http://conceptspd.smugmug.com/gallery/4838404_Ho6tS",
     aboutme00: "http://conceptspd.smugmug.com/gallery/4798379_ZhEyv/1/285010076_Jx45r",
     prices00: "http://conceptspd.smugmug.com/gallery/4798761_KSNB7",
     contact00: "http://conceptspd.smugmug.com/gallery/4799334_8WRbv",
     guestbook00: "http://conceptspd.smugmug.com/gallery/4940762_2D94B",
     blog00: "http://conceptspd.blogspot.com",
 };

 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
         }
     }
 }