// news
var news_count;
var news_interval;
var old_news = 0;
var current_news = 0;
 
$(document).ready(function(){
	news_count = $("div.news").size();
		$("div.news:eq("+current_news+")").css('top','0px');
 
	news_interval = setInterval(news_rotate,9500); //time in milliseconds
		$('#scrollup-news').hover(function() {
		clearInterval(news_interval);
		}, function() {
	news_interval = setInterval(news_rotate,9500); //time in milliseconds
	news_rotate();
	});
});
 
function news_rotate() {
	current_news = (old_news + 1) % news_count; 
		$("div.news:eq(" + old_news + ")").animate({top: -205},"slow", function() {
			$(this).css('top','500px');
		});
		$("div.news:eq(" + current_news + ")").show().animate({top: 0},"slow");  
	old_news = current_news;
}
// news2
var news2_count;
var news2_interval;
var old_news2 = 0;
var current_news2 = 0;
 
$(document).ready(function(){
	news2_count = $("div.news2").size();
		$("div.news2:eq("+current_news2+")").css('top','0px');
 
	news2_interval = setInterval(news2_rotate,9500); //time in milliseconds
		$('#scrollup-news2').hover(function() {
		clearInterval(news2_interval);
		}, function() {
	news2_interval = setInterval(news2_rotate,9500); //time in milliseconds
	news2_rotate();
	});
});
 
function news2_rotate() {
	current_news2 = (old_news2 + 1) % news2_count; 
		$("div.news2:eq(" + old_news2 + ")").animate({top: -205},"slow", function() {
			$(this).css('top','500px');
		});
		$("div.news2:eq(" + current_news2 + ")").show().animate({top: 0},"slow");  
	old_news2 = current_news2;
}
// do you know 
var doy_count;
var doy_interval;
var old_doy = 0;
var current_doy = 0;
 
$(document).ready(function(){
	doy_count = $("div.doy").size();
		$("div.doy:eq("+current_doy+")").css('top','0px');
 
	doy_interval = setInterval(doy_rotate,9000); //time in milliseconds
		$('#scrollup-doy').hover(function() {
		clearInterval(doy_interval);
		}, function() {
	doy_interval = setInterval(doy_rotate,9000); //time in milliseconds
	doy_rotate();
	});
});
 
function doy_rotate() {
	current_doy = (old_doy + 1) % doy_count; 
		$("div.doy:eq(" + old_doy + ")").animate({top: -205},"slow", function() {
			$(this).css('top','500px');
		});
		$("div.doy:eq(" + current_doy + ")").show().animate({top: 0},"slow");  
	old_doy = current_doy;
}
// do you know2
var doy2_count;
var doy2_interval;
var old_doy2 = 0;
var current_doy2 = 0;
 
$(document).ready(function(){
	doy2_count = $("div.doy2").size();
		$("div.doy2:eq("+current_doy2+")").css('top','0px');
 
	doy2_interval = setInterval(doy2_rotate,9000); //time in milliseconds
		$('#scrollup-doy2').hover(function() {
		clearInterval(doy2_interval);
		}, function() {
	doy2_interval = setInterval(doy2_rotate,9000); //time in milliseconds
	doy2_rotate();
	});
});
 
function doy2_rotate() {
	current_doy2 = (old_doy2 + 1) % doy2_count; 
		$("div.doy2:eq(" + old_doy2 + ")").animate({top: -205},"slow", function() {
			$(this).css('top','500px');
		});
		$("div.doy2:eq(" + current_doy2 + ")").show().animate({top: 0},"slow");  
	old_doy2 = current_doy2;
}
