!function(jQuery){jQuery.fn.supercarousel=function(customOptions){var $this=this,$$=jQuery(this),$wrap,navlockid=null,autoplayid=null,locknav=!1,oldWindowWidth,superWrapXPos,superWrapYPos,ishidden=0,swipeid=!1,perPage=0,totalPages=1,currentPage=0,sucar=jQuery.fn.supercarousel,df=sucar.defaults,slides=[],currentSlide=0,totalSlides=0,sliderWidth=0,cssObj={},cssImgObj={},options,resetOptions=function(){if(options=jQuery.extend({},df,customOptions),$wrap){if(options.slideGap=parseInt(options.slideGap),$wrap.width()>=options.desktopMinWidth?"visible"==options.respDesktop?(options.visible=options.desktopVisible,options.visibleHeight=options.desktopVisibleHeight):"fixwidth"==options.respDesktop?(options.itemWidth=options.desktopWidth,options.itemWidthHeight=options.desktopWidthHeight):"fixheight"==options.respDesktop&&(options.itemHeight=options.desktopHeight):$wrap.width()>=options.laptopMinWidth?"visible"==options.respLaptop?(options.visible=options.laptopVisible,options.visibleHeight=options.laptopVisibleHeight):"fixwidth"==options.respLaptop?(options.itemWidth=options.laptopWidth,options.itemWidthHeight=options.laptopWidthHeight):"fixheight"==options.respLaptop&&(options.itemHeight=options.laptopHeight):$wrap.width()>=options.tabletMinWidth?"visible"==options.respTablet?(options.visible=options.tabletVisible,options.visibleHeight=options.tabletVisibleHeight):"fixwidth"==options.respTablet?(options.itemWidth=options.tabletWidth,options.itemWidthHeight=options.tabletWidthHeight):"fixheight"==options.respTablet&&(options.itemHeight=options.tabletHeight):$wrap.width()<options.tabletMinWidth&&("visible"==options.respMobile?(options.visible=options.mobileVisible,options.visibleHeight=options.mobileVisibleHeight):"fixwidth"==options.respMobile?(options.itemWidth=options.mobileWidth,options.itemWidthHeight=options.mobileWidthHeight):"fixheight"==options.respMobile&&(options.itemHeight=options.mobileHeight)),0<options.customrespby.length)for(var e=0;e<options.customrespby.length;e++)if(""!=options.customrespmin[e]&&""!=options.customrespmax[e]&&!isNaN(options.customrespmin[e])&&!isNaN(options.customrespmax[e])&&$wrap.width()>Number(options.customrespmin[e])&&$wrap.width()<Number(options.customrespmax[e])){"visible"!=options.customrespby[e]||isNaN(options.customrespvisible[e])?"fixwidth"!=options.customrespby[e]||isNaN(options.customrespwidth[e])?"fixheight"!=options.customrespby[e]||isNaN(options.customrespheight[e])||(options.itemHeight=Number(options.customrespheight[e])):(options.itemWidth=Number(options.customrespwidth[e]),options.itemWidthHeight=options.customrespwidthheight[e]||"100%"):(options.visible=Number(options.customrespvisible[e]),options.visibleHeight=options.customrespvisibleheight[e]||"100%");break}$$.find(">div img.super_image").length&&(options.type="image")}},createSuperCarousel=function(){var e;$$.wrap('<div class="supercarousel_wrapper"></div>').css({display:"block",visibility:"visible"}),($wrap=$$.parent())&&(e=$$.html(),$$.prepend(e),$$.append(e),removeUnwantedTags(),totalSlides=$$.children().length/3,resetOptions(),checkLightBox(),disableLinks(),options.onload($$),$wrap.height(800),checkNavigation(),resetSlides(),setTimeout(function(){resetSlides()},500))},removeUnwantedTags=function(){$$.find(">").not("div").remove()},setLockNavTimeout=function(){null!=navlockid&&clearTimeout(navlockid),maybeDisableAutoScrollCSS(),locknav=!0},clearLockNavTimeout=function(){clearTimeout(navlockid),maybeEnableAutoScrollCSS(),navlockid=setTimeout(function(){clearInterval(autoplayid),locknav=!1,checkAutoPlay()},100)},disableLinks=function(){if(options.onslideclick&&""!=options.onslideclick)return $$.find(">div a").click(function(e){e.preventDefault()}),void $$.find(">div").click(function(event){event.preventDefault(),eval(options.onslideclick+"(this);")});$$.find(">div a").click(function(e){jQuery(e.target).hasClass("superswipe")&&e.preventDefault()})},checkLightBox=function(){$wrap&&(options.onslideclick&&""!=options.onslideclick||(getRandomInt(1e5,999999),$$.find(">div").length,$$.find(">div a.superlight").superLightBox({mediaCaption:"data-caption"})))},getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e))+e},resetSlides=function(){$wrap&&(resetOptions(),checkParams(),resetStyleObj(),resetSlidePositions(),calculateTotalPages(),resetPagination(),resetWrapHeight(),gotoPage(currentPage),$$.stop(!0,!0))},checkNavigation=function(){1==options.nextPrev&&($wrap.parent().find(".supernext").click(function(e){e.preventDefault(),(currentPage<totalPages-1||options.circular)&&gotoPage(currentPage+1)}).css({display:"block"}),$wrap.parent().find(".superprev").click(function(e){e.preventDefault(),(0<currentPage||options.circular)&&gotoPage(currentPage-1)}).css({display:"block"}),options.arrowsOut&&$wrap.parent().addClass("supercarousel_arrowsout")),options.swipe&&$this.registerSwipe(),options.keys&&jQuery("body").keyup(function(e){49==e.keyCode?gotoPage(0):50==e.keyCode?gotoPage(1):51==e.keyCode?gotoPage(2):52==e.keyCode?gotoPage(3):53==e.keyCode?gotoPage(4):54==e.keyCode?gotoPage(5):55==e.keyCode?gotoPage(6):56==e.keyCode?gotoPage(7):57==e.keyCode?gotoPage(8):58==e.keyCode?gotoPage(9):37==e.keyCode?gotoPage(currentPage-1):39==e.keyCode?gotoPage(currentPage+1):38==e.keyCode?gotoPage(currentPage-1):40==e.keyCode&&gotoPage(currentPage+1)}),options.mouseWheel&&$wrap.bind("mousewheel",function(e,t){$wrap.ismouseover()&&(gotoPage(0<t?currentPage-1:currentPage+1),e.preventDefault())})},getPageByDistance=function(e){var t=currentPage,i=-calculateNewLeft(t)-e;if(0<e){for(;-calculateNewLeft(t)>i&&(!(totalPages<=t)||options.circular);)t++;if(totalPages<=t&&!options.circular)return totalPages-1}else{for(;-calculateNewLeft(t)<i&&(!(t<=0)||options.circular);)t--;if(t<=0&&!options.circular)return 0}return t},superCarouselSwipe=function(e,t){var i=jQuery.extend({},{swipe:function(e){},swipeLeft:function(e){},swipeRight:function(e){},swipeUp:function(e){},swipeDown:function(e){},swipeStart:function(e){},swipeEnd:function(e,t){}},t),o=new Object;o.sX=0,o.sY=0,o.eX=0,o.eY=0;var s="";e.on("touchstart",function(e){e=e.originalEvent.touches[0];o.sX=e.screenX,o.sY=e.screenY,i.swipeStart(o)}),e.on("touchmove",function(e){e=e.originalEvent.touches[0];o.eX=e.screenX,o.eY=e.screenY,i.swipe(o)}),e.on("touchend",function(e){jQuery(window).width(),jQuery(window).height();""!=(s=o.eX>o.sX?"r":"l")&&("l"==s?i.swipeLeft(o):"r"==s?i.swipeRight(o):"u"==s?i.swipeUp(o):"d"==s&&i.swipeDown(o)),i.swipeEnd(o,s),s=""})};$this.registerSwipe=function(){options.swipe&&superCarouselSwipe($wrap,{swipeStart:function(e){superWrapXPos=$$.position().left,superWrapYPos=jQuery(window).scrollTop(),maybeDisableAutoScrollCSS()},swipe:function(e){var t=-sliderWidth,i=-2*sliderWidth+$wrap.width(),o=e.eX-e.sX+superWrapXPos;e.sY,e.eY;t<o&&!options.circular?o=t:o<i&&!options.circular&&(o=i),$$.stop(!0,!0).css({left:o})},swipeEnd:function(e,t){var i,e=Math.abs(e.eX-e.sX);.2*$wrap.width()<e?"r"==t?(i=getPageByDistance(-e),0<currentPage||options.circular?gotoPage(i):gotoPage(currentPage)):"l"==t&&(i=getPageByDistance(e),currentPage<totalPages-1||options.circular?gotoPage(i):gotoPage(currentPage)):$$.animate({left:-calculateNewLeft(currentPage)},{complete:function(){maybeEnableAutoScrollCSS()}})}})};var removeSuperSwipeClass=function(e){swipeid=setTimeout(function(){jQuery(e.target).removeClass("superswipe")},500)},checkAutoScroll=function(){$wrap&&("1"==options.autoscroll?autoScrollJS():"2"==options.autoscroll&&autoScrollCSS())},autoScrollJS=function(){options.effect="slide","up"!=options.direction&&"down"!=options.direction||(options.direction="left");var e,t=calculateNewLeft(0),i=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),o=-1!=navigator.appVersion.indexOf("Win"),o=i&&o?4:1,o="left"==options.direction?(e=-2*t,"-="+options.scrollspeed*o+"px"):(e=-t,t*=2,$$.css({left:-t}),"+="+options.scrollspeed*o+"px");checkSuperTimeout(t,o,e)},autoScrollCSS=function(){options.effect="slide","up"!=options.direction&&"down"!=options.direction||(options.direction="left");calculateNewLeft(0);var e=3*sliderWidth;options.scrollspeed<=0&&(options.scrollspeed=1);var t,i,o=e/options.scrollspeed;$$.addClass("supercarousel_autoscroll"),options.pauseOver&&$$.addClass("supercarousel_pauseover"),"right"==options.direction&&(t=-e/3,i=-.66667*e,$$.get(0).style.setProperty("--supercarousel_x1",i+"px"),$$.get(0).style.setProperty("--supercarousel_x2",t+"px")),$$.get(0).style.setProperty("--supercarousel_width",-e+"px"),$$.get(0).style.setProperty("--supercarousel_duration",o+"s")},maybeDisableAutoScrollCSS=function(){var e;$wrap&&"2"==options.autoscroll&&(e=window.getComputedStyle($$[0]).getPropertyValue("left"),$$.removeClass("supercarousel_autoscroll"),$$.css("left",e))},maybeEnableAutoScrollCSS=function(){var e;$wrap&&"2"==options.autoscroll&&(e=calculateAnimationDelay(),$$.get(0).style.setProperty("--supercarousel_delay",e+"s"),$$.addClass("supercarousel_autoscroll"))},calculateAnimationDelay=function(){options.scrollspeed<=0&&(options.scrollspeed=1);calculateNewLeft(0);var e=3*sliderWidth,t=-e/3,i=-.66667*e;"right"==options.direction&&(t=-.66667*e,i=-e/3);e/=options.scrollspeed;return-($$.position().left-t)/(i-t)*e},checkSuperTimeout=function(e,t,i){setTimeout(function(){locknav||options.pauseOver&&$wrap.ismouseover()||($$.css({left:t}),Math.abs(i)-Math.abs(e)<$wrap.width()&&(e=calculateNewLeft(0),"left"==options.direction?i=-2*e:(i=-e,e*=2)),"left"==options.direction?$$.position().left<i&&$$.css({left:-e}):$$.position().left>i&&$$.css({left:-e})),checkSuperTimeout(e,t,i)},options.scrollinterval)},checkAutoPlay=function(){$wrap&&options.auto&&!options.autoscroll&&(autoplayid=setInterval(function(){locknav||options.pauseOver&&$wrap.ismouseover()||autoPlay()},options.pauseTime))},autoPlay=function(){"left"==options.direction||"down"==options.direction?gotoPage(currentPage+1):"right"!=options.direction&&"up"!=options.direction||gotoPage(currentPage-1)},resetPagination=function(){if(options.paging)for($wrap.parent().find(".pagination").html(""),m=0;m<totalPages;m++){var e=jQuery('<a href="#"><span>'+(m+1)+"</span></a>").click(function(e){e.preventDefault(),gotoPage(jQuery(this).index())});$wrap.parent().find(".pagination").append(e)}},gotoPage=function(e){locknav||(totalPages<=e&&!options.circular?gotoPage(0):e<0&&!options.circular?gotoPage(totalPages-1):(options.onchange($$,currentPage,totalPages),e!=totalPages-1||options.circular||""==options.next?""!=options.next&&jQuery(options.next).hasClass("disabled")&&jQuery(options.next).removeClass("disabled"):jQuery(options.next).addClass("disabled"),0!=e||options.circular||""==options.prev?""!=options.prev&&jQuery(options.prev).hasClass("disabled")&&jQuery(options.prev).removeClass("disabled"):jQuery(options.prev).addClass("disabled"),currentPage=e,adjustCurrentLeft(),"slide"==options.effect?"left"==options.direction||"right"==options.direction?slideHorizontal():"up"!=options.direction&&"down"!=options.direction||slideVertical():"focus"==options.effect?slideFocusHorizontal():"fade"==options.effect&&slideFadeIn(),options.paging&&0<$wrap.parent().find(".pagination").find(">a:eq("+currentPage+")").length&&($wrap.parent().find(".pagination").find(">a").removeClass("selected"),$wrap.parent().find(".pagination").find(">a:eq("+currentPage+")").addClass("selected"))))},adjustCurrentLeft=function(){var e=-1*calculateNewLeft(currentPage),t=$$.position().left,i=xDistance(e,t),o=xDistance(e,t+sliderWidth),e=xDistance(e,t-sliderWidth),i=Math.min(i,o,e);i==o?$$.css("left",t+sliderWidth+"px"):i==e&&$$.css("left",t-sliderWidth+"px")},xDistance=function(e,t){return Math.sqrt(Math.pow(e-t,2))},calculateNewLeft=function(e){var t,i;return $wrap?(0<options.step?((t=e*options.step+totalSlides)<0?t=0:t>$$.find(">div").length-1&&(t=totalSlides),t=$$.find(">div:eq("+t+")").position().left):(t=e*$wrap.outerWidth(!1),t+=sliderWidth),options.circular?(i=-2*sliderWidth,e=-1*sliderWidth+$wrap.outerWidth(!1),-t<=i&&0<currentPage?t=-i:e<=-t&&currentPage<0&&(currentPage=totalPages-2,t+=+sliderWidth)):-t<(i=-2*sliderWidth+$wrap.outerWidth(!1))&&(t=-i),t):0},slideFadeIn=function(){var e=calculateNewLeft(currentPage);setLockNavTimeout();var t=$$.clone().css({position:"absolute",display:"none",zIndex:0,left:-e,top:$$.position().top}).appendTo($wrap);t.fadeIn(options.easingTime,options.easing,function(){$$.css({left:-e}),t.remove(),pageAnimationCompleted()})},slideVertical=function(){var e,t=calculateNewLeft(currentPage);setLockNavTimeout(),"up"==options.direction?e=-t<$$.position().left?1:-1:"down"==options.direction&&(e=-t<$$.position().left?-1:1);var i=$$.clone().css({position:"absolute",zIndex:0,left:-t,top:$$.position().top+$wrap.outerHeight(!0)*e}).appendTo($wrap);i.stop(!0,!0).animate({top:$$.position().top},options.easingTime,options.easing,function(){$$.css({left:-t}),i.remove(),pageAnimationCompleted()})},slideFocusHorizontal=function(){var e=calculateNewLeft(currentPage),t=currentPage*options.step+totalSlides;$$.find(">div").removeClass("focus"),$$.find(">div:eq("+t+")").addClass("focus"),$$.find(">div:eq("+(t+totalSlides)+")").addClass("focus"),$$.find(">div:eq("+(t-totalSlides)+")").addClass("focus"),e+=$$.find(">div:eq("+t+")").width()/2-$wrap.width()/2,setLockNavTimeout(),$$.stop(!0,!0).animate({left:-e},options.easingTime,options.easing,pageAnimationCompleted),resetWrapHeight()},slideHorizontal=function(){var e=calculateNewLeft(currentPage);setLockNavTimeout(),$$.stop(!0,!0).animate({left:-e},options.easingTime,options.easing,pageAnimationCompleted),resetWrapHeight()},pageAnimationCompleted=function(){clearLockNavTimeout();var e=-2*sliderWidth,t=-1*sliderWidth+$wrap.outerWidth(!1);0<t&&(t=0);var i=calculateNewLeft(currentPage);-i<=e&&0<currentPage?(currentPage=0,i-=sliderWidth,$$.css({left:-i})):t<=-i&&currentPage<0&&(currentPage=totalPages-2,i+=2*sliderWidth,$$.css({left:-i}))},checkParams=function(){options.step>totalSlides&&(options.step=totalSlides),options.visible&&(options.step>options.visible||0==options.step)&&(options.step=options.visible)},resetStyleObj=function(){var e,t;$$.removeClass("superfixheight"),$$.removeClass("superfitimage"),options.visible?(e=getVisibleSlideWidth(),t=parseImageHeightByWidth(e,options.visibleHeight),cssObj={width:e,height:"auto"},cssImgObj={width:"100%",height:t},"auto"!=t&&$$.addClass("superfitimage")):""!=options.itemWidth?(t=parseImageHeightByWidth(options.itemWidth,options.itemWidthHeight),cssObj={width:options.itemWidth,height:"auto"},cssImgObj={width:"100%",height:t},"auto"!=t&&$$.addClass("superfitimage")):""!=options.itemHeight&&(cssObj={width:"auto",height:"auto"},cssImgObj={width:"auto",height:options.itemHeight},$$.addClass("superfixheight")),$$.find(">div").css(cssObj),checkImageCarousel()},parseImageHeightByWidth=function(e,t){return"auto"==t.toLowerCase()?"auto":"%"==t.slice(-1)?e*Number(t.slice(0,-1))/100:t},calculateTotalPages=function(){var e=$$.find(">div:last");if(sliderWidth=(e.position().left+e.outerWidth(!1))/3,!$wrap)return 0;if(0<options.step)if(options.visible&&1==options.visible)totalPages=totalSlides;else if(options.visible&&1<options.visible)(totalPages=(totalSlides-(options.visible-options.step))/options.step)<1&&(totalPages=1);else for(var t=-(totalPages=1)*calculateNewLeft(totalPages-1),i=-2*sliderWidth+$wrap.outerWidth(!1);i<t;)t=-1*calculateNewLeft(++totalPages-1);else totalPages=Math.ceil(sliderWidth/$wrap.outerWidth(!1))},resetSlidePositions=function(){$$.find(">div").each(function(){$ele=jQuery(this),""!=options.itemHeight&&"image"==options.type&&$ele.width($ele.find(".super_image").width()),0<$ele.prev().length?$ele.css({left:$ele.prev().position().left+$ele.prev().outerWidth(!1)+options.slideGap}):$ele.css({left:0})})},resetWrapHeight=function(){if(options.autoHeight&&0<options.step){var e,t=currentPage*options.step+totalSlides;return e=options.visible?$$.find(">div").slice(t,t+options.visible).superMaxHeightElement().outerHeight(!0):options.itemWidth?(e=Math.ceil($wrap.width()/options.itemWidth),$$.find(">div").slice(t,t+e).superMaxHeightElement().outerHeight(!0)):$$.find(">div:eq("+t+")").outerHeight(!0),void $wrap.stop(!0,!0).animate({height:e+1},700,"swing",function(){})}var i=0;for(k=totalSlides;k<2*totalSlides;k++)(t=$$.children(":eq("+k+")")).outerHeight(!0)>i&&(i=t.outerHeight(!0));$wrap&&$wrap.height(i+1)},checkImageCarousel=function(){"image"==options.type&&$$.find("img").css(cssImgObj)},getVisibleSlides=function(){return options.visible||(""!=options.itemWidth?Math.ceil($wrap.width()/options.itemWidth):0)},getVisibleSlideWidth=function(){return $wrap?Math.ceil(($wrap.width()-(options.visible-1)*options.slideGap)/options.visible):0},delayReset=function(){setTimeout(function(){resetSlides()},500)},registerHiddenCarousel=function(){setInterval(function(){$wrap.parent().is(":visible")?1==ishidden&&(delayReset(),ishidden=0):ishidden=1},500)},isIE=function(e,t){var i=jQuery('<div style="display:none;"/>').appendTo(jQuery("body"));i.html("\x3c!--[if "+(t||"")+" IE "+(e||"")+"]><a>&nbsp;</a><![endif]--\x3e");e=i.find("a").length;return i.remove(),e},checkIsHidden=function(){options.superhidden&&registerHiddenCarousel()},oldWindowWidth=jQuery(window).width();return jQuery(window).on("resize",function(){jQuery(window).width()!=oldWindowWidth&&(resetSlides(),oldWindowWidth=jQuery(window).width())}),$$.find("img").length?$$.imagesLoaded(function(){createSuperCarousel(),checkAutoPlay(),checkAutoScroll(),checkIsHidden()}):(createSuperCarousel(),checkAutoPlay(),checkAutoScroll(),checkIsHidden()),$this};var opts=jQuery.fn.supercarousel;opts.defaults={source:"Image",visibleHeight:"auto",itemWidth:"",itemWidthHeight:"auto",itemHeight:"",desktopMinWidth:1200,laptopMinWidth:992,tabletMinWidth:450,mobileMinWidth:0,direction:"left",effect:"slide",respDesktop:"visible",desktopVisible:"5",desktopVisibleHeight:"auto",desktopWidth:"400",desktopWidthHeight:"auto",desktopHeight:"400",respLaptop:"visible",laptopVisible:"3",laptopVisibleHeight:"auto",laptopWidth:"300",laptopWidthHeight:"auto",laptopHeight:"300",respTablet:"visible",tabletVisible:"2",tabletVisibleHeight:"auto",tabletWidth:"200",tabletWidthHeight:"auto",tabletHeight:"200",respMobile:"visible",mobileVisible:"1",mobileVisibleHeight:"auto",mobileWidth:"200",mobileWidthHeight:"auto",mobileHeight:"200",customrespmin:[],customrespmax:[],customrespby:[],customrespvisible:[],customrespwidth:[],customrespheight:[],arrowsOut:!1,slideGap:5,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:!1,circular:!1,mouseWheel:!1,swipe:!1,keys:!1,superhidden:!1,carouselid:0,onchange:function(e,t,i){},onload:function(e){}}}(jQuery),jQuery.fn.superMaxHeightElement=function(){var t=null,i=0;return this.each(function(){var e=jQuery(this).height();i<e&&(i=e,t=jQuery(this))}),t},jQuery(window).on("load",function(){jQuery(".supercrsl").each(function(){var e=jQuery.parseJSON(atob(jQuery(this).data("carouseloptions")));if(e){var t,i=["desktopVisible","desktopWidth","desktopHeight","laptopVisible","laptopWidth","laptopHeight","tabletVisible","tabletWidth","tabletHeight","mobileVisible","mobileWidth","mobileHeight","autoscroll","easingTime","step","pauseTime","scrollspeed","slideGap"],o=["auto","pauseOver","autoHeight","nextPrev","arrowsOut","circular","mouseWheel","swipe","keys","superhidden","paging"];for(t in i)e[i[t]]=parseInt(e[i[t]]);for(t in o)e[o[t]]=1==parseInt(e[o[t]]);jQuery(this).find(".supercarousel").supercarousel(e)}})}),jQuery.expr[":"].hiddenByParent=function(e){return jQuery(e).parents("*:not(:visible)").length};
!function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}void 0!==n.easing&&(n.easing.jswing=n.easing.swing);var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,o=1.70158,c=1.525*o,s=2*a/3,f=2*a/4.5;return n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-t(2,20*n-10)*r((20*n-11.125)*f)/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return 2.70158*n*n*n-o*n*n},easeOutBack:function(n){return 1+2.70158*t(n-1,3)+o*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-c)/2:(t(2*n-2,2)*((c+1)*(2*n-2)+c)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}}),n});
!function(i){i.extend(i.easing,{easeIn:function(n,e,u,t,a){return i.easing.easeInQuad(n,e,u,t,a)},easeOut:function(n,e,u,t,a){return i.easing.easeOutQuad(n,e,u,t,a)},easeInOut:function(n,e,u,t,a){return i.easing.easeInOutQuad(n,e,u,t,a)},expoin:function(n,e,u,t,a){return i.easing.easeInExpo(n,e,u,t,a)},expoout:function(n,e,u,t,a){return i.easing.easeOutExpo(n,e,u,t,a)},expoinout:function(n,e,u,t,a){return i.easing.easeInOutExpo(n,e,u,t,a)},bouncein:function(n,e,u,t,a){return i.easing.easeInBounce(n,e,u,t,a)},bounceout:function(n,e,u,t,a){return i.easing.easeOutBounce(n,e,u,t,a)},bounceinout:function(n,e,u,t,a){return i.easing.easeInOutBounce(n,e,u,t,a)},elasin:function(n,e,u,t,a){return i.easing.easeInElastic(n,e,u,t,a)},elasout:function(n,e,u,t,a){return i.easing.easeOutElastic(n,e,u,t,a)},elasinout:function(n,e,u,t,a){return i.easing.easeInOutElastic(n,e,u,t,a)},backin:function(n,e,u,t,a){return i.easing.easeInBack(n,e,u,t,a)},backout:function(n,e,u,t,a){return i.easing.easeOutBack(n,e,u,t,a)},backinout:function(n,e,u,t,a){return i.easing.easeInOutBack(n,e,u,t,a)}})}(jQuery);
(function(e){e.extend({feedify:function(t,n){var r={lt:{regex:/(<)/g,template:"&lt;"},gt:{regex:/(>)/g,template:"&gt;"},dq:{regex:/(")/g,template:"&quot;"},sq:{regex:/(')/g,template:"&#x27;"},link:{regex:/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,template:'<a href="$1">$1</a>'},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<a href="http://twitter.com/#!/$3$4">@$3$4</a>'},hash:{regex:/(^|\s)#(\w+)/g,template:'$1<a href="http://twitter.com/#!/search?q=%23$2">#$2</a>'},email:{regex:/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi,template:'<a href="mailto:$1">$1</a>'}};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,void 0===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<r.length;n++)r[n]()||r.splice(n--,1);r.length||jQuery.fx.stop()},stop:function(){clearInterval(jQuery.timerId),jQuery.timerId=null}})};
!function(t){t.mlp={x:0,y:0},t(function(){t(this).mousemove(function(t){jQuery.mlp={x:t.pageX,y:t.pageY}})}),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);
!function(e){function t(t){var n=t||window.event,i=[].slice.call(arguments,1),l=0,s=0,o=0;return t=e.event.fix(n),t.type="mousewheel",n.wheelDelta&&(l=n.wheelDelta/120),n.detail&&(l=-n.detail/3),o=l,void 0!==n.axis&&n.axis===n.HORIZONTAL_AXIS&&(o=0,s=-1*l),void 0!==n.wheelDeltaY&&(o=n.wheelDeltaY/120),void 0!==n.wheelDeltaX&&(s=-1*n.wheelDeltaX/120),i.unshift(t,l,s,o),(e.event.dispatch||e.event.handle).apply(this,i)}var n=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var i=n.length;i;)e.event.fixHooks[n[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery);
jQuery.fn.superLightBox=function(e){var n,s,o,u=[],l=[],a=[],p=[],h=[],i=0,q=0,L=0,g=jQuery.extend({},{gallery:!0,swipe:!0,keyboard:!0,closeOutClick:!0,videopreviewurl:"images/video-preview.jpg",galleryThumbnailWidth:100,galleryThumbanilGap:1,maxZoom:3,mediaAttribute:"href",mediaCaption:"data-superlightcaption"},e);g.keyboard&&jQuery(document).keyup(function(e){jQuery(".superlightboxcontainer").length&&jQuery(".superlightboxcontainer").hasClass(O)&&(e.preventDefault(),27==e.keyCode?y():37==e.keyCode||38==e.keyCode?_(n-1):39!=e.keyCode&&40!=e.keyCode||_(n+1))}),jQuery(window).resize(function(){jQuery(".superlightboxcontainer").length&&jQuery(".superlightboxcontainer").hasClass(O)&&(j(),t())});function r(e){var i,r,t;jQuery(".superlightboxcontainer").length&&(i=jQuery(window).width(),jQuery(".superlightbox_gallery_wrapper").width()>i&&((r=parseInt(jQuery(".superlightbox_gallery_wrapper").position().left)-e*i)<(t=-jQuery(".superlightbox_gallery_wrapper").width()+i)?r=t:0<r&&(r=0),jQuery(".superlightbox_gallery_wrapper").animate({left:r},g.easingTime,function(){})))}var d=function(){var e="";for(var i in u)e+=c(u[i],i);jQuery(".superlightbox_gallery_wrapper").append(e);var r=0;jQuery(".superlightbox_gallery_wrapper > div").each(function(e){var i=e*g.galleryThumbnailWidth+e*g.galleryThumbanilGap;r=i,jQuery(this).css({left:i})}),r+=g.galleryThumbnailWidth,jQuery(".superlightbox_gallery_wrapper").width(r)},t=function(){var e;jQuery(".superlightboxcontainer").length&&g.gallery&&(jQuery(window).width()>jQuery(".superlightbox_gallery_wrapper").width()?(e=(jQuery(window).width()-jQuery(".superlightbox_gallery_wrapper").width())/2,jQuery(".superlightbox_gallery_wrapper").css({left:e})):jQuery(".superlightbox_gallery_wrapper").css({left:0}),jQuery(".superlightbox_gallery_wrapper").is(":visible")?jQuery(".superlightbox_gallery_nav").show():jQuery(".superlightbox_gallery_nav").hide())},c=function(e,i){if(jQuery.isFunction(e))return"";var r=X(e),t="",l="";return"image"==r?t=e:"youtube"==r?(t=I(e),l=" superlightbox_video"+Z(e)):"vimeo"==r&&(t=g.videopreviewurl,T(e),l=" superlightbox_video"+W(e)),'<div class="superlightbox_thumb'+i+l+'" style="background-image: url(\''+t+"')\"></div>"},y=function(){var e;jQuery(".superlightboxcontainer").length&&((e=jQuery(".superlightbox_slide"+n)).length&&e.addClass("superlightbox_remove"),jQuery(".superlightboxcontainer").fadeOut("slow",function(){jQuery(this).remove()}))},b=function(){jQuery(".superlightboxcontainer").length&&(jQuery(".superlightbox_close").click(function(){y()}),g.closeOutClick&&jQuery(".superlightbox_slider").click(function(e){"IMG"!=e.target.nodeName&&y()}),jQuery(".superlightbox_prev").click(function(){_(n-1)}),jQuery(".superlightbox_next").click(function(){_(n+1)}),g.gallery&&(jQuery(".superlightbox_gallery_button").click(function(){jQuery(this).hasClass("superlightbox_gallery_open")?(jQuery(this).removeClass("superlightbox_gallery_open"),jQuery(this).addClass("superlightbox_gallery_close"),jQuery(".superlightbox_gallery_wrapper").slideDown(),jQuery(".superlightbox_slider").addClass("superlightbox_gallery_visible"),t()):(jQuery(this).removeClass("superlightbox_gallery_close"),jQuery(this).addClass("superlightbox_gallery_open"),jQuery(".superlightbox_gallery_wrapper").slideUp(),jQuery(".superlightbox_gallery_nav").hide(),jQuery(".superlightbox_slider").removeClass("superlightbox_gallery_visible"))}),jQuery(".superlightbox_gallery_prev").click(function(){r(-1)}),jQuery(".superlightbox_gallery_next").click(function(){r(1)}),jQuery(".superlightbox_gallery_wrapper > div").click(function(){_(jQuery(this).index())}),g.swipe&&D(".superlightbox_gallery_wrapper",{swipeStart:function(e){i=jQuery(".superlightbox_gallery_wrapper").position().left},swipe:function(e){jQuery(window).width();jQuery(".superlightbox_gallery_wrapper").css({left:e.eX-e.sX+i})},swipeEnd:function(e,i){Math.abs(e.sX),Math.abs(e.eX);var r,t=jQuery(window).width(),l=jQuery(".superlightbox_gallery_wrapper").width();l<t?(r=(t-l)/2,jQuery(".superlightbox_gallery_wrapper").animate({left:r},g.easingTime)):0<jQuery(".superlightbox_gallery_wrapper").position().left?jQuery(".superlightbox_gallery_wrapper").animate({left:0},g.easingTime):jQuery(".superlightbox_gallery_wrapper").position().left<-l+t&&jQuery(".superlightbox_gallery_wrapper").animate({left:-l+t},g.easingTime)}})),g.swipe&&D(".superlightbox_wrapper",{pinchImage:".superlightbox_slider > div:eq(1) img",maxZoom:g.maxZoom,pinchZoom:function(e){jQuery(".superlightbox_slider > div:eq(1) img").css(e)},pinchZoomStart:function(e){jQuery(".superlightbox_slider").addClass("superlightbox_sliding")},pinchZoomEnd:function(e){jQuery(".superlightbox_slider").removeClass("superlightbox_sliding"),f()},swipeStart:function(e){jQuery(".superlightbox_slider").addClass("superlightbox_sliding")},swipe:function(e){var i=jQuery(window).width();jQuery(".superlightbox_slider").css({left:-i+e.eX-e.sX})},swipeEnd:function(e,i){var r=Math.abs(e.sX)-Math.abs(e.eX),t=jQuery(window).width(),l=.2*t;Math.abs(r)>l?_(0<r?n+1:n-1):(t=jQuery(window).width(),jQuery(".superlightbox_slider").animate({left:-t},g.easingTime,function(){jQuery(".superlightbox_slider").removeClass("superlightbox_sliding")}))}}))},_=function(e){var i=e<n?"left":"right";o=1==u.length?s=e=0:e<0||e==u.length-1?(e=u.length-1,s=e-1,0):e>=u.length||0==e?(e=0,s=u.length-1,1):(s=e-1,e+1);var r,t=Q(e),l=1;e!=n?("left"==i?(r=jQuery(".superlightbox_slider > div:first"),l=-1):r=jQuery(".superlightbox_slider > div:last"),r.hasClass("superlightbox_slide"+e)||(r.replaceWith(t),m(e),f()),x(l),n=e):0==jQuery(".superlightbox_slider > div.superlightbox_slide"+e).length&&(jQuery(".superlightbox_slider > div:first").replaceWith(Q(s)),jQuery(".superlightbox_slider > div:eq(1)").replaceWith(t),jQuery(".superlightbox_slider > div:last").replaceWith(Q(o)),m(s),m(e),m(o),f())},x=function(e){var i,r;jQuery(".superlightboxcontainer").length&&3==jQuery(".superlightbox_slider > div").length&&(i=jQuery(window).width(),r=0<e?-2*i:0,jQuery(".superlightbox_slider").addClass("superlightbox_sliding"),jQuery(".superlightbox_slider").animate({left:r},g.easingTime,v))},v=function(){console.log(s+"="+n+"="+o);var e=".superlightbox_slider > .superlightbox_slide"+n,i=".superlightbox_slider > .superlightbox_slide"+o,r=".superlightbox_slider > .superlightbox_slide"+s;jQuery(".superlightbox_slider > div").not(e+","+i+","+r).remove(),1<jQuery(e).length&&(0==jQuery(".superlightbox_slider").position().left?jQuery(e+":last").remove():jQuery(e+":first").remove()),1<jQuery(r).length&&jQuery(r+":last").remove(),1<jQuery(i).length&&jQuery(i+":first").remove(),s!=o?(jQuery(".superlightbox_slider > div:first").hasClass("superlightbox_slide"+s)||(jQuery(r).remove(),jQuery(".superlightbox_slider").prepend(Q(s)),m(s)),jQuery(".superlightbox_slider > div:last").hasClass("superlightbox_slide"+o)||(jQuery(i).remove(),jQuery(".superlightbox_slider").append(Q(o)),m(o))):0==jQuery(".superlightbox_slider").position().left?(jQuery(".superlightbox_slider").prepend(Q(s)),m(s)):(jQuery(".superlightbox_slider").append(Q(o)),m(o)),jQuery(".superlightbox_slider").removeClass("superlightbox_sliding"),f(),w(n)},j=function(){w(s),w(n),w(o),f()},w=function(e){var i,r,t,l,s,o,u;jQuery(".superlightboxcontainer").length&&(i=jQuery(window).height(),r=jQuery(window).width(),a[e]?(e==n&&(q=L=0),t=jQuery(".superlightbox_slide"+e),l=a[e],s=p[e],o=parseInt(l*r),u=parseInt(s*i),i<o?(t.find("img").css({left:"50%",top:"50%"}),h[e].height>i&&t.find("img").css({height:i,width:u}),jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").length&&jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").css({"max-width":u})):(t.find("img").css({left:"50%",top:"50%"}),h[e].width>r&&t.find("img").css({width:r,height:o}),jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").length&&jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").css({"max-width":r}))):jQuery(".superlightbox_slide"+e).find(".superlightbox_embed_wrapper").length&&(jQuery(".superlightbox_slide"+e).find(".superlightbox_embed_wrapper").css({"max-width":parseInt(1.77*i)}),jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").length&&jQuery(".superlightbox_slide"+e).find(".superlightbox_caption").css({"max-width":parseInt(1.77*i)})))},f=function(){var i=jQuery(window).width();jQuery(".superlightbox_slider > div").each(function(e){jQuery(this).css({left:e*i,width:i})}),jQuery(".superlightbox_slider").css({left:-i,width:3*i})},Q=function(e){if(!u[e])return"";var i,r=u[e],t=X(r);return"image"==t?i='<div class="superlightbox_slide superlightbox_slide'+e+' superloading">':"youtube"==t?(i='<div class="superlightbox_slide superlightbox_slide_video superlightbox_slide'+e+'">',i+=E(r)):"vimeo"==t&&(i='<div class="superlightbox_slide superlightbox_slide_video superlightbox_slide'+e+'">',i+=M(r)),""!=l[e]&&(i+='<div class="superlightbox_caption">'+l[e]+"</div>"),i+="</div>"},m=function(e){var i,r=u[e];"image"==X(r)?((i=new Image).superindex=e,i.onload=C,i.src=r):w(e)},C=function(){var e,i;void 0!==this.superindex&&jQuery(".superlightbox_slide"+this.superindex).length&&(e=jQuery(".superlightbox_slide"+this.superindex),(i="")!=l[this.superindex]&&(i='<div class="superlightbox_caption">'+l[this.superindex]+"</div>"),e.html('<img src="'+this.src+'" />'+i),a[this.superindex]=this.naturalHeight/this.naturalWidth,p[this.superindex]=this.naturalWidth/this.naturalHeight,h[this.superindex]={width:this.naturalWidth,height:this.naturalHeight},w(this.superindex),setTimeout(function(){e.removeClass("superloading")},800))},X=function(e){if(jQuery.isFunction(e))return"";var i=e.split("/").pop().split("#").shift().split("?").shift().split(".").reverse()[0].toLowerCase();return-1<jQuery.inArray(i,["jpg","jpeg","png","gif"])?"image":k(e)?"youtube":Y(e)?"vimeo":""},Y=function(e){var i=/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i.exec(e);return i&&i[1]},k=function(e){var i=/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i.exec(e);return i&&i[1]},E=function(e){return'<div class="superlightbox_embed_wrapper"><div class="superlightbox_embed"><iframe width="560" height="315" src="//www.youtube.com/embed/'+Z(e)+'" frameborder="0" allowfullscreen></iframe></div></div>'},Z=function(e){var i=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!=i?i[1]:""},I=function(e){return"https://img.youtube.com/vi/"+Z(e)+"/0.jpg"},M=function(e){var i=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(\S+)/g;return i.test(e)&&(e=e.replace(i,'<div class="superlightbox_embed_wrapper"><div class="superlightbox_embed"><iframe width="420" height="345" src="//player.vimeo.com/video/$1" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></div>')),e},T=function(e){var i=W(e);jQuery.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+i+".json",jsonp:"callback",dataType:"jsonp",success:function(e){var i;jQuery(".superlightbox_video"+e[0].id).length&&(i=e[0].thumbnail_large,jQuery(".superlightbox_video"+e[0].id).css({"background-image":"url('"+i+"')"}))}})},W=function(e){var i=e.match(/^.+vimeo.com\/(.*\/)?([^#\?]*)/);return i?i[2]||i[1]:null},S=function(){return'<div class="superlightboxcontainer '+O+'" style="display:none;"><a href="javascript: void(0);" class="superlightbox_close"></a><div class="superlightbox_wrapper"><div class="superlightbox_slider"></div></div><div class="superlightbox_gallery"><a href="javascript: void(0);" class="superlightbox_gallery_button superlightbox_gallery_open"></a><a href="javascript: void(0);" class="superlightbox_gallery_nav superlightbox_gallery_prev" style="display: none;"></a><a href="javascript: void(0);" class="superlightbox_gallery_nav superlightbox_gallery_next" style="display: none;"></a><div class="superlightbox_gallery_wrapper" style="display: none;"></div></div><a href="javascript: void(0);" class="superlightbox_prev"></a><a href="javascript: void(0);" class="superlightbox_next"></a></div>'},D=function(e,i){var o=jQuery.extend({},{pinchImage:"",pinchZoom:function(e){},pinchZoomStart:function(){},pinchZoomEnd:function(){},swipe:function(e){},swipeLeft:function(e){},swipeRight:function(e){},swipeUp:function(e){},swipeDown:function(e){},swipeStart:function(e){},swipeEnd:function(e,i){},maxZoom:3},i),u=new Object,n=!1,a=!1;u.sX=0,u.sY=0,u.eX=0,u.eY=0;var l,s,p,h,t,g,d,c,y,b,_,x,v,j,w,f,Q,m,C,X,Y,k,E,Z=20,I=40,M="",T=1,W=0,S=0,D=q,O=L,r=jQuery(e);r.on("touchstart",function(e){var i,r,t;1==e.originalEvent.touches.length?(a=!(n=!0),i=e.originalEvent.touches[0],u.sX=i.screenX,u.sY=i.clientY,1==T?o.swipeStart(u):o.pinchZoomStart()):2==e.originalEvent.touches.length&&(a=!(n=!1),r=jQuery(window).width()/2,t=jQuery(window).height()/2,0==q&&0==q&&(q=jQuery(o.pinchImage).width(),L=jQuery(o.pinchImage).height(),T=1,W=r-(D=q),S=t-(O=L)),l=e.originalEvent.touches[0].clientX,s=e.originalEvent.touches[0].clientY,p=e.originalEvent.touches[1].clientX,h=e.originalEvent.touches[1].clientY,k=((f=(l+p)/2)-W)/D,E=((Q=(s+h)/2)-S)/O,y=Math.sqrt(Math.pow(p-l,2)+Math.pow(h-s,2)),o.pinchZoomStart())}),r.on("touchmove",function(e){var i,r;e.preventDefault(),n?(i=e.originalEvent.touches[0],u.eX=i.screenX,u.eY=i.clientY,1<T?((r={}).left=W+D+(u.eX-u.sX),r.top=S+O+(u.eY-u.sY),o.pinchZoom(r)):o.swipe(u)):a&&(t=e.originalEvent.touches[0].clientX,g=e.originalEvent.touches[0].clientY,d=e.originalEvent.touches[1].clientX,c=e.originalEvent.touches[1].clientY,b=Math.sqrt(Math.pow(d-t,2)+Math.pow(c-g,2)),X=(D-(v=q*(_=b/y*T)))*k+(-f+(m=(t+d)/2)),Y=(O-(x=L*_))*E+(-Q+(C=(g+c)/2)),j=parseInt(W+X),w=parseInt(S+Y),(r={}).left=j+v,r.top=w+x,r.width=v,r.height=x,o.pinchZoom(r))}),r.on("touchend",function(e){if(n){if(1<T)return W+=u.eX-u.sX,void(S+=u.eY-u.sY);var i=jQuery(window).width(),r=jQuery(window).height();Z=.1*i,I=.1*r,(u.eX-Z>u.sX||u.eX+Z<u.sX)&&u.eY<u.sY+50&&u.sY>u.eY-50&&(M=u.eX>u.sX?"l":"r"),(u.eY-I>u.sY||u.eY+I<u.sY)&&u.eX<u.sX+40&&u.sX>u.eX-40&&(M=u.eY>u.sY?"d":"u"),""!=M&&("l"==M?o.swipeLeft(u):"r"==M?o.swipeRight(u):"u"==M?o.swipeUp(u):"d"==M&&o.swipeDown(u)),o.swipeEnd(u,M),M=""}else{var t,l,s;a&&(t=jQuery(window).width()/2,l=jQuery(window).height()/2,_<1?(_=1,(s={left:"50%",top:"50%"}).width=q,s.height=L,o.pinchZoom(s),j=t-q,w=l-L,v=q,x=L):_>o.maxZoom&&(_=o.maxZoom,X=(D-(v=q*_))*k+(-f+m),Y=(O-(x=L*_))*E+(-Q+C),j=parseInt(W+X),w=parseInt(S+Y),(s={}).left=j+v,s.top=w+x,s.width=v,s.height=x,o.pinchZoom(s)),W=j,S=w,D=v,O=x,T=_,o.pinchZoomEnd())}a=n=!1}),r.on("touchcancel",function(e){a=n=!1})},O=function(e,i){i=i||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var r="",t=0;t<e;t++){var l=Math.floor(Math.random()*i.length);r+=i.substring(l,l+1)}return r}(10);return this.each(function(){var e,i=jQuery(this),r=i.attr(g.mediaAttribute);jQuery.inArray(r,u)<0&&(u.push(r),e=void 0!==i.attr(g.mediaCaption)?i.attr(g.mediaCaption):"",l.push(e)),i.click(function(e){var i,r,t;e.preventDefault(),i=jQuery(this),t=i.attr("href"),-1<u.indexOf(t)&&(n=u.indexOf(t),jQuery(".superlightboxcontainer").length&&jQuery(".superlightboxcontainer").remove(),jQuery("body").append(S()),r='<div class="superlightbox_slide"></div>',jQuery(".superlightbox_slider").append(r),jQuery(".superlightbox_slider").append(r),jQuery(".superlightbox_slider").append(r),g.gallery&&1<u.length?d():(jQuery(".superlightbox_gallery").hide(),jQuery(".superlightbox_prev").hide(),jQuery(".superlightbox_next").hide()),jQuery(".superlightboxcontainer").fadeIn(),b(),_(n))})})},jQuery(document).ready(function(){jQuery(".supergallery").length&&jQuery(".supergallery").superLightBox({mediaCaption:"data-caption"})});