$(document).ready(function(){

	$(".news a").css({opacity:0});
	$(".news a:first").css({opacity:1.0});
	$(".news a:first").addClass("newsActive");		


function slideNews() {
	$totalItems = $(".news a").size();
	$current = $("a.newsActive");
		
	if($current.next().length) {
		$next = $current.next();
	}
	else {
		$next = $(".news a:first");
	}
	
	$current.animate({opacity:0.0}, 400, function() {
		$next.addClass("newsActive");
		$current.removeClass("newsActive");
		$next.animate({opacity:1.0}, 400);							
	});
}


firstNewsInt = setInterval(slideNews, 5000);
lastNewsInt = '';

	$(".news a").mouseover(function(){
		if(firstNewsInt != '') {
			clearInterval(firstNewsInt);
		}
		if(lastNewsInt != '') {
			clearInterval(lastNewsInt);
		}
	}).mouseout(function(){
		if(firstNewsInt != '') {
			clearInterval(firstNewsInt);
		}
		if(lastNewsInt != '') {
			clearInterval(lastNewsInt);
		}
		lastNewsInt = setInterval(slideNews, 5000);
	});
});





