why delaying chain functions causes problem?
<pre><code>var currentImage = 0;
var images = new Array('Aerodynamics.jpg','ABC_news.jpg','yep.jpg'); 
var newImage = 'url(images/'+images[currentImage]+')'; 

function slideSwitch() {
   $('.inner_img').css('background-image',newImage).animate({opacity:1.0},4000).delay(2000)
    .animate({opacity:0.0},4000,function(){
        if(currentImage &lt; images.length-1){
            currentImage++;
        }else{
            currentImage = 0;  
        };
    });
};
</code></pre>

<p>First animation goes fine, delay() works fine too, next animation for opacity back to 0 doesn't works correctly, I mean the object hasn't disappear yet it already triggers the callback function, please tell me what am I doing wrong   </p>
