$(document).ready(function(){
	
	//news scroller
	$(function(){
		var speed = 80;
		var delay = 3000;
		var mheight = 480;
		var kjoer;
		$("<div></div>").addClass("alternate").height(mheight).css("position", "relative").css("overflow", "hidden").appendTo("#latestnews_left");
		$("<div></div>").addClass("scroller").css({"position": "absolute", "top": "0px"}).appendTo(".alternate");
		$(".newsscroll").hide().children().appendTo("div.scroller");
		var dim = $(".scroller").clone().appendTo(".alternate").height();
		$(".scroller:eq(1)").css("top", dim);
		function scroll(){
		$(".scroller").each(function(){
		var a = parseInt($(this).css("top"));
		$(this).css("top", a-1);
		if (a<(0-dim)) tick($(this));
		});
		};
		function tick(obj){
		obj.css("top", dim);
		};
		function wait(){
		kjoer = setInterval(scroll, speed);
		}
		var go = setTimeout(wait,delay)
		$(".scroller").hover(function(){clearTimeout(go); clearInterval(kjoer);}
		,function(){kjoer = setInterval(scroll, speed);})
	});
});