$('table.calendar tr.controls td a').live('click', function () {
	var $this = $(this),
		href = $this.attr('href');
	$this.parents('table:first').load(href + ' table.calendar:first > *');
	$('#go_larger_cal').attr('href', '/schedule?' + href.split('?')[1]);
	return false;
});

$('table.calendar a.go_tix').live('click', function () {
	var $input = $('input[name=gen-date]'); if ($input.length === 0) return;
	var $this = $(this),
		args = $this.attr('href').split('?')[1],
		argArr = args.split('&'),
		argObj = {},
		a,
		kV;
	for (a in argArr) {
		kV = argArr[a].split('=');
		argObj[kV[0]] = kV[1];
	}
	$input.val([ argObj.month, argObj.day, argObj.year ].join('/')).focus();
	return false;
});
/*
$('input[type=submit]').live('click', function () {

	var ret;
	if ($('input[name=gen-date]').val().indexOf('/') > -1) {
		//$(this).attr('disabled','disabled');
		$(this).parent().find('select option:selected').each(function () {
			ret = ret || $(this).val() != 0;
		});
	} else {
		alert('Please select the game date you wish to attend.');
		ret = false;
	}
	if (ret === false) alert('Please select the number of tickets you wish to purchase.');
	return ret;
});
*/