news_speed = 0;
news_top = 0;
set_timer_to_zero = 0;
time_length = 0;

function news_hover() {
	$('#news-container').hover(function(){
		clearInterval(news_scroll_timer);
	},function(){
		news_scroll_timer = setInterval('news_scroll()', 1000 / news_speed);
	});
}

function news_scroll() {
    if (news_wait > 0) {
	news_wait--;
    } else {
	news_top = news_top - 1;
	$('#news-scroll').css({top: news_top});
	if (news_top == -$('#news-scroll p:first').innerHeight()) {
	    news_wait = 20;
	    $('#news-scroll').append('<p class="news">' + $('#news-scroll p:first').html() + '</p>');
	    $('#news-scroll p:first').remove();
	    news_top = 0;
	    $('#news-scroll').css({top: 0});
	}
    }
}

function news(speed) {
    news_wait = 20;
	news_speed = speed;
	news_hover();
	news_scroll_timer = setInterval('news_scroll()', 1000 / news_speed);
}

function menu() {
    $('ul.sf-menu').superfish({
	    delay:         200,
		speed: 200,
		animation : {height:'show'}, 
		animationClose : {height:'hide'},
		autoArrows:  false
		});
}


