$ ->
  if ($('#event-search-page').length > 0)

    $("select").selectpicker({ title: '...' })

    $("#search-event-button").click ->
      data = $("#search-event-form").serialize()
      $.fn.yiiGridView.update('event-grid', {
        data: data
      })
      false

    $('#search-time-start').timepicker
      minuteStep: 10,
      template: 'modal',
      appendWidgetTo: 'body',
      showSeconds: false,
      showMeridian: false,
      defaultTime: false

    $('#search-time-end').timepicker
      minuteStep: 10,
      template: 'modal',
      appendWidgetTo: 'body',
      showSeconds: false,
      showMeridian: false,
      defaultTime: false
