if (YD.hasClass(document.body, "category_Madeline") && YD.hasClass(document.body, "category")) {
  var ssJunk = '<div id="ssContainer"><object align="middle" height="400" width="735"><param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091901.swf?AlbumID=1190951&transparent=true&randomStart=true&showLogo=false&clickUrl=false&showThumbs=false&showButtons=false&crossFadeSpeed=600&forceSize=LargeURL" /><param name="wmode" value="transparent" /><embed src="http://www.smugmug.com/ria/ShizamSlides-2007091901.swf?AlbumID=1190951&transparent=true&randomStart=true&showLogo=false&clickUrl=false&showThumbs=false&showButtons=false&crossFadeSpeed=600&forceSize=LargeURL" wmode="transparent" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all" height="400" width="735" /></object></div><div id="hpHeaderBg"></div><div id="hpHeader"><div id="hpHeaderTitle"></div><div id="ssSrch"></div></div><div id="ssCvr"></div>';

  var hw = document.getElementById("header_wrapper");
  var mmShow = document.createElement("div");
  mmShow.id = "mmShow";
  mmShow = hw.parentNode.insertBefore(mmShow, hw);
  mmShow.innerHTML = '<div class="boxTop"></div><div class="boxBottom" style="text-align: center; padding-bottom: 20px;">' + ssJunk + '</div></div>';
}


var animHomeThumbs = {
  'animThumbsIn': function() {   
    var pa = YD.isAncestor('recentPhotosBox', this);
    var pxy = YD.getXY(this.parentNode.parentNode);
    var attrib = {
      width: {to: pa ? 60 : 99},
      height: {to: pa ? 60 : 99},
      points: {to: pa? [pxy[0] - 5, pxy[1] - 5] : [pxy[0], pxy[1] - 1]}
    };
    var anim = new YAHOO.util.Motion(this, attrib, .1);
    anim.animate();
    YD.setStyle(this, 'z-index', '999'); 
  },

  'animThumbsOut': function() {
    var pa = YD.isAncestor('recentPhotosBox', this);
    var pxy = YD.getXY(this.parentNode.parentNode);
    var attrib = {
      width: {to: pa ? 50 : 90},
      height: {to: pa ? 50 : 90},
      points: {to: pa ? pxy : [pxy[0] + 4, pxy[1] + 3]}
    };
    var anim = new YAHOO.util.Motion(this, attrib, .1);
    anim.animate();
    YD.setStyle(this, 'z-index', '998');
  },

  'init': function() {
    var imgs = YD.get('categoriesBox').getElementsByTagName('img');

    YD.batch(imgs, function(el) {
        //YE.addListener(el, 'mouseover', this.animThumbsIn);
        //YE.addListener(el, 'mouseout', this.animThumbsOut);
        YD.setStyle(el, 'background', '#fff url(' + el.src + ') no-repeat center center');
        el.src = '/img/spacer.gif';
    }, this, true);

    imgs = YD.get('recentPhotosBox').getElementsByTagName('img');
    YE.addListener(imgs, 'mouseover', this.animThumbsIn);
    YE.addListener(imgs, 'mouseout', this.animThumbsOut);
  }
};

if (YD.hasClass(document.body, 'homepage')) {
animHomeThumbs.init();
}