(function(jQuery, window, document, undefined) {
  'use strict';

  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 window.Switchery(html, {size: 'small'});
    });

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