var news_count, topic_count;
var topic_delay = 4000;

$(document).ready(function() { 
	news_count = $('#hot_topic p').length;
	topic_count = 2;
	
	setTimeout('roll_news()', topic_delay);
});

function roll_news() {
	$('#hot_topic').fadeOut(1500, function() {
		$('#hot_topic p').css('display', 'none'); 
			
		$('#hot_topic p:eq('+(topic_count-1)+')').css('display', 'block');
		
		if (topic_count < news_count) {
			topic_count = parseInt(topic_count) + 1;
		} else {
			topic_count = 1;
		}
	});
	
	$('#hot_topic').fadeIn(1500, function() {
		setTimeout('roll_news()', topic_delay);
	});
	
} 
