/*! jQuery Trim Multiselect - v0.0.4 - 2013-09-11 * https://github.com/netoholic/jquery-trim-multiselect * Copyright (c) 2013 Boyan `netoholic` Yordanov; Licensed MIT */ (function(t,i,n){var e=function(){function i(i){r(),c=i,s=i.width()-15,a=t("#trimSelectTestEl")}function e(){a.remove()}function r(){t("#trimSelectTestEl").length||t(n.body).append(o)}function l(i,n){var e="";if(i=t.trim(i),n=t.trim(n),a.width()>s)return e=i.substr(0,i.length/2),a.text(e),n=i.substr(i.length/2),l(e,n);var r=.2*s;return s-a.width()>r?(e=i+n.substr(0,n.length/2),a.text(i),n=n.substr(n.length/2),l(e,n)):i}function u(t){if(a.text(t.text()),a.width()>s){t.attr("title",t.text());var i=l(t.text(),"");t.text(i+"...")}}var o='
',a=null,c=null,s=null;return{trim:u,initialize:i,clean:e}}();t.fn.trimMultiSelect=function(){return this.each(function(){var i=t(this);e.initialize(i),i.find("option").each(function(){var i=t(this);e.trim(i)}),e.clean()})}})(jQuery,window,document);