(function(n,t,i){function o(i,r,u){var f=t.createElement(i);return r&&(f.id=e+r),u&&(f.style.cssText=u),n(f)}function ni(){return i.innerHeight?i.innerHeight:n(i).height()}function vt(t,i){i!==Object(i)&&(i={});this.cache={};this.el=t;this.value=function(t){var r;return void 0===this.cache[t]&&(r=n(this.el).attr("data-cbox-"+t),void 0!==r?this.cache[t]=r:void 0!==i[t]?this.cache[t]=i[t]:void 0!==hi[t]&&(this.cache[t]=hi[t])),this.cache[t]};this.get=function(t){var i=this.value(t);return n.isFunction(i)?i.call(this.el,this):i}}function yt(n){var i=c.length,t=(v+n)%i;return 0>t?i+t:t}function a(n,t){return Math.round((/%/.test(n)?("x"===t?g.width():ni())/100:1)*parseInt(n,10))}function vi(n,t){return n.get("photo")||n.get("photoRegex").test(t)}function yi(n,t){return n.get("retinaUrl")&&i.devicePixelRatio>1?t.replace(n.get("photoRegex"),n.get("retinaSuffix")):t}function pi(n){"contains"in u[0]&&!u[0].contains(n.target)&&n.target!==d[0]&&(n.stopPropagation(),u.focus())}function ot(n){ot.str!==n&&(u.add(d).removeClass(ot.str).addClass(n),ot.str=n)}function di(t){v=0;t&&t!==!1&&"nofollow"!==t?(c=n("."+et).filter(function(){var i=n.data(this,p),r=new vt(this,i);return r.get("rel")===t}),v=c.index(r.el),-1===v&&(c=c.add(r.el),v=c.length-1)):c=n(r.el)}function rt(i){n(t).trigger(i);k.triggerHandler(i)}function pt(i){var e,f;if(!at){if(e=n(i).data(p),r=new vt(i,e),di(r.get("rel")),!it){it=lt=!0;ot(r.get("className"));u.css({visibility:"hidden",display:"block",opacity:""});l=o(h,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden");y.css({width:"",height:""}).append(l);w=ti.height()+ui.height()+y.outerHeight(!0)-y.height();b=ii.width()+ri.width()+y.outerWidth(!0)-y.width();nt=l.outerHeight(!0);tt=l.outerWidth(!0);var c=a(r.get("initialWidth"),"x"),v=a(r.get("initialHeight"),"y"),g=r.get("maxWidth"),ut=r.get("maxHeight");r.w=Math.max((g!==!1?Math.min(c,a(g,"x")):c)-tt-b,0);r.h=Math.max((ut!==!1?Math.min(v,a(ut,"y")):v)-nt-w,0);l.css({width:"",height:r.h});s.position();rt(tr);r.get("onOpen");oi.add(fi).hide();u.focus();r.get("trapFocus")&&t.addEventListener&&(t.addEventListener("focus",pi,!0),k.one(li,function(){t.removeEventListener("focus",pi,!0)}));r.get("returnFocus")&&k.one(li,function(){n(r.el).focus()})}f=parseFloat(r.get("opacity"));d.css({opacity:f===f?f:"",cursor:r.get("overlayClose")?"pointer":"",visibility:"visible"}).show();r.get("closeButton")?bt.html(r.get("close")).appendTo(y):bt.appendTo("<div/>");nr()}}function wi(){u||(si=!1,g=n(i),u=o(h).attr({id:p,"class":n.support.opacity===!1?e+"IE":"",role:"dialog",tabindex:"-1"}).hide(),d=o(h,"Overlay").hide(),wt=n([o(h,"LoadingOverlay")[0],o(h,"LoadingGraphic")[0]]),ut=o(h,"Wrapper"),y=o(h,"Content").append(fi=o(h,"Title"),ei=o(h,"Current"),ct=n('<button type="button"/>').attr({id:e+"Previous"}),ht=n('<button type="button"/>').attr({id:e+"Next"}),ft=n('<button type="button"/>').attr({id:e+"Slideshow"}),wt),bt=n('<button type="button"/>').attr({id:e+"Close"}),ut.append(o(h).append(o(h,"TopLeft"),ti=o(h,"TopCenter"),o(h,"TopRight")),o(h,!1,"clear:left").append(ii=o(h,"MiddleLeft"),y,ri=o(h,"MiddleRight")),o(h,!1,"clear:left").append(o(h,"BottomLeft"),ui=o(h,"BottomCenter"),o(h,"BottomRight"))).find("div div").css({float:"left"}),st=o(h,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),oi=ht.add(ct).add(ei).add(ft));t.body&&!u.parent().length&&n(t.body).append(d,u.append(ut,st))}function gi(){function i(n){n.which>1||n.shiftKey||n.altKey||n.metaKey||n.ctrlKey||(n.preventDefault(),pt(this))}return u?(si||(si=!0,ht.click(function(){s.next()}),ct.click(function(){s.prev()}),bt.click(function(){s.close()}),d.click(function(){r.get("overlayClose")&&s.close()}),n(t).bind("keydown."+e,function(n){var t=n.keyCode;it&&r.get("escKey")&&27===t&&(n.preventDefault(),s.close());it&&r.get("arrowKey")&&c[1]&&!n.altKey&&(37===t?(n.preventDefault(),ct.click()):39===t&&(n.preventDefault(),ht.click()))}),n.isFunction(n.fn.on)?n(t).on("click."+e,"."+et,i):n("."+et).live("click."+e,i)),!0):!1}function nr(){var t,y,p,u=s.prep,d=++ai,l;(lt=!0,f=!1,rt(gt),rt(kt),r.get("onLoad"),r.h=r.get("height")?a(r.get("height"),"y")-nt-w:r.get("innerHeight")&&a(r.get("innerHeight"),"y"),r.w=r.get("width")?a(r.get("width"),"x")-tt-b:r.get("innerWidth")&&a(r.get("innerWidth"),"x"),r.mw=r.w,r.mh=r.h,r.get("maxWidth")&&(r.mw=a(r.get("maxWidth"),"x")-tt-b,r.mw=r.w&&r.w<r.mw?r.w:r.mw),r.get("maxHeight")&&(r.mh=a(r.get("maxHeight"),"y")-nt-w,r.mh=r.h&&r.h<r.mh?r.h:r.mh),t=r.get("href"),bi=setTimeout(function(){wt.show()},100),r.get("inline"))?(l=n(t).eq(0),p=n("<div>").hide().insertBefore(l),k.one(gt,function(){p.replaceWith(l)}),u(l)):r.get("iframe")?u(" "):r.get("html")?u(r.get("html")):vi(r,t)?(t=yi(r,t),f=r.get("createImg"),n(f).addClass(e+"Photo").bind("error."+e,function(){u(o(h,"Error").html(r.get("imgError")))}).one("load",function(){d===ai&&setTimeout(function(){var t;r.get("retinaImage")&&i.devicePixelRatio>1&&(f.height=f.height/i.devicePixelRatio,f.width=f.width/i.devicePixelRatio);r.get("scalePhotos")&&(y=function(){f.height-=f.height*t;f.width-=f.width*t},r.mw&&f.width>r.mw&&(t=(f.width-r.mw)/f.width,y()),r.mh&&f.height>r.mh&&(t=(f.height-r.mh)/f.height,y()));r.h&&(f.style.marginTop=Math.max(r.mh-f.height,0)/2+"px");c[1]&&(r.get("loop")||c[v+1])&&(f.style.cursor="pointer",n(f).bind("click."+e,function(){s.next()}));f.style.width=f.width+"px";f.style.height=f.height+"px";u(f)},1)}),f.src=t):t&&st.load(t,r.get("data"),function(t,i){d===ai&&u("error"===i?o(h,"Error").html(r.get("xhrError")):n(this).contents())})}var d,u,ut,y,ti,ii,ri,ui,c,g,l,st,wt,fi,ei,ft,ht,ct,bt,oi,r,w,b,nt,tt,v,f,it,lt,at,bi,s,si,hi={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 n(this).attr("href")},title:function(){return this.title},createImg:function(){var t=new Image,i=n(this).data("cbox-img-attrs");return"object"==typeof i&&n.each(i,function(n,i){t[n]=i}),t},createIframe:function(){var i=t.createElement("iframe"),r=n(this).data("cbox-iframe-attrs");return"object"==typeof r&&n.each(r,function(n,t){i[n]=t}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},p="colorbox",e="cbox",et=e+"Element",tr=e+"_open",kt=e+"_load",dt=e+"_complete",ci=e+"_cleanup",li=e+"_closed",gt=e+"_purge",k=n("<a/>"),h="div",ai=0,ki={},ir=function(){function n(){clearTimeout(y)}function f(){(r.get("loop")||c[v+1])&&(n(),y=setTimeout(s.next,r.get("slideshowSpeed")))}function l(){ft.html(r.get("slideshowStop")).unbind(i).one(i,a);k.bind(dt,f).bind(kt,n);u.removeClass(t+"off").addClass(t+"on")}function a(){n();k.unbind(dt,f).unbind(kt,n);ft.html(r.get("slideshowStart")).unbind(i).one(i,function(){s.next();l()});u.removeClass(t+"on").addClass(t+"off")}function o(){h=!1;ft.hide();n();k.unbind(dt,f).unbind(kt,n);u.removeClass(t+"off "+t+"on")}var h,y,t=e+"Slideshow_",i="click."+e;return function(){h?r.get("slideshow")||(k.unbind(ci,o),o()):r.get("slideshow")&&c[1]&&(h=!0,k.one(ci,o),r.get("slideshowAuto")?l():a(),ft.show())}}();n[p]||(n(wi),s=n.fn[p]=n[p]=function(t,i){var u,r=this;return t=t||{},n.isFunction(r)&&(r=n("<a/>"),t.open=!0),r[0]?(wi(),gi()&&(i&&(t.onComplete=i),r.each(function(){var i=n.data(this,p)||{};n.data(this,p,n.extend(i,t))}).addClass(et),u=new vt(r[0],t),u.get("open")&&pt(r[0])),r):r},s.position=function(t,i){function k(){ti[0].style.width=ui[0].style.width=y[0].style.width=parseInt(u[0].style.width,10)-b+"px";y[0].style.height=ii[0].style.height=ri[0].style.height=parseInt(u[0].style.height,10)-w+"px"}var f,h,c,l=0,v=0,o=u.offset(),p;(g.unbind("resize."+e),u.css({top:-9e4,left:-9e4}),h=g.scrollTop(),c=g.scrollLeft(),r.get("fixed")?(o.top-=h,o.left-=c,u.css({position:"fixed"})):(l=h,v=c,u.css({position:"absolute"})),v+=r.get("right")!==!1?Math.max(g.width()-r.w-tt-b-a(r.get("right"),"x"),0):r.get("left")!==!1?a(r.get("left"),"x"):Math.round(Math.max(g.width()-r.w-tt-b,0)/2),l+=r.get("bottom")!==!1?Math.max(ni()-r.h-nt-w-a(r.get("bottom"),"y"),0):r.get("top")!==!1?a(r.get("top"),"y"):Math.round(Math.max(ni()-r.h-nt-w,0)/2),u.css({top:o.top,left:o.left,visibility:"visible"}),ut[0].style.width=ut[0].style.height="9999px",f={width:r.w+tt+b,height:r.h+nt+w,top:l,left:v},t)&&(p=0,n.each(f,function(n){if(f[n]!==ki[n])return(p=t,void 0)}),t=p);ki=f;t||u.css(f);u.dequeue().animate(f,{duration:t||0,complete:function(){k();lt=!1;ut[0].style.width=r.w+tt+b+"px";ut[0].style.height=r.h+nt+w+"px";r.get("reposition")&&setTimeout(function(){g.bind("resize."+e,s.position)},1);n.isFunction(i)&&i()},step:k})},s.resize=function(n){var t;it&&(n=n||{},n.width&&(r.w=a(n.width,"x")-tt-b),n.innerWidth&&(r.w=a(n.innerWidth,"x")),l.css({width:r.w}),n.height&&(r.h=a(n.height,"y")-nt-w),n.innerHeight&&(r.h=a(n.innerHeight,"y")),n.innerHeight||n.height||(t=l.scrollTop(),l.css({height:"auto"}),r.h=l.height()),l.css({height:r.h}),t&&l.scrollTop(t),s.position("none"===r.get("transition")?0:r.get("speed")))},s.prep=function(i){function b(){return r.w=r.w||l.width(),r.w=r.mw&&r.mw<r.w?r.mw:r.w,r.w}function d(){return r.h=r.h||l.height(),r.h=r.mh&&r.mh<r.h?r.mh:r.h,r.h}if(it){var a,w="none"===r.get("transition")?0:r.get("speed");l.remove();l=o(h,"LoadedContent").append(i);l.hide().appendTo(st.show()).css({width:b(),overflow:r.get("scrolling")?"auto":"hidden"}).css({height:d()}).prependTo(y);st.hide();n(f).css({float:"none"});ot(r.get("className"));a=function(){function s(){n.support.opacity===!1&&u[0].style.removeAttribute("filter")}var i,f,o=c.length;it&&(f=function(){clearTimeout(bi);wt.hide();rt(dt);r.get("onComplete")},fi.html(r.get("title")).show(),l.show(),o>1?("string"==typeof r.get("current")&&ei.html(r.get("current").replace("{current}",v+1).replace("{total}",o)).show(),ht[r.get("loop")||o-1>v?"show":"hide"]().html(r.get("next")),ct[r.get("loop")||v?"show":"hide"]().html(r.get("previous")),ir(),r.get("preloading")&&n.each([yt(-1),yt(1)],function(){var u,f=c[this],r=new vt(f,n.data(f,p)),i=r.get("href");i&&vi(r,i)&&(i=yi(r,i),u=t.createElement("img"),u.src=i)})):oi.hide(),r.get("iframe")?(i=r.get("createIframe"),r.get("scrolling")||(i.scrolling="no"),n(i).attr({src:r.get("href"),"class":e+"Iframe"}).one("load",f).appendTo(l),k.one(gt,function(){i.src="//about:blank"}),r.get("fastIframe")&&n(i).trigger("load")):f(),"fade"===r.get("transition")?u.fadeTo(w,1,s):s())};"fade"===r.get("transition")?u.fadeTo(w,0,function(){s.position(0,a)}):s.position(w,a)}},s.next=function(){!lt&&c[1]&&(r.get("loop")||c[v+1])&&(v=yt(1),pt(c[v]))},s.prev=function(){!lt&&c[1]&&(r.get("loop")||v)&&(v=yt(-1),pt(c[v]))},s.close=function(){it&&!at&&(at=!0,it=!1,rt(ci),r.get("onCleanup"),g.unbind("."+e),d.fadeTo(r.get("fadeOut")||0,0),u.stop().fadeTo(r.get("fadeOut")||0,0,function(){u.hide();d.hide();rt(gt);l.remove();setTimeout(function(){at=!1;rt(li);r.get("onClosed")},1)}))},s.remove=function(){u&&(u.stop(),n[p].close(),u.stop(!1,!0).remove(),d.remove(),at=!1,u=null,n("."+et).removeData(p).removeClass(et),n(t).unbind("click."+e).unbind("keydown."+e))},s.element=function(){return n(r.el)},s.settings=hi)})(jQuery,document,window);$(function(){ParallaxScroll.init()});var ParallaxScroll={showLogs:!1,round:1e3,init:function(){if(this._log("init"),this._inited){this._log("Already Inited");this._inited=!0;return}this._requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){window.setTimeout(n,1e3/60)}}();this._onScroll(!0)},_inited:!1,_properties:["x","y","z","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","scale"],_requestAnimationFrame:null,_log:function(n){this.showLogs&&console.log("Parallax Scroll / "+n)},_onScroll:function(n){var t=$(document).scrollTop(),i=$(window).height();this._log("onScroll "+t);$("[data-parallax]").each($.proxy(function(r,u){var e=$(u),f=[],rt=!1,g=e.data("style"),nt,y,ut,s,h,p,v,c,k,l,tt,o,a,w,d,b;for(g==undefined&&(g=e.attr("style")||"",e.data("style",g)),nt=[e.data("parallax")],y=2;;y++)if(e.data("parallax"+y))nt.push(e.data("parallax"+y));else break;for(ut=nt.length,y=0;y<ut;y++)s=nt[y],h=s["from-scroll"],h==undefined&&(h=Math.max(0,$(u).offset().top-i)),h=h|0,p=s.distance,v=s["to-scroll"],p==undefined&&v==undefined&&(p=i),p=Math.max(p|0,1),c=s.easing,k=s["easing-return"],c!=undefined&&$.easing&&$.easing[c]||(c=null),k!=undefined&&$.easing&&$.easing[k]||(k=c),c&&(l=s.duration,l==undefined&&(l=p),l=Math.max(l|0,1),tt=s["duration-return"],tt==undefined&&(tt=l),p=1,o=e.data("current-time"),o==undefined&&(o=0)),v==undefined&&(v=h+p),v=v|0,a=s.smoothness,a==undefined&&(a=30),a=a|0,(n||a==0)&&(a=1),a=a|0,w=t,w=Math.max(w,h),w=Math.min(w,v),c&&(e.data("sens")==undefined&&e.data("sens","back"),w>h&&(e.data("sens")=="back"?(o=1,e.data("sens","go")):o++),w<v&&(e.data("sens")=="go"?(o=1,e.data("sens","back")):o++),n&&(o=l),e.data("current-time",o)),this._properties.map($.proxy(function(n){var u=0,t=s[n],i,y,r,p;t!=undefined&&(n=="scale"||n=="scaleX"||n=="scaleY"||n=="scaleZ"?u=1:t=t|0,i=e.data("_"+n),i==undefined&&(i=u),y=(t-u)*((w-h)/(v-h))+u,r=i+(y-i)/a,c&&o>0&&o<=l&&(p=u,e.data("sens")=="back"&&(p=t,t=-t,c=k,l=tt),r=$.easing[c](null,o,p,t,l)),r=Math.ceil(r*this.round)/this.round,r==i&&y==t&&(r=t),f[n]||(f[n]=0),f[n]+=r,i!=f[n]&&(e.data("_"+n,f[n]),rt=!0))},this));if(rt){f.z!=undefined&&(d=s.perspective,d==undefined&&(d=800),b=e.parent(),b.data("style")||b.data("style",b.attr("style")||""),b.attr("style","perspective:"+d+"px; -webkit-perspective:"+d+"px; "+b.data("style")));f.scaleX==undefined&&(f.scaleX=1);f.scaleY==undefined&&(f.scaleY=1);f.scaleZ==undefined&&(f.scaleZ=1);f.scale!=undefined&&(f.scaleX*=f.scale,f.scaleY*=f.scale,f.scaleZ*=f.scale);var ft="translate3d("+(f.x?f.x:0)+"px, "+(f.y?f.y:0)+"px, "+(f.z?f.z:0)+"px)",et="rotateX("+(f.rotateX?f.rotateX:0)+"deg) rotateY("+(f.rotateY?f.rotateY:0)+"deg) rotateZ("+(f.rotateZ?f.rotateZ:0)+"deg)",ot="scaleX("+f.scaleX+") scaleY("+f.scaleY+") scaleZ("+f.scaleZ+")",it=ft+" "+et+" "+ot+";";this._log(it);e.attr("style","transform:"+it+" -webkit-transform:"+it+" "+g)}},this));window.requestAnimationFrame?window.requestAnimationFrame($.proxy(this._onScroll,this,!1)):this._requestAnimationFrame($.proxy(this._onScroll,this,!1))}};!function(n){n.fn.niceSelect=function(t){function i(t){t.after(n("<div><\/div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"><\/span><ul class="list"><\/ul>'));var i=t.next(),u=t.find("option"),r=t.find("option:selected");i.find(".current").html(r.data("display")||r.text());u.each(function(){var t=n(this),r=t.data("display");i.find("ul").append(n("<li><\/li>").attr("data-value",t.val()).attr("data-display",r||null).addClass("option"+(t.is(":selected")?" selected":"")+(t.is(":disabled")?" disabled":"")).html(t.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var r=n(this),t=n(this).next(".nice-select"),u=t.hasClass("open");t.length&&(t.remove(),i(r),u&&r.next().trigger("click"))}):"destroy"==t?(this.each(function(){var i=n(this),t=n(this).next(".nice-select");t.length&&(t.remove(),i.css("display",""))}),0==n(".nice-select").length&&n(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide();this.each(function(){var t=n(this);t.next().hasClass("nice-select")||i(t)});n(document).off(".nice_select");n(document).on("click.nice_select",".nice-select",function(){var t=n(this);n(".nice-select").not(t).removeClass("open");t.toggleClass("open");t.hasClass("open")?(t.find(".option"),t.find(".focus").removeClass("focus"),t.find(".selected").addClass("focus")):t.focus()});n(document).on("click.nice_select",function(t){0===n(t.target).closest(".nice-select").length&&n(".nice-select").removeClass("open").find(".option")});n(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(){var t=n(this),i=t.closest(".nice-select"),r;i.find(".selected").removeClass("selected");t.addClass("selected");r=t.data("display")||t.text();i.find(".current").text(r);i.prev("select").val(t.data("value")).trigger("change")});n(document).on("keydown.nice_select",".nice-select",function(t){var i=n(this),r=n(i.find(".focus")||i.find(".list .option.selected")),u,f;if(32==t.keyCode||13==t.keyCode)return i.hasClass("open")?r.trigger("click"):i.trigger("click"),!1;if(40==t.keyCode)return i.hasClass("open")?(u=r.nextAll(".option:not(.disabled)").first(),u.length>0&&(i.find(".focus").removeClass("focus"),u.addClass("focus"))):i.trigger("click"),!1;if(38==t.keyCode)return i.hasClass("open")?(f=r.prevAll(".option:not(.disabled)").first(),f.length>0&&(i.find(".focus").removeClass("focus"),f.addClass("focus"))):i.trigger("click"),!1;if(27==t.keyCode)i.hasClass("open")&&i.trigger("click");else if(9==t.keyCode&&i.hasClass("open"))return!1});var r=document.createElement("a").style;return r.cssText="pointer-events:auto","auto"!==r.pointerEvents&&n("html").addClass("no-csspointerevents"),this}}(jQuery);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(n){var t,it,f,p,o,pt,s="Close",wt="BeforeClose",ti="AfterClose",ii="BeforeAppend",rt="MarkupParse",ut="Open",bt="Change",ft="mfp",u="."+ft,w="mfp-ready",kt="mfp-removing",et="mfp-prevent-close",b=function(){},ot=!!window.jQuery,h=n(window),r=function(n,i){t.ev.on(ft+n+u,i)},l=function(t,i,r,u){var f=document.createElement("div");return f.className="mfp-"+t,r&&(f.innerHTML=r),u?i&&i.appendChild(f):(f=n(f),i&&f.appendTo(i)),f},i=function(i,r){t.ev.triggerHandler(ft+i,r);t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,n.isArray(r)?r:[r]))},st=function(i){return i===pt&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=n(t.st.closeMarkup.replace("%title%",t.st.tClose)),pt=i),t.currTemplate.closeBtn},ht=function(){n.magnificPopup.instance||(t=new b,t.init(),n.magnificPopup.instance=t)},ri=function(){var n=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==n.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in n)return!0;return!1},a,k,d,g,ct,e,gt,at,ni,nt,yt,tt;b.prototype={constructor:b,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener;t.isAndroid=/android/gi.test(i);t.isIOS=/iphone|ipad|ipod/gi.test(i);t.supportsTransition=ri();t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);f=n(document);t.popupsCache={}},open:function(e){var s,c,p,b,a,k,v,d,y;if(e.isObj===!1){for(t.items=e.items.toArray(),t.index=0,p=e.items,s=0;s<p.length;s++)if(c=p[s],c.parsed&&(c=c.el[0]),c===e.el[0]){t.index=s;break}}else t.items=n.isArray(e.items)?e.items:[e.items],t.index=e.index||0;if(t.isOpen)return void t.updateItemHTML();for(t.types=[],o="",t.ev=e.mainEl&&e.mainEl.length?e.mainEl.eq(0):f,e.key?(t.popupsCache[e.key]||(t.popupsCache[e.key]={}),t.currTemplate=t.popupsCache[e.key]):t.currTemplate={},t.st=n.extend(!0,{},n.magnificPopup.defaults,e),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=l("bg").on("click"+u,function(){t.close()}),t.wrap=l("wrap").attr("tabindex",-1).on("click"+u,function(n){t._checkIfClose(n.target)&&t.close()}),t.container=l("container",t.wrap)),t.contentContainer=l("content"),t.st.preloader&&(t.preloader=l("preloader",t.container,t.st.tLoading)),b=n.magnificPopup.modules,s=0;s<b.length;s++)a=b[s],a=a.charAt(0).toUpperCase()+a.slice(1),t["init"+a].call(t);return i("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(r(rt,function(n,t,i,r){i.close_replaceWith=st(r.type)}),o+=" mfp-close-btn-in"):t.wrap.append(st())),t.st.alignTop&&(o+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:h.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:f.height(),position:"absolute"}),t.st.enableEscapeKey&&f.on("keyup"+u,function(n){27===n.keyCode&&t.close()}),h.on("resize"+u,function(){t.updateSize()}),t.st.closeOnContentClick||(o+=" mfp-auto-cursor"),o&&t.wrap.addClass(o),k=t.wH=h.height(),v={},t.fixedContentPos&&t._hasScrollBar(k)&&(d=t._getScrollbarSize(),d&&(v.marginRight=d)),t.fixedContentPos&&(t.isIE7?n("body, html").css("overflow","hidden"):v.overflow="hidden"),y=t.st.mainClass,t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),i("BuildControls"),n("html").css(v),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||n(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(w),t._setFocus()):t.bgOverlay.addClass(w);f.on("focusin"+u,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(k),i(ut),e},close:function(){t.isOpen&&(i(wt),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(kt),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){var r,e;i(s);r=kt+" "+w+" ";(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(r+=t.st.mainClass+" "),t._removeClassFromMFP(r),t.fixedContentPos)&&(e={marginRight:""},t.isIE7?n("body, html").css("overflow",""):e.overflow="",n("html").css(e));f.off("keyup"+u+" focusin"+u);t.ev.off(u);t.wrap.attr("class","mfp-wrap").removeAttr("style");t.bgOverlay.attr("class","mfp-bg");t.container.attr("class","mfp-container");!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach();t.st.autoFocusLast&&t._lastFocusedEl&&n(t._lastFocusedEl).focus();t.currItem=null;t.content=null;t.currTemplate=null;t.prevHeight=0;i(ti)},updateSize:function(n){if(t.isIOS){var u=document.documentElement.clientWidth/window.innerWidth,r=window.innerHeight*u;t.wrap.css("height",r);t.wH=r}else t.wH=n||h.height();t.fixedContentPos||t.wrap.css("height",t.wH);i("Resize")},updateItemHTML:function(){var u=t.items[t.index],r,f,e;t.contentContainer.detach();t.content&&t.content.detach();u.parsed||(u=t.parseEl(t.index));r=u.type;(i("BeforeChange",[t.currItem?t.currItem.type:"",r]),t.currItem=u,t.currTemplate[r])||(f=t.st[r]?t.st[r].markup:!1,i("FirstMarkupParse",f),t.currTemplate[r]=f?n(f):!0);p&&p!==u.type&&t.container.removeClass("mfp-"+p+"-holder");e=t["get"+r.charAt(0).toUpperCase()+r.slice(1)](u,t.currTemplate[r]);t.appendContent(e,r);u.preloaded=!0;i(bt,u);p=u.type;t.container.prepend(t.contentContainer);i("AfterChange")},appendContent:function(n,r){t.content=n;n?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[r]===!0?t.content.find(".mfp-close").length||t.content.append(st()):t.content=n:t.content="";i(ii);t.container.addClass("mfp-"+r+"-holder");t.contentContainer.append(t.content)},parseEl:function(r){var o,u=t.items[r],e,f;if(u.tagName?u={el:n(u)}:(o=u.type,u={data:u,src:u.src}),u.el){for(e=t.types,f=0;f<e.length;f++)if(u.el.hasClass("mfp-"+e[f])){o=e[f];break}u.src=u.el.attr("data-mfp-src");u.src||(u.src=u.el.attr("href"))}return u.type=o||t.st.type||"inline",u.index=r,u.parsed=!0,t.items[r]=u,i("ElementParse",u),t.items[r]},addGroup:function(n,i){var u=function(r){r.mfpEl=this;t._openClick(r,n,i)},r;i||(i={});r="click.magnificPopup";i.mainEl=n;i.items?(i.isObj=!0,n.off(r).on(r,u)):(i.isObj=!1,i.delegate?n.off(r).on(r,i.delegate,u):(i.items=n,n.off(r).on(r,u)))},_openClick:function(i,r,u){var e=void 0!==u.midClick?u.midClick:n.magnificPopup.defaults.midClick,f;if(e||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){if(f=void 0!==u.disableOn?u.disableOn:n.magnificPopup.defaults.disableOn,f)if(n.isFunction(f)){if(!f.call(t))return!0}else if(h.width()<f)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation());u.el=n(i.mfpEl);u.delegate&&(u.items=r.find(u.delegate));t.open(u)}},updateStatus:function(n,r){if(t.preloader){it!==n&&t.container.removeClass("mfp-s-"+it);r||"loading"!==n||(r=t.st.tLoading);var u={status:n,text:r};i("UpdateStatus",u);n=u.status;r=u.text;t.preloader.html(r);t.preloader.find("a").on("click",function(n){n.stopImmediatePropagation()});t.container.addClass("mfp-s-"+n);it=n}},_checkIfClose:function(i){if(!n(i).hasClass(et)){var r=t.st.closeOnContentClick,u=t.st.closeOnBgClick;if(r&&u||!t.content||n(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||n.contains(t.content[0],i)){if(r)return!0}else if(u&&n.contains(document,i))return!0;return!1}},_addClassToMFP:function(n){t.bgOverlay.addClass(n);t.wrap.addClass(n)},_removeClassFromMFP:function(n){this.bgOverlay.removeClass(n);t.wrap.removeClass(n)},_hasScrollBar:function(n){return(t.isIE7?f.height():document.body.scrollHeight)>(n||h.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){if(i.target!==t.wrap[0]&&!n.contains(t.wrap[0],i.target))return(t._setFocus(),!1)},_parseMarkup:function(t,r,f){var e;f.data&&(r=n.extend(f.data,r));i(rt,[t,r,f]);n.each(r,function(i,r){var f,o;if(void 0===r||r===!1)return!0;(e=i.split("_"),e.length>1)?(f=t.find(u+"-"+e[0]),f.length>0&&(o=e[1],"replaceWith"===o?f[0]!==r[0]&&f.replaceWith(r):"img"===o?f.is("img")?f.attr("src",r):f.replaceWith(n("<img>").attr("src",r).attr("class",f.attr("class"))):f.attr(e[1],r))):t.find(u+"-"+i).html(r)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var n=document.createElement("div");n.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(n);t.scrollbarSize=n.offsetWidth-n.clientWidth;document.body.removeChild(n)}return t.scrollbarSize}};n.magnificPopup={instance:null,proto:b.prototype,modules:[],open:function(t,i){return ht(),t=t?n.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return n.magnificPopup.instance&&n.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(n.magnificPopup.defaults[t]=i.options);n.extend(this.proto,i.proto);this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;<\/button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}};n.fn.magnificPopup=function(i){var r,u,f,e;return ht(),r=n(this),"string"==typeof i?"open"===i?(f=ot?r.data("magnificPopup"):r[0].magnificPopup,e=parseInt(arguments[1],10)||0,f.items?u=f.items[e]:(u=r,f.delegate&&(u=u.find(f.delegate)),u=u.eq(e)),t._openClick({mfpEl:u},r,f)):t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1)):(i=n.extend(!0,{},i),ot?r.data("magnificPopup",i):r[0].magnificPopup=i,t.addGroup(r,i)),r};g="inline";ct=function(){d&&(k.after(d.addClass(a)).detach(),d=null)};n.magnificPopup.registerModule(g,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(g);r(s+"."+g,function(){ct()})},getInline:function(i,r){var f,u,e;return(ct(),i.src)?(f=t.st.inline,u=n(i.src),u.length?(e=u[0].parentNode,e&&e.tagName&&(k||(a=f.hiddenClass,k=l(a),a="mfp-"+a),d=u.after(k).detach().removeClass(a)),t.updateStatus("ready")):(t.updateStatus("error",f.tNotFound),u=n("<div>")),i.inlineElement=u,u):(t.updateStatus("ready"),t._parseMarkup(r,{},i),r)}}});var v,y="ajax",lt=function(){v&&n(document.body).removeClass(v)},dt=function(){lt();t.req&&t.req.abort()};n.magnificPopup.registerModule(y,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content<\/a> could not be loaded.'},proto:{initAjax:function(){t.types.push(y);v=t.st.ajax.cursor;r(s+"."+y,dt);r("BeforeChange."+y,dt)},getAjax:function(r){v&&n(document.body).addClass(v);t.updateStatus("loading");var u=n.extend({url:r.src,success:function(u,f,e){var o={data:u,xhr:e};i("ParseAjax",o);t.appendContent(n(o.data),y);r.finished=!0;lt();t._setFocus();setTimeout(function(){t.wrap.addClass(w)},16);t.updateStatus("ready");i("AjaxContentAdded")},error:function(){lt();r.finished=r.loadError=!0;t.updateStatus("error",t.st.ajax.tError.replace("%url%",r.src))}},t.st.ajax.settings);return t.req=n.ajax(u),""}}});gt=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var r=t.st.image.titleSrc;if(r){if(n.isFunction(r))return r.call(t,i);if(i.el)return i.el.attr(r)||""}return""};n.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"><\/div><figure><div class="mfp-img"><\/div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"><\/div><div class="mfp-counter"><\/div><\/div><\/figcaption><\/figure><\/div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image<\/a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,f=".image";t.types.push("image");r(ut+f,function(){"image"===t.currItem.type&&i.cursor&&n(document.body).addClass(i.cursor)});r(s+f,function(){i.cursor&&n(document.body).removeClass(i.cursor);h.off("resize"+u)});r("Resize"+f,t.resizeImage);t.isLowIE&&r("AfterChange",t.resizeImage)},resizeImage:function(){var n=t.currItem,i;n&&n.img&&t.st.image.verticalFit&&(i=0,t.isLowIE&&(i=parseInt(n.img.css("padding-top"),10)+parseInt(n.img.css("padding-bottom"),10)),n.img.css("max-height",t.wH-i))},_onImageHasSize:function(n){n.img&&(n.hasSize=!0,e&&clearInterval(e),n.isCheckingImgSize=!1,i("ImageHasSize",n),n.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),n.imgHidden=!1))},findImageSize:function(n){var i=0,u=n.img[0],r=function(f){e&&clearInterval(e);e=setInterval(function(){return u.naturalWidth>0?void t._onImageHasSize(n):(i>200&&clearInterval(e),i++,void(3===i?r(10):40===i?r(50):100===i&&r(500)))},f)};r(1)},getImage:function(r,u){var o=0,s=function(){r&&(r.img[0].complete?(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("ready")),r.hasSize=!0,r.loaded=!0,i("ImageLoadComplete")):(o++,200>o?setTimeout(s,100):h()))},h=function(){r&&(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("error",c.tError.replace("%url%",r.src))),r.hasSize=!0,r.loaded=!0,r.loadError=!0)},c=t.st.image,l=u.find(".mfp-img"),f;return l.length&&(f=document.createElement("img"),f.className="mfp-img",r.el&&r.el.find("img").length&&(f.alt=r.el.find("img").attr("alt")),r.img=n(f).on("load.mfploader",s).on("error.mfploader",h),f.src=r.src,l.is("img")&&(r.img=r.img.clone()),f=r.img[0],f.naturalWidth>0?r.hasSize=!0:f.width||(r.hasSize=!1)),t._parseMarkup(u,{title:gt(r),img_replaceWith:r.img},r),t.resizeImage(),r.hasSize?(e&&clearInterval(e),r.loadError?(u.addClass("mfp-loading"),t.updateStatus("error",c.tError.replace("%url%",r.src))):(u.removeClass("mfp-loading"),t.updateStatus("ready")),u):(t.updateStatus("loading"),r.loading=!0,r.hasSize||(r.imgHidden=!0,u.addClass("mfp-loading"),t.findImageSize(r)),u)}}});ni=function(){return void 0===at&&(at=void 0!==document.createElement("p").style.MozTransform),at};n.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(n){return n.is("img")?n:n.find("img")}},proto:{initZoom:function(){var u,f=t.st.zoom,o=".zoom";if(f.enabled&&t.supportsTransition){var e,n,c=f.duration,l=function(n){var r=n.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),u="all "+f.duration/1e3+"s "+f.easing,t={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},i="transition";return t["-webkit-"+i]=t["-moz-"+i]=t["-o-"+i]=t[i]=u,r.css(t),r},h=function(){t.content.css("visibility","visible")};r("BuildControls"+o,function(){if(t._allowZoom()){if(clearTimeout(e),t.content.css("visibility","hidden"),u=t._getItemToZoom(),!u)return void h();n=l(u);n.css(t._getOffset());t.wrap.append(n);e=setTimeout(function(){n.css(t._getOffset(!0));e=setTimeout(function(){h();setTimeout(function(){n.remove();u=n=null;i("ZoomAnimationEnded")},16)},c)},16)}});r(wt+o,function(){if(t._allowZoom()){if(clearTimeout(e),t.st.removalDelay=c,!u){if(u=t._getItemToZoom(),!u)return;n=l(u)}n.css(t._getOffset(!0));t.wrap.append(n);t.content.css("visibility","hidden");setTimeout(function(){n.css(t._getOffset())},16)}});r(s+o,function(){t._allowZoom()&&(h(),n&&n.remove(),u=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var r,u;r=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var f=r.offset(),e=parseInt(r.css("padding-top"),10),o=parseInt(r.css("padding-bottom"),10);return f.top-=n(window).scrollTop()-e,u={width:r.width(),height:(ot?r.innerHeight():r[0].offsetHeight)-o-e},ni()?u["-moz-transform"]=u.transform="translate("+f.left+"px,"+f.top+"px)":(u.left=f.left,u.top=f.top),u}}});var c="iframe",ui="//about:blank",vt=function(n){if(t.currTemplate[c]){var i=t.currTemplate[c].find("iframe");i.length&&(n||(i[0].src=ui),t.isIE8&&i.css("display",n?"block":"none"))}};n.magnificPopup.registerModule(c,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"><\/div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen><\/iframe><\/div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(c);r("BeforeChange",function(n,t,i){t!==i&&(t===c?vt():i===c&&vt(!0))});r(s+"."+c,function(){vt()})},getIframe:function(i,r){var u=i.src,f=t.st.iframe,e;return n.each(f.patterns,function(){if(u.indexOf(this.index)>-1)return(this.id&&(u="string"==typeof this.id?u.substr(u.lastIndexOf(this.id)+this.id.length,u.length):this.id.call(this,u)),u=this.src.replace("%id%",u),!1)}),e={},f.srcAction&&(e[f.srcAction]=u),t._parseMarkup(r,e,i),t.updateStatus("ready"),r}}});nt=function(n){var i=t.items.length;return n>i-1?n-i:0>n?i+n:n};yt=function(n,t,i){return n.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};n.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"><\/button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var u=t.st.gallery,i=".mfp-gallery";return t.direction=!0,u&&u.enabled?(o+=" mfp-gallery",r(ut+i,function(){u.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){if(t.items.length>1)return(t.next(),!1)});f.on("keydown"+i,function(n){37===n.keyCode?t.prev():39===n.keyCode&&t.next()})}),r("UpdateStatus"+i,function(n,i){i.text&&(i.text=yt(i.text,t.currItem.index,t.items.length))}),r(rt+i,function(n,i,r,f){var e=t.items.length;r.counter=e>1?yt(u.tCounter,f.index,e):""}),r("BuildControls"+i,function(){if(t.items.length>1&&u.arrows&&!t.arrowLeft){var i=u.arrowMarkup,r=t.arrowLeft=n(i.replace(/%title%/gi,u.tPrev).replace(/%dir%/gi,"left")).addClass(et),f=t.arrowRight=n(i.replace(/%title%/gi,u.tNext).replace(/%dir%/gi,"right")).addClass(et);r.click(function(){t.prev()});f.click(function(){t.next()});t.container.append(r.add(f))}}),r(bt+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout);t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages();t._preloadTimeout=null},16)}),void r(s+i,function(){f.off(i);t.wrap.off("click"+i);t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0;t.index=nt(t.index+1);t.updateItemHTML()},prev:function(){t.direction=!1;t.index=nt(t.index-1);t.updateItemHTML()},goTo:function(n){t.direction=n>=t.index;t.index=n;t.updateItemHTML()},preloadNearbyImages:function(){for(var i=t.st.gallery.preload,r=Math.min(i[0],t.items.length),u=Math.min(i[1],t.items.length),n=1;n<=(t.direction?u:r);n++)t._preloadItem(t.index+n);for(n=1;n<=(t.direction?r:u);n++)t._preloadItem(t.index-n)},_preloadItem:function(r){if(r=nt(r),!t.items[r].preloaded){var u=t.items[r];u.parsed||(u=t.parseEl(r));i("LazyLoad",u);"image"===u.type&&(u.img=n('<img class="mfp-img" />').on("load.mfploader",function(){u.hasSize=!0}).on("error.mfploader",function(){u.hasSize=!0;u.loadError=!0;i("LazyLoadError",u)}).attr("src",u.src));u.preloaded=!0}}}});tt="retina";n.magnificPopup.registerModule(tt,{options:{replaceSrc:function(n){return n.src.replace(/\.\w+$/,function(n){return"@2x"+n})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var i=t.st.retina,n=i.ratio;n=isNaN(n)?n():n;n>1&&(r("ImageHasSize."+tt,function(t,i){i.img.css({"max-width":i.img[0].naturalWidth/n,width:"100%"})}),r("ElementParse."+tt,function(t,r){r.src=i.replaceSrc(r,n)}))}}}});ht()});!function(n,t,i,r){function e(t,i){this._name=u;this._instance_id=++s;this.el=t;this.$el=n(t);this.settings=n.extend(!1,{},o,i,this.$el.data());this.$triggerOrigin=n(this.settings.listenTo);this.init()}if(!n)return console.error("jQuery nÃƒÂ£o encontrado, seu plugin jQuery nÃƒÂ£o irÃƒÂ¡ funcionar."),!1;!function(){for(var r=0,i=["ms","moz","webkit","o"],n=0;n<i.length&&!t.requestAnimationFrame;++n)t.requestAnimationFrame=t[i[n]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[i[n]+"CancelAnimationFrame"]||t[i[n]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(n){var i=(new Date).getTime(),u=Math.max(0,16-(i-r)),f=t.setTimeout(function(){n(i+u)},u);return r=i+u,f});t.cancelAnimationFrame||(t.cancelAnimationFrame=function(n){clearTimeout(n)})}();var u="parallax",o={on:"scroll",listenTo:t,sceneMode:!1},f=n(t),s=0;n.extend(e.prototype,{init:function(){var n=this;this.$triggerOrigin.on(n.settings.on+"."+n._name,function(){n.parallaxTranslate()});n.parallaxTranslate()},parallaxTranslate:function(){var n=this;n.inScreen()&&t.requestAnimationFrame(function(){var t=f.scrollTop()-n.$el.offset().top;n.$el.css("transform","translateY("+t/2+"px)")});console.groupEnd()},destroy:function(){this.$el.removeData();n(this.settings.listenTo).off("."+u)},somePublicMethod:function(){privateMethod.call(this)},inScreen:function(t){var i;"boolean"!=typeof t&&t!==r?(i=n(t),t=arguments[1]||!1):(i=this.$el,t=t||!1);var u=f.scrollTop(),o=u+f.height(),e=i.offset().top,s=e+i.height();return!0===t?u<=e&&o>=s:!(u>s||o<e)}});n.fn[u]=function(t){var i=arguments;return t===r||"object"==typeof t?this.each(function(){n.data(this,"plugin_"+u)||n.data(this,"plugin_"+u,new e(this,t))}):"string"==typeof t&&"init"!==t?this.each(function(){var r=n.data(this,"plugin_"+u);r instanceof e&&"function"==typeof r[t]&&r[t].apply(r,Array.prototype.slice.call(i,1))}):void 0}}(window.jQuery||!1,window,document);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(r){var u=r||window.event,w=c.call(arguments,1),l=0,s=0,e=0,a=0,b=0,k=0,v,y,p;if(r=n.event.fix(u),r.type="mousewheel","detail"in u&&(e=-1*u.detail),"wheelDelta"in u&&(e=u.wheelDelta),"wheelDeltaY"in u&&(e=u.wheelDeltaY),"wheelDeltaX"in u&&(s=-1*u.wheelDeltaX),"axis"in u&&u.axis===u.HORIZONTAL_AXIS&&(s=-1*e,e=0),l=0===e?s:e,"deltaY"in u&&(e=-1*u.deltaY,l=e),"deltaX"in u&&(s=u.deltaX,0===e&&(l=-1*s)),0!==e||0!==s)return 1===u.deltaMode?(v=n.data(this,"mousewheel-line-height"),l*=v,e*=v,s*=v):2===u.deltaMode&&(y=n.data(this,"mousewheel-page-height"),l*=y,e*=y,s*=y),(a=Math.max(Math.abs(e),Math.abs(s)),(!t||t>a)&&(t=a,o(u,a)&&(t/=40)),o(u,a)&&(l/=40,s/=40,e/=40),l=Math[l>=1?"floor":"ceil"](l/t),s=Math[s>=1?"floor":"ceil"](s/t),e=Math[e>=1?"floor":"ceil"](e/t),i.settings.normalizeOffset&&this.getBoundingClientRect)&&(p=this.getBoundingClientRect(),b=r.clientX-p.left,k=r.clientY-p.top),r.deltaX=s,r.deltaY=e,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,l,s,e),f&&clearTimeout(f),f=setTimeout(h,200),(n.event.dispatch||n.event.handle).apply(this,w)}function h(){t=null}function o(n,t){return i.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var f,t,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice,e,i;if(n.event.fixHooks)for(e=s.length;e;)n.event.fixHooks[s[--e]]=n.event.mouseHooks;i=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],u,!1);else this.onmousewheel=u;n.data(this,"mousewheel-line-height",i.getLineHeight(this));n.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],u,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(r){var u=r||window.event,w=c.call(arguments,1),l=0,s=0,e=0,a=0,b=0,k=0,v,y,p;if(r=n.event.fix(u),r.type="mousewheel","detail"in u&&(e=-1*u.detail),"wheelDelta"in u&&(e=u.wheelDelta),"wheelDeltaY"in u&&(e=u.wheelDeltaY),"wheelDeltaX"in u&&(s=-1*u.wheelDeltaX),"axis"in u&&u.axis===u.HORIZONTAL_AXIS&&(s=-1*e,e=0),l=0===e?s:e,"deltaY"in u&&(e=-1*u.deltaY,l=e),"deltaX"in u&&(s=u.deltaX,0===e&&(l=-1*s)),0!==e||0!==s)return 1===u.deltaMode?(v=n.data(this,"mousewheel-line-height"),l*=v,e*=v,s*=v):2===u.deltaMode&&(y=n.data(this,"mousewheel-page-height"),l*=y,e*=y,s*=y),(a=Math.max(Math.abs(e),Math.abs(s)),(!t||t>a)&&(t=a,o(u,a)&&(t/=40)),o(u,a)&&(l/=40,s/=40,e/=40),l=Math[l>=1?"floor":"ceil"](l/t),s=Math[s>=1?"floor":"ceil"](s/t),e=Math[e>=1?"floor":"ceil"](e/t),i.settings.normalizeOffset&&this.getBoundingClientRect)&&(p=this.getBoundingClientRect(),b=r.clientX-p.left,k=r.clientY-p.top),r.deltaX=s,r.deltaY=e,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,l,s,e),f&&clearTimeout(f),f=setTimeout(h,200),(n.event.dispatch||n.event.handle).apply(this,w)}function h(){t=null}function o(n,t){return i.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var f,t,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice,e,i;if(n.event.fixHooks)for(e=s.length;e;)n.event.fixHooks[s[--e]]=n.event.mouseHooks;i=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],u,!1);else this.onmousewheel=u;n.data(this,"mousewheel-line-height",i.getLineHeight(this));n.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],u,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"undefined"!=typeof module&&module.exports?module.exports=n:n(jQuery,window,document)}(function(n){!function(t){var i="function"==typeof define&&define.amd,r="undefined"!=typeof module&&module.exports,u="https:"==document.location.protocol?"https:":"http:";i||(r?require("jquery-mousewheel")(n):n.event.special.mousewheel||n("head").append(decodeURI("%3Cscript src="+u+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E")));t()}(function(){var h,c="mCustomScrollbar",t="mCS",it=".mCustomScrollbar",ot={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},pt=0,b={},p=window.attachEvent&&!window.addEventListener?1:0,e=!1,i=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],s={init:function(r){var r=n.extend(!0,{},ot,r),e=v.call(this),u,f;if(r.live){if(u=r.liveSelector||this.selector||it,f=n(u),"off"===r.live)return void k(u);b[u]=setTimeout(function(){f.mCustomScrollbar(r);"once"===r.live&&f.length&&k(u)},500)}else k(u);return r.setWidth=r.set_width?r.set_width:r.setWidth,r.setHeight=r.set_height?r.set_height:r.setHeight,r.axis=r.horizontalScroll?"x":wt(r.axis),r.scrollInertia=r.scrollInertia>0&&r.scrollInertia<17?17:r.scrollInertia,"object"!=typeof r.mouseWheel&&1==r.mouseWheel&&(r.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),r.mouseWheel.scrollAmount=r.mouseWheelPixels?r.mouseWheelPixels:r.mouseWheel.scrollAmount,r.mouseWheel.normalizeDelta=r.advanced.normalizeMouseWheelDelta?r.advanced.normalizeMouseWheelDelta:r.mouseWheel.normalizeDelta,r.scrollButtons.scrollType=bt(r.scrollButtons.scrollType),st(r),n(e).each(function(){var u=n(this);if(!u.data(t)){u.data(t,{idx:++pt,opt:r,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=u.data(t),f=e.opt,o=u.data("mcs-axis"),h=u.data("mcs-scrollbar-position"),c=u.data("mcs-theme");o&&(f.axis=o);h&&(f.scrollbarPosition=h);c&&(f.theme=c,st(f));kt.call(this);e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this);n("#mCSB_"+e.idx+"_container img:not(."+i[2]+")").addClass(i[2]);s.update.call(null,u)}})},update:function(r,f){var e=r||v.call(this);return n(e).each(function(){var s=n(this),c;if(s.data(t)){var e=s.data(t),r=e.opt,h=n("#mCSB_"+e.idx+"_container"),a=n("#mCSB_"+e.idx),l=[n("#mCSB_"+e.idx+"_dragger_vertical"),n("#mCSB_"+e.idx+"_dragger_horizontal")];if(!h.length)return;e.tweenRunning&&o(s);f&&e&&r.callbacks.onBeforeUpdate&&"function"==typeof r.callbacks.onBeforeUpdate&&r.callbacks.onBeforeUpdate.call(this);s.hasClass(i[3])&&s.removeClass(i[3]);s.hasClass(i[4])&&s.removeClass(i[4]);a.css("max-height","none");a.height()!==s.height()&&a.css("max-height",s.height());dt.call(this);"y"===r.axis||r.advanced.autoExpandHorizontalScroll||h.css("width",ht(h));e.overflowed=ii.call(this);ct.call(this);r.autoDraggerLength&&ni.call(this);ti.call(this);ri.call(this);c=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)];"x"!==r.axis&&(e.overflowed[0]?l[0].height()>l[0].parent().height()?y.call(this):(u(s,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(y.call(this),"y"===r.axis?g.call(this):"yx"===r.axis&&e.overflowed[1]&&u(s,c[1].toString(),{dir:"x",dur:0,overwrite:"none"})));"y"!==r.axis&&(e.overflowed[1]?l[1].width()>l[1].parent().width()?y.call(this):(u(s,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(y.call(this),"x"===r.axis?g.call(this):"yx"===r.axis&&e.overflowed[0]&&u(s,c[0].toString(),{dir:"y",dur:0,overwrite:"none"})));f&&e&&(2===f&&r.callbacks.onImageLoad&&"function"==typeof r.callbacks.onImageLoad?r.callbacks.onImageLoad.call(this):3===f&&r.callbacks.onSelectorChange&&"function"==typeof r.callbacks.onSelectorChange?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&"function"==typeof r.callbacks.onUpdate&&r.callbacks.onUpdate.call(this));et.call(this)}})},scrollTo:function(i,r){if("undefined"!=typeof i&&null!=i){var f=v.call(this);return n(f).each(function(){var s=n(this);if(s.data(t)){var o=s.data(t),h=o.opt,c={trigger:"external",scrollInertia:h.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},f=n.extend(!0,{},c,r),e=ft.call(this,i),l=f.scrollInertia>0&&f.scrollInertia<17?17:f.scrollInertia;e[0]=at.call(this,e[0],"y");e[1]=at.call(this,e[1],"x");f.moveDragger&&(e[0]*=o.scrollRatio.y,e[1]*=o.scrollRatio.x);f.dur=wi()?0:l;setTimeout(function(){null!==e[0]&&"undefined"!=typeof e[0]&&"x"!==h.axis&&o.overflowed[0]&&(f.dir="y",f.overwrite="all",u(s,e[0].toString(),f));null!==e[1]&&"undefined"!=typeof e[1]&&"y"!==h.axis&&o.overflowed[1]&&(f.dir="x",f.overwrite="none",u(s,e[1].toString(),f))},f.timeout)}})}},stop:function(){var i=v.call(this);return n(i).each(function(){var i=n(this);i.data(t)&&o(i)})},disable:function(r){var u=v.call(this);return n(u).each(function(){var u=n(this);u.data(t)&&(u.data(t),et.call(this,"remove"),g.call(this),r&&y.call(this),ct.call(this,!0),u.addClass(i[3]))})},destroy:function(){var r=v.call(this);return n(r).each(function(){var f=n(this);if(f.data(t)){var u=f.data(t),e=u.opt,s=n("#mCSB_"+u.idx),o=n("#mCSB_"+u.idx+"_container"),h=n(".mCSB_"+u.idx+"_scrollbar");e.live&&k(e.liveSelector||n(r).selector);et.call(this,"remove");g.call(this);y.call(this);f.removeData(t);a(this,"mcs");h.remove();o.find("img."+i[2]).removeClass(i[2]);s.replaceWith(o.contents());f.removeClass(c+" _"+t+"_"+u.idx+" "+i[6]+" "+i[7]+" "+i[5]+" "+i[3]).addClass(i[4])}})}},v=function(){return"object"!=typeof n(this)||n(this).length<1?it:this},st=function(t){t.autoDraggerLength=n.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1?!1:t.autoDraggerLength;t.autoExpandScrollbar=n.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1?!1:t.autoExpandScrollbar;t.scrollButtons.enable=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!1:t.scrollButtons.enable;t.autoHideScrollbar=n.inArray(t.theme,["minimal","minimal-dark"])>-1?!0:t.autoHideScrollbar;t.scrollbarPosition=n.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},k=function(n){b[n]&&(clearTimeout(b[n]),a(b,n))},wt=function(n){return"yx"===n||"xy"===n||"auto"===n?"yx":"x"===n||"horizontal"===n?"x":"y"},bt=function(n){return"stepped"===n||"pixels"===n||"step"===n||"click"===n?"stepped":"stepless"},kt=function(){var f=n(this),u=f.data(t),r=u.opt,l=r.autoExpandScrollbar?" "+i[1]+"_expand":"",o=["<div id='mCSB_"+u.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+l+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>","<div id='mCSB_"+u.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+u.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+l+"'><div class='"+i[12]+"'><div id='mCSB_"+u.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>"],v="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",a="yx"===r.axis?o[0]+o[1]:"x"===r.axis?o[1]:o[0],y="yx"===r.axis?"<div id='mCSB_"+u.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=r.autoHideScrollbar?" "+i[6]:"",w="x"!==r.axis&&"rtl"===u.langDir?" "+i[7]:"",h,s,e;r.setWidth&&f.css("width",r.setWidth);r.setHeight&&f.css("height",r.setHeight);r.setLeft="y"!==r.axis&&"rtl"===u.langDir?"989999px":r.setLeft;f.addClass(c+" _"+t+"_"+u.idx+p+w).wrapInner("<div id='mCSB_"+u.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+v+"'><div id='mCSB_"+u.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+u.langDir+"' /><\/div>");h=n("#mCSB_"+u.idx);s=n("#mCSB_"+u.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||s.css("width",ht(s));"outside"===r.scrollbarPosition?("static"===f.css("position")&&f.css("position","relative"),f.css("overflow","visible"),h.addClass("mCSB_outside").after(a)):(h.addClass("mCSB_inside").append(a),s.wrap(y));gt.call(this);e=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")];e[0].css("min-height",e[0].height());e[1].css("min-width",e[1].width())},ht=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return n(this).outerWidth(!0)}).get())],r=t.parent().width();return i[0]>r?i[0]:i[1]>r?i[1]:"100%"},dt=function(){var e=n(this),f=e.data(t),r=f.opt,i=n("#mCSB_"+f.idx+"_container"),u;r.advanced.autoExpandHorizontalScroll&&"y"!==r.axis&&(i.css({width:"auto","min-width":0,"overflow-x":"scroll"}),u=Math.ceil(i[0].scrollWidth),3===r.advanced.autoExpandHorizontalScroll||2!==r.advanced.autoExpandHorizontalScroll&&u>i.parent().width()?i.css({width:u,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap())},gt=function(){var s=n(this),o=s.data(t),u=o.opt,h=n(".mCSB_"+o.idx+"_scrollbar:first"),f=tt(u.scrollButtons.tabindex)?"tabindex='"+u.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+i[13]+"' "+f+" />","<a href='#' class='"+i[14]+"' "+f+" />","<a href='#' class='"+i[15]+"' "+f+" />","<a href='#' class='"+i[16]+"' "+f+" />"],e=["x"===u.axis?r[2]:r[0],"x"===u.axis?r[3]:r[1],r[2],r[3]];u.scrollButtons.enable&&h.prepend(e[0]).append(e[1]).next(".mCSB_scrollTools").prepend(e[2]).append(e[3])},ni=function(){var s=n(this),u=s.data(t),f=n("#mCSB_"+u.idx),e=n("#mCSB_"+u.idx+"_container"),r=[n("#mCSB_"+u.idx+"_dragger_vertical"),n("#mCSB_"+u.idx+"_dragger_horizontal")],o=[f.height()/e.outerHeight(!1),f.width()/e.outerWidth(!1)],i=[parseInt(r[0].css("min-height")),Math.round(o[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(o[1]*r[1].parent().width())],h=p&&i[1]<i[0]?i[0]:i[1],c=p&&i[3]<i[2]?i[2]:i[3];r[0].css({height:h,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":i[0]+"px"});r[1].css({width:c,"max-width":r[1].parent().width()-10})},ti=function(){var s=n(this),i=s.data(t),u=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),r=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e=[f.outerHeight(!1)-u.height(),f.outerWidth(!1)-u.width()],o=[e[0]/(r[0].parent().height()-r[0].height()),e[1]/(r[1].parent().width()-r[1].width())];i.scrollRatio={y:o[0],x:o[1]}},d=function(n,t,r){var f=r?i[0]+"_expanded":"",u=n.closest(".mCSB_scrollTools");"active"===t?(n.toggleClass(i[0]+" "+f),u.toggleClass(i[1]),n[0]._draggable=n[0]._draggable?0:1):n[0]._draggable||("hide"===t?(n.removeClass(i[0]),u.removeClass(i[1])):(n.addClass(i[0]),u.addClass(i[1])))},ii=function(){var h=n(this),r=h.data(t),e=n("#mCSB_"+r.idx),i=n("#mCSB_"+r.idx+"_container"),u=null==r.overflowed?i.height():i.outerHeight(!1),f=null==r.overflowed?i.width():i.outerWidth(!1),o=i[0].scrollHeight,s=i[0].scrollWidth;return o>u&&(u=o),s>f&&(f=s),[u>e.height(),f>e.width()]},y=function(){var r=n(this),i=r.data(t),f=i.opt,c=n("#mCSB_"+i.idx),s=n("#mCSB_"+i.idx+"_container"),h=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],e;(o(r),("x"!==f.axis&&!i.overflowed[0]||"y"===f.axis&&i.overflowed[0])&&(h[0].add(s).css("top",0),u(r,"_resetY")),"y"!==f.axis&&!i.overflowed[1]||"x"===f.axis&&i.overflowed[1])&&(e=dx=0,"rtl"===i.langDir&&(e=c.width()-s.outerWidth(!1),dx=Math.abs(e/i.scrollRatio.x)),s.css("left",e),h[1].css("left",dx),u(r,"_resetX"))},ri=function(){function u(){e=setTimeout(function(){n.event.special.mousewheel?(clearTimeout(e),oi.call(f[0])):u()},100)}var f=n(this),r=f.data(t),i=r.opt,e;r.bindEvents||((ui.call(this),i.contentTouchScroll&&fi.call(this),ei.call(this),i.mouseWheel.enable)&&u(),hi.call(this),li.call(this),i.advanced.autoScrollOnFocus&&ci.call(this),i.scrollButtons.enable&&ai.call(this),i.keyboard.enable&&vi.call(this),r.bindEvents=!0)},g=function(){var f=n(this),r=f.data(t),u=r.opt,o=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",e=n("#mCSB_"+r.idx+",#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,"+s+" ."+i[12]+",#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal,"+s+">a"),h=n("#mCSB_"+r.idx+"_container");u.advanced.releaseDraggableSelectors&&e.add(n(u.advanced.releaseDraggableSelectors));u.advanced.extraDraggableSelectors&&e.add(n(u.advanced.extraDraggableSelectors));r.bindEvents&&(n(document).add(n(!l()||top.document)).unbind("."+o),e.each(function(){n(this).unbind("."+o)}),clearTimeout(f[0]._focusTimeout),a(f[0],"_focusTimeout"),clearTimeout(r.sequential.step),a(r.sequential,"step"),clearTimeout(h[0].onCompleteTimeout),a(h[0],"onCompleteTimeout"),r.bindEvents=!1)},ct=function(r){var h=n(this),u=h.data(t),o=u.opt,c=n("#mCSB_"+u.idx+"_container_wrapper"),f=c.length?c:n("#mCSB_"+u.idx+"_container"),e=[n("#mCSB_"+u.idx+"_scrollbar_vertical"),n("#mCSB_"+u.idx+"_scrollbar_horizontal")],s=[e[0].find(".mCSB_dragger"),e[1].find(".mCSB_dragger")];"x"!==o.axis&&(u.overflowed[0]&&!r?(e[0].add(s[0]).add(e[0].children("a")).css("display","block"),f.removeClass(i[8]+" "+i[10])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[0].css("display","none"),f.removeClass(i[10])):(e[0].css("display","none"),f.addClass(i[10])),f.addClass(i[8])));"y"!==o.axis&&(u.overflowed[1]&&!r?(e[1].add(s[1]).add(e[1].children("a")).css("display","block"),f.removeClass(i[9]+" "+i[11])):(o.alwaysShowScrollbar?(2!==o.alwaysShowScrollbar&&s[1].css("display","none"),f.removeClass(i[11])):(e[1].css("display","none"),f.addClass(i[11])),f.addClass(i[9])));u.overflowed[0]||u.overflowed[1]?h.removeClass(i[5]):h.addClass(i[5])},r=function(t){var e=t.type,i=t.target.ownerDocument!==document&&null!==frameElement?[n(frameElement).offset().top,n(frameElement).offset().left]:null,u=l()&&t.target.ownerDocument!==top.document&&null!==frameElement?[n(t.view.frameElement).offset().top,n(t.view.frameElement).offset().left]:[0,0],r,f;switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+u[0],t.originalEvent.pageX-i[1]+u[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":return r=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],f=t.originalEvent.touches.length||t.originalEvent.changedTouches.length,t.target.ownerDocument!==document?[r.screenY,r.screenX,f>1]:[r.pageY,r.pageX,f>1];default:return i?[t.pageY-i[0]+u[0],t.pageX-i[1]+u[1],!1]:[t.pageY,t.pageX,!1]}},ui=function(){function k(n,t,r,f){var e,o;(w[0].idleTimer=h.scrollInertia<233?250:0,i.attr("id")===y[1])?(e="x",o=(i[0].offsetLeft-t+f)*s.scrollRatio.x):(e="y",o=(i[0].offsetTop-n+r)*s.scrollRatio.y);u(v,o.toString(),{dir:e,drag:!0})}var i,c,a,v=n(this),s=v.data(t),h=s.opt,f=t+"_"+s.idx,y=["mCSB_"+s.idx+"_dragger_vertical","mCSB_"+s.idx+"_dragger_horizontal"],w=n("#mCSB_"+s.idx+"_container"),b=n("#"+y[0]+",#"+y[1]),g=h.advanced.releaseDraggableSelectors?b.add(n(h.advanced.releaseDraggableSelectors)):b,nt=h.advanced.extraDraggableSelectors?n(!l()||top.document).add(n(h.advanced.extraDraggableSelectors)):n(!l()||top.document);b.bind("contextmenu."+f,function(n){n.preventDefault()}).bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),yt(t)){e=!0;p&&(document.onselectstart=function(){return!1});lt.call(w,!1);o(v);i=n(this);var u=i.offset(),f=r(t)[0]-u.top,s=r(t)[1]-u.left,l=i.height()+u.top,y=i.width()+u.left;l>f&&f>0&&y>s&&s>0&&(c=f,a=s);d(i,"active",h.autoExpandScrollbar)}}).bind("touchmove."+f,function(n){n.stopImmediatePropagation();n.preventDefault();var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;k(c,a,u,f)});n(document).add(nt).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(n){if(i){var t=i.offset(),u=r(n)[0]-t.top,f=r(n)[1]-t.left;if(c===u&&a===f)return;k(c,a,u,f)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){i&&(d(i,"active",h.autoExpandScrollbar),i=null);e=!1;p&&(document.onselectstart=null);lt.call(w,!0)})},fi=function(){function at(n){if(!nt(n)||e||r(n)[2])return void(h=0);h=1;it=0;rt=0;st=1;g.removeClass("mCS_touch_action");var t=b.offset();k=r(n)[0]-t.top;d=r(n)[1]-t.left;v=[r(n)[0],r(n)[1]]}function vt(n){var c,l,a,y;if(nt(n)&&!e&&!r(n)[2]&&(f.documentTouchScroll||n.preventDefault(),n.stopImmediatePropagation(),(!rt||it)&&st)){gt=w();var o=ut.offset(),t=r(n)[0]-o.top,u=r(n)[1]-o.left,h="mcsLinearOut";(et.push(t),ot.push(u),v[2]=Math.abs(r(n)[0]-v[0]),v[3]=Math.abs(r(n)[1]-v[1]),i.overflowed[0])&&(c=ft[0].parent().height()-ft[0].height(),l=k-t>0&&t-k>-(c*i.scrollRatio.y)&&(2*v[3]<v[2]||"yx"===f.axis));i.overflowed[1]&&(a=ft[1].parent().width()-ft[1].width(),y=d-u>0&&u-d>-(a*i.scrollRatio.x)&&(2*v[2]<v[3]||"yx"===f.axis));l||y?(ii||n.preventDefault(),it=1):(rt=1,g.addClass("mCS_touch_action"));ii&&n.preventDefault();s="yx"===f.axis?[k-t,d-u]:"x"===f.axis?[null,d-u]:[k-t,null];b[0].idleTimer=250;i.overflowed[0]&&tt(s[0],ni,h,"y","all",!0);i.overflowed[1]&&tt(s[1],ni,h,"x",lt,!0)}}function yt(n){if(!nt(n)||e||r(n)[2])return void(h=0);h=1;n.stopImmediatePropagation();o(g);dt=w();var t=ut.offset();bt=r(n)[0]-t.top;kt=r(n)[1]-t.left;et=[];ot=[]}function pt(n){var t,u,h;if(nt(n)&&!e&&!r(n)[2]){st=0;n.stopImmediatePropagation();it=0;rt=0;ht=w();var l=ut.offset(),a=r(n)[0]-l.top,v=r(n)[1]-l.left;if(!(ht-gt>30)){c=1e3/(ht-dt);var p="mcsEaseOut",o=2.5>c,k=o?[et[et.length-2],ot[ot.length-2]]:[0,0];y=o?[a-k[0],v-k[1]]:[a-bt,v-kt];t=[Math.abs(y[0]),Math.abs(y[1])];c=o?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[c,c];u=[Math.abs(b[0].offsetTop)-y[0]*wt(t[0]/c[0],c[0]),Math.abs(b[0].offsetLeft)-y[1]*wt(t[1]/c[1],c[1])];s="yx"===f.axis?[u[0],u[1]]:"x"===f.axis?[null,u[1]]:[u[0],null];ct=[4*t[0]+f.scrollInertia,4*t[1]+f.scrollInertia];h=parseInt(f.contentTouchScroll)||0;s[0]=t[0]>h?s[0]:0;s[1]=t[1]>h?s[1]:0;i.overflowed[0]&&tt(s[0],ct[0],p,"y",lt,!1);i.overflowed[1]&&tt(s[1],ct[1],p,"x",lt,!1)}}}function wt(n,t){var i=[1.5*t,2*t,t/1.5,t/2];return n>90?t>4?i[0]:i[3]:n>60?t>3?i[3]:i[2]:n>30?t>8?i[1]:t>6?i[0]:t>4?t:i[2]:t>8?t:i[3]}function tt(n,t,i,r,f,e){n&&u(g,n.toString(),{dur:t,scrollEasing:i,dir:r,overwrite:f,drag:e})}var st,k,d,bt,kt,dt,gt,ht,y,c,s,ct,it,rt,g=n(this),i=g.data(t),f=i.opt,a=t+"_"+i.idx,ut=n("#mCSB_"+i.idx),b=n("#mCSB_"+i.idx+"_container"),ft=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")],et=[],ot=[],ni=0,lt="yx"===f.axis?"none":"all",v=[],ti=b.find("iframe"),p=["touchstart."+a+" pointerdown."+a+" MSPointerDown."+a,"touchmove."+a+" pointermove."+a+" MSPointerMove."+a,"touchend."+a+" pointerup."+a+" MSPointerUp."+a],ii=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;b.bind(p[0],function(n){at(n)}).bind(p[1],function(n){vt(n)});ut.bind(p[0],function(n){yt(n)}).bind(p[2],function(n){pt(n)});ti.length&&ti.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){at(n);yt(n)}).bind(p[1],function(n){vt(n)}).bind(p[2],function(n){pt(n)})})})},ei=function(){function y(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function i(n,t,i){l.type=i&&u?"stepped":"stepless";l.scrollAmount=10;ut(a,n,t,"mcsLinearOut",i?60:null)}var u,a=n(this),f=a.data(t),v=f.opt,l=f.sequential,s=t+"_"+f.idx,o=n("#mCSB_"+f.idx+"_container"),c=o.parent();o.bind("mousedown."+s,function(){h||u||(u=1,e=!0)}).add(document).bind("mousemove."+s,function(n){if(!h&&u&&y()){var s=o.offset(),t=r(n)[0]-s.top+o[0].offsetTop,e=r(n)[1]-s.left+o[0].offsetLeft;t>0&&t<c.height()&&e>0&&e<c.width()?l.step&&i("off",null,"stepped"):("x"!==v.axis&&f.overflowed[0]&&(0>t?i("on",38):t>c.height()&&i("on",40)),"y"!==v.axis&&f.overflowed[1]&&(0>e?i("on",37):e>c.width()&&i("on",39)))}}).bind("mouseup."+s+" dragend."+s,function(){h||(u&&(u=0,i("off",null)),e=!1)})},oi=function(){function h(t,h){var a,v;if(o(s),!si(s,t.target)){if(a="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):p&&t.deltaFactor<100?100:t.deltaFactor||100,v=i.scrollInertia,"x"===i.axis||"x"===i.mouseWheel.axis)var y="x",l=[Math.round(a*r.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],w="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.width()?.9*e.width():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetLeft),b=f[1][0].offsetLeft,d=f[1].parent().width()-f[1].width(),c="y"===i.mouseWheel.axis?t.deltaY||h:t.deltaX;else var y="y",l=[Math.round(a*r.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],w="auto"!==i.mouseWheel.scrollAmount?l[1]:l[0]>=e.height()?.9*e.height():l[0],k=Math.abs(n("#mCSB_"+r.idx+"_container")[0].offsetTop),b=f[0][0].offsetTop,d=f[0].parent().height()-f[0].height(),c=t.deltaY||h;("y"!==y||r.overflowed[0])&&("x"!==y||r.overflowed[1])&&((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(c=-c),i.mouseWheel.normalizeDelta&&(c=0>c?-1:1),(c>0&&0!==b||0>c&&b!==d||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(w=t.deltaFactor,v=17),u(s,(k-c*w).toString(),{dir:y,dur:v}))}}if(n(this).data(t)){var s=n(this),r=s.data(t),i=r.opt,c=t+"_"+r.idx,e=n("#mCSB_"+r.idx),f=[n("#mCSB_"+r.idx+"_dragger_vertical"),n("#mCSB_"+r.idx+"_dragger_horizontal")],a=n("#mCSB_"+r.idx+"_container").find("iframe");a.length&&a.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind("mousewheel."+c,function(n,t){h(n,t)})})});e.bind("mousewheel."+c,function(n,t){h(n,t)})}},rt={},l=function(t){var r=!1,i=!1,u=null,f;if(void 0===t?i="#empty":void 0!==n(t).attr("id")&&(i=n(t).attr("id")),i!==!1&&void 0!==rt[i])return rt[i];if(t){try{f=t.contentDocument||t.contentWindow.document;u=f.body.innerHTML}catch(e){}r=null!==u}else{try{f=top.document;u=f.body.innerHTML}catch(e){}r=null!==u}return i!==!1&&(rt[i]=r),r},lt=function(n){var t=this.find("iframe"),i;t.length&&(i=n?"auto":"none",t.css("pointer-events",i))},si=function(i,r){var u=r.nodeName.toLowerCase(),f=i.data(t).opt.mouseWheel.disableOver;return n.inArray(u,f)>-1&&!(n.inArray(u,["select","textarea"])>-1&&!n(r).is(":focus"))},hi=function(){var s,h=n(this),f=h.data(t),r=t+"_"+f.idx,c=n("#mCSB_"+f.idx+"_container"),l=c.parent(),a=n(".mCSB_"+f.idx+"_scrollbar ."+i[12]);a.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(t){e=!0;n(t.target).hasClass("mCSB_dragger")||(s=1)}).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(){e=!1}).bind("click."+r,function(t){var r,e;if(s&&(s=0,n(t.target).hasClass(i[12])||n(t.target).hasClass("mCSB_draggerRail"))){if(o(h),r=n(this),e=r.find(".mCSB_dragger"),r.parent(".mCSB_scrollTools_horizontal").length>0){if(!f.overflowed[1])return;var v="x",a=t.pageX>e.offset().left?-1:1,y=Math.abs(c[0].offsetLeft)-a*.9*l.width()}else{if(!f.overflowed[0])return;var v="y",a=t.pageY>e.offset().top?-1:1,y=Math.abs(c[0].offsetTop)-a*.9*l.height()}u(h,y.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},ci=function(){var i=n(this),s=i.data(t),e=s.opt,c=t+"_"+s.idx,r=n("#mCSB_"+s.idx+"_container"),h=r.parent();r.bind("focusin."+c,function(){var t=n(document.activeElement),c=r.find(".mCustomScrollBox").length,s=0;t.is(e.advanced.autoScrollOnFocus)&&(o(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=c?(s+17)*c:0,i[0]._focusTimeout=setTimeout(function(){var n=[f(t)[0],f(t)[1]],o=[r[0].offsetTop,r[0].offsetLeft],c=[o[0]+n[0]>=0&&o[0]+n[0]<h.height()-t.outerHeight(!1),o[1]+n[1]>=0&&o[0]+n[1]<h.width()-t.outerWidth(!1)],l="yx"!==e.axis||c[0]||c[1]?"all":"none";"x"===e.axis||c[0]||u(i,n[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s});"y"===e.axis||c[1]||u(i,n[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:l,dur:s})},i[0]._focusTimer))})},li=function(){var u=n(this),i=u.data(t),f=t+"_"+i.idx,r=n("#mCSB_"+i.idx+"_container").parent();r.bind("scroll."+f,function(){0===r.scrollTop()&&0===r.scrollLeft()||n(".mCSB_"+i.idx+"_scrollbar").css("visibility","hidden")})},ai=function(){var f=n(this),r=f.data(t),o=r.opt,u=r.sequential,i=t+"_"+r.idx,s=".mCSB_"+r.idx+"_scrollbar",h=n(s+">a");h.bind("contextmenu."+i,function(n){n.preventDefault()}).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i+" mouseup."+i+" touchend."+i+" pointerup."+i+" MSPointerUp."+i+" mouseout."+i+" pointerout."+i+" MSPointerOut."+i+" click."+i,function(t){function i(n,t){u.scrollAmount=o.scrollButtons.scrollAmount;ut(f,n,t)}if(t.preventDefault(),yt(t)){var s=n(this).attr("class");switch(u.type=o.scrollButtons.scrollType,t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===u.type)return;e=!0;r.tweenRunning=!1;i("on",s);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===u.type)return;e=!1;u.dir&&i("off",s);break;case"click":if("stepped"!==u.type||r.tweenRunning)return;i("on",s)}}})},vi=function(){function a(t){function w(n,t){s.type=r.keyboard.scrollType;s.scrollAmount=r.keyboard.scrollAmount;"stepped"===s.type&&i.tweenRunning||ut(e,n,t)}var c,y,p,l,a;switch(t.type){case"blur":i.tweenRunning&&s.dir&&w("off",null);break;case"keydown":case"keyup":if(c=t.keyCode?t.keyCode:t.which,y="on","x"!==r.axis&&(38===c||40===c)||"y"!==r.axis&&(37===c||39===c)){if((38===c||40===c)&&!i.overflowed[0]||(37===c||39===c)&&!i.overflowed[1])return;"keyup"===t.type&&(y="off");n(document.activeElement).is(v)||(t.preventDefault(),t.stopImmediatePropagation(),w(y,c))}else 33===c||34===c?((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)&&(o(e),p=34===c?-1:1,"x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0]?(l="x",a=Math.abs(f[0].offsetLeft)-p*.9*h.width()):(l="y",a=Math.abs(f[0].offsetTop)-p*.9*h.height()),u(e,a.toString(),{dir:l,scrollEasing:"mcsEaseInOut"})):35!==c&&36!==c||n(document.activeElement).is(v)||((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"!==t.type)||("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0]?(l="x",a=35===c?Math.abs(h.width()-f.outerWidth(!1)):0):(l="y",a=35===c?Math.abs(h.height()-f.outerHeight(!1)):0),u(e,a.toString(),{dir:l,scrollEasing:"mcsEaseInOut"}))}}var e=n(this),i=e.data(t),r=i.opt,s=i.sequential,c=t+"_"+i.idx,w=n("#mCSB_"+i.idx),f=n("#mCSB_"+i.idx+"_container"),h=f.parent(),v="input,textarea,select,datalist,keygen,[contenteditable='true']",y=f.find("iframe"),p=["blur."+c+" keydown."+c+" keyup."+c];y.length&&y.each(function(){n(this).bind("load",function(){l(this)&&n(this.contentDocument||this.contentWindow.document).bind(p[0],function(n){a(n)})})});w.attr("tabindex","0").bind(p[0],function(n){a(n)})},ut=function(r,f,e,s,h){function y(n){l.snapAmount&&(c.scrollAmount=l.snapAmount instanceof Array?"x"===c.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var i="stepped"!==c.type,f=h?h:n?i?k/1.5:d:1e3/60,e=n?i?7.5:40:2.5,t=[Math.abs(p[0].offsetTop),Math.abs(p[0].offsetLeft)],o=[v.scrollRatio.y>10?10:v.scrollRatio.y,v.scrollRatio.x>10?10:v.scrollRatio.x],w="x"===c.dir[0]?t[1]+c.dir[1]*o[1]*e:t[0]+c.dir[1]*o[0]*e,b="x"===c.dir[0]?t[1]+c.dir[1]*parseInt(c.scrollAmount):t[0]+c.dir[1]*parseInt(c.scrollAmount),a="auto"!==c.scrollAmount?b:w,g=s?s:n?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",nt=!!n;return n&&17>f&&(a="x"===c.dir[0]?t[1]:t[0]),u(r,a.toString(),{dir:c.dir[0],scrollEasing:g,dur:f,onComplete:nt}),n?void(c.dir=!1):(clearTimeout(c.step),void(c.step=setTimeout(function(){y()},f)))}function b(){clearTimeout(c.step);a(c,"step");o(r)}var v=r.data(t),l=v.opt,c=v.sequential,p=n("#mCSB_"+v.idx+"_container"),w="stepped"===c.type,k=l.scrollInertia<26?26:l.scrollInertia,d=l.scrollInertia<1?17:l.scrollInertia;switch(f){case"on":if(c.dir=[e===i[16]||e===i[15]||39===e||37===e?"x":"y",e===i[13]||e===i[15]||38===e||37===e?-1:1],o(r),tt(e)&&"stepped"===c.type)return;y(w);break;case"off":b();(w||v.tweenRunning&&c.dir)&&y(!0)}},ft=function(i){var u=n(this).data(t).opt,r=[];return"function"==typeof i&&(i=i()),i instanceof Array?r=i.length>1?[i[0],i[1]]:"x"===u.axis?[null,i[0]]:[i[0],null]:(r[0]=i.y?i.y:i.x||"x"===u.axis?null:i,r[1]=i.x?i.x:i.y||"y"===u.axis?null:i),"function"==typeof r[0]&&(r[0]=r[0]()),"function"==typeof r[1]&&(r[1]=r[1]()),r},at=function(i,r){var h,e;if(null!=i&&"undefined"!=typeof i){var c=n(this),l=c.data(t),v=l.opt,u=n("#mCSB_"+l.idx+"_container"),o=u.parent(),y=typeof i;r||(r="x"===v.axis?"x":"y");var p="x"===r?u.outerWidth(!1)-o.width():u.outerHeight(!1)-o.height(),a="x"===r?u[0].offsetLeft:u[0].offsetTop,w="x"===r?"left":"top";switch(y){case"function":return i();case"object":return(e=i.jquery?i:n(i),!e.length)?void 0:"x"===r?f(e)[1]:f(e)[0];case"string":case"number":return tt(i)?Math.abs(i):-1!==i.indexOf("%")?Math.abs(p*parseInt(i)/100):-1!==i.indexOf("-=")?Math.abs(a-parseInt(i.split("-=")[1])):-1!==i.indexOf("+=")?(h=a+parseInt(i.split("+=")[1]),h>=0?0:Math.abs(h)):-1!==i.indexOf("px")&&tt(i.split("px")[0])?Math.abs(i.split("px")[0]):"top"===i||"left"===i?0:"bottom"===i?Math.abs(o.height()-u.outerHeight(!1)):"right"===i?Math.abs(o.width()-u.outerWidth(!1)):"first"===i||"last"===i?(e=u.find(":"+i),"x"===r?f(e)[1]:f(e)[0]):n(i).length?"x"===r?f(n(i))[1]:f(n(i))[0]:(u.css(w,i),void s.update.call(null,c[0]))}}},et=function(r){function c(){return clearTimeout(e[0].autoUpdate),0===o.parents("html").length?void(o=null):void(e[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(u.poll.change.n=v(),u.poll.change.n!==u.poll.change.o)?(u.poll.change.o=u.poll.change.n,void h(3)):f.advanced.updateOnContentResize&&(u.poll.size.n=o[0].scrollHeight+o[0].scrollWidth+e[0].offsetHeight+o[0].offsetHeight+o[0].offsetWidth,u.poll.size.n!==u.poll.size.o)?(u.poll.size.o=u.poll.size.n,void h(1)):!f.advanced.updateOnImageLoad||"auto"===f.advanced.updateOnImageLoad&&"y"===f.axis||(u.poll.img.n=e.find("img").length,u.poll.img.n===u.poll.img.o)?void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&c()):(u.poll.img.o=u.poll.img.n,void e.find("img").each(function(){l(this)}))},f.advanced.autoUpdateTimeout))}function l(t){function u(n,t){return function(){return t.apply(n,arguments)}}function f(){this.onload=null;n(t).addClass(i[2]);h(2)}if(n(t).hasClass(i[2]))return void h();var r=new Image;r.onload=u(r,f);r.src=t.src}function v(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var n=0,t=e.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){n+=this.offsetHeight+this.offsetWidth}),n}function h(n){clearTimeout(e[0].autoUpdate);s.update.call(null,o[0],n)}var o=n(this),u=o.data(t),f=u.opt,e=n("#mCSB_"+u.idx+"_container");return r?(clearTimeout(e[0].autoUpdate),void a(e[0],"autoUpdate")):void c()},yi=function(n,t,i){return Math.round(n/t)*t-i},o=function(i){var r=i.data(t),u=n("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");u.each(function(){pi.call(this)})},u=function(i,r,u){function h(n){return f&&e.callbacks[n]&&"function"==typeof e.callbacks[n]}function rt(){return[e.callbacks.alwaysTriggerOffsets||w>=l[0]+v,e.callbacks.alwaysTriggerOffsets||-y>=w]}function a(){var n=[o[0].offsetTop,o[0].offsetLeft],t=[c[0].offsetTop,c[0].offsetLeft],r=[o.outerHeight(!1),o.outerWidth(!1)],f=[p.height(),p.width()];i[0].mcs={content:o,top:n[0],left:n[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(n[0])/(Math.abs(r[0])-f[0])),leftPct:Math.round(100*Math.abs(n[1])/(Math.abs(r[1])-f[1])),direction:u.dir}}var f=i.data(t),e=f.opt,ut={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:e.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},u=n.extend(ut,u),k=[u.dur,u.drag?0:u.dur],p=n("#mCSB_"+f.idx),o=n("#mCSB_"+f.idx+"_container"),b=o.parent(),g=e.callbacks.onTotalScrollOffset?ft.call(i,e.callbacks.onTotalScrollOffset):[0,0],nt=e.callbacks.onTotalScrollBackOffset?ft.call(i,e.callbacks.onTotalScrollBackOffset):[0,0],tt;if(f.trigger=u.trigger,0===b.scrollTop()&&0===b.scrollLeft()||(n(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),b.scrollTop(0).scrollLeft(0)),"_resetY"!==r||f.contentReset.y||(h("onOverflowYNone")&&e.callbacks.onOverflowYNone.call(i[0]),f.contentReset.y=1),"_resetX"!==r||f.contentReset.x||(h("onOverflowXNone")&&e.callbacks.onOverflowXNone.call(i[0]),f.contentReset.x=1),"_resetY"!==r&&"_resetX"!==r){(!f.contentReset.y&&i[0].mcs||!f.overflowed[0]||(h("onOverflowY")&&e.callbacks.onOverflowY.call(i[0]),f.contentReset.x=null),!f.contentReset.x&&i[0].mcs||!f.overflowed[1]||(h("onOverflowX")&&e.callbacks.onOverflowX.call(i[0]),f.contentReset.x=null),e.snapAmount)&&(tt=e.snapAmount instanceof Array?"x"===u.dir?e.snapAmount[1]:e.snapAmount[0]:e.snapAmount,r=yi(r,tt,e.snapOffset));switch(u.dir){case"x":var c=n("#mCSB_"+f.idx+"_dragger_horizontal"),it="left",w=o[0].offsetLeft,l=[p.width()-o.outerWidth(!1),c.parent().width()-c.width()],s=[r,0===r?0:r/f.scrollRatio.x],v=g[1],y=nt[1],et=v>0?v/f.scrollRatio.x:0,ot=y>0?y/f.scrollRatio.x:0;break;case"y":var c=n("#mCSB_"+f.idx+"_dragger_vertical"),it="top",w=o[0].offsetTop,l=[p.height()-o.outerHeight(!1),c.parent().height()-c.height()],s=[r,0===r?0:r/f.scrollRatio.y],v=g[0],y=nt[0],et=v>0?v/f.scrollRatio.y:0,ot=y>0?y/f.scrollRatio.y:0}s[1]<0||0===s[0]&&0===s[1]?s=[0,0]:s[1]>=l[1]?s=[l[0],l[1]]:s[0]=-s[0];i[0].mcs||(a(),h("onInit")&&e.callbacks.onInit.call(i[0]));clearTimeout(o[0].onCompleteTimeout);vt(c[0],it,Math.round(s[1]),k[1],u.scrollEasing);!f.tweenRunning&&(0===w&&s[0]>=0||w===l[0]&&s[0]<=l[0])||vt(o[0],it,Math.round(s[0]),k[0],u.scrollEasing,u.overwrite,{onStart:function(){u.callbacks&&u.onStart&&!f.tweenRunning&&(h("onScrollStart")&&(a(),e.callbacks.onScrollStart.call(i[0])),f.tweenRunning=!0,d(c),f.cbOffsets=rt())},onUpdate:function(){u.callbacks&&u.onUpdate&&h("whileScrolling")&&(a(),e.callbacks.whileScrolling.call(i[0]))},onComplete:function(){if(u.callbacks&&u.onComplete){"yx"===e.axis&&clearTimeout(o[0].onCompleteTimeout);var n=o[0].idleTimer||0;o[0].onCompleteTimeout=setTimeout(function(){h("onScroll")&&(a(),e.callbacks.onScroll.call(i[0]));h("onTotalScroll")&&s[1]>=l[1]-et&&f.cbOffsets[0]&&(a(),e.callbacks.onTotalScroll.call(i[0]));h("onTotalScrollBack")&&s[1]<=ot&&f.cbOffsets[1]&&(a(),e.callbacks.onTotalScrollBack.call(i[0]));f.tweenRunning=!1;o[0].idleTimer=0;d(c,"hide")},n)}}})}},vt=function(n,t,i,r,u,f,e){function a(){o.stop||(s||g.call(),s=w()-it,v(),s>=o.time&&(o.time=s>o.time?s+h-(s-o.time):s+h-1,o.time<s+1&&(o.time=s+1)),o.time<r?o.id=c(a):tt.call())}function v(){r>0?(o.currVal=d(o.time,l,p,r,u),y[t]=Math.round(o.currVal)+"px"):y[t]=i+"px";nt.call()}function b(){h=1e3/60;o.time=s+h;c=window.requestAnimationFrame?window.requestAnimationFrame:function(n){return v(),setTimeout(n,.01)};o.id=c(a)}function k(){null!=o.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(o.id):clearTimeout(o.id),o.id=null)}function d(n,t,i,r,u){switch(u){case"linear":case"mcsLinear":return i*n/r+t;case"mcsLinearOut":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeInOutSmooth":return n/=r/2,1>n?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeInOutStrong":return n/=r/2,1>n?i/2*Math.pow(2,10*(n-1))+t:(n--,i/2*(-Math.pow(2,-10*n)+2)+t);case"easeInOut":case"mcsEaseInOut":return n/=r/2,1>n?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t);case"easeOutSmooth":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutStrong":return i*(-Math.pow(2,-10*n/r)+1)+t;case"easeOut":case"mcsEaseOut":default:var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n)}}var p;n._mTween||(n._mTween={top:{},left:{}});var h,c,e=e||{},g=e.onStart||function(){},nt=e.onUpdate||function(){},tt=e.onComplete||function(){},it=w(),s=0,l=n.offsetTop,y=n.style,o=n._mTween[t];"left"===t&&(l=n.offsetLeft);p=i-l;o.stop=0;"none"!==f&&k();b()},w=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},pi=function(){var n=this,r,i,t;for(n._mTween||(n._mTween={top:{},left:{}}),r=["top","left"],i=0;i<r.length;i++)t=r[i],n._mTween[t].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._mTween[t].id):clearTimeout(n._mTween[t].id),n._mTween[t].id=null,n._mTween[t].stop=1)},a=function(n,t){try{delete n[t]}catch(i){n[t]=null}},yt=function(n){return!(n.which&&1!==n.which)},nt=function(n){var t=n.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},tt=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},f=function(n){var t=n.parents(".mCSB_container");return[n.offset().top-t.offset().top,n.offset().left-t.offset().left]},wi=function(){function t(){var t=["webkit","moz","ms","o"],n;if("hidden"in document)return"hidden";for(n=0;n<t.length;n++)if(t[n]+"Hidden"in document)return t[n]+"Hidden";return null}var n=t();return n?document[n]:!1};n.fn[c]=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):s.init.apply(this,arguments)};n[c]=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void n.error("Method "+t+" does not exist"):s.init.apply(this,arguments)};n[c].defaults=ot;window[c]=!0;n(window).bind("load",function(){n(it)[c]();n.extend(n.expr[":"],{mcsInView:n.expr[":"].mcsInView||function(t){var e,r,i=n(t),u=i.parents(".mCSB_container");if(u.length)return e=u.parent(),r=[u[0].offsetTop,u[0].offsetLeft],r[0]+f(i)[0]>=0&&r[0]+f(i)[0]<e.height()-i.outerHeight(!1)&&r[1]+f(i)[1]>=0&&r[1]+f(i)[1]<e.width()-i.outerWidth(!1)},mcsInSight:n.expr[":"].mcsInSight||function(t,i,r){var e,u,o,s,h=n(t),c=h.parents(".mCSB_container"),l="exact"===r[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return e=[h.outerHeight(!1),h.outerWidth(!1)],o=[c[0].offsetTop+f(h)[0],c[0].offsetLeft+f(h)[1]],u=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],s=[e[0]<u[0]?l[0]:l[1],e[1]<u[1]?l[0]:l[1]],o[0]-u[0]*s[0][0]<0&&o[0]+e[0]-u[0]*s[0][1]>=0&&o[1]-u[1]*s[1][0]<0&&o[1]+e[1]-u[1]*s[1][1]>=0},mcsOverflow:n.expr[":"].mcsOverflow||function(i){var r=n(i).data(t);if(r)return r.overflowed[0]||r.overflowed[1]}})})})}),function(n){"use strict";n.fn.counterUp=function(t){var i=n.extend({time:400,delay:10,offset:100,beginAt:0,formatter:!1,context:"window",callback:function(){}},t),r;return this.each(function(){var t=n(this),u={time:n(this).data("counterup-time")||i.time,delay:n(this).data("counterup-delay")||i.delay,offset:n(this).data("counterup-offset")||i.offset,beginAt:n(this).data("counterup-beginat")||i.beginAt,context:n(this).data("counterup-context")||i.context},f=function(){var p=[],s=u.time/u.delay,e=n(this).attr("data-num")?n(this).attr("data-num"):t.text(),k=/[0-9]+,[0-9]+/.test(e),w,h,c,l,o,f,b;if(e=e.replace(/,/g,""),w=(e.split(".")[1]||[]).length,u.beginAt>e&&(u.beginAt=e),h=/[0-9]+:[0-9]+:[0-9]+/.test(e),h)for(c=e.split(":"),l=1,r=0;c.length>0;)r+=l*parseInt(c.pop(),10),l*=60;for(o=s;o>=u.beginAt/e*s;o--){if(f=parseFloat(e/s*o).toFixed(w),h){f=parseInt(r/s*o);var a=parseInt(f/3600)%24,v=parseInt(f/60)%60,y=parseInt(f%60,10);f=(a<10?"0"+a:a)+":"+(v<10?"0"+v:v)+":"+(y<10?"0"+y:y)}if(k)while(/(\d+)(\d{3})/.test(f.toString()))f=f.toString().replace(/(\d+)(\d{3})/,"$1,$2");i.formatter&&(f=i.formatter.call(this,f));p.unshift(f)}t.data("counterup-nums",p);t.text(u.beginAt);b=function(){if(!t.data("counterup-nums")){i.callback.call(this);return}t.html(t.data("counterup-nums").shift());t.data("counterup-nums").length?setTimeout(t.data("counterup-func"),u.delay):(t.data("counterup-nums",null),t.data("counterup-func",null),i.callback.call(this))};t.data("counterup-func",b);setTimeout(t.data("counterup-func"),u.delay)};t.waypoint(function(){f();this.destroy()},{offset:u.offset+"%",context:u.context})})}}(jQuery);!function(){"use strict";function n(r){if(!r)throw new Error("No options passed to Waypoint constructor");if(!r.element)throw new Error("No element option passed to Waypoint constructor");if(!r.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+i;this.options=n.Adapter.extend({},n.defaults,r);this.element=this.options.element;this.adapter=new n.Adapter(this.element);this.callback=r.handler;this.axis=this.options.horizontal?"horizontal":"vertical";this.enabled=this.options.enabled;this.triggerPoint=null;this.group=n.Group.findOrCreate({name:this.options.group,axis:this.axis});this.context=n.Context.findOrCreateByElement(this.options.context);n.offsetAliases[this.options.offset]&&(this.options.offset=n.offsetAliases[this.options.offset]);this.group.add(this);this.context.add(this);t[this.key]=this;i+=1}var i=0,t={};n.prototype.queueTrigger=function(n){this.group.queueTrigger(this,n)};n.prototype.trigger=function(n){this.enabled&&this.callback&&this.callback.apply(this,n)};n.prototype.destroy=function(){this.context.remove(this);this.group.remove(this);delete t[this.key]};n.prototype.disable=function(){return this.enabled=!1,this};n.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this};n.prototype.next=function(){return this.group.next(this)};n.prototype.previous=function(){return this.group.previous(this)};n.invokeAll=function(n){var r=[],u,i,f;for(u in t)r.push(t[u]);for(i=0,f=r.length;f>i;i++)r[i][n]()};n.destroyAll=function(){n.invokeAll("destroy")};n.disableAll=function(){n.invokeAll("disable")};n.enableAll=function(){n.Context.refreshAll();for(var i in t)t[i].enabled=!0;return this};n.refreshAll=function(){n.Context.refreshAll()};n.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight};n.viewportWidth=function(){return document.documentElement.clientWidth};n.adapters=[];n.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0};n.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}};window.Waypoint=n}(),function(){"use strict";function f(n){window.setTimeout(n,1e3/60)}function n(u){this.element=u;this.Adapter=t.Adapter;this.adapter=new this.Adapter(u);this.key="waypoint-context-"+r;this.didScroll=!1;this.didResize=!1;this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()};this.waypoints={vertical:{},horizontal:{}};u.waypointContextKey=this.key;i[u.waypointContextKey]=this;r+=1;t.windowContext||(t.windowContext=!0,t.windowContext=new n(window));this.createThrottledScrollHandler();this.createThrottledResizeHandler()}var r=0,i={},t=window.Waypoint,u=window.onload;n.prototype.add=function(n){var t=n.options.horizontal?"horizontal":"vertical";this.waypoints[t][n.key]=n;this.refresh()};n.prototype.checkEmpty=function(){var n=this.Adapter.isEmptyObject(this.waypoints.horizontal),t=this.Adapter.isEmptyObject(this.waypoints.vertical),r=this.element==this.element.window;n&&t&&!r&&(this.adapter.off(".waypoints"),delete i[this.key])};n.prototype.createThrottledResizeHandler=function(){function i(){n.handleResize();n.didResize=!1}var n=this;this.adapter.on("resize.waypoints",function(){n.didResize||(n.didResize=!0,t.requestAnimationFrame(i))})};n.prototype.createThrottledScrollHandler=function(){function i(){n.handleScroll();n.didScroll=!1}var n=this;this.adapter.on("scroll.waypoints",function(){(!n.didScroll||t.isTouch)&&(n.didScroll=!0,t.requestAnimationFrame(i))})};n.prototype.handleResize=function(){t.Context.refreshAll()};n.prototype.handleScroll=function(){var u={},i={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},r,f,n,s;for(r in i){var t=i[r],h=t.newScroll>t.oldScroll,c=h?t.forward:t.backward;for(f in this.waypoints[r])if(n=this.waypoints[r][f],null!==n.triggerPoint){var e=t.oldScroll<n.triggerPoint,o=t.newScroll>=n.triggerPoint,l=e&&o,a=!e&&!o;(l||a)&&(n.queueTrigger(c),u[n.group.id]=n.group)}}for(s in u)u[s].flushTriggers();this.oldScroll={x:i.horizontal.newScroll,y:i.vertical.newScroll}};n.prototype.innerHeight=function(){return this.element==this.element.window?t.viewportHeight():this.adapter.innerHeight()};n.prototype.remove=function(n){delete this.waypoints[n.axis][n.key];this.checkEmpty()};n.prototype.innerWidth=function(){return this.element==this.element.window?t.viewportWidth():this.adapter.innerWidth()};n.prototype.destroy=function(){var t=[],i,r,n,u;for(i in this.waypoints)for(r in this.waypoints[i])t.push(this.waypoints[i][r]);for(n=0,u=t.length;u>n;n++)t[n].destroy()};n.prototype.refresh=function(){var o,u=this.element==this.element.window,l=u?void 0:this.adapter.offset(),f={},e,i,a;this.handleScroll();o={horizontal:{contextOffset:u?0:l.left,contextScroll:u?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:u?0:l.top,contextScroll:u?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(e in o){i=o[e];for(a in this.waypoints[e]){var v,s,h,y,p,n=this.waypoints[e][a],r=n.options.offset,w=n.triggerPoint,b=0,c=null==w;n.element!==n.element.window&&(b=n.adapter.offset()[i.offsetProp]);"function"==typeof r?r=r.apply(n):"string"==typeof r&&(r=parseFloat(r),n.options.offset.indexOf("%")>-1&&(r=Math.ceil(i.contextDimension*r/100)));v=i.contextScroll-i.contextOffset;n.triggerPoint=Math.floor(b+v-r);s=w<i.oldScroll;h=n.triggerPoint>=i.oldScroll;y=s&&h;p=!s&&!h;!c&&y?(n.queueTrigger(i.backward),f[n.group.id]=n.group):!c&&p?(n.queueTrigger(i.forward),f[n.group.id]=n.group):c&&i.oldScroll>=n.triggerPoint&&(n.queueTrigger(i.forward),f[n.group.id]=n.group)}}return t.requestAnimationFrame(function(){for(var n in f)f[n].flushTriggers()}),this};n.findOrCreateByElement=function(t){return n.findByElement(t)||new n(t)};n.refreshAll=function(){for(var n in i)i[n].refresh()};n.findByElement=function(n){return i[n.waypointContextKey]};window.onload=function(){u&&u();n.refreshAll()};t.requestAnimationFrame=function(n){var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||f;t.call(window,n)};t.Context=n}(),function(){"use strict";function i(n,t){return n.triggerPoint-t.triggerPoint}function u(n,t){return t.triggerPoint-n.triggerPoint}function n(n){this.name=n.name;this.axis=n.axis;this.id=this.name+"-"+this.axis;this.waypoints=[];this.clearTriggerQueues();r[this.axis][this.name]=this}var r={vertical:{},horizontal:{}},t=window.Waypoint;n.prototype.add=function(n){this.waypoints.push(n)};n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}};n.prototype.flushTriggers=function(){var n,t,e,r,o,f;for(n in this.triggerQueues)for(t=this.triggerQueues[n],e="up"===n||"left"===n,t.sort(e?u:i),r=0,o=t.length;o>r;r+=1)f=t[r],(f.options.continuous||r===t.length-1)&&f.trigger([n]);this.clearTriggerQueues()};n.prototype.next=function(n){this.waypoints.sort(i);var r=t.Adapter.inArray(n,this.waypoints),u=r===this.waypoints.length-1;return u?null:this.waypoints[r+1]};n.prototype.previous=function(n){this.waypoints.sort(i);var r=t.Adapter.inArray(n,this.waypoints);return r?this.waypoints[r-1]:null};n.prototype.queueTrigger=function(n,t){this.triggerQueues[t].push(n)};n.prototype.remove=function(n){var i=t.Adapter.inArray(n,this.waypoints);i>-1&&this.waypoints.splice(i,1)};n.prototype.first=function(){return this.waypoints[0]};n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]};n.findOrCreate=function(t){return r[t.axis][t.name]||new n(t)};t.Group=n}(),function(){"use strict";function n(n){this.$element=t(n)}var t=window.jQuery,i=window.Waypoint;t.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,i){n.prototype[i]=function(){var n=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,n)}});t.each(["extend","inArray","isEmptyObject"],function(i,r){n[r]=t[r]});i.adapters.push({name:"jquery",Adapter:n});i.Adapter=n}(),function(){"use strict";function n(n){return function(){var r=[],i=arguments[0];return n.isFunction(arguments[0])&&(i=n.extend({},arguments[1]),i.handler=arguments[0]),this.each(function(){var u=n.extend({},i,{element:this});"string"==typeof u.context&&(u.context=n(this).closest(u.context)[0]);r.push(new t(u))}),r}}var t=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=n(window.jQuery));window.Zepto&&(window.Zepto.fn.waypoint=n(window.Zepto))}(),function(n){n.fn.appear=function(t,i){var r=n.extend({one:!0},i);return this.each(function(){var i=n(this);if(i.appeared=!1,!t){i.trigger("appear",r.data);return}var u=n(window),f=function(){if(!i.is(":visible")){i.appeared=!1;return}var n=u.scrollLeft(),t=u.scrollTop(),f=i.offset(),e=f.left,o=f.top;o+i.height()>=t&&o<=t+u.height()&&e+i.width()>=n&&e<=n+u.width()?i.appeared||i.trigger("appear",r.data):i.appeared=!1},e=function(){if(i.appeared=!0,r.one){u.unbind("scroll",f);var e=n.inArray(f,n.fn.appear.checks);e>=0&&n.fn.appear.checks.splice(e,1)}t.apply(this,arguments)};if(r.one)i.one("appear",r.data,e);else i.bind("appear",r.data,e);u.scroll(f);n.fn.appear.checks.push(f);f()})};n.extend(n.fn.appear,{checks:[],timeout:null,checkAll:function(){var t=n.fn.appear.checks.length;if(t>0)while(t--)n.fn.appear.checks[t]()},run:function(){n.fn.appear.timeout&&clearTimeout(n.fn.appear.timeout);n.fn.appear.timeout=setTimeout(n.fn.appear.checkAll,20)}});n.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(t,i){var r=n.fn[i];r&&(n.fn[i]=function(){var t=r.apply(this,arguments);return n.fn.appear.run(),t})})}(jQuery)