jquery random colours
<p>Hi I am trying to get this script to show random colours one after the other when the li scrolls up but so far I have it doing this but it is not smooth it changes when it restarts so you dont get smooth effect and it changes colour twice any help will be great thanks.</p>

<pre><code> $("#carousel ul").animate({marginTop:-100},2000,function(){

    function pad(s,i,c,r){
    i=i+1-s.length;
    if(i&lt;1)return s;
    c=new Array(i).join(c||" ");
    return r?s+c:c+s;
    };

    hue  = "#"+pad((Math.random()*0x1000000&lt;&lt;0).toString(16),6,"0");
    hue2 = "#"+pad((Math.random()*0x1000000&lt;&lt;0).toString(16),6,"0");
    hue3 = "#"+pad((Math.random()*0x1000000&lt;&lt;0).toString(16),6,"0");

    $(this).find("li:last").after($(this).find("li:first"));
    $('#div1').css({backgroundColor: hue});
    $('#div2').css({backgroundColor: hue2}); 
    $('#div3').css({backgroundColor: hue3});

    $(this).css({marginTop:0});
    })  
    },1000);  
});
</code></pre>

<p>my example can be found here <a href="http://swipedstudio.com/jtoy/" rel="nofollow">http://swipedstudio.com/jtoy/</a>
Thanks in advance!</p>
