document.title = "PlumGraphics Photography - Jim Plummer";
function RelevantTitle()
{
   var baseTitle = "PlumGraphics";
   var separator = " - ";
   var albumTitle = document.getElementById("albumTitle");
   var galleryTitle = document.getElementById("galleryTitle");
   if( albumTitle && albumTitle.textContent )
      document.title = baseTitle + separator + albumTitle.textContent;
   else if( galleryTitle && galleryTitle.textContent )
   {
      var galleryTitleText = galleryTitle.textContent;
      // Strip " sub-categories" off the end of the category text
      var finalPositionCategory = galleryTitleText.search(" sub-categories");
      if( finalPositionCategory >= 0 )
         galleryTitleText = galleryTitleText.substr( 0, finalPositionCategory );
      else
      {
         // Strip " galleries" off the end of the category/sub-category text
         var finalPositionSubCategory = galleryTitleText.search(" galleries");
         if( finalPositionSubCategory >= 0 )
            galleryTitleText = galleryTitleText.substr( 0, finalPositionSubCategory );
      }
      document.title = baseTitle + separator + galleryTitleText;
   }
   else // Not Gallery, Category, or Subcategory
   {
      // Set title on homepage
      document.title = baseTitle;
   }
}


displaySmugPopular = true;

document.title = "PlumGraphics";
function RelevantTitle()
{
   var baseTitle = "PlumGraphics";
   var separator = " - ";
   var albumTitle = document.getElementById("albumTitle");
   var galleryTitle = document.getElementById("galleryTitle");
   if( albumTitle && albumTitle.textContent )
      document.title = baseTitle + separator + albumTitle.textContent;
   else if( galleryTitle && galleryTitle.textContent )
   {
      var galleryTitleText = galleryTitle.textContent;
      // Strip " sub-categories" off the end of the category text
      var finalPositionCategory = galleryTitleText.search(" sub-categories");
      if( finalPositionCategory >= 0 )
         galleryTitleText = galleryTitleText.substr( 0, finalPositionCategory );
      else
      {
         // Strip " galleries" off the end of the category/sub-category text
         var finalPositionSubCategory = galleryTitleText.search(" galleries");
         if( finalPositionSubCategory >= 0 )
            galleryTitleText = galleryTitleText.substr( 0, finalPositionSubCategory );
      }
      document.title = baseTitle + separator + galleryTitleText;
   }
   else // Not Gallery, Category, or Subcategory
   {
      // Set title on homepage
      document.title = baseTitle;
   }
}

addEvent(window, "load", rem_pipes);

function rem_pipes () {
   for (var i = 0; i<3; i++) {
      var objElement = document.getElementById("footer")
      if (objElement != null) 
      {
         var str_a = new String(objElement.innerHTML);
         str_a = str_a.replace('|', '')
         objElement.innerHTML = str_a;
      }
      var objElement = document.getElementById("feeds")
      if (objElement != null) 
      {
         var str_b = new String(objElement.innerHTML);
         str_b = str_b.replace('|', '')
         objElement.innerHTML = str_b;
      }
   }
}
function norobotmail(aUser, aDomain) { 
       document.location = "mailto:" + aUser + "@" + aDomain;
    }

function isClass(sClass) {
  sClassName = document.body.className;

  re = new RegExp(sClass + "( |$)") 

  if (!sClassName)
    return false;
  return re.test(sClassName);
}

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

photoBarDelay = 2;
SM.PhotoBar.config.position = 'bottom';
/*===========================*/
/*== 1337Box               ==*/
/*== version 0.62          ==*/
/*== Updated 16 Jan 2007   ==*/
/*===========================*/

lbSingleImage = false; //set this to true to open singleImage url's in lightbox.

force1337Box();  //for fastest execution put this at the top of your script section.


function force1337Box() {
  var re = /(https?:\/\/\S+\/)(\d+)\/(Small|Medium|Large|Original)$/;
  var re1 = /(https?:\/\/\S+\/)(\d+)\?(Small|Medium|Large|Original)$/;

  if (typeof(lbSingleImage) == "undefined" || typeof(lbSingleImage) != "boolean")
    lbSingleImage= false;

  if (lbSingleImage) {
    if (re.test(window.location.href)) {
      re.exec(window.location.href);
      window.location.replace(RegExp.$1 + RegExp.$2 + "?" + RegExp.$3);
    }
    else if ((document.referrer == "" || re.test(document.referrer)) && re1.test(window.location.href)) {
      re1.exec(window.location.href);
      doLB("$1337Box(" + RegExp.$2 + ",'" + RegExp.$3 + "', '');");
    }
  }

  addEvent(window, 'load', force1337BoxThumbs);
}


function doLB(sF) {
  var oLb = document.getElementById("lightBoxStage");

  if (oLb)
    eval(sF);
  else
    window.setTimeout("doLB(\"" + sF + "\");", 100);
}


function force1337BoxThumbs() {
  if (!YD.hasClass(document.body, 'galleryPage')) {
    return;
  }

  if (YD.hasClass(document.body, "filmstrip") || YD.hasClass(document.body, "slideshow")) {
    var p = YD.hasClass(document.body, "filmstrip") ? document.getElementById("mainPhoto") : document.getElementById("slide");
    p.style.cursor = "pointer";
    addEvent(p, 'click', force1337BoxSpecific);
  }
  else {
    var p = YD.hasClass(document.body, "journal") ? document.getElementById("journal") : document.getElementById("photos");
    var photos = p.getElementsByTagName('a');
    var re = /https?:\/\/\S+\/(\d+)\/(Small|Medium|Large|Original)$/;

    for (var i = 0; i < photos.length; i++) {
      if (/(photo)[\s]?/.test(photos[i].parentNode.className)) {
        re.exec(photos[i].href);
        
        if (RegExp.$1 && RegExp.$2)
          photos[i].href = "javascript: $1337Box(" + RegExp.$1 + ", '" + RegExp.$2 + "','');";
        else
          photos[i].href = photos[i].href.replace(/openLB/, "$1337Box");
      }
    }
  }
}


function force1337BoxSpecific(e) {
  var p = window.event ? event.srcElement : e.target;
  var re = /\/photos\/(\d+)-\S+\.[\w]{3}/;
  var c = getCookie("DefaultSize");

  re.exec(re.test(p.style.backgroundImage) ? p.style.backgroundImage : p.src);

  $1337Box(RegExp.$1, c == null ? "Medium" : c, '');
}



function $1337Box(imgId, reqSize, setSize) {
  openLB(imgId, reqSize, setSize, '', '');
}

function ModifyText () {
   this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');
}
YE.onAvailable("cobrand_footer", ModifyText);
function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=KvMo06iNg80Nw";
  }
}
YE.onAvailable('footer', AddReferralCode);
showPhotoBar = false;

function delHover() {
imgTags = document.getElementsByTagName("img");
for (i=0; i<imgTags.length; i++) {
imgTags[i].title = "";
imgTags[i].alt = "";
}
}
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;
}

rightClickWarning = "*Irish Diplomacy is the ability to tell a man to go to hell so that he looks forward to making the trip.* Please ask! You never know! All photos are property of PlumGraphics Photography.                                                                All rights reserved. Unauthorized use is prohibited.";