function hasPath(sPath)
{
  re = new RegExp("\/" + sPath + "(\/|$)");
  return re.test(window.location)
}


rightClickWarning = "All images contained herein are the sole property of and copyright Edward Hughes and may not be used for any purpose without written permission.";

SM.PhotoBar.config.position = 'bottom';
document.title="edhughesphoto.com";

function isClass(sClass) {
  sClassName = document.body.className;

  re = new RegExp(sClass + "( |$)") 

  if (!sClassName)
    return false;
  return re.test(sClassName);
}
function AddReferralCode()
  {
  	var footerDiv = document.getElementById("footer");
  	if (footerDiv)
  	{
  		var links = footerDiv.getElementsByTagName("A");
  		if (links && (links.length != 0))
  		{
  			var smugLink = links.item(0);
 			smugLink.href = "http://www.smugmug.com/?referrer=mxxHosfj3JuvM";
  		}
  	}
  }
  
  function OnLoadHandler()
  {
  	AddReferralCode();
  }


photoBarDelay = 1;


function redirectPath() { 
  re = /((www.)?ehughes.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'www.edhughesphoto.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath();  

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)});

