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)});
function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=fxpzSDfLH9YPk";
  }
}
YE.onAvailable('footer', AddReferralCode);
function writeEMail(pLinkText, pSubject)
{
var v2="FDP48EEJDPPMERFB2CA4";
var v7=unescape("4%211WL*7dw4%10*%283/.%1C%20.Y");
 var v5=v2.length;var v1="";
 for(var v4=0;v4<v5;v4++)
 {
  v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
 }
document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject='+escape(pSubject)+'\'">'+pLinkText+'</a>');
}
 
function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "3984142")) //
  removeLinkFromImg();
}

function removeLinkFromImg() {
  oList = YD.getElementsByClassName("photo", "div");

  for (i=0; i < oList.length ; i++) {
    if (oList[i].childNodes) {
      oList[i].firstChild.removeAttribute("href");
      oList[i].firstChild.firstChild.removeAttribute("alt");
      oList[i].firstChild.firstChild.removeAttribute("title");
    }
  }
}
var vanityTable = 
 {
     aerial : "http://www.envisioncreativeimaging.com/gallery/3971237",
     busyflyin : "http://www.envisioncreativeimaging.com/gallery/4278567",
     ovaitts : "http://www.envisioncreativeimaging.com/gallery/4316863_vt8j8",
     chris : "http://www.envisioncreativeimaging.com/gallery/4821171_8pwAi",
     gtcbmx : "http://www.envisioncreativeimaging.com/gallery/4971384_QWAzq",
     cams : "http://www.envisioncreativeimaging.com/gallery/5852090_BRoeV",
     marionfootball : "http://troyraymond.smugmug.com/Events/616165",
     teamhighland : "http://www.envisioncreativeimaging.com/gallery/8533491_B8tQe/2/561936801_iDhTD#P-1-15",
     mast : "http://www.envisioncreativeimaging.com/gallery/3981802"
 };
 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
         }
     }
 }