").append(oe.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){s.each(n,o||[t.responseText,e,t])}),this},oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length};var oi=t.document.documentElement;oe.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,u,c=oe.css(t,"position"),d=oe(t),f={};"static"===c&&(t.style.position="relative"),a=d.offset(),r=oe.css(t,"top"),l=oe.css(t,"left"),u=("absolute"===c||"fixed"===c)&&oe.inArray("auto",[r,l])>-1,u?(i=d.position(),s=i.top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),oe.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(f.top=e.top-a.top+s),null!=e.left&&(f.left=e.left-a.left+o),"using"in e?e.using.call(t,f):d.css(f)}},oe.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){oe.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return e=r.documentElement,oe.contains(e,o)?(typeof o.getBoundingClientRect!==Ce&&(i=o.getBoundingClientRect()),n=G(r),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===oe.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(n=t.offset()),n.top+=oe.css(t[0],"borderTopWidth",!0),n.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-oe.css(i,"marginTop",!0),left:e.left-n.left-oe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||oi;t&&!oe.nodeName(t,"html")&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||oi})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);oe.fn[t]=function(i){return Ne(this,function(t,i,o){var r=G(t);return void 0===o?r?e in r?r[e]:r.document.documentElement[i]:t[i]:(r?r.scrollTo(n?oe(r).scrollLeft():o,n?o:oe(r).scrollTop()):t[i]=o,void 0)},t,i,arguments.length,null)}}),oe.each(["top","left"],function(t,e){oe.cssHooks[e]=E(ne.pixelPosition,function(t,n){return n?(n=en(t,e),on.test(n)?oe(t).position()[e]+"px":n):void 0})}),oe.each({Height:"height",Width:"width"},function(t,e){oe.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){oe.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return Ne(this,function(e,n,i){var o;return oe.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?oe.css(e,n,s):oe.style(e,n,i,s)},e,r?i:void 0,r,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe});var ri=t.jQuery,si=t.$;return oe.noConflict=function(e){return t.$===oe&&(t.$=si),e&&t.jQuery===oe&&(t.jQuery=ri),oe},typeof e===Ce&&(t.jQuery=t.$=oe),oe}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){var e="ui-effects-",n="ui-effects-style",i="ui-effects-animated",o=t;return t.effects={effect:{}},function(t,e){function n(t,e,n){var i=d[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:t>i.max?i.max:t)}function i(e){var n=u(),i=n._rgba=[];return e=e.toLowerCase(),p(l,function(t,o){var r,s=o.re.exec(e),a=s&&o.parse(s),l=o.space||"rgba";return a?(r=n[l](a),n[c[l].cache]=r[c[l].cache],i=n._rgba=r._rgba,!1):void 0}),i.length?("0,0,0,0"===i.join()&&t.extend(i,r.transparent),n):r[e]}function o(t,e,n){return n=(n+1)%1,1>6*n?t+6*(e-t)*n:1>2*n?e:2>3*n?t+6*(e-t)*(2/3-n):t}var r,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],u=t.Color=function(e,n,i,o){return new t.Color.fn.parse(e,n,i,o)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=u.support={},h=t("
")[0],p=t.each;h.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=h.style.backgroundColor.indexOf("rgba")>-1,p(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}
}),u.fn=t.extend(u.prototype,{parse:function(o,s,a,l){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(s),s=e);var d=this,f=t.type(o),h=this._rgba=[];return s!==e&&(o=[o,s,a,l],f="array"),"string"===f?this.parse(i(o)||r._default):"array"===f?(p(c.rgba.props,function(t,e){h[e.idx]=n(o[e.idx],e)}),this):"object"===f?(o instanceof u?p(c,function(t,e){o[e.cache]&&(d[e.cache]=o[e.cache].slice())}):p(c,function(e,i){var r=i.cache;p(i.props,function(t,e){if(!d[r]&&i.to){if("alpha"===t||null==o[t])return;d[r]=i.to(d._rgba)}d[r][e.idx]=n(o[t],e,!0)}),d[r]&&0>t.inArray(null,d[r].slice(0,3))&&(d[r][3]=1,i.from&&(d._rgba=i.from(d[r])))}),this):void 0},is:function(t){var e=u(t),n=!0,i=this;return p(c,function(t,o){var r,s=e[o.cache];return s&&(r=i[o.cache]||o.to&&o.to(i._rgba)||[],p(o.props,function(t,e){return null!=s[e.idx]?n=s[e.idx]===r[e.idx]:void 0})),n}),n},_space:function(){var t=[],e=this;return p(c,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=u(t),o=i._space(),r=c[o],s=0===this.alpha()?u("transparent"):this,a=s[r.cache]||r.to(s._rgba),l=a.slice();return i=i[r.cache],p(r.props,function(t,o){var r=o.idx,s=a[r],u=i[r],c=d[o.type]||{};null!==u&&(null===s?l[r]=u:(c.mod&&(u-s>c.mod/2?s+=c.mod:s-u>c.mod/2&&(s-=c.mod)),l[r]=n((u-s)*e+s,o)))}),this[o](l)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=u(e)._rgba;return u(t.map(n,function(t,e){return(1-i)*o[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,o=t[1]/255,r=t[2]/255,s=t[3],a=Math.max(i,o,r),l=Math.min(i,o,r),u=a-l,c=a+l,d=.5*c;return e=l===a?0:i===a?60*(o-r)/u+360:o===a?60*(r-i)/u+120:60*(i-o)/u+240,n=0===u?0:.5>=d?u/c:u/(2-c),[Math.round(e)%360,n,d,null==s?1:s]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],i=t[2],r=t[3],s=.5>=i?i*(1+n):i+n-i*n,a=2*i-s;return[Math.round(255*o(a,s,e+1/3)),Math.round(255*o(a,s,e)),Math.round(255*o(a,s,e-1/3)),r]},p(c,function(i,o){var r=o.props,s=o.cache,l=o.to,c=o.from;u.fn[i]=function(i){if(l&&!this[s]&&(this[s]=l(this._rgba)),i===e)return this[s].slice();var o,a=t.type(i),d="array"===a||"object"===a?i:arguments,f=this[s].slice();return p(r,function(t,e){var i=d["object"===a?t:e.idx];null==i&&(i=f[e.idx]),f[e.idx]=n(i,e)}),c?(o=u(c(f)),o[s]=f,o):u(f)},p(r,function(e,n){u.fn[e]||(u.fn[e]=function(o){var r,s=t.type(o),l="alpha"===e?this._hsla?"hsla":"rgba":i,u=this[l](),c=u[n.idx];return"undefined"===s?c:("function"===s&&(o=o.call(this,c),s=t.type(o)),null==o&&n.empty?this:("string"===s&&(r=a.exec(o),r&&(o=c+parseFloat(r[2])*("+"===r[1]?1:-1))),u[n.idx]=o,this[l](u)))})})}),u.hook=function(e){var n=e.split(" ");p(n,function(e,n){t.cssHooks[n]={set:function(e,o){var r,s,a="";if("transparent"!==o&&("string"!==t.type(o)||(r=i(o)))){if(o=u(r||o),!f.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===n?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(l){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{e.style[n]=o}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=u(e.elem,n),e.end=u(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})},u.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(n,i){e["border"+i+"Color"]=t}),e}},r=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(o),function(){function e(e){var n,i,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(i=o.length;i--;)n=o[i],"string"==typeof o[n]&&(r[t.camelCase(n)]=o[n]);else for(n in o)"string"==typeof o[n]&&(r[n]=o[n]);return r}function n(e,n){var i,o,s={};for(i in n)o=n[i],e[i]!==o&&(r[i]||(t.fx.step[i]||!isNaN(parseFloat(o)))&&(s[i]=o));return s}var i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(o.style(t.elem,n,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,r,s,a){var l=t.speed(r,s,a);return this.queue(function(){var r,s=t(this),a=s.attr("class")||"",u=l.children?s.find("*").addBack():s;u=u.map(function(){var n=t(this);return{el:n,start:e(this)}}),r=function(){t.each(i,function(t,e){o[e]&&s[e+"Class"](o[e])})},r(),u=u.map(function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this}),s.attr("class",a),u=u.map(function(){var e=this,n=t.Deferred(),i=t.extend({},l,{queue:!1,complete:function(){n.resolve(e)}});return this.el.animate(this.diff,i),n.promise()}),t.when.apply(t,u.get()).done(function(){r(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(n,i,o,r){return i?t.effects.animateClass.call(this,{add:n},i,o,r):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(n,i,o,r){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,o,r):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,o,r,s){return"boolean"==typeof i||void 0===i?o?t.effects.animateClass.call(this,i?{add:n}:{remove:n},o,r,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,o,r)}}(t.fn.toggleClass),switchClass:function(e,n,i,o,r){return t.effects.animateClass.call(this,{add:n,remove:e},i,o,r)}})}(),function(){function o(e,n,i,o){return t.isPlainObject(e)&&(n=e,e=e.effect),e={effect:e},null==n&&(n={}),t.isFunction(n)&&(o=n,i=null,n={}),("number"==typeof n||t.fx.speeds[n])&&(o=i,i=n,n={}),t.isFunction(i)&&(o=i,i=null),n&&t.extend(e,n),i=i||n.duration,e.duration=t.fx.off?0:"number"==typeof i?i:i in t.fx.speeds?t.fx.speeds[i]:t.fx.speeds._default,e.complete=o||n.complete,e}function r(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var n=e.outerWidth(),i=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,r=o.exec(t)||["",0,n,i,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?n:parseFloat(r[2]),bottom:"auto"===r[3]?i:parseFloat(r[3]),left:parseFloat(r[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(n){return!!t(n).data(i)||e(n)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,n){for(var i=0,o=n.length;o>i;i++)null!==n[i]&&t.data(e+n[i],t[0].style[n[i]])},restore:function(t,n){for(var i,o=0,r=n.length;r>o;o++)null!==n[o]&&(i=t.data(e+n[o]),t.css(n[o],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var n={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},i=t("
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;try{r.id}catch(s){r=document.body}return e.wrap(i),(e[0]===r||t.contains(e[0],r))&&t(r).trigger("focus"),i=e.parent(),"static"===e.css("position")?(i.css({position:"relative"}),e.css({position:"relative"})):(t.extend(n,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,i){n[i]=e.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),i.css(n).show()},removeWrapper:function(e){var n=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===n||t.contains(e[0],n))&&t(n).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,n,i){return i||(i=n,n="effect"),t.effects.effect[e]=i,t.effects.effect[e].mode=n,i},scaledDimensions:function(t,e,n){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(e||100)/100:1,o="vertical"!==n?(e||100)/100:1;return{height:t.height()*o,width:t.width()*i,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*i}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();e>1&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data(n,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(n)||"",t.removeData(n)},mode:function(t,e){var n=t.is(":hidden");return"toggle"===e&&(e=n?"show":"hide"),(n?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createPlaceholder:function(n){var i,o=n.css("position"),r=n.position();return n.css({marginTop:n.css("marginTop"),marginBottom:n.css("marginBottom"),marginLeft:n.css("marginLeft"),marginRight:n.css("marginRight")}).outerWidth(n.outerWidth()).outerHeight(n.outerHeight()),/^(static|relative)/.test(o)&&(o="absolute",i=t("<"+n[0].nodeName+">").insertAfter(n).css({display:/^(inline|ruby)/.test(n.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:n.css("marginTop"),marginBottom:n.css("marginBottom"),marginLeft:n.css("marginLeft"),marginRight:n.css("marginRight"),"float":n.css("float")}).outerWidth(n.outerWidth()).outerHeight(n.outerHeight()).addClass("ui-effects-placeholder"),n.data(e+"placeholder",i)),n.css({position:o,left:r.left,top:r.top}),i},removePlaceholder:function(t){var n=e+"placeholder",i=t.data(n);i&&(i.remove(),t.removeData(n))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,n,i,o){return o=o||{},t.each(n,function(t,n){var r=e.cssUnit(n);r[0]>0&&(o[n]=r[0]*i+r[1])}),o}}),t.fn.extend({effect:function(){function e(e){function o(){l.removeData(i),t.effects.cleanUp(l),"hide"===n.mode&&l.hide(),a()}function a(){t.isFunction(u)&&u.call(l[0]),t.isFunction(e)&&e()}var l=t(this);n.mode=d.shift(),t.uiBackCompat===!1||s?"none"===n.mode?(l[c](),a()):r.call(l[0],n,o):(l.is(":hidden")?"hide"===c:"show"===c)?(l[c](),a()):r.call(l[0],n,a)}var n=o.apply(this,arguments),r=t.effects.effect[n.effect],s=r.mode,a=n.queue,l=a||"fx",u=n.complete,c=n.mode,d=[],f=function(e){var n=t(this),o=t.effects.mode(n,c)||s;n.data(i,!0),d.push(o),s&&("show"===o||o===s&&"hide"===o)&&n.show(),s&&"none"===o||t.effects.saveStyle(n),t.isFunction(e)&&e()};return t.fx.off||!r?c?this[c](n.duration,u):this.each(function(){u&&u.call(this)}):a===!1?this.each(f).each(e):this.queue(l,f).queue(l,e)},show:function(t){return function(e){if(r(e))return t.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(e){if(r(e))return t.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(e){if(r(e)||"boolean"==typeof e)return t.apply(this,arguments);var n=o.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var n=this.css(e),i=[];return t.each(["em","px","%","pt"],function(t,e){n.indexOf(e)>0&&(i=[parseFloat(n),e])}),i},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,n){var i=t(this),o=t(e.to),r="fixed"===o.css("position"),s=t("body"),a=r?s.scrollTop():0,l=r?s.scrollLeft():0,u=o.offset(),c={top:u.top-a,left:u.left-l,height:o.innerHeight(),width:o.innerWidth()},d=i.offset(),f=t("
").appendTo("body").addClass(e.className).css({top:d.top-a,left:d.left-l,height:i.innerHeight(),width:i.innerWidth(),position:r?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){f.remove(),t.isFunction(n)&&n()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;((e=Math.pow(2,--n))-1)/11>t;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,n){t.easing["easeIn"+e]=n,t.easing["easeOut"+e]=function(t){return 1-n(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?n(2*t)/2:1-n(-2*t+2)/2}})}(),t.effects}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("blind","hide",function(e,n){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),r=e.direction||"up",s=o.cssClip(),a={clip:t.extend({},s)},l=t.effects.createPlaceholder(o);a.clip[i[r][0]]=a.clip[i[r][1]],"show"===e.mode&&(o.cssClip(a.clip),l&&l.css(t.effects.clipToBox(a)),a.clip=s),l&&l.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("bounce",function(e,n){var i,o,r,s=t(this),a=e.mode,l="hide"===a,u="show"===a,c=e.direction||"up",d=e.distance,f=e.times||5,h=2*f+(u||l?1:0),p=e.duration/h,m=e.easing,g="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,y=0,b=s.queue().length;for(t.effects.createPlaceholder(s),r=s.css(g),d||(d=s["top"===g?"outerHeight":"outerWidth"]()/3),u&&(o={opacity:1},o[g]=r,s.css("opacity",0).css(g,v?2*-d:2*d).animate(o,p,m)),l&&(d/=Math.pow(2,f-1)),o={},o[g]=r;f>y;y++)i={},i[g]=(v?"-=":"+=")+d,s.animate(i,p,m).animate(o,p,m),d=l?2*d:d/2;l&&(i={opacity:0},i[g]=(v?"-=":"+=")+d,s.animate(i,p,m)),s.queue(n),t.effects.unshift(s,b,h+1)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("clip","hide",function(e,n){var i,o={},r=t(this),s=e.direction||"vertical",a="both"===s,l=a||"horizontal"===s,u=a||"vertical"===s;i=r.cssClip(),o.clip={top:u?(i.bottom-i.top)/2:i.top,right:l?(i.right-i.left)/2:i.right,bottom:u?(i.bottom-i.top)/2:i.bottom,left:l?(i.right-i.left)/2:i.left},t.effects.createPlaceholder(r),"show"===e.mode&&(r.cssClip(o.clip),o.clip=i),r.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("drop","hide",function(e,n){var i,o=t(this),r=e.mode,s="show"===r,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",u="up"===a||"left"===a?"-=":"+=",c="+="===u?"-=":"+=",d={opacity:0};t.effects.createPlaceholder(o),i=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0)/2,d[l]=u+i,s&&(o.css(d),d[l]=c+i,d.opacity=1),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("explode","hide",function(e,n){function i(){b.push(this),b.length===d*f&&o()}function o(){h.css({visibility:"visible"}),t(b).remove(),n()}var r,s,a,l,u,c,d=e.pieces?Math.round(Math.sqrt(e.pieces)):3,f=d,h=t(this),p=e.mode,m="show"===p,g=h.show().css("visibility","hidden").offset(),v=Math.ceil(h.outerWidth()/f),y=Math.ceil(h.outerHeight()/d),b=[];for(r=0;d>r;r++)for(l=g.top+r*y,c=r-(d-1)/2,s=0;f>s;s++)a=g.left+s*v,u=s-(f-1)/2,h.clone().appendTo("body").wrap("
").css({position:"absolute",visibility:"visible",left:-s*v,top:-r*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(m?u*v:0),top:l+(m?c*y:0),opacity:m?0:1}).animate({left:a+(m?0:u*v),top:l+(m?0:c*y),opacity:m?1:0},e.duration||500,e.easing,i)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("fade","toggle",function(e,n){var i="show"===e.mode;t(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("fold","hide",function(e,n){var i=t(this),o=e.mode,r="show"===o,s="hide"===o,a=e.size||15,l=/([0-9]+)%/.exec(a),u=!!e.horizFirst,c=u?["right","bottom"]:["bottom","right"],d=e.duration/2,f=t.effects.createPlaceholder(i),h=i.cssClip(),p={clip:t.extend({},h)},m={clip:t.extend({},h)},g=[h[c[0]],h[c[1]]],v=i.queue().length;l&&(a=parseInt(l[1],10)/100*g[s?0:1]),p.clip[c[0]]=a,m.clip[c[0]]=a,m.clip[c[1]]=0,r&&(i.cssClip(m.clip),f&&f.css(t.effects.clipToBox(m)),m.clip=h),i.queue(function(n){f&&f.animate(t.effects.clipToBox(p),d,e.easing).animate(t.effects.clipToBox(m),d,e.easing),n()}).animate(p,d,e.easing).animate(m,d,e.easing).queue(n),t.effects.unshift(i,v,4)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("highlight","show",function(e,n){var i=t(this),o={backgroundColor:i.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("size",function(e,n){var i,o,r,s=t(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,d="effect"!==c,f=e.scale||"both",h=e.origin||["middle","center"],p=s.css("position"),m=s.position(),g=t.effects.scaledDimensions(s),v=e.from||g,y=e.to||t.effects.scaledDimensions(s,0);t.effects.createPlaceholder(s),"show"===c&&(r=v,v=y,y=r),o={from:{y:v.height/g.height,x:v.width/g.width},to:{y:y.height/g.height,x:y.width/g.width}},("box"===f||"both"===f)&&(o.from.y!==o.to.y&&(v=t.effects.setTransition(s,l,o.from.y,v),y=t.effects.setTransition(s,l,o.to.y,y)),o.from.x!==o.to.x&&(v=t.effects.setTransition(s,u,o.from.x,v),y=t.effects.setTransition(s,u,o.to.x,y))),("content"===f||"both"===f)&&o.from.y!==o.to.y&&(v=t.effects.setTransition(s,a,o.from.y,v),y=t.effects.setTransition(s,a,o.to.y,y)),h&&(i=t.effects.getBaseline(h,g),v.top=(g.outerHeight-v.outerHeight)*i.y+m.top,v.left=(g.outerWidth-v.outerWidth)*i.x+m.left,y.top=(g.outerHeight-y.outerHeight)*i.y+m.top,y.left=(g.outerWidth-y.outerWidth)*i.x+m.left),s.css(v),("content"===f||"both"===f)&&(l=l.concat(["marginTop","marginBottom"]).concat(a),u=u.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var n=t(this),i=t.effects.scaledDimensions(n),r={height:i.height*o.from.y,width:i.width*o.from.x,outerHeight:i.outerHeight*o.from.y,outerWidth:i.outerWidth*o.from.x},s={height:i.height*o.to.y,width:i.width*o.to.x,outerHeight:i.height*o.to.y,outerWidth:i.width*o.to.x};o.from.y!==o.to.y&&(r=t.effects.setTransition(n,l,o.from.y,r),s=t.effects.setTransition(n,l,o.to.y,s)),o.from.x!==o.to.x&&(r=t.effects.setTransition(n,u,o.from.x,r),s=t.effects.setTransition(n,u,o.to.x,s)),d&&t.effects.saveStyle(n),n.css(r),n.animate(s,e.duration,e.easing,function(){d&&t.effects.restoreStyle(n)})})),s.animate(y,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=s.offset();0===y.opacity&&s.css("opacity",v.opacity),d||(s.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(s)),n()}})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-size"],t):t(jQuery)}(function(t){return t.effects.define("scale",function(e,n){var i=t(this),o=e.mode,r=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==o?0:100),s=t.extend(!0,{from:t.effects.scaledDimensions(i),to:t.effects.scaledDimensions(i,r,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(s.from.opacity=1,s.to.opacity=0),t.effects.effect.size.call(this,s,n)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect","./effect-scale"],t):t(jQuery)}(function(t){return t.effects.define("puff","hide",function(e,n){var i=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,i,n)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("pulsate","show",function(e,n){var i=t(this),o=e.mode,r="show"===o,s="hide"===o,a=r||s,l=2*(e.times||5)+(a?1:0),u=e.duration/l,c=0,d=1,f=i.queue().length;for((r||!i.is(":visible"))&&(i.css("opacity",0).show(),c=1);l>d;d++)i.animate({opacity:c},u,e.easing),c=1-c;i.animate({opacity:c},u,e.easing),i.queue(n),t.effects.unshift(i,f,l+1)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("shake",function(e,n){var i=1,o=t(this),r=e.direction||"left",s=e.distance||20,a=e.times||3,l=2*a+1,u=Math.round(e.duration/l),c="up"===r||"down"===r?"top":"left",d="up"===r||"left"===r,f={},h={},p={},m=o.queue().length;for(t.effects.createPlaceholder(o),f[c]=(d?"-=":"+=")+s,h[c]=(d?"+=":"-=")+2*s,p[c]=(d?"-=":"+=")+2*s,o.animate(f,u,e.easing);a>i;i++)o.animate(h,u,e.easing).animate(p,u,e.easing);o.animate(h,u,e.easing).animate(f,u/2,e.easing).queue(n),t.effects.unshift(o,m,l+1)})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){return t.effects.define("slide","show",function(e,n){var i,o,r=t(this),s={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,d=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0),f={};t.effects.createPlaceholder(r),i=r.cssClip(),o=r.position()[u],f[u]=(c?-1:1)*d+o,f.clip=r.cssClip(),f.clip[s[l][1]]=f.clip[s[l][0]],"show"===a&&(r.cssClip(f.clip),r.css(u,f[u]),f.clip=i,f[u]=o),r.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:n})})}),function(t){"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)}(function(t){var e;return t.uiBackCompat!==!1&&(e=t.effects.define("transfer",function(e,n){t(this).transfer(e,n)})),e}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return function(){function e(t,e,n){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var o,r=Math.max,s=Math.abs,a=/left|center|right/,l=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,d=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,n,i=t("
"),r=i.children()[0];return t("body").append(i),e=r.offsetWidth,i.css("overflow","scroll"),n=r.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),o=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===n||"auto"===n&&e.width
n?"left":e>0?"right":"center",vertical:0>a?"top":i>0?"bottom":"middle"};u>h&&h>s(e+n)&&(d.horizontal="center"),c>p&&p>s(i+a)&&(d.vertical="middle"),d.important=r(s(e),s(n))>r(s(i),s(a))?"horizontal":"vertical",o.using.call(this,t,d)}),l.offset(t.extend(T,{using:a}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,o=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,a=t.left-e.collisionPosition.marginLeft,l=o-a,u=a+e.collisionWidth-s-o;e.collisionWidth>s?l>0&&0>=u?(n=t.left+l+e.collisionWidth-s-o,t.left+=l-n):t.left=u>0&&0>=l?o:l>u?o+s-e.collisionWidth:o:l>0?t.left+=l:u>0?t.left-=u:t.left=r(t.left-a,t.left)},top:function(t,e){var n,i=e.within,o=i.isWindow?i.scrollTop:i.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=o-a,u=a+e.collisionHeight-s-o;e.collisionHeight>s?l>0&&0>=u?(n=t.top+l+e.collisionHeight-s-o,t.top+=l-n):t.top=u>0&&0>=l?o:l>u?o+s-e.collisionHeight:o:l>0?t.top+=l:u>0?t.top-=u:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var n,i,o=e.within,r=o.offset.left+o.scrollLeft,a=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,d=u+e.collisionWidth-a-l,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,h="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];0>c?(n=t.left+f+h+p+e.collisionWidth-a-r,(0>n||s(c)>n)&&(t.left+=f+h+p)):d>0&&(i=t.left-e.collisionPosition.marginLeft+f+h+p-l,(i>0||d>s(i))&&(t.left+=f+h+p))},top:function(t,e){var n,i,o=e.within,r=o.offset.top+o.scrollTop,a=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,d=u+e.collisionHeight-a-l,f="top"===e.my[1],h=f?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(i=t.top+h+p+m+e.collisionHeight-a-r,(0>i||s(c)>i)&&(t.top+=h+p+m)):d>0&&(n=t.top-e.collisionPosition.marginTop+h+p+m-l,(n>0||d>s(n))&&(t.top+=h+p+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(n){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e}}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){return t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}})}),function(t){"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}(function(t){var e=0,n=Array.prototype.slice;return t.cleanData=function(e){return function(n){var i,o,r;for(r=0;null!=(o=n[r]);r++)try{i=t._data(o,"events"),i&&i.remove&&t(o).triggerHandler("remove")}catch(s){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var o,r,s,a={},l=e.split(".")[0];e=e.split(".")[1];var u=l+"-"+e;return i||(i=n,n=t.Widget),t.isArray(i)&&(i=t.extend.apply(null,[{}].concat(i))),t.expr[":"][u.toLowerCase()]=function(e){return!!t.data(e,u)},t[l]=t[l]||{},o=t[l][e],r=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new r(t,e)},t.extend(r,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),s=new n,s.options=t.widget.extend({},s.options),t.each(i,function(e,i){return t.isFunction(i)?(a[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function o(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,r=this._superApply;return this._super=t,this._superApply=o,e=i.apply(this,arguments),this._super=n,this._superApply=r,e}}(),void 0):(a[e]=i,void 0)}),r.prototype=t.widget.extend(s,{widgetEventPrefix:o?s.widgetEventPrefix||e:e},a,{constructor:r,namespace:l,widgetName:e,widgetFullName:u}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete o._childConstructors):n._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,o,r=n.call(arguments,1),s=0,a=r.length;a>s;s++)for(i in r[s])o=r[s][i],r[s].hasOwnProperty(i)&&void 0!==o&&(e[i]=t.isPlainObject(o)?t.isPlainObject(e[i])?t.widget.extend({},e[i],o):t.widget.extend({},o):o);
return e},t.widget.bridge=function(e,i){var o=i.prototype.widgetFullName||e;t.fn[e]=function(r){var s="string"==typeof r,a=n.call(arguments,1),l=this;return s?this.length||"instance"!==r?this.each(function(){var n,i=t.data(this,o);return"instance"===r?(l=i,!1):i?t.isFunction(i[r])&&"_"!==r.charAt(0)?(n=i[r].apply(i,a),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+r+"'")}):l=void 0:(a.length&&(r=t.widget.extend.apply(null,[r].concat(a))),this.each(function(){var e=t.data(this,o);e?(e.option(r||{}),e._init&&e._init()):t.data(this,o,new i(r,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,n){e._removeClass(n,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,o,r,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(o=s[e]=t.widget.extend({},this.options[e]),r=0;i.length-1>r;r++)o[i[r]]=o[i[r]]||{},o=o[i[r]];if(e=i.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=n}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,i,o;for(n in e)o=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&o&&o.length&&(i=t(o.get()),this._removeClass(o,n),i.addClass(this._classes({element:i,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function n(n,r){var s,a;for(a=0;n.length>a;a++)s=o.classesElementLookup[n[a]]||t(),s=e.add?t(t.unique(s.get().concat(e.element.get()))):t(s.not(e.element).get()),o.classesElementLookup[n[a]]=s,i.push(n[a]),r&&e.classes[n[a]]&&i.push(e.classes[n[a]])}var i=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&n(e.keys.match(/\S+/g)||[],!0),e.extra&&n(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,function(i,o){-1!==t.inArray(e.target,o)&&(n.classesElementLookup[i]=t(o.not(e.target).get()))})},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,i){i="boolean"==typeof i?i:n;var o="string"==typeof t||null===t,r={extra:o?e:n,keys:o?t:e,element:o?this.element:t,add:i};return r.element.toggleClass(this._classes(r),i),this},_on:function(e,n,i){var o,r=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=o=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),t.each(i,function(i,s){function a(){return e||r.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?r[s]:s).apply(r,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?o.on(u,c,a):n.on(u,a)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,i){var o,r,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(o in r)o in n||(n[o]=r[o]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?o===!0||"number"==typeof o?n:o.effect||n:e;o=o||{},"number"==typeof o&&(o={duration:o}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&i.delay(o.delay),s&&t.effects&&t.effects.effect[a]?i[e](o):a!==e&&i[a]?i[a](o.duration,o.easing,r):i.queue(function(n){t(this)[e](),r&&r.call(i[0]),n()})}}),t.widget}),function(t){"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../safe-active-element","../unique-id","../version","../widget"],t):t(jQuery)}(function(t){return t.widget("ui.menu",{version:"1.12.1",defaultElement:"
",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target),i=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.target).closest(".ui-menu-item"),i=t(e.currentTarget);n[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){var n=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));n&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),n=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),n.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var n,i,o,r,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,i=this.previousFilter||"",r=!1,o=e.keyCode>=96&&105>=e.keyCode?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),o===i?r=!0:o=i+o,n=this._filterMenuItems(o),n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),n=this._filterMenuItems(o)),n.length?(this.focus(e,n),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,n,i,o,r,s=this,a=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev(),i=t("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+a),n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),o=n.not(".ui-menu-item, .ui-menu-divider"),r=o.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(o,"ui-menu-item")._addClass(r,"ui-menu-item-wrapper"),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var n,i,o;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,o,r,s,a;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-n-i,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),0>o?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=i},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,o;return this.active?(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),0>n.offset().top-i-o}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var n,i,o;return this.active?(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+o>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r||!s&&this._isContentEditable(this.element),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,i=!0,n=!0,void 0;e=!1,i=!1,n=!1;var r=t.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:e=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case r.UP:e=!0,this._keyEvent("previous",o);break;case r.DOWN:e=!0,this._keyEvent("next",o);break;case r.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(i){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault(),void 0;if(!n){var o=t.ui.keyCode;switch(i.keyCode){case o.PAGE_UP:this._move("previousPage",i);break;case o.PAGE_DOWN:this._move("nextPage",i);break;case o.UP:this._keyEvent("previous",i);break;case o.DOWN:this._keyEvent("next",i)}}},input:function(t){return i?(i=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,n){var i,o;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(o=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),i=n.item.attr("aria-label")||o.value,i&&t.trim(i).length&&(this.liveRegion.children().hide(),t("").text(i).appendTo(this.liveRegion)),void 0)},menuselect:function(e,n){var i=n.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay(function(){this.previous=o,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=t("
",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var n=this.menu.element[0];return e.target===this.element[0]||e.target===n||t.contains(n,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,i=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,i){i(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,o){i.xhr&&i.xhr.abort(),i.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),i=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!n&&!i)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length
").append(t("").text(n.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
").text(n).appendTo(this.liveRegion))}}),t.ui.autocomplete}),function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",CSRFProtection:function(e){var n=t('meta[name="csrf-token"]').attr("content");n&&e.setRequestHeader("X-CSRF-Token",n)},refreshCSRFTokens:function(){var e=t("meta[name=csrf-token]").attr("content"),n=t("meta[name=csrf-param]").attr("content");t('form input[name="'+n+'"]').val(e)},fire:function(e,n,i){var o=t.Event(n);return e.trigger(o,i),o.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},handleRemote:function(i){var o,r,s,a,l,u;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){o=i.attr("method"),r=i.attr("action"),s=i.serializeArray();var c=i.data("ujs:submit-button");c&&(s.push(c),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(o=i.data("method"),r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(o=i.data("method")||"get",r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(o=i.data("method"),r=n.href(i),s=i.data("params")||null);return u={type:o||"GET",data:s,dataType:l,beforeSend:function(t,o){return o.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),n.fire(i,"ajax:beforeSend",[t,o])?(i.trigger("ajax:send",t),void 0):!1},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(r)},a&&(u.xhrFields={withCredentials:a}),r&&(u.url=r),n.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var o=n.href(i),r=i.data("method"),s=i.attr("target"),a=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),u=t('
'),c='
';l===e||a===e||n.isCrossDomain(o)||(c+='
'),s&&u.attr("target",s),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),t.data("ujs:enable-with",t[n]()),i!==e&&t[n](i),t.prop("disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[e](t.data("ujs:enable-with")),t.prop("disabled",!1)},allowAction:function(t){var e,i=t.data("confirm"),o=!1;return i?(n.fire(t,"confirm")&&(o=n.confirm(i),e=n.fire(t,"confirm:complete",[o])),o&&e):!0},blankInputs:function(e,n,i){var o,r,s=t(),a=n||"input,textarea",l=e.find(a);return l.each(function(){if(o=t(this),r=o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):o.val(),!r==!i){if(o.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+o.attr("name")+'"]').length)return!0;s=s.add(o)}}),s.length?s:!1},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");t.data("ujs:enable-with",t.html()),i!==e&&t.html(i),t.bind("click.railsDisable",function(t){return n.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(t(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(t(this))}),i.delegate(n.linkClickSelector,"click.rails",function(i){var o=t(this),r=o.data("method"),s=o.data("params"),a=i.metaKey||i.ctrlKey;if(!n.allowAction(o))return n.stopEverything(i);if(!a&&o.is(n.linkDisableSelector)&&n.disableElement(o),o.data("remote")!==e){if(a&&(!r||"GET"===r)&&!s)return!0;var l=n.handleRemote(o);return l===!1?n.enableElement(o):l.error(function(){n.enableElement(o)}),!1}return o.data("method")?(n.handleMethod(o),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var o=n.handleRemote(i);return o===!1?n.enableFormElement(i):o.error(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(e){var i=t(this);return n.allowAction(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var o,r,s=t(this),a=s.data("remote")!==e;if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")==e&&(o=n.blankInputs(s,n.requiredInputSelector),o&&n.fire(s,"ajax:aborted:required",[o])))return n.stopEverything(i);if(a){if(r=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[r]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var o=i.attr("name"),r=o?{name:o,value:i.val()}:null;i.closest("form").data("ujs:submit-button",r)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(e){this==e.target&&n.disableFormElements(t(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.5",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>o?"top":!1;
if("bottom"==this.affixed)return null!=n?o+this.unpin<=r.top?!1:"bottom":t-i>=o+s?!1:"bottom";var a=null==this.affixed,l=a?o:r.top,u=a?s:e;return null!=n&&n>=o?"top":null!=i&&l+u>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),jQuery.fn.bullseye=function(t,e){function n(t){return t.data(r)}function i(t){t.data(r,!0)}function o(t){t.data(r,!1)}t=jQuery.extend({offsetTop:0,offsetHeight:0,extendDown:!1},t);var r="is-focused";return this.each(function(){var r=$(this),s=$(null==e?window:e),a=function(){var e=(r.outerWidth(),r.outerHeight()+t.offsetHeight),a=(s.width(),s.height()),l=s.scrollTop(),u=l+a,c=r.offset().top+t.offsetTop,d=c+e,f=function(){n(r)||(i(r),r.trigger("enterviewport"))},h=function(){n(r)&&(o(r),r.trigger("leaveviewport"))};c>u||(t.extendDown?!1:l>d)?h():f()};s.scroll(a).resize(a),a()})},function(t,e){t.fn.captionjs=function(n){var i={class_name:"captionjs",schema:!0,mode:"default",debug_mode:!1,force_dimensions:!0,is_responsive:!1,inherit_styles:!1},o=t.extend(i,n||{}),r=function(t,e,n,i){n.jquery&&i.jquery&&(n.css(t,i.css(t)),i.css(t,e))};return this.each(function(){o.debug_mode&&console.debug("caption.js | Starting.");var n,i,s=t(this),a=s.data("caption")?s.data("caption"):s.attr("alt"),l=s.data("float")?"float-"+s.data("float"):"",u=s.data("centered")?"centered":"",c=s.wrap('
').after("
").parent(),d=s.next("figcaption").html(a);if(s.data("link")?d.wrapInner('
').children("a").css("padding","0").css("margin","0"):null,"hide"===o.mode&&(o.mode="hidden"),""===a&&d.remove(),o.debug_mode&&console.debug("caption.js | Caption: "+a),o.force_dimensions){o.debug_mode&&console.debug("caption.js | Forcing dimensions with a clone.");var f=c.clone().css({position:"absolute",left:"-9999px"}).appendTo("body");n=t("img",f).outerWidth(),i=t("figcaption",f).css("width",n).css("clear","both").outerHeight(),f.remove()}else n=s.outerWidth(),i=d.outerHeight();o.is_responsive&&(n="100%",s.width(n)),o.inherit_styles&&("inline"==s.css("display")?c.css("display","inline-block"):r("display","block",c,s),"static"==s.css("position")?c.css("position","relative"):r("position","relative",c,s),r("clear","both",c,s),r("float","none",c,s),r("margin","0",c,s),s.css("padding","0"),r("left","auto",c,s),r("right","auto",c,s),r("top","auto",c,s),r("bottom","auto",c,s),r("z-index",s.css("z-index"),c,s)),c.width(n),o.schema&&(c.attr({itemscope:"itemscope",itemtype:"http://schema.org/Photograph"}),d.attr("itemprop","name"),s.attr("itemprop","image")),"stacked"===o.mode&&d.css({"margin-bottom":"0",bottom:"0"}),"animated"===o.mode&&d.css({"margin-bottom":"0",bottom:-i}),"hidden"===o.mode&&d.css({"margin-bottom":i,bottom:-i}),o.is_responsive&&t(e).resize(function(){i=d.outerHeight(),"animated"===o.mode&&d.css({bottom:-i}),"hidden"===o.mode&&d.css({"margin-bottom":i,bottom:-i})})})}}(jQuery,window),function(t,e,n){function i(n,i,o){var r=e.createElement(n);return i&&(r.id=Z+i),o&&(r.style.cssText=o),t(r)}function o(){return n.innerHeight?n.innerHeight:t(n).height()}function r(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var i;return void 0===this.cache[e]&&(i=t(this.el).attr("data-cbox-"+e),void 0!==i?this.cache[e]=i:void 0!==n[e]?this.cache[e]=n[e]:void 0!==K[e]&&(this.cache[e]=K[e])),this.cache[e]},this.get=function(e){var n=this.value(e);return t.isFunction(n)?n.call(this.el,this):n}}function s(t){var e=E.length,n=(z+t)%e;return 0>n?e+n:n}function a(t,e){return Math.round((/%/.test(t)?("x"===e?$.width():o())/100:1)*parseInt(t,10))}function l(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function u(t,e){return t.get("retinaUrl")&&n.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function c(t){"contains"in b[0]&&!b[0].contains(t.target)&&t.target!==y[0]&&(t.stopPropagation(),b.focus())}function d(t){d.str!==t&&(b.add(y).removeClass(d.str).addClass(t),d.str=t)}function f(e){z=0,e&&e!==!1&&"nofollow"!==e?(E=t("."+te).filter(function(){var n=t.data(this,J),i=new r(this,n);return i.get("rel")===e}),z=E.index(q.el),-1===z&&(E=E.add(q.el),z=E.length-1)):E=t(q.el)}function h(n){t(e).trigger(n),ae.triggerHandler(n)}function p(n){var o;if(!G){if(o=t(n).data(J),q=new r(n,o),f(q.get("rel")),!U){U=Q=!0,d(q.get("className")),b.css({visibility:"hidden",display:"block",opacity:""}),S=i(le,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),w.css({width:"",height:""}).append(S),M=k.height()+T.height()+w.outerHeight(!0)-w.height(),F=C.width()+_.width()+w.outerWidth(!0)-w.width(),W=S.outerHeight(!0),R=S.outerWidth(!0);var s=a(q.get("initialWidth"),"x"),l=a(q.get("initialHeight"),"y"),u=q.get("maxWidth"),p=q.get("maxHeight");q.w=Math.max((u!==!1?Math.min(s,a(u,"x")):s)-R-F,0),q.h=Math.max((p!==!1?Math.min(l,a(p,"y")):l)-W-M,0),S.css({width:"",height:q.h}),X.position(),h(ee),q.get("onOpen"),O.add(A).hide(),b.focus(),q.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",c,!0),ae.one(re,function(){e.removeEventListener("focus",c,!0)})),q.get("returnFocus")&&ae.one(re,function(){t(q.el).focus()})}var m=parseFloat(q.get("opacity"));y.css({opacity:m===m?m:"",cursor:q.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),q.get("closeButton")?H.html(q.get("close")).appendTo(w):H.appendTo("
"),v()}}function m(){b||(Y=!1,$=t(n),b=i(le).attr({id:J,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),y=i(le,"Overlay").hide(),I=t([i(le,"LoadingOverlay")[0],i(le,"LoadingGraphic")[0]]),x=i(le,"Wrapper"),arrow_title='
PROTIP : Press the ← and → keys to navigate the gallery.',w=i(le,"Content").append(A=i(le,"Title"),L=i(le,"Current"),D=t('
').attr({id:Z+"Previous",title:arrow_title}),P=t('
').attr({id:Z+"Next",title:arrow_title}),j=t('
').attr({id:Z+"Slideshow"}),I),close_title='
PROTIP : Press the escape key on your keyboard or click outside of the viewing area with your mouse to close the colorbox.',H=t('
').attr({id:Z+"Close",title:close_title}),x.append(i(le).append(i(le,"TopLeft"),k=i(le,"TopCenter"),i(le,"TopRight")),i(le,!1,"clear:left").append(C=i(le,"MiddleLeft"),w,_=i(le,"MiddleRight")),i(le,!1,"clear:left").append(i(le,"BottomLeft"),T=i(le,"BottomCenter"),i(le,"BottomRight"))).find("div div").css({"float":"left"}),N=i(le,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=P.add(D).add(L).add(j)),e.body&&!b.parent().length&&t(e.body).append(y,b.append(x,N))}function g(){function n(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),p(this))}return b?(Y||(Y=!0,P.click(function(){X.next()}),D.click(function(){X.prev()}),H.click(function(){X.close()}),y.click(function(){q.get("overlayClose")&&X.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&q.get("escKey")&&27===e&&(t.preventDefault(),X.close()),U&&q.get("arrowKey")&&E[1]&&!t.altKey&&(37===e?(t.preventDefault(),D.click()):39===e&&(t.preventDefault(),P.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,n):t("."+te).live("click."+Z,n)),!0):!1}function v(){var e,o,r,s=X.prep,c=++ue;if(Q=!0,B=!1,h(se),h(ne),q.get("onLoad"),q.h=q.get("height")?a(q.get("height"),"y")-W-M:q.get("innerHeight")&&a(q.get("innerHeight"),"y"),q.w=q.get("width")?a(q.get("width"),"x")-R-F:q.get("innerWidth")&&a(q.get("innerWidth"),"x"),q.mw=q.w,q.mh=q.h,q.get("maxWidth")&&(q.mw=a(q.get("maxWidth"),"x")-R-F,q.mw=q.w&&q.w
").hide().insertBefore(d),ae.one(se,function(){r.replaceWith(d)}),s(d)}else q.get("iframe")?s(" "):q.get("html")?s(q.get("html")):l(q,e)?(e=u(q,e),B=q.get("createImg"),t(B).addClass(Z+"Photo").bind("error."+Z,function(){s(i(le,"Error").html(q.get("imgError")))}).one("load",function(){c===ue&&setTimeout(function(){var e;q.get("retinaImage")&&n.devicePixelRatio>1&&(B.height=B.height/n.devicePixelRatio,B.width=B.width/n.devicePixelRatio),q.get("scalePhotos")&&(o=function(){B.height-=B.height*e,B.width-=B.width*e},q.mw&&B.width>q.mw&&(e=(B.width-q.mw)/B.width,o()),q.mh&&B.height>q.mh&&(e=(B.height-q.mh)/B.height,o())),q.h&&(B.style.marginTop=Math.max(q.mh-B.height,0)/2+"px"),E[1]&&(q.get("loop")||E[z+1])&&(B.style.cursor="pointer",t(B).bind("click."+Z,function(){X.next()})),B.style.width=B.width+"px",B.style.height=B.height+"px",s(B)},1)}),B.src=e):e&&N.load(e,q.get("data"),function(e,n){c===ue&&s("error"===n?i(le,"Error").html(q.get("xhrError")):t(this).contents())})}var y,b,x,w,k,C,_,T,E,$,S,N,I,A,L,j,P,D,H,O,q,M,F,W,R,z,B,U,Q,G,V,X,Y,K={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,n=t(this).data("cbox-img-attrs");return"object"==typeof n&&t.each(n,function(t,n){e[t]=n}),e},createIframe:function(){var n=e.createElement("iframe"),i=t(this).data("cbox-iframe-attrs");return"object"==typeof i&&t.each(i,function(t,e){n[t]=e}),"frameBorder"in n&&(n.frameBorder=0),"allowTransparency"in n&&(n.allowTransparency="true"),n.name=(new Date).getTime(),n.allowFullscreen=!0,n}},J="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ne=Z+"_load",ie=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",se=Z+"_purge",ae=t(" "),le="div",ue=0,ce={},de=function(){function t(){clearTimeout(s)}function e(){(q.get("loop")||E[z+1])&&(t(),s=setTimeout(X.next,q.get("slideshowSpeed")))}function n(){j.html(q.get("slideshowStop")).unbind(l).one(l,i),ae.bind(ie,e).bind(ne,t),b.removeClass(a+"off").addClass(a+"on")}function i(){t(),ae.unbind(ie,e).unbind(ne,t),j.html(q.get("slideshowStart")).unbind(l).one(l,function(){X.next(),n()}),b.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,j.hide(),t(),ae.unbind(ie,e).unbind(ne,t),b.removeClass(a+"off "+a+"on")}var r,s,a=Z+"Slideshow_",l="click."+Z;return function(){r?q.get("slideshow")||(ae.unbind(oe,o),o()):q.get("slideshow")&&E[1]&&(r=!0,ae.one(oe,o),q.get("slideshowAuto")?n():i(),j.show())}}();t[J]||(t(m),X=t.fn[J]=t[J]=function(e,n){var i,o=this;return e=e||{},t.isFunction(o)&&(o=t(" "),e.open=!0),o[0]?(m(),g()&&(n&&(e.onComplete=n),o.each(function(){var n=t.data(this,J)||{};t.data(this,J,t.extend(n,e))}).addClass(te),i=new r(o[0],e),i.get("open")&&p(o[0])),o):o},X.position=function(e,n){function i(){k[0].style.width=T[0].style.width=w[0].style.width=parseInt(b[0].style.width,10)-F+"px",w[0].style.height=C[0].style.height=_[0].style.height=parseInt(b[0].style.height,10)-M+"px"}var r,s,l,u=0,c=0,d=b.offset();if($.unbind("resize."+Z),b.css({top:-9e4,left:-9e4}),s=$.scrollTop(),l=$.scrollLeft(),q.get("fixed")?(d.top-=s,d.left-=l,b.css({position:"fixed"})):(u=s,c=l,b.css({position:"absolute"})),c+=q.get("right")!==!1?Math.max($.width()-q.w-R-F-a(q.get("right"),"x"),0):q.get("left")!==!1?a(q.get("left"),"x"):Math.round(Math.max($.width()-q.w-R-F,0)/2),u+=q.get("bottom")!==!1?Math.max(o()-q.h-W-M-a(q.get("bottom"),"y"),0):q.get("top")!==!1?a(q.get("top"),"y"):Math.round(Math.max(o()-q.h-W-M,0)/2),b.css({top:d.top,left:d.left,visibility:"visible"}),x[0].style.width=x[0].style.height="9999px",r={width:q.w+R+F,height:q.h+W+M,top:u,left:c},e){var f=0;t.each(r,function(t){return r[t]!==ce[t]?(f=e,void 0):void 0}),e=f}ce=r,e||b.css(r),b.dequeue().animate(r,{duration:e||0,complete:function(){i(),Q=!1,x[0].style.width=q.w+R+F+"px",x[0].style.height=q.h+W+M+"px",q.get("reposition")&&setTimeout(function(){$.bind("resize."+Z,X.position)},1),t.isFunction(n)&&n()},step:i})},X.resize=function(t){var e;U&&(t=t||{},t.width&&(q.w=a(t.width,"x")-R-F),t.innerWidth&&(q.w=a(t.innerWidth,"x")),S.css({width:q.w}),t.height&&(q.h=a(t.height,"y")-W-M),t.innerHeight&&(q.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=S.scrollTop(),S.css({height:"auto"}),q.h=S.height()),S.css({height:q.h}),e&&S.scrollTop(e),X.position("none"===q.get("transition")?0:q.get("speed")))},X.prep=function(n){function o(){return q.w=q.w||S.width(),q.w=q.mw&&q.mw1?("string"==typeof q.get("current")&&L.html(q.get("current").replace("{current}",z+1).replace("{total}",a)).show(),P[q.get("loop")||a-1>z?"show":"hide"]().html(q.get("next")),D[q.get("loop")||z?"show":"hide"]().html(q.get("previous")),de(),q.get("preloading")&&t.each([s(-1),s(1)],function(){var n,i=E[this],o=new r(i,t.data(i,J)),s=o.get("href");s&&l(o,s)&&(s=u(o,s),n=e.createElement("img"),n.src=s)})):O.hide(),q.get("iframe")?(i=q.get("createIframe"),q.get("scrolling")||(i.scrolling="no"),t(i).attr({src:q.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(S),ae.one(se,function(){i.src="//about:blank"}),q.get("fastIframe")&&t(i).trigger("load")):o(),"fade"===q.get("transition")?b.fadeTo(f,1,n):n())},"fade"===q.get("transition")?b.fadeTo(f,0,function(){X.position(0,c)}):X.position(f,c)}},X.next=function(){!Q&&E[1]&&(q.get("loop")||E[z+1])&&(z=s(1),p(E[z]))},X.prev=function(){!Q&&E[1]&&(q.get("loop")||z)&&(z=s(-1),p(E[z]))},X.close=function(){U&&!G&&(G=!0,U=!1,h(oe),q.get("onCleanup"),$.unbind("."+Z),y.fadeTo(q.get("fadeOut")||0,0),b.stop().fadeTo(q.get("fadeOut")||0,0,function(){b.hide(),y.hide(),h(se),S.remove(),setTimeout(function(){G=!1,h(re),q.get("onClosed")},1)}))},X.remove=function(){b&&(b.stop(),t[J].close(),b.stop(!1,!0).remove(),y.remove(),G=!1,b=null,t("."+te).removeData(J).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},X.element=function(){return t(q.el)},X.settings=K)}(jQuery,document,window),function(t){var e=[];t.fn.floatingFixed=function(n){n=t.extend({},t.floatingFixed.defaults,n);var o=t(this).each(function(){var i=t(this),o=i.position();o.position=i.css("position"),i.data("floatingFixedOrig",o),i.data("floatingFixedOptions",n),e.push(i)});return i(),o},t.floatingFixed=t.fn.floatingFixed,t.floatingFixed.defaults={padding:0};var n=t(window),i=function(){if(0!==e.length)for(var t=n.scrollTop(),i=0;e.length>i;i++){var o=e[i],r=o.data("floatingFixedOptions");if(!o.data("isFloating")){var s=o.offset();o.data("floatingFixedTop",s.top),o.data("floatingFixedLeft",s.left)}var a=a=o.data("floatingFixedTop");if(t+r.padding>a&&!o.data("isFloating"))o.css({position:"fixed",top:r.padding,left:o.data("floatingFixedLeft"),width:o.width()}).data("isFloating",!0);else if(a>=t+r.padding&&o.data("isFloating")){var l=o.data("floatingFixedOrig");o.css(l).data("isFloating",!1)}}};n.scroll(i).resize(i)}(jQuery),$(function(){$("body").on("click",".ui-autocomplete a",function(t){t.preventDefault()})}),function(t){t.Indextank||(t.Indextank=new Object),t.Indextank.Ize=function(e,n,i,o){var r=this;r.$el=t(e),r.el=e;var s=/http(s)?:\/\/[a-z0-9]+.api.searchify.com/;if(!s.test(n))throw"invalid api url!";if(void 0==i)throw"index name is not defined!";r.$el.data("Indextank.Ize",r),r.init=function(){r.apiurl=n,r.indexName=i,r.options=t.extend({},t.Indextank.Ize.defaultOptions,o)},r.init()},t.Indextank.Ize.defaultOptions={},t.fn.indextank_Ize=function(e,n,i){return this.each(function(){new t.Indextank.Ize(this,e,n,i)})},t.fn.getIndextank_Ize=function(){this.data("Indextank.Ize")}}(jQuery),function(t){t.Indextank||(t.Indextank=new Object),t.Indextank.InstantLinks=function(e,n){var i=this;i.$el=t(e),i.el=e,i.$el.data("Indextank.InstantLinks",i),i.options=t.extend({},t.Indextank.InstantLinks.defaultOptions,n),i.init=function(){var e=t(i.el.form).data("Indextank.Ize");i.$el.autocomplete({select:function(e,n){switch(i.options.type){case"parent-entry":t(this).parent().find(".hidden-entry-select-id").val(n.item.__id);break;case"related-entries":if(id=n.item.__id,name=n.item.name,url=n.item.url,t("#related-entry-"+id).length>0){alert("'"+name+"' has already been added.");break}$entry=t("#sample-related-entry").clone(),$entry.attr("id","related-entry-"+id),$entry.children().find(":checkbox").val(id),$entry.children().find("a").text(name).attr("href",url),$entry.removeClass("hidden"),$entry.appendTo(t("#related-entries ul")).hide().fadeIn();break;default:text=t("#search_box").val(),gaTrackEvent("Search Suggestion Clicks",n.item.label,text),window.location.href=n.item[i.options.url]}},source:function(n,o){t.ajax({url:e.apiurl+"/v1/indexes/"+e.indexName+"/instantlinks",dataType:"jsonp",data:{query:n.term,field:i.options.name,fetch:i.options.fields,"function":10,len:10},success:function(e){var i=t.map(e.results,function(t){return t.queryTerm=n.term,t.value=t.name,t});o(i)}})},minLength:i.options.minLength,delay:i.options.delay}).data("ui-autocomplete")._renderItem=function(e,n){var o=t(" ").addClass("result").data("item",n);return o.append(i.options.format(n,i.options)),o.appendTo(e)}},i.init()},t.Indextank.InstantLinks.defaultOptions={name:"name",url:"url",thumbnail:"thumbnail",description:"description",fields:"name,url,thumbnail,description",minLength:2,delay:100,type:"default",format:function(e,n){function i(e,n){return rx=new RegExp(n,"ig"),bolds=t.map(e.match(rx)||[],function(t){return""+t+" "}),regulars=t(t.map(e.split(rx),function(e){return t(" ").addClass("regular").text(e).get(0)})),t.each(regulars,function(e,n){t(n).append(bolds[e]||"")})}var o=decodeURI(e[n.name]),r=i(o,e.queryTerm),s=t(" ").attr("href",e[n.url]);return e[n.thumbnail]&&(s.addClass("with-thumbnail"),s.append(t(" ").attr("src",e[n.thumbnail].replace("/original/","/tiny/")).attr({width:24,height:24}))),s.append(t(" ").addClass("name").append(r)),e[n.description]&&(s.addClass("with-description"),s.append(t(" ").addClass("description").text(e[n.description]))),s}},t.fn.indextank_InstantLinks=function(e){return this.each(function(){new t.Indextank.InstantLinks(this,e)})}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function n(n,r,a){function l(t,e,i){var o,r="$()."+n+'("'+e+'")';return t.each(function(t,l){var u=a.data(l,n);if(!u)return s(n+" not initialized. Cannot call methods, i.e. "+r),void 0;var c=u[e];if(!c||"_"==e.charAt(0))return s(r+" is not a valid method"),void 0;var d=c.apply(u,i);o=void 0===o?d:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return l(this,t,e)}return u(this,t),this},i(a))}function i(t){!t||t&&t.bridget||(t.bridget=n)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return i(e||t.jQuery),n}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{},i=n[t]=n[t]||{};return i[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],o=0;n.length>o;o++){var r=n[o],s=i&&i[r];s&&(this.off(t,r),delete i[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;e.length>n;n++){var i=e[n],o=i+"MatchesSelector";if(t[o])return o}}();return function(e,n){return e[t](n)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var n={};n.extend=function(t,e){for(var n in e)t[n]=e[n];return t},n.modulo=function(t,e){return(t%e+e)%e};var i=Array.prototype.slice;n.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?i.call(t):[t]},n.removeFrom=function(t,e){var n=t.indexOf(e);-1!=n&&t.splice(n,1)},n.getParent=function(t,n){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,n))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,i){t=n.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!i)return o.push(t),void 0;e(t,i)&&o.push(t);for(var n=t.querySelectorAll(i),r=0;n.length>r;r++)o.push(n[r])}}),o},n.debounceMethod=function(t,e,n){n=n||100;var i=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){i.apply(r,e),delete r[o]},n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,n){return e+"-"+n}).toLowerCase()};var o=t.console;return n.htmlInit=function(e,i){n.docReady(function(){var r=n.toDashed(i),s="data-"+r,a=document.querySelectorAll("["+s+"]"),l=document.querySelectorAll(".js-"+r),u=n.makeArray(a).concat(n.makeArray(l)),c=s+"-options",d=t.jQuery;u.forEach(function(t){var n,r=t.getAttribute(s)||t.getAttribute(c);try{n=r&&JSON.parse(r)}catch(a){return o&&o.error("Error parsing "+s+" on "+t.className+": "+a),void 0}var l=new e(t,n);d&&d.data(t,i,l)})})},n}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/core",["ev-emitter/ev-emitter","fizzy-ui-utils/utils"],function(n,i){return e(t,n,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,function(t,e,n){function i(t,e){var s=n.getQueryElement(t);if(!s)return console.error("Bad element for InfiniteScroll: "+(s||t)),void 0;if(t=s,t.infiniteScrollGUID){var a=r[t.infiniteScrollGUID];return a.option(e),a}this.element=t,this.options=n.extend({},i.defaults),this.option(e),o&&(this.$element=o(this.element)),this.create()}var o=t.jQuery,r={};i.defaults={},i.create={},i.destroy={};var s=i.prototype;n.extend(s,e.prototype);var a=0;s.create=function(){var t=this.guid=++a;this.element.infiniteScrollGUID=t,r[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath();var e=this.getPath&&this.getPath();if(!e)return console.error("Disabling InfiniteScroll"),void 0;this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(var n in i.create)i.create[n].call(this)},s.option=function(t){n.extend(this.options,t)},s.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},s.dispatchEvent=function(t,e,n){this.log(t,n);var i=e?[e].concat(n):n;if(this.emitEvent(t,i),o&&this.$element){t+=".infiniteScroll";var r=t;if(e){var s=o.Event(e);s.type=t,r=s}this.$element.trigger(r,n)}};var l={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,n){return n.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};s.log=function(t,e){if(this.options.debug){var n="[InfiniteScroll] "+t,i=l[t];i&&(n+=". "+i.apply(this,e)),console.log(n)}},s.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},s.updateScroller=function(){var e=this.options.elementScroll;if(!e)return this.scroller=t,void 0;if(this.scroller=e===!0?this.element:n.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e},s.updateGetPath=function(){var t=this.options.path;if(!t)return console.error("InfiniteScroll path option required. Set as: "+t),void 0;var e=typeof t;if("function"==e)return this.getPath=t,void 0;var n="string"==e&&t.match("{{#}}");return n?(this.updateGetPathTemplate(t),void 0):(this.updateGetPathSelector(t),void 0)},s.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),n=new RegExp(e),i=location.href.match(n);i&&(this.pageIndex=parseInt(i[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};var u=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*\?.*page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return s.updateGetPathSelector=function(t){var e=document.querySelector(t);if(!e)return console.error("Bad InfiniteScroll path option. Next link not found: "+t),void 0;for(var n,i,o=e.getAttribute("href"),r=0;o&&u.length>r;r++){i=u[r];var s=o.match(i);if(s){n=s.slice(1);break}}return n?(this.isPathSelector=!0,this.getPath=function(){var t=this.pageIndex+1;return n[0]+t+n[2]}.bind(this),this.pageIndex=parseInt(n[1],10)-1,this.log("pageIndex",[this.pageIndex,"next link"]),void 0):(console.error("InfiniteScroll unable to parse next link href: "+o),void 0)},s.updateGetAbsolutePath=function(){var t=this.getPath(),e=t.match(/^http/)||t.match(/^\//);if(e)return this.getAbsolutePath=this.getPath,void 0;var n=location.pathname,i=n.substring(0,n.lastIndexOf("/"));this.getAbsolutePath=function(){return i+"/"+this.getPath()}},i.create.hideNav=function(){var t=n.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},i.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},s.destroy=function(){this.allOff();for(var t in i.destroy)i.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete r[this.guid],o&&this.$element&&o.removeData(this.element,"infiniteScroll")},i.throttle=function(t,e){e=e||200;var n,i;return function(){var o=+new Date,r=arguments,s=function(){n=o,t.apply(this,r)}.bind(this);n&&n+e>o?(clearTimeout(i),i=setTimeout(s,e)):s()}},i.data=function(t){t=n.getQueryElement(t);var e=t&&t.infiniteScrollGUID;return e&&r[e]},i.setJQuery=function(t){o=t},n.htmlInit(i,"infinite-scroll"),s._init=function(){},o&&o.bridget&&o.bridget("infiniteScroll",i),i}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/page-load",["./core"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core")):e(t,t.InfiniteScroll)}(window,function(t,e){function n(t){for(var e=document.createDocumentFragment(),n=0;t&&t.length>n;n++)e.appendChild(t[n]);return e}function i(t){for(var e=t.querySelectorAll("script"),n=0;e.length>n;n++){var i=e[n],r=document.createElement("script");o(i,r),r.innerHTML=i.innerHTML,i.parentNode.replaceChild(r,i)}}function o(t,e){for(var n=t.attributes,i=0;n.length>i;i++){var o=n[i];e.setAttribute(o.name,o.value)}}function r(t,e,n,i){var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType=e||"",o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.onload=function(){if(200==o.status)n(o.response);else{var t=new Error(o.statusText);i(t)}},o.onerror=function(){var e=new Error("Network error requesting "+t);i(e)},o.send()}var s=e.prototype;return e.defaults.loadOnScroll=!0,e.defaults.checkLastPage=!0,e.defaults.responseType="document",e.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},s.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},s.loadNextPage=function(){if(!this.isLoading&&this.canLoad){var t=this.getAbsolutePath();this.isLoading=!0;var e=function(e){this.onPageLoad(e,t)}.bind(this),n=function(e){this.onPageError(e,t)}.bind(this);r(t,this.options.responseType,e,n),this.dispatchEvent("request",null,[t])}},s.onPageLoad=function(t,e){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e]),this.appendNextPage(t,e),t},s.appendNextPage=function(t,e){var i=this.options.append,o="document"==this.options.responseType;if(o&&i){var r=t.querySelectorAll(i),s=n(r),a=function(){this.appendItems(r,s),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,r])}.bind(this);this.options.outlayer?this.appendOutlayerItems(s,a):a()}},s.appendItems=function(t,e){t&&t.length&&(e=e||n(t),i(e),this.element.appendChild(e))},s.appendOutlayerItems=function(n,i){var o=e.imagesLoaded||t.imagesLoaded;return o?(o(n,i),void 0):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),this.isLoading=!1,void 0)},s.onAppendOutlayer=function(t,e,n){this.options.outlayer.appended(n)},s.checkLastPage=function(t,e){var n=this.options.checkLastPage;if(n){var i=this.options.path;if("function"==typeof i){var o=this.getPath();
if(!o)return this.lastPageReached(t,e),void 0}var r;if("string"==typeof n?r=n:this.isPathSelector&&(r=i),r&&t.querySelector){var s=t.querySelector(r);s||this.lastPageReached(t,e)}}},s.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},s.onPageError=function(t,e){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e]),t},e.create.prefill=function(){if(this.options.prefill){var t=this.options.append;if(!t)return console.error("append option required for prefill. Set as :"+t),void 0;this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()}},s.prefill=function(){var t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},s.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(n,i){return e(t,n,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,n){var i=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},i.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},i.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},i.bindScrollWatchEvents=function(e){var n=e?"addEventListener":"removeEventListener";this.scroller[n]("scroll",this.pageScrollHandler),t[n]("resize",this.resizeHandler)},i.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();this.options.scrollThreshold>=t&&this.dispatchEvent("scrollThreshold")}),i.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},i.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,n=t.pageYOffset+this.windowHeight;return e-n},i.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},i.onResize=function(){this.updateMeasurements()},n.debounceMethod(e,"onResize",150),e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(n,i){return e(t,n,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,n){var i=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history){o.href=this.getAbsolutePath();var t=o.origin||o.protocol+"//"+o.host,e=t==location.origin;return e?(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad(),void 0):(console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled."),void 0)}},i.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},i.bindHistoryAppendEvents=function(e){var n=e?"addEventListener":"removeEventListener";this.scroller[n]("scroll",this.scrollHistoryHandler),t[n]("unload",this.unloadHandler)},i.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=i.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},i.onAppendHistory=function(t,e,n){if(n&&n.length){var i=n[0],r=this.getElementScrollY(i);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})}},i.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},i.getElementWindowScrollY=function(e){var n=e.getBoundingClientRect();return n.top+t.pageYOffset},i.getElementElementScrollY=function(t){return t.offsetTop-this.top},i.onScrollHistory=function(){for(var t,e,n=this.getScrollViewY(),i=0;this.scrollPages.length>i;i++){var o=this.scrollPages[i];if(o.top>=n)break;t=i,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},n.debounceMethod(e,"onScrollHistory",150),i.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},i.setHistory=function(t,e){var n=this.options.history,i=n&&history[n+"State"];i&&(history[n+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},i.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var n=this.scrollPages[e],i=t.pageYOffset-n.top+this.top;this.destroyHistory(),scrollTo(0,i)}},i.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(n,i){return e(t,n,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,n){function i(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=n.getQueryElement(this.options.button);return t?(this.button=new i(t,this),void 0):void 0},e.destroy.button=function(){this.button&&this.button.destroy()},i.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},i.prototype.enable=function(){this.element.removeAttribute("disabled")},i.prototype.disable=function(){this.element.disabled="disabled"},i.prototype.hide=function(){this.element.style.display="none"},i.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=i,e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(n,i){return e(t,n,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,n){function i(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=n.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},s.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements();var e=this.statusEventElements[t];o(e)},s.hideAllStatus=function(){i(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements){var e=this.statusEventElements[t];i(e)}},e}),function(t,e){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],e):"object"==typeof module&&module.exports&&(module.exports=e(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(t){return t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function n(t,e){for(var n in e)t[n]=e[n];return t}function i(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?u.call(t):[t]}function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=i(s),this.options=n({},this.options),"function"==typeof e?r=e:n(this.options,e),r&&this.on("always",r),this.getImages(),a&&(this.jqDeferred=new a.Deferred),setTimeout(this.check.bind(this)),void 0):(l.error("Bad element for imagesLoaded "+(s||t)),void 0)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var a=t.jQuery,l=t.console,u=Array.prototype.slice;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var n=t.querySelectorAll("img"),i=0;n.length>i;i++){var o=n[i];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(i=0;r.length>i;i++){var s=r[i];this.addElementBackgroundImages(s)}}}};var c={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(e.backgroundImage);null!==i;){var o=i&&i[2];o&&this.addBackground(o,t),i=n.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var n=new s(t,e);this.images.push(n)},o.prototype.check=function(){function t(t,n,i){setTimeout(function(){e.progress(t,n,i)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?(this.images.forEach(function(e){e.once("progress",t),e.check()}),void 0):(this.complete(),void 0)},o.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&l&&l.log("progress: "+n,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src,void 0)},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(a=e,a.fn.imagesLoaded=function(t,e){var n=new o(this,t,e);return n.jqDeferred.promise(a(this))})},o.makeJQueryPlugin(),o}),function(t){"object"==typeof module&&"object"==typeof module.exports?t(require("jquery"),window,document):t(jQuery,window,document)}(function(t,e,n){var i=[],o=function(){return i.length?i[i.length-1]:null},r=function(){var t,e=!1;for(t=i.length-1;t>=0;t--)i[t].$blocker&&(i[t].$blocker.toggleClass("current",!e).toggleClass("behind",e),e=!0)};t.modal=function(e,n){var r,s;if(this.$body=t("body"),this.options=t.extend({},t.modal.defaults,n),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;t.modal.isActive();)t.modal.close();if(i.push(this),e.is("a"))if(s=e.attr("href"),this.anchor=e,/^#/.test(s)){if(this.$elm=t(s),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=t(""),this.$body.append(this.$elm),r=function(t,e){e.elm.remove()},this.showSpinner(),e.trigger(t.modal.AJAX_SEND),t.get(s).done(function(n){if(t.modal.isActive()){e.trigger(t.modal.AJAX_SUCCESS);var i=o();i.$elm.empty().append(n).on(t.modal.CLOSE,r),i.hideSpinner(),i.open(),e.trigger(t.modal.AJAX_COMPLETE)}}).fail(function(){e.trigger(t.modal.AJAX_FAIL);var n=o();n.hideSpinner(),i.pop(),e.trigger(t.modal.AJAX_COMPLETE)});else this.$elm=e,this.$body.append(this.$elm),this.open()},t.modal.prototype={constructor:t.modal,open:function(){var e=this;this.block(),this.options.doFade?setTimeout(function(){e.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),t(n).off("keydown.modal").on("keydown.modal",function(t){var e=o();27===t.which&&e.options.escapeClose&&e.close()}),this.options.clickClose&&this.$blocker.click(function(e){e.target===this&&t.modal.close()})},close:function(){i.pop(),this.unblock(),this.hide(),t.modal.isActive()||t(n).off("keydown.modal")},block:function(){this.$elm.trigger(t.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=t('
').appendTo(this.$body),r(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(t.modal.BLOCK,[this._ctx()])},unblock:function(e){!e&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,r(),t.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(t.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=t('
'+this.options.closeText+" "),this.$elm.append(this.closeButton),t(".close-modal").attr("title",this.options.closeToolTip)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css("opacity",0).show().animate({opacity:1},this.options.fadeDuration):this.$elm.show(),this.$elm.trigger(t.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(t.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var e=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){e.$elm.trigger(t.modal.AFTER_CLOSE,[e._ctx()])}):this.$elm.hide(0,function(){e.$elm.trigger(t.modal.AFTER_CLOSE,[e._ctx()])}),this.$elm.trigger(t.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||t('
').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options}}},t.modal.close=function(e){if(t.modal.isActive()){e&&e.preventDefault();var n=o();return n.close(),n.$elm}},t.modal.isActive=function(){return i.length>0},t.modal.getCurrent=o,t.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",closeToolTip:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:null,showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},t.modal.BEFORE_BLOCK="modal:before-block",t.modal.BLOCK="modal:block",t.modal.BEFORE_OPEN="modal:before-open",t.modal.OPEN="modal:open",t.modal.BEFORE_CLOSE="modal:before-close",t.modal.CLOSE="modal:close",t.modal.AFTER_CLOSE="modal:after-close",t.modal.AJAX_SEND="modal:ajax:send",t.modal.AJAX_SUCCESS="modal:ajax:success",t.modal.AJAX_FAIL="modal:ajax:fail",t.modal.AJAX_COMPLETE="modal:ajax:complete",t.fn.modal=function(e){return 1===this.length&&new t.modal(this,e),this},t(n).on("click.modal",'a[rel~="modal:close"]',t.modal.close),t(n).on("click.modal",'a[rel~="modal:open"]',function(e){e.preventDefault(),t(this).modal()})}),function(t){var e=!1;if("function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),!e){var n=window.Cookies,i=window.Cookies=t();i.noConflict=function(){return window.Cookies=n,i}}}(function(){function t(){for(var t=0,e={};arguments.length>t;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function e(n){function i(e,o,r){var s;if("undefined"!=typeof document){if(arguments.length>1){if(r=t({path:"/"},i.defaults,r),"number"==typeof r.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*r.expires),r.expires=a}r.expires=r.expires?r.expires.toUTCString():"";try{s=JSON.stringify(o),/^[\{\[]/.test(s)&&(o=s)}catch(l){}o=n.write?n.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape);var u="";for(var c in r)r[c]&&(u+="; "+c,r[c]!==!0&&(u+="="+r[c]));return document.cookie=e+"="+o+u}e||(s={});for(var d=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,h=0;d.length>h;h++){var p=d[h].split("="),m=p.slice(1).join("=");'"'===m.charAt(0)&&(m=m.slice(1,-1));try{var g=p[0].replace(f,decodeURIComponent);if(m=n.read?n.read(m,g):n(m,g)||m.replace(f,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(l){}if(e===g){s=m;break}e||(s[g]=m)}catch(l){}}return s}}return i.set=i,i.get=function(t){return i.call(i,t)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(e,n){i(e,"",t(n,{expires:-1}))},i.withConverter=e,i}return e(function(){})}),function(t){function e(){}function n(t){function n(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,n){t.fn[e]=function(o){if("string"==typeof o){for(var s=i.call(arguments,1),a=0,l=this.length;l>a;a++){var u=this[a],c=t.data(u,e);if(c)if(t.isFunction(c[o])&&"_"!==o.charAt(0)){var d=c[o].apply(c,s);if(void 0!==d)return d}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+o+"'")}return this}return this.each(function(){var i=t.data(this,e);i?(i.option(o),i._init()):(i=new n(this,o),t.data(this,e,i))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){n(e),o(t,e)},t.bridget}}var i=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],n):"object"==typeof exports?n(require("jquery")):n(t.jQuery)}(window),function(t){function e(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(t,e,n){t.addEventListener(e,n,!1)}:n.attachEvent&&(i=function(t,n,i){t[n+i]=i.handleEvent?function(){var n=e(t);i.handleEvent.call(i,n)}:function(){var n=e(t);i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var o=function(){};n.removeEventListener?o=function(t,e,n){t.removeEventListener(e,n,!1)}:n.detachEvent&&(o=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(i){t[e+n]=void 0}});var r={bind:i,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,o=this,r=o.EventEmitter;i.getListeners=function(t){var e,n,i=this._getEvents();if(t instanceof RegExp){e={};for(n in i)i.hasOwnProperty(n)&&t.test(n)&&(e[n]=i[n])}else e=i[t]||(i[t]=[]);return e},i.flattenListeners=function(t){var e,n=[];for(e=0;t.length>e;e+=1)n.push(t[e].listener);return n},i.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&(e={},e[t]=n),e||n},i.addListener=function(t,n){var i,o=this.getListenersAsObject(t),r="object"==typeof n;for(i in o)o.hasOwnProperty(i)&&-1===e(o[i],n)&&o[i].push(r?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,n){var i,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(i=e(r[o],n),-1!==i&&r[o].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.manipulateListeners=function(t,e,n){var i,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(i=n.length;i--;)r.call(this,e,n[i]);else for(i in e)e.hasOwnProperty(i)&&(o=e[i])&&("function"==typeof o?r.call(this,i,o):s.call(this,i,o));return this},i.removeEvent=function(t){var e,n=typeof t,i=this._getEvents();if("string"===n)delete i[t];else if(t instanceof RegExp)for(e in i)i.hasOwnProperty(e)&&t.test(e)&&delete i[e];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(t,e){var n,i,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(i=s[o].length;i--;)n=s[o][i],n.once===!0&&this.removeListener(t,n.listener),r=n.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:o.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof i[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=n.length;r>o;o++)if(e=n[o]+t,"string"==typeof i[e])return e}}var n="Webkit Moz ms Ms O".split(" "),i=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),n=-1===t.indexOf("%")&&!isNaN(e);return n&&e}function n(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,n=s.length;n>e;e++){var i=s[e];t[i]=0}return t}function o(n){function o(){if(!f){f=!0;var i=t.getComputedStyle;if(u=function(){var t=i?function(t){return i(t,null)}:function(t){return t.currentStyle};return function(e){var n=t(e);return n||r("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? "+"See http://bit.ly/getsizebug1"),n}}(),c=n("boxSizing")){var o=document.createElement("div");o.style.width="200px",o.style.padding="1px 2px 3px 4px",o.style.borderStyle="solid",o.style.borderWidth="1px 2px 3px 4px",o.style[c]="border-box";var s=document.body||document.documentElement;s.appendChild(o);var a=u(o);d=200===e(a.width),s.removeChild(o)}}}function a(t){if(o(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var n=u(t);if("none"===n.display)return i();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var a=r.isBorderBox=!(!c||!n[c]||"border-box"!==n[c]),f=0,h=s.length;h>f;f++){var p=s[f],m=n[p];m=l(t,m);var g=parseFloat(m);r[p]=isNaN(g)?0:g}var v=r.paddingLeft+r.paddingRight,y=r.paddingTop+r.paddingBottom,b=r.marginLeft+r.marginRight,x=r.marginTop+r.marginBottom,w=r.borderLeftWidth+r.borderRightWidth,k=r.borderTopWidth+r.borderBottomWidth,C=a&&d,_=e(n.width);_!==!1&&(r.width=_+(C?0:v+w));var T=e(n.height);return T!==!1&&(r.height=T+(C?0:y+k)),r.innerWidth=r.width-(v+w),r.innerHeight=r.height-(y+k),r.outerWidth=r.width+b,r.outerHeight=r.height+x,r}}function l(e,n){if(t.getComputedStyle||-1===n.indexOf("%"))return n;var i=e.style,o=i.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),i.left=n,n=i.pixelLeft,i.left=o,s&&(r.left=s),n}var u,c,d,f=!1;return a}var r="undefined"==typeof console?n:function(t){console.error(t)},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("desandro-get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function n(t){var n="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||n||i()}function i(){e.isReady=!0;for(var t=0,n=s.length;n>t;t++){var i=s[t];i()}}function o(o){return"complete"===r.readyState?i():(o.bind(r,"DOMContentLoaded",n),o.bind(r,"readystatechange",n),o.bind(t,"load",n)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[s](e)}function n(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function i(t,e){n(t);for(var i=t.parentNode.querySelectorAll(e),o=0,r=i.length;r>o;o++)if(i[o]===t)return!0;return!1}function o(t,i){return n(t),e(t,i)}var r,s=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0,i=e.length;i>n;n++){var o=e[n],r=o+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),l=e(a,"div");r=l?e:o}else r=i;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(n,i){return e(t,n,i)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,n){var i={};i.extend=function(t,e){for(var n in e)t[n]=e[n];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Object.prototype.toString;i.isArray=function(t){return"[object Array]"==o.call(t)},i.makeArray=function(t){var e=[];if(i.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var n=0,o=t.length;o>n;n++)e.push(t[n]);else e.push(t);return e},i.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},i.removeFrom=function(t,e){var n=i.indexOf(t,e);-1!=n&&t.splice(n,1)},i.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},i.setText=function(){function t(t,n){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=n}var e;return t}(),i.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,n(t,e))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,e){t=i.makeArray(t);for(var o=[],r=0,s=t.length;s>r;r++){var a=t[r];if(i.isElement(a))if(e){n(a,e)&&o.push(a);for(var l=a.querySelectorAll(e),u=0,c=l.length;c>u;u++)o.push(l[u])}else o.push(a)}return o},i.debounceMethod=function(t,e,n){var i=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){i.apply(r,e),delete r[o]},n||100)}},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,n){return e+"-"+n}).toLowerCase()};var r=t.console;return i.htmlInit=function(n,o){e(function(){for(var e=i.toDashed(o),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",l=0,u=s.length;u>l;l++){var c,d=s[l],f=d.getAttribute(a);try{c=f&&JSON.parse(f)}catch(h){r&&r.error("Error parsing "+a+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+h);continue}var p=new n(d,c),m=t.jQuery;m&&m.data(d,o,p)}})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(n,i,o,r){return e(t,n,i,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,n,i,o){function r(t){for(var e in t)return!1;return e=null,!0}function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var a=t.getComputedStyle,l=a?function(t){return a(t,null)}:function(t){return t.currentStyle},u=i("transition"),c=i("transform"),d=u&&c,f=!!i("perspective"),h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],p=["transform","transition","transitionDuration","transitionProperty"],m=function(){for(var t={},e=0,n=p.length;n>e;e++){var o=p[e],r=i(o);r&&r!==o&&(t[o]=r)}return t}();o.extend(s.prototype,e.prototype),s.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.getSize=function(){this.size=n(this.element)},s.prototype.css=function(t){var e=this.element.style;for(var n in t){var i=m[n]||n;e[i]=t[n]}},s.prototype.getPosition=function(){var t=l(this.element),e=this.layout.options,n=e.isOriginLeft,i=e.isOriginTop,o=parseInt(t[n?"left":"right"],10),r=parseInt(t[i?"top":"bottom"],10);o=isNaN(o)?0:o,r=isNaN(r)?0:r;
var s=this.layout.size;o-=n?s.paddingLeft:s.paddingRight,r-=i?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=r},s.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,n={},i=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",s=this.position.x+t[i];s=e.percentPosition&&!e.isHorizontal?100*(s/t.width)+"%":s+"px",n[o]=s,n[r]="";var a=e.isOriginTop?"paddingTop":"paddingBottom",l=e.isOriginTop?"top":"bottom",u=e.isOriginTop?"bottom":"top",c=this.position.y+t[a];c=e.percentPosition&&e.isHorizontal?100*(c/t.height)+"%":c+"px",n[l]=c,n[u]="",this.css(n),this.emitEvent("layout",[this])};var g=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};s.prototype._transitionTo=function(t,e){this.getPosition();var n=this.position.x,i=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-n,l=e-i,u={},c=this.layout.options;a=c.isOriginLeft?a:-a,l=c.isOriginTop?l:-l,u.transform=g(a,l),this.transition({to:u,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},s.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},s.prototype.moveTo=d?s.prototype._transitionTo:s.prototype.goTo,s.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},s.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},s.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var n in t.onTransitionEnd)e.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)e.ingProperties[n]=!0,t.isCleaning&&(e.clean[n]=!0);if(t.from){this.css(t.from);var i=this.element.offsetHeight;i=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var v=c&&o.toDashed(c)+",opacity";s.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:v,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(h,this,!1))},s.prototype.transition=s.prototype[u?"_transition":"_nonTransition"],s.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},s.prototype.onotransitionend=function(t){this.ontransitionend(t)};var y={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};s.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=y[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],r(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var i=e.onEnd[n];i.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},s.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},s.prototype._removeStyles=function(t){var e={};for(var n in t)e[n]="";this.css(e)};var b={transitionProperty:"",transitionDuration:""};return s.prototype.removeTransitionStyles=function(){this.css(b)},s.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},s.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()},s.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},n=this.getHideRevealTransitionEndProperty("visibleStyle");e[n]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},s.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var n in e)return n},s.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},n=this.getHideRevealTransitionEndProperty("hiddenStyle");e[n]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},s.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(n,i,o,r,s){return e(t,n,i,o,r,s)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,n,i,o,r){function s(t,e){var n=o.getQueryElement(t);if(!n)return a&&a.error("Bad element for "+this.constructor.namespace+": "+(n||t)),void 0;this.element=n,l&&(this.$element=l(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var i=++c;this.element.outlayerGUID=i,d[i]=this,this._create(),this.options.isInitLayout&&this.layout()}var a=t.console,l=t.jQuery,u=function(){},c=0,d={};return s.namespace="outlayer",s.Item=r,s.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(s.prototype,n.prototype),s.prototype.option=function(t){o.extend(this.options,t)},s.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},s.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},s.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),n=this.constructor.Item,i=[],o=0,r=e.length;r>o;o++){var s=e[o],a=new n(s,this);i.push(a)}return i},s.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},s.prototype.getItemElements=function(){for(var t=[],e=0,n=this.items.length;n>e;e++)t.push(this.items[e].element);return t},s.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},s.prototype._init=s.prototype.layout,s.prototype._resetLayout=function(){this.getSize()},s.prototype.getSize=function(){this.size=i(this.element)},s.prototype._getMeasurement=function(t,e){var n,r=this.options[t];r?("string"==typeof r?n=this.element.querySelector(r):o.isElement(r)&&(n=r),this[t]=n?i(n)[e]:r):this[t]=0},s.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},s.prototype._getItemsForLayout=function(t){for(var e=[],n=0,i=t.length;i>n;n++){var o=t[n];o.isIgnored||e.push(o)}return e},s.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var n=[],i=0,o=t.length;o>i;i++){var r=t[i],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e||r.isLayoutInstant,n.push(s)}this._processLayoutQueue(n)}},s.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},s.prototype._processLayoutQueue=function(t){for(var e=0,n=t.length;n>e;e++){var i=t[e];this._positionItem(i.item,i.x,i.y,i.isInstant)}},s.prototype._positionItem=function(t,e,n,i){i?t.goTo(e,n):t.moveTo(e,n)},s.prototype._postLayout=function(){this.resizeContainer()},s.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},s.prototype._getContainerSize=u,s.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var n=this.size;n.isBorderBox&&(t+=e?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},s.prototype._emitCompleteOnItems=function(t,e){function n(){o.emitEvent(t+"Complete",[e])}function i(){s++,s===r&&n()}var o=this,r=e.length;if(!e||!r)return n(),void 0;for(var s=0,a=0,l=e.length;l>a;a++){var u=e[a];u.once(t,i)}},s.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},s.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},s.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,n=t.length;n>e;e++){var i=t[e];this.ignore(i)}}},s.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,n=t.length;n>e;e++){var i=t[e];o.removeFrom(this.stamps,i),this.unignore(i)}},s.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)):void 0},s.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var n=this.stamps[t];this._manageStamp(n)}}},s.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},s.prototype._manageStamp=u,s.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},s.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},s.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},s.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},s.prototype.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},s.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},s.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},s.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var n=this.items.slice(0);this.items=e.concat(n),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(n)}},s.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,n=0;e&&e>n;n++){var i=t[n];i.reveal()}},s.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,n=0;e&&e>n;n++){var i=t[n];i.hide()}},s.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},s.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},s.prototype.getItem=function(t){for(var e=0,n=this.items.length;n>e;e++){var i=this.items[e];if(i.element===t)return i}},s.prototype.getItems=function(t){t=o.makeArray(t);for(var e=[],n=0,i=t.length;i>n;n++){var r=t[n],s=this.getItem(r);s&&e.push(s)}return e},s.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var n=0,i=e.length;i>n;n++){var r=e[n];r.remove(),o.removeFrom(this.items,r)}},s.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,n=this.items.length;n>e;e++){var i=this.items[e];i.destroy()}this.unbindResize();var o=this.element.outlayerGUID;delete d[o],delete this.element.outlayerGUID,l&&l.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&d[e]},s.create=function(t,e){function n(){s.apply(this,arguments)}return Object.create?n.prototype=Object.create(s.prototype):o.extend(n.prototype,s.prototype),n.prototype.constructor=n,n.defaults=o.extend({},s.defaults),o.extend(n.defaults,e),n.prototype.settings={},n.namespace=t,n.data=s.data,n.Item=function(){r.apply(this,arguments)},n.Item.prototype=new r,o.htmlInit(n,t),l&&l.bridget&&l.bridget(t,n),n},s.Item=r,s}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):t.Masonry=e(t.Outlayer,t.getSize,t.fizzyUIUtils)}(window,function(t,e,n){var i=t.create("masonry");return i.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},i.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],n=t&&t.element;this.columnWidth=n&&e(n).outerWidth||this.containerWidth}var i=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/i,s=i-o%i,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},i.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,n=e(t);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var r=this._getColGroup(o),s=Math.min.apply(Math,r),a=n.indexOf(r,s),l={x:this.columnWidth*a,y:s},u=s+t.size.outerHeight,c=this.cols+1-r.length,d=0;c>d;d++)this.colYs[a+d]=u;return l},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],n=this.cols+1-t,i=0;n>i;i++){var o=this.colYs.slice(i,i+t);e[i]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var n=e(t),i=this._getElementOffset(t),o=this.options.isOriginLeft?i.left:i.right,r=o+n.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var l=(this.options.isOriginTop?i.top:i.bottom)+n.outerHeight,u=s;a>=u;u++)this.colYs[u]=Math.max(l,this.colYs[u])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},i}),function(t){"use strict";var e=t(window),n=50,i=function(t,e,n){var i=0;return function(){var o,r;return o=new Date,r=n-(o-i),0>=r?(i=o,t.apply(e,arguments)):void 0}},o=0,r=function(t){var e=(o++).toString();return function(){return this.cache[e]||(this.cache[e]=t.apply(this)),this.cache[e]}},s=function(){function o(n,o){this.$el=n,this.$el.css({width:this.$el.width()}),this.$wrapper=o.wrapper,"static"===this.$wrapper.css("position")&&this.$wrapper.css("position","relative"),this.sentinel=t("
").css({position:o.ignore?"absolute":"relative",top:0,height:0}),this.$el.before(this.sentinel),this.offsetTop=o.offsetTop||0,this.offsetBottom=o.offsetBottom||0,this.position=o.position||"top",this.ignore=o.ignore,this.ignore&&this.$el.css({position:"absolute",top:0}),this.handler=i("bottom"==this.position?this.onScrollBottom:this.onScrollTop,this,o.throttle||10),e.on("scroll",this.handler),e.on("resize",this.handler),this.handler()}return t.extend(o.prototype,{state:"top",same:!1,onScrollTop:function(){if(this.cache={},!this.ignore&&(this.same||"top"===this.state&&this.isSameHeight()))return this.same=!0,void 0;var t,e=this.getScrollTop()+this.offsetTop;t=this.getSentinelTop()>e?"top":e+this.getOuterHeight()>this.getSentinelBottom()?"bottom":"fixed",(this.state!==t||"fixed"!==t)&&this.transferTo(t)},onScrollBottom:function(){if(this.cache={},!this.ignore&&(this.same||"top"===this.state&&this.isSameHeight()))return this.same=!0,void 0;var t,n;n=this.getScrollTop()+e.height(),t=n>this.getSentinelBottom()?"bottom":n-this.getOuterHeight()
this.getSentinelBottom()-this.getBottom()-this.offsetBottom},getScrollTop:r(function(){return e.scrollTop()}),getWrapperHeight:r(function(){return this.$wrapper.outerHeight()}),getOuterHeight:r(function(){return this.$el.outerHeight(!0)+this.offsetBottom}),getSentinelTop:r(function(){return this.sentinel.offset().top}),getSentinelBottom:r(function(){return this.$wrapper.offset().top+this.getWrapperHeight()+parseInt(this.$wrapper.css("margin-top"),10)}),getBottom:r(function(){return this.$el.offset().top+this.getOuterHeight()}),destroy:function(){this.$el&&(this.transferTo("top"),this.$el=this.$wrapper=null,e.off("scroll",this.handler),e.off("resize",this.handler))}}),o}();t.fn.scrollChaser=function(e){e||(e={}),e.wrapper?e.wrapper instanceof t||(e.wrapper=t(e.wrapper)):e.wrapper=t(document.body),this.scrollChaser=new s(this,e);var n=this,i=this.remove;return this.remove=function(){n.scrollChaser.destroy(),i.apply(n,arguments)},this},t.fn.outerHeight||(t.fn.outerHeight=function(t){var e=this.height();return t||(e-=parseInt(this.css("margin-bottom"),10),e-=parseInt(this.css("margin-top"),10)),e})}(window.jQuery||window.Zepto),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";function e(e){return!e.nodeName||-1!==t.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function n(e){return t.isFunction(e)||t.isPlainObject(e)?e:{top:e,left:e}}var i=t.scrollTo=function(e,n,i){return t(window).scrollTo(e,n,i)};return i.defaults={axis:"xy",duration:0,limit:!0},t.fn.scrollTo=function(o,r,s){"object"==typeof r&&(s=r,r=0),"function"==typeof s&&(s={onAfter:s}),"max"===o&&(o=9e9),s=t.extend({},i.defaults,s),r=r||s.duration;var a=s.queue&&s.axis.length>1;return a&&(r/=2),s.offset=n(s.offset),s.over=n(s.over),this.each(function(){function l(e){var n=t.extend({},s,{queue:!0,duration:r,complete:e&&function(){e.call(d,h,s)}});f.animate(p,n)}if(null!==o){var u,c=e(this),d=c?this.contentWindow||window:this,f=t(d),h=o,p={};switch(typeof h){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(h)){h=n(h);break}h=c?t(h):t(h,d);case"object":if(0===h.length)return;(h.is||h.style)&&(u=(h=t(h)).offset())}var m=t.isFunction(s.offset)&&s.offset(d,h)||s.offset;t.each(s.axis.split(""),function(t,e){var n="x"===e?"Left":"Top",o=n.toLowerCase(),r="scroll"+n,g=f[r](),v=i.max(d,e);if(u)p[r]=u[o]+(c?0:g-f.offset()[o]),s.margin&&(p[r]-=parseInt(h.css("margin"+n),10)||0,p[r]-=parseInt(h.css("border"+n+"Width"),10)||0),p[r]+=m[o]||0,s.over[o]&&(p[r]+=h["x"===e?"width":"height"]()*s.over[o]);else{var y=h[o];p[r]=y.slice&&"%"===y.slice(-1)?parseFloat(y)/100*v:y}s.limit&&/^\d+$/.test(p[r])&&(p[r]=0>=p[r]?0:Math.min(p[r],v)),!t&&s.axis.length>1&&(g===p[r]?p={}:a&&(l(s.onAfterFirst),p={}))}),l(s.onAfter)}})},i.max=function(n,i){var o="x"===i?"Width":"Height",r="scroll"+o;if(!e(n))return n[r]-t(n)[o.toLowerCase()]();var s="client"+o,a=n.ownerDocument||n.document,l=a.documentElement,u=a.body;return Math.max(l[r],u[r])-Math.min(l[s],u[s])},t.Tween.propHooks.scrollLeft=t.Tween.propHooks.scrollTop={get:function(e){return t(e.elem)[e.prop]()},set:function(e){var n=this.get(e);if(e.options.interrupt&&e._last&&e._last!==n)return t(e.elem).stop();var i=Math.round(e.now);n!==i&&(t(e.elem)[e.prop](i),e._last=this.get(e))}},i}),function(t){function e(){var e=n(this);return isNaN(e.datetime)||t(this).text(i(e.datetime)),this}function n(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:r.datetime(e)});var n=t.trim(e.text());n.length>0&&e.attr("title",n)}return e.data("timeago")}function i(t){return r.inWords(o(t))}function o(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return e instanceof Date?i(e):"string"==typeof e?i(t.timeago.parse(e)):i(t.timeago.datetime(e))};var r=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowFuture:!0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(e){function n(n,o){var r=t.isFunction(n)?n(o,e):n,s=i.numbers&&i.numbers[o]||o;return r.replace(/%d/i,s)}var i=this.settings.strings,o=i.prefixAgo,r=i.suffixAgo;this.settings.allowFuture&&0>e&&(o=i.prefixFromNow,r=i.suffixFromNow);var s=Math.abs(e)/1e3,a=s/60,l=a/60,u=l/24,c=u/365,d=45>s&&n(i.seconds,Math.round(s))||90>s&&n(i.minute,1)||45>a&&n(i.minutes,Math.round(a))||90>a&&n(i.hour,1)||24>l&&n(i.hours,Math.round(l))||48>l&&n(i.day,1)||30>u&&n(i.days,Math.floor(u))||60>u&&n(i.month,1)||365>u&&n(i.months,Math.floor(u/30))||2>c&&n(i.year,1)||n(i.years,Math.floor(c));return t.trim([o,d,r].join(" "))},parse:function(e){var n=t.trim(e);return n=n.replace(/\.\d\d\d+/,""),n=n.replace(/-/,"/").replace(/-/,"/"),n=n.replace(/T/," ").replace(/Z/," UTC"),n=n.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(n)},datetime:function(e){var n="time"===t(e).get(0).tagName.toLowerCase(),i=n?t(e).attr("datetime"):t(e).attr("title");return r.parse(i)}}),t.fn.timeago=function(){var t=this;t.each(e);var n=r.settings;return n.refreshMillis>0&&setInterval(function(){t.each(e)},n.refreshMillis),t},document.createElement("abbr"),document.createElement("time")}(jQuery),function(t){function e(e,n,i){var o=i.relative?e.position().top:e.offset().top,r=i.relative?e.position().left:e.offset().left,s=i.position[0];o-=n.outerHeight()-i.offset[0],r+=e.outerWidth()+i.offset[1],/iPad/i.test(navigator.userAgent)&&(o-=t(window).scrollTop());var a=n.outerHeight()+e.outerHeight();"center"==s&&(o+=a/2),"bottom"==s&&(o+=a),s=i.position[1];var l=n.outerWidth()+e.outerWidth();return"center"==s&&(r-=l/2),"left"==s&&(r-=l),{top:o,left:r}}function n(n,o){var r,s,a=this,l=n.add(a),u=0,c=0,d=n.attr("title")||n.data("tooltip-title"),f=n.attr("data-tooltip"),h=i[o.effect],p=n.is(":input"),m=p&&n.is(":checkbox, :radio, select, :button, :submit"),g=n.attr("type"),v=o.events[g]||o.events[p?m?"widget":"input":"def"];if(null!=d){if(!h)throw'Nonexistent effect "'+o.effect+'"';if(v=v.split(/,\s*/),2!=v.length)throw"Tooltip: bad events configuration for "+g;n.on(v[0],function(t){clearTimeout(u),o.predelay?c=setTimeout(function(){a.show(t)},o.predelay):a.show(t)}).on(v[1],function(t){clearTimeout(c),o.delay?u=setTimeout(function(){a.hide(t)},o.delay):a.hide(t)}),d&&o.cancelDefault&&(n.removeAttr("title"),n.data("title",d)),t.extend(a,{show:function(i){if(!r&&(f?r=t(f):o.tip?r=t(o.tip).eq(0):d?r=t(o.layout).addClass(o.tipClass).appendTo(document.body).hide().append(d):(r=n.next(),r.length||(r=n.parent().next())),!r.length))throw"Cannot find tooltip for "+n;if(a.isShown())return a;r.stop(!0,!0);var p=e(n,r,o);if(o.tip&&r.html(n.data("title")),i=t.Event(),i.type="onBeforeShow",l.trigger(i,[p]),i.isDefaultPrevented())return a;p=e(n,r,o),r.css({position:"absolute",top:p.top,left:p.left}),s=!0,h[0].call(a,function(){i.type="onShow",s="full",l.trigger(i)});var m=o.events.tooltip.split(/,\s*/);return r.data("__set")||(r.off(m[0]).on(m[0],function(){clearTimeout(u),clearTimeout(c)}),m[1]&&!n.is("input:not(:checkbox, :radio), textarea")&&r.off(m[1]).on(m[1],function(t){t.relatedTarget!=n[0]&&n.trigger(v[1].split(" ")[0])}),o.tip||r.data("__set",!0)),a},hide:function(e){return r&&a.isShown()?(e=t.Event(),e.type="onBeforeHide",l.trigger(e),e.isDefaultPrevented()?void 0:(s=!1,i[o.effect][1].call(a,function(){e.type="onHide",l.trigger(e)}),a)):a},isShown:function(t){return t?"full"==s:s},getConf:function(){return o},getTip:function(){return r},getTrigger:function(){return n}}),t.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(e,n){t.isFunction(o[n])&&t(a).on(n,o[n]),a[n]=function(e){return e&&t(a).on(n,e),a}})}}t.tools=t.tools||{version:"@VERSION"},t.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipClass:"tooltip"},addEffect:function(t,e,n){i[t]=[e,n]}};var i={toggle:[function(t){var e=this.getConf(),n=this.getTip(),i=e.opacity;1>i&&n.css({opacity:i}),n.show(),t.call()},function(t){this.getTip().hide(),t.call()}],fade:[function(e){var n=this.getConf();!t.browser.msie||n.fadeIE?this.getTip().fadeTo(n.fadeInSpeed,n.opacity,e):(this.getTip().show(),e())},function(e){var n=this.getConf();!t.browser.msie||n.fadeIE?this.getTip().fadeOut(n.fadeOutSpeed,e):(this.getTip().hide(),e())}]};t.fn.tooltip=function(e){var i=this.data("tooltip");return i?i:(e=t.extend(!0,{},t.tools.tooltip.conf,e),"string"==typeof e.position&&(e.position=e.position.split(/,?\s/)),this.each(function(){i=new n(t(this),e),t(this).data("tooltip",i)}),e.api?i:this)}}(jQuery),function(t){function e(e){var n=t(window),i=n.width()+n.scrollLeft(),o=n.height()+n.scrollTop();return[e.offset().top<=n.scrollTop(),e.offset().left+e.width()>=i,e.offset().top+e.height()>=o,n.scrollLeft()>=e.offset().left]}function n(t){for(var e=t.length;e--;)if(t[e])return!1;return!0}var i=t.tools.tooltip;i.dynamic={conf:{classNames:"top right bottom left"}},t.fn.dynamic=function(o){"number"==typeof o&&(o={speed:o}),o=t.extend({},i.dynamic.conf,o);var r,s=t.extend(!0,{},o),a=o.classNames.split(/\s/);return this.each(function(){var i=t(this).tooltip().onBeforeShow(function(i,o){var l=this.getTip(),u=this.getConf();r||(r=[u.position[0],u.position[1],u.offset[0],u.offset[1],t.extend({},u)]),t.extend(u,r[4]),u.position=[r[0],r[1]],u.offset=[r[2],r[3]],l.css({visibility:"hidden",position:"absolute",top:o.top,left:o.left}).show();var c=t.extend(!0,{},s),d=e(l);n(d)||(d[2]&&(t.extend(u,c.top),u.position[0]="top",l.addClass(a[0])),d[3]&&(t.extend(u,c.right),u.position[1]="right",l.addClass(a[1])),d[0]&&(t.extend(u,c.bottom),u.position[0]="bottom",l.addClass(a[2])),d[1]&&(t.extend(u,c.left),u.position[1]="left",l.addClass(a[3])),(d[0]||d[2])&&(u.offset[0]*=-1),(d[1]||d[3])&&(u.offset[1]*=-1)),l.css({visibility:"visible"}).hide()});i.onBeforeShow(function(){var t=this.getConf();this.getTip(),setTimeout(function(){t.position=[r[0],r[1]],t.offset=[r[2],r[3]]},0)}),i.onHide(function(){var t=this.getTip();t.removeClass(o.classNames)}),ret=i}),o.api?ret:this}}(jQuery),function(t){t.fn.unveil=function(e,n){function i(){var e=u.filter(function(){var e=t(this);if(!e.is(":hidden")){var n=r.scrollTop(),i=n+r.height(),o=e.offset().top,a=o+e.height();return a>=n-s&&i+s>=o}});o=e.trigger("unveil"),u=u.not(o)}var o,r=t(window),s=e||0,a=window.devicePixelRatio>1,l=a?"data-src-retina":"data-src",u=this;return this.one("unveil",function(){var t=this.getAttribute(l);t=t||this.getAttribute("data-src"),t&&(this.setAttribute("src",t),"function"==typeof n&&n.call(this))}),r.on("scroll.unveil resize.unveil lookup.unveil",i),i(),this}}(window.jQuery||window.Zepto),function(){$(function(){return $(".heading-toggle").on("click",function(){var t,e;return t=$(this).find(".fa"),t.hasClass("fa-chevron-down")?(t.removeClass("fa-chevron-down"),t.addClass("fa-chevron-up")):(t.removeClass("fa-chevron-up"),t.addClass("fa-chevron-down")),e=$(""+$(this).data("target")),e.toggle()}),$(".footnote-superscript").on("click",function(){var t;return t=$("#external-references .fa"),0!==t.length&&(t.removeClass("fa-chevron-down"),t.addClass("fa-chevron-up")),$(".references").show()})})}.call(this),function(){$(function(){var t,e,n,i;return"desktop"===$("body").data("layout")?(n=$("body").data("ad-page-type"),t=function(t){var e;return 0===$("#whitelist-page").length&&(e=Cookies.get("kym-abm"),null==e)?(Cookies.set("kym-abm",1,{expires:1}),$("body").on($.modal.OPEN,function(){return gaTrackEvent("Desktop Adblock Message","Impression ("+t+")",n),$("#abm-image").unveil()}),$("body").on($.modal.AFTER_CLOSE,function(){return gaTrackEvent("Desktop Adblock Message","Close ("+t+")",n),$(".tooltip-abm-close").css("display","none")}),$("#abm-image-link, #abm-close-text, #abm-ep a").on("click",function(){return $.modal.close()}),setTimeout(function(){return $("#abm").modal({escapeClose:!1,clickClose:!1,closeToolTip:' None of this matters to you? Understandable, have a nice day.',showClose:!1}),$(".close-modal").tooltip({position:"bottom center",tipClass:"tooltip tooltip-abm-close"})},2e3)):void 0},e=function(t){var e;return e=new Date,new Date(e.getTime()+6e4*t)},i=function(){var t;return t=Cookies.get("kym-ref"),null==t&&(t=document.referrer),Cookies.set("kym-ref",t,{expires:e(30)}),t},adblockDetect(function(e){var n,o,r;return e?(r=i(),o=User.LoggedIn?"logged in":"logged out",n=0===r.length?"direct":r.match(/facebook\.com/i)?"facebook referral":r.match(/google\.com/i)?"google referral":"misc",t(""+o+" "+n)):void 0})):void 0})}.call(this),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.adblockDetect=e()}(this,function(){function t(o,r){r=i(t.defaults,r||{});var s=e(r.testNodeClasses,r.testNodeStyle),a=0,l=!1,u=setInterval(function(){a++,l=n(s),(l||a===r.testRuns)&&(clearInterval(u),s.parentNode&&s.parentNode.removeChild(s),o(l))},r.testInterval)}function e(t,e){var n=window.document,i=n.createElement("div");return i.innerHTML=" ",i.setAttribute("class",t),i.setAttribute("style",e),n.body.appendChild(i),i}function n(t){return 0===t.offsetHeight||!document.body.contains(t)||"none"===t.style.display||"hidden"===t.style.visibility}function i(t,e){var n={};for(var i in t)n[i]=t[i],e.hasOwnProperty(i)&&(n[i]=e[i]);return n}return t.defaults={testNodeClasses:"pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links",testNodeStyle:"height: 10px !important; font-size: 20px; color: transparent; position: absolute; bottom: 0; left: -10000px;",testInterval:51,testRuns:4},t}),function(){this.AdServer={session_key:"kym-as",session:function(){return Cookies.getJSON(AdServer.session_key)},extend_session:function(t){var e,n;return null==t&&(t=null),null==t&&(t=AdServer.random()),n=new Date,n=new Date(n.getTime()+18e5),e={name:t,expires:n},Cookies.set(AdServer.session_key,e,{expires:n})},random:function(){var t,e,n;return e="desktop"===document.body.getAttribute("data-layout"),t=e?0:.65,n=Math.random(),t>=n?"c":"d"},name:function(){var t,e;return"Newsfeed"===document.body.getAttribute("data-ad-page-type")?"complex":(window.location.search.match(/forcedfpsession=1/)?AdServer.extend_session("d"):window.location.search.match(/forcecomplexsession=1/)&&AdServer.extend_session("c"),t=AdServer.session(),e=null!=t?AdServer.session().name:AdServer.random(),AdServer.extend_session(e),"d"===e?"dfp":"complex")},expires:function(){var t;return t=new Date(AdServer.session().expires),t.toLocaleString()}}}.call(this),function(){this.Ad={init:function(){return"dfp"===AdServer.name()?DFP.init():Complex.init()},load:function(){return"dfp"===AdServer.name()?DFP.load():Complex.load()},refresh:function(){return"dfp"===AdServer.name()?DFP.refresh():void 0},new_page_signal:function(){return"dfp"===AdServer.name()?DFP.new_page_signal():void 0},set_page_segment:function(t){return"dfp"===AdServer.name()?DFP.set_page_segment(t):void 0
},track:function(){var t,e;return t=$("body").data("layout"),e=$("body").data("ad-page-type"),e=e.toLowerCase().replace(/\s+/,"-"),Ad.debug()&&"desktop"===t&&($("body").append(""),$("body").append("")),window.googletag=window.googletag||{},googletag.cmd=googletag.cmd||[],googletag.cmd.push(function(){return googletag.pubads().addEventListener("slotOnload",function(n){var i,o;return Ad.record(n.slot,"requests",t,e),Ad.debug()?(i=n.slot.getSlotElementId(),i.match(/toolbar/i)&&(i="toolbar"),o=n.slot.isEmpty===!1?!0:!1,Ad.log("requests",i,o)):void 0}),googletag.pubads().addEventListener("impressionViewable",function(n){var i;return Ad.record(n.slot,"views",t,e),Ad.debug()?(i=n.slot.getSlotElementId(),i.match(/toolbar/i)&&(i="toolbar"),Ad.log("views",i,!1)):void 0})})},record:function(t,e,n,i){var o,r,s,a,l,u;return l=t.getSlotElementId(),null!=l&&l.match(/unit|toolbar/i)?(r=l,r.match(/toolbar/i)&&(r="toolbar"),"dfp"===AdServer.name()&&(r="dfp-"+r),a=!1,"requests"===e&&(a=t.isEmpty===!1),r.match(/toolbar/i)?(u=!1,s=!1):(o=$("#"+l),u=o.data("options").lazyLoad?!0:!1,s=o.data("dynamic")?!0:!1,"dfp"===AdServer.name()&&(u=o.data("dfp-lazy")?!0:!1)),$.post("/ads/track",{category:e,filled:a,ad:r,layout:n,page_type:i,lazy:u,dynamic:s})):void 0},debug:function(){return window.location.search.match(/debugads=1/i)?!0:!1},log:function(t,e,n){var i,o,r,s;return null==n&&(n=!1),"desktop"===$("body").data("layout")?(i=$("#debug-ad-"+t+" ul"),o=new Date,s=o.toLocaleTimeString().replace(/[ap]m/i,""),r=o.toLocaleTimeString().replace(/[ap]m/i,""),r=""+r+" "+e+" ",n&&(r=""+r+" (FILLED) "),i.append(""+r+" ")):(r=""+t.toUpperCase()+": "+e,n&&(r=""+r+" (FILLED)"),console.log(r))}},$(function(){return $.fn.extend({btf:function(){return this.offset().top>$(window).height()}}),Ad.init()})}.call(this),function(){this.allow_toolbar_refresh=!0,this.Complex={init:function(){var t,e,n,i;return t=document.getElementById("complex-data"),null!=t?(window.cmnunt_site=t.getAttribute("data-site"),window.cmnunt_silo=t.getAttribute("data-silo"),window.cmnunt_subsilo="",window.cmnunt_tier=t.getAttribute("data-tier"),window.cmnunt_zone=t.getAttribute("data-zone"),window.cmnunt_kw="",window.cmnunt_exclude=t.getAttribute("data-exclude"),n=t.getAttribute("data-script"),e=document.createElement("script"),e.type="text/javascript",e.src=n,e.onload=function(){return"desktop"===document.body.getAttribute("data-layout")?Complex.init_desktop():Complex.init_mobile(),Ad.load(),Ad.track()},document.body.appendChild(e),window.cToolbarInit=function(){return cToolbar.load({mobileRightButton:"email",snapchatRelUrl:"",facebookUsername:"knowyourmeme",facebookName:"Know Your Meme",twitterHandle:"knowyourmeme",twitterName:"Know Your Meme",instagramHandle:"knowyourmeme",instagramName:"Know Your Meme",youtube:"knowyourmeme",youtubeDisplayName:"knowyourmeme",desktopBackground:"solid",desktopSocialButtons:[],channel:"",mobileVideo:"",videoCollapsed:""})},i=document.createElement("script"),i.type="text/javascript",i.async=!0,i.src="https://toolbar.complex.com/dist/ctoolbar.min.js",document.body.appendChild(i)):void 0},init_desktop:function(){return"undefined"!=typeof CMNUNT&&null!==CMNUNT?($(document).on("cmnUNT-ad-requested",function(t){var e,n,i,o;return n=t.originalEvent,i=n.detail.containerId,e=$("#"+i),e.data("trigger-refresh")&&e.btf()?(o=["cmn_ad_toolbar"],"both"===e.data("trigger-refresh")&&o.push("rectangle-unit-sticky"),CMNUNT.refreshAds(o)):void 0}),$(document).on("cmnUNT-ad-load",function(t){var e,n;return e=t.originalEvent,"100x100"===e.detail.adSize?(n=e.detail.containerId,$("#"+n).css({"margin-bottom":"20px","padding-bottom":"20px","border-bottom":"1px solid #dcdcdc"})):void 0})):void 0},init_mobile:function(){return"undefined"!=typeof CMNUNT&&null!==CMNUNT?($(".content-unit-refresh-wrapper").bind("enterviewport",function(){var t,e;return $(this).hasClass("seen")||(e=$(this).find(".complex-ad").attr("id"),t=$("#"+e),t.btf()&&allow_toolbar_refresh===!0&&CMNUNT.refreshAds(["cmmobadtag_toolbar"])),$(this).addClass("seen")}).bullseye(lazy_load_offset()),$("body").on("click","#cmn-mob-banner_close",function(){return window.allow_toolbar_refresh=!1})):void 0},load:function(){return"undefined"!=typeof CMNUNT&&null!==CMNUNT?$(".complex-ad:NOT(.loaded)").each(function(){var t,e;return $(this).addClass("loaded"),t=$(this).data("name"),e=$(this).data("options"),CMNUNT.load(t,e)}):void 0}}}.call(this),function(){$(function(){var t,e;return t=$("#connatix"),0!==t.length?(e=function(){var e,n,i;return n=t.data("src"),i=t.data("connatix-token"),e=document.createElement("script"),e.type="text/javascript",e.async=!0,e.src=n,e.setAttribute("data-connatix-token",i),document.body.appendChild(e)},$(".header-unit-wrapper").bind("leaveviewport",function(){return $(this).hasClass("offscreen")?void 0:($(this).addClass("offscreen"),e())}).bullseye()):void 0})}.call(this),function(){this.DFP={refreshable_slots:[],lightbox_slots:[],init:function(){var t,e;return t=document.getElementById("dfp-data"),null!=t?(e=document.createElement("script"),e.type="text/javascript",e.async=!0,e.src="https://www.googletagservices.com/tag/js/gpt.js",e.onload=function(){var t;return window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.deployads=window.deployads||[],t=document.createElement("script"),t.type="text/javascript",t.async=!0,t.src="https://tags-cdn.deployads.com/a/knowyourmeme.com.js",document.body.appendChild(t),googletag.cmd.push(function(){return deployads.push(function(){return deployads.gpt.pubadsDisableInitialLoad(),deployads.gpt.enableServices()})}),"desktop"===document.body.getAttribute("data-layout")?DFP.init_desktop():DFP.init_mobile(),Ad.load(),Ad.track(),register_page_segment()},document.body.appendChild(e)):void 0},init_desktop:function(){return!0},init_mobile:function(){return!0},refresh:function(t){return googletag.cmd.push(function(){return googletag.pubads().refresh([t])})},load:function(){return"undefined"==typeof googletag?!1:googletag.cmd.push(function(){return $(".complex-ad:NOT(.loaded)").each(function(){var t,e,n,i;return e=$(this).data("dfp-name"),null!=e&&(t=$(this).attr("id"),i="/1025485/"+e,n=$(this).data("dfp-size"),i=googletag.defineSlot(i,n,t).addService(googletag.pubads()),$(this).data("dfp-refreshable")&&DFP.refreshable_slots.push(i),"kym_lightbox_mediumrect"===e&&DFP.lightbox_slots.push(i),deployads.push(function(){return deployads.gpt.display(t)}),$(this).data("dfp-lazy")?$(this).bind("enterviewport",function(){return $(this).hasClass("seen")||deployads.push(function(){return deployads.gpt.pubadsRefresh([i])}),$(this).addClass("seen")}).bullseye(lazy_load_offset()):deployads.push(function(){return deployads.gpt.pubadsRefresh([i])})),$(this).addClass("loaded")})})},refresh:function(){var t;return(null!=(t=DFP.refreshable_slots)?t.length:void 0)?googletag.cmd.push(function(){return deployads.push(function(){return deployads.gpt.pubadsRefresh(DFP.refreshable_slots)})}):void 0},new_page_signal:function(){return"undefined"==typeof deployads?!1:deployads.push(function(){return deployads.newPage()})},refresh_lightbox:function(){return deployads.push(function(){return deployads.newPage(),deployads.gpt.pubadsRefresh(DFP.lightbox_slots)})},destroy_lightbox:function(){return deployads.push(function(){return deployads.gpt.destroySlots(DFP.lightbox_slots),DFP.lightbox_slots=[]})},set_page_segment:function(t){return"undefined"==typeof deployads?!1:(deployads.push(function(){return deployads.pageSegment=t}),"undefined"==typeof googletag?!1:googletag.cmd.push(function(){return googletag.pubads().setTargeting("pageSegment",t)}))}}}.call(this),function(){this.gaTrackEvent=function(t,e,n){return ga("send","event",t,e,n,{nonInteraction:!0}),$("body").hasClass("production")?void 0:console.log(""+t+" - "+e+" - "+n)},this.gaTrackInteractionEvent=function(t,e,n){return ga("send","event",t,e,n),$("body").hasClass("production")?void 0:console.log(""+t+" - "+e+" - "+n+" (Interaction)")},$(function(){var t;return t=location.href,$("#logo").on("click",function(){return gaTrackEvent("Navigation Clicks","Logo",t)}),$("#navigation .top-level > a").on("click",function(){var e,n;return n=$(this).text().replace(/\s+/g,""),e=$(this).data("custom"),n=null!=e?"("+e+") "+n:n,gaTrackEvent("Navigation Clicks",n,t)}),$("#navigation .dropdown a").on("click",function(){var e,n;return n=$(this).parents(".top-level").find("> a").text().replace(/\s+/g,""),e=$(this).data("custom"),n=null!=e?"("+e+") "+n:n,gaTrackEvent("Navigation Clicks",""+n+" - "+$(this).text(),t)}),$("#popular_galleries a").on("click",function(){var t;return t=$(this).attr("href").replace("https://knowyourmeme.com",""),gaTrackEvent("Popular Gallery Clicks",$("body").data("ad-page-type"),t)}),$("#researching-entries a").on("click",function(){var e;return e=$(this).attr("href"),gaTrackEvent("Sidebar Researching Entries Clicks",e,t)}),$("#top_searches a").on("click",function(){var t,e;return t=$(this).attr("data-context"),e=$(this).attr("data-q"),gaTrackEvent("Top Searches Clicks",t,e)}),$(".random_button").on("click",function(){var e;return e="Entry",$(this).hasClass("Image")&&(e="Image"),$(this).hasClass("Video")&&(e="Video"),gaTrackEvent("Buttons","Random "+e,t)}),$("#leaderboard li a").on("click",function(){var e;return e=$(this).parents("li").data("index"),gaTrackEvent("Featured Items","Click",t),gaTrackEvent("Featured Items","Item",$(this).attr("href")),gaTrackEvent("Featured Items","Index",e)}),$("#trending_photos a").on("click",function(){var t;return t=$(this).attr("href").replace("https://knowyourmeme.com",""),gaTrackEvent("Trending Photos",$("body").data("ad-page-type"),t)}),$(".search_sort_options_sidebar a").on("click",function(){var e;return e=$(this).data("sort"),gaTrackEvent("Sidebar Image Sort Clicks",e,t)}),$(".media_arrow").on("click",function(){var e;return e="Next",$(this).hasClass("prev_media")&&(e="Previous"),gaTrackEvent("Media Bar",e,t)}),$("#media_arrows .gallery-button").on("click",function(){return gaTrackEvent("Media Bar","Gallery",t)}),$("#media_arrows .random-media-button").on("click",function(){return gaTrackEvent("Media Bar","Random",t)}),$(".related_memes a").on("click",function(){return gaTrackEvent("Related Memes","Click",t)}),$("#fewer-ponies").on("click",function(){return gaTrackEvent("Buttons","Fewer Ponies",t)}),$(".upload-additional-media-button a").on("click",function(){var e;return e=$(this).text().match(/image/i)?"Image":"Video",gaTrackEvent("Sidebar Add "+e+" Button Click",t)}),$(".newsfeed-stamp").on("click",function(){var t,e;return t=$(this).parents("article").data(),e=t.type,gaTrackEvent("Newsfeed",""+e+": Stamp Click",$(this).attr("href"))}),$(".newsfeed-title").on("click",function(){var t,e,n;return t=$(this).parents("article").data(),n=t.type,e=t.title,gaTrackEvent("Newsfeed",""+n+": Title Click",$(this).attr("href")),gaTrackEvent("Newsfeed Posts",""+e+" ("+n+")","Title")}),$(".newsfeed-image").on("click",function(){var t,e,n;return t=$(this).parents("article").data(),n=t.type,e=t.title,gaTrackEvent("Newsfeed",""+n+": Thumbnail Click",$(this).attr("href")),gaTrackEvent("Newsfeed Posts",""+e+" ("+n+")","Thumbnail")}),$(".newsfeed-more").on("click",function(){var t,e;return t=$(this).parents("article").data(),e=t.type,gaTrackEvent("Newsfeed",""+e+": More Click",$(this).attr("href"))}),$(".newsfeed-comments").on("click",function(){var t,e,n;return t=$(this).parents("article").data(),n=t.type,e=t.title,gaTrackEvent("Newsfeed",""+n+": Comments Click",$(this).attr("href")),gaTrackEvent("Newsfeed Posts",""+e+" ("+n+")","Comments")}),$(".newsfeed-tags a").on("click",function(){var t,e,n,i;return t=$(this).parents("article").data(),i=t.type,e=$(this).data("tag"),n=t.title,gaTrackEvent("Newsfeed",""+i+": Tag Click",e),gaTrackEvent("Newsfeed Posts",""+n+" ("+i+")","Tags")}),$(".nf_item .favorite").on("click",function(){var t,e;return t=$(this).parents("article").data(),e=t.type,gaTrackEvent("Newsfeed",""+e+": Favorite Click",$(this).attr("href"))}),$(".nf_item .stats a").on("click",function(){var t,e;return t=$(this).parents("article").data(),e=t.type,gaTrackEvent("Newsfeed",""+e+": Stats Click",$(this).attr("href"))}),$(".related-photos a").on("click",function(){return gaTrackEvent("Related Photos",t,$(this).attr("href"))}),$(".recent-images a").on("click",function(){return gaTrackEvent("Entry Recent Images Thumbnail Click",t,$(this).attr("href"))}),$(".recent-videos a").on("click",function(){return gaTrackEvent("Entry Recent Videos Thumbnail Click",t,$(this).attr("href"))}),$(".entry-category-badge").on("click",function(){var e;return e=$(this).text(),gaTrackEvent("Entry Category Badge Click",e,t)}),$(".entry-type-link").on("click",function(){var e;return e=$(this).text(),gaTrackEvent("Entry Type Click",e,t)}),$('#entry_body a[href*="/memes/"]').on("mouseover",function(){return gaTrackEvent("Entry Body Link Hover",t,$(this).attr("href"))}),$('#entry_body a[href*="/memes/"]').on("click",function(){return gaTrackEvent("Entry Body Link Click",t,$(this).attr("href"))}),$("#top-entries-sidebar a").on("click",function(){var e,n,i;return"view-more-top-entries-button"===$(this).attr("id")?(i=$(this).data(),n="Top Entries Widget ("+i.time+" - "+i.originalCategory+") - View More",gaTrackEvent(n,t)):(i=$(this).parents(".top-entry").data(),n="Top Entries Widget ("+i.time+" - "+i.originalCategory+")",e=""+i.entry+" ("+i.entryCategory+") (Group "+i.group+")",gaTrackEvent(n,e,t))}),$(".entry-sort-options a").on("click",function(){return gaTrackEvent("Entry Sort Option Click",$(this).text(),t)}),$(".category-sort-options a").on("click",function(){return gaTrackEvent("Category Sort Option Click",$(this).text(),t)}),$("#entry-categories-sidebar a").on("click",function(){var e;return e=$(this).data("category"),gaTrackEvent("Category Sidebar Click",e,t)}),$(".large-category-badge").on("click",function(){var t;return t=$(this).data("category"),gaTrackEvent("Categories Index","Category Click",t)}),$(".large-type-badge").on("click",function(){var t;return t=$(this).data("type"),gaTrackEvent("Categories Index","Type Click",t)}),$(".type-sort-options a").on("click",function(){return gaTrackEvent("Type Sort Option Click",$(this).text(),t)}),$(".top-news a").on("click",function(){return gaTrackEvent("Top News Click",$(this).attr("href"),t)}),$("body").on("click",".promotion-widget",function(){var e;return e=$(this).data("name"),gaTrackEvent("Promotions",e,t)}),$("#user-rankings a").on("click",function(){var e,n;return n=$(this).data("type"),e=$(this).data("range"),gaTrackEvent("Rankings Widget Clicks",""+n+" - "+e,t)}),$("#user-rankings-all-time a").on("click",function(){var e;return e=$(this).data("type"),gaTrackEvent("Rankings Widget Clicks",""+e+" - All Time",t)}),$(".collection-item a > img").on("click",function(){var e;return e=$(this).parents("a"),gaTrackEvent("Collection Blog Post Image Clicks",t,e.attr("href"))}),$(".collection-item .source a").on("click",function(){var e,n;return n=$(this).text(),e=$(this).attr("href"),gaTrackEvent("Collection Blog Post Source Clicks",t,""+n+" - "+e)}),$(".auto-link").on("mouseover",function(){return gaTrackEvent("Autolink Hover",$(this).text().toLowerCase(),t)}),$(".auto-link").on("click",function(){return gaTrackEvent("Autolink Click",$(this).text().toLowerCase(),t)}),$("#entry-gallery-tabs a").on("click",function(){return gaTrackEvent("Entry Gallery Tab Click",$(this).text(),t)}),$("#search-tabs a").on("click",function(){var e;return e=$(this).text(),e=e.split(/\n/),e=e.length>1?e[1]:e[0],gaTrackEvent("Search Tab Click",e,t)}),$("#image-gallery-tabs a").on("click",function(){return gaTrackEvent("Image Gallery Tab Click",$(this).text(),t)}),$("#video-gallery-tabs a").on("click",function(){return gaTrackEvent("Video Gallery Tab Click",$(this).text(),t)}),$("#profile-tabs a").on("click",function(){return gaTrackEvent("Profile Tab Click",$(this).text(),t)}),$("#category-tabs a").on("click",function(){return gaTrackEvent("Category Tab Click",$(this).text(),t)}),$("#type-tabs a").on("click",function(){return gaTrackEvent("Type Tab Click",$(this).text(),t)}),$(".kym-image").on("click",function(){var t,e;return e="UGC KYM Thumbnail Click",t=$(this).hasClass("image-auto-link"),t&&(e=""+e+" (autolink)"),gaTrackEvent(e,$("body").data("ad-page-type"),$(this).parents("a").attr("href"))}),$("#search_form").on("submit",function(){return gaTrackEvent("Search Form Submissions",$("#search_box").val(),t)}),$("#search_box").on("focus",function(){return gaTrackEvent("Search Form Focus",t)}),$(".heading-toggle").on("click",function(){var e;return e=$.trim($(this).text()),gaTrackEvent("Heading Toggle",e,t)}),$('.external-link:not([rel="nofollow"])').on("click",function(){return gaTrackEvent("External Link Clicks",$(this).text(),t)}),$("body").on("click","a",function(){var e;return e=$(this).prop("hostname"),null==e||0===e.length||e.match(/localhost|knowyourmeme|kym-cdn/i)?void 0:(gaTrackEvent("Outbound Link Clicks (Source)",e,t),gaTrackEvent("Outbound Link Clicks (Destination)",e,$(this).prop("href")))})})}.call(this),function(){$(function(){var t;return t=$(".auto-link").length,0!==t&&$(".show-auto-links").text("Autolinks ("+t+")"),$(".show-auto-links").on("click",function(){return $(".auto-link").css({background:"gold",color:"black","font-family":"courier new","font-size":"175%"}),alert("autolinks highlighted")})})}.call(this),function(){$(function(){return"undefined"!=typeof nv&&null!==nv?$(".line-with-focus-chart").each(function(){var t;return t=$(this),nv.addGraph(function(){var e;return e=nv.models.lineWithFocusChart().margin({left:65,right:30,top:10}).forceY(0).showLegend(!1).interpolate("monotone").useInteractiveGuideline(!0).xScale(d3.time.scale()).clipEdge(!1),e.xAxis.tickFormat(function(t){return d3.time.format("%x")(new Date(t))}),e.x2Axis.tickFormat(function(t){return d3.time.format("%x")(new Date(t))}),e.yAxis.tickFormat(d3.format(",f")),e.y2Axis.tickFormat(d3.format(",f")),e.legend.vers("furious"),d3.select("#"+t.attr("id")+" svg").datum(t.data("graph-data")).transition().duration(500).call(e),nv.utils.windowResize(e.update),e})}):void 0})}.call(this),function(){this.Comment={load:function(t,e){return null==e&&(e=1),$("#comments-list").hide().html(t).fadeIn(),$("#comments-list .pagination a").each(function(){return $(this).attr("data-remote","true")}),$("#comments-list .pagination a").bind("click",function(t){return"Microsoft Internet Explorer"===navigator.appName&&($(this).callRemote(),t.preventDefault()),$("#comments-list .pagination").html("Loading moar comments…")}),$("#comments-list").trigger("comments-loaded"),$("body").trigger("thumbs-loaded"),$("#comments-list .timeago").timeago(),gaTrackEvent("Comments Loaded",$("body").data("ad-page-type"),e),Ad.load(),Ad.refresh(),"undefined"!=typeof CMNUNT&&null!==CMNUNT&&e>1&&CMNUNT.refreshAds(["cmn_ad_toolbar","rectangle-unit-sticky"]),sticky_sidebar()},add:function(t,e,n,i){var o,r,s,a;return $.colorbox.close(),"0"===n?$("#comments-list").prepend(t):(o=$("#comments-list #"+n),o.find(".comment-reply-form").remove(),o.find(".reply-link").show(),s=$("#comments-list #"+i),$("body").hasClass("comments_show")?$(".comment-replies").append(t):(r=$("#"+i+"-replies"),r.length>0?r.append(t):(s.after(""),$("#"+i+"-replies").append(t)))),$("#"+e).effect("highlight",{},2500).find(".timeago").timeago(),a=parseInt($("#comments .nb").text())+1,$("#comments .nb").text(""+a+" total"),$.scrollTo("#"+e,100,{offset:-100}),$("#comment_comment").val(""),$("#comments-list").trigger("comments-loaded"),$("body").trigger("thumbs-loaded")},"delete":function(t){var e,n;return e=$("#"+t+", #"+t+"-replies, #"+t+"-view-more"),e.animate({height:"toggle"},500),n=parseInt($("#comments .nb").text())-1,$("#comments .nb").text(""+n+" total")}},$(function(){var t,e,n;return t=function(t){var e,n,i,o,r,s;return r=t.data("nsfw")===!0,n=-10>=t.data("score"),r||n?(s="marked as NSFW ",i="buried ",o=r?s:i,r&&n&&(o=""+s+" and "+i),e=t.find(".message"),e.data("original-comment",e.html()),e.html("This comment has been "+o+".
")):void 0},e=function(t){return t.find(".reply-link").remove()},n=function(){var t;return t=$("#comments").data("wall-owner-id"),$(".delete-comment, .nsfw-comment").each(function(){var e,n;if(User.LoggedIn)return e=$(this).parents(".comment").data("owner-id"),User.Admin||User.CommentMod||(n=User.Id)===e||n===t?$(this).show():void 0})},$("#comments-list, #top-comments").on("comments-loaded",function(){return $(this).find(".spoiler").before(function(){var t;return t=$(this).attr("title")?$(this).attr("title"):"Spoiler"," "}),$("#comments-list .spoiler-button, #top-comments .spoiler-button").on("click",function(){var t;return t=$(this).next(),t.find("img").trigger("unveil"),t.toggle()}),$(this).find(".comment").each(function(){return $("#allow-comments").data("allow")||e($(this)),t($(this))}),n(),$("#comments-list img").unveil()}).trigger("comments-loaded"),$("#comments-list, #top-comments").on("comment-marked",".comment",function(){return t($(this))}),$("#comments-list, #top-comments").on("click",".show-comment",function(){var t,e;return t=$(this).parents(".comment"),e=t.find(".message"),e.html(e.data("original-comment")),e.find("img").unveil()}),$('a[href="#comments_form"]').on("click",function(){return User.LoggedIn?$('a[href="#comments_form"]').colorbox({inline:!0,scrolling:!1,opacity:.9,returnFocus:!1,onComplete:function(){return $("#comment_comment").focus()}}):$('a[href="#comments_form"]').on("click",function(){return $.loginPrompt()})}),$("#comments-list").on("click",".reply-link",function(t){var e,n,i,o;return t.preventDefault(),User.LoggedIn?(o=$(this).data("comment-id"),i=$("#comments-list #comment_"+o),i.find(".reply-link").hide(),n=e=$("#comment-reply-form").clone(),n.removeAttr("id"),n.find(".comment-parent-id").val(o),n.appendTo(i.find(".comment_body")).show(),n.find("textarea").val("").focus()):$.loginPrompt()}),$("#comments-list, #top-comments").on("mouseenter",".in-reply-to-link",function(){return $(".comment[data-id="+$(this).data("parent-id")+"]").css({background:"#fff0b3"})}),$("#comments-list, #top-comments").on("mouseleave",".in-reply-to-link",function(){return $(".comment[data-id="+$(this).data("parent-id")+"]").css({background:"white"})}),$("#comments-list, #top-comments").on("click",".in-reply-to-link",function(){var t;return 0!==$(".floating-bar").length?(t=$(this).attr("href"),$.scrollTo(t,250,{offset:-70})):void 0})})}.call(this),function(){$(function(){return $("article").on("click",".eggo_de_easter",function(t){var e,n;return t.preventDefault(),window.location.href.match(/don/)?(e="",$("body").prepend(e)):User.LoggedIn?$.ajax({url:"/easter_eggs/found",data:$(this).data(),type:"post",success:function(t){return e="",$("body").prepend(e),$("#eggo_de_easter_victory").on("click","#eggo_dismiss",function(){return $("#eggo_de_easter_victory").hide()})}}):(n="",$("body").prepend(n))}),$.each($(".eggo_de_easter"),function(){return $.ajax({url:"/easter_eggs/planted",data:$(this).data(),success:function(t){return $(".eggo_de_easter").data(t)}})})})}.call(this),function(){$(function(){return $(".editorial-colorbox").colorbox({rel:"editorial-colorbox"}),$("#view-more-meme-reviews-button").on("click",function(){return $(this).remove(),$("#meme-reviews tr").removeClass("hidden"),$("#meme-reviews img").unveil()})})}.call(this),function(){$(function(){0===$("#single-comment-notice").length&&($(".spoiler").before(function(){var t;return t=$(this).attr("title")?$(this).attr("title"):"Spoiler"," "}),$(".spoiler-button").on("click",function(){var t;return t=$(this).next(),t.find("img").trigger("unveil"),t.toggle()})),$(".entry-expand-editors-button").on("click",function(){return $(this).parents("#author_info").find(".hide").removeClass("hide"),$(this).remove()}),$("#view-more-top-entries-button").on("click",function(){return $("#top-entries-sidebar .more").remove(),$("#top-entries-sidebar .entry-group-2").show(),$("#top-entries-sidebar img").unveil()}),$(".entry-grid-body.infinite").infiniteScroll({append:".entry-grid-body tr",path:"#infinite-scroll-wrapper .pagination .next_page",history:"push"}),$(".entry-grid-body.infinite").on("append.infiniteScroll",function(t,e,n,i){var o,r,s,a,l;return sticky_sidebar(),$(i).find("img").unveil(90),a=$(this).data("infiniteScroll"),l=a.pageIndex,s=location.href,r=$("body").data("controller-action"),o="Infinite Scroll",r.match(/^entries-/)&&(o+=" (Entry MPP)"),r.match(/^categories-/)&&(o+=" (Category SPP)"),r.match(/^entry_types-/)&&(o+=" (Type SPP)"),r.match(/^search-/)&&(o+=" (Entry Search)"),gaTrackInteractionEvent(o,s,l),ga("send","pageview",a.getPath()),Ad.load(),Ad.refresh(),"undefined"!=typeof CMNUNT&&null!==CMNUNT?1===l?CMNUNT.refreshAds(["cmn_ad_toolbar"]):CMNUNT.refreshAds(["cmn_ad_toolbar","rectangle-unit-sticky"]):void 0}),$(".entry-grid-body.infinite").on("last.infiniteScroll",function(){var t;return t=' ',$(this).after(t)})})}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};this.parse_favorites=function(){return User.LoggedIn?$(".favorite").each(function(){var e,n,i;return n=$(this).data("item-type"),e=$(this).data("item-id"),i=t.call(User.Favorites[n],e)>=0?"on":"off",$(this).addClass(i)}):void 0},$(function(){return parse_favorites()})}.call(this),function(){$(function(){return $("#content").on("click",".filtering",function(t){var e,n,i,o;return 0!==$("#spp-gallery").length?(t.preventDefault(),"nsfw_toggle"===$(this).attr("id")?n="nsfw":"subculture_toggle"===$(this).attr("id")&&(n="subcultures"),e=$("#spp-gallery").data(n),$("#spp-gallery").data(n,!e),i=$("#spp-gallery").data("initial-path"),o=i+"&"+n+"="+!e,$.ajax({url:o,beforeSend:function(){return $("#photo_gallery").hide("slide",400)},success:function(){return $("#photo_gallery").hide().show("slide",300),$.scrollTo("#spp-gallery",500)}})):void 0}),$("body").on("photos-loaded","#photo_gallery",function(){return $("#spp-gallery").data("nsfw",$("#nsfw_toggle").hasClass("green")),$("#spp-gallery").data("subcultures",$("#subculture_toggle").hasClass("green"))})})}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};$(function(){return $(".edit-delete-post").each(function(){var t;if(User.LoggedIn)return t=$(this).parents(".forum_post").data("owner-id"),User.Admin||User.ForumMod||User.Id===t?$(this).show():void 0}),$(".show-post").on("click",function(){return $(this).parents(".forum_post").find(".low_karma").each(function(){return $(this).removeClass("low_karma"),$(this).hasClass("flash")?$(this).remove():void 0})}),$(".vote").on("click",function(t){return $(this).loginRequired()?($.loginPrompt(),t.preventDefault(),!1):void 0}),User.LoggedIn?$(".forum_post").each(function(){var e;return e=$(this).data("id"),t.call(User.Karma.up,e)>=0?($(this).find(".upvote, .downvote").attr("href","javascript:;").removeAttr("data-remote").removeAttr("data-method"),$(this).find(".downvote").css("opacity","0.1")):t.call(User.Karma.down,e)>=0?($(this).find(".upvote, .downvote").attr("href","javascript:;").removeAttr("data-remote").removeAttr("data-method"),$(this).find(".upvote").css("opacity","0.1")):$(this).data("owner-id")===User.Id?($(this).find(".buttons").hide(),$(this).find(".karma").css("margin-left","-6px")):void 0}):void 0})}.call(this),function(){$(function(){var t,e;return"undefined"!=typeof __cmp&&null!==__cmp?(t=new MutationObserver(function(t){return $.each(t,function(t,e){return $(e.addedNodes).hasClass("qc-cmp-ui-container")?gaTrackEvent("Quantcast Choice","Impression",window.location.href):void 0})}),t.observe(document.body,{childList:!0}),e=function(){return __cmp("setConsentUiCallback",function(t){return t.uiShown?__cmp("getPublisherConsents",null,function(t){var e;return e=t.standardPurposeConsents[3],gaTrackEvent("Quantcast Choice","Consent ("+e+")",window.location.href)}):void 0})},e(),$("#gdpr-change-consents").on("click",function(){return e(),__cmp("displayConsentUi")})):void 0})}.call(this),function(){String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},this.commify=function(t){return t.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g,",")},this.numberToHuman=function(t){return isNaN(t)?0:1e3>t?t:1e4>t?Math.round(10*(t/1e3))/10+"k":Math.round(t/1e3)+"k"},this.User={LoggedIn:!1,Admin:!1,Favorites:{Entry:[],Photo:[],Video:[],Comment:[],ForumTopic:[]}}}.call(this),function(){this.infinite_gallery=function(){return $("#photo_gallery.infinite").infiniteScroll({path:"#infinite-scroll-wrapper .pagination .next_page",append:"#infinite-scroll-wrapper .item, #infinite-scroll-wrapper .combo-wrapper",history:"push"}),$("#photo_gallery.infinite").on("append.infiniteScroll",function(t,e,n,i){var o,r,s,a,l,u;return a=$(this).data("infiniteScroll"),l=a.pageIndex,s=location.href,r=$("body").data("controller-action"),o="Infinite Scroll","photos-show"===r&&(o+=" (Image SPP)"),"videos-show"===r&&(o+=" (Video SPP)"),"entries-show"===r&&(o+=" (Entry SPP)"),"search-index"===r&&(o+=" (Image Search)"),gaTrackInteractionEvent(o,s,l),ga("send","pageview",a.getPath()),u=$("body").data("ad-page-type"),Ad.load(),Ad.refresh(),Ad.new_page_signal(),"undefined"!=typeof CMNUNT&&null!==CMNUNT&&(2===l&&false===u?CMNUNT.refreshAds(["cmn_ad_toolbar"]):CMNUNT.refreshAds(["cmn_ad_toolbar","rectangle-unit-sticky"])),$("#photo_gallery").masonry("appended",$(i).trigger("photos-loaded")),$(i).find("img").unveil(90),sticky_sidebar()}),$("#photo_gallery.infinite").on("last.infiniteScroll",function(){var t;return t=' ',$(this).after(t),$(".pagination").css("visibility","hidden")})},this.lazy_load_offset=function(){return{offsetTop:-250}},$(function(){return 0!==$("#infinite-scroll-wrapper").length&&$("#infinite-scroll-wrapper .pagination").css("visibility","hidden"),infinite_gallery()})}.call(this),function(){$(function(){var t,e,n,i,o,r,s,a,l;return t=location.href,n=function(t){return $(t.target).is("input, textarea")||t.metaKey||t.ctrlKey},a=function(e,n){return gaTrackEvent(e,n,t)},($("body").hasClass("photos_show")||$("body").hasClass("videos_show"))&&(r=$(".prev_media"),i=$(".next_media"),e=$(".gallery-button"),s=$(".random-media-button"),$(document).on("keydown",function(t){if(!n(t))switch(t.which){case 37:if(0!==r.length)return a("Keyboard Shortcuts","Left Arrow"),window.location=r.attr("href"),t.preventDefault();break;case 39:if(0!==i.length)return a("Keyboard Shortcuts","Right Arrow"),window.location=i.attr("href"),t.preventDefault();break;case 71:if(0!==e.length)return a("Keyboard Shortcuts","G (Gallery)"),window.location=e.attr("href"),t.preventDefault();break;case 82:return a("Keyboard Shortcuts","R (Random)"),window.location=s.attr("href"),t.preventDefault()}})),$("body").hasClass("entries_show")&&(o=$(".entry-photos-button"),l=$(".entry-videos-button"),$(document).on("keydown",function(t){if(!n(t))switch(t.which){case 73:if(0!==o.length)return a("Keyboard Shortcuts","I (Image Gallery)"),window.location=o.attr("href"),t.preventDefault();break;case 82:return a("Keyboard Shortcuts","R (Random)"),window.location="/memes/random",t.preventDefault();case 86:if(0!==l.length)return a("Keyboard Shortcuts","V (Video Gallery)"),window.location=l.attr("href"),t.preventDefault()}})),$("body").hasClass("videos_index")&&$(document).on("keydown",function(t){var e;
return n(t)||82!==t.which?void 0:(e=$("#videos_list .video"),a("Keyboard Shortcuts","R (Random)"),window.location=e[Math.floor(Math.random()*e.length)].href,t.preventDefault())}),$("body").hasClass("photos_index")?$(document).on("keydown",function(t){var e;return n(t)||82!==t.which?void 0:(e=$("#photo_gallery .photo"),a("Keyboard Shortcuts","R (Random)"),window.location=e[Math.floor(Math.random()*e.length)].href,t.preventDefault())}):void 0})}.call(this),$(function(){$.fn.extend({loginRequired:function(){return $("body").hasClass("guest")&&$(this).hasClass("user")}}),$.loginPrompt=function(){$("#login_signup_form").length>0?($.colorbox({href:"#login_signup_form",inline:!0,scrolling:!1,opacity:.9}),window.photoColorboxed&&window.photoColorboxed(!0)):location.href="/login"},$("form").on("submit",function(){return $(this).loginRequired()&&!$(this).attr("data-remote")?($.loginPrompt(),!1):void 0}),$("form").on("submit",function(){return errors=0,$(this).find("input[required], textarea[required]").each(function(){0==$(this).val().length?($(this).addClass("missing_field"),errors++):$(this).removeClass("missing_field")}),errors>0?(alert("Please fill in the required fields."),!1):void 0})}),function(){this.setup_masonry_gallery=function(){var t;return t=$("#photo_gallery"),t.masonry({itemSelector:".item, .combo-wrapper",transitionDuration:0})},$(function(){return setup_masonry_gallery()})}.call(this),function(){this.sticky_sidebar=function(){var t;return t=$(".sticky-sidebar"),0!==t.length?t.scrollChaser({wrapper:"#content",offsetTop:10,throttle:50}):void 0},$(function(){return $("img").unveil(),sticky_sidebar(),0===location.hash.length||location.hash.match(/^\./)||$("body").hasClass("entries_show")&&setTimeout(function(){return $.scrollTo(location.hash,100,{offset:-70})},500),$('#entry_body a[href^="#"]').click(function(){var t;return t=$(this).attr("href"),$.scrollTo(t,250,{offset:-70})}),$(".name").click(function(){var t;return t=$(this).prev(),t.attr("checked",!t.attr("checked"))}),$(".timeago").timeago(),$(".flash a.close").on("click",function(){return $(this).parents(".flash").slideUp(100,function(){return $(this).remove()})}),$(".floating-fixed").floatingFixed(),$(".footnote-superscript").each(function(){var t,e;return t=$(this).attr("href").replace("#",""),e=$("#"+t+" .footnote-text").html()||"An error occurred. ",$(this).attr("title",e)}),$(".footnote-superscript").tooltip({tipClass:"tooltip-citation"}),$(".media-arrow-tooltip").tooltip({offset:[0,5],position:"center right",tipClass:"tooltip"}),$(".random-media-button, .gallery-button").tooltip({offset:[-5,0],tipClass:"tooltip"}),$(".newsfeed-stamp-tooltip").tooltip({tipClass:"tooltip tooltip-newsfeed-stamp",offset:[-5,0]}),$(".profile-badge").tooltip({offset:[-5,0]}),$(".origin-entry-summary").tooltip({offset:[5,0],position:"bottom center",tipClass:"tooltip"}),$(".expandable").each(function(){return 250>$(this).prop("scrollHeight")?($(this).css("min-height","none"),$(this).find(".expand-button").remove()):void 0}),$(".expandable .expand-button").on("click",function(){return $(this).parents(".expandable").css("max-height","none"),$(this).remove()}),$(".caption").captionjs(),$(document).on("cbox_load",function(){return $("#cboxPrevious, #cboxNext, #cboxClose").tooltip()}),$(".eobf").each(function(){var t;return t=$(this).text(),t=t.replace(" (at) ","@"),t=t.replace(" (dot) ","."),$(this).replaceWith(""+t+" ")}),$(".aeobf").each(function(){var t;return t=$(this).data("e"),t=t.replace(" (at) ","@"),t=t.replace(" (dot) ","."),$(this).attr("href","mailto:"+t)})})}.call(this),function(){$(function(){return $(".nf_item iframe").each(function(){return $(this).parents("p").css("text-align","center")}),$("#feed_items.newsfeed").infiniteScroll({path:".pagination .next_page",append:"#feed_items > article, #feed_items > div"}),$("#feed_items.newsfeed").on("append.infiniteScroll",function(t,e,n,i){var o,r,s;return $(i).find("img").unveil(),r=$("#feed_items.newsfeed").data("infiniteScroll"),s=r.pageIndex,o=location.href,gaTrackInteractionEvent("Infinite Scroll (Newsfeed)",o,s),ga("send","pageview","/page/"+s),Ad.load(),"undefined"!=typeof CMNUNT&&null!==CMNUNT&&CMNUNT.refreshAds(["cmn_ad_toolbar","rectangle-unit-sticky"]),getAllFacebookShareCounts()}),0!==$("#feed_items.newsfeed").length&&$("#feed_items.newsfeed .pagination").css("visibility","hidden"),$("#disable-infinite-scroll-button a").on("click",function(){var t;return t=$(this).find("i"),t.hasClass("fa-square-o")?($(this).removeClass("red"),$(this).addClass("green"),t.removeClass("fa-square-o"),t.addClass("fa-check-square-o"),$("#feed_items.newsfeed").infiniteScroll("option",{loadOnScroll:!0}),$(".infinite").infiniteScroll("option",{loadOnScroll:!0})):($(this).removeClass("green"),$(this).addClass("red"),t.removeClass("fa-check-square-o"),t.addClass("fa-square-o"),$("#feed_items.newsfeed").infiniteScroll("option",{loadOnScroll:!1}),$(".infinite").infiniteScroll("option",{loadOnScroll:!1}))})})}.call(this),function(){this.SPPGallery={load:function(t){var e,n,i;return $("#spp-gallery").html(t),$("#spp-gallery img").unveil(),$("#photo_gallery").trigger("photos-loaded"),infinite_gallery(),setup_masonry_gallery(),n=$("body").data("controller-action"),e="SPP Gallery Loaded","photos-show"===n&&(e+=" (Image)"),"videos-show"===n&&(e+=" (Video)"),"entries-show"===n&&(e+=" (Entry)"),gaTrackInteractionEvent(e,location.href),i=$("#spp-gallery").data("gallery-path"),ga("send","pageview",i),"undefined"!=typeof CMNUNT&&null!==CMNUNT?CMNUNT.refreshAds(["cmn_ad_toolbar","rectangle-unit-sticky"]):void 0}},$(function(){return $("body").on("photos-loaded","#photo_gallery",function(){var t;return t=window.location.search.match(/slideshow=1/i)?!0:!1,$(this).find("a.photo").each(function(){return $(this).colorbox({slideshow:t,slideshowSpeed:5e3,href:$(this).data("colorbox-url"),current:"{current}|{total}",opacity:1,scrolling:!1,transition:"none",onOpen:function(){return $("#colorbox").hide()},onComplete:function(){return $("#colorbox").fadeIn(200),parse_favorites(),parse_thumbs(),parsePins(),window.photoColorboxed()},onClosed:function(){return window.photoColorboxed(!0)}})})}),$("#photo_gallery").trigger("photos-loaded"),$(".photo_embed").on("click",function(){return $(this).focus().select()}),$("#spp-gallery").bind("enterviewport",function(){return $(this).hasClass("loaded")?void 0:($(this).addClass("loaded"),$.get($(this).data("initial-path")))}).bullseye()}),window.lightboxAdWrapperId="lightbox-ad-wrapper",window.lightboxAdCounter=1,window.lightboxIsFirstOpened=!1,window.photoColorboxed=function(t){var e,n,i,o,r,s;return null==t&&(t=!1),i="dfp"===AdServer.name()?!0:!1,o="true"===$(".colorbox .img-container img.magnify").attr("data-img-nsfw")?!0:!1,n=["#cboxTitle","#cboxCurrent","#cboxPrevious","#cboxNext","#cboxLoadingOverlay","#cboxLoadingGraphic","#cboxClose"],$("body").css("overflow",t?"auto":"hidden"),$(n.join(",")).css("display",t?"block":"none"),$(".colorbox .img-container img.magnify").on("click",function(t){var e;return t.stopPropagation(),e=$(".colorbox .img-container img.magnify").attr("data-img-url"),e?window.open(e,"_blank"):void 0}),$(".colorbox .img-container #video_embed").on("click",function(t){return t.stopPropagation()}),t?(window.lightboxAd(!1),window.lightboxAdCounter=1):($(".closeOverlay, .left-content").on("click",function(){return $.colorbox.close()}),$("#enlargeNav-prev").on("click",function(){return $("#cboxPrevious").click()}),$("#enlargeNav-next").on("click",function(){return $("#cboxNext").click()}),s=$("#cboxCurrent").text().split("|"),e=s[0],r=s[1],$("#enlargeCurrentIndex").text(e),$("#enlargeGalleryCount").text(r),o?window.lightboxAd(!1):$("#"+window.lightboxAdWrapperId).length?0===window.lightboxAdCounter%4&&(i?DFP.refresh_lightbox():"undefined"!=typeof CMNUNT&&null!==CMNUNT&&CMNUNT.refreshAds(["rectangle-unit-lightbox"])):(window.lightboxAd(),window.lightboxIsFirstOpened&&!i&&"undefined"!=typeof CMNUNT&&null!==CMNUNT?CMNUNT.refreshAds(["rectangle-unit-lightbox"]):Ad.load(),window.lightboxIsFirstOpened=!0),window.lightboxAdCounter++)},window.lightboxAd=function(t){var e,n;return null==t&&(t=!0),n="dfp"===AdServer.name()?!0:!1,e=$("#"+window.lightboxAdWrapperId).length>0,t&&!e?$("
",{id:window.lightboxAdWrapperId,"class":"rectangle-unit-wrapper complex-ad-wrapper",style:"bottom: -10px;"}).append($("
",{id:"rectangle-unit-lightbox","class":"complex-rectangle-unit complex-ad","data-complex":!0,"data-dfp-lazy":!0,"data-dfp-name":"kym_lightbox_mediumrect","data-dfp-size":"[300, 250]","data-name":"300x250","data-options":'{"containerId":"rectangle-unit-lightbox"}'})).append($("",{"class":"bt-uid-tag",style:"display: none !important","data-uid":"5ca27af689-353"})).appendTo($("body")):!t&&e?(n&&DFP.destroy_lightbox(),$("#"+window.lightboxAdWrapperId).remove()):void 0}}.call(this),function(){}.call(this),function(){$(function(){return $("#search-helper").change(function(){var t;return t=$(this).val(),t.length?$(".search-box").each(function(){return $(this).val($(this).val()+(" "+t))}):void 0}),$(".search-box").keyup(function(){var t;return t=this,$(".search-box").each(function(){return this!==t?$(this).val($(t).val()):void 0})}),$(".sort-link-tooltip").tooltip({offset:[-5,0],tipClass:"tooltip sort-link-tooltip-text"})})}.call(this),function(){$(function(){var t,e,n,i,o,r,s,a,l,u,c,d;if(n=$("body").hasClass("production")?"kym_production":"kym_development",$("#search_form").indextank_Ize("https://rkgk.api.searchify.com",n),$("#search_box").indextank_InstantLinks({thumbnail:"icon_url",fields:"name,url,icon_url",minLength:1}),e=$("#search-tabs"),0!==e.length){for(o=e.data("query"),r=e.data("index"),t=$(".other_count"),i=t.data("count"),t.html("("+numberToHuman(i)+")"),a=function(e){var n,i,s,a;return a=e.toLowerCase(),n=$("."+a+"_count"),i=n.data("fields"),("Photo"===e||"Video"===e)&&i.unshift("__any"),i=i.join(":("+o+") OR "),s="("+i+":("+o+")) __type:("+e+")",$.ajax({url:"https://rkgk.api.searchify.com/v1/indexes/"+r+"/search",dataType:"jsonp",data:{q:s,len:1},success:function(i){var o;return n.html("("+numberToHuman(i.matches)+")"),"Editorial"===e||"Profile"===e?(o=t.data("count")+i.matches,t.data("count",o),t.html("("+numberToHuman(o)+")")):void 0}})},c=e.data("types"),d=[],l=0,u=c.length;u>l;l++)s=c[l],d.push(a(s));return d}})}.call(this),function(){this.register_page_segment=function(){var t,e,n;return n="Desktop",t=$("body").data("controller-action"),"home-index"===t?e="Newsfeed":"entries-index"===t?e="Entry_Index":"entries-all"===t?e="Entry_Index":"entries-submissions"===t?e="Entry_Index":"entries-researching"===t?e="Entry_Index":"entries-newsworthy"===t?e="Entry_Index":"entries-popular"===t?e="Entry_Index":"entries-deadpool"===t?e="Entry_Index":"entries-show"===t?e="Entry_Page":"photos-index"===t?e="Image_Gallery":"photos-trending"===t?e="Image_Gallery":"photos-most_commented"===t?e="Image_Gallery":"photos-most_favorited"===t?e="Image_Gallery":"photos-most_liked"===t?e="Image_Gallery":"photos-least_liked"===t?e="Image_Gallery":"photos-most_viewed"===t?e="Image_Gallery":"photos-show"===t?e="Image_Page":"videos-index"===t?e="Video_Gallery":"videos-trending"===t?e="Video_Gallery":"videos-most_commented"===t?e="Video_Gallery":"videos-most_favorited"===t?e="Video_Gallery":"videos-most_liked"===t?e="Video_Gallery":"videos-most_viewed"===t?e="Video_Gallery":"videos-show"===t?e="Video_Page":"categories-index"===t?e="Category_Page":"entry_types-show"===t?e="Type_Page":"editorials-index"===t?e="News_Post_Index":"editorials-show"===t&&(e="News_Post_Page"),Ad.set_page_segment(e+"_"+n)}}.call(this),function(){this.trackGooglePlusOne=function(){return gaTrackEvent("Social Buttons","Google +1",location.href)},this.getFacebookShareCount=function(t){var e;return e=decodeURI(t.data("url")),$.ajax({url:"https://graph.facebook.com",data:{fields:"share",id:e},success:function(e){var n,i,o;return null!=e.share&&(o=e.share.share_count||0,n=e.share.comment_count||0,i=parseInt(o+n),0!==i)?(t.text(commify(i)),t.show()):void 0}})},this.getAllFacebookShareCounts=function(){var t,e;return e=[],t=$(".fb-share-button-small:NOT(.loaded)"),0!==t.length?(t.each(function(){return e.push(decodeURI($(this).data("url").replace(/%23.+/,"")))}),$.ajax({url:"https://graph.facebook.com",data:{fields:"share",ids:e.join(",")},success:function(t){var e,n,i,o,r,s,a,l;l=[];for(s in t)a=t[s],null!=a.share?(r=a.share.share_count||0,i=a.share.comment_count||0,o=parseInt(r+i),n=$(".fb-share-count-small[data-url='"+s+"']"),e=n.prev(),e.addClass("loaded"),o>0&&0!==n.length?(n.text(commify(parseInt(o))),l.push(n.show())):l.push(void 0)):l.push(void 0);return l}})):void 0},this.getPinterestSaveCount=function(t){var e;return e=decodeURI(t.data("url")),$.ajax({dataType:"json",url:"https://api.pinterest.com/v1/urls/count.json",data:{url:e},complete:function(e){var n;return n=parseInt(e.responseText.match(/count":(\d+)/)[1]),n>0?(t.text(commify(n)),t.show()):void 0}})},$(function(){var t,e;return $("body").on("click",".fb-share-button, .facebook-button-colorbox, .tb-facebook-custom",function(){var t,e,n,i,o,r,s,a,l,u,c,d;return d=655,n=385,e=document.body.clientWidth||document.documentElement.clientWidth,t=document.body.clientHeight||document.documentElement.clientHeight,a=window.screenLeft||window.screenX,l=window.screenTop||window.screenY,o=(e-d)/2+a,u=(t-n)/2+l,c=$(this).attr("data-sharer-url"),r="width="+d+",height="+n+",left="+o+",top="+u,s=$(this).data("position"),i="Facebook Share",null!=s&&(i=""+i+" ("+s+")"),gaTrackEvent("Social Buttons",i,location.href),window.open(c,"",r),!1}),$(".fb-share-count").on("click",function(){return $(this).prev().click()}),e=$(".fb-share-count-large"),0!==e.length&&getFacebookShareCount(e),getAllFacebookShareCounts(),$("body").on("click",".pinterest-save-button, .pinterest-share-count, .pinterest-save-button-colorbox, .tb-pinterest-custom",function(){var t,e;return e=$(this).data("position"),t="Pinterest",null!=e&&(t=""+t+" ("+e+")"),gaTrackEvent("Social Buttons",t,location.href)}),$(document).on("fb-loaded",function(){return FB.Event.subscribe("edge.create",function(t,e){var n;return t.match(/facebook\.com\/knowyourmeme/i)?(n=$(e).data("position"),gaTrackEvent("Social Buttons","KYM Facebook Page Like ("+n+")",location.href)):void 0})}),t=$(".pinterest-share-count"),0!==t.length&&getPinterestSaveCount(t),$("body").on("click",".twitter-tweet-button, .twitter-button-colorbox, .tb-twitter-custom",function(){var t,e;return e=$(this).data("position"),t="Twitter",null!=e&&(t=""+t+" ("+e+")"),gaTrackEvent("Social Buttons",t,location.href)}),window.addEventListener("ctoolbar.ready",function(){return setTimeout(function(){var t,e,n,i,o,r,s,a,l,u,c,d,f,h;return 0!==$(".tb-share").length?($(".tb-share").after("
"),$(".tb-share").hide(),t=$(".tb-share-custom"),h=$(".social-data").data("url"),o="https://www.facebook.com/dialog/share?app_id=104675392961482&href="+h,n=" ",i=" Share "+n,e=""+i+" ",t.append(e),getFacebookShareCount($(".tb-facebook-custom .tb-btn-custom-count")),a=$(".social-data").data("media"),u="https://www.pinterest.com/pin/create/button/?media="+a,s=" ",l=" Pin "+s,r=""+l+" ",t.append(r),getPinterestSaveCount($(".tb-pinterest-custom .tb-btn-custom-count")),parsePins(),f="https://twitter.com/intent/tweet?url="+h,d=" Tweet",c="",t.append(c)):void 0},1e3)})})}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};this.parse_thumbs=function(){return User.LoggedIn?$(".thumbable").each(function(){var e,n,i,o,r,s;return o=$(this).data("id"),r=$(this).data("key"),t.call(User.Thumbs[r].up,o)>=0||t.call(User.Thumbs[r].down,o)>=0?(i=$(this).find(".up"),e=$(this).find(".down"),i.attr("href","javascript:;"),e.attr("href","javascript:;"),t.call(User.Thumbs[r].up,o)>=0?(i.removeClass("off").addClass("on"),e.removeClass("off").addClass("grey on")):(e.removeClass("off").addClass("on"),i.removeClass("off").addClass("grey on"))):User.Id===$(this).data("owner-id")&&$(this).find(".thumbs").remove(),s=$(this).data("timestamp"),"comments"===r&&null!=s&&Date.now()/1e3-s>=31557600?(n=$(this).find(".thumb"),n.removeClass("off").addClass("grey on"),n.attr("href","javascript:;"),n.data("confirm","Old comments are closed from votes.")):void 0}):void 0},$(function(){return $("body").on("thumbs-loaded",function(){return parse_thumbs()}).trigger("thumbs-loaded"),$("body").on("click",".thumb.off",function(){var t,e,n,i,o,r;return $(this).loginRequired()?($.loginPrompt(),!1):$(this).hasClass("down")&&!confirm("Are you sure?")?!1:($(this).removeClass("off").addClass("on"),i=$(this).parents(".thumbs"),n=$(this).parents(".thumbable"),e=n.find(".thumb_score"),t=n.find(".thumb_mini"),r=n.data("score"),$(this).hasClass("up")?(r++,i.find(".down").addClass("grey on").removeClass("off"),t.hasClass("down")&&0===r&&(t.removeClass("down").addClass("up"),e.removeClass("red_score").addClass("green_score"))):(r--,i.find(".up").addClass("grey on").removeClass("off"),t.hasClass("up")&&0>r&&(t.removeClass("up").addClass("down"),e.removeClass("green_score").addClass("red_score"))),n.data("score",r),o=0>=r?"":"+",e.html(o+r))})})}.call(this),function(){$(function(){return $(".deactivated-user-tooltip").tooltip({offset:[0,10],position:"center right"})})}.call(this),function(){$(function(){return $("#videos_list").hasClass("recent-videos")?void 0:$("#videos_list a.video").each(function(){return $(this).colorbox({href:$(this).data("colorbox-url"),current:"{current}|{total}",opacity:1,scrolling:!1,transition:"none",onOpen:function(){return $("#colorbox").hide()},onComplete:function(){return $("#colorbox").fadeIn(200),parse_favorites(),parse_thumbs(),parsePins(),window.photoColorboxed()},onClosed:function(){return window.photoColorboxed(!0)}})})})}.call(this),function(){}.call(this);