$(document).ready(function () {    
	$("#homePageLatestNewsImages img").hover(showNewsHeadline, hideNewsHeadline);
	//$("#stopPressList li img").click(showPopOutNews);
});


function showNewsHeadline() {
	intItemID = getStoryID(this.id);
	$(".newsStoryHiddenTitle").css("display","none");
	$("#story_title_"+intItemID).css("display","block");
}

function hideNewsHeadline() {
	$(".newsStoryHiddenTitle").css("display","none");
}

function getStoryID(strID) {
	intItemID = strID.substring(strID.lastIndexOf("_")+1, strID.length);
	return intItemID;
}

function showPopOutNews() {
	strElement = getStoryID(this.id);
	
	//$("#newsPopout_"+strElement).css("left", "-500px");
	$("#newsPopout_"+strElement).show();
	$("#newsPopout_"+strElement).animate({"width": "500px" , "height": "58px", "left":"-500px" }, "slow");
	$("#newsPopout_"+strElement).css("zindex", "10");
}

function hidePopOutNews() {
	strElement = getStoryID(this.id);
	$("#newsPopout_"+strElement).animate({"width": "0px" , "height": "0px" }, "fast", '', function(){ $("#newsPopout_"+strElement).hide(); });
}