$(function(){
	var t;
	$("img.matita").hover(function(){
		var $a=$("img.asterisco");
		var z=(new Date()).getTime();
		t=setInterval(function(){
			n = (((new Date()).getTime()-z)%2000)/2000;
			var v="rotate("+360*n+"deg)";
			$a.css({
				"-moz-transform":v,
				"-webkit-transform":v,
				"transform":v
			});
		},40);
	},function(){
		clearInterval(t);
	});

	$("div.news").each(function(){
		var $img = $("img",this);
		if ($img.length>1) {
			var n=0;
			$img.hide().eq(n).show();
			setInterval(function(){
				$img.eq(n).fadeOut(500);
				n = (n+1)%$img.length;				
				$img.eq(n).fadeIn(500);
			},5000);
		} else
			$img.show();
	});
});