$(document).ready(function(){
	
	$("#reservations-form").validate();
	$("#contact-form").validate();
	
	
	$(".feedback, .oops").hide();
	$(".feedback, .oops").fadeIn(2000);

	$('.whatisthis').qtip({
   content: { text: '<div id="tooltip"><small>Your Card Verification Number is your additional protection to ensure your credit card information is not being used fraudulently.</small><br/><br/> <img class="card-tip" src="http://meritlimousine.com/images/csc.png" alt="csc"/> <small><b>Visa/Mastercard/Discover</b><br/>3-digit, non-embossed number printed on back of card immediately after account number.<br/><br/><b>American Express</b><br/>4-digit, non-embossed number printed above account number on the front of card.</small></div>' },
   show: 'mouseover',
   hide: 'mouseout',
   style: { 
      width: 300,
      padding: 5,
      background: '#000000',
      color: '#ffffff',
      textAlign: 'left',
      border: {
         width: 2,
         radius: 2,
         color: '#666666'
      },
      tip: 'leftTop',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   }


	})
	

$("#departureArea").hide();

$("#arrivalArea").hide();
        

    $('#departure').click(function(){
        if ($('#departure').attr('checked')) {
            $("#departureArea").slideDown();
        } else {
            $("#departureArea").slideUp();
            
        }
    }); 
    

    
    $('#arrival').click(function(){
        if ($('#arrival').attr('checked')) {
            $("#arrivalArea").slideDown();
        } else {
            $("#arrivalArea").slideUp();
        } 
    });
    
    
    $('.pickUpDate').DatePicker({
   			format:'m/d/Y',
			date: $('#pickUpDate').val(),
			starts: 1,
			position: 'right',
			onBeforeShow: function(){
				$('#pickUpDate').DatePickerSetDate($('#pickUpDate').val(), true);
			},
			onChange: function(formated, dates){
				$('#pickUpDate').val(formated);
					$('#pickUpDate').DatePickerHide();
				}
		});
		
	 });

    
	