/* ui/jquery.datepicker */

  $(document).ready(function(){

    $("#dt2").datepicker({
      showOn: "both",
      buttonImage: "ct/assets/js/images/calendar.gif",
      dateFormat: 'dd M yy',
      showStatus: true,
      maxDate: '+1y +6m',
      minDate: '+1d',
      changeFirstDay: false,
      showButtonPanel: true,
      currentText: '',
      closeText: 'Close',
      buttonImageOnly: true,
      onSelect: function (date) {
        $('#dt').val(date);
      }
    });

    // search_offers
    $("#dt2_offers").datepicker({
      showOn: "both",
      buttonImage: "ct/assets/js/images/calendar.gif",
      dateFormat: 'dd M yy',
      showStatus: true,
      maxDate: '+1y +6m',
      minDate: '+1d',
      changeFirstDay: false,
      showButtonPanel: true,
      currentText: '',
      closeText: 'Close',
      buttonImageOnly: true,
      onSelect: function (date) {
        $('#dt_offers').val(date);
      }
    });

    // bookhotels
    $("#dt2_hotels").datepicker({
      showOn: "both",
      buttonImage: "ct/assets/js/images/calendar.gif",
      dateFormat: 'dd M yy',
      showStatus: true,
      maxDate: '+1y +6m',
      minDate: '+0d',
      changeFirstDay: false,
      showButtonPanel: true,
      currentText: '',
      closeText: 'Close',
      buttonImageOnly: true,
      onSelect: function (date) {
        $('#dt_hotels').val(date);
      }
    });


    // enquiry_form
    $("#fromdate2").datepicker({
      showOn: "both",
      buttonImage: "ct/assets/js/images/calendar.gif",
      dateFormat: 'dd M yy',
      showStatus: true,
      maxDate: '+1y +6m',
      minDate: '+0d',
      changeFirstDay: false,
      showButtonPanel: true,
      currentText: '',
      closeText: 'Close',
      buttonImageOnly: true,
      onSelect: function (date) {
        $('#fromdate').val(date);
      }
    });

    $("#todate2").datepicker({
      showOn: "both",
      buttonImage: "ct/assets/js/images/calendar.gif",
      dateFormat: 'dd M yy',
      showStatus: true,
      maxDate: '+1y +6m',
      minDate: '+1d',
      changeFirstDay: false,
      showButtonPanel: true,
      currentText: '',
      closeText: 'Close',
      buttonImageOnly: true,
      onSelect: function (date) {
        $('#todate').val(date);
      }
    });



  });

/*
    * d - day of month (no leading zero)
    * dd - day of month (two digit)
    * D - day name short
    * DD - day name long
    * m - month of year (no leading zero)
    * mm - month of year (two digit)
    * M - month name short
    * MM - month name long
    * y - year (two digit)
    * yy - year (four digit)
    * '...' - literal text
    * '' - single quote
*/

