Tabs = {
	init: function () {
		$(".tabController li a").click(function (e) {
			e.preventDefault();
			Tabs.selectTab(this.href.substr(this.href.indexOf("#") + 1));
		}).focus(function () {
			this.blur();
		});
		Tabs.selectTab(0);
	},
	
	selectTab: function (tabIndex) {
		$("div.tab").css("display", "none");
		$(".tabController li.current").removeClass("current");
		if (typeof tabIndex === "number") {
			$("div.tab h2").parent("div.tab").eq(tabIndex).css("display", "block");
			$(".tabController li").eq(tabIndex).addClass("current");
		} else if (typeof tabIndex === "string") {
			$("div.tab h2#" + tabIndex).parent("div.tab").css("display", "block");
			$(".tabController li a").each(function () {
				if (this.href.indexOf(tabIndex) > 0) {
					$(this).parent("li").addClass("current");
				}
			});
		}
	}
};