/*! jQuery slabtext plugin v2.4.0 MIT/GPL2 @freqdec */ !function(a){a.fn.slabText=function(b){return a("body").addClass("slabtexted"),this.each(function(){b&&a.extend(e,b);var c=a(this),d=this,e=a.extend({},a.fn.slabText.defaults,b),f=a("span.slabtext",c).length,g=f?[]:String(a.trim(c.text())).replace(/\s{2,}/g," ").split(" "),h=null,i=null,j=null,k=a(window).width(),l=c.find("a:first").attr("href")||c.attr("href"),m=l?c.find("a:first").attr("title"):"";if(!(!f&&e.minCharsPerLine&&g.join(" ").length ').appendTo(c),b=a.height();return a.remove(),b},o=function(){var j,b=c.width();if(0!=b){if(c.removeClass("slabtextdone slabtextinactive"),e.viewportBreakpoint&&e.viewportBreakpoint>k||e.headerBreakpoint&&e.headerBreakpoint>b)return void c.addClass("slabtextinactive");if(j=n(),f||!e.forceNewCharCount&&j==h)h=j;else{h=j;var v,w,x,y,o=Math.min(60,Math.floor(b/(h*e.fontRatio))),p=0,q=[],s="",t="",u="";if(0!=o&&o!=i){for(i=o;p=g.length)););e.minCharsPerLine&&(w=g.slice(p).join(" "),w.lengthx&&s.length>=(e.minCharsPerLine||2)?(u=s,p--):u=t,v=a.trim(u).length,u=a("
").text(u).html(),e.wrapAmpersand&&(u=u.replace(/&/g,'&')),u=a.trim(u),q.push(''+u+"")}c.html(q.join(" ")),l&&c.wrapInner('")}}a("span.slabtext",c).each(function(){var g,i,j,c=a(this),d=c.text(),f=d.split(" ").length>1;e.postTweak&&c.css({"word-spacing":0,"letter-spacing":0}),i=b/c.width(),j=parseFloat(this.style.fontSize)||h,c.css("font-size",Math.min((j*i).toFixed(e.precision),e.maxFontSize)+"px"),g=e.postTweak?b-c.width():!1,g&&c.css((f?"word":"letter")+"-spacing",(g/(f?d.split(" ").length-1:d.length)).toFixed(e.precision)+"px")}),c.addClass("slabtextdone"),"function"==typeof e.onRender&&e.onRender.call(d)}};o(),e.noResizeEvent||a(window).resize(function(){a(window).width()!=k&&(k=a(window).width(),clearTimeout(j),j=setTimeout(o,e.resizeThrottleTime))})}})},a.fn.slabText.defaults={fontRatio:.78,forceNewCharCount:!0,wrapAmpersand:!0,headerBreakpoint:null,viewportBreakpoint:null,noResizeEvent:!1,resizeThrottleTime:300,maxFontSize:999,postTweak:!0,precision:3,minCharsPerLine:0,onRender:null}}(jQuery);