$(function() {
	// Hide all but the first tab panel.
	$("#tab-panels>div:not(:first)").hide();

	// Display the tab buttons.
	$("#tab-buttons").show();

	// Hook the tab buttons up to show the corresponding panel.
	$("#tab-buttons>li").hover(function() {
		var tabClass = $(this).children("a").attr("class");

		// Hide all the other tabs.
		$("#tab-panels>div:not(." + tabClass + ")").stop().fadeOut("fast");

		// Show the tab that this tab button links to.
		$("#tab-panels>div." + tabClass).stop().show().fadeTo("fast", 1);
	}, function() {
		return false;
	});
});
