jQuery(document).ready(function(){

	//////////////////
	/// Activities ///
	//////////////////

	/*
		This deactivates the links on the Activity Area urls and sets 
		a new event handler on each one which toggles the top image and the 
		visible list.
		
		Note: The id's of the various parts of the activity display have 'ID' prepended to them
		to prevent issues with using zero as an id. It's just easier this way.
	*/
	
	$('#Activities_AreaList a').each(
		function(){
			$(this).attr('href', 'javascript:void(0);');
			$(this).click(HP_ActivityToggle);
		}
	);
	
							
});

function HP_ActivityToggle(){
	
	/* Get the ID */
	var bits = String($(this).attr('id')).split("_");
	var myId = bits[1];

	/* Display Appropriate Image */
	$('#ActivityImages li').removeClass('Active');
	$('#ActivityImage_' + myId).addClass('Active');
	
	/* Display Appropriate List */
	$('#Activities_List > li').removeClass('Active');
	$('#ActivityList_' + myId).addClass('Active');
	
	/* Set Button Highlight */
	$('#Activities_AreaList a').removeClass('Active');
	$(this).addClass('Active');
}