$(function () {
  $('.select2').select2();
  $("input[data-bootstrap-switch]").each(function(){
      $(this).bootstrapSwitch();
  })
  $( "#search_input" ).on('input', function() {
    if ($( "#search_input" ).val().length > 2 || $( "#search_input" ).val().length == 0) {
      $('#search').val($( "#search_input" ).val());
      $('#submit_form_btn').click();
    }
  });
});
function formSubmit() {
  $('#submit_form_btn').click();
  return false;
}
function formSubmitText(element) {
  alert(this);
  if ($(element).val().length > 2 || $(element).val().length == 0) {
    //$('#submit_form_btn').click();
  }
  return false;
}
