var timerId = null;

function tickerMovement(){
	$('#ticker div.news:first').animate( {marginTop: '-110px'}, 800, function()
			{
				$(this).detach().appendTo('div#ticker').removeAttr('style');	
			});
}

function startTicker() {
    if (timerId) {
        return;
    }
    timerId = setInterval('tickerMovement()', 20000);
}

function stopTicker() {
    if (!timerId) {
        return;
    }
    clearInterval(timerId);
    timerId = null;
}

$(function()
{
	startTicker();
	$('#ticker').hover(stopTicker, startTicker);
});
