$(function(){
	$('#topnav li').mouseover(UpdateState);

	function UpdateState() {
		// Get index of nav item "moused over"
		var NavID = $('#topnav li').index(this);

		// Remove class from any blocks which have current set then find the nav item relative to it's box and display it
		$('#top_block .block').removeClass("block_current");
		$('#top_block .block:eq('+NavID+')').addClass("block_current");

		$('#topnav li').removeClass('current');
		$('#topnav li:eq('+NavID+')').addClass('current');
	}
});
