cnt = new Array(0,0,0);    
    
var next;

$(document).ready(function()
	{
	$('#Starter div').each(function(index) {

	$(this).children("img:gt(0)").fadeOut();
//	$(this).children("img:gt(0)").show();
	});

/*
    $.fn.wait = function(time, type) {
        time = time || 5000;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    }
*/    

// setTimeout(runIt, 5000);
setInterval(runIt, 5000);


    function runIt() {

	$('#Starter div').each(function(index)
		{

		$(this).children("img:eq("+cnt[index]+")").fadeOut(1000);
		
		if (cnt[index]+1 < $(this).children('img').length)
			{

			cnt[index]++;
			}
		else
			{
			cnt[index] = 0;
			}
		next = cnt[index];

//		alert(next);

		$(this).children("img:eq("+next+")").fadeIn(1000);		
		
//		alert($(this).children('img').length);
    	});
/*    
      $("div").wait()
              .animate({left:'+=200'},2000)
              .wait()
              .animate({left:'-=200'},1500,runIt);
    
    runIt();
*/
}
  });

	
