Create jQuery Animation Plugin and use Deferred Object
<p>I've created a plugin for jquery. Now i want to implement jquery deferred object to use when, then with my plugin functions. I like to return the query chain with the deferred functionality...
It have to work like $.fadeIn() etc.</p>

<p>My plugin functions look like these:</p>

<pre><code>(function( $ ){
  $.fn.imgDoSomething = function( amount ) {  
    return this.each(function() {
      //this is an image element
      var deferred = jQuery.Deferred($(this));
      //..... do something and resolve deferred
      return deferred;
    });
  };
})(jQuery);
</code></pre>

<p>I get these error</p>

<pre><code>Uncaught TypeError: Object [object Object] has no method 'call'
</code></pre>
