$("document").ready(function () {
	// This array represents the SRC values for the next appropriate image
	var canArray = new Array();
	canArray['spidercan-increase'] = new Array();
	canArray['spidercan-increase']['path'] = './assets/images/spidercan2.jpg';
	canArray['spidercan-increase']['id'] = 'spidercan2';
	
	canArray['spidercan-decrease'] = new Array();
	canArray['spidercan-decrease']['path'] = './assets/images/spidercan3.jpg';
	canArray['spidercan-decrease']['id'] = 'spidercan3';
	
	canArray['spidercan2-increase'] = new Array();
	canArray['spidercan2-increase']['path'] = './assets/images/spidercan3.jpg';
	canArray['spidercan2-increase']['id'] = 'spidercan3';
	
	canArray['spidercan2-decrease'] = new Array();
	canArray['spidercan2-decrease']['path'] = './assets/images/spidercan.jpg'; 
	canArray['spidercan2-decrease']['id'] = 'spidercan';
	
	canArray['spidercan3-increase'] = new Array();
	canArray['spidercan3-increase']['path'] = './assets/images/spidercan.jpg';
	canArray['spidercan3-increase']['id'] = 'spidercan';
	
	canArray['spidercan3-decrease'] = new Array();
	canArray['spidercan3-decrease']['path'] = './assets/images/spidercan2.jpg';
	canArray['spidercan3-decrease']['id'] = 'spidercan2';
		
	$("#jquery-hovercan img:first").hover(
		function ()
		{
			$(this).attr('src', $(this).attr('src').split('.jpg').join('-hover.jpg'));
		},
		function ()
		{
			$(this).attr('src', $(this).attr('src').split('-hover.jpg').join('.jpg'));
		}
	);
	$("#can-nav a").click(
		function ()
		{
			var selectionSuffix = ($(this).attr('id') == 'right-nav') ? '-increase' : '-decrease';
			var currentImage = $("#jquery-hovercan img:first").attr('id');
			var newImage = canArray[currentImage + selectionSuffix];
			$("#jquery-hovercan img:first").attr('src', newImage['path']);
			$("#jquery-hovercan img:first").attr('id', newImage['id']);
		}
	);
});