function hoverOn()
{
	$(this).css("background", "#CCC");
}

function hoverOff()
{
	$(this).css("background", "url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png)");
}

$(document).ready(function() {
	$(".currentNewsItem").hover(hoverOn,hoverOff);
	$(".selectedNewsItem").unbind();
	$(".currentNewsItem").click(
		function() {
			$(".selectedNewsItem").hover(hoverOn,hoverOff);
			$(".selectedNewsItem").css("background", "url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png)");
			var oldId = parseInt($(".selectedNewsItem").attr("id").split("-")[1]);
			$("#currentNewsContent-" + oldId).css("display", "none");
			$(".selectedNewsItem").removeClass("selectedNewsItem");
			$(this).unbind('mouseenter');
			$(this).unbind('mouseleave');
			$(this).addClass("selectedNewsItem");
			$(this).css("background", "#FFF");
			var id = parseInt($(this).attr("id").split("-")[1]);
			$("#currentNewsContent-" + id).css("display", "block");
		});
});
