/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) * Licensed under the MIT License (LICENSE.txt). * * jquery.mousewheel.min.js Version: 3.1.12 * * Requires: jQuery 1.2.2+ */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(e,t){"use strict";function n(t){e.fn.cycle.debug&&i(t)}function i(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function c(t,n,i){var c=e(t).data("cycle.opts");if(c){var r=!!t.cyclePause;r&&c.paused?c.paused(t,c,n,i):!r&&c.resumed&&c.resumed(t,c,n,i)}}function r(n,r,s){function a(t,n,c){if(!t&&n===!0){var r=e(c).data("cycle.opts");if(!r)return i("options not found, can not resume"),!1;c.cycleTimeout&&(clearTimeout(c.cycleTimeout),c.cycleTimeout=0),f(r.elements,r,1,!r.backwards)}}if(n.cycleStop===t&&(n.cycleStop=0),(r===t||null===r)&&(r={}),r.constructor==String){switch(r){case"destroy":case"stop":var l=e(n).data("cycle.opts");return l?(n.cycleStop++,n.cycleTimeout&&clearTimeout(n.cycleTimeout),n.cycleTimeout=0,l.elements&&e(l.elements).stop(),e(n).removeData("cycle.opts"),"destroy"==r&&o(n,l),!1):!1;case"toggle":return n.cyclePause=1===n.cyclePause?0:1,a(n.cyclePause,s,n),c(n),!1;case"pause":return n.cyclePause=1,c(n),!1;case"resume":return n.cyclePause=0,a(!1,s,n),c(n),!1;case"prev":case"next":return(l=e(n).data("cycle.opts"))?("string"==typeof s&&(l.oneTimeFx=s),e.fn.cycle[r](l),!1):(i('options not found, "prev/next" ignored'),!1);default:r={fx:r}}return r}if(r.constructor==Number){var u=r;return(r=e(n).data("cycle.opts"))?0>u||u>=r.elements.length?(i("invalid slide index: "+u),!1):(r.nextSlide=u,n.cycleTimeout&&(clearTimeout(n.cycleTimeout),n.cycleTimeout=0),"string"==typeof s&&(r.oneTimeFx=s),f(r.elements,r,1,u>=r.currSlide),!1):(i("options not found, can not advance slide"),!1)}return r}function s(t,n){if(!e.support.opacity&&n.cleartype&&t.style.filter)try{t.style.removeAttribute("filter")}catch(i){}}function o(t,n){n.next&&e(n.next).unbind(n.prevNextEvent),n.prev&&e(n.prev).unbind(n.prevNextEvent),(n.pager||n.pagerAnchorBuilder)&&e.each(n.pagerAnchors||[],function(){this.unbind().remove()}),n.pagerAnchors=null,e(t).unbind("mouseenter.cycle mouseleave.cycle"),n.destroy&&n.destroy(n)}function a(n,r,o,a,h){var y,x=e.extend({},e.fn.cycle.defaults,a||{},e.metadata?n.metadata():e.meta?n.data():{}),v=e.isFunction(n.data)?n.data(x.metaAttr):null;v&&(x=e.extend(x,v)),x.autostop&&(x.countdown=x.autostopCount||o.length);var S=n[0];if(n.data("cycle.opts",x),x.$cont=n,x.stopCount=S.cycleStop,x.elements=o,x.before=x.before?[x.before]:[],x.after=x.after?[x.after]:[],!e.support.opacity&&x.cleartype&&x.after.push(function(){s(this,x)}),x.continuous&&x.after.push(function(){f(o,x,0,!x.backwards)}),l(x),e.support.opacity||!x.cleartype||x.cleartypeNoBg||g(r),"static"==n.css("position")&&n.css("position","relative"),x.width&&n.width(x.width),x.height&&"auto"!=x.height&&n.height(x.height),x.startingSlide!==t?(x.startingSlide=parseInt(x.startingSlide,10),x.startingSlide>=o.length||x.startSlide<0?x.startingSlide=0:y=!0):x.startingSlide=x.backwards?o.length-1:0,x.random){x.randomMap=[];for(var w=0;w=o.length&&(x.startingSlide=0);x.currSlide=x.startingSlide||0;var I=x.startingSlide;r.css({position:"absolute",top:0,left:0}).hide().each(function(t){var n;n=x.backwards?I?I>=t?o.length+(t-I):I-t:o.length-t:I?t>=I?o.length-(t-I):I-t:o.length-t,e(this).css("z-index",n)}),e(o[I]).css("opacity",1).show(),s(o[I],x),x.fit&&(x.aspect?r.each(function(){var t=e(this),n=x.aspect===!0?t.width()/t.height():x.aspect;x.width&&t.width()!=x.width&&(t.width(x.width),t.height(x.width/n)),x.height&&t.height()A?P:A,T=C>T?C:T}x.containerResize&&A>0&&T>0&&n.css({width:A+"px",height:T+"px"}),x.containerResizeHeight&&T>0&&n.css({height:T+"px"})}var H=!1;if(x.pause&&n.bind("mouseenter.cycle",function(){H=!0,this.cyclePause++,c(S,!0)}).bind("mouseleave.cycle",function(){H&&this.cyclePause--,c(S,!0)}),u(x)===!1)return!1;var z=!1;if(a.requeueAttempts=a.requeueAttempts||0,r.each(function(){var t=e(this);if(this.cycleH=x.fit&&x.height?x.height:t.height()||this.offsetHeight||this.height||t.attr("height")||0,this.cycleW=x.fit&&x.width?x.width:t.width()||this.offsetWidth||this.width||t.attr("width")||0,t.is("img")){var n=0===this.cycleH&&0===this.cycleW&&!this.complete;if(n){if(h.s&&x.requeueOnImageNotLoaded&&++a.requeueAttempts<100)return i(a.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){e(h.s,h.c).cycle(a)},x.requeueTimeout),z=!0,!1;i("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0}),z)return!1;if(x.cssBefore=x.cssBefore||{},x.cssAfter=x.cssAfter||{},x.cssFirst=x.cssFirst||{},x.animIn=x.animIn||{},x.animOut=x.animOut||{},r.not(":eq("+I+")").css(x.cssBefore),e(r[I]).css(x.cssFirst),x.timeout){x.timeout=parseInt(x.timeout,10),x.speed.constructor==String&&(x.speed=e.fx.speeds[x.speed]||parseInt(x.speed,10)),x.sync||(x.speed=x.speed/2);for(var E="none"==x.fx?0:"shuffle"==x.fx?500:250;x.timeout-x.speed=o.length-1?0:x.startingSlide+1,!x.multiFx){var M=e.fn.cycle.transitions[x.fx];if(e.isFunction(M))M(n,r,x);else if("custom"!=x.fx&&!x.multiFx)return i("unknown transition: "+x.fx,"; slideshow terminating"),!1}var R=r[I];return x.skipInitializationCallbacks||(x.before.length&&x.before[0].apply(R,[R,R,x,!0]),x.after.length&&x.after[0].apply(R,[R,R,x,!0])),x.next&&e(x.next).bind(x.prevNextEvent,function(){return p(x,1)}),x.prev&&e(x.prev).bind(x.prevNextEvent,function(){return p(x,0)}),(x.pager||x.pagerAnchorBuilder)&&m(o,x),d(x,o),x}function l(t){t.original={before:[],after:[]},t.original.cssBefore=e.extend({},t.cssBefore),t.original.cssAfter=e.extend({},t.cssAfter),t.original.animIn=e.extend({},t.animIn),t.original.animOut=e.extend({},t.animOut),e.each(t.before,function(){t.original.before.push(this)}),e.each(t.after,function(){t.original.after.push(this)})}function u(t){var c,r,s=e.fn.cycle.transitions;if(t.fx.indexOf(",")>0){for(t.multiFx=!0,t.fxs=t.fx.replace(/\s*/g,"").split(","),c=0;cc;c++){var u=Math.floor(Math.random()*t.fxs.length);t.fxs.push(t.fxs.splice(u,1)[0])}n("randomized fx sequence: ",t.fxs)}return!0}function d(t,n){t.addSlide=function(i,c){var r=e(i),s=r[0];t.autostopCount||t.countdown++,n[c?"unshift":"push"](s),t.els&&t.els[c?"unshift":"push"](s),t.slideCount=n.length,t.random&&(t.randomMap.push(t.slideCount-1),t.randomMap.sort(function(){return Math.random()-.5})),r.css("position","absolute"),r[c?"prependTo":"appendTo"](t.$cont),c&&(t.currSlide++,t.nextSlide++),e.support.opacity||!t.cleartype||t.cleartypeNoBg||g(r),t.fit&&t.width&&r.width(t.width),t.fit&&t.height&&"auto"!=t.height&&r.height(t.height),s.cycleH=t.fit&&t.height?t.height:r.height(),s.cycleW=t.fit&&t.width?t.width:r.width(),r.css(t.cssBefore),(t.pager||t.pagerAnchorBuilder)&&e.fn.cycle.createPagerAnchor(n.length-1,s,e(t.pager),n,t),e.isFunction(t.onAddSlide)?t.onAddSlide(r):r.hide()}}function f(i,c,r,s){function o(){{var e=0;c.timeout}c.timeout&&!c.continuous?(e=h(i[c.currSlide],i[c.nextSlide],c,s),"shuffle"==c.fx&&(e-=c.speedOut)):c.continuous&&a.cyclePause&&(e=10),e>0&&(a.cycleTimeout=setTimeout(function(){f(i,c,0,!c.backwards)},e))}var a=c.$cont[0],l=i[c.currSlide],u=i[c.nextSlide];if(r&&c.busy&&c.manualTrump&&(n("manualTrump in go(), stopping active transition"),e(i).stop(!0,!0),c.busy=0,clearTimeout(a.cycleTimeout)),c.busy)return void n("transition active, ignoring new tx request");if(a.cycleStop==c.stopCount&&(0!==a.cycleTimeout||r)){if(!r&&!a.cyclePause&&!c.bounce&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide=c.fxs.length)?c.lastFx=0:!s&&(c.lastFx===t||--c.lastFx<0)&&(c.lastFx=c.fxs.length-1),p=c.fxs[c.lastFx]),c.oneTimeFx&&(p=c.oneTimeFx,c.oneTimeFx=null),e.fn.cycle.resetState(c,p),c.before.length&&e.each(c.before,function(e,t){a.cycleStop==c.stopCount&&t.apply(u,[l,u,c,s])});var m=function(){c.busy=0,e.each(c.after,function(e,t){a.cycleStop==c.stopCount&&t.apply(u,[l,u,c,s])}),a.cycleStop||o()};n("tx firing("+p+"); currSlide: "+c.currSlide+"; nextSlide: "+c.nextSlide),c.busy=1,c.fxFn?c.fxFn(l,u,c,m,s,r&&c.fastOnEvent):e.isFunction(e.fn.cycle[c.fx])?e.fn.cycle[c.fx](l,u,c,m,s,r&&c.fastOnEvent):e.fn.cycle.custom(l,u,c,m,s,r&&c.fastOnEvent)}if(d||c.nextSlide==c.currSlide){var g;c.lastSlide=c.currSlide,c.random?(c.currSlide=c.nextSlide,++c.randomIndex==i.length&&(c.randomIndex=0,c.randomMap.sort(function(){return Math.random()-.5})),c.nextSlide=c.randomMap[c.randomIndex],c.nextSlide==c.currSlide&&(c.nextSlide=c.currSlide==c.slideCount-1?0:c.currSlide+1)):c.backwards?(g=c.nextSlide-1<0,g&&c.bounce?(c.backwards=!c.backwards,c.nextSlide=1,c.currSlide=0):(c.nextSlide=g?i.length-1:c.nextSlide-1,c.currSlide=g?0:c.nextSlide+1)):(g=c.nextSlide+1==i.length,g&&c.bounce?(c.backwards=!c.backwards,c.nextSlide=i.length-2,c.currSlide=i.length-1):(c.nextSlide=g?0:c.nextSlide+1,c.currSlide=g?i.length-1:c.nextSlide-1))}d&&c.pager&&c.updateActivePagerLink(c.pager,c.currSlide,c.activePagerClass)}}function h(e,t,i,c){if(i.timeoutFn){for(var r=i.timeoutFn.call(e,e,t,i,c);"none"!=i.fx&&r-i.speed<250;)r+=i.speed;if(n("calculated timeout: "+r+"; speed: "+i.speed),r!==!1)return r}return i.timeout}function p(t,n){var i=n?1:-1,c=t.elements,r=t.$cont[0],s=r.cycleTimeout;if(s&&(clearTimeout(s),r.cycleTimeout=0),t.random&&0>i)t.randomIndex--,-2==--t.randomIndex?t.randomIndex=c.length-2:-1==t.randomIndex&&(t.randomIndex=c.length-1),t.nextSlide=t.randomMap[t.randomIndex];else if(t.random)t.nextSlide=t.randomMap[t.randomIndex];else if(t.nextSlide=t.currSlide+i,t.nextSlide<0){if(t.nowrap)return!1;t.nextSlide=c.length-1}else if(t.nextSlide>=c.length){if(t.nowrap)return!1;t.nextSlide=0}var o=t.onPrevNextEvent||t.prevNextClick;return e.isFunction(o)&&o(i>0,t.nextSlide,c[t.nextSlide]),f(c,t,1,n),!1}function m(t,n){var i=e(n.pager);e.each(t,function(c,r){e.fn.cycle.createPagerAnchor(c,r,i,t,n)}),n.updateActivePagerLink(n.pager,n.startingSlide,n.activePagerClass)}function g(t){function i(e){return e=parseInt(e,10).toString(16),e.length<2?"0"+e:e}function c(t){for(;t&&"html"!=t.nodeName.toLowerCase();t=t.parentNode){var n=e.css(t,"background-color");if(n&&n.indexOf("rgb")>=0){var c=n.match(/\d+/g);return"#"+i(c[0])+i(c[1])+i(c[2])}if(n&&"transparent"!=n)return n}return"#ffffff"}n("applying clearType background-color hack"),t.each(function(){e(this).css("background-color",c(this))})}var y="3.0.3";e.expr[":"].paused=function(e){return e.cyclePause},e.fn.cycle=function(t,c){var s={s:this.selector,c:this.context};return 0===this.length&&"stop"!=t?!e.isReady&&s.s?(i("DOM not ready, queuing slideshow"),e(function(){e(s.s,s.c).cycle(t,c)}),this):(i("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this):this.each(function(){var o=r(this,t,c);if(o!==!1){o.updateActivePagerLink=o.updateActivePagerLink||e.fn.cycle.updateActivePagerLink,this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0,this.cycleStop=0;var l=e(this),u=o.slideExpr?e(o.slideExpr,this):l.children(),d=u.get();if(d.length<2)return void i("terminating; too few slides: "+d.length);var p=a(l,u,d,o,s);if(p!==!1){var m=p.continuous?10:h(d[p.currSlide],d[p.nextSlide],p,!p.backwards);m&&(m+=p.delay||0,10>m&&(m=10),n("first timeout: "+m),this.cycleTimeout=setTimeout(function(){f(d,p,0,!o.backwards)},m))}}})},e.fn.cycle.resetState=function(t,n){n=n||t.fx,t.before=[],t.after=[],t.cssBefore=e.extend({},t.original.cssBefore),t.cssAfter=e.extend({},t.original.cssAfter),t.animIn=e.extend({},t.original.animIn),t.animOut=e.extend({},t.original.animOut),t.fxFn=null,e.each(t.original.before,function(){t.before.push(this)}),e.each(t.original.after,function(){t.after.push(this)});var i=e.fn.cycle.transitions[n];e.isFunction(i)&&i(t.$cont,e(t.elements),t)},e.fn.cycle.updateActivePagerLink=function(t,n,i){e(t).each(function(){e(this).children().removeClass(i).eq(n).addClass(i)})},e.fn.cycle.next=function(e){p(e,1)},e.fn.cycle.prev=function(e){p(e,0)},e.fn.cycle.createPagerAnchor=function(t,i,r,s,o){var a;if(e.isFunction(o.pagerAnchorBuilder)?(a=o.pagerAnchorBuilder(t,i),n("pagerAnchorBuilder("+t+", el) returned: "+a)):a=''+(t+1)+"",a){var l=e(a);if(0===l.parents("body").length){var u=[];r.length>1?(r.each(function(){var t=l.clone(!0);e(this).append(t),u.push(t[0])}),l=e(u)):l.appendTo(r)}o.pagerAnchors=o.pagerAnchors||[],o.pagerAnchors.push(l);var d=function(n){n.preventDefault(),o.nextSlide=t;var i=o.$cont[0],c=i.cycleTimeout;c&&(clearTimeout(c),i.cycleTimeout=0);var r=o.onPagerEvent||o.pagerClick;e.isFunction(r)&&r(o.nextSlide,s[o.nextSlide]),f(s,o,1,o.currSlidei?c-i:e.slideCount-i:i>c?i-c:i+e.slideCount-c},e.fn.cycle.commonReset=function(t,n,i,c,r,s){e(i.elements).not(t).hide(),"undefined"==typeof i.cssBefore.opacity&&(i.cssBefore.opacity=1),i.cssBefore.display="block",i.slideResize&&c!==!1&&n.cycleW>0&&(i.cssBefore.width=n.cycleW),i.slideResize&&r!==!1&&n.cycleH>0&&(i.cssBefore.height=n.cycleH),i.cssAfter=i.cssAfter||{},i.cssAfter.display="none",e(t).css("zIndex",i.slideCount+(s===!0?1:0)),e(n).css("zIndex",i.slideCount+(s===!0?0:1))},e.fn.cycle.custom=function(t,n,i,c,r,s){var o=e(t),a=e(n),l=i.speedIn,u=i.speedOut,d=i.easeIn,f=i.easeOut,h=i.animInDelay,p=i.animOutDelay;a.css(i.cssBefore),s&&(l=u="number"==typeof s?s:1,d=f=null);var m=function(){a.delay(h).animate(i.animIn,l,d,function(){c()})};o.delay(p).animate(i.animOut,u,f,function(){o.css(i.cssAfter),i.sync||m()}),i.sync&&m()},e.fn.cycle.transitions={fade:function(t,n,i){n.not(":eq("+i.currSlide+")").css("opacity",0),i.before.push(function(t,n,i){e.fn.cycle.commonReset(t,n,i),i.cssBefore.opacity=0}),i.animIn={opacity:1},i.animOut={opacity:0},i.cssBefore={top:0,left:0}}},e.fn.cycle.ver=function(){return y},e.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!e.support.opacity,cleartypeNoBg:!1,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:t,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}}(jQuery),function(e){"use strict";e.fn.cycle.transitions.none=function(t,n,i){i.fxFn=function(t,n,i,c){e(n).show(),e(t).hide(),c()}},e.fn.cycle.transitions.fadeout=function(t,n,i){n.not(":eq("+i.currSlide+")").css({display:"block",opacity:1}),i.before.push(function(t,n,i,c,r,s){e(t).css("zIndex",i.slideCount+(s!==!0?1:0)),e(n).css("zIndex",i.slideCount+(s!==!0?0:1))}),i.animIn.opacity=1,i.animOut.opacity=0,i.cssBefore.opacity=1,i.cssBefore.display="block",i.cssAfter.zIndex=0},e.fn.cycle.transitions.scrollUp=function(t,n,i){t.css("overflow","hidden"),i.before.push(e.fn.cycle.commonReset);var c=t.height();i.cssBefore.top=c,i.cssBefore.left=0,i.cssFirst.top=0,i.animIn.top=0,i.animOut.top=-c},e.fn.cycle.transitions.scrollDown=function(t,n,i){t.css("overflow","hidden"),i.before.push(e.fn.cycle.commonReset);var c=t.height();i.cssFirst.top=0,i.cssBefore.top=-c,i.cssBefore.left=0,i.animIn.top=0,i.animOut.top=c},e.fn.cycle.transitions.scrollLeft=function(t,n,i){t.css("overflow","hidden"),i.before.push(e.fn.cycle.commonReset);var c=t.width();i.cssFirst.left=0,i.cssBefore.left=c,i.cssBefore.top=0,i.animIn.left=0,i.animOut.left=0-c},e.fn.cycle.transitions.scrollRight=function(t,n,i){t.css("overflow","hidden"),i.before.push(e.fn.cycle.commonReset);var c=t.width();i.cssFirst.left=0,i.cssBefore.left=-c,i.cssBefore.top=0,i.animIn.left=0,i.animOut.left=c},e.fn.cycle.transitions.scrollHorz=function(t,n,i){t.css("overflow","hidden").width(),i.before.push(function(t,n,i,c){i.rev&&(c=!c),e.fn.cycle.commonReset(t,n,i),i.cssBefore.left=c?n.cycleW-1:1-n.cycleW,i.animOut.left=c?-t.cycleW:t.cycleW}),i.cssFirst.left=0,i.cssBefore.top=0,i.animIn.left=0,i.animOut.top=0},e.fn.cycle.transitions.scrollVert=function(t,n,i){t.css("overflow","hidden"),i.before.push(function(t,n,i,c){i.rev&&(c=!c),e.fn.cycle.commonReset(t,n,i),i.cssBefore.top=c?1-n.cycleH:n.cycleH-1,i.animOut.top=c?t.cycleH:-t.cycleH}),i.cssFirst.top=0,i.cssBefore.left=0,i.animIn.top=0,i.animOut.left=0}}(jQuery);!(function(e){e.fn.kenburns=function(t){function g(){var e=new Date;return e.getTime()-i}function y(e,t,n,r,i){return{x:e+(n-e)*i,y:t+(r-t)*i}}function b(e,t,n){var r=y(e[0],e[1],t[0],t[1],n);var i=y(e[2],e[3],t[2],t[3],n);return[r.x,r.y,i.x,i.y]}function w(e,t){var n=e[2]-e[0];var r=e[3]-e[1];var i=(e[2]+e[0])/2;var s=(e[3]+e[1])/2;var o=n*t;var u=r*t;return[i-o/2,s-u/2,i+o/2,s+u/2]}function E(e,t,n,r){var i=e/t;var s=n/r;var o=t*s;var u=t;if(o>e){var o=e;var u=e/s}var a=(e-o)/2;var f=(t-u)/2;return[a,f,a+o,f+u]}function S(e,t){var n=m[e];if(!n.initialized){var r=new Image;n.image=r;n.loaded=false;r.onload=function(){n.loaded=true;var i=r.width;var u=r.height;var a=E(i,u,s,o);var f=w(a,d);var l=Math.floor(Math.random()*3)-1;var c=Math.floor(Math.random()*3)-1;l/=2;c/=2;var h=f[0];f[0]+=h*l;f[2]+=h*l;var p=f[1];f[1]+=p*c;f[3]+=p*c;if(e%2){n.r1=a;n.r2=f}else{n.r1=f;n.r2=a}if(t){t()}};n.initialized=true;r.src=n.path}return n}function x(e,t,n){if(t>1){return}var i=S(e);if(i.loaded){var u=b(i.r1,i.r2,t);var a=Math.min(1,n);if(a>0){r.save();r.globalAlpha=Math.min(1,a);r.drawImage(i.image,u[0],u[1],u[2]-u[0],u[3]-u[1],0,0,s,o);r.restore()}}}function T(){r.save();r.globalAlpha=1;r.fillStyle=v;r.fillRect(0,0,r.canvas.width,r.canvas.height);r.restore()}function N(){function u(e){return(e+m.length)%m.length}var e=g();var i=Math.floor(e/(a-f));var s=i*(a-f);var o=e-s;if(o ul li:has(ul)').on('mouseenter',function(){if(jQuery(window).width()>handheldBreakpoint){var $this=jQuery(this);$this.addClass('active-parent');$this.find('> .children, > .sub-menu').stop(true).delay(150).slideDown(200);}}).on('mouseleave',function(){if(jQuery(window).width()>handheldBreakpoint){var $this=jQuery(this);$this.find('> .children, > .sub-menu').stop(true).delay(150).slideUp(150,function(){$this.removeClass('active-parent');});}});jQuery('#header nav #menu-burger').on('click',function(){jQuery('#header nav #menu').toggleClass('menu-shown');});var $kenburns=jQuery('.kenburns-gallery.gallery');if($kenburns.length>0){var gallery_set=[];$kenburns.find('.gallery-icon img').each(function(){gallery_set.push(jQuery(this).attr('src'));});jQuery('#kenburns').attr('width',jQuery(window).width());jQuery('#kenburns').attr('height',jQuery(window).height());jQuery('#kenburns').kenburns({images:gallery_set,frames_per_second:30,display_time:5000,fade_time:1000,zoom:1.2,background_color:'#F7F6F5'});} jQuery('body.home.loading').height(jQuery(window).height());jQuery("a:not(#gallery-filter a, #grid-changer a)").on('click',function(e){var link=$(this).attr('href');if($(this).attr('target')!='_blank'&&link.indexOf('.jpg')<0&&link.indexOf('.jpeg')<0&&link.indexOf('.png')<0&&link.indexOf('.gif')<0&&link.indexOf('#')<0){$('.loadreveal').removeClass('reveal');setTimeout(function(){window.location.href=link;},400);e.preventDefault();}});$(document).ready(function(){$('.flippy').flippy({interval:4,speed:500,stop:false,distance:"100px"});});$(document).ready(function(){$("#main-carousel").owlCarousel({autoPlay:3000,items:8,autoHeight:true,lazyLoad:true,navigation:false,itemsDesktop:[1199,6],itemsDesktopSmall:[979,4],itemsMobile:[479,2]});});jQuery(window).load(function(){jQuery('.loadreveal').addClass('reveal');jQuery('#loadscreen').stop().animate({opacity:0},200,function(){jQuery('body.home').removeClass('loading');jQuery(this).hide();});});})(jQuery);