/*Speed of animation. You can use "slow", "normal", or "fast" or the number of milliseconds to run the animation (e.g. 1000)
http://docs.jquery.com/Effects/animate#paramsdurationeasingcallback */
var animationSpeed = "normal";

/*Nicely moves product thumbnail to Shopping cart image after clicking "add to cart"*/
function playAnimation(sourceId, destinationId){
	var source = $("#" + sourceId);
	var destination = $("#" + destinationId);
	
	var clone = source.clone();
	
	clone.css("position", "absolute");
	
	$("BODY").append(clone);

	clone.css("top", source.offset().top);
	clone.css("left", source.offset().left);

	clone.animate({ 
        top: destination.offset().top,
        left: destination.offset().left,
        height: destination.attr("height"),
        width: destination.attr("width"), 
        opacity: 0.4
      }, 
	  animationSpeed,
	  "swing",
	  function(){clone.remove()} 
	);
}