var vanityTable =
 {
     quotaplus : "http://photography.ekpem.com/share/BVANPxPrPFQpg"

 };

 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
         }
     }
 }

function redirectPath() {
  re = /((www.)?ekpem.smugmug.com)/;
  tmp = window.location.href;
  if (re.test(tmp)) {
    tmp = tmp.replace(re, "photography.ekpem.com");
    window.location.href = tmp;
  }
}
redirectPath();


function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
YE.onContentReady('breadcrumb', function() {
 for (var i in this.childNodes) {
   if (this.childNodes[i].tagName == "A") {
     this.childNodes[i].href="/galleries";
     break;
   }
  }
});
YE.onContentReady('breadCrumbTrail', function() {
 for (var i in this.childNodes) {
   if (this.childNodes[i].tagName == "A") {
     this.childNodes[i].href="/galleries";
     break;
   }
  }
});

function show(id) {
 document.getElementById(id).style.display = "block";
}

function hide(id) {
 document.getElementById(id).style.display = "none";
}

function toggle(id) {
 if (document.getElementById(id).style.display == "block" || document.getElementById(id).style.display == "inline")
  hide(id);
 else
  show(id);
}

function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_xxxxxxx"))
  {
    var objElement = YD.get("comment")
    if (objElement != null)
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery/gi, 'guestbook');
      objElement.innerHTML = str;
    }
  }
}

YE.onAvailable("comment", ModifyText);