JQuery $(this) and attributes
<p>A while back I set up the following to have a very simple image swap using jQuery. Now that the site needs to expand, however, I cannot figure out the actual value of the $(this) selector. I thought it would be $('.gallery li img') but that doesn't seem to be the case. It's been a while since I've looked at this code, and I'm entirely lost.</p>

<pre><code>$('.gallery li img').hover(function() {
    var $gallery = $('.gallery li img').parents('.gallery');
    var cur_img = $(this).attr('src').replace('thumb/', '');
    $('.main-img', $gallery).attr('src', cur_img);
});​
</code></pre>

<p>I don't need a better means to set up a gallery, what I have works fine (although comments are appreciated as always) I just need to figure out the value of $(this) in the given circumstance.</p>
