jQuery Animate not working on Chrome
<p>I'm having a little issue here with Google Chrome. My code works pretty well with Safari, which makes me think it should work fine with Google Chrome. But Chrome doesn't animate as expected. What could be wrong?</p>

<pre><code>$(function() {
    var sourceFoto = $(".empreendimento .main-photo img").attr("src");
    var alturaFoto;
    var larguraFoto;
    var limiteX;
    var limiteY;
    $(document).load(sourceFoto, function() {

        alturaFoto = $(".empreendimento .main-photo img").height();
        larguraFoto = $(".empreendimento .main-photo img").width();

        limiteY = Math.round(alturaFoto - 420);
        limiteX = Math.round(larguraFoto - 580);

        $(".empreendimento .main-photo img").animate({
            marginLeft: "-" + limiteX
        }, 5000, 'jswing').animate({
            marginTop: "-" + limiteY
        }, 5000, 'jswing').animate({
            marginLeft: "0px"
        }, 5000, 'jswing').animate({
            marginTop: "0px"
        }, 5000, 'jswing');

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

<p><strong>Edit</strong></p>

<p>I've found the answer. Just loaded the image with <code>onLoad</code> method and worked pretty well.</p>

<pre><code>image = new Image();

image.onload = function() {

    alturaFoto = $(".empreendimento .main-photo img").height();
    larguraFoto = $(".empreendimento .main-photo img").width();

    limiteY = Math.round(alturaFoto - 420);
    limiteX = Math.round(larguraFoto - 580);

    $(".empreendimento .main-photo img").animate({
        marginLeft: "-" + limiteX
    }, 5000).animate({
        marginTop: "-" + limiteY
    }, 5000).animate({
        marginLeft: "0px"
    }, 5000).animate({
        marginTop: "0px"
    }, 5000);

}

image.src = sourceFoto;​
</code></pre>
