;!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('
\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t
'),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('
')}),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;tMath.abs(a)?(e=0=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&&""'):o?(a=n.parseUri(e,{autoplay:r.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:r.settings.vimeoColor}),''):'';return'
'+t+"
"},loadMedia:function(e,t){var i;0===e.trim().indexOf("#")?t.call(f("
",{class:"swipebox-inline-container"}).append(f(e).clone().toggleClass(r.settings.toggleClassOnLoad))):this.isVideo(e)||(i=f("").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":">",'"':""","'":"'","`":"`"},R=v.invert(T);v.escape=B(T),v.unescape=B(R),v.result=function(n,t,r){var e=null==n?void 0:n[t];return void 0===e&&(e=r),v.isFunction(e)?e.call(n):e};var q=0;v.uniqueId=function(n){var t=++q+"";return n?n+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};function K(n){return"\\"+D[n]}var z=/(.)^/,D={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\u2028|\u2029/g;v.template=function(i,n,t){!n&&t&&(n=t),n=v.defaults({},n,v.templateSettings);var r=RegExp([(n.escape||z).source,(n.interpolate||z).source,(n.evaluate||z).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(r,function(n,t,r,e,u){return a+=i.slice(o,u).replace(L,K),o=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var e=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}function u(n){return e.call(this,n,v)}var c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},v.chain=function(n){var t=v(n);return t._chain=!0,t};function P(n,t){return n._chain?v(t).chain():t}v.mixin=function(r){v.each(v.functions(r),function(n){var t=v[n]=r[n];v.prototype[n]=function(){var n=[this._wrapped];return i.apply(n,arguments),P(this,t.apply(v,n))}})},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];v.prototype[t]=function(){var n=this._wrapped;return r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],P(this,n)}}),v.each(["concat","join","slice"],function(n){var t=e[n];v.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}).call(this); ;/*! * Infinite Scroll PACKAGED v3.0.6 * Automatically add next page * * Licensed GPLv3 for open source use * or Infinite Scroll Commercial License for commercial use * * https://infinite-scroll.com * Copyright 2018 Metafizzy */ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,l){function a(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,a){var h=l.data(a,i);if(!h)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var c=h[e];if(!c||"_"==e.charAt(0))return void s(r+" is not a valid method");var u=c.apply(h,n);o=void 0===o?u:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=l.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),l.data(n,i,o))})}l=l||e||t.jQuery,l&&(r.prototype.option||(r.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return a(this,t,e)}return h(this,t),this},n(l))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},s.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},n.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},n.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history){o.href=this.getAbsolutePath();var t=o.origin||o.protocol+"//"+o.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled.")}},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=n.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){if(i&&i.length){var n=i[0],r=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})}},n.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},n.getElementWindowScrollY=function(e){var i=e.getBoundingClientRect();return i.top+t.pageYOffset},n.getElementElementScrollY=function(t){return t.offsetTop-this.top},n.onScrollHistory=function(){for(var t,e,i=this.getScrollViewY(),n=0;n=i)break;t=n,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},i.debounceMethod(e,"onScrollHistory",150),n.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},n.setHistory=function(t,e){var i=this.options.history,n=i&&history[i+"State"];n&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var i=this.scrollPages[e],n=t.pageYOffset-i.top+this.top;this.destroyHistory(),scrollTo(0,n)}},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=n,e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},s.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements();var e=this.statusEventElements[t];o(e)},s.hideAllStatus=function(){n(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements){var e=this.statusEventElements[t];n(e)}},e}),function(t,e){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],e):"object"==typeof module&&module.exports&&(module.exports=e(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(t){return t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?h.call(t):[t]}function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||t))}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var l=t.jQuery,a=t.console,h=Array.prototype.slice;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var i=t.querySelectorAll("img"),n=0;n0){for(var i=0;i🔍');gallery.on('click','.woocommerce-product-gallery__trigger',function(e){e.preventDefault();e.stopPropagation();if(flex.length) flex.find('.flex-active-slide a[data-rel]').trigger('click');else gallery.find('a[data-rel]').first().trigger('click');});}}},10);switch(script){case'swipebox':var slide=$('#swipebox-overlay').find('.slide.current');var image_source='';var allow_hide=false;var close_executed=false;$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').swipebox({useCSS:(args.animation==='1'?true:false),useSVG:(args.useSVG==='1'?true:false),hideCloseButtonOnMobile:(args.hideCloseButtonOnMobile==='1'?true:false),removeBarsOnMobile:(args.removeBarsOnMobile==='1'?true:false),hideBarsDelay:(args.hideBars==='1'?parseInt(args.hideBarsDelay):0),videoMaxWidth:parseInt(args.videoMaxWidth),loopAtEnd:(args.loopAtEnd==='1'?true:false),afterOpen:function(){close_executed=false;slide=$('#swipebox-overlay').find('.slide.current');var image=slide.find('img').attr('src');if(typeof image!=='undefined'){image_source=image;rl_view_image(script,image_source);}else{image_source='';} observe_script_dom(document.getElementById('swipebox-slider'),false,function(){if(image_source===''){var image=slide.find('img').attr('src');if(typeof image!=='undefined'){image_source=image;rl_view_image(script,image_source);}else{image_source='';}}});},nextSlide:function(){slide=$('#swipebox-overlay').find('.slide.current');var image=slide.find('img').attr('src');if(typeof image!=='undefined'){image_source=image;rl_view_image(script,image_source);}else{image_source='';}},prevSlide:function(){slide=$('#swipebox-overlay').find('.slide.current');var image=slide.find('img').attr('src');if(typeof image!=='undefined'){image_source=image;rl_view_image(script,image_source);}else{image_source='';}},afterClose:function(){close_executed=true;if(allow_hide){rl_hide_image(script,image_source);allow_hide=false;}}});$(window).on('resize',function(){if(!close_executed){allow_hide=true;}});break;case'prettyphoto':var view_disabled=false;var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').each(function(){var el=$(this);el.attr('title',el.data('rl_caption'));el.find('img').attr('alt',el.data('rl_title'));});$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').prettyPhoto({hook:'data-rel',animation_speed:args.animationSpeed,slideshow:(args.slideshow==='1'?parseInt(args.slideshowDelay):false),autoplay_slideshow:(args.slideshowAutoplay==='1'?true:false),opacity:args.opacity,show_title:(args.showTitle==='1'?true:false),allow_resize:(args.allowResize==='1'?true:false),allow_expand:(args.allowExpand==='1'?true:false),default_width:parseInt(args.width),default_height:parseInt(args.height),counter_separator_label:args.separator,theme:args.theme,horizontal_padding:parseInt(args.horizontalPadding),hideflash:(args.hideFlash==='1'?true:false),wmode:args.wmode,autoplay:(args.videoAutoplay==='1'?true:false),modal:(args.modal==='1'?true:false),deeplinking:(args.deeplinking==='1'?true:false),overlay_gallery:(args.overlayGallery==='1'?true:false),keyboard_shortcuts:(args.keyboardShortcuts==='1'?true:false),social_tools:(args.social==='1'?'':''),ie6_fallback:true,changepicturecallback:function(){if(view_disabled){view_disabled=false;return;} last_image=$('#pp_full_res').find('img').attr('src');rl_view_image(script,last_image);if(args.allowExpand==='1'){$('a.pp_expand').on('click',function(){view_disabled=true;});}},callback:function(){rl_hide_image(script,last_image);}});break;case'fancybox':var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').fancybox({modal:(args.modal==='1'?true:false),overlayShow:(args.showOverlay==='1'?true:false),showCloseButton:(args.showCloseButton==='1'?true:false),enableEscapeButton:(args.enableEscapeButton==='1'?true:false),hideOnOverlayClick:(args.hideOnOverlayClick==='1'?true:false),hideOnContentClick:(args.hideOnContentClick==='1'?true:false),cyclic:(args.cyclic==='1'?true:false),showNavArrows:(args.showNavArrows==='1'?true:false),autoScale:(args.autoScale==='1'?true:false),scrolling:args.scrolling,centerOnScroll:(args.centerOnScroll==='1'?true:false),opacity:(args.opacity==='1'?true:false),overlayOpacity:parseFloat(args.overlayOpacity/100),overlayColor:args.overlayColor,titleShow:(args.titleShow==='1'?true:false),titlePosition:args.titlePosition,transitionIn:args.transitions,transitionOut:args.transitions,easingIn:args.easings,easingOut:args.easings,speedIn:parseInt(args.speeds),speedOut:parseInt(args.speeds),changeSpeed:parseInt(args.changeSpeed),changeFade:parseInt(args.changeFade),padding:parseInt(args.padding),margin:parseInt(args.margin),width:parseInt(args.videoWidth),height:parseInt(args.videoHeight),onComplete:function(){last_image=$('#fancybox-content').find('img').attr('src');rl_view_image(script,last_image);},onClosed:function(){rl_hide_image(script,last_image);}});break;case'nivo':$.each($('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]'),function(){var attr=$(this).attr('data-rel');if(typeof attr==='undefined'||attr==false){attr=$(this).attr('rel');} if(typeof attr!=='undefined'&&attr!==false){var match=attr.match(new RegExp(selector+'\\-(gallery\\-(?:[\\da-z]{1,4}))','ig'));if(match!==null) $(this).attr('data-lightbox-gallery',match[0]);}});var observer_initialized=false;var change_allowed=true;var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').nivoLightbox({effect:args.effect,clickOverlayToClose:(args.clickOverlayToClose==='1'?true:false),keyboardNav:(args.keyboardNav==='1'?true:false),errorMessage:args.errorMessage,afterShowLightbox:function(lightbox){var content=$(lightbox)[0].find('.nivo-lightbox-content');if(!observer_initialized){observer_initialized=true;observe_script_dom(document.getElementsByClassName('nivo-lightbox-content')[0],true,function(){if(change_allowed){last_image=content.find('.nivo-lightbox-image img').attr('src');rl_view_image(script,last_image);change_allowed=false;}});}},afterHideLightbox:function(){change_allowed=true;rl_hide_image(script,last_image);},onPrev:function(element){change_allowed=false;last_image=element[0].attr('href');rl_view_image(script,last_image);},onNext:function(element){change_allowed=false;last_image=element[0].attr('href');rl_view_image(script,last_image);}});break;case'imagelightbox':var selectors=[];var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').each(function(i,item){var attr=$(item).attr('data-rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);else{attr=$(item).attr('rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);}});if(selectors.length>0){selectors=_.uniq(selectors);$(selectors).each(function(i,item){if(typeof event.pagination_type!=='undefined'){$('a[data-rel="'+item+'"], a[rel="'+item+'"]').each(function(){$(this).off('click.imageLightbox');});} $('a[data-rel="'+item+'"], a[rel="'+item+'"]').imageLightbox({animationSpeed:parseInt(args.animationSpeed),preloadNext:(args.preloadNext==='1'?true:false),enableKeyboard:(args.enableKeyboard==='1'?true:false),quitOnEnd:(args.quitOnEnd==='1'?true:false),quitOnImgClick:(args.quitOnImageClick==='1'?true:false),quitOnDocClick:(args.quitOnDocumentClick==='1'?true:false),onLoadEnd:function(){last_image=$('#imagelightbox').attr('src');rl_view_image(script,last_image);},onEnd:function(){rl_hide_image(script,last_image);}});});} break;case'tosrus':var selectors=[];var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').each(function(i,item){var attr=$(item).attr('data-rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);else{attr=$(item).attr('rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);}});if(selectors.length>0){selectors=_.uniq(selectors);$(selectors).each(function(i,item){if(typeof event.pagination_type!=='undefined'){$('body').find('.tosrus-'+item).remove();$('a[data-rel="'+item+'"], a[rel="'+item+'"]').each(function(){$(this).off('click.tos');});} var tos=$('a[data-rel="'+item+'"], a[rel="'+item+'"]').tosrus({infinite:(args.infinite==='1'?true:false),autoplay:{play:(args.autoplay==='1'?true:false),pauseOnHover:(args.pauseOnHover==='1'?true:false),timeout:args.timeout},effect:args.effect,keys:{prev:(args.keys==='1'?true:false),next:(args.keys==='1'?true:false),close:(args.keys==='1'?true:false)},pagination:{add:(args.pagination==='1'?true:false),type:args.paginationType},show:false,buttons:true,caption:{add:true,attributes:["title"]},wrapper:{classes:'tosrus-'+item,onClick:args.closeOnClick==='1'?'close':'toggleUI'}});tos.on('sliding.tos',function(event,number){last_image=$($(event.target).find('.tos-slider .tos-slide')[number]).find('img').attr('src');rl_view_image(script,last_image);});tos.on('closing.tos',function(){rl_hide_image(script,last_image);});});} break;case'featherlight':var selectors=[];var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').each(function(i,item){var attr=$(item).attr('data-rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);else{attr=$(item).attr('rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);}});if(selectors.length>0){selectors=_.uniq(selectors);$.extend($.featherlight.defaults,{openSpeed:parseInt(args.openSpeed),closeSpeed:parseInt(args.closeSpeed),closeOnClick:args.closeOnClick,closeOnEsc:(args.closeOnEsc==='1'?true:false),afterOpen:function(event){last_image=event.currentTarget.href;rl_view_image(script,last_image);},afterClose:function(){rl_hide_image(script,last_image);}});$(selectors).each(function(i,item){if(typeof event.pagination_type!=='undefined'){$('a[data-rel="'+item+'"], a[rel="'+item+'"]').each(function(){$(this).off('click.featherlight');});} if(/-gallery-/.test(item)){$('a[data-rel="'+item+'"], a[rel="'+item+'"]').featherlightGallery({galleryFadeIn:parseInt(args.galleryFadeIn),galleryFadeOut:parseInt(args.galleryFadeOut),previousIcon:'❮',nextIcon:'❯'});}else if(/-video-/.test(item)){$('a[data-rel="'+item+'"], a[rel="'+item+'"]').featherlight();}else{$('a[data-rel="'+item+'"], a[rel="'+item+'"]').featherlight();}});} break;case'magnific':var selectors=[];var last_image='';$('a[rel*="'+selector+'"], a[data-rel*="'+selector+'"]').each(function(i,item){var attr=$(item).attr('data-rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);else{attr=$(item).attr('rel');if(typeof attr!=='undefined'&&attr!==false&&attr!=='norl') selectors.push(attr);}});if(selectors.length>0){selectors=_.uniq(selectors);$(selectors).each(function(i,item){var subselector=$('a[data-rel="'+item+'"], a[rel="'+item+'"]');var element=$(subselector[0]);var media_type=element.data('magnific_type');var content_type=element.data('rl_content');if(typeof content_type!=='undefined') media_type=content_type;if(typeof media_type==='undefined') media_type='image';subselector.magnificPopup({type:media_type==='gallery'?'image':(media_type==='video'?'iframe':media_type),disableOn:args.disableOn,midClick:args.midClick==='1',preloader:args.preloader==='1',closeOnContentClick:args.closeOnContentClick==='1',closeOnBgClick:args.closeOnBgClick==='1',closeBtnInside:args.closeBtnInside==='1',showCloseBtn:args.showCloseBtn==='1',enableEscapeKey:args.enableEscapeKey==='1',alignTop:args.alignTop==='1',autoFocusLast:args.autoFocusLast==='1',fixedContentPos:args.fixedContentPos==='auto'?'auto':(args.fixedContentPos==='1'),fixedBgPos:args.fixedBgPos==='auto'?'auto':(args.fixedBgPos==='1'),image:{titleSrc:function(item){return item.el.attr('data-rl_title')+''+item.el.attr('data-rl_caption')+'';}},gallery:{enabled:subselector.length>1&&media_type==='gallery',navigateByImgClick:true,preload:[0,1]},callbacks:{close:function(){rl_hide_image(script,this.currItem.src);},imageLoadComplete:function(){rl_view_image(script,this.currItem.src);}}});});} break;}});})(jQuery);