var ggeEffects = {

  expandImageLink: function(target, delta, msDuration) {

    // -- expandImageLink --

    jQuery(document).ready( function() {

      jQuery(target).each( function() {
        var curAnchor = jQuery(this);
        var curImage = curAnchor.find('img');
        
        curAnchor.data('originalState', { w: curImage.width(), h: curImage.height() });
        
        curImage[0].onload = function() {
          curAnchor.data('originalState', { w: curImage.width(), h: curImage.height() });
        };
        curAnchor.bind("mouseenter", function() {
          var jImg = jQuery(this).find('img');
          var origState = jQuery(this).data('originalState');
          if(origState) {
            jImg.animate( {width: origState.w + delta, height: origState.h + delta}, {duration: msDuration} );
          } 
        })
        .bind("mouseleave", function() {
          var jImg = jQuery(this).find('img');
          var origState = jQuery(this).data('originalState');
          if(origState) {
            jImg.animate( {width: origState.w, height: origState.h}, {duration: msDuration} );
          }        
        }); 
      });

    });

    // -- expandImageLink - end --

  },
  
  // -- preloadImages
  preloadImages: function(pageTitle) {
    var images = {
      'GotGreenEnergy?': [
        'images/stories/solutions/betterFootprint_1.png', 
        'images/stories/solutions/powerFootprint_1.png',
        'images/stories/solutions/trekFootprint_1.png',
        'images/stories/solutions/greenelogo.png'
      ],
      'Unified Footprint®': [
        '/gotgreenenergy/images/stories/solutions/unifiedFootprint_1.png',
        '/gotgreenenergy/images/stories/solutions/realizeSuccess.png'
      ]
    };
  }
  // -- preloadImages - end --

};

ggeEffects.expandImageLink('a.imageXpandDef', 12, 300);
