SM.PhotoBar.config.position = 'bottom'; 

document.title="Chris Casey Photography";

function norobotmail(who, server)
{
  var retval;
  retval = "mailto:" + who + "@" + server;
  window.location.replace(retval);
}

function googAnalytics()
{
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try{
  var pageTracker = _gat._getTracker("UA-6081416-1");
  //var pageTracker = _gat._getTracker("UA-xxxxxx-x");
  pageTracker._trackPageview();
} catch(err) {}
}

var vanityTable = 
{
    milla4mo : "http://www.chriscaseyphotography.com/gallery/8969825_q4nCH",
    theboys : "http://www.chriscaseyphotography.com/Personal/Family/The-Boys-2010",
    swimlessons : "http://www.chriscaseyphotography.com/gallery/8631314_rvNDW"
};
 
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))
         {
//         var alerttxt = "Found " + newURL;
//         alert(alerttxt);
             window.location.replace(newURL);        // go to the new URL
         }
//         else
//         {
//         var alerttxt = "Did not find " + newURL;
//         alert(alerttxt);
//         }
  }
}


