!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var l=t||window.event,r=s.call(arguments,1),c=0,u=0,h=0,f=0,m=0,p=0;if(t=e.event.fix(l),t.type="mousewheel","detail"in l&&(h=-1*l.detail),"wheelDelta"in l&&(h=l.wheelDelta),"wheelDeltaY"in l&&(h=l.wheelDeltaY),"wheelDeltaX"in l&&(u=-1*l.wheelDeltaX),"axis"in l&&l.axis===l.HORIZONTAL_AXIS&&(u=-1*h,h=0),c=0===h?u:h,"deltaY"in l&&(h=-1*l.deltaY,c=h),"deltaX"in l&&(u=l.deltaX,0===h&&(c=-1*u)),0!==h||0!==u){if(1===l.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,h*=g,u*=g}else if(2===l.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,u*=v}if(f=Math.max(Math.abs(h),Math.abs(u)),(!i||i>f)&&(i=f,n(l,f)&&(i/=40)),n(l,f)&&(c/=40,u/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/i),u=Math[u>=1?"floor":"ceil"](u/i),h=Math[h>=1?"floor":"ceil"](h/i),d.settings.normalizeOffset&&this.getBoundingClientRect){var x=this.getBoundingClientRect();m=t.clientX-x.left,p=t.clientY-x.top}return t.deltaX=u,t.deltaY=h,t.deltaFactor=i,t.offsetX=m,t.offsetY=p,t.deltaMode=0,r.unshift(t,c,u,h),a&&clearTimeout(a),a=setTimeout(o,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function o(){i=null}function n(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var a,i,l=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var c=l.length;c;)e.event.fixHooks[l[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var o=r.length;o;)this.addEventListener(r[--o],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var o=r.length;o;)this.removeEventListener(r[--o],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var o=e(t),n=o["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(o.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var l=t||window.event,r=s.call(arguments,1),c=0,u=0,h=0,f=0,m=0,p=0;if(t=e.event.fix(l),t.type="mousewheel","detail"in l&&(h=-1*l.detail),"wheelDelta"in l&&(h=l.wheelDelta),"wheelDeltaY"in l&&(h=l.wheelDeltaY),"wheelDeltaX"in l&&(u=-1*l.wheelDeltaX),"axis"in l&&l.axis===l.HORIZONTAL_AXIS&&(u=-1*h,h=0),c=0===h?u:h,"deltaY"in l&&(h=-1*l.deltaY,c=h),"deltaX"in l&&(u=l.deltaX,0===h&&(c=-1*u)),0!==h||0!==u){if(1===l.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,h*=g,u*=g}else if(2===l.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,u*=v}if(f=Math.max(Math.abs(h),Math.abs(u)),(!i||i>f)&&(i=f,n(l,f)&&(i/=40)),n(l,f)&&(c/=40,u/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/i),u=Math[u>=1?"floor":"ceil"](u/i),h=Math[h>=1?"floor":"ceil"](h/i),d.settings.normalizeOffset&&this.getBoundingClientRect){var x=this.getBoundingClientRect();m=t.clientX-x.left,p=t.clientY-x.top}return t.deltaX=u,t.deltaY=h,t.deltaFactor=i,t.offsetX=m,t.offsetY=p,t.deltaMode=0,r.unshift(t,c,u,h),a&&clearTimeout(a),a=setTimeout(o,200),(e.event.dispatch||e.event.handle).apply(this,r)}}function o(){i=null}function n(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var a,i,l=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var c=l.length;c;)e.event.fixHooks[l[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var o=r.length;o;)this.addEventListener(r[--o],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var o=r.length;o;)this.removeEventListener(r[--o],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var o=e(t),n=o["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(o.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,n="undefined"!=typeof module&&module.exports,a="https:"==document.location.protocol?"https:":"http:";o||(n?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+a+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",n="mCS",a=".mCustomScrollbar",i={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}},l=0,r={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["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"],u={init:function(t){var t=e.extend(!0,{},i,t),o=h.call(this);if(t.live){var s=t.liveSelector||this.selector||a,c=e(s);if("off"===t.live)return void m(s);r[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),f(t),e(o).each(function(){var o=e(this);if(!o.data(n)){o.data(n,{idx:++l,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var a=o.data(n),i=a.opt,r=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");r&&(i.axis=r),s&&(i.scrollbarPosition=s),c&&(i.theme=c,f(i)),v.call(this),a&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+a.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var a=t||h.call(this);return e(a).each(function(){var t=e(this);if(t.data(n)){var a=t.data(n),i=a.opt,l=e("#mCSB_"+a.idx+"_container"),r=e("#mCSB_"+a.idx),s=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];if(!l.length)return;a.tweenRunning&&V(t),o&&a&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),r.css("max-height","none"),r.height()!==t.height()&&r.css("max-height",t.height()),w.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||l.css("width",x(l)),a.overflowed=C.call(this),k.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(l[0].offsetTop),Math.abs(l[0].offsetLeft)];"x"!==i.axis&&(a.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(Q(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),a.contentReset.y=null):(B.call(this),"y"===i.axis?M.call(this):"yx"===i.axis&&a.overflowed[1]&&Q(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(a.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(Q(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),a.contentReset.x=null):(B.call(this),"x"===i.axis?M.call(this):"yx"===i.axis&&a.overflowed[0]&&Q(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&a&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if(void 0!==t&&null!=t){var a=h.call(this);return e(a).each(function(){var a=e(this);if(a.data(n)){var i=a.data(n),l=i.opt,r={trigger:"external",scrollInertia:l.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},r,o),c=F.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=q.call(this,c[0],"y"),c[1]=q.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ae()?0:d,setTimeout(function(){null!==c[0]&&void 0!==c[0]&&"x"!==l.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",Q(a,c[0].toString(),s)),null!==c[1]&&void 0!==c[1]&&"y"!==l.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",Q(a,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=h.call(this);return e(t).each(function(){var t=e(this);t.data(n)&&V(t)})},disable:function(t){var o=h.call(this);return e(o).each(function(){var o=e(this);o.data(n)&&(o.data(n),N.call(this,"remove"),M.call(this),t&&B.call(this),k.call(this,!0),o.addClass(d[3]))})},destroy:function(){var t=h.call(this);return e(t).each(function(){var a=e(this);if(a.data(n)){var i=a.data(n),l=i.opt,r=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");l.live&&m(l.liveSelector||e(t).selector),N.call(this,"remove"),M.call(this),B.call(this),a.removeData(n),K(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),r.replaceWith(s.contents()),a.removeClass(o+" _"+n+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},h=function(){return"object"!=typeof e(this)||e(this).length<1?a:this},f=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],n=["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"],a=["minimal","minimal-dark"],i=["minimal","minimal-dark"],l=["minimal","minimal-dark"];t.autoDraggerLength=!(e.inArray(t.theme,o)>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,n)>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,a)>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,l)>-1?"outside":t.scrollbarPosition},m=function(e){r[e]&&(clearTimeout(r[e]),K(r,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),a=t.data(n),i=a.opt,l=i.autoExpandScrollbar?" "+d[1]+"_expand":"",r=["
",""],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?r[0]+r[1]:"x"===i.axis?r[1]:r[0],u="yx"===i.axis?"":"",h=i.autoHideScrollbar?" "+d[6]:"",f="x"!==i.axis&&"rtl"===a.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===a.langDir?"989999px":i.setLeft,t.addClass(o+" _"+n+"_"+a.idx+h+f).wrapInner("");var m=e("#mCSB_"+a.idx),p=e("#mCSB_"+a.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),_.call(this);var g=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],n=t.parent().width();return o[0]>n?o[0]:o[1]>n?o[1]:"100%"},w=function(){var t=e(this),o=t.data(n),a=o.opt,i=e("#mCSB_"+o.idx+"_container");if(a.advanced.autoExpandHorizontalScroll&&"y"!==a.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var l=Math.ceil(i[0].scrollWidth);3===a.advanced.autoExpandHorizontalScroll||2!==a.advanced.autoExpandHorizontalScroll&&l>i.parent().width()?i.css({width:l,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},_=function(){var t=e(this),o=t.data(n),a=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),l=oe(a.scrollButtons.tabindex)?"tabindex='"+a.scrollButtons.tabindex+"'":"",r=["","","",""],s=["x"===a.axis?r[2]:r[0],"x"===a.axis?r[3]:r[1],r[2],r[3]];a.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(n),a=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],r=[a.height()/i.outerHeight(!1),a.width()/i.outerWidth(!1)],c=[parseInt(l[0].css("min-height")),Math.round(r[0]*l[0].parent().height()),parseInt(l[1].css("min-width")),Math.round(r[1]*l[1].parent().width())],d=s&&c[1]l&&(l=s),c>r&&(r=c),[l>a.height(),r>a.width()]},B=function(){var t=e(this),o=t.data(n),a=o.opt,i=e("#mCSB_"+o.idx),l=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(V(t),("x"!==a.axis&&!o.overflowed[0]||"y"===a.axis&&o.overflowed[0])&&(r[0].add(l).css("top",0),Q(t,"_resetY")),"y"!==a.axis&&!o.overflowed[1]||"x"===a.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-l.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),l.css("left",s),r[1].css("left",dx),Q(t,"_resetX")}},T=function(){function t(){l=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(l),L.call(o[0])):t()},100)}var o=e(this),a=o.data(n),i=a.opt;if(!a.bindEvents){if(O.call(this),i.contentTouchScroll&&I.call(this),E.call(this),i.mouseWheel.enable){var l;t()}H.call(this),X.call(this),i.advanced.autoScrollOnFocus&&P.call(this),i.scrollButtons.enable&&Y.call(this),i.keyboard.enable&&j.call(this),a.bindEvents=!0}},M=function(){var t=e(this),o=t.data(n),a=o.opt,i=n+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",r=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+l+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+l+">a"),s=e("#mCSB_"+o.idx+"_container");a.advanced.releaseDraggableSelectors&&r.add(e(a.advanced.releaseDraggableSelectors)),a.advanced.extraDraggableSelectors&&r.add(e(a.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),r.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),K(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),K(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),K(s[0],"onCompleteTimeout"),o.bindEvents=!1)},k=function(t){var o=e(this),a=o.data(n),i=a.opt,l=e("#mCSB_"+a.idx+"_container_wrapper"),r=l.length?l:e("#mCSB_"+a.idx+"_container"),s=[e("#mCSB_"+a.idx+"_scrollbar_vertical"),e("#mCSB_"+a.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(a.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),r.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),r.removeClass(d[10])):(s[0].css("display","none"),r.addClass(d[10])),r.addClass(d[8]))),"y"!==i.axis&&(a.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),r.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),r.removeClass(d[11])):(s[1].css("display","none"),r.addClass(d[11])),r.addClass(d[9]))),a.overflowed[0]||a.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},D=function(t){var o=t.type,n=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,a=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return n?[t.originalEvent.pageY-n[0]+a[0],t.originalEvent.pageX-n[1]+a[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],l=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,l>1]:[i.pageY,i.pageX,l>1];default:return n?[t.pageY-n[0]+a[0],t.pageX-n[1]+a[1],!1]:[t.pageY,t.pageX,!1]}},O=function(){function t(e,t,n,a){if(f[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===h[1])var i="x",s=(o[0].offsetLeft-t+a)*r.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+n)*r.scrollRatio.y;Q(l,s.toString(),{dir:i,drag:!0})}var o,a,i,l=e(this),r=l.data(n),d=r.opt,u=n+"_"+r.idx,h=["mCSB_"+r.idx+"_dragger_vertical","mCSB_"+r.idx+"_dragger_horizontal"],f=e("#mCSB_"+r.idx+"_container"),m=e("#"+h[0]+",#"+h[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),W.call(f,!1),V(l),o=e(this);var n=o.offset(),r=D(t)[0]-n.top,u=D(t)[1]-n.left,h=o.height()+n.top,m=o.width()+n.left;h>r&&r>0&&m>u&&u>0&&(a=r,i=u),y(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var n=o.offset(),l=D(e)[0]-n.top,r=D(e)[1]-n.left;t(a,i,l,r)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var n=o.offset(),l=D(e)[0]-n.top,r=D(e)[1]-n.left;if(a===l&&i===r)return;t(a,i,l,r)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(y(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),W.call(f,!0)})},I=function(){function o(e){if(!te(e)||c||D(e)[2])return void(t=0);t=1,b=0,y=0,d=1,C.removeClass("mCS_touch_action");var o=O.offset();u=D(e)[0]-o.top,h=D(e)[1]-o.left,z=[D(e)[0],D(e)[1]]}function a(e){if(te(e)&&!c&&!D(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!y||b)&&d)){g=Z();var t=k.offset(),o=D(e)[0]-t.top,n=D(e)[1]-t.left,a="mcsLinearOut";if(E.push(o),L.push(n),z[2]=Math.abs(D(e)[0]-z[0]),z[3]=Math.abs(D(e)[1]-z[1]),B.overflowed[0])var i=I[0].parent().height()-I[0].height(),l=u-o>0&&o-u>-i*B.scrollRatio.y&&(2*z[3]0&&n-h>-r*B.scrollRatio.x&&(2*z[2]30)){w=1e3/(v-p);var a="mcsEaseOut",i=2.5>w,l=i?[E[E.length-2],L[L.length-2]]:[0,0];x=i?[o-l[0],n-l[1]]:[o-f,n-m];var u=[Math.abs(x[0]),Math.abs(x[1])];w=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[w,w];var h=[Math.abs(O[0].offsetTop)-x[0]*r(u[0]/w[0],w[0]),Math.abs(O[0].offsetLeft)-x[1]*r(u[1]/w[1],w[1])];_="yx"===T.axis?[h[0],h[1]]:"x"===T.axis?[null,h[1]]:[h[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var C=parseInt(T.contentTouchScroll)||0;_[0]=u[0]>C?_[0]:0,_[1]=u[1]>C?_[1]:0,B.overflowed[0]&&s(_[0],S[0],a,"y",W,!1),B.overflowed[1]&&s(_[1],S[1],a,"x",W,!1)}}}function r(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,n,a,i){e&&Q(C,e.toString(),{dur:t,scrollEasing:o,dir:n,overwrite:a,drag:i})}var d,u,h,f,m,p,g,v,x,w,_,S,b,y,C=e(this),B=C.data(n),T=B.opt,M=n+"_"+B.idx,k=e("#mCSB_"+B.idx),O=e("#mCSB_"+B.idx+"_container"),I=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],L=[],R=0,W="yx"===T.axis?"none":"all",z=[],H=O.find("iframe"),P=["touchstart."+M+" pointerdown."+M+" MSPointerDown."+M,"touchmove."+M+" pointermove."+M+" MSPointerMove."+M,"touchend."+M+" pointerup."+M+" MSPointerUp."+M],X=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;O.bind(P[0],function(e){o(e)}).bind(P[1],function(e){a(e)}),k.bind(P[0],function(e){i(e)}).bind(P[2],function(e){l(e)}),H.length&&H.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(P[0],function(e){o(e),i(e)}).bind(P[1],function(e){a(e)}).bind(P[2],function(e){l(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function a(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,U(l,e,t,"mcsLinearOut",o?60:null)}var i,l=e(this),r=l.data(n),s=r.opt,d=r.sequential,u=n+"_"+r.idx,h=e("#mCSB_"+r.idx+"_container"),f=h.parent();h.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var n=h.offset(),l=D(e)[0]-n.top+h[0].offsetTop,c=D(e)[1]-n.left+h[0].offsetLeft;l>0&&l0&&cl?a("on",38):l>f.height()&&a("on",40)),"y"!==s.axis&&r.overflowed[1]&&(0>c?a("on",37):c>f.width()&&a("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,a("off",null)),c=!1)})},L=function(){function t(t,n){if(V(o),!z(o,t.target)){var l="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",h=[Math.round(l*a.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?h[1]:h[0]>=r.width()?.9*r.width():h[0],m=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||n:t.deltaX;else var u="y",h=[Math.round(l*a.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],f="auto"!==i.mouseWheel.scrollAmount?h[1]:h[0]>=r.height()?.9*r.height():h[0],m=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||n;"y"===u&&!a.overflowed[0]||"x"===u&&!a.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(f=t.deltaFactor,d=17),Q(o,(m-v*f).toString(),{dir:u,dur:d}))}}if(e(this).data(n)){var o=e(this),a=o.data(n),i=a.opt,l=n+"_"+a.idx,r=e("#mCSB_"+a.idx),c=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],d=e("#mCSB_"+a.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+l,function(e,o){t(e,o)})})}),r.bind("mousewheel."+l,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,n=!1,a=null;if(void 0===t?n="#empty":void 0!==e(t).attr("id")&&(n=e(t).attr("id")),!1!==n&&void 0!==R[n])return R[n];if(t){try{var i=t.contentDocument||t.contentWindow.document;a=i.body.innerHTML}catch(e){}o=null!==a}else{try{var i=top.document;a=i.body.innerHTML}catch(e){}o=null!==a}return!1!==n&&(R[n]=o),o},W=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var a=o.nodeName.toLowerCase(),i=t.data(n).opt.mouseWheel.disableOver,l=["select","textarea"];return e.inArray(a,i)>-1&&!(e.inArray(a,l)>-1&&!e(o).is(":focus"))},H=function(){var t,o=e(this),a=o.data(n),i=n+"_"+a.idx,l=e("#mCSB_"+a.idx+"_container"),r=l.parent();e(".mCSB_"+a.idx+"_scrollbar ."+d[12]).bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(n){if(t&&(t=0,e(n.target).hasClass(d[12])||e(n.target).hasClass("mCSB_draggerRail"))){V(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!a.overflowed[1])return;var c="x",u=n.pageX>s.offset().left?-1:1,h=Math.abs(l[0].offsetLeft)-u*(.9*r.width())}else{if(!a.overflowed[0])return;var c="y",u=n.pageY>s.offset().top?-1:1,h=Math.abs(l[0].offsetTop)-u*(.9*r.height())}Q(o,h.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},P=function(){var t=e(this),o=t.data(n),a=o.opt,i=n+"_"+o.idx,l=e("#mCSB_"+o.idx+"_container"),r=l.parent();l.bind("focusin."+i,function(){var o=e(document.activeElement),n=l.find(".mCustomScrollBox").length,i=0;o.is(a.advanced.autoScrollOnFocus)&&(V(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=n?(i+17)*n:0,t[0]._focusTimeout=setTimeout(function(){var e=[ne(o)[0],ne(o)[1]],n=[l[0].offsetTop,l[0].offsetLeft],s=[n[0]+e[0]>=0&&n[0]+e[0]=0&&n[0]+e[1]a").bind("contextmenu."+l,function(e){e.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l+" mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l+" mouseout."+l+" pointerout."+l+" MSPointerOut."+l+" click."+l,function(n){function l(e,o){i.scrollAmount=a.scrollButtons.scrollAmount,U(t,e,o)}if(n.preventDefault(),ee(n)){var r=e(this).attr("class");switch(i.type=a.scrollButtons.scrollType,n.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,l("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&l("off",r);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;l("on",r)}}})},j=function(){function t(t){function n(e,t){l.type=i.keyboard.scrollType,l.scrollAmount=i.keyboard.scrollAmount,"stepped"===l.type&&a.tweenRunning||U(o,e,t)}switch(t.type){case"blur":a.tweenRunning&&l.dir&&n("off",null);break;case"keydown":case"keyup":var r=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===r||40===r)||"y"!==i.axis&&(37===r||39===r)){if((38===r||40===r)&&!a.overflowed[0]||(37===r||39===r)&&!a.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),n(s,r))}else if(33===r||34===r){if((a.overflowed[0]||a.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){V(o);var h=34===r?-1:1;if("x"===i.axis||"yx"===i.axis&&a.overflowed[1]&&!a.overflowed[0])var f="x",m=Math.abs(c[0].offsetLeft)-h*(.9*d.width());else var f="y",m=Math.abs(c[0].offsetTop)-h*(.9*d.height());Q(o,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}else if((35===r||36===r)&&!e(document.activeElement).is(u)&&((a.overflowed[0]||a.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&a.overflowed[1]&&!a.overflowed[0])var f="x",m=35===r?Math.abs(d.width()-c.outerWidth(!1)):0;else var f="y",m=35===r?Math.abs(d.height()-c.outerHeight(!1)):0;Q(o,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),a=o.data(n),i=a.opt,l=a.sequential,r=n+"_"+a.idx,s=e("#mCSB_"+a.idx),c=e("#mCSB_"+a.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",h=c.find("iframe"),f=["blur."+r+" keydown."+r+" keyup."+r];h.length&&h.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(f[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(f[0],function(e){t(e)})},U=function(t,o,a,i,l){function r(e){u.snapAmount&&(h.scrollAmount=u.snapAmount instanceof Array?"x"===h.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==h.type,n=l||(e?o?p/1.5:g:1e3/60),a=e?o?7.5:40:2.5,s=[Math.abs(f[0].offsetTop),Math.abs(f[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===h.dir[0]?s[1]+h.dir[1]*(d[1]*a):s[0]+h.dir[1]*(d[0]*a),v="x"===h.dir[0]?s[1]+h.dir[1]*parseInt(h.scrollAmount):s[0]+h.dir[1]*parseInt(h.scrollAmount),x="auto"!==h.scrollAmount?v:m,w=i||(e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),_=!!e;return e&&17>n&&(x="x"===h.dir[0]?s[1]:s[0]),Q(t,x.toString(),{dir:h.dir[0],scrollEasing:w,dur:n,onComplete:_}),e?void(h.dir=!1):(clearTimeout(h.step),void(h.step=setTimeout(function(){r()},n)))}function s(){clearTimeout(h.step),K(h,"step"),V(t)}var c=t.data(n),u=c.opt,h=c.sequential,f=e("#mCSB_"+c.idx+"_container"),m="stepped"===h.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(h.dir=[a===d[16]||a===d[15]||39===a||37===a?"x":"y",a===d[13]||a===d[15]||38===a||37===a?-1:1],V(t),oe(a)&&"stepped"===h.type)return;r(m);break;case"off":s(),(m||c.tweenRunning&&h.dir)&&r(!0)}},F=function(t){var o=e(this).data(n).opt,a=[];return"function"==typeof t&&(t=t()),t instanceof Array?a=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(a[0]=t.y?t.y:t.x||"x"===o.axis?null:t,a[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof a[0]&&(a[0]=a[0]()),"function"==typeof a[1]&&(a[1]=a[1]()),a},q=function(t,o){if(null!=t&&void 0!==t){var a=e(this),i=a.data(n),l=i.opt,r=e("#mCSB_"+i.idx+"_container"),s=r.parent(),c=typeof t;o||(o="x"===l.axis?"x":"y");var d="x"===o?r.outerWidth(!1)-s.width():r.outerHeight(!1)-s.height(),h="x"===o?r[0].offsetLeft:r[0].offsetTop,f="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ne(m)[1]:ne(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(h-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=h+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-r.outerHeight(!1));if("right"===t)return Math.abs(s.width()-r.outerWidth(!1));if("first"===t||"last"===t){var m=r.find(":"+t);return"x"===o?ne(m)[1]:ne(m)[0]}return e(t).length?"x"===o?ne(e(t))[1]:ne(e(t))[0]:(r.css(f,t),void u.update.call(null,a[0]))}}},N=function(t){function o(){return clearTimeout(h[0].autoUpdate),0===r.parents("html").length?void(r=null):void(h[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void l(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=r[0].scrollHeight+r[0].scrollWidth+h[0].offsetHeight+r[0].offsetHeight+r[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void l(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=h.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void h.find("img").each(function(){a(this)}))},c.advanced.autoUpdateTimeout))}function a(t){function o(e,t){return function(){return t.apply(e,arguments)}}function n(){this.onload=null,e(t).addClass(d[2]),l(2)}if(e(t).hasClass(d[2]))return void l();var a=new Image;a.onload=o(a,n),a.src=t.src}function i(){!0===c.advanced.updateOnSelectorChange&&(c.advanced.updateOnSelectorChange="*");var e=0,t=h.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function l(e){clearTimeout(h[0].autoUpdate),u.update.call(null,r[0],e)}var r=e(this),s=r.data(n),c=s.opt,h=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(h[0].autoUpdate),void K(h[0],"autoUpdate")):void o()},$=function(e,t,o){return Math.round(e/t)*t-o},V=function(t){var o=t.data(n);e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal").each(function(){J.call(this)})},Q=function(t,o,a){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function l(){return[c.callbacks.alwaysTriggerOffsets||_>=S[0]+C,c.callbacks.alwaysTriggerOffsets||-B>=_]}function r(){var e=[f[0].offsetTop,f[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],n=[f.outerHeight(!1),f.outerWidth(!1)],i=[h.height(),h.width()];t[0].mcs={content:f,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-i[1])),direction:a.dir}}var s=t.data(n),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},a=e.extend(d,a),u=[a.dur,a.drag?0:a.dur],h=e("#mCSB_"+s.idx),f=e("#mCSB_"+s.idx+"_container"),m=f.parent(),p=c.callbacks.onTotalScrollOffset?F.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?F.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=a.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===a.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=$(o,v,c.snapOffset)}switch(a.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),w="left",_=f[0].offsetLeft,S=[h.width()-f.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],C=p[1],B=g[1],T=C>0?C/s.scrollRatio.x:0,M=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),w="top",_=f[0].offsetTop,S=[h.height()-f.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],C=p[0],B=g[0],T=C>0?C/s.scrollRatio.y:0,M=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(r(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(f[0].onCompleteTimeout),G(x[0],w,Math.round(b[1]),u[1],a.scrollEasing),!s.tweenRunning&&(0===_&&b[0]>=0||_===S[0]&&b[0]<=S[0])||G(f[0],w,Math.round(b[0]),u[0],a.scrollEasing,a.overwrite,{onStart:function(){a.callbacks&&a.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(r(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,y(x),s.cbOffsets=l())},onUpdate:function(){a.callbacks&&a.onUpdate&&i("whileScrolling")&&(r(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(a.callbacks&&a.onComplete){"yx"===c.axis&&clearTimeout(f[0].onCompleteTimeout);var e=f[0].idleTimer||0;f[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(r(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(r(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=M&&s.cbOffsets[1]&&(r(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,f[0].idleTimer=0,y(x,"hide")},e)}}})}},G=function(e,t,o,n,a,i,l){function r(){S.stop||(x||m.call(),x=Z()-v,s(),x>=S.time&&(S.time=x>S.time?x+h-(x-S.time):x+h-1,S.time0?(S.currVal=u(S.time,w,b,n,a),_[t]=Math.round(S.currVal)+"px"):_[t]=o+"px",p.call()}function c(){h=1e3/60,S.time=x+h,f=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=f(r)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,n,a){switch(a){case"linear":case"mcsLinear":return o*e/n+t;case"mcsLinearOut":return e/=n,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=n/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=n/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return e/=n/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=n,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(1-Math.pow(2,-10*e/n))+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=n)*e,l=i*e;return t+o*(.499999999999997*l*i+-2.5*i*i+5.5*l+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var h,f,l=l||{},m=l.onStart||function(){},p=l.onUpdate||function(){},g=l.onComplete||function(){},v=Z(),x=0,w=e.offsetTop,_=e.style,S=e._mTween[t];"left"===t&&(w=e.offsetLeft);var b=o-w;S.stop=0,"none"!==i&&d(),c()},Z=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()},J=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&n[0]+ne(a)[0]=0&&n[1]+ne(a)[1]=0&&l[1]-i[1]*r[1][0]<0&&l[1]+a[1]-i[1]*r[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(n);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}),$(".girl-page__photo_more ").on("click",function(){!!$(this).hasClass("open")&&$("html,body").animate({scrollTop:$(".girl-page__photo-wrap").offset().top},"fast")}),$("#lightgallery").lightGallery(),$(".girl-page__photo_more ").on("click",function(){$(this).toggleClass("open"),$(".girl-page__photo_gallery_img").toggleClass("close")}),$("#lightgallery").lightGallery();