// JavaScript Document
	jQuery.fn.opensInNewWindow = function() {
		var opt = arguments[0];
		if(opt==null){ opt = 'scrollbars,resizable,width=700,height=450'; }
	    return this.each(function() {
	        $(this).click(function() { var gj = window.open($(this).attr('href'), '', opt); gj.focus(); return false; }).removeAttr('target');
	    });
	};
	$(document).ready(function() {
		$('#tab_nav a').attr('class', 'button').click(function() {
			$('.activebutton').attr('class', 'button');
			switch($(this).attr('class', 'activebutton').attr('id')) {
				case "btnFB":
					$('#football').show();
					$('#basketball').hide();
					$('#baseball').hide();
					$('#hockey').hide();
					break;
				case "btnBK":
					$('#football').hide();
					$('#basketball').show();
					$('#baseball').hide();
					$('#hockey').hide();
					break;
				case "btnBB":
					$('#football').hide();
					$('#basketball').hide();
					$('#baseball').show();
					$('#hockey').hide();
					break;
				case "btnHK":
					$('#football').hide();
					$('#basketball').hide();
					$('#baseball').hide();
					$('#hockey').show();
					break;
				case "btnAll":
				default:
					$('#football').show();
					$('#basketball').show();
					$('#baseball').show();
					$('#hockey').show();
					break;
			}
		});
		$('#btnAll').attr('class', 'activebutton');
		$(".darkgray a[target=_blank]").opensInNewWindow();
		$("#usage").opensInNewWindow("resizable,width=567,height=567");
	});
