function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))

YD.addClass(document.body, "galleries");

YE.onContentReady("image_569442358", ModParentLink, "https://www.onlinefilefolder.com/index.php?action=view&file_num=27118401");

YE.onContentReady("image_569446029", ModParentLink, "https://www.onlinefilefolder.com/index.php?action=view&file_num=27118311");

YE.onContentReady("image_569445710", ModParentLink, "https://www.onlinefilefolder.com/index.php?action=view&file_num=27118279");

YE.onContentReady("image_569450394", ModParentLink, "https://www.onlinefilefolder.com/index.php?action=view&file_num=27118400");
 
function ModParentLink(newLink)
{
    var parent = this.parentNode;
    if (parent.href)
    {
        parent.href = newLink;
    }
}

// change the link on the SmugMug Logo

YE.onAvailable('homelink', function(e) {

this.href = "http://summerwrights.smugmug.com/";

this.firstChild.alt = "Summerwrights Photography";

this.firstChild.title = "Summerwrights Photography";

});

// change the right click protection message

rightClickWarning = "All photos are property of Summerwrights Photography. All rights reserved. Unauthorized use is prohibited."; 

// Script to change the breadcrumb link to your homepage to point to your galleries page instead of your slideshow
// It also changes that link to say "Galleries" instead of your user name

function AdjustBreadcrumb()
{
    // there are something like six different forms of the breadcrumb including search and keyword and date and communities, categories and galleries that we have to make this work for
    var tags = YD.getElementsByClassName("nav", "a", this);        // get all the <a> tags with class "nav"
    var filteredTags = new Array;
    // filter out any that aren't at the top level in the breadCrumbTrail (this gets rid of the relatedDate tags)
    for (var i in tags)
    {
        if (tags[i].parentNode == this)
        {
            filteredTags.push(tags[i]);
        }
    }
    if (filteredTags.length == 0)
    {
        return;
    }
    // default to targeting the first filtered tag
    var targetTag = filteredTags[0];
    
    // see if we have a community here
    if (filteredTags.length > 1)
    {
        // if we have a community here, then the user top level is in the 2nd position
        if (filteredTags[0].href.search(/\/community\//) != -1)
        {
            targetTag = filteredTags[1];
        }
    }
    // make sure URL ends with a slash
    var str = targetTag.href;
    if (str.search(/\/$/) == -1)
    {
        str += "/";
    }
    str +="galleries";
    targetTag.href = str;
    targetTag.innerHTML = "Galleries";
}

YE.onContentReady("breadCrumbTrail", AdjustBreadcrumb);