// fix the pesky pipes

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});

function doOnLoad() {
  if (window.AlbumID && (window.AlbumID == "5557983")) //
  removeLinkFromImg();
}

function removeLinkFromImg()

{

    var links = document.getElementsByTagName("A");

    for (var i = 0; i < links.length; i++)

    {

        var link = links[i];

        var divElm = link.parentNode;

        if (!divElm)

            continue;

        divElm = divElm.parentNode;

        if (!divElm)

            continue;

        if (divElm.className.indexOf("photo")<0)

            continue;

        link.href = "javascript:void(0);";

    }

} 

function delHover() {
	imgTags = document.getElementsByTagName("img");
	for (i=0; i<imgTags.length; i++) {
		imgTags[i].title = "";
		imgTags[i].alt = "";
	}
}
// Gallery Redirects

var galleryRedirectTable = 
 {
"/Portfolio/Lazy-Days/9511950_tBc95" : "http://russg.smugmug.com/gallery/9448969_8H4NY",
"/Nature/Butterflies/9666328_X3RVc" : "http://russg.smugmug.com/keyword/Butterfly-insect",
"/Nature/Flowers/10323085_D5BnW" : "http://russg.smugmug.com/keyword/Flowers", 
"/Portfolio/Favs/9511971_EkJTL" : "http://russg.smugmug.com/keyword/FAV"
     
 };

function CheckRedirects()
{
  if (! YD.hasClass(document.body, 'loggedIn'))
     {
         // get the path from the current URL, 
         // convert it to lowercase and remove the leading slash
         var path = window.location.pathname; 
         
         var newURL = galleryRedirectTable[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
         }
     }
}