
// Skrypty przewijające newsy na głównej stronie
var o = $('#news_scroll');
var toppos = 0;
var firstheight = $('#news_scroll>div:first').height();
var scroll = function() {
	toppos -= 1;
	if(firstheight+toppos<0) {
		$('#news_scroll').append($('#news_scroll>div:first'));
		//$('#news_scroll>div:first').remove();
		toppos += firstheight+5;
		firstheight = $('#news_scroll>div:first').height();
	}
	$('#news_scroll').css('top', toppos+'px');
}
var scrollAnimation = null;
var startScroll = function() {
	if(scrollAnimation==null) scrollAnimation = setInterval('scroll()', 50); 
}
var stopScroll = function() {
	clearInterval(scrollAnimation);
	scrollAnimation = null;
}
