/* copyright (c)2007 Reliable LifeSaver */
$(document).ready(function() {
	$('#calculator').submit(function(e)
	{
		// Build query string request
		var query_string = 'calc.html?' + $('input,select', this).serialize();
		// Remove previous results, if they exist
		$('#calc_result').remove();
		// Append a new div to the form for our results
		$(this).append('<div id="calc_result">Loading Results...</div>');
		// Make it pretty
		$('#calc_result').css(
		{
			background:   '#fff',
			width:        '540px'
		}
		// Send the AJAX request
		).load(query_string);
		// Do not allow the form to actually submit, we are handling it all with javascript
		e.preventDefault();
	});
});
