rightClickWarning = "All photos are property of Erik Grammer. All rights reserved. Unauthorized use, while sometimes necessary, is extremely uncool.";

YE.onAvailable('fades', function() {if (YD.hasClass(document.body,
"fsSlideshow")) this.click();});

showPhotoBar = false;


// removes the pipes characters in the toolbar header

YE.onAvailable('toolbar', function(e) {

this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");

});


// heres the vanity table code

var vanityTable = 
 {
     wreathauction2006: "http://www.erikgrammer.com/gallery/4248118_5EUN5",
     wreathauction2007: "http://www.erikgrammer.com/gallery/4245545_jBrLc",
     ggbchalet07: "http://www.erikgrammer.com/gallery/4258717_AhDRF",
     ggbtwinpalms08: "http://www.erikgrammer.com/gallery/4258730_uCacB",
     res: "http://www.erikgrammer.com/gallery/4252025",
     rep: "http://www.erikgrammer.com/Real%20Estate",
     evelynandmichael: "http://www.erikgrammer.com/Weddings/516885"
 };
 
function IsHomePage()
 {
    return(YD.hasClass(document.body, 'homepage'));
 }
 
 function CheckRedirects()
 {
     if (IsHomePage())    // 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
         }
     }
 }

// heres the slideshow page code
// function createSWF( w, h, params) {
//  var args = "";
//  for (var i in params) {
//    args += i + "=" + params[i] + "&amp;";
//  }
//document.writeln('<object width="100%" height="100%" align="middle">'+ '<param name="movie" //value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+ '<param //name="wmode" value="transparent" />'+ '<embed src="http://www.smugmug.com/ria/ShizamSlides-//2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" //type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/>//</object>');
//return 1;
//}


//galleries hack here
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

//remove linkage for navlink pages
function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "4252077" || window.AlbumID == "4252025" || window.AlbumID == "4252039" || window.AlbumID == "4252053" || window.AlbumID == "4252061")) //
  removeLinkFromImg();
}

function removeLinkFromImg() {
  oList = YD.getElementsByClassName("photo", "div");

  for (i=0; i < oList.length ; i++) {
    if (oList[i].childNodes) {
      oList[i].firstChild.removeAttribute("href");
      oList[i].firstChild.firstChild.removeAttribute("alt");
      oList[i].firstChild.firstChild.removeAttribute("title");
    }
  }
}

function delCategory() {
  re = /\/(gBlock)$/;

  var oList = YD.getElementsByClassName('miniBox', 'div', this);

  for (i = 0; i < oList.length; i++) {
    if (re.test(oList[i].getElementsByTagName('a')[0].href))
      oList[i].parentNode.removeChild(oList[i]);
  }
}
YE.onContentReady('categoriesBox', delCategory);
