(function(n,t){function v(n,t,r){var e=n.children(),o=!1,u,s,f;for(n.empty(),u=0,s=e.length;u<s;u++)if(f=e.eq(u),n.append(f),r&&n.append(r),i(n,t)){f.remove();o=!0;break}else r&&r.detach();return o}function e(t,r,u,f,o){var s=!1,h="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",c="script, .dotdotdot-keep";return t.contents().detach().each(function(){var a=this,l=n(a);if(typeof a=="undefined")return!0;if(l.is(c))t.append(l);else{if(s)return!0;t.append(l);!o||l.is(f.after)||l.find(f.after).length||t[t.is(h)?"after":"append"](o);i(u,f)&&(s=a.nodeType==3?y(l,r,u,f,o):e(l,r,u,f,o));s||o&&o.detach()}}),r.addClass("is-truncated"),s}function y(t,f,e,s,c){var l=t[0],nt,k,d,tt;if(!l)return!1;var y=h(l),it=y.indexOf(" ")!==-1?" ":"　",p=s.wrap=="letter"?"":it,a=y.split(p),g=-1,w=-1,b=0,v=a.length-1;for(s.fallbackToLetter&&b==0&&v==0&&(p="",a=y.split(p),v=a.length-1);b<=v&&!(b==0&&v==0);){if(nt=Math.floor((b+v)/2),nt==w)break;w=nt;u(l,a.slice(0,w+1).join(p)+s.ellipsis);e.children().each(function(){n(this).toggle().toggle()});i(e,s)?(v=w,s.fallbackToLetter&&b==0&&v==0&&(p="",a=a[0].split(p),g=-1,w=-1,b=0,v=a.length-1)):(g=w,b=w)}return g==-1||a.length==1&&a[0].length==0?(k=t.parent(),t.detach(),d=c&&c.closest(k).length?c.length:0,k.contents().length>d?l=r(k.contents().eq(-1-d),f):(l=r(k,f,!0),d||k.detach()),l&&(y=o(h(l),s),u(l,y),d&&c&&(tt=c.parent(),n(l).parent().append(c),n.trim(tt.html())||tt.remove()))):(y=o(a.slice(0,g+1).join(p),s),u(l,y)),!0}function i(n,t){return n.innerHeight()>t.maxHeight}function o(t,i){while(n.inArray(t.slice(-1),i.lastCharacter.remove)>-1)t=t.slice(0,-1);return n.inArray(t.slice(-1),i.lastCharacter.noEllipsis)<0&&(t+=i.ellipsis),t}function s(n){return{width:n.innerWidth(),height:n.innerHeight()}}function u(n,t){n.innerText?n.innerText=t:n.nodeValue?n.nodeValue=t:n.textContent&&(n.textContent=t)}function h(n){return n.innerText?n.innerText:n.nodeValue?n.nodeValue:n.textContent?n.textContent:""}function c(n){do n=n.previousSibling;while(n&&n.nodeType!==1&&n.nodeType!==3);return n}function r(t,i,u){var e=t&&t[0],f;if(e){if(!u){if(e.nodeType===3)return e;if(n.trim(t.text()))return r(t.contents().last(),i)}for(f=c(e);!f;){if(t=t.parent(),t.is(i)||!t.length)return!1;f=c(t[0])}if(f)return r(n(f),i)}return!1}function p(t,i){return t?typeof t=="string"?(t=n(t,i),t.length?t:!1):t.jquery?t:!1:!1}function w(n){for(var t,r=n.innerHeight(),u=["paddingTop","paddingBottom"],i=0,f=u.length;i<f;i++)t=parseInt(n.css(u[i]),10),isNaN(t)&&(t=0),r-=t;return r}var f,l,a;n.fn.dotdotdot||(n.fn.dotdotdot=function(t){var r,c;if(this.length==0)return n.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){n(this).dotdotdot(t)});r=this;c=r.contents();r.data("dotdotdot")&&r.trigger("destroy.dot");r.data("dotdotdot-style",r.attr("style")||"");r.css("word-wrap","break-word");r.css("white-space")==="nowrap"&&r.css("white-space","normal");r.bind_events=function(){return r.bind("update.dot",function(t,f){r.removeClass("is-truncated");t.preventDefault();t.stopPropagation();switch(typeof u.height){case"number":u.maxHeight=u.height;break;case"function":u.maxHeight=u.height.call(r[0]);break;default:u.maxHeight=w(r)}u.maxHeight+=u.tolerance;typeof f!="undefined"&&((typeof f=="string"||"nodeType"in f&&f.nodeType===1)&&(f=n("<div />").append(f).contents()),f instanceof n&&(c=f));h=r.wrapInner('<div class="dotdotdot" />').children();h.contents().detach().end().append(c.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var s=!1,l=!1;return o.afterElement&&(s=o.afterElement.clone(!0),s.show(),o.afterElement.detach()),i(h,u)&&(l=u.wrap=="children"?v(h,u,s):e(h,r,h,u,s)),h.replaceWith(h.contents()),h=null,n.isFunction(u.callback)&&u.callback.call(r[0],l,c),o.isTruncated=l,l}).bind("isTruncated.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),typeof t=="function"&&t.call(r[0],o.isTruncated),o.isTruncated}).bind("originalContent.dot",function(n,t){return n.preventDefault(),n.stopPropagation(),typeof t=="function"&&t.call(r[0],c),c}).bind("destroy.dot",function(n){n.preventDefault();n.stopPropagation();r.unwatch().unbind_events().contents().detach().end().append(c).attr("style",r.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),r};r.unbind_events=function(){return r.unbind(".dot"),r};r.watch=function(){if(r.unwatch(),u.watch=="window"){var t=n(window),i=t.width(),f=t.height();t.bind("resize.dot"+o.dotId,function(){i==t.width()&&f==t.height()&&u.windowResizeFix||(i=t.width(),f=t.height(),l&&clearInterval(l),l=setTimeout(function(){r.trigger("update.dot")},100))})}else a=s(r),l=setInterval(function(){if(r.is(":visible")){var n=s(r);(a.width!=n.width||a.height!=n.height)&&(r.trigger("update.dot"),a=n)}},500);return r};r.unwatch=function(){return n(window).unbind("resize.dot"+o.dotId),l&&clearInterval(l),r};var u=n.extend(!0,{},n.fn.dotdotdot.defaults,t),o={},a={},l=null,h=null;return u.lastCharacter.remove instanceof Array||(u.lastCharacter.remove=n.fn.dotdotdot.defaultArrays.lastCharacter.remove),u.lastCharacter.noEllipsis instanceof Array||(u.lastCharacter.noEllipsis=n.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),o.afterElement=p(u.after,r),o.isTruncated=!1,o.dotId=f++,r.data("dotdotdot",!0).bind_events().trigger("update.dot"),u.watch&&r.watch(),r},n.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},n.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" ","　",",",";",".","!","?"],noEllipsis:[]}},n.fn.dotdotdot.debug=function(){},f=1,l=n.fn.html,n.fn.html=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?this.trigger("update",[i]):l.apply(this,arguments)},a=n.fn.text,n.fn.text=function(i){return i!=t&&!n.isFunction(i)&&this.data("dotdotdot")?(i=n("<div />").text(i).html(),this.trigger("update",[i])):a.apply(this,arguments)})})(jQuery);jQuery(document).ready(function(n){n(".dot-ellipsis").each(function(){var r=n(this).hasClass("dot-resize-update"),u=n(this).hasClass("dot-timer-update"),i=0,f=n(this).attr("class").split(/\s+/),t;n.each(f,function(n,t){var r=t.match(/^dot-height-(\d+)$/);r!==null&&(i=Number(r[1]))});t={};u&&(t.watch=!0);r&&(t.watch="window");i>0&&(t.height=i);n(this).dotdotdot(t)})});jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")})