 function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

filmstripMove = 0;


function delHover() {
    oLst = YD.getElementsBy(function(el) {return (YD.hasClass(el,'imgBorder') || YD.hasClass(el,'imgBorderOn'))},'img');
    for (i=0; i < oLst.length ; i++) {
        if (oLst[i].title && oLst[i].title != '') oLst[i].title = '';
        if (oLst[i].alt && oLst[i].alt != '') oLst[i].alt = '';
    }
}
YE.onContentReady('bodyWrapper', function() {if (!YD.hasClass(document.body, 'smugmug_ajax')) delHover()});
onPhotoShow.subscribe(function(){YE.onAvailable('mainImage', delHover)});

var vanityTable = 
 {
     kristenandjc : "http://heatherdunn.smugmug.com/Weddings/530741",
     sylviaandzeke : "http://heatherdunn.smugmug.com/Weddings/629908",
     debbieandmike : "http://heatherdunn.smugmug.com/Weddings/541199",
     kingsburgtrial2008 : "http://heatherdunn.smugmug.com/K-9%20Events/622084",
     amandaandandy : "http://HeatherDunn.smugmug.com/Weddings/498574",
     jenniferandjustin : "http://heatherdunn.smugmug.com/Weddings/492311",
     kingsburgtrial2009 : "http://www.heatherdunnphotography.com/K-9-Events/Kingsburg-2009-K-9-Trial",
     lindseyandraymond : "http://heatherdunn.smugmug.com/Weddings/739200" 
     
 };

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
         }
     }
 }
