function scrollableDots(num, cur)
{
	var str = "";
	var dot = "red";
	var i;
	for(i=0 ; i < num ; i++)
	{
		if(i == cur) dot = "white";
		str = str + "<li><img src=\"images/carousel-dot-"+ dot +".png\" alt=\""+ i +"\" /></li>";
		dot = "red";
	}

	$("#coursel-dots").html(str);
}

jQuery(function(){


	$(".scrollable")
					.scrollable({
						circular: true, 
						onSeek: function(){
							scrollableDots(this.getSize(),this.getIndex());
					}})
					
					.autoscroll({ 
						autoplay: true, 
						steps: 1, 
						interval: 4000 
					});
					
	scrollableDots(3,0);
		
		
	
	});
