Very strange jquery mouseleave behavior
<p>I have two divs stacked one above the other, with my code expanding the boxes when your mouse hovers on a div.  When you remove your mouse from the div, the div shrinks back to the original size.</p>

<p>My code works just fine and dandy when you swipe the mouse into a div and then out of a div into the blank area of the page.  However, if you try moving the mouse between the two divs, everything goes haywire, and now the correct boxes no longer shrink and the overall functionality is lost.</p>

<p>Here is my code:</p>

<pre><code>$(".divbox1").hover(function() {    
var height = $(this).height();
var height2 = $(this)[0].scrollHeight;

if (height2 &gt; 35) {

    //Current position in relation to the page
    var offsetTop = $(this).offset().top;
    var offsetLeft = $(this).offset().left;

    //Clone the code and attach it to the page
    $(this).clone().css({
        position: "absolute",
        top: offsetTop,
        left: offsetLeft
    }).attr("id", "cloned").appendTo("body");

    //Hide the code underneath
    //$(this).css("visibility", "hidden");

    $('#cloned').animate({
        height: height2
    }, 150).bind('mouseleave', function() {
        var cloned = $(this);
        //Animate back and remove
       cloned.animate({
            height: height
        }, 300, function() {
            cloned.remove();
            //Show the code underneath
            //$(this).css("visibility", "visible");
        });


    });
}
 });
</code></pre>

<p>And this my associated HTML and CSS</p>

<pre><code>    .divbox1 {
color: #100;
background-color: #f9f9f9;
border: 1px solid silver;
overflow: hidden;
width: 200px;
height:35px;
}

    &lt;div class="divbox1" id="one"&gt;
sdsdsadasdsad&lt;br /&gt;
sadasdsdaasdadsadssdsdsadasasdasdsdsddsasdasdasdasdasddasadsasd&lt;br&gt;
dasdasasdasdsad
&lt;br /&gt;&lt;br /&gt;
Really Tall box!
    &lt;/div&gt;
   &lt;br /&gt;
    &lt;div class="divbox1" id="two"&gt;
  Second box&lt;br /&gt;
yada ydad&lt;br /&gt;
yada yada&lt;br /&gt;
yada yada&lt;br /&gt;
    &lt;/div&gt;
</code></pre>

<p>For those interested, the project is also on Jsfiddle: <a href="http://jsfiddle.net/hQkFH/10/" rel="nofollow">http://jsfiddle.net/hQkFH/10/</a></p>

<p>Also incase anyone was wondering why I cloned the box before animating, its because I wnt the open box to overwrite anything on the page underneath it (in the case of the top box, the second box)</p>

<p>Thank you!</p>
