(function($) {
	$(function() {
		$('body').append('<textarea id="cli" style="display: none;"></textarea>');
		var clearCli = function() {
			$('#cli').val('');
		};
		var timeout = setTimeout(clearCli, 1000);
		$().bind('keypress', function(e) {
			if(e.target.tagName.toLowerCase().match(/^input|textarea$/)) {
				return;
			}
			clearTimeout(timeout);
			var val = $('#cli').val() + String.fromCharCode(e.charCode);
			if(val.match(/^login$/i)) {
				window.location = '/system/';
			}
			$('#cli').val(val);
			timeout = setTimeout(clearCli, 1000);
		});
	});
})(jQuery);