$(function(){


				$("#loading").ajaxStart(function(){
				   $(this).show();
				   
				   $('#ResultSet').fadeTo('slow', 0.33);

				});
				$("#loading").ajaxStop(function(){
				   $(this).hide();
				   
				   $('#ResultSet').fadeTo('slow', 1, function(){
					   if (jQuery.browser.msie)  
	            		this.style.removeAttribute('filter');
				    });
				   
				});
								
				var options = { 
			        target:        '#ResultSet'   // target element(s) to be updated with server response 
		    	};
		    	
		   
		   //below code checks to see if the submit button has been clicked
		   //then submits the form via an ajax call
		   //currently commented out to make a standard call instead of an ajax call
			//$('#vehicleForm').submit(function() { 
			
 			//	$('#ajaxfield').val("true");
			    // submit the form 
			  //  $(this).ajaxSubmit(options); 
			    // return false to prevent normal browser submit and page navigation 
			//    return false; 
			    
			//});
			
			//if submit button is clicked, set ajax to false
			//to use standard form submit.
			$('#submitButton').click(function(){
				$('#ajaxfield').val("false");
			});
			
			$('.tab').click(function(event){
			
				var rating = $(this).attr("id");
				
				$('.tabGreen').addClass('tabGrey');
				$('.tabGreen').removeClass('tabGreen');
				$(this).removeClass('tabGrey');
				$(this).addClass('tabGreen');
				
				$('#rating').val(rating);
				$('#ajaxfield').val("true");
				
				$('#vehicleForm').ajaxSubmit(options);
				
				//alert($('#rating').val());
				return false;
			
			});
			
			$("#vehicleClass input").click(function(event){
			
				 if($(this).is(':checked'))  {
			        $('#ajaxfield').val("true");
					$('#vehicleForm').ajaxSubmit(options);
				 }
				 
				 //return false;
			});
			
			onchange="alert('test')";
			
			$("#salesArea input").click(function(event){
			
				$('#ajaxfield').val("true");
				$('#vehicleForm').ajaxSubmit(options);
				//return false;
			
			});
			

});