What is missing from the status indicator for my content slider, JavaScript/Jquery?
<p>I'm coding this content slider using JavaScript/Jquery.</p>

<p>Please have a look at my code on JSFiddle: <a href="http://jsfiddle.net/46JfZ/7/" rel="nofollow">http://jsfiddle.net/46JfZ/7/</a></p>

<pre><code>cn = {
    hero:function(r,lx,rx,fx,fs,ss,a){
        rc=$(r).children(), rcw=rc.width(), rca=rc.size(), rw=rcw*rca, p='px'; $(r).css({'width':rw})

        $(lx).click(function(){
            n=$(r).position().left-rcw;
            switch(fx){
                case 'slide':$(r).stop(true,true).animate({left:(n&lt;-rw+rcw?0:n)+p},ss,'easeOutExpo'); break;
                case 'fade':$(r).stop(true,true).fadeOut(fs).animate({left:(n&lt;-rw+rcw?0:n)+p},1).fadeIn(fs); break;
            }
        })

        $(rx).click(function(){
            n=$(r).position().left+rcw;
            switch(fx){
                case 'slide':$(r).stop(true,true).animate({left:(n&gt;0?-rw+rcw:n)+p},ss,'easeOutExpo'); break;
                case 'fade':$(r).stop(true,true).fadeOut(fs).animate({left:(n&gt;0?-rw+rcw:n)+p},1).fadeIn(fs); break;
            }
        })

        if(a.match('yes')){
            $('#hero').append('&lt;div id="indicate"&gt;&lt;/div&gt;');
            $.each(rc, function(){$('#indicate').append('&lt;span&gt;&lt;/span&gt;');})


            function indicate(){
                $('#indicate span').removeClass('active');
                for(i=1;i&lt;=rca; i++){
                    o=i-1, 
                    newReelpos = - rcw*o,
                    q=$(r).position().left;

                    if(q == newReelpos ){
                        $('#indicate span:nth-child('+ i +')').addClass('active');
                    }
                }
                $(lx).click();
            }
            setInterval(indicate,3000);
            $(lx).parent().hide();
        }
    }
}

$(function(){
    cn.hero('#reel', '#next', '#prev', 'slide', 300, 600, 'yes');
});
</code></pre>

<p>I've missed something because the status dots(blue &amp; green dots on the right) aren't working properly?</p>

<p>Any help would be appreciated greatly, Thank you</p>
