// 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, ">PictureThisCity.com</a>");
}

var pos = window.document.URL.indexOf("gallery");

if (pos > 0 && SM) {
        var thisURL = webServer + "/gallery/" + AlbumID + "_" + AlbumKey + "/1/" + ImageID + "_" + ImageKey ;
	SM.buttons.FacebookButton = new YAHOO.widget.Button({
		id: 'Share on Facebook',
		label: 'Link Gallery to Your Facebook',
		container: 'altViews',
		type: 'link',
		href: 'http://www.facebook.com/share.php?u='+thisURL+'&t=SmugMug+Album',
		target: '_blank',
		className: 'sm-button sm-button-small facebookButton glyphButton menuButton share_button'
	});

}

