(function(jQuery, window, document, undefined) {
  jQuery(function($) {
    $('.select2').select2().on('select2:select', function() {
      $(this).focus();
    });

    var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
    elems.forEach(function(html) {
      var switchery = new Switchery(html, {size: 'small'});
    });

    $('[data-toggle="tooltip"]').tooltip();
  });
})(jQuery, window, document)