jquery content slider needs autoplay
<p>i have this content slider and i need it to be like a slide show, i need auto play</p>

<pre><code>$(document).ready(function() {

$('.poveznicaDiv').click(function(){
    var broj = $(this).attr('id');
    broj = broj.split('ca');
    broj = parseInt(broj[1]);       
    $('#maskaSadrzaja').animate({'left': '-'+ 500*(broj-1) +'px'}, 'slow');
});
});
</code></pre>

<p>ignore the id and class names they are on croatian :D</p>

<p>so this works just fine but i need autoplay for it</p>

<p>i tried this:</p>

<pre><code>slideShow();

function slideShow(){
    var i = 0;
    $('#maskaSadrzaja').animate({'left': '-'+ 500*(i) +'px'}, 'slow');
    broj++;
    // alert(i);
    if(i&gt;5){
        i=0;
    }   
    setTimeout(slideShow, 1000);
};
</code></pre>

<p>but this didnt work</p>

<p>how could i make it autoplay?</p>

<p>EDIT</p>

<p>so i tried something else
The divs with class .poveznicaDiv also have an id which is like poveznica1, poveznica2, and so on</p>

<p>So i tried adding a function wich clicks on them</p>

<p>Something like this:</p>

<pre><code>i=1;
function autoplay() {
$('#poveznica'+i).click();
i++;
setTimeout(autoplay, 1000);
}
</code></pre>

<p>why doesnt this work?
I've put it in .ready and called the function (autoplay;). 
Help please</p>

<p>EDIT</p>

<p>My slider (and html and css) is almost identical to this one <a href="http://www.webdeveloperjuice.com/2010/01/12/lightest-jquery-content-slider-ever-made-380-bytes/" rel="nofollow">http://www.webdeveloperjuice.com/2010/01/12/lightest-jquery-content-slider-ever-made-380-bytes/</a> </p>

<p>how could i make it rotate automaticly?</p>
