// Right-click message
rightClickWarning = "Copyright (c) 2009 Michael Chang.\nAll images are Copyrighted. All rights reserved.\nNo reproduction is allowed without written consent.\n\nPlease contact photo@pictia.com for permissions."

// mail-to: scramble
function norobotmail(aUser, aDomain) { document.location = "mailto:" + aUser + "@" + aDomain; }


// Change "Gallery Categories" to something else
YE.onAvailable('categoryTitle', function() {this.innerHTML = 'Photography by Michael Chang'});


// Turn off text bubbles
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)});


// script to replace a user's name in the breadcrumb with "Home"
YE.onContentReady("breadCrumbTrail", ReplaceTopOfBreadcrumbWithHome);
function ReplaceTopOfBreadcrumbWithHome()
{
    var str = this.innerHTML.replace(/\n/g, " ");
    this.innerHTML = str.replace(/\>[^\<]+<\/a>/i, ">Home</a>");
}
 