%PDF- %PDF-
Direktori : /var/www/projetos/digital.gracakids.com.br/resources/ |
Current File : /var/www/projetos/digital.gracakids.com.br/resources/main.js |
!function(t){"use strict";var e=e=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)}}(),i=function(t){return this instanceof i?(this.options=utils.combine(i.defaultOptions,t),this._abort=!1,this._stop=!1,void e(function(t){var i,n,o,a,s,r,l,c,d,u,h,p,f,m;h=t||+new Date,l=this.options.duration,c=this.options.startValue,d=this.options.endValue,u=this.options.byValue||d-c,i=this.options.onStart,n=this.options.onChange,o=this.options.onComplete,s=this.options.onAbort,a=h+l,r=this.options.easing,i.apply(this),f=this,m=function(){return this._abort}.bind(this),function g(t){var i;return p=t||+new Date,m()?void s.apply(f):(i=p>a?l:p-h,n.apply(f,[r(i,c,u,l)]),p>a?void o.apply(f):void e(g))}(h)}.bind(this))):new i(t)};i.prototype={constructor:i,_abort:!1,_stop:!1,abort:function(){this._abort=!0}},i.defaultOptions={duration:500,onStart:function(){},onComplete:function(){},onAbort:function(){},onChange:function(){},delay:0,iterationCount:1,startValue:0,endValue:100,byValue:!1,easing:function(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e}},t.animation=i}(window),function(){"use strict";var t=function(e){return this instanceof t?(this.context=new utils.audioContext,this.analyser=this.context.createAnalyser(),this.gain=null,this.source=null,this._paused=!0,this._ended=!1,this._listeners={},this):new t(e)};t.prototype={constructor:t,sourceSrc:"",gain:null,source:null,_paused:!0,_ended:!1,_buffer:null,_listeners:{},get paused(){return this._paused},get ended(){return this._ended},get volume(){return this.gain.gain.value},set volume(t){this.gain.gain.value=t},get currentTime(){return this.source.context.currentTime},set currentTime(t){this.paly(t)},get duration(){return this._buffer.duration},get muted(){return 0==this.volume},set muted(t){if(this.muted!=t){var e=1==t?0:1;this.volume=e}},addEventListener:function(t,e){"undefined"==typeof this._listeners[t]&&(this._listeners[t]=[]),this._listeners[t].push(e)},fire:function(t){if("string"==typeof t&&(t={type:t}),t.target||(t.target=this),!t.type)throw new Error("Event object missing 'type' property.");if(this._listeners[t.type]instanceof Array)for(var e=this._listeners[t.type],i=0,n=e.length;n>i;i++)e[i].call(this,t)},load:function(t){if(t!=this.sourceSrc){var e;t=t||this.sourceSrc,this.sourceSrc=t,e=new XMLHttpRequest,e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){this.context.createBufferSource();this.context.decodeAudioData(e.response,function(t){this.gain=this.context.createGain(),this._buffer=t,this.source=this.context.createBufferSource(),this.source.buffer=this._buffer,this.source.connect(this.gain),this.fire("canplay")}.bind(this))}.bind(this),e.send()}},pause:function(){this.source.disconnect(),this._paused=!0},play:function(t){if(this.paused){if(null==this._buffer)return void setTimeout(function(){this.play(t)}.bind(this),1e3/60);this._paused=!1,t=t||0,this._paused=!1,this.source=this.context.createBufferSource(),this.source.onended=function(){this._ended=!0,this.fire("ended")}.bind(this),this.source.buffer=this._buffer,this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.source.connect(this.gain),this.analyser=this.context.createAnalyser(),this.gain.gain.value=0,this.source.connect(this.analyser),this.source.start(0,t)}}},window.HomeMadeAudioNode=t}(window),function(t){"use strict";var e=function(t){var e,i,n,o,a,s,r,l,c,d;return e=dom.create("div",{"class":t.el_class}),e.css("width",t.width+"px"),e.css("height",t.height+"px"),"video"!=t.type&&(e.css("background","url('"+t.poster+"') center no-repeat rgb(208, 208, 208)"),e.css("background-size","cover")),n=dom.create("div",{"class":"video-progress hide"}),n.append(dom.create("div",{"class":"progressbar-value"})),n.append(dom.create("div",{"class":"progressbar-load"})),o=dom.create("div",{"class":"control"}).append(dom.create("div",{"class":"content-button-play"}).append(dom.create("a",{href:"javascript:void(0)","class":"button-play load"}).append(dom.create("span")))),a=dom.create("div",{"class":"description"}).append(dom.create("span",{"class":"author-name",title:t.authorName}).html(t.authorName)).append(dom.create("span",{"class":"album-name",title:t.albumName}).html(t.albumName)),o.append(a),t.playlist&&(l=dom.create("div",{"class":"content-button-prev-next"}).append(dom.create("a",{href:"javascript:void(0)","class":"play-list-controls next-btn"})).append(dom.create("a",{href:"javascript:void(0)","class":"play-list-controls prev-btn"})),o.append(l)),d=dom.create("div",{"class":"content-overlay"}),t.mobile&&(i=dom.create("img",{"class":"album-cover",src:t.poster}),i.css("position","absolute"),i.css("max-width",t.width+"px"),i.css("height",t.height-10+"px"),i.css("width",t.height-10+"px"),i.css("margin-top","5px"),i.css("margin-left",(t.width-t.height)/2+5+"px"),i.append(dom.create("img",{src:t.poster})),d.append(i)),t.buttonPlayList&&(c=dom.create("div",{"class":"content-button-play-list"}).append(dom.create("a",{href:"javascript:void(0)","class":"button-play-list list-bnt"})).append(dom.create("a",{href:"javascript:void(0)","class":"button-play-list music-bnt"})),o.append(c)),s=dom.create("div",{"class":"visualizer"}),r=dom.create("div",{"class":"time-container hide"}),e.append(d).append(n).append(r).append(o).append(s),e},i=function(t,e){var i,o;return"video"==t.type?(i=document.createElement("video"),o=dom(i),o.attr({poster:t.poster,width:t.width,height:t.height})):(i=document.createElement("audio"),o=dom(i),o.attr({width:1,height:1})),["loop","preload","autobuffer","autoplay"].forEach(function(e){t[e]===!0&&o.attr(e,"")}),n(i,t.source,e),o},n=function(t,e,i){var n,o;for(n=0;n<e.length;n++)o=dom.create("source",{src:e[n].src,type:e[n].type}),o.on("error",i._error.bind(i)),dom(t).append(o)},o=function(t,e,i){var n=dom(e).offset,o=parseInt(dom(e).width()),a=parseInt(t.pageX-n.x),s=Math.round(100/o*a),r=i.duration*s/100;return r},a=function(t){var e=t.progressLoad;t.layout.find(".progressbar-load").css("width",100-e+"%")},s=function(t){t.layout.find(".progressbar-value").css("width",t.progress+"%")},r=function(t){var e=Math.floor(t.time),i=Math.floor(e/60),n=Math.floor(e-60*i);10>n&&(n="0"+n),t.layout.find(".time-container").html(i+":"+n)},l=function(t){var e=t.layout.find(".button-play");e.addClass("pause"),e.css("top",t.layoutHeight/2-52),e.on("click",function(i){e.hasClass("play")?e.addClass("force"):e.addClass("force"),t.toggle()});var i=dom(t.element);dom(i).on("play",function(){}),dom(i).on("pause",function(){})},c=function(t){var e=t.layout.find(".video-progress");e.find(".progressbar-value").css("background-color",t.options.progressbarValueColor),e.find(".progressbar-load").css("background-color",t.options.preloadProgressBarColor),e.css("height",t.options.heightProgressBar),e.on("click",function(e){var i=o(e,this,t);t.setTime(i)}),e.on("mousemove",function(e){var i=Math.round(o(e,this,t)),n=Math.floor(i/60),a=i-60*n;10>a&&(a="0"+a),dom(this).attr("title",n+":"+a)})},d=function(t){if(t.options.visuaLizer!==!1){var e=utils.combine(t.options.visuaLizer,{layout:t.layout.find(".visualizer"),mediaElement:t.element});t.visuaLizer=new VisuaLizer(e),t.visuaLizer.start()}},u=["loadstart","progress","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","play","pause","fade","ratechange","resize","volumechange","MozAudioAvailable","audioprocess"].join(" "),h=function(t){if(!(this instanceof h))return new h(t);var n,o;return this.options=utils.combine(h.defaultOptions,t),n=e(this.options),o=i(this.options,this),n.append(o),this.element=o.get(0),this.element.load(),this.setVolume(this.options.volume),this.layout=n,this.layout.attr("id","media-player-"+utils.uniqueId()),c(this),l(this),dom(this.options.appendTo).append(n),d(this),this._canplay=!1,o.on(u,this._eventHandler.bind(this)),this};h.prototype={constructor:h,element:null,layout:null,_canplay:!1,options:null,get layoutWidth(){return this.options.width},get id(){return this.layout.attr("id")},get layoutHeight(){return this.options.height},set layoutHeight(t){this.options.height=parseInt(t),this.layout.css("height",this.options.height);var e=this.layout.find(".album-cover");e.css("position","absolute"),e.css("max-width",this.options.width+"px"),e.css("height",t-10+"px"),e.css("width",t-10+"px"),e.css("margin-top","5px"),e.css("margin-left",(this.options.width-t)/2+5+"px")},set layoutWidth(t){this.options.width=parseInt(t),this.layout.css("width",this.options.width)},get source(){return this.options.source},get poster(){return this.options.poster},get played(){return!this.element.paused},get paused(){return this.element.paused},get ended(){return this.element.ended},get volume(){return 100*this.element.volume},get time(){return this.element.currentTime},get duration(){return this.element.duration},get canplay(){return this._canplay},get progressLoad(){return this.element.buffered.length>0?this.element.buffered.end(0)/this.element.duration*100:0},get progress(){return this.options.fade&&this.element.duration-this.element.currentTime<1&&1==this.element.volume&&this.fade("none",!1),100/this.element.duration*this.element.currentTime},setMuted:function(t){return this.element.muted=t},setTime:function(t){return this.element.currentTime=t,this},setVolume:function(t){return this.element.volume=t/100,this},playFromList:function(){return this.canplay&&!this.played?(this.options.fade&&!this.played&&this.element.volume<1&&this.fade("play",!0),this.play(),this):void 0},play:function(){if(this.canplay&&!this.played){this.options.fade&&!this.played&&this.element.volume<1&&this.fade("play",!0);var t=this.layout.find(".button-play");return $(".content-overlay").css("opacity","0"),$(".content-button-prev-next").css("opacity","0"),$(".content-button-prev-next").css("display","none"),$(".button-play").addClass("animate"),this.options.mobile&&($(".media-player, .album-cover, #scroller-anchor").addClass("animate"),this.layoutHeight=110,$("#scroller-anchor").css("height",this.layoutHeight),setTimeout(function(){$(".media-player, .album-cover, #scroller-anchor").removeClass("animate")},200)),this.options.playlist&&($(".play-list").css("opacity","1"),$(".play-list").css("display","block")),$(".button-play").css("top","0px"),$(".description").css("opacity","1"),setTimeout(function(){$(".button-play").removeClass("animate")},200),t.addClass("play"),t.removeClass("pause"),setTimeout(function(){$(".button-play").removeClass("force")},200),this.element.play(),this}},pause:function(){this.options.fade&&!this.played&&this.element.volume>0&&this.fade("pause",!1);var t=this.layout.find(".button-play");return t.addClass("animate"),this.options.mobile&&($(".media-player, .album-cover, #scroller-anchor").addClass("animate"),this.layoutHeight=200,$("#scroller-anchor").css("height",this.layoutHeight),setTimeout(function(){$(".media-player, .album-cover, #scroller-anchor").removeClass("animate")},200)),t.css("top",this.layoutHeight/2-52),(t.hasClass("force")||!t.hasClass("infinite"))&&($(".content-overlay").css("opacity","1"),$(".play-list-controls").css("top",this.layoutHeight/2-20),$(".content-button-prev-next").css("opacity","1"),$(".content-button-prev-next").css("display","block"),this.options.mobile?$(".content-overlay").css("background-color","rgba(0,0,0,0.8)"):$(".content-overlay").css("background-color","rgba(0,0,0,0.5)"),$(".description").css("opacity","0"),setTimeout(function(){$(".button-play").removeClass("animate")},200),t.addClass("pause"),t.removeClass("play")),setTimeout(function(){$(".button-play").removeClass("force"),$(".button-play").removeClass("animate")},200),this.element.pause(),this},fade:function(t,e){var i=t;return e?this.element.volume+=.2:this.element.volume-=.2,("play"==i||"none"==i)&&this.element.volume>=.92&&1==e?(this.element.volume=1,"play"==i?this:this):("pause"==i||"stop"==i||"none"==i)&&this.element.volume<=.08&&0==e?(this.element.volume=0,"stop"==i?this:"pause"==i?this:this):(setTimeout(function(){this.mediaPlayer.fade(i,e)},100),this)},toggle:function(){return this.played?this.pause():(this.visuaLizer&&this.visuaLizer.homeMadeAudioNode&&this.visuaLizer.homeMadeAudioNode.play(),this.play()),this},stop:function(){if(this){this.options.fade&&!this.played&&this.element.volume>0&&this.fade("stop",!1),this.element.currentTime&&this.setTime(0),this.pause();this.layout.find(".button-play");return utils.isFunction(this.options.onStop)&&this.options.onStop.apply(this),this.layout.find(".video-progress").addClass("hide"),this.layout.find(".time-container").addClass("hide"),this}},destroy:function(){return dom(this.element).remove(),utils.isFunction(this.options.onDestroy)&&this.options.onDestroy.apply(this),this.element=null,this},load:function(t){return this.element.load(),this},setSource:function(t){var e=[t];return this.element&&this.element.played.length>0&&this.stop(),dom(this.element).empty(),this.options.sources=e,n(this.element,e,this),this.load(),this.layout.find(".progressbar-value").css("width","0%"),this.layout.find(".progressbar-load").css("width","100%"),this},setPoster:function(t){return t?(this.options.poster=t,"video"==this.options.type?dom(this.element).attr(poster,t):(this.layout.css("background","url('"+this.options.poster+"') center no-repeat rgb(208, 208, 208)"),this.layout.css("background-size","cover")),this):this},setAuthorName:function(t){return t&&(this.options.authorName=t,this.layout.find(".author-name").html(this.options.authorName).attr("title",this.options.authorName)),this},setAlbumName:function(t){return t&&(this.options.albumName=t,this.layout.find(".album-name").html(this.options.albumName).attr("title",this.options.albumName)),this},setColorControlButton:function(t){return this.options.controlButtonColor=t,this.layout.find(".button-play").css("background-color",t),this},setColorProgressBar:function(t){return this.options.progressbarValueColor=t,this.layout.find(".progressbar-value").css("background-color",t),this},setColorPreloadProgressBar:function(t){return this.options.preloadProgressBarColor=t,this.layout.find(".progressbar-load").css("background-color",t),this},setColorVisuaLizerBar:function(t){return this.options.visuaLizer.barColor=t,this.visuaLizer.setColorBar(t),this},setWidthVisuaLizerBar:function(t){return this.options.visuaLizer.barWidth=t,this.visuaLizer.setWidthBar(t),this},setSpaceWidthVisuaLizerBar:function(t){return this.options.visuaLizer.spaceWidth=t,this.visuaLizer.setSpaceWidthBar(t),this},setProportioHeightVisuaLizerBar:function(t){return this.options.visuaLizer.proportioHeightBar=t,this.visuaLizer.setProportioHeightBar(t),this},setHeightProgressBar:function(t){return this.options.heightProgressBar=parseInt(t),this.layout.find(".video-progress").css("height",this.options.heightProgressBar),this},_eventHandler:function(t){var e;switch(t.type){case"play":case"playing":this.layout.find(".video-progress").removeClass("hide"),this.layout.find(".time-container").removeClass("hide");break;case"loadeddata":case"progress":case"audioprocess":a(this);break;case"timeupdate":s(this),r(this);break;case"canplay":case"suspend":this._canplay=!0,1==this.options.autoPlay&&this.element.played.length<1&&this.play(),e=this.layout.find(".button-play"),e.removeClass("load");break;case"waiting":e=this.layout.find(".button-play"),e.addClass("load"),this._canplay=!1;break;case"ended":this.stop();break;case"error":this._error(t)}var i="on"+utils.ucfirst(t.type);utils.isFunction(this.options[i])&&this.options[i].apply(this),this.options.debug===!0&&console.log("Event: "+t.type)},_error:function(t){var e;if(console.log(t),t.target.error)switch(t.target.error.code){case t.target.error.MEDIA_ERR_ABORTED:e="You aborted the video playback.";break;case t.target.error.MEDIA_ERR_NETWORK:e="A network error caused the video download to fail part-way.";break;case t.target.error.MEDIA_ERR_DECODE:e="The video playback was aborted due to a corruption problem or because the video used features your browser did not support.";break;case t.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:e="The video could not be loaded, either because the server or network failed or because the format is not supported.";break;default:e="An unknown error occurred."}else e="Error loading: "+t.target.src;this.options.debug===!0?alert(e):console.error(e)}},h.defaultOptions={width:"300",height:"300",appendTo:"body",source:[],poster:null,autoplay:!1,loop:!1,mobile:!1,playlist:!1,fade:!1,volume:100,el_class:"media-player",authorName:"",albumName:"",type:"video",preload:!1,autobuffer:!1,progressbarValueColor:"#ff3000",controlButtonColor:"#ff3000",preloadProgressBarColor:"424242",onPlay:function(){},onPause:function(){},onDestroy:function(){},onStop:function(){},onError:function(){},onAbort:function(){},visuaLizer:{barWidth:7,spaceWidth:3,barColor:"#ff3000"},debug:!1,buttonPlayList:!1,heightProgressBar:10},t.MP=h}(window),function(t){"use strict";var e=function(i,n){if(!(this instanceof e))return new e(i,n);this instanceof t.MP||new Error("Media player not known"),this.options=utils.combine(e.defaultOptions,n),this._tracks=[],this._hide=!1,this._currentTrack=null,this._created=!1,Object.defineProperty(this,"mediaPlayer",{writable:!1,value:i}),this.createLaout(),this.initControls(),this.options.tracks&&(this.addTracks(this.options.tracks),delete this.options.tracks),this.resolutionPlay=!1;var o=this;return this.mediaPlayer.element.addEventListener("play",function(){o.resolutionPlay=!0}),this.mediaPlayer.element.addEventListener("pause",function(){o.resolutionPlay=!1}),this};e.prototype={constructor:e,_tracks:[],_hide:!1,_currentTrack:null,_created:!1,options:null,resolutionPlay:!1,get count(){return this._tracks.length},get hided(){return this._hide},get showed(){return!this._hide},get currentTrack(){return this._currentTrack},get nextTrack(){var t,e;return t=this._currentTrack.index,e=this._tracks[t+1],e||(e=this._tracks[0]),e},get prevTrack(){var t,e;return t=this._currentTrack.index,e=this._tracks[t-1],e||(e=this.latsTrack),e},get latsTrack(){return this._tracks[this._tracks.length-1]},createLaout:function(){var t,e,i,n,o,a;if(this._created)return this;for(this.layout=dom.create("div",{"class":"play-list"}),this.layout.css({left:this.options.marginLeft,right:this.options.marginRight}),t=dom.create("div",{"class":"play-list-header"}),e=dom.create("div",{"class":"track-row"}),i=this.options.columns,o=100/i.length+"%",n=0;n<i.length;n++)a=i[n].width||o,e.append(dom.create("div",{"class":"track-column",style:"width : "+a}).html(i[n].name));return t.append(e),this.layout.append(t),this.layout.append(dom.create("div",{"class":"tracks-container"})),this._created=!0,this},initControls:function(){var t=mediaPlayer.layout.find(".next-btn"),e=mediaPlayer.layout.find(".prev-btn"),i=this;t.on("click",function(t){i.changeTrack(i.nextTrack.index),$(".tracks-container").mCustomScrollbar("scrollTo",$(".active"))}),e.on("click",function(t){i.changeTrack(i.prevTrack.index),$(".tracks-container").mCustomScrollbar("scrollTo",$(".active"))})},addTracks:function(t){var e,i=t.length;if(i>1){var n=this.mediaPlayer.layout.find(".button-play");n.addClass("infinite")}for(e=0;i>e;e++)this.addTrack(t[e]);return this},addTrack:function(t,e){var i,n,o,a,s,r;for(t.index=this.count,i=this.layout.find(".tracks-container"),n=this.options.columns,o=100/n.length+"%",a=dom.create("div",{"class":"track-row"}),r=0;r<n.length;r++){s=n[r].width||o;var l;l="artist"==n[r].index?t[n[r].index]?t[n[r].index]:mediaPlayer.options.authorName:"duration"==n[r].index?"0.30":t[n[r].index],a.append(dom.create("div",{"class":"track-column",style:"width : "+s}).html(l))}if(""==t.sample.src||null==t.sample.src)a.addClass("unavailable");else{a.on("click",function(e){var i=new Event("stop");this.mediaPlayer.element.dispatchEvent(i),this.playTrack(t.index),this.resolutionPlay=!0}.bind(this)),t.node=a;var c=this;t.onCanplay=function(){c.resolutionPlay&&c.mediaPlayer.play()},t.onEnded=function(){c.playNextTrack(),c.mediaPlayer.element.removeEventListener("ended",t.onEnded,!1),c.mediaPlayer.element.removeEventListener("canplay",t.onCanplay,!1)}}return this._tracks.push(t),i.append(a),t.sample.src&&!this.mediaPlayer.options.sources&&(this.playTrack(t.index),this.options.autoPlayFirstTrack===!0&&(this.resolutionPlay=!0)),utils.isFunction(this.options.onAddTrack)&&this.options.onAddTrack.apply(this,[t]),this},removeTrack:function(t){var e,i,n=this._tracks[t];for(this._tracks[t].node.remove(),utils.arrayRemoveEl(this._tracks,n),i=this._tracks.length,e=0;i>e;e++)this._tracks[e].index=e;return this.currentTrack.index==n.index&&(this.mediaPlayer.element.removeEventListener("ended",this.currentTrack.onEnded,!1),this.mediaPlayer.element.removeEventListener("canplay",this.currentTrack.onCanplay,!1),this.playTrack(n.index)),utils.isFunction(this.options.onRemoveTrack)&&this.options.onRemoveTrack.apply(this,[n]),this},changeTrack:function(t){null!=this.currentTrack&&(this.mediaPlayer.element.removeEventListener("ended",this.currentTrack.onEnded,!1),this.mediaPlayer.element.removeEventListener("canplay",this.currentTrack.onCanplay,!1));var e=this._tracks[t];if(""==e.sample.src||null==e.sample.src)this._currentTrack=e,this.changeTrack(this.nextTrack.index);else{this.mediaPlayer.setSource(e.sample),this.mediaPlayer.setPoster(e.poster),this.mediaPlayer.setAuthorName(e.artisName),this.mediaPlayer.setAlbumName(e.track);this.mediaPlayer.element.addEventListener("canplay",e.onCanplay),this.mediaPlayer.element.addEventListener("ended",e.onEnded),this.layout.find(".track-row").removeClass("active"),e.node.addClass("active"),this._currentTrack=e}return this},playTrack:function(t){null!=this.currentTrack&&(this.mediaPlayer.element.removeEventListener("ended",this.currentTrack.onEnded,!1),this.mediaPlayer.element.removeEventListener("canplay",this.currentTrack.onCanplay,!1));var e=this._tracks[t];if(""==e.sample.src||null==e.sample.src)this._currentTrack=e,this.playNextTrack();else{this.mediaPlayer.setSource(e.sample),this.mediaPlayer.setPoster(e.poster),this.mediaPlayer.setAuthorName(e.artisName),this.mediaPlayer.setAlbumName(e.track);this.mediaPlayer.element.addEventListener("canplay",e.onCanplay),this.mediaPlayer.element.addEventListener("ended",e.onEnded),this.layout.find(".track-row").removeClass("active"),e.node.addClass("active"),this._currentTrack=e,utils.isFunction(this.options.onPlayTrack)&&this.options.onPlayTrack.apply(this,[e])}return this},empty:function(){return this.hide(),null!=this.currentTrack&&this.mediaPlayer.stop(),this._tracks=[],this.layout.find(".tracks-container").empty(),this.firstPlay=!1,this},hide:function(){return this.hided?void 0:(t.animation({startValue:1,endValue:0,duration:500,onChange:function(t){this.layout.css("opacity",t)}.bind(this),onComplete:function(){this.layout.css("opacity",0)}.bind(this)}),this._hide=!0,utils.isFunction(this.options.onHide)&&this.options.onHide.call(this),this)},show:function(){return this.hided?(t.animation({startValue:0,endValue:1,duration:500,onChange:function(t){this.layout.css("opacity",t)}.bind(this),onComplete:function(){}.bind(this)}),this._hide=!1,utils.isFunction(this.options.onShow)&&this.options.onShow.call(this),this):void 0},playNextTrack:function(){var t=this.mediaPlayer.layout.find(".button-play");return t.addClass("infinite"),this.options.autoPlayNextTrack!==!0?(t.removeClass("infinite"),this):this.currentTrack.index==this.latsTrack.index&&this.options.loop!==!0?(t.removeClass("infinite"),this.mediaPlayer.pause(),this.mediaPlayer.element.removeEventListener("ended",this.currentTrack.onEnded,!1),this.mediaPlayer.element.removeEventListener("canplay",this.currentTrack.onCanplay,!1),this):(this.playTrack(this.nextTrack.index),this.resolutionPlay=!0,this)},appendTo:function(t){return dom(t).append(this.layout),this},toggle:function(){return this.hided?this.show():this.hide(),this},set:function(t,e){var i;if(utils.isObject(t))for(i in t)this.options.hasOwnProperty(i)&&(this.options[i]=t[i]);else this.options.hasOwnProperty(t)&&(this.options[t]=e);return this}},e.defaultOptions={columns:[{name:"Track",index:"track"},{name:"Artist",index:"artisName"},{name:"Added",index:"added"},{name:"Time",index:"duration"}],autoPlayNextTrack:!0,autoPlayFirstTrack:!0,tracks:[],onShow:function(){},onHide:function(){},onAddTrack:function(){},onRemoveTrack:function(){},onPlayTrack:function(){this.mediaPlayer.playFromList()},marginLeft:15,marginRight:15,loop:!0},t.PL=e}(window),function(t){"use strict";var e=(function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)}}(),{combine:function(t,e){var i={};for(var n in t)i[n]=t[n];for(var o in e)i[o]=e[o];return i},isFunction:function(t){return"function"==typeof t},ucfirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):""},isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isSafari:navigator.userAgent.search("Safari")>=0&&navigator.userAgent.search("Chrome")<0,random:function(t,e){return Math.floor(Math.random()*(e-t+1)+t)},audioContext:t.AudioContext||t.webkitAudioContext,arrayRemoveEl:function(t,e){var i=t.indexOf(e);return-1!=i&&t.splice(i,1),t},uniqueId:function(){var t=0;return function(){return t++}}(),isObject:function(t){return"[object Object]"===Object.prototype.toString.call(t)}});t.utils=e}(window),function(t){"use strict";var e=e=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)}}(),i=!utils.isFirefox&&!utils.isMobile&&!utils.isSafari,n=function(e){return this instanceof n?void 0==utils.audioContext?(console.warn("Browser not support audioContext"),this.notSupport=!0,this):(this.options=utils.combine(n.defaultOptions,e),i?this.homeMadeInit():this.homeMadeInit(),this.canvas=document.createElement("canvas"),dom(this.options.layout).append(this.canvas),this.canvas.width=this.options.width,this.canvas.height=dom(this.options.layout).height(),this.canvasContext=this.canvas.getContext("2d"),this.stared=!1,this.paused=!0,this._destore=!1,dom(this.options.mediaElement).on("play",function(){dom(this.options.layout).addClass("active")}.bind(this)),dom(this.options.mediaElement).on("pause ended",function(){this.animation=t.animation({startValue:90,endValue:0,duration:1e3,onChange:function(t){dom(this.options.layout).css("height",parseInt(t))}.bind(this),onComplete:function(){this.paused&&dom(this.options.layout).removeClass("active"),dom(this.options.layout).css("height",90)}.bind(this)})}.bind(this)),this.options.mediaElement.addEventListener("play",function(){this.animation&&this.animation.abort(),dom(this.options.layout).addClass("active"),this.paused=!1}.bind(this)),this.options.mediaElement.addEventListener("pause",function(){this.paused=!0}.bind(this)),this):new n(e)};n.prototype={constructor:n,canvas:null,canvasContext:null,context:null,analyser:null,source:null,stared:!1,paused:!1,_destore:!1,options:{},get currentAnalyser(){return i?this.homeMadeAudioNode.analyser:this.homeMadeAudioNode.analyser},nativeInit:function(){this.context=new utils.audioContext,this.analyser=this.context.createAnalyser(),this.source=this.context.createMediaElementSource(this.options.mediaElement),this.source.connect(this.analyser),this.analyser.connect(this.context.destination)},homeMadeInit:function(){var t;this.homeMadeAudioNode=t=new HomeMadeAudioNode;var e=this.options.mediaElement;t.addEventListener("canplay",function(){}),e.addEventListener("play",function(){t.play(e.currentTime)}),e.addEventListener("pause",function(){t.pause()}),e.addEventListener("ended",function(){t.pause()}),e.addEventListener("stop",function(){t.pause()}),e.addEventListener("loadstart",function(){t.load(e.children[0].src)}),e.children[0]&&t.load(e.children[0].src)},start:function(){function t(){if(i.paused!==!0)i.currentAnalyser.getByteFrequencyData(n),i.drawSpectrum(n),o=!1;else if(1!=o){var a,s=0;for(a=0;a<n.length;a++)n[a]>0?n[a]=n[a]-4<=0?0:n[a]-4:s++;s==n.length&&(o=!0),i.drawSpectrum(n)}i._destore!==!0&&e(t)}if(!this.stared&&!this.notSupport){var i=this;this.stared=!0;var n=new Uint8Array(this.currentAnalyser.frequencyBinCount);t();var o=!1}},pause:function(){this.stared=!1,this.paused=!0},destore:function(){this._destore=!0,dom(this.canvas).remove()},setColorBar:function(t){return this.options.barColor=t,this},setWidthBar:function(t){return this.options.barWidth=parseInt(t),this},setSpaceWidthBar:function(t){return this.options.spaceWidth=parseInt(t),this},setProportioHeightBar:function(t){return this.options.proportioHeightBar=parseInt(t),this},drawSpectrum:function(t){var e,i,n,o,a,s,r,l;for(s=this.options.barWidth,r=this.options.spaceWidth,n=dom(this.options.layout).width(),o=Math.floor(n/s+1),this.canvas.width=n,l=this.options.proportioHeightBar,this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.canvasContext.fillStyle=this.options.barColor,a=0;o>a;a++)e=Math.floor(a*(r+s)),i=-Math.floor(t[a]/l),this.canvasContext.rect(e,this.canvas.height,s,i);this.canvasContext.fill()}},n.defaultOptions={barWidth:5,spaceWidth:3,barColor:"#ff3000",mediaElement:document.createElement("audio"),layout:"body",proportioHeightBar:5},t.VisuaLizer=n}(window),+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),a=o.data("bs.modal"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);a||o.data("bs.modal",a=new i(this,s)),"string"==typeof e?a[e](n):s.show&&a.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.2",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.options.backdrop&&n.adjustBackdrop(),n.adjustDialog(),o&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var a=t.Event("shown.bs.modal",{relatedTarget:e});o?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(a)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(a)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus"); },this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&o;if(this.$backdrop=t('<div class="modal-backdrop '+o+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},i.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),o=n.attr("href"),a=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},a.data(),n.data());n.is("a")&&i.preventDefault(),a.one("show.bs.modal",function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(a,s,this)})}(jQuery),function(t,e){"use strict";"document"in self&&!("classList"in e.createElement("_"))&&!function(t){if("Element"in t){var e="classList",i="prototype",n=t.Element[i],o=Object,a=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[i].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},l=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},c=function(t){for(var e=a.call(t.getAttribute("class")||""),i=e?e.split(/\s+/):[],n=0,o=i.length;o>n;n++)this.push(i[n]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},d=c[i]=[],u=function(){return new c(this)};if(r[i]=Error[i],d.item=function(t){return this[t]||null},d.contains=function(t){return t+="",-1!==l(this,t)},d.add=function(){var t,e=arguments,i=0,n=e.length,o=!1;do t=e[i]+"",-1===l(this,t)&&(this.push(t),o=!0);while(++i<n);o&&this._updateClassName()},d.remove=function(){var t,e=arguments,i=0,n=e.length,o=!1;do{t=e[i]+"";var a=l(this,t);-1!==a&&(this.splice(a,1),o=!0)}while(++i<n);o&&this._updateClassName()},d.toggle=function(t,e){t+="";var i=this.contains(t),n=i?e!==!0&&"remove":e!==!1&&"add";return n&&this[n](t),!i},d.toString=function(){return this.join(" ")},o.defineProperty){var h={get:u,enumerable:!0,configurable:!0};try{o.defineProperty(n,e,h)}catch(p){-2146823252===p.number&&(h.enumerable=!1,o.defineProperty(n,e,h))}}else o[i].__defineGetter__&&n.__defineGetter__(e,u)}}(self);var i=!1,n=[],o={findTag:/^[-_a-z0-9]+$/i,findClass:/^\.[-_a-z0-9]+$/i,findId:/^#[-_a-z0-9]+$/i},a={zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},s=function(t){return String(t).replace(/-\D/g,function(t){return t[1].toUpperCase()})},r=function(t){return String(t).replace(/[A-Z]/g,function(t){return"-"+t[0].toLowerCase()})},l=function(t){return Array.prototype.slice.call(t)},c=function(t){return Array.isArray(t)},d=function(t){return function(e,i){if("undefined"==typeof i&&"object"!=typeof e)return t.get.call(this,e);var n=e;"object"!=typeof n&&(n={},n[e]=i);for(var o in n)t.set.call(this,o,n[o])}},u=function(){if(i===!0)return!0;i=!0;for(var t=0;t<n.length;)n[t++]();n=[]},h=function(t,e){return(null==e||0>e)&&(e=1),!t||0>=e?dom(t):h(t.parentNode,e-1)};e.addEventListener("DOMContentLoaded",u,!1),t.addEventListener("load",u,!1);var p=function(i,n){if(!(this instanceof p))return new p(i,n);if(!arguments.length)return this.nodes=[e],this;var n=n||e;this.nodes="string"==typeof i?p.query(i,n):i==t?[e]:i instanceof p?l(i.nodes):p.isElement(i)?[i]:c(i)?l(i):[];return this};p.prototype={constructor:p,nodes:[],get:function(t){return this.nodes[Number(t)||0]},get length(){return this.nodes?this.nodes.length:0},get first(){return this.nodes[0]},get body(){return new dom("body")},each:function(t){return this.nodes.forEach(t.bind(this)),this},children:function(t){var e=l(this.first.childNodes);if(null==t){var i=[];return e.forEach(function(t){dom.isElement(t)&&i.push(t)}),new dom(i)}return new dom(e[Number(t)||0])},parent:function(t){return dom.isElement(this.first)?h(this.first,t):void 0},_actionsClasses:function(t,e){var i=c(t)?t:[t];return this.each(function(t){for(var n in i)if(dom.isElement(t))switch(e){case"add":t.classList.add(i[n]);break;case"remove":t.classList.remove(i[n]);break;case"toggle":t.classList.toggle(i[n])}})},addClass:function(t){return this._actionsClasses(t,"add"),this},removeClass:function(t){return this._actionsClasses(t,"remove"),this},toggleClass:function(t){return this._actionsClasses(t,"toggle"),this},hasClass:function(t){var e=!1;return this.each(function(i){dom.isElement(i)&&(e=i.classList.contains(t),e===!0)}),e},attr:d({get:function(t){return dom.isElement(this.first)?this.first.getAttribute(t):void 0},set:function(t,e){for(var i=this.nodes,n=i.length;n--;)dom.isElement(i[n])&&i[n].setAttribute(t,e)}}),css:d({get:function(e){return dom.isElement(this.first)?t.getComputedStyle(this.first,"").getPropertyValue(r(e)):void 0},set:function(t,e){for(var i=this.nodes,n=i.length;n--;)"number"!=typeof e||a[t]||(e+="px"),dom.isElement(i[n])&&(i[n].style[s(t)]=e);return this}}),get offset(){if(dom.isElement(this.first)){var i=this.first;if(null!=i.offsetX)return{x:i.offsetX,y:i.offsetY};try{var n=i.getBoundingClientRect(),o=e.body,a=e.documentElement,s=t.pageXOffset||a.scrollLeft||o.scrollLeft,r=t.pageYOffset||a.scrollTop||o.scrollTop,l=a.clientLeft||o.clientLeft||0,c=a.clientTop||o.clientTop||0;return{x:Math.round(n.left+s-l),y:Math.round(n.top+r-c)}}catch(d){return null}}},removeAttr:function(t){return this.each(function(e){dom.isElement(e)&&e.removeAttribute(t)}),this},on:function(t,e){return this.each(function(i){if(dom.isElement(i)){var n=t.split(" ");n.forEach(function(t){i.addEventListener(t,e,!1)})}}),this},remove:function(){return this.each(function(t){dom.isElement(t)&&t.parentNode&&t.parentNode.removeChild(t)})},find:function(t){var e,i=[];return this.each(function(n){e=dom.query(t,n),e.forEach(function(t){i.push(t)})}),new dom(i)},insertBefore:function(t){var i=e.createDocumentFragment();return this.each(function(t){i.appendChild(t)}),p(t).parent().first.insertBefore(i,p(t).first),this},insertAfter:function(t){var i=p(t).parent().first,n=p(t).first.nextSibling,o=e.createDocumentFragment();return this.each(function(t){o.appendChild(t)}),p.isElement(n)?i.insertBefore(o,n):i.appendChild(o),this},append:function(t,i){if(dom.isElement(this.first))if(null!=i&&this.children(i)instanceof p&&0!=this.children(i).length)dom(t).insertBefore(this.children(i));else{var n=e.createDocumentFragment(),o=t instanceof p?t:new p(t);o.each(function(t){n.appendChild(t)}),this.first.appendChild(n)}return this},html:function(t){return dom.isElement(this.first)&&(this.first.innerHTML=t),this},get size(){if(dom.isElement(this.first)){var t=this.first==e?e.body:this.first,i=t.getBoundingClientRect();return{width:i.width,height:i.height}}},width:function(){return this.size.width},height:function(){return this.size.height},empty:function(){return this.each(function(t){if(dom.isElement(t))for(;t.hasChildNodes();)t.removeChild(t.firstChild)})}},p.query=function(t,i){var n=i.getElementById?i:e;return t.match(o.findId)?[n.getElementById(t.substr(1))]:l(t.match(o.findClass)?i.getElementsByClassName(t.substr(1)):t.match(o.findTag)?i.getElementsByTagName(t):i.querySelectorAll(t))},p.create=function(t,i){var n=new p(e.createElement(t));return i&&n.attr(i),n},p.isElement=function(t){return!(!t||!t.nodeName)},p.onReady=function(t){return i?setTimeout(t,1):n.push(t),this},t.dom=p}(window,document),function(t,e){function i(){var t=m.elements;return"string"==typeof t?t.split(" "):t}function n(t){var e=f[t[h]];return e||(e={},p++,t[h]=p,f[p]=e),e}function o(t,i,o){return i||(i=e),l?i.createElement(t):(o||(o=n(i)),i=o.cache[t]?o.cache[t].cloneNode():u.test(t)?(o.cache[t]=o.createElem(t)).cloneNode():o.createElem(t),i.canHaveChildren&&!d.test(t)?o.frag.appendChild(i):i)}function a(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(i){return m.shivMethods?o(i,t,e):e.createElem(i)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/[\w\-]+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(m,e.frag)}function s(t){t||(t=e);var i=n(t);if(m.shivCSS&&!r&&!i.hasCSS){var o,s=t;o=s.createElement("p"),s=s.getElementsByTagName("head")[0]||s.documentElement,o.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>",o=s.insertBefore(o.lastChild,s.firstChild),i.hasCSS=!!o}return l||a(t,i),t}var r,l,c=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",p=0,f={};!function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",r="hidden"in t;var i;if(!(i=1==t.childNodes.length)){e.createElement("a");var n=e.createDocumentFragment();i="undefined"==typeof n.cloneNode||"undefined"==typeof n.createDocumentFragment||"undefined"==typeof n.createElement}l=i}catch(o){l=r=!0}}();var m={elements:c.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==c.shivCSS,supportsUnknownElements:l,shivMethods:!1!==c.shivMethods,type:"default",shivDocument:s,createElement:o,createDocumentFragment:function(t,o){if(t||(t=e),l)return t.createDocumentFragment();for(var o=o||n(t),a=o.frag.cloneNode(),s=0,r=i(),c=r.length;c>s;s++)a.createElement(r[s]);return a}};t.html5=m,s(e)}(this,document),function(t,e,i){!function(e){var n="function"==typeof define&&define.amd,o="https:"==i.location.protocol?"https:":"http:",a="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js";n||t.event.special.mousewheel||t("head").append(decodeURI("%3Cscript src="+o+"//"+a+"%3E%3C/script%3E")),e()}(function(){var n="mCustomScrollbar",o="mCS",a=".mCustomScrollbar",s={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:100,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,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},c=e.attachEvent&&!e.addEventListener?1:0,d=!1,u=["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"],h={init:function(e){var e=t.extend(!0,{},s,e),i=p.call(this);if(e.live){var n=e.liveSelector||this.selector||a,c=t(n);if("off"===e.live)return void m(n);l[n]=setTimeout(function(){c.mCustomScrollbar(e),"once"===e.live&&c.length&&m(n)},500)}else m(n);return e.setWidth=e.set_width?e.set_width:e.setWidth,e.setHeight=e.set_height?e.set_height:e.setHeight,e.axis=e.horizontalScroll?"x":g(e.axis),e.scrollInertia=e.scrollInertia>0&&e.scrollInertia<17?17:e.scrollInertia,"object"!=typeof e.mouseWheel&&1==e.mouseWheel&&(e.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),e.mouseWheel.scrollAmount=e.mouseWheelPixels?e.mouseWheelPixels:e.mouseWheel.scrollAmount,e.mouseWheel.normalizeDelta=e.advanced.normalizeMouseWheelDelta?e.advanced.normalizeMouseWheelDelta:e.mouseWheel.normalizeDelta,e.scrollButtons.scrollType=v(e.scrollButtons.scrollType),f(e),t(i).each(function(){var i=t(this);if(!i.data(o)){i.data(o,{idx:++r,opt:e,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:i.css("direction"),cbOffsets:null,trigger:null});var n=i.data(o),a=n.opt,s=i.data("mcs-axis"),l=i.data("mcs-scrollbar-position"),c=i.data("mcs-theme");s&&(a.axis=s),l&&(a.scrollbarPosition=l),c&&(a.theme=c,f(a)),y.call(this),t("#mCSB_"+n.idx+"_container img:not(."+u[2]+")").addClass(u[2]),h.update.call(null,i)}})},update:function(e,i){var n=e||p.call(this);return t(n).each(function(){var e=t(this);if(e.data(o)){var n=e.data(o),a=n.opt,s=t("#mCSB_"+n.idx+"_container"),r=[t("#mCSB_"+n.idx+"_dragger_vertical"),t("#mCSB_"+n.idx+"_dragger_horizontal")];if(!s.length)return;n.tweenRunning&&X(e),e.hasClass(u[3])&&e.removeClass(u[3]),e.hasClass(u[4])&&e.removeClass(u[4]),w.call(this),x.call(this),"y"===a.axis||a.advanced.autoExpandHorizontalScroll||s.css("width",b(s.children())),n.overflowed=T.call(this),A.call(this),a.autoDraggerLength&&C.call(this),S.call(this),E.call(this);var l=[Math.abs(s[0].offsetTop),Math.abs(s[0].offsetLeft)];"x"!==a.axis&&(n.overflowed[0]?r[0].height()>r[0].parent().height()?B.call(this):(Y(e,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===a.axis?O.call(this):"yx"===a.axis&&n.overflowed[1]&&Y(e,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==a.axis&&(n.overflowed[1]?r[1].width()>r[1].parent().width()?B.call(this):(Y(e,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===a.axis?O.call(this):"yx"===a.axis&&n.overflowed[0]&&Y(e,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),i&&n&&(2===i&&a.callbacks.onImageLoad&&"function"==typeof a.callbacks.onImageLoad?a.callbacks.onImageLoad.call(this):3===i&&a.callbacks.onSelectorChange&&"function"==typeof a.callbacks.onSelectorChange?a.callbacks.onSelectorChange.call(this):a.callbacks.onUpdate&&"function"==typeof a.callbacks.onUpdate&&a.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(e,i){if("undefined"!=typeof e&&null!=e){var n=p.call(this);return t(n).each(function(){var n=t(this);if(n.data(o)){var a=n.data(o),s=a.opt,r={trigger:"external",scrollInertia:s.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=t.extend(!0,{},r,i),c=H.call(this,e),d=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;c[0]=q.call(this,c[0],"y"),c[1]=q.call(this,c[1],"x"),l.moveDragger&&(c[0]*=a.scrollRatio.y,c[1]*=a.scrollRatio.x),l.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==s.axis&&a.overflowed[0]&&(l.dir="y",l.overwrite="all",Y(n,c[0].toString(),l)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==s.axis&&a.overflowed[1]&&(l.dir="x",l.overwrite="none",Y(n,c[1].toString(),l))},l.timeout)}})}},stop:function(){var e=p.call(this);return t(e).each(function(){var e=t(this);e.data(o)&&X(e)})},disable:function(e){var i=p.call(this);return t(i).each(function(){var i=t(this);if(i.data(o)){i.data(o);U.call(this,"remove"),O.call(this),e&&B.call(this),A.call(this,!0),i.addClass(u[3])}})},destroy:function(){var e=p.call(this);return t(e).each(function(){var i=t(this);if(i.data(o)){var a=i.data(o),s=a.opt,r=t("#mCSB_"+a.idx),l=t("#mCSB_"+a.idx+"_container"),c=t(".mCSB_"+a.idx+"_scrollbar");s.live&&m(s.liveSelector||t(e).selector),U.call(this,"remove"),O.call(this),B.call(this),i.removeData(o),Z(this,"mcs"),c.remove(),l.find("img."+u[2]).removeClass(u[2]),r.replaceWith(l.contents()),i.removeClass(n+" _"+o+"_"+a.idx+" "+u[6]+" "+u[7]+" "+u[5]+" "+u[3]).addClass(u[4])}})}},p=function(){return"object"!=typeof t(this)||t(this).length<1?a:this},f=function(e){var i=["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"],o=["minimal","minimal-dark"],a=["minimal","minimal-dark"],s=["minimal","minimal-dark"];e.autoDraggerLength=t.inArray(e.theme,i)>-1?!1:e.autoDraggerLength,e.autoExpandScrollbar=t.inArray(e.theme,n)>-1?!1:e.autoExpandScrollbar,e.scrollButtons.enable=t.inArray(e.theme,o)>-1?!1:e.scrollButtons.enable,e.autoHideScrollbar=t.inArray(e.theme,a)>-1?!0:e.autoHideScrollbar,e.scrollbarPosition=t.inArray(e.theme,s)>-1?"outside":e.scrollbarPosition},m=function(t){l[t]&&(clearTimeout(l[t]),Z(l,t))},g=function(t){return"yx"===t||"xy"===t||"auto"===t?"yx":"x"===t||"horizontal"===t?"x":"y"},v=function(t){return"stepped"===t||"pixels"===t||"step"===t||"click"===t?"stepped":"stepless"},y=function(){var e=t(this),i=e.data(o),a=i.opt,s=a.autoExpandScrollbar?" "+u[1]+"_expand":"",r=["<div id='mCSB_"+i.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+i.idx+"_scrollbar mCS-"+a.theme+" mCSB_scrollTools_vertical"+s+"'><div class='"+u[12]+"'><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-"+a.theme+" mCSB_scrollTools_horizontal"+s+"'><div class='"+u[12]+"'><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>"],l="yx"===a.axis?"mCSB_vertical_horizontal":"x"===a.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===a.axis?r[0]+r[1]:"x"===a.axis?r[1]:r[0],d="yx"===a.axis?"<div id='mCSB_"+i.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",h=a.autoHideScrollbar?" "+u[6]:"",p="x"!==a.axis&&"rtl"===i.langDir?" "+u[7]:"";a.setWidth&&e.css("width",a.setWidth),a.setHeight&&e.css("height",a.setHeight),a.setLeft="y"!==a.axis&&"rtl"===i.langDir?"989999px":a.setLeft,e.addClass(n+" _"+o+"_"+i.idx+h+p).wrapInner("<div id='mCSB_"+i.idx+"' class='mCustomScrollBox mCS-"+a.theme+" "+l+"'><div id='mCSB_"+i.idx+"_container' class='mCSB_container' style='position:relative; top:"+a.setTop+"; left:"+a.setLeft+";' dir="+i.langDir+" /></div>");var f=t("#mCSB_"+i.idx),m=t("#mCSB_"+i.idx+"_container");"y"===a.axis||a.advanced.autoExpandHorizontalScroll||m.css("width",b(m.children())),"outside"===a.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),f.addClass("mCSB_outside").after(c)):(f.addClass("mCSB_inside").append(c),m.wrap(d)),_.call(this);var g=[t("#mCSB_"+i.idx+"_dragger_vertical"),t("#mCSB_"+i.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},b=function(e){return Math.max.apply(Math,e.map(function(){return t(this).outerWidth(!0)}).get())},x=function(){var e=t(this),i=e.data(o),n=i.opt,a=t("#mCSB_"+i.idx+"_container");n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis&&a.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(a[0].getBoundingClientRect().right+.4)-Math.floor(a[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_=function(){var e=t(this),i=e.data(o),n=i.opt,a=t(".mCSB_"+i.idx+"_scrollbar:first"),s=et(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+u[13]+"' oncontextmenu='return false;' "+s+" />","<a href='#' class='"+u[14]+"' oncontextmenu='return false;' "+s+" />","<a href='#' class='"+u[15]+"' oncontextmenu='return false;' "+s+" />","<a href='#' class='"+u[16]+"' oncontextmenu='return false;' "+s+" />"],l=["x"===n.axis?r[2]:r[0],"x"===n.axis?r[3]:r[1],r[2],r[3]];n.scrollButtons.enable&&a.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},w=function(){var e=t(this),i=e.data(o),n=t("#mCSB_"+i.idx),a=e.css("max-height")||"none",s=-1!==a.indexOf("%"),r=e.css("box-sizing");if("none"!==a){var l=s?e.parent().height()*parseInt(a)/100:parseInt(a);"border-box"===r&&(l-=e.innerHeight()-e.height()+(e.outerHeight()-e.innerHeight())),n.css("max-height",Math.round(l))}},C=function(){var e=t(this),i=e.data(o),n=t("#mCSB_"+i.idx),a=t("#mCSB_"+i.idx+"_container"),s=[t("#mCSB_"+i.idx+"_dragger_vertical"),t("#mCSB_"+i.idx+"_dragger_horizontal")],r=[n.height()/a.outerHeight(!1),n.width()/a.outerWidth(!1)],l=[parseInt(s[0].css("min-height")),Math.round(r[0]*s[0].parent().height()),parseInt(s[1].css("min-width")),Math.round(r[1]*s[1].parent().width())],d=c&&l[1]<l[0]?l[0]:l[1],u=c&&l[3]<l[2]?l[2]:l[3];s[0].css({height:d,"max-height":s[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"}),s[1].css({width:u,"max-width":s[1].parent().width()-10})},S=function(){var e=t(this),i=e.data(o),n=t("#mCSB_"+i.idx),a=t("#mCSB_"+i.idx+"_container"),s=[t("#mCSB_"+i.idx+"_dragger_vertical"),t("#mCSB_"+i.idx+"_dragger_horizontal")],r=[a.outerHeight(!1)-n.height(),a.outerWidth(!1)-n.width()],l=[r[0]/(s[0].parent().height()-s[0].height()),r[1]/(s[1].parent().width()-s[1].width())];i.scrollRatio={y:l[0],x:l[1]}},k=function(t,e,i){var n=i?u[0]+"_expanded":"",o=t.closest(".mCSB_scrollTools");"active"===e?(t.toggleClass(u[0]+" "+n),o.toggleClass(u[1]),t[0]._draggable=t[0]._draggable?0:1):t[0]._draggable||("hide"===e?(t.removeClass(u[0]),o.removeClass(u[1])):(t.addClass(u[0]),o.addClass(u[1])))},T=function(){var e=t(this),i=e.data(o),n=t("#mCSB_"+i.idx),a=t("#mCSB_"+i.idx+"_container"),s=null==i.overflowed?a.height():a.outerHeight(!1),r=null==i.overflowed?a.width():a.outerWidth(!1);return[s>n.height(),r>n.width()]},B=function(){var e=t(this),i=e.data(o),n=i.opt,a=t("#mCSB_"+i.idx),s=t("#mCSB_"+i.idx+"_container"),r=[t("#mCSB_"+i.idx+"_dragger_vertical"),t("#mCSB_"+i.idx+"_dragger_horizontal")];if(X(e),("x"!==n.axis&&!i.overflowed[0]||"y"===n.axis&&i.overflowed[0])&&(r[0].add(s).css("top",0),Y(e,"_resetY")),"y"!==n.axis&&!i.overflowed[1]||"x"===n.axis&&i.overflowed[1]){var l=dx=0;"rtl"===i.langDir&&(l=a.width()-s.outerWidth(!1),dx=Math.abs(l/i.scrollRatio.x)),s.css("left",l),r[1].css("left",dx),Y(e,"_resetX")}},E=function(){function e(){s=setTimeout(function(){t.event.special.mousewheel?(clearTimeout(s),j.call(i[0])):e()},100)}var i=t(this),n=i.data(o),a=n.opt;if(!n.bindEvents){if(I.call(this),a.contentTouchScroll&&M.call(this),L.call(this),a.mouseWheel.enable){var s;e()}D.call(this),N.call(this),a.advanced.autoScrollOnFocus&&$.call(this),a.scrollButtons.enable&&z.call(this),a.keyboard.enable&&F.call(this),n.bindEvents=!0}},O=function(){var e=t(this),n=e.data(o),a=n.opt,s=o+"_"+n.idx,r=".mCSB_"+n.idx+"_scrollbar",l=t("#mCSB_"+n.idx+",#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,"+r+" ."+u[12]+",#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal,"+r+">a"),c=t("#mCSB_"+n.idx+"_container");a.advanced.releaseDraggableSelectors&&l.add(t(a.advanced.releaseDraggableSelectors)),n.bindEvents&&(t(i).unbind("."+s),l.each(function(){t(this).unbind("."+s)}),clearTimeout(e[0]._focusTimeout),Z(e[0],"_focusTimeout"),clearTimeout(n.sequential.step),Z(n.sequential,"step"),clearTimeout(c[0].onCompleteTimeout),Z(c[0],"onCompleteTimeout"),n.bindEvents=!1)},A=function(e){var i=t(this),n=i.data(o),a=n.opt,s=t("#mCSB_"+n.idx+"_container_wrapper"),r=s.length?s:t("#mCSB_"+n.idx+"_container"),l=[t("#mCSB_"+n.idx+"_scrollbar_vertical"),t("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==a.axis&&(n.overflowed[0]&&!e?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),r.removeClass(u[8]+" "+u[10])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&c[0].add(l[0].children("a")).css("display","none"),r.removeClass(u[10])):(l[0].css("display","none"),r.addClass(u[10])),r.addClass(u[8]))),"y"!==a.axis&&(n.overflowed[1]&&!e?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),r.removeClass(u[9]+" "+u[11])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&c[1].add(l[1].children("a")).css("display","none"),r.removeClass(u[11])):(l[1].css("display","none"),r.addClass(u[11])),r.addClass(u[9]))),n.overflowed[0]||n.overflowed[1]?i.removeClass(u[5]):i.addClass(u[5])},P=function(t){var e=t.type;switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],n=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return[i.pageY,i.pageX,n>1];default:return[t.pageY,t.pageX,!1]}},I=function(){function e(t){var e=m.find("iframe");if(e.length){var i=t?"auto":"none";e.css("pointer-events",i)}}function n(t,e,i,n){if(m[0].idleTimer=h.scrollInertia<233?250:0,a.attr("id")===f[1])var o="x",s=(a[0].offsetLeft-e+n)*u.scrollRatio.x;else var o="y",s=(a[0].offsetTop-t+i)*u.scrollRatio.y;Y(l,s.toString(),{dir:o,drag:!0})}var a,s,r,l=t(this),u=l.data(o),h=u.opt,p=o+"_"+u.idx,f=["mCSB_"+u.idx+"_dragger_vertical","mCSB_"+u.idx+"_dragger_horizontal"],m=t("#mCSB_"+u.idx+"_container"),g=t("#"+f[0]+",#"+f[1]),v=h.advanced.releaseDraggableSelectors?g.add(t(h.advanced.releaseDraggableSelectors)):g;g.bind("mousedown."+p+" touchstart."+p+" pointerdown."+p+" MSPointerDown."+p,function(n){if(n.stopImmediatePropagation(),n.preventDefault(),J(n)){d=!0,c&&(i.onselectstart=function(){return!1}),e(!1),X(l),a=t(this);var o=a.offset(),u=P(n)[0]-o.top,p=P(n)[1]-o.left,f=a.height()+o.top,m=a.width()+o.left;f>u&&u>0&&m>p&&p>0&&(s=u,r=p),k(a,"active",h.autoExpandScrollbar)}}).bind("touchmove."+p,function(t){t.stopImmediatePropagation(),t.preventDefault();var e=a.offset(),i=P(t)[0]-e.top,o=P(t)[1]-e.left;n(s,r,i,o)}),t(i).bind("mousemove."+p+" pointermove."+p+" MSPointerMove."+p,function(t){if(a){var e=a.offset(),i=P(t)[0]-e.top,o=P(t)[1]-e.left;if(s===i)return;n(s,r,i,o)}}).add(v).bind("mouseup."+p+" touchend."+p+" pointerup."+p+" MSPointerUp."+p,function(t){a&&(k(a,"active",h.autoExpandScrollbar),a=null),d=!1,c&&(i.onselectstart=null),e(!0)})},M=function(){function e(t,e){var i=[1.5*e,2*e,e/1.5,e/2];return t>90?e>4?i[0]:i[3]:t>60?e>3?i[3]:i[2]:t>30?e>8?i[1]:e>6?i[0]:e>4?e:i[2]:e>8?e:i[3]}function i(t,e,i,n,o,a){t&&Y(g,t.toString(),{dur:e,scrollEasing:i,dir:n,overwrite:o,drag:a})}var n,a,s,r,l,c,u,h,p,f,m,g=t(this),v=g.data(o),y=v.opt,b=o+"_"+v.idx,x=t("#mCSB_"+v.idx),_=t("#mCSB_"+v.idx+"_container"),w=[t("#mCSB_"+v.idx+"_dragger_vertical"),t("#mCSB_"+v.idx+"_dragger_horizontal")],C=[],S=[],k=0,T="yx"===y.axis?"none":"all",B=[];_.bind("touchstart."+b+" pointerdown."+b+" MSPointerDown."+b,function(t){if(tt(t)&&!d&&!P(t)[2]){var e=_.offset();n=P(t)[0]-e.top,a=P(t)[1]-e.left,B=[P(t)[0],P(t)[1]]}}).bind("touchmove."+b+" pointermove."+b+" MSPointerMove."+b,function(t){if(tt(t)&&!d&&!P(t)[2]){t.stopImmediatePropagation(),c=K();var e=x.offset(),o=P(t)[0]-e.top,s=P(t)[1]-e.left,r="mcsLinearOut";if(C.push(o),S.push(s),B[2]=Math.abs(P(t)[0]-B[0]),B[3]=Math.abs(P(t)[1]-B[1]),v.overflowed[0])var l=w[0].parent().height()-w[0].height(),u=n-o>0&&o-n>-(l*v.scrollRatio.y)&&(2*B[3]<B[2]||"yx"===y.axis);if(v.overflowed[1])var h=w[1].parent().width()-w[1].width(),p=a-s>0&&s-a>-(h*v.scrollRatio.x)&&(2*B[2]<B[3]||"yx"===y.axis);(u||p)&&t.preventDefault(),f="yx"===y.axis?[n-o,a-s]:"x"===y.axis?[null,a-s]:[n-o,null],_[0].idleTimer=250,v.overflowed[0]&&i(f[0],k,r,"y","all",!0),v.overflowed[1]&&i(f[1],k,r,"x",T,!0)}}),x.bind("touchstart."+b+" pointerdown."+b+" MSPointerDown."+b,function(t){if(tt(t)&&!d&&!P(t)[2]){t.stopImmediatePropagation(),X(g),l=K();var e=x.offset();s=P(t)[0]-e.top,r=P(t)[1]-e.left,C=[],S=[]}}).bind("touchend."+b+" pointerup."+b+" MSPointerUp."+b,function(t){if(tt(t)&&!d&&!P(t)[2]){t.stopImmediatePropagation(),u=K();var n=x.offset(),o=P(t)[0]-n.top,a=P(t)[1]-n.left;if(!(u-c>30)){p=1e3/(u-l);var g="mcsEaseOut",b=2.5>p,w=b?[C[C.length-2],S[S.length-2]]:[0,0];h=b?[o-w[0],a-w[1]]:[o-s,a-r];var k=[Math.abs(h[0]),Math.abs(h[1])];p=b?[Math.abs(h[0]/4),Math.abs(h[1]/4)]:[p,p];var B=[Math.abs(_[0].offsetTop)-h[0]*e(k[0]/p[0],p[0]),Math.abs(_[0].offsetLeft)-h[1]*e(k[1]/p[1],p[1])];f="yx"===y.axis?[B[0],B[1]]:"x"===y.axis?[null,B[1]]:[B[0],null],m=[4*k[0]+y.scrollInertia,4*k[1]+y.scrollInertia];var E=parseInt(y.contentTouchScroll)||0;f[0]=k[0]>E?f[0]:0,f[1]=k[1]>E?f[1]:0,v.overflowed[0]&&i(f[0],m[0],g,"y",T,!1),v.overflowed[1]&&i(f[1],m[1],g,"x",T,!1)}}})},L=function(){function n(){return e.getSelection?e.getSelection().toString():i.selection&&"Control"!=i.selection.type?i.selection.createRange().text:0}function a(t,e,i){u.type=i&&s?"stepped":"stepless",u.scrollAmount=10,W(r,t,e,"mcsLinearOut",i?60:null)}var s,r=t(this),l=r.data(o),c=l.opt,u=l.sequential,h=o+"_"+l.idx,p=t("#mCSB_"+l.idx+"_container"),f=p.parent();p.bind("mousedown."+h,function(t){s||(s=1,d=!0)}).add(i).bind("mousemove."+h,function(t){if(s&&n()){var e=p.offset(),i=P(t)[0]-e.top+p[0].offsetTop,o=P(t)[1]-e.left+p[0].offsetLeft;i>0&&i<f.height()&&o>0&&o<f.width()?u.step&&a("off",null,"stepped"):("x"!==c.axis&&l.overflowed[0]&&(0>i?a("on",38):i>f.height()&&a("on",40)),"y"!==c.axis&&l.overflowed[1]&&(0>o?a("on",37):o>f.width()&&a("on",39)))}}).bind("mouseup."+h,function(t){s&&(s=0,a("off",null)), d=!1})},j=function(){function e(t){var e=null;try{var i=t.contentDocument||t.contentWindow.document;e=i.body.innerHTML}catch(n){}return null!==e}var i=t(this),n=i.data(o);if(n){var a=n.opt,s=o+"_"+n.idx,r=t("#mCSB_"+n.idx),l=[t("#mCSB_"+n.idx+"_dragger_vertical"),t("#mCSB_"+n.idx+"_dragger_horizontal")],d=t("#mCSB_"+n.idx+"_container").find("iframe"),u=r;d.length&&d.each(function(){var i=this;e(i)&&(u=u.add(t(i).contents().find("body")))}),u.bind("mousewheel."+s,function(e,o){if(X(i),!R(i,e.target)){var s="auto"!==a.mouseWheel.deltaFactor?parseInt(a.mouseWheel.deltaFactor):c&&e.deltaFactor<100?100:e.deltaFactor||100;if("x"===a.axis||"x"===a.mouseWheel.axis)var d="x",u=[Math.round(s*n.scrollRatio.x),parseInt(a.mouseWheel.scrollAmount)],h="auto"!==a.mouseWheel.scrollAmount?u[1]:u[0]>=r.width()?.9*r.width():u[0],p=Math.abs(t("#mCSB_"+n.idx+"_container")[0].offsetLeft),f=l[1][0].offsetLeft,m=l[1].parent().width()-l[1].width(),g=e.deltaX||e.deltaY||o;else var d="y",u=[Math.round(s*n.scrollRatio.y),parseInt(a.mouseWheel.scrollAmount)],h="auto"!==a.mouseWheel.scrollAmount?u[1]:u[0]>=r.height()?.9*r.height():u[0],p=Math.abs(t("#mCSB_"+n.idx+"_container")[0].offsetTop),f=l[0][0].offsetTop,m=l[0].parent().height()-l[0].height(),g=e.deltaY||o;"y"===d&&!n.overflowed[0]||"x"===d&&!n.overflowed[1]||(a.mouseWheel.invert&&(g=-g),a.mouseWheel.normalizeDelta&&(g=0>g?-1:1),(g>0&&0!==f||0>g&&f!==m||a.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),Y(i,(p-g*h).toString(),{dir:d}))}})}},R=function(e,i){var n=i.nodeName.toLowerCase(),a=e.data(o).opt.mouseWheel.disableOver,s=["select","textarea"];return t.inArray(n,a)>-1&&!(t.inArray(n,s)>-1&&!t(i).is(":focus"))},D=function(){var e=t(this),i=e.data(o),n=o+"_"+i.idx,a=t("#mCSB_"+i.idx+"_container"),s=a.parent(),r=t(".mCSB_"+i.idx+"_scrollbar ."+u[12]);r.bind("touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,function(t){d=!0}).bind("touchend."+n+" pointerup."+n+" MSPointerUp."+n,function(t){d=!1}).bind("click."+n,function(n){if(t(n.target).hasClass(u[12])||t(n.target).hasClass("mCSB_draggerRail")){X(e);var o=t(this),r=o.find(".mCSB_dragger");if(o.parent(".mCSB_scrollTools_horizontal").length>0){if(!i.overflowed[1])return;var l="x",c=n.pageX>r.offset().left?-1:1,d=Math.abs(a[0].offsetLeft)-c*(.9*s.width())}else{if(!i.overflowed[0])return;var l="y",c=n.pageY>r.offset().top?-1:1,d=Math.abs(a[0].offsetTop)-c*(.9*s.height())}Y(e,d.toString(),{dir:l,scrollEasing:"mcsEaseInOut"})}})},$=function(){var e=t(this),n=e.data(o),a=n.opt,s=o+"_"+n.idx,r=t("#mCSB_"+n.idx+"_container"),l=r.parent();r.bind("focusin."+s,function(n){var o=t(i.activeElement),s=r.find(".mCustomScrollBox").length,c=0;o.is(a.advanced.autoScrollOnFocus)&&(X(e),clearTimeout(e[0]._focusTimeout),e[0]._focusTimer=s?(c+17)*s:0,e[0]._focusTimeout=setTimeout(function(){var t=[it(o)[0],it(o)[1]],i=[r[0].offsetTop,r[0].offsetLeft],n=[i[0]+t[0]>=0&&i[0]+t[0]<l.height()-o.outerHeight(!1),i[1]+t[1]>=0&&i[0]+t[1]<l.width()-o.outerWidth(!1)],s="yx"!==a.axis||n[0]||n[1]?"all":"none";"x"===a.axis||n[0]||Y(e,t[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:s,dur:c}),"y"===a.axis||n[1]||Y(e,t[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:s,dur:c})},e[0]._focusTimer))})},N=function(){var e=t(this),i=e.data(o),n=o+"_"+i.idx,a=t("#mCSB_"+i.idx+"_container").parent();a.bind("scroll."+n,function(e){(0!==a.scrollTop()||0!==a.scrollLeft())&&t(".mCSB_"+i.idx+"_scrollbar").css("visibility","hidden")})},z=function(){var e=t(this),i=e.data(o),n=i.opt,a=i.sequential,s=o+"_"+i.idx,r=".mCSB_"+i.idx+"_scrollbar",l=t(r+">a");l.bind("mousedown."+s+" touchstart."+s+" pointerdown."+s+" MSPointerDown."+s+" mouseup."+s+" touchend."+s+" pointerup."+s+" MSPointerUp."+s+" mouseout."+s+" pointerout."+s+" MSPointerOut."+s+" click."+s,function(o){function s(t,i){a.scrollAmount=n.snapAmount||n.scrollButtons.scrollAmount,W(e,t,i)}if(o.preventDefault(),J(o)){var r=t(this).attr("class");switch(a.type=n.scrollButtons.scrollType,o.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===a.type)return;d=!0,i.tweenRunning=!1,s("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===a.type)return;d=!1,a.dir&&s("off",r);break;case"click":if("stepped"!==a.type||i.tweenRunning)return;s("on",r)}}})},F=function(){var e=t(this),n=e.data(o),a=n.opt,s=n.sequential,r=o+"_"+n.idx,l=t("#mCSB_"+n.idx),c=t("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']";l.attr("tabindex","0").bind("blur."+r+" keydown."+r+" keyup."+r,function(o){function r(t,i){s.type=a.keyboard.scrollType,s.scrollAmount=a.snapAmount||a.keyboard.scrollAmount,"stepped"===s.type&&n.tweenRunning||W(e,t,i)}switch(o.type){case"blur":n.tweenRunning&&s.dir&&r("off",null);break;case"keydown":case"keyup":var l=o.keyCode?o.keyCode:o.which,h="on";if("x"!==a.axis&&(38===l||40===l)||"y"!==a.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===o.type&&(h="off"),t(i.activeElement).is(u)||(o.preventDefault(),o.stopImmediatePropagation(),r(h,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(o.preventDefault(),o.stopImmediatePropagation()),"keyup"===o.type){X(e);var p=34===l?-1:1;if("x"===a.axis||"yx"===a.axis&&n.overflowed[1]&&!n.overflowed[0])var f="x",m=Math.abs(c[0].offsetLeft)-p*(.9*d.width());else var f="y",m=Math.abs(c[0].offsetTop)-p*(.9*d.height());Y(e,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!t(i.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(o.preventDefault(),o.stopImmediatePropagation()),"keyup"===o.type)){if("x"===a.axis||"yx"===a.axis&&n.overflowed[1]&&!n.overflowed[0])var f="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var f="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;Y(e,m.toString(),{dir:f,scrollEasing:"mcsEaseInOut"})}}})},W=function(e,i,n,a,s){function r(t){var i="stepped"!==h.type,n=s?s:t?i?d.scrollInertia/1.5:d.scrollInertia:1e3/60,o=t?i?7.5:40:2.5,l=[Math.abs(p[0].offsetTop),Math.abs(p[0].offsetLeft)],u=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],f="x"===h.dir[0]?l[1]+h.dir[1]*(u[1]*o):l[0]+h.dir[1]*(u[0]*o),m="x"===h.dir[0]?l[1]+h.dir[1]*parseInt(h.scrollAmount):l[0]+h.dir[1]*parseInt(h.scrollAmount),g="auto"!==h.scrollAmount?m:f,v=a?a:t?i?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",y=t?!0:!1;return t&&17>n&&(g="x"===h.dir[0]?l[1]:l[0]),Y(e,g.toString(),{dir:h.dir[0],scrollEasing:v,dur:n,onComplete:y}),t?void(h.dir=!1):(clearTimeout(h.step),void(h.step=setTimeout(function(){r()},n)))}function l(){clearTimeout(h.step),Z(h,"step"),X(e)}var c=e.data(o),d=c.opt,h=c.sequential,p=t("#mCSB_"+c.idx+"_container"),f="stepped"===h.type?!0:!1;switch(i){case"on":if(h.dir=[n===u[16]||n===u[15]||39===n||37===n?"x":"y",n===u[13]||n===u[15]||38===n||37===n?-1:1],X(e),et(n)&&"stepped"===h.type)return;r(f);break;case"off":l(),(f||c.tweenRunning&&h.dir)&&r(!0)}},H=function(e){var i=t(this).data(o).opt,n=[];return"function"==typeof e&&(e=e()),e instanceof Array?n=e.length>1?[e[0],e[1]]:"x"===i.axis?[null,e[0]]:[e[0],null]:(n[0]=e.y?e.y:e.x||"x"===i.axis?null:e,n[1]=e.x?e.x:e.y||"y"===i.axis?null:e),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},q=function(e,i){if(null!=e&&"undefined"!=typeof e){var n=t(this),a=n.data(o),s=a.opt,r=t("#mCSB_"+a.idx+"_container"),l=r.parent(),c=typeof e;i||(i="x"===s.axis?"x":"y");var d="x"===i?r.outerWidth(!1):r.outerHeight(!1),u="x"===i?r[0].offsetLeft:r[0].offsetTop,p="x"===i?"left":"top";switch(c){case"function":return e();case"object":var f=e.jquery?e:t(e);if(!f.length)return;return"x"===i?it(f)[1]:it(f)[0];case"string":case"number":if(et(e))return Math.abs(e);if(-1!==e.indexOf("%"))return Math.abs(d*parseInt(e)/100);if(-1!==e.indexOf("-="))return Math.abs(u-parseInt(e.split("-=")[1]));if(-1!==e.indexOf("+=")){var m=u+parseInt(e.split("+=")[1]);return m>=0?0:Math.abs(m)}if(-1!==e.indexOf("px")&&et(e.split("px")[0]))return Math.abs(e.split("px")[0]);if("top"===e||"left"===e)return 0;if("bottom"===e)return Math.abs(l.height()-r.outerHeight(!1));if("right"===e)return Math.abs(l.width()-r.outerWidth(!1));if("first"===e||"last"===e){var f=r.find(":"+e);return"x"===i?it(f)[1]:it(f)[0]}return t(e).length?"x"===i?it(t(e))[1]:it(t(e))[0]:(r.css(p,e),void h.update.call(null,n[0]))}}},U=function(e){function i(){clearTimeout(p[0].autoUpdate),p[0].autoUpdate=setTimeout(function(){return d.advanced.updateOnSelectorChange&&(f=s(),f!==x)?(r(3),void(x=f)):(d.advanced.updateOnContentResize&&(m=[p.outerHeight(!1),p.outerWidth(!1),v.height(),v.width(),b()[0],b()[1]],(m[0]!==_[0]||m[1]!==_[1]||m[2]!==_[2]||m[3]!==_[3]||m[4]!==_[4]||m[5]!==_[5])&&(r(m[0]!==_[0]||m[1]!==_[1]),_=m)),d.advanced.updateOnImageLoad&&(g=n(),g!==w&&(p.find("img").each(function(){a(this)}),w=g)),void((d.advanced.updateOnSelectorChange||d.advanced.updateOnContentResize||d.advanced.updateOnImageLoad)&&i()))},60)}function n(){var t=0;return d.advanced.updateOnImageLoad&&(t=p.find("img").length),t}function a(e){function i(t,e){return function(){return e.apply(t,arguments)}}function n(){this.onload=null,t(e).addClass(u[2]),r(2)}if(t(e).hasClass(u[2]))return void r();var o=new Image;o.onload=i(o,n),o.src=e.src}function s(){d.advanced.updateOnSelectorChange===!0&&(d.advanced.updateOnSelectorChange="*");var e=0,i=p.find(d.advanced.updateOnSelectorChange);return d.advanced.updateOnSelectorChange&&i.length>0&&i.each(function(){e+=t(this).height()+t(this).width()}),e}function r(t){clearTimeout(p[0].autoUpdate),h.update.call(null,l[0],t)}var l=t(this),c=l.data(o),d=c.opt,p=t("#mCSB_"+c.idx+"_container");if(e)return clearTimeout(p[0].autoUpdate),void Z(p[0],"autoUpdate");var f,m,g,v=p.parent(),y=[t("#mCSB_"+c.idx+"_scrollbar_vertical"),t("#mCSB_"+c.idx+"_scrollbar_horizontal")],b=function(){return[y[0].is(":visible")?y[0].outerHeight(!0):0,y[1].is(":visible")?y[1].outerWidth(!0):0]},x=s(),_=[p.outerHeight(!1),p.outerWidth(!1),v.height(),v.width(),b()[0],b()[1]],w=n();i()},V=function(t,e,i){return Math.round(t/e)*e-i},X=function(e){var i=e.data(o),n=t("#mCSB_"+i.idx+"_container,#mCSB_"+i.idx+"_container_wrapper,#mCSB_"+i.idx+"_dragger_vertical,#mCSB_"+i.idx+"_dragger_horizontal");n.each(function(){Q.call(this)})},Y=function(e,i,n){function a(t){return l&&c.callbacks[t]&&"function"==typeof c.callbacks[t]}function s(){return[c.callbacks.alwaysTriggerOffsets||b>=x[0]+w,c.callbacks.alwaysTriggerOffsets||-C>=b]}function r(){var t=[p[0].offsetTop,p[0].offsetLeft],i=[v[0].offsetTop,v[0].offsetLeft],o=[p.outerHeight(!1),p.outerWidth(!1)],a=[h.height(),h.width()];e[0].mcs={content:p,top:t[0],left:t[1],draggerTop:i[0],draggerLeft:i[1],topPct:Math.round(100*Math.abs(t[0])/(Math.abs(o[0])-a[0])),leftPct:Math.round(100*Math.abs(t[1])/(Math.abs(o[1])-a[1])),direction:n.dir}}var l=e.data(o),c=l.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=t.extend(d,n),u=[n.dur,n.drag?0:n.dur],h=t("#mCSB_"+l.idx),p=t("#mCSB_"+l.idx+"_container"),f=p.parent(),m=c.callbacks.onTotalScrollOffset?H.call(e,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?H.call(e,c.callbacks.onTotalScrollBackOffset):[0,0];if(l.trigger=n.trigger,(0!==f.scrollTop()||0!==f.scrollLeft())&&(t(".mCSB_"+l.idx+"_scrollbar").css("visibility","visible"),f.scrollTop(0).scrollLeft(0)),"_resetY"!==i||l.contentReset.y||(a("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(e[0]),l.contentReset.y=1),"_resetX"!==i||l.contentReset.x||(a("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(e[0]),l.contentReset.x=1),"_resetY"!==i&&"_resetX"!==i){switch(!l.contentReset.y&&e[0].mcs||!l.overflowed[0]||(a("onOverflowY")&&c.callbacks.onOverflowY.call(e[0]),l.contentReset.x=null),!l.contentReset.x&&e[0].mcs||!l.overflowed[1]||(a("onOverflowX")&&c.callbacks.onOverflowX.call(e[0]),l.contentReset.x=null),c.snapAmount&&(i=V(i,c.snapAmount,c.snapOffset)),n.dir){case"x":var v=t("#mCSB_"+l.idx+"_dragger_horizontal"),y="left",b=p[0].offsetLeft,x=[h.width()-p.outerWidth(!1),v.parent().width()-v.width()],_=[i,0===i?0:i/l.scrollRatio.x],w=m[1],C=g[1],S=w>0?w/l.scrollRatio.x:0,T=C>0?C/l.scrollRatio.x:0;break;case"y":var v=t("#mCSB_"+l.idx+"_dragger_vertical"),y="top",b=p[0].offsetTop,x=[h.height()-p.outerHeight(!1),v.parent().height()-v.height()],_=[i,0===i?0:i/l.scrollRatio.y],w=m[0],C=g[0],S=w>0?w/l.scrollRatio.y:0,T=C>0?C/l.scrollRatio.y:0}_[1]<0||0===_[0]&&0===_[1]?_=[0,0]:_[1]>=x[1]?_=[x[0],x[1]]:_[0]=-_[0],e[0].mcs||(r(),a("onInit")&&c.callbacks.onInit.call(e[0])),clearTimeout(p[0].onCompleteTimeout),(l.tweenRunning||!(0===b&&_[0]>=0||b===x[0]&&_[0]<=x[0]))&&(G(v[0],y,Math.round(_[1]),u[1],n.scrollEasing),G(p[0],y,Math.round(_[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!l.tweenRunning&&(a("onScrollStart")&&(r(),c.callbacks.onScrollStart.call(e[0])),l.tweenRunning=!0,k(v),l.cbOffsets=s())},onUpdate:function(){n.callbacks&&n.onUpdate&&a("whileScrolling")&&(r(),c.callbacks.whileScrolling.call(e[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(p[0].onCompleteTimeout);var t=p[0].idleTimer||0;p[0].onCompleteTimeout=setTimeout(function(){a("onScroll")&&(r(),c.callbacks.onScroll.call(e[0])),a("onTotalScroll")&&_[1]>=x[1]-S&&l.cbOffsets[0]&&(r(),c.callbacks.onTotalScroll.call(e[0])),a("onTotalScrollBack")&&_[1]<=T&&l.cbOffsets[1]&&(r(),c.callbacks.onTotalScrollBack.call(e[0])),l.tweenRunning=!1,p[0].idleTimer=0,k(v,"hide")},t)}}}))}},G=function(t,i,n,o,a,s,r){function l(){w.stop||(b||m.call(),b=K()-y,c(),b>=w.time&&(w.time=b>w.time?b+p-(b-w.time):b+p-1,w.time<b+1&&(w.time=b+1)),w.time<o?w.id=f(l):v.call())}function c(){o>0?(w.currVal=h(w.time,x,C,o,a),_[i]=Math.round(w.currVal)+"px"):_[i]=n+"px",g.call()}function d(){p=1e3/60,w.time=b+p,f=e.requestAnimationFrame?e.requestAnimationFrame:function(t){return c(),setTimeout(t,.01)},w.id=f(l)}function u(){null!=w.id&&(e.requestAnimationFrame?e.cancelAnimationFrame(w.id):clearTimeout(w.id),w.id=null)}function h(t,e,i,n,o){switch(o){case"linear":case"mcsLinear":return i*t/n+e;case"mcsLinearOut":return t/=n,t--,i*Math.sqrt(1-t*t)+e;case"easeInOutSmooth":return t/=n/2,1>t?i/2*t*t+e:(t--,-i/2*(t*(t-2)-1)+e);case"easeInOutStrong":return t/=n/2,1>t?i/2*Math.pow(2,10*(t-1))+e:(t--,i/2*(-Math.pow(2,-10*t)+2)+e);case"easeInOut":case"mcsEaseInOut":return t/=n/2,1>t?i/2*t*t*t+e:(t-=2,i/2*(t*t*t+2)+e);case"easeOutSmooth":return t/=n,t--,-i*(t*t*t*t-1)+e;case"easeOutStrong":return i*(-Math.pow(2,-10*t/n)+1)+e;case"easeOut":case"mcsEaseOut":default:var a=(t/=n)*t,s=a*t;return e+i*(.499999999999997*s*a+-2.5*a*a+5.5*s+-6.5*a+4*t)}}t._mTween||(t._mTween={top:{},left:{}});var p,f,r=r||{},m=r.onStart||function(){},g=r.onUpdate||function(){},v=r.onComplete||function(){},y=K(),b=0,x=t.offsetTop,_=t.style,w=t._mTween[i];"left"===i&&(x=t.offsetLeft);var C=n-x;w.stop=0,"none"!==s&&u(),d()},K=function(){return e.performance&&e.performance.now?e.performance.now():e.performance&&e.performance.webkitNow?e.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Q=function(){var t=this;t._mTween||(t._mTween={top:{},left:{}});for(var i=["top","left"],n=0;n<i.length;n++){var o=i[n];t._mTween[o].id&&(e.requestAnimationFrame?e.cancelAnimationFrame(t._mTween[o].id):clearTimeout(t._mTween[o].id),t._mTween[o].id=null,t._mTween[o].stop=1)}},Z=function(t,e){try{delete t[e]}catch(i){t[e]=null}},J=function(t){return!(t.which&&1!==t.which)},tt=function(t){var e=t.originalEvent.pointerType;return!(e&&"touch"!==e&&2!==e)},et=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},it=function(t){var e=t.parents(".mCSB_container");return[t.offset().top-e.offset().top,t.offset().left-e.offset().left]};t.fn[n]=function(e){return h[e]?h[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):h.init.apply(this,arguments)},t[n]=function(e){return h[e]?h[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):h.init.apply(this,arguments)},t[n].defaults=s,e[n]=!0,t(e).load(function(){t(a)[n](),t.extend(t.expr[":"],{mcsInView:t.expr[":"].mcsInView||function(e){var i,n,o=t(e),a=o.parents(".mCSB_container");if(a.length)return i=a.parent(),n=[a[0].offsetTop,a[0].offsetLeft],n[0]+it(o)[0]>=0&&n[0]+it(o)[0]<i.height()-o.outerHeight(!1)&&n[1]+it(o)[1]>=0&&n[1]+it(o)[1]<i.width()-o.outerWidth(!1)},mcsOverflow:t.expr[":"].mcsOverflow||function(e){var i=t(e).data(o);if(i)return i.overflowed[0]||i.overflowed[1]}})})})}(jQuery,window,document),function(t){function e(e,i,n){var o="rgb"+(t.support.rgba?"a":"")+"("+parseInt(e[0]+n*(i[0]-e[0]),10)+","+parseInt(e[1]+n*(i[1]-e[1]),10)+","+parseInt(e[2]+n*(i[2]-e[2]),10);return t.support.rgba&&(o+=","+(e&&i?parseFloat(e[3]+n*(i[3]-e[3])):1)),o+")"}function i(t){var e;return(e=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(t))?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),1]:(e=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(t))?[17*parseInt(e[1],16),17*parseInt(e[2],16),17*parseInt(e[3],16),1]:(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),1]:(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(t))?[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4])]:o[t]}t.extend(!0,t,{support:{rgba:function(){var e=t("script:first"),i=e.css("color"),n=!1;if(/^rgba/.test(i))n=!0;else try{n=i!=e.css("color","rgba(0, 0, 0, 0.5)").css("color"),e.css("color",i)}catch(o){}return n}()}});var n="color backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor outlineColor".split(" ");t.each(n,function(n,o){t.Tween.propHooks[o]={get:function(e){return t(e.elem).css(o)},set:function(n){var a=n.elem.style,s=i(t(n.elem).css(o)),r=i(n.end);n.run=function(t){a[o]=e(s,r,t)}}}}),t.Tween.propHooks.borderColor={set:function(o){var a=o.elem.style,s=[],r=n.slice(2,6);t.each(r,function(e,n){s[n]=i(t(o.elem).css(n))});var l=i(o.end);o.run=function(i){t.each(r,function(t,n){a[n]=e(s[n],l,i)})}}};var o={aqua:[0,255,255,1],azure:[240,255,255,1],beige:[245,245,220,1],black:[0,0,0,1],blue:[0,0,255,1],brown:[165,42,42,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgrey:[169,169,169,1],darkgreen:[0,100,0,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkviolet:[148,0,211,1],fuchsia:[255,0,255,1],gold:[255,215,0,1],green:[0,128,0,1],indigo:[75,0,130,1],khaki:[240,230,140,1],lightblue:[173,216,230,1],lightcyan:[224,255,255,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],magenta:[255,0,255,1],maroon:[128,0,0,1],navy:[0,0,128,1],olive:[128,128,0,1],orange:[255,165,0,1],pink:[255,192,203,1],purple:[128,0,128,1],violet:[128,0,128,1],red:[255,0,0,1],silver:[192,192,192,1],white:[255,255,255,1],yellow:[255,255,0,1],transparent:[255,255,255,0]}}(jQuery);