(function(n,t,i){var o="mCustomScrollbar",u="mCS",l=".mCustomScrollbar",a={setWidth:!1,setHeight:!1,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,autoHideScrollbar:!1,autoExpandScrollbar:!1,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:!1,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:!1,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,updateOnSelectorChange:!1},theme:"light",callbacks:{onScrollStart:!1,onScroll:!1,onTotalScroll:!1,onTotalScrollBack:!1,whileScrolling:!1,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0},live:!1,liveSelector:null},v=0,h={},c=function(n){h[n]&&(clearTimeout(h[n]),r._delete.call(null,h[n]))},s=t.attachEvent&&!t.addEventListener?1:0,f=!1,e={init:function(t){var t=n.extend(!0,{},a,t),o=r._selector.call(this),i,f;if(t.live){if(i=t.liveSelector||this.selector||l,f=n(i),t.live==="off"){c(i);return}h[i]=setTimeout(function(){f.mCustomScrollbar(t);t.live==="once"&&f.length&&c(i)},500)}else c(i);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":r._findAxis.call(null,t.axis),t.scrollInertia=t.scrollInertia<17?17:t.scrollInertia,typeof t.mouseWheel!="object"&&t.mouseWheel==!0&&(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=r._findScrollButtonsType.call(null,t.scrollButtons.scrollType),r._theme.call(null,t),n(o).each(function(){var i=n(this);if(!i.data(u)){i.data(u,{idx:++v,opt:t,scrollRatio:{y:null,x:null},overflowed:null,bindEvents:!1,tweenRunning:!1,sequential:{},langDir:i.css("direction"),cbOffsets:null,trigger:null});var f=i.data(u).opt,o=i.data("mcs-axis"),s=i.data("mcs-scrollbar-position"),h=i.data("mcs-theme");o&&(f.axis=o);s&&(f.scrollbarPosition=s);h&&(f.theme=h,r._theme.call(null,f));r._pluginMarkup.call(this);e.update.call(null,i)}})},update:function(t){var i=t||r._selector.call(this);return n(i).each(function(){var t=n(this),o;if(t.data(u)){var i=t.data(u),f=i.opt,e=n("#mCSB_"+i.idx+"_container"),s=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")];if(!e.length)return;i.tweenRunning&&r._stop.call(null,t);t.hasClass("mCS_disabled")&&t.removeClass("mCS_disabled");t.hasClass("mCS_destroyed")&&t.removeClass("mCS_destroyed");r._maxHeight.call(this);r._expandContentHorizontally.call(this);f.axis==="y"||f.advanced.autoExpandHorizontalScroll||e.css("width",r._contentWidth(e.children()));i.overflowed=r._overflowed.call(this);r._scrollbarVisibility.call(this);f.autoDraggerLength&&r._setDraggerLength.call(this);r._scrollRatio.call(this);r._bindEvents.call(this);o=[Math.abs(e[0].offsetTop),Math.abs(e[0].offsetLeft)];f.axis!=="x"&&(i.overflowed[0]?s[0].height()>s[0].parent().height()?r._resetContentPosition.call(this):r._scrollTo.call(this,t,o[0].toString(),{dir:"y",dur:0,overwrite:"none"}):(r._resetContentPosition.call(this),f.axis==="y"?r._unbindEvents.call(this):f.axis==="yx"&&i.overflowed[1]&&r._scrollTo.call(this,t,o[1].toString(),{dir:"x",dur:0,overwrite:"none"})));f.axis!=="y"&&(i.overflowed[1]?s[1].width()>s[1].parent().width()?r._resetContentPosition.call(this):r._scrollTo.call(this,t,o[1].toString(),{dir:"x",dur:0,overwrite:"none"}):(r._resetContentPosition.call(this),f.axis==="x"?r._unbindEvents.call(this):f.axis==="yx"&&i.overflowed[0]&&r._scrollTo.call(this,t,o[0].toString(),{dir:"y",dur:0,overwrite:"none"})));r._autoUpdate.call(this)}})},scrollTo:function(t,i){if(typeof t!="undefined"&&t!=null){var f=r._selector.call(this);return n(f).each(function(){var s=n(this);if(s.data(u)){var o=s.data(u),h=o.opt,c={trigger:"external",scrollInertia:h.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=n.extend(!0,{},c,i),f=r._arr.call(this,t),l=e.scrollInertia<17?17:e.scrollInertia;f[0]=r._to.call(this,f[0],"y");f[1]=r._to.call(this,f[1],"x");e.moveDragger&&(f[0]*=o.scrollRatio.y,f[1]*=o.scrollRatio.x);e.dur=l;setTimeout(function(){f[0]!==null&&typeof f[0]!="undefined"&&h.axis!=="x"&&o.overflowed[0]&&(e.dir="y",e.overwrite="all",r._scrollTo.call(this,s,f[0].toString(),e));f[1]!==null&&typeof f[1]!="undefined"&&h.axis!=="y"&&o.overflowed[1]&&(e.dir="x",e.overwrite="none",r._scrollTo.call(this,s,f[1].toString(),e))},60)}})}},stop:function(){var t=r._selector.call(this);return n(t).each(function(){var t=n(this);t.data(u)&&r._stop.call(null,t)})},disable:function(t){var i=r._selector.call(this);return n(i).each(function(){var i=n(this),f,e;i.data(u)&&(f=i.data(u),e=f.opt,r._autoUpdate.call(this,"remove"),r._unbindEvents.call(this),t&&r._resetContentPosition.call(this),r._scrollbarVisibility.call(this,!0),i.addClass("mCS_disabled"))})},destroy:function(){var t=r._selector.call(this);return n(t).each(function(){var f=n(this);if(f.data(u)){var i=f.data(u),e=i.opt,s=n("#mCSB_"+i.idx),h=n("#mCSB_"+i.idx+"_container"),l=n(".mCSB_"+i.idx+"_scrollbar");e.live&&c(t);r._autoUpdate.call(this,"remove");r._unbindEvents.call(this);r._resetContentPosition.call(this);f.removeData(u);r._delete.call(null,this.mcs);l.remove();s.replaceWith(h.contents());f.removeClass(o+" _"+u+"_"+i.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},r={_selector:function(){return typeof n(this)!="object"||n(this).length<1?l:this},_theme: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},_findAxis:function(n){return n==="yx"||n==="xy"||n==="auto"?"yx":n==="x"||n==="horizontal"?"x":"y"},_findScrollButtonsType:function(n){return n==="stepped"||n==="pixels"||n==="step"||n==="click"?"stepped":"stepless"},_pluginMarkup:function(){var f=n(this),i=f.data(u),t=i.opt,l=t.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",s=["<div id='mCSB_"+i.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+i.idx+"_scrollbar mCS-"+t.theme+" mCSB_scrollTools_vertical"+l+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+i.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>","<div id='mCSB_"+i.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+i.idx+"_scrollbar mCS-"+t.theme+" mCSB_scrollTools_horizontal"+l+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+i.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /><\/div><div class='mCSB_draggerRail' /><\/div><\/div>"],v=t.axis==="yx"?"mCSB_vertical_horizontal":t.axis==="x"?"mCSB_horizontal":"mCSB_vertical",a=t.axis==="yx"?s[0]+s[1]:t.axis==="x"?s[1]:s[0],y=t.axis==="yx"?"<div id='mCSB_"+i.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=t.autoHideScrollbar?" mCS-autoHide":"",w=t.axis!=="x"&&i.langDir==="rtl"?" mCS-dir-rtl":"",c,h,e;t.setWidth&&f.css("width",t.setWidth);t.setHeight&&f.css("height",t.setHeight);t.setLeft=t.axis!=="y"&&i.langDir==="rtl"?"989999px":t.setLeft;f.addClass(o+" _"+u+"_"+i.idx+p+w).wrapInner("<div id='mCSB_"+i.idx+"' class='mCustomScrollBox mCS-"+t.theme+" "+v+"'><div id='mCSB_"+i.idx+"_container' class='mCSB_container' style='position:relative; top:"+t.setTop+"; left:"+t.setLeft+";' dir="+i.langDir+" /><\/div>");c=n("#mCSB_"+i.idx);h=n("#mCSB_"+i.idx+"_container");t.axis==="y"||t.advanced.autoExpandHorizontalScroll||h.css("width",r._contentWidth(h.children()));t.scrollbarPosition==="outside"?(f.css("position")==="static"&&f.css("position","relative"),f.css("overflow","visible"),c.addClass("mCSB_outside").after(a)):(c.addClass("mCSB_inside").append(a),h.wrap(y));r._scrollButtons.call(this);e=[n("#mCSB_"+i.idx+"_dragger_vertical"),n("#mCSB_"+i.idx+"_dragger_horizontal")];e[0].css("min-height",e[0].height());e[1].css("min-width",e[1].width())},_contentWidth:function(t){return Math.max.apply(Math,t.map(function(){return n(this).outerWidth(!0)}).get())},_expandContentHorizontally:function(){var f=n(this),i=f.data(u),r=i.opt,t=n("#mCSB_"+i.idx+"_container");r.advanced.autoExpandHorizontalScroll&&r.axis!=="y"&&t.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(t[0].getBoundingClientRect().right+.4)-Math.floor(t[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_scrollButtons:function(){var e=n(this),f=e.data(u),r=f.opt,o=n(".mCSB_"+f.idx+"_scrollbar:first"),t=["<a href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonDown' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonLeft' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonRight' oncontextmenu='return false;' />"],i=[r.axis==="x"?t[2]:t[0],r.axis==="x"?t[3]:t[1],t[2],t[3]];r.scrollButtons.enable&&o.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},_maxHeight:function(){var t=n(this),f=t.data(u),h=f.opt,e=n("#mCSB_"+f.idx),i=t.css("max-height"),o=i.indexOf("%")!==-1,s=t.css("box-sizing"),r;i!=="none"&&(r=o?t.parent().height()*parseInt(i)/100:parseInt(i),s==="border-box"&&(r-=t.innerHeight()-t.height()+(t.outerHeight()-t.innerHeight())),e.css("max-height",Math.round(r)))},_setDraggerLength:function(){var h=n(this),r=h.data(u),f=n("#mCSB_"+r.idx),e=n("#mCSB_"+r.idx+"_container"),i=[n("#mCSB_"+r.idx+"_dragger_vertical"),n("#mCSB_"+r.idx+"_dragger_horizontal")],o=[f.height()/e.outerHeight(!1),f.width()/e.outerWidth(!1)],t=[parseInt(i[0].css("min-height")),Math.round(o[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(o[1]*i[1].parent().width())],c=s&&t[1]<t[0]?t[0]:t[1],l=s&&t[3]<t[2]?t[2]:t[3];i[0].css({height:c,"max-height":i[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":t[0]+"px"});i[1].css({width:l,"max-width":i[1].parent().width()-10})},_scrollRatio:function(){var s=n(this),t=s.data(u),r=n("#mCSB_"+t.idx),f=n("#mCSB_"+t.idx+"_container"),i=[n("#mCSB_"+t.idx+"_dragger_vertical"),n("#mCSB_"+t.idx+"_dragger_horizontal")],e=[f.outerHeight(!1)-r.height(),f.outerWidth(!1)-r.width()],o=[e[0]/(i[0].parent().height()-i[0].height()),e[1]/(i[1].parent().width()-i[1].width())];t.scrollRatio={y:o[0],x:o[1]}},_onDragClasses:function(n,t,i){var f=i?"mCSB_dragger_onDrag_expanded":"",r=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag"],u=n.closest(".mCSB_scrollTools");t==="active"?(n.toggleClass(r[0]+" "+f),u.toggleClass(r[1]),n[0]._draggable=n[0]._draggable?0:1):n[0]._draggable||(t==="hide"?(n.removeClass(r[0]),u.removeClass(r[1])):(n.addClass(r[0]),u.addClass(r[1])))},_overflowed:function(){var f=n(this),t=f.data(u),r=n("#mCSB_"+t.idx),i=n("#mCSB_"+t.idx+"_container"),e=t.overflowed==null?i.height():i.outerHeight(!1),o=t.overflowed==null?i.width():i.outerWidth(!1);return[e>r.height(),o>r.width()]},_resetContentPosition:function(){var o=n(this),t=o.data(u),i=t.opt,h=n("#mCSB_"+t.idx),e=n("#mCSB_"+t.idx+"_container"),s=[n("#mCSB_"+t.idx+"_dragger_vertical"),n("#mCSB_"+t.idx+"_dragger_horizontal")],f;r._stop(o);(i.axis!=="x"&&!t.overflowed[0]||i.axis==="y"&&t.overflowed[0])&&s[0].add(e).css("top",0);(i.axis!=="y"&&!t.overflowed[1]||i.axis==="x"&&t.overflowed[1])&&(f=dx=0,t.langDir==="rtl"&&(f=h.width()-e.outerWidth(!1),dx=Math.abs(f/t.scrollRatio.x)),e.css("left",f),s[1].css("left",dx))},_bindEvents:function(){var f=n(this),i=f.data(u),t=i.opt,o;if(!i.bindEvents){if(r._draggable.call(this),t.contentTouchScroll&&r._contentDraggable.call(this),t.mouseWheel.enable){function e(){o=setTimeout(function(){n.event.special.mousewheel?(clearTimeout(o),r._mousewheel.call(f[0])):e()},1e3)}e()}r._draggerRail.call(this);r._wrapperScroll.call(this);t.advanced.autoScrollOnFocus&&r._focus.call(this);t.scrollButtons.enable&&r._buttons.call(this);t.keyboard.enable&&r._keyboard.call(this);i.bindEvents=!0}},_unbindEvents:function(){var f=n(this),t=f.data(u),e=u+"_"+t.idx,o=".mCSB_"+t.idx+"_scrollbar",h=n("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+o+" .mCSB_draggerContainer,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+o+">a"),s=n("#mCSB_"+t.idx+"_container");t.bindEvents&&(n(i).unbind("."+e),h.each(function(){n(this).unbind("."+e)}),clearTimeout(f[0]._focusTimeout),r._delete.call(null,f[0]._focusTimeout),clearTimeout(t.sequential.step),r._delete.call(null,t.sequential.step),clearTimeout(s[0].onCompleteTimeout),r._delete.call(null,s[0].onCompleteTimeout),t.bindEvents=!1)},_scrollbarVisibility:function(t){var s=n(this),r=s.data(u),e=r.opt,h=n("#mCSB_"+r.idx+"_container_wrapper"),f=h.length?h:n("#mCSB_"+r.idx+"_container"),i=[n("#mCSB_"+r.idx+"_scrollbar_vertical"),n("#mCSB_"+r.idx+"_scrollbar_horizontal")],o=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];e.axis!=="x"&&(r.overflowed[0]&&!t?(i[0].add(o[0]).add(i[0].children("a")).css("display","block"),f.removeClass("mCS_no_scrollbar_y mCS_y_hidden")):(e.alwaysShowScrollbar?(e.alwaysShowScrollbar!==2&&o[0].add(i[0].children("a")).css("display","none"),f.removeClass("mCS_y_hidden")):(i[0].css("display","none"),f.addClass("mCS_y_hidden")),f.addClass("mCS_no_scrollbar_y")));e.axis!=="y"&&(r.overflowed[1]&&!t?(i[1].add(o[1]).add(i[1].children("a")).css("display","block"),f.removeClass("mCS_no_scrollbar_x mCS_x_hidden")):(e.alwaysShowScrollbar?(e.alwaysShowScrollbar!==2&&o[1].add(i[1].children("a")).css("display","none"),f.removeClass("mCS_x_hidden")):(i[1].css("display","none"),f.addClass("mCS_x_hidden")),f.addClass("mCS_no_scrollbar_x")));r.overflowed[0]||r.overflowed[1]?s.removeClass("mCS_no_scrollbar"):s.addClass("mCS_no_scrollbar")},_coordinates:function(n){var i=n.type,t;switch(i){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[n.originalEvent.pageY,n.originalEvent.pageX];case"touchstart":case"touchmove":case"touchend":return t=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],[t.pageY,t.pageX];default:return[n.pageY,n.pageX]}},_draggable:function(){function w(n){var t=y.find("iframe"),i;t.length&&(i=n?"auto":"none",t.css("pointer-events",i))}function b(n,i,u,f){var e,s;y[0].idleTimer=l.scrollInertia<233?250:0;t.attr("id")===a[1]?(e="x",s=(t[0].offsetLeft-i+f)*o.scrollRatio.x):(e="y",s=(t[0].offsetTop-n+u)*o.scrollRatio.y);r._scrollTo(c,s.toString(),{dir:e,drag:!0})}var c=n(this),o=c.data(u),l=o.opt,e=u+"_"+o.idx,a=["mCSB_"+o.idx+"_dragger_vertical","mCSB_"+o.idx+"_dragger_horizontal"],y=n("#mCSB_"+o.idx+"_container"),p=n("#"+a[0]+",#"+a[1]),t,h,v;p.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(u){if(u.stopImmediatePropagation(),u.preventDefault(),r._mouseBtnLeft(u)){f=!0;s&&(i.onselectstart=function(){return!1});w(!1);r._stop(c);t=n(this);var e=t.offset(),o=r._coordinates(u)[0]-e.top,a=r._coordinates(u)[1]-e.left,y=t.height()+e.top,p=t.width()+e.left;o<y&&o>0&&a<p&&a>0&&(h=o,v=a);r._onDragClasses(t,"active",l.autoExpandScrollbar)}}).bind("touchmove."+e,function(n){n.stopImmediatePropagation();n.preventDefault();var i=t.offset(),u=r._coordinates(n)[0]-i.top,f=r._coordinates(n)[1]-i.left;b(h,v,u,f)});n(i).bind("mousemove."+e+" pointermove."+e+" MSPointerMove."+e,function(n){if(t){var i=t.offset(),u=r._coordinates(n)[0]-i.top,f=r._coordinates(n)[1]-i.left;if(h===u)return;b(h,v,u,f)}}).add(p).bind("mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(){t&&(r._onDragClasses(t,"active",l.autoExpandScrollbar),t=null);f=!1;s&&(i.onselectstart=null);w(!0)})},_contentDraggable:function(){function et(n,t){var i=[t*1.5,t*2,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 b(n,t,i,u,f,e){n&&r._scrollTo(k,n.toString(),{dur:t,scrollEasing:i,dir:u,overwrite:f,drag:e})}var k=n(this),t=k.data(u),s=t.opt,i=u+"_"+t.idx,v=n("#mCSB_"+t.idx),c=n("#mCSB_"+t.idx+"_container"),y=[n("#mCSB_"+t.idx+"_dragger_vertical"),n("#mCSB_"+t.idx+"_dragger_horizontal")],l,a,tt,it,p=[],w=[],rt,ut,d,h,o,e,ft=0,g,nt=s.axis==="yx"?"none":"all";c.bind("touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(n){if(r._pointerTouch(n)&&!f){var t=c.offset();l=r._coordinates(n)[0]-t.top;a=r._coordinates(n)[1]-t.left}}).bind("touchmove."+i+" pointermove."+i+" MSPointerMove."+i,function(n){var k,d,g,tt;if(r._pointerTouch(n)&&!f){n.stopImmediatePropagation();ut=r._getTime();var o=v.offset(),i=r._coordinates(n)[0]-o.top,u=r._coordinates(n)[1]-o.left,h="mcsLinearOut";p.push(i);w.push(u);t.overflowed[0]&&(k=y[0].parent().height()-y[0].height(),d=l-i>0&&i-l>-(k*t.scrollRatio.y));t.overflowed[1]&&(g=y[1].parent().width()-y[1].width(),tt=a-u>0&&u-a>-(g*t.scrollRatio.x));(d||tt)&&n.preventDefault();e=s.axis==="yx"?[l-i,a-u]:s.axis==="x"?[null,a-u]:[l-i,null];c[0].idleTimer=250;t.overflowed[0]&&b(e[0],ft,h,"y","all",!0);t.overflowed[1]&&b(e[1],ft,h,"x",nt,!0)}});v.bind("touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(n){if(r._pointerTouch(n)&&!f){n.stopImmediatePropagation();r._stop(k);rt=r._getTime();var t=v.offset();tt=r._coordinates(n)[0]-t.top;it=r._coordinates(n)[1]-t.left;p=[];w=[]}}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(n){var i,u,a;if(r._pointerTouch(n)&&!f){n.stopImmediatePropagation();d=r._getTime();var y=v.offset(),k=r._coordinates(n)[0]-y.top,ft=r._coordinates(n)[1]-y.left;if(!(d-ut>30)){o=1e3/(d-rt);var ot="mcsEaseOut",l=o<2.5,st=l?[p[p.length-2],w[w.length-2]]:[0,0];h=l?[k-st[0],ft-st[1]]:[k-tt,ft-it];i=[Math.abs(h[0]),Math.abs(h[1])];o=l?[Math.abs(h[0]/4),Math.abs(h[1]/4)]:[o,o];u=[Math.abs(c[0].offsetTop)-h[0]*et(i[0]/o[0],o[0]),Math.abs(c[0].offsetLeft)-h[1]*et(i[1]/o[1],o[1])];e=s.axis==="yx"?[u[0],u[1]]:s.axis==="x"?[null,u[1]]:[u[0],null];g=[i[0]*4+s.scrollInertia,i[1]*4+s.scrollInertia];a=parseInt(s.contentTouchScroll)||0;e[0]=i[0]>a?e[0]:0;e[1]=i[1]>a?e[1]:0;t.overflowed[0]&&b(e[0],g[0],ot,"y",nt,!1);t.overflowed[1]&&b(e[1],g[1],ot,"x",nt,!1)}}})},_mousewheel:function(){var o=n(this),t=o.data(u),i=t.opt,h=u+"_"+t.idx,e=n("#mCSB_"+t.idx),f=[n("#mCSB_"+t.idx+"_dragger_vertical"),n("#mCSB_"+t.idx+"_dragger_horizontal")];e.bind("mousewheel."+h,function(u,h){var v;if(r._stop(o),!r._disableMousewheel(o,u.target)){if(v=i.mouseWheel.deltaFactor!=="auto"?parseInt(i.mouseWheel.deltaFactor):s&&u.deltaFactor<100?100:u.deltaFactor<40?40:u.deltaFactor||100,i.axis==="x"||i.mouseWheel.axis==="x")var a="x",l=[Math.round(v*t.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],p=i.mouseWheel.scrollAmount!=="auto"?l[1]:l[0]>=e.width()?e.width()*.9:l[0],w=Math.abs(n("#mCSB_"+t.idx+"_container")[0].offsetLeft),y=f[1][0].offsetLeft,b=f[1].parent().width()-f[1].width(),c=u.deltaX||u.deltaY||h;else var a="y",l=[Math.round(v*t.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],p=i.mouseWheel.scrollAmount!=="auto"?l[1]:l[0]>=e.height()?e.height()*.9:l[0],w=Math.abs(n("#mCSB_"+t.idx+"_container")[0].offsetTop),y=f[0][0].offsetTop,b=f[0].parent().height()-f[0].height(),c=u.deltaY||h;(a!=="y"||t.overflowed[0])&&(a!=="x"||t.overflowed[1])&&(i.mouseWheel.invert&&(c=-c),i.mouseWheel.normalizeDelta&&(c=c<0?-1:1),(c>0&&y!==0||c<0&&y!==b||i.mouseWheel.preventDefault)&&(u.stopImmediatePropagation(),u.preventDefault()),r._scrollTo(o,(w-c*p).toString(),{dir:a}))}})},_disableMousewheel:function(t,i){var r=i.nodeName.toLowerCase(),f=t.data(u).opt.mouseWheel.disableOver;return n.inArray(r,f)>-1&&!(n.inArray(r,["select","textarea"])>-1&&!n(i).is(":focus"))},_draggerRail:function(){var e=n(this),i=e.data(u),t=u+"_"+i.idx,o=n("#mCSB_"+i.idx+"_container"),s=o.parent(),h=n(".mCSB_"+i.idx+"_scrollbar .mCSB_draggerContainer");h.bind("touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(){f=!0}).bind("touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(){f=!1}).bind("click."+t,function(t){var u,f;if(n(t.target).hasClass("mCSB_draggerContainer")||n(t.target).hasClass("mCSB_draggerRail")){if(r._stop(e),u=n(this),f=u.find(".mCSB_dragger"),u.parent(".mCSB_scrollTools_horizontal").length>0){if(!i.overflowed[1])return;var c="x",h=t.pageX>f.offset().left?-1:1,l=Math.abs(o[0].offsetLeft)-h*s.width()*.9}else{if(!i.overflowed[0])return;var c="y",h=t.pageY>f.offset().top?-1:1,l=Math.abs(o[0].offsetTop)-h*s.height()*.9}r._scrollTo(e,l.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var t=n(this),o=t.data(u),e=o.opt,h=u+"_"+o.idx,f=n("#mCSB_"+o.idx+"_container"),s=f.parent();f.bind("focusin."+h,function(){var u=n(i.activeElement),h=f.find(".mCustomScrollBox").length,o=0;u.is(e.advanced.autoScrollOnFocus)&&(r._stop(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=h?(o+17)*h:0,t[0]._focusTimeout=setTimeout(function(){var n=[u.offset().top-f.offset().top,u.offset().left-f.offset().left],i=[f[0].offsetTop,f[0].offsetLeft],h=[i[0]+n[0]>=0&&i[0]+n[0]<s.height()-u.outerHeight(!1),i[1]+n[1]>=0&&i[0]+n[1]<s.width()-u.outerWidth(!1)],c=e.axis==="yx"&&!h[0]&&!h[1]?"none":"all";e.axis==="x"||h[0]||r._scrollTo(t,n[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:o});e.axis==="y"||h[1]||r._scrollTo(t,n[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:o})},t[0]._focusTimer))})},_wrapperScroll:function(){var r=n(this),t=r.data(u),f=u+"_"+t.idx,i=n("#mCSB_"+t.idx+"_container").parent();i.bind("scroll."+f,function(){i.scrollTop(0).scrollLeft(0)})},_buttons:function(){var s=n(this),i=s.data(u),o=i.opt,e=i.sequential,t=u+"_"+i.idx,l=n("#mCSB_"+i.idx+"_container"),h=".mCSB_"+i.idx+"_scrollbar",c=n(h+">a");c.bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t+" mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t+" mouseout."+t+" pointerout."+t+" MSPointerOut."+t+" click."+t,function(t){function h(n,t){e.scrollAmount=o.snapAmount||o.scrollButtons.scrollAmount;r._sequentialScroll.call(this,s,n,t)}if(t.preventDefault(),r._mouseBtnLeft(t)){var u=n(this).attr("class");e.type=o.scrollButtons.scrollType;switch(t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(e.type==="stepped")return;f=!0;i.tweenRunning=!1;h("on",u);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(e.type==="stepped")return;f=!1;e.dir&&h("off",u);break;case"click":if(e.type!=="stepped"||i.tweenRunning)return;h("on",u)}}})},_keyboard:function(){var e=n(this),t=e.data(u),f=t.opt,s=t.sequential,c=u+"_"+t.idx,a=n("#mCSB_"+t.idx),o=n("#mCSB_"+t.idx+"_container"),h=o.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']";a.attr("tabindex","0").bind("blur."+c+" keydown."+c+" keyup."+c,function(u){function w(n,i){(s.type=f.keyboard.scrollType,s.scrollAmount=f.snapAmount||f.keyboard.scrollAmount,s.type==="stepped"&&t.tweenRunning)||r._sequentialScroll.call(this,e,n,i)}var c,y,p,a,v;switch(u.type){case"blur":t.tweenRunning&&s.dir&&w("off",null);break;case"keydown":case"keyup":if(c=u.keyCode?u.keyCode:u.which,y="on",f.axis!=="x"&&(c===38||c===40)||f.axis!=="y"&&(c===37||c===39)){if((c===38||c===40)&&!t.overflowed[0]||(c===37||c===39)&&!t.overflowed[1])return;u.type==="keyup"&&(y="off");n(i.activeElement).is(l)||(u.preventDefault(),u.stopImmediatePropagation(),w(y,c))}else c===33||c===34?((t.overflowed[0]||t.overflowed[1])&&(u.preventDefault(),u.stopImmediatePropagation()),u.type==="keyup"&&(r._stop(e),p=c===34?-1:1,f.axis==="x"||f.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0]?(a="x",v=Math.abs(o[0].offsetLeft)-p*h.width()*.9):(a="y",v=Math.abs(o[0].offsetTop)-p*h.height()*.9),r._scrollTo(e,v.toString(),{dir:a,scrollEasing:"mcsEaseInOut"}))):(c===35||c===36)&&(n(i.activeElement).is(l)||((t.overflowed[0]||t.overflowed[1])&&(u.preventDefault(),u.stopImmediatePropagation()),u.type==="keyup"&&(f.axis==="x"||f.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0]?(a="x",v=c===35?Math.abs(h.width()-o.outerWidth(!1)):0):(a="y",v=c===35?Math.abs(h.height()-o.outerHeight(!1)):0),r._scrollTo(e,v.toString(),{dir:a,scrollEasing:"mcsEaseInOut"}))))}})},_sequentialScroll:function(t,i,f){function s(n){var u=e.type!=="stepped",f=n?u?h.scrollInertia/1.5:h.scrollInertia:1e3/60,l=n?u?7.5:40:2.5,i=[Math.abs(c[0].offsetTop),Math.abs(c[0].offsetLeft)],a=[o.scrollRatio.y>10?10:o.scrollRatio.y,o.scrollRatio.x>10?10:o.scrollRatio.x],y=e.dir[0]==="x"?i[1]+e.dir[1]*a[1]*l:i[0]+e.dir[1]*a[0]*l,p=e.dir[0]==="x"?i[1]+e.dir[1]*parseInt(e.scrollAmount):i[0]+e.dir[1]*parseInt(e.scrollAmount),v=e.scrollAmount!=="auto"?p:y,w=n?u?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",b=n?!0:!1;if(n&&f<17&&(v=e.dir[0]==="x"?i[1]:i[0]),r._scrollTo(t,v.toString(),{dir:e.dir[0],scrollEasing:w,dur:f,onComplete:b}),n){e.dir=!1;return}clearTimeout(e.step);e.step=setTimeout(function(){s()},f)}function a(){clearTimeout(e.step);r._stop(t)}var o=t.data(u),h=o.opt,e=o.sequential,c=n("#mCSB_"+o.idx+"_container"),l=e.type==="stepped"?!0:!1;switch(i){case"on":if(e.dir=[f==="mCSB_buttonRight"||f==="mCSB_buttonLeft"||f===39||f===37?"x":"y",f==="mCSB_buttonUp"||f==="mCSB_buttonLeft"||f===38||f===37?-1:1],r._stop(t),r._isNumeric(f)&&e.type==="stepped")return;s(l);break;case"off":a();(l||o.tweenRunning&&e.dir)&&s(!0)}},_arr:function(t){var r=n(this).data(u).opt,i=[];return typeof t=="function"&&(t=t()),t instanceof Array?i=t.length>1?[t[0],t[1]]:r.axis==="x"?[null,t[0]]:[t[0],null]:(i[0]=t.y?t.y:t.x||r.axis==="x"?null:t,i[1]=t.x?t.x:t.y||r.axis==="y"?null:t),typeof i[0]=="function"&&(i[0]=i[0]()),typeof i[1]=="function"&&(i[1]=i[1]()),i},_to:function(t,i){var h,c,o;if(t!=null&&typeof t!="undefined"){var l=n(this),a=l.data(u),p=a.opt,f=n("#mCSB_"+a.idx+"_container"),v=f.parent(),w=typeof t;i||(i=p.axis==="x"?"x":"y");var b=i==="x"?f.outerWidth(!1):f.outerHeight(!1),s=i==="x"?f.offset().left:f.offset().top,y=i==="x"?f[0].offsetLeft:f[0].offsetTop,k=i==="x"?"left":"top";switch(w){case"function":return t();case"object":if(t.nodeType)o=i==="x"?n(t).offset().left:n(t).offset().top;else if(t.jquery){if(!t.length)return;o=i==="x"?t.offset().left:t.offset().top}return o-s;case"string":case"number":if(r._isNumeric.call(null,t))return Math.abs(t);if(t.indexOf("%")!==-1)return Math.abs(b*parseInt(t)/100);if(t.indexOf("-=")!==-1)return Math.abs(y-parseInt(t.split("-=")[1]));if(t.indexOf("+=")!==-1)return h=y+parseInt(t.split("+=")[1]),h>=0?0:Math.abs(h);if(t.indexOf("px")!==-1&&r._isNumeric.call(null,t.split("px")[0]))return Math.abs(t.split("px")[0]);if(t==="top"||t==="left")return 0;if(t==="bottom")return Math.abs(v.height()-f.outerHeight(!1));if(t==="right")return Math.abs(v.width()-f.outerWidth(!1));if(t==="first"||t==="last")return c=f.find(":"+t),o=i==="x"?n(c).offset().left:n(c).offset().top,o-s;if(n(t).length)return o=i==="x"?n(t).offset().left:n(t).offset().top,o-s;f.css(k,t);e.update.call(null,l[0]);return}}},_autoUpdate:function(t){function d(){clearTimeout(i[0].autoUpdate);i[0].autoUpdate=setTimeout(function(){if(f.advanced.updateOnSelectorChange&&(v=nt(),v!==b)){p();b=v;return}f.advanced.updateOnContentResize&&(o=[i.outerHeight(!1),i.outerWidth(!1),c.height(),c.width(),a()[0],a()[1]],(o[0]!==s[0]||o[1]!==s[1]||o[2]!==s[2]||o[3]!==s[3]||o[4]!==s[4]||o[5]!==s[5])&&(p(),s=o));f.advanced.updateOnImageLoad&&(y=g(),y!==k&&(i.find("img").each(function(){tt(this.src)}),k=y));(f.advanced.updateOnSelectorChange||f.advanced.updateOnContentResize||f.advanced.updateOnImageLoad)&&d()},60)}function g(){var n=0;return f.advanced.updateOnImageLoad&&(n=i.find("img").length),n}function tt(n){function i(n,t){return function(){return t.apply(n,arguments)}}function r(){this.onload=null;p()}var t=new Image;t.onload=i(t,r);t.src=n}function nt(){f.advanced.updateOnSelectorChange===!0&&(f.advanced.updateOnSelectorChange="*");var t=0,r=i.find(f.advanced.updateOnSelectorChange);return f.advanced.updateOnSelectorChange&&r.length>0&&r.each(function(){t+=n(this).height()+n(this).width()}),t}function p(){clearTimeout(i[0].autoUpdate);e.update.call(null,w[0])}var w=n(this),h=w.data(u),f=h.opt,i=n("#mCSB_"+h.idx+"_container");if(t){clearTimeout(i[0].autoUpdate);r._delete.call(null,i[0].autoUpdate);return}var c=i.parent(),l=[n("#mCSB_"+h.idx+"_scrollbar_vertical"),n("#mCSB_"+h.idx+"_scrollbar_horizontal")],a=function(){return[l[0].is(":visible")?l[0].outerHeight(!0):0,l[1].is(":visible")?l[1].outerWidth(!0):0]},b=nt(),v,s=[i.outerHeight(!1),i.outerWidth(!1),c.height(),c.width(),a()[0],a()[1]],o,k=g(),y;d()},_snapAmount:function(n,t,i){return Math.round(n/t)*t-i},_stop:function(t){var i=t.data(u),f=n("#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal");f.each(function(){r._stopTween.call(this)})},_scrollTo:function(t,i,f){function p(n){return e&&o.callbacks[n]&&typeof o.callbacks[n]=="function"}function ut(){return[o.callbacks.alwaysTriggerOffsets||y>=l[0]+a,o.callbacks.alwaysTriggerOffsets||y<=-v]}function w(){var n=[s[0].offsetTop,s[0].offsetLeft],i=[c[0].offsetTop,c[0].offsetLeft],r=[s.outerHeight(!1),s.outerWidth(!1)],u=[b.height(),b.width()];t[0].mcs={content:s,top:n[0],left:n[1],draggerTop:i[0],draggerLeft:i[1],topPct:Math.round(100*Math.abs(n[0])/(Math.abs(r[0])-u[0])),leftPct:Math.round(100*Math.abs(n[1])/(Math.abs(r[1])-u[1])),direction:f.dir}}var e=t.data(u),o=e.opt,rt={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:o.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},f=n.extend(rt,f),d=[f.dur,f.drag?0:f.dur],b=n("#mCSB_"+e.idx),s=n("#mCSB_"+e.idx+"_container"),g=o.callbacks.onTotalScrollOffset?r._arr.call(t,o.callbacks.onTotalScrollOffset):[0,0],nt=o.callbacks.onTotalScrollBackOffset?r._arr.call(t,o.callbacks.onTotalScrollBackOffset):[0,0];e.trigger=f.trigger;o.snapAmount&&(i=r._snapAmount(i,o.snapAmount,o.snapOffset));switch(f.dir){case"x":var c=n("#mCSB_"+e.idx+"_dragger_horizontal"),k="left",y=s[0].offsetLeft,l=[b.width()-s.outerWidth(!1),c.parent().width()-c.width()],h=[i,i/e.scrollRatio.x],a=g[1],v=nt[1],tt=a>0?a/e.scrollRatio.x:0,it=v>0?v/e.scrollRatio.x:0;break;case"y":var c=n("#mCSB_"+e.idx+"_dragger_vertical"),k="top",y=s[0].offsetTop,l=[b.height()-s.outerHeight(!1),c.parent().height()-c.height()],h=[i,i/e.scrollRatio.y],a=g[0],v=nt[0],tt=a>0?a/e.scrollRatio.y:0,it=v>0?v/e.scrollRatio.y:0}(h[1]<0?h=[0,0]:h[1]>=l[1]?h=[l[0],l[1]]:h[0]=-h[0],clearTimeout(s[0].onCompleteTimeout),!e.tweenRunning&&(y===0&&h[0]>=0||y===l[0]&&h[0]<=l[0]))||(r._tweenTo.call(null,c[0],k,Math.round(h[1]),d[1],f.scrollEasing),r._tweenTo.call(null,s[0],k,Math.round(h[0]),d[0],f.scrollEasing,f.overwrite,{onStart:function(){f.callbacks&&f.onStart&&!e.tweenRunning&&(p("onScrollStart")&&(w(),o.callbacks.onScrollStart.call(t[0])),e.tweenRunning=!0,r._onDragClasses(c),e.cbOffsets=ut())},onUpdate:function(){f.callbacks&&f.onUpdate&&p("whileScrolling")&&(w(),o.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(f.callbacks&&f.onComplete){o.axis==="yx"&&clearTimeout(s[0].onCompleteTimeout);var n=s[0].idleTimer||0;s[0].onCompleteTimeout=setTimeout(function(){p("onScroll")&&(w(),o.callbacks.onScroll.call(t[0]));p("onTotalScroll")&&h[1]>=l[1]-tt&&e.cbOffsets[0]&&(w(),o.callbacks.onTotalScroll.call(t[0]));p("onTotalScrollBack")&&h[1]<=it&&e.cbOffsets[1]&&(w(),o.callbacks.onTotalScrollBack.call(t[0]));e.tweenRunning=!1;s[0].idleTimer=0;r._onDragClasses(c,"hide")},n)}}}))},_tweenTo:function(n,i,u,f,e,o,s){function y(){n._mcsstop||(h||w.call(),h=r._getTime()-d,p(),h>=n._mcstime&&(n._mcstime=h>n._mcstime?h+c-(h-n._mcstime):h+c-1,n._mcstime<h+1&&(n._mcstime=h+1)),n._mcstime<f?n._mcsid=_request(y):k.call())}function p(){f>0?(n._mcscurrVal=tt(n._mcstime,l,v,f,e),a[i]=Math.round(n._mcscurrVal)+"px"):a[i]=u+"px";b.call()}function g(){c=1e3/60;n._mcstime=h+c;_request=t.requestAnimationFrame?t.requestAnimationFrame:function(n){return p(),setTimeout(n,.01)};n._mcsid=_request(y)}function nt(){n._mcsid!=null&&(t.requestAnimationFrame?t.cancelAnimationFrame(n._mcsid):clearTimeout(n._mcsid),n._mcsid=null)}function tt(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,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeInOutStrong":return(n/=r/2,n<1)?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,n<1)?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 s=s||{},w=s.onStart||function(){},b=s.onUpdate||function(){},k=s.onComplete||function(){},d=r._getTime(),c,h=0,l=n.offsetTop,a=n.style,v;i==="left"&&(l=n.offsetLeft);v=u-l;n._mcsstop=0;o!=="none"&&nt();g()},_getTime:function(){return t.performance&&t.performance.now?t.performance.now():t.performance&&t.performance.webkitNow?t.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},_stopTween:function(){var n=this;n._mcsid!=null&&(t.requestAnimationFrame?t.cancelAnimationFrame(n._mcsid):clearTimeout(n._mcsid),n._mcsid=null,n._mcsstop=1)},_delete:function(n){try{delete n}catch(t){n=null}},_mouseBtnLeft:function(n){return!(n.which&&n.which!==1)},_pointerTouch:function(n){var t=n.originalEvent.pointerType;return!(t&&t!=="touch"&&t!==2)},_isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)}};n.fn[o]=function(t){if(e[t])return e[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return e.init.apply(this,arguments)};n[o]=function(t){if(e[t])return e[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return e.init.apply(this,arguments)};n[o].defaults=a;t[o]=!0;n(t).load(function(){n(l)[o]()})})(jQuery,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.11",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 i=n(t)["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)},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)}})})