﻿$(document).ready(function() {
	/* Rollovers for menu tabs.
		Each tab's image file name needs to match the ID for that tab's <area>
		tags in the image map definition (omitting the file extension, which
		currently needs to be ".png"). */
	/* Remember which tab was active when the page loaded so we can switch back
		to it on hover out. */
	var initialMenuImage = $("#menu-tabs").attr("src");
	// Listen <area> hovers
	$("area[id^='menu-tab']").hover(
		// hover in - determine the image based on ID of current <area> tag
		function(){$("#menu-tabs").attr("src", "assets/img/" + $(this).attr("id") + ".png");},
		// hover out - back to original image
		function(){$("#menu-tabs").attr("src", initialMenuImage);}
	);
});
