(function($) {

	$.extend({
		add2cart: function(source, target, callback) {
    
      var shadow = $('#_shadow');
      if( !shadow.attr('id') ) {
          $('body').prepend('<div id="_shadow" style="display: none; background-color: #fff000; border: solid 1px #4b0082; position: static; top: 0px; z-index: 100;">&nbsp;</div>');
          var shadow = $('#_shadow');
      }
      if( !shadow ) {
          alert('Cannot create the shadow div');
      }
      
      shadow.width(source.css('width')).height(source.css('height')).css('top', source.offset().top).css('left', source.offset().left).css('opacity', 0.5).show();
      shadow.css('position', 'absolute');
      
      shadow.animate( { width: target.innerWidth(), height: target.innerHeight(), top: target.offset().top, left: target.offset().left }, { duration: 700 } )
        .animate( { opacity: 0 }, { duration: 100 } ).animate( { height: 0 }, { duration: 100 } );
		
		}
	});
})(jQuery);
