JavaScript glitch (probably simple, too) in need of solution
<p>I currently have a JavaScript applied to two images.  The video can be seen here: <a href="http://www.youtube.com/watch?v=DYc8swGK5Lw" rel="nofollow">http://www.youtube.com/watch?v=DYc8swGK5Lw</a>
The first image I hover over in the video acts properly, however, the second does not.  The second picture appears to apply the margin-top immediately after the hover, instead of transition like the first one.  This causes the browser to get confused and mouse-over and out once or twice before stability is restored.  Both pictures have the gallery_left class applied to them, but the first picture hovered over in the video has the left4 ID applied to it.  The second picture hovered over in the video has the left7 ID applied to it.  Finally, here's the code.</p>

<pre><code>$(function() {
var margin_top;
$('img.gallery_left').mouseover(function(){
    if($(this).attr('id') == "left4") {
        margin_top = '105px';
    } else {
        $(this).css('marginTop');
    }
    if($(this).attr('id') == "left7") {
        margin_top = '353px';
    } else {
        $(this).css('marginTop');
    }

    $(this).animate({
        borderWidth: '10px',
        width: '750px',
        height: '500px',
        marginLeft: '1px',
        zIndex: '15',
        marginTop: margin_top,
    }, 
    'default');
});

$('img.gallery_left').mouseout(function(){
    if($(this).attr('id') == "left4") {
        margin_top = '261px';
    } else {
        $(this).css('marginTop');
    }
    if($(this).attr('id') == "left7") {
        margin_top = '511px';
    } else {
        $(this).css('marginTop');
    }

    $(this).animate({
        borderWidth: '4px',
        width: '300px',
        height: '200px',
        marginLeft: '1px',
        zIndex: '0',
        marginTop: margin_top,
    }, 
    'default');
});
});
</code></pre>

<p>I have to apply the code to all of the other pictures as well, but for starters I'm just doing it to those two pictures.  Please help me out and try to identify the issue with this code.</p>
