function onYouTubePlayerAPIReady(){if(ytp.YTAPIReady)return;ytp.YTAPIReady=true;jQuery(document).trigger("YTAPIReady")}function register(e){$.ajax({type:e.attr("method"),url:e.attr("action"),data:e.serialize(),cache:false,dataType:"json",contentType:"application/json; charset=utf-8",error:function(e){$(".Notfication").show(200);$(".Notfication").addClass("error-box").find("p").html("Could not connect to server. Please try again later.")},success:function(e){if(e.result!="success"){var t=e.msg.substring(4);$(".Notfication").show(200);$(".Notfication").addClass("error-box").find("p").html(t)}else{$(".Notfication").show(200);$(".Notfication").addClass("success-box").find("p").html("please click the link in the email we just sent you")}setTimeout("$('.Notfication').fadeOut(500);",5e3)}})}(function(e){var t=function(e){return e.split("").reverse().join("")},n={numberStep:function(t,n){var r=Math.floor(t);e(n.elem).text(r)}},r=function(e){var t=e.elem;t.nodeType&&t.parentNode&&(t=t._animateNumberSetter,t||(t=n.numberStep),t(e.now,e))};e.Tween&&e.Tween.propHooks?e.Tween.propHooks.number={set:r}:e.fx.step.number=r;e.animateNumber={numberStepFactories:{append:function(t){return function(n,r){var i=Math.floor(n);e(r.elem).prop("number",n).text(i+t)}},separator:function(n,r){n=n||" ";r=r||3;return function(i,s){var o=Math.floor(i).toString(),u=e(s.elem);if(o.length>r){for(var f=o,l=r,c=f.split("").reverse(),o=[],h,v,m,g=0,y=Math.ceil(f.length/l);g<y;g++){h="";for(m=0;m<l;m++){v=g*l+m;if(v===f.length)break;h+=c[v]}o.push(h)}f=o.length-1;l=t(o[f]);o[f]=t(parseInt(l,10).toString());o=o.join(n);o=t(o)}u.prop("number",i).text(o)}}}};e.fn.animateNumber=function(){for(var t=arguments[0],r=e.extend({},n,t),i=e(this),s=[r],o=1,u=arguments.length;o<u;o++)s.push(arguments[o]);if(t.numberStep){var a=this.each(function(){this._animateNumberSetter=t.numberStep}),f=r.complete;r.complete=function(){a.each(function(){delete this._animateNumberSetter});f&&f.apply(this,arguments)}}return i.animate.apply(i,s)}})(jQuery);!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";function t(e){if(e instanceof Date)return e;if(String(e).match(u))return String(e).match(/^[0-9]*$/)&&(e=Number(e)),String(e).match(/\-/)&&(e=String(e).replace(/\-/g,"/")),new Date(e);throw new Error("Couldn't cast `"+e+"` to a date object.")}function n(e){var t=e.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(t)}function r(e){return function(t){var r=t.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(r)for(var s=0,o=r.length;o>s;++s){var u=r[s].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),f=n(u[0]),l=u[1]||"",h=u[3]||"",p=null;u=u[2],a.hasOwnProperty(u)&&(p=a[u],p=Number(e[p])),null!==p&&("!"===l&&(p=i(h,p)),""===l&&10>p&&(p="0"+p.toString()),t=t.replace(f,p.toString()))}return t=t.replace(/%%/,"%")}}function i(e,t){var n="s",r="";return e&&(e=e.replace(/(:|;|\s)/gi,"").split(/\,/),1===e.length?n=e[0]:(r=e[0],n=e[1])),1===Math.abs(t)?r:n}var s=100,o=[],u=[];u.push(/^[0-9]*$/.source),u.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),u.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),u=new RegExp(u.join("|"));var a={Y:"years",m:"months",w:"weeks",d:"days",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},f=function(t,n,r){this.el=t,this.$el=e(t),this.interval=null,this.offset={},this.instanceNumber=o.length,o.push(this),this.$el.data("countdown-instance",this.instanceNumber),r&&(this.$el.on("update.countdown",r),this.$el.on("stoped.countdown",r),this.$el.on("finish.countdown",r)),this.setFinalDate(n),this.start()};e.extend(f.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var e=this;this.update(),this.interval=setInterval(function(){e.update.call(e)},s)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),o[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(e){this.finalDate=t(e)},update:function(){return 0===this.$el.closest("html").length?void this.remove():(this.totalSecsLeft=this.finalDate.getTime()-(new Date).getTime(),this.totalSecsLeft=Math.ceil(this.totalSecsLeft/1e3),this.totalSecsLeft=this.totalSecsLeft<0?0:this.totalSecsLeft,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30),years:Math.floor(this.totalSecsLeft/60/60/24/365)},void (0===this.totalSecsLeft?(this.stop(),this.dispatchEvent("finish")):this.dispatchEvent("update")))},dispatchEvent:function(t){var n=e.Event(t+".countdown");n.finalDate=this.finalDate,n.offset=e.extend({},this.offset),n.strftime=r(this.offset),this.$el.trigger(n)}}),e.fn.countdown=function(){var t=Array.prototype.slice.call(arguments,0);return this.each(function(){var n=e(this).data("countdown-instance");if(void 0!==n){var r=o[n],i=t[0];f.prototype.hasOwnProperty(i)?r[i].apply(r,t.slice(1)):null===String(i).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(r.setFinalDate.call(r,i),r.start()):e.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,i))}else new f(this,t[0],t[1])})}});!function(e,t){"object"==typeof exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){var t=function(e,t){var n,r=document.createElement("canvas");e.appendChild(r),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(r);var i=r.getContext("2d");r.width=r.height=t.size;var s=1;window.devicePixelRatio>1&&(s=window.devicePixelRatio,r.style.width=r.style.height=[t.size,"px"].join(""),r.width=r.height=t.size*s,i.scale(s,s)),i.translate(t.size/2,t.size/2),i.rotate((-.5+t.rotate/180)*Math.PI);var o=(t.size-t.lineWidth)/2;t.scaleColor&&t.scaleLength&&(o-=t.scaleLength+2),Date.now=Date.now||function(){return+(new Date)};var u=function(e,t,n){n=Math.min(Math.max(-1,n||0),1);var r=0>=n?!0:!1;i.beginPath(),i.arc(0,0,o,0,2*Math.PI*n,r),i.strokeStyle=e,i.lineWidth=t,i.stroke()},a=function(){var e,n;i.lineWidth=1,i.fillStyle=t.scaleColor,i.save();for(var r=24;r>0;--r)r%6===0?(n=t.scaleLength,e=0):(n=.6*t.scaleLength,e=t.scaleLength-n),i.fillRect(-t.size/2+e,0,n,1),i.rotate(Math.PI/12);i.restore()},f=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}(),l=function(){t.scaleColor&&a(),t.trackColor&&u(t.trackColor,t.lineWidth,1)};this.getCanvas=function(){return r},this.getCtx=function(){return i},this.clear=function(){i.clearRect(t.size/-2,t.size/-2,t.size,t.size)},this.draw=function(e){t.scaleColor||t.trackColor?i.getImageData&&i.putImageData?n?i.putImageData(n,0,0):(l(),n=i.getImageData(0,0,t.size*s,t.size*s)):(this.clear(),l()):this.clear(),i.lineCap=t.lineCap;var r;r="function"==typeof t.barColor?t.barColor(e):t.barColor,u(r,t.lineWidth,e/100)}.bind(this),this.animate=function(e,n){var r=Date.now();t.onStart(e,n);var i=function(){var s=Math.min(Date.now()-r,t.animate.duration),o=t.easing(this,s,e,n-e,t.animate.duration);this.draw(o),t.onStep(e,n,o),s>=t.animate.duration?t.onStop(e,n):f(i)}.bind(this);f(i)}.bind(this)},n=function(e,n){var r={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(e,t,n,r,i){return t/=i/2,1>t?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof t)r.renderer=t;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");r.renderer=SVGRenderer}var i={},s=0,o=function(){this.el=e,this.options=i;for(var t in r)r.hasOwnProperty(t)&&(i[t]=n&&"undefined"!=typeof n[t]?n[t]:r[t],"function"==typeof i[t]&&(i[t]=i[t].bind(this)));i.easing="string"==typeof i.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[i.easing])?jQuery.easing[i.easing]:r.easing,"number"==typeof i.animate&&(i.animate={duration:i.animate,enabled:!0}),"boolean"!=typeof i.animate||i.animate||(i.animate={duration:1e3,enabled:i.animate}),this.renderer=new i.renderer(e,i),this.renderer.draw(s),e.dataset&&e.dataset.percent?this.update(parseFloat(e.dataset.percent)):e.getAttribute&&e.getAttribute("data-percent")&&this.update(parseFloat(e.getAttribute("data-percent")))}.bind(this);this.update=function(e){return e=parseFloat(e),i.animate.enabled?this.renderer.animate(s,e):this.renderer.draw(e),s=e,this}.bind(this),this.disableAnimation=function(){return i.animate.enabled=!1,this},this.enableAnimation=function(){return i.animate.enabled=!0,this},o()};e.fn.easyPieChart=function(t){return this.each(function(){var r;e.data(this,"easyPieChart")||(r=e.extend({},t,e(this).data()),e.data(this,"easyPieChart",new n(this,r)))})}});"function"!==typeof Object.create&&(Object.create=function(e){function t(){}t.prototype=e;return new t});(function(e,t,n,r){var i={init:function(t,n){var r=this;r.elem=n;r.$elem=e(n);r.imageSrc=r.$elem.data("zoom-image")?r.$elem.data("zoom-image"):r.$elem.attr("src");r.options=e.extend({},e.fn.elevateZoom.options,t);r.options.tint&&(r.options.lensColour="none",r.options.lensOpacity="1");"inner"==r.options.zoomType&&(r.options.showLens=!1);r.$elem.parent().removeAttr("title").removeAttr("alt");r.zoomImage=r.imageSrc;r.refresh(1);e("#"+r.options.gallery+" a").click(function(t){r.options.galleryActiveClass&&(e("#"+r.options.gallery+" a").removeClass(r.options.galleryActiveClass),e(this).addClass(r.options.galleryActiveClass));t.preventDefault();e(this).data("zoom-image")?r.zoomImagePre=e(this).data("zoom-image"):r.zoomImagePre=e(this).data("image");r.swaptheimage(e(this).data("image"),r.zoomImagePre);return!1})},refresh:function(e){var t=this;setTimeout(function(){t.fetch(t.imageSrc)},e||t.options.refresh)},fetch:function(e){var t=this,n=new Image;n.onload=function(){t.largeWidth=n.width;t.largeHeight=n.height;t.startZoom();t.currentImage=t.imageSrc;t.options.onZoomedImageLoaded(t.$elem)};n.src=e},startZoom:function(){var t=this;t.nzWidth=t.$elem.width();t.nzHeight=t.$elem.height();t.isWindowActive=!1;t.isLensActive=!1;t.isTintActive=!1;t.overWindow=!1;t.options.imageCrossfade&&(t.zoomWrap=t.$elem.wrap('<div style="height:'+t.nzHeight+"px;width:"+t.nzWidth+'px;" class="zoomWrapper" />'),t.$elem.css("position","absolute"));t.zoomLock=1;t.scrollingLock=!1;t.changeBgSize=!1;t.currentZoomLevel=t.options.zoomLevel;t.nzOffset=t.$elem.offset();t.widthRatio=t.largeWidth/t.currentZoomLevel/t.nzWidth;t.heightRatio=t.largeHeight/t.currentZoomLevel/t.nzHeight;"window"==t.options.zoomType&&(t.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(t.options.zoomWindowBgColour)+";width: "+String(t.options.zoomWindowWidth)+"px;height: "+String(t.options.zoomWindowHeight)+"px;float: left;background-size: "+t.largeWidth/t.currentZoomLevel+"px "+t.largeHeight/t.currentZoomLevel+"px;display: none;z-index:100;border: "+String(t.options.borderSize)+"px solid "+t.options.borderColour+";background-repeat: no-repeat;position: absolute;");if("inner"==t.options.zoomType){var n=t.$elem.css("border-left-width");t.zoomWindowStyle="overflow: hidden;margin-left: "+String(n)+";margin-top: "+String(n)+";background-position: 0px 0px;width: "+String(t.nzWidth)+"px;height: "+String(t.nzHeight)+"px;float: left;display: none;cursor:"+t.options.cursor+";px solid "+t.options.borderColour+";background-repeat: no-repeat;position: absolute;"}"window"==t.options.zoomType&&(lensHeight=t.nzHeight<t.options.zoomWindowWidth/t.widthRatio?t.nzHeight:String(t.options.zoomWindowHeight/t.heightRatio),lensWidth=t.largeWidth<t.options.zoomWindowWidth?t.nzWidth:t.options.zoomWindowWidth/t.widthRatio,t.lensStyle="background-position: 0px 0px;width: "+String(t.options.zoomWindowWidth/t.widthRatio)+"px;height: "+String(t.options.zoomWindowHeight/t.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+t.options.lensOpacity+";filter: alpha(opacity = "+100*t.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+t.options.lensColour+";cursor:"+t.options.cursor+";border: "+t.options.lensBorderSize+"px solid "+t.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;");t.tintStyle="display: block;position: absolute;background-color: "+t.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+t.nzWidth+"px;height: "+t.nzHeight+"px;";t.lensRound="";"lens"==t.options.zoomType&&(t.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(t.options.borderSize)+"px solid "+t.options.borderColour+";width:"+String(t.options.lensSize)+"px;height:"+String(t.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;");"round"==t.options.lensShape&&(t.lensRound="border-top-left-radius: "+String(t.options.lensSize/2+t.options.borderSize)+"px;border-top-right-radius: "+String(t.options.lensSize/2+t.options.borderSize)+"px;border-bottom-left-radius: "+String(t.options.lensSize/2+t.options.borderSize)+"px;border-bottom-right-radius: "+String(t.options.lensSize/2+t.options.borderSize)+"px;");t.zoomContainer=e('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+t.nzOffset.left+"px;top:"+t.nzOffset.top+"px;height:"+t.nzHeight+"px;width:"+t.nzWidth+'px;"></div>');e("body").append(t.zoomContainer);t.options.containLensZoom&&"lens"==t.options.zoomType&&t.zoomContainer.css("overflow","hidden");"inner"!=t.options.zoomType&&(t.zoomLens=e("<div class='zoomLens' style='"+t.lensStyle+t.lensRound+"'>&nbsp;</div>").appendTo(t.zoomContainer).click(function(){t.$elem.trigger("click")}),t.options.tint&&(t.tintContainer=e("<div/>").addClass("tintContainer"),t.zoomTint=e("<div class='zoomTint' style='"+t.tintStyle+"'></div>"),t.zoomLens.wrap(t.tintContainer),t.zoomTintcss=t.zoomLens.after(t.zoomTint),t.zoomTintImage=e('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+t.nzWidth+"px; height: "+t.nzHeight+'px;" src="'+t.imageSrc+'">').appendTo(t.zoomLens).click(function(){t.$elem.trigger("click")})));isNaN(t.options.zoomWindowPosition)?t.zoomWindow=e("<div style='z-index:999;left:"+t.windowOffsetLeft+"px;top:"+t.windowOffsetTop+"px;"+t.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo("body").click(function(){t.$elem.trigger("click")}):t.zoomWindow=e("<div style='z-index:999;left:"+t.windowOffsetLeft+"px;top:"+t.windowOffsetTop+"px;"+t.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(t.zoomContainer).click(function(){t.$elem.trigger("click")});t.zoomWindowContainer=e("<div/>").addClass("zoomWindowContainer").css("width",t.options.zoomWindowWidth);t.zoomWindow.wrap(t.zoomWindowContainer);"lens"==t.options.zoomType&&t.zoomLens.css({backgroundImage:"url('"+t.imageSrc+"')"});"window"==t.options.zoomType&&t.zoomWindow.css({backgroundImage:"url('"+t.imageSrc+"')"});"inner"==t.options.zoomType&&t.zoomWindow.css({backgroundImage:"url('"+t.imageSrc+"')"});t.$elem.bind("touchmove",function(e){e.preventDefault();t.setPosition(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])});t.zoomContainer.bind("touchmove",function(e){"inner"==t.options.zoomType&&t.showHideWindow("show");e.preventDefault();t.setPosition(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])});t.zoomContainer.bind("touchend",function(e){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&"inner"!=t.options.zoomType&&t.showHideTint("hide")});t.$elem.bind("touchend",function(e){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&"inner"!=t.options.zoomType&&t.showHideTint("hide")});t.options.showLens&&(t.zoomLens.bind("touchmove",function(e){e.preventDefault();t.setPosition(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])}),t.zoomLens.bind("touchend",function(e){t.showHideWindow("hide");t.options.showLens&&t.showHideLens("hide");t.options.tint&&"inner"!=t.options.zoomType&&t.showHideTint("hide")}));t.$elem.bind("mousemove",function(e){!1==t.overWindow&&t.setElements("show");if(t.lastX!==e.clientX||t.lastY!==e.clientY)t.setPosition(e),t.currentLoc=e;t.lastX=e.clientX;t.lastY=e.clientY});t.zoomContainer.bind("mousemove",function(e){!1==t.overWindow&&t.setElements("show");if(t.lastX!==e.clientX||t.lastY!==e.clientY)t.setPosition(e),t.currentLoc=e;t.lastX=e.clientX;t.lastY=e.clientY});"inner"!=t.options.zoomType&&t.zoomLens.bind("mousemove",function(e){if(t.lastX!==e.clientX||t.lastY!==e.clientY)t.setPosition(e),t.currentLoc=e;t.lastX=e.clientX;t.lastY=e.clientY});t.options.tint&&"inner"!=t.options.zoomType&&t.zoomTint.bind("mousemove",function(e){if(t.lastX!==e.clientX||t.lastY!==e.clientY)t.setPosition(e),t.currentLoc=e;t.lastX=e.clientX;t.lastY=e.clientY});"inner"==t.options.zoomType&&t.zoomWindow.bind("mousemove",function(e){if(t.lastX!==e.clientX||t.lastY!==e.clientY)t.setPosition(e),t.currentLoc=e;t.lastX=e.clientX;t.lastY=e.clientY});t.zoomContainer.add(t.$elem).mouseenter(function(){!1==t.overWindow&&t.setElements("show")}).mouseleave(function(){t.scrollLock||t.setElements("hide")});"inner"!=t.options.zoomType&&t.zoomWindow.mouseenter(function(){t.overWindow=!0;t.setElements("hide")}).mouseleave(function(){t.overWindow=!1});t.minZoomLevel=t.options.minZoomLevel?t.options.minZoomLevel:2*t.options.scrollZoomIncrement;t.options.scrollZoom&&t.zoomContainer.add(t.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll",function(n){t.scrollLock=!0;clearTimeout(e.data(this,"timer"));e.data(this,"timer",setTimeout(function(){t.scrollLock=!1},250));var r=n.originalEvent.wheelDelta||-1*n.originalEvent.detail;n.stopImmediatePropagation();n.stopPropagation();n.preventDefault();0<r/120?t.currentZoomLevel>=t.minZoomLevel&&t.changeZoomLevel(t.currentZoomLevel-t.options.scrollZoomIncrement):t.options.maxZoomLevel?t.currentZoomLevel<=t.options.maxZoomLevel&&t.changeZoomLevel(parseFloat(t.currentZoomLevel)+t.options.scrollZoomIncrement):t.changeZoomLevel(parseFloat(t.currentZoomLevel)+t.options.scrollZoomIncrement);return!1})},setElements:function(e){if(!this.options.zoomEnabled)return!1;"show"==e&&this.isWindowSet&&("inner"==this.options.zoomType&&this.showHideWindow("show"),"window"==this.options.zoomType&&this.showHideWindow("show"),this.options.showLens&&this.showHideLens("show"),this.options.tint&&"inner"!=this.options.zoomType&&this.showHideTint("show"));"hide"==e&&("window"==this.options.zoomType&&this.showHideWindow("hide"),this.options.tint||this.showHideWindow("hide"),this.options.showLens&&this.showHideLens("hide"),this.options.tint&&this.showHideTint("hide"))},setPosition:function(e){if(!this.options.zoomEnabled)return!1;this.nzHeight=this.$elem.height();this.nzWidth=this.$elem.width();this.nzOffset=this.$elem.offset();this.options.tint&&"inner"!=this.options.zoomType&&(this.zoomTint.css({top:0}),this.zoomTint.css({left:0}));this.options.responsive&&!this.options.scrollZoom&&this.options.showLens&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.largeWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.widthRatio=this.largeWidth/this.nzWidth,this.heightRatio=this.largeHeight/this.nzHeight,"lens"!=this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight),this.options.tint&&(this.zoomTintImage.css("width",this.nzWidth),this.zoomTintImage.css("height",this.nzHeight))),"lens"==this.options.zoomType&&this.zoomLens.css({width:String(this.options.lensSize)+"px",height:String(this.options.lensSize)+"px"}));this.zoomContainer.css({top:this.nzOffset.top});this.zoomContainer.css({left:this.nzOffset.left});this.mouseLeft=parseInt(e.pageX-this.nzOffset.left);this.mouseTop=parseInt(e.pageY-this.nzOffset.top);"window"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.zoomLens.height()/2,this.Eboppos=this.mouseTop>this.nzHeight-this.zoomLens.height()/2-2*this.options.lensBorderSize,this.Eloppos=this.mouseLeft<0+this.zoomLens.width()/2,this.Eroppos=this.mouseLeft>this.nzWidth-this.zoomLens.width()/2-2*this.options.lensBorderSize);"inner"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.nzHeight/2/this.heightRatio,this.Eboppos=this.mouseTop>this.nzHeight-this.nzHeight/2/this.heightRatio,this.Eloppos=this.mouseLeft<0+this.nzWidth/2/this.widthRatio,this.Eroppos=this.mouseLeft>this.nzWidth-this.nzWidth/2/this.widthRatio-2*this.options.lensBorderSize);0>=this.mouseLeft||0>this.mouseTop||this.mouseLeft>this.nzWidth||this.mouseTop>this.nzHeight?this.setElements("hide"):(this.options.showLens&&(this.lensLeftPos=String(this.mouseLeft-this.zoomLens.width()/2),this.lensTopPos=String(this.mouseTop-this.zoomLens.height()/2)),this.Etoppos&&(this.lensTopPos=0),this.Eloppos&&(this.tintpos=this.lensLeftPos=this.windowLeftPos=0),"window"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize)),"inner"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.nzWidth-2*this.options.lensBorderSize)),"lens"==this.options.zoomType&&(this.windowLeftPos=String(-1*((e.pageX-this.nzOffset.left)*this.widthRatio-this.zoomLens.width()/2)),this.windowTopPos=String(-1*((e.pageY-this.nzOffset.top)*this.heightRatio-this.zoomLens.height()/2)),this.zoomLens.css({backgroundPosition:this.windowLeftPos+"px "+this.windowTopPos+"px"}),this.changeBgSize&&(this.nzHeight>this.nzWidth?("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"})):("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"})),this.changeBgSize=!1),this.setWindowPostition(e)),this.options.tint&&"inner"!=this.options.zoomType&&this.setTintPosition(e),"window"==this.options.zoomType&&this.setWindowPostition(e),"inner"==this.options.zoomType&&this.setWindowPostition(e),this.options.showLens&&(this.fullwidth&&"lens"!=this.options.zoomType&&(this.lensLeftPos=0),this.zoomLens.css({left:this.lensLeftPos+"px",top:this.lensTopPos+"px"})))},showHideWindow:function(e){"show"!=e||this.isWindowActive||(this.options.zoomWindowFadeIn?this.zoomWindow.stop(!0,!0,!1).fadeIn(this.options.zoomWindowFadeIn):this.zoomWindow.show(),this.isWindowActive=!0);"hide"==e&&this.isWindowActive&&(this.options.zoomWindowFadeOut?this.zoomWindow.stop(!0,!0).fadeOut(this.options.zoomWindowFadeOut):this.zoomWindow.hide(),this.isWindowActive=!1)},showHideLens:function(e){"show"!=e||this.isLensActive||(this.options.lensFadeIn?this.zoomLens.stop(!0,!0,!1).fadeIn(this.options.lensFadeIn):this.zoomLens.show(),this.isLensActive=!0);"hide"==e&&this.isLensActive&&(this.options.lensFadeOut?this.zoomLens.stop(!0,!0).fadeOut(this.options.lensFadeOut):this.zoomLens.hide(),this.isLensActive=!1)},showHideTint:function(e){"show"!=e||this.isTintActive||(this.options.zoomTintFadeIn?this.zoomTint.css({opacity:this.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(this.zoomTint.css({opacity:this.options.tintOpacity}).animate(),this.zoomTint.show()),this.isTintActive=!0);"hide"==e&&this.isTintActive&&(this.options.zoomTintFadeOut?this.zoomTint.stop(!0,!0).fadeOut(this.options.zoomTintFadeOut):this.zoomTint.hide(),this.isTintActive=!1)},setLensPostition:function(e){},setWindowPostition:function(t){var n=this;if(isNaN(n.options.zoomWindowPosition))n.externalContainer=e("#"+n.options.zoomWindowPosition),n.externalContainerWidth=n.externalContainer.width(),n.externalContainerHeight=n.externalContainer.height(),n.externalContainerOffset=n.externalContainer.offset(),n.windowOffsetTop=n.externalContainerOffset.top,n.windowOffsetLeft=n.externalContainerOffset.left;else switch(n.options.zoomWindowPosition){case 1:n.windowOffsetTop=n.options.zoomWindowOffety;n.windowOffsetLeft=+n.nzWidth;break;case 2:n.options.zoomWindowHeight>n.nzHeight&&(n.windowOffsetTop=-1*(n.options.zoomWindowHeight/2-n.nzHeight/2),n.windowOffsetLeft=n.nzWidth);break;case 3:n.windowOffsetTop=n.nzHeight-n.zoomWindow.height()-2*n.options.borderSize;n.windowOffsetLeft=n.nzWidth;break;case 4:n.windowOffsetTop=n.nzHeight;n.windowOffsetLeft=n.nzWidth;break;case 5:n.windowOffsetTop=n.nzHeight;n.windowOffsetLeft=n.nzWidth-n.zoomWindow.width()-2*n.options.borderSize;break;case 6:n.options.zoomWindowHeight>n.nzHeight&&(n.windowOffsetTop=n.nzHeight,n.windowOffsetLeft=-1*(n.options.zoomWindowWidth/2-n.nzWidth/2+2*n.options.borderSize));break;case 7:n.windowOffsetTop=n.nzHeight;n.windowOffsetLeft=0;break;case 8:n.windowOffsetTop=n.nzHeight;n.windowOffsetLeft=-1*(n.zoomWindow.width()+2*n.options.borderSize);break;case 9:n.windowOffsetTop=n.nzHeight-n.zoomWindow.height()-2*n.options.borderSize;n.windowOffsetLeft=-1*(n.zoomWindow.width()+2*n.options.borderSize);break;case 10:n.options.zoomWindowHeight>n.nzHeight&&(n.windowOffsetTop=-1*(n.options.zoomWindowHeight/2-n.nzHeight/2),n.windowOffsetLeft=-1*(n.zoomWindow.width()+2*n.options.borderSize));break;case 11:n.windowOffsetTop=n.options.zoomWindowOffety;n.windowOffsetLeft=-1*(n.zoomWindow.width()+2*n.options.borderSize);break;case 12:n.windowOffsetTop=-1*(n.zoomWindow.height()+2*n.options.borderSize);n.windowOffsetLeft=-1*(n.zoomWindow.width()+2*n.options.borderSize);break;case 13:n.windowOffsetTop=-1*(n.zoomWindow.height()+2*n.options.borderSize);n.windowOffsetLeft=0;break;case 14:n.options.zoomWindowHeight>n.nzHeight&&(n.windowOffsetTop=-1*(n.zoomWindow.height()+2*n.options.borderSize),n.windowOffsetLeft=-1*(n.options.zoomWindowWidth/2-n.nzWidth/2+2*n.options.borderSize));break;case 15:n.windowOffsetTop=-1*(n.zoomWindow.height()+2*n.options.borderSize);n.windowOffsetLeft=n.nzWidth-n.zoomWindow.width()-2*n.options.borderSize;break;case 16:n.windowOffsetTop=-1*(n.zoomWindow.height()+2*n.options.borderSize);n.windowOffsetLeft=n.nzWidth;break;default:n.windowOffsetTop=n.options.zoomWindowOffety,n.windowOffsetLeft=n.nzWidth}n.isWindowSet=!0;n.windowOffsetTop+=n.options.zoomWindowOffety;n.windowOffsetLeft+=n.options.zoomWindowOffetx;n.zoomWindow.css({top:n.windowOffsetTop});n.zoomWindow.css({left:n.windowOffsetLeft});"inner"==n.options.zoomType&&(n.zoomWindow.css({top:0}),n.zoomWindow.css({left:0}));n.windowLeftPos=String(-1*((t.pageX-n.nzOffset.left)*n.widthRatio-n.zoomWindow.width()/2));n.windowTopPos=String(-1*((t.pageY-n.nzOffset.top)*n.heightRatio-n.zoomWindow.height()/2));n.Etoppos&&(n.windowTopPos=0);n.Eloppos&&(n.windowLeftPos=0);n.Eboppos&&(n.windowTopPos=-1*(n.largeHeight/n.currentZoomLevel-n.zoomWindow.height()));n.Eroppos&&(n.windowLeftPos=-1*(n.largeWidth/n.currentZoomLevel-n.zoomWindow.width()));n.fullheight&&(n.windowTopPos=0);n.fullwidth&&(n.windowLeftPos=0);if("window"==n.options.zoomType||"inner"==n.options.zoomType)1==n.zoomLock&&(1>=n.widthRatio&&(n.windowLeftPos=0),1>=n.heightRatio&&(n.windowTopPos=0)),n.largeHeight<n.options.zoomWindowHeight&&(n.windowTopPos=0),n.largeWidth<n.options.zoomWindowWidth&&(n.windowLeftPos=0),n.options.easing?(n.xp||(n.xp=0),n.yp||(n.yp=0),n.loop||(n.loop=setInterval(function(){n.xp+=(n.windowLeftPos-n.xp)/n.options.easingAmount;n.yp+=(n.windowTopPos-n.yp)/n.options.easingAmount;n.scrollingLock?(clearInterval(n.loop),n.xp=n.windowLeftPos,n.yp=n.windowTopPos,n.xp=-1*((t.pageX-n.nzOffset.left)*n.widthRatio-n.zoomWindow.width()/2),n.yp=-1*((t.pageY-n.nzOffset.top)*n.heightRatio-n.zoomWindow.height()/2),n.changeBgSize&&(n.nzHeight>n.nzWidth?("lens"==n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"}),n.zoomWindow.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"})):("lens"!=n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvalueheight+"px"}),n.zoomWindow.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvaluewidth+"px"})),n.changeBgSize=!1),n.zoomWindow.css({backgroundPosition:n.windowLeftPos+"px "+n.windowTopPos+"px"}),n.scrollingLock=!1,n.loop=!1):(n.changeBgSize&&(n.nzHeight>n.nzWidth?("lens"==n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"}),n.zoomWindow.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"})):("lens"!=n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvaluewidth+"px"}),n.zoomWindow.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvaluewidth+"px"})),n.changeBgSize=!1),n.zoomWindow.css({backgroundPosition:n.xp+"px "+n.yp+"px"}))},16))):(n.changeBgSize&&(n.nzHeight>n.nzWidth?("lens"==n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"}),n.zoomWindow.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"})):("lens"==n.options.zoomType&&n.zoomLens.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvaluewidth+"px"}),n.largeHeight/n.newvaluewidth<n.options.zoomWindowHeight?n.zoomWindow.css({"background-size":n.largeWidth/n.newvaluewidth+"px "+n.largeHeight/n.newvaluewidth+"px"}):n.zoomWindow.css({"background-size":n.largeWidth/n.newvalueheight+"px "+n.largeHeight/n.newvalueheight+"px"})),n.changeBgSize=!1),n.zoomWindow.css({backgroundPosition:n.windowLeftPos+"px "+n.windowTopPos+"px"}))},setTintPosition:function(e){this.nzOffset=this.$elem.offset();this.tintpos=String(-1*(e.pageX-this.nzOffset.left-this.zoomLens.width()/2));this.tintposy=String(-1*(e.pageY-this.nzOffset.top-this.zoomLens.height()/2));this.Etoppos&&(this.tintposy=0);this.Eloppos&&(this.tintpos=0);this.Eboppos&&(this.tintposy=-1*(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize));this.Eroppos&&(this.tintpos=-1*(this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize));this.options.tint&&(this.fullheight&&(this.tintposy=0),this.fullwidth&&(this.tintpos=0),this.zoomTintImage.css({left:this.tintpos+"px"}),this.zoomTintImage.css({top:this.tintposy+"px"}))},swaptheimage:function(t,n){var r=this,i=new Image;r.options.loadingIcon&&(r.spinner=e("<div style=\"background: url('"+r.options.loadingIcon+"') no-repeat center;height:"+r.nzHeight+"px;width:"+r.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),r.$elem.after(r.spinner));r.options.onImageSwap(r.$elem);i.onload=function(){r.largeWidth=i.width;r.largeHeight=i.height;r.zoomImage=n;r.zoomWindow.css({"background-size":r.largeWidth+"px "+r.largeHeight+"px"});r.zoomWindow.css({"background-size":r.largeWidth+"px "+r.largeHeight+"px"});r.swapAction(t,n)};i.src=n},swapAction:function(t,n){var r=this,i=new Image;i.onload=function(){r.nzHeight=i.height;r.nzWidth=i.width;r.options.onImageSwapComplete(r.$elem);r.doneCallback()};i.src=t;r.currentZoomLevel=r.options.zoomLevel;r.options.maxZoomLevel=!1;"lens"==r.options.zoomType&&r.zoomLens.css({backgroundImage:"url('"+n+"')"});"window"==r.options.zoomType&&r.zoomWindow.css({backgroundImage:"url('"+n+"')"});"inner"==r.options.zoomType&&r.zoomWindow.css({backgroundImage:"url('"+n+"')"});r.currentImage=n;if(r.options.imageCrossfade){var s=r.$elem,o=s.clone();r.$elem.attr("src",t);r.$elem.after(o);o.stop(!0).fadeOut(r.options.imageCrossfade,function(){e(this).remove()});r.$elem.width("auto").removeAttr("width");r.$elem.height("auto").removeAttr("height");s.fadeIn(r.options.imageCrossfade);r.options.tint&&"inner"!=r.options.zoomType&&(s=r.zoomTintImage,o=s.clone(),r.zoomTintImage.attr("src",n),r.zoomTintImage.after(o),o.stop(!0).fadeOut(r.options.imageCrossfade,function(){e(this).remove()}),s.fadeIn(r.options.imageCrossfade),r.zoomTint.css({height:r.$elem.height()}),r.zoomTint.css({width:r.$elem.width()}));r.zoomContainer.css("height",r.$elem.height());r.zoomContainer.css("width",r.$elem.width());"inner"!=r.options.zoomType||r.options.constrainType||(r.zoomWrap.parent().css("height",r.$elem.height()),r.zoomWrap.parent().css("width",r.$elem.width()),r.zoomWindow.css("height",r.$elem.height()),r.zoomWindow.css("width",r.$elem.width()))}else r.$elem.attr("src",t),r.options.tint&&(r.zoomTintImage.attr("src",n),r.zoomTintImage.attr("height",r.$elem.height()),r.zoomTintImage.css({height:r.$elem.height()}),r.zoomTint.css({height:r.$elem.height()})),r.zoomContainer.css("height",r.$elem.height()),r.zoomContainer.css("width",r.$elem.width());r.options.imageCrossfade&&(r.zoomWrap.css("height",r.$elem.height()),r.zoomWrap.css("width",r.$elem.width()));r.options.constrainType&&("height"==r.options.constrainType&&(r.zoomContainer.css("height",r.options.constrainSize),r.zoomContainer.css("width","auto"),r.options.imageCrossfade?(r.zoomWrap.css("height",r.options.constrainSize),r.zoomWrap.css("width","auto"),r.constwidth=r.zoomWrap.width()):(r.$elem.css("height",r.options.constrainSize),r.$elem.css("width","auto"),r.constwidth=r.$elem.width()),"inner"==r.options.zoomType&&(r.zoomWrap.parent().css("height",r.options.constrainSize),r.zoomWrap.parent().css("width",r.constwidth),r.zoomWindow.css("height",r.options.constrainSize),r.zoomWindow.css("width",r.constwidth)),r.options.tint&&(r.tintContainer.css("height",r.options.constrainSize),r.tintContainer.css("width",r.constwidth),r.zoomTint.css("height",r.options.constrainSize),r.zoomTint.css("width",r.constwidth),r.zoomTintImage.css("height",r.options.constrainSize),r.zoomTintImage.css("width",r.constwidth))),"width"==r.options.constrainType&&(r.zoomContainer.css("height","auto"),r.zoomContainer.css("width",r.options.constrainSize),r.options.imageCrossfade?(r.zoomWrap.css("height","auto"),r.zoomWrap.css("width",r.options.constrainSize),r.constheight=r.zoomWrap.height()):(r.$elem.css("height","auto"),r.$elem.css("width",r.options.constrainSize),r.constheight=r.$elem.height()),"inner"==r.options.zoomType&&(r.zoomWrap.parent().css("height",r.constheight),r.zoomWrap.parent().css("width",r.options.constrainSize),r.zoomWindow.css("height",r.constheight),r.zoomWindow.css("width",r.options.constrainSize)),r.options.tint&&(r.tintContainer.css("height",r.constheight),r.tintContainer.css("width",r.options.constrainSize),r.zoomTint.css("height",r.constheight),r.zoomTint.css("width",r.options.constrainSize),r.zoomTintImage.css("height",r.constheight),r.zoomTintImage.css("width",r.options.constrainSize))))},doneCallback:function(){this.options.loadingIcon&&this.spinner.hide();this.nzOffset=this.$elem.offset();this.nzWidth=this.$elem.width();this.nzHeight=this.$elem.height();this.currentZoomLevel=this.options.zoomLevel;this.widthRatio=this.largeWidth/this.nzWidth;this.heightRatio=this.largeHeight/this.nzHeight;"window"==this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.zoomLens&&(this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var t=this;t.gallerylist=[];t.options.gallery?e("#"+t.options.gallery+" a").each(function(){var n="";e(this).data("zoom-image")?n=e(this).data("zoom-image"):e(this).data("image")&&(n=e(this).data("image"));n==t.zoomImage?t.gallerylist.unshift({href:""+n+"",title:e(this).find("img").attr("title")}):t.gallerylist.push({href:""+n+"",title:e(this).find("img").attr("title")})}):t.gallerylist.push({href:""+t.zoomImage+"",title:e(this).find("img").attr("title")});return t.gallerylist},changeZoomLevel:function(e){this.scrollingLock=!0;this.newvalue=parseFloat(e).toFixed(2);newvalue=parseFloat(e).toFixed(2);maxheightnewvalue=this.largeHeight/(this.options.zoomWindowHeight/this.nzHeight*this.nzHeight);maxwidthtnewvalue=this.largeWidth/(this.options.zoomWindowWidth/this.nzWidth*this.nzWidth);"inner"!=this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/maxheightnewvalue/this.nzHeight,this.newvalueheight=maxheightnewvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/maxwidthtnewvalue/this.nzWidth,this.newvaluewidth=maxwidthtnewvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1),"lens"==this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.fullwidth=!0,this.newvaluewidth=maxheightnewvalue):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1)));"inner"==this.options.zoomType&&(maxheightnewvalue=parseFloat(this.largeHeight/this.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(this.largeWidth/this.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue>maxwidthtnewvalue?maxwidthtnewvalue:newvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1));scrcontinue=!1;"inner"==this.options.zoomType&&(this.nzWidth>this.nzHeight&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)),this.nzHeight>this.nzWidth&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)));"inner"!=this.options.zoomType&&(scrcontinue=!0);scrcontinue&&(this.zoomLock=0,this.changeZoom=!0,this.options.zoomWindowHeight/this.heightRatio<=this.nzHeight&&(this.currentZoomLevel=this.newvalueheight,"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({height:String(this.options.zoomWindowHeight/this.heightRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),this.options.zoomWindowWidth/this.widthRatio<=this.nzWidth&&("inner"!=this.options.zoomType&&this.newvaluewidth>this.newvalueheight&&(this.currentZoomLevel=this.newvaluewidth),"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({width:String(this.options.zoomWindowWidth/this.widthRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),"inner"==this.options.zoomType&&(this.changeBgSize=!0,this.nzWidth>this.nzHeight&&(this.currentZoomLevel=this.newvaluewidth),this.nzHeight>this.nzWidth&&(this.currentZoomLevel=this.newvaluewidth)));this.setPosition(this.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide();self.zoomLens&&self.zoomLens.hide();self.zoomTint&&self.zoomTint.hide()},changeState:function(e){"enable"==e&&(this.options.zoomEnabled=!0);"disable"==e&&(this.options.zoomEnabled=!1)}};e.fn.elevateZoom=function(t){return this.each(function(){var n=Object.create(i);n.init(t,this);e.data(this,"elevateZoom",n)})};e.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:.4,gallery:!1,galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:e.noop,onZoomedImageLoaded:function(){},onImageSwap:e.noop,onImageSwapComplete:e.noop}})(jQuery,window,document);(function(e){e.flexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.flexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,u="click touchend MSPointerUp",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemWidth>0,p=r.vars.animation==="fade",d=r.vars.asNavFor!=="",v={},m=!0;e.data(t,"flexslider",r);v={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0,10);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerSelector,r);r.count=r.slides.length;r.syncExists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("Perspective","").toLowerCase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlsContainer!==""&&(r.controlsContainer=e(r.vars.controlsContainer).length>0&&e(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=e(r.vars.manualControls).length>0&&e(r.vars.manualControls));if(r.vars.randomize){r.slides.sort(function(){return Math.round(Math.random())-.5});r.container.empty().append(r.slides)}r.doMath();r.setup("init");r.vars.controlNav&&v.controlNav.setup();r.vars.directionNav&&v.directionNav.setup();r.vars.keyboard&&(e(r.containerSelector).length===1||r.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1;r.flexAnimate(n,r.vars.pauseOnAction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=t<0?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(s,r.vars.pauseOnAction)});r.vars.pausePlay&&v.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&v.pauseInvisible.init();if(r.vars.slideshow){r.vars.pauseOnHover&&r.hover(function(){!r.manualPlay&&!r.manualPause&&r.pause()},function(){!r.manualPause&&!r.manualPlay&&!r.stopped&&r.play()});if(!r.vars.pauseInvisible||!v.pauseInvisible.isHidden())r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()}d&&v.asNav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(i+"active-slide").eq(r.currentItem).addClass(i+"active-slide");if(!s)r.slides.on(u,function(t){t.preventDefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollLeft();if(o<=0&&n.hasClass(i+"active-slide"))r.flexAnimate(r.getTarget("prev"),!0);else if(!e(r.vars.asNavFor).data("flexslider").animating&&!n.hasClass(i+"active-slide")){r.direction=r.currentItem<s?"next":"prev";r.flexAnimate(s,r.vars.pauseOnAction,!1,!0,!0)}});else{t._slider=r;r.slides.each(function(){var t=this;t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",function(e){e.preventDefault();e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1);t.addEventListener("MSGestureTap",function(t){t.preventDefault();var n=e(this),i=n.index();if(!e(r.vars.asNavFor).data("flexslider").animating&&!n.hasClass("active")){r.direction=r.currentItem<i?"next":"prev";r.flexAnimate(i,r.vars.pauseOnAction,!1,!0,!0)}})})}}},controlNav:{setup:function(){r.manualControls?v.controlNav.setupManual():v.controlNav.setupPaging()},setupPaging:function(){var t=r.vars.controlNav==="thumbnails"?"control-thumbs":"control-paging",n=1,s,o;r.controlNavScaffold=e('<ol class="'+i+"control-nav "+i+t+'"></ol>');if(r.pagingCount>1)for(var f=0;f<r.pagingCount;f++){o=r.slides.eq(f);s=r.vars.controlNav==="thumbnails"?'<img src="'+o.attr("data-thumb")+'"/>':"<a>"+n+"</a>";if("thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+='<span class="'+i+'caption">'+l+"</span>")}r.controlNavScaffold.append("<li>"+s+"</li>");n++}r.controlsContainer?e(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);v.controlNav.set();v.controlNav.active();r.controlNavScaffold.delegate("a, img",u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){r.direction=s>r.currentSlide?"next":"prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;v.controlNav.active();r.controlNav.bind(u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){s>r.currentSlide?r.direction="next":r.direction="prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=e("."+i+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(i+"active").eq(r.animatingTo).addClass(i+"active")},update:function(t,n){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(e("<li><a>"+r.count+"</a></li>")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(n).closest("li").remove();v.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(n,t):v.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+i+'direction-nav"><li><a class="'+i+'prev" href="#">'+r.vars.prevText+'</a></li><li><a class="'+i+'next" href="#">'+r.vars.nextText+"</a></li></ul>");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+i+'pauseplay"><a></a></div>');if(r.controlsContainer){r.controlsContainer.append(t);r.pausePlay=e("."+i+"pauseplay a",r.controlsContainer)}else{r.append(t);r.pausePlay=e("."+i+"pauseplay a",r)}v.pausePlay.update(r.vars.slideshow?i+"pause":i+"play");r.pausePlay.bind(u,function(t){t.preventDefault();if(a===""||a===t.type)if(e(this).hasClass(i+"pause")){r.manualPause=!0;r.manualPlay=!1;r.pause()}else{r.manualPause=!1;r.manualPlay=!0;r.play()}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(e){e==="play"?r.pausePlay.removeClass(i+"pause").addClass(i+"play").html(r.vars.playText):r.pausePlay.removeClass(i+"play").addClass(i+"pause").html(r.vars.pauseText)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addEventListener("touchstart",g,!1);function g(s){if(r.animating)s.preventDefault();else if(window.navigator.msPointerEnabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=Number(new Date);d=s.touches[0].pageX;v=s.touches[0].pageY;i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o;e=l?v:d;n=l?d:v;t.addEventListener("touchmove",y,!1);t.addEventListener("touchend",b,!1)}}function y(t){d=t.touches[0].pageX;v=t.touches[0].pageY;u=l?e-v:e-d;f=l?Math.abs(u)<Math.abs(d-n):Math.abs(u)<Math.abs(v-n);var s=500;if(!f||Number(new Date)-a>s){t.preventDefault();if(!p&&r.transitions){r.vars.animationLoop||(u/=r.currentSlide===0&&u<0||r.currentSlide===r.last&&u>0?Math.abs(u)/o+2:1);r.setProps(i+u,"setTouch")}}}function b(s){t.removeEventListener("touchmove",y,!1);if(r.animatingTo===r.currentSlide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(h)&&(Number(new Date)-a<550&&Math.abs(l)>50||Math.abs(l)>o/2)?r.flexAnimate(h,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",w,!1);t._slider=r;t.addEventListener("MSGestureChange",E,!1);t.addEventListener("MSGestureEnd",S,!1);function w(e){e.stopPropagation();if(r.animating)e.preventDefault();else{r.pause();t._gesture.addPointer(e.pointerId);m=0;o=l?r.h:r.w;a=Number(new Date);i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o}}function E(e){e.stopPropagation();var n=e.target._slider;if(!n)return;var r=-e.translationX,s=-e.translationY;m+=l?s:r;u=m;f=l?Math.abs(m)<Math.abs(-r):Math.abs(m)<Math.abs(-s);if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}if(!f||Number(new Date)-a>500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=m/(n.currentSlide===0&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/o+2:1));n.setProps(i+u,"setTouch")}}}function S(t){t.stopPropagation();var r=t.target._slider;if(!r)return;if(r.animatingTo===r.currentSlide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.flexAnimate(l,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.doMath();if(p)v.smoothHeight();else if(h){r.slides.width(r.computedW);r.update(r.pagingCount);r.setProps()}else if(l){r.viewport.height(r.h);r.setProps(r.h,"setTotal")}else{r.vars.smoothHeight&&v.smoothHeight();r.newSlides.width(r.computedW);r.setProps(r.computedW,"setTotal")}}},smoothHeight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingTo).height()},e):t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var n=e(r.vars.sync).data("flexslider"),i=r.animatingTo;switch(t){case"animate":n.flexAnimate(i,r.vars.pauseOnAction,!1,!0);break;case"play":!n.playing&&!n.asNav&&n.play();break;case"pause":n.pause()}},uniqueID:function(t){t.find("[id]").each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")});return t},pauseInvisible:{visProp:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)e[t]+"Hidden"in document&&(v.pauseInvisible.visProp=e[t]+"Hidden");if(v.pauseInvisible.visProp){var n=v.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(n,function(){v.pauseInvisible.isHidden()?r.startTimeout?clearTimeout(r.startTimeout):r.pause():r.started?r.play():r.vars.initDelay>0?setTimeout(r.play,r.vars.initDelay):r.play()})}},isHidden:function(){return document[v.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(f);f=setTimeout(function(){a=""},3e3)}};r.flexAnimate=function(t,n,s,u,a){!r.vars.animationLoop&&t!==r.currentSlide&&(r.direction=t>r.currentSlide?"next":"prev");d&&r.pagingCount===1&&(r.direction=r.currentItem<t?"next":"prev");if(!r.animating&&(r.canAdvance(t,a)||s)&&r.is(":visible")){if(d&&u){var f=e(r.vars.asNavFor).data("flexslider");r.atEnd=t===0||t===r.count-1;f.flexAnimate(t,!0,!1,!0,a);r.direction=r.currentItem<t?"next":"prev";f.direction=r.direction;if(Math.ceil((t+1)/r.visible)-1===r.currentSlide||t===0){r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");return!1}r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");t=Math.floor(t/r.visible)}r.animating=!0;r.animatingTo=t;n&&r.pause();r.vars.before(r);r.syncExists&&!a&&v.sync("animate");r.vars.controlNav&&v.controlNav.active();h||r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");r.atEnd=t===0||t===r.last;r.vars.directionNav&&v.directionNav.update();if(t===r.last){r.vars.end(r);r.vars.animationLoop||r.pause()}if(!p){var m=l?r.slides.filter(":first").height():r.computedW,g,y,b;if(h){g=r.vars.itemMargin;b=(r.itemW+g)*r.move*r.animatingTo;y=b>r.limit&&r.visible!==1?r.limit:b}else r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?y=c?(r.count+r.cloneOffset)*m:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneOffset)*m:(t+r.cloneOffset)*m;r.setProps(y,"",r.vars.animationSpeed);if(r.transitions){if(!r.vars.animationLoop||!r.atEnd){r.animating=!1;r.currentSlide=r.animatingTo}r.container.unbind("webkitTransitionEnd transitionend");r.container.bind("webkitTransitionEnd transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing);r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1});r.slides.eq(t).css({opacity:1,zIndex:2});r.wrapup(m)}r.vars.smoothHeight&&v.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(e){!p&&!h&&(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(e,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(e,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&m&&r.flexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&v.pausePlay.update("play");r.syncExists&&v.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&v.pausePlay.update("pause");r.syncExists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(e,t){var n=d?r.pagingCount-1:r.last;return t?!0:d&&r.currentItem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentItem===0&&e===r.pagingCount-1&&r.direction!=="next"?!1:e===r.currentSlide&&!d?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&e===n&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===n&&e===0&&r.direction==="next"?!1:!0};r.getTarget=function(e){r.direction=e;return e==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(e,t,n){var i=function(){var n=e?e:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,i=function(){if(h)return t==="setTouch"?e:c&&r.animatingTo===r.last?0:c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:n;switch(t){case"setTotal":return c?(r.count-1-r.currentSlide+r.cloneOffset)*e:(r.currentSlide+r.cloneOffset)*e;case"setTouch":return c?e:e;case"jumpEnd":return c?e:r.count*e;case"jumpStart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n);r.container.css("transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args);r.container.css("transform",i)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);r.cloneCount=0;r.cloneOffset=0;if(c){s=e.makeArray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationLoop&&!h){r.cloneCount=2;r.cloneOffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addClass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addClass("clone").attr("aria-hidden","true"));v.uniqueID(r.slides.first().clone().addClass("clone")).appendTo(r.container);v.uniqueID(r.slides.last().clone().addClass("clone")).prependTo(r.container)}r.newSlides=e(r.vars.selector,r);n=c?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;if(l&&!h){r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.cloneCount)*200+"%");r.setProps(n*r.computedW,"init");setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,"float":"left",display:"block"});r.vars.smoothHeight&&v.smoothHeight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing));r.vars.smoothHeight&&v.smoothHeight()}h||r.slides.removeClass(i+"active-slide").eq(r.currentSlide).addClass(i+"active-slide");r.vars.init(r)};r.doMath=function(){var e=r.slides.first(),t=r.vars.itemMargin,n=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxPadding=e.outerWidth()-e.width();if(h){r.itemT=r.vars.itemWidth+t;r.minW=n?n*r.itemT:r.w;r.maxW=i?i*r.itemT-t:r.w;r.itemW=r.minW>r.w?(r.w-t*(n-1))/n:r.maxW<r.w?(r.w-t*(i-1))/i:r.vars.itemWidth>r.w?r.w:r.vars.itemWidth;r.visible=Math.floor(r.w/r.itemW);r.move=r.vars.move>0&&r.vars.move<r.visible?r.vars.move:r.visible;r.pagingCount=Math.ceil((r.count-r.visible)/r.move+1);r.last=r.pagingCount-1;r.limit=r.pagingCount===1?0:r.vars.itemWidth>r.w?r.itemW*(r.count-1)+t*(r.count-1):(r.itemW+t)*r.count-r.w-t}else{r.itemW=r.w;r.pagingCount=r.count;r.last=r.count-1}r.computedW=r.itemW-r.boxPadding};r.update=function(e,t){r.doMath();if(!h){e<r.currentSlide?r.currentSlide+=1:e<=r.currentSlide&&e!==0&&(r.currentSlide-=1);r.animatingTo=r.currentSlide}if(r.vars.controlNav&&!r.manualControls)if(t==="add"&&!h||r.pagingCount>r.controlNav.length)v.controlNav.update("add");else if(t==="remove"&&!h||r.pagingCount<r.controlNav.length){if(h&&r.currentSlide>r.last){r.currentSlide-=1;r.animatingTo-=1}v.controlNav.update("remove",r.last)}r.vars.directionNav&&v.directionNav.update()};r.addSlide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var n=isNaN(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};e.fn.flexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowOneSlide===!0||i.length===0){i.fadeIn(400);t.start&&t.start(n)}else n.data("flexslider")===undefined&&new e.flexslider(this,t)});var n=e(this).data("flexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.flexAnimate(n.getTarget("next"),!0);break;case"prev":case"previous":n.flexAnimate(n.getTarget("prev"),!0);break;default:typeof t=="number"&&n.flexAnimate(t,!0)}}})(jQuery);(function(e){e.flexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.flexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,u="click touchend MSPointerUp",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemWidth>0,p=r.vars.animation==="fade",d=r.vars.asNavFor!=="",v={},m=!0;e.data(t,"flexslider",r);v={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0,10);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerSelector,r);r.count=r.slides.length;r.syncExists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("Perspective","").toLowerCase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlsContainer!==""&&(r.controlsContainer=e(r.vars.controlsContainer).length>0&&e(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=e(r.vars.manualControls).length>0&&e(r.vars.manualControls));if(r.vars.randomize){r.slides.sort(function(){return Math.round(Math.random())-.5});r.container.empty().append(r.slides)}r.doMath();r.setup("init");r.vars.controlNav&&v.controlNav.setup();r.vars.directionNav&&v.directionNav.setup();r.vars.keyboard&&(e(r.containerSelector).length===1||r.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1;r.flexAnimate(n,r.vars.pauseOnAction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=t<0?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(s,r.vars.pauseOnAction)});r.vars.pausePlay&&v.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&v.pauseInvisible.init();if(r.vars.slideshow){r.vars.pauseOnHover&&r.hover(function(){!r.manualPlay&&!r.manualPause&&r.pause()},function(){!r.manualPause&&!r.manualPlay&&!r.stopped&&r.play()});if(!r.vars.pauseInvisible||!v.pauseInvisible.isHidden())r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()}d&&v.asNav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(i+"active-slide").eq(r.currentItem).addClass(i+"active-slide");if(!s)r.slides.on(u,function(t){t.preventDefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollLeft();if(o<=0&&n.hasClass(i+"active-slide"))r.flexAnimate(r.getTarget("prev"),!0);else if(!e(r.vars.asNavFor).data("flexslider").animating&&!n.hasClass(i+"active-slide")){r.direction=r.currentItem<s?"next":"prev";r.flexAnimate(s,r.vars.pauseOnAction,!1,!0,!0)}});else{t._slider=r;r.slides.each(function(){var t=this;t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",function(e){e.preventDefault();e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1);t.addEventListener("MSGestureTap",function(t){t.preventDefault();var n=e(this),i=n.index();if(!e(r.vars.asNavFor).data("flexslider").animating&&!n.hasClass("active")){r.direction=r.currentItem<i?"next":"prev";r.flexAnimate(i,r.vars.pauseOnAction,!1,!0,!0)}})})}}},controlNav:{setup:function(){r.manualControls?v.controlNav.setupManual():v.controlNav.setupPaging()},setupPaging:function(){var t=r.vars.controlNav==="thumbnails"?"control-thumbs":"control-paging",n=1,s,o;r.controlNavScaffold=e('<ol class="'+i+"control-nav "+i+t+'"></ol>');if(r.pagingCount>1)for(var f=0;f<r.pagingCount;f++){o=r.slides.eq(f);s=r.vars.controlNav==="thumbnails"?'<img src="'+o.attr("data-thumb")+'"/>':"<a>"+n+"</a>";if("thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+='<span class="'+i+'caption">'+l+"</span>")}r.controlNavScaffold.append("<li>"+s+"</li>");n++}r.controlsContainer?e(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);v.controlNav.set();v.controlNav.active();r.controlNavScaffold.delegate("a, img",u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){r.direction=s>r.currentSlide?"next":"prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;v.controlNav.active();r.controlNav.bind(u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){s>r.currentSlide?r.direction="next":r.direction="prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=e("."+i+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(i+"active").eq(r.animatingTo).addClass(i+"active")},update:function(t,n){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(e("<li><a>"+r.count+"</a></li>")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(n).closest("li").remove();v.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(n,t):v.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+i+'direction-nav"><li><a class="'+i+'prev" href="#">'+r.vars.prevText+'</a></li><li><a class="'+i+'next" href="#">'+r.vars.nextText+"</a></li></ul>");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+i+'pauseplay"><a></a></div>');if(r.controlsContainer){r.controlsContainer.append(t);r.pausePlay=e("."+i+"pauseplay a",r.controlsContainer)}else{r.append(t);r.pausePlay=e("."+i+"pauseplay a",r)}v.pausePlay.update(r.vars.slideshow?i+"pause":i+"play");r.pausePlay.bind(u,function(t){t.preventDefault();if(a===""||a===t.type)if(e(this).hasClass(i+"pause")){r.manualPause=!0;r.manualPlay=!1;r.pause()}else{r.manualPause=!1;r.manualPlay=!0;r.play()}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(e){e==="play"?r.pausePlay.removeClass(i+"pause").addClass(i+"play").html(r.vars.playText):r.pausePlay.removeClass(i+"play").addClass(i+"pause").html(r.vars.pauseText)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addEventListener("touchstart",g,!1);function g(s){if(r.animating)s.preventDefault();else if(window.navigator.msPointerEnabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=Number(new Date);d=s.touches[0].pageX;v=s.touches[0].pageY;i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o;e=l?v:d;n=l?d:v;t.addEventListener("touchmove",y,!1);t.addEventListener("touchend",b,!1)}}function y(t){d=t.touches[0].pageX;v=t.touches[0].pageY;u=l?e-v:e-d;f=l?Math.abs(u)<Math.abs(d-n):Math.abs(u)<Math.abs(v-n);var s=500;if(!f||Number(new Date)-a>s){t.preventDefault();if(!p&&r.transitions){r.vars.animationLoop||(u/=r.currentSlide===0&&u<0||r.currentSlide===r.last&&u>0?Math.abs(u)/o+2:1);r.setProps(i+u,"setTouch")}}}function b(s){t.removeEventListener("touchmove",y,!1);if(r.animatingTo===r.currentSlide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(h)&&(Number(new Date)-a<550&&Math.abs(l)>50||Math.abs(l)>o/2)?r.flexAnimate(h,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",w,!1);t._slider=r;t.addEventListener("MSGestureChange",E,!1);t.addEventListener("MSGestureEnd",S,!1);function w(e){e.stopPropagation();if(r.animating)e.preventDefault();else{r.pause();t._gesture.addPointer(e.pointerId);m=0;o=l?r.h:r.w;a=Number(new Date);i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o}}function E(e){e.stopPropagation();var n=e.target._slider;if(!n)return;var r=-e.translationX,s=-e.translationY;m+=l?s:r;u=m;f=l?Math.abs(m)<Math.abs(-r):Math.abs(m)<Math.abs(-s);if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}if(!f||Number(new Date)-a>500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=m/(n.currentSlide===0&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/o+2:1));n.setProps(i+u,"setTouch")}}}function S(t){t.stopPropagation();var r=t.target._slider;if(!r)return;if(r.animatingTo===r.currentSlide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.flexAnimate(l,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.doMath();if(p)v.smoothHeight();else if(h){r.slides.width(r.computedW);r.update(r.pagingCount);r.setProps()}else if(l){r.viewport.height(r.h);r.setProps(r.h,"setTotal")}else{r.vars.smoothHeight&&v.smoothHeight();r.newSlides.width(r.computedW);r.setProps(r.computedW,"setTotal")}}},smoothHeight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingTo).height()},e):t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var n=e(r.vars.sync).data("flexslider"),i=r.animatingTo;switch(t){case"animate":n.flexAnimate(i,r.vars.pauseOnAction,!1,!0);break;case"play":!n.playing&&!n.asNav&&n.play();break;case"pause":n.pause()}},uniqueID:function(t){t.find("[id]").each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")});return t},pauseInvisible:{visProp:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)e[t]+"Hidden"in document&&(v.pauseInvisible.visProp=e[t]+"Hidden");if(v.pauseInvisible.visProp){var n=v.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(n,function(){v.pauseInvisible.isHidden()?r.startTimeout?clearTimeout(r.startTimeout):r.pause():r.started?r.play():r.vars.initDelay>0?setTimeout(r.play,r.vars.initDelay):r.play()})}},isHidden:function(){return document[v.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(f);f=setTimeout(function(){a=""},3e3)}};r.flexAnimate=function(t,n,s,u,a){!r.vars.animationLoop&&t!==r.currentSlide&&(r.direction=t>r.currentSlide?"next":"prev");d&&r.pagingCount===1&&(r.direction=r.currentItem<t?"next":"prev");if(!r.animating&&(r.canAdvance(t,a)||s)&&r.is(":visible")){if(d&&u){var f=e(r.vars.asNavFor).data("flexslider");r.atEnd=t===0||t===r.count-1;f.flexAnimate(t,!0,!1,!0,a);r.direction=r.currentItem<t?"next":"prev";f.direction=r.direction;if(Math.ceil((t+1)/r.visible)-1===r.currentSlide||t===0){r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");return!1}r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");t=Math.floor(t/r.visible)}r.animating=!0;r.animatingTo=t;n&&r.pause();r.vars.before(r);r.syncExists&&!a&&v.sync("animate");r.vars.controlNav&&v.controlNav.active();h||r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");r.atEnd=t===0||t===r.last;r.vars.directionNav&&v.directionNav.update();if(t===r.last){r.vars.end(r);r.vars.animationLoop||r.pause()}if(!p){var m=l?r.slides.filter(":first").height():r.computedW,g,y,b;if(h){g=r.vars.itemMargin;b=(r.itemW+g)*r.move*r.animatingTo;y=b>r.limit&&r.visible!==1?r.limit:b}else r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?y=c?(r.count+r.cloneOffset)*m:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneOffset)*m:(t+r.cloneOffset)*m;r.setProps(y,"",r.vars.animationSpeed);if(r.transitions){if(!r.vars.animationLoop||!r.atEnd){r.animating=!1;r.currentSlide=r.animatingTo}r.container.unbind("webkitTransitionEnd transitionend");r.container.bind("webkitTransitionEnd transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing);r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1});r.slides.eq(t).css({opacity:1,zIndex:2});r.wrapup(m)}r.vars.smoothHeight&&v.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(e){!p&&!h&&(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(e,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(e,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&m&&r.flexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&v.pausePlay.update("play");r.syncExists&&v.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&v.pausePlay.update("pause");r.syncExists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(e,t){var n=d?r.pagingCount-1:r.last;return t?!0:d&&r.currentItem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentItem===0&&e===r.pagingCount-1&&r.direction!=="next"?!1:e===r.currentSlide&&!d?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&e===n&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===n&&e===0&&r.direction==="next"?!1:!0};r.getTarget=function(e){r.direction=e;return e==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(e,t,n){var i=function(){var n=e?e:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,i=function(){if(h)return t==="setTouch"?e:c&&r.animatingTo===r.last?0:c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:n;switch(t){case"setTotal":return c?(r.count-1-r.currentSlide+r.cloneOffset)*e:(r.currentSlide+r.cloneOffset)*e;case"setTouch":return c?e:e;case"jumpEnd":return c?e:r.count*e;case"jumpStart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n);r.container.css("transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args);r.container.css("transform",i)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);r.cloneCount=0;r.cloneOffset=0;if(c){s=e.makeArray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationLoop&&!h){r.cloneCount=2;r.cloneOffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addClass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addClass("clone").attr("aria-hidden","true"));v.uniqueID(r.slides.first().clone().addClass("clone")).appendTo(r.container);v.uniqueID(r.slides.last().clone().addClass("clone")).prependTo(r.container)}r.newSlides=e(r.vars.selector,r);n=c?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;if(l&&!h){r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.cloneCount)*200+"%");r.setProps(n*r.computedW,"init");setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,"float":"left",display:"block"});r.vars.smoothHeight&&v.smoothHeight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing));r.vars.smoothHeight&&v.smoothHeight()}h||r.slides.removeClass(i+"active-slide").eq(r.currentSlide).addClass(i+"active-slide");r.vars.init(r)};r.doMath=function(){var e=r.slides.first(),t=r.vars.itemMargin,n=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxPadding=e.outerWidth()-e.width();if(h){r.itemT=r.vars.itemWidth+t;r.minW=n?n*r.itemT:r.w;r.maxW=i?i*r.itemT-t:r.w;r.itemW=r.minW>r.w?(r.w-t*(n-1))/n:r.maxW<r.w?(r.w-t*(i-1))/i:r.vars.itemWidth>r.w?r.w:r.vars.itemWidth;r.visible=Math.floor(r.w/r.itemW);r.move=r.vars.move>0&&r.vars.move<r.visible?r.vars.move:r.visible;r.pagingCount=Math.ceil((r.count-r.visible)/r.move+1);r.last=r.pagingCount-1;r.limit=r.pagingCount===1?0:r.vars.itemWidth>r.w?r.itemW*(r.count-1)+t*(r.count-1):(r.itemW+t)*r.count-r.w-t}else{r.itemW=r.w;r.pagingCount=r.count;r.last=r.count-1}r.computedW=r.itemW-r.boxPadding};r.update=function(e,t){r.doMath();if(!h){e<r.currentSlide?r.currentSlide+=1:e<=r.currentSlide&&e!==0&&(r.currentSlide-=1);r.animatingTo=r.currentSlide}if(r.vars.controlNav&&!r.manualControls)if(t==="add"&&!h||r.pagingCount>r.controlNav.length)v.controlNav.update("add");else if(t==="remove"&&!h||r.pagingCount<r.controlNav.length){if(h&&r.currentSlide>r.last){r.currentSlide-=1;r.animatingTo-=1}v.controlNav.update("remove",r.last)}r.vars.directionNav&&v.directionNav.update()};r.addSlide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var n=isNaN(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};e.fn.flexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowOneSlide===!0||i.length===0){i.fadeIn(400);t.start&&t.start(n)}else n.data("flexslider")===undefined&&new e.flexslider(this,t)});var n=e(this).data("flexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.flexAnimate(n.getTarget("next"),!0);break;case"prev":case"previous":n.flexAnimate(n.getTarget("prev"),!0);break;default:typeof t=="number"&&n.flexAnimate(t,!0)}}})(jQuery);var ytp=ytp||{};(function(jQuery,ytp){var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={};jQuery.browser.mozilla=!1;jQuery.browser.webkit=!1;jQuery.browser.opera=!1;jQuery.browser.safari=!1;jQuery.browser.chrome=!1;jQuery.browser.msie=!1;jQuery.browser.ua=nAgt;jQuery.browser.name=navigator.appName;jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion);jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0;jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix));-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix));jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10);isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10));jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt);jQuery.browser.blackberry=/BlackBerry/i.test(nAgt);jQuery.browser.ios=/iPhone|iPad|iPod/i.test(nAgt);jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt);jQuery.browser.windowsMobile=/IEMobile/i.test(nAgt);jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile;ytp.isDevice=jQuery.browser.mobile;jQuery.fn.CSSAnimate=function(e,t,n,r,i){function s(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function o(e,t){return"string"!==typeof e||e.match(/^[\-0-9\.]+$/)?""+e+t:e}jQuery.support.CSStransition=function(){var e=(document.body||document.documentElement).style;return void 0!==e.transition||void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.MsTransition||void 0!==e.OTransition}();return this.each(function(){var u=this,l=jQuery(this);u.id=u.id||"CSSA_"+(new Date).getTime();var c=c||{type:"noEvent"};if(u.CSSAIsRunning&&u.eventType==c.type)u.CSSqueue=function(){l.CSSAnimate(e,t,n,r,i)};else if(u.CSSqueue=null,u.eventType=c.type,0!==l.length&&e){u.CSSAIsRunning=!0;"function"==typeof t&&(i=t,t=jQuery.fx.speeds._default);"function"==typeof n&&(i=n,n=0);"function"==typeof r&&(i=r,r="cubic-bezier(0.65,0.03,0.36,0.72)");if("string"==typeof t)for(var d in jQuery.fx.speeds)if(t==d){t=jQuery.fx.speeds[d];break}else t=jQuery.fx.speeds._default;t||(t=jQuery.fx.speeds._default);if(jQuery.support.CSStransition){c={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};c[r]&&(r=c[r]);var v="",y="transitionEnd";jQuery.browser.webkit?(v="-webkit-",y="webkitTransitionEnd"):jQuery.browser.mozilla?(v="-moz-",y="transitionend"):jQuery.browser.opera?(v="-o-",y="otransitionend"):jQuery.browser.msie&&(v="-ms-",y="msTransitionEnd");c=[];for(b in e){d=b;"transform"===d&&(d=v+"transform",e[d]=e[b],delete e[b]);"filter"===d&&(d=v+"filter",e[d]=e[b],delete e[b]);if("transform-origin"===d||"origin"===d)d=v+"transform-origin",e[d]=e[b],delete e[b];"x"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" translateX("+o(e[b],"px")+")",delete e[b]);"y"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" translateY("+o(e[b],"px")+")",delete e[b]);"z"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" translateZ("+o(e[b],"px")+")",delete e[b]);"rotate"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" rotate("+o(e[b],"deg")+")",delete e[b]);"rotateX"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" rotateX("+o(e[b],"deg")+")",delete e[b]);"rotateY"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" rotateY("+o(e[b],"deg")+")",delete e[b]);"rotateZ"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" rotateZ("+o(e[b],"deg")+")",delete e[b]);"scale"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" scale("+o(e[b],"")+")",delete e[b]);"scaleX"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" scaleX("+o(e[b],"")+")",delete e[b]);"scaleY"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" scaleY("+o(e[b],"")+")",delete e[b]);"scaleZ"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" scaleZ("+o(e[b],"")+")",delete e[b]);"skew"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" skew("+o(e[b],"deg")+")",delete e[b]);"skewX"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" skewX("+o(e[b],"deg")+")",delete e[b]);"skewY"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" skewY("+o(e[b],"deg")+")",delete e[b]);"perspective"===d&&(d=v+"transform",e[d]=e[d]||"",e[d]+=" perspective("+o(e[b],"px")+")",delete e[b]);0>c.indexOf(d)&&c.push(s(d))}var b=c.join(","),w=function(){l.off(y+"."+u.id);clearTimeout(u.timeout);l.css(v+"transition","");"function"==typeof i&&i(l);u.called=!0;u.CSSAIsRunning=!1;"function"==typeof u.CSSqueue&&(u.CSSqueue(),u.CSSqueue=null)},E={};jQuery.extend(E,e);E[v+"transition-property"]=b;E[v+"transition-duration"]=t+"ms";E[v+"transition-delay"]=n+"ms";E[v+"transition-style"]="preserve-3d";E[v+"transition-timing-function"]=r;setTimeout(function(){l.one(y+"."+u.id,w);l.css(E)},1);u.timeout=setTimeout(function(){l.called||!i?(l.called=!1,u.CSSAIsRunning=!1):(l.css(v+"transition",""),i(l),u.CSSAIsRunning=!1,"function"==typeof u.CSSqueue&&(u.CSSqueue(),u.CSSqueue=null))},t+n+100)}else{for(var b in e)"transform"===b&&delete e[b],"filter"===b&&delete e[b],"transform-origin"===b&&delete e[b],"auto"===e[b]&&delete e[b];i&&"string"!==typeof i||(i="linear");l.animate(e,t,i)}}})};var getYTPVideoID=function(e){var t;if(e.substr(0,16)=="http://youtu.be/"){t=e.replace("http://youtu.be/","")}else if(e.indexOf("http")>-1){t=e.match(/[\\?&]v=([^&#]*)/)[1]}else{t=e}return t};jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"2.7.2",author:"Matteo Bicocchi",defaults:{containment:"body",ratio:"16/9",videoURL:null,startAt:0,stopAt:0,autoPlay:true,vol:100,addRaster:false,opacity:1,quality:"default",mute:false,loop:true,showControls:true,showAnnotations:false,showYTLogo:true,stopMovieOnClick:false,realfullscreen:true,gaTrack:true,onReady:function(e){},onStateChange:function(e){},onPlaybackQualityChange:function(e){},onError:function(e){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},rasterImg:"images/raster.png",rasterImgRetina:"images/raster@2x.png",locationProtocol:"https:",buildPlayer:function(options){return this.each(function(){var YTPlayer=this;var $YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0;YTPlayer.opt={};$YTPlayer.addClass("mb_YTVPlayer");var property=$YTPlayer.data("property")&&typeof $YTPlayer.data("property")=="string"?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property");if(typeof property.vol!="undefined")property.vol=property.vol==0?property.vol=1:property.vol;jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property);var canGoFullscreen=!(jQuery.browser.msie||jQuery.browser.opera||self.location.href!=top.location.href);if(!canGoFullscreen)YTPlayer.opt.realfullscreen=false;if(!$YTPlayer.attr("id"))$YTPlayer.attr("id","YTP_"+(new Date).getTime());YTPlayer.opt.id=YTPlayer.id;YTPlayer.isAlone=false;var playerID="mbYTP_"+YTPlayer.id;var videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL):$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")):false;YTPlayer.videoID=videoID;YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:true,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations};var canPlayHTML5=false;var v=document.createElement("video");if(v.canPlayType){canPlayHTML5=true}if(canPlayHTML5)jQuery.extend(playerVars,{html5:1});if(jQuery.browser.msie&&jQuery.browser.version<9){this.opt.opacity=1}var playerBox=jQuery("<div/>").attr("id",playerID).addClass("playerBox");var overlay=jQuery("<div/>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");YTPlayer.isSelf=YTPlayer.opt.containment=="self";YTPlayer.opt.containment=YTPlayer.opt.containment=="self"?jQuery(this):jQuery(YTPlayer.opt.containment);YTPlayer.isBackground=YTPlayer.opt.containment.get(0).tagName.toLowerCase()=="body";if(YTPlayer.isBackground&&ytp.backgroundIsInited)return;if(!YTPlayer.opt.containment.is(jQuery(this))){$YTPlayer.hide()}else{YTPlayer.isPlayer=true}if(ytp.isDevice&&YTPlayer.isBackground){$YTPlayer.remove();return}if(YTPlayer.opt.addRaster){var retina=window.retina||window.devicePixelRatio>1;overlay.addClass(retina?"raster retina":"raster")}else{overlay.removeClass("raster retina")}var wrapper=jQuery("<div/>").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID);wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0});playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden",opacity:this.opt.opacity});wrapper.append(playerBox);YTPlayer.opt.containment.children().not("script, style").each(function(){if(jQuery(this).css("position")=="static")jQuery(this).css("position","relative")});if(YTPlayer.isBackground){jQuery("body").css({position:"relative",minWidth:"100%",minHeight:"100%",zIndex:1,boxSizing:"border-box"});wrapper.css({position:"fixed",top:0,left:0,zIndex:0,webkitTransform:"translateZ(0)"});$YTPlayer.hide()}else if(YTPlayer.opt.containment.css("position")=="static")YTPlayer.opt.containment.css({position:"relative"});YTPlayer.opt.containment.prepend(wrapper);YTPlayer.wrapper=wrapper;playerBox.css({opacity:1});if(!ytp.isDevice){playerBox.after(overlay);YTPlayer.overlay=overlay}if(!YTPlayer.isBackground){overlay.on("mouseenter",function(){$YTPlayer.find(".mb_YTVPBar").addClass("visible")}).on("mouseleave",function(){$YTPlayer.find(".mb_YTVPBar").removeClass("visible")})}if(!ytp.YTAPIReady){jQuery("#YTAPI").remove();var tag=jQuery("<script></script>").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/player_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"});jQuery("head title").after(tag)}else{setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100)}jQuery(document).on("YTAPIReady",function(){if(YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit)return;if(YTPlayer.isBackground&&YTPlayer.opt.stopMovieOnClick)jQuery(document).off("mousedown.ytplayer").on("mousedown,.ytplayer",function(e){var t=jQuery(e.target);if(t.is("a")||t.parents().is("a")){$YTPlayer.pauseYTP()}});if(YTPlayer.isBackground){ytp.backgroundIsInited=true}YTPlayer.opt.autoPlay=typeof YTPlayer.opt.autoPlay=="undefined"?YTPlayer.isBackground?true:false:YTPlayer.opt.autoPlay;YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100;jQuery.mbYTPlayer.getDataFromFeed(YTPlayer.videoID,YTPlayer);jQuery(YTPlayer).on("YTPChanged",function(){if(YTPlayer.isInit)return;YTPlayer.isInit=true;if(ytp.isDevice&&!YTPlayer.isBackground){new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),height:"100%",width:"100%",videoId:YTPlayer.videoID,events:{onReady:function(e){YTPlayer.player=e.target;playerBox.css({opacity:1});YTPlayer.wrapper.css({opacity:1});$YTPlayer.optimizeDisplay()},onStateChange:function(){}}});return}new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(e){YTPlayer.player=e.target;if(YTPlayer.isReady)return;YTPlayer.isReady=true;YTPlayer.playerEl=YTPlayer.player.getIframe();$YTPlayer.optimizeDisplay();YTPlayer.videoID=videoID;jQuery(window).on("resize.YTP",function(){$YTPlayer.optimizeDisplay()});if(YTPlayer.opt.showControls)jQuery(YTPlayer).buildYTPControls();var t=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1;YTPlayer.player.setVolume(0);jQuery(YTPlayer).muteYTPVolume();jQuery.mbYTPlayer.checkForState(YTPlayer);YTPlayer.checkForStartAt=setInterval(function(){var e=YTPlayer.player.getVideoLoadedFraction()>t/YTPlayer.player.getDuration();if(YTPlayer.player.getDuration()>0&&YTPlayer.player.getCurrentTime()>=t&&e){clearInterval(YTPlayer.checkForStartAt);YTPlayer.player.setVolume(0);jQuery(YTPlayer).muteYTPVolume();if(typeof YTPlayer.opt.onReady=="function")YTPlayer.opt.onReady($YTPlayer);if(!YTPlayer.opt.mute)jQuery(YTPlayer).unmuteYTPVolume();jQuery.mbYTPlayer.checkForState(YTPlayer);YTPlayer.player.pauseVideo();setTimeout(function(){if(YTPlayer.opt.autoPlay){$YTPlayer.playYTP();$YTPlayer.css("background-image","none")}else{YTPlayer.player.pauseVideo()}YTPlayer.wrapper.CSSAnimate({opacity:YTPlayer.isAlone?1:YTPlayer.opt.opacity},2e3)},100)}else{YTPlayer.player.playVideo();YTPlayer.player.seekTo(t,true)}},$.browser.chrome?1e3:1)},onStateChange:function(event){if(typeof event.target.getPlayerState!="function")return;var state=event.target.getPlayerState();if(typeof YTPlayer.opt.onStateChange=="function")YTPlayer.opt.onStateChange($YTPlayer,state);var controls=jQuery("#controlBar_"+YTPlayer.id);var data=YTPlayer.opt;if(state==0){if(YTPlayer.state==state)return;YTPlayer.state=state;YTPlayer.player.pauseVideo();var startAt=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1;if(data.loop){YTPlayer.wrapper.css({opacity:0});$YTPlayer.playYTP();YTPlayer.player.seekTo(startAt,true)}else if(!YTPlayer.isBackground){YTPlayer.player.seekTo(startAt,true);$YTPlayer.playYTP();setTimeout(function(){$YTPlayer.pauseYTP()},10)}if(!data.loop&&YTPlayer.isBackground)YTPlayer.wrapper.CSSAnimate({opacity:0},2e3);else if(data.loop){YTPlayer.wrapper.css({opacity:0});YTPlayer.loop++}controls.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play);jQuery(YTPlayer).trigger("YTPEnd")}if(state==3){if(YTPlayer.state==state)return;YTPlayer.state=state;YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality);controls.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play);jQuery(YTPlayer).trigger("YTPBuffering")}if(state==-1){if(YTPlayer.state==state)return;YTPlayer.state=state;jQuery(YTPlayer).trigger("YTPUnstarted")}if(state==1){if(YTPlayer.state==state)return;YTPlayer.state=state;YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality);controls.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.pause);jQuery(YTPlayer).trigger("YTPStart");if(typeof _gaq!="undefined"&&eval(YTPlayer.opt.gaTrack))_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.title||YTPlayer.videoID.toString()]);if(typeof ga!="undefined"&&eval(YTPlayer.opt.gaTrack))ga("send","event","YTPlayer","play",YTPlayer.title||YTPlayer.videoID.toString())}if(state==2){if(YTPlayer.state==state)return;YTPlayer.state=state;controls.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play);jQuery(YTPlayer).trigger("YTPPause")}},onPlaybackQualityChange:function(e){if(typeof YTPlayer.opt.onPlaybackQualityChange=="function")YTPlayer.opt.onPlaybackQualityChange($YTPlayer)},onError:function(e){if(e.data==150){console.log("Embedding this video is restricted by Youtube.");if(YTPlayer.isPlayList)jQuery(YTPlayer).playNext()}if(e.data==2&&YTPlayer.isPlayList)jQuery(YTPlayer).playNext();if(typeof YTPlayer.opt.onError=="function")YTPlayer.opt.onError($YTPlayer,e)}}})})})})},getDataFromFeed:function(e,t){t.videoID=e;if(!jQuery.browser.msie){jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//gdata.youtube.com/feeds/api/videos/"+e+"?v=2&alt=jsonc",function(e,n,r){t.dataReceived=true;var i=e.data;t.title=i.title;t.videoData=i;if(t.opt.ratio=="auto")if(i.aspectRatio&&i.aspectRatio==="widescreen")t.opt.ratio="16/9";else t.opt.ratio="4/3";if(!t.hasData){t.hasData=true;if(t.isPlayer){var s=t.videoData.thumbnail.hqDefault;t.opt.containment.css({background:"rgba(0,0,0,0.5) url("+s+") center center",backgroundSize:"cover"})}}jQuery(t).trigger("YTPChanged")});setTimeout(function(){if(!t.dataReceived&&!t.hasData){t.hasData=true;jQuery(t).trigger("YTPChanged")}},1500)}else{t.opt.ratio=="auto"?t.opt.ratio="16/9":t.opt.ratio;if(!t.hasData){t.hasData=true;setTimeout(function(){jQuery(t).trigger("YTPChanged")},100)}}},getVideoID:function(){var e=this.get(0);return e.videoID||false},setVideoQuality:function(e){var t=this.get(0);t.player.setPlaybackQuality(e)},YTPlaylist:function(e,t,n){var r=this.get(0);r.isPlayList=true;if(t)e=jQuery.shuffle(e);if(!r.videoID){r.videos=e;r.videoCounter=0;r.videoLength=e.length;jQuery(r).data("property",e[0]);jQuery(r).mb_YTPlayer()}if(typeof n=="function")jQuery(r).on("YTPChanged",function(){n(r)});jQuery(r).on("YTPEnd",function(){jQuery(r).playNext()})},playNext:function(){var e=this.get(0);e.videoCounter++;if(e.videoCounter>=e.videoLength)e.videoCounter=0;jQuery(e.playerEl).css({opacity:0});jQuery(e).changeMovie(e.videos[e.videoCounter])},playPrev:function(){var e=this.get(0);e.videoCounter--;if(e.videoCounter<0)e.videoCounter=e.videoLength-1;jQuery(e.playerEl).css({opacity:0});jQuery(e).changeMovie(e.videos[e.videoCounter])},changeMovie:function(e){var t=this.get(0);t.opt.startAt=0;t.opt.stopAt=0;t.opt.mute=true;if(e){jQuery.extend(t.opt,e)}t.videoID=getYTPVideoID(t.opt.videoURL);jQuery(t).pauseYTP();var n=jQuery.browser.msie?1e3:0;jQuery(t.playerEl).CSSAnimate({opacity:0},n);setTimeout(function(){jQuery(t).getPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+t.videoID),1,t.opt.quality);jQuery(t).playYTP();jQuery(t).one("YTPStart",function(){t.wrapper.CSSAnimate({opacity:t.isAlone?1:t.opt.opacity},1e3);jQuery(t.playerEl).CSSAnimate({opacity:1},n);if(t.opt.startAt){t.player.seekTo(t.opt.startAt)}jQuery.mbYTPlayer.checkForState(t);if(!t.opt.autoPlay)jQuery(t).pauseYTP()});if(t.opt.mute){jQuery(t).muteYTPVolume()}else{jQuery(t).unmuteYTPVolume()}},n);if(t.opt.addRaster){var r=window.retina||window.devicePixelRatio>1;t.overlay.addClass(r?"raster retina":"raster")}else{t.overlay.removeClass("raster");t.overlay.removeClass("retina")}jQuery("#controlBar_"+t.id).remove();if(t.opt.showControls)jQuery(t).buildYTPControls();jQuery.mbYTPlayer.getDataFromFeed(t.videoID,t);jQuery(t).optimizeDisplay()},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var e=this.get(0);ytp.YTAPIReady=false;ytp.backgroundIsInited=false;e.isInit=false;e.videoID=null;var t=e.wrapper;t.remove();jQuery("#controlBar_"+e.id).remove()},fullscreen:function(real){function RunPrefixMethod(e,t){var n=["webkit","moz","ms","o",""];var r=0,i,s;while(r<n.length&&!e[i]){i=t;if(n[r]==""){i=i.substr(0,1).toLowerCase()+i.substr(1)}i=n[r]+i;s=typeof e[i];if(s!="undefined"){n=[n[r]];return s=="function"?e[i]():e[i]}r++}}function launchFullscreen(e){RunPrefixMethod(e,"RequestFullScreen")}function cancelFullscreen(){if(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen")){RunPrefixMethod(document,"CancelFullScreen")}}var YTPlayer=this.get(0);if(typeof real=="undefined")real=YTPlayer.opt.realfullscreen;real=eval(real);var controls=jQuery("#controlBar_"+YTPlayer.id);var fullScreenBtn=controls.find(".mb_OnlyYT");var videoWrapper=YTPlayer.isSelf?YTPlayer.opt.containment:YTPlayer.wrapper;if(real){var fullscreenchange=jQuery.browser.mozilla?"mozfullscreenchange":jQuery.browser.webkit?"webkitfullscreenchange":"fullscreenchange";jQuery(document).off(fullscreenchange).on(fullscreenchange,function(){var e=RunPrefixMethod(document,"IsFullScreen")||RunPrefixMethod(document,"FullScreen");if(!e){YTPlayer.isAlone=false;fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT);jQuery(YTPlayer).setVideoQuality(YTPlayer.opt.quality);videoWrapper.removeClass("fullscreen");videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500);videoWrapper.css({zIndex:0});if(YTPlayer.isBackground){jQuery("body").after(controls)}else{YTPlayer.wrapper.before(controls)}jQuery(window).resize();jQuery(YTPlayer).trigger("YTPFullScreenEnd")}else{jQuery(YTPlayer).setVideoQuality("default");jQuery(YTPlayer).trigger("YTPFullScreenStart")}})}if(!YTPlayer.isAlone){if(real){var playerState=YTPlayer.player.getPlayerState();videoWrapper.css({opacity:0});videoWrapper.addClass("fullscreen");launchFullscreen(videoWrapper.get(0));setTimeout(function(){videoWrapper.CSSAnimate({opacity:1},1e3);YTPlayer.wrapper.append(controls);jQuery(YTPlayer).optimizeDisplay();YTPlayer.player.seekTo(YTPlayer.player.getCurrentTime()+.1,true)},500)}else videoWrapper.css({zIndex:1e4}).CSSAnimate({opacity:1},1e3);fullScreenBtn.html(jQuery.mbYTPlayer.controls.showSite);YTPlayer.isAlone=true}else{if(real){cancelFullscreen()}else{videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500);videoWrapper.css({zIndex:0})}fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT);YTPlayer.isAlone=false}},playYTP:function(){var e=this.get(0);if(typeof e.player==="undefined")return;var t=jQuery("#controlBar_"+e.id);var n=t.find(".mb_YTVPPlaypause");n.html(jQuery.mbYTPlayer.controls.pause);e.player.playVideo();e.wrapper.CSSAnimate({opacity:e.isAlone?1:e.opt.opacity},2e3);jQuery(e).on("YTPStart",function(){jQuery(e).css("background-image","none")})},toggleLoops:function(){var e=this.get(0);var t=e.opt;if(t.loop==1){t.loop=0}else{if(t.startAt){e.player.seekTo(t.startAt)}else{e.player.playVideo()}t.loop=1}},stopYTP:function(){var e=this.get(0);var t=jQuery("#controlBar_"+e.id);var n=t.find(".mb_YTVPPlaypause");n.html(jQuery.mbYTPlayer.controls.play);e.player.stopVideo()},pauseYTP:function(){var e=this.get(0);var t=e.opt;var n=jQuery("#controlBar_"+e.id);var r=n.find(".mb_YTVPPlaypause");r.html(jQuery.mbYTPlayer.controls.play);e.player.pauseVideo()},seekToYTP:function(e){var t=this.get(0);t.player.seekTo(e,true)},setYTPVolume:function(e){var t=this.get(0);if(!e&&!t.opt.vol&&t.player.getVolume()==0)jQuery(t).unmuteYTPVolume();else if(!e&&t.player.getVolume()>0||e&&t.player.getVolume()==e)jQuery(t).muteYTPVolume();else t.opt.vol=e;t.player.setVolume(t.opt.vol)},muteYTPVolume:function(){var e=this.get(0);e.player.mute();e.player.setVolume(0);var t=jQuery("#controlBar_"+e.id);var n=t.find(".mb_YTVPMuteUnmute");n.html(jQuery.mbYTPlayer.controls.unmute);jQuery(e).addClass("isMuted");jQuery(e).trigger("YTPMuted")},unmuteYTPVolume:function(){var e=this.get(0);e.player.unMute();e.player.setVolume(e.opt.vol);var t=jQuery("#controlBar_"+e.id);var n=t.find(".mb_YTVPMuteUnmute");n.html(jQuery.mbYTPlayer.controls.mute);jQuery(e).removeClass("isMuted");jQuery(e).trigger("YTPUnmuted")},manageYTPProgress:function(){var e=this.get(0);var t=jQuery("#controlBar_"+e.id);var n=t.find(".mb_YTVPProgress");var r=t.find(".mb_YTVPLoaded");var i=t.find(".mb_YTVTime");var s=n.outerWidth();var o=Math.floor(e.player.getCurrentTime());var u=Math.floor(e.player.getDuration());var a=o*s/u;var f=0;var l=e.player.getVideoLoadedFraction()*100;r.css({left:f,width:l+"%"});i.css({left:0,width:a});return{totalTime:u,currentTime:o}},buildYTPControls:function(){var YTPlayer=this.get(0);var data=YTPlayer.opt;data.showYTLogo=data.showYTLogo||data.printUrl;if(jQuery("#controlBar_"+YTPlayer.id).length)return;var controlBar=jQuery("<span/>").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTVPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();var buttonBar=jQuery("<div/>").addClass("buttonBar");var playpause=jQuery("<span>"+jQuery.mbYTPlayer.controls.play+"</span>").addClass("mb_YTVPPlaypause ytpicon").click(function(){if(YTPlayer.player.getPlayerState()==1)jQuery(YTPlayer).pauseYTP();else jQuery(YTPlayer).playYTP()});var MuteUnmute=jQuery("<span>"+jQuery.mbYTPlayer.controls.mute+"</span>").addClass("mb_YTVPMuteUnmute ytpicon").click(function(){if(YTPlayer.player.getVolume()==0){jQuery(YTPlayer).unmuteYTPVolume()}else{jQuery(YTPlayer).muteYTPVolume()}});var idx=jQuery("<span/>").addClass("mb_YTVPTime");var vURL=data.videoURL;if(vURL.indexOf("http")<0)vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL;var movieUrl=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTVPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT")});var onlyVideo=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).fullscreen(data.realfullscreen)});var progressBar=jQuery("<div/>").addClass("mb_YTVPProgress").css("position","absolute").click(function(e){timeBar.css({width:e.clientX-timeBar.offset().left});YTPlayer.timeW=e.clientX-timeBar.offset().left;controlBar.find(".mb_YTVPLoaded").css({width:0});var t=Math.floor(YTPlayer.player.getDuration());YTPlayer.goto=timeBar.outerWidth()*t/progressBar.outerWidth();YTPlayer.player.seekTo(parseFloat(YTPlayer.goto),true);controlBar.find(".mb_YTVPLoaded").css({width:0})});var loadedBar=jQuery("<div/>").addClass("mb_YTVPLoaded").css("position","absolute");var timeBar=jQuery("<div/>").addClass("mb_YTVTime").css("position","absolute");progressBar.append(loadedBar).append(timeBar);buttonBar.append(playpause).append(MuteUnmute).append(idx);if(data.showYTLogo){buttonBar.append(movieUrl)}if(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)buttonBar.append(onlyVideo);controlBar.append(buttonBar).append(progressBar);if(!YTPlayer.isBackground){controlBar.addClass("inlinePlayer");YTPlayer.wrapper.before(controlBar)}else{jQuery("body").after(controlBar)}controlBar.fadeIn()},checkForState:function(e){clearInterval(e.getState);e.getState=setInterval(function(){var t=jQuery(e).manageYTPProgress();var n=jQuery(e);var r=jQuery("#controlBar_"+e.id);var i=e.opt;var s=e.opt.startAt?e.opt.startAt:1;var o=e.opt.stopAt>e.opt.startAt?e.opt.stopAt:0;o=o<e.player.getDuration()?o:0;if(e.player.getVolume()==0)n.addClass("isMuted");else n.removeClass("isMuted");if(t.totalTime){r.find(".mb_YTVPTime").html(jQuery.mbYTPlayer.formatTime(t.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(t.totalTime))}else{r.find(".mb_YTVPTime").html("-- : -- / -- : --")}if(e.player.getPlayerState()==1&&(parseFloat(e.player.getDuration()-3)<e.player.getCurrentTime()||o>0&&parseFloat(e.player.getCurrentTime())>o)){if(e.isEnded)return;e.isEnded=true;setTimeout(function(){e.isEnded=false},2e3);if(e.isPlayList){clearInterval(e.getState);jQuery(e).trigger("YTPEnd");return}else if(!i.loop){e.player.pauseVideo();e.wrapper.CSSAnimate({opacity:0},1e3,function(){jQuery(e).trigger("YTPEnd");e.player.seekTo(s,true);if(!e.isBackground){var t=e.videoData.thumbnail.hqDefault;jQuery(e).css({background:"rgba(0,0,0,0.5) url("+t+") center center",backgroundSize:"cover"})}})}else e.player.seekTo(s,true)}},1)},formatTime:function(e){var t=Math.floor(e/60);var n=Math.floor(e-60*t);return(t<=9?"0"+t:t)+" : "+(n<=9?"0"+n:n)}};jQuery.fn.toggleVolume=function(){var e=this.get(0);if(!e)return;if(e.player.isMuted()){jQuery(e).unmuteYTPVolume();return true}else{jQuery(e).muteYTPVolume();return false}};jQuery.fn.optimizeDisplay=function(){var e=this.get(0);var t=e.opt;var n=jQuery(e.playerEl);var r={};var i=e.wrapper;r.width=i.outerWidth();r.height=i.outerHeight();var s=24;var o=100;var u={};u.width=r.width+r.width*s/100;u.height=t.ratio=="16/9"?Math.ceil(9*r.width/16):Math.ceil(3*r.width/4);u.marginTop=-((u.height-r.height)/2);u.marginLeft=-(r.width*(s/2)/100);if(u.height<r.height){u.height=r.height+r.height*s/100;u.width=t.ratio=="16/9"?Math.floor(16*r.height/9):Math.floor(4*r.height/3);u.marginTop=-(r.height*(s/2)/100);u.marginLeft=-((u.width-r.width)/2)}u.width+=o;u.height+=o;u.marginTop-=o/2;u.marginLeft-=o/2;n.css({width:u.width,height:u.height,marginTop:u.marginTop,marginLeft:u.marginLeft})};jQuery.shuffle=function(e){var t=e.slice();var n=t.length;var r=n;while(r--){var i=parseInt(Math.random()*n);var s=t[r];t[r]=t[i];t[i]=s}return t};jQuery.fn.mb_YTPlayer=jQuery.mbYTPlayer.buildPlayer;jQuery.fn.YTPlaylist=jQuery.mbYTPlayer.YTPlaylist;jQuery.fn.playNext=jQuery.mbYTPlayer.playNext;jQuery.fn.playPrev=jQuery.mbYTPlayer.playPrev;jQuery.fn.changeMovie=jQuery.mbYTPlayer.changeMovie;jQuery.fn.getVideoID=jQuery.mbYTPlayer.getVideoID;jQuery.fn.getPlayer=jQuery.mbYTPlayer.getPlayer;jQuery.fn.playerDestroy=jQuery.mbYTPlayer.playerDestroy;jQuery.fn.fullscreen=jQuery.mbYTPlayer.fullscreen;jQuery.fn.buildYTPControls=jQuery.mbYTPlayer.buildYTPControls;jQuery.fn.playYTP=jQuery.mbYTPlayer.playYTP;jQuery.fn.toggleLoops=jQuery.mbYTPlayer.toggleLoops;jQuery.fn.stopYTP=jQuery.mbYTPlayer.stopYTP;jQuery.fn.pauseYTP=jQuery.mbYTPlayer.pauseYTP;jQuery.fn.seekToYTP=jQuery.mbYTPlayer.seekToYTP;jQuery.fn.muteYTPVolume=jQuery.mbYTPlayer.muteYTPVolume;jQuery.fn.unmuteYTPVolume=jQuery.mbYTPlayer.unmuteYTPVolume;jQuery.fn.setYTPVolume=jQuery.mbYTPlayer.setYTPVolume;jQuery.fn.setVideoQuality=jQuery.mbYTPlayer.setVideoQuality;jQuery.fn.manageYTPProgress=jQuery.mbYTPlayer.manageYTPProgress})(jQuery,ytp);(function(e,t,n,r){var i=function(r,i){this.elem=r;this.$elem=e(r);this.options=i;this.metadata=this.$elem.data("plugin-options");this.$win=e(t);this.sections={};this.didScroll=false;this.$doc=e(n);this.docHeight=this.$doc.height()};i.prototype={defaults:{navItems:"a",currentClass:"current",changeHash:false,easing:"swing",filter:"",scrollSpeed:750,scrollThreshold:.5,begin:false,end:false,scrollChange:false},init:function(){this.config=e.extend({},this.defaults,this.options,this.metadata);this.$nav=this.$elem.find(this.config.navItems);if(this.config.filter!==""){this.$nav=this.$nav.filter(this.config.filter)}this.$nav.on("click.onePageNav",e.proxy(this.handleClick,this));this.getPositions();this.bindInterval();this.$win.on("resize.onePageNav",e.proxy(this.getPositions,this));return this},adjustNav:function(e,t){e.$elem.find("."+e.config.currentClass).removeClass(e.config.currentClass);t.addClass(e.config.currentClass)},bindInterval:function(){var e=this;var t;e.$win.on("scroll.onePageNav",function(){e.didScroll=true});e.t=setInterval(function(){t=e.$doc.height();if(e.didScroll){e.didScroll=false;e.scrollChange()}if(t!==e.docHeight){e.docHeight=t;e.getPositions()}},250)},getHash:function(e){return e.attr("href").split("#")[1]},getPositions:function(){var t=this;var n;var r;var i;t.$nav.each(function(){n=t.getHash(e(this));i=e("#"+n);if(i.length){r=i.offset().top;t.sections[n]=Math.round(r)}})},getSection:function(e){var t=null;var n=Math.round(this.$win.height()*this.config.scrollThreshold);for(var r in this.sections){if(this.sections[r]-n<e){t=r}}return t},handleClick:function(n){var r=this;var i=e(n.currentTarget);var s=i.parent();var o="#"+r.getHash(i);if(!s.hasClass(r.config.currentClass)){if(r.config.begin){r.config.begin()}r.adjustNav(r,s);r.unbindInterval();r.scrollTo(o,function(){if(r.config.changeHash){t.location.hash=o}r.bindInterval();if(r.config.end){r.config.end()}})}n.preventDefault()},scrollChange:function(){var e=this.$win.scrollTop();var t=this.getSection(e);var n;if(t!==null){n=this.$elem.find('a[href$="#'+t+'"]').parent();if(!n.hasClass(this.config.currentClass)){this.adjustNav(this,n);if(this.config.scrollChange){this.config.scrollChange(n)}}}},scrollTo:function(t,n){var r=e(t).offset().top;e("html, body").animate({scrollTop:r},this.config.scrollSpeed,this.config.easing,n)},unbindInterval:function(){clearInterval(this.t);this.$win.unbind("scroll.onePageNav")}};i.defaults=i.prototype.defaults;e.fn.onePageNav=function(e){return this.each(function(){(new i(this,e)).init()})}})(jQuery,window,document);$(function(){var e=$("#mc-embedded-subscribe-form");$("#mc-embedded-subscribe").on("click",function(t){if(t)t.preventDefault();register(e)})});(function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++){if(t in this&&this[t]===e)return t}return-1},t=[].slice;(function(e,t){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return t(n,e)})}else{return t(e.jQuery,e)}})(window,function(n,r){var i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b;i=n(r);c=e.call(r,"ontouchstart")>=0;u={horizontal:{},vertical:{}};a=1;l={};f="waypoints-context-id";d="resize.waypoints";v="scroll.waypoints";m=1;g="waypoints-waypoint-ids";y="waypoint";b="waypoints";s=function(){function e(e){var t=this;this.$element=e;this.element=e[0];this.didResize=false;this.didScroll=false;this.id="context"+a++;this.oldScroll={x:e.scrollLeft(),y:e.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[f]=this.id;l[this.id]=this;e.bind(v,function(){var e;if(!(t.didScroll||c)){t.didScroll=true;e=function(){t.doScroll();return t.didScroll=false};return r.setTimeout(e,n[b].settings.scrollThrottle)}});e.bind(d,function(){var e;if(!t.didResize){t.didResize=true;e=function(){n[b]("refresh");return t.didResize=false};return r.setTimeout(e,n[b].settings.resizeThrottle)}})}e.prototype.doScroll=function(){var e,t=this;e={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!e.vertical.oldScroll||!e.vertical.newScroll)){n[b]("refresh")}n.each(e,function(e,r){var i,s,o;o=[];s=r.newScroll>r.oldScroll;i=s?r.forward:r.backward;n.each(t.waypoints[e],function(e,t){var n,i;if(r.oldScroll<(n=t.offset)&&n<=r.newScroll){return o.push(t)}else if(r.newScroll<(i=t.offset)&&i<=r.oldScroll){return o.push(t)}});o.sort(function(e,t){return e.offset-t.offset});if(!s){o.reverse()}return n.each(o,function(e,t){if(t.options.continuous||e===o.length-1){return t.trigger([i])}})});return this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}};e.prototype.refresh=function(){var e,t,r,i=this;r=n.isWindow(this.element);t=this.$element.offset();this.doScroll();e={horizontal:{contextOffset:r?0:t.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:t.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[b]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(e,function(e,t){return n.each(i.waypoints[e],function(e,r){var i,s,o,u,a;i=r.options.offset;o=r.offset;s=n.isWindow(r.element)?0:r.$element.offset()[t.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(t.contextDimension*i/100)}}r.offset=s-t.contextOffset+t.contextScroll-i;if(r.options.onlyOnScroll&&o!=null||!r.enabled){return}if(o!==null&&o<(u=t.oldScroll)&&u<=r.offset){return r.trigger([t.backward])}else if(o!==null&&o>(a=t.oldScroll)&&a>=r.offset){return r.trigger([t.forward])}else if(o===null&&t.oldScroll>=r.offset){return r.trigger([t.forward])}})})};e.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([d,v].join(" "));return delete l[this.id]}};return e}();o=function(){function e(e,t,r){var i,s;if(r.offset==="bottom-in-view"){r.offset=function(){var e;e=n[b]("viewportHeight");if(!n.isWindow(t.element)){e=t.$element.height()}return e-n(this).outerHeight()}}this.$element=e;this.element=e[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=t;this.enabled=r.enabled;this.id="waypoints"+m++;this.offset=null;this.options=r;t.waypoints[this.axis][this.id]=this;u[this.axis][this.id]=this;i=(s=this.element[g])!=null?s:[];i.push(this.id);this.element[g]=i}e.prototype.trigger=function(e){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,e)}if(this.options.triggerOnce){return this.destroy()}};e.prototype.disable=function(){return this.enabled=false};e.prototype.enable=function(){this.context.refresh();return this.enabled=true};e.prototype.destroy=function(){delete u[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};e.getWaypointsByElement=function(e){var t,r;r=e[g];if(!r){return[]}t=n.extend({},u.horizontal,u.vertical);return n.map(r,function(e){return t[e]})};return e}();p={init:function(e,t){var r;t=n.extend({},n.fn[y].defaults,t);if((r=t.handler)==null){t.handler=e}this.each(function(){var e,r,i,u;e=n(this);i=(u=t.context)!=null?u:n.fn[y].defaults.context;if(!n.isWindow(i)){i=e.closest(i)}i=n(i);r=l[i[0][f]];if(!r){r=new s(i)}return new o(e,r,t)});n[b]("refresh");return this},disable:function(){return p._invoke.call(this,"disable")},enable:function(){return p._invoke.call(this,"enable")},destroy:function(){return p._invoke.call(this,"destroy")},prev:function(e,t){return p._traverse.call(this,e,t,function(e,t,n){if(t>0){return e.push(n[t-1])}})},next:function(e,t){return p._traverse.call(this,e,t,function(e,t,n){if(t<n.length-1){return e.push(n[t+1])}})},_traverse:function(e,t,i){var s,o;if(e==null){e="vertical"}if(t==null){t=r}o=h.aggregate(t);s=[];this.each(function(){var t;t=n.inArray(this,o[e]);return i(s,t,o[e])});return this.pushStack(s)},_invoke:function(e){this.each(function(){var t;t=o.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[y]=function(){var e,r;r=arguments[0],e=2<=arguments.length?t.call(arguments,1):[];if(p[r]){return p[r].apply(this,e)}else if(n.isFunction(r)){return p.init.apply(this,arguments)}else if(n.isPlainObject(r)){return p.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[y].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(l,function(e,t){return t.refresh()})},viewportHeight:function(){var e;return(e=r.innerHeight)!=null?e:i.height()},aggregate:function(e){var t,r,i;t=u;if(e){t=(i=l[n(e)[0][f]])!=null?i.waypoints:void 0}if(!t){return[]}r={horizontal:[],vertical:[]};n.each(r,function(e,i){n.each(t[e],function(e,t){return i.push(t)});i.sort(function(e,t){return e.offset-t.offset});r[e]=n.map(i,function(e){return e.element});return r[e]=n.unique(r[e])});return r},above:function(e){if(e==null){e=r}return h._filter(e,"vertical",function(e,t){return t.offset<=e.oldScroll.y})},below:function(e){if(e==null){e=r}return h._filter(e,"vertical",function(e,t){return t.offset>e.oldScroll.y})},left:function(e){if(e==null){e=r}return h._filter(e,"horizontal",function(e,t){return t.offset<=e.oldScroll.x})},right:function(e){if(e==null){e=r}return h._filter(e,"horizontal",function(e,t){return t.offset>e.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(e,t){return p[e]=t},_invoke:function(e){var t;t=n.extend({},u.vertical,u.horizontal);return n.each(t,function(t,n){n[e]();return true})},_filter:function(e,t,r){var i,s;i=l[n(e)[0][f]];if(!i){return[]}s=[];n.each(i.waypoints[t],function(e,t){if(r(i,t)){return s.push(t)}});s.sort(function(e,t){return e.offset-t.offset});return n.map(s,function(e){return e.element})}};n[b]=function(){var e,n;n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[];if(h[n]){return h[n].apply(null,e)}else{return h.aggregate.call(null,n)}};n[b].settings={resizeThrottle:100,scrollThrottle:30};return i.on("load.waypoints",function(){return n[b]("refresh")})})}).call(this);!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";var t=window.Slick||{};t=function(){function t(t,r){var i,s,o=this;if(o.defaults={accessibility:!0,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return'<button type="button">'+(t+1)+"</button>"},dots:!1,draggable:!0,easing:"linear",fade:!1,infinite:!0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,pauseOnHover:!0,responsive:null,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,touchMove:!0,touchThreshold:5,useCSS:!0,vertical:!1},o.initials={animating:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},e.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.paused=!1,o.positionProp=null,o.$slider=e(t),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.windowWidth=0,o.windowTimer=null,o.options=e.extend({},o.defaults,r),o.originalSettings=o.options,i=o.options.responsive||null,i&&i.length>-1){for(s in i)i.hasOwnProperty(s)&&(o.breakpoints.push(i[s].breakpoint),o.breakpointSettings[i[s].breakpoint]=i[s].settings);o.breakpoints.sort(function(e,t){return t-e})}o.autoPlay=e.proxy(o.autoPlay,o),o.autoPlayClear=e.proxy(o.autoPlayClear,o),o.changeSlide=e.proxy(o.changeSlide,o),o.setPosition=e.proxy(o.setPosition,o),o.swipeHandler=e.proxy(o.swipeHandler,o),o.dragHandler=e.proxy(o.dragHandler,o),o.keyHandler=e.proxy(o.keyHandler,o),o.autoPlayIterator=e.proxy(o.autoPlayIterator,o),o.instanceUid=n++,o.init()}var n=0;return t}(),t.prototype.addSlide=function(t,n,r){var i=this;if("boolean"==typeof n)r=n,n=null;else if(0>n||n>=i.slideCount)return!1;i.unload(),"number"==typeof n?0===n&&0===i.$slides.length?e(t).appendTo(i.$slideTrack):r?e(t).insertBefore(i.$slides.eq(n)):e(t).insertAfter(i.$slides.eq(n)):r===!0?e(t).prependTo(i.$slideTrack):e(t).appendTo(i.$slideTrack),i.$slides=i.$slideTrack.children(this.options.slide),i.$slideTrack.children(this.options.slide).remove(),i.$slideTrack.append(i.$slides),i.$slidesCache=i.$slides,i.reinit()},t.prototype.animateSlide=function(t,n){var r={},i=this;i.transformsEnabled===!1?i.options.vertical===!1?i.$slideTrack.animate({left:t},i.options.speed,i.options.easing,n):i.$slideTrack.animate({top:t},i.options.speed,i.options.easing,n):i.cssTransitions===!1?e({animStart:i.currentLeft}).animate({animStart:t},{duration:i.options.speed,easing:i.options.easing,step:function(e){i.options.vertical===!1?(r[i.animType]="translate("+e+"px, 0px)",i.$slideTrack.css(r)):(r[i.animType]="translate(0px,"+e+"px)",i.$slideTrack.css(r))},complete:function(){n&&n.call()}}):(i.applyTransition(),r[i.animType]=i.options.vertical===!1?"translate3d("+t+"px, 0px, 0px)":"translate3d(0px,"+t+"px, 0px)",i.$slideTrack.css(r),n&&setTimeout(function(){i.disableTransition(),n.call()},i.options.speed))},t.prototype.applyTransition=function(e){var t=this,n={};n[t.transitionType]=t.options.fade===!1?t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:"opacity "+t.options.speed+"ms "+t.options.cssEase,t.options.fade===!1?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.autoPlay=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer),e.slideCount>e.options.slidesToShow&&e.paused!==!0&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},t.prototype.autoPlayClear=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer)},t.prototype.autoPlayIterator=function(){var e=this;e.options.infinite===!1?1===e.direction?(e.currentSlide+1===e.slideCount-1&&(e.direction=0),e.slideHandler(e.currentSlide+e.options.slidesToScroll)):(0===e.currentSlide-1&&(e.direction=1),e.slideHandler(e.currentSlide-e.options.slidesToScroll)):e.slideHandler(e.currentSlide+e.options.slidesToScroll)},t.prototype.buildArrows=function(){var t=this;t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow=e('<button type="button" class="slick-prev">Previous</button>').appendTo(t.$slider),t.$nextArrow=e('<button type="button" class="slick-next">Next</button>').appendTo(t.$slider),t.options.infinite!==!0&&t.$prevArrow.addClass("slick-disabled"))},t.prototype.buildDots=function(){var t,n,r=this;if(r.options.dots===!0&&r.slideCount>r.options.slidesToShow){for(n='<ul class="slick-dots">',t=0;t<=r.getDotCount();t+=1)n+="<li>"+r.options.customPaging.call(this,r,t)+"</li>";n+="</ul>",r.$dots=e(n).appendTo(r.$slider),r.$dots.find("li").first().addClass("slick-active")}},t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slidesCache=t.$slides,t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),t.options.centerMode===!0&&(t.options.infinite=!0,t.options.slidesToScroll=1,0===t.options.slidesToShow%2&&(t.options.slidesToShow=3)),e("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.options.accessibility===!0&&t.$list.prop("tabIndex",0),t.setSlideClasses(0),t.options.draggable===!0&&t.$list.addClass("draggable")},t.prototype.checkResponsive=function(){var t,n,r=this;if(r.originalSettings.responsive&&r.originalSettings.responsive.length>-1&&null!==r.originalSettings.responsive){n=null;for(t in r.breakpoints)r.breakpoints.hasOwnProperty(t)&&e(window).width()<r.breakpoints[t]&&(n=r.breakpoints[t]);null!==n?null!==r.activeBreakpoint?n!==r.activeBreakpoint&&(r.activeBreakpoint=n,r.options=e.extend({},r.defaults,r.breakpointSettings[n]),r.refresh()):(r.activeBreakpoint=n,r.options=e.extend({},r.defaults,r.breakpointSettings[n]),r.refresh()):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=e.extend({},r.defaults,r.originalSettings),r.refresh())}},t.prototype.changeSlide=function(t){var n=this;switch(t.data.message){case"previous":n.slideHandler(n.currentSlide-n.options.slidesToScroll);break;case"next":n.slideHandler(n.currentSlide+n.options.slidesToScroll);break;case"index":n.slideHandler(e(t.target).parent().index()*n.options.slidesToScroll);break;default:return!1}},t.prototype.destroy=function(){var t=this;t.autoPlayClear(),t.touchObject={},e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&(t.$prevArrow.remove(),t.$nextArrow.remove()),t.$slides.unwrap().unwrap(),t.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style"),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$list.off(".slick"),e(window).off(".slick-"+t.instanceUid)},t.prototype.disableTransition=function(e){var t=this,n={};n[t.transitionType]="",t.options.fade===!1?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.fadeSlide=function(e,t){var n=this;n.cssTransitions===!1?(n.$slides.eq(e).css({zIndex:1e3}),n.$slides.eq(e).animate({opacity:1},n.options.speed,n.options.easing,t)):(n.applyTransition(e),n.$slides.eq(e).css({opacity:1,zIndex:1e3}),t&&setTimeout(function(){n.disableTransition(e),t.call()},n.options.speed))},t.prototype.filterSlides=function(e){var t=this;null!==e&&(t.unload(),t.$slideTrack.children(this.options.slide).remove(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},t.prototype.getCurrent=function(){var e=this;return e.currentSlide},t.prototype.getDotCount=function(){var e,t=this,n=0,r=0,i=0;for(e=t.options.infinite===!0?t.slideCount+t.options.slidesToShow-t.options.slidesToScroll:t.slideCount;e>n;)i++,r+=t.options.slidesToScroll,n=r+t.options.slidesToShow;return i},t.prototype.getLeft=function(e){var t,n,r=this,i=0;return r.slideOffset=0,n=r.$slides.first().outerHeight(),r.options.infinite===!0?(r.slideCount>r.options.slidesToShow&&(r.slideOffset=-1*r.slideWidth*r.options.slidesToShow,i=-1*n*r.options.slidesToShow),0!==r.slideCount%r.options.slidesToScroll&&e+r.options.slidesToScroll>r.slideCount&&r.slideCount>r.options.slidesToShow&&(r.slideOffset=-1*r.slideCount%r.options.slidesToShow*r.slideWidth,i=-1*r.slideCount%r.options.slidesToShow*n)):0!==r.slideCount%r.options.slidesToShow&&e+r.options.slidesToScroll>r.slideCount&&r.slideCount>r.options.slidesToShow&&(r.slideOffset=r.options.slidesToShow*r.slideWidth-r.slideCount%r.options.slidesToShow*r.slideWidth,i=r.slideCount%r.options.slidesToShow*n),r.options.centerMode===!0&&(r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)-r.slideWidth),t=r.options.vertical===!1?-1*e*r.slideWidth+r.slideOffset:-1*e*n+i},t.prototype.init=function(){var t=this;e(t.$slider).hasClass("slick-initialized")||(e(t.$slider).addClass("slick-initialized"),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.checkResponsive()),null!==t.options.onInit&&t.options.onInit.call(this,t)},t.prototype.initArrowEvents=function(){var e=this;e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.on("click.slick",{message:"next"},e.changeSlide))},t.prototype.initDotEvents=function(){var t=this;t.options.dots===!0&&t.slideCount>t.options.slidesToShow&&e("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide)},t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.options.pauseOnHover===!0&&t.options.autoplay===!0&&(t.$list.on("mouseenter.slick",t.autoPlayClear),t.$list.on("mouseleave.slick",t.autoPlay)),t.options.accessibility===!0&&t.$list.on("keydown.slick",t.keyHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,function(){t.checkResponsive(),t.setPosition()}),e(window).on("resize.slick.slick-"+t.instanceUid,function(){e(window).width!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.setPosition()},50))}),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.initUI=function(){var e=this;e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&e.$dots.show(),e.options.autoplay===!0&&e.autoPlay()},t.prototype.keyHandler=function(e){var t=this;37===e.keyCode?t.changeSlide({data:{message:"previous"}}):39===e.keyCode&&t.changeSlide({data:{message:"next"}})},t.prototype.lazyLoad=function(){var t,n,r,i,s=this;s.options.centerMode===!0?(r=s.options.slidesToShow+s.currentSlide-1,i=r+s.options.slidesToShow+2):(r=s.options.infinite?s.options.slidesToShow+s.currentSlide:s.currentSlide,i=r+s.options.slidesToShow),t=s.$slider.find(".slick-slide").slice(r,i),e("img[data-lazy]",t).not("[src]").each(function(){e(this).css({opacity:0}).attr("src",e(this).attr("data-lazy")).removeClass("slick-loading").load(function(){e(this).animate({opacity:1},200)})}),s.currentSlide>=s.slideCount-s.options.slidesToShow?(n=s.$slider.find(".slick-cloned").slice(0,s.options.slidesToShow),e("img[data-lazy]",n).not("[src]").each(function(){e(this).css({opacity:0}).attr("src",e(this).attr("data-lazy")).removeClass("slick-loading").load(function(){e(this).animate({opacity:1},200)})})):0===s.currentSlide&&(n=s.$slider.find(".slick-cloned").slice(-1*s.options.slidesToShow),e("img[data-lazy]",n).not("[src]").each(function(){e(this).css({opacity:0}).attr("src",e(this).attr("data-lazy")).removeClass("slick-loading").load(function(){e(this).animate({opacity:1},200)})}))},t.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},t.prototype.postSlide=function(e){var t=this;null!==t.options.onAfterChange&&t.options.onAfterChange.call(this,t,e),t.animating=!1,t.setPosition(),t.swipeLeft=null,t.options.autoplay===!0&&t.paused===!1&&t.autoPlay()},t.prototype.progressiveLazyLoad=function(){var t,n,r=this;t=e("img[data-lazy]").not("[src]").length,t>0&&(n=e(e("img[data-lazy]",r.$slider).not("[src]").get(0)),n.attr("src",n.attr("data-lazy")).removeClass("slick-loading").load(function(){r.progressiveLazyLoad()}))},t.prototype.refresh=function(){var t=this;t.destroy(),e.extend(t,t.initials),t.init()},t.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.setSlideClasses(0),e.setPosition(),null!==e.options.onReInit&&e.options.onReInit.call(this,e)},t.prototype.removeSlide=function(e,t){var n=this;return"boolean"==typeof e?(t=e,e=t===!0?0:n.slideCount-1):e=t===!0?--e:e,n.slideCount<1||0>e||e>n.slideCount-1?!1:(n.unload(),n.$slideTrack.children(this.options.slide).eq(e).remove(),n.$slides=n.$slideTrack.children(this.options.slide),n.$slideTrack.children(this.options.slide).remove(),n.$slideTrack.append(n.$slides),n.$slidesCache=n.$slides,n.reinit(),void 0)},t.prototype.setCSS=function(e){var t,n,r=this,i={};t="left"==r.positionProp?e+"px":"0px",n="top"==r.positionProp?e+"px":"0px",i[r.positionProp]=e,r.transformsEnabled===!1?r.$slideTrack.css(i):(i={},r.cssTransitions===!1?(i[r.animType]="translate("+t+", "+n+")",r.$slideTrack.css(i)):(i[r.animType]="translate3d("+t+", "+n+", 0px)",r.$slideTrack.css(i)))},t.prototype.setDimensions=function(){var e=this;e.options.centerMode===!0?e.$slideTrack.children(".slick-slide").width(e.slideWidth):e.$slideTrack.children(".slick-slide").width(e.slideWidth),e.options.vertical===!1?(e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length)),e.options.centerMode===!0&&e.$list.css({padding:"0px "+e.options.centerPadding})):(e.$list.height(e.$slides.first().outerHeight()*e.options.slidesToShow),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight()*e.$slideTrack.children(".slick-slide").length)),e.options.centerMode===!0&&e.$list.css({padding:e.options.centerPadding+" 0px"}))},t.prototype.setFade=function(){var t,n=this;n.$slides.each(function(r,i){t=-1*n.slideWidth*r,e(i).css({position:"relative",left:t,top:0,zIndex:800,opacity:0})}),n.$slides.eq(n.currentSlide).css({zIndex:900,opacity:1})},t.prototype.setPosition=function(){var e=this;e.setValues(),e.setDimensions(),e.options.fade===!1?e.setCSS(e.getLeft(e.currentSlide)):e.setFade()},t.prototype.setProps=function(){var e=this;e.positionProp=e.options.vertical===!0?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),(void 0!==document.body.style.WebkitTransition||void 0!==document.body.style.MozTransition||void 0!==document.body.style.msTransition)&&e.options.useCSS===!0&&(e.cssTransitions=!0),void 0!==document.body.style.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition"),void 0!==document.body.style.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition"),void 0!==document.body.style.msTransform&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=null!==e.animType},t.prototype.setValues=function(){var e=this;e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),e.slideWidth=e.options.vertical===!1?Math.ceil(e.listWidth/e.options.slidesToShow):Math.ceil(e.listWidth)},t.prototype.setSlideClasses=function(e){var t,n,r,i=this;i.$slider.find(".slick-slide").removeClass("slick-active").removeClass("slick-center"),n=i.$slider.find(".slick-slide"),i.options.centerMode===!0?(t=Math.floor(i.options.slidesToShow/2),e>=t&&e<=i.slideCount-1-t?i.$slides.slice(e-t,e+t+1).addClass("slick-active"):(r=i.options.slidesToShow+e,n.slice(r-t+1,r+t+2).addClass("slick-active")),0===e?n.eq(n.length-1-i.options.slidesToShow).addClass("slick-center"):e===i.slideCount-1&&n.eq(i.options.slidesToShow).addClass("slick-center"),i.$slides.eq(e).addClass("slick-center")):e>0&&e<i.slideCount-i.options.slidesToShow?i.$slides.slice(e,e+i.options.slidesToShow).addClass("slick-active"):(r=i.options.infinite===!0?i.options.slidesToShow+e:e,n.slice(r,r+i.options.slidesToShow).addClass("slick-active")),"ondemand"===i.options.lazyLoad&&i.lazyLoad()},t.prototype.setupInfinite=function(){var t,n,r,i=this;if((i.options.fade===!0||i.options.vertical===!0)&&(i.options.centerMode=!1),i.options.infinite===!0&&i.options.fade===!1&&(n=null,i.slideCount>i.options.slidesToShow)){for(r=i.options.centerMode===!0?i.options.slidesToShow+1:i.options.slidesToShow,t=i.slideCount;t>i.slideCount-r;t-=1)n=t-1,e(i.$slides[n]).clone().attr("id","").prependTo(i.$slideTrack).addClass("slick-cloned");for(t=0;r>t;t+=1)n=t,e(i.$slides[n]).clone().attr("id","").appendTo(i.$slideTrack).addClass("slick-cloned");i.$slideTrack.find(".slick-cloned").find("[id]").each(function(){e(this).attr("id","")})}},t.prototype.slideHandler=function(e){var t,n,r,i,s=null,o=this;return o.animating===!0?!1:(t=e,s=o.getLeft(t),r=o.getLeft(o.currentSlide),i=0!==o.slideCount%o.options.slidesToScroll?o.options.slidesToScroll:0,o.currentLeft=null===o.swipeLeft?r:o.swipeLeft,o.options.infinite===!1&&(0>e||e>o.slideCount-o.options.slidesToShow+i)?(o.options.fade===!1&&(t=o.currentSlide,o.animateSlide(r,function(){o.postSlide(t)})),!1):(o.options.autoplay===!0&&clearInterval(o.autoPlayTimer),n=0>t?0!==o.slideCount%o.options.slidesToScroll?o.slideCount-o.slideCount%o.options.slidesToScroll:o.slideCount-o.options.slidesToScroll:t>o.slideCount-1?0:t,o.animating=!0,null!==o.options.onBeforeChange&&e!==o.currentSlide&&o.options.onBeforeChange.call(this,o,o.currentSlide,n),o.currentSlide=n,o.setSlideClasses(o.currentSlide),o.updateDots(),o.updateArrows(),o.options.fade===!0?(o.fadeSlide(n,function(){o.postSlide(n)}),!1):(o.animateSlide(s,function(){o.postSlide(n)}),void 0)))},t.prototype.startLoad=function(){var e=this;e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},t.prototype.swipeDirection=function(){var e,t,n,r,i=this;return e=i.touchObject.startX-i.touchObject.curX,t=i.touchObject.startY-i.touchObject.curY,n=Math.atan2(t,e),r=Math.round(180*n/Math.PI),0>r&&(r=360-Math.abs(r)),45>=r&&r>=0?"left":360>=r&&r>=315?"left":r>=135&&225>=r?"right":"vertical"},t.prototype.swipeEnd=function(t){var n=this;if(n.$list.removeClass("dragging"),void 0===n.touchObject.curX)return!1;if(n.touchObject.swipeLength>=n.touchObject.minSwipe)switch(e(t.target).on("click.slick",function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e(t.target).off("click.slick")}),n.swipeDirection()){case"left":n.slideHandler(n.currentSlide+n.options.slidesToScroll),n.touchObject={};break;case"right":n.slideHandler(n.currentSlide-n.options.slidesToScroll),n.touchObject={}}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})},t.prototype.swipeHandler=function(e){var t=this;if("ontouchend"in document&&t.options.swipe===!1)return!1;if(t.options.draggable===!1&&!e.originalEvent.touches)return!0;switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},t.prototype.swipeMove=function(e){var t,n,r,i,s=this;return i=void 0!==e.originalEvent?e.originalEvent.touches:null,t=s.getLeft(s.currentSlide),!s.$list.hasClass("dragging")||i&&1!==i.length?!1:(s.touchObject.curX=void 0!==i?i[0].pageX:e.clientX,s.touchObject.curY=void 0!==i?i[0].pageY:e.clientY,s.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(s.touchObject.curX-s.touchObject.startX,2))),n=s.swipeDirection(),"vertical"!==n?(void 0!==e.originalEvent&&s.touchObject.swipeLength>4&&e.preventDefault(),r=s.touchObject.curX>s.touchObject.startX?1:-1,s.swipeLeft=s.options.vertical===!1?t+s.touchObject.swipeLength*r:t+s.touchObject.swipeLength*(s.$list.height()/s.listWidth)*r,s.options.fade===!0||s.options.touchMove===!1?!1:s.animating===!0?(s.swipeLeft=null,!1):(s.setCSS(s.swipeLeft),void 0)):void 0)},t.prototype.swipeStart=function(e){var t,n=this;return 1!==n.touchObject.fingerCount||n.slideCount<=n.options.slidesToShow?(n.touchObject={},!1):(void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),n.touchObject.startX=n.touchObject.curX=void 0!==t?t.pageX:e.clientX,n.touchObject.startY=n.touchObject.curY=void 0!==t?t.pageY:e.clientY,n.$list.addClass("dragging"),void 0)},t.prototype.unfilterSlides=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).remove(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},t.prototype.unload=function(){var t=this;e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&(t.$prevArrow.remove(),t.$nextArrow.remove()),t.$slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style")},t.prototype.updateArrows=function(){var e=this;e.options.arrows===!0&&e.options.infinite!==!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.removeClass("slick-disabled"),e.$nextArrow.removeClass("slick-disabled"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled"),e.$nextArrow.removeClass("slick-disabled")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&(e.$nextArrow.addClass("slick-disabled"),e.$prevArrow.removeClass("slick-disabled")))},t.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active"),e.$dots.find("li").eq(e.currentSlide/e.options.slidesToScroll).addClass("slick-active"))},e.fn.slick=function(e){var n=this;return n.each(function(n,r){r.slick=new t(r,e)})},e.fn.slickAdd=function(e,t,n){var r=this;return r.each(function(r,i){i.slick.addSlide(e,t,n)})},e.fn.slickCurrentSlide=function(){var e=this;return e.get(0).slick.getCurrent()},e.fn.slickFilter=function(e){var t=this;return t.each(function(t,n){n.slick.filterSlides(e)})},e.fn.slickGoTo=function(e){var t=this;return t.each(function(t,n){n.slick.slideHandler(e)})},e.fn.slickNext=function(){var e=this;return e.each(function(e,t){t.slick.changeSlide({data:{message:"next"}})})},e.fn.slickPause=function(){var e=this;return e.each(function(e,t){t.slick.autoPlayClear(),t.slick.paused=!0})},e.fn.slickPlay=function(){var e=this;return e.each(function(e,t){t.slick.paused=!1,t.slick.autoPlay()})},e.fn.slickPrev=function(){var e=this;return e.each(function(e,t){t.slick.changeSlide({data:{message:"previous"}})})},e.fn.slickRemove=function(e,t){var n=this;return n.each(function(n,r){r.slick.removeSlide(e,t)})},e.fn.slickSetOption=function(e,t,n){var r=this;return r.each(function(r,i){i.slick.options[e]=t,n===!0&&(i.slick.unload(),i.slick.reinit())})},e.fn.slickUnfilter=function(){var e=this;return e.each(function(e,t){t.slick.unfilterSlides()})},e.fn.unslick=function(){var e=this;return e.each(function(e,t){t.slick.destroy()})}});(function(t,n,r,i){function h(e,n){this.element=e;this.options=t.extend(true,{},u,n);this.options.share=n.share;this._defaults=u;this._name=o;this.init()}var o="sharrre",u={className:"sharrre",share:{googlePlus:false,facebook:false,twitter:false,digg:false,delicious:false,stumbleupon:false,linkedin:false,pinterest:false},shareTotal:0,template:"",title:"",url:r.location.href,text:r.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:true,enableHover:true,enableCounter:true,enableTracking:false,hover:function(){},hide:function(){},click:function(){},render:function(){},buttons:{googlePlus:{url:"",urlCount:false,size:"medium",lang:"en-US",annotation:""},facebook:{url:"",urlCount:false,action:"like",layout:"button_count",width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US"},twitter:{url:"",urlCount:false,count:"horizontal",hashtags:"",via:"",related:"",lang:"en"},digg:{url:"",urlCount:false,type:"DiggCompact"},delicious:{url:"",urlCount:false,size:"medium"},stumbleupon:{url:"",urlCount:false,layout:"1"},linkedin:{url:"",urlCount:false,counter:""},pinterest:{url:"",media:"",description:"",layout:"horizontal"}}},a={googlePlus:"",facebook:"https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?",twitter:"http://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",digg:"http://services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?",delicious:"http://feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?",stumbleupon:"",linkedin:"http://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?",pinterest:"http://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},f={googlePlus:function(e){var i=e.options.buttons.googlePlus;t(e.element).find(".buttons").append('<div class="button googleplus"><div class="g-plusone" data-size="'+i.size+'" data-href="'+(i.url!==""?i.url:e.options.url)+'" data-annotation="'+i.annotation+'"></div></div>');n.___gcfg={lang:e.options.buttons.googlePlus.lang};var s=0;if(typeof gapi==="undefined"&&s==0){s=1;(function(){var e=r.createElement("script");e.type="text/javascript";e.async=true;e.src="//apis.google.com/js/plusone.js";var t=r.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()}else{gapi.plusone.go()}},facebook:function(e){var n=e.options.buttons.facebook;t(e.element).find(".buttons").append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(n.url!==""?n.url:e.options.url)+'" data-send="'+n.send+'" data-layout="'+n.layout+'" data-width="'+n.width+'" data-show-faces="'+n.faces+'" data-action="'+n.action+'" data-colorscheme="'+n.colorscheme+'" data-font="'+n.font+'" data-via="'+n.via+'"></div></div>');var i=0;if(typeof FB==="undefined"&&i==0){i=1;(function(e,t,r){var i,s=e.getElementsByTagName(t)[0];if(e.getElementById(r)){return}i=e.createElement(t);i.id=r;i.src="//connect.facebook.net/"+n.lang+"/all.js#xfbml=1";s.parentNode.insertBefore(i,s)})(r,"script","facebook-jssdk")}else{FB.XFBML.parse()}},twitter:function(e){var n=e.options.buttons.twitter;t(e.element).find(".buttons").append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(n.url!==""?n.url:e.options.url)+'" data-count="'+n.count+'" data-text="'+e.options.text+'" data-via="'+n.via+'" data-hashtags="'+n.hashtags+'" data-related="'+n.related+'" data-lang="'+n.lang+'">Tweet</a></div>');var i=0;if(typeof twttr==="undefined"&&i==0){i=1;(function(){var e=r.createElement("script");e.type="text/javascript";e.async=true;e.src="//platform.twitter.com/widgets.js";var t=r.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()}else{t.ajax({url:"//platform.twitter.com/widgets.js",dataType:"script",cache:true})}},digg:function(e){var n=e.options.buttons.digg;t(e.element).find(".buttons").append('<div class="button digg"><a class="DiggThisButton '+n.type+'" rel="nofollow external" href="http://digg.com/submit?url='+encodeURIComponent(n.url!==""?n.url:e.options.url)+'"></a></div>');var i=0;if(typeof __DBW==="undefined"&&i==0){i=1;(function(){var e=r.createElement("SCRIPT"),t=r.getElementsByTagName("SCRIPT")[0];e.type="text/javascript";e.async=true;e.src="//widgets.digg.com/buttons.js";t.parentNode.insertBefore(e,t)})()}},delicious:function(e){if(e.options.buttons.delicious.size=="tall"){var n="width:50px;",r="height:35px;width:50px;font-size:15px;line-height:35px;",i="height:18px;line-height:18px;margin-top:3px;"}else{var n="width:93px;",r="float:right;padding:0 3px;height:20px;width:26px;line-height:20px;",i="float:left;height:20px;line-height:20px;"}var s=e.shorterTotal(e.options.count.delicious);if(typeof s==="undefined"){s=0}t(e.element).find(".buttons").append('<div class="button delicious"><div style="'+n+'font:12px Arial,Helvetica,sans-serif;cursor:pointer;color:#666666;display:inline-block;float:none;height:20px;line-height:normal;margin:0;padding:0;text-indent:0;vertical-align:baseline;"><div style="'+r+'background-color:#fff;margin-bottom:5px;overflow:hidden;text-align:center;border:1px solid #ccc;border-radius:3px;">'+s+'</div><div style="'+i+'display:block;padding:0;text-align:center;text-decoration:none;width:50px;background-color:#7EACEE;border:1px solid #40679C;border-radius:3px;color:#fff;"><img src="http://www.delicious.com/static/img/delicious.small.gif" height="10" width="10" alt="Delicious" /> Add</div></div></div>');t(e.element).find(".delicious").on("click",function(){e.openPopup("delicious")})},stumbleupon:function(e){var i=e.options.buttons.stumbleupon;t(e.element).find(".buttons").append('<div class="button stumbleupon"><su:badge layout="'+i.layout+'" location="'+(i.url!==""?i.url:e.options.url)+'"></su:badge></div>');var o=0;if(typeof STMBLPN==="undefined"&&o==0){o=1;(function(){var e=r.createElement("script");e.type="text/javascript";e.async=true;e.src="//platform.stumbleupon.com/1/widgets.js";var t=r.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})();s=n.setTimeout(function(){if(typeof STMBLPN!=="undefined"){STMBLPN.processWidgets();clearInterval(s)}},500)}else{STMBLPN.processWidgets()}},linkedin:function(e){var i=e.options.buttons.linkedin;t(e.element).find(".buttons").append('<div class="button linkedin"><script type="in/share" data-url="'+(i.url!==""?i.url:e.options.url)+'" data-counter="'+i.counter+'"></script></div>');var s=0;if(typeof n.IN==="undefined"&&s==0){s=1;(function(){var e=r.createElement("script");e.type="text/javascript";e.async=true;e.src="//platform.linkedin.com/in.js";var t=r.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()}else{n.IN.init()}},pinterest:function(e){var n=e.options.buttons.pinterest;t(e.element).find(".buttons").append('<div class="button pinterest"><a href="http://pinterest.com/pin/create/button/?url='+(n.url!==""?n.url:e.options.url)+"&media="+n.media+"&description="+n.description+'" class="pin-it-button" count-layout="'+n.layout+'">Pin It</a></div>');(function(){var e=r.createElement("script");e.type="text/javascript";e.async=true;e.src="//assets.pinterest.com/js/pinit.js";var t=r.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()}},l={googlePlus:function(){},facebook:function(){fb=n.setInterval(function(){if(typeof FB!=="undefined"){FB.Event.subscribe("edge.create",function(e){_gaq.push(["_trackSocial","facebook","like",e])});FB.Event.subscribe("edge.remove",function(e){_gaq.push(["_trackSocial","facebook","unlike",e])});FB.Event.subscribe("message.send",function(e){_gaq.push(["_trackSocial","facebook","send",e])});clearInterval(fb)}},1e3)},twitter:function(){tw=n.setInterval(function(){if(typeof twttr!=="undefined"){twttr.events.bind("tweet",function(e){if(e){_gaq.push(["_trackSocial","twitter","tweet"])}});clearInterval(tw)}},1e3)},digg:function(){},delicious:function(){},stumbleupon:function(){},linkedin:function(){function e(){_gaq.push(["_trackSocial","linkedin","share"])}},pinterest:function(){}},c={googlePlus:function(e){n.open("https://plus.google.com/share?hl="+e.buttons.googlePlus.lang+"&url="+encodeURIComponent(e.buttons.googlePlus.url!==""?e.buttons.googlePlus.url:e.url),"","toolbar=0, status=0, width=900, height=500")},facebook:function(e){n.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.buttons.facebook.url!==""?e.buttons.facebook.url:e.url)+"&t="+e.text+"","","toolbar=0, status=0, width=900, height=500")},twitter:function(e){n.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(e.text)+"&url="+encodeURIComponent(e.buttons.twitter.url!==""?e.buttons.twitter.url:e.url)+(e.buttons.twitter.via!==""?"&via="+e.buttons.twitter.via:""),"","toolbar=0, status=0, width=650, height=360")},digg:function(e){n.open("http://digg.com/tools/diggthis/submit?url="+encodeURIComponent(e.buttons.digg.url!==""?e.buttons.digg.url:e.url)+"&title="+e.text+"&related=true&style=true","","toolbar=0, status=0, width=650, height=360")},delicious:function(e){n.open("http://www.delicious.com/save?v=5&noui&jump=close&url="+encodeURIComponent(e.buttons.delicious.url!==""?e.buttons.delicious.url:e.url)+"&title="+e.text,"delicious","toolbar=no,width=550,height=550")},stumbleupon:function(e){n.open("http://www.stumbleupon.com/badge/?url="+encodeURIComponent(e.buttons.delicious.url!==""?e.buttons.delicious.url:e.url),"stumbleupon","toolbar=no,width=550,height=550")},linkedin:function(e){n.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(e.buttons.delicious.url!==""?e.buttons.delicious.url:e.url)+"&token=&isFramed=true","linkedin","toolbar=no,width=550,height=550")},pinterest:function(e){n.open("http://pinterest.com/pin/create/button/?url="+encodeURIComponent(e.buttons.pinterest.url!==""?e.buttons.pinterest.url:e.url)+"&media="+encodeURIComponent(e.buttons.pinterest.media)+"&description="+e.buttons.pinterest.description,"pinterest","toolbar=no,width=700,height=300")}};h.prototype.init=function(){var e=this;if(this.options.urlCurl!==""){a.googlePlus=this.options.urlCurl+"?url={url}&type=googlePlus";a.stumbleupon=this.options.urlCurl+"?url={url}&type=stumbleupon"}t(this.element).addClass(this.options.className);if(typeof t(this.element).data("title")!=="undefined"){this.options.title=t(this.element).attr("data-title")}if(typeof t(this.element).data("url")!=="undefined"){this.options.url=t(this.element).data("url")}if(typeof t(this.element).data("text")!=="undefined"){this.options.text=t(this.element).data("text")}t.each(this.options.share,function(t,n){if(n===true){e.options.shareTotal++}});if(e.options.enableCounter===true){t.each(this.options.share,function(t,n){if(n===true){try{e.getSocialJson(t)}catch(r){}}})}else{if(e.options.template!==""){this.options.render(this,this.options)}else{this.loadButtons()}}t(this.element).hover(function(){if(t(this).find(".buttons").length===0&&e.options.enableHover===true){e.loadButtons()}e.options.hover(e,e.options)},function(){e.options.hide(e,e.options)});t(this.element).click(function(){e.options.click(e,e.options);return false})};h.prototype.loadButtons=function(){var e=this;t(this.element).append('<div class="buttons"></div>');t.each(e.options.share,function(t,n){if(n==true){f[t](e);if(e.options.enableTracking===true){l[t]()}}})};h.prototype.getSocialJson=function(e){var n=this,r=0,i=a[e].replace("{url}",encodeURIComponent(this.options.url));if(this.options.buttons[e].urlCount===true&&this.options.buttons[e].url!==""){i=a[e].replace("{url}",this.options.buttons[e].url)}if(i!=""&&n.options.urlCurl!==""){t.getJSON(i,function(t){if(typeof t.count!=="undefined"){var i=t.count+"";i=i.replace("Â ","");r+=parseInt(i,10)}else{if(t.data&&t.data.length>0&&typeof t.data[0].total_count!=="undefined"){r+=parseInt(t.data[0].total_count,10)}else{if(typeof t[0]!=="undefined"){r+=parseInt(t[0].total_posts,10)}else{if(typeof t[0]!=="undefined"){}}}}n.options.count[e]=r;n.options.total+=r;n.renderer();n.rendererPerso()}).error(function(){n.options.count[e]=0;n.rendererPerso()})}else{n.renderer();n.options.count[e]=0;n.rendererPerso()}};h.prototype.rendererPerso=function(){var t=0;for(e in this.options.count){t++}if(t===this.options.shareTotal){this.options.render(this,this.options)}};h.prototype.renderer=function(){var e=this.options.total,n=this.options.template;if(this.options.shorterTotal===true){e=this.shorterTotal(e)}if(n!==""){n=n.replace("{total}",e);t(this.element).html(n)}else{t(this.element).html('<div class="box"><a class="count" href="#">'+e+"</a>"+(this.options.title!==""?'<a class="share" href="#">'+this.options.title+"</a>":"")+"</div>")}};h.prototype.shorterTotal=function(e){if(e>=1e6){e=(e/1e6).toFixed(2)+"M"}else{if(e>=1e3){e=(e/1e3).toFixed(1)+"k"}}return e};h.prototype.openPopup=function(e){c[e](this.options);if(this.options.enableTracking===true){var t={googlePlus:{site:"Google",action:"+1"},facebook:{site:"facebook",action:"like"},twitter:{site:"twitter",action:"tweet"},digg:{site:"digg",action:"add"},delicious:{site:"delicious",action:"add"},stumbleupon:{site:"stumbleupon",action:"add"},linkedin:{site:"linkedin",action:"share"},pinterest:{site:"pinterest",action:"pin"}};_gaq.push(["_trackSocial",t[e].site,t[e].action])}};h.prototype.simulateClick=function(){var e=t(this.element).html();t(this.element).html(e.replace(this.options.total,this.options.total+1))};h.prototype.update=function(e,t){if(e!==""){this.options.url=e}if(t!==""){this.options.text=t}};t.fn[o]=function(e){var n=arguments;if(e===i||typeof e==="object"){return this.each(function(){if(!t.data(this,"plugin_"+o)){t.data(this,"plugin_"+o,new h(this,e))}})}else{if(typeof e==="string"&&e[0]!=="_"&&e!=="init"){return this.each(function(){var r=t.data(this,"plugin_"+o);if(r instanceof h&&typeof r[e]==="function"){r[e].apply(r,Array.prototype.slice.call(n,1))}})}}}})(jQuery,window,document);!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src.split("?")[0];return t.split("/").length>0?t.split("/").slice(0,-1).join("/")+"/":""}function n(e,t,n){for(var r=0;r<t.length;r++)n(e,t[r])}var r=!1,i=!1,s=0,o=2e3,u=0,a=e,f=["ms","moz","webkit","o"],l=window.requestAnimationFrame||!1,c=window.cancelAnimationFrame||!1;if(!l)for(var h in f){var p=f[h];l||(l=window[p+"RequestAnimationFrame"]),c||(c=window[p+"CancelAnimationFrame"]||window[p+"CancelRequestAnimationFrame"])}var d=window.MutationObserver||window.WebKitMutationObserver||!1,v={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:t()},m=!1,g=function(){function e(){var e=["-moz-grab","-webkit-grab","grab"];(n.ischrome&&!n.ischrome22||n.isie)&&(e=[]);for(var r=0;r<e.length;r++){var i=e[r];if(t.style.cursor=i,t.style.cursor==i)return i}return"url(//mail.google.com/mail/images/2/openhand.cur),n-resize"}if(m)return m;var t=document.createElement("DIV"),n={};n.haspointerlock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,n.isopera="opera"in window,n.isopera12=n.isopera&&"getUserMedia"in navigator,n.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),n.isie="all"in document&&"attachEvent"in t&&!n.isopera,n.isieold=n.isie&&!("msInterpolationMode"in t.style),n.isie7=!(!n.isie||n.isieold||"documentMode"in document&&7!=document.documentMode),n.isie8=n.isie&&"documentMode"in document&&8==document.documentMode,n.isie9=n.isie&&"performance"in window&&document.documentMode>=9,n.isie10=n.isie&&"performance"in window&&document.documentMode>=10,n.isie9mobile=/iemobile.9/i.test(navigator.userAgent),n.isie9mobile&&(n.isie9=!1),n.isie7mobile=!n.isie9mobile&&n.isie7&&/iemobile/i.test(navigator.userAgent),n.ismozilla="MozAppearance"in t.style,n.iswebkit="WebkitAppearance"in t.style,n.ischrome="chrome"in window,n.ischrome22=n.ischrome&&n.haspointerlock,n.ischrome26=n.ischrome&&"transition"in t.style,n.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,n.hasmstouch=window.navigator.msPointerEnabled||!1,n.ismac=/^mac$/i.test(navigator.platform),n.isios=n.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform),n.isios4=n.isios&&!("seal"in Object),n.isandroid=/android/i.test(navigator.userAgent),n.trstyle=!1,n.hastransform=!1,n.hastranslate3d=!1,n.transitionstyle=!1,n.hastransition=!1,n.transitionend=!1;for(var r=["transform","msTransform","webkitTransform","MozTransform","OTransform"],i=0;i<r.length;i++)if(void 0!==t.style[r[i]]){n.trstyle=r[i];break}n.hastransform=0!=n.trstyle,n.hastransform&&(t.style[n.trstyle]="translate3d(1px,2px,3px)",n.hastranslate3d=/translate3d/.test(t.style[n.trstyle])),n.transitionstyle=!1,n.prefixstyle="",n.transitionend=!1;for(var r=["transition","webkitTransition","MozTransition","OTransition","OTransition","msTransition","KhtmlTransition"],s=["","-webkit-","-moz-","-o-","-o","-ms-","-khtml-"],o=["transitionend","webkitTransitionEnd","transitionend","otransitionend","oTransitionEnd","msTransitionEnd","KhtmlTransitionEnd"],i=0;i<r.length;i++)if(r[i]in t.style){n.transitionstyle=r[i],n.prefixstyle=s[i],n.transitionend=o[i];break}return n.ischrome26&&(n.prefixstyle=s[1]),n.hastransition=n.transitionstyle,n.cursorgrabvalue=e(),n.hasmousecapture="setCapture"in t,n.hasMutationObserver=d!==!1,t=null,m=n,n},y=function(e,t){function n(){var e=y.doc.css(E.trstyle);return e&&"matrix"==e.substr(0,6)?e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function f(){var e=y.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var t=e.css("zIndex");if(!isNaN(t)&&0!=t)return parseInt(t);e=e.parent()}return!1}function h(e,t,n){var r=e.css(t),i=parseFloat(r);if(isNaN(i)){i=T[r]||0;var s=3==i?n?y.win.outerHeight()-y.win.innerHeight():y.win.outerWidth()-y.win.innerWidth():1;return y.isie8&&i&&(i+=1),s?i:0}return i}function p(e,t,n,r){y._bind(e,t,function(r){var r=r?r:window.event,i={original:r,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==t?(i.deltaY=-1/40*r.wheelDelta,r.wheelDeltaX&&(i.deltaX=-1/40*r.wheelDeltaX)):i.deltaY=r.detail,n.call(e,i)},r)}function m(e,t,n){var r,i;if(0==e.deltaMode?(r=-Math.floor(e.deltaX*(y.opt.mousescrollstep/54)),i=-Math.floor(e.deltaY*(y.opt.mousescrollstep/54))):1==e.deltaMode&&(r=-Math.floor(e.deltaX*y.opt.mousescrollstep),i=-Math.floor(e.deltaY*y.opt.mousescrollstep)),t&&y.opt.oneaxismousemode&&0==r&&i&&(r=i,i=0),r&&(y.scrollmom&&y.scrollmom.stop(),y.lastdeltax+=r,y.debounced("mousewheelx",function(){var e=y.lastdeltax;y.lastdeltax=0,y.rail.drag||y.doScrollLeftBy(e)},15)),i){if(y.opt.nativeparentscrolling&&n&&!y.ispage&&!y.zoomactive)if(0>i){if(y.getScrollTop()>=y.page.maxh)return!0}else if(y.getScrollTop()<=0)return!0;y.scrollmom&&y.scrollmom.stop(),y.lastdeltay+=i,y.debounced("mousewheely",function(){var e=y.lastdeltay;y.lastdeltay=0,y.rail.drag||y.doScrollBy(e)},15)}return e.stopImmediatePropagation(),e.preventDefault()}var y=this;if(this.version="3.5.6",this.name="nicescroll",this.me=t,this.opt={doc:a("body"),win:!1},a.extend(this.opt,v),this.opt.snapbackspeed=80,e)for(var w in y.opt)void 0!==e[w]&&(y.opt[w]=e[w]);this.doc=y.opt.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(y.opt.win?y.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=y.opt.win!==!1,this.win=y.opt.win||(this.ispage?a(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?a(window):this.win,this.body=a("body"),this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=y.opt.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.isrtlmode="auto"==this.opt.rtlmode?"rtl"==(this.win[0]==window?this.body:this.win).css("direction"):this.opt.rtlmode===!0,this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1;do this.id="ascrail"+o++;while(document.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=y.opt.overflowx,this.overflowy=y.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=g();var E=a.extend({},this.detected);this.canhwscroll=E.hastransform&&y.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&y.haswrapper,this.istouchcapable=!1,E.cantouch&&E.iswebkit&&!E.isios&&!E.isandroid&&(this.istouchcapable=!0,E.cantouch=!1),E.cantouch&&E.ismozilla&&!E.isios&&!E.isandroid&&(this.istouchcapable=!0,E.cantouch=!1),y.opt.enablemouselockapi||(E.hasmousecapture=!1,E.haspointerlock=!1),this.delayed=function(e,t,n,r){var i=y.delaylist[e],s=(new Date).getTime();return!r&&i&&i.tt?!1:(i&&i.tt&&clearTimeout(i.tt),void (i&&i.last+n>s&&!i.tt?y.delaylist[e]={last:s+n,tt:setTimeout(function(){y&&(y.delaylist[e].tt=0,t.call())},n)}:i&&i.tt||(y.delaylist[e]={last:s,tt:0},setTimeout(function(){t.call()},0))))},this.debounced=function(e,t,n){{var r=y.delaylist[e];(new Date).getTime()}y.delaylist[e]=t,r||setTimeout(function(){var t=y.delaylist[e];y.delaylist[e]=!1,t.call()},n)};var S=!1;if(this.synched=function(e,t){function n(){S||(l(function(){S=!1;for(e in y.synclist){var t=y.synclist[e];t&&t.call(y),y.synclist[e]=!1}}),S=!0)}return y.synclist[e]=t,n(),e},this.unsynched=function(e){y.synclist[e]&&(y.synclist[e]=!1)},this.css=function(e,t){for(var n in t)y.saved.css.push([e,n,e.css(n)]),e.css(n,t[n])},this.scrollTop=function(e){return void 0===e?y.getScrollTop():y.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?y.getScrollLeft():y.setScrollLeft(e)},BezierClass=function(e,t,n,r,i,s,o){this.st=e,this.ed=t,this.spd=n,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=o||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st},BezierClass.prototype={B2:function(e){return 3*e*e*(1-e)},B3:function(e){return 3*e*(1-e)*(1-e)},B4:function(e){return(1-e)*(1-e)*(1-e)},getNow:function(){var e=(new Date).getTime(),t=1-(e-this.ts)/this.spd,n=this.B2(t)+this.B3(t)+this.B4(t);return 0>t?this.ed:this.st+Math.round(this.df*n)},update:function(e,t){return this.st=this.getNow(),this.ed=e,this.spd=t,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},E.hastranslate3d&&E.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var t=n();if(t)return 16==t.length?-t[13]:-t[5];if(y.timerscroll&&y.timerscroll.bz)return y.timerscroll.bz.getNow()}return y.doc.translate.y},this.getScrollLeft=function(e){if(!e){var t=n();if(t)return 16==t.length?-t[12]:-t[4];if(y.timerscroll&&y.timerscroll.bh)return y.timerscroll.bh.getNow()}return y.doc.translate.x},this.notifyScrollEvent=document.createEvent?function(e){var t=document.createEvent("UIEvents");t.initUIEvent("scroll",!1,!0,window,1),e.dispatchEvent(t)}:document.fireEvent?function(e){var t=document.createEventObject();e.fireEvent("onscroll"),t.cancelBubble=!0}:function(){};var x=this.isrtlmode?1:-1;E.hastranslate3d&&y.opt.enabletranslate3d?(this.setScrollTop=function(e,t){y.doc.translate.y=e,y.doc.translate.ty=-1*e+"px",y.doc.css(E.trstyle,"translate3d("+y.doc.translate.tx+","+y.doc.translate.ty+",0px)"),t||y.notifyScrollEvent(y.win[0])},this.setScrollLeft=function(e,t){y.doc.translate.x=e,y.doc.translate.tx=e*x+"px",y.doc.css(E.trstyle,"translate3d("+y.doc.translate.tx+","+y.doc.translate.ty+",0px)"),t||y.notifyScrollEvent(y.win[0])}):(this.setScrollTop=function(e,t){y.doc.translate.y=e,y.doc.translate.ty=-1*e+"px",y.doc.css(E.trstyle,"translate("+y.doc.translate.tx+","+y.doc.translate.ty+")"),t||y.notifyScrollEvent(y.win[0])},this.setScrollLeft=function(e,t){y.doc.translate.x=e,y.doc.translate.tx=e*x+"px",y.doc.css(E.trstyle,"translate("+y.doc.translate.tx+","+y.doc.translate.ty+")"),t||y.notifyScrollEvent(y.win[0])})}else this.getScrollTop=function(){return y.docscroll.scrollTop()},this.setScrollTop=function(e){return y.docscroll.scrollTop(e)},this.getScrollLeft=function(){return y.detected.ismozilla&&y.isrtlmode?Math.abs(y.docscroll.scrollLeft()):y.docscroll.scrollLeft()},this.setScrollLeft=function(e){return y.docscroll.scrollLeft(y.detected.ismozilla&&y.isrtlmode?-e:e)};this.getTarget=function(e){return e?e.target?e.target:e.srcElement?e.srcElement:!1:!1},this.hasParent=function(e,t){if(!e)return!1;for(var n=e.target||e.srcElement||e||!1;n&&n.id!=t;)n=n.parentNode||!1;return n!==!1};var T={thin:1,medium:3,thick:5};this.getOffset=function(){if(y.isfixed)return{top:parseFloat(y.win.css("top")),left:parseFloat(y.win.css("left"))};if(!y.viewport)return y.win.offset();var e=y.win.offset(),t=y.viewport.offset();return{top:e.top-t.top+y.viewport.scrollTop(),left:e.left-t.left+y.viewport.scrollLeft()}},this.updateScrollBar=function(e){if(y.ishwscroll)y.rail.css({height:y.win.innerHeight()}),y.railh&&y.railh.css({width:y.win.innerWidth()});else{var t=y.getOffset(),n={top:t.top,left:t.left};n.top+=h(y.win,"border-top-width",!0);{(y.win.outerWidth()-y.win.innerWidth())/2}n.left+=y.rail.align?y.win.outerWidth()-h(y.win,"border-right-width")-y.rail.width:h(y.win,"border-left-width");var r=y.opt.railoffset;if(r&&(r.top&&(n.top+=r.top),y.rail.align&&r.left&&(n.left+=r.left)),y.locked||y.rail.css({top:n.top,left:n.left,height:e?e.h:y.win.innerHeight()}),y.zoom&&y.zoom.css({top:n.top+1,left:1==y.rail.align?n.left-20:n.left+y.rail.width+4}),y.railh&&!y.locked){var n={top:t.top,left:t.left},r=y.opt.railhoffset;r&&(r.top&&(n.top+=r.top),r.left&&(n.left+=r.left));var i=y.railh.align?n.top+h(y.win,"border-top-width",!0)+y.win.innerHeight()-y.railh.height:n.top+h(y.win,"border-top-width",!0),s=n.left+h(y.win,"border-left-width");y.railh.css({top:i,left:s,width:y.railh.width})}}},this.doRailClick=function(e,t,n){var r,i,s,o;y.locked||(y.cancelEvent(e),t?(r=n?y.doScrollLeft:y.doScrollTop,s=n?(e.pageX-y.railh.offset().left-y.cursorwidth/2)*y.scrollratio.x:(e.pageY-y.rail.offset().top-y.cursorheight/2)*y.scrollratio.y,r(s)):(r=n?y.doScrollLeftBy:y.doScrollBy,s=n?y.scroll.x:y.scroll.y,o=n?e.pageX-y.railh.offset().left:e.pageY-y.rail.offset().top,i=n?y.view.w:y.view.h,r(s>=o?i:-i)))},y.hasanimationframe=l,y.hascancelanimationframe=c,y.hasanimationframe?y.hascancelanimationframe||(c=function(){y.cancelAnimationFrame=!0}):(l=function(e){return setTimeout(e,15-Math.floor(+(new Date)/1e3)%16)},c=clearInterval),this.init=function(){function e(t){if(y.selectiondrag){if(t){var n=y.win.outerHeight(),r=t.pageY-y.selectiondrag.top;r>0&&n>r&&(r=0),r>=n&&(r-=n),y.selectiondrag.df=r}if(0!=y.selectiondrag.df){var i=2*-Math.floor(y.selectiondrag.df/6);y.doScrollBy(i),y.debounced("doselectionscroll",function(){e()},50)}}}function t(){y.iframexd=!1;try{{var e="contentDocument"in this?this.contentDocument:this.contentWindow.document;e.domain}}catch(t){y.iframexd=!0,e=!1}if(y.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;if(y.forcescreen=!0,y.isiframe&&(y.iframe={doc:a(e),html:y.doc.contents().find("html")[0],body:y.doc.contents().find("body")[0]},y.getContentSize=function(){return{w:Math.max(y.iframe.html.scrollWidth,y.iframe.body.scrollWidth),h:Math.max(y.iframe.html.scrollHeight,y.iframe.body.scrollHeight)}},y.docscroll=a(y.iframe.body)),!E.isios&&y.opt.iframeautoresize&&!y.isiframe){y.win.scrollTop(0),y.doc.height("");var n=Math.max(e.getElementsByTagName("html")[0].scrollHeight,e.body.scrollHeight);y.doc.height(n)}y.lazyResize(30),E.isie7&&y.css(a(y.iframe.html),{"overflow-y":"hidden"}),y.css(a(y.iframe.body),{"overflow-y":"hidden"}),E.isios&&y.haswrapper&&y.css(a(e.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?y.bind(this.contentWindow,"scroll",y.onscroll):y.bind(e,"scroll",y.onscroll),y.opt.enablemousewheel&&y.bind(e,"mousewheel",y.onmousewheel),y.opt.enablekeyboard&&y.bind(e,E.isopera?"keypress":"keydown",y.onkeypress),(E.cantouch||y.opt.touchbehavior)&&(y.bind(e,"mousedown",y.ontouchstart),y.bind(e,"mousemove",function(e){y.ontouchmove(e,!0)}),y.opt.grabcursorenabled&&E.cursorgrabvalue&&y.css(a(e.body),{cursor:E.cursorgrabvalue})),y.bind(e,"mouseup",y.ontouchend),y.zoom&&(y.opt.dblclickzoom&&y.bind(e,"dblclick",y.doZoom),y.ongesturezoom&&y.bind(e,"gestureend",y.ongesturezoom))}if(y.saved.css=[],E.isie7mobile)return!0;if(E.isoperamini)return!0;if(E.hasmstouch&&y.css(y.ispage?a("html"):y.win,{"-ms-touch-action":"none"}),y.zindex="auto",y.zindex=y.ispage||"auto"!=y.opt.zindex?y.opt.zindex:f()||"auto",y.ispage||"auto"==y.zindex||y.zindex>u&&(u=y.zindex),y.isie&&0==y.zindex&&"auto"==y.opt.zindex&&(y.zindex="auto"),!y.ispage||!E.cantouch&&!E.isieold&&!E.isie9mobile){var n=y.docscroll;y.ispage&&(n=y.haswrapper?y.win:y.doc),E.isie9mobile||y.css(n,{"overflow-y":"hidden"}),y.ispage&&E.isie7&&("BODY"==y.doc[0].nodeName?y.css(a("html"),{"overflow-y":"hidden"}):"HTML"==y.doc[0].nodeName&&y.css(a("body"),{"overflow-y":"hidden"})),!E.isios||y.ispage||y.haswrapper||y.css(a("body"),{"-webkit-overflow-scrolling":"touch"});var o=a(document.createElement("div"));o.css({position:"relative",top:0,"float":"right",width:y.opt.cursorwidth,height:"0px","background-color":y.opt.cursorcolor,border:y.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":y.opt.cursorborderradius,"-moz-border-radius":y.opt.cursorborderradius,"border-radius":y.opt.cursorborderradius}),o.hborder=parseFloat(o.outerHeight()-o.innerHeight()),y.cursor=o;var l=a(document.createElement("div"));l.attr("id",y.id),l.addClass("nicescroll-rails");var c,h,p=["left","right"];for(var v in p)h=p[v],c=y.opt.railpadding[h],c?l.css("padding-"+h,c+"px"):y.opt.railpadding[h]=0;l.append(o),l.width=Math.max(parseFloat(y.opt.cursorwidth),o.outerWidth())+y.opt.railpadding.left+y.opt.railpadding.right,l.css({width:l.width+"px",zIndex:y.zindex,background:y.opt.background,cursor:"default"}),l.visibility=!0,l.scrollable=!0,l.align="left"==y.opt.railalign?0:1,y.rail=l,y.rail.drag=!1;var m=!1;if(!y.opt.boxzoom||y.ispage||E.isieold||(m=document.createElement("div"),y.bind(m,"click",y.doZoom),y.zoom=a(m),y.zoom.css({cursor:"pointer","z-index":y.zindex,backgroundImage:"url("+y.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),y.opt.dblclickzoom&&y.bind(y.win,"dblclick",y.doZoom),E.cantouch&&y.opt.gesturezoom&&(y.ongesturezoom=function(e){return e.scale>1.5&&y.doZoomIn(e),e.scale<.8&&y.doZoomOut(e),y.cancelEvent(e)},y.bind(y.win,"gestureend",y.ongesturezoom))),y.railh=!1,y.opt.horizrailenabled){y.css(n,{"overflow-x":"hidden"});var o=a(document.createElement("div"));o.css({position:"absolute",top:0,height:y.opt.cursorwidth,width:"0px","background-color":y.opt.cursorcolor,border:y.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":y.opt.cursorborderradius,"-moz-border-radius":y.opt.cursorborderradius,"border-radius":y.opt.cursorborderradius}),o.wborder=parseFloat(o.outerWidth()-o.innerWidth()),y.cursorh=o;var g=a(document.createElement("div"));g.attr("id",y.id+"-hr"),g.addClass("nicescroll-rails"),g.height=Math.max(parseFloat(y.opt.cursorwidth),o.outerHeight()),g.css({height:g.height+"px",zIndex:y.zindex,background:y.opt.background}),g.append(o),g.visibility=!0,g.scrollable=!0,g.align="top"==y.opt.railvalign?0:1,y.railh=g,y.railh.drag=!1}if(y.ispage)l.css({position:"fixed",top:"0px",height:"100%"}),l.css(l.align?{right:"0px"}:{left:"0px"}),y.body.append(l),y.railh&&(g.css({position:"fixed",left:"0px",width:"100%"}),g.css(g.align?{bottom:"0px"}:{top:"0px"}),y.body.append(g));else{if(y.ishwscroll){"static"==y.win.css("position")&&y.css(y.win,{position:"relative"});var w="HTML"==y.win[0].nodeName?y.body:y.win;y.zoom&&(y.zoom.css({position:"absolute",top:1,right:0,"margin-right":l.width+4}),w.append(y.zoom)),l.css({position:"absolute",top:0}),l.css(l.align?{right:0}:{left:0}),w.append(l),g&&(g.css({position:"absolute",left:0,bottom:0}),g.css(g.align?{bottom:0}:{top:0}),w.append(g))}else{y.isfixed="fixed"==y.win.css("position");var S=y.isfixed?"fixed":"absolute";y.isfixed||(y.viewport=y.getViewport(y.win[0])),y.viewport&&(y.body=y.viewport,0==/fixed|relative|absolute/.test(y.viewport.css("position"))&&y.css(y.viewport,{position:"relative"})),l.css({position:S}),y.zoom&&y.zoom.css({position:S}),y.updateScrollBar(),y.body.append(l),y.zoom&&y.body.append(y.zoom),y.railh&&(g.css({position:S}),y.body.append(g))}E.isios&&y.css(y.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),E.isie&&y.opt.disableoutline&&y.win.attr("hideFocus","true"),E.iswebkit&&y.opt.disableoutline&&y.win.css({outline:"none"})}if(y.opt.autohidemode===!1?(y.autohidedom=!1,y.rail.css({opacity:y.opt.cursoropacitymax}),y.railh&&y.railh.css({opacity:y.opt.cursoropacitymax})):y.opt.autohidemode===!0||"leave"===y.opt.autohidemode?(y.autohidedom=a().add(y.rail),E.isie8&&(y.autohidedom=y.autohidedom.add(y.cursor)),y.railh&&(y.autohidedom=y.autohidedom.add(y.railh)),y.railh&&E.isie8&&(y.autohidedom=y.autohidedom.add(y.cursorh))):"scroll"==y.opt.autohidemode?(y.autohidedom=a().add(y.rail),y.railh&&(y.autohidedom=y.autohidedom.add(y.railh))):"cursor"==y.opt.autohidemode?(y.autohidedom=a().add(y.cursor),y.railh&&(y.autohidedom=y.autohidedom.add(y.cursorh))):"hidden"==y.opt.autohidemode&&(y.autohidedom=!1,y.hide(),y.locked=!1),E.isie9mobile){y.scrollmom=new b(y),y.onmangotouch=function(){var e=y.getScrollTop(),t=y.getScrollLeft();if(e==y.scrollmom.lastscrolly&&t==y.scrollmom.lastscrollx)return!0;var n=e-y.mangotouch.sy,r=t-y.mangotouch.sx,i=Math.round(Math.sqrt(Math.pow(r,2)+Math.pow(n,2)));if(0!=i){var s=0>n?-1:1,o=0>r?-1:1,u=+(new Date);if(y.mangotouch.lazy&&clearTimeout(y.mangotouch.lazy),u-y.mangotouch.tm>80||y.mangotouch.dry!=s||y.mangotouch.drx!=o)y.scrollmom.stop(),y.scrollmom.reset(t,e),y.mangotouch.sy=e,y.mangotouch.ly=e,y.mangotouch.sx=t,y.mangotouch.lx=t,y.mangotouch.dry=s,y.mangotouch.drx=o,y.mangotouch.tm=u;else{y.scrollmom.stop(),y.scrollmom.update(y.mangotouch.sx-r,y.mangotouch.sy-n);{u-y.mangotouch.tm}y.mangotouch.tm=u;var a=Math.max(Math.abs(y.mangotouch.ly-e),Math.abs(y.mangotouch.lx-t));y.mangotouch.ly=e,y.mangotouch.lx=t,a>2&&(y.mangotouch.lazy=setTimeout(function(){y.mangotouch.lazy=!1,y.mangotouch.dry=0,y.mangotouch.drx=0,y.mangotouch.tm=0,y.scrollmom.doMomentum(30)},100))}}};var x=y.getScrollTop(),T=y.getScrollLeft();y.mangotouch={sy:x,ly:x,dry:0,sx:T,lx:T,drx:0,lazy:!1,tm:0},y.bind(y.docscroll,"scroll",y.onmangotouch)}else{if(E.cantouch||y.istouchcapable||y.opt.touchbehavior||E.hasmstouch){y.scrollmom=new b(y),y.ontouchstart=function(e){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(y.hasmoving=!1,!y.locked){if(E.hasmstouch)for(var t=e.target?e.target:!1;t;){var n=a(t).getNiceScroll();if(n.length>0&&n[0].me==y.me)break;if(n.length>0)return!1;if("DIV"==t.nodeName&&t.id==y.id)break;t=t.parentNode?t.parentNode:!1}y.cancelScroll();var t=y.getTarget(e);if(t){var r=/INPUT/i.test(t.nodeName)&&/range/i.test(t.type);if(r)return y.stopPropagation(e)}if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),y.forcescreen){var i=e,e={original:e.original?e.original:e};e.clientX=i.screenX,e.clientY=i.screenY}if(y.rail.drag={x:e.clientX,y:e.clientY,sx:y.scroll.x,sy:y.scroll.y,st:y.getScrollTop(),sl:y.getScrollLeft(),pt:2,dl:!1},y.ispage||!y.opt.directionlockdeadzone)y.rail.drag.dl="f";else{var s={w:a(window).width(),h:a(window).height()},o={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},u=Math.max(0,o.h-s.h),f=Math.max(0,o.w-s.w);y.rail.drag.ck=!y.rail.scrollable&&y.railh.scrollable?u>0?"v":!1:y.rail.scrollable&&!y.railh.scrollable&&f>0?"h":!1,y.rail.drag.ck||(y.rail.drag.dl="f")}if(y.opt.touchbehavior&&y.isiframe&&E.isie){var l=y.win.position();y.rail.drag.x+=l.left,y.rail.drag.y+=l.top}if(y.hasmoving=!1,y.lastmouseup=!1,y.scrollmom.reset(e.clientX,e.clientY),!E.cantouch&&!this.istouchcapable&&!E.hasmstouch){var c=t?/INPUT|SELECT|TEXTAREA/i.test(t.nodeName):!1;if(!c)return!y.ispage&&E.hasmousecapture&&t.setCapture(),y.opt.touchbehavior?(t.onclick&&!t._onclick&&(t._onclick=t.onclick,t.onclick=function(e){return y.hasmoving?!1:void t._onclick.call(this,e)}),y.cancelEvent(e)):y.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(a(t).attr("type"))&&(pc={tg:t,click:!1},y.preventclick=pc)}}},y.ontouchend=function(e){return e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType?!1:y.rail.drag&&2==y.rail.drag.pt&&(y.scrollmom.doMomentum(),y.rail.drag=!1,y.hasmoving&&(y.lastmouseup=!0,y.hideCursor(),E.hasmousecapture&&document.releaseCapture(),!E.cantouch))?y.cancelEvent(e):void 0};var N=y.opt.touchbehavior&&y.isiframe&&!E.hasmousecapture;y.ontouchmove=function(e,t){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(y.rail.drag&&2==y.rail.drag.pt){if(E.cantouch&&void 0===e.original)return!0;y.hasmoving=!0,y.preventclick&&!y.preventclick.click&&(y.preventclick.click=y.preventclick.tg.onclick||!1,y.preventclick.tg.onclick=y.onpreventclick);var n=a.extend({original:e},e);if(e=n,"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),y.forcescreen){var r=e,e={original:e.original?e.original:e};e.clientX=r.screenX,e.clientY=r.screenY}var i=ofy=0;if(N&&!t){var s=y.win.position();i=-s.left,ofy=-s.top}var o=e.clientY+ofy,u=o-y.rail.drag.y,f=e.clientX+i,l=f-y.rail.drag.x,c=y.rail.drag.st-u;if(y.ishwscroll&&y.opt.bouncescroll?0>c?c=Math.round(c/2):c>y.page.maxh&&(c=y.page.maxh+Math.round((c-y.page.maxh)/2)):(0>c&&(c=0,o=0),c>y.page.maxh&&(c=y.page.maxh,o=0)),y.railh&&y.railh.scrollable){var h=y.isrtlmode?l-y.rail.drag.sl:y.rail.drag.sl-l;y.ishwscroll&&y.opt.bouncescroll?0>h?h=Math.round(h/2):h>y.page.maxw&&(h=y.page.maxw+Math.round((h-y.page.maxw)/2)):(0>h&&(h=0,f=0),h>y.page.maxw&&(h=y.page.maxw,f=0))}var p=!1;if(y.rail.drag.dl)p=!0,"v"==y.rail.drag.dl?h=y.rail.drag.sl:"h"==y.rail.drag.dl&&(c=y.rail.drag.st);else{var d=Math.abs(u),v=Math.abs(l),m=y.opt.directionlockdeadzone;if("v"==y.rail.drag.ck){if(d>m&&.3*d>=v)return y.rail.drag=!1,!0;v>m&&(y.rail.drag.dl="f",a("body").scrollTop(a("body").scrollTop()))}else if("h"==y.rail.drag.ck){if(v>m&&.3*v>=d)return y.rail.drag=!1,!0;d>m&&(y.rail.drag.dl="f",a("body").scrollLeft(a("body").scrollLeft()))}}if(y.synched("touchmove",function(){y.rail.drag&&2==y.rail.drag.pt&&(y.prepareTransition&&y.prepareTransition(0),y.rail.scrollable&&y.setScrollTop(c),y.scrollmom.update(f,o),y.railh&&y.railh.scrollable?(y.setScrollLeft(h),y.showCursor(c,h)):y.showCursor(c),E.isie10&&document.selection.clear())}),E.ischrome&&y.istouchcapable&&(p=!1),p)return y.cancelEvent(e)}}}y.onmousedown=function(e,t){if(!y.rail.drag||1==y.rail.drag.pt){if(y.locked)return y.cancelEvent(e);y.cancelScroll(),y.rail.drag={x:e.clientX,y:e.clientY,sx:y.scroll.x,sy:y.scroll.y,pt:1,hr:!!t};var n=y.getTarget(e);return!y.ispage&&E.hasmousecapture&&n.setCapture(),y.isiframe&&!E.hasmousecapture&&(y.saved.csspointerevents=y.doc.css("pointer-events"),y.css(y.doc,{"pointer-events":"none"})),y.hasmoving=!1,y.cancelEvent(e)}},y.onmouseup=function(e){if(y.rail.drag){if(E.hasmousecapture&&document.releaseCapture(),y.isiframe&&!E.hasmousecapture&&y.doc.css("pointer-events",y.saved.csspointerevents),1!=y.rail.drag.pt)return;return y.rail.drag=!1,y.hasmoving&&y.triggerScrollEnd(),y.cancelEvent(e)}},y.onmousemove=function(e){if(y.rail.drag){if(1!=y.rail.drag.pt)return;if(E.ischrome&&0==e.which)return y.onmouseup(e);if(y.cursorfreezed=!0,y.hasmoving=!0,y.rail.drag.hr){y.scroll.x=y.rail.drag.sx+(e.clientX-y.rail.drag.x),y.scroll.x<0&&(y.scroll.x=0);var t=y.scrollvaluemaxw;y.scroll.x>t&&(y.scroll.x=t)}else{y.scroll.y=y.rail.drag.sy+(e.clientY-y.rail.drag.y),y.scroll.y<0&&(y.scroll.y=0);var n=y.scrollvaluemax;y.scroll.y>n&&(y.scroll.y=n)}return y.synched("mousemove",function(){y.rail.drag&&1==y.rail.drag.pt&&(y.showCursor(),y.rail.drag.hr?y.doScrollLeft(Math.round(y.scroll.x*y.scrollratio.x),y.opt.cursordragspeed):y.doScrollTop(Math.round(y.scroll.y*y.scrollratio.y),y.opt.cursordragspeed))}),y.cancelEvent(e)}},E.cantouch||y.opt.touchbehavior?(y.onpreventclick=function(e){return y.preventclick?(y.preventclick.tg.onclick=y.preventclick.click,y.preventclick=!1,y.cancelEvent(e)):void 0},y.bind(y.win,"mousedown",y.ontouchstart),y.onclick=E.isios?!1:function(e){return y.lastmouseup?(y.lastmouseup=!1,y.cancelEvent(e)):!0},y.opt.grabcursorenabled&&E.cursorgrabvalue&&(y.css(y.ispage?y.doc:y.win,{cursor:E.cursorgrabvalue}),y.css(y.rail,{cursor:E.cursorgrabvalue}))):(y.hasTextSelected="getSelection"in document?function(){return document.getSelection().rangeCount>0}:"selection"in document?function(){return"None"!=document.selection.type}:function(){return!1},y.onselectionstart=function(){y.ispage||(y.selectiondrag=y.win.offset())},y.onselectionend=function(){y.selectiondrag=!1},y.onselectiondrag=function(t){y.selectiondrag&&y.hasTextSelected()&&y.debounced("selectionscroll",function(){e(t)},250)}),E.hasmstouch&&(y.css(y.rail,{"-ms-touch-action":"none"}),y.css(y.cursor,{"-ms-touch-action":"none"}),y.bind(y.win,"MSPointerDown",y.ontouchstart),y.bind(document,"MSPointerUp",y.ontouchend),y.bind(document,"MSPointerMove",y.ontouchmove),y.bind(y.cursor,"MSGestureHold",function(e){e.preventDefault()}),y.bind(y.cursor,"contextmenu",function(e){e.preventDefault()})),this.istouchcapable&&(y.bind(y.win,"touchstart",y.ontouchstart),y.bind(document,"touchend",y.ontouchend),y.bind(document,"touchcancel",y.ontouchend),y.bind(document,"touchmove",y.ontouchmove)),y.bind(y.cursor,"mousedown",y.onmousedown),y.bind(y.cursor,"mouseup",y.onmouseup),y.railh&&(y.bind(y.cursorh,"mousedown",function(e){y.onmousedown(e,!0)}),y.bind(y.cursorh,"mouseup",y.onmouseup)),(y.opt.cursordragontouch||!E.cantouch&&!y.opt.touchbehavior)&&(y.rail.css({cursor:"default"}),y.railh&&y.railh.css({cursor:"default"}),y.jqbind(y.rail,"mouseenter",function(){return y.win.is(":visible")?(y.canshowonmouseevent&&y.showCursor(),void (y.rail.active=!0)):!1}),y.jqbind(y.rail,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}),y.opt.sensitiverail&&(y.bind(y.rail,"click",function(e){y.doRailClick(e,!1,!1)}),y.bind(y.rail,"dblclick",function(e){y.doRailClick(e,!0,!1)}),y.bind(y.cursor,"click",function(e){y.cancelEvent(e)}),y.bind(y.cursor,"dblclick",function(e){y.cancelEvent(e)})),y.railh&&(y.jqbind(y.railh,"mouseenter",function(){return y.win.is(":visible")?(y.canshowonmouseevent&&y.showCursor(),void (y.rail.active=!0)):!1}),y.jqbind(y.railh,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}),y.opt.sensitiverail&&(y.bind(y.railh,"click",function(e){y.doRailClick(e,!1,!0)}),y.bind(y.railh,"dblclick",function(e){y.doRailClick(e,!0,!0)}),y.bind(y.cursorh,"click",function(e){y.cancelEvent(e)}),y.bind(y.cursorh,"dblclick",function(e){y.cancelEvent(e)})))),E.cantouch||y.opt.touchbehavior?(y.bind(E.hasmousecapture?y.win:document,"mouseup",y.ontouchend),y.bind(document,"mousemove",y.ontouchmove),y.onclick&&y.bind(document,"click",y.onclick),y.opt.cursordragontouch&&(y.bind(y.cursor,"mousedown",y.onmousedown),y.bind(y.cursor,"mousemove",y.onmousemove),y.cursorh&&y.bind(y.cursorh,"mousedown",function(e){y.onmousedown(e,!0)}),y.cursorh&&y.bind(y.cursorh,"mousemove",y.onmousemove))):(y.bind(E.hasmousecapture?y.win:document,"mouseup",y.onmouseup),y.bind(document,"mousemove",y.onmousemove),y.onclick&&y.bind(document,"click",y.onclick),!y.ispage&&y.opt.enablescrollonselection&&(y.bind(y.win[0],"mousedown",y.onselectionstart),y.bind(document,"mouseup",y.onselectionend),y.bind(y.cursor,"mouseup",y.onselectionend),y.cursorh&&y.bind(y.cursorh,"mouseup",y.onselectionend),y.bind(document,"mousemove",y.onselectiondrag)),y.zoom&&(y.jqbind(y.zoom,"mouseenter",function(){y.canshowonmouseevent&&y.showCursor(),y.rail.active=!0}),y.jqbind(y.zoom,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}))),y.opt.enablemousewheel&&(y.isiframe||y.bind(E.isie&&y.ispage?document:y.win,"mousewheel",y.onmousewheel),y.bind(y.rail,"mousewheel",y.onmousewheel),y.railh&&y.bind(y.railh,"mousewheel",y.onmousewheelhr)),y.ispage||E.cantouch||/HTML|^BODY/.test(y.win[0].nodeName)||(y.win.attr("tabindex")||y.win.attr({tabindex:s++}),y.jqbind(y.win,"focus",function(e){r=y.getTarget(e).id||!0,y.hasfocus=!0,y.canshowonmouseevent&&y.noticeCursor()}),y.jqbind(y.win,"blur",function(){r=!1,y.hasfocus=!1}),y.jqbind(y.win,"mouseenter",function(e){i=y.getTarget(e).id||!0,y.hasmousefocus=!0,y.canshowonmouseevent&&y.noticeCursor()}),y.jqbind(y.win,"mouseleave",function(){i=!1,y.hasmousefocus=!1,y.rail.drag||y.hideCursor()}))}if(y.onkeypress=function(e){if(y.locked&&0==y.page.maxh)return!0;e=e?e:window.e;var t=y.getTarget(e);if(t&&/INPUT|TEXTAREA|SELECT|OPTION/.test(t.nodeName)){var n=t.getAttribute("type")||t.type||!1;if(!n||!/submit|button|cancel/i.tp)return!0}if(a(t).attr("contenteditable"))return!0;if(y.hasfocus||y.hasmousefocus&&!r||y.ispage&&!r&&!i){var s=e.keyCode;if(y.locked&&27!=s)return y.cancelEvent(e);var o=e.ctrlKey||!1,u=e.shiftKey||!1,f=!1;switch(s){case 38:case 63233:y.doScrollBy(72),f=!0;break;case 40:case 63235:y.doScrollBy(-72),f=!0;break;case 37:case 63232:y.railh&&(o?y.doScrollLeft(0):y.doScrollLeftBy(72),f=!0);break;case 39:case 63234:y.railh&&(o?y.doScrollLeft(y.page.maxw):y.doScrollLeftBy(-72),f=!0);break;case 33:case 63276:y.doScrollBy(y.view.h),f=!0;break;case 34:case 63277:y.doScrollBy(-y.view.h),f=!0;break;case 36:case 63273:y.railh&&o?y.doScrollPos(0,0):y.doScrollTo(0),f=!0;break;case 35:case 63275:y.railh&&o?y.doScrollPos(y.page.maxw,y.page.maxh):y.doScrollTo(y.page.maxh),f=!0;break;case 32:y.opt.spacebarenabled&&(y.doScrollBy(u?y.view.h:-y.view.h),f=!0);break;case 27:y.zoomactive&&(y.doZoom(),f=!0)}if(f)return y.cancelEvent(e)}},y.opt.enablekeyboard&&y.bind(document,E.isopera&&!E.isopera12?"keypress":"keydown",y.onkeypress),y.bind(document,"keydown",function(e){var t=e.ctrlKey||!1;t&&(y.wheelprevented=!0)}),y.bind(document,"keyup",function(e){var t=e.ctrlKey||!1;t||(y.wheelprevented=!1)}),y.bind(window,"resize",y.lazyResize),y.bind(window,"orientationchange",y.lazyResize),y.bind(window,"load",y.lazyResize),E.ischrome&&!y.ispage&&!y.haswrapper){var C=y.win.attr("style"),k=parseFloat(y.win.css("width"))+1;y.win.css("width",k),y.synched("chromefix",function(){y.win.attr("style",C)})}y.onAttributeChange=function(){y.lazyResize(250)},y.ispage||y.haswrapper||(d!==!1?(y.observer=new d(function(e){e.forEach(y.onAttributeChange)}),y.observer.observe(y.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),y.observerremover=new d(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var t in e.removedNodes)if(e.removedNodes[t]==y.win[0])return y.remove()})}),y.observerremover.observe(y.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(y.bind(y.win,E.isie&&!E.isie9?"propertychange":"DOMAttrModified",y.onAttributeChange),E.isie9&&y.win[0].attachEvent("onpropertychange",y.onAttributeChange),y.bind(y.win,"DOMNodeRemoved",function(e){e.target==y.win[0]&&y.remove()}))),!y.ispage&&y.opt.boxzoom&&y.bind(window,"resize",y.resizeZoom),y.istextarea&&y.bind(y.win,"mouseup",y.lazyResize),y.lazyResize(30)}"IFRAME"==this.doc[0].nodeName&&(this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){t.call(y.doc[0],!1)},500),y.bind(this.doc,"load",t))},this.showCursor=function(e,t){y.cursortimeout&&(clearTimeout(y.cursortimeout),y.cursortimeout=0),y.rail&&(y.autohidedom&&(y.autohidedom.stop().css({opacity:y.opt.cursoropacitymax}),y.cursoractive=!0),y.rail.drag&&1==y.rail.drag.pt||(void 0!==e&&e!==!1&&(y.scroll.y=Math.round(1*e/y.scrollratio.y)),void 0!==t&&(y.scroll.x=Math.round(1*t/y.scrollratio.x))),y.cursor.css({height:y.cursorheight,top:y.scroll.y}),y.cursorh&&(y.cursorh.css(!y.rail.align&&y.rail.visibility?{width:y.cursorwidth,left:y.scroll.x+y.rail.width}:{width:y.cursorwidth,left:y.scroll.x}),y.cursoractive=!0),y.zoom&&y.zoom.stop().css({opacity:y.opt.cursoropacitymax}))},this.hideCursor=function(e){y.cursortimeout||y.rail&&y.autohidedom&&(y.hasmousefocus&&"leave"==y.opt.autohidemode||(y.cursortimeout=setTimeout(function(){y.rail.active&&y.showonmouseevent||(y.autohidedom.stop().animate({opacity:y.opt.cursoropacitymin}),y.zoom&&y.zoom.stop().animate({opacity:y.opt.cursoropacitymin}),y.cursoractive=!1),y.cursortimeout=0},e||y.opt.hidecursordelay)))},this.noticeCursor=function(e,t,n){y.showCursor(t,n),y.rail.active||y.hideCursor(e)},this.getContentSize=y.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:y.haswrapper?function(){return{w:y.doc.outerWidth()+parseInt(y.win.css("paddingLeft"))+parseInt(y.win.css("paddingRight")),h:y.doc.outerHeight()+parseInt(y.win.css("paddingTop"))+parseInt(y.win.css("paddingBottom"))}}:function(){return{w:y.docscroll[0].scrollWidth,h:y.docscroll[0].scrollHeight}},this.onResize=function(e,t){if(!y||!y.win)return!1;if(!y.haswrapper&&!y.ispage){if("none"==y.win.css("display"))return y.visibility&&y.hideRail().hideRailHr(),!1;y.hidden||y.visibility||y.showRail().showRailHr()}var n=y.page.maxh,r=y.page.maxw,i={h:y.view.h,w:y.view.w};if(y.view={w:y.ispage?y.win.width():parseInt(y.win[0].clientWidth),h:y.ispage?y.win.height():parseInt(y.win[0].clientHeight)},y.page=t?t:y.getContentSize(),y.page.maxh=Math.max(0,y.page.h-y.view.h),y.page.maxw=Math.max(0,y.page.w-y.view.w),y.page.maxh==n&&y.page.maxw==r&&y.view.w==i.w){if(y.ispage)return y;var s=y.win.offset();if(y.lastposition){var o=y.lastposition;if(o.top==s.top&&o.left==s.left)return y}y.lastposition=s}if(0==y.page.maxh?(y.hideRail(),y.scrollvaluemax=0,y.scroll.y=0,y.scrollratio.y=0,y.cursorheight=0,y.setScrollTop(0),y.rail.scrollable=!1):y.rail.scrollable=!0,0==y.page.maxw?(y.hideRailHr(),y.scrollvaluemaxw=0,y.scroll.x=0,y.scrollratio.x=0,y.cursorwidth=0,y.setScrollLeft(0),y.railh.scrollable=!1):y.railh.scrollable=!0,y.locked=0==y.page.maxh&&0==y.page.maxw,y.locked)return y.ispage||y.updateScrollBar(y.view),!1;y.hidden||y.visibility?y.hidden||y.railh.visibility||y.showRailHr():y.showRail().showRailHr(),y.istextarea&&y.win.css("resize")&&"none"!=y.win.css("resize")&&(y.view.h-=20),y.cursorheight=Math.min(y.view.h,Math.round(y.view.h*(y.view.h/y.page.h))),y.cursorheight=y.opt.cursorfixedheight?y.opt.cursorfixedheight:Math.max(y.opt.cursorminheight,y.cursorheight),y.cursorwidth=Math.min(y.view.w,Math.round(y.view.w*(y.view.w/y.page.w))),y.cursorwidth=y.opt.cursorfixedheight?y.opt.cursorfixedheight:Math.max(y.opt.cursorminheight,y.cursorwidth),y.scrollvaluemax=y.view.h-y.cursorheight-y.cursor.hborder,y.railh&&(y.railh.width=y.page.maxh>0?y.view.w-y.rail.width:y.view.w,y.scrollvaluemaxw=y.railh.width-y.cursorwidth-y.cursorh.wborder),y.ispage||y.updateScrollBar(y.view),y.scrollratio={x:y.page.maxw/y.scrollvaluemaxw,y:y.page.maxh/y.scrollvaluemax};var u=y.getScrollTop();return u>y.page.maxh?y.doScrollTop(y.page.maxh):(y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.scroll.x=Math.round(y.getScrollLeft()*(1/y.scrollratio.x)),y.cursoractive&&y.noticeCursor()),y.scroll.y&&0==y.getScrollTop()&&y.doScrollTo(Math.floor(y.scroll.y*y.scrollratio.y)),y},this.resize=y.onResize,this.lazyResize=function(e){return e=isNaN(e)?30:e,y.delayed("resize",y.resize,e),y},this._bind=function(e,t,n,r){y.events.push({e:e,n:t,f:n,b:r,q:!1}),e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},this.jqbind=function(e,t,n){y.events.push({e:e,n:t,f:n,q:!0}),a(e).bind(t,n)},this.bind=function(e,t,n,r){var i="jquery"in e?e[0]:e;if("mousewheel"==t)if("onwheel"in document||document.documentMode>=9)y._bind(i,"wheel",n,r||!1);else{var s=void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";p(i,s,n,r||!1),"DOMMouseScroll"==s&&p(i,"MozMousePixelScroll",n,r||!1)}else if(i.addEventListener){if(E.cantouch&&/mouseup|mousedown|mousemove/.test(t)){var o="mousedown"==t?"touchstart":"mouseup"==t?"touchend":"touchmove";y._bind(i,o,function(e){if(e.touches){if(e.touches.length<2){var t=e.touches.length?e.touches[0]:e;t.original=e,n.call(this,t)}}else if(e.changedTouches){var t=e.changedTouches[0];t.original=e,n.call(this,t)}},r||!1)}y._bind(i,t,n,r||!1),E.cantouch&&"mouseup"==t&&y._bind(i,"touchcancel",n,r||!1)}else y._bind(i,t,function(e){return e=e||window.event||!1,e&&e.srcElement&&(e.target=e.srcElement),"pageY"in e||(e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop),n.call(i,e)===!1||r===!1?y.cancelEvent(e):!0})},this._unbind=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=!1},this.unbindAll=function(){for(var e=0;e<y.events.length;e++){var t=y.events[e];t.q?t.e.unbind(t.n,t.f):y._unbind(t.e,t.n,t.f,t.b)}},this.cancelEvent=function(e){var e=e.original?e.original:e?e:window.event||!1;return e?(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.preventManipulation&&e.preventManipulation(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1):!1},this.stopPropagation=function(e){var e=e.original?e.original:e?e:window.event||!1;return e?e.stopPropagation?e.stopPropagation():(e.cancelBubble&&(e.cancelBubble=!0),!1):!1},this.showRail=function(){return 0==y.page.maxh||!y.ispage&&"none"==y.win.css("display")||(y.visibility=!0,y.rail.visibility=!0,y.rail.css("display","block")),y},this.showRailHr=function(){return y.railh?(0==y.page.maxw||!y.ispage&&"none"==y.win.css("display")||(y.railh.visibility=!0,y.railh.css("display","block")),y):y},this.hideRail=function(){return y.visibility=!1,y.rail.visibility=!1,y.rail.css("display","none"),y},this.hideRailHr=function(){return y.railh?(y.railh.visibility=!1,y.railh.css("display","none"),y):y},this.show=function(){return y.hidden=!1,y.locked=!1,y.showRail().showRailHr()},this.hide=function(){return y.hidden=!0,y.locked=!0,y.hideRail().hideRailHr()},this.toggle=function(){return y.hidden?y.show():y.hide()},this.remove=function(){y.stop(),y.cursortimeout&&clearTimeout(y.cursortimeout),y.doZoomOut(),y.unbindAll(),E.isie9&&y.win[0].detachEvent("onpropertychange",y.onAttributeChange),y.observer!==!1&&y.observer.disconnect(),y.observerremover!==!1&&y.observerremover.disconnect(),y.events=null,y.cursor&&y.cursor.remove(),y.cursorh&&y.cursorh.remove(),y.rail&&y.rail.remove(),y.railh&&y.railh.remove(),y.zoom&&y.zoom.remove();for(var e=0;e<y.saved.css.length;e++){var t=y.saved.css[e];t[0].css(t[1],void 0===t[2]?"":t[2])}y.saved=!1,y.me.data("__nicescroll","");var n=a.nicescroll;n.each(function(e){if(this&&this.id===y.id){delete n[e];for(var t=++e;t<n.length;t++,e++)n[e]=n[t];n.length--,n.length&&delete n[n.length]}});for(var r in y)y[r]=null,delete y[r];y=null},this.scrollstart=function(e){return this.onscrollstart=e,y},this.scrollend=function(e){return this.onscrollend=e,y},this.scrollcancel=function(e){return this.onscrollcancel=e,y},this.zoomin=function(e){return this.onzoomin=e,y},this.zoomout=function(e){return this.onzoomout=e,y},this.isScrollable=function(e){var t=e.target?e.target:e;if("OPTION"==t.nodeName)return!0;for(;t&&1==t.nodeType&&!/^BODY|HTML/.test(t.nodeName);){var n=a(t),r=n.css("overflowY")||n.css("overflowX")||n.css("overflow")||"";if(/scroll|auto/.test(r))return t.clientHeight!=t.scrollHeight;t=t.parentNode?t.parentNode:!1}return!1},this.getViewport=function(e){for(var t=e&&e.parentNode?e.parentNode:!1;t&&1==t.nodeType&&!/^BODY|HTML/.test(t.nodeName);){var n=a(t);if(/fixed|absolute/.test(n.css("position")))return n;var r=n.css("overflowY")||n.css("overflowX")||n.css("overflow")||"";if(/scroll|auto/.test(r)&&t.clientHeight!=t.scrollHeight)return n;if(n.getNiceScroll().length>0)return n;t=t.parentNode?t.parentNode:!1}return t?a(t):!1},this.triggerScrollEnd=function(){if(y.onscrollend){var e=y.getScrollLeft(),t=y.getScrollTop(),n={type:"scrollend",current:{x:e,y:t},end:{x:e,y:t}};y.onscrollend.call(y,n)}},this.onmousewheel=function(e){if(!y.wheelprevented){if(y.locked)return y.debounced("checkunlock",y.resize,250),!0;if(y.rail.drag)return y.cancelEvent(e);if("auto"==y.opt.oneaxismousemode&&0!=e.deltaX&&(y.opt.oneaxismousemode=!1),y.opt.oneaxismousemode&&0==e.deltaX&&!y.rail.scrollable)return y.railh&&y.railh.scrollable?y.onmousewheelhr(e):!0;var t=+(new Date),n=!1;if(y.opt.preservenativescrolling&&y.checkarea+600<t&&(y.nativescrollingarea=y.isScrollable(e),n=!0),y.checkarea=t,y.nativescrollingarea)return!0;var r=m(e,!1,n);return r&&(y.checkarea=0),r}},this.onmousewheelhr=function(e){if(!y.wheelprevented){if(y.locked||!y.railh.scrollable)return!0;if(y.rail.drag)return y.cancelEvent(e);var t=+(new Date),n=!1;return y.opt.preservenativescrolling&&y.checkarea+600<t&&(y.nativescrollingarea=y.isScrollable(e),n=!0),y.checkarea=t,y.nativescrollingarea?!0:y.locked?y.cancelEvent(e):m(e,!0,n)}},this.stop=function(){return y.cancelScroll(),y.scrollmon&&y.scrollmon.stop(),y.cursorfreezed=!1,y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.noticeCursor(),y},this.getTransitionSpeed=function(e){var t=Math.round(10*y.opt.scrollspeed),n=Math.min(t,Math.round(e/20*y.opt.scrollspeed));return n>20?n:0},y.opt.smoothscroll?y.ishwscroll&&E.hastransition&&y.opt.usetransition?(this.prepareTransition=function(e,t){var n=t?e>20?e:0:y.getTransitionSpeed(e),r=n?E.prefixstyle+"transform "+n+"ms ease-out":"";return y.lasttransitionstyle&&y.lasttransitionstyle==r||(y.lasttransitionstyle=r,y.doc.css(E.transitionstyle,r)),n},this.doScrollLeft=function(e,t){var n=y.scrollrunning?y.newscrolly:y.getScrollTop();y.doScrollPos(e,n,t)},this.doScrollTop=function(e,t){var n=y.scrollrunning?y.newscrollx:y.getScrollLeft();y.doScrollPos(n,e,t)},this.doScrollPos=function(e,t,n){var r=y.getScrollTop(),i=y.getScrollLeft();return((y.newscrolly-r)*(t-r)<0||(y.newscrollx-i)*(e-i)<0)&&y.cancelScroll(),0==y.opt.bouncescroll&&(0>t?t=0:t>y.page.maxh&&(t=y.page.maxh),0>e?e=0:e>y.page.maxw&&(e=y.page.maxw)),y.scrollrunning&&e==y.newscrollx&&t==y.newscrolly?!1:(y.newscrolly=t,y.newscrollx=e,y.newscrollspeed=n||!1,y.timer?!1:void (y.timer=setTimeout(function(){var n=y.getScrollTop(),r=y.getScrollLeft(),i={};i.x=e-r,i.y=t-n,i.px=r,i.py=n;var s=Math.round(Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))),o=y.newscrollspeed&&y.newscrollspeed>1?y.newscrollspeed:y.getTransitionSpeed(s);if(y.newscrollspeed&&y.newscrollspeed<=1&&(o*=y.newscrollspeed),y.prepareTransition(o,!0),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),o>0){if(!y.scrollrunning&&y.onscrollstart){var u={type:"scrollstart",current:{x:r,y:n},request:{x:e,y:t},end:{x:y.newscrollx,y:y.newscrolly},speed:o};y.onscrollstart.call(y,u)}E.transitionend?y.scrollendtrapped||(y.scrollendtrapped=!0,y.bind(y.doc,E.transitionend,y.onScrollTransitionEnd,!1)):(y.scrollendtrapped&&clearTimeout(y.scrollendtrapped),y.scrollendtrapped=setTimeout(y.onScrollTransitionEnd,o));var a=n,f=r;y.timerscroll={bz:new BezierClass(a,y.newscrolly,o,0,0,.58,1),bh:new BezierClass(f,y.newscrollx,o,0,0,.58,1)},y.cursorfreezed||(y.timerscroll.tm=setInterval(function(){y.showCursor(y.getScrollTop(),y.getScrollLeft())},60))}y.synched("doScroll-set",function(){y.timer=0,y.scrollendtrapped&&(y.scrollrunning=!0),y.setScrollTop(y.newscrolly),y.setScrollLeft(y.newscrollx),y.scrollendtrapped||y.onScrollTransitionEnd()})},50)))},this.cancelScroll=function(){if(!y.scrollendtrapped)return!0;var e=y.getScrollTop(),t=y.getScrollLeft();return y.scrollrunning=!1,E.transitionend||clearTimeout(E.transitionend),y.scrollendtrapped=!1,y._unbind(y.doc,E.transitionend,y.onScrollTransitionEnd),y.prepareTransition(0),y.setScrollTop(e),y.railh&&y.setScrollLeft(t),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),y.timerscroll=!1,y.cursorfreezed=!1,y.showCursor(e,t),y},this.onScrollTransitionEnd=function(){y.scrollendtrapped&&y._unbind(y.doc,E.transitionend,y.onScrollTransitionEnd),y.scrollendtrapped=!1,y.prepareTransition(0),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),y.timerscroll=!1;var e=y.getScrollTop(),t=y.getScrollLeft();return y.setScrollTop(e),y.railh&&y.setScrollLeft(t),y.noticeCursor(!1,e,t),y.cursorfreezed=!1,0>e?e=0:e>y.page.maxh&&(e=y.page.maxh),0>t?t=0:t>y.page.maxw&&(t=y.page.maxw),e!=y.newscrolly||t!=y.newscrollx?y.doScrollPos(t,e,y.opt.snapbackspeed):(y.onscrollend&&y.scrollrunning&&y.triggerScrollEnd(),void (y.scrollrunning=!1))}):(this.doScrollLeft=function(e,t){var n=y.scrollrunning?y.newscrolly:y.getScrollTop();y.doScrollPos(e,n,t)},this.doScrollTop=function(e,t){var n=y.scrollrunning?y.newscrollx:y.getScrollLeft();y.doScrollPos(n,e,t)},this.doScrollPos=function(e,t,n){function r(){if(y.cancelAnimationFrame)return!0;if(y.scrollrunning=!0,h=1-h)return y.timer=l(r)||1;var e=0,t=sy=y.getScrollTop();if(y.dst.ay){t=y.bzscroll?y.dst.py+y.bzscroll.getNow()*y.dst.ay:y.newscrolly;var n=t-sy;(0>n&&t<y.newscrolly||n>0&&t>y.newscrolly)&&(t=y.newscrolly),y.setScrollTop(t),t==y.newscrolly&&(e=1)}else e=1;var i=sx=y.getScrollLeft();if(y.dst.ax){i=y.bzscroll?y.dst.px+y.bzscroll.getNow()*y.dst.ax:y.newscrollx;var n=i-sx;(0>n&&i<y.newscrollx||n>0&&i>y.newscrollx)&&(i=y.newscrollx),y.setScrollLeft(i),i==y.newscrollx&&(e+=1)}else e+=1;2==e?(y.timer=0,y.cursorfreezed=!1,y.bzscroll=!1,y.scrollrunning=!1,0>t?t=0:t>y.page.maxh&&(t=y.page.maxh),0>i?i=0:i>y.page.maxw&&(i=y.page.maxw),i!=y.newscrollx||t!=y.newscrolly?y.doScrollPos(i,t):y.onscrollend&&y.triggerScrollEnd()):y.timer=l(r)||1}var t=void 0===t||t===!1?y.getScrollTop(!0):t;if(y.timer&&y.newscrolly==t&&y.newscrollx==e)return!0;y.timer&&c(y.timer),y.timer=0;var i=y.getScrollTop(),s=y.getScrollLeft();((y.newscrolly-i)*(t-i)<0||(y.newscrollx-s)*(e-s)<0)&&y.cancelScroll(),y.newscrolly=t,y.newscrollx=e,y.bouncescroll&&y.rail.visibility||(y.newscrolly<0?y.newscrolly=0:y.newscrolly>y.page.maxh&&(y.newscrolly=y.page.maxh)),y.bouncescroll&&y.railh.visibility||(y.newscrollx<0?y.newscrollx=0:y.newscrollx>y.page.maxw&&(y.newscrollx=y.page.maxw)),y.dst={},y.dst.x=e-s,y.dst.y=t-i,y.dst.px=s,y.dst.py=i;var o=Math.round(Math.sqrt(Math.pow(y.dst.x,2)+Math.pow(y.dst.y,2)));y.dst.ax=y.dst.x/o,y.dst.ay=y.dst.y/o;var u=0,a=o;0==y.dst.x?(u=i,a=t,y.dst.ay=1,y.dst.py=0):0==y.dst.y&&(u=s,a=e,y.dst.ax=1,y.dst.px=0);var f=y.getTransitionSpeed(o);if(n&&1>=n&&(f*=n),y.bzscroll=f>0?y.bzscroll?y.bzscroll.update(a,f):new BezierClass(u,a,f,0,1,0,1):!1,!y.timer){(i==y.page.maxh&&t>=y.page.maxh||s==y.page.maxw&&e>=y.page.maxw)&&y.checkContentSize();var h=1;if(y.cancelAnimationFrame=!1,y.timer=1,y.onscrollstart&&!y.scrollrunning){var p={type:"scrollstart",current:{x:s,y:i},request:{x:e,y:t},end:{x:y.newscrollx,y:y.newscrolly},speed:f};y.onscrollstart.call(y,p)}r(),(i==y.page.maxh&&t>=i||s==y.page.maxw&&e>=s)&&y.checkContentSize(),y.noticeCursor()}},this.cancelScroll=function(){return y.timer&&c(y.timer),y.timer=0,y.bzscroll=!1,y.scrollrunning=!1,y}):(this.doScrollLeft=function(e,t){var n=y.getScrollTop();y.doScrollPos(e,n,t)},this.doScrollTop=function(e,t){var n=y.getScrollLeft();y.doScrollPos(n,e,t)},this.doScrollPos=function(e,t){var n=e>y.page.maxw?y.page.maxw:e;0>n&&(n=0);var r=t>y.page.maxh?y.page.maxh:t;0>r&&(r=0),y.synched("scroll",function(){y.setScrollTop(r),y.setScrollLeft(n)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,t){var n=0;if(t)n=Math.floor((y.scroll.y-e)*y.scrollratio.y);else{var r=y.timer?y.newscrolly:y.getScrollTop(!0);n=r-e}if(y.bouncescroll){var i=Math.round(y.view.h/2);-i>n?n=-i:n>y.page.maxh+i&&(n=y.page.maxh+i)}return y.cursorfreezed=!1,py=y.getScrollTop(!0),0>n&&0>=py?y.noticeCursor():n>y.page.maxh&&py>=y.page.maxh?(y.checkContentSize(),y.noticeCursor()):void y.doScrollTop(n)},this.doScrollLeftBy=function(e,t){var n=0;if(t)n=Math.floor((y.scroll.x-e)*y.scrollratio.x);else{var r=y.timer?y.newscrollx:y.getScrollLeft(!0);n=r-e}if(y.bouncescroll){var i=Math.round(y.view.w/2);-i>n?n=-i:n>y.page.maxw+i&&(n=y.page.maxw+i)}return y.cursorfreezed=!1,px=y.getScrollLeft(!0),0>n&&0>=px?y.noticeCursor():n>y.page.maxw&&px>=y.page.maxw?y.noticeCursor():void y.doScrollLeft(n)},this.doScrollTo=function(e,t){var n=t?Math.round(e*y.scrollratio.y):e;0>n?n=0:n>y.page.maxh&&(n=y.page.maxh),y.cursorfreezed=!1,y.doScrollTop(e)},this.checkContentSize=function(){var e=y.getContentSize();(e.h!=y.page.h||e.w!=y.page.w)&&y.resize(!1,e)},y.onscroll=function(){y.rail.drag||y.cursorfreezed||y.synched("scroll",function(){y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.railh&&(y.scroll.x=Math.round(y.getScrollLeft()*(1/y.scrollratio.x))),y.noticeCursor()})},y.bind(y.docscroll,"scroll",y.onscroll),this.doZoomIn=function(e){if(!y.zoomactive){y.zoomactive=!0,y.zoomrestore={style:{}};var t=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],n=y.win[0].style;for(var r in t){var i=t[r];y.zoomrestore.style[i]=void 0!==n[i]?n[i]:""}y.zoomrestore.style.width=y.win.css("width"),y.zoomrestore.style.height=y.win.css("height"),y.zoomrestore.padding={w:y.win.outerWidth()-y.win.width(),h:y.win.outerHeight()-y.win.height()},E.isios4&&(y.zoomrestore.scrollTop=a(window).scrollTop(),a(window).scrollTop(0)),y.win.css({position:E.isios4?"absolute":"fixed",top:0,left:0,"z-index":u+100,margin:"0px"});var s=y.win.css("backgroundColor");return(""==s||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(s))&&y.win.css("backgroundColor","#fff"),y.rail.css({"z-index":u+101}),y.zoom.css({"z-index":u+102}),y.zoom.css("backgroundPosition","0px -18px"),y.resizeZoom(),y.onzoomin&&y.onzoomin.call(y),y.cancelEvent(e)}},this.doZoomOut=function(e){return y.zoomactive?(y.zoomactive=!1,y.win.css("margin",""),y.win.css(y.zoomrestore.style),E.isios4&&a(window).scrollTop(y.zoomrestore.scrollTop),y.rail.css({"z-index":y.zindex}),y.zoom.css({"z-index":y.zindex}),y.zoomrestore=!1,y.zoom.css("backgroundPosition","0px 0px"),y.onResize(),y.onzoomout&&y.onzoomout.call(y),y.cancelEvent(e)):void 0},this.doZoom=function(e){return y.zoomactive?y.doZoomOut(e):y.doZoomIn(e)},this.resizeZoom=function(){if(y.zoomactive){var e=y.getScrollTop();y.win.css({width:a(window).width()-y.zoomrestore.padding.w+"px",height:a(window).height()-y.zoomrestore.padding.h+"px"}),y.onResize(),y.setScrollTop(Math.min(y.page.maxh,e))}},this.init(),a.nicescroll.push(this)},b=function(e){var t=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.time=function(){return+(new Date)},this.reset=function(e,n){t.stop();var r=t.time();t.steptime=0,t.lasttime=r,t.speedx=0,t.speedy=0,t.lastx=e,t.lasty=n,t.lastscrollx=-1,t.lastscrolly=-1},this.update=function(e,n){var r=t.time();t.steptime=r-t.lasttime,t.lasttime=r;var i=n-t.lasty,s=e-t.lastx,o=t.nc.getScrollTop(),u=t.nc.getScrollLeft(),a=o+i,f=u+s;t.snapx=0>f||f>t.nc.page.maxw,t.snapy=0>a||a>t.nc.page.maxh,t.speedx=s,t.speedy=i,t.lastx=e,t.lasty=n},this.stop=function(){t.nc.unsynched("domomentum2d"),t.timer&&clearTimeout(t.timer),t.timer=0,t.lastscrollx=-1,t.lastscrolly=-1},this.doSnapy=function(e,n){var r=!1;0>n?(n=0,r=!0):n>t.nc.page.maxh&&(n=t.nc.page.maxh,r=!0),0>e?(e=0,r=!0):e>t.nc.page.maxw&&(e=t.nc.page.maxw,r=!0),r?t.nc.doScrollPos(e,n,t.nc.opt.snapbackspeed):t.nc.triggerScrollEnd()},this.doMomentum=function(e){var n=t.time(),r=e?n+e:t.lasttime,i=t.nc.getScrollLeft(),s=t.nc.getScrollTop(),o=t.nc.page.maxh,u=t.nc.page.maxw;t.speedx=u>0?Math.min(60,t.speedx):0,t.speedy=o>0?Math.min(60,t.speedy):0;var a=r&&60>=n-r;(0>s||s>o||0>i||i>u)&&(a=!1);var f=t.speedy&&a?t.speedy:!1,l=t.speedx&&a?t.speedx:!1;if(f||l){var c=Math.max(16,t.steptime);if(c>50){var h=c/50;t.speedx*=h,t.speedy*=h,c=50}t.demulxy=0,t.lastscrollx=t.nc.getScrollLeft(),t.chkx=t.lastscrollx,t.lastscrolly=t.nc.getScrollTop(),t.chky=t.lastscrolly;var p=t.lastscrollx,d=t.lastscrolly,v=function(){var e=t.time()-n>600?.04:.02;t.speedx&&(p=Math.floor(t.lastscrollx-t.speedx*(1-t.demulxy)),t.lastscrollx=p,(0>p||p>u)&&(e=.1)),t.speedy&&(d=Math.floor(t.lastscrolly-t.speedy*(1-t.demulxy)),t.lastscrolly=d,(0>d||d>o)&&(e=.1)),t.demulxy=Math.min(1,t.demulxy+e),t.nc.synched("domomentum2d",function(){if(t.speedx){var e=t.nc.getScrollLeft();e!=t.chkx&&t.stop(),t.chkx=p,t.nc.setScrollLeft(p)}if(t.speedy){var n=t.nc.getScrollTop();n!=t.chky&&t.stop(),t.chky=d,t.nc.setScrollTop(d)}t.timer||(t.nc.hideCursor(),t.doSnapy(p,d))}),t.demulxy<1?t.timer=setTimeout(v,c):(t.stop(),t.nc.hideCursor(),t.doSnapy(p,d))};v()}else t.doSnapy(t.nc.getScrollLeft(),t.nc.getScrollTop())}},w=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e){var t=a.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollTop():w.call(e)},set:function(e,t){var n=a.data(e,"__nicescroll")||!1;return n&&n.ishwscroll?n.setScrollTop(parseInt(t)):w.call(e,t),this}},e.fn.scrollTop=function(e){if(void 0===e){var t=this[0]?a.data(this[0],"__nicescroll")||!1:!1;return t&&t.ishwscroll?t.getScrollTop():w.call(this)}return this.each(function(){var t=a.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollTop(parseInt(e)):w.call(a(this),e)})};var E=e.fn.scrollLeft;a.cssHooks.pageXOffset={get:function(e){var t=a.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.getScrollLeft():E.call(e)},set:function(e,t){var n=a.data(e,"__nicescroll")||!1;return n&&n.ishwscroll?n.setScrollLeft(parseInt(t)):E.call(e,t),this}},e.fn.scrollLeft=function(e){if(void 0===e){var t=this[0]?a.data(this[0],"__nicescroll")||!1:!1;return t&&t.ishwscroll?t.getScrollLeft():E.call(this)}return this.each(function(){var t=a.data(this,"__nicescroll")||!1;t&&t.ishwscroll?t.setScrollLeft(parseInt(e)):E.call(a(this),e)})};var S=function(e){var t=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){for(var n=0,r=0;n<t.length;n++)e.call(t[n],r++);return t},this.push=function(e){t[t.length]=e,t.length++},this.eq=function(e){return t[e]},e)for(var n=0;n<e.length;n++){var r=a.data(e[n],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};n(S.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,t){e[t]=function(){var e=arguments;return this.each(function(){this[t].apply(this,e)})}}),e.fn.getNiceScroll=function(e){if(void 0===e)return new S(this);var t=this[e]&&a.data(this[e],"__nicescroll")||!1;return t},e.extend(e.expr[":"],{nicescroll:function(e){return a.data(e,"__nicescroll")?!0:!1}}),a.fn.niceScroll=function(e,t){void 0===t&&("object"!=typeof e||"jquery"in e||(t=e,e=!1));var n=new S;void 0===t&&(t={}),e&&(t.doc=a(e),t.win=a(this));var r=!("doc"in t);return r||"win"in t||(t.win=a(this)),this.each(function(){var e=a(this).data("__nicescroll")||!1;e||(t.doc=r?a(this):t.doc,e=new y(t,a(this)),a(this).data("__nicescroll",e)),n.push(e)}),1==n.length?n[0]:n},window.NiceScroll={getjQuery:function(){return e}},a.nicescroll||(a.nicescroll=new S,a.nicescroll.options=v)})
