rightClickWarning = "Please don't copy this photo.  If you have a legitimate use for a photo, email me, and we can discuss options."; 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>");
}

// ----------------------------------------------------------------------------
// TrimCategoryPhotoCount
//
// Takes a category of subcategory description that would typically
// look like this:
//
// 1 gallery with 11 photos 
// 4 galleries with 140 photos
// 
// And changes it to remove the photo count so it just looks like this:
//
// 1 gallery
// 4 galleries
// ----------------------------------------------------------------------------
function TrimCategoryPhotoCount()
{
    var miniBoxes = YD.getElementsByClassName("miniBox", "div", this);
    for (var i = 0; i < miniBoxes.length; i++)
    {
        var descriptions = YD.getElementsByClassName("description", "p", miniBoxes[i]);
        try 
        {
            var match = descriptions[0].innerHTML.match(/^\d+ galler(y|ies)/);
            descriptions[0].innerHTML = match[0];
        } catch (e) {}
    }
}
YE.onContentReady("categoriesBox", TrimCategoryPhotoCount);
YE.onContentReady("subcategoriesBox", TrimCategoryPhotoCount);

