Javascript loop when setinterval is done
<p>Please help me to loop this script when done the interval, when the <code>class="cur"</code> goes to last <code>p span</code> i would like to loop it again. I'm practicing a javascript code and this is what i made.</p>

<pre><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;p style="font-size: 50px"&gt;This is a test&lt;/p&gt;
&lt;script&gt;
function blink() {
   $('.cur').next().css('color', '#333').addClass('cur');
   $('.cur:first').css('color', '#ccc').removeClass('cur');
}
var str = $('p').text();
var count = str.length - 1;
var splt = str.split("");
var newstr = "";
for(i=0;i&lt;=count;i++) {
   newstr += splt[i].replace(splt[i],"&lt;span style='color: #CCC;'&gt;"+splt[i]+"&lt;/span&gt;");
}
$('p').empty().append(newstr);
$('p span:first').addClass('cur').css('color','#333');
setInterval('blink()', 100);
&lt;/script&gt;
</code></pre>
