invalid assignment left-hand side using $this
<p>I'm trying to resize a series of images as the browser width decreases.  The following code works fine, but of course as the browser increases, the img being passed cannot be resize cropped to a larger size.  </p>

<pre><code>$('#image img').each(function() {
      $($(this)).resizecrop({
      width:width,
      height:height,
      vertical:"top"
    });  
});
</code></pre>

<p>With this code, I'm trying to pass through the original image, resize crop it, and then swap it for the smaller image.  I'm getting an error, assigning the new image to $(this) (invalid left and side assignment).</p>

<p>Why is this, what am i doing wrong? Thanks,</p>

<pre><code>$('#image img').each(function() {
var img_path =  $($(this))[0].src;
var img = $('&lt;img /&gt;').attr({ 'src': img_path }); 
$(this) = img;

      $($(this)).resizecrop({
      width:width,
      height:height,
      vertical:"top"
    });  
});
</code></pre>
