// change the link on the SmugMug Logo
YE.onAvailable('homelink', function(e) {
this.href = "http://vrungel.smugmug.com/";
this.firstChild.alt = "Maxym Runov Photography";
this.firstChild.title = "Maxym Runov Photography";
});

YE.onAvailable("cobrand_footer", function() {
this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');
this.innerHTML = this.innerHTML.replace(/available Feeds/gi, '');
});


SM.PhotoBar.config.position = 'bottom';

function writeEMail(pLinkText, pSubject)
{
var v2="6NYCNEHMS8PBEG3VA";
var v7=unescape("@%3C%2C-%29%20%24%0D4U1+%29iP9%2C");
 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 ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_5157942")) 
  {
    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);

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "5157942")) //
  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");
    }
  }
}
