926d1ab3abf48cf01377caf6adbed8c8a5e9dd1726e174c945af41137661404d

Source Code:

!function(c,b,f,u){f.swipebox=function(s,e){f(s).addClass("swipebox");var n,o,t={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},r=this,h=[],a=".swipebox",i=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),l=null!==i||b.createTouch!==u||"ontouchstart"in c||"onmsgesturechange"in c||navigator.msMaxTouchPoints,d=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,g=c.innerWidth||f(c).width(),p=c.innerHeight||f(c).height(),w=0;r.settings={},f.swipebox.close=function(){n.closeSlide()},f.swipebox.extend=function(){return n},r.init=function(){r.settings=f.extend({},t,e),Array.isArray(s)?(h=s,n.target=f(c),n.init(r.settings.initialIndexOnArray)):f(b).on("click",a,function(e){return"slide current"!==e.target.parentNode.className&&(Array.isArray(s)||(n.destroy(),o=f(a),n.actions()),h=[],i||(t="data-rel",i=f(this).attr(t)),i||(t="rel",i=f(this).attr(t)),(o=i&&""!==i&&"nofollow"!==i?f(a).filter("["+t+'="'+i+'"]'):f(a)).each(function(){var e=null,t=null;f(this).attr("title")&&(e=f(this).attr("title")),f(this).attr("href")&&(t=f(this).attr("href")),h.push({href:t,title:e})}),i=o.index(f(this)),e.preventDefault(),e.stopPropagation(),n.target=f(e.target),void n.init(i));var t,i})},n={init:function(e){r.settings.beforeOpen&&r.settings.beforeOpen(),this.target.trigger("swipebox-start"),f.swipebox.isOpen=!0,this.build(),this.openSlide(e),this.openMedia(e),this.preloadMedia(e+1),this.preloadMedia(e-1),r.settings.afterOpen&&r.settings.afterOpen(e)},build:function(){var e,t=this;f("body").append('<div id="swipebox-overlay">\t\t\t\t\t<div id="swipebox-container">\t\t\t\t\t\t<div id="swipebox-slider"></div>\t\t\t\t\t\t<div id="swipebox-top-bar">\t\t\t\t\t\t\t<div id="swipebox-title"></div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<div id="swipebox-bottom-bar">\t\t\t\t\t\t\t<div id="swipebox-arrows">\t\t\t\t\t\t\t\t<a id="swipebox-prev"></a>\t\t\t\t\t\t\t\t<a id="swipebox-next"></a>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<a id="swipebox-close"></a>\t\t\t\t\t</div>\t\t\t</div>'),d&&!0===r.settings.useSVG&&(e=(e=f("#swipebox-close").css("background-image")).replace("png","svg"),f("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":e})),i&&r.settings.removeBarsOnMobile&&f("#swipebox-bottom-bar, #swipebox-top-bar").remove(),f.each(h,function(){f("#swipebox-slider").append('<div class="slide"></div>')}),t.setDim(),t.actions(),l&&t.gesture(),t.keyboard(),t.animBars(),t.resize()},setDim:function(){var e,t,i;"onorientationchange"in c?c.addEventListener("orientationchange",function(){0===c.orientation?(e=g,t=p):90!==c.orientation&&-90!==c.orientation||(e=p,t=g)},!1):(e=c.innerWidth||f(c).width(),t=c.innerHeight||f(c).height()),i={width:e,height:t},f("#swipebox-overlay").css(i)},resize:function(){var e=this;f(c).on("resize",function(){e.setDim()}).trigger("resize")},supportTransition:function(){for(var e="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" "),t=0;t<e.length;t++)if(b.createElement("div").style[e[t]]!==u)return e[t];return!1},doCssTrans:function(){if(r.settings.useCSS&&this.supportTransition())return!0},gesture:function(){var t,i,s,o,a,n,r=this,l=!1,d=!1,p={},c={},b=f("#swipebox-top-bar, #swipebox-bottom-bar"),u=f("#swipebox-slider");b.addClass("visible-bars"),r.setTimeout(),f("body").on("touchstart",function(e){return f(this).addClass("touching"),t=f("#swipebox-slider .slide").index(f("#swipebox-slider .slide.current")),c=e.originalEvent.targetTouches[0],p.pageX=e.originalEvent.targetTouches[0].pageX,p.pageY=e.originalEvent.targetTouches[0].pageY,f("#swipebox-slider").css({"-webkit-transform":"translate3d("+w+"%, 0, 0)",transform:"translate3d("+w+"%, 0, 0)"}),f(".touching").on("touchmove",function(e){e.preventDefault(),e.stopPropagation(),c=e.originalEvent.targetTouches[0],d||(a=s,s=c.pageY-p.pageY,(50<=Math.abs(s)||l)&&(e=.75-Math.abs(s)/u.height(),u.css({top:s+"px"}),u.css({opacity:e}),l=!0)),o=i,i=c.pageX-p.pageX,n=100*i/g,!d&&!l&&10<=Math.abs(i)&&(f("#swipebox-slider").css({"-webkit-transition":"",transition:""}),d=!0),d&&(0<i?0===t?f("#swipebox-overlay").addClass("leftSpringTouch"):(f("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),f("#swipebox-slider").css({"-webkit-transform":"translate3d("+(w+n)+"%, 0, 0)",transform:"translate3d("+(w+n)+"%, 0, 0)"})):i<0&&(h.length===t+1?f("#swipebox-overlay").addClass("rightSpringTouch"):(f("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),f("#swipebox-slider").css({"-webkit-transform":"translate3d("+(w+n)+"%, 0, 0)",transform:"translate3d("+(w+n)+"%, 0, 0)"}))))}),!1}).on("touchend",function(e){e.preventDefault(),e.stopPropagation(),f("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),s=c.pageY-p.pageY,i=c.pageX-p.pageX,n=100*i/g,l?(l=!1,100<=Math.abs(s)&&Math.abs(s)>Math.abs(a)?(e=0<s?u.height():-u.height(),u.animate({top:e+"px",opacity:0},300,function(){r.closeSlide()})):u.animate({top:0,opacity:1},300)):d?(d=!1,10<=i&&o<=i?r.getPrev():i<=-10&&i<=o&&r.getNext()):b.hasClass("visible-bars")?(r.clearTimeout(),r.hideBars()):(r.showBars(),r.setTimeout()),f("#swipebox-slider").css({"-webkit-transform":"translate3d("+w+"%, 0, 0)",transform:"translate3d("+w+"%, 0, 0)"}),f("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),f(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){var e;0<r.settings.hideBarsDelay&&((e=this).clearTimeout(),e.timeout=c.setTimeout(function(){e.hideBars()},r.settings.hideBarsDelay))},clearTimeout:function(){c.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var e=f("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.addClass("visible-bars"):(f("#swipebox-top-bar").animate({top:0},500),f("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){e.addClass("visible-bars")},1e3))},hideBars:function(){var e=f("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.removeClass("visible-bars"):(f("#swipebox-top-bar").animate({top:"-50px"},500),f("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){e.removeClass("visible-bars")},1e3))},animBars:function(){var e=this,t=f("#swipebox-top-bar, #swipebox-bottom-bar");t.addClass("visible-bars"),e.setTimeout(),f("#swipebox-slider").on("click",function(){t.hasClass("visible-bars")||(e.showBars(),e.setTimeout())}),f("#swipebox-bottom-bar").on("mouseenter",function(){e.showBars(),t.addClass("visible-bars"),e.clearTimeout()}).on("mouseleave",function(){0<r.settings.hideBarsDelay&&(t.removeClass("visible-bars"),e.setTimeout())})},keyboard:function(){var t=this;f(c).on("keyup",function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode?t.getPrev():39===e.keyCode?t.getNext():27===e.keyCode&&t.closeSlide()})},actions:function(){var t=this,e="touchend click";h.length<2?(f("#swipebox-bottom-bar").hide(),u===h[1]&&f("#swipebox-top-bar").hide()):(f("#swipebox-prev").on(e,function(e){e.preventDefault(),e.stopPropagation(),t.getPrev(),t.setTimeout()}),f("#swipebox-next").on(e,function(e){e.preventDefault(),e.stopPropagation(),t.getNext(),t.setTimeout()})),f("#swipebox-close").on(e,function(e){e.preventDefault(),e.stopPropagation(),t.closeSlide()})},setSlide:function(e,t){t=t||!1;var i=f("#swipebox-slider");w=100*-e,this.doCssTrans()?i.css({"-webkit-transform":"translate3d("+100*-e+"%, 0, 0)",transform:"translate3d("+100*-e+"%, 0, 0)"}):i.animate({left:100*-e+"%"}),f("#swipebox-slider .slide").removeClass("current"),f("#swipebox-slider .slide").eq(e).addClass("current"),this.setTitle(e),t&&i.fadeIn(),f("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===e?f("#swipebox-prev").addClass("disabled"):e===h.length-1&&!0!==r.settings.loopAtEnd&&f("#swipebox-next").addClass("disabled")},openSlide:function(e){f("html").addClass("swipebox-html"),l?(f("html").addClass("swipebox-touch"),r.settings.hideCloseButtonOnMobile&&f("html").addClass("swipebox-no-close-button")):f("html").addClass("swipebox-no-touch"),f(c).trigger("resize"),this.setSlide(e,!0)},preloadMedia:function(e){var t=this,i=null;h[e]!==u&&(i=h[e].href),t.isVideo(i)?t.openMedia(e):setTimeout(function(){t.openMedia(e)},1e3)},openMedia:function(e){var t,i;if(h[e]!==u&&(t=h[e].href),e<0||e>=h.length)return!1;i=f("#swipebox-slider .slide").eq(e),this.isVideo(t)?(i.html(this.getVideo(t)),r.settings.afterMedia&&r.settings.afterMedia(e)):(i.addClass("slide-loading"),this.loadMedia(t,function(){i.removeClass("slide-loading"),i.html(this),r.settings.afterMedia&&r.settings.afterMedia(e)}))},setTitle:function(e){var t=null;f("#swipebox-title").empty(),h[e]!==u&&(t=h[e].title),t?(f("#swipebox-top-bar").show(),f("#swipebox-title").append(t)):f("#swipebox-top-bar").hide()},isVideo:function(e){if(e)return!!(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))||(0<=e.toLowerCase().indexOf("swipeboxvideo=1")||void 0)},parseUri:function(e,t){var i=b.createElement("a"),s={};return i.href=decodeURIComponent(e),i.search&&(s=JSON.parse('{"'+i.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),f.isPlainObject(t)&&(s=f.extend(s,t,r.settings.queryStringData)),f.map(s,function(e,t){if(e&&""<e)return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&")},getVideo:function(e){var t="",i=e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),s=e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),o=e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),a="",t=i||s?(s&&(i=s),a=n.parseUri(e,{autoplay:r.settings.autoplayVideos?"1":"0",v:""}),'<iframe width="560" height="315" src="https://'+i[1]+"/embed/"+i[2]+"?"+a+'" frameborder="0" allowfullscreen></iframe>'):o?(a=n.parseUri(e,{autoplay:r.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:r.settings.vimeoColor}),'<iframe width="560" height="315"  src="//player.vimeo.com/video/'+o[1]+"?"+a+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):'<iframe width="560" height="315" src="'+e+'" frameborder="0" allowfullscreen></iframe>';return'<div class="swipebox-video-container" style="max-width:'+r.settings.videoMaxWidth+'px"><div class="swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){var i;0===e.trim().indexOf("#")?t.call(f("<div>",{class:"swipebox-inline-container"}).append(f(e).clone().toggleClass(r.settings.toggleClassOnLoad))):this.isVideo(e)||(i=f("<img>").on("load",function(){t.call(i)})).attr("src",e)},getNext:function(){var e,t=this,i=f("#swipebox-slider .slide").index(f("#swipebox-slider .slide.current"));i+1<h.length?(e=f("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"),f("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src",e),i++,t.setSlide(i),t.preloadMedia(i+1),r.settings.nextSlide&&r.settings.nextSlide(i)):!0===r.settings.loopAtEnd?(e=f("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src"),f("#swipebox-slider .slide").eq(i).contents().find("iframe").attr("src",e),i=0,t.preloadMedia(i),t.setSlide(i),t.preloadMedia(i+1),r.settings.nextSlide&&r.settings.nextSlide(i)):(f("#swipebox-overlay").addClass("rightSpring"),setTimeout(function(){f("#swipebox-overlay").removeClass("rightSpring")},500))},getPrev:function(){var e,t=f("#swipebox-slider .slide").index(f("#swipebox-slider .slide.current"));0<t?(e=f("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"),f("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src",e),t--,this.setSlide(t),this.preloadMedia(t-1),r.settings.prevSlide&&r.settings.prevSlide(t)):(f("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){f("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(e){},prevSlide:function(e){},closeSlide:function(){f("html").removeClass("swipebox-html"),f("html").removeClass("swipebox-touch"),f(c).trigger("resize"),this.destroy()},destroy:function(){f(c).off("keyup"),f("body").off("touchstart"),f("body").off("touchmove"),f("body").off("touchend"),f("#swipebox-slider").off(),f("#swipebox-overlay").remove(),Array.isArray(s)||s.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),f.swipebox.isOpen=!1,r.settings.afterClose&&r.settings.afterClose()}},r.init()},f.fn.swipebox=function(e){return f.data(this,"_swipebox")||(e=new f.swipebox(this,e),this.data("_swipebox",e)),this.data("_swipebox")}}(window,document,jQuery);