// PREPARE THE FORM WHEN THE DOM IS READY$(document).ready(function() {	// HIDE THE SAMPLE EXPERIENCE	$('#sample').hide();	// CREATE A NEW PARAGRAPH TO HOLD THE SUCESS MESSAGE, ADD IT TO blue_box, THEN HIDE IT	$('<div id="success"></div>').appendTo('#blue_box').hide();	// PREPARE THE OPTIONS OBJECT	var options = {		target: '#success',		beforeSubmit: validateInput,		type: 'post',		url: 'response_ajax.cfm',		success: showResponse	};					   	// BIND share_form TO THE ajaxForm METHOD AND PASS options TO ajaxForm	$('#share_form').ajaxForm(options);	// ADD A SUBMIT BUTTON CLICK HANDLER HERE TO HIDE THE FORM AND SHOW THE SUCCESS DIV WITH A SPINNER 	//$('#submit').click(function() {		// FADE OUT THE FORM	//	$('#share_form').fadeOut('fast', function() {	//		$('#success').fadeIn('fast');	//	});	//});				    	// VALIDATE THE FORM INPUT BEFORE MAKING THE AJAX CALL	function validateInput(formData, jqForm, options) {		var form = jqForm[0];		if ( !form.name.value ) {			alert('Please enter your name in the Name field. We will not save or share this information.');			return false;		}		else if ( !form.email.value ) {			alert('Please enter your email address in the Email field. We will not save or share this information.');			return false;		}			else if ( !form.city_state.value ) {			alert('Please enter your city and state in the City/State field. We will not save or share this information.');			return false;		}		else if ( !form.experience.value ) {			alert('Please enter a comment in the Experience field.');			return false;		}	};	// DISPLAY THE AJAX SERVER RESPONSE	function showResponse(responseText, statusText) {		$('#share_form').fadeOut('fast', function() {			$('#success').fadeIn('fast');		});		}	// TOGGLE THE SAMPLE EXPERIENCE ON CLICK	$('#show_sample').click(function() {		$('#sample').slideToggle('fast', function() {			if ( $('#show_sample').html() == 'See&nbsp;sample' ) {				$('#show_sample').html('Hide&nbsp;sample');			}			else {				$('#show_sample').html('Show&nbsp;sample');			}		});	});	// HIDE THE OLDER CONTENT BY DEFAULT	$('#older_content').hide();	// TOGGLE THE VIEW OF THE OLDER CONTENT DIV	$('#older_content_button').click(function() {		$('#older_content_button').hide(1, function() {			$('#older_content').show(1);		});	});	return false;});
