(function(f){var c=function(n,o){if(window.getComputedStyle){return window.getComputedStyle(n,o)}else{return n.currentStyle}};var a=function(n){var o=c(n).width;if(o=="auto"){return f(n).width()}else{return parseFloat(o)}};window.Elastic=function e(s){var P,O,M,K,E,R,t,F;var G,x,A,Q,z,r,w,S,D,v,n,J,C,H;var L,T,u,N,p,q,B,y,o;var U=/(^|\s+)group\-by\-(\d+)(\s+|$)/;var I=/(^|\s+)span\-(\d+)(\s+|$)/;w=[];D=v=0;G=f.find(".two-columns, .three-columns, .four-columns, .auto-columns",s);for(P=0,E=G.length;P<E;P++){x=G[P];A=x.className;if(A.indexOf("two-columns")>-1){S=2}else{if(A.indexOf("three-columns")>-1){S=3}else{if(A.indexOf("four-columns")>-1){S=4}else{if(A.indexOf("auto-columns")>-1){S=f.find("> .column, > .container > .column",x).length;if(A.indexOf("group-by-")>-1&&U.test(A)){S=Number(RegExp.$2)}}else{continue}}}}x=f.find("> .container",G[P])[0]||x;n=Math.round(x.clientWidth/S);Q=f.find("> .column, > .fixed-column, > .elastic-column",x);for(O=0,R=Q.length;O<R;O++){L=[];u=[];q=[];C=H=T=B=0;z=Q[O];r=z.className;J=1;if(r.indexOf("span-")>-1&&I.test(r)){J=Number(RegExp.$2)}z.escol=J;v+=J;if(v==S||O==(R-1)){w.push(z);D=0;C=1}else{if(v<S){w.push(z);D=v}else{if(v>S){D=J;C=1;H=1}}}if(C){for(M=0,t=w.length;M<t;M++){y=w[M];o=y.className;if(o.indexOf("fixed-")>-1){L.push(y);T+=a(y)}else{if(o.indexOf("elastic-")>-1){u.push(y)}else{q.push(y);y.style.width=(n*y.escol)+"px";B+=a(y)}}}F=u.length;if(F>0){p=Math.round((a(x)-(B+T))/F);N=p*F;if(F>1){for(K=0;K<F;K++){u[K].style.width=p+"px"}}u[F-1].style.width=(a(x)-(B+T+(N-p)))+"px"}else{if(q.length>0&&v==S){q[q.length-1].style.width=(a(x)-((B-a(q[q.length-1]))+T))+"px"}}w=[];v=0}if(H){w=[z];v=J}}}for(P in e.helpers){if(e.helpers.hasOwnProperty(P)){e.helpers[P](s)}}};var e=window.Elastic;e.version="1.2.5";e.reset=function k(o){var u=jQuery(document);u.trigger("elastic:beforeReset");var s,v,x,t,q,n,r;t=f.find(".same-height > *, .full-height, .equalized-height > *, .elastic-height",o);for(s=0,q=t.length;s<q;s++){t[s].style.height=""}n=f.find(".vertical-center, .center, .bottom",o);for(s=0,r=n.length;s<r;s++){n[s].parentNode.style.paddingTop=""}v=f(".column, .elastic-column",o);for(s=0,x=v.length;s<x;s++){v[s].parentNode.style.width=""}u.trigger("elastic:reset")};e.refresh=function g(n){var o=jQuery(document);o.trigger("elastic:beforeRefresh");e.reset(n);e(n);o.trigger("elastic:refresh")};e.configuration={refreshOnResize:true};e.helpers={"full-width":function i(n){f(".full-width",n).each(function(){var o=f(this);o.width(f(this.parentNode).width()-(o.outerWidth(true)-o.width()))})},"same-height":function j(n){f(".same-height",n).each(function(){var p=f(this);var o=p.outerHeight(true)-(p.outerHeight(true)-p.height());f("> *",this).each(function(){f(this).css("height",o)})})},"equalized-height":function d(n){f(".equalized-height",n).each(function(){var o=f("> .column, > .container > .column",this);var p=0;o.each(function(){var q=f(this).outerHeight(true);p=(p>q)?p:q}).each(function(){f(this).css("height",p)})})},"full-height":function b(n){f(".full-height",n).each(function(){var o=f(this);o.css("height",f(this.parentNode).height()-(o.outerHeight(true)-o.height()))})},"elastic-height":function h(n){f(".elastic-height",n).each(function(){var p=f(this);var o=0;f("> *:not(.elastic-height)",this.parentNode).each(function(){o+=f(this).outerHeight(true)});p.css("height",Math.round(p.parent().height()-o));e.refresh(this)})},center:function m(n){f(".vertical-center, .center",n).each(function(){var o=f(this.parentNode);var p=Math.round((o.height()-f(this).outerHeight(true))/2);o.css({paddingTop:p+"px",height:(o.css("height"))?(o.outerHeight()-p):""})})},bottom:function l(n){f(".bottom",n).each(function(){var o=f(this.parentNode);var p=Math.round(o.height()-f(this).outerHeight(true));o.css({paddingTop:p+"px",height:(o.css("height"))?(o.outerHeight()-p):""})})}}})(jQuery);jQuery(function(){var c=jQuery(document);c.trigger("elastic:beforeInitialize");var a=document.body.clientWidth;Elastic();if(a!=document.body.clientWidth){Elastic.refresh()}jQuery(window).bind("resize",function b(){if(Elastic.configuration.refreshOnResize){Elastic.refresh()}});c.bind("elastic",Elastic.refresh);c.trigger("elastic:initialize")});
