(function(a){a.fn.ellipsis=function(b){var c=document.documentElement.style;if(!("textOverflow" in c||"OTextOverflow" in c)){return this.each(function(){var f=a(this);if(f.css("overflow")=="hidden"){var i=f.html();var d=f.width();var e=a(this.cloneNode(true)).hide().css({position:"absolute",width:"auto",overflow:"visible","max-width":"inherit"});f.after(e);var h=i;while(h.length>0&&e.width()>f.width()){h=h.substr(0,h.length-1);e.html(h+"...");}f.html(e.html());e.remove();if(b==true){var g=f.width();setInterval(function(){if(f.width()!=g){g=f.width();f.html(i);f.ellipsis();}},200);}}});}else{return this;}};})(jQuery);
