rightClickWarning = "All photos are property of SpotlightPicture LLC. All rights reserved. Unauthorized use is prohibited." 


var vanityTable = 
 {
    shakerag:   "http://www.spotlightpicture.com/Events/Shakerag-Hounds/Halloween-09/10165740_bdNAK/1/699553613_pQYou",
seniors : "http://spotlightpicture.smugmug.com/gallery/5826050_dNgAT/",
reece: "http://spotlightpicture.smugmug.com/gallery/4588753_ZRjEE/1/317607408_LkJhu",
jake:  "http://spotlightpicture.smugmug.com/gallery/4864484_y7oAe/1/289780356_kGrBN",
jamie:  "http://spotlightpicture.smugmug.com/gallery/5135643_xw46d/1/310386055_rm44T",
orderinginfo:  "http://spotlightpicture.smugmug.com/gallery/4838906_en6sU/1/288050985_mnytt",
talent:  "http://spotlightpicture.smugmug.com/gallery/9017173_sY45P/1/599799997_Bc3WX",
mysports:  "http://spotlightpicture.smugmug.com/gallery/8648704_9CiUY/1/570943895_knS8D",
myportfolio:  "http://www.spotlightpicture.com/gallery/5178244_QQXQS/1/611822541_dus8G",
cheer:  "http://www.spotlightpicture.com/gallery/9100028_rztYW/1/606320951_iNmWM",
santa:   "http://www.spotlightpicture.com/Events/Santa/9905671_vHZN9"
 };


 function CheckRedirects()
 {
     if (YD.hasClass(document.body, 'homepage'))    // only run this code on the home page
     {
         // get the path from the current URL, 
         // convert it to lowercase and remove the leading slash
         var path = window.location.pathname.toLowerCase().substr(1);
         
         var newURL = vanityTable[path];        // look it up in our table
         
         // if we found it in the table && newURL is different than where we are
         if (newURL && (newURL != window.location))
         {
             window.location.replace(newURL);        // go to the new URL
         }
     }
 }









function IsHomePage()
 {
    return(YD.hasClass(document.body, 'homepage'));
 }
 
 




// fix the pesky pipes

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});




function getCookie(name) {
  var start = document.cookie.indexOf(name + "=");
  var len = start + name.length + 1;
  
  if ((!start) && (name != document.cookie.substring(0, name.length))) {
    return null;
  }

  if (start == -1) {
    return null;
  }

  var end = document.cookie.indexOf(";", len);

  if (end == -1) {
    end = document.cookie.length;
  }

  return unescape(document.cookie.substring(len, end));
}


function setCookie(name, value, expires, path, domain, secure) {
  var today = new Date();
  today.setTime( today.getTime() );

  if (expires) {
    expires = expires * 1000 * 60 * 60 * 24;
  }

  var expires_date = new Date(today.getTime() + (expires));

  document.cookie = name + '='+escape(value) +
    ((expires) ? ';expires=' + expires_date.toGMTString() : '') +
    ((path) ? ';path=' + path : '') +
    ((domain) ? ';domain=' + domain : '') +
    ((secure) ? ';secure' : '');
}


function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
  }
}

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}




function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_2449248")) 
  {
    var objElement = YD.get("comment")
    if (objElement != null) 
    {
      var str = new String(objElement.innerHTML);
      str = str.replace(/\gallery/gi, 'guestbook');
      objElement.innerHTML = str;
    }
  }
}

YE.onAvailable("comment", ModifyText);




