var safetyStart = '';

$(function() {

	safetyStart = $('#safety').val();

	$('#club_id').change(function() {
		if($(this).val() == 'other') {
			$('#club_other').removeAttr('disabled');
		}
		else {
			$('#club_other').attr('disabled', true);
		}
	});

	$('input[name="moorage"]').change(function() {
		if($(this).val() == 'yes') {
			$('#moorage_id').removeAttr('disabled');
		}
		else {
			$('#moorage_id').attr('disabled', true);
		}
	});

	$('#safety').focusin(function() {
		if($(this).val() == safetyStart) {
			$(this).val('');
		}
	});

	$('#safety').focusout(function() {
		if($(this).val() == '') {
			$(this).val(safetyStart);
		}
	});
	
	$('#go').click(function() {
		window.setTimeout('showStatusOverlay()', 1000);
	});
});

function showStatusOverlay() {
	$('.statusoverlay').fadeIn('slow');
}
