!function(e){e.fn.supercarousel=function(i){var t,n,s=this,l=e(this),r=!1,o=0,a=!1,d=1,c=0,f=e.fn.supercarousel,u=f.defaults,p=0,h=0,v={},g={},b=function(){n=e.extend({},u,i),t&&(t.width()<=n.mobileWidth?(n.mobileVisible>0&&(n.visible=n.mobileVisible),n.mobileItemWidth>0&&(n.itemWidth=n.mobileItemWidth),n.mobileItemHeight>0&&(n.itemHeight=n.mobileItemHeight)):t.width()<=n.tabletWidth&&(n.tabletVisible>0&&(n.visible=n.tabletVisible),n.tabletItemWidth>0&&(n.itemWidth=n.tabletItemWidth),n.tabletItemHeight>0&&(n.itemHeight=n.tabletItemHeight)))},w=function(){if(l.wrap('
').css({display:"block",visibility:"visible"}),t=l.parent()){var e=l.html();l.prepend(e),l.append(e),p=l.children().length/3,b(),C(),y(),n.onload(l),t.height(800),H(),x(),setTimeout(function(){x()},500)}},y=function(){l.find(">div a").click(function(i){e(i.target).hasClass("superswipe")&&i.preventDefault()})},C=function(){if(t){var e=W(1e5,999999),i=l.find(">div").length/3;l.find(">div:lt("+i+") a.superlight").attr("class","blk superlightx"+e),l.find(">div:gt("+(2*i-1)+") a.superlight").attr("class","blk superlighty"+e),l.find(">div a.superlight").attr("class","blk superlight"+e),t.parent().lightGallery({selector:".superlight"+e}),t.parent().lightGallery({selector:".superlightx"+e}),t.parent().lightGallery({selector:".superlighty"+e}),s.resetSwipe()}},W=function(e,i){return Math.floor(Math.random()*(i-e))+e},x=function(){t&&(b(),z(),L(),A(),P(),S(),B(),j(c),l.stop(!0,!0))},H=function(){""!=n.next&&e(n.next).click(function(e){e.preventDefault(),(d-1>c||n.circular)&&j(c+1)}).css({display:"block"}),""!=n.prev&&e(n.prev).click(function(e){e.preventDefault(),(c>0||n.circular)&&j(c-1)}).css({display:"block"}),n.swipe&&s.resetSwipe(),n.keys&&e("body").keyup(function(e){49==e.keyCode?j(0):50==e.keyCode?j(1):51==e.keyCode?j(2):52==e.keyCode?j(3):53==e.keyCode?j(4):54==e.keyCode?j(5):55==e.keyCode?j(6):56==e.keyCode?j(7):57==e.keyCode?j(8):58==e.keyCode?j(9):37==e.keyCode?j(c-1):39==e.keyCode?j(c+1):38==e.keyCode?j(c-1):40==e.keyCode&&j(c+1)}),n.mouseWheel&&t.bind("mousewheel",function(e,i){t.ismouseover()&&(j(i>0?c-1:c+1),e.preventDefault())})},T=function(e){var i=c,t=-G(i)-e;if(e>0){for(;-G(i)>t&&(!(i>=d)||n.circular);)i++;if(i>=d&&!n.circular)return d-1}else{for(;-G(i)=i)||n.circular);)i--;if(0>=i&&!n.circular)return 0}return i};s.resetSwipe=function(){t.swipe("destroy"),n.swipe&&t.swipe({excludedElements:"button, input, select, textarea, .noSwipe",triggerOnTouchLeave:!0,swipeLeft:function(e,i,t,n,s){},swipeRight:function(e,i,t,n,s){},swipeStatus:function(i,t,s,r){if("move"!=t||"left"!=s&&"right"!=s){if("cancel"==t)l.animate({left:-G(c)}),I(i);else if("end"==t){var o=G(c);l.position().left;if("right"==s){var f=T(-r);j(c>0||n.circular?f:c)}else if("left"==s){var f=T(r);j(d-1>c||n.circular?f:c)}I(i)}}else{var o=G(c),u=G(d-1),p=G(0);"left"==s?-u>-o-r&&!n.circular?l.stop(!0,!0).css("left",-u):l.stop(!0,!0).css("left",-o-r):"right"==s&&(-o+r>-p&&!n.circular?l.stop(!0,!0).css("left",-p):l.stop(!0,!0).css("left",-o+r)),a&&(clearTimeout(a),a=!1),e(i.target).addClass("superswipe")}},allowPageScroll:"vertical",tap:function(e,i){}})};var I=function(i){a=setTimeout(function(){e(i.target).removeClass("superswipe")},500)},$=function(){if(t&&n.autoscroll){n.effect="slide",("up"==n.direction||"down"==n.direction)&&(n.direction="left");var e,i,s=G(0),r=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),o=-1!=navigator.appVersion.indexOf("Win")?!0:!1,a=1;r&&o&&(a=4),"left"==n.direction?(e=-(2*s),i="-="+n.scrollspeed*a+"px"):(e=-s,s=2*s,l.css({left:-s}),i="+="+n.scrollspeed*a+"px"),M(s,i,e)}},M=function(e,i,s){setTimeout(function(){return r||n.pauseOver&&t.ismouseover()?void M(e,i,s):(l.css({left:i}),Math.abs(s)-Math.abs(e)s&&l.css({left:-e}),void M(e,i,s))},n.scrollinterval)},q=function(){t&&n.auto&&!n.autoscroll&&setInterval(function(){r||(n.pauseOver?t.ismouseover()||V():V())},n.pauseTime)},V=function(){"left"==n.direction||"down"==n.direction?j(c+1):("right"==n.direction||"up"==n.direction)&&j(c-1)},S=function(){if(""!=n.paging)for(e(n.paging).html(""),m=0;m'+(m+1)+"").click(function(i){i.preventDefault(),j(e(this).index())});e(n.paging).append(i)}},j=function(i){if(!r){if(i>=d&&!n.circular)return void j(0);if(0>i&&!n.circular)return void j(d-1);n.onchange(l,c,d),i!=d-1||n.circular||""==n.next?""!=n.next&&e(n.next).hasClass("disabled")&&e(n.next).removeClass("disabled"):e(n.next).addClass("disabled"),0!=i||n.circular||""==n.prev?""!=n.prev&&e(n.prev).hasClass("disabled")&&e(n.prev).removeClass("disabled"):e(n.prev).addClass("disabled"),c=i,"slide"==n.effect?"left"==n.direction||"right"==n.direction?E():("up"==n.direction||"down"==n.direction)&&D():"focus"==n.effect?O():"fade"==n.effect&&Q(),""!=n.paging&&e(n.paging).find(">a:eq("+c+")").length>0&&(e(n.paging).find(">a").removeClass("selected"),e(n.paging).find(">a:eq("+c+")").addClass("selected"))}},G=function(e){var i;if(!t)return 0;if(n.step>0){var s=e*n.step+p;0>s?s=0:s>l.find(">div").length-1&&(s=p),i=l.find(">div:eq("+s+")").position().left}else i=e*t.outerWidth(!1),i+=h;if(!n.circular){var r=-2*h+t.outerWidth(!1);r>-i&&(i=-r)}var r=-2*h,o=-1*h+t.outerWidth(!1);return r>=-i?(i=-r,c=0):-i>=o&&0>c&&(i=-o,c=d-1),i},Q=function(){var e=G(c);r=!0;var i=l.clone().css({position:"absolute",display:"none",zIndex:0,left:-e,top:l.position().top}).appendTo(t);i.fadeIn(n.easingTime,n.easing,function(){l.css({left:-e}),i.remove(),r=!1;var n=-2*h,s=-1*h+t.outerWidth(!1);n>=-e?l.css({left:-e+h}):-e>=s&&l.css({left:-e-h})})},D=function(){var e=G(c);if(r=!0,"up"==n.direction)if(-e=-e?l.css({left:-e+h}):-e>=n&&l.css({left:-e-h})})},O=function(){var e=G(c),i=c*n.step+p;l.find(">div").removeClass("focus"),l.find(">div:eq("+i+")").addClass("focus"),l.find(">div:eq("+(i+p)+")").addClass("focus"),l.find(">div:eq("+(i-p)+")").addClass("focus");var s=l.find(">div:eq("+i+")").width()/2-t.width()/2;e+=s,r=!0,l.stop(!0,!0).animate({left:-e},n.easingTime,n.easing,function(){r=!1;var i=-2*h-s,n=-1*h-s+t.outerWidth(!1);i>=-e?l.css({left:-e+h}):-e>=n&&l.css({left:-e-h})}),B()},E=function(){var e=G(c);r=!0,l.stop(!0,!0).animate({left:-e},n.easingTime,n.easing,function(){r=!1;var i=-2*h,n=-1*h+t.outerWidth(!1);i>=-e?l.css({left:-e+h}):-e>=n&&l.css({left:-e-h})}),B()},z=function(){n.step>p&&(n.step=p),n.visible&&(n.step>n.visible||0==n.step)&&(n.step=n.visible)},L=function(){n.visible?(v={width:_(),height:"auto"},g={width:"100%",height:"auto"}):""!=n.itemWidth?(v={width:n.itemWidth,height:"auto"},g={width:"100%",height:"auto"}):""!=n.itemHeight&&(v={width:"auto",height:n.itemHeight},g={width:"auto",height:"100%"}),l.find(">div").css(v),R()},P=function(){if($t=l.find(">div:last"),h=($t.position().left+$t.outerWidth(!1))/3,!t)return 0;if(n.step>0){if(n.visible&&1==n.visible)return void(d=p);if(n.visible&&n.visible>1)return d=(p-(n.visible-n.step))/n.step,void(1>d&&(d=1));d=1;for(var e=-1*G(d-1),i=-2*h+t.outerWidth(!1);e>i;)d++,e=-1*G(d-1);return;var e,i}else d=Math.ceil(h/t.outerWidth(!1))},A=function(){l.find(">div").each(function(){$ele=e(this),""!=n.itemHeight&&"image"==n.type&&$ele.width($ele.find(".imgslide").width()),$ele.prev().length?$ele.css({left:$ele.prev().position().left+$ele.prev().outerWidth(!1)+n.slideGap}):$ele.css({left:0})})},B=function(){if(n.autoHeight&&n.step>0){var e,i=c*n.step+p;if(n.visible)e=l.find(">div").slice(i,i+n.visible).superMaxHeightElement().height();else if(n.itemWidth){var s=Math.ceil(t.width()/n.itemWidth);e=l.find(">div").slice(i,i+s).superMaxHeightElement().height()}else e=l.find(">div:eq("+i+")").height();return void t.stop(!0,!0).animate({height:e},700,"swing",function(){})}var r=0;for(k=p;k<2*p;k++)i=l.children(":eq("+k+")"),i.height()>r&&(r=i.height());t&&t.height(r)},R=function(){"image"==n.type&&l.find("img").css(g)},_=function(){return t?Math.ceil((t.width()-(n.visible-1)*n.slideGap)/n.visible):0},F=function(){setTimeout(function(){x()},500)},J=function(){setInterval(function(){t.parent().is(":visible")?1==o&&(F(),o=0):o=1},500)},K=function(){n.superhidden&&J()};return e(window).resize(function(){x()}),l.find("img").length?l.imagesLoaded(function(){w(),q(),$(),K()}):(w(),q(),$(),K()),s};var i=e.fn.supercarousel;i.defaults={direction:"left",effect:"slide",itemWidth:"",itemHeight:"",slideGap:5,mobileVisible:1,tabletVisible:2,mobileWidth:480,tabletWidth:768,step:1,type:"content",auto:!1,autoscroll:!1,scrollspeed:1,scrollinterval:10,autoHeight:!1,easing:"swing",easingTime:700,pauseTime:1e3,pauseOver:!0,next:"",prev:"",paging:"",circular:!1,mouseWheel:!1,swipe:!1,keys:!1,superhidden:!1,onchange:function(e,i,t){},onload:function(e){}}}(jQuery),jQuery.fn.superMaxHeightElement=function(){var e=null,i=0;return this.each(function(){var t=jQuery(this).height();t>i&&(i=t,e=jQuery(this))}),e},jQuery.expr[":"].hiddenByParent=function(e){return jQuery(e).parents("*:not(:visible)").length}; (function(c,q){var m="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function n(){var b=c(j),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function p(b){k(b.target,"error"===b.type)}function k(b,a){b.src===m||-1!==c.inArray(b,l)||(l.push(b),a?h.push(b):j.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),r&&d.notifyWith(c(b),[a,e,c(j),c(h)]),e.length===l.length&&(setTimeout(n),e.unbind(".imagesLoaded", p)))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():0,r=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),l=[],j=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",p).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)k(a,e.isBroken);else if(a.complete&&a.naturalWidth!==q)k(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=m,a.src=d}): n();return d?d.promise(g):g}})(jQuery); !function(t){function e(){var e=t(this);e.mousemove(function(t){jQuery.mlp={x:t.pageX,y:t.pageY}})}t.mlp={x:0,y:0},t(e),t.fn.ismouseover=function(e){var o=!1;return this.eq(0).each(function(){var e=t(this),n=e.offset();o=n.left<=t.mlp.x&&n.left+e.outerWidth()>t.mlp.x&&n.top<=t.mlp.y&&n.top+e.outerHeight()>t.mlp.y}),o}}(jQuery); jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g0)){var r,i=e.originalEvent?e.originalEvent:e,o=O?i.touches[0]:i;return Fe=E,O?Ve=i.touches.length:e.preventDefault(),Ue=0,He=null,Ye=null,je=0,_e=0,Qe=0,Ce=1,Xe=0,ze=de(),qe=ve(),le(),!O||Ve===t.fingers||t.fingers===T||q()?(pe(0,o),Ge=Me(),2==Ve&&(pe(1,i.touches[1]),_e=Qe=Ee(ze[0].start,ze[1].start)),(t.swipeStatus||t.pinchStatus)&&(r=U(i,Fe))):r=!1,r===!1?(Fe=y,U(i,Fe),r):(t.hold&&(nt=setTimeout(n.proxy(function(){We.trigger("hold",[i.target]),t.hold&&(r=t.hold.call(We,i,i.target))},this),t.longTapThreshold)),se(!0),null)}}function L(n){var e=n.originalEvent?n.originalEvent:n;if(Fe!==m&&Fe!==y&&!ae()){var r,i=O?e.touches[0]:e,o=he(i);if(Ze=Me(),O&&(Ve=e.touches.length),t.hold&&clearTimeout(nt),Fe=S,2==Ve&&(0==_e?(pe(1,e.touches[1]),_e=Qe=Ee(ze[0].start,ze[1].start)):(he(e.touches[1]),Qe=Ee(ze[0].end,ze[1].end),Ye=me(ze[0].end,ze[1].end)),Ce=Se(_e,Qe),Xe=Math.abs(_e-Qe)),Ve===t.fingers||t.fingers===T||!O||q()){if(He=xe(o.start,o.end),X(n,He),Ue=ye(o.start,o.end),je=be(),ge(He,Ue),(t.swipeStatus||t.pinchStatus)&&(r=U(e,Fe)),!t.triggerOnTouchEnd||t.triggerOnTouchLeave){var u=!0;if(t.triggerOnTouchLeave){var l=Pe(this);u=De(o.end,l)}!t.triggerOnTouchEnd&&u?Fe=N(S):t.triggerOnTouchLeave&&!u&&(Fe=N(m)),(Fe==y||Fe==m)&&U(e,Fe)}}else Fe=y,U(e,Fe);r===!1&&(Fe=y,U(e,Fe))}}function R(n){var e=n.originalEvent;return O&&e.touches.length>0?(ue(),!0):(ae()&&(Ve=Je),Ze=Me(),je=be(),_()||!j()?(Fe=y,U(e,Fe)):t.triggerOnTouchEnd||0==t.triggerOnTouchEnd&&Fe===S?(n.preventDefault(),Fe=m,U(e,Fe)):!t.triggerOnTouchEnd&&B()?(Fe=m,H(e,Fe,f)):Fe===S&&(Fe=y,U(e,Fe)),se(!1),null)}function k(){Ve=0,Ze=0,Ge=0,_e=0,Qe=0,Ce=1,le(),se(!1)}function A(n){var e=n.originalEvent;t.triggerOnTouchLeave&&(Fe=N(m),U(e,Fe))}function I(){We.unbind(Re,D),We.unbind(Ne,k),We.unbind(ke,L),We.unbind(Ae,R),Ie&&We.unbind(Ie,A),se(!1)}function N(n){var e=n,r=C(),i=j(),o=_();return!r||o?e=y:!i||n!=S||t.triggerOnTouchEnd&&!t.triggerOnTouchLeave?!i&&n==m&&t.triggerOnTouchLeave&&(e=y):e=m,e}function U(n,e){var t=void 0;return z()||V()||W()||q()?((z()||V())&&(t=H(n,e,p)),(W()||q())&&t!==!1&&(t=H(n,e,h))):ie()&&t!==!1?t=H(n,e,d):oe()&&t!==!1?t=H(n,e,g):re()&&t!==!1&&(t=H(n,e,f)),e===y&&k(n),e===m&&(O?0==n.touches.length&&k(n):k(n)),t}function H(e,c,s){var w=void 0;if(s==p){if(We.trigger("swipeStatus",[c,He||null,Ue||0,je||0,Ve,ze]),t.swipeStatus&&(w=t.swipeStatus.call(We,e,c,He||null,Ue||0,je||0,Ve,ze),w===!1))return!1;if(c==m&&F()){if(We.trigger("swipe",[He,Ue,je,Ve,ze]),t.swipe&&(w=t.swipe.call(We,e,He,Ue,je,Ve,ze),w===!1))return!1;switch(He){case r:We.trigger("swipeLeft",[He,Ue,je,Ve,ze]),t.swipeLeft&&(w=t.swipeLeft.call(We,e,He,Ue,je,Ve,ze));break;case i:We.trigger("swipeRight",[He,Ue,je,Ve,ze]),t.swipeRight&&(w=t.swipeRight.call(We,e,He,Ue,je,Ve,ze));break;case o:We.trigger("swipeUp",[He,Ue,je,Ve,ze]),t.swipeUp&&(w=t.swipeUp.call(We,e,He,Ue,je,Ve,ze));break;case u:We.trigger("swipeDown",[He,Ue,je,Ve,ze]),t.swipeDown&&(w=t.swipeDown.call(We,e,He,Ue,je,Ve,ze))}}}if(s==h){if(We.trigger("pinchStatus",[c,Ye||null,Xe||0,je||0,Ve,Ce,ze]),t.pinchStatus&&(w=t.pinchStatus.call(We,e,c,Ye||null,Xe||0,je||0,Ve,Ce,ze),w===!1))return!1;if(c==m&&Y())switch(Ye){case l:We.trigger("pinchIn",[Ye||null,Xe||0,je||0,Ve,Ce,ze]),t.pinchIn&&(w=t.pinchIn.call(We,e,Ye||null,Xe||0,je||0,Ve,Ce,ze));break;case a:We.trigger("pinchOut",[Ye||null,Xe||0,je||0,Ve,Ce,ze]),t.pinchOut&&(w=t.pinchOut.call(We,e,Ye||null,Xe||0,je||0,Ve,Ce,ze))}}return s==f?(c===y||c===m)&&(clearTimeout($e),clearTimeout(nt),J()&&!ne()?(Ke=Me(),$e=setTimeout(n.proxy(function(){Ke=null,We.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(We,e,e.target))},this),t.doubleTapThreshold)):(Ke=null,We.trigger("tap",[e.target]),t.tap&&(w=t.tap.call(We,e,e.target)))):s==d?(c===y||c===m)&&(clearTimeout($e),Ke=null,We.trigger("doubletap",[e.target]),t.doubleTap&&(w=t.doubleTap.call(We,e,e.target))):s==g&&(c===y||c===m)&&(clearTimeout($e),Ke=null,We.trigger("longtap",[e.target]),t.longTap&&(w=t.longTap.call(We,e,e.target))),w}function j(){var n=!0;return null!==t.threshold&&(n=Ue>=t.threshold),n}function _(){var n=!1;return null!==t.cancelThreshold&&null!==He&&(n=we(He)-Ue>=t.cancelThreshold),n}function Q(){return null!==t.pinchThreshold?Xe>=t.pinchThreshold:!0}function C(){var n;return n=t.maxTimeThreshold&&je>=t.maxTimeThreshold?!1:!0}function X(n,e){if(t.preventDefaultEvents!==!1)if(t.allowPageScroll===c)n.preventDefault();else{var l=t.allowPageScroll===s;switch(e){case r:(t.swipeLeft&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case i:(t.swipeRight&&l||!l&&t.allowPageScroll!=w)&&n.preventDefault();break;case o:(t.swipeUp&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault();break;case u:(t.swipeDown&&l||!l&&t.allowPageScroll!=v)&&n.preventDefault()}}}function Y(){var n=G(),e=Z(),t=Q();return n&&e&&t}function q(){return!!(t.pinchStatus||t.pinchIn||t.pinchOut)}function W(){return!(!Y()||!q())}function F(){var n=C(),e=j(),t=G(),r=Z(),i=_(),o=!i&&r&&t&&e&&n;return o}function V(){return!!(t.swipe||t.swipeStatus||t.swipeLeft||t.swipeRight||t.swipeUp||t.swipeDown)}function z(){return!(!F()||!V())}function G(){return Ve===t.fingers||t.fingers===T||!O}function Z(){return 0!==ze[0].end.x}function B(){return!!t.tap}function J(){return!!t.doubleTap}function K(){return!!t.longTap}function $(){if(null==Ke)return!1;var n=Me();return J()&&n-Ke<=t.doubleTapThreshold}function ne(){return $()}function ee(){return(1===Ve||!O)&&(isNaN(Ue)||Uet.longTapThreshold&&b>Ue}function re(){return!(!ee()||!B())}function ie(){return!(!$()||!J())}function oe(){return!(!te()||!K())}function ue(){Be=Me(),Je=event.touches.length+1}function le(){Be=0,Je=0}function ae(){var n=!1;if(Be){var e=Me()-Be;e<=t.fingerReleaseThreshold&&(n=!0)}return n}function ce(){return!(We.data(P+"_intouch")!==!0)}function se(n){n===!0?(We.bind(ke,L),We.bind(Ae,R),Ie&&We.bind(Ie,A)):(We.unbind(ke,L,!1),We.unbind(Ae,R,!1),Ie&&We.unbind(Ie,A,!1)),We.data(P+"_intouch",n===!0)}function pe(n,e){var t=void 0!==e.identifier?e.identifier:0;return ze[n].identifier=t,ze[n].start.x=ze[n].end.x=e.pageX||e.clientX,ze[n].start.y=ze[n].end.y=e.pageY||e.clientY,ze[n]}function he(n){var e=void 0!==n.identifier?n.identifier:0,t=fe(e);return t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function fe(n){for(var e=0;e=e;e++)n.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return n}function ge(n,e){e=Math.max(e,we(n)),qe[n].distance=e}function we(n){return qe[n]?qe[n].distance:void 0}function ve(){var n={};return n[r]=Te(r),n[i]=Te(i),n[o]=Te(o),n[u]=Te(u),n}function Te(n){return{direction:n,distance:0}}function be(){return Ze-Ge}function Ee(n,e){var t=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y);return Math.round(Math.sqrt(t*t+r*r))}function Se(n,e){var t=e/n*1;return t.toFixed(2)}function me(){return 1>Ce?a:l}function ye(n,e){return Math.round(Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)))}function Oe(n,e){var t=n.x-e.x,r=e.y-n.y,i=Math.atan2(r,t),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function xe(n,e){var t=Oe(n,e);return 45>=t&&t>=0?r:360>=t&&t>=315?r:t>=135&&225>=t?i:t>45&&135>t?u:o}function Me(){var n=new Date;return n.getTime()}function Pe(e){e=n(e);var t=e.offset(),r={left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()};return r}function De(n,e){return n.x>e.left&&n.xe.top&&n.y)/g,template:">"},dq:{regex:/(")/g,template:"""},sq:{regex:/(')/g,template:"'"},link:{regex:/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,template:'$1'},user:{regex:/((?:^|[^a-zA-Z0-9_!#$%&*@@]|RT:?))([@@])([a-zA-Z0-9_]{1,20})(\/[a-zA-Z][a-zA-Z0-9_-]{0,24})?/g,template:'$1@$3$4'},hash:{regex:/(^|\s)#(\w+)/g,template:'$1#$2'},email:{regex:/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi,template:'$1'}};var i=e.extend(r,n);e.each(i,function(e,n){t=t.replace(n.regex,n.template)});return t}})})(jQuery) jQuery.fn.framerate=function(e){var t=jQuery.extend({framerate:30,logframes:!1},e),r=Math.floor(1e3/t.framerate);jQuery.extend(jQuery.fx.prototype,{custom:function(e,t,i){function n(e){return s.step(e)}this.startTime=(new Date).getTime(),this.start=e,this.end=t,this.unit=i||this.unit||"px",this.now=this.start,this.pos=this.state=0;var s=this;n.elem=this.elem,"undefined"==typeof jQuery.timerId&&(jQuery.timerId=!1),n()&&jQuery.timers.push(n)&&!jQuery.timerId&&(jQuery.timerId=setInterval(jQuery.fx.tick,r))}});var i=(new Date).getTime();jQuery.extend(jQuery.fx,{tick:function(){if(t.logframes){var e=(new Date).getTime();console.log(Math.floor(1e3/(e-i))),i=e}for(var r=jQuery.timers,n=0;n').addClass("light-gallery"),a=e("#lg-outer"),i=e("#lg-gallery"),q.showAfterLoad===!0&&i.addClass("show-after-load"),n=i.find("#lg-slider");var t="";if(q.dynamic)for(var s=0;s';else p.each(function(){t+='
'});n.append(t),l=i.find(".lg-slide")},closeSlide:function(){q.closable&&e("#lg-outer").on("click",function(t){e(t.target).is(".lg-slide")&&v.destroy(!1)}),e("#lg-close").bind("click touchend",function(){v.destroy(!1)})},getWidth:function(){var t=function(){c=e(window).width()};e(window).bind("resize.lightGallery",t())},doCss:function(){var e=function(){for(var e=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],t=document.documentElement,i=0;i=l?(t.prevSlide(),clearInterval(h)):-l>=n&&(t.nextSlide(),clearInterval(h))})}},touch:function(){var t,i,a=this;e(".light-gallery").bind("mousedown",function(e){e.stopPropagation(),e.preventDefault(),t=e.pageX}),e(".light-gallery").bind("mouseup",function(e){e.stopPropagation(),e.preventDefault(),i=e.pageX,i-t>20?a.prevSlide():t-i>20&&a.nextSlide()})},isVideo:function(e,t){var i=e.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i),a=e.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),n=!1;return q.dynamic?"true"==q.dynamicEl[t].iframe&&(n=!0):"true"==p.eq(t).attr("data-iframe")&&(n=!0),i||a||n?!0:void 0},loadVideo:function(t,i){var a=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i),n=t.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),l="",s="";if(a){if(s=q.videoAutoplay===!0&&C===!1?"?autoplay=1&rel=0&wmode=opaque":"?wmode=opaque",q.youtubePlayerParams){var o=e.param(q.youtubePlayerParams);s=s+"&"+o}l=''}else n?(s=q.videoAutoplay===!0&&C===!1?"autoplay=1&":"",l=''):l='';return'
'+l+"
"},addHtml:function(t){var i=null;if(i=q.dynamic?q.dynamicEl[t]["sub-html"]:p.eq(t).attr("data-sub-html"),"undefined"!=typeof i&&null!==i){var a=i.substring(0,1);i="."==a||"#"==a?e(i).html():i,l.eq(t).append(i)}},preload:function(e){for(var t=e,i=0;i<=q.preload&&!(i>=p.length-e);i++)this.loadContent(t+i,!0);for(var a=0;a<=q.preload&&!(0>t-a);a++)this.loadContent(t-a,!0)},loadObj:function(e,t){var i=this;l.eq(t).find(".object").on("load error",function(){l.eq(t).addClass("complete")}),e===!1&&(l.eq(t).hasClass("complete")?i.preload(t):l.eq(t).find(".object").on("load error",function(){i.preload(t)}))},loadContent:function(t,i){var a,n=this;p.length-t;q.preload>p.length&&(q.preload=p.length),q.mobileSrc===!0&&c<=q.mobileSrcMaxWidth&&(a=q.dynamic?q.dynamicEl[t].mobileSrc:p.eq(t).attr("data-responsive-src")),a||(a=q.dynamic?q.dynamicEl[t].src:p.eq(t).attr("data-src"));var s=0;i===!0&&(s=q.speed+400),"undefined"!=typeof a&&""!==a?n.isVideo(a,t)?setTimeout(function(){l.eq(t).hasClass("loaded")||(l.eq(t).prepend(n.loadVideo(a,t)),n.addHtml(t),l.eq(t).addClass("loaded"),q.auto&&q.videoAutoplay===!0&&clearInterval(h)),n.loadObj(i,t)},s):setTimeout(function(){l.eq(t).hasClass("loaded")||(l.eq(t).prepend(''),n.addHtml(t),l.eq(t).addClass("loaded")),n.loadObj(i,t)},s):setTimeout(function(){if(!l.eq(t).hasClass("loaded")){var a=null;if(a=q.dynamic?q.dynamicEl[t].html:p.eq(t).attr("data-html"),"undefined"!=typeof a&&null!==a){var s=a.substring(0,1);a="."==s||"#"==s?e(a).html():a}"undefined"!=typeof a&&null!==a&&l.eq(t).append('
'+a+"
"),n.addHtml(t),l.eq(t).addClass("loaded complete"),q.auto&&q.videoAutoplay===!0&&clearInterval(h)}n.loadObj(i,t)},s)},counter:function(){if(q.counter===!0){var t=e("#lg-slider > div").length;i.append("
/ "+t+"
")}},buildThumbnail:function(){if(q.thumbnail===!0&&p.length>1){var t=this,a="";q.showThumbByDefault||(a=''),i.append('
'+a+'
'),r=i.find(".thumb-cont"),s.after(''),s.parent().addClass("has-thumb"),i.find(".cl-thumb").bind("click touchend",function(){i.addClass("open"),t.doCss()&&"slide"===q.mode&&(l.eq(b).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(b).nextAll().removeClass("prev-slide").addClass("next-slide"))}),i.find(".thumb-cont .close").bind("click touchend",function(){i.removeClass("open")});var n,o=i.find(".thumb-info"),d=i.find(".thumb-inner"),c="";if(q.dynamic)for(var m=0;m';else p.each(function(){n=q.exThumbImage===!1||"undefined"==typeof e(this).attr(q.exThumbImage)||null===e(this).attr(q.exThumbImage)?e(this).find("img").attr("src"):e(this).attr(q.exThumbImage),c+='
'});if(d.append(c),u=d.find(".thumb"),u.css({"margin-right":q.thumbMargin+"px",width:q.thumbWidth+"px"}),q.animateThumb===!0){var f=p.length*(q.thumbWidth+q.thumbMargin);i.find(".thumb-inner").css({width:f+"px",position:"relative","transition-duration":q.speed+"ms"})}u.bind("click touchend",function(){w=!0;var i=e(this).index();u.removeClass("active"),e(this).addClass("active"),t.slide(i),t.animateThumb(i),clearInterval(h)}),o.prepend(''+q.lang.allPhotos+" ("+u.length+")"),q.showThumbByDefault&&i.addClass("open")}},animateThumb:function(e){if(q.animateThumb===!0){var t,a=i.find(".thumb-cont").width();switch(q.currentPagerPosition){case"left":t=0;break;case"middle":t=a/2-q.thumbWidth/2;break;case"right":t=a-q.thumbWidth}var n=(q.thumbWidth+q.thumbMargin)*e-1-t,l=p.length*(q.thumbWidth+q.thumbMargin);n>l-a&&(n=l-a),0>n&&(n=0),this.doCss()?i.find(".thumb-inner").css("transform","translate3d(-"+n+"px, 0px, 0px)"):i.find(".thumb-inner").animate({left:-n+"px"},q.speed)}},slideTo:function(){var e=this;q.controls===!0&&p.length>1&&(i.append('
'),s=i.find("#lg-prev"),o=i.find("#lg-next"),s.bind("click",function(){e.prevSlide(),clearInterval(h)}),o.bind("click",function(){e.nextSlide(),clearInterval(h)}))},autoStart:function(){var e=this;q.auto===!0&&(h=setInterval(function(){b=b+11?i.hasClass("open")||(t.doCss()&&"slide"===q.mode&&(l.eq(b).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(b).nextAll().removeClass("prev-slide").addClass("next-slide")),i.addClass("open")):39===e.keyCode&&(t.nextSlide(),clearInterval(h)),40===e.keyCode&&q.thumbnail===!0&&p.length>1&&!q.showThumbByDefault?i.hasClass("open")&&i.removeClass("open"):q.escKey===!0&&27===e.keyCode&&(!q.showThumbByDefault&&i.hasClass("open")?i.removeClass("open"):v.destroy(!1))})},nextSlide:function(){var e=this;b=l.index(l.eq(d)),b+11&&!q.showThumbByDefault?i.addClass("open"):(l.eq(b).find(".object").addClass("right-end"),setTimeout(function(){l.find(".object").removeClass("right-end")},400)),e.animateThumb(b),q.onSlideNext.call(this,v)},prevSlide:function(){var e=this;b=l.index(l.eq(d)),b>0?(b--,e.slide(b)):q.loop?(b=p.length-1,e.slide(b)):q.thumbnail===!0&&p.length>1&&!q.showThumbByDefault?i.addClass("open"):(l.eq(b).find(".object").addClass("left-end"),setTimeout(function(){l.find(".object").removeClass("left-end")},400)),e.animateThumb(b),q.onSlidePrev.call(this,v)},slide:function(t){var i=this;if(C?(setTimeout(function(){i.loadContent(t,!1)},q.speed+400),n.hasClass("on")||n.addClass("on"),this.doCss()&&""!==q.speed&&(n.hasClass("speed")||n.addClass("speed"),x===!1&&(n.css("transition-duration",q.speed+"ms"),x=!0)),this.doCss()&&""!==q.cssEasing&&(n.hasClass("timing")||n.addClass("timing"),T===!1&&(n.css("transition-timing-function",q.cssEasing),T=!0)),q.onSlideBefore.call(this,v)):i.loadContent(t,!1),"slide"===q.mode){var a=null!==navigator.userAgent.match(/iPad/i);!this.doCss()||n.hasClass("slide")||a?this.doCss()&&!n.hasClass("use-left")&&a&&n.addClass("use-left"):n.addClass("slide"),this.doCss()||C?!this.doCss()&&C&&n.animate({left:100*-t+"%"},q.speed,q.easing):n.css({left:100*-t+"%"})}else"fade"===q.mode&&(this.doCss()&&!n.hasClass("fade-m")?n.addClass("fade-m"):this.doCss()||n.hasClass("animate")||n.addClass("animate"),this.doCss()||C?!this.doCss()&&C&&(l.eq(d).fadeOut(q.speed,q.easing),l.eq(t).fadeIn(q.speed,q.easing)):(l.fadeOut(100),l.eq(t).fadeIn(100)));if(t+1>=p.length&&q.auto&&q.loop===!1&&clearInterval(h),l.eq(d).removeClass("current"),l.eq(t).addClass("current"),this.doCss()&&"slide"===q.mode&&(w===!1?(e(".prev-slide").removeClass("prev-slide"),e(".next-slide").removeClass("next-slide"),l.eq(t-1).addClass("prev-slide"),l.eq(t+1).addClass("next-slide")):(l.eq(t).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(t).nextAll().removeClass("prev-slide").addClass("next-slide"))),q.thumbnail===!0&&p.length>1&&(u.removeClass("active"),u.eq(t).addClass("active")),q.controls&&q.hideControlOnEnd&&q.loop===!1&&p.length>1){var r=p.length;r=parseInt(r)-1,0===t?(s.addClass("disabled"),o.removeClass("disabled")):t===r?(s.removeClass("disabled"),o.addClass("disabled")):s.add(o).removeClass("disabled")}d=t,C===!1?q.onOpen.call(this,v):q.onSlideAfter.call(this,v),setTimeout(function(){C=!0}),w=!1,q.counter&&e("#lg-counter-current").text(t+1),e(window).bind("resize.lightGallery",function(){setTimeout(function(){i.animateThumb(t)},200)})}};return v.isActive=function(){return g===!0?!0:!1},v.destroy=function(t){g=!1,t="undefined"!=typeof t?!1:!0,q.onBeforeClose.call(this,v);var n=C;C=!1,T=!1,x=!1,w=!1,clearInterval(h),t===!0&&p.off("click touch touchstart"),e("body .light-gallery").off("mousedown mouseup"),e("body").off("touchstart.lightGallery touchmove.lightGallery touchend.lightGallery"),e(window).off("resize.lightGallery keyup.lightGallery"),n===!0&&(i.addClass("fade-m"),setTimeout(function(){a.remove(),e("body").removeClass("light-gallery")},500)),q.onCloseAfter.call(this,v)},S.init(),this}}(jQuery); !function(t){t.extend(t.fn,{watch:function(n,e,r){var o=document.createElement("div"),i=function(t,n){t="on"+t;var e=t in n;return e||(n.setAttribute(t,"return;"),e="function"==typeof n[t]),e};"function"==typeof e&&(r=e,e={}),"function"!=typeof r&&(r=function(){}),e=t.extend({},{throttle:10},e);var a=function(t){for(var n,e=t.data(),r=!1,o=0;o