$(document).ready(function() {
	//trigger ajax on submit
	$('#submitForm').click( function(){
		//hide the form
		$('#contactForm').hide();
		
		//hide the form
		$('#container').hide();
		
		//send the ajax request  
		$.get('http://' + location.host + '/contact_ajax.php',{ 
			name:$('#name').val(), 
			phone:$('#phone').val(), 
			email:$('#email').val(), 
			address:$('#address').val(), 
			req_irrigation:$('#req_irrigation:checked').val(), 
			req_center_pivots:$('#req_center_pivots:checked').val(), 
			req_pumps:$('#req_pumps:checked').val(), 
			req_effluent:$('#req_effluent:checked').val(), 
			req_water_meters:$('#req_water_meters:checked').val(), 
			req_lifestyle:$('#req_lifestyle:checked').val(), 
			req_pipe_and_fittings:$('#req_pipe_and_fittings:checked').val(), 
			req_stock_water:$('#req_stock_water:checked').val(), 
			comment:$('#message').val()
		});	
		
		// show response
		$('#displayResponse').fadeIn();
		
		//stay on the page
		return false;	
	});
});
