var totaal=0;var count=0;var myInterval="";var myInterval2="";var fadespeed=1000;var intervalspeed=3000;function run()
{totaal=$("#nieuwesites").find("a").size();for(var i=0;i<totaal;i++)
{if(i>0)
{$("#project"+i).hide();}}
myInterval=window.setTimeout("animate()",2000);}
function animate()
{next=count+1;if(next>=totaal)
{next=0;}
$("#project"+count).fadeOut(fadespeed);$("#project"+next).fadeIn(fadespeed);count=next;myInterval=window.setTimeout("animate()",intervalspeed);}
$(document).ready(function(){run();});