Image Replacement Script (jQuery)
<p>I'm building an employee bios page where the client wants selected thumbnails to display in color at full opacity and all others at lower opacity in black and white. Which wouldn't be hard - the trouble is, every thumbnail has to have a color state and a black and white state. So my next thought was to swap out the black and white image (which would be resting within the div with a color background image) on mouseover. </p>

<pre><code>$('.thumbnail').mouseenter(function(){
    var current = $(this); // cache thing
    var thishtml = current.html(); // get contents of thing
    current.html('').mouseleave(function(){ //empty the thing
        current.html(thishtml); //put the variable back in the thing
        });
});
</code></pre>

<p>My HTML would be as follows: </p>

<pre><code>&lt;div class = "thumbnail" style = "background-image: url(color.jpg);"&gt;
&lt;img src="blackandwhite.jpg" /&gt;
&lt;/div&gt;
</code></pre>

<p>Obviously, since I'm asking the question, my idea didn't work. The mouseover removes the innerHTML, and the variable is converted successfully, but it doesn't get inserted into the DIV again. What am I missing?</p>
