$(function() {
	$('.gcal-control input[type=checkbox]').change(function() {
		target = $(this).val()
		if($(this).is(':checked')) {
			$(this).parent().removeClass('gcal-control-disabled')
			$('.event.'+target).slideDown()
		} else {
			$(this).parent().addClass('gcal-control-disabled')
			$('.event.'+target).slideUp()
		}
	});
});

$(function() {
	$('.gcal-control input[type=checkbox]').change(function() {
		target = $(this).val()
		if($(this).is(':checked')) {
			$(this).parent().removeClass('gcal-control-disabled')
			$('.event.'+target).slideDown()
		} else {
			$(this).parent().addClass('gcal-control-disabled')
			$('.event.'+target).slideUp()
		}
	});

	// Fix FF being stupid
	$('.gcal-control input').prop('checked', true);
});

Fix for FF being stupid
Fix for FF being stupid

FF apparently doesn't know what a checked checkbox is until it's been checked/unchecked once, so even though it's checked by default in the HTML we have to also trigger some JavaScript to check it for us. This will become a nasty problem if we later make selections 'sticky' at all...
