// source --> https://mermaiddigital.com/wp-content/plugins/autoAlbums/autoAlbums.js?ver=5.4.16 
;(function($) {//Protect it from other jQuery instances

    $(window).ready(function(){

        //console.log(aamrg_vars);

        var cWidth = aamrg_vars.columnWidth;
        if( cWidth == 'auto' ){
            //do nothing
        }else{
            cWidth = parseInt(aamrg_vars.columnWidth);
        }

      	$('.AutoAlbums').each(function(){
            $(this).autoAlbums({
                imagesOrder: aamrg_vars.imgOrder, //byDate, byDateReverse, byName, byNameReverse, random
                albumsOrder: 'none', //byDate, byDateReverse, byName, byNameReverse, random, none
                folderCoverRandom: aamrg_vars.folderCoverRandom, //If there is no folderCover image then get a random image from that folder to use it as cover folder
                foldersAtTop: aamrg_vars.foldersAtTop, //If you want the folders to be always first and then the images, if not they will be as you ordered above
                showNumFolder: aamrg_vars.showNumFolder, //If you want to show the number of folders inside a folder
                showNumImages: aamrg_vars.showNumImages, //If you want to show the number of images inside a folder
                autoHideNumFolder: aamrg_vars.autoHideNumFolder, //If there is no folders inside a folder then don't show the number of folders
                autoHideNumImages: aamrg_vars.autoHideNumImage, //If there is no images inside a folder then don't show the number of images
                isFitWidth: true, //Nedded to be true if you wish to center the gallery to its container
                lazyLoad: aamrg_vars.lazyLoad, //If you wish to load more images when it reach the bottom of the page
                showNavBar: aamrg_vars.showNavBar, //Show the navigation bar?
                imagesToLoadStart: parseInt(aamrg_vars.imagesToLoadStart), //The number of images to load when it first loads the grid
                imagesToLoad: parseInt(aamrg_vars.imagesToLoad), //The number of images to load when you click the load more button
                horizontalSpaceBetweenThumbnails: parseInt(aamrg_vars.horizontalSpace), //The space between images horizontally
                verticalSpaceBetweenThumbnails: parseInt(aamrg_vars.verticalSpace), //The space between images vertically
                columnWidth: cWidth, //The width of each columns, if you set it to 'auto' it will use the columns instead
                columns: parseInt(aamrg_vars.columns), //The number of columns when you set columnWidth to 'auto'
                columnMinWidth: parseInt(aamrg_vars.columnMinWidth), //The minimum width of each column when you set columnWidth to 'auto'
                isAnimated: aamrg_vars.isAnimated, //Animation when resizing or filtering with the nav bar
                caption: aamrg_vars.caption, //Show the caption in mouse over
                captionType: aamrg_vars.captionType, // 'grid', 'grid-fade', 'classic' the type of caption effect
                lightBox: aamrg_vars.lightbox, //Do you want the lightbox?
                lightboxKeyboardNav: aamrg_vars.lightboxKeyboardNav, //Keyboard navigation of the next and prev image
                lightBoxSpeedFx: parseInt(aamrg_vars.lightBoxSpeedFx), //The speed of the lightbox effects
                lightBoxZoomAnim: aamrg_vars.lightboxZoom, //Do you want the zoom effect of the images in the lightbox?
                lightBoxText: aamrg_vars.lightBoxText, //If you wish to show the text in the lightbox
                lightboxPlayBtn: aamrg_vars.lightboxPlayBtn, //Show the play button?
                lightBoxAutoPlay: aamrg_vars.lightBoxAutoPlay, //The first time you open the lightbox it start playing the images
                lightBoxPlayInterval: parseInt(aamrg_vars.lightBoxPlayInterval), //The interval in the auto play mode 
                lightBoxShowTimer: aamrg_vars.lightBoxShowTimer, //If you wish to show the timer in auto play mode
                lightBoxStopPlayOnClose: aamrg_vars.lightBoxStopPlayOnClose, //Stop the auto play mode when you close the lightbox?
                hashTag: aamrg_vars.hashTag,
                swipeSupport: false,
                
                hiddenStyle: { opacity: 0, scale: 0.001 },
                visibleStyle: { opacity: 1, scale: 1 },
            });
        });
    });

})(jQuery);
// source --> https://mermaiddigital.com/wp-content/plugins/autoAlbums/js/waypoints.min.js?ver=5.4.16 
// Generated by CoffeeScript 1.6.2
/*
jQuery Waypoints - v2.0.3
Copyright (c) 2011-2013 Caleb Troughton
Dual licensed under the MIT license and GPL license.
https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
*/
(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
// source --> https://mermaiddigital.com/wp-content/plugins/wonderplugin-carousel/engine/wonderplugincarouselskins.js?ver=13.5 
/** Wonderplugin Carousel Plugin Free Version
 * Copyright 2015 Magic Hills Pty Ltd All Rights Reserved
 * Website: http://www.wonderplugin.com
 * Version 13.5 
 */
var WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS={classic:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"classic",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-3.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",
showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:18,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,
backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},classicwithflip:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,
itembottomshadowimagetop:100,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"classicwithflip",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-3.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,
itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:18,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,
backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},gallery:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:48,
itembackgroundimagewidth:100,skin:"gallery",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,
rownumber:1,arrowimage:"arrows-48-48-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:48,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,
bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},readmorebutton:{width:240,height:180,fixaspectratio:true,fitimage:false,fitcenterimage:false,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"readmorebutton",
responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-6.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",
direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,
screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},teammember:{width:240,height:240,fixaspectratio:false,fitimage:true,fitcenterimage:true,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:48,itembackgroundimagewidth:100,skin:"teammember",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",
enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-6.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-48-48-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,
showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:48,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,transitionduration:1E3},teammemberflip:{width:240,height:240,fixaspectratio:false,fitimage:true,fitcenterimage:true,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"teammemberflip",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",
itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",
itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},readmore:{width:240,height:180,
skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:48,itembackgroundimagewidth:100,skin:"readmore",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",
showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-48-48-4.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:48,pauseonmouseover:true,
navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},hoverover:{width:200,height:200,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,
showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"hoverover",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,
continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",
visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},flip:{width:200,height:200,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"flip",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",
enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,
showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,transitionduration:1E3},highlight:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:48,itembackgroundimagewidth:100,skin:"highlight",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",
showitembottomshadow:true,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-48-48-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,
backgroundimage:"",autoplay:true,arrowwidth:48,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},list:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,
itembottomshadowimagetop:99,navheight:12,random:false,showbottomshadow:false,arrowheight:28,itembackgroundimagewidth:100,skin:"list",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",
playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-28-28-0.png",direction:"vertical",navimage:"bullet-12-12-1.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:28,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,
navspacing:4,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:12,loop:0,transitionduration:1E3},navigator:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:12,random:false,showbottomshadow:false,arrowheight:28,itembackgroundimagewidth:100,skin:"navigator",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",
enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-28-28-0.png",direction:"horizontal",navimage:"bullet-12-12-1.png",itembackgroundimagetop:0,
showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:28,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:4,playvideoimage:"playvideo-64-64-0.png",visibleitems:2,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:12,loop:0,transitionduration:1E3},showcase:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"showcase",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"none",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",
showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-4.png",direction:"vertical",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"vertical",itembottomshadowimagewidth:100,backgroundimage:"",
autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:1,navswitchonmouseover:true,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},simplicity:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,navheight:16,random:false,showbottomshadow:false,
arrowheight:32,itembackgroundimagewidth:100,skin:"simplicity",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"none",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-6.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,
rownumber:1,arrowimage:"arrows-32-32-1.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,
bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},scroller:{width:120,height:120,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,navheight:16,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"scroller",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",
enabletouchswipe:true,navstyle:"none",backgroundimagetop:-40,arrowstyle:"none",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-6.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:true,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-1.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,
showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:false,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:5,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,transitionduration:1E3},stylish:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,navheight:24,random:false,showbottomshadow:true,arrowheight:32,itembackgroundimagewidth:100,skin:"stylish",responsive:true,bottomshadowimage:"bottomshadow-110-100-5.png",enabletouchswipe:false,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:100,hoveroverlayimage:"hoveroverlay-64-64-4.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",
showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-0.png",direction:"horizontal",navimage:"bullet-24-24-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,
backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:4,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:24,loop:0,transitionduration:1E3},thumbnail:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,
itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:28,itembackgroundimagewidth:100,skin:"thumbnail",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"none",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",
playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-28-28-0.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:8,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:28,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,
navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:1,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:750},vertical:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,navheight:24,random:false,showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"vertical",responsive:true,bottomshadowimage:"bottomshadow-110-100-5.png",
enabletouchswipe:true,navstyle:"none",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:100,hoveroverlayimage:"hoveroverlay-64-64-4.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-4.png",direction:"vertical",navimage:"bullet-24-24-0.png",itembackgroundimagetop:0,
showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:12,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"vertical",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:4,playvideoimage:"playvideo-64-64-0.png",visibleitems:2,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:24,loop:0,transitionduration:1E3},testimonial:{width:360,height:270,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,donotcrop:false,navheight:12,random:false,showhoveroverlay:true,height:270,arrowheight:32,itembackgroundimagewidth:100,skin:"testimonial",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",navstyle:"none",enabletouchswipe:true,backgroundimagetop:-40,arrowstyle:"mouseover",bottomshadowimagetop:95,transitionduration:1E3,lightboxshowtitle:true,
hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",lightboxshowdescription:false,width:360,showitembottomshadow:false,showhoveroverlayalways:false,navimage:"bullet-12-12-1.png",lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",backgroundimagewidth:110,playvideoimagepos:"center",
circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",scrollitems:1,showbottomshadow:false,lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,transitioneasing:"easeOutExpo",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:4,lightboxthumbwidth:80,scrollmode:"item",navdirection:"horizontal",
itembottomshadowimagewidth:100,backgroundimage:"",lightboxthumbtopmargin:12,arrowwidth:32,transparent:false,navmode:"page",lightboxthumbbottommargin:8,interval:2E3,lightboxthumbheight:60,navspacing:4,pauseonmouseover:false,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:1,navswitchonmouseover:false,direction:"horizontal",usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:12,loop:0,
autoplay:true},fashion:{width:300,height:300,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,donotcrop:false,navheight:16,random:false,showhoveroverlay:false,height:300,arrowheight:60,itembackgroundimagewidth:100,skin:"fashion",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",navstyle:"bullets",enabletouchswipe:true,backgroundimagetop:-40,arrowstyle:"mouseover",bottomshadowimagetop:95,transitionduration:1E3,lightboxshowtitle:true,hoveroverlayimage:"hoveroverlay-64-64-4.png",
itembottomshadowimage:"itembottomshadow-100-100-5.png",lightboxshowdescription:false,width:300,showitembottomshadow:false,showhoveroverlayalways:false,navimage:"bullet-16-16-1.png",lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",backgroundimagewidth:110,playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,
rownumber:1,arrowimage:"arrows-42-60-0.png",scrollitems:1,showbottomshadow:false,lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,transitioneasing:"easeOutExpo",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:0,lightboxthumbwidth:80,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",
lightboxthumbtopmargin:12,arrowwidth:42,transparent:false,navmode:"page",lightboxthumbbottommargin:8,interval:3E3,lightboxthumbheight:60,navspacing:8,pauseonmouseover:true,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,direction:"horizontal",usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,autoplay:true},flow:{width:240,height:240,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:100,donotcrop:false,navheight:16,random:false,showhoveroverlay:false,arrowheight:60,itembackgroundimagewidth:100,skin:"flow",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",navstyle:"none",enabletouchswipe:true,backgroundimagetop:-40,arrowstyle:"none",bottomshadowimagetop:95,transitionduration:1E3,lightboxshowtitle:true,hoveroverlayimage:"hoveroverlay-64-64-4.png",
itembottomshadowimage:"itembottomshadow-100-100-5.png",lightboxshowdescription:false,showitembottomshadow:false,showhoveroverlayalways:false,navimage:"bullet-16-16-1.png",lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",backgroundimagewidth:110,playvideoimagepos:"center",circular:true,continuous:true,continuousduration:4E3,
rownumber:1,arrowimage:"arrows-42-60-0.png",scrollitems:1,showbottomshadow:false,lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,transitioneasing:"easeOutExpo",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:0,lightboxthumbwidth:80,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",
lightboxthumbtopmargin:12,arrowwidth:42,transparent:false,navmode:"page",lightboxthumbbottommargin:8,interval:3E3,lightboxthumbheight:60,navspacing:8,pauseonmouseover:true,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,direction:"horizontal",usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,autoplay:true,sameheight:true,sameheightresponsive:true,sameheightmediumscreen:769,sameheightmediumheight:180,sameheightsmallscreen:415,sameheightsmallheight:140},rotator:{width:200,height:200,skinsfoldername:"",interval:3E3,itembottomshadowimagetop:100,donotcrop:false,random:false,showhoveroverlay:true,arrowheight:36,showbottomshadow:false,itembackgroundimagewidth:100,skin:"Rotator",responsive:true,lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",
enabletouchswipe:true,navstyle:"none",backgroundimagetop:-40,arrowstyle:"mouseover",bottomshadowimagetop:100,transitionduration:1E3,itembackgroundimagetop:0,hoveroverlayimage:"hoveroverlay-64-64-9.png",itembottomshadowimage:"itembottomshadow-100-100-5.png",lightboxshowdescription:false,navswitchonmouseover:false,showhoveroverlayalways:false,transitioneasing:"easeOutExpo",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",
circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-36-36-1.png",scrollitems:1,direction:"vertical",lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,navimage:"bullet-24-24-0.png",backgroundimagewidth:110,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:8,lightboxthumbwidth:80,navdirection:"vertical",itembottomshadowimagewidth:100,
backgroundimage:"",lightboxthumbtopmargin:12,autoplay:true,arrowwidth:36,transparent:false,bottomshadowimage:"bottomshadow-110-100-5.png",scrollmode:"page",navmode:"page",lightboxshowtitle:true,lightboxthumbbottommargin:8,arrowhideonmouseleave:1E3,showitembottomshadow:false,lightboxthumbheight:60,navspacing:4,pauseonmouseover:true,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:2,usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:24,loop:0,navheight:24},testimonialcarousel:{width:280,height:240,skinsfoldername:"",interval:3E3,itembottomshadowimagetop:99,donotcrop:false,random:false,showhoveroverlay:false,arrowheight:32,showbottomshadow:false,itembackgroundimagewidth:100,skin:"TestimonialCarousel",responsive:true,lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"mouseover",
bottomshadowimagetop:95,transitionduration:1E3,itembackgroundimagetop:0,hoveroverlayimage:"hoveroverlay-64-64-9.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",lightboxshowdescription:false,navswitchonmouseover:false,showhoveroverlayalways:false,transitioneasing:"easeOutExpo",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",fixaspectratio:false,circular:true,continuous:false,continuousduration:2500,rownumber:1,
arrowimage:"arrows-32-32-2.png",scrollitems:1,direction:"horizontal",lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,navimage:"bullet-16-16-1.png",backgroundimagewidth:110,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:4,lightboxthumbwidth:80,navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",lightboxthumbtopmargin:12,
autoplay:true,arrowwidth:32,transparent:false,bottomshadowimage:"bottomshadow-110-95-0.png",scrollmode:"page",navmode:"page",lightboxshowtitle:true,lightboxthumbbottommargin:8,arrowhideonmouseleave:600,showitembottomshadow:false,lightboxthumbheight:60,navspacing:4,pauseonmouseover:false,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:3,usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,navheight:16},textimageslider:{width:1200,height:360,skinsfoldername:"",interval:3E3,itembottomshadowimagetop:99,donotcrop:false,random:false,showhoveroverlay:false,arrowheight:48,showbottomshadow:false,itembackgroundimagewidth:100,skin:"TextImageSlider",responsive:true,lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,
transitionduration:1E3,itembackgroundimagetop:0,hoveroverlayimage:"hoveroverlay-64-64-9.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",lightboxshowdescription:false,navswitchonmouseover:false,showhoveroverlayalways:false,transitioneasing:"easeOutExpo",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",fixaspectratio:false,circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-48-48-4.png",
scrollitems:1,direction:"horizontal",lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",supportiframe:false,navimage:"bullet-16-16-0.png",backgroundimagewidth:110,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:4,lightboxthumbwidth:80,navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",lightboxthumbtopmargin:12,autoplay:true,arrowwidth:48,
transparent:false,bottomshadowimage:"bottomshadow-110-95-0.png",scrollmode:"page",navmode:"page",lightboxshowtitle:true,lightboxthumbbottommargin:8,arrowhideonmouseleave:600,showitembottomshadow:false,lightboxthumbheight:60,navspacing:4,pauseonmouseover:false,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:1,usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 1\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',
navwidth:16,loop:0,navheight:16},tworows:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:16,random:false,showbottomshadow:false,arrowheight:48,itembackgroundimagewidth:100,skin:"gallery",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",
showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:2,arrowimage:"arrows-48-48-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,
backgroundimage:"",autoplay:true,arrowwidth:48,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,transitionduration:1E3},textonly:{width:280,height:240,skinsfoldername:"",interval:3E3,
itembottomshadowimagetop:99,donotcrop:false,random:false,showhoveroverlay:false,arrowheight:32,showbottomshadow:false,itembackgroundimagewidth:100,skin:"TextOnly",responsive:true,lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",enabletouchswipe:true,navstyle:"bullets",backgroundimagetop:-40,arrowstyle:"mouseover",bottomshadowimagetop:95,transitionduration:1E3,itembackgroundimagetop:0,hoveroverlayimage:"hoveroverlay-64-64-9.png",
itembottomshadowimage:"itembottomshadow-100-98-3.png",lightboxshowdescription:false,navswitchonmouseover:false,showhoveroverlayalways:false,transitioneasing:"easeOutExpo",lightboxshownavigation:false,lightboxnogroup:false,showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",scrollitems:1,direction:"horizontal",lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",
supportiframe:false,navimage:"bullet-16-16-1.png",backgroundimagewidth:110,showbackgroundimage:false,lightboxbarheight:64,showplayvideo:true,spacing:4,lightboxthumbwidth:80,navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",lightboxthumbtopmargin:12,autoplay:true,arrowwidth:32,transparent:false,bottomshadowimage:"bottomshadow-110-95-0.png",scrollmode:"page",navmode:"page",lightboxshowtitle:true,lightboxthumbbottommargin:8,arrowhideonmouseleave:600,showitembottomshadow:false,
lightboxthumbheight:60,navspacing:4,pauseonmouseover:false,imagefillcolor:"FFFFFF",playvideoimage:"playvideo-64-64-0.png",visibleitems:3,usescreenquery:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:16,loop:0,navheight:16},numbering:{width:240,height:180,skinsfoldername:"",arrowhideonmouseleave:1E3,itembottomshadowimagetop:99,navheight:24,random:false,
showbottomshadow:false,arrowheight:32,itembackgroundimagewidth:100,skin:"numbering",responsive:true,bottomshadowimage:"bottomshadow-110-95-0.png",enabletouchswipe:true,navstyle:"numbering",backgroundimagetop:-40,arrowstyle:"always",bottomshadowimagetop:95,hoveroverlayimage:"hoveroverlay-64-64-5.png",itembottomshadowimage:"itembottomshadow-100-98-3.png",showitembottomshadow:false,transitioneasing:"easeOutExpo",showitembackgroundimage:false,itembackgroundimage:"",playvideoimagepos:"center",circular:true,
continuous:false,continuousduration:2500,rownumber:1,arrowimage:"arrows-32-32-2.png",direction:"horizontal",navimage:"bullet-16-16-0.png",itembackgroundimagetop:0,showbackgroundimage:false,lightboxbarheight:48,showplayvideo:true,spacing:4,scrollitems:1,showhoveroverlay:true,scrollmode:"page",navdirection:"horizontal",itembottomshadowimagewidth:100,backgroundimage:"",autoplay:true,arrowwidth:32,pauseonmouseover:true,navmode:"page",interval:3E3,backgroundimagewidth:110,navspacing:8,playvideoimage:"playvideo-64-64-0.png",
visibleitems:3,navswitchonmouseover:false,bottomshadowimagewidth:110,screenquery:'{\n\t"tablet": {\n\t\t"screenwidth": 800,\n\t\t"visibleitems": 2\n\t},\n\t"mobile": {\n\t\t"screenwidth": 480,\n\t\t"visibleitems": 1\n\t}\n}',navwidth:24,loop:0,transitionduration:1E3}};
// source --> https://mermaiddigital.com/wp-content/plugins/wonderplugin-carousel/engine/wonderplugincarousel.js?ver=13.5 
/** Wonderplugin Carousel Plugin Free Version
 * Copyright 2015 Magic Hills Pty Ltd All Rights Reserved
 * Website: http://www.wonderplugin.com
 * Version 13.5 
 */
(function($){$.fn.wondercarousellightbox=function(options){var inst=this;inst.options=$.extend({freelink:"http://html5box.com/",defaultvideovolume:1,autoclose:false,autoclosedelay:0,resizedelay:100,insideiframe:false,autoresizecontent:true,defaultwidth:960,defaultheight:540,usedefaultsizeforcontent:false,preload:true,preloadallonpageload:false,preloadalldelay:5E3,autoplay:true,loopvideo:false,html5player:true,responsive:true,nativehtml5controls:false,videohidecontrols:false,nativecontrolsonfirefox:false,nativecontrolsonie:false,
nativecontrolsoniphone:true,nativecontrolsonipad:true,nativecontrolsonandroid:true,nativecontrolsonfullscreen:true,nativecontrolsnodownload:true,imagekeepratio:true,maxheight:false,elemautoheight:false,useflashonie9:true,useflashonie10:true,useflashonie11:false,useflashformp4onfirefox:false,transition:"none",transitionduration:400,enablepdfjs:false,pdfjsengine:"",openpdfinnewtaboniphone:false,openpdfinnewtabonipad:false,googleanalyticsaccount:"",arrowloop:true,showall:false,userelforgroup:true,shownavigation:true,
thumbwidth:96,thumbheight:72,thumbgap:4,thumbtopmargin:12,thumbbottommargin:12,thumbborder:1,thumbbordercolor:"transparent",thumbhighlightbordercolor:"#fff",thumbopacity:1,navbuttonwidth:32,navbgcolor:"rgba(0,0,0,0.2)",shownavcontrol:true,navcontrolimage:"lightbox-navcontrol.png",hidenavdefault:false,overlaybgcolor:"#000",overlayopacity:0.9,bgcolor:"#fff",bordersize:8,borderradius:0,bordermargin:16,bordertopmargin:48,barautoheight:true,barheight:64,smallscreenheight:415,responsivebarheight:false,
barheightonsmallheight:64,notkeepratioonsmallheight:false,bordertopmarginsmall:36,loadingwidth:64,loadingheight:64,resizespeed:400,fadespeed:0,jsfolder:"",skinsfoldername:"skins",loadingimage:"lightbox-loading.gif",nextimage:"lightbox-next.png",previmage:"lightbox-prev.png",closeimage:"lightbox-close.png",playvideoimage:"lightbox-playvideo.png",titlebgimage:"lightbox-titlebg.png",navarrowsprevimage:"lightbox-navprev.png",navarrowsnextimage:"lightbox-navnext.png",navarrowsalwaysshowontouch:true,navarrowsbottomscreenwidth:479,
closeonoverlay:true,alwaysshownavarrows:false,showplaybutton:true,playimage:"lightbox-play.png",pauseimage:"lightbox-pause.png",fullscreenmode:false,fullscreencloseimage:"lightbox-close-fullscreen.png",fullscreennextimage:"lightbox-next-fullscreen.png",fullscreenprevimage:"lightbox-prev-fullscreen.png",fullscreennomargin:false,fullscreenmodeonsmallscreen:false,fullscreennomarginonsmallscreen:false,fullscreensmallscreenwidth:800,fullscreenbgcolor:"rgba(0, 0, 0, 0.9)",fullscreenbordersize:0,fullscreentextinside:false,
videobgcolor:"#000",html5videoposter:"",showtitle:true,titlestyle:"bottom",titleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px;",titlebottomcss:"color:#333; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;",showonmouseoverinside:false,showinsidetitleforimageonly:true,showdescription:true,descriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",
descriptionbottomcss:"color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",fullscreentitlebottomcss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px 8px;",fullscreendescriptionbottomcss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",showsocialmedia:true,socialmediaposition:"position:absolute;top:8px;right:8px;",
showtitleprefix:true,titleprefix:"%NUM / %TOTAL",autoslide:false,slideinterval:5E3,showtimer:true,timerposition:"bottom",timerheight:2,timercolor:"#dc572e",timeropacity:1,initvimeo:true,inityoutube:true,swipepreventdefaultonandroid:false,initsocial:false,showsocial:false,socialposition:"position:absolute;top:100%;right:0;",socialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",socialdirection:"horizontal",socialbuttonsize:32,socialbuttonfontsize:18,socialrotateeffect:true,showfacebook:true,
showtwitter:true,showpinterest:true,showemail:false,imagepercentage:75,sidetobottomscreenwidth:479,errorwidth:280,errorheight:48,errorcss:"text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;",enabletouchswipe:true,mobileresizeevent:false,swipedistance:0,bodynoscroll:false,useabsolutepos:false,useabsoluteposonmobile:false,supportesckey:true,supportarrowkeys:true,version:"3.3",stamp:false,freemark:"72,84,77,76,53,32,76,105,103,104,116,98,111,120,32,70,114,101,101,32,86,101,114,115,105,111,110",
watermark:"",watermarklink:""},options);if(typeof wondercarousellightbox_options!="undefined"&&wondercarousellightbox_options)$.extend(inst.options,wondercarousellightbox_options);if($("div.wondercarousellightbox_options").length)$.each($("div.wondercarousellightbox_options").data(),function(key,value){inst.options[key.toLowerCase()]=value});if($("div#wondercarousellightbox_options").length)$.each($("div#wondercarousellightbox_options").data(),function(key,value){inst.options[key.toLowerCase()]=value});if($("div#html5lightbox_general_options").length)$.each($("div#html5lightbox_general_options").data(),
function(key,value){inst.options[key.toLowerCase()]=value});var ELEM_TYPE=0,ELEM_HREF=1,ELEM_TITLE=2,ELEM_GROUP=3,ELEM_WIDTH=4,ELEM_HEIGHT=5,ELEM_HREF_WEBM=6,ELEM_HREF_OGG=7,ELEM_THUMBNAIL=8,ELEM_DESCRIPTION=9,ELEM_DIV=10,ELEM_ORIGINALWIDTH=11,ELEM_ORIGINALHEIGHT=12,ELEM_SOCIALMEDIA=13;inst.options.types=["IMAGE","FLASH","VIDEO","YOUTUBE","VIMEO","PDF","MP3","WEB","FLV","DAILYMOTION","DIV","WISTIA","IFRAMEVIDEO"];inst.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+
1);inst.options.skinsfolder=inst.options.skinsfoldername;if(inst.options.skinsfolder.length>0&&inst.options.skinsfolder[inst.options.skinsfolder.length-1]!="/")inst.options.skinsfolder+="/";if(inst.options.skinsfolder.charAt(0)!="/"&&inst.options.skinsfolder.substring(0,5)!="http:"&&inst.options.skinsfolder.substring(0,6)!="https:")inst.options.skinsfolder=inst.options.jsfolder+inst.options.skinsfolder;var image_list=["loadingimage","nextimage","previmage","closeimage","playvideoimage","titlebgimage",
"navarrowsprevimage","navarrowsnextimage","navcontrolimage","playimage","pauseimage","fullscreencloseimage","fullscreennextimage","fullscreenprevimage"];for(var i=0;i<image_list.length;i++)if(inst.options[image_list[i]])if(inst.options[image_list[i]].substring(0,7).toLowerCase()!="http://"&&inst.options[image_list[i]].substring(0,8).toLowerCase()!="https://")inst.options[image_list[i]]=inst.options.skinsfolder+inst.options[image_list[i]];var i;var l;var mark="";var bytes=inst.options.freemark.split(",");
for(i=0;i<bytes.length;i++)mark+=String.fromCharCode(bytes[i]);inst.options.freemark=mark;var d0="hmtamgli5cboxh.iclolms";for(i=1;i<=5;i++)d0=d0.slice(0,i)+d0.slice(i+1);l=d0.length;for(i=0;i<5;i++)d0=d0.slice(0,l-9+i)+d0.slice(l-8+i);if(inst.options.htmlfolder.indexOf(d0)!=-1)inst.options.stamp=false;inst.options.flashInstalled=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))inst.options.flashInstalled=true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])inst.options.flashInstalled=
true}inst.options.html5VideoSupported=!!document.createElement("video").canPlayType;inst.options.isChrome=navigator.userAgent.match(/Chrome/i)!=null;inst.options.isFirefox=navigator.userAgent.match(/Firefox/i)!=null;inst.options.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;inst.options.isSafari=navigator.userAgent.match(/Safari/i)!=null;inst.options.isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;inst.options.isIE=
navigator.userAgent.match(/MSIE/i)!=null&&!inst.options.isOpera;inst.options.isIE10=navigator.userAgent.match(/MSIE 10/i)!=null&&!this.options.isOpera;inst.options.isIE9=navigator.userAgent.match(/MSIE 9/i)!=null&&!inst.options.isOpera;inst.options.isIE8=navigator.userAgent.match(/MSIE 8/i)!=null&&!inst.options.isOpera;inst.options.isIE7=navigator.userAgent.match(/MSIE 7/i)!=null&&!inst.options.isOpera;inst.options.isIE6=navigator.userAgent.match(/MSIE 6/i)!=null&&!inst.options.isOpera;inst.options.isIE678=
inst.options.isIE6||inst.options.isIE7||inst.options.isIE8;inst.options.isIE6789=inst.options.isIE6||inst.options.isIE7||inst.options.isIE8||inst.options.isIE9;inst.options.isAndroid=navigator.userAgent.match(/Android/i)!=null;inst.options.isIPad=navigator.userAgent.match(/iPad/i)!=null;inst.options.isIPhone=navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;inst.options.isIOS=inst.options.isIPad||inst.options.isIPhone;inst.options.isMobile=inst.options.isAndroid||
inst.options.isIPad||inst.options.isIPhone;inst.options.isIOSLess5=inst.options.isIPad&&inst.options.isIPhone&&(navigator.userAgent.match(/OS 4/i)!=null||navigator.userAgent.match(/OS 3/i)!=null);inst.options.supportCSSPositionFixed=!inst.options.isIE6&&!inst.options.isIOSLess5;inst.options.iequirksmode=inst.options.isIE6789&&document.compatMode!="CSS1Compat";inst.options.isTouch="ontouchstart"in window;if(inst.options.isChrome){var match=navigator.userAgent.match(/Chrome\/([0-9]+)/);inst.options.chromeVersion=
match&&match.length>=2?parseInt(match[1],10):0}if(inst.options.isAndroid){var match=navigator.userAgent.match(/Android\s([0-9\.]*)/i);inst.options.androidVersion=match&&match.length>=2?parseInt(match[1],10):-1}var v=document.createElement("video");inst.options.canplaymp4=v&&v.canPlayType&&v.canPlayType("video/mp4").replace(/no/,"");if(inst.options.isFirefox&&inst.options.nativecontrolsonfirefox||(inst.options.isIE6789||inst.options.isIE10||inst.options.isIE11)&&inst.options.nativecontrolsonie||inst.options.isIPhone&&
inst.options.nativecontrolsoniphone||inst.options.isIPad&&inst.options.nativecontrolsonipad||inst.options.isAndroid&&inst.options.nativecontrolsonandroid)inst.options.nativehtml5controls=true;if(inst.options.isIOS||inst.options.isAndroid)inst.options.nativecontrolsonfullscreen=true;inst.options.navheight=0;inst.options.thumbgap+=2*inst.options.thumbborder;inst.options.resizeTimeout=-1;inst.slideTimeout=null;inst.autosliding=false;inst.existingElem=-1;inst.direction=-3;inst.elemArray=new Array;inst.options.curElem=
-1;inst.defaultoptions=$.extend({},inst.options);if(inst.options.googleanalyticsaccount&&!window._gaq){window._gaq=window._gaq||[];window._gaq.push(["_setAccount",inst.options.googleanalyticsaccount]);window._gaq.push(["_trackPageview"]);$.getScript("https://ssl.google-analytics.com/ga.js")}if(inst.options.initvimeo){var tag=document.createElement("script");tag.src=inst.options.jsfolder+"froogaloop2.min.js";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,
firstScriptTag)}if(inst.options.inityoutube){var tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}if(inst.options.initsocial)$("head").append('<link rel="stylesheet" href="'+inst.options.jsfolder+'icons/css/fontello.css" type="text/css" />');inst.showing=false;inst.navvisible=false;inst.disableEscKey=function(isFullscreen){if(isFullscreen)inst.disableesckeyinfullscreen=
true;else setTimeout(function(){inst.disableesckeyinfullscreen=false},1E3)};inst.supportKeyboard=function(){inst.disableesckeyinfullscreen=false;$(document).keyup(function(e){if(!inst.showing)return;if(!inst.disableesckeyinfullscreen&&inst.options.supportesckey&&e.keyCode==27)inst.finish();else if(inst.options.supportarrowkeys)if(e.keyCode==39)inst.gotoSlide(-1);else if(e.keyCode==37)inst.gotoSlide(-2)});if(inst.options.supportesckey){document.addEventListener("MSFullscreenChange",function(){inst.disableEscKey(document.msFullscreenElement!=
null)},false);document.addEventListener("webkitfullscreenchange",function(){inst.disableEscKey(document.webkitIsFullScreen)},false)}};inst.supportKeyboard();inst.init=function(){inst.showing=false;inst.readData();inst.createMarkup();inst.initSlide()};inst.readData=function(){inst.each(function(){if(this.nodeName.toLowerCase()!="a"&&this.nodeName.toLowerCase()!="area")return;var $this=$(this);var fileType="mediatype"in $this.data()?$this.data("mediatype"):inst.checkType($this.attr("href"));if(fileType<
0)return;var title=$this.data("title")?$this.data("title"):$this.attr("title");var group=$this.data("group")?$this.data("group"):inst.options.userelforgroup?$this.attr("rel"):null;for(var i=0;i<inst.elemArray.length;i++)if($this.attr("href")==inst.elemArray[i][ELEM_HREF]){inst.elemArray[i][ELEM_TITLE]=title;inst.elemArray[i][ELEM_GROUP]=group;return}inst.elemArray.push(new Array(fileType,$this.attr("href"),title,group,$this.data("width"),$this.data("height"),$this.data("webm"),$this.data("ogg"),$this.data("thumbnail"),
$this.data("description"),null,null,null,$this.data("socialmedia")))})};inst.createMarkup=function(){if($(window).width()<=inst.options.fullscreensmallscreenwidth){if(inst.options.fullscreenmodeonsmallscreen){inst.options.fullscreenmode=true;if(inst.options.fullscreennomarginonsmallscreen)inst.options.fullscreennomargin=true}if(inst.options.fullscreenmode&&inst.options.fullscreennomarginonsmallscreen)inst.options.fullscreennomargin=true}if(inst.options.fullscreenmode){inst.options.bgcolor=inst.options.fullscreenbgcolor;
inst.options.bordersize=inst.options.fullscreenbordersize;if(inst.options.fullscreennomargin){inst.options.bordersize=0;inst.options.bordermargin=0;inst.options.bordertopmargin=0;inst.options.bordertopmarginsmall=0}if(inst.options.fullscreentextinside){inst.options.titlestyle="inside";inst.options.titlecss=inst.options.titleinsidecss;inst.options.descriptioncss=inst.options.descriptioninsidecss}else{inst.options.titlebottomcss=inst.options.fullscreentitlebottomcss;inst.options.descriptionbottomcss=
inst.options.fullscreendescriptionbottomcss}}inst.options.barheightoriginal=inst.options.barheight;if(inst.options.responsivebarheight){var winH=$(window).height();if(winH<=inst.options.smallscreenheight)inst.options.barheight=inst.options.barheightonsmallheight}if(!inst.options.titlecss)inst.options.titlecss=inst.options.titlestyle=="inside"?inst.options.titleinsidecss:inst.options.titlebottomcss;if(!inst.options.descriptioncss)inst.options.descriptioncss=inst.options.titlestyle=="inside"?inst.options.descriptioninsidecss:
inst.options.descriptionbottomcss;inst.options.titlecss=$.trim(inst.options.titlecss);if(inst.options.titlecss.length>1){if(inst.options.titlecss.charAt(0)=="{")inst.options.titlecss=inst.options.titlecss.substring(1);if(inst.options.titlecss.charAt(inst.options.titlecss.length-1)=="}")inst.options.titlecss=inst.options.titlecss.substring(0,inst.options.titlecss.length-1)}inst.options.descriptioncss=$.trim(inst.options.descriptioncss);if(inst.options.descriptioncss.length>1){if(inst.options.descriptioncss.charAt(0)==
"{")inst.options.descriptioncss=inst.options.descriptioncss.substring(1);if(inst.options.descriptioncss.charAt(inst.options.descriptioncss.length-1)=="}")inst.options.descriptioncss=inst.options.descriptioncss.substring(0,inst.options.descriptioncss.length-1)}inst.options.errorcss=$.trim(inst.options.errorcss);if(inst.options.errorcss.length>1){if(inst.options.errorcss.charAt(0)=="{")inst.options.errorcss=inst.options.errorcss.substring(1);if(inst.options.errorcss.charAt(inst.options.errorcss.length-
1)=="}")inst.options.errorcss=inst.options.errorcss.substring(0,inst.options.errorcss.length-1)}var styleCss=".bodynoscroll {height:100%;overflow:hidden;}";styleCss+=".html5-hide {display:none !important;} #carousel-html5-lightbox .html5-text {"+inst.options.titlecss+"}";styleCss+="#carousel-html5-lightbox .html5-description {"+inst.options.descriptioncss+"}";styleCss+="#carousel-html5-lightbox .html5-error {"+inst.options.errorcss+"}";if(inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows){styleCss+=
"#carousel-html5-lightbox .html5-prev-touch {left:0px;top:50%;margin-top:-16px;margin-left:-32px;} #carousel-html5-lightbox .html5-next-touch {right:0px;top:50%;margin-top:-16px;margin-right:-32px;}";styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) { #carousel-html5-lightbox .html5-prev-touch {top:100%;left:0;margin:0;} #carousel-html5-lightbox .html5-next-touch {top:100%;right:0;margin:0;} }"}styleCss+="#carousel-html5-lightbox .html5-prev-fullscreen {display:block;} #carousel-html5-lightbox .html5-next-fullscreen {display:block;} #carousel-html5-lightbox .html5-prev-bottom-fullscreen {display:none;} #carousel-html5-lightbox .html5-next-bottom-fullscreen {display:none;}";
styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) {#carousel-html5-lightbox .html5-prev-fullscreen {display:none;} #carousel-html5-lightbox .html5-next-fullscreen {display:none;} #carousel-html5-lightbox .html5-prev-bottom-fullscreen {display:block;} #carousel-html5-lightbox .html5-next-bottom-fullscreen {display:block;} }";if(inst.options.titlestyle=="right"){styleCss+="#carousel-html5-lightbox .html5-elem-wrap {width:"+inst.options.imagepercentage+"%;height:100%;} #carousel-html5-lightbox .html5-elem-data-box {min-height:100%;}";
styleCss+="@media (max-width: "+inst.options.sidetobottomscreenwidth+"px) {#carousel-html5-lightbox .html5-elem-wrap {width:100%;height:auto;} #carousel-html5-lightbox .html5-elem-data-box {width:100%;height:auto;min-height:0;}}"}else if(inst.options.titlestyle=="left"){styleCss+="#carousel-html5-lightbox .html5-elem-wrap {height:100%;} #carousel-html5-lightbox .html5-elem-data-box {width:"+String(100-inst.options.imagepercentage)+"%;min-height:100%;}";styleCss+="@media (max-width: "+inst.options.sidetobottomscreenwidth+
"px) {#carousel-html5-lightbox .html5-elem-wrap {width:100%;height:auto;} #carousel-html5-lightbox .html5-elem-data-box {width:100%;height:auto;min-height:0;}}"}styleCss+=".html5-rotate { border-radius:50%; -webkit-transition:-webkit-transform .4s ease-in; transition: transform .4s ease-in; } .html5-rotate:hover { -webkit-transform: rotate(360deg); transform: rotate(360deg); }";styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) {#html5-social {"+inst.options.socialpositionsmallscreen+
"}}";$("head").append("<style type='text/css' data-creator='carousel-html5-lightbox'>"+styleCss+"</style>");var elemheight=inst.options.elemautoheight?"auto":"100%";inst.$lightbox=$("<div id='carousel-html5-lightbox' style='display:none;top:0px;left:0px;width:100%;height:100%;z-index:9999998;text-align:center;'>"+"<div id='html5-lightbox-overlay' style='display:block;position:absolute;top:0px;left:0px;width:100%;min-height:100%;background-color:"+inst.options.overlaybgcolor+";opacity:"+inst.options.overlayopacity+
";filter:alpha(opacity="+Math.round(inst.options.overlayopacity*100)+");'></div>"+"<div id='html5-lightbox-box' style='display:block;position:relative;margin:0px auto;'>"+"<div class='html5-elem-box' style='display:block;position:relative;width:100%;overflow-x:hidden;overflow-y:auto;height:"+elemheight+";margin:0px auto;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;'>"+"<div class='html5-elem-wrap' style='display:block;position:relative;margin:0px auto;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;background-color:"+
inst.options.bgcolor+";'>"+"<div class='html5-loading' style='display:none;position:absolute;top:0px;left:0px;text-align:center;width:100%;height:100%;background:url(\""+inst.options.loadingimage+"\") no-repeat center center;'></div>"+"<div class='html5-error-box html5-error' style='display:none;position:absolute;padding:"+inst.options.bordersize+"px;text-align:center;width:"+inst.options.errorwidth+"px;height:"+inst.options.errorheight+"px;'>"+"The requested content cannot be loaded.<br />Please try again later."+
"</div>"+"<div class='html5-image' style='display:none;position:relative;top:0px;left:0px;width:100%;height:100%;"+(inst.options.iequirksmode?"margin":"padding")+":"+inst.options.bordersize+"px;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;'></div>"+"</div>"+"</div>"+"<div id='html5-watermark' style='display:none;position:absolute;left:"+String(inst.options.bordersize+2)+"px;top:"+String(inst.options.bordersize+2)+"px;'></div>"+"</div>"+"</div>");
inst.options.positionFixed=inst.options.supportCSSPositionFixed&&inst.options.responsive&&!inst.options.iequirksmode;if(inst.options.useabsolutepos||inst.options.useabsoluteposonmobile&&inst.options.isMobile)inst.options.positionFixed=false;if(!inst.options.positionFixed)inst.options.bodynoscroll=true;inst.$lightbox.css({position:inst.options.positionFixed?"fixed":"absolute"});inst.$lightbox.appendTo("body");inst.$lightboxBox=$("#html5-lightbox-box",inst.$lightbox);inst.$elem=$(".html5-elem-box",
inst.$lightbox);inst.$elemWrap=$(".html5-elem-wrap",inst.$lightbox);inst.$loading=$(".html5-loading",inst.$lightbox);inst.$error=$(".html5-error-box",inst.$lightbox);inst.$image=$(".html5-image",inst.$lightbox);if(inst.options.fullscreenmode&&inst.options.fullscreennomargin)inst.$elem.css({overflow:"hidden"});var elemText="<div class='html5-elem-data-box' style='display:none;box-sizing:border-box;'><div class='html5-text' style='display:block;overflow:hidden;'></div></div>";if(inst.options.titlestyle==
"left")inst.$elem.prepend(elemText);else inst.$elem.append(elemText);inst.$elemData=$(".html5-elem-data-box",inst.$lightbox);inst.$text=$(".html5-text",inst.$lightbox);if(inst.options.borderradius>0){inst.$elem.css({"border-radius":inst.options.borderradius+"px","-moz-border-radius":inst.options.borderradius+"px","-webkit-border-radius":inst.options.borderradius+"px"});if(inst.options.titlestyle=="inside")inst.$elemWrap.css({"border-radius":inst.options.borderradius+"px","-moz-border-radius":inst.options.borderradius+
"px","-webkit-border-radius":inst.options.borderradius+"px"});else if(inst.options.titlestyle=="bottom"){inst.$elemWrap.css({"border-top-left-radius":inst.options.borderradius+"px","-moz-top-left-border-radius":inst.options.borderradius+"px","-webkit-top-left-border-radius":inst.options.borderradius+"px","border-top-right-radius":inst.options.borderradius+"px","-moz-top-right-border-radius":inst.options.borderradius+"px","-webkit-top-right-border-radius":inst.options.borderradius+"px"});inst.$elemData.css({"border-bottom-left-radius":inst.options.borderradius+
"px","-moz-top-bottom-border-radius":inst.options.borderradius+"px","-webkit-bottom-left-border-radius":inst.options.borderradius+"px","border-bottom-right-radius":inst.options.borderradius+"px","-moz-bottom-right-border-radius":inst.options.borderradius+"px","-webkit-bottom-right-border-radius":inst.options.borderradius+"px"})}}if(inst.options.titlestyle=="right"||inst.options.titlestyle=="left"){inst.$lightboxBox.css({"background-color":inst.options.bgcolor});if(inst.options.titlestyle=="right"){inst.$elemWrap.css({position:"relative",
"float":"left"});inst.$elemData.css({position:"relative",overflow:"hidden",padding:inst.options.bordersize+"px"})}else{inst.$elemWrap.css({position:"relative",overflow:"hidden"});inst.$elemData.css({position:"relative","float":"left",padding:inst.options.bordersize+"px"})}}else if(inst.options.titlestyle=="inside"){inst.$elemData.css({position:"absolute",margin:inst.options.bordersize+"px",bottom:0,left:0,"background-color":"#333","background-color":"rgba(51, 51, 51, 0.6)"});if(inst.options.showonmouseoverinside)inst.$elemData.css({opacity:0});
inst.$text.css({padding:inst.options.bordersize+"px "+2*inst.options.bordersize+"px"})}else{inst.$elemData.css({position:"relative",width:"100%",height:inst.options.barautoheight?"auto":inst.options.barheight+"px","padding":"0 0 "+inst.options.bordersize+"px"+" 0","background-color":inst.options.bgcolor,"text-align":"left"});if(!inst.options.fullscreenmode||!inst.options.fullscreennomargin)inst.$text.css({"margin":"0 "+inst.options.bordersize+"px"})}if(inst.options.showsocial){var socialCode='<div id="html5-social" style="display:none;'+
inst.options.socialposition+'">';var socialBtnCSS=(inst.options.socialdirection=="horizontal"?"display:inline-block;":"display:block;")+"margin:4px;";var socialCSS="display:table-cell;width:"+inst.options.socialbuttonsize+"px;height:"+inst.options.socialbuttonsize+"px;font-size:"+inst.options.socialbuttonfontsize+"px;border-radius:50%;color:#fff;vertical-align:middle;text-align:center;cursor:pointer;padding:0;";if(inst.options.showemail)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?
" html5-rotate":"")+' html5-social-email" style="'+socialBtnCSS+'"><div class="mh-icon-mail" style="'+socialCSS+'background-color:#4d83ff;"></div></div>';if(inst.options.showfacebook)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?" html5-rotate":"")+' html5-social-facebook" style="'+socialBtnCSS+'"><div class="mh-icon-facebook" style="'+socialCSS+'background-color:#3b5998;"></div></div>';if(inst.options.showtwitter)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?
" html5-rotate":"")+' html5-social-twitter" style="'+socialBtnCSS+'"><div class="mh-icon-twitter" style="'+socialCSS+'background-color:#03b3ee;"></div></div>';if(inst.options.showpinterest)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?" html5-rotate":"")+' html5-social-pinterest" style="'+socialBtnCSS+'"><div class="mh-icon-pinterest" style="'+socialCSS+'background-color:#c92228;"></div></div>';socialCode+='<div style="clear:both;"></div></div>';inst.$lightboxBox.append(socialCode);
$(".html5-social-btn",inst.$lightbox).click(function(){var shareUrl=window.location.href+(window.location.href.indexOf("?")<0?"?":"&")+"wpcarousellightboxshare="+encodeURIComponent(inst.currentElem[ELEM_HREF]);var shareTitle=inst.currentElem[ELEM_TITLE];var shareMedia=inst.currentElem[ELEM_HREF];if(inst.currentElem[ELEM_TYPE]==0)shareMedia=inst.absoluteUrl(inst.currentElem[ELEM_HREF]);else if(inst.currentElem[ELEM_TYPE]==3)shareMedia="https://img.youtube.com/vi/"+inst.getYoutubeId(inst.currentElem[ELEM_HREF])+
"/0.jpg";else{var lightboxLink=$('.wondercarousellightbox[href="'+inst.currentElem[ELEM_HREF]+'"]');if(lightboxLink.length>0)if(lightboxLink.data("shareimage")&&lightboxLink.data("shareimage").length>0)shareMedia=inst.absoluteUrl(lightboxLink.data("shareimage"));else if(lightboxLink.data("thumbnail")&&lightboxLink.data("thumbnail").length>0)shareMedia=inst.absoluteUrl(lightboxLink.data("thumbnail"));else{var lightboxImg=$("img",lightboxLink);if(lightboxImg.length>0)shareMedia=inst.absoluteUrl(lightboxImg.attr("src"))}}var isVideo=
inst.currentElem[ELEM_TYPE]==2||inst.currentElem[ELEM_TYPE]==3||inst.currentElem[ELEM_TYPE]==4||inst.currentElem[ELEM_TYPE]==8||inst.currentElem[ELEM_TYPE]==9||inst.currentElem[ELEM_TYPE]==11||inst.currentElem[ELEM_TYPE]==12;if(!shareTitle)shareTitle="";else shareTitle=inst.html2Text(shareTitle);if($(this).hasClass("html5-social-facebook"))window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(shareUrl)+"&t="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5-social-twitter"))window.open("https://twitter.com/share?url="+
encodeURIComponent(shareUrl)+"&text="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5-social-pinterest"))window.open("https://pinterest.com/pin/create/bookmarklet/?media="+encodeURIComponent(shareMedia)+"&url="+encodeURIComponent(shareUrl)+"&description="+encodeURIComponent(shareTitle)+"&is_video="+(isVideo?"true":"false"),"_blank");else if($(this).hasClass("html5-social-email"))window.open("mailto:?subject="+encodeURIComponent(shareTitle)+"&body=Check out this: "+encodeURIComponent(shareUrl));
return false})}if(inst.options.fullscreenmode){inst.$lightbox.append("<div class='html5-next-fullscreen' style='cursor:pointer;position:absolute;right:"+inst.options.bordersize+"px;top:50%;margin-top:-16px;'><img alt='' src='"+inst.options.fullscreennextimage+"'></div>"+"<div class='html5-prev-fullscreen' style='cursor:pointer;position:absolute;left:"+inst.options.bordersize+"px;top:50%;margin-top:-16px;'><img alt='' src='"+inst.options.fullscreenprevimage+"'></div>");inst.$next=$(".html5-next-fullscreen",
inst.$lightbox);inst.$prev=$(".html5-prev-fullscreen",inst.$lightbox);inst.$lightboxBox.append("<div class='html5-next-bottom-fullscreen' style='cursor:pointer;position:absolute;top:100%;right:0;margin-top:8px;'><img alt='' src='"+inst.options.fullscreennextimage+"'></div>"+"<div class='html5-prev-bottom-fullscreen' style='cursor:pointer;position:absolute;top:100%;left:0;margin-top:8px;'><img alt='' src='"+inst.options.fullscreenprevimage+"'></div>");inst.$nextbottom=$(".html5-next-bottom-fullscreen",
inst.$lightbox);inst.$prevbottom=$(".html5-prev-bottom-fullscreen",inst.$lightbox);inst.$nextbottom.click(function(){inst.nextArrowClicked()});inst.$prevbottom.click(function(){inst.prevArrowClicked()});inst.$lightbox.append("<div id='html5-close-fullscreen' style='display:block;cursor:pointer;position:absolute;top:0;right:0;margin-top:0;margin-right:0;'><img alt='' src='"+inst.options.fullscreencloseimage+"'></div>");inst.$close=$("#html5-close-fullscreen",inst.$lightbox)}else{inst.$lightboxBox.append("<div class='html5-next' style='display:none;cursor:pointer;position:absolute;right:"+
inst.options.bordersize+"px;top:50%;margin-top:-32px;'><img alt='' src='"+inst.options.nextimage+"'></div>"+"<div class='html5-prev' style='display:none;cursor:pointer;position:absolute;left:"+inst.options.bordersize+"px;top:50%;margin-top:-32px;'><img alt='' src='"+inst.options.previmage+"'></div>");inst.$next=$(".html5-next",inst.$lightbox);inst.$prev=$(".html5-prev",inst.$lightbox);if(inst.options.isTouch&&inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows){inst.$lightboxBox.append("<div class='html5-next-touch' style='display:block;cursor:pointer;position:absolute;'><img alt='' src='"+
inst.options.nextimage+"'></div>"+"<div class='html5-prev-touch' style='display:block;cursor:pointer;position:absolute;'><img alt='' src='"+inst.options.previmage+"'></div>");inst.$nexttouch=$(".html5-next-touch",inst.$lightbox);inst.$prevtouch=$(".html5-prev-touch",inst.$lightbox);inst.$nexttouch.click(function(){inst.nextArrowClicked()});inst.$prevtouch.click(function(){inst.prevArrowClicked()})}inst.$lightboxBox.append("<div id='html5-close' style='display:none;cursor:pointer;position:absolute;top:0;right:0;margin-top:-16px;margin-right:-16px;'><img alt='' src='"+
inst.options.closeimage+"'></div>");inst.$close=$("#html5-close",inst.$lightbox)}if(inst.options.titlestyle=="inside"&&inst.options.showonmouseoverinside)inst.$lightboxBox.hover(function(){if(inst.currentElem[ELEM_TYPE]==0||!inst.options.showinsidetitleforimageonly)inst.$elemData.animate({opacity:1},400)},function(){inst.$elemData.animate({opacity:0},400)});inst.$watermark=$("#html5-watermark",inst.$lightbox);if(inst.options.stamp)inst.$watermark.html("<a href='"+inst.options.freelink+"' style='text-decoration:none;' title='jQuery Lightbox'><div style='display:block;width:170px;height:20px;text-align:center;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;color:#333;font:12px Arial,sans-serif;'><div style='line-height:20px;'>"+
inst.options.freemark+"</div></div></a>");else if(inst.options.watermark){var html="<img alt='' src='"+inst.options.watermark+"' style='border:none;' />";if(inst.options.watermarklink)html="<a href='"+inst.options.watermarklink+"' target='_blank'>"+html+"</a>";inst.$watermark.html(html)}if(inst.options.closeonoverlay)$("#html5-lightbox-overlay",inst.$lightbox).click(inst.finish);inst.$close.click(inst.finish);inst.$next.click(function(){inst.nextArrowClicked()});inst.$prev.click(function(){inst.prevArrowClicked()});
$(window).resize(function(){if(inst.options.isIOS&&!inst.options.mobileresizeevent)return;clearTimeout(inst.options.resizeTimeout);inst.options.resizeTimeout=setTimeout(function(){inst.resizeWindow()},inst.options.resizedelay)});$(window).scroll(function(){if(inst.options.isIOS&&!inst.options.mobileresizeevent)return;inst.scrollBox()});$(window).on("orientationchange",function(e){if(inst.options.isMobile)inst.resizeWindow()});if(inst.options.enabletouchswipe)inst.enableSwipe()};inst.html2Text=function(html){var tag=
document.createElement("div");tag.innerHTML=html;return tag.innerText};inst.slideTimer=function(interval,callback,updatecallback){var timerInstance=this;timerInstance.timeout=interval;var updateinterval=50;var updateTimerId=null;var runningTime=0;var paused=false;var started=false;var startedandpaused=false;this.pause=function(){if(started){paused=true;clearInterval(updateTimerId)}};this.resume=function(forceresume){if(startedandpaused&&!forceresume)return;startedandpaused=false;if(started&&paused){paused=
false;updateTimerId=setInterval(function(){runningTime+=updateinterval;if(runningTime>timerInstance.timeout){clearInterval(updateTimerId);if(callback)callback()}if(updatecallback)updatecallback(runningTime/timerInstance.timeout)},updateinterval)}};this.stop=function(){clearInterval(updateTimerId);if(updatecallback)updatecallback(-1);runningTime=0;paused=false;started=false};this.start=function(){runningTime=0;paused=false;started=true;updateTimerId=setInterval(function(){runningTime+=updateinterval;
if(runningTime>timerInstance.timeout){clearInterval(updateTimerId);if(callback)callback()}if(updatecallback)updatecallback(runningTime/timerInstance.timeout)},updateinterval)};this.startandpause=function(){runningTime=0;paused=true;started=true;startedandpaused=true};return this};inst.updateTimer=function(percent){var w=Math.round(percent*100);if(w>100)w=100;if(w<0)w=0;$(".html5-timer",inst.$lightbox).css({display:"block",width:w+"%"})};inst.initSlide=function(){inst.autosliding=false;inst.slideTimeout=
inst.slideTimer(inst.options.slideinterval,function(){inst.gotoSlide(-1)},inst.options.showtimer?function(percent){inst.updateTimer(percent)}:null);if(inst.options.autoslide){inst.slideTimeout.stop();inst.autosliding=true}};inst.nextArrowClicked=function(){if(inst.options.nextElem<=inst.options.curElem)if(inst.options.onlastarrowclicked&&window[inst.options.onlastarrowclicked]&&typeof window[inst.options.onlastarrowclicked]=="function")window[inst.options.onlastarrowclicked]();inst.gotoSlide(-1)};
inst.prevArrowClicked=function(){if(inst.options.prevElem>=inst.options.curElem)if(inst.options.onfirstarrowclicked&&window[inst.options.onfirstarrowclicked]&&typeof window[inst.options.onfirstarrowclicked]=="function")window[inst.options.onfirstarrowclicked]();inst.gotoSlide(-2)};inst.calcNextPrevElem=function(){inst.options.nextElem=-1;inst.options.prevElem=-1;inst.options.inGroup=false;inst.options.groupIndex=0;inst.options.groupCount=0;var group=inst.elemArray[inst.options.curElem][ELEM_GROUP];
for(var i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP])){if(i==inst.options.curElem)inst.options.groupIndex=inst.options.groupCount;inst.options.groupCount++}var j,curGroup=inst.elemArray[inst.options.curElem][ELEM_GROUP];if(curGroup!=undefined&&curGroup!=null){for(j=inst.options.curElem+1;j<inst.elemArray.length;j++)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.nextElem=j;break}if(inst.options.nextElem<0)for(j=0;j<inst.options.curElem;j++)if(inst.matchGroup(curGroup,
inst.elemArray[j][ELEM_GROUP])){inst.options.nextElem=j;break}if(inst.options.nextElem>=0){for(j=inst.options.curElem-1;j>=0;j--)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.prevElem=j;break}if(inst.options.prevElem<0)for(j=inst.elemArray.length-1;j>inst.options.curElem;j--)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.prevElem=j;break}}}if(inst.options.nextElem>=0||inst.options.prevElem>=0)inst.options.inGroup=true};inst.calcBoxPosition=function(initW,
initH){var boxW=initW+2*inst.options.bordersize;var boxH=initH+2*inst.options.bordersize;var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var winH=$(window).height();var boxT=Math.round((winH-navH)/2-boxH/2);if(inst.options.titlestyle=="bottom")boxT-=Math.round(inst.options.barheight/2);var topmargin=$(window).height()<inst.options.smallscreenheight?inst.options.bordertopmarginsmall:inst.options.bordertopmargin;if(boxT<topmargin)boxT=topmargin;if(inst.options.insideiframe&&
window.self!=window.top)if(parent.window.jQuery&&parent.window.jQuery("#"+inst.options.iframeid).length){var iframetop=parent.window.jQuery("#"+inst.options.iframeid).offset().top;var parentscroll=parent.window.document.body.scrollTop;boxT=topmargin;boxT+=parentscroll>iframetop?parentscroll-iframetop:0}return[boxW,boxH,boxT]};inst.hideNavArrows=function(){var showPrev=false;var showNext=false;if(inst.options.inGroup){if(inst.options.arrowloop||!inst.options.arrowloop&&inst.options.prevElem<inst.options.curElem)showPrev=
true;if(inst.options.arrowloop||!inst.options.arrowloop&&inst.options.nextElem>inst.options.curElem)showNext=true}if(showPrev){inst.$prev.removeClass("html5-hide");if(inst.$prevbottom)inst.$prevbottom.removeClass("html5-hide");if(inst.$prevtouch)inst.$prevtouch.removeClass("html5-hide")}else{inst.$prev.addClass("html5-hide");if(inst.$prevbottom)inst.$prevbottom.addClass("html5-hide");if(inst.$prevtouch)inst.$prevtouch.addClass("html5-hide")}if(showNext){inst.$next.removeClass("html5-hide");if(inst.$nextbottom)inst.$nextbottom.removeClass("html5-hide");
if(inst.$nexttouch)inst.$nexttouch.removeClass("html5-hide")}else{inst.$next.addClass("html5-hide");if(inst.$nextbottom)inst.$nextbottom.addClass("html5-hide");if(inst.$nexttouch)inst.$nexttouch.addClass("html5-hide")}};inst.clickHandler=function(){var $this=$(this);var dataoptions={};$.each($this.data(),function(key,value){dataoptions[key.toLowerCase()]=value});inst.options=$.extend(inst.options,inst.defaultoptions,dataoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();if(inst.elemArray.length<=
0)return true;inst.hideObjects();for(var i=0;i<inst.elemArray.length;i++)if(inst.elemArray[i][ELEM_HREF]==$this.attr("href"))break;if(i==inst.elemArray.length)return true;inst.options.curElem=i;inst.calcNextPrevElem();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];if(inst.options.iequirksmode)inst.$lightboxBox.css({"top":boxT});else inst.$lightboxBox.css({"margin-top":boxT});
if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadCurElem();return false};inst.loadThumbnail=function(src,index,title){var imgLoader=new Image;$(imgLoader).on("load",function(){var style;if(this.width/this.height<=inst.options.thumbwidth/inst.options.thumbheight)style="width:100%;";else style="height:100%;";$(".html5-nav-thumb").eq(index).html("<img alt='"+
inst.html2Text(title)+"' style='"+style+"' src='"+src+"' />")});imgLoader.src=src};inst.matchGroup=function(curGroup,elemGroup){if(inst.options.showall)return true;if(!curGroup||!elemGroup)return false;var curs=curGroup.split(":");var elems=elemGroup.split(":");var result=false;for(var i in curs)if($.inArray(curs[i],elems)>-1){result=true;break}return result};inst.showNavigation=function(){if(!inst.options.shownavigation)return;if(!inst.currentElem||!inst.currentElem[ELEM_GROUP])return;var i;var showNav=
false;var group=inst.currentElem[ELEM_GROUP];for(i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP]))if(inst.elemArray[i][ELEM_THUMBNAIL]&&inst.elemArray[i][ELEM_THUMBNAIL].length>0){showNav=true;break}if(!showNav)return;inst.options.navheight=inst.options.thumbheight+inst.options.thumbtopmargin+inst.options.thumbbottommargin;if($(".html5-nav").length>0)return;var posCss=inst.options.hidenavdefault?"top:100%;bottom:auto;left:0;right:0;":"top:auto;bottom:0;left:0;right:0;";
var posType=inst.options.positionFixed?"fixed":"absolute";$("body").append("<div class='html5-nav' style='display:block;position:"+posType+";"+posCss+"width:100%;height:"+inst.options.navheight+"px;z-index:9999999;"+(inst.options.navbgcolor?"background-color:"+inst.options.navbgcolor+";":"")+"'>"+"<div class='html5-nav-container' style='position:relative;margin:"+inst.options.thumbtopmargin+"px auto "+inst.options.thumbbottommargin+"px;'>"+"<div class='html5-nav-prev' style='display:block;position:absolute;cursor:pointer;width:"+
inst.options.navbuttonwidth+'px;height:100%;left:0;top:0;background:url("'+inst.options.navarrowsprevimage+"\") no-repeat left center;'></div>"+"<div class='html5-nav-mask' style='display:block;position:relative;margin:0 auto;overflow:hidden;'>"+"<div class='html5-nav-list'></div>"+"</div>"+"<div class='html5-nav-next' style='display:block;position:absolute;cursor:pointer;width:"+inst.options.navbuttonwidth+'px;height:100%;right:0;top:0;background:url("'+inst.options.navarrowsnextimage+"\") no-repeat right center;'></div>"+
"</div>"+"</div>");inst.navvisible=inst.options.hidenavdefault?false:true;if(inst.options.shownavcontrol){$(".html5-nav").append('<div class="html5-nav-showcontrol" style="position:absolute;display:block;cursor:pointer;bottom:100%;right:12px;margin:0;padding:0;"><img alt="" src="'+inst.options.navcontrolimage+'"></div>');$(".html5-nav-showcontrol").click(function(){var winH=$(window).height();var navH=$(".html5-nav").height();if(inst.navvisible){inst.navvisible=false;$(".html5-nav").css({top:winH-
navH+"px",bottom:"auto"}).animate({top:winH+"px"},function(){$(this).css({top:"100%",bottom:"auto"})})}else{inst.navvisible=true;var navH=$(".html5-nav").height();$(".html5-nav").css({top:winH+"px",bottom:"auto"}).animate({top:winH-navH+"px"},function(){$(this).css({top:"auto",bottom:0})})}inst.resizeWindow()})}var index=0;for(i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP]))if(inst.elemArray[i][ELEM_THUMBNAIL]&&inst.elemArray[i][ELEM_THUMBNAIL].length>0){$(".html5-nav-list").append("<div class='html5-nav-thumb' data-arrayindex='"+
i+"' style='float:left;overflow:hidden;cursor:pointer;opacity:"+inst.options.thumbopacity+";margin: 0 "+inst.options.thumbgap/2+"px;width:"+inst.options.thumbwidth+"px;height:"+inst.options.thumbheight+"px;border:"+inst.options.thumbborder+"px solid "+inst.options.thumbbordercolor+";'></div>");this.loadThumbnail(inst.elemArray[i][ELEM_THUMBNAIL],index,inst.elemArray[i][ELEM_TITLE]);index++}$(".html5-nav-thumb").hover(function(){$(this).css({opacity:1});$(this).css({border:inst.options.thumbborder+
"px solid "+inst.options.thumbhighlightbordercolor})},function(){$(this).css({opacity:inst.options.thumbopacity});$(this).css({border:inst.options.thumbborder+"px solid "+inst.options.thumbbordercolor})});$(".html5-nav-thumb").click(function(){var index=$(this).data("arrayindex");if(index>=0)inst.gotoSlide(index)});inst.options.totalwidth=index*(inst.options.thumbgap+inst.options.thumbwidth+2*inst.options.thumbborder);$(".html5-nav-list").css({display:"block",position:"relative","margin-left":0,width:inst.options.totalwidth+
"px"}).append("<div style='clear:both;'></div>");var $navMask=$(".html5-nav-mask");var $navPrev=$(".html5-nav-prev");var $navNext=$(".html5-nav-next");$navPrev.click(function(){var $navList=$(".html5-nav-list");var $navNext=$(".html5-nav-next");var winWidth=$(window).width();var maskWidth=winWidth-2*inst.options.navbuttonwidth;var marginLeft=parseInt($navList.css("margin-left"))+maskWidth;if(marginLeft>=0){marginLeft=0;$(this).css({"background-position":"center left"})}else $(this).css({"background-position":"center right"});
if(marginLeft<=maskWidth-inst.options.totalwidth)$navNext.css({"background-position":"center left"});else $navNext.css({"background-position":"center right"});$navList.animate({"margin-left":marginLeft})});$navNext.click(function(){var $navList=$(".html5-nav-list");var $navPrev=$(".html5-nav-prev");var winWidth=$(window).width();var maskWidth=winWidth-2*inst.options.navbuttonwidth;var marginLeft=parseInt($navList.css("margin-left"))-maskWidth;if(marginLeft<=maskWidth-inst.options.totalwidth){marginLeft=
maskWidth-inst.options.totalwidth;$(this).css({"background-position":"center left"})}else $(this).css({"background-position":"center right"});if(marginLeft>=0)$navPrev.css({"background-position":"center left"});else $navPrev.css({"background-position":"center right"});$navList.animate({"margin-left":marginLeft})});var winWidth=$(window).width();if(inst.options.totalwidth<=winWidth){$navMask.css({width:inst.options.totalwidth+"px"});$navPrev.hide();$navNext.hide()}else{$navMask.css({width:winWidth-
2*inst.options.navbuttonwidth+"px"});$navPrev.show();$navNext.show()}};inst.loadElem=function(elem){inst.currentElem=elem;inst.showing=true;if(inst.options.bodynoscroll)$("html,body").addClass("bodynoscroll");if(!(inst.options.showtitle&&inst.currentElem[ELEM_TITLE]&&inst.currentElem[ELEM_TITLE].length>0||inst.options.showdescription&&inst.currentElem[ELEM_DESCRIPTION]&&inst.currentElem[ELEM_DESCRIPTION].length>0||inst.options.inGroup&&(inst.options.showplaybutton||inst.options.showtitleprefix)))inst.options.barheight=
0;inst.showNavigation();inst.$elem.off("mouseenter").off("mouseleave").off("mousemove");inst.$loading.show();if(inst.options.onshowitem&&window[inst.options.onshowitem]&&typeof window[inst.options.onshowitem]=="function")window[inst.options.onshowitem](elem);if(inst.options.transition=="slide"&&inst.existingElem>=0){$(".html5-elem-box-previous").remove();var newitem=inst.$elem.clone();newitem.insertAfter(inst.$elem);inst.$prevelem=inst.$elem;inst.$elem=newitem;inst.$prevelem.addClass("html5-elem-box-previous");
inst.$elem.addClass("html5-elem-box-current");inst.$elemWrap=$(".html5-elem-wrap",inst.$elem);inst.$loading=$(".html5-loading",inst.$elem);inst.$error=$(".html5-error-box",inst.$elem);inst.$image=$(".html5-image",inst.$elem);inst.$elemData=$(".html5-elem-data-box",inst.$elem);inst.$text=$(".html5-text",inst.$elem);inst.$elem.css({position:"absolute",top:0,left:inst.direction==-1?"100%":"-100%",opacity:0,height:"auto"});inst.$prevelem.css({width:inst.$prevelem.width()+"px",height:inst.$prevelem.height()+
"px"})}switch(elem[ELEM_TYPE]){case 0:var imgLoader=new Image;$(imgLoader).on("load",function(){elem[ELEM_ORIGINALWIDTH]=imgLoader.width;elem[ELEM_ORIGINALHEIGHT]=imgLoader.height;inst.showImage(elem,imgLoader.width,imgLoader.height)});$(imgLoader).on("error",function(){inst.showError()});imgLoader.src=elem[ELEM_HREF];break;case 1:inst.showSWF(elem);break;case 2:case 8:inst.showVideo(elem);break;case 3:case 4:case 9:case 11:case 12:inst.showYoutubeVimeo(elem);break;case 5:inst.showPDF(elem);break;
case 6:inst.showMP3(elem);break;case 7:inst.showWeb(elem);break;case 10:inst.showDiv(elem);break}if(inst.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Lightbox","Open",elem[ELEM_HREF]]);if(inst.options.preload){if(inst.options.nextElem>=0&&inst.elemArray[inst.options.nextElem][ELEM_TYPE]==0)(new Image).src=inst.elemArray[inst.options.nextElem][ELEM_HREF];if(inst.options.prevElem>=0&&inst.elemArray[inst.options.prevElem][ELEM_TYPE]==0)(new Image).src=inst.elemArray[inst.options.prevElem][ELEM_HREF]}};
inst.loadCurElem=function(){inst.loadElem(inst.elemArray[inst.options.curElem])};inst.showError=function(){inst.$loading.hide();inst.resizeLightbox(inst.options.errorwidth,inst.options.errorheight,true,function(){inst.$loading.hide();inst.$error.show();inst.$elem.fadeIn(inst.options.fadespeed,function(){inst.showData()})})};inst.calcTextWidth=function(objW){return objW-36};inst.showTitle=function(w,t,description){if(inst.options.titlestyle=="inside")inst.$elemData.css({width:w+"px"});var text="";
if(inst.options.showtitle)if(t&&t.length>0)text+=t;if(inst.options.inGroup){if(inst.options.showtitleprefix)text="<span class='html5-title-prefix'>"+inst.options.titleprefix.replace("%NUM",inst.options.groupIndex+1).replace("%TOTAL",inst.options.groupCount)+"</span> <span class='html5-title-caption'>"+text+"</span>";if(inst.options.showplaybutton)text="<div class='html5-playpause' style='display:inline-block;cursor:pointer;vertical-align:middle;'><div class='html5-play' style='display:block;'><img alt='' src='"+
inst.options.playimage+"'></div><div class='html5-pause' style='display:none;'><img alt='' src='"+inst.options.pauseimage+"'></div></div> "+text}if(text.length>0)text='<div class="html5-title">'+text+"</div>";if(inst.options.showdescription&&description&&description.length>0)text+='<div class="html5-description">'+description+"</div>";inst.$text.html(text);if(inst.options.inGroup&&inst.options.showplaybutton){if(inst.autosliding){$(".html5-play",inst.$lightbox).hide();$(".html5-pause",inst.$lightbox).show()}else{$(".html5-play",
inst.$lightbox).show();$(".html5-pause",inst.$lightbox).hide()}$(".html5-play",inst.$lightbox).click(function(){$(".html5-play",inst.$lightbox).hide();$(".html5-pause",inst.$lightbox).show();if(inst.slideTimeout){inst.slideTimeout.stop();inst.slideTimeout.start();inst.autosliding=true}});$(".html5-pause",inst.$lightbox).click(function(){$(".html5-play",inst.$lightbox).show();$(".html5-pause",inst.$lightbox).hide();if(inst.slideTimeout){inst.slideTimeout.stop();inst.autosliding=false}})}$("#html5-social",
inst.$lightbox).show();if(inst.options.showsocialmedia)if(inst.currentElem[ELEM_SOCIALMEDIA])if($("#html5-socialmedia",inst.$lightboxBox).length>0)$("#html5-socialmedia",inst.$lightboxBox).html(inst.currentElem[ELEM_SOCIALMEDIA]);else inst.$lightboxBox.append('<div id="html5-socialmedia" style="'+inst.options.socialmediaposition+'">'+inst.currentElem[ELEM_SOCIALMEDIA]+"</div>");else if($("#html5-socialmedia",inst.$lightboxBox).length>0)$("#html5-socialmedia",inst.$lightboxBox).remove()},inst.showImage=
function(elem,imgW,imgH){var elemW,elemH;if(elem[ELEM_WIDTH])elemW=elem[ELEM_WIDTH];else{elemW=imgW;elem[ELEM_WIDTH]=imgW}if(elem[ELEM_HEIGHT])elemH=elem[ELEM_HEIGHT];else{elemH=imgH;elem[ELEM_HEIGHT]=imgH}var sizeObj=inst.calcElemSize({w:elemW,h:elemH},inst.options.imagekeepratio);inst.resizeLightbox(sizeObj.w,sizeObj.h,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);var timercode=!inst.options.showtimer||!inst.options.inGroup?"":"<div class='html5-timer' style='display:none;position:absolute;"+
inst.options.timerposition+":0;left:0;width:0;height:"+inst.options.timerheight+"px;background-color:"+inst.options.timercolor+";opacity:"+inst.options.timeropacity+";'></div>";inst.$image.hide();inst.$image.html("<div class='html5-image-container' style='display:block;position:relative;width:100%;height:100%;"+(inst.options.imagekeepratio?"overflow:hidden;":"overflow:auto;")+"'><img alt='"+inst.html2Text(elem[ELEM_TITLE])+"' src='"+elem[ELEM_HREF]+"' width='100%' height='"+(inst.options.imagekeepratio?
"100%":"auto")+"' />"+timercode+"</div>");inst.$image.fadeIn(inst.options.fadespeed);inst.showData();if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.showSWF=function(elem){var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();
inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-swf' style='display:block;width:100%;height:100%;'></div>").show();inst.embedFlash($(".html5lightbox-swf",inst.$image),elem[ELEM_HREF],"window",{width:dataW,height:dataH});inst.$elem.show();inst.showData();if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.showVideo=function(elem){inst.slideTimeout.stop();var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;
var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-video' style='display:block;width:100%;height:100%;overflow:hidden;background-color:"+inst.options.videobgcolor+";'></div>").show();var isHTML5=false;if(inst.options.isIE678||
elem[ELEM_TYPE]==8||inst.options.isIE9&&inst.options.useflashonie9||inst.options.isIE10&&inst.options.useflashonie10||inst.options.isIE11&&inst.options.useflashonie11)isHTML5=false;else if(inst.options.isMobile)isHTML5=true;else if((inst.options.html5player||!inst.options.flashInstalled)&&inst.options.html5VideoSupported){isHTML5=true;if(inst.options.isFirefox||inst.options.isOpera)if(!elem[ELEM_HREF_WEBM]&&!elem[ELEM_HREF_OGG]&&(!inst.options.canplaymp4||inst.options.useflashformp4onfirefox))isHTML5=
false}if(isHTML5){var videoSrc=elem[ELEM_HREF];if(inst.options.isFirefox||inst.options.isOpera)if(elem[ELEM_HREF_WEBM])videoSrc=elem[ELEM_HREF_WEBM];else if(elem[ELEM_HREF_OGG])videoSrc=elem[ELEM_HREF_OGG];inst.embedHTML5Video($(".html5lightbox-video",inst.$image),videoSrc,inst.options.autoplay,inst.options.loopvideo)}else{var videoFile=elem[ELEM_HREF];if(videoFile.charAt(0)!="/"&&videoFile.substring(0,5)!="http:"&&videoFile.substring(0,6)!="https:")videoFile=inst.options.htmlfolder+videoFile;inst.embedFlash($(".html5lightbox-video",
inst.$image),inst.options.jsfolder+"html5boxplayer.swf","transparent",{width:dataW,height:dataH,jsobjectname:"html5Lightbox",hidecontrols:inst.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:videoFile,hdfile:"",ishd:"0",defaultvolume:inst.options.defaultvideovolume,autoplay:inst.options.autoplay?"1":"0",loop:inst.options.loopvideo?"1":"0",errorcss:".html5box-error"+inst.options.errorcss,id:0})}inst.$elem.show();inst.showData()})};inst.loadNext=function(){$(window).trigger("html5lightbox.videofinished");
if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)};inst.getYoutubeParams=function(href){var result={};if(href.indexOf("?")<0)return result;var params=href.substring(href.indexOf("?")+1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2&&value[0].toLowerCase()!="v")result[value[0].toLowerCase()]=value[1]}return result};inst.getYoutubeId=function(href){var youtubeId=
"";var regExp=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\??v?=?))([^#\&\?]*).*/;var match=href.match(regExp);if(match&&match[7]&&match[7].length==11)youtubeId=match[7];return youtubeId};inst.prepareYoutubeHref=function(href){var youtubeId=inst.getYoutubeId(href);var protocol="https:";var result=protocol+"//www.youtube.com/embed/"+youtubeId;var params=this.getYoutubeParams(href);var first=true;for(var key in params){if(first){result+="?";first=false}else result+="&";result+=key+"="+params[key]}return result};
inst.prepareDailymotionHref=function(href){if(href.match(/\:\/\/.*(dai\.ly)/i)){var protocol="https:";var id=href.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];href=protocol+"//www.dailymotion.com/embed/video/"+id}return href};inst.showYoutubeVimeo=function(elem){inst.slideTimeout.stop();var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=
sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-video' style='display:block;width:100%;height:100%;overflow:hidden;'></div>").show();var href=elem[ELEM_HREF];var youtubeid="";if(elem[ELEM_TYPE]==3){youtubeid=inst.getYoutubeId(href);href=inst.prepareYoutubeHref(href)}if(elem[ELEM_TYPE]==9)href=inst.prepareDailymotionHref(href);if(inst.options.autoplay){href+=
href.indexOf("?")<0?"?":"&";if(elem[ELEM_TYPE]==11)href+="autoPlay=true";else href+="autoplay=1"}if(inst.options.loopvideo){href+=href.indexOf("?")<0?"?":"&";switch(elem[ELEM_TYPE]){case 3:href+="loop=1&playlist="+youtubeid;break;case 4:case 9:href+="loop=1";break;case 11:href+="endVideoBehavior=loop";break}}if(elem[ELEM_TYPE]==3){if(href.indexOf("?")<0)href+="?wmode=transparent&rel=0";else href+="&wmode=transparent&rel=0";if(inst.options.videohidecontrols)href+="&controls=0&showinfo=0";href+="&enablejsapi=1&origin="+
document.location.protocol+"//"+document.location.hostname}else if(elem[ELEM_TYPE]==4){href+=href.indexOf("?")<0?"?":"&";href+="api=1&player_id=html5boxiframevideo"+inst.options.curElem}$(".html5lightbox-video",inst.$image).html("<iframe style='margin:0;padding:0;border:0;' class='html5boxiframevideo' id='html5boxiframevideo"+inst.options.curElem+"' width='100%' height='100%' src='"+href+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");inst.$elem.show();inst.showData();
if(elem[ELEM_TYPE]==3&&typeof YT==="object"&&typeof YT.Player==="function")inst.ytplayer=new YT.Player("html5boxiframevideo"+inst.options.curElem,{events:{"onStateChange":function(event){if(event.data==YT.PlayerState.ENDED){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)}}}});else if(elem[ELEM_TYPE]==4&&typeof $f==="function"){var vimeoIframe=$("#html5boxiframevideo"+
inst.options.curElem)[0];inst.vimeoPlayer=$f(vimeoIframe);inst.vimeoPlayer.addEvent("ready",function(){inst.vimeoPlayer.addEvent("finish",function(id){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)})})}})};inst.showPDF=function(elem){if(inst.options.enablepdfjs){if(inst.options.isIPhone&&inst.options.openpdfinnewtaboniphone||inst.options.isIPad&&inst.options.openpdfinnewtabonipad){var win=
window.open(elem[ELEM_HREF],"_blank");win.focus();inst.finish();return}if(!inst.options.pdfjsengine)inst.options.pdfjsengine=inst.options.jsfolder+"pdfjs/web/viewer.html";var href=elem[ELEM_HREF];if(href.substring(0,5)!="http:"&&href.substring(0,6)!="https:")href=inst.absoluteUrl(href);var pdfelem=jQuery.extend(true,{},elem);pdfelem[ELEM_HREF]=inst.options.pdfjsengine+(inst.options.pdfjsengine.indexOf("?")<0?"?":"&")+"file="+encodeURIComponent(href);inst.showWeb(pdfelem)}else if(inst.options.isIPhone||
inst.options.isIPad||inst.options.isAndroid||inst.options.isIE||inst.options.isIE11){var win=window.open(elem[ELEM_HREF],"_blank");win.focus();inst.finish();return}else inst.showWeb(elem)};inst.showMP3=function(elem){};inst.showDiv=function(elem){var winWidth=$(window).width();var winH=$(window).height();var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;
var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},false);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-div' id='html5lightbox-div"+inst.options.curElem+"' style='display:block;width:100%;height:"+(inst.options.autoresizecontent?
"auto":"100%")+";"+(inst.options.isIOS?"-webkit-overflow-scrolling:touch;overflow-y:scroll;":"overflow:auto;")+"'></div>").show();var divID=elem[ELEM_HREF];if($(divID).length>0)$(divID).children().appendTo($("#html5lightbox-div"+inst.options.curElem,inst.$image));else $("#html5lightbox-div"+inst.options.curElem,inst.$image).html("<div class='html5-error'>The specified div ID does not exist.</div>");inst.$elem.show();inst.showData();if(inst.options.autoresizecontent)inst.resizeWindow();if(inst.autosliding){inst.slideTimeout.stop();
inst.slideTimeout.start()}})};inst.isSameDomain=function(href){if(href.substring(0,5)!="http:"&&href.substring(0,6)!="https:")return true;var link=document.createElement("a");link.setAttribute("href",href);var result=link.protocol==document.location.protocol&&link.host==document.location.host&&link.port==document.location.port;link=null;return result};inst.showWeb=function(elem){var winWidth=$(window).width();var winH=$(window).height();var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:
0;var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},false);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-web' style='display:block;width:100%;height:100%;"+
(inst.options.isIOS?"-webkit-overflow-scrolling:touch;overflow-y:scroll;":"")+"'></div>").show();$(".html5lightbox-web",inst.$image).html("<iframe style='margin:0;padding:0;border:0;' class='html5lightbox-web-iframe' width='100%' height='100%' src='"+elem[ELEM_HREF]+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");inst.$elem.show();inst.showData();if(inst.options.autoresizecontent&&inst.isSameDomain(elem[ELEM_HREF])){$(".html5lightbox-web-iframe",inst.$image).data("sameorigin",
true);$(".html5lightbox-web-iframe",inst.$image).on("load",function(){$(this).data("sameoriginloaded",true);inst.resizeWindow()})}if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.scrollBox=function(){};inst.resizeWindow=function(){if(!inst.currentElem)return;if(!inst.options.responsive)return;var winWidth=$(window).width();var winH=$(window).height();if(inst.options.responsivebarheight){if(winH<=inst.options.smallscreenheight)inst.options.barheight=inst.options.barheightonsmallheight;
else inst.options.barheight=inst.options.barheightoriginal;if(inst.options.titlestyle=="bottom"&&inst.options.barautoheight!="auto")inst.$elemData.css({height:inst.options.barheight+"px","max-height":inst.options.barheight+"px"})}if(!(inst.options.showtitle&&inst.currentElem[ELEM_TITLE]&&inst.currentElem[ELEM_TITLE].length>0||inst.options.showdescription&&inst.currentElem[ELEM_DESCRIPTION]&&inst.currentElem[ELEM_DESCRIPTION].length>0||inst.options.inGroup&&(inst.options.showplaybutton||inst.options.showtitleprefix)))inst.options.barheight=
0;var elemW,elemH,keepratio;if(inst.currentElem[ELEM_TYPE]==5||inst.currentElem[ELEM_TYPE]==7||inst.currentElem[ELEM_TYPE]==10){var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;elemW=inst.currentElem[ELEM_WIDTH]?inst.currentElem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;elemH=inst.currentElem[ELEM_HEIGHT]?inst.currentElem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;keepratio=false}else{elemW=
inst.currentElem[ELEM_WIDTH]?inst.currentElem[ELEM_WIDTH]:inst.options.defaultwidth;elemH=inst.currentElem[ELEM_HEIGHT]?inst.currentElem[ELEM_HEIGHT]:inst.options.defaultheight;if(inst.currentElem[ELEM_TYPE]==0)keepratio=inst.options.imagekeepratio;else keepratio=true}var sizeObj=inst.calcElemSize({w:elemW,h:elemH},keepratio);var boxPos=inst.calcBoxPosition(sizeObj.w,sizeObj.h);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle==
"left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}if(inst.options.titlestyle=="inside")inst.$elemData.css({width:sizeObj.w+"px"});if(inst.options.autoresizecontent&&(inst.currentElem[ELEM_TYPE]==5||inst.currentElem[ELEM_TYPE]==7||inst.currentElem[ELEM_TYPE]==10)){var resizeHeight=false;if(inst.currentElem[ELEM_TYPE]==7&&$(".html5lightbox-web-iframe",
inst.$lightbox).length>0&&$(".html5lightbox-web-iframe",inst.$lightbox).data("sameoriginloaded")){var iframe=$(".html5lightbox-web-iframe",inst.$lightbox)[0];if(iframe&&iframe.contentWindow&&iframe.contentWindow.document&&iframe.contentWindow.document.documentElement.offsetHeight)if(elemH>iframe.contentWindow.document.documentElement.offsetHeight){elemH=iframe.contentWindow.document.documentElement.offsetHeight;resizeHeight=true}}else if(inst.currentElem[ELEM_TYPE]==10&&$(".html5lightbox-div",inst.$lightbox).length>
0){var divH=$(".html5lightbox-div",inst.$lightbox).height();if(elemH>divH){elemH=divH;resizeHeight=true}}if(resizeHeight){sizeObj=inst.calcElemSize({w:elemW,h:elemH},keepratio);boxPos=inst.calcBoxPosition(sizeObj.w,sizeObj.h);boxW=boxPos[0];boxH=boxPos[1];boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"height":boxH});else{inst.$lightboxBox.css({"height":"auto"});inst.$elemWrap.css({"height":boxH})}}}if($(".html5-nav").length<=
0)return;$(".html5-nav-list").css({"margin-left":0});var $navMask=$(".html5-nav-mask");var $navPrev=$(".html5-nav-prev");var $navNext=$(".html5-nav-next");var winWidth=$(window).width();if(inst.options.totalwidth<=winWidth){$navMask.css({width:inst.options.totalwidth+"px"});$navPrev.hide();$navNext.hide()}else{$navMask.css({width:winWidth-2*inst.options.navbuttonwidth+"px"});$navPrev.show();$navNext.show()}};inst.calcElemSize=function(sizeObj,keepratio){if(!inst.options.responsive)return sizeObj;
var winWidth=$(window).width();winWidth=winWidth?winWidth:$(document).width();var winH=$(window).height();winH=winH?winH:$(document).height();if((inst.options.titlestyle=="left"||inst.options.titlestyle=="right")&&winWidth>inst.options.sidetobottomscreenwidth)sizeObj.w=sizeObj.w*100/inst.options.imagepercentage;var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var topmargin=$(window).height()<inst.options.smallscreenheight?inst.options.bordertopmarginsmall:inst.options.bordertopmargin;
var h0=winH-navH-2*inst.options.bordersize-2*topmargin;if(inst.options.titlestyle=="bottom")h0-=inst.options.barheight;var w0=winWidth-2*inst.options.bordersize-2*inst.options.bordermargin;if(inst.options.fullscreenmode&&winWidth>inst.options.navarrowsbottomscreenwidth||(inst.options.isTouch&&inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows)&&winWidth>inst.options.navarrowsbottomscreenwidth)w0-=64;if((inst.options.titlestyle=="left"||inst.options.titlestyle=="right")&&winWidth<=
inst.options.sidetobottomscreenwidth||inst.options.notkeepratioonsmallheight&&winH<=inst.options.smallscreenheight)keepratio=false;if(inst.currentElem[ELEM_TYPE]==0&&keepratio){var ratio=inst.currentElem[ELEM_ORIGINALWIDTH]/inst.currentElem[ELEM_ORIGINALHEIGHT];sizeObj.h=Math.round(sizeObj.w/ratio);if(sizeObj.h>h0){sizeObj.w=Math.round(ratio*h0);sizeObj.h=h0}if(sizeObj.w>w0){sizeObj.h=Math.round(w0/ratio);sizeObj.w=w0}}else{if(sizeObj.h>h0){if(keepratio)sizeObj.w=Math.round(sizeObj.w*h0/sizeObj.h);
sizeObj.h=h0}else if(inst.options.maxheight)sizeObj.h=h0;if(sizeObj.w>w0){if(keepratio)sizeObj.h=Math.round(sizeObj.h*w0/sizeObj.w);sizeObj.w=w0}}return sizeObj};inst.showData=function(){if(inst.$text.text().length>0)inst.$elemData.show();if(inst.options.titlestyle=="bottom"||inst.options.titlestyle=="inside")inst.$lightboxBox.css({height:"auto"});if(inst.$text.text().length>0&&inst.options.titlestyle=="bottom")inst.$elemData.css({"max-height":inst.options.barheight+"px"});if(inst.options.positionFixed)$("#html5-lightbox-overlay",
inst.$lightbox).css({height:Math.max($(window).height(),$(document).height())});else $("#html5-lightbox-overlay",inst.$lightbox).css({height:"100%"});$(window).trigger("html5lightbox.lightboxopened")};inst.resizeLightbox=function(elemW,elemH,bAnimate,onFinish){inst.hideNavArrows();var boxPos=inst.calcBoxPosition(elemW,elemH);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$loading.hide();inst.$watermark.hide();if(inst.options.nextElem<=inst.options.curElem)if(inst.options.onlastitem&&
window[inst.options.onlastitem]&&typeof window[inst.options.onlastitem]=="function")window[inst.options.onlastitem](inst.currentElem);if(inst.options.prevElem>=inst.options.curElem)if(inst.options.onfirstitem&&window[inst.options.onfirstitem]&&typeof window[inst.options.onfirstitem]=="function")window[inst.options.onfirstitem](inst.currentElem);if(!inst.options.fullscreenmode&&(!inst.options.isTouch||!inst.options.navarrowsalwaysshowontouch)&&!inst.options.alwaysshownavarrows){inst.$lightboxBox.on("mouseenter mousemove",
function(){if(inst.options.arrowloop&&inst.options.prevElem>=0||!inst.options.arrowloop&&inst.options.prevElem>=0&&inst.options.prevElem<inst.options.curElem)inst.$prev.fadeIn();if(inst.options.arrowloop&&inst.options.nextElem>=0||!inst.options.arrowloop&&inst.options.nextElem>=0&&inst.options.nextElem>inst.options.curElem)inst.$next.fadeIn()});inst.$lightboxBox.on("mouseleave",function(){inst.$next.fadeOut();inst.$prev.fadeOut()})}var existingBoxT=parseInt(inst.$lightboxBox.css("margin-top"));inst.$lightboxBox.css({"margin-top":boxT});
var speed=bAnimate?inst.options.resizespeed:0;if(inst.options.fullscreenmode)speed=0;if(inst.options.transition=="slide"&&inst.existingElem>=0)speed=0;if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right"){if(boxW==inst.$lightboxBox.width()&&boxH==inst.$lightboxBox.height())speed=0;inst.$lightboxBox.animate({width:boxW},speed).animate({height:boxH},speed,function(){inst.onAnimateFinish(onFinish)})}else{if(boxW==inst.$elemWrap.width()&&boxH==inst.$elemWrap.height())speed=0;inst.$lightboxBox.css({"width":boxW,
"height":"auto"});if(inst.options.transition=="slide"&&inst.existingElem>=0)if($(".html5-elem-box-previous",inst.$lightbox).length>0)$(".html5-elem-box-previous",inst.$lightbox).css({"margin-left":String(boxW/2-$(".html5-elem-box-previous",inst.$lightbox).width()/2)+"px",top:String(existingBoxT-boxT)+"px"});inst.$elemWrap.animate({width:boxW},speed).animate({height:boxH},speed,function(){inst.onAnimateFinish(onFinish)})}};inst.onAnimateFinish=function(onFinish){inst.$loading.show();inst.$watermark.show();
inst.$close.show();inst.$elem.css({"background-color":inst.options.bgcolor});onFinish();inst.finishCallback()};inst.finishCallback=function(){if(inst.options.transition=="slide"&&inst.existingElem>=0){inst.$prevelem.animate({left:inst.direction==-1?"-100%":"100%",opacity:0},{duration:inst.options.transitionduration});inst.$elem.animate({left:0,opacity:1},{duration:inst.options.transitionduration,always:function(){inst.$prevelem.remove();inst.$elem.removeClass("html5-elem-box-current").css({position:"relative",
height:"100%"})}})}},inst.resetDiv=function(elemID){if(inst.elemArray.length>0&&elemID>=0)if(inst.elemArray[elemID][ELEM_TYPE]==10){var divID=inst.elemArray[elemID][ELEM_HREF];if($(divID).length>0)$("#html5lightbox-div"+elemID).children().appendTo($(divID))}};inst.reset=function(){if(inst.options.stamp)inst.$watermark.hide();inst.showing=false;inst.$image.empty();inst.$text.empty();inst.$error.hide();inst.$loading.hide();inst.$image.hide();if(inst.options.titlestyle=="bottom"||inst.options.titlestyle==
"inside")inst.$elemData.hide();if(!inst.options.fullscreenmode)inst.$close.hide();inst.$elem.css({"background-color":""})};inst.resetNavigation=function(){inst.options.navheight=0;$(".html5-nav").remove();inst.navvisible=false};inst.finish=function(){inst.existingElem=-1;inst.resetDiv(inst.options.curElem);if($(".html5-lightbox-video",inst.$lightbox).length)$(".html5-lightbox-video",inst.$lightbox).attr("src","");$("head").find("style").each(function(){if($(this).data("creator")=="carousel-html5-lightbox")$(this).remove()});
if(inst.options.bodynoscroll)$("html,body").removeClass("bodynoscroll");inst.slideTimeout.stop();inst.reset();inst.resetNavigation();inst.$lightbox.remove();$("#carousel-html5-lightbox").remove();inst.showObjects();if(inst.options.oncloselightbox&&window[inst.options.oncloselightbox]&&typeof window[inst.options.oncloselightbox]=="function")window[inst.options.oncloselightbox](inst.currentElem);if(inst.onLightboxClosed&&typeof inst.onLightboxClosed=="function")inst.onLightboxClosed(inst.currentElem);
$(window).trigger("html5lightbox.lightboxclosed")};inst.pauseSlide=function(){};inst.playSlide=function(){};inst.gotoSlide=function(slide){inst.existingElem=inst.options.curElem;inst.direction=slide;inst.resetDiv(inst.options.curElem);if(slide==-1){if(inst.options.nextElem<0)return;inst.options.curElem=inst.options.nextElem}else if(slide==-2){if(inst.options.prevElem<0)return;inst.options.curElem=inst.options.prevElem}else if(slide>=0){inst.direction=slide>inst.options.curElem?-1:-2;inst.options.curElem=
slide}if(inst.autosliding)inst.slideTimeout.stop();inst.calcNextPrevElem();if(inst.options.transition!="slide")inst.reset();inst.loadCurElem();if(inst.options.titlestyle=="inside"&&inst.options.showonmouseoverinside&&inst.currentElem[ELEM_TYPE]!==0&&inst.options.showinsidetitleforimageonly)inst.$elemData.css({opacity:0})};inst.enableSwipe=function(){var preventDefault=inst.options.isAndroid&&(inst.options.swipepreventdefaultonandroid||inst.options.androidVersion>=0&&inst.options.androidVersion<=5)?
true:false;inst.$lightboxBox.carouselTouchSwipe({preventWebBrowser:preventDefault,swipeDistance:inst.options.swipedistance,swipeLeft:function(){inst.gotoSlide(-1)},swipeRight:function(){inst.gotoSlide(-2)}})};inst.hideObjects=function(){$("select, embed, object").css({"visibility":"hidden"})};inst.showObjects=function(){$("select, embed, object").css({"visibility":"visible"})};inst.embedHTML5Video=function($container,src,autoplay,loopvideo){$container.html("<div style='display:block;width:100%;height:100%;position:relative;'><video class='html5-lightbox-video' width='100%' height='100%'"+
(inst.options.html5videoposter&&inst.options.html5videoposter.length>0?"poster='"+inst.options.html5videoposter+"'":"")+(autoplay?" autoplay":"")+(loopvideo?" loop":"")+(inst.options.nativehtml5controls&&!inst.options.videohidecontrols?" controls='controls'":"")+(inst.options.nativecontrolsnodownload?' controlsList="nodownload"':"")+" src='"+src+"'></div>");if(!inst.options.nativehtml5controls&&!inst.options.videohidecontrols){$("video",$container).data("src",src);$("video",$container).acHTML5VideoControls(inst.options.skinsfolder,
inst,".html5-lightbox-video",inst.options.videohidecontrols,false,inst.options.defaultvideovolume,inst.options.nativecontrolsonfullscreen,inst.options.nativecontrolsnodownload,null)}$("video",$container).off("ended").on("ended",function(){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)})};inst.embedFlash=function($container,src,wmode,flashVars){if(inst.options.flashInstalled){var htmlOptions=
{pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};htmlOptions.width="100%";htmlOptions.height="100%";htmlOptions.src=src;htmlOptions.flashVars=$.param(flashVars);htmlOptions.wmode=wmode;var htmlString="";for(var key in htmlOptions)htmlString+=key+"="+htmlOptions[key]+" ";$container.html("<embed "+htmlString+"/>")}else $container.html("<div class='html5lightbox-flash-error' style='display:block; position:relative;text-align:center; width:100%; left:0px; top:40%;'><div class='html5-error'><div>The required Adobe Flash Player plugin is not installed</div><br /><div style='display:block;position:relative;text-align:center;width:112px;height:33px;margin:0px auto;'><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' width='112' height='33'></img></a></div></div>")};
inst.checkType=function(href){if(!href)return-1;if(href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i))return 0;if(href.match(/[^\.]\.(swf)\s*$/i))return 1;if(href.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i))return 2;if(href.match(/\:\/\/.*(youtube\.com)/i)||href.match(/\:\/\/.*(youtu\.be)/i))return 3;if(href.match(/\:\/\/.*(vimeo\.com)/i))return 4;if(href.match(/\:\/\/.*(dailymotion\.com)/i)||href.match(/\:\/\/.*(dai\.ly)/i))return 9;if(href.match(/[^\.]\.(pdf)\s*$/i))return 5;if(href.match(/[^\.]\.(mp3)\s*$/i))return 6;
if(href.match(/[^\.]\.(flv)\s*$/i))return 8;if(href.match(/\#\w+/i))return 10;if(href.match(/\:\/\/.*(wistia)/i))return 11;return 7};inst.getURLParams=function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2)result[value[0].toLowerCase()]=unescape(value[1])}return result};inst.absoluteUrl=function(href){var link=document.createElement("a");link.href=href;return link.protocol+"//"+link.host+
link.pathname+link.search+link.hash};inst.showLightbox=function(type,href,title,width,height,webm,ogg,thumbnail,description){inst.options=$.extend(inst.options,inst.defaultoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle==
"right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadElem(new Array(type,href,title,null,width,height,webm,ogg,thumbnail,description))};inst.addItem=function(href,title,group,width,height,webm,ogg,thumbnail,description,mediatype){type=mediatype&&mediatype>=0?mediatype:inst.checkType(href);inst.elemArray.push(new Array(type,href,title,group,width,height,webm,ogg,thumbnail,description))};
inst.showItem=function(href){inst.options=$.extend(inst.options,inst.defaultoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();if(inst.elemArray.length<=0)return true;inst.hideObjects();for(var i=0;i<inst.elemArray.length;i++)if(inst.elemArray[i][ELEM_HREF]==href)break;if(i==inst.elemArray.length)return true;inst.options.curElem=i;inst.calcNextPrevElem();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=
boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadCurElem();return false};inst.off("click").click(inst.clickHandler);inst.each(function(){var self=$(this);var autoopen=false;var autoopendelay=0;if(typeof wondercarousellightbox_options!=
"undefined"&&wondercarousellightbox_options){if("autoopen"in wondercarousellightbox_options)autoopen=wondercarousellightbox_options.autoopen;if("autoopendelay"in wondercarousellightbox_options)autoopendelay=wondercarousellightbox_options.autoopendelay}autoopen=self.data("autoopen")?self.data("autoopen"):autoopen;autoopendelay=self.data("autoopendelay")?self.data("autoopendelay"):autoopendelay;if(autoopen){setTimeout(function(){self.click()},autoopendelay);return false}if(self.data("preloadonpageload")){var fileType="mediatype"in self.data()?
self.data("mediatype"):inst.checkType(self.attr("href"));if(fileType==0){var preloaddelay=self.data("preloaddelay")?self.data("preloaddelay"):0;setTimeout(function(){(new Image).src=self.attr("href")},preloaddelay)}}});var urlParams=inst.getURLParams();if("wpcarousellightboxshare"in urlParams){var shareUrl=decodeURIComponent(urlParams["wpcarousellightboxshare"]);var shareLink=$('.wondercarousellightbox[href="'+shareUrl+'"]');if(shareLink.length>0)shareLink.click()}if(inst.options.preloadallonpageload)setTimeout(function(){inst.each(function(){if(this.nodeName.toLowerCase()!=
"a"&&this.nodeName.toLowerCase()!="area")return;var fileType="mediatype"in $(this).data()?$(this).data("mediatype"):inst.checkType($(this).attr("href"));if(fileType!==0)return;(new Image).src=$(this).attr("href");if($(this).data("thumbnail"))(new Image).src=$(this).data("thumbnail")})},inst.options.preloadalldelay);return inst}})(jQuery);
(function($){$.fn.acHTML5VideoControls=function(skinFolder,parentInst,videoElem,hideControls,hidePlayButton,defaultVolume,fullscreenNativeControls,html5VideoNoDownload,skinImages){var isTouch="ontouchstart"in window;var eStart=isTouch?"touchstart":"mousedown";var eMove=isTouch?"touchmove":"mousemove";var eCancel=isTouch?"touchcancel":"mouseup";var eClick="click";var BUTTON_SIZE=32;var BAR_HEIGHT=isTouch?48:36;var hideControlsTimerId=null;var hideVolumeBarTimeoutId=null;var sliderDragging=false;var isFullscreen=
false;var userActive=true;var isHd=$(this).data("ishd");var hd=$(this).data("hd");var src=$(this).data("src");var $videoObj=$(this);$videoObj.get(0).removeAttribute("controls");var $videoPlay=$("<div class='html5boxVideoPlay'></div>");$videoObj.after($videoPlay);var playbuttonImage=skinImages&&"playbutton"in skinImages&&skinImages.playbutton.length>0?skinImages.playbutton:skinFolder+"html5boxplayer_playvideo.png";$videoPlay.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",
width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+playbuttonImage+"')","background-position":"center center","background-repeat":"no-repeat"}).on(eClick,function(){$videoObj.get(0).play()});var $videoFullscreenBg=$("<div class='html5boxVideoFullscreenBg'></div>");var $videoControls=$("<div class='html5boxVideoControls'>"+"<div class='html5boxVideoControlsBg'></div>"+"<div class='html5boxPlayPause'>"+"<div class='html5boxPlay'></div>"+"<div class='html5boxPause'></div>"+
"</div>"+"<div class='html5boxTimeCurrent'>--:--</div>"+"<div class='html5boxFullscreen'></div>"+"<div class='html5boxHD'></div>"+"<div class='html5boxVolume'>"+"<div class='html5boxVolumeButton'></div>"+"<div class='html5boxVolumeBar'>"+"<div class='html5boxVolumeBarBg'>"+"<div class='html5boxVolumeBarActive'></div>"+"</div>"+"</div>"+"</div>"+"<div class='html5boxTimeTotal'>--:--</div>"+"<div class='html5boxSeeker'>"+"<div class='html5boxSeekerBuffer'></div>"+"<div class='html5boxSeekerPlay'></div>"+
"<div class='html5boxSeekerHandler'></div>"+"</div>"+"<div style='clear:both;'></div>"+"</div>");$videoObj.after($videoControls);$videoObj.after($videoFullscreenBg);$videoFullscreenBg.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0});$videoControls.css({display:"block",position:"absolute",width:"100%",height:BAR_HEIGHT,left:0,bottom:0,right:0,margin:"0 auto"});var userActivate=function(){userActive=true};$videoObj.on("touch click mousemove mouseenter",function(){userActive=true});
if(!hideControls)setInterval(function(){if(userActive){$videoControls.show();userActive=false;clearTimeout(hideControlsTimerId);hideControlsTimerId=setTimeout(function(){if(!$videoObj.get(0).paused)$videoControls.fadeOut()},5E3)}},250);$(".html5boxVideoControlsBg",$videoControls).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$(".html5boxPlayPause",$videoControls).css({display:"block",position:"relative",
width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"float":"left"});var $videoBtnPlay=$(".html5boxPlay",$videoControls);var $videoBtnPause=$(".html5boxPause",$videoControls);$videoBtnPlay.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top left"}).hover(function(){$(this).css({"background-position":"bottom left"})},
function(){$(this).css({"background-position":"top left"})}).on(eClick,function(){$videoObj.get(0).play()});$videoBtnPause.css({display:"none",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top right"}).hover(function(){$(this).css({"background-position":"bottom right"})},function(){$(this).css({"background-position":"top right"})}).on(eClick,function(){$videoObj.get(0).pause()});
var $videoTimeCurrent=$(".html5boxTimeCurrent",$videoControls);var $videoTimeTotal=$(".html5boxTimeTotal",$videoControls);var $videoSeeker=$(".html5boxSeeker",$videoControls);var $videoSeekerPlay=$(".html5boxSeekerPlay",$videoControls);var $videoSeekerBuffer=$(".html5boxSeekerBuffer",$videoControls);var $videoSeekerHandler=$(".html5boxSeekerHandler",$videoControls);$videoTimeCurrent.css({display:"block",position:"relative","float":"left","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",
margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoTimeTotal.css({display:"block",position:"relative","float":"right","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoSeeker.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((BAR_HEIGHT-10)/2)+"px 4px"}).on(eStart,function(e){var e0=
isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width();$videoSeeker.on(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width()})}).on(eCancel,function(){$videoSeeker.off(eMove)});$videoSeekerBuffer.css({display:"block",
position:"absolute",left:0,top:0,height:"100%","background-color":"#444"});$videoSeekerPlay.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"});var $videoFSObj=fullscreenNativeControls?$videoObj:$videoObj.parent();if($videoFSObj.get(0).requestFullscreen||$videoFSObj.get(0).webkitRequestFullScreen||$videoFSObj.get(0).mozRequestFullScreen||$videoFSObj.get(0).webkitEnterFullScreen||$videoFSObj.get(0).msRequestFullscreen){var switchScreen=function(fullscreen){if(fullscreen){if(fullscreenNativeControls){$videoObj.get(0).setAttribute("controls",
"controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}if($videoFSObj.get(0).requestFullscreen)$videoFSObj.get(0).requestFullscreen();else if($videoFSObj.get(0).webkitRequestFullScreen)$videoFSObj.get(0).webkitRequestFullScreen();else if($videoFSObj.get(0).mozRequestFullScreen)$videoFSObj.get(0).mozRequestFullScreen();else if($videoFSObj.get(0).webkitEnterFullScreen)$videoFSObj.get(0).webkitEnterFullScreen();if($videoFSObj.get(0).msRequestFullscreen)$videoFSObj.get(0).msRequestFullscreen()}else if(document.cancelFullScreen)document.cancelFullScreen();
else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.msExitFullscreen)document.msExitFullscreen()};var switchScreenCSS=function(fullscreen){if(fullscreenNativeControls)if(fullscreen){$videoObj.get(0).setAttribute("controls","controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}else $videoObj.get(0).removeAttribute("controls");
else if(fullscreen){$(document).on("mousemove",userActivate);$videoControls.css({"z-index":2147483647,position:"fixed"});$videoFullscreenBg.css({"z-index":2147483647,display:"block"});$videoPlay.css({"z-index":2147483647})}else{$(document).off("mousemove",userActivate);$videoControls.css({"z-index":"",position:"absolute"});$videoFullscreenBg.css({"z-index":"",display:"none"});$videoPlay.css({"z-index":""})}};document.addEventListener("MSFullscreenChange",function(){isFullscreen=document.msFullscreenElement!=
null;switchScreenCSS(isFullscreen)},false);document.addEventListener("fullscreenchange",function(){isFullscreen=document.fullscreen;switchScreenCSS(isFullscreen)},false);document.addEventListener("mozfullscreenchange",function(){isFullscreen=document.mozFullScreen;switchScreenCSS(isFullscreen)},false);document.addEventListener("webkitfullscreenchange",function(){isFullscreen=document.webkitIsFullScreen;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitbeginfullscreen",
function(){isFullscreen=true;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitendfullscreen",function(){isFullscreen=false;switchScreenCSS(isFullscreen)},false);if(!fullscreenNativeControls)$("head").append("<style type='text/css'>video"+videoElem+"::-webkit-media-controls { display:none !important; }</style>");var $videoFullscreen=$(".html5boxFullscreen",$videoControls);$videoFullscreen.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",
height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_fullscreen.png"+"')","background-position":"left top"}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:
$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,function(){isFullscreen=!isFullscreen;switchScreen(isFullscreen)})}if(hd){var $videoHD=$(".html5boxHD",$videoControls);$videoHD.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_hd.png"+"')","background-position":(isHd?"right":
"left")+" center"}).on(eClick,function(){isHd=!isHd;$(this).css({"background-position":(isHd?"right":"left")+" center"});parentInst.isHd=isHd;var isPaused=$videoObj.get(0).isPaused;$videoObj.get(0).setAttribute("src",(isHd?hd:src)+"#t="+$videoObj.get(0).currentTime);if(!isPaused)$videoObj.get(0).play();else $videoObj.get(0).pause()})}$videoObj.get(0).volume=defaultVolume;var volumeSaved=defaultVolume==0?1:defaultVolume;var volume=$videoObj.get(0).volume;$videoObj.get(0).volume=volume/2+0.1;if($videoObj.get(0).volume===
volume/2+0.1){$videoObj.get(0).volume=volume;var $videoVolume=$(".html5boxVolume",$videoControls);var $videoVolumeButton=$(".html5boxVolumeButton",$videoControls);var $videoVolumeBar=$(".html5boxVolumeBar",$videoControls);var $videoVolumeBarBg=$(".html5boxVolumeBarBg",$videoControls);var $videoVolumeBarActive=$(".html5boxVolumeBarActive",$videoControls);$videoVolume.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-
BUTTON_SIZE)/2)}).hover(function(){clearTimeout(hideVolumeBarTimeoutId);var volume=$videoObj.get(0).volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"});$videoVolumeBar.show()},function(){clearTimeout(hideVolumeBarTimeoutId);hideVolumeBarTimeoutId=setTimeout(function(){$videoVolumeBar.hide()},1E3)});$videoVolumeButton.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_volume.png"+
"')","background-position":"top "+(volume>0?"left":"right")}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,
function(){var volume=$videoObj.get(0).volume;if(volume>0){volumeSaved=volume;volume=0}else volume=volumeSaved;var backgroundPosY=$(this).css("background-position")?$(this).css("background-position").split(" ")[1]:$(this).css("background-position-y");$videoVolumeButton.css({"background-position":(volume>0?"left":"right")+" "+backgroundPosY});$videoObj.get(0).volume=volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"})});$videoVolumeBar.css({display:"none",position:"absolute",left:4,
bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$videoVolumeBarBg.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"});$videoVolumeBarActive.css({display:"block",position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"});$videoVolumeBarBg.on(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:
e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol;$videoVolumeBarBg.on(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*
100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol})}).on(eCancel,function(){$videoVolumeBarBg.off(eMove)})}var calcTimeFormat=function(seconds){var h0=Math.floor(seconds/3600);var h=h0<10?"0"+h0:h0;var m0=Math.floor((seconds-h0*3600)/60);var m=m0<10?"0"+m0:m0;var s0=Math.floor(seconds-(h0*3600+m0*60));var s=s0<10?"0"+s0:s0;var r=m+":"+s;if(h0>0)r=h+":"+r;return r};if(hidePlayButton)$videoPlay.hide();if(hideControls)$videoControls.hide();
var onVideoPlay=function(){if(!hidePlayButton)$videoPlay.hide();if(!hideControls){$videoBtnPlay.hide();$videoBtnPause.show()}};var onVideoPause=function(){if(!hidePlayButton)$videoPlay.show();if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();$videoBtnPause.hide()}};var onVideoEnded=function(){$(window).trigger("html5lightbox.videoended");if(!hidePlayButton)$videoPlay.show();if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();
$videoBtnPause.hide()}};var onVideoUpdate=function(){var curTime=$videoObj.get(0).currentTime;if(curTime){$videoTimeCurrent.text(calcTimeFormat(curTime));var duration=$videoObj.get(0).duration;if(duration){$videoTimeTotal.text(calcTimeFormat(duration));if(!sliderDragging){var sliderW=$videoSeeker.width();var pos=Math.round(sliderW*curTime/duration);$videoSeekerPlay.css({width:pos});$videoSeekerHandler.css({left:pos})}}}};var onVideoProgress=function(){if($videoObj.get(0).buffered&&$videoObj.get(0).buffered.length>
0&&!isNaN($videoObj.get(0).buffered.end(0))&&!isNaN($videoObj.get(0).duration)){var sliderW=$videoSeeker.width();$videoSeekerBuffer.css({width:Math.round(sliderW*$videoObj.get(0).buffered.end(0)/$videoObj.get(0).duration)})}};try{$videoObj.on("play",onVideoPlay);$videoObj.on("pause",onVideoPause);$videoObj.on("ended",onVideoEnded);$videoObj.on("timeupdate",onVideoUpdate);$videoObj.on("progress",onVideoProgress)}catch(e){}}})(jQuery);
function ASTimer(asTimeout,asCallback,asUpdateCallback){var asUpdateInterval=50;var asUpdateTimerId=null;var asRunningTime=0;this.pause=function(){clearInterval(asUpdateTimerId)};this.resume=function(){clearInterval(asUpdateTimerId);if(asTimeout>0)asUpdateTimerId=setInterval(function(){asRunningTime+=asUpdateInterval;if(asRunningTime>asTimeout){clearInterval(asUpdateTimerId);if(asCallback)asCallback()}if(asUpdateCallback)asUpdateCallback(asRunningTime/asTimeout)},asUpdateInterval);else if(asCallback)asCallback()};
this.stop=function(){clearInterval(asUpdateTimerId);if(asUpdateCallback)asUpdateCallback(-1);asRunningTime=0};this.start=function(){asRunningTime=0;clearInterval(asUpdateTimerId);if(asTimeout>0)asUpdateTimerId=setInterval(function(){asRunningTime+=asUpdateInterval;if(asRunningTime>asTimeout){clearInterval(asUpdateTimerId);if(asCallback)asCallback()}if(asUpdateCallback)asUpdateCallback(asRunningTime/asTimeout)},asUpdateInterval);else if(asCallback)asCallback()}}
var ACPlatforms={flashInstalled:function(){var flashInstalled=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))flashInstalled=true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])flashInstalled=true}return flashInstalled},html5VideoSupported:function(){return!!document.createElement("video").canPlayType},canPlayMP4:function(){var v=document.createElement("video");return v&&v.canPlayType&&v.canPlayType("video/mp4").replace(/no/,"")},isChrome:function(){return navigator.userAgent.match(/Chrome/i)!=
null},isFirefox:function(){return navigator.userAgent.match(/Firefox/i)!=null},isOpera:function(){return navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null},isSafari:function(){return navigator.userAgent.match(/Safari/i)!=null},isAndroid:function(){return navigator.userAgent.match(/Android/i)!=null},androidVersion:function(){var match=navigator.userAgent.match(/Android\s([0-9\.]*)/i);return match&&match.length>=2?parseInt(match[1],10):-1},isIPad:function(){return navigator.userAgent.match(/iPad/i)!=
null},isIPhone:function(){return navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null},isIOS:function(){return this.isIPad()||this.isIPhone()},isIE11:function(){return navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null},isIE10:function(){return navigator.userAgent.match(/MSIE 10/i)!=null&&!this.isOpera()},isIE9:function(){return navigator.userAgent.match(/MSIE/i)!=null&&this.html5VideoSupported()&&!this.isOpera()},isIE8:function(){return navigator.userAgent.match(/MSIE 8/i)!=
null&&!this.isOpera()},isIE7:function(){return navigator.userAgent.match(/MSIE 7/i)!=null&&!this.isOpera()},isIE6:function(){return navigator.userAgent.match(/MSIE 6/i)!=null&&!this.isOpera()},isIE678:function(){return this.isIE6()||this.isIE7()||this.isIE8()},isIE6789:function(){return this.isIE6()||this.isIE7()||this.isIE8()||this.isIE9()},css33dTransformSupported:function(){return!this.isIE6()&&!this.isIE7()&&!this.isIE8()&&!this.isIE9()&&!this.isOpera()},applyBrowserStyles:function(object,applyToValue){var ret=
{};for(var key in object){ret[key]=object[key];ret["-webkit-"+key]=applyToValue?"-webkit-"+object[key]:object[key];ret["-moz-"+key]=applyToValue?"-moz-"+object[key]:object[key];ret["-ms-"+key]=applyToValue?"-ms-"+object[key]:object[key];ret["-o-"+key]=applyToValue?"-o-"+object[key]:object[key]}return ret}};
(function($){$.fn.wonderplugincarousel=function(options){var ELEM_ID=0,ELEM_SRC=1,ELEM_TITLE=2,ELEM_DESCRIPTION=3,ELEM_LINK=4,ELEM_TARGET=5,ELEM_VIDEO=6,ELEM_THUMBNAIL=7,ELEM_LIGHTBOX=8,ELEM_LIGHTBOXWIDTH=9,ELEM_LIGHTBOXHEIGHT=10;var TYPE_IMAGE=1,TYPE_SWF=2,TYPE_MP3=3,TYPE_PDF=4,TYPE_VIDEO_FLASH=5,TYPE_VIDEO_MP4=6,TYPE_VIDEO_OGG=7,TYPE_VIDEO_WEBM=8,TYPE_VIDEO_YOUTUBE=9,TYPE_VIDEO_VIMEO=10;var AmazingCarousel=function(container,options,id){this.container=container;this.options=options;this.id=id;this.transitionTimeout=
null;this.arrowTimeout=null;$(".amazingcarousel-engine").css({display:"none"});this.lightboxArray=[];this.visibleItems=this.options.visibleitems;this.itemSize=this.options.width;this.itemHeight=this.options.height;this.currentItem=0;this.elemLength=0;this.elemTotalCount=0;this.animProp={};this.transitionTimerId=null;this.transitionTiming=0;this.processLightbox();this.preprocess(this)};AmazingCarousel.prototype={initData:function(){this.readTags();this.init()},processLightbox:function(){if(this.options.lightboxobject){var instance=
this;this.options.lightboxobject.each(function(index){if($(this).data("ytplaylist"))instance.options.lightboxobject.splice(index,1)})}},preprocess:function(instance){var found=false;var item_index=0;var youtubeapikey="";var youtubeplaylistid="";var youtubeplaylistmaxresults="";$("li.amazingcarousel-item",this.container).each(function(index){if($(this).data("youtubeapikey")){youtubeapikey=$(this).data("youtubeapikey");youtubeplaylistid=$(this).data("youtubeplaylistid");youtubeplaylistmaxresults=$(this).data("youtubeplaylistmaxresults");
item_index=index;found=true;return false}});if(found)instance.getYouTubePlaylist(youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults,item_index,item_index,instance.preprocess,instance,null);else instance.initData()},getYouTubePlaylist:function(youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults,index,insert_index,onsuccess,instance,pagetoken){var youtube_url="https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId="+youtubeplaylistid+"&key="+youtubeapikey;if(youtubeplaylistmaxresults)if(youtubeplaylistmaxresults>
50)youtube_url+="&maxResults=50";else youtube_url+="&maxResults="+youtubeplaylistmaxresults;if(pagetoken)youtube_url+="&pageToken="+pagetoken;var all_done=true;$.getJSON(youtube_url,function(data){if(data&&data.items){var original_item=$("li.amazingcarousel-item",instance.container).eq(index);for(var i=0;i<data.items.length;i++){var video_id=data.items[i]["snippet"]["resourceId"]["videoId"];var thumbnail="https://img.youtube.com/vi/"+video_id+"/0.jpg";var image="https://img.youtube.com/vi/"+video_id+
"/0.jpg";if(data.items[i]["snippet"]["thumbnails"]&&data.items[i]["snippet"]["thumbnails"]["maxres"])image=data.items[i]["snippet"]["thumbnails"]["maxres"]["url"];var video="https://www.youtube.com/embed/"+video_id;var title=data.items[i]["snippet"]["title"];var description=data.items[i]["snippet"]["description"];var new_item=original_item.clone();new_item.removeAttr("data-youtubeapikey").removeAttr("data-youtubeplaylistid").removeAttr("data-youtubeplaylistmaxresults");var item_html=new_item.html().replace(/data-srcyt=/g,
"src=").replace(/__IMAGE__/g,image).replace(/__THUMBNAIL__/g,thumbnail).replace(/__VIDEO__/g,video).replace(/__TITLE__/g,title).replace(/__DESCRIPTION__/g,description);new_item.html(item_html);if(instance.options.lightboxobject&&new_item.find("a").hasClass("wondercarousellightbox"))new_item.find("a").each(function(){instance.options.lightboxobject.push(this);$(this).off("click").click(instance.options.lightboxobject.clickHandler)});$("li.amazingcarousel-item",instance.container).eq(insert_index).after(new_item);
insert_index++}}if(data&&data.nextPageToken&&youtubeplaylistmaxresults&&youtubeplaylistmaxresults>50){all_done=false;instance.getYouTubePlaylist(youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults-50,index,insert_index,onsuccess,instance,data.nextPageToken)}}).always(function(){if(all_done){$("li.amazingcarousel-item",instance.container).eq(index).remove();onsuccess(instance)}})},readTags:function(){var items=$("li.amazingcarousel-item",this.container);this.elemLength=items.length;this.elemTotalCount=
this.elemLength;var i;if(this.options.random){for(i=this.elemLength-1;i>0;i--){var index=Math.floor(Math.random()*i);items.eq(index).insertBefore(items.eq(i));items.eq(i).insertBefore(items.eq(index))}items=$("li.amazingcarousel-item",this.container)}items.each(function(index){$(this).data("itemIndex",index);$(this).addClass("amazingcarousel-item-"+index)});if(this.options.circular&&this.options.donotcircularforless)if(this.elemLength<=this.options.circularlimit)this.options.circular=false;if(this.elemLength>
1&&this.options.circular){var cloneCount=this.elemLength;for(i=0;i<cloneCount;i++)$("ul.amazingcarousel-list",this.container).append(items.eq(i).clone(true));this.elemTotalCount+=cloneCount}$("ul.amazingcarousel-list",this.container).append("<div style='clear:both;'></div>")},init:function(){var instance=this;if(instance.elemLength<=0)return;instance.container.css({direction:"ltr"});if(!instance.options.hidecontaineroninit&&!instance.options.hidecontainerbeforeloaded)instance.container.css({display:"block"});
instance.isAnimating=false;instance.isPaused=!instance.options.autoplay;instance.tempPaused=false;instance.mousePaused=false;instance.loopCount=0;instance.firstResize=false;if(instance.options.initsocialmedia)$("head").append('<link rel="stylesheet" href="'+instance.options.jsfolder+'icons/css/fontello.css" type="text/css" />');instance.createPlayVideo();instance.createHoverOverlay();instance.createStyle();instance.createNav();instance.createArrows();instance.createBackgroundImage();instance.createItemBackgroundImage();
instance.createBottomShadow();instance.createItemBottomShadow();instance.createWatermark();instance.createSliderTimeout();instance.createGoogleFonts();instance.enableSwipe();if(instance.options.sameheight&&instance.options.direction=="horizontal")instance.itemHeight=instance.calcSameHeight();var $img=$(".amazingcarousel-image",instance.container).find("img");if($img.length){instance.totalLength=$img.length;instance.loadindex=0;instance.firstLoad=true;$img.one("load",function(){if(instance.options.sameheight&&
instance.options.direction=="horizontal")$(this).css({width:"auto",height:instance.itemHeight+"px","max-width":"none","max-height":"100%","margin-top":"0px","margin-left":"0px"});else if(instance.options.fixaspectratio){$(this).wrap('<div class="amazingcarousel-image-fix-wrapper" style="width:100%;height:100%;overflow:hidden;"></div>');var imgW=$(this).width();var imgH=$(this).height();if(imgW>0&&imgH&&imgW/imgH>instance.options.width/instance.options.height){$(this).css({width:"auto",height:"100%",
"max-width":"none","max-height":"100%","margin-top":"0px","margin-left":"0px"});if(instance.options.centerimage)if($(this).width()>0){var ml=($(this).closest(".amazingcarousel-image").width()-$(this).width())/2;$(this).css({"margin-left":ml+"px"})}}else{$(this).css({width:"100%",height:"auto","max-width":"100%","max-height":"none","margin-top":"0px","margin-left":"0px"});if(instance.options.centerimage)if($(this).height()>0){var mt=($(this).closest(".amazingcarousel-image").height()-$(this).height())/
2;$(this).css({"margin-top":mt+"px"})}}}else if(instance.options.fitimage){$(this).wrap('<div class="amazingcarousel-image-fit-wrapper" style="width:100%;height:100%;overflow:hidden;"></div>');$(this).css({width:"auto",height:"auto","max-width":"100%","max-height":"100%","margin-top":"0px","margin-left":"0px"});var imgW=$(this).width();var imgH=$(this).height();if(imgW>0&&imgH&&imgW/imgH>instance.options.width/instance.options.height){$(this).css({width:"100%"});if(instance.options.fitcenterimage)if($(this).height()>
0){var mt=($(this).closest(".amazingcarousel-image").height()-$(this).height())/2;$(this).css({"margin-top":mt+"px"})}}else{$(this).css({height:"100%"});if(instance.options.fitcenterimage)if($(this).width()>0){var ml=($(this).closest(".amazingcarousel-image").width()-$(this).width())/2;$(this).css({"margin-left":ml+"px"})}}}if(!instance.firstResize){instance.firstResize=true;instance.resizeCarousel()}instance.loadindex++;if(instance.options.hidecontainerbeforeloaded&&instance.loadindex==instance.totalLength&&
instance.firstLoad){instance.container.trigger("amazingcarousel.allimagesloaded");instance.container.css({display:"block"});$(window).trigger("resize");if(!instance.isPaused&&!instance.tempPaused)instance.sliderTimeout.start();instance.firstLoad=false}});$img.each(function(){if(this.complete)$(this).trigger("load")})}else instance.resizeCarousel();if(instance.options.responsive)$(window).resize(function(){instance.resizeCarousel();instance.resizeNav()});$(window).on("load",function(){instance.resizeCarousel();
instance.resizeNav()});instance.resizeNav();var params=instance.getParams();var firstId=0;if("firstcarouselid"in params&&params["firstcarouselid"]>=0&&params["firstcarouselid"]<instance.elemLength)firstId=parseInt(params["firstcarouselid"]);instance.container.trigger("amazingcarousel.switch",[-1,firstId]);if(firstId>0){instance.slideRun(firstId);if("clickcarousel"in params)$(".amazingcarousel-item",instance.container).each(function(){if($(this).data("itemIndex")==firstId){$(".amazingcarousel-image img",
this).click();return false}})}if(instance.options.hidecontaineroninit&&!instance.options.hidecontainerbeforeloaded){instance.container.css({display:"block"});$(window).trigger("resize")}instance.container.trigger("amazingcarousel.initsuccess");if(!instance.isPaused&&!instance.tempPaused&&!instance.options.hidecontainerbeforeloaded)instance.sliderTimeout.start()},getParams:function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i<params.length;i++){var value=
params[i].split("=");if(value&&value.length==2)result[value[0].toLowerCase()]=unescape(value[1])}return result},enableSwipe:function(){if(this.options.enabletouchswipe){var preventDefault=ACPlatforms.isAndroid&&(this.options.swipepreventdefaultonandroid||ACPlatforms.androidVersion>=0&&ACPlatforms.androidVersion<=5)?true:false;var instance=this;$(".amazingcarousel-list-container",this.container).carouselTouchSwipe({preventWebBrowser:preventDefault,swipeLeft:function(){instance.slideRun(-1,true)},swipeRight:function(){instance.slideRun(-2,
true)}})}},createPlayVideo:function(){if(!this.options.showplayvideo)return;var instance=this;$(".amazingcarousel-image",this.container).each(function(){var $this=$(this);var isVideo=false;var isLightboxVideo=false;var videoUrl="";var videoWebmUrl="";var videoType=null;$("img",$this).each(function(){if($(this).data("video")){videoUrl=$(this).data("video");if($(this).data("videowebm"))videoWebmUrl=$(this).data("videowebm");if($(this).attr("data-videotype"))videoType=$(this).data("videotype");isVideo=
true;return false}else if($(this).parent()[0].nodeName.toLowerCase()=="a")if($(this).parent().hasClass("wondercarousellightbox")){var type=instance.checkVideoType($(this).parent().attr("href"),$(this).parent());if(type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_WEBM)isLightboxVideo=true}});if(isVideo||isLightboxVideo){var pos="center center";switch(instance.options.playvideoimagepos){case "topleft":pos="left top";break;case "topright":pos="right top";break;case "bottomleft":pos=
"left bottom";break;case "bottomright":pos="right bottom";break}var $playVideo=$('<div class="amazingcarousel-play-video" style="position:absolute;left:0;top:0;width:100%;height:100%;cursor:pointer;'+"background-image:url('"+instance.options.playvideoimage+"');background-repeat:no-repeat;"+"background-position:"+pos+';"></div>');$playVideo.appendTo($this);if(isVideo)$this.on("click",".amazingcarousel-play-video",function(){if(!$this.data("isplayvideo")){$this.data("isplayvideo",true);$this.find("img").css({visibility:"hidden"});
instance.playVideo($(this),videoUrl,videoWebmUrl,videoType);$(".amazingcarousel-play-video",$this).css({cursor:"auto"})}});else{var $img=$("img",$this);$playVideo.click(function(){$img.click()})}}})},playVideo:function($videoDiv,videoUrl,videoWebmUrl,videoType){if(videoUrl.length<=0)return;this.sliderTimeout.stop();this.tempPaused=true;var type=videoType?videoType:this.checkVideoType(videoUrl);if(type==TYPE_VIDEO_YOUTUBE)this.playYoutubeVideo(videoUrl,$videoDiv);else if(type==TYPE_VIDEO_VIMEO)this.playVimeoVideo(videoUrl,
$videoDiv);else if(type==TYPE_VIDEO_MP4)this.playMp4Video(videoUrl,videoWebmUrl,true,$videoDiv)},playMp4Video:function(href,webmhref,autoplay,$videoWrapper){var isHTML5=true;if(ACPlatforms.isIE6789())isHTML5=false;if(ACPlatforms.isFirefox()||ACPlatforms.isOpera())if(!ACPlatforms.canPlayMP4()&&!webmhref)isHTML5=false;if(isHTML5){var videoSrc=href;if(ACPlatforms.isFirefox()||ACPlatforms.isOpera())if(webmhref)videoSrc=webmhref;this.embedHTML5Video($videoWrapper,videoSrc,autoplay)}else{var videoFile=
href;if(videoFile.charAt(0)!="/"&&videoFile.substring(0,5)!="http:"&&videoFile.substring(0,6)!="https:")videoFile=this.options.htmlfolder+videoFile;this.embedFlash($videoWrapper,"100%","100%",this.options.jsfolder+"html5boxplayer.swf","transparent",{width:"100%",height:"100%",videofile:videoFile,hdfile:"",ishd:"0",autoplay:autoplay?"1":"0",errorcss:".amazingcarousel-error"+this.options.errorcss,id:this.id,hidecontrols:"0",hideplaybutton:"0",defaultvolume:1})}},embedHTML5Video:function($container,
src,autoPlay){if(ACPlatforms.isFirefox()&&this.options.nativecontrolsonfirefox||(ACPlatforms.isIE6789()||ACPlatforms.isIE10()||ACPlatforms.isIE11())&&this.options.nativecontrolsonie||ACPlatforms.isIPhone()&&this.options.nativecontrolsoniphone||ACPlatforms.isIPad()&&this.options.nativecontrolsonipad||ACPlatforms.isAndroid()&&this.options.nativecontrolsonandroid)this.options.nativehtml5controls=true;if(ACPlatforms.isIOS()||ACPlatforms.isAndroid())this.options.nativecontrolsonfullscreen=true;$container.html("<div class='amazingcarousel-video-container-"+
this.id+"' style='position:relative;display:block;width:100%;height:100%;'><video class='carousel-inline-video' style='width:100%;height:100%;'"+(this.options.nativehtml5controls&&!this.options.videohidecontrols?" controls='controls'":"")+(this.options.nativecontrolsnodownload?" controlsList='nodownload'":"")+"></div>");$("video",$container).get(0).setAttribute("src",src);if(autoPlay)$("video",$container).get(0).play();if(!this.options.nativehtml5controls&&!this.options.videohidecontrols){$("video",
$container).data("src",src);$("video",$container).acHTML5VideoControls(this.options.skinsfolder,this,".carousel-inline-video",this.options.videohidecontrols,this.options.videohideplaybutton,this.options.defaultvideovolume,this.options.nativecontrolsonfullscreen,this.options.nativecontrolsnodownload,null)}},embedFlash:function($container,w,h,src,wmode,flashVars){if(ACPlatforms.flashInstalled()){var htmlOptions={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",
allowScriptAccess:"always",type:"application/x-shockwave-flash"};htmlOptions.width=w;htmlOptions.height=h;htmlOptions.src=src;htmlOptions.wmode=wmode;htmlOptions.flashVars=$.param(flashVars);var htmlString="";for(var key in htmlOptions)htmlString+=key+"="+htmlOptions[key]+" ";$container.html("<embed "+htmlString+"/>")}else $container.html("<div class='amazingcarousel-video-error' style='display:block;position:absolute;text-align:center;width:100%;height:100%;left:0px;top:0px;'><div>The required Adobe Flash Player plugin is not installed</div><br /><div style='display:block;position:relative;text-align:center;width:112px;height:33px;margin:0px auto;'><a href='http://www.adobe.com/go/getflashplayer'><img src='https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' width='112' height='33'></img></a></div>")},
playYoutubeVideo:function(href,$videoWrapper){if(this.options.previewmode){$videoWrapper.html("<div class='amazingcarousel-video-error' style='display:block;position:absolute;left:0;top:0;width:100%;height:100%;color:#fff;background-color:#333;'>To view YouTube video, publish the carousel then open it in your web browser</div>");return}else{var src=href+(href.indexOf("?")<0?"?":"&")+"autoplay=1&wmode=transparent&rel=0&autohide=1";$videoWrapper.html("<iframe width='100%' height='100%' src='"+src+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")}},
playVimeoVideo:function(href,$videoWrapper){if(this.options.previewmode){$videoWrapper.html("<div class='amazingcarousel-video-error' style='display:block;position:absolute;left:0;top:0;width:100%;height:100%;color:#fff;background-color:#333;'>To view Vimeo video, publish the carousel then open it in your web browser</div>");return}else{var src=href+(href.indexOf("?")<0?"?":"&")+"autoplay=1&api=1";$videoWrapper.html("<iframe width='100%' height='100%' src='"+src+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")}},
checkVideoType:function(href,elem){if(!href)return-1;if(elem)if(elem.attr("data-mediatype"))switch(elem.data("mediatype")){case 0:return TYPE_IMAGE;case 2:return TYPE_VIDEO_MP4;case 3:return TYPE_VIDEO_YOUTUBE;case 4:return TYPE_VIDEO_VIMEO}if(href.match(/\.(flv)(.*)?$/i))return TYPE_VIDEO_FLASH;if(href.match(/\.(mp4|m4v)(.*)?$/i))return TYPE_VIDEO_MP4;if(href.match(/\.(ogv|ogg)(.*)?$/i))return TYPE_VIDEO_OGG;if(href.match(/\.(webm)(.*)?$/i))return TYPE_VIDEO_WEBM;if(href.match(/\:\/\/.*(youtube\.com)/i)||
href.match(/\:\/\/.*(youtu\.be)/i))return TYPE_VIDEO_YOUTUBE;if(href.match(/\:\/\/.*(vimeo\.com)/i))return TYPE_VIDEO_VIMEO;return 0},createHoverOverlay:function(){var instance=this;$(".amazingcarousel-image",this.container).each(function(){var $this=$(this);var isLightbox=false;var isLink=false;$("img",$this).each(function(){if($(this).parent()[0].nodeName.toLowerCase()=="a"){isLink=true;if($(this).parent().hasClass("wondercarousellightbox")){isLightbox=true;return false}}});if($(this).siblings(".amazingcarousel-hover").length>
0&&!(instance.options.hidehoveroverlayontouch&&"ontouchstart"in window)){$(this).parent().hover(function(){$(this).find(".amazingcarousel-hover").fadeIn(instance.options.hoverdelay)},function(){$(this).find(".amazingcarousel-hover").fadeOut(instance.options.hoverdelay)});var $img=$("img",$this);$(this).siblings(".amazingcarousel-hover").click(function(){$img.click()})}else if(instance.options.showhoveroverlay&&!(instance.options.hidehoveroverlayontouch&&"ontouchstart"in window)&&(isLightbox||isLink&&
instance.options.showhoveroverlayalways)){var $hoverImage=$('<div class="amazingcarousel-hover-effect" style="display:none;position:absolute;left:0;top:0;width:100%;height:100%;cursor:pointer;'+"background-image:url('"+instance.options.hoveroverlayimage+"');background-repeat:no-repeat;"+'background-position:center center;"></div>');$hoverImage.appendTo($this);var $img=$("img",$this);$hoverImage.click(function(){$img.click()});$(this).hover(function(){if(ACPlatforms.isIE678())$hoverImage.show();else $hoverImage.fadeIn()},
function(){if(ACPlatforms.isIE678())$hoverImage.hide();else $hoverImage.fadeOut()})}if($(this).siblings(".amazingcarousel-flip").length>0){if(ACPlatforms.isIE6789())$(this).parent().hover(function(){$(this).find(".amazingcarousel-flip").hide().insertAfter($(this).find(".amazingcarousel-image")).fadeIn()},function(){$(this).find(".amazingcarousel-flip").fadeOut()});var $img=$("img",$this);$(this).siblings(".amazingcarousel-flip").click(function(){$img.click()})}if($(this).closest(".amazingcarousel-flipout").length>
0){var $itemcontainer=$(this).closest(".amazingcarousel-item-container");if(ACPlatforms.isIE6789())$itemcontainer.hover(function(){$(this).find(".amazingcarousel-flip").hide().insertAfter($(this).find(".amazingcarousel-flipout")).fadeIn()},function(){$(this).find(".amazingcarousel-flip").fadeOut()});var $img=$("img",$this);$itemcontainer.find(".amazingcarousel-flip").click(function(){$img.click()})}})},createStyle:function(){$("ul.amazingcarousel-list",this.container).wrap('<div class="amazingcarousel-list-wrapper"></div>');
$("ul.amazingcarousel-list",this.container).css({display:"block",position:"relative","list-style-type":"none","list-style-image":"none","background-image":"none","background-color":"transparent",padding:0,margin:0});$("li.amazingcarousel-item",this.container).css({display:"block",position:"relative","background-image":"none","background-color":"transparent",margin:0,padding:0,"float":this.options.direction=="horizontal"?"left":"top"});if(this.options.sameheight&&this.options.direction=="horizontal"){$("ul.amazingcarousel-list",
this.container).css({"white-space":"nowrap"});$("li.amazingcarousel-item",this.container).css({display:"inline-block","float":"none"})}var m=0;if(this.options.spacing>0)if(this.options.direction=="horizontal"){var s=Math.min(this.options.spacing/2);m="0 "+s+"px"}else m="0 0 "+this.options.spacing+"px 0";var itemCss={};itemCss["position"]="relative";itemCss["margin"]=m;$("div.amazingcarousel-item-container",this.container).css(itemCss);var listCss={};listCss["position"]="relative";listCss["margin"]=
"0 auto";listCss["overflow"]="visible";$("div.amazingcarousel-list-container",this.container).css(listCss);var wrapperCss={};wrapperCss["overflow"]="hidden";if(this.options.direction=="vertical")wrapperCss["height"]="100%";$("div.amazingcarousel-list-wrapper",this.container).css(wrapperCss)},hideVideo:function(start){var instance=this;var index=0;$("li.amazingcarousel-item",this.container).each(function(){if(index<start||index>=start+instance.visibleItems){$(this).find(".amazingcarousel-image").data("isplayvideo",
false);$(this).find(".amazingcarousel-image").find("img").css({visibility:"visible"});$(".amazingcarousel-play-video",$(this)).empty().css({cursor:"pointer"})}index++})},calcSameHeight:function(){var itemHeight=this.options.height;if(this.options.responsive&&this.options.sameheightresponsive){var screenWidth=$(window).width();if(screenWidth<this.options.sameheightsmallscreen)itemHeight=this.options.sameheightsmallheight;else if(screenWidth<this.options.sameheightmediumscreen)itemHeight=this.options.sameheightmediumheight;
else itemHeight=this.options.height}return itemHeight},checkMK:function(){if(this.options.versionmark=="AMF"+"ree")for(var i=0;i<$(".amazingcarousel-image",this.container).length;i++)if(i%2==0){var item=$(".amazingcarousel-image",this.container).eq(i);var mklink=$('a[href="'+this.options.watermarklink+'"]',item);if(item.text().indexOf(this.options.wmtext)<0||mklink.length<0)item.append('<a href="'+this.options.watermarklink+'" target="_blank"><div style="display:none!important;visibility:hidden!important;z-index:999;position:absolute;bottom:4px;right:4px;padding:3px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;color:#333;font:12px Arial,sans-serif;">'+
this.options.wmtext+"</div></a>");else{var mkdiv=mklink.parent();if(mklink.css("display")=="none"||mklink.css("visibility")=="hidden"||parseInt(mklink.css("font-size"))<8||mkdiv.css("display")=="none"||mkdiv.css("visibility")=="hidden"||parseInt(mkdiv.css("font-size"))<8){mklink.attr({style:(mklink.attr("style")||"")+"display:none!important;visibility:hidden!important;font-size:12px!important;"});mkdiv.attr({style:mkdiv.attr("style")+"display:none!important;visibility:hidden!important;font-size:12px!important;"})}}}},
resizeCarousel:function(){var instance=this;this.visibleItems=this.options.visibleitems;this.itemSize=this.options.width;if(this.options.responsive)if(this.options.direction=="horizontal"){if(this.options.fullwidth){this.container.css({"max-width":"100%"});$(".amazingcarousel-list-container",this.container).css({width:"100%","box-sizing":"border-box"});$(".amazingcarousel-list-wrapper",this.container).css({width:"100%"})}var conWidth;if(this.options.usescreenquery){conWidth=$(".amazingcarousel-list-container",
this.container).width();if(conWidth>0){var screenWidth=$(window).width();for(var i in this.options.screenquery)if(screenWidth<this.options.screenquery[i].screenwidth)this.visibleItems=this.options.screenquery[i].visibleitems;this.itemSize=Math.round(conWidth/this.visibleItems);$(".amazingcarousel-list-wrapper",this.container).width(conWidth)}}else{conWidth=this.container.width();if(conWidth>0){this.visibleItems=this.options.fullwidth?Math.ceil(conWidth/this.options.width):Math.floor(conWidth/this.options.width);
if(this.visibleItems<1){this.visibleItems=1;this.itemSize=conWidth}else this.itemSize=this.options.width;if(!this.options.fullwidth){$(".amazingcarousel-list-container",this.container).width(this.visibleItems*this.itemSize);$(".amazingcarousel-list-wrapper",this.container).width(this.visibleItems*this.itemSize)}}}}else{if(this.options.usescreenquery){var screenWidth=$(window).width();for(var i in this.options.screenquery)if(screenWidth<this.options.screenquery[i].screenwidth)this.visibleItems=this.options.screenquery[i].visibleitems}var itemWidth=
$(".amazingcarousel-list-container",this.container).width();if(itemWidth>0){this.itemSize=itemWidth;$(".amazingcarousel-list-wrapper",this.container).width(itemWidth)}}if(this.options.sameheight&&this.options.direction=="horizontal"){instance.itemHeight=instance.calcSameHeight();$(".amazingcarousel-image",this.container).find("img").each(function(){$(this).css({width:"auto",height:instance.itemHeight+"px"})})}else{$("li.amazingcarousel-item",this.container).css({width:this.itemSize+"px"});if(this.options.direction==
"vertical")this.itemSize=$("li.amazingcarousel-item",this.container).height();if(this.options.fixaspectratio){var imageWidth=$(".amazingcarousel-image",this.container).width();var imageHeight=imageWidth*this.options.height/this.options.width;$(".amazingcarousel-image",this.container).css({height:imageHeight+"px",overflow:"hidden"});$(".amazingcarousel-image",this.container).find("img").each(function(){var imgW=$(this).width();var imgH=$(this).height();if(imgW>0&&imgH&&imgW/imgH>instance.options.width/
instance.options.height){$(this).css({width:"auto",height:"100%","max-width":"none","max-height":"100%","margin-top":"0px","margin-left":"0px"});if(instance.options.centerimage)if($(this).width()>0){var ml=($(this).closest(".amazingcarousel-image").width()-$(this).width())/2;$(this).css({"margin-left":ml+"px"})}}else{$(this).css({width:"100%",height:"auto","max-width":"100%","max-height":"none","margin-top":"0px","margin-left":"0px"});if(instance.options.centerimage)if($(this).height()>0){var mt=
($(this).closest(".amazingcarousel-image").height()-$(this).height())/2;$(this).css({"margin-top":mt+"px"})}}})}else if(this.options.fitimage){var imageWidth=$(".amazingcarousel-image",this.container).width();var imageHeight=imageWidth*this.options.height/this.options.width;$(".amazingcarousel-image",this.container).css({height:imageHeight+"px",overflow:"hidden"});$(".amazingcarousel-image",this.container).find("img").each(function(){$(this).css({width:"auto",height:"auto","max-width":"100%","max-height":"100%",
"margin-top":"0px","margin-left":"0px"});var imgW=$(this).width();var imgH=$(this).height();if(imgW>0&&imgH&&imgW/imgH>instance.options.width/instance.options.height){$(this).css({width:"100%"});if(instance.options.fitcenterimage)if($(this).height()>0){var mt=($(this).closest(".amazingcarousel-image").height()-$(this).height())/2;$(this).css({"margin-top":mt+"px"})}}else{$(this).css({height:"100%"});if(instance.options.fitcenterimage)if($(this).width()>0){var ml=($(this).closest(".amazingcarousel-image").width()-
$(this).width())/2;$(this).css({"margin-left":ml+"px"})}}})}}if(this.options.direction=="horizontal")if(this.options.sameheight)$("ul.amazingcarousel-list",this.container).css({width:"auto"});else $("ul.amazingcarousel-list",this.container).css("width",this.itemSize*(this.options.circular?this.elemTotalCount:this.elemLength)+"px");else $("ul.amazingcarousel-list",this.container).css("height",this.options.height*(this.options.circular?this.elemTotalCount:this.elemLength)+"px");var cssProp=this.options.direction==
"horizontal"?"margin-left":"margin-top";var itemSize=this.options.direction=="horizontal"?this.itemSize:this.options.height;var pos=-itemSize*this.currentItem;$("ul.amazingcarousel-list",this.container).css(cssProp,pos+"px");if(this.options.direction=="vertical"){var itemHeight=this.options.height;if(this.options.fixaspectratio){if($(".amazingcarousel-item",this.container).height()>0)itemHeight=$(".amazingcarousel-item",this.container).height()}else{var h0=$(".amazingcarousel-item",this.container).height();
if(h0>0){var equalHeight=true;$(".amazingcarousel-item",this.container).each(function(){if($(this).height()!=h0){equalHeight=false;return false}});if(equalHeight)itemHeight=h0}}$("div.amazingcarousel-list-container",this.container).css({height:String(itemHeight*this.visibleItems+this.options.spacing*(this.visibleItems-1))+"px"})}this.hideVideo(this.currentItem);this.hideArrows();this.checkMK()},createGoogleFonts:function(){if(this.options.previewmode)return;if(this.options.addgooglefonts&&this.options.googlefonts&&
this.options.googlefonts.length>0){var protocol=window.location.protocol=="https:"?"https:":"http:";var fontRef=protocol+"//fonts.googleapis.com/css?family="+this.options.googlefonts;var fontLink=document.createElement("link");fontLink.setAttribute("rel","stylesheet");fontLink.setAttribute("type","text/css");fontLink.setAttribute("href",fontRef);document.getElementsByTagName("head")[0].appendChild(fontLink)}},createWatermark:function(){if(!this.options.showwatermark)return;if(this.options.watermarkstyle==
"text"&&this.options.watermarktext.length<=0)return;if(this.options.watermarkstyle=="image"&&this.options.watermarkimage.length<=0)return;var wmCode="<div style='"+this.options.watermarkpositioncss;if(this.options.watermarkstyle=="text")wmCode+=this.options.watermarktextcss;if(this.options.watermarklink)wmCode+="cursor:pointer;";wmCode+="'>";if(this.options.watermarklink){wmCode+="<a href='"+this.options.watermarklink+"' style='"+this.options.watermarklinkcss+"'";if(this.options.watermarktarget)wmCode+=
" target='"+this.options.watermarktarget+"'";wmCode+=">"}if(this.options.watermarkstyle=="text")wmCode+=this.options.watermarktext;else if(this.options.watermarkstyle=="image")wmCode+="<img src='"+this.options.skinsfolder+this.options.watermarkimage+"' style='border:none;' />";if(this.options.watermarklink)wmCode+="</a>";wmCode+="</div>";for(var i=0;i<$(".amazingcarousel-image",this.container).length;i++){if(this.options.versionmark!="AMC"+"om"&&i%2!=0)continue;$(".amazingcarousel-image",this.container).eq(i).append($(wmCode))}},
createSliderTimeout:function(){var instance=this;this.sliderTimeout=new ASTimer(this.options.interval,function(){if(instance.options.autoplaydir=="right")instance.slideRun(-2);else instance.slideRun(-1)},null);if(instance.options.pauseonmouseover)this.container.hover(function(){instance.mousePaused=true;if(!instance.isPaused)instance.sliderTimeout.pause();if(instance.options.continuous){$("ul.amazingcarousel-list",instance.container).stop();clearInterval(instance.transitionTimerId);instance.transitionTimerId=
null}},function(){instance.mousePaused=false;if(!instance.isPaused)instance.sliderTimeout.resume();if(instance.options.continuous)if(instance.continuousReset){instance.continuousReset=false;clearInterval(instance.transitionTimerId);instance.transitionTimerId=null;instance.transitionTiming=instance.options.transitionduration;instance.slideRun(-1)}else{$("ul.amazingcarousel-list",instance.container).animate(instance.animProp,instance.transitionTiming,instance.options.transitioneasing,function(){instance.animationDone()});
instance.transitionTimerId=setInterval(function(){instance.transitionTiming-=100},100)}})},createItemBottomShadow:function(){if(!this.options.showitembottomshadow)return;var l=(100-this.options.itembottomshadowimagewidth)/2;var shadow="<div class='amazingcarousel-item-bottom-shadow' "+"style='display:block;position:absolute;left:"+l+"%;top:"+this.options.itembottomshadowimagetop+"%;"+"width:"+this.options.itembottomshadowimagewidth+"%;height:auto;'>"+"<img src='"+this.options.skinsfolder+this.options.itembottomshadowimage+
"' style='display:block;position:relative;width:100%;height:auto;"+"border:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;"+"' />"+"</div>";$("li.amazingcarousel-item",this.container).prepend(shadow)},createBottomShadow:function(){if(!this.options.showbottomshadow)return;var l=(100-this.options.bottomshadowimagewidth)/2;var shadow="<div class='amazingcarousel-bottom-shadow' "+"style='display:block;position:absolute;left:"+
l+"%;top:"+this.options.bottomshadowimagetop+"%;"+"width:"+this.options.bottomshadowimagewidth+"%;height:auto;'>"+"<img src='"+this.options.skinsfolder+this.options.bottomshadowimage+"' style='display:block;position:relative;width:100%;height:auto;"+"border:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;"+"' />"+"</div>";$(".amazingcarousel-list-container",this.container).prepend(shadow)},createItemBackgroundImage:function(){if(!this.options.showitembackgroundimage||
!this.options.itembackgroundimage)return;var l=(100-this.options.itembackgroundimagewidth)/2;var background="<div class='amazingcarousel-background-image' "+"style='display:block;position:absolute;left:"+l+"%;top:"+this.options.itembackgroundimagetop+"%;width:"+this.options.itembackgroundimagewidth+"%;height:auto;'>"+"<img src='"+this.options.skinsfolder+this.options.itembackgroundimage+"' style='display:block;position:relative;width:100%;height:auto;"+"border:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;"+
"' />"+"</div>";$("li.amazingcarousel-item",this.container).prepend(background)},createBackgroundImage:function(){if(!this.options.showbackgroundimage||!this.options.backgroundimage)return;var l=(100-this.options.backgroundimagewidth)/2;var background="<div class='amazingcarousel-background-image' "+"style='display:block;position:absolute;left:"+l+"%;top:"+this.options.backgroundimagetop+"%;width:"+this.options.backgroundimagewidth+"%;height:auto;'>"+"<img src='"+this.options.skinsfolder+this.options.backgroundimage+
"' style='display:block;position:relative;width:100%;height:auto;"+"border:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;"+"' />"+"</div>";this.container.prepend(background)},createArrows:function(){if(this.options.arrowstyle=="none")return;var instance=this;var $prevArrow=$(".amazingcarousel-prev",this.container);var $nextArrow=$(".amazingcarousel-next",this.container);$prevArrow.css({overflow:"hidden",position:"absolute",
cursor:"pointer",width:this.options.arrowwidth+"px",height:this.options.arrowheight+"px",background:"url('"+this.options.arrowimage+"') no-repeat left top"});if(ACPlatforms.isIE678())$prevArrow.css({opacity:"inherit",filter:"inherit"});$nextArrow.css({overflow:"hidden",position:"absolute",cursor:"pointer",width:this.options.arrowwidth+"px",height:this.options.arrowheight+"px",background:"url('"+this.options.arrowimage+"') no-repeat right top"});if(ACPlatforms.isIE678())$nextArrow.css({opacity:"inherit",
filter:"inherit"});$prevArrow.hover(function(){$(this).css({"background-position":"left bottom"})},function(){$(this).css({"background-position":"left top"})});$nextArrow.hover(function(){$(this).css({"background-position":"right bottom"})},function(){$(this).css({"background-position":"right top"})});if(this.options.arrowstyle=="always"){$prevArrow.css({display:"block"});$nextArrow.css({display:"block"})}else{$prevArrow.css({display:"none"});$nextArrow.css({display:"none"});this.container.hover(function(){clearTimeout(instance.arrowTimeout);
if(instance.options.circular||instance.currentItem>0)if(ACPlatforms.isIE678())$prevArrow.show();else $prevArrow.fadeIn();if(instance.options.circular||instance.currentItem<instance.elemLength-instance.visibleItems)if(ACPlatforms.isIE678())$nextArrow.show();else $nextArrow.fadeIn()},function(){instance.arrowTimeout=setTimeout(function(){if(ACPlatforms.isIE678()){$prevArrow.hide();$nextArrow.hide()}else{$prevArrow.fadeOut();$nextArrow.fadeOut()}},instance.options.arrowhideonmouseleave)})}$prevArrow.click(function(){instance.slideRun(-2,
true)});$nextArrow.click(function(){instance.slideRun(-1,true)})},hideArrows:function(){var $prevArrow=$(".amazingcarousel-prev",this.container);var $nextArrow=$(".amazingcarousel-next",this.container);if(!this.options.circular&&this.currentItem<=0)$prevArrow.hide();else if(this.options.arrowstyle=="always")$prevArrow.show();if(!this.options.circular&&this.currentItem>=this.elemLength-this.visibleItems)$nextArrow.hide();else if(this.options.arrowstyle=="always")$nextArrow.show()},createNav:function(){if(this.options.navstyle==
"none")return;var $nav=$(".amazingcarousel-nav",this.container);var $bulletWrapper=$("<div class='amazingcarousel-bullet-wrapper'></div>");$bulletWrapper.appendTo($nav);var $bulletList=$("<div class='amazingcarousel-bullet-list'></div>");$bulletList.appendTo($bulletWrapper);var bulletSize=this.options.navdirection=="vertical"?this.options.navwidth:this.options.navheight;var len=this.elemLength*bulletSize+(this.elemLength-1)*this.options.navspacing;if(this.options.navdirection=="vertical"){$bulletWrapper.css({height:len+
"px",width:"auto"});$bulletList.css({height:len+"px",width:"auto"})}else{$bulletWrapper.css({width:len+"px",height:"auto"});$bulletList.css({width:len+"px",height:"auto"})}var $bullet;for(var i=0;i<this.elemLength;i++){$bullet=this.createNavBullet(i);$bulletList.append($bullet)}var instance=this;this.container.on("amazingcarousel.switch",function(event,prev,cur){for(var i=0;i<instance.elemLength;i++)$(".amazingcarousel-bullet-"+i,instance.container)["bulletNormal"+instance.id]();if(cur>=0){var curPage=
instance.calcCurrentPage(cur);$(".amazingcarousel-bullet-"+curPage,instance.container)["bulletSelected"+instance.id]()}})},calcCurrentPage:function(cur){var instance=this;var curPage=cur;if(instance.options.navmode=="page"){var totalItems=$("li.amazingcarousel-item",instance.container).length;if(cur+instance.visibleItems>=totalItems)curPage=Math.ceil(totalItems/instance.visibleItems)-1;else curPage=Math.floor(cur/instance.visibleItems)}return curPage},createNavBullet:function(index){var f=this.options.navdirection==
"vertical"?"top":"left";var marginF=this.options.navdirection=="vertical"?"bottom":"right";var spacing=index==this.elemLength-1?0:this.options.navspacing;var w=this.options.navwidth;var h=this.options.navheight;var $bullet=$("<div class='amazingcarousel-bullet-"+index+"' style='position:relative;float:"+f+";margin-"+marginF+":"+spacing+"px;width:"+w+"px;height:"+h+"px;cursor:pointer;'></div>");$bullet.data("index",index);var instance=this;$bullet.hover(function(){var bulletIndex=$(this).data("index");
var curPage=instance.calcCurrentPage(instance.currentItem);if(bulletIndex!=curPage)$(this)["bulletHighlight"+instance.id]();if(instance.options.navswitchonmouseover){if(instance.options.navmode=="page")bulletIndex=instance.visibleItems*bulletIndex;instance.slideRun(bulletIndex,true)}},function(){var curPage=instance.calcCurrentPage(instance.currentItem);if($(this).data("index")!=curPage)$(this)["bulletNormal"+instance.id]()});$bullet.click(function(){var bulletIndex=$(this).data("index");if(instance.options.navmode==
"page")bulletIndex=instance.visibleItems*bulletIndex;instance.slideRun(bulletIndex,true)});if(this.options.navstyle=="numbering"){$bullet.html(String(index+1));$bullet.css({"font":this.options.navnumberingfont,"line-height":this.options.navheight+"px","color":this.options.navnumberingcolor,"background-color":this.options.navnumberingbgcolor,"text-align":"center"});if(this.options.navnumberingbground)$bullet.css({"border-radius":Math.round(this.options.navheight/2)+"px"});$.fn["bulletNormal"+this.id]=
function(){$(this).css({"color":instance.options.navnumberingcolor,"background-color":instance.options.navnumberingbgcolor})};$.fn["bulletHighlight"+this.id]=$.fn["bulletSelected"+this.id]=function(){$(this).css({"color":instance.options.navnumberingcolorhighlight,"background-color":instance.options.navnumberingbgcolorhighlight})}}else{$bullet.css({background:"url('"+this.options.navimage+"') no-repeat left top"});$.fn["bulletNormal"+this.id]=function(){$(this).css({"background-position":"left top"})};
$.fn["bulletHighlight"+this.id]=$.fn["bulletSelected"+this.id]=function(){$(this).css({"background-position":"left bottom"})}}return $bullet},resizeNav:function(){if(this.options.navstyle=="none"||this.options.navmode=="item")return;var page=Math.ceil(this.elemLength/this.visibleItems);var i;for(i=0;i<page;i++)$(".amazingcarousel-bullet-"+i,this.container).css({display:"block"});for(i=page;i<this.elemLength;i++)$(".amazingcarousel-bullet-"+i,this.container).css({display:"none"});var curPage=this.calcCurrentPage(this.currentItem);
for(i=0;i<this.elemLength;i++)$(".amazingcarousel-bullet-"+i,this.container)["bulletNormal"+this.id];$(".amazingcarousel-bullet-"+curPage,this.container)["bulletHighlight"+this.id];var bulletSize=this.options.navdirection=="vertical"?this.options.navwidth:this.options.navheight;var len=page*bulletSize+(page-1)*this.options.navspacing;if(this.options.navdirection=="vertical")$(".amazingcarousel-bullet-wrapper",this.container).css({height:len+"px",width:"auto"});else $(".amazingcarousel-bullet-wrapper",
this.container).css({width:len+"px",height:"auto"})},animationDone:function(){clearInterval(this.transitionTimerId);this.transitionTimerId=null;this.transitionTiming=0;this.isAnimating=false;if(this.options.loop>0)if(this.currentItem+this.visibleItems>=this.elemLength){this.loopCount++;if(this.options.loop<=this.loopCount)this.isPaused=true}if(!this.isPaused&&!this.tempPaused&&!this.mousePaused)this.sliderTimeout.start();else this.sliderTimeout.stop()},slideRun:function(index,isManual){if(this.isAnimating)if(this.options.continuous&&
!isManual)return;else{$("ul.amazingcarousel-list",this.container).finish();this.animationDone();this.isAnimating=false}if(index==this.currentItem||index<-2||index>=this.elemLength)return;var scrollOptions={transitionduration:this.options.continuous&&isManual?this.options.originaltransitionduration:this.options.transitionduration,transitioneasing:this.options.continuous&&isManual?this.options.originaltransitioneasing:this.options.transitioneasing,scrollmode:this.options.continuous&&isManual?this.options.originalscrollmode:
this.options.scrollmode,scrollitems:this.options.continuous&&isManual?this.options.originalscrollitems:this.options.scrollitems};var scrollItems;if(index>=0)scrollItems=1;else{scrollItems=this.visibleItems;if(scrollOptions.scrollmode=="item")if(scrollItems>scrollOptions.scrollitems)scrollItems=scrollOptions.scrollitems}var nextItem,dir;if(index==-2){dir=-1;nextItem=this.currentItem-scrollItems}else if(index==-1){dir=1;nextItem=this.currentItem+scrollItems}else{dir=index>this.currentItem?1:-1;nextItem=
index}if(dir<0){if(nextItem<0)nextItem=this.options.circular?this.elemLength+nextItem:0}else if(this.options.circular){if(nextItem>=this.elemLength)nextItem=nextItem-this.elemLength}else if(nextItem>this.elemLength-this.visibleItems)nextItem=this.elemLength-this.visibleItems;if(nextItem==this.currentItem)return;this.isAnimating=true;this.sliderTimeout.stop();this.tempPaused=false;var animCss=this.options.direction=="horizontal"?"margin-left":"margin-top";var animItemSize=this.itemSize;if(this.options.direction==
"vertical")animItemSize+=this.options.spacing;if(this.options.sameheight&&this.options.continuous&&this.options.direction=="horizontal"){var totalWidth=0;$("li.amazingcarousel-item",this.container).each(function(){totalWidth+=$(this).outerWidth(true)});if(totalWidth>0&&$("li.amazingcarousel-item",this.container).length>0)animItemSize=totalWidth/$("li.amazingcarousel-item",this.container).length}else if(this.options.direction=="vertical"){animItemSize=this.options.height+this.options.spacing;var totalHeight=
0;var instance=this;$("li.amazingcarousel-item",this.container).each(function(){totalHeight+=$(this).height()+instance.options.spacing});if(totalHeight>0&&$("li.amazingcarousel-item",this.container).length>0)animItemSize=totalHeight/$("li.amazingcarousel-item",this.container).length}var animInitPos=animItemSize*this.currentItem;var animTargetPos=animItemSize*nextItem;var showStart=nextItem;if(this.options.circular)if(dir<0){if(nextItem>this.currentItem)animInitPos=animItemSize*(this.elemLength+this.currentItem)}else if(nextItem>
this.elemLength-scrollItems&&this.elemLength<2*scrollItems)animInitPos=animItemSize*(nextItem-scrollItems);else if(nextItem<this.currentItem){animTargetPos=animItemSize*(this.elemLength+nextItem);showStart=this.elemLength+nextItem}animInitPos=-animInitPos;animTargetPos=-animTargetPos;if(this.options.sameheight&&!this.options.continuous&&this.options.direction=="horizontal"){var listWidth=0;$("li.amazingcarousel-item",this.container).each(function(){listWidth+=$(this).outerWidth(true)});var itemsWidth=
listWidth/2;var wrapperWidth=$(".amazingcarousel-list-wrapper",this.container).width();var initPos=-1*parseInt($("ul.amazingcarousel-list",this.container).css("margin-left"));var targetPos=initPos;var moveWidth=wrapperWidth;if(scrollOptions.scrollmode=="item")if(dir<0)moveWidth=$("li.amazingcarousel-item-"+nextItem,this.container).outerWidth(true);else moveWidth=$("li.amazingcarousel-item-"+this.currentItem,this.container).outerWidth(true);if(dir<0){targetPos=initPos-moveWidth;if(targetPos<0){targetPos+=
itemsWidth;initPos+=itemsWidth}}else{targetPos=initPos+moveWidth;if(targetPos+wrapperWidth>listWidth){initPos-=itemsWidth;targetPos-=itemsWidth}}if(index>=0){targetPos=0;$("li.amazingcarousel-item",this.container).each(function(i){if(i>=index)return false;targetPos+=$(this).outerWidth(true)})}animInitPos=-initPos;animTargetPos=-targetPos}$("ul.amazingcarousel-list",this.container).css(animCss,animInitPos+"px");this.animProp={};this.animProp[animCss]=animTargetPos+"px";var prevItem=this.currentItem;
this.currentItem=nextItem;this.container.trigger("amazingcarousel.switch",[prevItem,nextItem]);this.hideVideo(showStart);this.hideArrows();if(this.options.continuous&&isManual)this.continuousReset=true;var instance=this;$("ul.amazingcarousel-list",this.container).animate(this.animProp,scrollOptions.transitionduration,scrollOptions.transitioneasing,function(){instance.animationDone()});if(this.options.continuous&&!isManual){if(this.transitionTimerId){clearInterval(this.transitionTimerId);this.transitionTimerId=
null}this.transitionTiming=scrollOptions.transitionduration;this.transitionTimerId=setInterval(function(){instance.transitionTiming-=100},100)}}};options=options||{};for(var key in options)if(key.toLowerCase()!==key){options[key.toLowerCase()]=options[key];delete options[key]}this.each(function(){this.options=$.extend({},options);if($(this).data("skin")&&typeof WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS!=="undefined")if($(this).data("skin")in WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS)this.options=$.extend({},WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS[$(this).data("skin")],
this.options);var instance=this;$.each($(this).data(),function(key,value){instance.options[key.toLowerCase()]=value});var searchoptions={};var searchstring=window.location.search.substring(1).split("&");for(var i=0;i<searchstring.length;i++){var keyvalue=searchstring[i].split("=");if(keyvalue&&keyvalue.length==2){var key=keyvalue[0].toLowerCase();var value=unescape(keyvalue[1]).toLowerCase();if(value=="true")searchoptions[key]=true;else if(value=="false")searchoptions[key]=false;else searchoptions[key]=
value}}this.options=$.extend(this.options,searchoptions);var defaultOptions={hidecontaineroninit:true,hidecontainerbeforeloaded:false,watermarklinkdefault:"http://www.wonderplugin.com/wordpress-carousel/",watermarktargetdefault:"_blank",wmtext:"WordPress Carousel Free Version",previewmode:false,initsocialmedia:false,direction:"horizontal",autoplay:false,autoplaydir:"left",pauseonmouseover:true,interval:3E3,loop:0,random:true,fixaspectratio:false,centerimage:false,fitimage:false,fitcenterimage:false,sameheight:false,sameheightresponsive:false,
sameheightmediumscreen:769,sameheightmediumheight:200,sameheightsmallscreen:415,sameheightsmallheight:200,fullwidth:false,nativehtml5controls:false,videohidecontrols:false,videohideplaybutton:false,defaultvideovolume:1,nativecontrolsonfirefox:false,nativecontrolsonie:false,nativecontrolsoniphone:true,nativecontrolsonipad:true,nativecontrolsonandroid:true,nativecontrolsonfullscreen:true,nativecontrolsnodownload:true,circular:true,scrollmode:"page",scrollitems:1,donotcircularforless:false,circularlimit:3,
skinsfoldername:"skins",showplayvideo:false,playvideoimage:"playvideo-64-64-0.png",playvideoimagepos:"center",showhoveroverlay:true,hoveroverlayimage:"hoveroverlay-64-64-0.png",showhoveroverlayalways:false,hidehoveroverlayontouch:false,hoverdelay:400,enabletouchswipe:true,swipepreventdefaultonandroid:false,responsive:false,usescreenquery:true,spacing:24,showbackgroundimage:false,backgroundimage:"background.png",backgroundimagewidth:110,backgroundimagetop:-40,showitembackgroundimage:false,itembackgroundimage:"background.png",
itembackgroundimagewidth:150,itembackgroundimagetop:0,showbottomshadow:false,bottomshadowimage:"bottomshadow.png",bottomshadowimagewidth:110,bottomshadowimagetop:95,showitembottomshadow:false,itembottomshadowimage:"bottomshadow.png",itembottomshadowimagewidth:110,itembottomshadowimagetop:100,arrowstyle:"always",arrowimage:"arrows.png",arrowwidth:48,arrowheight:48,arrowhideonmouseleave:1E3,navdirection:"horizontal",navstyle:"bullets",navmode:"page",navswitchonmouseover:false,navnumberingfont:"normal 12px Arial",
navnumberingcolor:"#666",navnumberingbgcolor:"#fff",navnumberingcolorhighlight:"#fff",navnumberingbgcolorhighlight:"#333",navnumberingbground:true,navwidth:16,navheight:16,navspacing:8,navimage:"bullet.png",transitionduration:1E3,transitioneasing:"easeOutQuad",continuous:false,continuousduration:2500,versionmark:"AMFree",showwdefault:true,wstyledefault:"text",wtextdefault:"87,111,114,100,80,114,101,115,115,32,67,97,114,111,117,115,101,108,32,70,114,101,101,32,86,101,114,115,105,111,110",wimagedefault:"",wposcss:"display:none;position:absolute;bottom:6px;right:6px;",
wtextcssdefault:"font:12px Arial,Tahoma,Helvetica,sans-serif;color:#666;padding:2px 4px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background-color:#fff;opacity:0.9;filter:alpha(opacity=90);",wlinkcssdefault:"text-decoration:none;font:12px Arial,Tahoma,Helvetica,sans-serif;color:#333;"};this.options=$.extend(defaultOptions,this.options);var i;var l;var mark="";var bytes=this.options.wtextdefault.split(",");for(i=0;i<bytes.length;i++)mark+=String.fromCharCode(bytes[i]);this.options.fvm=
mark;var d0="wmoangdiecrpluginh.iclolms";for(i=1;i<=5;i++)d0=d0.slice(0,i)+d0.slice(i+1);l=d0.length;for(i=0;i<5;i++)d0=d0.slice(0,l-9+i)+d0.slice(l-8+i);if(this.options.versionmark!="AMC"+"om"){this.options.showwatermark=window.location.href.indexOf(d0)>=0?false:this.options.showwdefault;this.options.watermarkstyle=this.options.wstyledefault;this.options.watermarktext=this.options.fvm;this.options.watermarkimage=this.options.wimagedefault;this.options.watermarklink=this.options.watermarklinkdefault;
this.options.watermarktarget=this.options.watermarktargetdefault;this.options.watermarkpositioncss=this.options.wposcss;this.options.watermarktextcss=this.options.wtextcssdefault;this.options.watermarklinkcss=this.options.wlinkcssdefault}if(this.options.continuous){this.options.originaltransitionduration=this.options.transitionduration;this.options.originaltransitioneasing=this.options.transitioneasing;this.options.originalscrollmode=this.options.scrollmode;this.options.originalscrollitems=this.options.scrollitems;
this.options.autoplay=true;this.options.interval=0;this.options.transitionduration=this.options.continuousduration;this.options.transitioneasing="linear";this.options.scrollmode="item";this.options.scrollitems=1}if(typeof amazingcarousel_previewmode!="undefined")this.options.previewmode=amazingcarousel_previewmode;this.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1);if(this.options.skinsfoldername.length>0)this.options.skinsfolder=this.options.jsfolder+this.options.skinsfoldername+
"/";else this.options.skinsfolder=this.options.jsfolder;if(this.options.arrowimage.substring(0,7).toLowerCase()!="http://"&&this.options.arrowimage.substring(0,8).toLowerCase()!="https://")this.options.arrowimage=this.options.skinsfolder+this.options.arrowimage;if(this.options.navimage.substring(0,7).toLowerCase()!="http://"&&this.options.navimage.substring(0,8).toLowerCase()!="https://")this.options.navimage=this.options.skinsfolder+this.options.navimage;if(this.options.hoveroverlayimage.substring(0,
7).toLowerCase()!="http://"&&this.options.hoveroverlayimage.substring(0,8).toLowerCase()!="https://")this.options.hoveroverlayimage=this.options.skinsfolder+this.options.hoveroverlayimage;if(this.options.playvideoimage.substring(0,7).toLowerCase()!="http://"&&this.options.playvideoimage.substring(0,8).toLowerCase()!="https://")this.options.playvideoimage=this.options.skinsfolder+this.options.playvideoimage;var carouselid;if("carouselid"in this.options)carouselid=this.options.carouselid;else{carouselid=
wonderplugincarouselId;wonderplugincarouselId++}var object=new AmazingCarousel($(this),this.options,carouselid);$(this).data("object",object);$(this).data("id",carouselid);wonderplugincarouselObjects.addObject(object)})}})(jQuery);
(function($){$.fn.carouselTouchSwipe=function(options){var defaults={preventWebBrowser:false,swipeLeft:null,swipeRight:null,swipeTop:null,swipeBottom:null};if(options)$.extend(defaults,options);return this.each(function(){var startX=-1,startY=-1;var curX=-1,curY=-1;function touchStart(event){var e=event.originalEvent;if(e.targetTouches.length>=1){startX=e.targetTouches[0].pageX;startY=e.targetTouches[0].pageY}else touchCancel(event)}function touchMove(event){if(defaults.preventWebBrowser)event.preventDefault();
var e=event.originalEvent;if(e.targetTouches.length>=1){curX=e.targetTouches[0].pageX;curY=e.targetTouches[0].pageY}else touchCancel(event)}function touchEnd(event){if(curX>0||curY>0){triggerHandler();touchCancel(event)}else touchCancel(event)}function touchCancel(event){startX=-1;startY=-1;curX=-1;curY=-1}function triggerHandler(){if(Math.abs(curX-startX)>Math.abs(curY-startY))if(curX>startX){if(defaults.swipeRight)defaults.swipeRight.call()}else{if(defaults.swipeLeft)defaults.swipeLeft.call()}else if(curY>
startY){if(defaults.swipeBottom)defaults.swipeBottom.call()}else if(defaults.swipeTop)defaults.swipeTop.call()}try{$(this).on("touchstart",touchStart);$(this).on("touchmove",touchMove);$(this).on("touchend",touchEnd);$(this).on("touchcancel",touchCancel)}catch(e){}})}})(jQuery);jQuery.easing["jswing"]=jQuery.easing["swing"];
jQuery.extend(jQuery.easing,{def:"easeOutQuad",easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*
(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,
t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,
t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;
if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*2*Math.PI/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*0.3*1.5;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-0.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/
p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*t*t*(((s*=1.525)+1)*t-s)+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<1/2.75)return c*
7.5625*t*t+b;else if(t<2/2.75)return c*(7.5625*(t-=1.5/2.75)*t+0.75)+b;else if(t<2.5/2.75)return c*(7.5625*(t-=2.25/2.75)*t+0.9375)+b;else return c*(7.5625*(t-=2.625/2.75)*t+0.984375)+b},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*0.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}});if(typeof wonderplugincarouselObjects==="undefined")var wonderplugincarouselObjects=new function(){this.objects=[];this.addObject=function(obj){this.objects.push(obj)}};
if(typeof ASYouTubeIframeAPIReady==="undefined"){var ASYouTubeIframeAPIReady=false;var ASYouTubeTimeout=0;function onYouTubeIframeAPIReady(){ASYouTubeIframeAPIReady=true}}if(typeof wonderplugincarouselId==="undefined")var wonderplugincarouselId=0;
(function($){$.fn.wonderplugincarouselslider=function(options){options=options||{};options=$.extend({},{initsocialmedia:true},options);this.each(function(){if($(this).data("donotinit")&&(!options||!options["forceinit"]))return;if($(this).data("inited"))return;$(this).data("inited",1);var defaultOptions={lightboxenablepdfjs:false,lightboxpdfjsengine:"",lightboxresponsive:true,lightboxshownavigation:false,lightboxshowtitle:true,lightboxshowdescription:false,lightboxfullscreenmode:false,lightboxcloseonoverlay:true,
lightboxvideohidecontrols:false,lightboxtitlestyle:"bottom",lightboximagepercentage:75,lightboxdefaultvideovolume:1,lightboxoverlaybgcolor:"#000",lightboxoverlayopacity:0.9,lightboxbgcolor:"#fff",lightboxtitleprefix:"%NUM / %TOTAL",lightboxtitleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;",lightboxdescriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",
lightboxthumbwidth:90,lightboxthumbheight:60,lightboxthumbtopmargin:12,lightboxthumbbottommargin:4,lightboxbarheight:64,lightboxtitlebottomcss:"{color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;}",lightboxdescriptionbottomcss:"{color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;}",lightboxautoslide:false,lightboxslideinterval:5E3,lightboxshowtimer:true,lightboxtimerposition:"bottom",
lightboxtimerheight:2,lightboxtimercolor:"#dc572e",lightboxtimeropacity:1,lightboxshowplaybutton:true,lightboxalwaysshownavarrows:false,lightboxbordersize:8,lightboxshowtitleprefix:true,lightboxborderradius:0,lightboximagekeepratio:true,lightboxshowsocial:false,lightboxsocialposition:"position:absolute;top:100%;right:0;",lightboxsocialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",lightboxsocialdirection:"horizontal",lightboxsocialbuttonsize:32,lightboxsocialbuttonfontsize:18,lightboxsocialrotateeffect:true,
lightboxshowfacebook:true,lightboxshowtwitter:true,lightboxshowpinterest:true};this.lightboxoptions=$.extend({},defaultOptions,options);var instance=this;$.each($(this).data(),function(key,value){instance.lightboxoptions[key.toLowerCase()]=value});var carouselLightboxOptions={enablepdfjs:this.lightboxoptions.lightboxenablepdfjs,pdfjsengine:this.lightboxoptions.lightboxpdfjsengine,responsive:this.lightboxoptions.lightboxresponsive,shownavigation:this.lightboxoptions.lightboxshownavigation,showtitle:this.lightboxoptions.lightboxshowtitle,
showdescription:this.lightboxoptions.lightboxshowdescription,thumbwidth:this.lightboxoptions.lightboxthumbwidth,thumbheight:this.lightboxoptions.lightboxthumbheight,thumbtopmargin:this.lightboxoptions.lightboxthumbtopmargin,thumbbottommargin:this.lightboxoptions.lightboxthumbbottommargin,barheight:this.lightboxoptions.lightboxbarheight,titlebottomcss:this.lightboxoptions.lightboxtitlebottomcss,descriptionbottomcss:this.lightboxoptions.lightboxdescriptionbottomcss,fullscreenmode:this.lightboxoptions.lightboxfullscreenmode,
closeonoverlay:this.lightboxoptions.lightboxcloseonoverlay,videohidecontrols:this.lightboxoptions.lightboxvideohidecontrols,titlestyle:this.lightboxoptions.lightboxtitlestyle,imagepercentage:this.lightboxoptions.lightboximagepercentage,defaultvideovolume:this.lightboxoptions.lightboxdefaultvideovolume,overlaybgcolor:this.lightboxoptions.lightboxoverlaybgcolor,overlayopacity:this.lightboxoptions.lightboxoverlayopacity,bgcolor:this.lightboxoptions.lightboxbgcolor,titleprefix:this.lightboxoptions.lightboxtitleprefix,
titleinsidecss:this.lightboxoptions.lightboxtitleinsidecss,descriptioninsidecss:this.lightboxoptions.lightboxdescriptioninsidecss,autoslide:this.lightboxoptions.lightboxautoslide,slideinterval:this.lightboxoptions.lightboxslideinterval,showtimer:this.lightboxoptions.lightboxshowtimer,timerposition:this.lightboxoptions.lightboxtimerposition,timerheight:this.lightboxoptions.lightboxtimerheight,timercolor:this.lightboxoptions.lightboxtimercolor,timeropacity:this.lightboxoptions.lightboxtimeropacity,
showplaybutton:this.lightboxoptions.lightboxshowplaybutton,alwaysshownavarrows:this.lightboxoptions.lightboxalwaysshownavarrows,bordersize:this.lightboxoptions.lightboxbordersize,showtitleprefix:this.lightboxoptions.lightboxshowtitleprefix,borderradius:this.lightboxoptions.lightboxborderradius,imagekeepratio:this.lightboxoptions.lightboximagekeepratio,showsocial:this.lightboxoptions.lightboxshowsocial,socialposition:this.lightboxoptions.lightboxsocialposition,socialpositionsmallscreen:this.lightboxoptions.lightboxsocialpositionsmallscreen,
socialdirection:this.lightboxoptions.lightboxsocialdirection,socialbuttonsize:this.lightboxoptions.lightboxsocialbuttonsize,socialbuttonfontsize:this.lightboxoptions.lightboxsocialbuttonfontsize,socialrotateeffect:this.lightboxoptions.lightboxsocialrotateeffect,showfacebook:this.lightboxoptions.lightboxshowfacebook,showtwitter:this.lightboxoptions.lightboxshowtwitter,showpinterest:this.lightboxoptions.lightboxshowpinterest};if($("#wpcarousellightbox_advanced_options").length)$.each($("#wpcarousellightbox_advanced_options").data(),
function(key,value){carouselLightboxOptions[key.toLowerCase()]=value});if($("#wpcarousellightbox_advanced_options_"+instance.lightboxoptions.carouselid).length)$.each($("#wpcarousellightbox_advanced_options_"+instance.lightboxoptions.carouselid).data(),function(key,value){carouselLightboxOptions[key.toLowerCase()]=value});if(typeof wonderplugincarouselLightbox==="undefined")wonderplugincarouselLightbox={};wonderplugincarouselLightbox[this.lightboxoptions.carouselid]=$(".wondercarousellightbox-"+this.lightboxoptions.carouselid).wondercarousellightbox(carouselLightboxOptions);
options.lightboxobject=wonderplugincarouselLightbox[this.lightboxoptions.carouselid];$(this).wonderplugincarousel(options)})}})(jQuery);jQuery(document).ready(function(){jQuery(".wonderplugin-engine").css({display:"none"});jQuery(".wonderplugincarousel").wonderplugincarouselslider()});
// source --> https://mermaiddigital.com/wp-content/plugins/wonderplugin-gridgallery/engine/wonderplugingridlightbox.js?ver=13.2 
/** Wonderplugin Portfolio Grid Gallery Plugin Free Version
 * Copyright 2018 Magic Hills Pty Ltd All Rights Reserved
 * Website: http://www.wonderplugin.com
 * Version 13.2 
 */
(function(){var scripts=document.getElementsByTagName("script");var jsFolder="";for(var i=0;i<scripts.length;i++)if(scripts[i].src&&scripts[i].src.match(/html5lightbox\.js/i))jsFolder=scripts[i].src.substr(0,scripts[i].src.lastIndexOf("/")+1);var loadjQuery=false;if(typeof jQuery=="undefined")loadjQuery=true;else{var jVersion=jQuery.fn.jquery.split(".");if(jVersion[0]<1||jVersion[0]==1&&jVersion[1]<6)loadjQuery=true}if(loadjQuery){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");
script.setAttribute("type","text/javascript");if(script.readyState)script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;loadWPGridHtml5LightBox(jsFolder)}};else script.onload=function(){loadWPGridHtml5LightBox(jsFolder)};script.setAttribute("src",jsFolder+"jquery.js");head.appendChild(script)}else loadWPGridHtml5LightBox(jsFolder)})();
function loadWPGridHtml5LightBox(jsFolder){(function($){$.fn.wonderplugingridlightbox=function(options){var inst=this;inst.options=$.extend({freelink:"http://www.wonderplugin.com/wordpress-gridgallery/",defaultvideovolume:1,autoclose:false,autoclosedelay:0,resizedelay:100,insideiframe:false,autoresizecontent:true,defaultwidth:960,defaultheight:540,usedefaultsizeforcontent:false,preload:true,preloadallonpageload:false,preloadalldelay:5E3,autoplay:true,loopvideo:false,html5player:true,responsive:true,nativehtml5controls:false,videohidecontrols:false,
nativecontrolsonfirefox:false,nativecontrolsonie:false,nativecontrolsoniphone:true,nativecontrolsonipad:true,nativecontrolsonandroid:true,nativecontrolsonfullscreen:true,nativecontrolsnodownload:true,imagekeepratio:true,maxheight:false,elemautoheight:false,useflashonie9:true,useflashonie10:true,useflashonie11:false,useflashformp4onfirefox:false,transition:"none",transitionduration:400,enablepdfjs:true,pdfjsengine:"",openpdfinnewtaboniphone:false,openpdfinnewtabonipad:false,googleanalyticsaccount:"",
arrowloop:true,showall:false,userelforgroup:true,shownavigation:true,thumbwidth:96,thumbheight:72,thumbgap:4,thumbtopmargin:12,thumbbottommargin:12,thumbborder:1,thumbbordercolor:"transparent",thumbhighlightbordercolor:"#fff",thumbopacity:1,navbuttonwidth:32,navbgcolor:"rgba(0,0,0,0.2)",shownavcontrol:true,navcontrolimage:"lightbox-navcontrol.png",hidenavdefault:false,overlaybgcolor:"#000",overlayopacity:0.9,bgcolor:"#fff",bordersize:8,borderradius:0,bordermargin:16,bordertopmargin:48,barautoheight:true,
barheight:64,smallscreenheight:415,responsivebarheight:false,barheightonsmallheight:64,notkeepratioonsmallheight:false,bordertopmarginsmall:36,loadingwidth:64,loadingheight:64,resizespeed:400,fadespeed:0,jsfolder:jsFolder,skinsfoldername:"skins/default/",loadingimage:"lightbox-loading.gif",nextimage:"lightbox-next.png",previmage:"lightbox-prev.png",closeimage:"lightbox-close.png",playvideoimage:"lightbox-playvideo.png",titlebgimage:"lightbox-titlebg.png",navarrowsprevimage:"lightbox-navprev.png",
navarrowsnextimage:"lightbox-navnext.png",navarrowsalwaysshowontouch:true,navarrowsbottomscreenwidth:479,closeonoverlay:true,alwaysshownavarrows:false,showplaybutton:true,playimage:"lightbox-play.png",pauseimage:"lightbox-pause.png",fullscreenmode:false,fullscreencloseimage:"lightbox-close-fullscreen.png",fullscreennextimage:"lightbox-next-fullscreen.png",fullscreenprevimage:"lightbox-prev-fullscreen.png",fullscreennomargin:false,fullscreenmodeonsmallscreen:false,fullscreennomarginonsmallscreen:false,
fullscreensmallscreenwidth:800,fullscreenbgcolor:"rgba(0, 0, 0, 0.9)",fullscreenbordersize:0,fullscreentextinside:false,videobgcolor:"#000",html5videoposter:"",showtitle:true,titlestyle:"bottom",titleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px;",titlebottomcss:"color:#333; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;",showonmouseoverinside:false,showinsidetitleforimageonly:true,
showdescription:true,descriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",descriptionbottomcss:"color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",fullscreentitlebottomcss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px 8px;",fullscreendescriptionbottomcss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",
showsocialmedia:true,socialmediaposition:"position:absolute;top:8px;right:8px;",showtitleprefix:true,titleprefix:"%NUM / %TOTAL",autoslide:false,slideinterval:5E3,showtimer:true,timerposition:"bottom",timerheight:2,timercolor:"#dc572e",timeropacity:1,initvimeo:true,inityoutube:true,swipepreventdefaultonandroid:false,initsocial:true,showsocial:false,socialposition:"position:absolute;top:100%;right:0;",socialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",socialdirection:"horizontal",
socialbuttonsize:32,socialbuttonfontsize:18,socialrotateeffect:true,showfacebook:true,showtwitter:true,showpinterest:true,showemail:false,imagepercentage:75,sidetobottomscreenwidth:479,errorwidth:280,errorheight:48,errorcss:"text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;",enabletouchswipe:true,mobileresizeevent:false,swipedistance:0,bodynoscroll:false,useabsolutepos:false,useabsoluteposonmobile:false,supportesckey:true,supportarrowkeys:true,version:"3.3",stamp:true,
freemark:"87,111,114,100,80,114,101,115,115,32,71,97,108,108,101,114,121,32,70,114,101,101,32,86,101,114,115,105,111,110",watermark:"",watermarklink:""},options);if(typeof wondergridgallerylightbox_options!="undefined"&&wondergridgallerylightbox_options)$.extend(inst.options,wondergridgallerylightbox_options);if($("div.wondergridgallerylightbox_options").length)$.each($("div.wondergridgallerylightbox_options").data(),function(key,value){inst.options[key.toLowerCase()]=value});if($("div#wondergridgallerylightbox_options").length)$.each($("div#wondergridgallerylightbox_options").data(),function(key,
value){inst.options[key.toLowerCase()]=value});if($("div#html5lightbox_general_options").length)$.each($("div#html5lightbox_general_options").data(),function(key,value){inst.options[key.toLowerCase()]=value});var ELEM_TYPE=0,ELEM_HREF=1,ELEM_TITLE=2,ELEM_GROUP=3,ELEM_WIDTH=4,ELEM_HEIGHT=5,ELEM_HREF_WEBM=6,ELEM_HREF_OGG=7,ELEM_THUMBNAIL=8,ELEM_DESCRIPTION=9,ELEM_DIV=10,ELEM_ORIGINALWIDTH=11,ELEM_ORIGINALHEIGHT=12,ELEM_SOCIALMEDIA=13;inst.options.types=["IMAGE","FLASH","VIDEO","YOUTUBE","VIMEO","PDF",
"MP3","WEB","FLV","DAILYMOTION","DIV","WISTIA","IFRAMEVIDEO"];inst.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1);inst.options.skinsfolder=inst.options.skinsfoldername;if(inst.options.skinsfolder.length>0&&inst.options.skinsfolder[inst.options.skinsfolder.length-1]!="/")inst.options.skinsfolder+="/";if(inst.options.skinsfolder.charAt(0)!="/"&&inst.options.skinsfolder.substring(0,5)!="http:"&&inst.options.skinsfolder.substring(0,6)!="https:")inst.options.skinsfolder=
inst.options.jsfolder+inst.options.skinsfolder;var image_list=["loadingimage","nextimage","previmage","closeimage","playvideoimage","titlebgimage","navarrowsprevimage","navarrowsnextimage","navcontrolimage","playimage","pauseimage","fullscreencloseimage","fullscreennextimage","fullscreenprevimage"];for(var i=0;i<image_list.length;i++)if(inst.options[image_list[i]])if(inst.options[image_list[i]].substring(0,7).toLowerCase()!="http://"&&inst.options[image_list[i]].substring(0,8).toLowerCase()!="https://")inst.options[image_list[i]]=
inst.options.skinsfolder+inst.options[image_list[i]];var i;var l;var mark="";var bytes=inst.options.freemark.split(",");for(i=0;i<bytes.length;i++)mark+=String.fromCharCode(bytes[i]);inst.options.freemark=mark;var d0="wmoangdiecrpluginh.iclolms";for(i=1;i<=5;i++)d0=d0.slice(0,i)+d0.slice(i+1);l=d0.length;for(i=0;i<5;i++)d0=d0.slice(0,l-9+i)+d0.slice(l-8+i);if(inst.options.htmlfolder.indexOf(d0)!=-1)inst.options.stamp=false;inst.options.flashInstalled=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))inst.options.flashInstalled=
true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])inst.options.flashInstalled=true}inst.options.html5VideoSupported=!!document.createElement("video").canPlayType;inst.options.isChrome=navigator.userAgent.match(/Chrome/i)!=null;inst.options.isFirefox=navigator.userAgent.match(/Firefox/i)!=null;inst.options.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;inst.options.isSafari=navigator.userAgent.match(/Safari/i)!=null;inst.options.isIE11=
navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;inst.options.isIE=navigator.userAgent.match(/MSIE/i)!=null&&!inst.options.isOpera;inst.options.isIE10=navigator.userAgent.match(/MSIE 10/i)!=null&&!this.options.isOpera;inst.options.isIE9=navigator.userAgent.match(/MSIE 9/i)!=null&&!inst.options.isOpera;inst.options.isIE8=navigator.userAgent.match(/MSIE 8/i)!=null&&!inst.options.isOpera;inst.options.isIE7=navigator.userAgent.match(/MSIE 7/i)!=null&&!inst.options.isOpera;
inst.options.isIE6=navigator.userAgent.match(/MSIE 6/i)!=null&&!inst.options.isOpera;inst.options.isIE678=inst.options.isIE6||inst.options.isIE7||inst.options.isIE8;inst.options.isIE6789=inst.options.isIE6||inst.options.isIE7||inst.options.isIE8||inst.options.isIE9;inst.options.isAndroid=navigator.userAgent.match(/Android/i)!=null;inst.options.isIPad=navigator.userAgent.match(/iPad/i)!=null;inst.options.isIPhone=navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;
inst.options.isIOS=inst.options.isIPad||inst.options.isIPhone;inst.options.isMobile=inst.options.isAndroid||inst.options.isIPad||inst.options.isIPhone;inst.options.isIOSLess5=inst.options.isIPad&&inst.options.isIPhone&&(navigator.userAgent.match(/OS 4/i)!=null||navigator.userAgent.match(/OS 3/i)!=null);inst.options.supportCSSPositionFixed=!inst.options.isIE6&&!inst.options.isIOSLess5;inst.options.iequirksmode=inst.options.isIE6789&&document.compatMode!="CSS1Compat";inst.options.isTouch="ontouchstart"in
window;if(inst.options.isChrome){var match=navigator.userAgent.match(/Chrome\/([0-9]+)/);inst.options.chromeVersion=match&&match.length>=2?parseInt(match[1],10):0}if(inst.options.isAndroid){var match=navigator.userAgent.match(/Android\s([0-9\.]*)/i);inst.options.androidVersion=match&&match.length>=2?parseInt(match[1],10):-1}var v=document.createElement("video");inst.options.canplaymp4=v&&v.canPlayType&&v.canPlayType("video/mp4").replace(/no/,"");if(inst.options.isFirefox&&inst.options.nativecontrolsonfirefox||
(inst.options.isIE6789||inst.options.isIE10||inst.options.isIE11)&&inst.options.nativecontrolsonie||inst.options.isIPhone&&inst.options.nativecontrolsoniphone||inst.options.isIPad&&inst.options.nativecontrolsonipad||inst.options.isAndroid&&inst.options.nativecontrolsonandroid)inst.options.nativehtml5controls=true;if(inst.options.isIOS||inst.options.isAndroid)inst.options.nativecontrolsonfullscreen=true;inst.options.navheight=0;inst.options.thumbgap+=2*inst.options.thumbborder;inst.options.resizeTimeout=
-1;inst.slideTimeout=null;inst.autosliding=false;inst.existingElem=-1;inst.direction=-3;inst.elemArray=new Array;inst.options.curElem=-1;inst.defaultoptions=$.extend({},inst.options);if(inst.options.googleanalyticsaccount&&!window._gaq){window._gaq=window._gaq||[];window._gaq.push(["_setAccount",inst.options.googleanalyticsaccount]);window._gaq.push(["_trackPageview"]);$.getScript("https://ssl.google-analytics.com/ga.js")}if(inst.options.initvimeo){var tag=document.createElement("script");tag.src=
inst.options.jsfolder+"froogaloop2.min.js";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}if(inst.options.inityoutube){var tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}if(inst.options.initsocial)$("head").append('<link rel="stylesheet" href="'+inst.options.jsfolder+'icons/css/fontello.css" type="text/css" />');
inst.showing=false;inst.navvisible=false;inst.disableEscKey=function(isFullscreen){if(isFullscreen)inst.disableesckeyinfullscreen=true;else setTimeout(function(){inst.disableesckeyinfullscreen=false},1E3)};inst.supportKeyboard=function(){inst.disableesckeyinfullscreen=false;$(document).keyup(function(e){if(!inst.showing)return;if(!inst.disableesckeyinfullscreen&&inst.options.supportesckey&&e.keyCode==27)inst.finish();else if(inst.options.supportarrowkeys)if(e.keyCode==39)inst.gotoSlide(-1);else if(e.keyCode==
37)inst.gotoSlide(-2)});if(inst.options.supportesckey){document.addEventListener("MSFullscreenChange",function(){inst.disableEscKey(document.msFullscreenElement!=null)},false);document.addEventListener("webkitfullscreenchange",function(){inst.disableEscKey(document.webkitIsFullScreen)},false)}};inst.supportKeyboard();inst.init=function(){inst.showing=false;inst.readData();inst.createMarkup();inst.initSlide()};inst.readData=function(){inst.each(function(){if(this.nodeName.toLowerCase()!="a"&&this.nodeName.toLowerCase()!=
"area")return;var $this=$(this);var fileType="mediatype"in $this.data()?$this.data("mediatype"):inst.checkType($this.attr("href"));if(fileType<0)return;var title=$this.data("title")?$this.data("title"):$this.attr("title");var group=$this.data("group")?$this.data("group"):inst.options.userelforgroup?$this.attr("rel"):null;for(var i=0;i<inst.elemArray.length;i++)if($this.attr("href")==inst.elemArray[i][ELEM_HREF]){inst.elemArray[i][ELEM_TITLE]=title;inst.elemArray[i][ELEM_GROUP]=group;return}inst.elemArray.push(new Array(fileType,
$this.attr("href"),title,group,$this.data("width"),$this.data("height"),$this.data("webm"),$this.data("ogg"),$this.data("thumbnail"),$this.data("description"),null,null,null,$this.data("socialmedia")))})};inst.createMarkup=function(){if($(window).width()<=inst.options.fullscreensmallscreenwidth){if(inst.options.fullscreenmodeonsmallscreen){inst.options.fullscreenmode=true;if(inst.options.fullscreennomarginonsmallscreen)inst.options.fullscreennomargin=true}if(inst.options.fullscreenmode&&inst.options.fullscreennomarginonsmallscreen)inst.options.fullscreennomargin=
true}if(inst.options.fullscreenmode){inst.options.bgcolor=inst.options.fullscreenbgcolor;inst.options.bordersize=inst.options.fullscreenbordersize;if(inst.options.fullscreennomargin){inst.options.bordersize=0;inst.options.bordermargin=0;inst.options.bordertopmargin=0;inst.options.bordertopmarginsmall=0}if(inst.options.fullscreentextinside){inst.options.titlestyle="inside";inst.options.titlecss=inst.options.titleinsidecss;inst.options.descriptioncss=inst.options.descriptioninsidecss}else{inst.options.titlebottomcss=
inst.options.fullscreentitlebottomcss;inst.options.descriptionbottomcss=inst.options.fullscreendescriptionbottomcss}}inst.options.barheightoriginal=inst.options.barheight;if(inst.options.responsivebarheight){var winH=$(window).height();if(winH<=inst.options.smallscreenheight)inst.options.barheight=inst.options.barheightonsmallheight}if(!inst.options.titlecss)inst.options.titlecss=inst.options.titlestyle=="inside"?inst.options.titleinsidecss:inst.options.titlebottomcss;if(!inst.options.descriptioncss)inst.options.descriptioncss=
inst.options.titlestyle=="inside"?inst.options.descriptioninsidecss:inst.options.descriptionbottomcss;inst.options.titlecss=$.trim(inst.options.titlecss);if(inst.options.titlecss.length>1){if(inst.options.titlecss.charAt(0)=="{")inst.options.titlecss=inst.options.titlecss.substring(1);if(inst.options.titlecss.charAt(inst.options.titlecss.length-1)=="}")inst.options.titlecss=inst.options.titlecss.substring(0,inst.options.titlecss.length-1)}inst.options.descriptioncss=$.trim(inst.options.descriptioncss);
if(inst.options.descriptioncss.length>1){if(inst.options.descriptioncss.charAt(0)=="{")inst.options.descriptioncss=inst.options.descriptioncss.substring(1);if(inst.options.descriptioncss.charAt(inst.options.descriptioncss.length-1)=="}")inst.options.descriptioncss=inst.options.descriptioncss.substring(0,inst.options.descriptioncss.length-1)}inst.options.errorcss=$.trim(inst.options.errorcss);if(inst.options.errorcss.length>1){if(inst.options.errorcss.charAt(0)=="{")inst.options.errorcss=inst.options.errorcss.substring(1);
if(inst.options.errorcss.charAt(inst.options.errorcss.length-1)=="}")inst.options.errorcss=inst.options.errorcss.substring(0,inst.options.errorcss.length-1)}var styleCss=".bodynoscroll {height:100%;overflow:hidden;}";styleCss+=".html5-hide {display:none !important;} #gridgallery-html5-lightbox .html5-text {"+inst.options.titlecss+"}";styleCss+="#gridgallery-html5-lightbox .html5-description {"+inst.options.descriptioncss+"}";styleCss+="#gridgallery-html5-lightbox .html5-error {"+inst.options.errorcss+"}";
if(inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows){styleCss+="#gridgallery-html5-lightbox .html5-prev-touch {left:0px;top:50%;margin-top:-16px;margin-left:-32px;} #gridgallery-html5-lightbox .html5-next-touch {right:0px;top:50%;margin-top:-16px;margin-right:-32px;}";styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) { #gridgallery-html5-lightbox .html5-prev-touch {top:100%;left:0;margin:0;} #gridgallery-html5-lightbox .html5-next-touch {top:100%;right:0;margin:0;} }"}styleCss+=
"#gridgallery-html5-lightbox .html5-prev-fullscreen {display:block;} #gridgallery-html5-lightbox .html5-next-fullscreen {display:block;} #gridgallery-html5-lightbox .html5-prev-bottom-fullscreen {display:none;} #gridgallery-html5-lightbox .html5-next-bottom-fullscreen {display:none;}";styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) {#gridgallery-html5-lightbox .html5-prev-fullscreen {display:none;} #gridgallery-html5-lightbox .html5-next-fullscreen {display:none;} #gridgallery-html5-lightbox .html5-prev-bottom-fullscreen {display:block;} #gridgallery-html5-lightbox .html5-next-bottom-fullscreen {display:block;} }";
if(inst.options.titlestyle=="right"){styleCss+="#gridgallery-html5-lightbox .html5-elem-wrap {width:"+inst.options.imagepercentage+"%;height:100%;} #gridgallery-html5-lightbox .html5-elem-data-box {min-height:100%;}";styleCss+="@media (max-width: "+inst.options.sidetobottomscreenwidth+"px) {#gridgallery-html5-lightbox .html5-elem-wrap {width:100%;height:auto;} #gridgallery-html5-lightbox .html5-elem-data-box {width:100%;height:auto;min-height:0;}}"}else if(inst.options.titlestyle=="left"){styleCss+="#gridgallery-html5-lightbox .html5-elem-wrap {height:100%;} #gridgallery-html5-lightbox .html5-elem-data-box {width:"+
String(100-inst.options.imagepercentage)+"%;min-height:100%;}";styleCss+="@media (max-width: "+inst.options.sidetobottomscreenwidth+"px) {#gridgallery-html5-lightbox .html5-elem-wrap {width:100%;height:auto;} #gridgallery-html5-lightbox .html5-elem-data-box {width:100%;height:auto;min-height:0;}}"}styleCss+=".html5-rotate { border-radius:50%; -webkit-transition:-webkit-transform .4s ease-in; transition: transform .4s ease-in; } .html5-rotate:hover { -webkit-transform: rotate(360deg); transform: rotate(360deg); }";
styleCss+="@media (max-width: "+inst.options.navarrowsbottomscreenwidth+"px) {#html5-social {"+inst.options.socialpositionsmallscreen+"}}";$("head").append("<style type='text/css' data-creator='gridgallery-html5-lightbox'>"+styleCss+"</style>");var elemheight=inst.options.elemautoheight?"auto":"100%";inst.$lightbox=$("<div id='gridgallery-html5-lightbox' style='display:none;top:0px;left:0px;width:100%;height:100%;z-index:9999998;text-align:center;'>"+"<div id='html5-lightbox-overlay' style='display:block;position:absolute;top:0px;left:0px;width:100%;min-height:100%;background-color:"+
inst.options.overlaybgcolor+";opacity:"+inst.options.overlayopacity+";filter:alpha(opacity="+Math.round(inst.options.overlayopacity*100)+");'></div>"+"<div id='html5-lightbox-box' style='display:block;position:relative;margin:0px auto;'>"+"<div class='html5-elem-box' style='display:block;position:relative;width:100%;overflow-x:hidden;overflow-y:auto;height:"+elemheight+";margin:0px auto;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;'>"+"<div class='html5-elem-wrap' style='display:block;position:relative;margin:0px auto;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;background-color:"+
inst.options.bgcolor+";'>"+"<div class='html5-loading' style='display:none;position:absolute;top:0px;left:0px;text-align:center;width:100%;height:100%;background:url(\""+inst.options.loadingimage+"\") no-repeat center center;'></div>"+"<div class='html5-error-box html5-error' style='display:none;position:absolute;padding:"+inst.options.bordersize+"px;text-align:center;width:"+inst.options.errorwidth+"px;height:"+inst.options.errorheight+"px;'>"+"The requested content cannot be loaded.<br />Please try again later."+
"</div>"+"<div class='html5-image' style='display:none;position:relative;top:0px;left:0px;width:100%;height:100%;"+(inst.options.iequirksmode?"margin":"padding")+":"+inst.options.bordersize+"px;text-align:center;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;'></div>"+"</div>"+"</div>"+"<div id='html5-watermark' style='display:none;position:absolute;left:"+String(inst.options.bordersize+2)+"px;top:"+String(inst.options.bordersize+2)+"px;'></div>"+"</div>"+"</div>");
inst.options.positionFixed=inst.options.supportCSSPositionFixed&&inst.options.responsive&&!inst.options.iequirksmode;if(inst.options.useabsolutepos||inst.options.useabsoluteposonmobile&&inst.options.isMobile)inst.options.positionFixed=false;if(!inst.options.positionFixed)inst.options.bodynoscroll=true;inst.$lightbox.css({position:inst.options.positionFixed?"fixed":"absolute"});inst.$lightbox.appendTo("body");inst.$lightboxBox=$("#html5-lightbox-box",inst.$lightbox);inst.$elem=$(".html5-elem-box",
inst.$lightbox);inst.$elemWrap=$(".html5-elem-wrap",inst.$lightbox);inst.$loading=$(".html5-loading",inst.$lightbox);inst.$error=$(".html5-error-box",inst.$lightbox);inst.$image=$(".html5-image",inst.$lightbox);if(inst.options.fullscreenmode&&inst.options.fullscreennomargin)inst.$elem.css({overflow:"hidden"});var elemText="<div class='html5-elem-data-box' style='display:none;box-sizing:border-box;'><div class='html5-text' style='display:block;overflow:hidden;'></div></div>";if(inst.options.titlestyle==
"left")inst.$elem.prepend(elemText);else inst.$elem.append(elemText);inst.$elemData=$(".html5-elem-data-box",inst.$lightbox);inst.$text=$(".html5-text",inst.$lightbox);if(inst.options.borderradius>0){inst.$elem.css({"border-radius":inst.options.borderradius+"px","-moz-border-radius":inst.options.borderradius+"px","-webkit-border-radius":inst.options.borderradius+"px"});if(inst.options.titlestyle=="inside")inst.$elemWrap.css({"border-radius":inst.options.borderradius+"px","-moz-border-radius":inst.options.borderradius+
"px","-webkit-border-radius":inst.options.borderradius+"px"});else if(inst.options.titlestyle=="bottom"){inst.$elemWrap.css({"border-top-left-radius":inst.options.borderradius+"px","-moz-top-left-border-radius":inst.options.borderradius+"px","-webkit-top-left-border-radius":inst.options.borderradius+"px","border-top-right-radius":inst.options.borderradius+"px","-moz-top-right-border-radius":inst.options.borderradius+"px","-webkit-top-right-border-radius":inst.options.borderradius+"px"});inst.$elemData.css({"border-bottom-left-radius":inst.options.borderradius+
"px","-moz-top-bottom-border-radius":inst.options.borderradius+"px","-webkit-bottom-left-border-radius":inst.options.borderradius+"px","border-bottom-right-radius":inst.options.borderradius+"px","-moz-bottom-right-border-radius":inst.options.borderradius+"px","-webkit-bottom-right-border-radius":inst.options.borderradius+"px"})}}if(inst.options.titlestyle=="right"||inst.options.titlestyle=="left"){inst.$lightboxBox.css({"background-color":inst.options.bgcolor});if(inst.options.titlestyle=="right"){inst.$elemWrap.css({position:"relative",
"float":"left"});inst.$elemData.css({position:"relative",overflow:"hidden",padding:inst.options.bordersize+"px"})}else{inst.$elemWrap.css({position:"relative",overflow:"hidden"});inst.$elemData.css({position:"relative","float":"left",padding:inst.options.bordersize+"px"})}}else if(inst.options.titlestyle=="inside"){inst.$elemData.css({position:"absolute",margin:inst.options.bordersize+"px",bottom:0,left:0,"background-color":"#333","background-color":"rgba(51, 51, 51, 0.6)"});if(inst.options.showonmouseoverinside)inst.$elemData.css({opacity:0});
inst.$text.css({padding:inst.options.bordersize+"px "+2*inst.options.bordersize+"px"})}else{inst.$elemData.css({position:"relative",width:"100%",height:inst.options.barautoheight?"auto":inst.options.barheight+"px","padding":"0 0 "+inst.options.bordersize+"px"+" 0","background-color":inst.options.bgcolor,"text-align":"left"});if(!inst.options.fullscreenmode||!inst.options.fullscreennomargin)inst.$text.css({"margin":"0 "+inst.options.bordersize+"px"})}if(inst.options.showsocial){var socialCode='<div id="html5-social" style="display:none;'+
inst.options.socialposition+'">';var socialBtnCSS=(inst.options.socialdirection=="horizontal"?"display:inline-block;":"display:block;")+"margin:4px;";var socialCSS="display:table-cell;width:"+inst.options.socialbuttonsize+"px;height:"+inst.options.socialbuttonsize+"px;font-size:"+inst.options.socialbuttonfontsize+"px;border-radius:50%;color:#fff;vertical-align:middle;text-align:center;cursor:pointer;padding:0;";if(inst.options.showemail)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?
" html5-rotate":"")+' html5-social-email" style="'+socialBtnCSS+'"><div class="mh-icon-mail" style="'+socialCSS+'background-color:#4d83ff;"></div></div>';if(inst.options.showfacebook)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?" html5-rotate":"")+' html5-social-facebook" style="'+socialBtnCSS+'"><div class="mh-icon-facebook" style="'+socialCSS+'background-color:#3b5998;"></div></div>';if(inst.options.showtwitter)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?
" html5-rotate":"")+' html5-social-twitter" style="'+socialBtnCSS+'"><div class="mh-icon-twitter" style="'+socialCSS+'background-color:#03b3ee;"></div></div>';if(inst.options.showpinterest)socialCode+='<div class="html5-social-btn'+(inst.options.socialrotateeffect?" html5-rotate":"")+' html5-social-pinterest" style="'+socialBtnCSS+'"><div class="mh-icon-pinterest" style="'+socialCSS+'background-color:#c92228;"></div></div>';socialCode+='<div style="clear:both;"></div></div>';inst.$lightboxBox.append(socialCode);
$(".html5-social-btn",inst.$lightbox).click(function(){var shareUrl=window.location.href+(window.location.href.indexOf("?")<0?"?":"&")+"wpgridlightboxshare="+encodeURIComponent(inst.currentElem[ELEM_HREF]);var shareTitle=inst.currentElem[ELEM_TITLE];var shareMedia=inst.currentElem[ELEM_HREF];if(inst.currentElem[ELEM_TYPE]==0)shareMedia=inst.absoluteUrl(inst.currentElem[ELEM_HREF]);else if(inst.currentElem[ELEM_TYPE]==3)shareMedia="https://img.youtube.com/vi/"+inst.getYoutubeId(inst.currentElem[ELEM_HREF])+
"/0.jpg";else{var lightboxLink=$('.wpgridlightbox[href="'+inst.currentElem[ELEM_HREF]+'"]');if(lightboxLink.length>0)if(lightboxLink.data("shareimage")&&lightboxLink.data("shareimage").length>0)shareMedia=inst.absoluteUrl(lightboxLink.data("shareimage"));else if(lightboxLink.data("thumbnail")&&lightboxLink.data("thumbnail").length>0)shareMedia=inst.absoluteUrl(lightboxLink.data("thumbnail"));else{var lightboxImg=$("img",lightboxLink);if(lightboxImg.length>0)shareMedia=inst.absoluteUrl(lightboxImg.attr("src"))}}var isVideo=
inst.currentElem[ELEM_TYPE]==2||inst.currentElem[ELEM_TYPE]==3||inst.currentElem[ELEM_TYPE]==4||inst.currentElem[ELEM_TYPE]==8||inst.currentElem[ELEM_TYPE]==9||inst.currentElem[ELEM_TYPE]==11||inst.currentElem[ELEM_TYPE]==12;if(!shareTitle)shareTitle="";else shareTitle=inst.html2Text(shareTitle);if($(this).hasClass("html5-social-facebook"))window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(shareUrl)+"&t="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5-social-twitter"))window.open("https://twitter.com/share?url="+
encodeURIComponent(shareUrl)+"&text="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5-social-pinterest"))window.open("https://pinterest.com/pin/create/bookmarklet/?media="+encodeURIComponent(shareMedia)+"&url="+encodeURIComponent(shareUrl)+"&description="+encodeURIComponent(shareTitle)+"&is_video="+(isVideo?"true":"false"),"_blank");else if($(this).hasClass("html5-social-email"))window.open("mailto:?subject="+encodeURIComponent(shareTitle)+"&body=Check out this: "+encodeURIComponent(shareUrl));
return false})}if(inst.options.fullscreenmode){inst.$lightbox.append("<div class='html5-next-fullscreen' style='cursor:pointer;position:absolute;right:"+inst.options.bordersize+"px;top:50%;margin-top:-16px;'><img alt='' src='"+inst.options.fullscreennextimage+"'></div>"+"<div class='html5-prev-fullscreen' style='cursor:pointer;position:absolute;left:"+inst.options.bordersize+"px;top:50%;margin-top:-16px;'><img alt='' src='"+inst.options.fullscreenprevimage+"'></div>");inst.$next=$(".html5-next-fullscreen",
inst.$lightbox);inst.$prev=$(".html5-prev-fullscreen",inst.$lightbox);inst.$lightboxBox.append("<div class='html5-next-bottom-fullscreen' style='cursor:pointer;position:absolute;top:100%;right:0;margin-top:8px;'><img alt='' src='"+inst.options.fullscreennextimage+"'></div>"+"<div class='html5-prev-bottom-fullscreen' style='cursor:pointer;position:absolute;top:100%;left:0;margin-top:8px;'><img alt='' src='"+inst.options.fullscreenprevimage+"'></div>");inst.$nextbottom=$(".html5-next-bottom-fullscreen",
inst.$lightbox);inst.$prevbottom=$(".html5-prev-bottom-fullscreen",inst.$lightbox);inst.$nextbottom.click(function(){inst.nextArrowClicked()});inst.$prevbottom.click(function(){inst.prevArrowClicked()});inst.$lightbox.append("<div id='html5-close-fullscreen' style='display:block;cursor:pointer;position:absolute;top:0;right:0;margin-top:0;margin-right:0;'><img alt='' src='"+inst.options.fullscreencloseimage+"'></div>");inst.$close=$("#html5-close-fullscreen",inst.$lightbox)}else{inst.$lightboxBox.append("<div class='html5-next' style='display:none;cursor:pointer;position:absolute;right:"+
inst.options.bordersize+"px;top:50%;margin-top:-32px;'><img alt='' src='"+inst.options.nextimage+"'></div>"+"<div class='html5-prev' style='display:none;cursor:pointer;position:absolute;left:"+inst.options.bordersize+"px;top:50%;margin-top:-32px;'><img alt='' src='"+inst.options.previmage+"'></div>");inst.$next=$(".html5-next",inst.$lightbox);inst.$prev=$(".html5-prev",inst.$lightbox);if(inst.options.isTouch&&inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows){inst.$lightboxBox.append("<div class='html5-next-touch' style='display:block;cursor:pointer;position:absolute;'><img alt='' src='"+
inst.options.nextimage+"'></div>"+"<div class='html5-prev-touch' style='display:block;cursor:pointer;position:absolute;'><img alt='' src='"+inst.options.previmage+"'></div>");inst.$nexttouch=$(".html5-next-touch",inst.$lightbox);inst.$prevtouch=$(".html5-prev-touch",inst.$lightbox);inst.$nexttouch.click(function(){inst.nextArrowClicked()});inst.$prevtouch.click(function(){inst.prevArrowClicked()})}inst.$lightboxBox.append("<div id='html5-close' style='display:none;cursor:pointer;position:absolute;top:0;right:0;margin-top:-16px;margin-right:-16px;'><img alt='' src='"+
inst.options.closeimage+"'></div>");inst.$close=$("#html5-close",inst.$lightbox)}if(inst.options.titlestyle=="inside"&&inst.options.showonmouseoverinside)inst.$lightboxBox.hover(function(){if(inst.currentElem[ELEM_TYPE]==0||!inst.options.showinsidetitleforimageonly)inst.$elemData.animate({opacity:1},400)},function(){inst.$elemData.animate({opacity:0},400)});inst.$watermark=$("#html5-watermark",inst.$lightbox);if(inst.options.stamp)inst.$watermark.html("<a href='"+inst.options.freelink+"' style='text-decoration:none;' title='WordPress Gallery'><div style='display:none;width:180px;height:20px;text-align:center;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;color:#333;font:12px Arial,sans-serif;'><div style='line-height:20px;'>"+
inst.options.freemark+"</div></div></a>");else if(inst.options.watermark){var html="<img alt='' src='"+inst.options.watermark+"' style='border:none;' />";if(inst.options.watermarklink)html="<a href='"+inst.options.watermarklink+"' target='_blank'>"+html+"</a>";inst.$watermark.html(html)}if(inst.options.closeonoverlay)$("#html5-lightbox-overlay",inst.$lightbox).click(inst.finish);inst.$close.click(inst.finish);inst.$next.click(function(){inst.nextArrowClicked()});inst.$prev.click(function(){inst.prevArrowClicked()});
$(window).resize(function(){if(inst.options.isIOS&&!inst.options.mobileresizeevent)return;clearTimeout(inst.options.resizeTimeout);inst.options.resizeTimeout=setTimeout(function(){inst.resizeWindow()},inst.options.resizedelay)});$(window).scroll(function(){if(inst.options.isIOS&&!inst.options.mobileresizeevent)return;inst.scrollBox()});$(window).on("orientationchange",function(e){if(inst.options.isMobile)inst.resizeWindow()});if(inst.options.enabletouchswipe)inst.enableSwipe()};inst.html2Text=function(html){var tag=
document.createElement("div");tag.innerHTML=html;return tag.innerText};inst.slideTimer=function(interval,callback,updatecallback){var timerInstance=this;timerInstance.timeout=interval;var updateinterval=50;var updateTimerId=null;var runningTime=0;var paused=false;var started=false;var startedandpaused=false;this.pause=function(){if(started){paused=true;clearInterval(updateTimerId)}};this.resume=function(forceresume){if(startedandpaused&&!forceresume)return;startedandpaused=false;if(started&&paused){paused=
false;updateTimerId=setInterval(function(){runningTime+=updateinterval;if(runningTime>timerInstance.timeout){clearInterval(updateTimerId);if(callback)callback()}if(updatecallback)updatecallback(runningTime/timerInstance.timeout)},updateinterval)}};this.stop=function(){clearInterval(updateTimerId);if(updatecallback)updatecallback(-1);runningTime=0;paused=false;started=false};this.start=function(){runningTime=0;paused=false;started=true;updateTimerId=setInterval(function(){runningTime+=updateinterval;
if(runningTime>timerInstance.timeout){clearInterval(updateTimerId);if(callback)callback()}if(updatecallback)updatecallback(runningTime/timerInstance.timeout)},updateinterval)};this.startandpause=function(){runningTime=0;paused=true;started=true;startedandpaused=true};return this};inst.updateTimer=function(percent){var w=Math.round(percent*100);if(w>100)w=100;if(w<0)w=0;$(".html5-timer",inst.$lightbox).css({display:"block",width:w+"%"})};inst.initSlide=function(){inst.autosliding=false;inst.slideTimeout=
inst.slideTimer(inst.options.slideinterval,function(){inst.gotoSlide(-1)},inst.options.showtimer?function(percent){inst.updateTimer(percent)}:null);if(inst.options.autoslide){inst.slideTimeout.stop();inst.autosliding=true}};inst.nextArrowClicked=function(){if(inst.options.nextElem<=inst.options.curElem)if(inst.options.onlastarrowclicked&&window[inst.options.onlastarrowclicked]&&typeof window[inst.options.onlastarrowclicked]=="function")window[inst.options.onlastarrowclicked]();inst.gotoSlide(-1)};
inst.prevArrowClicked=function(){if(inst.options.prevElem>=inst.options.curElem)if(inst.options.onfirstarrowclicked&&window[inst.options.onfirstarrowclicked]&&typeof window[inst.options.onfirstarrowclicked]=="function")window[inst.options.onfirstarrowclicked]();inst.gotoSlide(-2)};inst.calcNextPrevElem=function(){inst.options.nextElem=-1;inst.options.prevElem=-1;inst.options.inGroup=false;inst.options.groupIndex=0;inst.options.groupCount=0;var group=inst.elemArray[inst.options.curElem][ELEM_GROUP];
for(var i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP])){if(i==inst.options.curElem)inst.options.groupIndex=inst.options.groupCount;inst.options.groupCount++}var j,curGroup=inst.elemArray[inst.options.curElem][ELEM_GROUP];if(curGroup!=undefined&&curGroup!=null){for(j=inst.options.curElem+1;j<inst.elemArray.length;j++)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.nextElem=j;break}if(inst.options.nextElem<0)for(j=0;j<inst.options.curElem;j++)if(inst.matchGroup(curGroup,
inst.elemArray[j][ELEM_GROUP])){inst.options.nextElem=j;break}if(inst.options.nextElem>=0){for(j=inst.options.curElem-1;j>=0;j--)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.prevElem=j;break}if(inst.options.prevElem<0)for(j=inst.elemArray.length-1;j>inst.options.curElem;j--)if(inst.matchGroup(curGroup,inst.elemArray[j][ELEM_GROUP])){inst.options.prevElem=j;break}}}if(inst.options.nextElem>=0||inst.options.prevElem>=0)inst.options.inGroup=true};inst.calcBoxPosition=function(initW,
initH){var boxW=initW+2*inst.options.bordersize;var boxH=initH+2*inst.options.bordersize;var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var winH=$(window).height();var boxT=Math.round((winH-navH)/2-boxH/2);if(inst.options.titlestyle=="bottom")boxT-=Math.round(inst.options.barheight/2);var topmargin=$(window).height()<inst.options.smallscreenheight?inst.options.bordertopmarginsmall:inst.options.bordertopmargin;if(boxT<topmargin)boxT=topmargin;if(inst.options.insideiframe&&
window.self!=window.top)if(parent.window.jQuery&&parent.window.jQuery("#"+inst.options.iframeid).length){var iframetop=parent.window.jQuery("#"+inst.options.iframeid).offset().top;var parentscroll=parent.window.document.body.scrollTop;boxT=topmargin;boxT+=parentscroll>iframetop?parentscroll-iframetop:0}return[boxW,boxH,boxT]};inst.hideNavArrows=function(){var showPrev=false;var showNext=false;if(inst.options.inGroup){if(inst.options.arrowloop||!inst.options.arrowloop&&inst.options.prevElem<inst.options.curElem)showPrev=
true;if(inst.options.arrowloop||!inst.options.arrowloop&&inst.options.nextElem>inst.options.curElem)showNext=true}if(showPrev){inst.$prev.removeClass("html5-hide");if(inst.$prevbottom)inst.$prevbottom.removeClass("html5-hide");if(inst.$prevtouch)inst.$prevtouch.removeClass("html5-hide")}else{inst.$prev.addClass("html5-hide");if(inst.$prevbottom)inst.$prevbottom.addClass("html5-hide");if(inst.$prevtouch)inst.$prevtouch.addClass("html5-hide")}if(showNext){inst.$next.removeClass("html5-hide");if(inst.$nextbottom)inst.$nextbottom.removeClass("html5-hide");
if(inst.$nexttouch)inst.$nexttouch.removeClass("html5-hide")}else{inst.$next.addClass("html5-hide");if(inst.$nextbottom)inst.$nextbottom.addClass("html5-hide");if(inst.$nexttouch)inst.$nexttouch.addClass("html5-hide")}};inst.clickHandler=function(){var $this=$(this);var dataoptions={};$.each($this.data(),function(key,value){dataoptions[key.toLowerCase()]=value});inst.options=$.extend(inst.options,inst.defaultoptions,dataoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();if(inst.elemArray.length<=
0)return true;inst.hideObjects();for(var i=0;i<inst.elemArray.length;i++)if(inst.elemArray[i][ELEM_HREF]==$this.attr("href"))break;if(i==inst.elemArray.length)return true;inst.options.curElem=i;inst.calcNextPrevElem();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];if(inst.options.iequirksmode)inst.$lightboxBox.css({"top":boxT});else inst.$lightboxBox.css({"margin-top":boxT});
if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadCurElem();return false};inst.loadThumbnail=function(src,index,title){var imgLoader=new Image;$(imgLoader).on("load",function(){var style;if(this.width/this.height<=inst.options.thumbwidth/inst.options.thumbheight)style="width:100%;";else style="height:100%;";$(".html5-nav-thumb").eq(index).html("<img alt='"+
inst.html2Text(title)+"' style='"+style+"' src='"+src+"' />")});imgLoader.src=src};inst.matchGroup=function(curGroup,elemGroup){if(inst.options.showall)return true;if(!curGroup||!elemGroup)return false;var curs=curGroup.split(":");var elems=elemGroup.split(":");var result=false;for(var i in curs)if($.inArray(curs[i],elems)>-1){result=true;break}return result};inst.showNavigation=function(){if(!inst.options.shownavigation)return;if(!inst.currentElem||!inst.currentElem[ELEM_GROUP])return;var i;var showNav=
false;var group=inst.currentElem[ELEM_GROUP];for(i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP]))if(inst.elemArray[i][ELEM_THUMBNAIL]&&inst.elemArray[i][ELEM_THUMBNAIL].length>0){showNav=true;break}if(!showNav)return;inst.options.navheight=inst.options.thumbheight+inst.options.thumbtopmargin+inst.options.thumbbottommargin;if($(".html5-nav").length>0)return;var posCss=inst.options.hidenavdefault?"top:100%;bottom:auto;left:0;right:0;":"top:auto;bottom:0;left:0;right:0;";
var posType=inst.options.positionFixed?"fixed":"absolute";$("body").append("<div class='html5-nav' style='display:block;position:"+posType+";"+posCss+"width:100%;height:"+inst.options.navheight+"px;z-index:9999999;"+(inst.options.navbgcolor?"background-color:"+inst.options.navbgcolor+";":"")+"'>"+"<div class='html5-nav-container' style='position:relative;margin:"+inst.options.thumbtopmargin+"px auto "+inst.options.thumbbottommargin+"px;'>"+"<div class='html5-nav-prev' style='display:block;position:absolute;cursor:pointer;width:"+
inst.options.navbuttonwidth+'px;height:100%;left:0;top:0;background:url("'+inst.options.navarrowsprevimage+"\") no-repeat left center;'></div>"+"<div class='html5-nav-mask' style='display:block;position:relative;margin:0 auto;overflow:hidden;'>"+"<div class='html5-nav-list'></div>"+"</div>"+"<div class='html5-nav-next' style='display:block;position:absolute;cursor:pointer;width:"+inst.options.navbuttonwidth+'px;height:100%;right:0;top:0;background:url("'+inst.options.navarrowsnextimage+"\") no-repeat right center;'></div>"+
"</div>"+"</div>");inst.navvisible=inst.options.hidenavdefault?false:true;if(inst.options.shownavcontrol){$(".html5-nav").append('<div class="html5-nav-showcontrol" style="position:absolute;display:block;cursor:pointer;bottom:100%;right:12px;margin:0;padding:0;"><img alt="" src="'+inst.options.navcontrolimage+'"></div>');$(".html5-nav-showcontrol").click(function(){var winH=$(window).height();var navH=$(".html5-nav").height();if(inst.navvisible){inst.navvisible=false;$(".html5-nav").css({top:winH-
navH+"px",bottom:"auto"}).animate({top:winH+"px"},function(){$(this).css({top:"100%",bottom:"auto"})})}else{inst.navvisible=true;var navH=$(".html5-nav").height();$(".html5-nav").css({top:winH+"px",bottom:"auto"}).animate({top:winH-navH+"px"},function(){$(this).css({top:"auto",bottom:0})})}inst.resizeWindow()})}var index=0;for(i=0;i<inst.elemArray.length;i++)if(inst.matchGroup(group,inst.elemArray[i][ELEM_GROUP]))if(inst.elemArray[i][ELEM_THUMBNAIL]&&inst.elemArray[i][ELEM_THUMBNAIL].length>0){$(".html5-nav-list").append("<div class='html5-nav-thumb' data-arrayindex='"+
i+"' style='float:left;overflow:hidden;cursor:pointer;opacity:"+inst.options.thumbopacity+";margin: 0 "+inst.options.thumbgap/2+"px;width:"+inst.options.thumbwidth+"px;height:"+inst.options.thumbheight+"px;border:"+inst.options.thumbborder+"px solid "+inst.options.thumbbordercolor+";'></div>");this.loadThumbnail(inst.elemArray[i][ELEM_THUMBNAIL],index,inst.elemArray[i][ELEM_TITLE]);index++}$(".html5-nav-thumb").hover(function(){$(this).css({opacity:1});$(this).css({border:inst.options.thumbborder+
"px solid "+inst.options.thumbhighlightbordercolor})},function(){$(this).css({opacity:inst.options.thumbopacity});$(this).css({border:inst.options.thumbborder+"px solid "+inst.options.thumbbordercolor})});$(".html5-nav-thumb").click(function(){var index=$(this).data("arrayindex");if(index>=0)inst.gotoSlide(index)});inst.options.totalwidth=index*(inst.options.thumbgap+inst.options.thumbwidth+2*inst.options.thumbborder);$(".html5-nav-list").css({display:"block",position:"relative","margin-left":0,width:inst.options.totalwidth+
"px"}).append("<div style='clear:both;'></div>");var $navMask=$(".html5-nav-mask");var $navPrev=$(".html5-nav-prev");var $navNext=$(".html5-nav-next");$navPrev.click(function(){var $navList=$(".html5-nav-list");var $navNext=$(".html5-nav-next");var winWidth=$(window).width();var maskWidth=winWidth-2*inst.options.navbuttonwidth;var marginLeft=parseInt($navList.css("margin-left"))+maskWidth;if(marginLeft>=0){marginLeft=0;$(this).css({"background-position":"center left"})}else $(this).css({"background-position":"center right"});
if(marginLeft<=maskWidth-inst.options.totalwidth)$navNext.css({"background-position":"center left"});else $navNext.css({"background-position":"center right"});$navList.animate({"margin-left":marginLeft})});$navNext.click(function(){var $navList=$(".html5-nav-list");var $navPrev=$(".html5-nav-prev");var winWidth=$(window).width();var maskWidth=winWidth-2*inst.options.navbuttonwidth;var marginLeft=parseInt($navList.css("margin-left"))-maskWidth;if(marginLeft<=maskWidth-inst.options.totalwidth){marginLeft=
maskWidth-inst.options.totalwidth;$(this).css({"background-position":"center left"})}else $(this).css({"background-position":"center right"});if(marginLeft>=0)$navPrev.css({"background-position":"center left"});else $navPrev.css({"background-position":"center right"});$navList.animate({"margin-left":marginLeft})});var winWidth=$(window).width();if(inst.options.totalwidth<=winWidth){$navMask.css({width:inst.options.totalwidth+"px"});$navPrev.hide();$navNext.hide()}else{$navMask.css({width:winWidth-
2*inst.options.navbuttonwidth+"px"});$navPrev.show();$navNext.show()}};inst.loadElem=function(elem){inst.currentElem=elem;inst.showing=true;if(inst.options.bodynoscroll)$("html,body").addClass("bodynoscroll");if(!(inst.options.showtitle&&inst.currentElem[ELEM_TITLE]&&inst.currentElem[ELEM_TITLE].length>0||inst.options.showdescription&&inst.currentElem[ELEM_DESCRIPTION]&&inst.currentElem[ELEM_DESCRIPTION].length>0||inst.options.inGroup&&(inst.options.showplaybutton||inst.options.showtitleprefix)))inst.options.barheight=
0;inst.showNavigation();inst.$elem.off("mouseenter").off("mouseleave").off("mousemove");inst.$loading.show();if(inst.options.onshowitem&&window[inst.options.onshowitem]&&typeof window[inst.options.onshowitem]=="function")window[inst.options.onshowitem](elem);if(inst.options.transition=="slide"&&inst.existingElem>=0){$(".html5-elem-box-previous").remove();var newitem=inst.$elem.clone();newitem.insertAfter(inst.$elem);inst.$prevelem=inst.$elem;inst.$elem=newitem;inst.$prevelem.addClass("html5-elem-box-previous");
inst.$elem.addClass("html5-elem-box-current");inst.$elemWrap=$(".html5-elem-wrap",inst.$elem);inst.$loading=$(".html5-loading",inst.$elem);inst.$error=$(".html5-error-box",inst.$elem);inst.$image=$(".html5-image",inst.$elem);inst.$elemData=$(".html5-elem-data-box",inst.$elem);inst.$text=$(".html5-text",inst.$elem);inst.$elem.css({position:"absolute",top:0,left:inst.direction==-1?"100%":"-100%",opacity:0,height:"auto"});inst.$prevelem.css({width:inst.$prevelem.width()+"px",height:inst.$prevelem.height()+
"px"})}switch(elem[ELEM_TYPE]){case 0:var imgLoader=new Image;$(imgLoader).on("load",function(){elem[ELEM_ORIGINALWIDTH]=imgLoader.width;elem[ELEM_ORIGINALHEIGHT]=imgLoader.height;inst.showImage(elem,imgLoader.width,imgLoader.height)});$(imgLoader).on("error",function(){inst.showError()});imgLoader.src=elem[ELEM_HREF];break;case 1:inst.showSWF(elem);break;case 2:case 8:inst.showVideo(elem);break;case 3:case 4:case 9:case 11:case 12:inst.showYoutubeVimeo(elem);break;case 5:inst.showPDF(elem);break;
case 6:inst.showMP3(elem);break;case 7:inst.showWeb(elem);break;case 10:inst.showDiv(elem);break}if(inst.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Lightbox","Open",elem[ELEM_HREF]]);if(inst.options.preload){if(inst.options.nextElem>=0&&inst.elemArray[inst.options.nextElem][ELEM_TYPE]==0)(new Image).src=inst.elemArray[inst.options.nextElem][ELEM_HREF];if(inst.options.prevElem>=0&&inst.elemArray[inst.options.prevElem][ELEM_TYPE]==0)(new Image).src=inst.elemArray[inst.options.prevElem][ELEM_HREF]}};
inst.loadCurElem=function(){inst.loadElem(inst.elemArray[inst.options.curElem])};inst.showError=function(){inst.$loading.hide();inst.resizeLightbox(inst.options.errorwidth,inst.options.errorheight,true,function(){inst.$loading.hide();inst.$error.show();inst.$elem.fadeIn(inst.options.fadespeed,function(){inst.showData()})})};inst.calcTextWidth=function(objW){return objW-36};inst.showTitle=function(w,t,description){if(inst.options.titlestyle=="inside")inst.$elemData.css({width:w+"px"});var text="";
if(inst.options.showtitle)if(t&&t.length>0)text+=t;if(inst.options.inGroup){if(inst.options.showtitleprefix)text="<span class='html5-title-prefix'>"+inst.options.titleprefix.replace("%NUM",inst.options.groupIndex+1).replace("%TOTAL",inst.options.groupCount)+"</span> <span class='html5-title-caption'>"+text+"</span>";if(inst.options.showplaybutton)text="<div class='html5-playpause' style='display:inline-block;cursor:pointer;vertical-align:middle;'><div class='html5-play' style='display:block;'><img alt='' src='"+
inst.options.playimage+"'></div><div class='html5-pause' style='display:none;'><img alt='' src='"+inst.options.pauseimage+"'></div></div> "+text}if(text.length>0)text='<div class="html5-title">'+text+"</div>";if(inst.options.showdescription&&description&&description.length>0)text+='<div class="html5-description">'+description+"</div>";inst.$text.html(text);if(inst.options.inGroup&&inst.options.showplaybutton){if(inst.autosliding){$(".html5-play",inst.$lightbox).hide();$(".html5-pause",inst.$lightbox).show()}else{$(".html5-play",
inst.$lightbox).show();$(".html5-pause",inst.$lightbox).hide()}$(".html5-play",inst.$lightbox).click(function(){$(".html5-play",inst.$lightbox).hide();$(".html5-pause",inst.$lightbox).show();if(inst.slideTimeout){inst.slideTimeout.stop();inst.slideTimeout.start();inst.autosliding=true}});$(".html5-pause",inst.$lightbox).click(function(){$(".html5-play",inst.$lightbox).show();$(".html5-pause",inst.$lightbox).hide();if(inst.slideTimeout){inst.slideTimeout.stop();inst.autosliding=false}})}$("#html5-social",
inst.$lightbox).show();if(inst.options.showsocialmedia)if(inst.currentElem[ELEM_SOCIALMEDIA])if($("#html5-socialmedia",inst.$lightboxBox).length>0)$("#html5-socialmedia",inst.$lightboxBox).html(inst.currentElem[ELEM_SOCIALMEDIA]);else inst.$lightboxBox.append('<div id="html5-socialmedia" style="'+inst.options.socialmediaposition+'">'+inst.currentElem[ELEM_SOCIALMEDIA]+"</div>");else if($("#html5-socialmedia",inst.$lightboxBox).length>0)$("#html5-socialmedia",inst.$lightboxBox).remove()},inst.showImage=
function(elem,imgW,imgH){var elemW,elemH;if(elem[ELEM_WIDTH])elemW=elem[ELEM_WIDTH];else{elemW=imgW;elem[ELEM_WIDTH]=imgW}if(elem[ELEM_HEIGHT])elemH=elem[ELEM_HEIGHT];else{elemH=imgH;elem[ELEM_HEIGHT]=imgH}var sizeObj=inst.calcElemSize({w:elemW,h:elemH},inst.options.imagekeepratio);inst.resizeLightbox(sizeObj.w,sizeObj.h,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);var timercode=!inst.options.showtimer||!inst.options.inGroup?"":"<div class='html5-timer' style='display:none;position:absolute;"+
inst.options.timerposition+":0;left:0;width:0;height:"+inst.options.timerheight+"px;background-color:"+inst.options.timercolor+";opacity:"+inst.options.timeropacity+";'></div>";inst.$image.hide();inst.$image.html("<div class='html5-image-container' style='display:block;position:relative;width:100%;height:100%;"+(inst.options.imagekeepratio?"overflow:hidden;":"overflow:auto;")+"'><img alt='"+inst.html2Text(elem[ELEM_TITLE])+"' src='"+elem[ELEM_HREF]+"' width='100%' height='"+(inst.options.imagekeepratio?
"100%":"auto")+"' />"+timercode+"</div>");inst.$image.fadeIn(inst.options.fadespeed);inst.showData();if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.showSWF=function(elem){var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();
inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-swf' style='display:block;width:100%;height:100%;'></div>").show();inst.embedFlash($(".html5lightbox-swf",inst.$image),elem[ELEM_HREF],"window",{width:dataW,height:dataH});inst.$elem.show();inst.showData();if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.showVideo=function(elem){inst.slideTimeout.stop();var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;
var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-video' style='display:block;width:100%;height:100%;overflow:hidden;background-color:"+inst.options.videobgcolor+";'></div>").show();var isHTML5=false;if(inst.options.isIE678||
elem[ELEM_TYPE]==8||inst.options.isIE9&&inst.options.useflashonie9||inst.options.isIE10&&inst.options.useflashonie10||inst.options.isIE11&&inst.options.useflashonie11)isHTML5=false;else if(inst.options.isMobile)isHTML5=true;else if((inst.options.html5player||!inst.options.flashInstalled)&&inst.options.html5VideoSupported){isHTML5=true;if(inst.options.isFirefox||inst.options.isOpera)if(!elem[ELEM_HREF_WEBM]&&!elem[ELEM_HREF_OGG]&&(!inst.options.canplaymp4||inst.options.useflashformp4onfirefox))isHTML5=
false}if(isHTML5){var videoSrc=elem[ELEM_HREF];if(inst.options.isFirefox||inst.options.isOpera)if(elem[ELEM_HREF_WEBM])videoSrc=elem[ELEM_HREF_WEBM];else if(elem[ELEM_HREF_OGG])videoSrc=elem[ELEM_HREF_OGG];inst.embedHTML5Video($(".html5lightbox-video",inst.$image),videoSrc,inst.options.autoplay,inst.options.loopvideo)}else{var videoFile=elem[ELEM_HREF];if(videoFile.charAt(0)!="/"&&videoFile.substring(0,5)!="http:"&&videoFile.substring(0,6)!="https:")videoFile=inst.options.htmlfolder+videoFile;inst.embedFlash($(".html5lightbox-video",
inst.$image),inst.options.jsfolder+"html5boxplayer.swf","transparent",{width:dataW,height:dataH,jsobjectname:"wpGridLightboxObject",hidecontrols:inst.options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:videoFile,hdfile:"",ishd:"0",defaultvolume:inst.options.defaultvideovolume,autoplay:inst.options.autoplay?"1":"0",loop:inst.options.loopvideo?"1":"0",errorcss:".html5box-error"+inst.options.errorcss,id:0})}inst.$elem.show();inst.showData()})};inst.loadNext=function(){$(window).trigger("html5lightbox.videofinished");
if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)};inst.getYoutubeParams=function(href){var result={};if(href.indexOf("?")<0)return result;var params=href.substring(href.indexOf("?")+1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2&&value[0].toLowerCase()!="v")result[value[0].toLowerCase()]=value[1]}return result};inst.getYoutubeId=function(href){var youtubeId=
"";var regExp=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\??v?=?))([^#\&\?]*).*/;var match=href.match(regExp);if(match&&match[7]&&match[7].length==11)youtubeId=match[7];return youtubeId};inst.prepareYoutubeHref=function(href){var youtubeId=inst.getYoutubeId(href);var protocol="https:";var result=protocol+"//www.youtube.com/embed/"+youtubeId;var params=this.getYoutubeParams(href);var first=true;for(var key in params){if(first){result+="?";first=false}else result+="&";result+=key+"="+params[key]}return result};
inst.prepareDailymotionHref=function(href){if(href.match(/\:\/\/.*(dai\.ly)/i)){var protocol="https:";var id=href.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];href=protocol+"//www.dailymotion.com/embed/video/"+id}return href};inst.showYoutubeVimeo=function(elem){inst.slideTimeout.stop();var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.defaultwidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.defaultheight;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},true);dataW=sizeObj.w;dataH=
sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-video' style='display:block;width:100%;height:100%;overflow:hidden;'></div>").show();var href=elem[ELEM_HREF];var youtubeid="";if(elem[ELEM_TYPE]==3){youtubeid=inst.getYoutubeId(href);href=inst.prepareYoutubeHref(href)}if(elem[ELEM_TYPE]==9)href=inst.prepareDailymotionHref(href);if(inst.options.autoplay){href+=
href.indexOf("?")<0?"?":"&";if(elem[ELEM_TYPE]==11)href+="autoPlay=true";else href+="autoplay=1"}if(inst.options.loopvideo){href+=href.indexOf("?")<0?"?":"&";switch(elem[ELEM_TYPE]){case 3:href+="loop=1&playlist="+youtubeid;break;case 4:case 9:href+="loop=1";break;case 11:href+="endVideoBehavior=loop";break}}if(elem[ELEM_TYPE]==3){if(href.indexOf("?")<0)href+="?wmode=transparent&rel=0";else href+="&wmode=transparent&rel=0";if(inst.options.videohidecontrols)href+="&controls=0&showinfo=0";href+="&enablejsapi=1&origin="+
document.location.protocol+"//"+document.location.hostname}else if(elem[ELEM_TYPE]==4){href+=href.indexOf("?")<0?"?":"&";href+="api=1&player_id=html5boxiframevideo"+inst.options.curElem}$(".html5lightbox-video",inst.$image).html("<iframe style='margin:0;padding:0;border:0;' class='html5boxiframevideo' id='html5boxiframevideo"+inst.options.curElem+"' width='100%' height='100%' src='"+href+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");inst.$elem.show();inst.showData();
if(elem[ELEM_TYPE]==3&&typeof YT==="object"&&typeof YT.Player==="function")inst.ytplayer=new YT.Player("html5boxiframevideo"+inst.options.curElem,{events:{"onStateChange":function(event){if(event.data==YT.PlayerState.ENDED){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)}}}});else if(elem[ELEM_TYPE]==4&&typeof $f==="function"){var vimeoIframe=$("#html5boxiframevideo"+
inst.options.curElem)[0];inst.vimeoPlayer=$f(vimeoIframe);inst.vimeoPlayer.addEvent("ready",function(){inst.vimeoPlayer.addEvent("finish",function(id){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)})})}})};inst.showPDF=function(elem){if(inst.options.enablepdfjs){if(inst.options.isIPhone&&inst.options.openpdfinnewtaboniphone||inst.options.isIPad&&inst.options.openpdfinnewtabonipad){var win=
window.open(elem[ELEM_HREF],"_blank");win.focus();inst.finish();return}if(!inst.options.pdfjsengine)inst.options.pdfjsengine=inst.options.jsfolder+"pdfjs/web/viewer.html";var href=elem[ELEM_HREF];if(href.substring(0,5)!="http:"&&href.substring(0,6)!="https:")href=inst.absoluteUrl(href);var pdfelem=jQuery.extend(true,{},elem);pdfelem[ELEM_HREF]=inst.options.pdfjsengine+(inst.options.pdfjsengine.indexOf("?")<0?"?":"&")+"file="+encodeURIComponent(href);inst.showWeb(pdfelem)}else if(inst.options.isIPhone||
inst.options.isIPad||inst.options.isAndroid||inst.options.isIE||inst.options.isIE11){var win=window.open(elem[ELEM_HREF],"_blank");win.focus();inst.finish();return}else inst.showWeb(elem)};inst.showMP3=function(elem){};inst.showDiv=function(elem){var winWidth=$(window).width();var winH=$(window).height();var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;
var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},false);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-div' id='html5lightbox-div"+inst.options.curElem+"' style='display:block;width:100%;height:"+(inst.options.autoresizecontent?
"auto":"100%")+";"+(inst.options.isIOS?"-webkit-overflow-scrolling:touch;overflow-y:scroll;":"overflow:auto;")+"'></div>").show();var divID=elem[ELEM_HREF];if($(divID).length>0)$(divID).children().appendTo($("#html5lightbox-div"+inst.options.curElem,inst.$image));else $("#html5lightbox-div"+inst.options.curElem,inst.$image).html("<div class='html5-error'>The specified div ID does not exist.</div>");inst.$elem.show();inst.showData();if(inst.options.autoresizecontent)inst.resizeWindow();if(inst.autosliding){inst.slideTimeout.stop();
inst.slideTimeout.start()}})};inst.isSameDomain=function(href){if(href.substring(0,5)!="http:"&&href.substring(0,6)!="https:")return true;var link=document.createElement("a");link.setAttribute("href",href);var result=link.protocol==document.location.protocol&&link.host==document.location.host&&link.port==document.location.port;link=null;return result};inst.showWeb=function(elem){var winWidth=$(window).width();var winH=$(window).height();var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:
0;var dataW=elem[ELEM_WIDTH]?elem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;var dataH=elem[ELEM_HEIGHT]?elem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;var sizeObj=inst.calcElemSize({w:dataW,h:dataH},false);dataW=sizeObj.w;dataH=sizeObj.h;inst.resizeLightbox(dataW,dataH,true,function(){inst.$loading.hide();inst.showTitle(sizeObj.w,elem[ELEM_TITLE],elem[ELEM_DESCRIPTION]);inst.$image.html("<div class='html5lightbox-web' style='display:block;width:100%;height:100%;"+
(inst.options.isIOS?"-webkit-overflow-scrolling:touch;overflow-y:scroll;":"")+"'></div>").show();$(".html5lightbox-web",inst.$image).html("<iframe style='margin:0;padding:0;border:0;' class='html5lightbox-web-iframe' width='100%' height='100%' src='"+elem[ELEM_HREF]+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");inst.$elem.show();inst.showData();if(inst.options.autoresizecontent&&inst.isSameDomain(elem[ELEM_HREF])){$(".html5lightbox-web-iframe",inst.$image).data("sameorigin",
true);$(".html5lightbox-web-iframe",inst.$image).on("load",function(){$(this).data("sameoriginloaded",true);inst.resizeWindow()})}if(inst.autosliding){inst.slideTimeout.stop();inst.slideTimeout.start()}})};inst.scrollBox=function(){};inst.resizeWindow=function(){if(!inst.currentElem)return;if(!inst.options.responsive)return;var winWidth=$(window).width();var winH=$(window).height();if(inst.options.responsivebarheight){if(winH<=inst.options.smallscreenheight)inst.options.barheight=inst.options.barheightonsmallheight;
else inst.options.barheight=inst.options.barheightoriginal;if(inst.options.titlestyle=="bottom"&&inst.options.barautoheight!="auto")inst.$elemData.css({height:inst.options.barheight+"px","max-height":inst.options.barheight+"px"})}if(!(inst.options.showtitle&&inst.currentElem[ELEM_TITLE]&&inst.currentElem[ELEM_TITLE].length>0||inst.options.showdescription&&inst.currentElem[ELEM_DESCRIPTION]&&inst.currentElem[ELEM_DESCRIPTION].length>0||inst.options.inGroup&&(inst.options.showplaybutton||inst.options.showtitleprefix)))inst.options.barheight=
0;var elemW,elemH,keepratio;if(inst.currentElem[ELEM_TYPE]==5||inst.currentElem[ELEM_TYPE]==7||inst.currentElem[ELEM_TYPE]==10){var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;elemW=inst.currentElem[ELEM_WIDTH]?inst.currentElem[ELEM_WIDTH]:inst.options.usedefaultsizeforcontent?inst.options.defaultwidth:winWidth;elemH=inst.currentElem[ELEM_HEIGHT]?inst.currentElem[ELEM_HEIGHT]:inst.options.usedefaultsizeforcontent?inst.options.defaultheight:winH-navH;keepratio=false}else{elemW=
inst.currentElem[ELEM_WIDTH]?inst.currentElem[ELEM_WIDTH]:inst.options.defaultwidth;elemH=inst.currentElem[ELEM_HEIGHT]?inst.currentElem[ELEM_HEIGHT]:inst.options.defaultheight;if(inst.currentElem[ELEM_TYPE]==0)keepratio=inst.options.imagekeepratio;else keepratio=true}var sizeObj=inst.calcElemSize({w:elemW,h:elemH},keepratio);var boxPos=inst.calcBoxPosition(sizeObj.w,sizeObj.h);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle==
"left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}if(inst.options.titlestyle=="inside")inst.$elemData.css({width:sizeObj.w+"px"});if(inst.options.autoresizecontent&&(inst.currentElem[ELEM_TYPE]==5||inst.currentElem[ELEM_TYPE]==7||inst.currentElem[ELEM_TYPE]==10)){var resizeHeight=false;if(inst.currentElem[ELEM_TYPE]==7&&$(".html5lightbox-web-iframe",
inst.$lightbox).length>0&&$(".html5lightbox-web-iframe",inst.$lightbox).data("sameoriginloaded")){var iframe=$(".html5lightbox-web-iframe",inst.$lightbox)[0];if(iframe&&iframe.contentWindow&&iframe.contentWindow.document&&iframe.contentWindow.document.documentElement.offsetHeight)if(elemH>iframe.contentWindow.document.documentElement.offsetHeight){elemH=iframe.contentWindow.document.documentElement.offsetHeight;resizeHeight=true}}else if(inst.currentElem[ELEM_TYPE]==10&&$(".html5lightbox-div",inst.$lightbox).length>
0){var divH=$(".html5lightbox-div",inst.$lightbox).height();if(elemH>divH){elemH=divH;resizeHeight=true}}if(resizeHeight){sizeObj=inst.calcElemSize({w:elemW,h:elemH},keepratio);boxPos=inst.calcBoxPosition(sizeObj.w,sizeObj.h);boxW=boxPos[0];boxH=boxPos[1];boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"height":boxH});else{inst.$lightboxBox.css({"height":"auto"});inst.$elemWrap.css({"height":boxH})}}}if($(".html5-nav").length<=
0)return;$(".html5-nav-list").css({"margin-left":0});var $navMask=$(".html5-nav-mask");var $navPrev=$(".html5-nav-prev");var $navNext=$(".html5-nav-next");var winWidth=$(window).width();if(inst.options.totalwidth<=winWidth){$navMask.css({width:inst.options.totalwidth+"px"});$navPrev.hide();$navNext.hide()}else{$navMask.css({width:winWidth-2*inst.options.navbuttonwidth+"px"});$navPrev.show();$navNext.show()}};inst.calcElemSize=function(sizeObj,keepratio){if(!inst.options.responsive)return sizeObj;
var winWidth=$(window).width();winWidth=winWidth?winWidth:$(document).width();var winH=$(window).height();winH=winH?winH:$(document).height();if((inst.options.titlestyle=="left"||inst.options.titlestyle=="right")&&winWidth>inst.options.sidetobottomscreenwidth)sizeObj.w=sizeObj.w*100/inst.options.imagepercentage;var navH=inst.options.shownavigation&&inst.navvisible?inst.options.navheight:0;var topmargin=$(window).height()<inst.options.smallscreenheight?inst.options.bordertopmarginsmall:inst.options.bordertopmargin;
var h0=winH-navH-2*inst.options.bordersize-2*topmargin;if(inst.options.titlestyle=="bottom")h0-=inst.options.barheight;var w0=winWidth-2*inst.options.bordersize-2*inst.options.bordermargin;if(inst.options.fullscreenmode&&winWidth>inst.options.navarrowsbottomscreenwidth||(inst.options.isTouch&&inst.options.navarrowsalwaysshowontouch||inst.options.alwaysshownavarrows)&&winWidth>inst.options.navarrowsbottomscreenwidth)w0-=64;if((inst.options.titlestyle=="left"||inst.options.titlestyle=="right")&&winWidth<=
inst.options.sidetobottomscreenwidth||inst.options.notkeepratioonsmallheight&&winH<=inst.options.smallscreenheight)keepratio=false;if(inst.currentElem[ELEM_TYPE]==0&&keepratio){var ratio=inst.currentElem[ELEM_ORIGINALWIDTH]/inst.currentElem[ELEM_ORIGINALHEIGHT];sizeObj.h=Math.round(sizeObj.w/ratio);if(sizeObj.h>h0){sizeObj.w=Math.round(ratio*h0);sizeObj.h=h0}if(sizeObj.w>w0){sizeObj.h=Math.round(w0/ratio);sizeObj.w=w0}}else{if(sizeObj.h>h0){if(keepratio)sizeObj.w=Math.round(sizeObj.w*h0/sizeObj.h);
sizeObj.h=h0}else if(inst.options.maxheight)sizeObj.h=h0;if(sizeObj.w>w0){if(keepratio)sizeObj.h=Math.round(sizeObj.h*w0/sizeObj.w);sizeObj.w=w0}}return sizeObj};inst.showData=function(){if(inst.$text.text().length>0)inst.$elemData.show();if(inst.options.titlestyle=="bottom"||inst.options.titlestyle=="inside")inst.$lightboxBox.css({height:"auto"});if(inst.$text.text().length>0&&inst.options.titlestyle=="bottom")inst.$elemData.css({"max-height":inst.options.barheight+"px"});if(inst.options.positionFixed)$("#html5-lightbox-overlay",
inst.$lightbox).css({height:Math.max($(window).height(),$(document).height())});else $("#html5-lightbox-overlay",inst.$lightbox).css({height:"100%"});$(window).trigger("html5lightbox.lightboxopened")};inst.resizeLightbox=function(elemW,elemH,bAnimate,onFinish){inst.hideNavArrows();var boxPos=inst.calcBoxPosition(elemW,elemH);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$loading.hide();inst.$watermark.hide();if(inst.options.nextElem<=inst.options.curElem)if(inst.options.onlastitem&&
window[inst.options.onlastitem]&&typeof window[inst.options.onlastitem]=="function")window[inst.options.onlastitem](inst.currentElem);if(inst.options.prevElem>=inst.options.curElem)if(inst.options.onfirstitem&&window[inst.options.onfirstitem]&&typeof window[inst.options.onfirstitem]=="function")window[inst.options.onfirstitem](inst.currentElem);if(!inst.options.fullscreenmode&&(!inst.options.isTouch||!inst.options.navarrowsalwaysshowontouch)&&!inst.options.alwaysshownavarrows){inst.$lightboxBox.on("mouseenter mousemove",
function(){if(inst.options.arrowloop&&inst.options.prevElem>=0||!inst.options.arrowloop&&inst.options.prevElem>=0&&inst.options.prevElem<inst.options.curElem)inst.$prev.fadeIn();if(inst.options.arrowloop&&inst.options.nextElem>=0||!inst.options.arrowloop&&inst.options.nextElem>=0&&inst.options.nextElem>inst.options.curElem)inst.$next.fadeIn()});inst.$lightboxBox.on("mouseleave",function(){inst.$next.fadeOut();inst.$prev.fadeOut()})}var existingBoxT=parseInt(inst.$lightboxBox.css("margin-top"));inst.$lightboxBox.css({"margin-top":boxT});
var speed=bAnimate?inst.options.resizespeed:0;if(inst.options.fullscreenmode)speed=0;if(inst.options.transition=="slide"&&inst.existingElem>=0)speed=0;if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right"){if(boxW==inst.$lightboxBox.width()&&boxH==inst.$lightboxBox.height())speed=0;inst.$lightboxBox.animate({width:boxW},speed).animate({height:boxH},speed,function(){inst.onAnimateFinish(onFinish)})}else{if(boxW==inst.$elemWrap.width()&&boxH==inst.$elemWrap.height())speed=0;inst.$lightboxBox.css({"width":boxW,
"height":"auto"});if(inst.options.transition=="slide"&&inst.existingElem>=0)if($(".html5-elem-box-previous",inst.$lightbox).length>0)$(".html5-elem-box-previous",inst.$lightbox).css({"margin-left":String(boxW/2-$(".html5-elem-box-previous",inst.$lightbox).width()/2)+"px",top:String(existingBoxT-boxT)+"px"});inst.$elemWrap.animate({width:boxW},speed).animate({height:boxH},speed,function(){inst.onAnimateFinish(onFinish)})}};inst.onAnimateFinish=function(onFinish){inst.$loading.show();inst.$watermark.show();
inst.$close.show();inst.$elem.css({"background-color":inst.options.bgcolor});onFinish();inst.finishCallback()};inst.finishCallback=function(){if(inst.options.transition=="slide"&&inst.existingElem>=0){inst.$prevelem.animate({left:inst.direction==-1?"-100%":"100%",opacity:0},{duration:inst.options.transitionduration});inst.$elem.animate({left:0,opacity:1},{duration:inst.options.transitionduration,always:function(){inst.$prevelem.remove();inst.$elem.removeClass("html5-elem-box-current").css({position:"relative",
height:"100%"})}})}},inst.resetDiv=function(elemID){if(inst.elemArray.length>0&&elemID>=0)if(inst.elemArray[elemID][ELEM_TYPE]==10){var divID=inst.elemArray[elemID][ELEM_HREF];if($(divID).length>0)$("#html5lightbox-div"+elemID).children().appendTo($(divID))}};inst.reset=function(){if(inst.options.stamp)inst.$watermark.hide();inst.showing=false;inst.$image.empty();inst.$text.empty();inst.$error.hide();inst.$loading.hide();inst.$image.hide();if(inst.options.titlestyle=="bottom"||inst.options.titlestyle==
"inside")inst.$elemData.hide();if(!inst.options.fullscreenmode)inst.$close.hide();inst.$elem.css({"background-color":""})};inst.resetNavigation=function(){inst.options.navheight=0;$(".html5-nav").remove();inst.navvisible=false};inst.finish=function(){inst.existingElem=-1;inst.resetDiv(inst.options.curElem);if($(".html5-lightbox-video",inst.$lightbox).length)$(".html5-lightbox-video",inst.$lightbox).attr("src","");$("head").find("style").each(function(){if($(this).data("creator")=="gridgallery-html5-lightbox")$(this).remove()});
if(inst.options.bodynoscroll)$("html,body").removeClass("bodynoscroll");inst.slideTimeout.stop();inst.reset();inst.resetNavigation();inst.$lightbox.remove();$("#gridgallery-html5-lightbox").remove();inst.showObjects();if(inst.options.oncloselightbox&&window[inst.options.oncloselightbox]&&typeof window[inst.options.oncloselightbox]=="function")window[inst.options.oncloselightbox](inst.currentElem);if(inst.onLightboxClosed&&typeof inst.onLightboxClosed=="function")inst.onLightboxClosed(inst.currentElem);
$(window).trigger("html5lightbox.lightboxclosed")};inst.pauseSlide=function(){};inst.playSlide=function(){};inst.gotoSlide=function(slide){inst.existingElem=inst.options.curElem;inst.direction=slide;inst.resetDiv(inst.options.curElem);if(slide==-1){if(inst.options.nextElem<0)return;inst.options.curElem=inst.options.nextElem}else if(slide==-2){if(inst.options.prevElem<0)return;inst.options.curElem=inst.options.prevElem}else if(slide>=0){inst.direction=slide>inst.options.curElem?-1:-2;inst.options.curElem=
slide}if(inst.autosliding)inst.slideTimeout.stop();inst.calcNextPrevElem();if(inst.options.transition!="slide")inst.reset();inst.loadCurElem();if(inst.options.titlestyle=="inside"&&inst.options.showonmouseoverinside&&inst.currentElem[ELEM_TYPE]!==0&&inst.options.showinsidetitleforimageonly)inst.$elemData.css({opacity:0})};inst.enableSwipe=function(){var preventDefault=inst.options.isAndroid&&(inst.options.swipepreventdefaultonandroid||inst.options.androidVersion>=0&&inst.options.androidVersion<=5)?
true:false;inst.$lightboxBox.html5lightboxTouchSwipe({preventWebBrowser:preventDefault,swipeDistance:inst.options.swipedistance,swipeLeft:function(){inst.gotoSlide(-1)},swipeRight:function(){inst.gotoSlide(-2)}})};inst.hideObjects=function(){$("select, embed, object").css({"visibility":"hidden"})};inst.showObjects=function(){$("select, embed, object").css({"visibility":"visible"})};inst.embedHTML5Video=function($container,src,autoplay,loopvideo){$container.html("<div style='display:block;width:100%;height:100%;position:relative;'><video class='html5-lightbox-video' width='100%' height='100%'"+
(inst.options.html5videoposter&&inst.options.html5videoposter.length>0?"poster='"+inst.options.html5videoposter+"'":"")+(autoplay?" autoplay":"")+(loopvideo?" loop":"")+(inst.options.nativehtml5controls&&!inst.options.videohidecontrols?" controls='controls'":"")+(inst.options.nativecontrolsnodownload?' controlsList="nodownload"':"")+" src='"+src+"'></div>");if(!inst.options.nativehtml5controls&&!inst.options.videohidecontrols){$("video",$container).data("src",src);$("video",$container).lightboxHTML5VideoControls(inst.options.skinsfolder,
inst,".html5-lightbox-video",inst.options.videohidecontrols,false,inst.options.defaultvideovolume,inst.options.nativecontrolsonfullscreen,inst.options.nativecontrolsnodownload,null)}$("video",$container).off("ended").on("ended",function(){$(window).trigger("html5lightbox.videofinished");if(inst.autosliding)inst.gotoSlide(-1);else if(inst.options.autoclose)setTimeout(function(){inst.finish()},inst.options.autoclosedelay)})};inst.embedFlash=function($container,src,wmode,flashVars){if(inst.options.flashInstalled){var htmlOptions=
{pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};htmlOptions.width="100%";htmlOptions.height="100%";htmlOptions.src=src;htmlOptions.flashVars=$.param(flashVars);htmlOptions.wmode=wmode;var htmlString="";for(var key in htmlOptions)htmlString+=key+"="+htmlOptions[key]+" ";$container.html("<embed "+htmlString+"/>")}else $container.html("<div class='html5lightbox-flash-error' style='display:block; position:relative;text-align:center; width:100%; left:0px; top:40%;'><div class='html5-error'><div>The required Adobe Flash Player plugin is not installed</div><br /><div style='display:block;position:relative;text-align:center;width:112px;height:33px;margin:0px auto;'><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' width='112' height='33'></img></a></div></div>")};
inst.checkType=function(href){if(!href)return-1;if(href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i))return 0;if(href.match(/[^\.]\.(swf)\s*$/i))return 1;if(href.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i))return 2;if(href.match(/\:\/\/.*(youtube\.com)/i)||href.match(/\:\/\/.*(youtu\.be)/i))return 3;if(href.match(/\:\/\/.*(vimeo\.com)/i))return 4;if(href.match(/\:\/\/.*(dailymotion\.com)/i)||href.match(/\:\/\/.*(dai\.ly)/i))return 9;if(href.match(/[^\.]\.(pdf)\s*$/i))return 5;if(href.match(/[^\.]\.(mp3)\s*$/i))return 6;
if(href.match(/[^\.]\.(flv)\s*$/i))return 8;if(href.match(/\#\w+/i))return 10;if(href.match(/\:\/\/.*(wistia)/i))return 11;return 7};inst.getURLParams=function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2)result[value[0].toLowerCase()]=unescape(value[1])}return result};inst.absoluteUrl=function(href){var link=document.createElement("a");link.href=href;return link.protocol+"//"+link.host+
link.pathname+link.search+link.hash};inst.showLightbox=function(type,href,title,width,height,webm,ogg,thumbnail,description){inst.options=$.extend(inst.options,inst.defaultoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle==
"right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadElem(new Array(type,href,title,null,width,height,webm,ogg,thumbnail,description))};inst.addItem=function(href,title,group,width,height,webm,ogg,thumbnail,description,mediatype){type=mediatype&&mediatype>=0?mediatype:inst.checkType(href);inst.elemArray.push(new Array(type,href,title,group,width,height,webm,ogg,thumbnail,description))};
inst.showItem=function(href){inst.options=$.extend(inst.options,inst.defaultoptions);$(window).trigger("html5lightbox.lightboxshow");inst.init();if(inst.elemArray.length<=0)return true;inst.hideObjects();for(var i=0;i<inst.elemArray.length;i++)if(inst.elemArray[i][ELEM_HREF]==href)break;if(i==inst.elemArray.length)return true;inst.options.curElem=i;inst.calcNextPrevElem();inst.reset();inst.$lightbox.show();var boxPos=inst.calcBoxPosition(inst.options.loadingwidth,inst.options.loadingheight);var boxW=
boxPos[0];var boxH=boxPos[1];var boxT=boxPos[2];inst.$lightboxBox.css({"margin-top":boxT});if(inst.options.titlestyle=="left"||inst.options.titlestyle=="right")inst.$lightboxBox.css({"width":boxW,"height":boxH});else{inst.$lightboxBox.css({"width":boxW,"height":"auto"});inst.$elemWrap.css({"width":boxW,"height":boxH})}inst.loadCurElem();return false};inst.off("click").click(inst.clickHandler);inst.each(function(){var self=$(this);var autoopen=false;var autoopendelay=0;if(typeof wondergridgallerylightbox_options!=
"undefined"&&wondergridgallerylightbox_options){if("autoopen"in wondergridgallerylightbox_options)autoopen=wondergridgallerylightbox_options.autoopen;if("autoopendelay"in wondergridgallerylightbox_options)autoopendelay=wondergridgallerylightbox_options.autoopendelay}autoopen=self.data("autoopen")?self.data("autoopen"):autoopen;autoopendelay=self.data("autoopendelay")?self.data("autoopendelay"):autoopendelay;if(autoopen){setTimeout(function(){self.click()},autoopendelay);return false}if(self.data("preloadonpageload")){var fileType="mediatype"in self.data()?
self.data("mediatype"):inst.checkType(self.attr("href"));if(fileType==0){var preloaddelay=self.data("preloaddelay")?self.data("preloaddelay"):0;setTimeout(function(){(new Image).src=self.attr("href")},preloaddelay)}}});var urlParams=inst.getURLParams();if("wpgridlightboxshare"in urlParams){var shareUrl=decodeURIComponent(urlParams["wpgridlightboxshare"]);var shareLink=$('.wpgridlightbox[href="'+shareUrl+'"]');if(shareLink.length>0)shareLink.click()}if(inst.options.preloadallonpageload)setTimeout(function(){inst.each(function(){if(this.nodeName.toLowerCase()!=
"a"&&this.nodeName.toLowerCase()!="area")return;var fileType="mediatype"in $(this).data()?$(this).data("mediatype"):inst.checkType($(this).attr("href"));if(fileType!==0)return;(new Image).src=$(this).attr("href");if($(this).data("thumbnail"))(new Image).src=$(this).data("thumbnail")})},inst.options.preloadalldelay);return inst}})(jQuery);(function($){$.fn.html5lightboxTouchSwipe=function(options){var defaults={preventWebBrowser:false,swipeDistance:0,swipeLeft:null,swipeRight:null,swipeTop:null,swipeBottom:null};
if(options)$.extend(defaults,options);return this.each(function(){var startX=-1,startY=-1;var curX=-1,curY=-1;function touchStart(event){var e=event.originalEvent;if(e.targetTouches.length>=1){startX=e.targetTouches[0].pageX;startY=e.targetTouches[0].pageY}else touchCancel(event)}function touchMove(event){if(defaults.preventWebBrowser)event.preventDefault();var e=event.originalEvent;if(e.targetTouches.length>=1){curX=e.targetTouches[0].pageX;curY=e.targetTouches[0].pageY}else touchCancel(event)}function touchEnd(event){if(curX>
0||curY>0){triggerHandler();touchCancel(event)}else touchCancel(event)}function touchCancel(event){startX=-1;startY=-1;curX=-1;curY=-1}function triggerHandler(){if(Math.abs(curX-startX)>Math.abs(curY-startY)){if(Math.abs(curX-startX)>defaults.swipeDistance)if(curX>startX){if(defaults.swipeRight)defaults.swipeRight.call()}else if(defaults.swipeLeft)defaults.swipeLeft.call()}else if(Math.abs(curY-startY)>defaults.swipeDistance)if(curY>startY){if(defaults.swipeBottom)defaults.swipeBottom.call()}else if(defaults.swipeTop)defaults.swipeTop.call()}
try{$(this).on("touchstart",touchStart);$(this).on("touchmove",touchMove);$(this).on("touchend",touchEnd);$(this).on("touchcancel",touchCancel)}catch(e){}})}})(jQuery);(function($){$.fn.lightboxHTML5VideoControls=function(skinFolder,parentInst,videoElem,hideControls,hidePlayButton,defaultVolume,fullscreenNativeControls,html5VideoNoDownload,skinImages){var isTouch="ontouchstart"in window;var eStart=isTouch?"touchstart":"mousedown";var eMove=isTouch?"touchmove":"mousemove";var eCancel=isTouch?"touchcancel":
"mouseup";var eClick="click";var BUTTON_SIZE=32;var BAR_HEIGHT=isTouch?48:36;var hideControlsTimerId=null;var hideVolumeBarTimeoutId=null;var sliderDragging=false;var isFullscreen=false;var userActive=true;var isHd=$(this).data("ishd");var hd=$(this).data("hd");var src=$(this).data("src");var $videoObj=$(this);$videoObj.get(0).removeAttribute("controls");var $videoPlay=$("<div class='html5boxVideoPlay'></div>");$videoObj.after($videoPlay);var playbuttonImage=skinImages&&"playbutton"in skinImages&&
skinImages.playbutton.length>0?skinImages.playbutton:skinFolder+"html5boxplayer_playvideo.png";$videoPlay.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+playbuttonImage+"')","background-position":"center center","background-repeat":"no-repeat"}).on(eClick,function(){$videoObj.get(0).play()});var $videoFullscreenBg=$("<div class='html5boxVideoFullscreenBg'></div>");var $videoControls=$("<div class='html5boxVideoControls'>"+
"<div class='html5boxVideoControlsBg'></div>"+"<div class='html5boxPlayPause'>"+"<div class='html5boxPlay'></div>"+"<div class='html5boxPause'></div>"+"</div>"+"<div class='html5boxTimeCurrent'>--:--</div>"+"<div class='html5boxFullscreen'></div>"+"<div class='html5boxHD'></div>"+"<div class='html5boxVolume'>"+"<div class='html5boxVolumeButton'></div>"+"<div class='html5boxVolumeBar'>"+"<div class='html5boxVolumeBarBg'>"+"<div class='html5boxVolumeBarActive'></div>"+"</div>"+"</div>"+"</div>"+"<div class='html5boxTimeTotal'>--:--</div>"+
"<div class='html5boxSeeker'>"+"<div class='html5boxSeekerBuffer'></div>"+"<div class='html5boxSeekerPlay'></div>"+"<div class='html5boxSeekerHandler'></div>"+"</div>"+"<div style='clear:both;'></div>"+"</div>");$videoObj.after($videoControls);$videoObj.after($videoFullscreenBg);$videoFullscreenBg.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0});$videoControls.css({display:"block",position:"absolute",width:"100%",height:BAR_HEIGHT,left:0,bottom:0,right:0,margin:"0 auto"});var userActivate=
function(){userActive=true};$videoObj.on("touch click mousemove mouseenter",function(){userActive=true});if(!hideControls)setInterval(function(){if(userActive){$videoControls.show();userActive=false;clearTimeout(hideControlsTimerId);hideControlsTimerId=setTimeout(function(){if(!$videoObj.get(0).paused)$videoControls.fadeOut()},5E3)}},250);$(".html5boxVideoControlsBg",$videoControls).css({display:"block",position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:0.7,
filter:"alpha(opacity=70)"});$(".html5boxPlayPause",$videoControls).css({display:"block",position:"relative",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"float":"left"});var $videoBtnPlay=$(".html5boxPlay",$videoControls);var $videoBtnPause=$(".html5boxPause",$videoControls);$videoBtnPlay.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+
"')","background-position":"top left"}).hover(function(){$(this).css({"background-position":"bottom left"})},function(){$(this).css({"background-position":"top left"})}).on(eClick,function(){$videoObj.get(0).play()});$videoBtnPause.css({display:"none",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top right"}).hover(function(){$(this).css({"background-position":"bottom right"})},
function(){$(this).css({"background-position":"top right"})}).on(eClick,function(){$videoObj.get(0).pause()});var $videoTimeCurrent=$(".html5boxTimeCurrent",$videoControls);var $videoTimeTotal=$(".html5boxTimeTotal",$videoControls);var $videoSeeker=$(".html5boxSeeker",$videoControls);var $videoSeekerPlay=$(".html5boxSeekerPlay",$videoControls);var $videoSeekerBuffer=$(".html5boxSeekerBuffer",$videoControls);var $videoSeekerHandler=$(".html5boxSeekerHandler",$videoControls);$videoTimeCurrent.css({display:"block",
position:"relative","float":"left","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoTimeTotal.css({display:"block",position:"relative","float":"right","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoSeeker.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px",
"background-color":"#222",margin:Math.floor((BAR_HEIGHT-10)/2)+"px 4px"}).on(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width();$videoSeeker.on(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/
$videoSeeker.width()})}).on(eCancel,function(){$videoSeeker.off(eMove)});$videoSeekerBuffer.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"});$videoSeekerPlay.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"});var $videoFSObj=fullscreenNativeControls?$videoObj:$videoObj.parent();if($videoFSObj.get(0).requestFullscreen||$videoFSObj.get(0).webkitRequestFullScreen||$videoFSObj.get(0).mozRequestFullScreen||$videoFSObj.get(0).webkitEnterFullScreen||
$videoFSObj.get(0).msRequestFullscreen){var switchScreen=function(fullscreen){if(fullscreen){if(fullscreenNativeControls){$videoObj.get(0).setAttribute("controls","controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}if($videoFSObj.get(0).requestFullscreen)$videoFSObj.get(0).requestFullscreen();else if($videoFSObj.get(0).webkitRequestFullScreen)$videoFSObj.get(0).webkitRequestFullScreen();else if($videoFSObj.get(0).mozRequestFullScreen)$videoFSObj.get(0).mozRequestFullScreen();
else if($videoFSObj.get(0).webkitEnterFullScreen)$videoFSObj.get(0).webkitEnterFullScreen();if($videoFSObj.get(0).msRequestFullscreen)$videoFSObj.get(0).msRequestFullscreen()}else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.msExitFullscreen)document.msExitFullscreen()};
var switchScreenCSS=function(fullscreen){if(fullscreenNativeControls)if(fullscreen){$videoObj.get(0).setAttribute("controls","controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}else $videoObj.get(0).removeAttribute("controls");else if(fullscreen){$(document).on("mousemove",userActivate);$videoControls.css({"z-index":2147483647,position:"fixed"});$videoFullscreenBg.css({"z-index":2147483647,display:"block"});$videoPlay.css({"z-index":2147483647})}else{$(document).off("mousemove",
userActivate);$videoControls.css({"z-index":"",position:"absolute"});$videoFullscreenBg.css({"z-index":"",display:"none"});$videoPlay.css({"z-index":""})}};document.addEventListener("MSFullscreenChange",function(){isFullscreen=document.msFullscreenElement!=null;switchScreenCSS(isFullscreen)},false);document.addEventListener("fullscreenchange",function(){isFullscreen=document.fullscreen;switchScreenCSS(isFullscreen)},false);document.addEventListener("mozfullscreenchange",function(){isFullscreen=document.mozFullScreen;
switchScreenCSS(isFullscreen)},false);document.addEventListener("webkitfullscreenchange",function(){isFullscreen=document.webkitIsFullScreen;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitbeginfullscreen",function(){isFullscreen=true;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitendfullscreen",function(){isFullscreen=false;switchScreenCSS(isFullscreen)},false);if(!fullscreenNativeControls)$("head").append("<style type='text/css'>video"+
videoElem+"::-webkit-media-controls { display:none !important; }</style>");var $videoFullscreen=$(".html5boxFullscreen",$videoControls);$videoFullscreen.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_fullscreen.png"+"')","background-position":"left top"}).hover(function(){var backgroundPosX=$(this).css("background-position")?
$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,function(){isFullscreen=!isFullscreen;switchScreen(isFullscreen)})}if(hd){var $videoHD=$(".html5boxHD",$videoControls);$videoHD.css({display:"block",
position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_hd.png"+"')","background-position":(isHd?"right":"left")+" center"}).on(eClick,function(){isHd=!isHd;$(this).css({"background-position":(isHd?"right":"left")+" center"});parentInst.isHd=isHd;var isPaused=$videoObj.get(0).isPaused;$videoObj.get(0).setAttribute("src",(isHd?hd:src)+"#t="+$videoObj.get(0).currentTime);
if(!isPaused)$videoObj.get(0).play();else $videoObj.get(0).pause()})}$videoObj.get(0).volume=defaultVolume;var volumeSaved=defaultVolume==0?1:defaultVolume;var volume=$videoObj.get(0).volume;$videoObj.get(0).volume=volume/2+0.1;if($videoObj.get(0).volume===volume/2+0.1){$videoObj.get(0).volume=volume;var $videoVolume=$(".html5boxVolume",$videoControls);var $videoVolumeButton=$(".html5boxVolumeButton",$videoControls);var $videoVolumeBar=$(".html5boxVolumeBar",$videoControls);var $videoVolumeBarBg=
$(".html5boxVolumeBarBg",$videoControls);var $videoVolumeBarActive=$(".html5boxVolumeBarActive",$videoControls);$videoVolume.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2)}).hover(function(){clearTimeout(hideVolumeBarTimeoutId);var volume=$videoObj.get(0).volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"});$videoVolumeBar.show()},function(){clearTimeout(hideVolumeBarTimeoutId);
hideVolumeBarTimeoutId=setTimeout(function(){$videoVolumeBar.hide()},1E3)});$videoVolumeButton.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_volume.png"+"')","background-position":"top "+(volume>0?"left":"right")}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+
" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,function(){var volume=$videoObj.get(0).volume;if(volume>0){volumeSaved=volume;volume=0}else volume=volumeSaved;var backgroundPosY=$(this).css("background-position")?$(this).css("background-position").split(" ")[1]:$(this).css("background-position-y");$videoVolumeButton.css({"background-position":(volume>
0?"left":"right")+" "+backgroundPosY});$videoObj.get(0).volume=volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"})});$videoVolumeBar.css({display:"none",position:"absolute",left:4,bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$videoVolumeBarBg.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"});$videoVolumeBarActive.css({display:"block",
position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"});$videoVolumeBarBg.on(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol;$videoVolumeBarBg.on(eMove,function(e){var e0=isTouch?
e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol})}).on(eCancel,function(){$videoVolumeBarBg.off(eMove)})}var calcTimeFormat=function(seconds){var h0=Math.floor(seconds/3600);var h=h0<10?"0"+h0:h0;var m0=Math.floor((seconds-h0*3600)/60);var m=m0<10?"0"+
m0:m0;var s0=Math.floor(seconds-(h0*3600+m0*60));var s=s0<10?"0"+s0:s0;var r=m+":"+s;if(h0>0)r=h+":"+r;return r};if(hidePlayButton)$videoPlay.hide();if(hideControls)$videoControls.hide();var onVideoPlay=function(){if(!hidePlayButton)$videoPlay.hide();if(!hideControls){$videoBtnPlay.hide();$videoBtnPause.show()}};var onVideoPause=function(){if(!hidePlayButton)$videoPlay.show();if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();$videoBtnPause.hide()}};var onVideoEnded=
function(){$(window).trigger("html5lightbox.videoended");if(!hidePlayButton)$videoPlay.show();if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();$videoBtnPause.hide()}};var onVideoUpdate=function(){var curTime=$videoObj.get(0).currentTime;if(curTime){$videoTimeCurrent.text(calcTimeFormat(curTime));var duration=$videoObj.get(0).duration;if(duration){$videoTimeTotal.text(calcTimeFormat(duration));if(!sliderDragging){var sliderW=$videoSeeker.width();var pos=
Math.round(sliderW*curTime/duration);$videoSeekerPlay.css({width:pos});$videoSeekerHandler.css({left:pos})}}}};var onVideoProgress=function(){if($videoObj.get(0).buffered&&$videoObj.get(0).buffered.length>0&&!isNaN($videoObj.get(0).buffered.end(0))&&!isNaN($videoObj.get(0).duration)){var sliderW=$videoSeeker.width();$videoSeekerBuffer.css({width:Math.round(sliderW*$videoObj.get(0).buffered.end(0)/$videoObj.get(0).duration)})}};try{$videoObj.on("play",onVideoPlay);$videoObj.on("pause",onVideoPause);
$videoObj.on("ended",onVideoEnded);$videoObj.on("timeupdate",onVideoUpdate);$videoObj.on("progress",onVideoProgress)}catch(e){}}})(jQuery)};
// source --> https://mermaiddigital.com/wp-content/plugins/wonderplugin-gridgallery/engine/wonderplugingridgallery.js?ver=13.2 
/** Wonderplugin Portfolio Grid Gallery Plugin Free Version
 * Copyright 2018 Magic Hills Pty Ltd All Rights Reserved
 * Website: http://www.wonderplugin.com
 * Version 13.2 
 */
if(typeof wpGridGalleryObjects==="undefined")var wpGridGalleryObjects=new function(){this.objects=[];this.addObject=function(obj){this.objects.push(obj)}};
(function($){$.fn.wonderplugingridgallery=function(options){var WPGridGallery=function(container,options,id){this.container=container;this.options=options;this.id=id;this.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;this.isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;this.isIE=navigator.userAgent.match(/MSIE/i)!=null&&!this.isOpera||this.isIE11;this.categories=["all"];this.pageloaded=1;this.masonryinited=
false;this.options.skinsfolder=this.options.skinsfoldername;if(this.options.skinsfolder.length>0&&this.options.skinsfolder[this.options.skinsfolder.length-1]!="/")this.options.skinsfolder+="/";if(this.options.skinsfolder.charAt(0)!="/"&&this.options.skinsfolder.substring(0,5)!="http:"&&this.options.skinsfolder.substring(0,6)!="https:")this.options.skinsfolder=this.options.jsfolder+this.options.skinsfolder;if(this.options.initsocialmedia)$("head").append('<link rel="stylesheet" href="'+this.options.jsfolder+
'icons/css/fontello.css" type="text/css" />');this.init()};WPGridGallery.prototype={resizeImgObj:function($img){var inst=this;if(inst.options.masonrymode){$img.css({width:"100%",height:"auto","max-width":"none"});return}if(inst.options.textinsidespace)$img.css({width:"100%",height:"auto","max-width":"none"});else{var w0=$img.width();var h0=$img.height();var cellWidth=inst.options.width;var cellHeight=inst.options.height;var $cell=$img.closest(".wonderplugin-gridgallery-item-container");if($cell.length>
0&&$cell.width()>0&&$cell.height()>0){cellWidth=$cell.width();cellHeight=$cell.height()}if(w0>0&&h0>0&&(inst.options.scalemode=="fill"&&w0/h0>cellWidth/cellHeight||inst.options.scalemode=="fit"&&w0/h0<cellWidth/cellHeight)){$img.css({position:"relative",width:"auto",height:"100%","max-width":"none","max-height":"none","margin-top":"0px","margin-left":"0px"});if(inst.options.centerimage&&inst.options.scalemode=="fill")if($img.width()>0){var ml=($img.closest(".wonderplugin-gridgallery-item-container").width()-
$img.width())/2;$img.css({"margin-left":ml+"px"})}}else{$img.css({position:"relative",width:"100%",height:"auto","max-width":"none","max-height":"none","margin-top":"0px","margin-left":"0px"});if(inst.options.centerimage)if($img.height()>0){var mt=($img.closest(".wonderplugin-gridgallery-item-container").height()-$img.height())/2;$img.css({"margin-top":mt+"px"})}}}},initImgSizeOnLoad:function(){var inst=this;$(".wonderplugin-gridgallery-item-img",this.container).on("load",function(){inst.resizeImgObj($(this));
if(inst.options.masonrymode){$(this).data("naturalwidth",this.width);$(this).data("naturalheight",this.height);inst.recalcMasonryPosition($(this))}}).each(function(){if(this.complete)$(this).trigger("load")})},recalcMasonryPosition:function(img){if(!this.masonryinited)return;var item=img.closest(".wonderplugin-gridgallery-item");if(item.css("display")=="none")return;this.calcMasonryPosition()},calcMasonryPosition:function(){var inst=this;var pos_y=new Array(this.column_num);for(var i=0;i<this.column_num;i++)pos_y[i]=
0;var pos_h=new Array(this.column_num);for(var i=0;i<this.column_num;i++)pos_h[i]=0;var count=0;var cur_col=0;var cur_posy=pos_y[0];$(".wonderplugin-gridgallery-item",this.container).each(function(){if($(this).css("display")=="block"){if(inst.options.masonrysmartalign){cur_col=0;cur_posy=pos_y[0];for(var i=1;i<inst.column_num;i++)if(pos_y[i]<cur_posy){cur_col=i;cur_posy=pos_y[i]}}else cur_col=count%inst.column_num;var l=cur_col*(inst.item_width+inst.options.gap);var t=pos_y[cur_col];var w=inst.item_width;
var img_h=inst.item_height;var img=$(".wonderplugin-gridgallery-item-img",this);if(img.length&&img.data("naturalwidth")&&img.data("naturalheight"))img_h=inst.item_width*img.data("naturalheight")/img.data("naturalwidth");var h=img_h+inst.options.titleheight;pos_y[cur_col]+=h+inst.options.gap;pos_h[cur_col]=h+inst.options.gap;$(this).css({left:l+"px",top:t+"px",width:w+"px",height:h+"px"});$(this).data("itemcol",cur_col);count++}});var screenWidth=this.options.testwindowwidthonly?$(window).width():
Math.max($(window).width(),$(document).width());if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["lefttop","righttop"])>-1&&screenWidth>this.options.verticalcategorysmallscreenwidth)$(".wonderplugin-gridgallery-list",this.container).css({width:"auto"});else $(".wonderplugin-gridgallery-list",this.container).css({width:this.total_width+"px"});var list_height=0;for(var i=0;i<this.column_num;i++)list_height=Math.max(list_height,pos_y[i]);this.list_height=
list_height;$(".wonderplugin-gridgallery-list",this.container).css({height:list_height+"px"});if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["topleft","topcenter","topright","bottomleft","bottomcenter","bottomright"])>-1)$(".wonderplugin-gridgallery-tags",this.container).css({width:this.total_width+"px"});this.masonryinited=true},calcPosition:function(){if(this.options.masonrymode){this.calcMasonryPosition();return}var i;var j;var pos=new Array;
for(i=0;i<this.column_num;i++)pos.push({x:i*this.item_width+i*this.options.gap,y:0,row:0});var visibleCount=0;$(".wonderplugin-gridgallery-item",this.container).each(function(){if($(this).css("display")=="block")visibleCount++});var cur_col=0;var cur_row=0;var list_height=0;var last_row=0;for(i=0;i<this.elemArray.length;i++){while(pos[cur_col].row>cur_row){cur_col++;if(cur_col>=this.column_num){cur_col=0;cur_row++}}this.elemArray[i].x=pos[cur_col].x;this.elemArray[i].y=pos[cur_col].y;var col=Math.min(this.elemArray[i].col,
this.column_num-cur_col);var row=Math.ceil(this.elemArray[i].row*col/this.elemArray[i].col);this.elemArray[i].w=this.item_width*col+this.options.gap*(col-1);this.elemArray[i].h=this.container_height*row+this.options.gap*(row-1);this.elemArray[i].item_row=cur_row;this.elemArray[i].item_col=cur_col;for(j=0;j<col;j++){pos[cur_col+j].y+=this.container_height*row+this.options.gap*row;pos[cur_col+j].row+=row}cur_col++;if(cur_col>=this.column_num){cur_col=0;cur_row++}if(i==visibleCount-1){list_height=0;
for(j=0;j<this.column_num;j++)if(pos[j].y>list_height)list_height=pos[j].y;last_row=cur_row}}if((this.options.centerlastrow||this.options.centeronerow&&last_row==0)&&visibleCount>0){var extramargin=(this.total_width-this.elemArray[visibleCount-1].x-this.elemArray[visibleCount-1].w)/2;for(var i=visibleCount-1;i>=0;i--)if(this.elemArray[i].item_row==last_row)this.elemArray[i].x+=extramargin;else break}var screenWidth=this.options.testwindowwidthonly?$(window).width():Math.max($(window).width(),$(document).width());
if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["lefttop","righttop"])>-1&&screenWidth>this.options.verticalcategorysmallscreenwidth)$(".wonderplugin-gridgallery-list",this.container).css({width:"auto"});else $(".wonderplugin-gridgallery-list",this.container).css({width:this.total_width+"px"});this.list_height=list_height;$(".wonderplugin-gridgallery-list",this.container).css({height:list_height+"px"});if(this.options.categoryshow&&this.options.categoryposition&&
$.inArray(this.options.categoryposition,["topleft","topcenter","topright","bottomleft","bottomcenter","bottomright"])>-1)$(".wonderplugin-gridgallery-tags",this.container).css({width:this.total_width+"px"});this.applyPosition()},applyPosition:function(){var inst=this;var posIndex=0;$(".wonderplugin-gridgallery-item",this.container).each(function(index){if($(this).css("display")=="none")return;$(this).css({left:inst.elemArray[posIndex].x,top:inst.elemArray[posIndex].y,width:inst.elemArray[posIndex].w,
height:inst.elemArray[posIndex].h});$(".wonderplugin-gridgallery-item-container",this).css({width:inst.elemArray[posIndex].w-inst.options.margin,height:inst.elemArray[posIndex].h-inst.options.titleheight-inst.options.margin});if(inst.options.circularimage)$(".wonderplugin-gridgallery-item-container, .wonderplugin-gridgallery-item-img",this).css({"-webkit-border-radius":"50%","-moz-border-radius":"50%","border-radius":"50%"});posIndex++})},applyWidth:function(){var inst=this;$(".wonderplugin-gridgallery-item",
this.container).each(function(){inst.resizeImgObj($(".wonderplugin-gridgallery-item-img",this))})},showCategory:function(cat){var instance=this;var totalitems=$(".wonderplugin-gridgallery-item",this.container).length;if(this.options.lightboxshowallcategories)$(".wonderplugin-gridgallery-item",this.container).find("a").data("showall",cat&&cat.length>0&&$.inArray("all",cat)>-1);var start=-1;var end=-1;if(this.options.lazyloadmode=="loadmore"){start=0;if(this.options.loadallremaining&&this.pageloaded>
1)end=totalitems;else end=this.pageloaded*this.options.itemsperpage}else if(this.options.lazyloadmode=="pagination"){start=(this.pageloaded-1)*this.options.itemsperpage;end=this.pageloaded*this.options.itemsperpage}if(cat&&cat.length>0){if($.inArray("all",cat)>-1){$(".wonderplugin-gridgallery-item",this.container).each(function(index){if(end>0&&(index>=end||index<start)){$(this).css({display:"none"});$(this).removeClass("wonderplugin-gridgallery-item-visible")}else{$(this).css({display:"block"});
$(this).addClass("wonderplugin-gridgallery-item-visible");if(!$(".wonderplugin-gridgallery-item-img",this).attr("src")&&$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))$(".wonderplugin-gridgallery-item-img",this).attr("src",$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))}if(!instance.options.lightboxnogroup)$(this).find("a.wpgridlightbox").data("group","wpgridgallery-"+instance.id)});if(this.options.lazyloadmode=="loadmore"&&end>=$(".wonderplugin-gridgallery-item",
this.container).length)$(".wonderplugin-gridgallery-loadmore",this.container).css({display:"none"})}else{var count=0;$(".wonderplugin-gridgallery-item",this.container).each(function(index){$(this).find("a.wpgridlightbox").removeData("group");var group="";for(var i=0;i<cat.length;i++)group+=(i>0?":":"")+"wpgridgallery-"+instance.id+"-"+cat[i];var style="none";if($(this).data("category")){var categories=String($(this).data("category")).split(":");for(var i=0;i<categories.length;i++)if($.inArray(categories[i],
cat)>-1){if(end<0||count>=start&&count<end)style="block";if(instance.options.lightboxcategorygroup)$(this).find("a.wpgridlightbox").data("group",group);count++;break}}if(!instance.options.lightboxcategorygroup&&!instance.options.lightboxnogroup)$(this).find("a.wpgridlightbox").data("group","wpgridgallery-"+instance.id);$(this).css({display:style});if(style=="block")$(this).addClass("wonderplugin-gridgallery-item-visible");else $(this).removeClass("wonderplugin-gridgallery-item-visible");if(style==
"block"&&!$(".wonderplugin-gridgallery-item-img",this).attr("src")&&$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))$(".wonderplugin-gridgallery-item-img",this).attr("src",$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))});if(this.options.lazyloadmode=="loadmore"&&end>=count)$(".wonderplugin-gridgallery-loadmore",this.container).css({display:"none"})}$(".wonderplugin-gridgallery-tag",this.container).removeClass("wonderplugin-gridgallery-tag-selected");$(".wonderplugin-gridgallery-tag",
this.container).each(function(){if($.inArray(String($(this).data("slug")),cat)>-1)$(this).addClass("wonderplugin-gridgallery-tag-selected")})}else $(".wonderplugin-gridgallery-item",this.container).each(function(index){if(!instance.options.lightboxnogroup)$(this).find("a.wpgridlightbox").data("group","wpgridgallery-"+instance.id);if(end>0&&(index>=end||index<start)){$(this).css({display:"none"});$(this).removeClass("wonderplugin-gridgallery-item-visible")}else{$(this).css({display:"block"});$(this).addClass("wonderplugin-gridgallery-item-visible");
if(!$(".wonderplugin-gridgallery-item-img",this).attr("src")&&$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))$(".wonderplugin-gridgallery-item-img",this).attr("src",$(".wonderplugin-gridgallery-item-img",this).data("wpplazysrc"))}});this.calcPosition();this.applyWidth()},initCategories:function(){var instance=this;$(".wonderplugin-gridgallery-tag",this.container).click(function(){if(instance.options.categorymulticat){if($(this).hasClass("wonderplugin-gridgallery-tag-selected")){if(instance.options.categoryatleastone&&
$(".wonderplugin-gridgallery-tag-selected",instance.container).length<=1)return;$(this).removeClass("wonderplugin-gridgallery-tag-selected")}else{if($(this).data("slug")=="all")$(".wonderplugin-gridgallery-tag",instance.container).removeClass("wonderplugin-gridgallery-tag-selected");else $(".wonderplugin-gridgallery-tag[data-slug='all']",instance.container).removeClass("wonderplugin-gridgallery-tag-selected");$(this).addClass("wonderplugin-gridgallery-tag-selected")}var cat=new Array;$(".wonderplugin-gridgallery-tag",
instance.container).each(function(){if($(this).hasClass("wonderplugin-gridgallery-tag-selected"))cat.push(String($(this).data("slug")))});instance.categories=cat}else{if($(this).hasClass("wonderplugin-gridgallery-tag-selected"))return;$(".wonderplugin-gridgallery-tag",this.container).removeClass("wonderplugin-gridgallery-tag-selected");$(this).addClass("wonderplugin-gridgallery-tag-selected");instance.categories=[String($(this).data("slug"))]}instance.initLazyLoad(instance.categories);instance.showCategory(instance.categories)})},
initCategoryDropmenu:function(){$(".wonderplugin-gridgallery-selectcategory",this.container).on("click",function(){var menu=$(this).closest(".wonderplugin-gridgallery-tags").find(".wonderplugin-gridgallery-menu");if(menu.is(":visible"))menu.hide();else menu.show()})},init:function(){this.container.css({"display":"block"});this.elemArray=new Array;var inst=this;$(".wonderplugin-gridgallery-item",this.container).each(function(index){$(this).addClass("wonderplugin-gridgallery-item-"+index);$(this).data("index",
index);$(this).css({transition:"all 0.5s ease"});$(this).css({position:inst.options.firstimage?"relative":"absolute",display:inst.options.firstimage&&index>0?"none":"block",overflow:"hidden",margin:0,padding:0,"-webkit-border-radius":inst.options.borderradius+"px","-moz-border-radius":inst.options.borderradius+"px","border-radius":inst.options.borderradius+"px"});if(inst.options.circularimage)$(".wonderplugin-gridgallery-item-container, .wonderplugin-gridgallery-item-img",this).css({"-webkit-border-radius":"50%",
"-moz-border-radius":"50%","border-radius":"50%"});inst.elemArray.push({row:$(this).data("row"),col:$(this).data("col")});if($("a",this).length>0){var itemtext=null;if(inst.options.usetemplatefortextoverlay&&$(".wonderplugin-gridgallery-item-text",this).length>0)itemtext=$(".wonderplugin-gridgallery-item-text",this);else if(inst.options.showtitle&&(inst.options.showtexttitle||inst.options.showtextdescription||inst.options.showtextbutton)){var text="";if(inst.options.showtexttitle){var title=$("a",
this).data("title")?$("a",this).data("title"):$("a",this).attr("title");if(title&&title.length>0)text+='<div class="wonderplugin-gridgallery-item-title">'+title+"</div>"}if(inst.options.showtextdescription){var description=$("a",this).data("description");if(description&&description.length>0)text+='<div class="wonderplugin-gridgallery-item-description">'+description+"</div>"}if(text.length>0||inst.options.showtextbutton&&$(".wonderplugin-gridgallery-item-button",this).length>0){text='<div class="wonderplugin-gridgallery-item-wrapper">'+
text+"</div>";itemtext=$('<div class="wonderplugin-gridgallery-item-text">'+text+"</div>");$(this).append(itemtext);if(inst.options.showtextbutton&&$(".wonderplugin-gridgallery-item-button",this).length>0)$(".wonderplugin-gridgallery-item-button",this).css({display:"block"}).appendTo($(".wonderplugin-gridgallery-item-wrapper",this))}}if(itemtext){if(inst.options.titlemode=="always"||inst.options.titleeffect=="flipy")itemtext.css({display:"block"});else itemtext.css({display:"none"});if(inst.options.titlemode!=
"always"&&inst.options.titleeffect=="flipy"){$(".wonderplugin-gridgallery-item-container, .wonderplugin-gridgallery-item-caption",this).addClass("wonderplugingridgallery-flipy-in");itemtext.addClass("wonderplugingridgallery-flipy-out")}if(inst.options.overlaylink){var href=$("a",this).attr("href");if(href.length>0&&href!="#"){$(".wonderplugin-gridgallery-item-text",this).css({cursor:"pointer"});$(".wonderplugin-gridgallery-item-text",this).click(function(){$(".wonderplugin-gridgallery-item-img",$(this).parent()).trigger("click")})}}}var href=
$("a",this).attr("href");if(href&&($("a",this).data("isvideo")||inst.isVideo(href))&&inst.options.addvideoplaybutton)$(".wonderplugin-gridgallery-item-container a",this).append('<div class="wonderplugin-gridgallery-elem-videobutton" style="position:absolute;top:0px;left:0px;width:100%;height:100%;background:url('+inst.options.skinsfolder+inst.options.videoplaybutton+') no-repeat center center"></div>')}if(inst.options.enabletabindex){$(".wonderplugin-gridgallery-item-img",inst.container).each(function(){if($(this).parent().is("a")){$(this).parent().attr("tabindex",
"0").focus(function(){$(this).closest(".wonderplugin-gridgallery-item").trigger("mouseenter")}).focusout(function(){$(this).closest(".wonderplugin-gridgallery-item").trigger("mouseleave")});$(this).keyup(function(e){if(e.keyCode==13)$(this).trigger("click")})}});$(".wonderplugin-gridgallery-tag",inst.container).attr("tabindex","0").keyup(function(e){if(e.keyCode==13)$(this).trigger("click")})}var i;var l;var d0="wmoangdiecrpluginh.iclolms";for(i=1;i<=5;i++)d0=d0.slice(0,i)+d0.slice(i+1);l=d0.length;
for(var i=0;i<5;i++)d0=d0.slice(0,l-9+i)+d0.slice(l-8+i);if(index%4==1&&inst.options.stamp)$(this).append('<a href="'+inst.options.marklink+'" target="_blank"><div style="display:none;visibility:hidden;position:absolute;top:2px;left:2px;padding:2px 4px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#eee;color:#333;font:12px Arial,sans-serif;">'+inst.options.mark+"</div></a>")});this.initImgSizeOnLoad();this.initCategories();$(".wonderplugin-gridgallery-item-container",
this.container).css({display:"block",position:"relative",overflow:"hidden","text-align":"center",margin:this.options.margin/2});this.positionGallery(true);$(window).resize(function(){inst.positionGallery()});if(!("ontouchstart"in window)||!this.options.nohoverontouchscreen){$(".wonderplugin-gridgallery-item",this.container).data("highlighted",0);if("ontouchstart"in window&&this.options.useclickontouchscreen)$(".wonderplugin-gridgallery-item",this.container).on("click",function(){if($(this).data("highlighted")==
0){$(this).data("highlighted",1);inst.onItemHighlight(this)}else{$(this).data("highlighted",0);inst.onItemDehighlight(this)}});else $(".wonderplugin-gridgallery-item",this.container).hover(function(){inst.onItemHighlight(this)},function(){inst.onItemDehighlight(this)})}this.initCategoryDropmenu();this.initFirstLoad()},onItemHighlight:function(item){var inst=this;var index=$(item).data("index");var w=inst.elemArray[index].w+inst.options.hoverzoominvalue-inst.options.margin;var h=w*inst.elemArray[index].h/
inst.elemArray[index].w;if(inst.options.hoverfade)$(".wonderplugin-gridgallery-item-img",item).animate({opacity:inst.options.hoverfadeopacity},{queue:false,duration:inst.options.hoverfadeduration});if(inst.options.hoverzoomin)if(inst.options.hoverzoominimageonly){var w0=$(".wonderplugin-gridgallery-item-img",item).width();var h0=$(".wonderplugin-gridgallery-item-img",item).height();if(w0>0&&h0>0){$(".wonderplugin-gridgallery-item-img",item).data("originalwidth",w0);$(".wonderplugin-gridgallery-item-img",
item).data("originalheight",h0);var w1=w0*inst.options.hoverzoominimagescale;var h1=h0*inst.options.hoverzoominimagescale;var anim_props={width:w1+"px",height:h1+"px"};if(inst.options.hoverzoominimagecenter){anim_props.top=Math.round((h0-h1)/2)+"px";anim_props.left=Math.round((w0-w1)/2)+"px"}$(".wonderplugin-gridgallery-item-img",item).animate(anim_props,inst.options.hoverzoominimageduration,"easeOutQuad")}inst.showTitle(item)}else{$(".wonderplugin-gridgallery-item-container",item).animate({width:w,
height:h-inst.options.titleheight},inst.options.hoverzoominduration,"easeOutQuad");if(inst.options.circularimage)$(".wonderplugin-gridgallery-item-container, .wonderplugin-gridgallery-item-img",item).css({"-webkit-border-radius":"50%","-moz-border-radius":"50%","border-radius":"50%"});$(item).animate({width:w+inst.options.margin,height:h+inst.options.margin,left:inst.elemArray[index].x-inst.options.hoverzoominvalue/2,top:inst.elemArray[index].y-inst.options.hoverzoominvalue/2},inst.options.hoverzoominduration,
"easeOutQuad",function(){inst.showTitle(item)});$(item).css({"z-index":999})}else inst.showTitle(item)},onItemDehighlight:function(item){var inst=this;var index=$(item).data("index");if(inst.options.hoverfade)$(".wonderplugin-gridgallery-item-img",item).animate({opacity:1},{queue:false,duration:inst.options.hoverfadeduration});if(inst.options.hoverzoomin)if(inst.options.hoverzoominimageonly){var w0=$(".wonderplugin-gridgallery-item-img",item).data("originalwidth");var h0=$(".wonderplugin-gridgallery-item-img",
item).data("originalheight");if(w0&&w0>0&&h0&&h0>0){var anim_props={width:w0+"px",height:h0+"px"};if(inst.options.hoverzoominimagecenter){anim_props.top="0px";anim_props.left="0px"}$(".wonderplugin-gridgallery-item-img",item).animate(anim_props,inst.options.hoverzoominimageduration,"easeOutQuad")}inst.hideTitle(item)}else{$(".wonderplugin-gridgallery-item-container",item).animate({width:inst.elemArray[index].w-inst.options.margin,height:inst.elemArray[index].h-inst.options.margin-inst.options.titleheight},
inst.options.hoverzoominduration,"easeOutQuad");if(inst.options.circularimage)$(".wonderplugin-gridgallery-item-container, .wonderplugin-gridgallery-item-img",item).css({"-webkit-border-radius":"50%","-moz-border-radius":"50%","border-radius":"50%"});$(item).animate({width:inst.elemArray[index].w,height:inst.elemArray[index].h,left:inst.elemArray[index].x,top:inst.elemArray[index].y},inst.options.hoverzoominduration,"easeOutQuad",function(){inst.hideTitle(item)});$(item).css({"z-index":""})}else inst.hideTitle(item)},
initFirstLoad:function(){var params=this.getParams();var total=$(".wonderplugin-gridgallery-item",this.container).length;if("wpgalleryitemid"in params&&params["wpgalleryitemid"]>=0&&params["wpgalleryitemid"]<total)$(".wonderplugin-gridgallery-item",this.container).eq(params["wpgalleryitemid"]).find(".wonderplugin-gridgallery-item-img").click()},initLazyLoad:function(cat){this.pageloaded=1;$(".wonderplugin-gridgallery-loadmore",this.container).remove();$(".wonderplugin-gridgallery-pagination",this.container).remove();
var totalitems=$(".wonderplugin-gridgallery-item",this.container).length;if(cat&&cat.length>0&&$.inArray("all",cat)<0){totalitems=0;$(".wonderplugin-gridgallery-item",this.container).each(function(index){if($(this).data("category")){var categories=String($(this).data("category")).split(":");for(var i=0;i<categories.length;i++)if($.inArray(categories[i],cat)>-1){totalitems++;break}}})}if(this.options.itemsperpage<totalitems)if(this.options.lazyloadmode=="loadmore"){this.container.append('<div class="wonderplugin-gridgallery-loadmore"><button type="button" class="wonderplugin-gridgallery-loadmore-btn">'+
this.options.loadmorecaption+"</button></div>");var instance=this;$(".wonderplugin-gridgallery-loadmore-btn",this.container).click(function(){instance.pageloaded++;instance.showCategory(instance.categories)})}else if(this.options.lazyloadmode=="pagination"){var page_count=Math.ceil(totalitems/this.options.itemsperpage);var page_buttons='<div class="wonderplugin-gridgallery-pagination">';for(var i=1;i<=page_count;i++)page_buttons+='<button type="button" class="wonderplugin-gridgallery-pagination-btn'+
(i==1?" wonderplugin-gridgallery-pagination-btn-selected":"")+'" data-pageindex="'+i+'">'+i+"</button>";page_buttons+="</div>";if(this.options.paginationpos=="top")this.container.prepend(page_buttons);else this.container.append(page_buttons);var instance=this;$(".wonderplugin-gridgallery-pagination-btn",this.container).click(function(){$(".wonderplugin-gridgallery-pagination-btn",instance.container).removeClass("wonderplugin-gridgallery-pagination-btn-selected");$(this).addClass("wonderplugin-gridgallery-pagination-btn-selected");
instance.pageloaded=$(this).data("pageindex");instance.showCategory(instance.categories)})}},showTitle:function(parent){if(!this.options.showtitle||this.options.titlemode=="always")return;if($(parent).data("isplayingvideo"))return;var text_div=$(".wonderplugin-gridgallery-item-text",parent);var item_div=$(".wonderplugin-gridgallery-item-container",parent);var caption_div=$(".wonderplugin-gridgallery-item-caption",parent);if(text_div.length>0)if(this.options.titleeffect=="flipy"){caption_div.removeClass("wonderplugingridgallery-flipy-in").addClass("wonderplugingridgallery-flipy-out");
item_div.removeClass("wonderplugingridgallery-flipy-in").addClass("wonderplugingridgallery-flipy-out");text_div.removeClass("wonderplugingridgallery-flipy-out").addClass("wonderplugingridgallery-flipy-in")}else if(this.options.titleeffect=="fade")text_div.fadeIn(this.options.titleeffectduration);else if(this.options.titleeffect=="slide"){var h=text_div.outerHeight();text_div.css({display:"block",bottom:"-"+h+"px"});text_div.animate({bottom:"0px"},this.options.titleeffectduration)}},hideTitle:function(parent){if(!this.options.showtitle||
this.options.titlemode=="always")return;var text_div=$(".wonderplugin-gridgallery-item-text",parent);var item_div=$(".wonderplugin-gridgallery-item-container",parent);var caption_div=$(".wonderplugin-gridgallery-item-caption",parent);if(text_div.length>0)if(this.options.titleeffect=="flipy"){caption_div.removeClass("wonderplugingridgallery-flipy-out").addClass("wonderplugingridgallery-flipy-in");item_div.removeClass("wonderplugingridgallery-flipy-out").addClass("wonderplugingridgallery-flipy-in");
text_div.removeClass("wonderplugingridgallery-flipy-in").addClass("wonderplugingridgallery-flipy-out")}else if(this.options.titleeffect=="fade")text_div.fadeOut(this.options.titleeffectduration);else if(this.options.titleeffect=="slide"){var h=text_div.outerHeight();text_div.animate({bottom:"-"+h+"px"},this.options.titleeffectduration)}},isVideo:function(href){if(!href)return false;if(href.match(/\.(mp4|m4v|ogv|ogg|webm|flv)(.*)?$/i)||href.match(/\:\/\/.*(youtube\.com)/i)||href.match(/\:\/\/.*(youtu\.be)/i)||
href.match(/\:\/\/.*(vimeo\.com)/i)||href.match(/\:\/\/.*(dailymotion\.com)/i)||href.match(/\:\/\/.*(dai\.ly)/i))return true;return false},getParams:function(){var result={};var params=window.location.search.substring(1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2)result[value[0].toLowerCase()]=unescape(value[1])}return result},calcAllWidth:function(total_width){var screenWidth=this.options.testwindowwidthonly?$(window).width():Math.max($(window).width(),
$(document).width());if(screenWidth<=this.options.verticalcategorysmallscreenwidth)return total_width;if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["lefttop","righttop"])>-1)if($(".wonderplugin-gridgallery-tags-lefttop").length>0)total_width+=$(".wonderplugin-gridgallery-tags-lefttop").width();else if($(".wonderplugin-gridgallery-tags-righttop").length>0)total_width+=$(".wonderplugin-gridgallery-tags-righttop").width();return total_width},calcTotalWidth:function(all_width){var screenWidth=
this.options.testwindowwidthonly?$(window).width():Math.max($(window).width(),$(document).width());if(screenWidth<=this.options.verticalcategorysmallscreenwidth)return all_width;if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["lefttop","righttop"])>-1)if($(".wonderplugin-gridgallery-tags-lefttop").length>0)all_width-=$(".wonderplugin-gridgallery-tags-lefttop").width();else if($(".wonderplugin-gridgallery-tags-righttop").length>0)all_width-=$(".wonderplugin-gridgallery-tags-righttop").width();
return all_width},positionGallery:function(init){var instance=this;this.item_width=this.options.width;this.item_height=this.options.height;this.container_height=this.options.height+this.options.titleheight;this.column_num=this.options.firstimage?1:this.options.column;this.total_width=this.item_width*this.column_num+this.options.gap*(this.column_num-1);this.all_width=this.calcAllWidth(this.total_width);var screenWidth=this.options.testwindowwidthonly?$(window).width():Math.max($(window).width(),$(document).width());
if(this.options.responsive){if(this.options.mediumscreen)if(screenWidth<this.options.mediumscreensize){this.column_num=this.options.mediumcolumn;this.total_width=this.item_width*this.column_num+this.options.gap*(this.column_num-1)}if(this.options.smallscreen)if(screenWidth<this.options.smallscreensize){this.column_num=this.options.smallcolumn;this.total_width=this.item_width*this.column_num+this.options.gap*(this.column_num-1)}if(this.container.parent()&&this.container.parent().width())if(this.container.parent().width()<
this.all_width){this.all_width=this.container.parent().width();this.total_width=this.calcTotalWidth(this.all_width);this.item_width=(this.total_width-this.options.gap*(this.column_num-1))/this.column_num;this.item_height=this.item_width*this.options.height/this.options.width;this.container_height=this.item_height+this.options.titleheight;if(this.item_width>this.options.width&&this.options.donotzoomin){this.item_width=this.options.width;this.item_height=this.options.height;this.container_height=this.options.height+
this.options.titleheight;this.total_width=this.item_width*this.column_num+this.options.gap*(this.column_num-1);this.all_width=this.calcAllWidth(this.total_width)}}}if(this.options.firstimage){$(".wonderplugin-gridgallery-list",this.container).css({width:this.item_width+"px",height:this.container_height+"px"});$(".wonderplugin-gridgallery-item-container",this.container).css({width:this.item_width-this.options.margin,height:this.item_height-this.options.margin});for(var i=0;i<this.elemArray.length;i++){this.elemArray[i].x=
0;this.elemArray[i].y=0;this.elemArray[i].w=this.item_width;this.elemArray[i].h=this.container_height}$(".wonderplugin-gridgallery-item",this.container).each(function(index){$(this).find("a.wpgridlightbox").data("group","wpgridgallery-"+instance.id)});return}else if(this.options.categoryshow&&this.options.categoryposition&&$.inArray(this.options.categoryposition,["lefttop","righttop"])>-1){this.container.css({"max-width":this.all_width+"px"});if(screenWidth>this.options.verticalcategorysmallscreenwidth){$(".wonderplugin-gridgallery-tags-lefttop").removeClass("wonderplugin-gridgallery-tags-lefttop-smallscreen");
$(".wonderplugin-gridgallery-tags-righttop").removeClass("wonderplugin-gridgallery-tags-righttop-smallscreen");$(".wonderplugin-gridgallery-list",this.container).css({overflow:"hidden"})}else{$(".wonderplugin-gridgallery-tags-lefttop").addClass("wonderplugin-gridgallery-tags-lefttop-smallscreen");$(".wonderplugin-gridgallery-tags-righttop").addClass("wonderplugin-gridgallery-tags-righttop-smallscreen");$(".wonderplugin-gridgallery-list",this.container).css({overflow:"visible"});if(this.options.categoryposition==
"righttop")$(".wonderplugin-gridgallery-list",this.container).css({"float":"none"})}}if(init){var cat=["all"];var params=this.getParams();if(params&&params.wpcategory)cat=[params.wpcategory];else cat=[this.options.categorydefault?this.options.categorydefault:"all"];this.categories=cat;this.initLazyLoad(this.categories)}this.showCategory(this.categories)}};options=options||{};for(var key in options)if(key.toLowerCase()!==key){options[key.toLowerCase()]=options[key];delete options[key]}this.each(function(){if($(this).data("donotinit")&&
(!options||!options["forceinit"]))return;if($(this).data("inited"))return;$(this).data("inited",1);var defaultOptions={stamp:true,initsocialmedia:true,lightboxnogroup:false,lightboxcategorygroup:false,enabletabindex:false,masonrymode:false,masonrysmartalign:true,lazyloadmode:"none",loadallremaining:false,itemsperpage:12,loadmorecaption:"Load More",paginationpos:"bottom",categorymulticat:false,categoryatleastone:false,nohoverontouchscreen:false,useclickontouchscreen:false,hoverzoominimageonly:false,
hoverzoominimagecenter:false,hoverzoominimagescale:1.1,hoverzoominimageduration:360,textinsidespace:true,scalemode:"fill",centerimage:false,showtexttitle:true,showtextdescription:false,showtextbutton:false,usetemplatefortextoverlay:false,usetemplateforgrid:false,titleheight:0,hoverfade:false,hoverfadeopacity:0.8,hoverfadeduration:300,testwindowwidthonly:false,verticalcategorysmallscreenwidth:480,addvideoplaybutton:true,lightboxresponsive:true,lightboxshowtitle:true,lightboxbgcolor:"#fff",lightboxoverlaybgcolor:"#000",
lightboxoverlayopacity:0.9,titlebottomcss:"color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;",lightboxshowdescription:false,descriptionbottomcss:"color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxfullscreenmode:false,lightboxfullscreenmodeonsmallscreen:false,lightboxfullscreensmallscreenwidth:800,lightboxfullscreentextinside:false,lightboxcloseonoverlay:true,
lightboxvideohidecontrols:false,lightboxtitlestyle:"bottom",lightboximagepercentage:75,lightboxdefaultvideovolume:1,lightboxtitleprefix:"%NUM / %TOTAL",lightboxtitleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;",lightboxdescriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxfullscreentitlebottomcss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 8px 8px;",
lightboxfullscreendescriptionbottomcss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxautoslide:false,lightboxslideinterval:5E3,lightboxshowtimer:true,lightboxtimerposition:"bottom",lightboxtimerheight:2,lightboxtimercolor:"#dc572e",lightboxtimeropacity:1,lightboxshowplaybutton:true,lightboxalwaysshownavarrows:false,lightboxbordersize:8,lightboxshowtitleprefix:true,lightboxborderradius:0,lightboxbordertopmargin:48,
lightboxbordertopmarginsmall:36,lightboxresizespeed:400,lightboxfadespeed:0,lightboxtransition:"none",lightboxtransitionduration:400,lightboxresponsivebarheight:false,lightboxsmallscreenheight:415,lightboxbarheightonsmallheight:64,lightboxnotkeepratioonsmallheight:false,lightboxshowsocial:false,lightboxaddsocialmedia:false,lightboxsocialposition:"position:absolute;top:100%;right:0;",lightboxsocialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",lightboxsocialdirection:"horizontal",
lightboxsocialbuttonsize:32,lightboxsocialbuttonfontsize:18,lightboxsocialrotateeffect:true,lightboxshowemail:false,lightboxshowfacebook:true,lightboxshowtwitter:true,lightboxshowpinterest:true,lightboxshowallcategories:false,lightboxenablehtml5poster:false,centerlastrow:false,centeronerow:false,donotzoomin:false,deferloading:false,deferloadingdelay:0,videohidecontrols:false,videohideplaybutton:false,nativehtml5controls:false,nativecontrolsonfirefox:false,nativecontrolsonie:false,nativecontrolsoniphone:true,
nativecontrolsonipad:true,nativecontrolsonandroid:true,nativecontrolsonfullscreen:true,nativecontrolsnodownload:true,useflashonie11:false};this.options=$.extend({},defaultOptions,options);this.options.mark="WordPress Portfolio Free Version";this.options.marklink="http://www.wonderplugin.com/wordpress-gridgallery/";var instance=this;$.each($(this).data(),function(key,value){instance.options[key.toLowerCase()]=value});var initGridGallery=function(inst){var lightboxOptions={initsocial:false,enablepdfjs:false,
shownavigation:inst.options.shownavigation,thumbwidth:inst.options.thumbwidth,thumbheight:inst.options.thumbheight,thumbtopmargin:inst.options.thumbtopmargin,thumbbottommargin:inst.options.thumbbottommargin,barheight:inst.options.barheight,responsive:inst.options.lightboxresponsive,showtitle:inst.options.lightboxshowtitle,bgcolor:inst.options.lightboxbgcolor,overlaybgcolor:inst.options.lightboxoverlaybgcolor,overlayopacity:inst.options.lightboxoverlayopacity,titlebottomcss:inst.options.titlebottomcss,
showdescription:inst.options.lightboxshowdescription,descriptionbottomcss:inst.options.descriptionbottomcss,fullscreenmode:inst.options.lightboxfullscreenmode,fullscreenmodeonsmallscreen:inst.options.lightboxfullscreenmodeonsmallscreen,fullscreensmallscreenwidth:inst.options.lightboxfullscreensmallscreenwidth,fullscreentextinside:inst.options.lightboxfullscreentextinside,closeonoverlay:inst.options.lightboxcloseonoverlay,videohidecontrols:inst.options.lightboxvideohidecontrols,titlestyle:inst.options.lightboxtitlestyle,
imagepercentage:inst.options.lightboximagepercentage,defaultvideovolume:inst.options.lightboxdefaultvideovolume,titleprefix:inst.options.lightboxtitleprefix,titleinsidecss:inst.options.lightboxtitleinsidecss,descriptioninsidecss:inst.options.lightboxdescriptioninsidecss,fullscreentitlebottomcss:inst.options.lightboxfullscreentitlebottomcss,fullscreendescriptionbottomcss:inst.options.lightboxfullscreendescriptionbottomcss,autoslide:inst.options.lightboxautoslide,slideinterval:inst.options.lightboxslideinterval,
showtimer:inst.options.lightboxshowtimer,timerposition:inst.options.lightboxtimerposition,timerheight:inst.options.lightboxtimerheight,timercolor:inst.options.lightboxtimercolor,timeropacity:inst.options.lightboxtimeropacity,showplaybutton:inst.options.lightboxshowplaybutton,alwaysshownavarrows:inst.options.lightboxalwaysshownavarrows,bordersize:inst.options.lightboxbordersize,showtitleprefix:inst.options.lightboxshowtitleprefix,borderradius:inst.options.lightboxborderradius,bordertopmargin:inst.options.lightboxbordertopmargin,
bordertopmarginsmall:inst.options.lightboxbordertopmarginsmall,resizespeed:inst.options.lightboxresizespeed,fadespeed:inst.options.lightboxfadespeed,transition:inst.options.lightboxtransition,transitionduration:inst.options.lightboxtransitionduration,responsivebarheight:inst.options.lightboxresponsivebarheight,smallscreenheight:inst.options.lightboxsmallscreenheight,barheightonsmallheight:inst.options.lightboxbarheightonsmallheight,notkeepratioonsmallheight:inst.options.lightboxnotkeepratioonsmallheight,
showsocial:inst.options.lightboxshowsocial,socialposition:inst.options.lightboxsocialposition,socialpositionsmallscreen:inst.options.lightboxsocialpositionsmallscreen,socialdirection:inst.options.lightboxsocialdirection,socialbuttonsize:inst.options.lightboxsocialbuttonsize,socialbuttonfontsize:inst.options.lightboxsocialbuttonfontsize,socialrotateeffect:inst.options.lightboxsocialrotateeffect,showemail:inst.options.lightboxshowemail,showfacebook:inst.options.lightboxshowfacebook,showtwitter:inst.options.lightboxshowtwitter,
showpinterest:inst.options.lightboxshowpinterest,googleanalyticsaccount:inst.options.googleanalyticsaccount,navbgcolor:inst.options.navbgcolor,shownavcontrol:inst.options.shownavcontrol,hidenavdefault:inst.options.hidenavdefault};if($("#wpgridlightbox_advanced_options").length)$.each($("#wpgridlightbox_advanced_options").data(),function(key,value){lightboxOptions[key.toLowerCase()]=value});if($("#wpgridlightbox_advanced_options_"+inst.options.gridgalleryid).length)$.each($("#wpgridlightbox_advanced_options_"+
inst.options.gridgalleryid).data(),function(key,value){lightboxOptions[key.toLowerCase()]=value});wpGridLightboxObject=$(".wpgridlightbox-"+inst.options.gridgalleryid).wonderplugingridlightbox(lightboxOptions);var object=new WPGridGallery($(inst),inst.options,inst.options.gridgalleryid);$(inst).data("object",object);$(inst).data("id",inst.options.gridgalleryid);wpGridGalleryObjects.addObject(object);if($(".wpgridinlinehtml5video").length)$(".wpgridinlinehtml5video").wpgridInlineHTML5Video(object,
inst.options.gridgalleryid,inst.options);if($(".wpgridinlineiframevideo").length)$(".wpgridinlineiframevideo").wpgridInlineIframeVideo(object,inst.options.gridgalleryid,inst.options);if($(".wpgridloadhtml5video").length)$(".wpgridloadhtml5video").wpgridLoadHTML5Video(object,inst.options.gridgalleryid,inst.options);if($(".wpgridloadiframevideo").length)$(".wpgridloadiframevideo").wpgridLoadIframeVideo(object,inst.options.gridgalleryid,inst.options)};var initRemote=function(inst){var remote_items="";
$.getJSON(inst.options.remote,function(data){for(var i=0;i<data.length;i++){remote_items+='<div class="wonderplugin-gridgallery-item" data-row="1" data-col="1"><div class="wonderplugin-gridgallery-item-container">';if(data[i].link){remote_items+='<a href="'+data[i].link+'"';if(data[i].linktarget)remote_items+=' target="'+data[i].linktarget+'"';if(data[i].lightbox)remote_items+=' class="wpgridlightbox wpgridlightbox-'+inst.options.gridgalleryid+'"';if(data[i].lightboxwidth)remote_items+=' data-width="'+
data[i].lightboxwidth+'"';if(data[i].lightboxheight)remote_items+=' data-width="'+data[i].lightboxheight+'"';remote_items+=' data-thumbnail="'+data[i].thumbnail+'"';remote_items+=' data-wpggroup="wpgridgallery-'+inst.options.gridgalleryid+'"';if(data[i].title)remote_items+=' title="'+data[i].title+'"';remote_items+=">"}remote_items+='<img class="wonderplugin-gridgallery-item-img"';if(data[i].title)remote_items+=' alt="'+data[i].title+'"';remote_items+=' src="'+data[i].thumbnail+'">';if(data[i].link)remote_items+=
"</a>";remote_items+="</div></div>"}if($(".wonderplugin-gridgallery-list",$(inst)).length>0)$(".wonderplugin-gridgallery-list",$(inst)).append(remote_items);else{remote_items='<div class="wonderplugin-gridgallery-list" style="display:block;position:relative;max-width:100%;margin:0 auto;">'+remote_items+'</div><div style="clear:both;"></div>';$(inst).append(remote_items)}initGridGallery(inst)})};if(this.options.remote&&this.options.remote.length>0)initRemote(this);else{var instance=this;setTimeout(function(){initGridGallery(instance)},
instance.options.deferloading?instance.options.deferloadingdelay:0)}})};$.fn.wpgridPlayIframeVideo=function(inst,autoplay){$(this).closest(".wonderplugin-gridgallery-item").data("isplayingvideo",true);inst.hideTitle($(this).closest(".wonderplugin-gridgallery-item"));var $iframeurl=$(this).attr("href");$iframeurl+=($iframeurl.indexOf("?")<0?"?":"&")+(autoplay?"autoplay=1":"");var $container=$(this).closest(".wonderplugin-gridgallery-item-container");$container.html('<iframe class="wpgridinlineiframe" width="100%" height="100%" src="'+
$iframeurl+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>')};$.fn.wpgridLoadIframeVideo=function(inst,id,options){$(this).each(function(){$(this).wpgridPlayIframeVideo(inst,false)})};$.fn.wpgridInlineIframeVideo=function(inst,id,options){$(this).off("click").click(function(e){e.preventDefault();$(this).wpgridPlayIframeVideo(inst,true)})};$.fn.wpgridPlayHTML5Video=function(inst,id,options,autoplay){var isAndroid=navigator.userAgent.match(/Android/i)!=null;var isIPad=
navigator.userAgent.match(/iPad/i)!=null;var isIPhone=navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;var isFirefox=navigator.userAgent.match(/Firefox/i)!=null;var isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;var isIE=navigator.userAgent.match(/MSIE/i)!=null&&!isOpera;var isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;if(isFirefox&&options.nativecontrolsonfirefox||(isIE||
isIE11)&&options.nativecontrolsonie||isIPhone&&options.nativecontrolsoniphone||isIPad&&options.nativecontrolsonipad||isAndroid&&options.nativecontrolsonandroid)options.nativehtml5controls=true;if(isIPhone||isIPad||isAndroid)options.nativecontrolsonfullscreen=true;var flashInstalled=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))flashInstalled=true}catch(e){if(navigator.mimeTypes["application/x-shockwave-flash"])flashInstalled=true}var mp4url=$(this).attr("href");var webmurl=$(this).data("webm");
var isHTML5=true;if(isAndroid||isIPad||isIPhone)isHTML5=true;else if(isIE||isIE11&&options.useflashonie11)isHTML5=false;else if(isFirefox||isOpera)if(!webmurl&&document.createElement("video").canPlayType("video/mp4")!="maybe")isHTML5=false;$(this).closest(".wonderplugin-gridgallery-item").data("isplayingvideo",true);inst.hideTitle($(this).closest(".wonderplugin-gridgallery-item"));var $container=$(this).closest(".wonderplugin-gridgallery-item-container");if(isHTML5){var videosrc=(isFirefox||isOpera)&&
webmurl&&webmurl.length>0?webmurl:mp4url;$container.html('<video class="wpgridinlinevideo" width="100%" height="100%"'+' src="'+videosrc+'"'+(autoplay?" autoplay":"")+(options.nativehtml5controls&&!options.videohidecontrols?' controls="controls"':"")+(options.nativecontrolsnodownload?' controlsList="nodownload"':"")+">");var videoObj=$("video",$container);if(!options.nativehtml5controls&&!options.videohidecontrols){videoObj.data("src",videosrc);videoObj.wpgridHTML5VideoControls(options.skinsfolder,
$(this),".wpgridinlinevideo",options.videohidecontrols,options.videohideplaybutton,1,options.nativecontrolsonfullscreen,options.nativecontrolsnodownload,null)}videoObj.off("ended").on("ended",function(){$(window).trigger("wpgridvideo.ended",[id])})}else if(flashInstalled){var embedOptions={pluginspage:"http://www.adobe.com/go/getflashplayer",quality:"high",allowFullScreen:"true",allowScriptAccess:"always",type:"application/x-shockwave-flash"};embedOptions.width="100%";embedOptions.height="100%";embedOptions.src=
options.jsfolder+"html5boxplayer.swf";embedOptions.wmode="transparent";embedOptions.flashVars=$.param({width:"100%",height:"100%",jsobjectname:"wonderpluginVideoEmbed",hidecontrols:options.videohidecontrols?"1":"0",hideplaybutton:"0",videofile:mp4url,hdfile:"",ishd:"0",defaultvolume:1,autoplay:autoplay?"1":"0",loop:loop?"1":"0",id:id});var embedString="";for(var key in embedOptions)embedString+=key+"="+embedOptions[key]+" ";$container.html("<embed "+embedString+"/>")}else $container.html("<div class='wpve-error' style='display:block;position:absolute;text-align:center;width:100%;left:0px;top:20%;color:#ff0000;'><p>Adobe Flash Player is not installed.</p><p><a href='http://www.adobe.com/go/getflashplayer' target='_blank'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' width='112' height='33'></img></a></p></div>")};
$.fn.wpgridLoadHTML5Video=function(inst,id,options){$(this).wpgridPlayHTML5Video(inst,id,options,false)};$.fn.wpgridInlineHTML5Video=function(inst,id,options){$(this).off("click").click(function(e){e.preventDefault();$(this).wpgridPlayHTML5Video(inst,id,options,true)})};$.fn.wpgridHTML5VideoControls=function(skinFolder,parentInst,videoElem,hideControls,hidePlayButton,defaultVolume,fullscreenNativeControls,html5VideoNoDownload,skinImages){var isTouch="ontouchstart"in window;var eStart=isTouch?"touchstart":
"mousedown";var eMove=isTouch?"touchmove":"mousemove";var eCancel=isTouch?"touchcancel":"mouseup";var eClick="click";var BUTTON_SIZE=32;var BAR_HEIGHT=isTouch?48:36;var hideControlsTimerId=null;var hideVolumeBarTimeoutId=null;var sliderDragging=false;var isFullscreen=false;var userActive=true;var isHd=$(this).data("ishd");var hd=$(this).data("hd");var src=$(this).data("src");var $videoObj=$(this);$videoObj.get(0).removeAttribute("controls");var $videoPlay=$("<div class='html5boxVideoPlay'></div>");
$videoObj.after($videoPlay);var playbuttonImage=skinImages&&"playbutton"in skinImages&&skinImages.playbutton.length>0?skinImages.playbutton:skinFolder+"html5boxplayer_playvideo.png";$videoPlay.css({position:"absolute",top:"50%",left:"50%",display:"block",cursor:"pointer",width:64,height:64,"margin-left":-32,"margin-top":-32,"background-image":"url('"+playbuttonImage+"')","background-position":"center center","background-repeat":"no-repeat"}).on(eClick,function(){$videoObj.get(0).play()});var $videoFullscreenBg=
$("<div class='html5boxVideoFullscreenBg'></div>");var $videoControls=$("<div class='html5boxVideoControls'>"+"<div class='html5boxVideoControlsBg'></div>"+"<div class='html5boxPlayPause'>"+"<div class='html5boxPlay'></div>"+"<div class='html5boxPause'></div>"+"</div>"+"<div class='html5boxTimeCurrent'>--:--</div>"+"<div class='html5boxFullscreen'></div>"+"<div class='html5boxHD'></div>"+"<div class='html5boxVolume'>"+"<div class='html5boxVolumeButton'></div>"+"<div class='html5boxVolumeBar'>"+"<div class='html5boxVolumeBarBg'>"+
"<div class='html5boxVolumeBarActive'></div>"+"</div>"+"</div>"+"</div>"+"<div class='html5boxTimeTotal'>--:--</div>"+"<div class='html5boxSeeker'>"+"<div class='html5boxSeekerBuffer'></div>"+"<div class='html5boxSeekerPlay'></div>"+"<div class='html5boxSeekerHandler'></div>"+"</div>"+"<div style='clear:both;'></div>"+"</div>");$videoObj.after($videoControls);$videoObj.after($videoFullscreenBg);$videoFullscreenBg.css({display:"none",position:"fixed",left:0,top:0,bottom:0,right:0});$videoControls.css({display:"block",
position:"absolute",width:"100%",height:BAR_HEIGHT,left:0,bottom:0,right:0,margin:"0 auto"});var userActivate=function(){userActive=true};$videoObj.on("touch click mousemove mouseenter",function(){userActive=true});if(!hideControls)setInterval(function(){if(userActive){$videoControls.show();userActive=false;clearTimeout(hideControlsTimerId);hideControlsTimerId=setTimeout(function(){if(!$videoObj.get(0).paused)$videoControls.fadeOut()},5E3)}},250);$(".html5boxVideoControlsBg",$videoControls).css({display:"block",
position:"absolute",width:"100%",height:"100%",left:0,top:0,"background-color":"#000000",opacity:0.7,filter:"alpha(opacity=70)"});$(".html5boxPlayPause",$videoControls).css({display:"block",position:"relative",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"float":"left"});var $videoBtnPlay=$(".html5boxPlay",$videoControls);var $videoBtnPause=$(".html5boxPause",$videoControls);$videoBtnPlay.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+
"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_playpause.png"+"')","background-position":"top left"}).hover(function(){$(this).css({"background-position":"bottom left"})},function(){$(this).css({"background-position":"top left"})}).on(eClick,function(){$videoObj.get(0).play()});$videoBtnPause.css({display:"none",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+
"html5boxplayer_playpause.png"+"')","background-position":"top right"}).hover(function(){$(this).css({"background-position":"bottom right"})},function(){$(this).css({"background-position":"top right"})}).on(eClick,function(){$videoObj.get(0).pause()});var $videoTimeCurrent=$(".html5boxTimeCurrent",$videoControls);var $videoTimeTotal=$(".html5boxTimeTotal",$videoControls);var $videoSeeker=$(".html5boxSeeker",$videoControls);var $videoSeekerPlay=$(".html5boxSeekerPlay",$videoControls);var $videoSeekerBuffer=
$(".html5boxSeekerBuffer",$videoControls);var $videoSeekerHandler=$(".html5boxSeekerHandler",$videoControls);$videoTimeCurrent.css({display:"block",position:"relative","float":"left","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",color:"#fff"});$videoTimeTotal.css({display:"block",position:"relative","float":"right","line-height":BAR_HEIGHT+"px","font-weight":"normal","font-size":"12px",margin:"0 8px","font-family":"Arial, Helvetica, sans-serif",
color:"#fff"});$videoSeeker.css({display:"block",cursor:"pointer",overflow:"hidden",position:"relative",height:"10px","background-color":"#222",margin:Math.floor((BAR_HEIGHT-10)/2)+"px 4px"}).on(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width();$videoSeeker.on(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var pos=
e0.pageX-$videoSeeker.offset().left;$videoSeekerPlay.css({width:pos});$videoObj.get(0).currentTime=pos*$videoObj.get(0).duration/$videoSeeker.width()})}).on(eCancel,function(){$videoSeeker.off(eMove)});$videoSeekerBuffer.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#444"});$videoSeekerPlay.css({display:"block",position:"absolute",left:0,top:0,height:"100%","background-color":"#fcc500"});var $videoFSObj=fullscreenNativeControls?$videoObj:$videoObj.parent();
if($videoFSObj.get(0).requestFullscreen||$videoFSObj.get(0).webkitRequestFullScreen||$videoFSObj.get(0).mozRequestFullScreen||$videoFSObj.get(0).webkitEnterFullScreen||$videoFSObj.get(0).msRequestFullscreen){var switchScreen=function(fullscreen){if(fullscreen){if(fullscreenNativeControls){$videoObj.get(0).setAttribute("controls","controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}if($videoFSObj.get(0).requestFullscreen)$videoFSObj.get(0).requestFullscreen();
else if($videoFSObj.get(0).webkitRequestFullScreen)$videoFSObj.get(0).webkitRequestFullScreen();else if($videoFSObj.get(0).mozRequestFullScreen)$videoFSObj.get(0).mozRequestFullScreen();else if($videoFSObj.get(0).webkitEnterFullScreen)$videoFSObj.get(0).webkitEnterFullScreen();if($videoFSObj.get(0).msRequestFullscreen)$videoFSObj.get(0).msRequestFullscreen()}else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();
else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.msExitFullscreen)document.msExitFullscreen()};var switchScreenCSS=function(fullscreen){if(fullscreenNativeControls)if(fullscreen){$videoObj.get(0).setAttribute("controls","controls");if(html5VideoNoDownload)$videoObj.get(0).setAttribute("controlsList","nodownload")}else $videoObj.get(0).removeAttribute("controls");else if(fullscreen){$(document).on("mousemove",userActivate);$videoControls.css({"z-index":2147483647,
position:"fixed"});$videoFullscreenBg.css({"z-index":2147483647,display:"block"});$videoPlay.css({"z-index":2147483647})}else{$(document).off("mousemove",userActivate);$videoControls.css({"z-index":"",position:"absolute"});$videoFullscreenBg.css({"z-index":"",display:"none"});$videoPlay.css({"z-index":""})}};document.addEventListener("MSFullscreenChange",function(){isFullscreen=document.msFullscreenElement!=null;switchScreenCSS(isFullscreen)},false);document.addEventListener("fullscreenchange",function(){isFullscreen=
document.fullscreen;switchScreenCSS(isFullscreen)},false);document.addEventListener("mozfullscreenchange",function(){isFullscreen=document.mozFullScreen;switchScreenCSS(isFullscreen)},false);document.addEventListener("webkitfullscreenchange",function(){isFullscreen=document.webkitIsFullScreen;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitbeginfullscreen",function(){isFullscreen=true;switchScreenCSS(isFullscreen)},false);$videoFSObj.get(0).addEventListener("webkitendfullscreen",
function(){isFullscreen=false;switchScreenCSS(isFullscreen)},false);if(!fullscreenNativeControls)$("head").append("<style type='text/css'>video"+videoElem+"::-webkit-media-controls { display:none !important; }</style>");var $videoFullscreen=$(".html5boxFullscreen",$videoControls);$videoFullscreen.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+
"html5boxplayer_fullscreen.png"+"')","background-position":"left top"}).hover(function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,
function(){isFullscreen=!isFullscreen;switchScreen(isFullscreen)})}if(hd){var $videoHD=$(".html5boxHD",$videoControls);$videoHD.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_hd.png"+"')","background-position":(isHd?"right":"left")+" center"}).on(eClick,function(){isHd=!isHd;$(this).css({"background-position":(isHd?"right":"left")+
" center"});parentInst.isHd=isHd;var isPaused=$videoObj.get(0).isPaused;$videoObj.get(0).setAttribute("src",(isHd?hd:src)+"#t="+$videoObj.get(0).currentTime);if(!isPaused)$videoObj.get(0).play();else $videoObj.get(0).pause()})}$videoObj.get(0).volume=defaultVolume;var volumeSaved=defaultVolume==0?1:defaultVolume;var volume=$videoObj.get(0).volume;$videoObj.get(0).volume=volume/2+0.1;if($videoObj.get(0).volume===volume/2+0.1){$videoObj.get(0).volume=volume;var $videoVolume=$(".html5boxVolume",$videoControls);
var $videoVolumeButton=$(".html5boxVolumeButton",$videoControls);var $videoVolumeBar=$(".html5boxVolumeBar",$videoControls);var $videoVolumeBarBg=$(".html5boxVolumeBarBg",$videoControls);var $videoVolumeBarActive=$(".html5boxVolumeBarActive",$videoControls);$videoVolume.css({display:"block",position:"relative","float":"right",width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",margin:Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2)}).hover(function(){clearTimeout(hideVolumeBarTimeoutId);var volume=$videoObj.get(0).volume;
$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"});$videoVolumeBar.show()},function(){clearTimeout(hideVolumeBarTimeoutId);hideVolumeBarTimeoutId=setTimeout(function(){$videoVolumeBar.hide()},1E3)});$videoVolumeButton.css({display:"block",position:"absolute",top:0,left:0,width:BUTTON_SIZE+"px",height:BUTTON_SIZE+"px",cursor:"pointer","background-image":"url('"+skinFolder+"html5boxplayer_volume.png"+"')","background-position":"top "+(volume>0?"left":"right")}).hover(function(){var backgroundPosX=
$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" bottom"})},function(){var backgroundPosX=$(this).css("background-position")?$(this).css("background-position").split(" ")[0]:$(this).css("background-position-x");$(this).css({"background-position":backgroundPosX+" top"})}).on(eClick,function(){var volume=$videoObj.get(0).volume;if(volume>0){volumeSaved=volume;volume=0}else volume=
volumeSaved;var backgroundPosY=$(this).css("background-position")?$(this).css("background-position").split(" ")[1]:$(this).css("background-position-y");$videoVolumeButton.css({"background-position":(volume>0?"left":"right")+" "+backgroundPosY});$videoObj.get(0).volume=volume;$videoVolumeBarActive.css({height:Math.round(volume*100)+"%"})});$videoVolumeBar.css({display:"none",position:"absolute",left:4,bottom:"100%",width:24,height:80,"margin-bottom":Math.floor((BAR_HEIGHT-BUTTON_SIZE)/2),"background-color":"#000000",
opacity:0.7,filter:"alpha(opacity=70)"});$videoVolumeBarBg.css({display:"block",position:"relative",width:10,height:68,margin:7,cursor:"pointer","background-color":"#222"});$videoVolumeBarActive.css({display:"block",position:"absolute",bottom:0,left:0,width:"100%",height:"100%","background-color":"#fcc500"});$videoVolumeBarBg.on(eStart,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*
100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol;$videoVolumeBarBg.on(eMove,function(e){var e0=isTouch?e.originalEvent.touches[0]:e;var vol=1-(e0.pageY-$videoVolumeBarBg.offset().top)/$videoVolumeBarBg.height();vol=vol>1?1:vol<0?0:vol;$videoVolumeBarActive.css({height:Math.round(vol*100)+"%"});$videoVolumeButton.css({"background-position":"left "+(vol>0?"top":"bottom")});$videoObj.get(0).volume=vol})}).on(eCancel,function(){$videoVolumeBarBg.off(eMove)})}var calcTimeFormat=
function(seconds){var h0=Math.floor(seconds/3600);var h=h0<10?"0"+h0:h0;var m0=Math.floor((seconds-h0*3600)/60);var m=m0<10?"0"+m0:m0;var s0=Math.floor(seconds-(h0*3600+m0*60));var s=s0<10?"0"+s0:s0;var r=m+":"+s;if(h0>0)r=h+":"+r;return r};if(hidePlayButton)$videoPlay.hide();if(hideControls)$videoControls.hide();var onVideoPlay=function(){if(!hidePlayButton)$videoPlay.hide();if(!hideControls){$videoBtnPlay.hide();$videoBtnPause.show()}};var onVideoPause=function(){if(!hidePlayButton)$videoPlay.show();
if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();$videoBtnPause.hide()}};var onVideoEnded=function(){$(window).trigger("html5lightbox.videoended");if(!hidePlayButton)$videoPlay.show();if(!hideControls){$videoControls.show();clearTimeout(hideControlsTimerId);$videoBtnPlay.show();$videoBtnPause.hide()}};var onVideoUpdate=function(){var curTime=$videoObj.get(0).currentTime;if(curTime){$videoTimeCurrent.text(calcTimeFormat(curTime));var duration=$videoObj.get(0).duration;
if(duration){$videoTimeTotal.text(calcTimeFormat(duration));if(!sliderDragging){var sliderW=$videoSeeker.width();var pos=Math.round(sliderW*curTime/duration);$videoSeekerPlay.css({width:pos});$videoSeekerHandler.css({left:pos})}}}};var onVideoProgress=function(){if($videoObj.get(0).buffered&&$videoObj.get(0).buffered.length>0&&!isNaN($videoObj.get(0).buffered.end(0))&&!isNaN($videoObj.get(0).duration)){var sliderW=$videoSeeker.width();$videoSeekerBuffer.css({width:Math.round(sliderW*$videoObj.get(0).buffered.end(0)/
$videoObj.get(0).duration)})}};try{$videoObj.on("play",onVideoPlay);$videoObj.on("pause",onVideoPause);$videoObj.on("ended",onVideoEnded);$videoObj.on("timeupdate",onVideoUpdate);$videoObj.on("progress",onVideoProgress)}catch(e){}}})(jQuery);jQuery.easing["jswing"]=jQuery.easing["swing"];
jQuery.extend(jQuery.easing,{def:"easeOutQuad",easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*
(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,
t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,
t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;
if((t/=d)==1)return b+c;if(!p)p=d*0.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*2*Math.PI/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*0.3*1.5;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-0.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/
p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*t*t*(((s*=1.525)+1)*t-s)+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<1/2.75)return c*
7.5625*t*t+b;else if(t<2/2.75)return c*(7.5625*(t-=1.5/2.75)*t+0.75)+b;else if(t<2.5/2.75)return c*(7.5625*(t-=2.25/2.75)*t+0.9375)+b;else return c*(7.5625*(t-=2.625/2.75)*t+0.984375)+b},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*0.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}});jQuery(document).ready(function(){jQuery(".wonderplugin-gridgallery-engine").css({display:"none"});jQuery(".wonderplugingridgallery").wonderplugingridgallery()});
// source --> https://mermaiddigital.com/wp-content/plugins/popup-for-contact-form-7/js/pfcf-script.js?ver=5.4.16 
jQuery( document ).ready(function() {
  
jQuery(".js-modal-close, .modal-overlay").click(function() {
 jQuery(".modal-box, .modal-overlay").fadeOut(500, function() {
   jQuery(".modal-overlay").remove();
  });
});
 
jQuery(window).resize(function() {
  jQuery(".modal-box").css({
    top: (jQuery(window).height() - jQuery(".modal-box").outerHeight()) / 2,
    left: (jQuery(window).width() - jQuery(".modal-box").outerWidth()) / 2
  });
});
 
jQuery(window).resize();

});