Cannot set the var i when returning up the chain
<pre><code>var i = -1;
$('.rightBtn a').click(function(){

        --i; // this part works..

        if(i == -z){
            $(".homeSlider").css("margin-left", 0);
            $('.homeSlider').animate({
                marginLeft: '-='+$(window).width()
            }, function(){
                var i = -1; // this is where its not working    
                alert(i);   // alerts it correct at -1
                return i;   // this doesn't return it?

            });
            return i;
        } else {
            $('.homeSlider').animate({
                marginLeft: '-='+$(window).width()
            });
        return i;   
        }
        return i;
    //}
});
</code></pre>

<p>Am I just forgetting something? Also, say for the sake of the argument var z = 5</p>
