!function(n){n.fn.alphanumeric=function(e){return e=n.extend({ichars:"!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-",nchars:"",allow:""},e),this.each(function(){for(e.nocaps&&(e.nchars+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.allcaps&&(e.nchars+="abcdefghijklmnopqrstuvwxyz"),s=e.allow.split(""),i=0;i<s.length;i++)-1!=e.ichars.indexOf(s[i])&&(s[i]="\\"+s[i]);e.allow=s.join("|");var r=new RegExp(e.allow,"gi"),a=e.ichars+e.nchars;a=a.replace(r,""),n(this).keypress(function(n){n.charCode?k=String.fromCharCode(n.charCode):k=String.fromCharCode(n.which),-1!=a.indexOf(k)&&n.preventDefault(),n.ctrlKey&&"v"==k&&n.preventDefault()}),n(this).bind("contextmenu",function(){return!1})})},n.fn.numeric=function(e){var r="abcdefghijklmnopqrstuvwxyzãáâàäéêèëíîïìõóòôöúûùüç¨´";return r+=r.toUpperCase(),e=n.extend({nchars:r},e),this.each(function(){n(this).alphanumeric(e)})},n.fn.alpha=function(e){return e=n.extend({nchars:"1234567890"},e),this.each(function(){n(this).alphanumeric(e)})}}(jQuery);