currentView = 0;

$(document).ready(function(){
	$("#news li").css("position","absolute").css("top","160px").css("left","0px");
	$("#news li:first-child").css("top","0px").css("display","block");
	
	if ($("#news li").length > 1) {
	setTimeout("startRotation();",4000);
	}
});

function startRotation() {
	nextOne = currentView + 1;
	
	
	$("#news li:eq(" + currentView + ")").animate({
		top: "-160px"
	},1000, function() {
		
	});
	
	if (nextOne >= $("#news li").length) {
		nextOne = 0;
		currentView = 0;
	} else {
		currentView++;
	}
	
	$("#news li:eq(" + nextOne + ")").css("top","160px");
	
	
	$("#news li:eq(" + nextOne + ")").animate({
		top: "0px"
	},1000, function() {
		
		setTimeout("startRotation();",4000);
	});	
	
	
	
	
	
	
}
