require('./bootstrap');

var autocomplete = require('jquery-ui/ui/widgets/autocomplete');

$(document).ready(function() {
	$('form:first').find('*').filter(':input:visible:first').focus();

	$('.dropdown-submenu>a').on("click", function(e) {
		$(this).next('ul').toggle();
		e.stopPropagation();
		e.preventDefault();
	});
});

require('./jquery.filterTable');
require('./binaryIndexOf');

require('jquery.rut');

String.prototype.ucwords = function() {
	str = this.toLowerCase();
	return str.replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g,
			function(s) {
				return s.toUpperCase();
			});
};

require('./chart');

window.zxcvbn = require('zxcvbn');
