(function($)
{

	allitems = $(".caritem").get();
   	curr = allitems[0];//$(".caritem:first");
    currIndex = 0;
    	   	
	timer = setInterval(update, 3000)
	function update()
	{
	
		allTotal = allitems.length -1;
   		if(currIndex>=allTotal)
   		{
   			currIndex=0;
   		} else
   		{
   			currIndex++;
   		}
   		toopen = allitems[currIndex];
	
		$(curr).fadeOut("fast",function()
		{
   			$(toopen).fadeIn("slow"); 
   			curr = toopen; 
   		});
	}

	$("a.triggerlink").bind("mouseenter", pause);
	$("a.triggerlink").bind("mouseleave", startover);

	function pause()
	{
		clearTimeout(timer);
		toopen = $(this).attr("href");
		update();
	}
	
	function startover()
	{
		timer = setInterval(update, 3000)
	}


})(jQuery);
