//==============================
// Customize Right-click Warning
//==============================

rightClickWarning = "All photos copyright grEGORy simpson of ULTRAsomething.com. All rights reserved. Unauthorized use is prohibited."

//==============================
// Spam Proof email
//==============================

function norobotmail(aUser, aDomain) { 
       document.location = "mailto:" + aUser + "@" + aDomain + ".com";
    }


//====================
// Set up Redirect Table
//====================
//
//alias is on left and actual gallery location is on right

   var galleryRedirectTable = 
   {
//     2381921 : "http://ultrasomething.smugmug.com/gallery/2796484",
     2827739 : "http://homepage.mac.com/ultrasomething/PHOTOS-2005/"
 };

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.toLowerCase().substr(9); 
         
         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
         }
     }
 }

//====================
// Make Photobar come out bottom of photo
//====================

SM.PhotoBar.config.position = 'bottom';

//====================
// Make Photobar wait before appearing
//====================

photoBarDelay = 1;


//====================
// Set Slide duration
//====================

//slideDuration = 5;

//====================
// Turn slideshow captions ON by default
//====================

//addEvent(window, "load", enableSlideshowOptions);

//function enableSlideshowOptions()
//{
//  if (YD.hasClass(document.body, "fsSlideshow"))
//  {
//    document.getElementById("captions").click();
//  }
//}


//====================
// change the link on the SmugMug Logo
//====================

YE.onAvailable('homelink', function(e) {
    this.href = "http://ultrasomething.smugmug.com/";
    this.firstChild.alt = "ULTRAsomething photography";
    this.firstChild.title = "ULTRAsomething photography";
});

// removes the pipes characters in the toolbar header

YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
