function news_ticker() {
	setTimeout(news_ticker_tick, 6000);
}

function news_ticker_tick() {
	var current = $('#newsheadlines li.current');
	var next = current.next();

	// Restart:
	if (current.get(0) == $('#newsheadlines li:last').get(0)) {
		next = $('#newsheadlines li:first');
	}
	
	// Fade across:
	current.fadeOut(1000, function() {
		next.fadeIn(1000, function() {
			current.removeClass();
			next.removeClass();
			next.addClass("current");
		});
	});
	news_ticker();
}


$(document).ready(function() {
	$('#newsheadlines li:first').addClass("current");
	news_ticker();
});