currentNew = 1;
timer = '';
$(document).ready(function()
{
	$('#news_home dl').each(function(i)
	{
		$(this).attr('rel', i+1)
		.find('dt')
		.hover(
			function()
			{
				stopNews();
				showNew($(this).closest('dl').attr('rel'));
			},function(){	
				startNews();
			}
		);
	});
	showNew('');
	startNews('');
});

function startNews()
{
	timer = setInterval(function(){showNew('');},4000);
}
function stopNews()
{
	clearInterval(timer);
}
function showNew(idx)
{
	if(idx!='')
		currentNew = idx;
	
	if(currentNew<0 || currentNew>$('#news_home dl').length)
		currentNew = 1;	
	
	$('#news_home dl[rel="'+currentNew+'"]').siblings().each(function()
	{
		$(this).find('dt').stop().animate({'opacity':.3},100);
		$(this).find('dd').stop().hide();
	});
	$('#news_home dl[rel="'+currentNew+'"]').find('dt').stop().animate({'opacity':1},200);
	$('#news_home dl[rel="'+currentNew+'"]').find('dd').show();
			
	currentNew++;	
}

