// JavaScript Document
$(document).ready(function(){
	$("#contentBlockButtons a").click(function(){
		// grab the IDs for all content blocks that should be inactive
		var inactive_blocks = $(this).parent().siblings().map(function(itm){
			return $(this).find("a").attr("href");
		}).get();
		
		$( $(this).attr("href") ).fadeIn("slow");
		$( inactive_blocks.join(", ") ).fadeOut("fast");
		$(this).parent().addClass("tabSelected");
		$(this).parent().siblings().removeClass("tabSelected");
		$(this).blur();
		return false;
	});
	/*
	// old 2-tab system
	$("#tab-clubInfo a").click(function () {
		$("#tab-clubInfo").addClass("tabSelected");
		$("#tab-scheduleList").removeClass("tabSelected");
		$("#mainContentBlock").fadeIn("slow");
		$("#schedulesContentBlock").fadeOut("fast");
		$(this).blur();
		return false;
	});
	$("#tab-scheduleList a").click(function () {
		$("#tab-scheduleList").addClass("tabSelected");
		$("#tab-clubInfo").removeClass("tabSelected");
		$("#schedulesContentBlock").fadeIn("slow");
		$("#mainContentBlock").fadeOut("fast");
		$(this).blur();
		return false;
	});
	*/
});
