function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer= saG1LA43IsI9w";
  }
}
YE.onAvailable('footer', AddReferralCode);
   //-----------------------------------------------------------------
   // This is a table of vanity URLs that can be appended to your
   // main domain and will then redirect the browser to the actual gallery.
   // 
   // This lets you have memorable URLs like:
   // http://jfriend.smugmug.com/stanford
   // 
   // rather than URLs like: 
   // http://jfriend.smugmug.com/gallery/329885
   //
   // which aren't so memorable.
   //
   // To extend this yourself, just add more items to the table below.
   // The first string must be all lowercase and is the vanity string
   // that you want to represent a gallery or category on your site.
   // The second string is the actual smugmug URL you want the browser
   // to go to when they type the vanity URL.
   // Note that this is a JavaScript array.  If you add items to the end
   // of the array, you must have a comma at the end of each line (except
   // the last line).
   //-----------------------------------------------------------------
   var vanityTable = 
   {
   	vikingsfc: "http://www.photosmatt.com/share/X3wSeYPrttXuP",
   	fallsoccer: "http://www.photosmatt.com/share/Q92n9pAXIeb8g",
   	pack20: "http://www.photosmatt.com/gallery/2159885",
   	snowfort: "http://www.photosmatt.com/gallery/2644689"
   	carullo: "http://www.photosmatt.com/gallery/8746560_c4JEz"
   };
   
 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
         }
     }
 }

rightClickWarning = "All photos are © Matthew Dickinson - PhotosMatt.com. All rights reserved. Unauthorized use is prohibited."

