YE.onAvailable('categoryTitle', function() {this.innerHTML = 'Images By Josh Galleries'});
displaySmugPopular = false;


document.title = "Images By Josh - Travel and Wedding Photography";
function RelevantTitle()
{
var baseTitle = "Images By Josh - Travel and Wedding Photography";
var separator = " - ";
var albumTitle = document.getElementById("albumTitle");
var galleryTitle = document.getElementById("galleryTitle");
if( albumTitle && albumTitle.textContent )
document.title = baseTitle + separator + albumTitle.textContent;
else if( galleryTitle && galleryTitle.textContent )
{
var galleryTitleText = galleryTitle.textContent;
// Strip " sub-categories" off the end of the category text
var finalPositionCategory = galleryTitleText.search(" sub-categories");
if( finalPositionCategory >= 0 )
galleryTitleText = galleryTitleText.substr( 0, finalPositionCategory );
else
{
// Strip " galleries" off the end of the category/sub-category text
var finalPositionSubCategory = galleryTitleText.search(" galleries");
if( finalPositionSubCategory >= 0 )
galleryTitleText = galleryTitleText.substr( 0, finalPositionSubCategory );
}
document.title = baseTitle + separator + galleryTitleText;
}
else // Not Gallery, Category, or Subcategory
{
// Set title on homepage
document.title = baseTitle;
}
}

function norobotmail(aUser, aDomain) {
document.location = "mailto:" + aUser + "@" + aDomain;
}


function redirectPath() {
re = /((www.)?imagesbyjosh.smugmug.com)/;
tmp = window.location.href;
if (re.test(tmp)) {
tmp = tmp.replace(re, 'www.imagesbyjosh.com');
window.location.href = tmp;
}
}
redirectPath();



// On IE/FF set the title before the Document OnLoad takes place
document.title = "Images By Josh - Travel and Wedding Photography";
addEvent( window, "load", CustomizeTitle );
function CustomizeTitle()
{
var baseTitle = "Images By Josh - Travel and Wedding Photography";
var separator = " - ";
var albumTitle = GetText( document.getElementById("albumTitle") );
var galleryTitle = GetText( document.getElementById("galleryTitle") );
var subCatTitle = GetText ( document.getElementById("subCatGalleryTitle") );
var singleImage = document.body.className && document.body.className.indexOf("singleImage") > -1 ? true : false;
var pageTypeDefined = typeof( pageType ) != "undefined";
var pageTypeDetailsDefined = typeof( pageTypeDetails ) != "undefined";
// Don't change the title from the above document.title on the homepage
if( document.body.className && document.body.className.indexOf("homepage") > -1 )
{
document.title = baseTitle + separator + "Home";
return;
}
YE.onAvailable('homelink', function(e) {

this.href = "http://imagesbyjosh.smugmug.com/";

this.firstChild.alt = "ImagesByJosh";

this.firstChild.title = "ImagesByJosh";

});


YE.onAvailable('toolbar', function(e) {

this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
