rightClickWarning = "These images are protected and may not be downloaded without permission.  Images are available for digital purchase or for prints."; function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");





// ------------------------------------------------------------------------------------------------------------------------------------
// 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];
		}
	}
	// if there's a ?xxxx parameter, make sure that stays at the end
	var str = targetTag.href;
	var parms = "";
	var pos = str.search(/\?/);
	if (pos != -1)
	{
		parms = str.substr(pos);
		str = str.substr(0, pos);
	}
	// make sure URL ends with a slash
	if (str.search(/\/$/) == -1)
	{
		str += "/";
	}
	str +="galleries";						// can be changed to point to a category
	str += parms;							// put parms back on
	targetTag.href = str;
	targetTag.innerHTML = "Galleries";		// can be changed to whatever you want the top level to be called
}

YE.onContentReady("breadCrumbTrail", AdjustBreadcrumb);

// END OF
// 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
// ------------------------------------------------------------------------------------------------------------------------------------
