

$(document).ready(function(){


   
    var news_style_count;
 var news_style_interval;
 var old_news_style = 0;
 var current_news_style = 0;


	 
   news_style_count = $("div.news_style").size();
   
   
   
	 $("div.news_style:eq("+current_news_style+")").css('top','5px');
	   
	   
	 if(news_style_count>1){
		 
	   news_style_interval = setInterval(news_style_rotate,10000); //time in milliseconds
	   $('#scrollup').hover(function() {
		 clearInterval(news_style_interval);
	   }, function() {
		 news_style_interval = setInterval(news_style_rotate,10000); //time in milliseconds
		 news_style_rotate();
	   });
   
   }

	 
	 
	  function news_style_rotate() {
   current_news_style = (old_news_style + 1) % news_style_count; 
   $("div.news_style:eq(" + old_news_style + ")").animate({top: -205},"slow", function() {
     $(this).css('top','1000px');
   });
   $("div.news_style:eq(" + current_news_style + ")").show().animate({top: 5},"slow");  
   old_news_style = current_news_style;
 }
	 

			

});