").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("
"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("
"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
!function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var j,b="mCustomScrollbar",c="mCS",d=".mCustomScrollbar",e={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}},f=0,g={},h=window.attachEvent&&!window.addEventListener?1:0,i=!1,k=["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"],l={init:function(b){var b=a.extend(!0,{},e,b),h=m.call(this);if(b.live){var i=b.liveSelector||this.selector||d,j=a(i);if("off"===b.live)return void o(i);g[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(h).each(function(){var d=a(this);if(!d.data(c)){d.data(c,{idx:++f,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:d.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=d.data(c),g=e.opt,h=d.data("mcs-axis"),i=d.data("mcs-scrollbar-position"),j=d.data("mcs-theme");h&&(g.axis=h),i&&(g.scrollbarPosition=i),j&&(g.theme=j,n(g)),r.call(this),e&&g.callbacks.onCreate&&"function"==typeof g.callbacks.onCreate&&g.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,d)}})},update:function(b,d){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(c)){var e=b.data(c),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&U(b),d&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),d&&e&&(2===d&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===d&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),S.call(this)}})},scrollTo:function(b,d){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(c)){var f=e.data(c),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,d),j=Q.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=R.call(this,j[0],"y"),j[1]=R.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ca()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",V(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",V(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(c)&&U(b)})},disable:function(b){var d=m.call(this);return a(d).each(function(){var d=a(this);if(d.data(c)){d.data(c);S.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),d.addClass(k[3])}})},destroy:function(){var d=m.call(this);return a(d).each(function(){var e=a(this);if(e.data(c)){var f=e.data(c),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(d).selector),S.call(this,"remove"),B.call(this),z.call(this),e.removeData(c),Z(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(b+" _"+c+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?d:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["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"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){g[a]&&(clearTimeout(g[a]),Z(g,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var d=a(this),e=d.data(c),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["
","
"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"
":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&d.css("width",f.setWidth),f.setHeight&&d.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,d.addClass(b+" _"+c+"_"+e.idx+m+n).wrapInner("
");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===d.css("position")&&d.css("position","relative"),d.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),d=b.data(c),e=d.opt,f=a("#mCSB_"+d.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("
").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),d=b.data(c),e=d.opt,f=a(".mCSB_"+d.idx+"_scrollbar:first"),g=aa(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["
","
","
","
"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),d=b.data(c),e=a("#mCSB_"+d.idx),f=a("#mCSB_"+d.idx+"_container"),g=[a("#mCSB_"+d.idx+"_dragger_vertical"),a("#mCSB_"+d.idx+"_dragger_horizontal")],i=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(i[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(i[1]*g[1].parent().width())],k=h&&j[1]
g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),d=b.data(c),e=d.opt,f=a("#mCSB_"+d.idx),g=a("#mCSB_"+d.idx+"_container"),h=[a("#mCSB_"+d.idx+"_dragger_vertical"),a("#mCSB_"+d.idx+"_dragger_horizontal")];if(U(b),("x"!==e.axis&&!d.overflowed[0]||"y"===e.axis&&d.overflowed[0])&&(h[0].add(g).css("top",0),V(b,"_resetY")),"y"!==e.axis&&!d.overflowed[1]||"x"===e.axis&&d.overflowed[1]){var i=dx=0;"rtl"===d.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/d.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),V(b,"_resetX")}},A=function(){function f(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(b[0])):f()},100)}var b=a(this),d=b.data(c),e=d.opt;if(!d.bindEvents){if(E.call(this),e.contentTouchScroll&&F.call(this),G.call(this),e.mouseWheel.enable){var g;f()}K.call(this),M.call(this),e.advanced.autoScrollOnFocus&&L.call(this),e.scrollButtons.enable&&N.call(this),e.keyboard.enable&&O.call(this),d.bindEvents=!0}},B=function(){var b=a(this),d=b.data(c),e=d.opt,f=c+"_"+d.idx,g=".mCSB_"+d.idx+"_scrollbar",h=a("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+d.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),d.bindEvents&&(a(document).add(a(!I()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),Z(b[0],"_focusTimeout"),clearTimeout(d.sequential.step),Z(d.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),Z(i[0],"onCompleteTimeout"),d.bindEvents=!1)},C=function(b){var d=a(this),e=d.data(c),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?d.removeClass(k[5]):d.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=I()&&b.target.ownerDocument!==top.document?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function q(a){var b=j.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function r(a,c,f,h){if(j[0].idleTimer=e.scrollInertia<233?250:0,l.attr("id")===g[1])var i="x",k=(l[0].offsetLeft-c+h)*d.scrollRatio.x;else var i="y",k=(l[0].offsetTop-a+f)*d.scrollRatio.y;V(b,k.toString(),{dir:i,drag:!0})}var l,m,n,b=a(this),d=b.data(c),e=d.opt,f=c+"_"+d.idx,g=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],j=a("#mCSB_"+d.idx+"_container"),k=a("#"+g[0]+",#"+g[1]),o=e.advanced.releaseDraggableSelectors?k.add(a(e.advanced.releaseDraggableSelectors)):k,p=e.advanced.extraDraggableSelectors?a(!I()||top.document).add(a(e.advanced.extraDraggableSelectors)):a(!I()||top.document);k.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),$(c)){i=!0,h&&(document.onselectstart=function(){return!1}),q(!1),U(b),l=a(this);var d=l.offset(),f=D(c)[0]-d.top,g=D(c)[1]-d.left,j=l.height()+d.top,k=l.width()+d.left;f0&&g0&&(m=f,n=g),x(l,"active",e.autoExpandScrollbar)}}).bind("touchmove."+f,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=l.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;r(m,n,c,d)}),a(document).add(p).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(a){if(l){var b=l.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(m===c&&n===d)return;r(m,n,c,d)}}).add(o).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(a){l&&(x(l,"active",e.autoExpandScrollbar),l=null),i=!1,h&&(document.onselectstart=null),q(!0)})},F=function(){function J(a){if(!_(a)||i||D(a)[2])return void(j=0);j=1,C=0,E=0,l=1,b.removeClass("mCS_touch_action");var c=h.offset();m=D(a)[0]-c.top,n=D(a)[1]-c.left,B=[D(a)[0],D(a)[1]]}function K(a){if(_(a)&&!i&&!D(a)[2]&&(e.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!E||C)&&l)){t=X();var c=g.offset(),f=D(a)[0]-c.top,j=D(a)[1]-c.left,o="mcsLinearOut";if(q.push(f),r.push(j),B[2]=Math.abs(D(a)[0]-B[0]),B[3]=Math.abs(D(a)[1]-B[1]),d.overflowed[0])var p=k[0].parent().height()-k[0].height(),s=m-f>0&&f-m>-(p*d.scrollRatio.y)&&(2*B[3]0&&j-n>-(u*d.scrollRatio.x)&&(2*B[2]30)){w=1e3/(u-s);var j="mcsEaseOut",k=w<2.5,m=k?[q[q.length-2],r[r.length-2]]:[0,0];v=k?[c-m[0],f-m[1]]:[c-o,f-p];var n=[Math.abs(v[0]),Math.abs(v[1])];w=k?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[w,w];var y=[Math.abs(h[0].offsetTop)-v[0]*N(n[0]/w[0],w[0]),Math.abs(h[0].offsetLeft)-v[1]*N(n[1]/w[1],w[1])];x="yx"===e.axis?[y[0],y[1]]:"x"===e.axis?[null,y[1]]:[y[0],null],z=[4*n[0]+e.scrollInertia,4*n[1]+e.scrollInertia];var B=parseInt(e.contentTouchScroll)||0;x[0]=n[0]>B?x[0]:0,x[1]=n[1]>B?x[1]:0,d.overflowed[0]&&O(x[0],z[0],j,"y",A,!1),d.overflowed[1]&&O(x[1],z[1],j,"x",A,!1)}}}function N(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function O(a,c,d,e,f,g){a&&V(b,a.toString(),{dur:c,scrollEasing:d,dir:e,overwrite:f,drag:g})}var l,m,n,o,p,s,t,u,v,w,x,z,C,E,b=a(this),d=b.data(c),e=d.opt,f=c+"_"+d.idx,g=a("#mCSB_"+d.idx),h=a("#mCSB_"+d.idx+"_container"),k=[a("#mCSB_"+d.idx+"_dragger_vertical"),a("#mCSB_"+d.idx+"_dragger_horizontal")],q=[],r=[],y=0,A="yx"===e.axis?"none":"all",B=[],F=h.find("iframe"),G=["touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,"touchmove."+f+" pointermove."+f+" MSPointerMove."+f,"touchend."+f+" pointerup."+f+" MSPointerUp."+f],H=void 0!==document.body.style.touchAction;h.bind(G[0],function(a){J(a)}).bind(G[1],function(a){K(a)}),g.bind(G[0],function(a){L(a)}).bind(G[2],function(a){M(a)}),F.length&&F.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(G[0],function(a){J(a),L(a)}).bind(G[1],function(a){K(a)}).bind(G[2],function(a){M(a)})})})},G=function(){function m(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(a,c,d){f.type=d&&l?"stepped":"stepless",f.scrollAmount=10,P(b,a,c,"mcsLinearOut",d?60:null)}var l,b=a(this),d=b.data(c),e=d.opt,f=d.sequential,g=c+"_"+d.idx,h=a("#mCSB_"+d.idx+"_container"),k=h.parent();h.bind("mousedown."+g,function(a){j||l||(l=1,i=!0)}).add(document).bind("mousemove."+g,function(a){if(!j&&l&&m()){var b=h.offset(),c=D(a)[0]-b.top+h[0].offsetTop,g=D(a)[1]-b.left+h[0].offsetLeft;c>0&&c0&&gk.height()&&n("on",40)),"y"!==e.axis&&d.overflowed[1]&&(g<0?n("on",37):g>k.width()&&n("on",39)))}}).bind("mouseup."+g+" dragend."+g,function(a){j||(l&&(l=0,n("off",null)),i=!1)})},H=function(){function k(c,f){if(U(b),!J(b,c.target)){var j="auto"!==e.mouseWheel.deltaFactor?parseInt(e.mouseWheel.deltaFactor):h&&c.deltaFactor<100?100:c.deltaFactor||100,k=e.scrollInertia;if("x"===e.axis||"x"===e.mouseWheel.axis)var l="x",m=[Math.round(j*d.scrollRatio.x),parseInt(e.mouseWheel.scrollAmount)],n="auto"!==e.mouseWheel.scrollAmount?m[1]:m[0]>=g.width()?.9*g.width():m[0],o=Math.abs(a("#mCSB_"+d.idx+"_container")[0].offsetLeft),p=i[1][0].offsetLeft,q=i[1].parent().width()-i[1].width(),r=c.deltaX||c.deltaY||f;else var l="y",m=[Math.round(j*d.scrollRatio.y),parseInt(e.mouseWheel.scrollAmount)],n="auto"!==e.mouseWheel.scrollAmount?m[1]:m[0]>=g.height()?.9*g.height():m[0],o=Math.abs(a("#mCSB_"+d.idx+"_container")[0].offsetTop),p=i[0][0].offsetTop,q=i[0].parent().height()-i[0].height(),r=c.deltaY||f;"y"===l&&!d.overflowed[0]||"x"===l&&!d.overflowed[1]||((e.mouseWheel.invert||c.webkitDirectionInvertedFromDevice)&&(r=-r),e.mouseWheel.normalizeDelta&&(r=r<0?-1:1),(r>0&&0!==p||r<0&&p!==q||e.mouseWheel.preventDefault)&&(c.stopImmediatePropagation(),c.preventDefault()),c.deltaFactor<2&&!e.mouseWheel.normalizeDelta&&(n=c.deltaFactor,k=17),V(b,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(c)){var b=a(this),d=b.data(c),e=d.opt,f=c+"_"+d.idx,g=a("#mCSB_"+d.idx),i=[a("#mCSB_"+d.idx+"_dragger_vertical"),a("#mCSB_"+d.idx+"_dragger_horizontal")],j=a("#mCSB_"+d.idx+"_container").find("iframe");j.length&&j.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+f,function(a,b){k(a,b)})})}),g.bind("mousewheel."+f,function(a,b){k(a,b)})}},I=function(a){var b=null;if(a){try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(a){}return null!==b}try{var c=top.document;b=c.body.innerHTML}catch(a){}return null!==b},J=function(b,d){var e=d.nodeName.toLowerCase(),f=b.data(c).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(d).is(":focus"))},K=function(){var j,b=a(this),d=b.data(c),e=c+"_"+d.idx,f=a("#mCSB_"+d.idx+"_container"),g=f.parent(),h=a(".mCSB_"+d.idx+"_scrollbar ."+k[12]);h.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(b){i=!0,a(b.target).hasClass("mCSB_dragger")||(j=1)}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(a){i=!1}).bind("click."+e,function(c){if(j&&(j=0,a(c.target).hasClass(k[12])||a(c.target).hasClass("mCSB_draggerRail"))){U(b);var e=a(this),h=e.find(".mCSB_dragger");if(e.parent(".mCSB_scrollTools_horizontal").length>0){if(!d.overflowed[1])return;var i="x",l=c.pageX>h.offset().left?-1:1,m=Math.abs(f[0].offsetLeft)-l*(.9*g.width())}else{if(!d.overflowed[0])return;var i="y",l=c.pageY>h.offset().top?-1:1,m=Math.abs(f[0].offsetTop)-l*(.9*g.height())}V(b,m.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}})},L=function(){var b=a(this),d=b.data(c),e=d.opt,f=c+"_"+d.idx,g=a("#mCSB_"+d.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(U(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ba(d)[0],ba(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");j.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(c){function h(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,P(b,a,c)}if(c.preventDefault(),$(c)){var g=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,c.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;i=!0,d.tweenRunning=!1,h("on",g);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;i=!1,f.dir&&h("off",g);break;case"click":if("stepped"!==f.type||d.tweenRunning)return;h("on",g)}}})},O=function(){function n(c){function o(a,c){f.type=e.keyboard.scrollType,f.scrollAmount=e.keyboard.scrollAmount,"stepped"===f.type&&d.tweenRunning||P(b,a,c)}switch(c.type){case"blur":d.tweenRunning&&f.dir&&o("off",null);break;case"keydown":case"keyup":var g=c.keyCode?c.keyCode:c.which,h="on";if("x"!==e.axis&&(38===g||40===g)||"y"!==e.axis&&(37===g||39===g)){if((38===g||40===g)&&!d.overflowed[0]||(37===g||39===g)&&!d.overflowed[1])return;"keyup"===c.type&&(h="off"),a(document.activeElement).is(k)||(c.preventDefault(),c.stopImmediatePropagation(),o(h,g))}else if(33===g||34===g){if((d.overflowed[0]||d.overflowed[1])&&(c.preventDefault(),c.stopImmediatePropagation()),"keyup"===c.type){U(b);var l=34===g?-1:1;if("x"===e.axis||"yx"===e.axis&&d.overflowed[1]&&!d.overflowed[0])var m="x",n=Math.abs(i[0].offsetLeft)-l*(.9*j.width());else var m="y",n=Math.abs(i[0].offsetTop)-l*(.9*j.height());V(b,n.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}else if((35===g||36===g)&&!a(document.activeElement).is(k)&&((d.overflowed[0]||d.overflowed[1])&&(c.preventDefault(),c.stopImmediatePropagation()),"keyup"===c.type)){if("x"===e.axis||"yx"===e.axis&&d.overflowed[1]&&!d.overflowed[0])var m="x",n=35===g?Math.abs(j.width()-i.outerWidth(!1)):0;else var m="y",n=35===g?Math.abs(j.height()-i.outerHeight(!1)):0;V(b,n.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}}var b=a(this),d=b.data(c),e=d.opt,f=d.sequential,g=c+"_"+d.idx,h=a("#mCSB_"+d.idx),i=a("#mCSB_"+d.idx+"_container"),j=i.parent(),k="input,textarea,select,datalist,keygen,[contenteditable='true']",l=i.find("iframe"),m=["blur."+g+" keydown."+g+" keyup."+g];l.length&&l.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(m[0],function(a){n(a)})})}),h.attr("tabindex","0").bind(m[0],function(a){n(a)})},P=function(b,d,e,f,g){function p(a){i.snapAmount&&(j.scrollAmount=i.snapAmount instanceof Array?"x"===j.dir[0]?i.snapAmount[1]:i.snapAmount[0]:i.snapAmount);var c="stepped"!==j.type,d=g?g:a?c?n/1.5:o:1e3/60,e=a?c?7.5:40:2.5,k=[Math.abs(l[0].offsetTop),Math.abs(l[0].offsetLeft)],m=[h.scrollRatio.y>10?10:h.scrollRatio.y,h.scrollRatio.x>10?10:h.scrollRatio.x],q="x"===j.dir[0]?k[1]+j.dir[1]*(m[1]*e):k[0]+j.dir[1]*(m[0]*e),r="x"===j.dir[0]?k[1]+j.dir[1]*parseInt(j.scrollAmount):k[0]+j.dir[1]*parseInt(j.scrollAmount),s="auto"!==j.scrollAmount?r:q,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&d<17&&(s="x"===j.dir[0]?k[1]:k[0]),V(b,s.toString(),{dir:j.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(j.dir=!1):(clearTimeout(j.step),void(j.step=setTimeout(function(){p()},d)))}function q(){clearTimeout(j.step),Z(j,"step"),U(b)}var h=b.data(c),i=h.opt,j=h.sequential,l=a("#mCSB_"+h.idx+"_container"),m="stepped"===j.type,n=i.scrollInertia<26?26:i.scrollInertia,o=i.scrollInertia<1?17:i.scrollInertia;switch(d){case"on":if(j.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],U(b),aa(e)&&"stepped"===j.type)return;p(m);break;case"off":q(),(m||h.tweenRunning&&j.dir)&&p(!0)}},Q=function(b){var d=a(this).data(c).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===d.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===d.axis?null:b,e[1]=b.x?b.x:b.y||"y"===d.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},R=function(b,d){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(c),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;d||(d="x"===g.axis?"x":"y");var k="x"===d?h.outerWidth(!1):h.outerHeight(!1),m="x"===d?h[0].offsetLeft:h[0].offsetTop,n="x"===d?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===d?ba(o)[1]:ba(o)[0];case"string":case"number":if(aa(b))return Math.abs(b);if(b.indexOf("%")!==-1)return Math.abs(k*parseInt(b)/100);if(b.indexOf("-=")!==-1)return Math.abs(m-parseInt(b.split("-=")[1]));if(b.indexOf("+=")!==-1){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(b.indexOf("px")!==-1&&aa(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===d?ba(o)[1]:ba(o)[0]}return a(b).length?"x"===d?ba(a(b))[1]:ba(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},S=function(b){function h(){return clearTimeout(g[0].autoUpdate),0===d.parents("html").length?void(d=null):void(g[0].autoUpdate=setTimeout(function(){return f.advanced.updateOnSelectorChange&&(e.poll.change.n=j(),e.poll.change.n!==e.poll.change.o)?(e.poll.change.o=e.poll.change.n,void m(3)):f.advanced.updateOnContentResize&&(e.poll.size.n=d[0].scrollHeight+d[0].scrollWidth+g[0].offsetHeight+d[0].offsetHeight+d[0].offsetWidth,e.poll.size.n!==e.poll.size.o)?(e.poll.size.o=e.poll.size.n,void m(1)):!f.advanced.updateOnImageLoad||"auto"===f.advanced.updateOnImageLoad&&"y"===f.axis||(e.poll.img.n=g.find("img").length,e.poll.img.n===e.poll.img.o)?void((f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&h()):(e.poll.img.o=e.poll.img.n,void g.find("img").each(function(){i(this)}))},f.advanced.autoUpdateTimeout))}function i(b){function d(a,b){return function(){return b.apply(a,arguments)}}function e(){this.onload=null,a(b).addClass(k[2]),m(2)}if(a(b).hasClass(k[2]))return void m();var c=new Image;c.onload=d(c,e),c.src=b.src}function j(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var a=0,b=g.find(f.advanced.updateOnSelectorChange);
return f.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function m(a){clearTimeout(g[0].autoUpdate),l.update.call(null,d[0],a)}var d=a(this),e=d.data(c),f=e.opt,g=a("#mCSB_"+e.idx+"_container");return b?(clearTimeout(g[0].autoUpdate),void Z(g[0],"autoUpdate")):void h()},T=function(a,b,c){return Math.round(a/b)*b-c},U=function(b){var d=b.data(c),e=a("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal");e.each(function(){Y.call(this)})},V=function(b,d,e){function z(a){return f&&g.callbacks[a]&&"function"==typeof g.callbacks[a]}function A(){return[g.callbacks.alwaysTriggerOffsets||r>=s[0]+u,g.callbacks.alwaysTriggerOffsets||r<=-v]}function B(){var a=[k[0].offsetTop,k[0].offsetLeft],c=[p[0].offsetTop,p[0].offsetLeft],d=[k.outerHeight(!1),k.outerWidth(!1)],f=[j.height(),j.width()];b[0].mcs={content:k,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var f=b.data(c),g=f.opt,h={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:g.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(h,e),i=[e.dur,e.drag?0:e.dur],j=a("#mCSB_"+f.idx),k=a("#mCSB_"+f.idx+"_container"),l=k.parent(),m=g.callbacks.onTotalScrollOffset?Q.call(b,g.callbacks.onTotalScrollOffset):[0,0],n=g.callbacks.onTotalScrollBackOffset?Q.call(b,g.callbacks.onTotalScrollBackOffset):[0,0];if(f.trigger=e.trigger,0===l.scrollTop()&&0===l.scrollLeft()||(a(".mCSB_"+f.idx+"_scrollbar").css("visibility","visible"),l.scrollTop(0).scrollLeft(0)),"_resetY"!==d||f.contentReset.y||(z("onOverflowYNone")&&g.callbacks.onOverflowYNone.call(b[0]),f.contentReset.y=1),"_resetX"!==d||f.contentReset.x||(z("onOverflowXNone")&&g.callbacks.onOverflowXNone.call(b[0]),f.contentReset.x=1),"_resetY"!==d&&"_resetX"!==d){if(!f.contentReset.y&&b[0].mcs||!f.overflowed[0]||(z("onOverflowY")&&g.callbacks.onOverflowY.call(b[0]),f.contentReset.x=null),!f.contentReset.x&&b[0].mcs||!f.overflowed[1]||(z("onOverflowX")&&g.callbacks.onOverflowX.call(b[0]),f.contentReset.x=null),g.snapAmount){var o=g.snapAmount instanceof Array?"x"===e.dir?g.snapAmount[1]:g.snapAmount[0]:g.snapAmount;d=T(d,o,g.snapOffset)}switch(e.dir){case"x":var p=a("#mCSB_"+f.idx+"_dragger_horizontal"),q="left",r=k[0].offsetLeft,s=[j.width()-k.outerWidth(!1),p.parent().width()-p.width()],t=[d,0===d?0:d/f.scrollRatio.x],u=m[1],v=n[1],w=u>0?u/f.scrollRatio.x:0,y=v>0?v/f.scrollRatio.x:0;break;case"y":var p=a("#mCSB_"+f.idx+"_dragger_vertical"),q="top",r=k[0].offsetTop,s=[j.height()-k.outerHeight(!1),p.parent().height()-p.height()],t=[d,0===d?0:d/f.scrollRatio.y],u=m[0],v=n[0],w=u>0?u/f.scrollRatio.y:0,y=v>0?v/f.scrollRatio.y:0}t[1]<0||0===t[0]&&0===t[1]?t=[0,0]:t[1]>=s[1]?t=[s[0],s[1]]:t[0]=-t[0],b[0].mcs||(B(),z("onInit")&&g.callbacks.onInit.call(b[0])),clearTimeout(k[0].onCompleteTimeout),W(p[0],q,Math.round(t[1]),i[1],e.scrollEasing),!f.tweenRunning&&(0===r&&t[0]>=0||r===s[0]&&t[0]<=s[0])||W(k[0],q,Math.round(t[0]),i[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!f.tweenRunning&&(z("onScrollStart")&&(B(),g.callbacks.onScrollStart.call(b[0])),f.tweenRunning=!0,x(p),f.cbOffsets=A())},onUpdate:function(){e.callbacks&&e.onUpdate&&z("whileScrolling")&&(B(),g.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===g.axis&&clearTimeout(k[0].onCompleteTimeout);var a=k[0].idleTimer||0;k[0].onCompleteTimeout=setTimeout(function(){z("onScroll")&&(B(),g.callbacks.onScroll.call(b[0])),z("onTotalScroll")&&t[1]>=s[1]-w&&f.cbOffsets[0]&&(B(),g.callbacks.onTotalScroll.call(b[0])),z("onTotalScrollBack")&&t[1]<=y&&f.cbOffsets[1]&&(B(),g.callbacks.onTotalScrollBack.call(b[0])),f.tweenRunning=!1,k[0].idleTimer=0,x(p,"hide")},a)}}})}},W=function(a,b,c,d,e,f,g){function s(){q.stop||(m||h.call(),m=X()-k,t(),m>=q.time&&(q.time=m>q.time?m+l-(m-q.time):m+l-1,q.time0?(q.currVal=w(q.time,n,r,d,e),o[b]=Math.round(q.currVal)+"px"):o[b]=c+"px",i.call()}function u(){l=1e3/60,q.time=m+l,p=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return t(),setTimeout(a,.01)},q.id=p(s)}function v(){null!=q.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(q.id):clearTimeout(q.id),q.id=null)}function w(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,a<1?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,a<1?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,a<1?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var l,p,g=g||{},h=g.onStart||function(){},i=g.onUpdate||function(){},j=g.onComplete||function(){},k=X(),m=0,n=a.offsetTop,o=a.style,q=a._mTween[b];"left"===b&&(n=a.offsetLeft);var r=c-n;q.stop=0,"none"!==f&&v(),u()},X=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()},Y=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&f[0]+ba(c)[0]=0&&f[1]+ba(c)[1]1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(a){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires?"; expires="+f.expires.toUTCString():"",f.path?"; path="+f.path:"",f.domain?"; domain="+f.domain:"",f.secure?"; secure":""].join("")}b||(g={});for(var i=document.cookie?document.cookie.split("; "):[],j=/(%[0-9A-Z]{2})+/g,k=0;kc||n>d){var f=m/n>c/d?m/c:n/d;m/=f,n/=f}l.css({width:m+"px",height:n+"px",top:(a(b).height()-n)/2+"px",left:(a(b).width()-m)/2+"px"})}},s=function(b){if(p)return!1;if(b="undefined"!=typeof b&&("left"==b?1:-1),l.length){if(b!==!1&&(e.length<2||d.quitOnEnd===!0&&(b===-1&&0==e.index(k)||1===b&&e.index(k)==e.length-1)))return u(),!1;var c={opacity:0};f?g(l,100*b-o+"px",d.animationSpeed/1e3):c.left=parseInt(l.css("left"))+100*b+"px",l.animate(c,d.animationSpeed,function(){t()}),o=0}p=!0,d.onLoadStart!==!1&&d.onLoadStart(),setTimeout(function(){l=a("").attr("src",k.attr("href")).load(function(){l.appendTo("body"),r();var c={opacity:1};if(l.css("opacity",0),f)g(l,-100*b+"px",0),setTimeout(function(){g(l,"0px",d.animationSpeed/1e3)},50);else{var h=parseInt(l.css("left"));c.left=h+"px",l.css("left",h-100*b+"px")}if(l.animate(c,d.animationSpeed,function(){p=!1,d.onLoadEnd!==!1&&d.onLoadEnd()}),d.preloadNext){var i=e.eq(e.index(k)+1);i.length||(i=e.eq(0)),a("").attr("src",i.attr("href")).load()}}).error(function(){d.onLoadEnd!==!1&&d.onLoadEnd()});var c=0,h=0,n=0;l.on(i?"pointerup MSPointerUp":"click",function(a){if(a.preventDefault(),d.quitOnImgClick)return u(),!1;if(j(a.originalEvent))return!0;var b=(a.pageX||a.originalEvent.pageX)-a.target.offsetLeft;k=e.eq(e.index(k)-(m/2>b?1:-1)),k.length||(k=e.eq(m/2>b?e.length:0)),s(m/2>b?"left":"right")}).on("touchstart pointerdown MSPointerDown",function(a){return!(j(a.originalEvent)&&!d.quitOnImgClick)||(f&&(n=parseInt(l.css("left"))),void(c=a.originalEvent.pageX||a.originalEvent.touches[0].pageX))}).on("touchmove pointermove MSPointerMove",function(a){return!(j(a.originalEvent)&&!d.quitOnImgClick)||(a.preventDefault(),h=a.originalEvent.pageX||a.originalEvent.touches[0].pageX,o=c-h,void(f?g(l,-o+"px",0):l.css("left",n-o+"px")))}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(a){return!(j(a.originalEvent)&&!d.quitOnImgClick)||void(Math.abs(o)>50?(k=e.eq(e.index(k)-(o<0?1:-1)),k.length||(k=e.eq(o<0?e.length:0)),s(o>0?"right":"left")):f?g(l,"0px",d.animationSpeed/1e3):l.animate({left:n+"px"},d.animationSpeed/2))})},d.animationSpeed+100)},t=function(){return!!l.length&&(l.remove(),void(l=a()))},u=function(){return!!l.length&&void l.animate({opacity:0},d.animationSpeed,function(){t(),p=!1,d.onEnd!==!1&&d.onEnd()})};return a(b).on("resize",r),d.quitOnDocClick&&a(c).on(h?"touchend":"click",function(b){l.length&&!a(b.target).is(l)&&u()}),d.enableKeyboard&&a(c).on("keyup",function(a){return!l.length||(a.preventDefault(),27==a.keyCode&&u(),void(37!=a.keyCode&&39!=a.keyCode||(k=e.eq(e.index(k)-(37==a.keyCode?1:-1)),k.length||(k=e.eq(37==a.keyCode?e.length:0)),s(37==a.keyCode?"left":"right"))))}),a(c).on("click",this.selector,function(b){return!q(this)||(b.preventDefault(),!p&&(p=!1,d.onStart!==!1&&d.onStart(),k=a(this),void s()))}),this.each(function(){return!q(this)||void(e=e.add(a(this)))}),this.switchImageLightbox=function(a){var b=e.eq(a);if(b.length){var c=e.index(k);k=b,s(a ').appendTo("body")},c=function(){a("#imagelightbox-loading").remove()},d=function(){a('