
// To make this work you'll need this CSS too.
// .scroll_container {
//	position: relative;
//	overflow: hidden;
//    height: 200px;
//	width: 200px;
// }
//
// .scroll_headline {
//	position: absolute;
//	top: 210px;
//	left: 5px;
//	height: 195px;
//	width:190px;
// }
// .first {
// 	top: 0px;
// }

var headline_count;
var headline_interval;
var old_headline = 0;
var current_headline = 0;

$(document).ready(function(){
	$('.first').removeClass('first'); // The first class allows the news box to work with JS disabled.
	headline_count = $("div.scroll_headline").size();
	$("div.scroll_headline:eq("+current_headline+")").css('top', '0');
	headline_interval = setInterval(headline_rotate,7000);
	$('#scrollup').hover(function() {
		clearInterval(headline_interval);
		}, function() {
		headline_interval = setInterval(headline_rotate,7000);
		headline_rotate();
	});
});
function headline_rotate() {
current_headline = (old_headline + 1) % headline_count;
if(headline_count != 1){
	$("div.scroll_headline:eq(" + old_headline + ")")
	  .animate({top: -317},"slow", function() {
		$(this).css('top', '327px');
	  });
	$("div.scroll_headline:eq(" + current_headline + ")")
	  .animate({top: 0},"slow"); 
	old_headline = current_headline;
}
}
-->
