jQuery.noConflict();
	
	jQuery(document).ready(function() {
    
    if(jQuery("#form_service").val() == 'oneway')  jQuery(".form_returndate").attr('disabled','disabled'); else jQuery(".form_returndate").attr('disabled','');
    jQuery("#form_service").change(function() {
        if(jQuery(this).val() == 'oneway')
          jQuery(".form_returndate").attr('disabled','disabled');
        else
          jQuery(".form_returndate").attr('disabled','');
    });
    
   jQuery("#post-quote").validate({
     errorPlacement: function(error, element) {
         error.insertBefore(element);
     },
     submitHandler: function(form) {
      
      var serialized = jQuery("#post-quote").serialize();
      
      jQuery("#post-quote fieldset").html('<span class="result"><img src="/wp-content/themes/default/images/loading_icon.gif" alt="Loading" /> Request being processed...</span>');

      var html = jQuery.ajax({url: "/wp-content/themes/default/sendQuote.php", 
        async: false, type: "POST", 
        dataType:"html", 
        data: (serialized) 
        }).responseText;

      jQuery("#post-quote fieldset").html(html);
      return false;
     }
    });


		/*jQuery("#form_pickupdate").datepicker({
    	duration: '',
      showTime: true,
      constrainInput: false,
      stepMinutes: 5,  
      stepHours: 1,  
      altFormat: 'd M yy',
      defaultDate: +1,
      minDate: +1,
      yearRange: +1, 
      time24h: true,
      onClose: function() { }
      	
		    
      });

		jQuery("#form_returndate").datepicker({
    	duration: '',
      showTime: true,
      constrainInput: false,
      stepMinutes: 5,  
      stepHours: 1,  
      altFormat: 'd M yy',
      defaultDate: +1,
      minDate: +1,
      yearRange: +1, 
      time24h: true,
      onClose: function() { }
      	
		    
      }); */

});
