text: !function(n,t){var e={limit:100,cssClass:"",separator:"/",placement:null};function i(t,i){this.element=n(t),this.options=n.extend({},e,i),this.$counter=n("<small />").addClass(this.options.cssClass),this.init()}i.prototype.init=function(){var t=this;this.showCount(),this.addMaxlengthAttribute(),this.element.on("keyup blur",function(){t.checkLength.call(t,this)})},i.prototype.addMaxlengthAttribute=function(){this.element.attr("maxlength",this.options.limit)},i.prototype.showCount=function(){this.options.placement?this.$counter.appendTo(this.options.placement):this.$counter.insertAfter(this.element),this.checkLength()},i.prototype.updateCountData=function(t){var i=t+this.options.separator+this.options.limit;this.$counter.text(i)},i.prototype.checkLength=function(){var t=this.element.val(),i=t.length;i>this.options.limit&&(this.element.val(t.substring(0,this.options.limit)),i=this.options.limit),this.updateCountData(i)},n.fn.EnsureMaxLength=function(t){return this.each(function(){n.data(this,"plugin")||n.data(this,"plugin",new i(this,t))})}}(jQuery);