1(()=>{var t={41523(t){!function(e,o){const i=[];o.addResizeCallback=function(t,e){return-1===i.indexOf(t)&&(t.$$scope=e,i.push(t)),o},t.exports=function(){let t=o.$window.width();o.$window.off("resize.tar").on("resize.tar",function(){o.$window.width()!==t&&(e.each(i,function(t,e){e.call(e.$$scope||this)}),t=o.$window.width())})}}(ThriveGlobal.$j,TCB_Front)},49110(t){!function(e,o){const i=[];o.add_scroll_callback=function(t,e){return-1===i.indexOf(t)&&(t.$$scope=e,i.push(t)),o},t.exports=function(){let t=o.$document.scrollTop(),n="";o.$window.off("scroll.tar").on("scroll.tar",function(){const s=o.$document.scrollTop(),r=s>=t?"down":"up",a=n!==r;t=s,n=r,e.each(i,function(t,e){e.call(e.$$scope||this,s,r,a)})}),o.$window.trigger("scroll")}}(ThriveGlobal.$j,TCB_Front)},11481(){!function(t){"use strict";const e=function(e,o){this.el=t(e),this.options=t.extend({},t.fn.typed.defaults,o),this.isInput=this.el.is("input"),this.attr=this.options.attr,this.showCursor=!this.isInput&&this.options.showCursor,this.elContent=this.attr?this.el.attr(this.attr):this.el.text(),this.contentType=this.options.contentType,this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.stringsElement=this.options.stringsElement,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=0,this.stop=!1,this.cursorChar=this.options.cursorChar,this.shuffle=this.options.shuffle,this.sequence=[],this.build()};e.prototype={constructor:e,init(t){void 0===t&&(t="delete");const e=this;function o(){for(let t=0;t<e.strings.length;++t)e.sequence[t]=t;e.shuffle&&(e.sequence=e.shuffleArray(e.sequence)),"delete"===t?(e.strPos=e.strings[e.sequence[e.arrayPos]].length,e.options.highlightClass?e.highlight(e.strings[e.sequence[e.arrayPos]],e.strPos):e.backspace(e.strings[e.sequence[e.arrayPos]],e.strPos)):(e.strPos=0,e.typewrite(e.strings[e.sequence[e.arrayPos]],e.strPos))}"delete"===t?e.timeout=setTimeout(o,e.startDelay):o()},build(){const e=this;if(!0===this.showCursor&&(this.cursor=t('<span class="typed-cursor">'+this.cursorChar+"</span>"),this.el.after(this.cursor)),this.stringsElement){e.strings=[],this.stringsElement.hide();const o=this.stringsElement.find("p");t.each(o,function(o,i){e.strings.push(t(i).html())})}this.init()},typewrite(t,e){if(!0===this.stop)return;const o=this.typeSpeed,i=this;i.timeout=setTimeout(function(){let o=0,n=t.substr(e);if("^"===n.charAt(0)){let i=1;/^\^\d+/.test(n)&&(n=/\d+/.exec(n)[0],i+=n.length,o=parseInt(n)),t=t.substring(0,e)+t.substring(e+i)}if("html"===i.contentType){const o=t.substr(e).charAt(0);if("<"===o||"&"===o){const i="<"===o?">":";";for(;t.substr(e).charAt(0)!==i;)e++;e++}}i.timeout=setTimeout(function(){if(e===t.length){if(i.options.onStringTyped(i.arrayPos),i.arrayPos===i.strings.length-1&&(i.options.callback(),i.curLoop++,!1===i.loop||i.curLoop===i.loopCount))return;i.timeout=setTimeout(function(){i.options.highlightClass?i.highlight(t,e):i.backspace(t,e)},i.backDelay)}else{0===e&&i.options.preStringTyped(i.arrayPos);const o=t.substr(0,e+1);i.attr?i.el.attr(i.attr,o):i.isInput?i.el.val(o):"html"===i.contentType?i.el.html(o):i.el.text(o),e++,i.typewrite(t,e)}},o)},o)},highlight(t,e){if(!0===this.stop)return;const o=this.backSpeed,i=this;i.timeout=setTimeout(function(){if("html"===i.contentType&&">"===t.substr(e).charAt(0)){for(;"<"!==t.substr(e).charAt(0);)e--;e--}const o=t.substr(0,e),n=t.substr(e);i.attr?i.el.attr(i.attr,o):i.el.html(o+'<span class="'+i.options.highlightClass+'" style="'+(i.options.highlightStyle||"")+'">'+n+"</span>"),e>i.stopNum?(e--,i.highlight(t,e)):e<=i.stopNum&&setTimeout(function(){i.arrayPos++,i.arrayPos===i.strings.length?(i.arrayPos=0,i.init("write")):i.typewrite(i.strings[i.sequence[i.arrayPos]],e)},200)},o)},backspace(e,o){if(!0===this.stop)return;const i=this.backSpeed,n=this,s=t(n.el);n.timeout=setTimeout(function(){if("html"===n.contentType&&">"===e.substr(o).charAt(0)){for(;"<"!==e.substr(o).charAt(0);)o--;o--}const t=e.substr(0,o);n.attr?n.el.attr(n.attr,t):n.isInput?n.el.val(t):"html"===n.contentType?n.el.html(t):n.el.text(t),o>n.stopNum?(o--,n.backspace(e,o)):o<=n.stopNum&&(n.arrayPos++,n.arrayPos===n.strings.length?(n.arrayPos=0,n.shuffle&&(n.sequence=n.shuffleArray(n.sequence)),n.init("write")):n.typewrite(n.strings[n.sequence[n.arrayPos
1]],o),n.options.highlightClass&&s.is("."+n.options.highlightClass)&&s.removeClass(n.options.highlightClass))},i)},shuffleArray(t){let e,o,i=t.length;if(i)for(;--i;)o=Math.floor(Math.random()*(i+1)),e=t[o],t[o]=t[i],t[i]=e;return t},pause(){this.stop=!0,clearInterval(this.timeout)},start(){!1!==this.stop&&(this.stop=!1,this.init())},reset(){clearInterval(this.timeout);const t=this.el.attr("id");this.el.after('<span id="'+t+'"/>'),this.el.remove(),void 0!==this.cursor&&this.cursor.remove(),this.options.resetCallback()}},t.fn.typed=function(o){return this.each(function(){const i=t(this),n="object"==typeof o&&o;let s=i.data("typed");s||(s=new e(this,n),i.data("typed",s)),"string"==typeof o&&s[o]()})},t.fn.typed.defaults={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,shuffle:!1,backDelay:500,loop:!1,loopCount:!1,showCursor:!0,cursorChar:"|",attr:null,contentType:"html",callback(){},preStringTyped(){},onStringTyped(){},resetCallback(){}}}(window.jQuery)},46967(t){t.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(t){let e,o,i,n,s,r,a,l="",c=0;for(t=this._utf8_encode(t);c<t.length;)e=t.charCodeAt(c++),o=t.charCodeAt(c++),i=t.charCodeAt(c++),n=e>>2,s=(3&e)<<4|o>>4,r=(15&o)<<2|i>>6,a=63&i,isNaN(o)?r=a=64:isNaN(i)&&(a=64),l=l+this._keyStr.charAt(n)+this._keyStr.charAt(s)+this._keyStr.charAt(r)+this._keyStr.charAt(a);return l},decode(t){let e,o,i,n,s,r,a,l="",c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<t.length;)n=this._keyStr.indexOf(t.charAt(c++)),s=this._keyStr.indexOf(t.charAt(c++)),r=this._keyStr.indexOf(t.charAt(c++)),a=this._keyStr.indexOf(t.charAt(c++)),e=n<<2|s>>4,o=(15&s)<<4|r>>2,i=(3&r)<<6|a,l+=String.fromCharCode(e),64!=r&&(l+=String.fromCharCode(o)),64!=a&&(l+=String.fromCharCode(i));return l=this._utf8_decode(l),l},_utf8_encode(t){t=t.replace(/\r\n/g,"\n");let e="";for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);i<128?e+=String.fromCharCode(i):i>127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e},_utf8_decode(t){let e="",o=0,i=0,n=0,s=0;for(;o<t.length;)i=t.charCodeAt(o),i<128?(e+=String.fromCharCode(i),o++):i>191&&i<224?(n=t.charCodeAt(o+1),e+=String.fromCharCode((31&i)<<6|63&n),o+=2):(n=t.charCodeAt(o+1),s=t.charCodeAt(o+2),e+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&s),o+=3);return e}}},41954(t){!function(e,o){function i(t=o.$body){t.find(".thrv_wrapper > div[data-clip-id]").each((o,i)=>{const n=getComputedStyle(i).getPropertyValue("clip-path"),s=e(i.parentElement);s.removeClass("safari-ios-decoration-fix");try{n&&"none"!==n&&!n.includes("#null")&&t.find(n.match(/"(#[^']+)"/)[1]).length>0&&(s.closest(".tve_ea_thrive_animation").length>0||s.addClass("safari-ios-decoration-fix"))}catch(t){}})}function n(){if(!this.dataset.href||this.dataset.href.includes("javascript:void(0)")||this.classList.contains("tcb-during-drag"))return!0;if("_blank"===this.dataset.target)window.open(this.dataset.href,"_blank","noopener");else{let t;if(this.dataset.hash)try{t=e(this.dataset.hash)}catch(t){}t&&t.length?TCB_Front.jumpScrollTo(t,this):location.href=this.dataset.href}return!1}t.exports=function(t){tve_frontend_options.is_editor_page||(function(){if(!document.getElementById("tve-frontend-compat-css")){const t=document.createElement("style");let e=".thrv-page-section.safari-ios-decoration-fix, .thrv-content-box.safari-ios-decoration-fix { -webkit-transform: translate3d(0, 0, 0) !important;}";TCB_Front.browser&&(TCB_Front.browser.mozilla?e=".safari-ios-decoration-fix .tve-page-section-out[data-clip-id], .safari-ios-decoration-fix .tve-content-box-background[data-clip-id]{transform: unset !important}":(TCB_Front.browser.safari||TCB_Front.browser.ios)&&(e+=".tve_ea_thrive_animation > a.tcb-button-link {-webkit-mask-image: -webkit-radial-gradient(#fff, #fff);-webkit-mask-size: 100%, 100%; -webkit-mask-position: 0, 0; }",e+=".tcb-flex-col .tcb-col .thrv_wrapper.thrv_icon {max-height: var(--tve-icon-size, 25px);}",TCB_Front.browser.version&&parseFloat(TCB_Front.browser.version)<16&&(e+=".slick-list{overflow-x: hidden;}"))),e+=".thrv_wrapper + #thrive-header { position: static;}",t.type="text/css",t.id="tve-frontend-compat-css",t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}}(),i(t),o.addResizeCallback(i),function(t){t.find("a > .tcb-col, a > .thrv-content-box").each(function(){const t=this.parentNode,o={"data-href":t.href,"data-hash":t.hash,"jump-animation":t.getAttribute("jump-animation"),"data-target":t.getAttribute("target")||""};t.classList.contains("tve-dynamic-link")&&(o["data-shortcode-id"]=t.getAttribute("data-shortcode-id"),o["data-dynamic-link"]=t.getAttribute("data-dynamic-link")),e(this).unwrap().css("cursor","pointer").off("click.tcb-block").on("click.tcb-block",n).toggleClass("tve-jump-scroll",t.classList.contains("tve-jump-scroll")).attr(o)}),TCB_Front.$document.trigger("unwrapBlockLinks")}(t),function(t){const e=t.find(".thrv-search-form");e.length&&!TCB_Front.js_modules["search-form"]&&e.find(".thrv-sf-input").show(),t.find('[style*="--tve-border-width"]').each((t,e)=>{o.inlineCssVariable(e,"--tve-border-width","")})}(t))}}(ThriveGlobal.$j,TCB_Front)},18684(t){var e;e=ThriveGlobal.$j,t.exports=function(t=TCB_Front.$body){if(tve_frontend_options.is_editor_page)return;const o=e("#wpadminbar").height()||0,i=t.find(".thrv_footer"),n=i.parents("#tve_editor"),s=()=>{const e=i.height();i.length&&t.height()>0&&(i.css({position:"",top:""}),n.css({"min-height":"","padding-bottom":"","box-sizing":""}),document.documentElement.clientHeight-t.height()-o>1&&(i.css({position:"absolute",bottom:0,"padding-bottom":0,"z-index":3}),n.css({"min-height":"calc( 100vh - "+e+"px ) ","padding-bottom":e,"box-sizing":"unset"}),t.css("overflow-x","visible")))};"undefined"!=typeof ResizeObserver?new ResizeObserver(()=>{s()}).observe(window.document.body):s()}},43569(t){!function(e,o){const i="tve-default-state",n="tve-scroll-state",s="-1000px";let r,a,l,c,d=e();function h(t){if(function(){const t=d.data("scroll_config");return!t||!t.disabled.includes(TCB_Front.getDisplayType())}()){const e={opacity:0,"z-index":c-1,overflow:"hidden"},o={opacity:1,"z-index":c,overflow:"",top:0};let i="";t>=r?(l.css(e),a.css(o),i=a.outerHeight()):(a.css(e),l.css(o),d.data("cloneSticky")&&d.data("cloneSticky")[0].style.setProperty("height",`${l.outerHeight()}px`)),d[0]&&d[0].style.setProperty("height",i?`${i}px`:"")}}function p(){r=o.getMediaAttr(l,"data-switch-on-scroll",TCB_Front.getDisplayType()),o.add_scroll_callback(h)}function u(t){if(0===parseInt(t.currentTarget.style.opacity)){t.currentTarget.style.top=s;const o=e(t.currentTarget).find(".tve-m-trigger");o.length>0&&o.each((t,o)=>{const i=e(o);i.hasClass("tve-triggered-icon")&&i.trigger("click")})}}t.exports=function(t){if(d=t.find(".thrv_header"),d.data("init")||!d.length)return;d.data("init",1),l=d.find(".thrive-symbol-shortcode"),a=l.clone(),l.addClass(i),c=l.css("z-index")||
115;const r=o.getMediaAttr(l,"data-switch-on-scroll",TCB_Front.getDisplayType());if(r&&!isNaN(r)){a.addClass(n).removeClass(i);const t={position:"absolute",opacity:0,width:"100%","box-sizing":"border-box",left:0,top:s};a.css(t).addClass("thrive-symbol-shortcode-scroll").insertAfter(l),a=d.find(".thrive-symbol-shortcode.thrive-symbol-shortcode-scroll"),e(`.${n}`).removeClass(i),a.find(`.${i}`).remove(),a.find(`.${n}`).css("display",""),l.find(`.${n}`).remove(),d.addClass(`${i} ${n}`),d.find(".thrive-symbol-shortcode").css("transition","opacity .4s ease-in-out").on("transitionend webkitTransitionEnd oTransitionEnd",u),o.addResizeCallback(p),p(),d.on("tcb.sticky.ensure_placeholder",function(){if("mobile"!==TCB_Front.getDisplayType())return;const t=d.data("cloneSticky");if(!t||!t.length)return;const e=l.outerHeight();"number"!=typeof e||e<=0||(t[0].style.setProperty("height",`${e}px`),d.hasClass("tve-sticky-default")&&d[0].style.setProperty("height",`${e}px`))})}TCB_Front.event_triggers(d)}}(ThriveGlobal.$j,TCB_Front)},89322(t){t.exports=()=>new class{constructor(){this.filterCallbacks={},this.actionCallbacks={}}addFilter(t,e,o=10){void 0===this.filterCallbacks[t]&&(this.filterCallbacks[t]=[]),this.filterCallbacks[t].push({fn:e,priority:parseInt(o)})}applyFilters(t,e){if(arguments.length<1)return void 0!==e?e:null;if(this.CURRENT_FILTERS=this.CURRENT_FILTERS||[],this.hasFilter(t)){this.CURRENT_FILTERS.push(t);let o=[];arguments.length>2&&(o=Array.prototype.slice.call(arguments,2)),this.filterCallbacks[t].sort((t,e)=>t.priority-e.priority).forEach(t=>{if(t.fn)switch(t.fn){case"__return_true":e=!0;break;case"__return_false":e=!1;break;case"__return_null":e=null;break;case"__return_empty_string":e="";break;default:e=t.fn.apply(null,[e,...o])}}),this.CURRENT_FILTERS.pop()}return e}hasFilter(t){return this.filterCallbacks&&this.filterCallbacks[t]&&this.filterCallbacks[t].length}addAction(t,e,o=10){return this.actionCallbacks[t]||(this.actionCallbacks[t]=[]),this.actionCallbacks[t].push({fn:e,priority:parseInt(o)}),this}doAction(t){if(this.CURRENT_ACTIONS=this.CURRENT_ACTIONS||[],this.hasAction(t)){const e=arguments.length>1?Array.prototype.slice.call(arguments,1):[];this.CURRENT_ACTIONS.push(t),this.actionCallbacks[t].sort((t,e)=>t.priority-e.priority).forEach(t=>{t.fn&&t.fn.apply(null,e)}),this.CURRENT_ACTIONS.pop()}}hasAction(t){return this.actionCallbacks&&this.actionCallbacks[t]&&this.actionCallbacks[t].length}}},64743(){var t,e;t=ThriveGlobal.$j,e=TCB_Front,t.fn.tve_form_loading=function(t){const o=this,i=o.find("[type=submit]").parent();let n=o.find(".tcb-form-loader");return void 0!==t&&t?(n.fadeOut(),o.find("input,select,textarea").removeAttr("disabled"),i.find("button").fadeIn(),o.find(".tve-form-button .tve-form-button-submit").fadeIn(),i.find(".thrv_icon").fadeIn(),this):(n.length||(n=ThriveGlobal.$j('<div class="tcb-form-loader"><span class="tcb-form-loader-icon thrv-svg-icon">'+e.icons.get("spinner9")+"</span></div>").appendTo(i),i.css({position:"relative",width:i.width()+"px",height:i.height()+"px"})),i.find("button").hide(),o.find(".tve-form-button .tve-form-button-submit").hide(),i.find(".thrv_icon").hide(),n.show(),this)}},74468(){!function(t,e){if(e.$document.on("click","a.tve-jump-scroll",function(o){if(this.hash.includes("comments")&&this.href!==this.hash)return!0;if(t(this).hasClass("tve-toc-anchor"))return!0;let i;o.preventDefault(),o.stopPropagation();const n=t(this),s=t(o.target).closest(".tve-item-dropdown-trigger").length,r=n.closest("li.menu-item");try{i=t(this.hash)}catch(t){}if(r.length){if(s){const e=t.Event("click");return e.clickedTarget=o.target,void r.trigger(e)}r.trigger("menu_item_anchor_clicked")}if(i&&i.length){if(history&&history.pushState){let t=location.href;t.indexOf("#")>-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+this.hash)}return e.jumpScrollTo(i,this),!1}}),e.$document.on("click",".tve-jump-scroll[data-target]",function(o){let i;o.preventDefault(),o.stopPropagation();const n=this.getAttribute("data-target");try{i=t(n)}catch(t){}if(i&&i.length){if(history&&history.pushState){let t=location.href;t.indexOf("#")>
1-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+n)}return e.jumpScrollTo(i,this),!1}}),TCB_Front.jumpScrollTo=(o,i)=>{const n=t(i.closest(".tve_lb_open.tve-scroll")),s="smooth"===i.getAttribute("jump-animation")?1500:100,r=o.offset().left,a=t(".thrv_header.tve-scroll-sticky"),l=(a.length?a.outerHeight():0)+(t("#wpadminbar").outerHeight()||0);let c=null,d=!1,h=l,p=t(),u=t("html, body");function f(){const i=o.offset().top;h=l,p.each(function(){const e=t(this),o=e.hasClass("tve-sticky-element"),n=o?e.data("stop-target"):t(),s=n.length?n.offset().top:0,a=e.offset().left+e.outerWidth();(!o||o&&s>i)&&r<=a&&(h=Math.max(h,e.data("scroll_config").top+e.outerHeight()))}),c&&(d?(c.end=i-e.$body.offset().top-h,d=!1):c.end=c.initial_end-h)}n.length&&n.find(o).length&&(u=n),e.$body.off("tcb-sticky-remove tcb-sticky-add tcb-sticky-scroll-down").on("tcb-sticky-add",function(t,e){(e=e.filter(":not(.tve-toc)")).length>0&&o.closest(e.data("append-target")).length>0&&(p=p.add(e)),f()}).on("tcb-sticky-remove",(t,e)=>{p=p.not(e),f()}),e.$body.off("tcb.body.resize").on("tcb.body.resize",()=>{d=!0,f()}),(t=>{if(0===t.closest(".tve-state-expanded").length&&t.hasClass("thrv_toggle_title")){const e=t.closest(".thrv_toggle");e.hasClass("tve-toggle-auto-collapse")&&e.find(".thrv_toggle_title").tcbToggle("hide")}else if(t.closest(".tve_tab_content:not(.tve-tc-visible)").length){const e=t.closest(".tve_tab_content:not(.tve-tc-visible)").index();t.closest(".thrv-tabbed-content").find(".tve_scT li").eq(e-1).tcbTabsToggle()}})(o),u.stop(!0,!1).animate({scrollTop:o.offset().top-e.$body.offset().top-l},{duration:s,step:(t,e)=>{e.initial_end||(e.initial_end=e.end+l);const o=!c;c=c||e,o&&f()}}).promise().then(()=>{0===o.closest(".tve-state-expanded").length&&(o.hasClass("thrv_toggle_title")?o.trigger("click"):o.is(".tve_tab_title_item")&&o.tcbTabsToggle()),e.$body.trigger("tcb-jumplink-done",[o,i])})},!TCB_Front.Utils.isEditorPage()){const o=function(){if(!location.hash)return;let o;try{o=t(location.hash)}catch(t){return}if(o&&o.length){const t={getAttribute:()=>null,closest:()=>null,classList:{contains:()=>!1}};e.jumpScrollTo(o,t)}};location.hash&&t(window).on("load",function(){setTimeout(o,100)}),t(window).on("hashchange",function(){setTimeout(o,100)});let i=!1,n=0,s=null;t(window).on("blur",function(){i=!0,n=Date.now()}).on("focus",function(){const t=Date.now(),e=n&&t-n<2e3;i&&location.hash&&e?(i=!1,n=0,null!==s&&clearTimeout(s),s=setTimeout(function(){s=null,o()},150)):i=!1})}}(ThriveGlobal.$j,TCB_Front)},91806(t){var e;e=ThriveGlobal.$j,t.exports=function(t,o){if(0===t.length||t.hasClass("tve_lb_open")||t.hasClass("tve_lb_opening"))return;const i=e("body"),n=e("html"),s="tve-o-hidden tve-l-open tve-hide-overflow",r=TCB_Front.Utils.getBrowserScrollSize().width,a=parseInt(i.css("padding-right"));function l(t,o){TCB_Front.$window.trigger("tve_after_content_toggle",[t,!1]),e(window).trigger("tcb_before_lightbox_close",t),void 0===o&&1===e(".tve_lb_open").length&&(i.removeClass(s).css("padding-right",""),n.removeClass(s),t.data("doc-scroll-top")?(document.documentElement.scrollTop=t.data("doc-scroll-top"),t.data("doc-scroll-top","")):t.data("bdy-scroll-top")&&(document.body.scrollTop=t.data("bdy-scroll-top"),t.data("doc-scroll-top",""))),t.removeClass("tve_lb_open tve_lb_opening").addClass("tve_lb_closing"),setTimeout(function(){t.removeClass("tve_lb_closing").css("display","none").find("tve_p_lb_content").trigger("tve.lightbox-close")},300),e("#tve-lg-error-container").hide()}function c(o){const i=t.find(".tve_p_lb_content"),n=TCB_Front.$window.height(),s=void 0!==o&&o?"animate":"css",r=i.outerHeight(!0),a=(n-r)/2;e(window).trigger("tcb_before_lightbox_reposition"),t.find(".tve_p_lb_overlay")[s]({height:r+80+"px","min-height":n+"px"},200),i[s]({top:(a<40?40:a)+"px"},200),r+40>n&&t.addClass("tve-scroll")}if(t.off().on("click",".tve_p_lb_close",function(){return l(t),!1}),i.off("keyup.tve_lb_close").on("keyup.tve_lb_close",function(e){if(27===e.which)return l(t),!1}),t.children(".tve_p_lb_overlay").off("click.tve_lb_close").on("click.tve_lb_close",function(){return l(t),!1}),l(e(".tve_p_lb_background.tve_lb_open"),!0),"instant"!==o&&t.addClass("tve_p_lb_background tve_lb_anim_"+o),t.data("doc-scroll-top",document.documentElement.scrollTop),t.data("bdy-scroll-top",document.body.scrollTop),i.addClass(s),n.addClass(s),TCB_Front.$
1window.height()<TCB_Front.$document.height()&&i.css("padding-right",a+r+"px"),t.find(".tve_scT").length&&(TCB_Front.Utils.isEditorPage()||t.find(".tve_scT").each(function(){const t=e(this),o=parseInt(t.attr("data-selected"));if(!TCB_Front.Utils.isEditorPage()){let e=t.find("> ul li").eq(isNaN(o)?0:o);e.length||(e=t.find("> ul li").first()),e.tcbTabsToggle()}})),setTimeout(function(){t.css("display",""),t.addClass("tve_lb_opening"),setTimeout(function(){"instant"===o&&t.addClass("tve_p_lb_background tve_lb_anim_"+o),c(),TCB_Front.$window.trigger("tve_after_content_toggle",[t])},0)},20),t.find(".tve_p_lb_content").trigger("tve.before-lightbox-open"),"none"===t.css("display")||t.hasClass("tve_lb_closing")?(t.removeClass("tve_lb_open"),i.removeClass(s).css("padding-right",""),n.removeClass(s)):setTimeout(function(){t.removeClass("tve_lb_opening").addClass("tve_lb_open").find(".tve_p_lb_content").trigger("tve.lightbox-open"),t.find("form").each(function(){e(this).find('input[required], textarea[required], select[required], input[data-required="true"], textarea[data-required="true"], select[data-required="true"]').each(function(){const t=e(this);"none"===t.css("display")&&t.css("display",""),"hidden"===t.css("visibility")&&t.css("visibility",""),t.parentsUntil(".tve_p_lb_content").filter(function(){return"none"===e(this).css("display")||"hidden"===e(this).css("visibility")}).css("display","").css("visibility","");const o=t.attr("tabindex");o&&parseInt(o)<0&&t.removeAttr("tabindex")})})},300),TCB_Front.$window.resize(function(){c()}),t.on("lbresize",function(){c(!0)}),"undefined"!=typeof ResizeObserver){const e=new ResizeObserver(()=>{c(!0)});t.find("iframe").each(function(){e.observe(this)})}else t.find("iframe").each(function(){this.src=this.src,this.onload=()=>{c(!0)}});e(window).trigger("tcb_after_lightbox_open",t)}},15039(t){var e,o;e=ThriveGlobal.$j,o=TCB_Front,t.exports=class{constructor(){if(this.position="top-center",this.$customNotificationWrapper=e(".notifications-content-wrapper"),this.isCustomNotification=this.$customNotificationWrapper.length>0,this.$notificationWrapper=this.isCustomNotification?this.$customNotificationWrapper:e(".tvd-toast"),this.isCustomNotification){const t=this.$notificationWrapper.attr("data-animation");t&&"none"!==t&&this.$notificationWrapper.addClass("tcb-animated")}(!this.isNotificationPage()||this.isNotificationPage()&&!this.isEditorPage())&&this.render(),this.isNotificationPage()&&this.isEditorPage()&&this.$notificationWrapper.addClass("notification-edit-mode")}isNotificationPage(){let t="tve_notifications"===tve_frontend_options.post_type;return this.isEditorPage()&&(t=TVE.apply_filters("tcb.is_notification_editor_page",t)),t}isEditorPage(){return!!tve_frontend_options.is_editor_page}
1render(){this.$notificationWrapper.hide(),this.$notificationWrapper.removeClass("tcb-permanently-hidden animated");const t=o.queryString.get("content_template");o.queryString.get("preview")&&(this.isNotificationPage()||t&&t.includes("notification"))&&this.toggle()}toggle(t="",e="",o){this.$notificationWrapper.show(),this.isCustomNotification?this.toggleCustomNotification(t,e,o):this.toggleDefaultNotification(t,e,o)}toggleCustomNotification(t,o,i){const n=this.$notificationWrapper.attr("data-animation"),s=this.$notificationWrapper.attr("data-timer"),r=e(`.notification-${o} .thrv-notification_message`);t&&r.length>0&&r.empty().append(t),o&&this.$notificationWrapper.attr("data-state",o),this.$notificationWrapper.removeAttr("data-animation"),setTimeout(()=>{n&&"none"!==n?this.$notificationWrapper.attr("data-animation",n):this.$notificationWrapper.hide(),"function"==typeof i&&i()},s)}toggleDefaultNotification(t,o,i){const n=e(".tve-toast-message-container"),s=e(".tve-toast-icon-container");switch(t&&n.empty().append(t),s.removeClass("tve-toast-error"),s.find(".thrv-svg-icon").empty(),o){case"success":s.find(".thrv-svg-icon").append(TCB_Front.icons.get("checkmark"));break;case"warning":case"error":s.find(".thrv-svg-icon").append(TCB_Front.icons.get("cross")),s.addClass("tve-toast-error")}setTimeout(()=>
1{this.$notificationWrapper.hide(),"function"==typeof i&&i()},3e3)}}},69810(t){"undefined"==typeof URLSearchParams&&(window.URLSearchParams=function(t){const e=this;e.searchString=t,e.get=function(t){const o=new RegExp("[?&]"+t+"=([^&#]*)").exec(e.searchString);return null===o?null:decodeURI(o[1])||0}}),t.exports={get:t=>("string"!=typeof t&&(t=""),new URLSearchParams(window.location.search).get(t)),setUrlParam(t,e,o){const i=new URL(t);return Array.isArray(o)?o.forEach((t,o)=>i.searchParams.append(`${e}[${o}]`,t)):o?i.searchParams.set(e,o):i.searchParams.delete(e),i.toString()}}},68382(t){t.exports=["attachment","attachment_id","author","author_name","calendar","cat","category","category__and","category__in","category__not_in","category_name","comments_per_page","comments_popup","custom","customize_messenger_channel","customized","cpage","day","debug","embed","error","exact","feed","fields","hour","link_category","m","minute","monthnum","more","name","nav_menu","nonce","nopaging","offset","order","orderby","p","page","page_id","paged","pagename","pb","perm","post","post__in","post__not_in","post_format","post_mime_type","post_status","post_tag","post_type","posts","posts_per_archive_page","posts_per_page","preview","robots","s","search","second","sentence","showposts","static","status","subpost","subpost_id","tag","tag__and","tag__in","tag__not_in","tag_id","tag_slug__and","tag_slug__in","taxonomy","tb","term","terms","theme","title","type","types","w","withcomments","withoutcomments","year"]},5540(t){var e,o;e=ThriveGlobal.$j,o=TCB_Front,t.exports={init(t){tve_frontend_options.is_editor_page?(t.find("input[data-hide],textarea[data-hide]").each((t,e)=>{this.handleInput(e,!1)}),TVE.add_action("tve.conditional_display.activate",t=>this.handleSmartComplete(t))):(setTimeout(()=>this.handleSmartComplete(t)),o.$document.on("switchstate",(t,e)=>{this.handleSmartComplete(e)}),e(window).on("tcb_after_lightbox_open",(t,o)=>{this.handleSmartComplete(e(o))}),e(window).on("tl_after_lightbox_open",(t,o)=>{this.handleSmartComplete(e(o))}))},handleSmartComplete(t){t.find("[default-value]:not([data-complete-type])").each((t,e)=>{e.value=e.getAttribute("default-value")}),t.find("[data-complete-type]").each((t,e)=>{let i=e.dataset.completeValue;switch(e.dataset.completeType){case"user":if(e.dataset.completeValue)if(e.dataset.completeValue.includes("wp"))i=tve_frontend_options.current_user[e.dataset.completeValue.replace("wp.","")];else if("ip"===e.dataset.completeValue)i=tve_frontend_options.ip;else{const t=TCB_Front.detectBrowser();i=Object.keys(t).filter(e=>t[e]&&"webkit"!==e).toString(),i.includes("version")&&(i=i.replace("version",TCB_Front.browser.version))}break;case"time":i=this.convertDate((e.dataset.completeValue||"")+" HH:mm:ss");break;case"query":i=TCB_Front.queryString.get(e.dataset.completeValue);break;case"post":i=tve_frontend_options.post_request_data[e.dataset.completeValue];break;case"cookie":i=o.getCookie(e.dataset.completeValue);break;case"content":i=tve_frontend_options[e.dataset.completeValue];break;case"source":i=document.referrer;break;case"shortcode":e.parentNode.dataset.completeValue&&(i=e.parentNode.dataset.completeValue),i=i.replace(/\[(.*?)\]/g,"")}!i&&e.getAttribute("data-hide")&&this.handleInput(e,!1),i=i||e.getAttribute("default-value"),i&&(e.value=i)}),t.find('[type="radio"][default-value]').each(function(){this.checked=this.value===this.getAttribute("default-value")}),t.find('[type="checkbox"][default-value]').each(function(){this.checked="checked"===this.getAttribute("default-value")})},handleInput(t,e=!0){const o=e?"add":"remove",i=t.closest("form").querySelector(`[data-label-for="${t.parentElement.getAttribute("data-label")}"]`);t.parentElement.classList[o]("tcb-permanently-hidden"),t.parentElement.previousElementSibling&&"label"===t.parentElement.previousElementSibling.tagName.toLowerCase()&&t.parentElement.previousElementSibling.classList[o]("tcb-permanently-hidden"),i&&i.classList[o]("tcb-permanently-hidden")},convertDate(t){const e=new Date;function o(t,e){let o=t+"";for(e=e||2;o.length<e;)o="0"+o;return o}const i=e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+i)).replace(/(^|[^\\])yy/g,"$1"+i.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+i);const n=e.getMonth()+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+["\0","January","February","March","April","May","June","July","August","September","October","November","December"][n])).replace(/(^|[^\\])MMM/g,"$1"+["�","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n])).replace(/(^|[^\\])MM/g,"$1"+
1o(n))).replace(/(^|[^\\])M/g,"$1"+n);const s=e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+["�","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s])).replace(/(^|[^\\])ddd/g,"$1"+["�","Sun","Mon","Tue","Wed","Thu","Fri","Sat"][s])).replace(/(^|[^\\])dd/g,"$1"+o(s))).replace(/(^|[^\\])d/g,"$1"+s);const r=e.getHours();let a;a=r>12?r-12:0===parseInt(r)?12:r,t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+o(r))).replace(/(^|[^\\])H/g,"$1"+r)).replace(/(^|[^\\])hh+/g,"$1"+o(a));const l=e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,"$1"+o(l));const c=e.getSeconds();return t.replace(/(^|[^\\])ss+/g,"$1"+o(c))}}},98079(t){function e(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,i)}return o}function o(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t,e,o){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}!function(e,i){i.identifiers=o(o({},i.identifiers||{}),{},{parentStickyParent:".tcb-col,.tve-cb,.tve-page-section-in,#tve_editor",pageStickyParent:"#tve_editor,.symbol-section-in,.thrv_wrapper.section,.thrive-symbol-shortcode,.tcb-post-list",stickyParentType:".tcb-col,.tve-cb,.tve-page-section-in",parentZindexFix:""});const n={boxSizing:"",marginTop:"",marginLeft:"",height:"",top:"",bottom:"",position:"",opacity:"",minWidth:"",maxWidth:"",textDecoration:"",zIndex:""},s=function(){return window.visualViewport?window.visualViewport.height:window.innerHeight},r=function(t){return s()-t.data("defaultTop")-t.outerHeight()},a=function(t,e){const o=r(t);return o!==t.data("previousTop")&&(t[0].style.setProperty("top",`${o}px`),t.data("previousTop",o),e.top=o,!0)},l=function(t,e){let o;return function(){const i=arguments,n=this;clearTimeout(o),b?t.apply(n,i):o=setTimeout(function(){t.apply(n,i)},e)}},c=l(function(t,e){t&&t.stop().animate(e,200)},200);let d,h,p,u,f,g,_,m=e(),b=!1,v=!1,y=0,w="",T="left";const C={},$={};function k(t){return Math.min(h.top+d.data("$$position").top+t-g.top+d.data("marginTop"),(d.data("append-target")||d.parent()).height()-d.outerHeight())}function x(t,e,o){b=o,m.each(function(){if(j(this),!function(){if(!h.disabled||!h.disabled.length)return!0;if(_){let t=!0;return h.disabled.forEach(e=>{("desktop"===e&&!TCB_Front.$body.is(".preview-tablet,.preview-mobile")||i.$body.hasClass(`preview-${e}`))&&(t=!1)}),t}const t=i.$window.width();return t<=767?-1===h.disabled.indexOf("mobile"):t<=1023?-1===h.disabled.indexOf("tablet"):-1===h.disabled.indexOf("desktop")}()||v||!d.hasClass(`tve-sticky-${h.end}-hidden`)&&!d.is(":visible"))return v&&d.removeData("clone-sticky"),C.on_scroll_up_default(t,!0),"parallax"===h.mode&&S(d,v),void d.removeClass(`tve-scroll-${h.mode}`);"parallax"!==h.mode&&(u||(d.data("$$offset",d.offset()),d.data("marginTop",Number(d.css("margin-top").replace("px",""))),d.data("$$position",d.position()),d.data("$$scroll",t),"element"===h.end&&d.data("$$stop-offset",d.data("stop-target").offset()||{top:1e6})),g=d.data("$$offset")),C["on_scroll_"+e+"_"+h.end].call(C,t)})}function S(t=i.$body,e=!1){t.each((t,o)=>{i.inlineCssVariable(o,{"--parallaxR":e?"":"0","--parallaxB":e?"":"0","--parallaxS":e?"":"1","--parallaxO":e?"":"1","--parallaxTX":e?"":"0","--parallaxTY":e?"":"0","--parallaxRY":e?"":"0","--parallaxP":e?"":"1000px"})})}function B(){const t=TCB_Front.$body.hasClass("visible-off-screen-sidebar");m.each(function(){const o=e(this),n=o.data("scroll_config")||{};if("parallax"===n.mode)return;const s=n.end||"default",r="tve-sticky-"+s;if(!o.hasClass(r))return;const a=o.data("clone-sticky");if(!a||!a.length)return;if(o.hasClass("thrv_header")&&i.$body.hasClass("tcb-full-header"))return;const l="fixed"===o.css("position")?function(t,e,o,n){if(n&&"over"===w&&"right"!==T)return parseInt(y);if(t[0].classList.contains("tcb-window-width"))return function(t){"function"==typeof TCB_Front.resizePageSection&&TCB_Front.resizePageSection(t)}(t),0;if("center"===(t.css("--tve-alignment")||"").trim()&&"default"===o){const e=function(t){let e=t.data("append-target");return e&&e.length?e:(e=t.closest(i.identifiers.pageStickyParent),e&&e.length?e:i.$body)}(t),o=e[0].getBoundingClientRect();return Math.max(0,Math.round(o.left+(o.width-t.outerWidth())/2))}return(e.offset()||{left:0}).left}(o,a,s,t):function(t,e,o){const i=t.offsetParent(),n=i&&i.length,s=n&&i.offset()?i.offset():{left:0}
1,r=(e.offset()||{left:0}).left-s.left;if("center"===(t.css("--tve-alignment")||"").trim()&&"parent"===o&&n){const e=i.innerWidth(),o=t.outerWidth(),n=Math.max(0,Math.round((e-o)/2)),s=function(t){try{const e=window.getComputedStyle(t[0]).transform;if(!e||"none"===e)return 0;const o=e.match(/^matrix\(([^)]+)\)$/);if(!o)return 0;const i=o[1].split(",").map(t=>parseFloat(t));if(6!==i.length)return 0;const n=i[4];return isNaN(n)?0:n}catch(t){return 0}}(t),r=Math.abs(s+o/2)<3?Math.round(o/2):0;return Math.max(0,n+r)}return r}(o,a,s);"number"==typeof l&&(o.css("left",`${l}px`),o.css({"margin-left":"","margin-right":"",right:""}))})}function F(t=!0,e="default"){const o=d;if(t&&o.hasClass(`tve-sticky-${e}-hidden`))return void o[0].style.setProperty("display","none","important");const i={duration:600,complete:()=>{const e=t?"none":o.data("defaultDisplay");o[0].style.setProperty("display",e,"important"),o[0].style.setProperty("position","fixed","important")}},n=`tve-sticky-${e}-hidden`;t?o.addClass(n).fadeOut(i):o.removeClass(n).fadeIn(i)}function j(t){d=e(t),h=d.data("scroll_config")||{},"parallax"!==h.mode?("bottom"===h.stickyPosition&&(h.top=r(d),d.data("scroll_config",h)),p="tve-sticky-"+h.end,u=t.classList.contains(p),f=d.data("clone-sticky")||e()):f=e()}e(window).on("resize",function(){void 0!==f&&f.css({height:d.outerHeight()})}),C.on_scroll_down_default=function(t,o){let n=0,r=!0;const l=(o=o||{}).position||"fixed";"appear"===h.mode&&(o.top=-d.outerHeight(),n=-o.top);let _=t+h.top>g.top+n;if(d.hasClass("thrv_header")){if(i.$body.hasClass("tve-tl-gr-anim"))return void C.on_scroll_up_default(t,!0);_=t+h.top>
1=g.top+n}if(_&&i.$body.trigger("tcb-sticky-initialized",d),"bottom"===h.stickyPosition&&(_=t+s()>g.top+d.height()+Number(d.data("defaultTop")),r=!1,i.isBottomScroll(t)&&F(!0,"default"),u&&!i.isBottomScroll(t)&&a(d,h)),u)return"appear"===h.mode&&c(d,o),void(r&&i.$body.trigger("tcb-sticky-add",[d]));if(_){!function(){if(f=d.data("clone-sticky"),!f){let t=d.outerHeight();d.parent().hasClass("tcb-clear")&&(t=d.parent().outerHeight()),f=e('<div class="thrv_wrapper"></div>').css({boxSizing:"border-box",padding:0,width:d.outerWidth(),height:t,marginTop:d.css("margin-top"),marginBottom:d.css("margin-bottom"),marginLeft:d.css("margin-left"),marginRight:d.css("margin-right"),position:d.css("position"),left:d.css("left"),float:d.css("float")}),d.data("clone-sticky",f),d.trigger("tcb.sticky.ensure_placeholder")}}(),d.addClass(p),delete o.position,d.before(f);const t=f.offset(),n=TCB_Front.$body.hasClass("visible-off-screen-sidebar"),s=d.prevAll("[data-position=top]");let a;a=n&&"over"===w&&"right"!==T?parseInt(y):d[0].classList.contains("tcb-window-width")?0:t.left,e(f).remove(),d.data("$$offset",t),d.data("saved_props",{offset:t,width:d[0].style.width||"",left:d[0].style.left||""});let c=d.width();const g=d.hasClass("thrv_header")&&i.$body.hasClass("tcb-full-header");n&&(d.hasClass("tcb-window-width")||g)&&(c=Math.max(f.width(),c));const _={width:c,height:d.height(),top:`calc(${h.top}px + var(--tcb-header-extra-offset,0px))`};g||(_.left=`${a}px`),d.css(e.extend(_,o));let m="0px";if("parent"===h.end){const t=d.css("margin-left");t===d.css("margin-left")&&(m=t)}g||d[0].style.setProperty("margin-left",m,"important"),d[0].style.setProperty("margin-top","0px","important"),d[0].style.setProperty("min-width","0","important"),d[0].style.setProperty("max-width","none","important"),d[0].style.setProperty("position",l,"important"),d[0].style.setProperty("box-sizing","content-box","important");const b=Number(d.css("z-index"));d[0].style.setProperty("z-index",isNaN(b)?"14":Math.max(b,14),"important"),d.closest(i.identifiers.parentZindexFix).css("z-index",isNaN(b)?"14":Math.max(b,14)),d.before(f),u=!0,d.data("append-target")&&(d.appendTo(d.data("append-target")),d.data("$parent").is("a")&&(d.wrap(d.data("$parent").clone().empty().addClass("tcb-sticky-anchor")),d[0].style.setProperty("text-decoration","inherit","important"))),d.hasClass("thrv_header")&&d[0].style.setProperty("z-index",90,"important"),r&&i.$body.trigger("tcb-sticky-add",[d]),s.length>0&&s.css("z-index","91"),B()}},C.on_scroll_up_default=function(t,e){if(!f||!f.length||!u)return;(e=!!e)||"appear"!==h.mode||c(d,{top:h.top});let o=f.offset().top||0;d.data("saved_props")&&(o=d.data("saved_props").offset.top);let r=t+h.top<=o,l=!0;d.hasClass("thrv_header")&&(r=t+h.top<o),"bottom"===h.stickyPosition&&(u&&a(d,h),r=t+s()<=o+d.height()+Number(d.data("defaultTop")),l=!1,F(i.isBottomScroll(t))),e||r?(u=!1,d.removeClass(p).stop().css(Object.assign({},n,d.data("saved_props"))),document.contains(f[0])&&d.data("append-target")&&f.before(d),f.detach(),i.$body.find(".tcb-sticky-anchor:empty").remove(),l&&i.$body.trigger("tcb-sticky-remove",d),d.hasClass("tcb-window-width")&&TCB_Front.resizePageSection(d)):l&&i.$body.trigger("tcb-sticky-add",[d])},C.on_scroll_down_parent=function(t){const o=d.data("prevTop"),n=o||0,s=k(t);if(t&&"bottom"===h.stickyPosition&&s&&s===n&&(F(!0,"parent"),d.data("hideTop",s)),o&&d.data("prevTop",o?s:"0"),u)d.css({top:s}),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d]);else{const o=d.data("appendTarget")||e(),n=o.length&&(o.is(d.data("$parent"))||o.is(i.identifiers.stickyParentType))||["left","right"].includes(d.css("float"));C.on_scroll_down_default(t,{position:"absolute",left:d.data(n?"$$position":"$$offset").left,top:s})}},C.on_scroll_up_parent=function(t){if(!f||!f.length||!u)return;const e=k(t);e<=d.data("$$position").top+d.data("marginTop")?C.on_scroll_up_default(t):("bottom"===h.stickyPosition&&d.hasClass("tve-sticky-parent-hidden")&&(d.data("hideTop")!==e?(F(!1,"parent"),d.data("prevTop",0),d.data("hideTop",0)):d[0].style.setProperty("display","none","important")),d.css("top",e),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d]))},C.on_scroll_down_element=function(t){const e=d.data("$$stop-offset").top-t-d.outerHeight(),o=Math.min(h.top,e),n={top:o};t&&"bottom"===h.stickyPosition&&o&&o===e&&F(!0,"element"),u?(d.css("top",n.top),"bottom"!==h.stickyPosition&&i.$body.trigger("tcb-sticky-add",[d])):C.on_scroll_down_default(t,n)},C.on_scroll_up_element=function(t){if(C.on_scroll_up_default(t),u){const e=Math.min(h.top,d.data("$$stop-offset").top-t-d.outerHeight());d.css("top",e),"bottom"===h.stickyPosition?d.hasClass("tve-sticky-element-hidden")&&e===h.top&&F(!1,"element"):i.$body.trigger("tcb-sticky-add",[d])}},C.on_scroll_down_parallax=C.on_scroll_up_parallax=t=>{const e=d.data("elem_data"),o=d.data("parallaxSettings");if(!o||!Object.keys(o).length||!e)return;const n=[],r=function(t,e){const o=e.top-t-s();return 100/e.elementRange*(-1*o)}(t,e);let a;function l(t,e){return t*e/100}
1Object.keys(o).forEach(t=>{const e=o[t];let s="";if(r>e.start){let o;a=Number(r>e.end?e.end:r);const c=function(t,e){let o,i=e.direction;if(["in-out","out-in"].includes(i)&&(i=i.split("-")[t<=e.middle?"0":"1"],"in-out"===e.direction)){const o=e.middle-e.start;"in"===i?t+=o:t-=o,t===e.middle&&(t="in"===i?-1:101)}var n;return t<e.start?o="in"===i?0:100:t<e.end?(n=e.end-e.start,o=+((t-e.start)/n*100).toFixed(2),"out"===i&&(o=100-o)):o="out"===i?0:100,o}(a,e);switch(t){case"vertical":case"horizontal":case"rotate":a="in"===e.direction?-1*a:a,o=function(t,e){return t*e}(a,e.speed);break;case"scale":o=1+e.speed*c/1e3;break;case"blur":o=e.speed-l(e.speed,c);break;case"transparency":const t=e.speed/10;o=1-t+l(t,c);break;case"3dperspective":e.perspective=Number(e.perspective),"from"===e.direction?o=(1e3-e.perspective)*(a-e.start)/100*e.speed+e.perspective:(a=100-a,o=Math.max(e.perspective,e.perspective*a/100*e.speed)),o=Math.max(o,100),i.inlineCssVariable(d,"--parallaxRY")!==`${e.degrees}deg`&&n.push({key:"RY",value:`${e.degrees}deg`})}s=`${o}${e.settings.um}`}n.push({key:e.settings.key,value:s})}),n.length&&n.forEach(t=>{i.inlineCssVariable(d,`--parallax${t.key}`,t.value)})};const P=l(function(){m.each(function(){j(this),C.on_scroll_up_default(0,!0);const t=e(this).data("clone-sticky");t&&t.css({width:d.outerWidth()})}),x(i.$document.scrollTop(),"down",!0),B(),setTimeout(function(){B()},50)},50),E=l(B,16);$.initSticky=function(t=i.$body,o=!1){_=o,function(t,o=!1){(t=t[o?"filter":"find"]("[data-tve-scroll]")).filter(`:not(.tcb-${i.getDisplayType()}-hidden)`).each(function(){try{const t=JSON.parse(this.dataset.tveScroll);let o=e(this);if(o.hasClass("thrive-symbol-shortcode")&&(o=o.parent()),o.addClass(`tve-scroll-${t.mode}`),"parallax"===t.mode){if(!t.parallax||!Object.keys(t.parallax).length)return;const e=o.offset(),i=o.outerHeight(),n={width:o.outerWidth(),height:i,top:e.top,left:e.left,elementRange:i/2+s()};o.data("parallaxSettings",t.parallax),o.data("elem_data",n)}else if(_)return;if(o.data("$parent",o.parent()),t.top=parseInt(t.top||"0"),t.end=t.end||"default",t.stickyPosition=t.stickyPosition||"top","bottom"===t.stickyPosition){let e=o.css("display").trim();"none"===e&&(e="block"),o.data("defaultTop",t.top),o.data("previousTop",t.top),o.data("defaultDisplay",e),t.top=s()-t.top-o.outerHeight()}else t.top+=i.body_offset?i.body_offset.top:e("body").offset().top;"desktop"!==i.getDisplayType()&&(t.top=t.top-(e("#wpadminbar").height()||0)),o.data("scroll_config",t).data("append-target",function(t,e){return!(t.find("iframe,video").length||t.find(".tcb-video-background-el").length||t.hasClass("thrv_header"))&&("parent"===e?t.parent().closest(i.identifiers.parentStickyParent):t.closest(i.identifiers.pageStickyParent))}(o,t.end)),"element"===t.end&&o.data("stop-target",e("#"+(t.el_id&&t.el_id.replace("#","")||"some-not-found-id"))),_||delete this.dataset.tveScroll,m=m.add(o)}catch(t){console.warn(t)}})}(t),m.length&&(S(),_||(i.$body[0].style.overflowX="hidden")),i.add_scroll_callback(x),i.addResizeCallback(P),TCB_Front.$window.on("orientationchange",l(P,100)),window.visualViewport&&window.visualViewport.addEventListener("resize",l(function(){x(i.$document.scrollTop(),"down",!0)},16)),i.$body.on("tcb.body.resize",E),i.$body.on("tcb-sticky-add tcb-sticky-remove",E),i.$body.length&&(y=i.inlineCssVariable(i.$body,"--off-screen-sidebar-size")),w=i.$body.attr("data-off-screen-type"),T=i.$body.attr("data-off-screen-side")},$.destroyScrollBehavior=function(){v=!0,TCB_Front.$window.trigger("scroll"),m=e(),v=!1},$.resetElementsPosition=()=>{v=!0,TCB_Front.$window.trigger("scroll"),v=!1,TCB_Front.$window.trigger("scroll")},$.forceAddElement=function(t){m=m.add(t)},$.updateStickyLeftOffsets=B,t.exports=$}(ThriveGlobal.$j,TCB_Front)},73771(t){(e=>{const o={get(t){const e=this.icons[t]||"";return e?'<svg xmlns="http://www.w3.org/2000/svg" class="tcb-{icon}" viewBox="{viewbox}">{html}</svg>'.replace("{viewbox}",e.viewbox||"0 0 32 32").replace("{icon}",t).replace("{html}",e.html||e):""},render(t,e,o="html",i=!0){t[o](this.get(e)),i&&t.addClass("thrv-svg-icon")},migrate(t){const o=["cross","forward"],i={tve_s_fb_share:"facebook",tve_s_x_share:"x",tve_s_in_share:"linkedin",tve_s_pin_share:"pinterest",tve_s_xing_share:"xing",tve_s_bluesky_share:"bluesky"};
1t.find('[class^="thrv-icon-"], [class*=" thrv-icon-"], .tve_s_item').not(".thrv-svg-icon").each((t,n)=>{o.some(t=>!!n.className.includes(t)&&(this.render(e(n),t),!0))||Object.keys(i).forEach(t=>{n.className.includes(t)&&!n.querySelector(".tcb-icon")&&this.render(e(n).find(".tve_s_icon"),i[t])})}),this.render(t.find(".rv_button_rounded_rectangle_light .overlay_play_button:empty"),"yt-play")},icons:{spinner9:'<path d="M16 0c-8.711 0-15.796 6.961-15.995 15.624 0.185-7.558 5.932-13.624 12.995-13.624 7.18 0 13 6.268 13 14 0 1.657 1.343 3 3 3s3-1.343 3-3c0-8.837-7.163-16-16-16zM16 32c8.711 0 15.796-6.961 15.995-15.624-0.185 7.558-5.932 13.624-12.995 13.624-7.18 0-13-6.268-13-14 0-1.657-1.343-3-3-3s-3 1.343-3 3c0 8.837 7.163 16 16 16z"></path>',cross:'<path d="M31.708 25.708c-0-0-0-0-0-0l-9.708-9.708 9.708-9.708c0-0 0-0 0-0 0.105-0.105 0.18-0.227 0.229-0.357 0.133-0.356 0.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13 0.048-0.252 0.124-0.357 0.228 0 0-0 0-0 0l-9.708 9.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057 0.229l-4.586 4.586c-0.286 0.286-0.361 0.702-0.229 1.057 0.049 0.13 0.124 0.252 0.229 0.357 0 0 0 0 0 0l9.708 9.708-9.708 9.708c-0 0-0 0-0 0-0.104 0.105-0.18 0.227-0.229 0.357-0.133 0.355-0.057 0.771 0.229 1.057l4.586 4.586c0.286 0.286 0.702 0.361 1.057 0.229 0.13-0.049 0.252-0.124 0.357-0.229 0-0 0-0 0-0l9.708-9.708 9.708 9.708c0 0 0 0 0 0 0.105 0.105 0.227 0.18 0.357 0.229 0.356 0.133 0.771 0.057 1.057-0.229l4.586-4.586c0.286-0.286 0.362-0.702 0.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z"></path>',checkmark:'<path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"></path>',forward:{viewbox:"0 0 18 18",html:'<path d="M16.711 8.29l-6-5.996c-0.391-0.391-1.026-0.391-1.417 0s-0.391 1.025 0 1.417l4.293 4.29h-11.59c-0.553 0-1.001 0.448-1.001 1s0.448 1 1.001 1h11.59l-4.292 4.29c-0.391 0.391-0.391 1.025 0.001 1.417s1.026 0.391 1.417 0l6-5.997c0.196-0.196 0.294-0.453 0.294-0.71s-0.097-0.514-0.294-0.71z"></path>'},sort:{viewbox:"0 0 16 28",html:'<path d="M16 17q0 0.406-0.297 0.703l-7 7q-0.297 0.297-0.703 0.297t-0.703-0.297l-7-7q-0.297-0.297-0.297-0.703t0.297-0.703 0.703-0.297h14q0.406 0 0.703 0.297t0.297 0.703zM16 11q0 0.406-0.297 0.703t-0.703 0.297h-14q-0.406 0-0.703-0.297t-0.297-0.703 0.297-0.703l7-7q0.297-0.297 0.703-0.297t0.703 0.297l7 7q0.297 0.297 0.297 0.703z"></path>'},"sort-desc":{viewbox:"0 0 16 28",html:'<path d="M16 17q0 0.406-0.297 0.703l-7 7q-0.297 0.297-0.703 0.297t-0.703-0.297l-7-7q-0.297-0.297-0.297-0.703t0.297-0.703 0.703-0.297h14q0.406 0 0.703 0.297t0.297 0.703z"></path>'},"sort-asc":{viewbox:"0 0 16 28",html:'<path d="M16 11q0 0.406-0.297 0.703t-0.703 0.297h-14q-0.406 0-0.703-0.297t-0.297-0.703 0.297-0.703l7-7q0.297-0.297 0.703-0.297t0.703 0.297l7 7q0.297 0.297 0.297 0.703z"></path>'},facebook:{viewbox:"0 0 16 28",html:'<path d="M14.984 0.187v4.125h-2.453q-1.344 0-1.813 0.562t-0.469 1.687v2.953h4.578l-0.609 4.625h-3.969v11.859h-4.781v-11.859h-3.984v-4.625h3.984v-3.406q0-2.906 1.625-4.508t4.328-1.602q2.297 0 3.563 0.187z"></path>'},x:{viewbox:"0 0 24 24",html:'<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path>'},linkedin:{viewbox:"0 0 28 28",html:'<path d="M5.453 9.766v15.484h-5.156v-15.484h5.156zM5.781 4.984q0.016 1.141-0.789 1.906t-2.117 0.766h-0.031q-1.281 0-2.063-0.766t-0.781-1.906q0-1.156 0.805-1.914t2.102-0.758 2.078 0.758 0.797 1.914zM24 16.375v8.875h-5.141v-8.281q0-1.641-0.633-2.57t-1.977-0.93q-0.984 0-1.648 0.539t-0.992 1.336q-0.172 0.469-0.172 1.266v8.641h-5.141q0.031-6.234 0.031-10.109t-0.016-4.625l-0.016-0.75h5.141v2.25h-0.031q0.313-0.5 0.641-0.875t0.883-0.812 1.359-0.68 1.789-0.242q2.672 0 4.297 1.773t1.625 5.195z"></path>'},pinterest:'<path d="M16 0c-8.837 0-16 7.163-16 16 0 6.778 4.217 12.568 10.169 14.899-0.14-1.266-0.266-3.208 0.055-4.59 0.291-1.249 1.876-7.953 1.876-7.953s-0.479-0.958-0.479-2.375c0-2.225 1.29-3.886 2.895-3.886 1.365 0 2.024 1.025 2.024 2.254 0 1.373-0.874 3.425-1.325 5.327-0.377 1.593 0.799 2.892 2.369 2.892 2.844 0 5.030-2.999 5.030-7.327 0-3.831-2.753-6.509-6.683-6.509-4.552 0-7.225 3.415-7.225 6.943 0 1.375 0.53 2.85 1.191 3.651 0.131 0.158 0.15 0.297 0.111 0.459-0.121 0.506-0.391 1.593-0.444 1.815-0.070 0.293-0.232 0.355-0.535 0.214-1.998-0.93-3.248-3.852-3.248-6.198 0-5.047 3.667-9.682 10.572-9.682 5.55 0 9.864 3.955 9.864 9.241 0 5.514-3.477 9.952-8.302 9.952-1.621 0-3.145-0.842-3.667-1.837 0 0-0.802 3.055-0.997 3.803-0.361 1.39-1.337 3.132-1.989 4.195 1.497 0.463 3.088 0.713 4.738 0.713 8.836-0 16-7.163 16-16s-7.163-16-16-16z"></path>',xing:{viewbox:"0 0 22 28",html:'<path d="M9.328 10.422q-0.156 0.281-4.016 7.125-0.422 0.719-1.016 0.719h-3.734q-0.328 0-0.484-0.266t0-0.562l3.953-7q0.016 0 0-0.016l-2.516-4.359q-0.187-0.344-0.016-0.578 0.141-0.234 0.5-0.234h3.734q0.625 0 1.031 0.703zM21.922 0.391q0.172 0.25 0 0.578l-8.25 14.594v0.016l5.25 9.609q0.172 0.313 0.016 0.578-0.156 0.234-0.5 0.234h-3.734q-0.656 0-1.031-0.703l-5.297-9.719q0.281-0.5 8.297-14.719 0.391-0.703 1-0.703h3.766q0.344 0 0.484 0.234z"></path>'},"yt-play":{viewbox:"0 0 28 28",html:'<path d="M20 14q0-0.578-0.469-0.844l-8-5q-0.484-0.313-1.016-0.031-0.516 0.281-0.516 0.875v10q0 0.594 0.516 0.875 0.25 0.125 0.484 0.125 0.313 0 0.531-0.156l8-5q0.469-0.266 0.469-0.844zM28 14q0 1.5-0.016 2.344t-0.133 2.133-0.352 2.305q-0.25 1.141-1.078 1.922t-1.937 0.906q-3.469 0.391-10.484 0.391t-10.484-0.391q-1.109-0.125-1.945-0.906t-1.086-1.922q-0.219-1.016-0.336-2.305t-0.133-2.133-0.016-2.344 0.016-2.344 0.133-2.133 0.352-2.305q0.25-1.141 1.078-1.922t1.937-0.906q3.469-0.391 10.484-0.391t10.484 0.391q1.109 0.125 1.945 0.906t1.086 1.922q0.219 1.016 0.336 2.305t0.133 2.133 0.016 2.344z"></path>'},"arrow-left":{viewbox:"0 0 12 22",html:'<path d="M14.653 43.496l9.92-9.919c.379-.379.379-.992 0-1.37l-9.92-9.92c-.613-.613-1.653-.178-1.653.685v19.839c0 .863 1.04 1.298 1.653.685z" transform="translate(-19573 -418) translate(19560 396) matrix(-1 0 0 1 37.857 0)"/>'},"arrow-right":{viewbox:"0 0 12 22",html:'<path d="M14.653 43.496l9.92-9.919c.379-.379.379-.992 0-1.37l-9.92-9.92c-.613-.613-1.653-.178-1.653.685v19.839c0 .863 1.04 1.298 1.653.685z" transform="translate(-20901 -418) matrix(-1 0 0 1 20926 396) matrix(-1 0 0 1 37.857 0)"/>'},"chevron-left-solid":{viewbox:"0 0 320 512",html:'<path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path>'},"chevron-right-solid":{viewbox:"0 0 320 512",html:'<path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522
1-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>'},dot:{viewbox:"0 0 24 24",html:'<path d="M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8Z"/>'},star:{viewbox:"0 0 576 512",html:'<path d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"></path>'}}};t.exports=o})(ThriveGlobal.$j)},22138(t){!function(e,o){function i(t){try{n.each(function(){const i=e(this);if(!i.data("typed"))return;const n=o.$window.height();t+n>=i.offset().top&&i.offset().top>t||"start"===i.attr("data-typefocus")?i.typed("start"):(i.attr("data-typefocus"),i.typed("pause"))})}catch(t){console.log(t)}}let n=e();t.exports=function(t){n=n.add(t.find(".tve_typefocus")),setTimeout(function(){try{n.each(function(){let t=[];const o=e(this);if(0===o.attr("data-typist").length)return;const i=parseInt(o.attr("data-speed")),n=o.attr("data-colors");t.push(o.text()),t=t.concat(o.attr("data-typist").split("|")),o.typed({strings:t,loop:!0,typeSpeed:125,backSpeed:50,highlightClass:1===parseInt(o.attr("data-highlight"))?"tve_selected_typist":"",highlightStyle:1===parseInt(o.attr("data-highlight"))&&n?"background-color:"+n:"",backDelay:i,contentType:"text",startDelay:800,showCursor:o.hasClass("tve_typefocus_cursor")})})}catch(t){console.log(t)}},1e3),o.add_scroll_callback(i)}}(ThriveGlobal.$j,TCB_Front)},66640(t){(e=>{class o{static isEditorPage(){return tve_frontend_options.is_editor_page}static isExternal(t){return o.getDomain(location.href)!==o.getDomain(t)}static getDomain(t){return t.replace("http://","").replace("https://","").split("/")[0]}static restAjax({type:t="POST",route:o="",data:i}){return e.ajax({headers:{"X-WP-Nonce":tve_frontend_options.nonce},url:o,type:t,data:i})}static handleContent(t,o=!0){e(window).trigger(o?"tcb_on_content_show":"tcb_on_content_hide"),e(window).trigger("tve_after_content_toggle",[t,o])}static jsonParse(t,e,o=null,i={}){if(null==o){let o;try{o=JSON.parse(t.attr(e)||JSON.stringify(i))}catch(e){console.warn("Could not get json data for element:",t),o=i}return o}return t.attr(e,JSON.stringify(o))}static toast(t,e,o){"string"!=typeof t&&(t=t.message||t.error||t.success),e||(e=!1),TCB_Front.notificationElement.toggle(t,e?"error":"success",o)}static windowWidth(){let t,e;try{e=window.parent&&window.parent.TVE&&window.parent.TVE.main,t=e&&window.parent.TVE.main.$frame.width()||TCB_Front.$window[0].innerWidth}catch(o){t=TCB_Front.$window[0].innerWidth,e=!1}let o=window.screen.width;return window.matchMedia("(orientation:landscape)").matches&&window.screen.height>o&&(o=window.screen.height),e||t>o+20&&t>window.outerWidth+20&&(t=o),t}static getBrowserScrollSize(){const t={border:"none",height:"200px",margin:"0",padding:"0",width:"200px"},o=e("<div>").css(e.extend({},t)),i=e("<div>").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},t)).append(o).appendTo("body").scrollLeft(1e3).scrollTop(1e3),n={height:i.offset().top-o.offset().top||0,width:i.offset().left-o.offset().left||0};return i.remove(),n}static hasAdminBar(){return e("#wpadminbar").length>0}static appendFormParamsToURL(t,i){return!Array.isArray(i)&&i.jquery&&(i=o.buildFormParams(i)),t+(t.split("?")[1]?"&":"?")+e.param(i)}static buildFormParams(t){let e=[];return t.find(".tve_lg_input_container input:not([name=user_consent]), .tve_lg_input_container textarea").not("input[type=hidden]").not("input[type=password]").each((t,o)=>{const i=ThriveGlobal.$j(o).serializeArray();if(i[0]){o.dataset.name&&(i[0].name=o.dataset.name.replace(/\s/g,"_")),TCB_Front.reservedTerms.includes(i[0].name.toLowerCase())&&(i[0].name="tve_"+i[0].name);const t=e.findIndex(t=>t.name===i[0].name);t>=0?e[t].value=e[t].value+", "+i[0].value:e=e.concat(i)}}),e}static appendRandomParamToURL(t){return t+(t.split("?")[1]?"&":"?")+"_="+Math.floor(1e3*Math.random())}static isEmail(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}static addHttp(t){return!(t=t.trim())||0===t.indexOf("#")||/^mailto/.test(t)||/^tel/.test(t)||/^(?:f|ht)tps?\:\/\//.test(t)||(t="https://"+t),t}static unserialize(t){const e="undefined"!=typeof window?window:globalThis,o=function(t){let e=t.length;for(let o=t.length-1;o>=0;o--){const i=t.charCodeAt(o);i>127&&i<=2047?e++:i>2047&&i<=65535&&(e+=2),i>=56320&&i<=57343&&o--}return e-1},i=function(t,o,i,n){throw new e[t](o,i,n)},n=function(t,e,o){const n=[];let s=2,r=t.slice(e,e+1);for(;r!==o;)s+e>t.length&&i("Error","Invalid"),n.push(r),r=t.slice(e+(s-1),e+s),s+=1;return[n.length,n.join("")]};return function t(e,s){let r,a,l,c,d,h,p,u,f,g,_,m,b,v,y,w,T,C=0,$=function(t){return t};const k=e.slice(s,s+1).toLowerCase();switch(s||(s=0),r=s+2,k){case"i":$=function(t){return parseInt(t,10)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"b":$=function(t){return 0!==parseInt(t,10)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"d":$=function(t){return parseFloat(t)},u=n(e,r,";"),C=u[0],p=u[1],r+=C+1;break;case"n":p=null;break;
1case"s":f=n(e,r,":"),C=f[0],g=f[1],r+=C+2,u=function(t,e,i){const n=[];let s,r;for(s=0;s<i;s++)r=t.slice(e+(s-1),e+s),n.push(r),i-=o(r);return[n.length,n.join("")]}(e,r+1,parseInt(g,10)),C=u[0],p=u[1],r+=C+2,C!==parseInt(g,10)&&C!==p.length&&i("SyntaxError","String length mismatch");break;case"a":for(p={},a=n(e,r,":"),C=a[0],l=a[1],r+=C+2,d=parseInt(l,10),c=!0,_=0;_<d;_++)b=t(e,r),v=b[1],m=b[2],r+=v,y=t(e,r),w=y[1],T=y[2],r+=w,m!==_&&(c=!1),p[m]=T;if(c){for(h=new Array(d),_=0;_<d;_++)h[_]=p[_];p=h}r+=1;break;default:i("SyntaxError","Unknown / Unhandled data type(s): "+k)}return[k,r-s,$(p)]}(t+"",0)[2]}static validateImageUrl(t){return!!t.match(/.*\.(gif|jpe?g|bmp|png)$/gim)}static getQueryStrings(){return window.location.search.replace("?","").split("&").reduce((t,e)=>{const o=e.split("=");return t[o[0]]=o[1],t},{})}static parseJwt(t){const[,e=""]=t.split("."),o=e.replace(/-/g,"+").replace(/_/g,"/");let i;try{i=JSON.parse(decodeURIComponent(window.atob(o).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(t){i={}}return i}static insertHeadScripts(t,e,o){const i=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,"function"==typeof o&&(n.onload=n.onreadystatechange=o),void 0!==e&&(n.id=e),n.src=t,i.insertBefore(n,i.firstChild)}static insertStylesheet(t,e){const o=document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.id=e,i.type="text/css",i.href=t,o.insertBefore(i,o.firstChild)}static hasResource(t,e){return null!==document.getElementById(t)||null!==document.querySelector(`[src="${e}"],[href="${e}"]`)}static getAttr(t){const o={};return e.each(t[0].attributes,function(t,e){o[e.name]=e.value}),o}}o.checkCustomHtmlPreview=function(){ThriveGlobal.$j(".thrv_custom_html_shortcode").each(function(){const t=ThriveGlobal.$j(this),e=t.find(".tve_shortcode_overlay");if(!o.isEditorPage||!o.isEditorPage())return void(e.length&&e.remove());e.length&&e.remove();const i=t.clone();i.find("script, style, .tve_shortcode_overlay, code.tve_js_placeholder, code.tve_css_placeholder").remove();const n=i.text().trim(),s=t.find("img").filter(function(){return 0===ThriveGlobal.$j(this).closest("code.tve_noscript").length}).length>0;n.length>0||s||t.append('<div class="tve_shortcode_overlay" data-tcb-preview-overlay="1"><span>No preview available.</span></div>')})},function(){if("undefined"==typeof window)return;const t=o.isEditorPage&&o.isEditorPage(),e=ThriveGlobal.$j(document);e.ready(function(){o.checkCustomHtmlPreview()}),t&&(e.on("tcb:template:loaded tcb:content:changed",function(){setTimeout(o.checkCustomHtmlPreview,50)}),ThriveGlobal.$j(window).on("load",function(){setTimeout(o.checkCustomHtmlPreview,100)}))}(),t.exports=o,window.TCB_Front.toast=o.toast,window.tve_is_email=o.isEmail,window.TCB_Front.checkCustomHtmlPreview=o.checkCustomHtmlPreview})(ThriveGlobal.$j)}};const e={};function o(i){const n=e[i];if(void 0!==n)return n.exports;const s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}if(!window.ThriveGlobal||!window.ThriveGlobal.$j){const t=window.$;window.ThriveGlobal={$j:jQuery.noConflict()},t&&(window.$=t)}window.TCB_Front=window.TCB_Front||{},TCB_Front.Hooks=o(89322)(ThriveGlobal.$j),window.addEventListener("load",function(){tve_frontend_options.is_editor_page||(TCB_Front.sticky.initSticky(TCB_Front.$body,!!tve_frontend_options.is_editor_page),TCB_Front.add_scroll_callback(TCB_Front.showDataElements,TCB_Front))}),void 0===TCB_Front.js_modules&&(TCB_Front.js_modules={}),ThriveGlobal.$j.extend(window.TCB_Front,{browser:null,detectBrowser(){const t={},e=function(){let t,e,o=-1;return"Microsoft Internet Explorer"===navigator.appName?(t=navigator.userAgent,e=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"),null!==e.exec(t)&&(o=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(t=navigator.userAgent,e=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})"),null!==e.exec(t)&&(o=parseFloat(RegExp.$1))),o}();if(e>0)t.msie=!0;else{const e=navigator.userAgent.toLowerCase(),o=/(edge)[ \/]([\w.]+)/.exec(e)||/(edg)[ \/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],i={browser:o[1]||"",version:o[2]||"0"};"edg"===i.browser&&(i.browser="edge"),o[1]&&(t[i.browser]=!0),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0)}return t.msie&&(t.version=e),t.ios=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,t.version||(t.version=this.getBrowserVersion(t)),t},getBrowserVersion(t={}){const e=navigator.userAgent;let o="";return o=t.chrome?/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i:t.mozilla?/(?:firefox|fxios)\/(\d+(\.?_?\d+)+)/i:/version\/(\d+(\.?_?\d+)+)/i,(t=>{const o=e.match(t);return o&&o.length>0&&o[1]||""})(o)},getCookie(t){const e=`${t}=`,o=document.cookie.split(";");for(let t=0;t<o.length;t++){let i=o[t];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null},setCookie(t,e,o){if("number"==typeof o.expires){const t=o.expires,e=o.expires=new Date;e.setTime(+e+864e5*t)}return document.cookie=[encodeURIComponent(t),"=",encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")},isInViewport(t,e=0,o=!1){(t instanceof ThriveGlobal.$j||t.jquery)&&(t=t[0]);const i=t.getBoundingClientRect();let n=!(i.bottom<0||i.top>window.innerHeight-e);return o&&n&&(n=t.offsetLeft>0&&t.offsetLeft+i.width<window.innerHeight),n},isBottomScroll(t){const e=t+window.innerHeight,o=ThriveGlobal.$j(document).height();return window.innerHeight>0&&o-e<=100},inlineCssVariable(t,e,o,i=""){t=t.jquery?t[0]:t;const n=window.getComputedStyle(t,i);if(Array.isArray(e)){const t={};
1return e.forEach(e=>t[e]=n.getPropertyValue(e)),t}if("string"==typeof e)return void 0!==o?void t.style.setProperty(e,o,i):n.getPropertyValue(e);ThriveGlobal.$j.isPlainObject(e)&&Object.keys(e).forEach(o=>t.style.setProperty(o,e[o],i))},bodyOffsetTop(){const t=TCB_Front.$body.find("#mm-preview-settings-bar");let e=TCB_Front.$body.length?TCB_Front.$body.offset().top:0;return t.length&&(e+=t.height()),e||0},handleIframes(t=TCB_Front.$body,e=!0){const o=e?"src":"data-src",i=e?"data-src":"src",n=e?"remove":"add",s=["iframe"+(e&&!tve_frontend_options.allow_video_src?":visible":""),`.tcb-lazy-load[data-type="external"]${e?":visible":""} source`];t.find(s.join(", ")).not(".thrv_social_default iframe").each(function(){if(!e&&this.classList.contains("tcb-dr-done"))return;if(TCB_Front.Hooks.applyFilters("tcb.is_iframe_load_prevented",!1,this,e))return;const t=this.getAttribute(i);t&&"null"!==t&&(this.setAttribute(o,t),e&&"SOURCE"===this.tagName&&ThriveGlobal.$j(this).closest("video")[0].load()),this.removeAttribute(i),this.classList[n]("tcb-dr-done")}),t.find(".thrv_wrapper.thrv-google-map-embedded-code > iframe:not(:visible)").each(function(){const t=ThriveGlobal.$j(this).attr("src");t&&!t.includes("google.com/maps")&&ThriveGlobal.$j(this).attr("src","")})},getMediaAttr(t,e,o=this.getDisplayType()){const i=[o];let n=t.attr(e+o.charAt(0));switch(o){case"tablet":i.push("desktop");break;case"mobile":i.push("tablet"),i.push("desktop")}for(;(void 0===n||!n.length)&&i.length;)n=t.attr(`${e}-${i.shift().charAt(0)}`);return void 0===n&&(n=t.attr(e)),n},getDisplayType(){let t="desktop";if(tve_frontend_options.is_editor_page)TVE&&TVE.main&&TVE.main.device?t=TVE.main.device:TCB_Front.$body.is(".preview-tablet")?t="tablet":TCB_Front.$body.is(".preview-mobile")&&(t="mobile");else{const e=this.Utils.windowWidth();e<=767?t="mobile":e<=1023&&(t="tablet")}return t},isValidUrl:t=>/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t),pageSectionHeight(){const t=TCB_Front.$window;ThriveGlobal.$j(".pdfbg.pdwbg").css({"box-sizing":"border-box",height:t.height()+"px"}),ThriveGlobal.$j(".pddbg").css("max-width",t.width()+"px"),ThriveGlobal.$j(".pddbg.pdfbg").each(function(){const t=ThriveGlobal.$j(this).css("height",""),e=t.attr("data-height"),o=t.attr("data-width");if(void 0!==e&&void 0!==o){const i=t.parent().width(),n=i*e/o;i<=o?t.css("min-height",n+"px"):t.css({"min-height":e+"px"})}})},openLightbox:o(91806),event_triggers(t){!tve_frontend_options.is_editor_page&&window.TVE_Event_Manager_Registered_Callbacks&&t.find(".tve_evt_manager_listen").each(function(){const t=ThriveGlobal.$j(this);let e=t.attr("data-tcb-events");if(e||(e=t.closest(".thrv_wrapper").attr("data-tcb-events")),e)try{e=JSON.parse(e.replace("__TCB_EVENT_","").replace("_TNEVE_BCT__","")),ThriveGlobal.$j.each(e,function(e,o){if(TVE_Event_Manager_Registered_Callbacks[o.a]){const e="mouseover"===o.t?"mouseenter":o.t;t.off(e+".tcbevt"+o.t).on(e+".tcbevt"+o.t,function(){return TVE_Event_Manager_Registered_Callbacks[o.a].call(t[0],o.t,o.a,o.config||o.c||{})})}})}catch(t){console.warn(t,"Could not parse events!")}})},showDataElements(t){ThriveGlobal.$j(".thrv_data_element").not(".thrv_data_element_start").each(function(){const e=ThriveGlobal.$j(this),o=TCB_Front.$window.height();t+o>=e.offset().top+e.outerHeight()&&"hidden"!==e.css("visibility")&&e.addClass("thrv_data_element_start").trigger("tve.start-animation")})},onDOMReady(t){if(this.$body=ThriveGlobal.$j("body"),this.isRTL="rtl"===ThriveGlobal.$j("html").attr("dir"),this.body_offset=this.$body.offset(),void 0===t&&(t=this.$body),this.notificationElement=new this.notification,TCB_Front.$window.on("tve_after_content_toggle",(t,e,o=!0)=>{setTimeout(()=>{TCB_Front.handleIframes(e,o)},100)}),TCB_Front.$window.trigger("tve_after_content_toggle",[t]),this.icons.migrate(t),this.$body.addClass(`tve-${this.getDisplayType()}-browser`),Object.keys(TCB_Front.browser).length&&Object.keys(TCB_Front.browser).forEach(t=>{-1===t.indexOf("webkit")&&TCB_Front.browser[t]&&this.$body.addClass(`tve-${t}-browser`)}),this.smartComplete.init(t),tve_frontend_options.is_editor_page&&ThriveGlobal.$j("head").append('<div id="tve-clipboard-container" style="display:none !important;"></div>'),tve_frontend_options.is_editor_page||(this.add_scroll_callback(this.showDataElements,this),this.header(t),this.sticky.initSticky(t,!!tve_frontend_options.is_editor_page)),this.fix_compat_issues(t),this.replaceDynamicContent(),tve_frontend_options.is_editor_page||("undefined"!=typeof ResizeObserver?new ResizeObserver(()=>{this.$body.trigger("tcb.body.resize"),TCB_Front.resizePageSection()}).observe(document.body):TCB_Front.addResizeCallback(TCB_Front.resizePageSection)),tve_frontend_options.is_editor_page)try{ThriveGlobal.$j("html").getNiceScroll().remove()}catch(t){}else{if(void 0===window.tcb_autofill){window.tcb_autofill=TCB_Front.getCookie("account_create_fields");try{window.tcb_autofill&&(window.tcb_autofill=decodeURIComponent(window.tcb_autofill),window.tcb_autofill=JSON.parse(window.tcb_autofill))}catch(t){window.tcb_autofill=null}window.tcb_autofill||(window.tcb_autofill=null)}window.tcb_autofill&&ThriveGlobal.$j.isArray(window.tcb_autofill)&&(ThriveGlobal.$j.each(window.tcb_autofill,function(e,o){-1===o.name.indexOf("[]")&&t.find("input[name="+o.name+"]").each(function(){const t=ThriveGlobal.$j(this);t.data("tcb-autofill")||(t.val(o.value).hide(),t.parent().append('<div class="tve-editable-field"><p>'+o.value+'</p><span class="tve_sc_icon icon-lock tve-edit-field"></span></div>'),t.data("tcb-autofill",1))})}),setTimeout(function(){TCB_Front.setCookie("account_create_fields",null,{path:"/"})},2500)),ThriveGlobal.$j("input[type=password], input[name=confirm_password]").on("keyup",function(){const t=ThriveGlobal.$j(this),o=this.value.trim(),i=t.siblings(".tve-password-strength-wrapper");let n,s="#e3ecef",r="";if(i.find(".tve-password-strength").css({"background-color":"#e3ecef"}),!o)return void i.find(".tve-password-strength").css("background-color","");const a=e(o);a<30?(s="#ef5350",r="Weak",n=i.find(".tve-password-strength:lt(1)")):a>=30&&a<60?(s="#ffa726",r="So-so",n=i.find(".tve-password-strength:lt(2)")):a>=60&&a<80?(s="#8bc34a",r="Good",n=i.find(".tve-password-strength:lt(3)")):(s="#4caf50",r="Great!",n=i.find(".tve-password-strength:lt(4)")),n.each(function(){ThriveGlobal.$j(this).css({"background-color":s})}),i.attr("data-score",a).find(".tve-password-strength-text").text(r).css({color:s})});const e=function(t){let e=0;if(!t||t.length<5||/(passwd|mypass|password|wordpress)/g.test(t))return e;e=5*String.prototype.concat(...new Set(t)).length,/[a-z]/.test(t)&&(e+=10),/[A-Z]/.test(t)&&(e+=10);const o=t.match(/\d/g);o&&(e+=2*o.length);const i=t.match(/\W/g);return i&&(e+=10*i.length),parseInt(e)};TCB_Front.$document.on("click",".tve-edit-field",function(){ThriveGlobal.$j(this).parent().hide().prev().show()}),TCB_Front.$document.on("click",".tve-close-error-message",function(){ThriveGlobal.$j(this).parent().hide().prev().show()}),TCB_Front.$document.on("click",".tve-image-overlay",function(){const t=ThriveGlobal.$j(this).parent();t.is("a")||t.find("img").trigger("click")}),TCB_Front.$document.on("mouseenter mouseout",".tve-image-overlay",function(t){ThriveGlobal.$j(this).parent().find("img").trigger(t.type)}
1),TCB_Front.queryString.get("tcb_lightbox")||TCB_Front.$window.trigger("tve_after_content_toggle",[ThriveGlobal.$j(".tve_p_lb_content"),!1]),this.init_typefocus(t)}if(TCB_Front.remove_empty_symbols(t),TCB_Front.footer_styling(t),!tve_frontend_options.is_editor_page){const t=ThriveGlobal.$j(".tve-fb-comments");t.length&&(ThriveGlobal.$j("#fb-root").length&&ThriveGlobal.$j("head").append('<div id="fb-root"></div>'),t.each(function(){const t=this.parentNode;""===this.getAttribute("data-href")&&(this.setAttribute("data-href",window.location.href.split("?")[0]),this.setAttribute("data-width","100%")),this.classList.add("fb-comments"),setTimeout(()=>{FB.XFBML.parse(t)},200)}));const e=ThriveGlobal.$j(".thrv_disqus_comments #disqus_thread");e.length&&(window.disqus_shortname=e.attr("data-disqus_shortname"),""===e.attr("data-disqus_url")?window.disqus_url=window.location:window.disqus_url=e.attr("data-disqus_url"),window.disqus_identifier=window.disqus_url,"undefined"==typeof DISQUS&&ThriveGlobal.$j.getScript("//"+disqus_shortname+".disqus.com/embed.js"))}window.mejs&&ThriveGlobal.$j(".tcb-video-shortcode").not(".mejs-container").filter(function(){return!ThriveGlobal.$j(this).parent().hasClass(".mejs-mediaelement")}).mediaelementplayer(),this.resizePageSection(),setTimeout(()=>{try{window.dispatchEvent(new CustomEvent("resize",{detail:{fromTcb:!0}}))}catch(t){}}),this.init_scroll(),this.initResize(),this.enableHighlightViewportAnimations(t),TCB_Front.add_scroll_callback(e=>{e>0&&this.enableHighlightViewportAnimations(t)}),this.handleAds(),setTimeout(this.handleAds,5e3),ThriveGlobal.$j(window).trigger("tcb_after_dom_ready")},handleAds(){TCB_Front.$body.find('ins[data-adsbygoogle-status="done"]').each((t,e)=>{ThriveGlobal.$j(e).parentsUntil("body").each((t,e)=>{e.style.setProperty("height",""),e.style.setProperty("min-height","")})})},enableHighlightViewportAnimations(t){t.find('[data-tcb-highlight-animation^="viewport"]').each((t,e)=>{const o=ThriveGlobal.$j(e),i=o.data("tcb-highlight-animation"),n=e.classList.contains("tcb-animated");TCB_Front.isInViewport(e)?(n||tve_frontend_options.is_editor_page||this.refreshCachedSvg(o),o.addClass("tcb-animated")):n&&"viewport_repeat"===i&&e.classList.remove("tcb-animated")})},refreshCachedSvg(t){let e=t.css("--tve-highlight-background");void 0!==e&&e.length&&(e=decodeURIComponent(e.replace('url("data:image/svg+xml,',"").replace('")',"")),e=e.replace("</svg>",`<span id="tcb-${Math.random()}"></span></svg>`),t.css("--tve-highlight-background",`url("data:image/svg+xml,${encodeURIComponent(e)}")`))},replaceDynamicContent(){const t=TCB_Front.detectBrowser();ThriveGlobal.$j(".tve-browser-data").text(Object.keys(t).filter(e=>t[e]&&"webkit"!==e).toString())},resizePageSection(t){void 0===t&&(t=ThriveGlobal.$j(".tcb-window-width"));const e=!!TCB_Front.$body.length&&TCB_Front.inlineCssVariable(TCB_Front.$body,"--off-screen-sidebar-size");let o=tve_frontend_options.is_editor_page?TCB_Front.$body.outerWidth():TCB_Front.$window.width(),i=0;e&&("left"===TCB_Front.$body.attr("data-off-screen-side")?(i=parseInt(TCB_Front.$body.css("padding-left")),o-=i):o-=parseInt(TCB_Front.$body.css("padding-right"))),o+="px",t.each((t,e)=>{const n=ThriveGlobal.$j(e);let s=n.css("left");s="auto"===s?0:Number(n.css("left").replace("px","")),s=s+i-n.offset().left,n.css({width:o,left:s+"px"})})},remove_empty_symbols(t){t.find("div.thrv_symbol").each(function(){const t=jQuery(this);if(t.closest(".tve-symbol-container").length)return;const e=t.clone();e.find(".thrive-shortcode-config").remove(),""===e.html()&&t.remove()})},footer_styling:o(18684),init_scroll:o(49110),initResize:o(41523),sticky:o(98079),fix_compat_issues:o(41954),reservedTerms:o(68382),init_typefocus:o(22138),header:o(43569),queryString:o(69810),smartComplete:o(5540),icons:o(73771),notification:o(15039)}),"undefined"!=typeof ThriveGlobal&&(TCB_Front.$window=ThriveGlobal.$j(window),TCB_Front.$document=ThriveGlobal.$j(document),TCB_Front.$body=ThriveGlobal.$j("body"),TCB_Front.browser=TCB_Front.detectBrowser(),TCB_Front.$document.ready(function(){setTimeout(function t(){if(void 0!==Object.values(TCB_Front.js_modules).find(t=>!t.loaded))return console.log("Thrive Architect - not all JS modules are loaded, re-trying in 20ms..."),void setTimeout(t,20);let e=ThriveGlobal.$j(tve_frontend_options.is_editor_page?"#tve_editor":"body");"undefined"!=typeof TVE&&"function"==typeof TVE.apply_filters&&(e=TVE.apply_filters("editor_wrapper",e)),TCB_Front.$
1window.trigger("tve_after_content_toggle",[e]),tve_frontend_options.is_editor_page||"undefined"!=typeof TVE_Event_Manager_Registered_Callbacks&&(TCB_Front.event_triggers(e),tve_frontend_options.page_events&&ThriveGlobal.$j.each(tve_frontend_options.page_events,function(t,e){TVE_Event_Manager_Registered_Callbacks[e.a]&&TCB_Front.$document.on("tve-page-event-"+e.t,function(t,o){let i=!0;return"timer"===e.t&&o&&e.config&&e.config.t_delay!==o&&(i=!1),!!i&&TVE_Event_Manager_Registered_Callbacks[e.a].call(document,e.t,e.a,e.config?e.config:{})})})),"undefined"==typeof ThriveApp&&(TCB_Front.pageSectionHeight(),TCB_Front.addResizeCallback(TCB_Front.pageSectionHeight)),TCB_Front.onDOMReady()})})),TCB_Front.isModuleLoaded=t=>TCB_Front.js_modules[t]&&TCB_Front.js_modules[t].loaded,TCB_Front.setModuleLoadedStatus=(t,e)=>{void 0===TCB_Front.js_modules[t]&&(TCB_Front.js_modules[t]={}),TCB_Front.js_modules[t].loaded=e},TCB_Front.Utils=o(66640),TCB_Front.Base64=o(46967),o(64743),o(11481),o(74468)})(); 2;var html5GalleryObjects=new function(){this.objects=[];this.addObject=function(obj){this.objects.push(obj)};this.loadNext=function(id){this.objects[id].onVideoEnd();if(!this.objects[id].isPaused)this.objects[id].slideRun(-1)};this.setHd=function(id,isHd,switching){this.objects[id].setHd(isHd,switching)};this.gotoSlide=function(slideId,galleryId){if(typeof galleryId==="undefined")galleryId=0;if(this.objects[galleryId])this.objects[galleryId].slideRun(slideId)}};if(typeof ASYouTubeIframeAPIReady==="undefined"){var ASYouTubeIframeAPIReady=false;var ASYouTubeTimeout=0;function onYouTubeIframeAPIReady(){ASYouTubeIframeAPIReady=true}}var ASVimeoTimeout=0;function loadHtml5Gallery(jsFolder){(function($){var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1)return n1*x*x;else if(x<2/d1)return n1*(x-=1.5/d1)*x+0.75;else if(x<2.5/d1)return n1*(x-=2.25/d1)*x+0.9375;else return n1*(x-=2.625/d1)*x+0.984375}$.extend($.easing,{def:"easeOutQuad",easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<0.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<0.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<0.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<0.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1- 3cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<0.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<0.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-0.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<0.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<0.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<0.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})})(jQuery);(function($){$.fn.touchSwipe=function(options){var defaults={preventWebBrowser:false,instance:null,preventWebBrowserCallback:null,swipeLeft:null,swipeRight:null,swipeTop:null,
3swipeBottom: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){var prevent=defaults.preventWebBrowser;var e=event.originalEvent;if(e.targetTouches.length>=1){curX=e.targetTouches[0].pageX;curY=e.targetTouches[0].pageY;if(defaults.instance&&defaults.preventWebBrowserCallback)prevent=defaults.instance[defaults.preventWebBrowserCallback](curY<startY)}else touchCancel(event);if(prevent)event.preventDefault()}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)>100)if(curX>startX){if(defaults.swipeRight)defaults.swipeRight.call()}else if(defaults.swipeLeft)defaults.swipeLeft.call();if(Math.abs(curY-startY)>100)if(curY>startY){if(defaults.swipeBottom)defaults.swipeBottom.call()}else if(defaults.swipeTop)defaults.swipeTop.call()} 4try{$(this).on("touchstart",touchStart);$(this).on("touchmove",touchMove);$(this).on("touchend",touchEnd);$(this).on("touchcancel",touchCancel)}catch(e){}})}})(jQuery);(function($){$.fn.html5boxTransition=function(id,$prev,$next,transition,callback){$parent=this;var effects=transition.effect;var easing=transition.easing;var duration=transition.duration;var direction=transition.direction;var effect=null;if(effects){effects=effects.split(",");effect=effects[Math.floor(Math.random()*effects.length)];effect=$.trim(effect.toLowerCase())}if(effect&&transition[effect]){if("duration"in transition[effect])duration=transition[effect].duration;if(transition[effect].easing)easing=transition[effect].easing}if(effect=="fade"||effect=="fadein"){$next.hide();$prev.insertBefore($next);$next.fadeIn(duration,easing,function(){$prev.remove();callback()})}else if(effect=="fadeout"){$next.show();$prev.fadeOut(duration,easing,function(){$prev.remove();callback()})}else if(effect=="fadeinout"){$next.hide();$prev.insertBefore($next);$prev.fadeOut(duration,easing);$next.fadeIn(duration,easing,function(){$prev.remove();callback()})}else if(effect=="crossfade"){$next.hide();$prev.fadeOut(duration/2,easing,function(){$next.fadeIn(duration/2,easing,function(){$prev.remove();callback()})})}else if(effect=="slide"){$parent.css({overflow:"hidden"});if(direction){$next.css({left:"100%"});$next.animate({left:"0%"},duration,easing);$prev.animate({left:"-100%"},duration,easing,function(){$prev.remove();callback()})}else{$next.css({left:"-100%"});$next.animate({left:"0%"},duration,easing);$prev.animate({left:"100%"},duration,easing,function(){$prev.remove();callback()})}}else{$next.show();$prev.remove();callback()}}})(jQuery);(function($){$.fn.addHTML5VideoControls=function(skinFolder,parentInst,videoElem,hideControls,hidePlayButton,defaultVolume,fullscreenNativeControls,html5VideoNoDownload,skinImages,showsubtitle,vttline,showsubtitlebydefault){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&&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(){if(parentInst.options.stopallplaying)parentInst.stopAllPlaying();$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='html5boxCaption'></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(){if(parentInst.options.stopallplaying)parentInst.stopAllPlaying();$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);
4if(!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()})}if(showsubtitle){var $videoCaption=$(".html5boxCaption",$videoControls);$videoCaption.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_caption.png"+"')","background-position":showsubtitlebydefault?"right center":"left center"}).data("showcaption",showsubtitlebydefault).on(eClick,function(){var showcaption=!$videoCaption.data("showcaption");$videoCaption.data("showcaption",showcaption).css({"background-position":(showcaption?"right":"left")+" center"});if($videoObj.get(0).textTracks)for(var i=0;i<$videoObj.get(0).textTracks.length;i++)$videoObj.get(0).textTracks[i].mode=showcaption?"showing":"hidden"})}$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});if(volume>0)$videoObj.get(0).muted=false;$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")});if(vol>0)$videoObj.get(0).muted=false;$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")});if(vol>0)$videoObj.get(0).muted=false;$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 setVttline=function(vttline){if($videoObj.get(0).textTracks){for(var i=0;i<$videoObj.get(0).textTracks.length;i++){$videoObj.get(0).textTracks[i].mode="hidden";if($videoObj.get(0).textTracks[i].activeCues)for(var j=0;j<$videoObj.get(0).textTracks[i].activeCues.length;j++)$videoObj.get(0).textTracks[i].activeCues[j].line=vttline;if($videoObj.get(0).textTracks[i].cues)for(var j=0;j<$videoObj.get(0).textTracks[i].cues.length;j++)$videoObj.get(0).textTracks[i].cues[j].line=vttline}var showcaption=$(".html5boxCaption",$videoControls).data("showcaption");for(var i=0;i<$videoObj.get(0).textTracks.length;i++)$videoObj.get(0).textTracks[i].mode=showcaption?"showing":"hidden"}};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");
4if(!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("canplay",function(){if(showsubtitle)setVttline(vttline)});$videoObj.on("play",onVideoPlay);$videoObj.on("pause",onVideoPause);$videoObj.on("ended",onVideoEnded);$videoObj.on("timeupdate",onVideoUpdate);$videoObj.on("progress",onVideoProgress)}catch(e){}};$.fn.extraHTML5VideoControls=function(videoOptions){var $videoObj=$(this);var enableclick=videoOptions.enableclick;var enablespacekey=videoOptions.enablespacekey;var toggleVideoPlayPause=function(){if($videoObj.get(0))if($videoObj.get(0).paused)$videoObj.get(0).play().then(null,function(){});else $videoObj.get(0).pause()};if(enableclick)$videoObj.click(function(){toggleVideoPlayPause()});if(enablespacekey)$(document).keyup(function(e){if(e.keyCode==32)setTimeout(function(){toggleVideoPlayPause()},10)})}})(jQuery);(function($){var ELEM_ID=0,ELEM_THUMBNAIL=1,ELEM_SRC=2,ELEM_SRC_OGG=3,ELEM_SRC_WEBM=4,ELEM_LINK=5,ELEM_LINKTARGET=6,ELEM_TITLE=7,ELEM_INFORMATION=8,ELEM_TYPE=9,ELEM_WIDTH=10,ELEM_HEIGHT=11,ELEM_POSTER=12,ELEM_HD=13,ELEM_HD_OGG=14,ELEM_HD_WEBM=15,ELEM_DURATION=16,ELEM_LIGHTBOXWIDTH=17,ELEM_LIGHTBOXHEIGHT=18,ELEM_YOUTUBEAPIKEY=19,ELEM_YOUTUBEPLAYLISTID=20,ELEM_YOUTUBEPLAYLISTMAXRESULTS=21,ELEM_LIGHTBOX=22,ELEM_POSTERWIDTH=23,ELEM_POSTERHEIGHT=24,ELEM_ALT=25;ELEM_VTT=26;ELEM_VTTLANG=27;ELEM_VTTLABEL=28;ELEM_CATEGORY=29;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,TYPE_EMBED_VIDEO=11,TYPE_IFRAME=12,TYPE_YOUTUBE_PLAYLIST=13;var html5GalleryId=0;$.fn.wonderplugingallery=function(options){var Html5Gallery=function(container,options,id){this.container=container;this.options=options;this.id=id;$(window).trigger("html5gallery.begin",[this.id]);this.options.flashInstalled=false;this.options.html5VideoSupported=!!document.createElement("video").canPlayType;this.options.isChrome=navigator.userAgent.match(/Chrome/i)!=null;this.options.isFirefox=navigator.userAgent.match(/Firefox/i)!=null;this.options.isOpera=navigator.userAgent.match(/Opera/i)!=null||navigator.userAgent.match(/OPR\//i)!=null;this.options.isSafari=navigator.userAgent.match(/Safari/i)!=null;this.options.isIE11=navigator.userAgent.match(/Trident\/7/)!=null&&navigator.userAgent.match(/rv:11/)!=null;this.options.isIE=navigator.userAgent.match(/MSIE/i)!=null&&!this.options.isOpera;this.options.isIE10=navigator.userAgent.match(/MSIE 10/i)!=null&&!this.options.isOpera;this.options.isIE9=navigator.userAgent.match(/MSIE 9/i)!=null&&!this.options.isOpera;this.options.isIE8=navigator.userAgent.match(/MSIE 8/i)!=null&&!this.options.isOpera;this.options.isIE7=navigator.userAgent.match(/MSIE 7/i)!=null&&!this.options.isOpera;this.options.isIE6=navigator.userAgent.match(/MSIE 6/i)!=null&&!this.options.isOpera;this.options.isIE678=this.options.isIE6||this.options.isIE7||this.options.isIE8;this.options.isIE6789=this.options.isIE6||this.options.isIE7||this.options.isIE8||this.options.isIE9;this.options.isAndroid=navigator.userAgent.match(/Android/i)!=null;this.options.isIPad=navigator.userAgent.match(/iPad/i)!=null;this.options.isIPhone=navigator.userAgent.match(/iPod/i)!=null||navigator.userAgent.match(/iPhone/i)!=null;this.options.isIOS=this.options.isIPad||this.options.isIPhone;this.options.isMobile=this.options.isAndroid||this.options.isIPad||this.options.isIPhone;this.options.isIOSLess5=this.options.isIPad&&this.options.isIPhone&&(navigator.userAgent.match(/OS 4/i)!=null||navigator.userAgent.match(/OS 3/i)!=null);this.options.supportCSSPositionFixed=!this.options.isIE6&&!this.options.isIOSLess5;this.isTouch="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0||this.options.forcetouch;this.eStart=this.isTouch?"touchstart":"mousedown";this.eMove=this.isTouch?"touchmove":"mousemove";this.eCancel=this.isTouch?"touchcancel":"mouseup";this.eClick="click";var v=document.createElement("video");this.options.canplaymp4=v&&v.canPlayType&&v.canPlayType("video/mp4").replace(/no/,"");this.slideshowTimeout=null;this.looptimes=0;this.updateCarouselTimeout=null;this.disableupdatecarousel=false;this.hideTitleTimeout=null;this.hideToolboxTimeout=null;this.isHd=this.options.hddefault;this.isHTML5=false;this.elemArray=[];$(".html5gallery-loading").hide();this.container.children().hide();this.container.css({"display":"block","position":"relative"});if(this.options.googlefonts&&this.options.googlefonts.length>0){var fontRef="https://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)}this.initData(this.processElemArray)};Html5Gallery.prototype={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},initCategory:function(){this.selectedcategory=this.options.categorydefault;if(!this.options.categorylist||this.options.categorylist.length<2)this.options.showcategory=false},init:function(instance){if(instance.options.random)for(var i=instance.elemArray.length-1;i>0;i--){var index=Math.floor(Math.random()*i);var t=instance.elemArray[i];instance.elemArray[i]=instance.elemArray[index];instance.elemArray[index]=t}if(instance.options.reverse)instance.elemArray.reverse();instance.initYoutubeApi();instance.options.showcarousel=(instance.elemArray.length>1||instance.options.showcarouselforsingle)&&instance.options.showcarousel;instance.options.watermarkcode="";if(instance.options.frve)instance.options.watermarkcode="<a style='text-decoration:none;' target='_blank' href='"+instance.options.freelink+"' >";else if(instance.options.watermarklink.length>0)instance.options.watermarkcode="<a style='text-decoration:none;' target='_blank' href='"+instance.options.watermarklink+"' >";var freeCss;if(instance.options.frve)freeCss="display:block !important;visibility:visible !important;position:absolute !important;top:10px !important;left:10px !important;width:180px;height:18px;line-height:18px;text-align:center;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;";else if(instance.options.watermark.length>0)freeCss="display:block;position:absolute;top:0px;left:0px;";else freeCss="display:none;";instance.options.watermarkcode+="<div "+(instance.options.frve?"":"class='html5gallery-watermark-"+instance.id+"' ")+"style='"+freeCss+"' >";if(instance.options.frve)instance.options.watermarkcode+=instance.options.frvem;else if(instance.options.watermark.length>0)instance.options.watermarkcode+="<img src='"+instance.options.watermark+"' alt='' />";instance.options.watermarkcode+="</div>";if(instance.options.frve||instance.options.watermarklink.length>0)instance.options.watermarkcode+="</a>";instance.createMarkup();instance.createImageToolbox();if(instance.elemArray.length<=0)return;instance.initCategory();instance.createSliderTimeout();instance.createEvents();
4instance.loadCarousel();instance.createStyle();instance.savedElem=-1;instance.curElem=-1;instance.nextElem=-1;instance.prevElem=-1;instance.firstrun=true;instance.isPaused=!instance.options.autoslide;instance.isFullscreen=false;instance.isVideoPlaying=false;instance.showingPoster=false;instance.disableTouchSwipe=false;instance.createSocial(false);var params=instance.getParams();var firstid=instance.options.firstitemid;if("html5galleryid"in params&¶ms.html5galleryid in instance.elemArray)firstid=params["html5galleryid"];if("galleryshareid"in params&¶ms.galleryshareid in instance.elemArray)firstid=params["galleryshareid"];if("html5gallerybackid"in params&¶ms.html5gallerybackid in instance.elemArray)firstid=instance.elemArray.length-1-parseInt(params["html5gallerybackid"]);instance.slideRun(firstid);instance.firstrun=false;if(instance.options.responsive){instance.resizeGallery();$(window).resize(function(){setTimeout(function(){instance.resizeGallery()},instance.options.resizedelay)});if(instance.options.isMobile&&!instance.options.mobileresizeevent)$(window).on("orientationchange",function(){setTimeout(function(){instance.resizeGallery()},instance.options.resizedelay)})}$(window).trigger("html5gallery.inited",[instance.id,instance.curElem]);instance.initSearch()},initSearch:function(){var instance=this;$(".wondergallery-search").on("keyup",function(e){var searchText=String($.trim($(this).val())).toLowerCase();var galleryId=$(this).data("galleryid");if(!galleryId||galleryId==instance.id)instance.searchGallery(searchText)})},searchGallery:function(searchText){var instance=this;if(searchText&&searchText.length>0)for(var i=0;i<instance.elemArray.length;i++){var match=instance.elemArray[i][ELEM_ALT]&&instance.elemArray[i][ELEM_ALT].toLowerCase().indexOf(searchText)>=0||instance.elemArray[i][ELEM_TITLE]&&instance.elemArray[i][ELEM_TITLE].toLowerCase().indexOf(searchText)>=0||instance.elemArray[i][ELEM_INFORMATION]&&instance.elemArray[i][ELEM_INFORMATION].toLowerCase().indexOf(searchText)>=0;$("#html5gallery-tn-"+instance.id+"-"+i).css({display:match?"block":"none"})}else $(".html5gallery-tn-"+instance.id).css({display:"block"})},resizeGallery:function(){switch(this.options.skin){case"vertical":case"verticallight":case"verticalwithleft":case"verticallightwithleft":case"showcase":this.resizeStyleVertical();break;case"light":case"horizontal":case"darkness":case"gallery":default:this.resizeStyleDefault()}this.resizeImageToolbox()},absoluteUrl:function(href){var link=document.createElement("a");link.href=href;return link.protocol+"//"+link.host+link.pathname+link.search+link.hash},createSocial:function(isfullscreen){if(this.options.initsocial)$("head").append('<link rel="stylesheet" href="'+this.options.jsfolder+'icons/css/mhfontello.css" type="text/css" />');if(!this.options.showsocial)return;var instance=this;var styleCss=".html5gallery-rotate { border-radius:50%; -webkit-transition:-webkit-transform .4s ease-in; transition: transform .4s ease-in; } .html5gallery-rotate:hover { -webkit-transform: rotate(360deg); transform: rotate(360deg); }";$("head").append("<style type='text/css' data-creator='html5gallery'>"+styleCss+"</style>");var socialCode="<div";if(isfullscreen)socialCode+=' class="html5gallery-fullscreen-social-'+this.id+'" style="display:none;'+this.options.socialpositionlightbox+'"';else socialCode+=' class="html5gallery-social-'+this.id+'" style="display:'+(this.options.socialmode=="mouseover"?"none":"block")+";"+this.options.socialposition+'"';socialCode+=">";var socialBtnCSS=(this.options.socialdirection=="horizontal"?"display:inline-block;":"display:block;")+"margin:4px;";var socialCSS="display:table-cell;width:"+this.options.socialbuttonsize+"px;height:"+this.options.socialbuttonsize+"px;font-size:"+this.options.socialbuttonfontsize+"px;border-radius:50%;color:#fff;vertical-align:middle;text-align:center;cursor:pointer;padding:0;";if(this.options.showemail)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-email" style="'+socialBtnCSS+'"><div class="mh-icon-mail" style="'+ 5socialCSS+'background-color:#4d83ff;"></div></div>';if(this.options.showfacebook)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-facebook" style="'+socialBtnCSS+'"><div class="mh-icon-facebook" style="'+socialCSS+'background-color:#3b5998;"></div></div>';if(this.options.showtwitter)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-twitter" style="'+ 6socialBtnCSS+'"><div class="mh-icon-twitter" style="'+socialCSS+'background-color:#03b3ee;"></div></div>';if(this.options.showpinterest)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-pinterest" style="'+socialBtnCSS+'"><div class="mh-icon-pinterest" style="'+socialCSS+'background-color:#c92228;"></div></div>';if(this.options.showlinkedin)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-linkedin" style="'+socialBtnCSS+'"><div class="mh-icon-linkedin" style="'+socialCSS+'background-color:#0274b3;"></div></div>';if(this.options.showgplus)socialCode+='<div class="html5gallery-social-btn-'+this.id+(this.options.socialrotateeffect?" html5gallery-rotate":"")+' html5gallery-social-gplus" style="'+socialBtnCSS+'"><div class="mh-icon-gplus" style="'+socialCSS+'background-color:#dd5144;"></div></div>';socialCode+='<div style="clear:both;"></div></div>';if(isfullscreen)$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).append(socialCode);else{$(".html5gallery-box-"+this.id,this.$gallery).append(socialCode);
6if(this.options.socialmode=="mouseover")$(".html5gallery-box-"+this.id).hover(function(){$(".html5gallery-social-"+instance.id).fadeIn()},function(){$(".html5gallery-social-"+instance.id).fadeOut()})}$(".html5gallery-social-btn-"+this.id).click(function(){var shareUrl=window.location.href+(window.location.href.indexOf("?")<0?"?":"&")+"galleryshareid="+instance.elemArray[instance.curElem][ELEM_ID];var shareTitle=instance.elemArray[instance.curElem][ELEM_TITLE];var shareMedia=instance.absoluteUrl(instance.elemArray[instance.curElem][ELEM_SRC]);if(instance.options.sharemediaurl)shareUrl=shareMedia;var isVideo=instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_FLASH||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_MP4||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_OGG||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_WEBM||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_YOUTUBE||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_VIDEO_VIMEO||instance.elemArray[instance.curElem][ELEM_TYPE]==TYPE_EMBED_VIDEO;if(!shareTitle)shareTitle="";else shareTitle=instance.html2Text(shareTitle);if(isVideo&&instance.elemArray[instance.curElem][ELEM_POSTER])shareMedia=instance.absoluteUrl(instance.elemArray[instance.curElem][ELEM_POSTER]);if($(this).hasClass("html5gallery-social-facebook"))window.open("https://www.facebook.com/sharer/sharer.php?u="+ 7encodeURIComponent(shareUrl)+"&t="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5gallery-social-twitter"))window.open("https://twitter.com/share?url="+encodeURIComponent(shareUrl)+"&text="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5gallery-social-pinterest"))window.open("https://pinterest.com/pin/create/bookmarklet/?media="+encodeURIComponent(shareMedia)+"&url="+encodeURIComponent(shareUrl)+"&description="+encodeURIComponent(shareTitle)+"&is_video="+ 8(isVideo?"true":"false"),"_blank");else if($(this).hasClass("html5gallery-social-linkedin"))window.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(shareUrl)+"&title="+encodeURIComponent(shareTitle)+"&summary="+encodeURIComponent(shareTitle),"_blank");else if($(this).hasClass("html5gallery-social-gplus"))window.open("https://plus.google.com/share?url="+encodeURIComponent(shareUrl),"_blank");else if($(this).hasClass("html5gallery-social-email"))window.open("mailto:?subject="+ 9encodeURIComponent(shareTitle)+"&body=Check out this: "+encodeURIComponent(shareUrl));return false})},html2Text:function(html){var tag=document.createElement("div");tag.innerHTML=html;return tag.innerText},checkMK:function(){if(this.options.frve){var item=$(".html5gallery-elem-"+this.id,this.container);var mklink=$('a[href="'+this.options.freelink+'"]',item);if(item.text().indexOf(this.options.frvem)<0||mklink.length<0)item.append("<a style='text-decoration:none;' target='_blank' href='"+this.options.freelink+"' ><div style='display:block;visibility:visible;position:absolute;top:10px;left:10px;width:180px;height:18px;line-height:18px;text-align:center;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;'>"+this.options.frvem+"</div></a>");else{var mkdiv=mklink.find("div");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:block!important;visibility:visible!important;font-size:12px!important;"});mkdiv.attr({style:mkdiv.attr("style")+"display:block!important;visibility:visible!important;font-size:12px!important;"})}}}},initData:function(onSuccess){this.elemArray=[];if(this.options.src&&this.options.src.length>0){var mediaType=this.options.mediatype?this.options.mediatype:this.checkType(this.options.src);this.elemArray.push(new Array(0,"",this.options.src,this.options.webm,this.options.ogg,"","",this.options.title?this.options.title:"",this.options.title?this.options.title:"",mediaType,this.options.width,this.options.height,this.options.poster,this.options.hd,this.options.hdogg,this.options.hdwebm));this.readTags();onSuccess(this)}else if(this.options.xml&&this.options.xml.length>0){if(this.options.xmlnocache){this.options.xml+=this.options.xml.indexOf("?")<0?"?":"&";this.options.xml+=Math.random()}var instance=this;$.ajax({type:"GET",url:this.options.xml,dataType:"xml",success:function(xmldata){$(xmldata).find("slide").each(function(index,value){var title=$
9(this).find("title").text();var information=$(this).find("description").text()?$(this).find("description").text():$(this).find("information").text();if(!title)title="";if(!information)information="";var mediaType=$(this).find("mediatype").text()?$(this).find("mediatype").text():instance.checkType($(this).find("file").text());instance.elemArray.push(new Array($(this).find("id").length?$(this).find("id").text():index,$(this).find("thumbnail").text(),$(this).find("file").text(),$(this).find("file-ogg").text(),$(this).find("file-webm").text(),$(this).find("link").text(),$(this).find("linktarget").text(),title,information,mediaType,$(this).find("width").length&&!isNaN(parseInt($(this).find("width").text()))?parseInt($(this).find("width").text()):instance.options.width,$(this).find("height").length&&!isNaN(parseInt($(this).find("height").text()))?parseInt($(this).find("height").text()):instance.options.height,$(this).find("poster").text(),$(this).find("hd").text(),$(this).find("hdogg").text(),$(this).find("hdwebm").text(),$(this).find("duration").text(),$(this).find("lightboxwidth").text(),$(this).find("lightboxheight").text(),$(this).find("youtubeapikey").text(),$(this).find("youtubeplaylistid").text(),$(this).find("youtubeplaylistmaxresults").text(),$(this).find("lightbox").text().toLowerCase()=="true",$(this).find("width").length&&!isNaN(parseInt($(this).find("width").text()))?parseInt($(this).find("width").text()):instance.options.width,$(this).find("height").length&&!isNaN(parseInt($(this).find("height").text()))?parseInt($(this).find("height").text()):instance.options.height,$(this).find("alt").text(),$(this).find("vtt").text(),$(this).find("vttlang").text(),$(this).find("vttlabel").text(),$(this).find("category").text()))});instance.readTags();onSuccess(instance)}})}else if(this.options.remote&&this.options.remote.length>0){var instance=this;$.getJSON(this.options.remote,function(data){for(var i=0;i<data.length;i++){var mediaType=data[i].mediatype?data[i].mediatype:instance.checkType(data[i].file);instance.elemArray.push(new Array(i,data[i].thumbnail,data[i].file,data[i].fileogg,data[i].filewebm,data[i].link,data[i].linktarget,data[i].title,data[i].description,mediaType,data[i].width&&!isNaN(parseInt(data[i].width))?parseInt(data[i].width):instance.options.width,data[i].height&&!isNaN(parseInt(data[i].height))?parseInt(data[i].height):instance.options.height,data[i].poster,data[i].hd,data[i].hdogg,data[i].hdwebm,data[i].duration,data[i].lightboxwidth,data[i].lightboxheight,data[i].youtubeapikey,data[i].youtubeplaylistid,data[i].youtubeplaylistmaxresults,data[i].lightbox,data[i].width&&!isNaN(parseInt(data[i].width))?parseInt(data[i].width):instance.options.width,data[i].height&&!isNaN(parseInt(data[i].height))?parseInt(data[i].height):instance.options.height,data[i].alt,data[i].vtt,data[i].vttlang,data[i].vttlabel,data[i].category))}instance.readTags();onSuccess(instance)})}else if(this.options.youtubechannel){var base="https://gdata.youtube.com/feeds/api/videos?";var params={alt:"json",v:2,"orderby":this.options.youtubechannel.orderby?this.options.youtubechannel.orderby:"published","start-index":this.options.youtubechannel["start-index"]?this.options.youtubechannel["start-index"]:1,"max-results":this.options.youtubechannel["max-results"]?this.options.youtubechannel["max-results"]:10};if(this.options.youtubechannel.author)params.author=this.options.youtubechannel.author;else if(this.options.youtubechannel.q)params.q=this.options.youtubechannel.q;base+=$.param(params);var instance=this;$.getJSON(base,function(data){if(data&&data.feed&&data.feed.entry)for(var i=1;i<data.feed.entry.length;i++)instance.elemArray.push(new Array(i,"https://img.youtube.com/vi/"+data.feed.entry[i].media$group.yt$videoid.$t+"/"+instance.options.youtubethumb,data.feed.entry[i].media$group.media$player.url,null,null,null,null,data.feed.entry[i].media$group.media$title.$t,data.feed.entry[i].media$group.media$description.$t,TYPE_VIDEO_YOUTUBE,640,480,"https://img.youtube.com/vi/"+data.feed.entry[i].media$group.yt$videoid.$t+"/"+instance.options.youtubeimage,null,null,null,null));instance.readTags();onSuccess(instance)})}else if(this.options.youtubeapikey&&this.options.youtubeplaylistid){var instance=this;this.getYouTubePlaylist(this.options.youtubeapikey,this.options.youtubeplaylistid,this.options.youtubeplaylistmaxresults,-1,function(){instance.readTags();onSuccess(instance)},this,null,null)}else{this.readTags();onSuccess(this)}},readTags:function(){var instance=this;var imagelist=$("img.html5galleryimg",this.container).length?$("img.html5galleryimg",this.container):$("img",this.container);imagelist.each(function(index,value){var imgsrc=$(this).attr("src");var lazytags=instance.options.lazyloadtags.split(",");for(var i=0;i<lazytags.length;i++)if($(this).data(lazytags[i])&&$(this).data(lazytags[i]).length>0){imgsrc=$(this).data(lazytags[i]);break}var src=imgsrc;
9var title=$(this).data("title")?$(this).data("title"):$(this).attr("alt");var information=$(this).data("description")?$(this).data("description"):$(this).data("information");var alt=$(this).attr("alt")?$(this).attr("alt"):$(this).data("title");if(!title)title="";if(!information)information="";if(!alt)alt="";var width=instance.options.width;var height=instance.options.height;var duration=$(this).data("duration")?$(this).data("duration"):0;var videoOgg=null,videoWebm=null;var link=null,linktarget=null;var poster=null;var hd=null,hdogg=null,hdwebm=null;var lightboxwidth=null,lightboxheight=null;var youtubeapikey=null,youtubeplaylistid=null,youtubeplaylistmaxresults=null;var lightbox=false;var parent=$(this).closest("a.html5galleryimglink");if(parent.length<=0)parent=$(this).parent();var category="";if(parent.is("a")){src=parent.attr("href");videoOgg=parent.data("ogg");videoWebm=parent.data("webm");link=parent.data("link");linktarget=parent.data("linktarget");poster=parent.data("poster");if(!isNaN(parent.data("width")))width=parent.data("width");if(!isNaN(parent.data("height")))height=parent.data("height");hd=parent.data("hd");hdogg=parent.data("hdogg");hdwebm=parent.data("hdwebm");lightboxwidth=parent.data("lightboxwidth");lightboxheight=parent.data("lightboxheight");youtubeapikey=parent.data("youtubeapikey");youtubeplaylistid=parent.data("youtubeplaylistid");youtubeplaylistmaxresults=parent.data("youtubeplaylistmaxresults");lightbox=parent.hasClass("html5gallerylightbox");category=parent.data("category")}var mediaType=parent.data("mediatype")?parent.data("mediatype"):instance.checkType(src);var vtt=parent.data("vtt")?parent.data("vtt"):"";var vttlang=parent.data("vttlang")?parent.data("vttlang"):instance.options.vttlang;var vttlabel=parent.data("vttlabel")?parent.data("vttlabel"):instance.options.vttlabel;instance.elemArray.push(new Array(instance.elemArray.length,imgsrc,src,videoOgg,videoWebm,link,linktarget,title,information,mediaType,width,height,poster,hd,hdogg,hdwebm,duration,lightboxwidth,lightboxheight,youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults,lightbox,width,height,alt,vtt,vttlang,vttlabel,category))})},getYouTubePlaylist:function(youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults,index,onsuccess,instance,pagetoken,category){if(index>=0)instance.elemArray.splice(index,1);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)for(var i=0;i<data.items.length;i++){var video_id=data.items[i]["snippet"]["resourceId"]["videoId"];var poster_image="https://img.youtube.com/vi/"+video_id+"/"+instance.options.youtubeimage;if(instance.options.youtubeplaylistusemaxres&&data.items[i]["snippet"]["thumbnails"]&&data.items[i]["snippet"]["thumbnails"]["maxres"])poster_image=data.items[i]["snippet"]["thumbnails"]["maxres"]["url"];var new_item=new Array(i,"https://img.youtube.com/vi/"+video_id+"/"+instance.options.youtubethumb,"https://www.youtube.com/embed/"+video_id,null,null,null,null,data.items[i]["snippet"]["title"],data.items[i]["snippet"]["description"],TYPE_VIDEO_YOUTUBE,640,480,poster_image,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,category);if(index>=0){instance.elemArray.splice(index,0,new_item);index++}else instance.elemArray.push(new_item)}if(data&&data.nextPageToken&&youtubeplaylistmaxresults&&youtubeplaylistmaxresults>50){all_done=false;instance.getYouTubePlaylist(youtubeapikey,youtubeplaylistid,youtubeplaylistmaxresults-50,index,onsuccess,instance,data.nextPageToken,category)}}).always(function(){if(all_done)onsuccess(instance)})},processElemArray:function(instance){var found=false;for(var i=0;i<instance.elemArray.length;i++)if(!instance.elemArray[i][ELEM_ALT])instance.elemArray[i][ELEM_ALT]=instance.elemArray[i][ELEM_TITLE];for(var i=0;i<instance.elemArray.length;i++)if(instance.elemArray[i][ELEM_TYPE]==TYPE_YOUTUBE_PLAYLIST)if(instance.elemArray[i][ELEM_YOUTUBEAPIKEY]&&instance.elemArray[i][ELEM_YOUTUBEPLAYLISTID]){foun
9d=true;break}if(found)instance.getYouTubePlaylist(instance.elemArray[i][ELEM_YOUTUBEAPIKEY],instance.elemArray[i][ELEM_YOUTUBEPLAYLISTID],instance.elemArray[i][ELEM_YOUTUBEPLAYLISTMAXRESULTS],i,instance.processElemArray,instance,null,instance.elemArray[i][ELEM_CATEGORY]);else instance.init(instance)},createMarkup:function(){this.$gallery=jQuery(""+"<div class='html5gallery-container-"+ 10this.id+"'>"+"<div class='html5gallery-box-"+this.id+"'>"+"<div class='html5gallery-elem-"+this.id+"'></div>"+"<div class='html5gallery-title-"+this.id+"'></div>"+"<div class='html5gallery-timer-"+this.id+"'></div>"+"<div class='html5gallery-viral-"+this.id+"'></div>"+"<div class='html5gallery-toolbox-"+this.id+"'>"+"<div class='html5gallery-toolbox-bg-"+this.id+"'></div>"+"<div class='html5gallery-toolbox-buttons-"+this.id+"'>"+"<div class='html5gallery-play-"+this.id+"'></div>"+"<div class='html5gallery-pause-"+ 11this.id+"'></div>"+"<div class='html5gallery-left-"+this.id+"'></div>"+"<div class='html5gallery-right-"+this.id+"'></div>"+"<div class='html5gallery-lightbox-"+this.id+"'></div>"+"</div>"+"</div>"+"</div>"+"<div class='html5gallery-car-"+this.id+"'>"+"<div class='html5gallery-car-list-"+this.id+"'>"+"<div class='html5gallery-car-mask-"+this.id+"'>"+"<div class='html5gallery-thumbs-"+this.id+"'></div>"+"</div>"+"<div class='html5gallery-car-slider-bar-"+this.id+"'>"+"<div class='html5gallery-car-slider-bar-top-"+ 12this.id+"'></div>"+"<div class='html5gallery-car-slider-bar-middle-"+this.id+"'></div>"+"<div class='html5gallery-car-slider-bar-bottom-"+this.id+"'></div>"+"</div>"+"<div class='html5gallery-car-left-"+this.id+"'></div>"+"<div class='html5gallery-car-right-"+this.id+"'></div>"+"<div class='html5gallery-car-slider-"+this.id+"'></div>"+"</div>"+"</div>"+"</div>");this.$gallery.appendTo(this.container);if(!this.options.socialurlforeach)this.createSocialMedia();if(this.options.enablega4&&this.options.ga4account&&typeof window.gtag!=="function"){window.dataLayer=window.dataLayer||[];window.gtag=function(){dataLayer.push(arguments)};window.gtag("js",new Date);window.gtag("config",this.options.ga4account);$.getScript("https://www.googletagmanager.com/gtag/js?id="+encodeURIComponent(this.options.ga4account))}if(this.options.googleanalyticsaccount&&!window._gaq){window._gaq=window._gaq||[];
12window._gaq.push(["_setAccount",this.options.googleanalyticsaccount]);window._gaq.push(["_trackPageview"]);$.getScript("https://ssl.google-analytics.com/ga.js")}},createSocialMedia:function(){$(".html5gallery-viral-"+this.id,this.$gallery).empty();var elemUrl=window.location.href;if(this.options.socialurlforeach)elemUrl+=(window.location.href.indexOf("?")<0?"?":"&")+"html5galleryid="+this.elemArray[this.curElem][ELEM_ID];if(this.options.showsocialmedia&&this.options.showfacebooklike){var facebook="<div style='display:block; float:left; width:110px; height:21px;'><iframe src='"+"https://www.facebook.com/plugins/like.php?href=";if(this.options.facebooklikeurl&&this.options.facebooklikeurl.length>0)facebook+=encodeURIComponent(this.options.facebooklikeurl);else facebook+=elemUrl;facebook+="&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=21' scrolling='no' frameborder='0' style='border:none;;overflow:hidden; width:110px; height:21px;' allowTransparency='true'></iframe></div>";$(".html5gallery-viral-"+this.id,this.$gallery).append(facebook)}if(this.options.showsocialmedia&&this.options.showtwitter){var twitter="<div style='display:block; float:left; width:110px; height:21px;'><a href='https://twitter.com/share' class='twitter-share-button'";if(this.options.twitterurl&&this.options.twitterurl.length>0)twitter+=" data-url='"+this.options.twitterurl+"'";else twitter+=" data-url='"+elemUrl+"'";if(this.options.twitterusername&&this.options.twitterusername.length>0)twitter+=" data-via='"+this.options.twittervia+"' data-related='"+this.options.twitterusername+"'";twitter+=">Tweet</a></div>";$(".html5gallery-viral-"+this.id,this.$gallery).append(twitter);$.getScript("https://platform.twitter.com/widgets.js")}if(this.options.showsocialmedia&&this.options.showgoogleplus){var googlePlus="<div style='display:block; float:left; width:100px; height:21px;'><div class='g-plusone' data-size='medium'";if(this.options.googleplusurl&&this.options.googleplusurl.length>0)googlePlus+=" data-href='"+this.options.googleplusurl+"'";else googlePlus+=" data-href='"+elemUrl+"'";googlePlus+="></div></div>";$(".html5gallery-viral-"+this.id,this.$gallery).append(googlePlus);$.getScript("https://apis.google.com/js/plusone.js")}},playGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).hide();$(".html5gallery-pause-"+instance.id,instance.$gallery).show();instance.isPaused=false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]?instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout.setInterval(slideshowinterval);instance.slideshowTimeout.start();$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0})},pauseGallery:function(){var instance=this;$(".html5gallery-play-"+instance.id,instance.$gallery).show();$(".html5gallery-pause-"+instance.id,instance.$gallery).hide();instance.isPaused=true;instance.slideshowTimeout.stop();$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0})},createSliderTimeout:function(){var instance=this;instance.slideshowTimeout=new HTML5GalleryTimer(instance.options.slideshowinterval,function(){instance.slideRun(-1)},instance.options.showtimer?function(percent){instance.updateTimer(percent)}:null);if(instance.options.pauseonmouseover)$(".html5gallery-elem-"+this.id,this.$gallery).hover(function(){if(!instance.isPaused)instance.slideshowTimeout.pause()},function(){if(!instance.isPaused)instance.slideshowTimeout.resume(false)})},updateTimer:function(percent){if(this.isFullscreen){var w=Math.max(0,Math.floor($(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).width()*percent));$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:w+"px"})}else{var w=Math.max(0,Math.floor($(".html5gallery-elem-"+this.id,this.$gallery).width()*percent));$(".html5gallery-timer-"+this.id,this.$gallery).css({width:w+"px"})}},createEvents:function(){var instance=this;$(".html5gallery-play-"+this.id,this.$gallery).click(function(){instance.playGallery()});$(".html5gallery-pause-"+this.id,this.$gallery).click(function(){instance.pauseGallery()});$(".html5gallery-lightbox-"+ 13this.id,this.$gallery).click(function(){instance.goFullscreen()});$(".html5gallery-left-"+this.id,this.$gallery).click(function(){instance.slideRun(-2,true)});$(".html5gallery-right-"+this.id,this.$gallery).click(function(){instance.slideRun(-1,true)});if(instance.options.enabletouchswipe){var preventBrowser=instance.options.isAndroid&&instance.options.enabletouchswipeonandroid?true:false;$(".html5gallery-box-"+this.id,this.$gallery).touchSwipe({preventWebBrowser:preventBrowser,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1,true)},swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2,true)}})}var isTouch="ontouchstart"in window;if(!isTouch||!instance.options.disablehovereventontouch){$(".html5gallery-box-"+this.id,this.$gallery).mousemove(function(){if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type,true)}if(instance.options.titleoverlay&&instance.options.titleautohide&&!(instance.options.hidetitlewhenvideoisplaying&&instance.isVideoPlaying)){$(".html5gallery-title-"+instance.id,instance.$gallery).show();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeOut()},3E3)}});$(".html5gallery-box-"+this.id,this.$gallery).hover(function(){instance.onSlideshowOver();if(instance.options.imagetoolboxmode=="mouseover"){var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(instance.options.showimagetoolbox=="always"||instance.options.showimagetoolbox=="image"&&type==TYPE_IMAGE)instance.showimagetoolbox(type)}if(instance.options.titleoverlay&&instance.options.titleautohide&&!(instance.options.hidetitlewhenvideoisplaying&&instance.isVideoPlaying)){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeIn();clearTimeout(instance.hideTitleTimeout);instance.hideTitleTimeout=setTimeout(function(){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeOut()},3E3)}},function(){if(instance.options.imagetoolboxmode=="mouseover")instance.hideimagetoolbox();if(instance.options.titleoverlay&&instance.options.titleautohide){$(".html5gallery-title-"+instance.id,instance.$gallery).fadeOut();clearTimeout(instance.hideTitleTimeout)}})}$(".html5gallery-car-left-"+this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled",true);$(".html5gallery-car-right-"+ 14this.id,this.$gallery).css({"background-position":"0px 0px"});$(".html5gallery-car-left-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselPrev()}});$(".html5gallery-car-right-"+this.id,this.$gallery).click(function(){if(!$(this).data("disabled")){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselNext()}});$(".html5gallery-car-slider-"+this.id,this.$gallery).on("mousedown",function(e){var dragged=$(this);var y=dragged.offset().top-e.pageY;$(document).on("mousemove.h5gallerydraggable",function(e){var t=y+e.pageY;dragged.offset({top:t});instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselSliderDrag(t);e.preventDefault()});$(document).one("mouseup",function(e){$(this).off("mousemove.h5gallerydraggable")})});$(".html5gallery-car-slider-"+this.id,this.$gallery).on("touchstart",function(e){if(!e.originalEvent||!e.originalEvent.touches||e.originalEvent.touches.length===0)return;var dragged=$(this);var startY=e.originalEvent.touches[0].pageY;var offsetY=dragged.offset().top;var onTouchMove=function(e){if(!e.originalEvent||!e.originalEvent.touches||e.originalEvent.touches.length===0)return;var currentY=e.originalEvent.touches[0].pageY;var t=offsetY-startY+currentY;dragged.offset({top:t});instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselSliderDrag(t);e.preventDefault()};var onTouchEnd=function(){$(document).off("touchmove.h5gallerydraggable",onTouchMove);$(document).off("touchend.h5gallerydraggable",onTouchEnd)};$(document).on("touchmove.h5gallerydraggable",onTouchMove);$(document).on("touchend.h5gallerydraggable",onTouchEnd);e.preventDefault()});$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).click(function(event){instance.disableupdatecarousel=true;instance.updateCarouselTimeout=setTimeout(function(){instance.enableUpdateCarousel()},instance.options.updatecarouselinterval);instance.carouselBarClicked(event)});if(this.options.skin=="vertical"||this.options.skin=="verticallight"||this.options.skin=="showcase"||this.options.skin=="verticalwithleft"||this.options.skin=="verticallightwithleft")$(".html5gallery-car-list-"+this.id,this.$gallery).on("DOMMouseScroll mousewheel wheel",function(event){var totalLength=instance.visibleElemLength*(instance.options.thumbheight+instance.options.thumbgap);if(totalLength<instance.options.thumbMaskHeight)return;var maxM=-1*(totalLength-instance.options.thumbMaskHeight);var dis=0;if(event.originalEvent)if(event.originalEvent.wheelDeltaY)dis=event.originalEvent.wheelDeltaY;else if(event.originalEvent.detail)dis=event.originalEvent.detail*-20;else if(event.originalEvent.wheelDelta)dis=event.originalEvent.wheelDelta;else if(event.originalEvent.deltaY)if(instance.options.isFirefox)dis=event.originalEvent.deltaY*-10;else dis=event.originalEvent.deltaY*-1;var m1=parseInt($(".html5gallery-thumbs-"+instance.id,instance.$gallery).css("marginTop"))+dis;if(m1<0&&m1>maxM)event.preventDefault();if(m1>0)m1=0;if(m1<maxM)m1=maxM;var pos=(instance.options.carouselSliderMax-instance.options.carouselSliderMin)*m1/maxM;$(".html5gallery-car-slider-"+ 15instance.id,instance.$gallery).css({top:pos});$(".html5gallery-thumbs-"+instance.id,instance.$gallery).css({marginTop:m1})});if(!("ontouchstart"in window)){$(".html5gallery-car-left-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-"+instance.options.carouselarrowwidth+"px 0px"})},function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})});$(".html5gallery-car-right-"+this.id,this.$gallery).hover(function(){if(!$(this).data("disabled"))$(this).css({"background-position":"-"+ 16instance.options.carouselarrowwidth+"px 0px"})},function(){if(!$(this).data("disabled"))$(this).css({"background-position":"0px 0px"})})}if("ontouchstart"in window)if(this.options.skin=="vertical"||this.options.skin=="verticallight"||this.options.skin=="showcase"||this.options.skin=="verticalwithleft"||this.options.skin=="verticallightwithleft")$(".html5gallery-car-"+this.id,this.$gallery).touchSwipe({preventWebBrowser:true,swipeTop:function(data){$(".html5gallery-car-right-"+instance.id,instance.$gallery).click()},swipeBottom:function(){$(".html5gallery-car-left-"+instance.id,instance.$gallery).click()},instance:instance,preventWebBrowserCallback:"verticalPreventWebBrowserCallback"});else $(".html5gallery-car-"+this.id,this.$gallery).touchSwipe({preventWebBrowser:false,swipeLeft:function(data){$(".html5gallery-car-right-"+instance.id,instance.$gallery).click()},swipeRight:function(){$(".html5gallery-car-left-"+instance.id,instance.$gallery).click()}})},verticalPreventWebBrowserCallback:function(moveup){var thumbPos=parseInt($(".html5gallery-thumbs-"+this.id,this.$gallery).css("margin-top"));if(moveup)return thumbPos>this.options.thumbMaskHeight-this.options.thumbTotalHeight;else return thumbPos<0},createStyle:function(){switch(this.options.skin){case"vertical":case"verticallight":case"verticalwithleft":case"verticallightwithleft":case"showcase":this.createStyleVertical();break;case"light":case"horizontal":case"darkness":case"gallery":case"mediapage":default:this.createStyleDefault()}},resizeStyleVertical:function(){if(!this.container.parent()||!this.container.parent().width())return;var instance=this;this.visibleElemLength=this.elemArray.length;if(this.options.showcarousel&&this.options.showcategory)if(this.selectedcategory=="all"){$(".html5gallery-tn-"+this.id
16).css({display:"block"});$(".html5gallery-tn-"+this.id).removeClass("html5gallery-tn-hidden")}else{this.visibleElemLength=0;$(".html5gallery-tn-"+this.id).each(function(){var match=false;if($(this).data("category")){var cats=String($(this).data("category")).split(":");if($.inArray(instance.selectedcategory,cats)>=0){match=true;instance.visibleElemLength++}}$(this).css({display:match?"block":"none"});if(!match)$(this).addClass("html5gallery-tn-hidden");else $(this).removeClass("html5gallery-tn-hidden")})}this.options.containerWidth=this.container.parent().width();this.options.totalWidth=this.options.containerWidth;if(this.options.carouselposresponsive){var fullW=$(window).width();if(fullW<this.options.carouselposresponsiveonscreenwidth)this.options.carouselposition="bottom";else{this.options.carouselposition=this.options.originalcarouselposition;this.options.thumbwidth=this.options.originalthumbwidth}}if(this.options.showcarousel)if(this.options.carouselposition=="bottom")this.options.carouselWidth=this.options.width;else this.options.carouselWidth=this.options.thumbwidth;if(this.options.carouselposition=="bottom")this.options.width=this.options.totalWidth-2*this.options.padding;else{this.options.width=this.options.totalWidth-2*this.options.padding;if(this.options.carouselWidth+this.options.carouselmargin>0)this.options.width-=this.options.carouselWidth+this.options.carouselmargin}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight=this.container.parent().height();this.options.totalHeight=this.options.containerHeight;if(this.options.carouselposition=="bottom")this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding+this.options.carouselheight);else this.options.height=this.options.totalHeight-(this.options.headerHeight+ 172*this.options.padding)}else{this.options.height=Math.round(this.options.width*this.CalcOriginalHeight(this.options.originalHeight)/this.options.originalWidth);if(this.options.carouselposition=="bottom")this.options.totalHeight=this.options.height+this.options.headerHeight+3*this.options.padding+this.options.carouselHeight;else this.options.totalHeight=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;if(this.options.slideshadow)this.options.boxWidth+=8;if(this.options.showcarousel){if(this.options.carouselposition=="bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.height+ 18this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))<this.visibleElemLength;this.options.thumbwidth=this.options.width;if(this.options.carouselSlider)this.options.thumbwidth-=20;this.options.carTop=this.options.showcategory?this.options.categoryheight:0;if(this.options.showcategory)this.options.carouselHeight+=this.options.categoryheight;this.options.totalHeight=this.options.height+this.options.headerHeight+3*this.options.padding+this.options.carouselHeight}else{this.options.carouselWidth=this.options.thumbwidth;this.options.carouselHeight=this.options.height+this.options.headerHeight;this.options.carTop=this.options.showcategory?this.options.categoryheight:0;this.options.carBottom=0;this.options.carAreaLength=this.options.carouselHeight-this.options.carTop-this.options.carBottom;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))<this.visibleElemLength;if(this.options.carouselSlider){this.options.carouselWidth+=20;this.options.width-=20;this.options.height=Math.round(this.options.width*this.CalcOriginalHeight(this.options.originalHeight)/this.options.originalWidth);this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.carouselHeight=this.options.height+this.options.headerHeight;this.options.totalHeight=this.options.height+ 19this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight;if(this.options.slideshadow)this.options.boxWidth+=8;this.container.css({"height":this.options.containerHeight});if(this.options.showcategory)this.options.carAreaLength=this.options.carouselHeight-this.options.categoryheight}if(this.options.carouselposition=="left"){this.options.boxLeft=this.options.padding+this.options.carouselWidth+this.options.carouselmargin;this.options.carouselLeft=this.options.padding}else this.options.carouselLeft=this.options.padding+this.options.width+this.options.carouselmargin;this.options.carouselTop=this.options.padding}
19$(".html5gallery-car-mask-"+this.id).css({width:this.options.thumbwidth+"px"});$(".html5gallery-tn-"+this.id).css({width:this.options.thumbwidth+"px"});$(".html5gallery-tn-selected-"+this.id).css({width:this.options.thumbwidth+"px"});$(".html5gallery-car-slider-bar-"+this.id).css({left:String(this.options.thumbwidth+6)+"px"});if(this.options.isMobile||this.isTouch&&this.options.splitvsliderontouch){$(".html5gallery-car-left-"+ 20this.id).css({left:String(this.options.thumbwidth+5)+"px"});$(".html5gallery-car-right-"+this.id).css({left:String(this.options.thumbwidth+5)+"px"})}else $(".html5gallery-car-slider-"+this.id).css({left:String(this.options.thumbwidth+5)+"px"});var titleWidth=this.options.thumbwidth-3*this.options.thumbmargin;if(this.options.thumbshowimage)titleWidth-=this.options.thumbimagewidth+2*this.options.thumbimageborder;if(this.options.thumbshowtitle)$("head").append("<style type='text/css' data-creator='html5gallery'>.html5gallery-tn-title-"+ 21this.id+" {width: "+titleWidth+"px;}</style>")}$(".html5gallery-container-"+this.id).css({width:this.options.totalWidth+"px",height:this.options.totalHeight+"px"});$(".html5gallery-box-"+this.id).css({width:this.options.boxWidth+"px",height:this.options.boxHeight+"px",left:this.options.boxLeft+"px"});var type=this.elemArray[this.curElem][ELEM_TYPE];if(type==TYPE_IMAGE||this.showingPoster){var imageWidth=this.showingPoster?this.elemArray[this.curElem][ELEM_POSTERWIDTH]:this.elemArray[this.curElem][ELEM_WIDTH];var imageHeight=this.showingPoster?this.elemArray[this.curElem][ELEM_POSTERHEIGHT]:this.elemArray[this.curElem][ELEM_HEIGHT];var scale;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/imageWidth,fullH/imageHeight);scale=scale>1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/imageWidth,this.options.height/imageHeight);var w=Math.round(scale*imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width;var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1,h1,true);
21$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"})}else if(type==TYPE_IFRAME||type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/dataW,fullH/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1,h1,true)}else{w1=this.options.width;h1=this.options.height}
21$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":"100%","height":"100%"});$(".html5gallery-elem-video-container-"+this.id).find("video").css({"width":"100%","height":"100%"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$(".html5gallery-elem-iframe-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-iframe-"+ 22this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-iframe-"+this.id).find("iframe").attr("height",h1)}var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}var titleWidth=this.options.slideshadow?this.options.boxWidth-8:this.options.boxWidth;
22$(".html5gallery-title-"+this.id).css({width:titleWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height-2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({width:this.options.carouselWidth+"px",height:this.options.carouselHeight+"px",top:this.options.carouselTop+"px",left:this.options.carouselLeft+"px",top:this.options.carouselTop+"px"});$(".html5gallery-car-list-"+this.id).css({top:this.options.carTop+"px",height:String(this.options.carAreaLength)+"px",width:this.options.carouselWidth+"px"});$(".html5gallery-thumbs-"+this.id).css({height:String(this.visibleElemLength*(this.options.thumbheight+this.options.thumbgap))+"px"});this.options.thumbShowNum=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap));if(this.options.thumbShowNum<1)this.options.thumbShowNum=1;this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap;this.options.thumbTotalHeight=this.visibleElemLength*this.options.thumbheight+(this.visibleElemLength-1)*this.options.thumbgap;if(this.options.carouselSlider){this.options.carouselSliderMin=0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;$(".html5gallery-car-slider-bar-"+this.id).css({height:this.options.thumbMaskHeight+"px"});$(".html5gallery-car-slider-bar-middle-"+this.id).css({height:String(this.options.thumbMaskHeight- 2332)+"px"});if(this.options.isMobile||this.isTouch&&this.options.splitvsliderontouch)$(".html5gallery-car-right-"+this.id
23).css({top:String(this.options.thumbMaskHeight-35)+"px"});$(".html5gallery-car-slider-bar-"+this.id).css({display:"block"});$(".html5gallery-car-left-"+this.id).css({display:"block"});$(".html5gallery-car-right-"+this.id).css({display:"block"});$(".html5gallery-car-slider-"+this.id).css({display:"block"})}var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/2);$(".html5gallery-car-mask-"+this.id).css({top:maskTop+"px",height:this.options.thumbMaskHeight+"px"});if(this.options.carouselposition=="bottom"){var diff=this.options.thumbMaskHeight-this.options.carAreaLength;$(".html5gallery-container-"+this.id).css({height:String(this.options.totalHeight+diff)+"px"});$(".html5gallery-car-"+this.id).css({height:String(this.options.carouselHeight+diff)+"px"});$(".html5gallery-car-list-"+this.id).css({height:this.options.thumbMaskHeight+"px"})}this.carouselHighlight(this.curElem)}},CalcOriginalHeight:function(h0){if(this.options.ratioresponsive){var winWidth=$(window).width();if(winWidth<=this.options.ratiosmallscreen)h0*=this.options.ratiosmallheight;else if(winWidth<=this.options.ratiomediumscreen)h0*=this.options.ratiomediumheight}return h0},createStyleVertical:function(){this.options.originalWidth=this.options.width;this.options.originalHeight=this.options.height;this.options.height=Math.round(this.options.width*this.CalcOriginalHeight(this.options.originalHeight)/this.options.originalWidth);this.visibleElemLength=this.elemArray.length;this.options.originalcarouselposition=this.options.carouselposition;this.options.originalthumbwidth=this.options.thumbwidth;if(this.options.thumbshowtitle)this.options.thumbimagewidth=this.options.thumbheight-2*this.options.thumbimageborder-4;else this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder-4;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder-4;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia||!this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+this.options.socialheight;this.options.boxWidth=this.options.width;this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.slideshadow)this.options.boxWidth+=8;if(this.options.showcarousel)if(this.options.carouselposition=="bottom"){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.carouselheight;this.options.carouselLeft=this.options.padding;this.options.carouselTop=this.options.height+this.options.headerHeight+2*this.options.padding;this.options.carAreaLength=this.options.carouselHeight;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))<this.visibleElemLength;this.options.thumbwidth=this.options.width;if(this.options.carouselSlider)this.options.thumbwidth-=20;this.options.carTop=this.options.showcategory?this.options.categoryheight:0;if(this.options.showcategory)this.options.carouselHeight+=this.options.categoryheight}else{this.options.carouselWidth=this.options.thumbwidth;this.options.carouselHeight=this.options.height+this.options.headerHeight;this.options.carTop=this.options.showcategory?this.options.categoryheight:0;this.options.carBottom=0;this.options.carAreaLength=this.options.carouselHeight-this.options.carTop-this.options.carBottom;this.options.carouselSlider=Math.floor(this.options.carAreaLength/(this.options.thumbheight+this.options.thumbgap))<this.visibleElemLength;if(this.options.carouselSlider)this.options.carouselWidth+=20;if(this.options.carouselposition=="left"){this.options.boxLeft=this.options.padding+this.options.carouselWidth+this.options.carouselmargin;this.options.carouselLeft=this.options.padding}else this.options.carouselLeft=this.options.padding+ 24this.options.width+this.options.carouselmargin;this.options.carouselTop=this.options.padding}else{this.options.carouselWidth=0;this.options.carouselHeight=0;this.options.carouselLeft=0;this.options.carouselTop=0;this.options.carouselmargin=0}if(this.options.carouselposition=="bottom"){this.options.totalWidth=this.options.width+2*this.options.padding;this.options.totalHeight=this.options.height+this.options.headerHeight+2*this.options.padding+this.options.carouselmargin+this.options.carouselHeight}else{this.options.totalWidth=this.options.width+this.options.carouselWidth+this.options.carouselmargin+2*this.options.padding;this.options.totalHeight=this.options.height+this.options.headerHeight+2*this.options.padding}this.options.containerWidth=this.options.totalWidth;this.options.containerHeight=this.options.totalHeight;if(this.options.responsive)this.container.css({"max-width":"100%"});else this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});var titleTop=0;var socialTop=0;this.options.elemTop=0;if(this.options.headerpos=="top"){socialTop=0;titleTop=this.options.socialheight;this.options.elemTop=this.options.headerHeight}else if(this.options.headerpos=="bottom"){this.options.elemTop=0;titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}else if(this.options.headerpos=="bottomoutside")if(this.options.showcarousel)titleTop=this.options.height+ 25this.options.carouselHeight;else titleTop=this.options.height;var styleCss="";
25$(".html5gallery-container-"+this.id).css({display:"block",position:"absolute",left:0,top:0,width:this.options.totalWidth+"px",height:this.options.totalHeight+"px","background-color":this.options.bgcolor});if(this.options.bgimage)$(".html5gallery-container-"+this.id).css({background:"url('"+this.options.bgimage+"') center top"});if(this.options.galleryshadow)styleCss+=" .html5gallery-container-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";$(".html5gallery-box-"+this.id).css({display:"block",position:"absolute","text-align":"center",left:this.options.boxLeft+"px",top:this.options.boxTop+"px",width:this.options.boxWidth+"px",height:this.options.boxHeight+"px"});var viralPaddingTop=Math.round(this.options.socialheight/2-12);styleCss+=" .html5gallery-title-text-"+this.id+" "+this.options.titlecss+" .html5gallery-title-text-"+this.id+" "+this.options.titlecsslink+" .html5gallery-error-"+this.id+" "+this.options.errorcss;styleCss+=" .html5gallery-description-text-"+ 26this.id+" "+this.options.descriptioncss+" .html5gallery-description-text-"+this.id+" "+this.options.descriptioncsslink;styleCss+=" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlecss+" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlelinkcss;styleCss+=" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptioncss+" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptionlinkcss;styleCss+=" .html5gallery-viral-"+ 27this.id+" {display:block; overflow:hidden; position:absolute; text-align:left; top:"+socialTop+"px; left:0px; width:"+this.options.boxWidth+"px; height:"+this.options.socialheight+"px; padding-top:"+viralPaddingTop+"px;}";var titleWidth=this.options.slideshadow?this.options.boxWidth-8:this.options.boxWidth;styleCss+=" .html5gallery-title-"+this.id+" {display:"+(this.options.titleoverlay&&this.options.titleautohide?"none":"block")+"; overflow:hidden; position:absolute; left:0px; width:"+titleWidth+"px; ";if(!this.options.titleoverlay)styleCss+="top:"+titleTop+"px; height:"+this.options.titleheight+"px; }";else if(this.options.headerpos=="top")styleCss+="top:0px; height:auto; }";else styleCss+="bottom:0px; height:auto; }";styleCss+=" .html5gallery-timer-"+this.id+" {display:block; position:absolute; top:"+String(this.options.elemTop+this.options.height-2)+"px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }";
27$(".html5gallery-elem-"+this.id).css({display:"block",overflow:"hidden",position:"absolute",top:this.options.elemTop+"px",left:0,width:this.options.boxWidth+"px",height:this.options.height+"px"});if(this.options.isIE7||this.options.isIE6){styleCss+=" .html5gallery-loading-"+this.id+" {display:none; }";styleCss+=" .html5gallery-loading-center-"+this.id+" {display:none; }"}else{styleCss+=" .html5gallery-loading-"+this.id+" {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading.gif') no-repeat top right;}";styleCss+=" .html5gallery-loading-center-"+this.id+" {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('"+this.options.skinfolder+"loading_center.gif') no-repeat center center;}"}if(this.options.borderradius>0)styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; border-radius:"+this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+=" .html5gallery-title-"+this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}
27if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({position:"absolute",display:"block",overflow:"hidden",width:this.options.carouselWidth+"px",height:this.options.carouselHeight+"px",left:this.options.carouselLeft+"px",top:this.options.carouselTop+"px"});styleCss+=" .html5gallery-car-list-"+this.id+" { position:absolute; display:block; overflow:hidden; top:"+this.options.carTop+"px; height:"+String(this.options.carAreaLength)+"px; left:0px; width:"+this.options.carouselWidth+"px; "+"}";styleCss+=".html5gallery-thumbs-"+this.id+" {margin-top:0px; height:"+String(this.visibleElemLength*(this.options.thumbheight+this.options.thumbgap))+"px;}";this.options.thumbShowNum=Math.floor(this.options.carAreaLength/(this.options.thumbheight+ 28this.options.thumbgap));if(this.options.thumbShowNum<1)this.options.thumbShowNum=1;this.options.thumbMaskHeight=this.options.thumbShowNum*this.options.thumbheight+(this.options.thumbShowNum-1)*this.options.thumbgap;this.options.thumbTotalHeight=this.visibleElemLength*this.options.thumbheight+(this.visibleElemLength-1)*this.options.thumbgap;this.options.carouselSliderMin=0;this.options.carouselSliderMax=this.options.thumbMaskHeight-54;styleCss+=" .html5gallery-car-slider-bar-"+this.id+" { position:absolute; display:"+ 29(this.options.carouselSlider?"block":"none")+"; overflow:hidden; top:0px; height:"+this.options.thumbMaskHeight+"px; left:"+String(this.options.thumbwidth+6)+"px; width:14px;}";styleCss+=" .html5gallery-car-slider-bar-top-"+this.id+" { position:absolute; display:block; top:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+"bartop.png')}";styleCss+=" .html5gallery-car-slider-bar-middle-"+this.id+" { position:absolute; display:block; top:16px; left:0px; width:14px; height:"+ 30String(this.options.thumbMaskHeight-32)+"px; background:url('"+this.options.skinfolder+"bar.png')}";styleCss+=" .html5gallery-car-slider-bar-bottom-"+this.id+" { position:absolute; display:block; bottom:0px; left:0px; width:14px; height:16px; background:url('"+this.options.skinfolder+"barbottom.png')}";if(this.options.isMobile||this.isTouch&&this.options.splitvsliderontouch)styleCss+=" .html5gallery-car-left-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+ 31String(this.options.thumbwidth+5)+"px; top:0px; background:url('"+this.options.skinfolder+"slidertop.png')} "+" .html5gallery-car-right-"+this.id+" { position:absolute; display:"+(this.options.carouselSlider?"block":"none")+"; cursor:pointer; overflow:hidden; width:16px; height:35px; left:"+String(this.options.thumbwidth+5)+"px; top:"+String(this.options.thumbMaskHeight-35)+"px; background:url('"+this.options.skinfolder+"sliderbottom.png')} ";else styleCss+=" .html5gallery-car-slider-"+this.id+" { position:absolute; display:"+ 32(this.options.carouselSlider?"block":"none")+"; overflow:hidden; cursor:pointer; top:0px; height:54px; left:"+String(this.options.thumbwidth+5)+"px; width:16px; background:url('"+this.options.skinfolder+"slider.png');}";var maskTop=0;if(this.options.carouselNavButton)maskTop=Math.round(this.options.carAreaLength/2-this.options.thumbMaskHeight/2);$(".html5gallery-car-mask-"+this.id).css({position:"absolute",display:"block",overflow:"hidden",top:maskTop+"px",height:this.options.thumbMaskHeight+"px",left:0,width:this.options.thumbwidth+"px"});var tabHeight=this.options.thumbheight;if(!this.options.isIE)tabHeight=this.options.thumbheight-2;styleCss+=" .html5gallery-tn-"+this.id+" { ";$(".html5gallery-tn-"+this.id).css({display:"block","margin-bottom":this.options.thumbgap+"px","text-align":"center",cursor:"pointer",width:this.options.thumbwidth+"px",height:tabHeight+"px",overflow:"hidden"});if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+this.options.carouseltopborder+"; border-bottom:1px solid "+this.options.carouselbottomborder+";";styleCss+="background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+ 33this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;"}if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; margin-bottom:"+this.options.thumbgap+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+tabHeight+"px;overflow:hidden;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else{if(!this.options.isIE)styleCss+="border-top:1px solid "+this.options.carouselhighlighttopborder+"; border-bottom:1px solid "+this.options.carouselhighlightbottomborder+";";styleCss+="background-color: "+this.options.carouselhighlightbgcolorend+"; "+"background: "+this.options.carouselhighlightbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselhighlightbgcolorstart+"), to("+this.options.carouselhighlightbgcolorend+")) no-repeat; "+"background: "+this.options.carouselhighlightbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselhighlightbgcolorstart+", "+this.options.carouselhighlightbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+ 34this.options.carouselhighlightbgcolorstart+", endColorstr="+this.options.carouselhighlightbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselhighlightbgcolorstart+", endColorstr="+this.options.carouselhighlightbgcolorend+")' no-repeat;"}if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";styleCss+=" .html5gallery-tn-selected-"+this.id+" .html5gallery-tn-img-"+ 35this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";var titleWidth=this.options.thumbwidth-3*this.options.thumbmargin;if(this.options.thumbshowimage){titleWidth-=this.options.thumbimagewidth+2*this.options.thumbimageborder;var imgLeft;if(this.options.thumbshowtitle)imgLeft=this.options.thumbmargin;else imgLeft=this.options.thumbwidth/2-(this.options.thumbimagewidth+2*this.options.thumbimageborder)/2;var imgTop=Math.round((this.options.thumbheight-2)/2-(this.options.thumbimageheight+2*this.options.thumbimageborder)/2);styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:"+imgTop+"px;
35 margin-left:"+imgLeft+"px; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+ 362*this.options.thumbimageborder)+"px;}"}else styleCss+=" .html5gallery-tn-img-"+this.id+" {display:none;}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:left; margin-top:0px; margin-left:"+this.options.thumbmargin+"px; width:"+titleWidth+"px;height:"+String(this.options.thumbheight-2)+"px;"+(this.options.thumbshowdescription?"":"line-height:"+String(this.options.thumbheight-2)+"px;")+"}";styleCss+=" .html5gallery-tn-title-"+this.id+ 37this.options.thumbtitlecss;styleCss+=" .html5gallery-tn-description-"+this.id+this.options.thumbdescriptioncss}else{styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";styleCss+=" .html5gallery-tn-description-"+this.id+" {display:none;}"}this.carouselHighlight=function(index){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.visibleElemLength){$(".html5gallery-thumbs-"+this.id,this.$gallery).css({"margin-top":0});return}var pos=Math.floor(index/this.options.thumbShowNum)*this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;var m1=pos/(this.visibleElemLength*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight);m1=m1*(this.options.carouselSliderMax-this.options.carouselSliderMin);$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:m1},300);$(".html5gallery-thumbs-"+this.id,this.$gallery).stop(true).animate({marginTop:-1*pos},300);this.updateCarouseButtons(-pos)};this.carouselBarClicked=function(event){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);var pos;if(event.pageY>$(".html5gallery-car-slider-"+this.id,this.$gallery).offset().top){pos=-1*parseInt($thumbContainer.css("margin-top"))+this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight}else{pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0}$thumbContainer.stop(true).animate({marginTop:-pos},500);this.updateCarouseButtons(-pos);var m1=this.visibleElemLength*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight;pos=pos*(this.options.carouselSliderMax-this.options.carouselSliderMin)/m1;if(pos<this.options.carouselSliderMin)pos=this.options.carouselSliderMin;if(pos>this.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).stop(true).animate({top:pos},500)};this.carouselSliderDrag=function(offsetY){var pos=offsetY-$(".html5gallery-car-slider-bar-"+this.id,this.$gallery).offset().top;if(pos<this.options.carouselSliderMin)pos=this.options.carouselSliderMin;if(pos>this.options.carouselSliderMax)pos=this.options.carouselSliderMax;$(".html5gallery-car-slider-"+this.id,this.$gallery).css({top:pos});var m1=this.visibleElemLength*(this.options.thumbheight+this.options.thumbgap)-this.options.thumbMaskHeight;m1=m1*pos/(this.options.carouselSliderMax-this.options.carouselSliderMin);m1=Math.round(m1/(this.options.thumbheight+this.options.thumbgap));m1=-1*m1*(this.options.thumbheight+this.options.thumbgap);$(".html5gallery-thumbs-"+this.id,this.$gallery).stop(true).animate({marginTop:m1},300)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+ 38this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-top"))==0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))-this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-top"))==-(this.options.thumbTotalHeight- 39this.options.thumbMaskHeight))return;else{var pos=-1*parseInt($thumbContainer.css("margin-top"))+this.options.thumbShowNum*(this.options.thumbheight+this.options.thumbgap);if(pos>=this.options.thumbTotalHeight-this.options.thumbMaskHeight)pos=this.options.thumbTotalHeight-this.options.thumbMaskHeight;$thumbContainer.animate({marginTop:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery);var rightMost=-1*(this.options.thumbTotalHeight-this.options.thumbMaskHeight);if(pos==0){$leftButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});
39$leftButton.data("disabled",false)}if(pos==rightMost){$rightButton.css({"background-position":"-"+ 40String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$rightButton.data("disabled",true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px",cursor:"pointer"});$rightButton.data("disabled",false)}}}else $(".html5gallery-car-"+this.id).css({display:"none"});styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";styleCss+=this.addCommonStyle();if(this.options.showcarousel&&this.options.showcategory){var catSelect='<div class="html5gallery-cat-selection-'+ 41this.id+'">';catSelect+='<select class="html5gallery-cat-dropdown-'+this.id+'">';for(var i=0;i<this.options.categorylist.length;i++)catSelect+="<option"+(this.selectedcategory==this.options.categorylist[i].slug?" selected":"")+' value="'+this.options.categorylist[i].slug+'">'+this.options.categorylist[i].caption+"</option>";catSelect+="</select>";catSelect+="</div>";$(".html5gallery-car-"+this.id).prepend(catSelect);var instance=this;$(".html5gallery-cat-dropdown-"+this.id).change(function(){instance.selectedcategory=String($(this).val());instance.resizeStyleVertical()})}$("head").append("<style type='text/css' data-creator='html5gallery'>"+styleCss+"</style>")},resizeImageToolbox:function(){if(this.options.imagetoolboxstyle!="center"){var buttonT=Math.round((this.options.headerpos=="bottom"||this.options.headerpos=="bottomoutside"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.boxWidth-48;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;$(".html5gallery-play-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-pause-"+this.id).css({"top":buttonB+"px","left":buttonR2+"px"});$(".html5gallery-left-"+this.id).css({"top":buttonT+"px"});
41$(".html5gallery-right-"+this.id).css({"top":buttonT+"px","left":buttonR1+"px"});$(".html5gallery-lightbox-"+this.id).css({"top":buttonB+"px","left":buttonR1+"px"})}},createImageToolbox:function(){if(this.elemArray.length<=1)this.options.showplaybutton=this.options.showprevbutton=this.options.shownextbutton=false;if(this.options.showimagetoolbox!="never"){var styleCss;if(this.options.imagetoolboxstyle=="center"){var toolboxH=40;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; overflow:hidden; position:relative; margin:0px auto; text-align:center; height:"+toolboxH+"px;}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:block; left:0px; top:0px; width:100%; height:100%; position:absolute; filter:alpha(opacity=60); opacity:0.6; background-color:#222222; }";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block; margin:0px auto; height:100%;}";styleCss+=" .html5gallery-play-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"play.png') no-repeat top left; } ";styleCss+=" .html5gallery-pause-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"pause.png') no-repeat top left; } ";styleCss+=" .html5gallery-left-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+ 42Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"prev.png') no-repeat top left; } ";styleCss+=" .html5gallery-right-"+this.id+" { position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"next.png') no-repeat top left; } ";styleCss+=" .html5gallery-lightbox-"+ 43this.id+" {position:relative; float:left; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:"+Math.round(toolboxH/2-16)+"px; background:url('"+this.options.skinfolder+"lightbox.png') no-repeat top left; } "}else{var buttonT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2-24);var buttonB=buttonT+Math.round(this.options.height/2)-32;var buttonR=this.options.width-54;var buttonR1=buttonR;var buttonR2=this.options.showfullscreenbutton?buttonR1-48:buttonR1;styleCss=" .html5gallery-toolbox-"+this.id+" {display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+";}";styleCss+=" .html5gallery-toolbox-bg-"+this.id+" {display:none;}";styleCss+=" .html5gallery-toolbox-buttons-"+this.id+" {display:block;}";styleCss+=" .html5gallery-play-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_play.png') no-repeat top left;} ";styleCss+=" .html5gallery-pause-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR2+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_pause.png') no-repeat top left;} ";styleCss+=" .html5gallery-left-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonT+"px; left:0px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_prev.png') no-repeat center center;} ";styleCss+=" .html5gallery-right-"+this.id+" { position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonT+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_next.png') no-repeat center center;} ";styleCss+=" .html5gallery-lightbox-"+this.id+" {position:absolute; display:"+(this.options.imagetoolboxmode=="show"?"block":"none")+"; cursor:pointer; top:"+buttonB+"px; left:"+buttonR1+"px; width:48px; height:48px; background:url('"+this.options.skinfolder+"side_lightbox.png') no-repeat top left;} "}$(".html5gallery-play-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-pause-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-left-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-right-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$(".html5gallery-lightbox-"+this.id,this.$gallery).hover(function(){$(this).css({"background-position":"right top"})},function(){$(this).css({"background-position":"left top"})});$("head").append("<style type='text/css' data-creator='html5gallery'>"+styleCss+"</style>")}this.showimagetoolbox=function(type,noeffect){if(!this.options.showplaybutton&&!this.options.showprevbutton&&!this.options.shownextbutton&&!this.options.showfullscreenbutton)return;var instance=this;clearTimeout(instance.hideToolboxTimeout);instance.hideToolboxTimeout=setTimeout(function(){instance.hideimagetoolbox()},3E3);if(this.options.imagetoolboxstyle=="center"){var toolboxT=Math.round((this.options.headerpos=="bottom"?0:this.options.headerHeight)+this.options.height/2);if(type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)toolboxT+=45;$(".html5gallery-toolbox-"+this.id,this.$gallery).css({"top":toolboxT});var toolboxW=0;
43if(this.options.showplaybutton&&(type==TYPE_IMAGE||this.options.showplaypausefullscreenforall&&(!this.options.hideplaypausefullscreenwhenvideoisplaying||!this.isVideoPlaying))){toolboxW+=36;if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).show()}}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton){toolboxW+=36;$(".html5gallery-left-"+this.id,this.$gallery).show()}else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton){toolboxW+=36;$(".html5gallery-right-"+this.id,this.$gallery).show()}else $(".html5gallery-right-"+this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&(type==TYPE_IMAGE||this.options.showplaypausefullscreenforall&&(!this.options.hideplaypausefullscreenwhenvideoisplaying||!this.isVideoPlaying))){toolboxW+=36;$(".html5gallery-lightbox-"+this.id,this.$gallery).show()}else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide();$(".html5gallery-toolbox-"+this.id,this.$gallery).css({width:toolboxW+16});$(".html5gallery-toolbox-buttons-"+this.id,this.$gallery).css({width:toolboxW})}else{if(this.options.showplaybutton&&(type==TYPE_IMAGE||this.options.showplaypausefullscreenforall&&(!this.options.hideplaypausefullscreenwhenvideoisplaying||!this.isVideoPlaying)))if(this.isPaused){$(".html5gallery-play-"+this.id,this.$gallery).show();$(".html5gallery-pause-"+ 44this.id,this.$gallery).hide()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).show()}else{$(".html5gallery-play-"+this.id,this.$gallery).hide();$(".html5gallery-pause-"+this.id,this.$gallery).hide()}if(this.options.showprevbutton)$(".html5gallery-left-"+this.id,this.$gallery).show();else $(".html5gallery-left-"+this.id,this.$gallery).hide();if(this.options.shownextbutton)$(".html5gallery-right-"+this.id,this.$gallery).show();else $(".html5gallery-right-"+ 45this.id,this.$gallery).hide();if(this.options.showfullscreenbutton&&(type==TYPE_IMAGE||this.options.showplaypausefullscreenforall&&(!this.options.hideplaypausefullscreenwhenvideoisplaying||!this.isVideoPlaying)))$(".html5gallery-lightbox-"+this.id,this.$gallery).show();else $(".html5gallery-lightbox-"+this.id,this.$gallery).hide()}if(this.options.isIE678||noeffect)$(".html5gallery-toolbox-"+this.id,this.$gallery).show();else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeIn()};this.hideimagetoolbox=function(){if(this.options.imagetoolboxmode=="show")return;clearTimeout(this.hideToolboxTimeout);if(this.options.isIE678)$(".html5gallery-toolbox-"+this.id,this.$gallery).hide();else $(".html5gallery-toolbox-"+this.id,this.$gallery).fadeOut()}},resizeStyleDefault:function(){if(!this.container.parent()||!this.container.parent().width())return;var instance=this;this.options.containerWidth=this.container.parent().width();this.options.totalWidth=this.options.containerWidth;this.options.width=this.options.totalWidth- 462*this.options.padding;this.visibleElemLength=this.elemArray.length;if(this.options.showcarousel&&this.options.showcategory)if(this.selectedcategory=="all"){$(".html5gallery-tn-"+this.id).css({display:"block"});$(".html5gallery-tn-"+this.id).removeClass("html5gallery-tn-hidden")}else{this.visibleElemLength=0;$(".html5gallery-tn-"+this.id).each(function(){var match=false;if($(this).data("category")){var cats=String($(this).data("category")).split(":");if($.inArray(instance.selectedcategory,cats)>=0){match=true;instance.visibleElemLength++}}$(this).css({display:match?"block":"none"});if(!match)$(this).addClass("html5gallery-tn-hidden");else $(this).removeClass("html5gallery-tn-hidden")})}if(this.options.titlesmallscreen){var fullW=$(window).width();if(fullW<this.options.titlesmallscreenwidth)this.options.titleheight=this.options.titleheightsmallscreen;else this.options.titleheight=this.options.titleheightlargescreen;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+this.options.socialheight}if(this.options.showcarousel){this.options.carouselHeight=this.options.thumbheight+2*this.options.thumbmargin;if(this.options.carouselmultirows){if(this.options.thumbresponsive=="samecolumn"){this.options.carouselcolumn=this.options.thumbcolumns;if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize)this.options.carouselcolumn=this.options.thumbsmallcolumns;else if(fullW<this.options.thumbmediumsize)this.options.carouselcolumn=this.options.thumbmediumcolumns}this.options.thumbwidth=Math.min((this.options.width-this.options.thumbgap*(this.options.carouselcolumn-1))/this.options.carouselcolumn);this.options.thumbheight=this.options.thumbwidth*this.options.thumboriginalheight/this.options.thumboriginalwidth;this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight;this.options.carouselHeight=Math.ceil(this.visibleElemLength/this.options.carouselcolumn)*(this.options.thumbheight+this.options.thumbrowgap)}else{if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize){this.options.thumbwidth=this.options.thumbsmallwidth;this.options.thumbheight=this.options.thumbsmallheight;this.options.thumbtitleheight=this.options.thumbsmalltitleheight}else if(fullW<this.options.thumbmediumsize){this.options.thumbwidth=this.options.thumbmediumwidth;this.options.thumbheight=this.options.thumbmediumheight;this.options.thumbtitleheight=this.options.thumbmediumtitleheight}else{this.options.thumbwidth=this.options.thumboriginalwidth;this.options.thumbheight=this.options.thumboriginalheight;this.options.thumbtitleheight=this.options.thumboriginaltitleheight}this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight}this.options.carouselcolumn=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(this.options.carouselcolumn<1)this.options.carouselcolumn=1;this.options.carouselHeight=Math.ceil(this.visibleElemLength/this.options.carouselcolumn)*(this.options.thumbheight+this.options.thumbrowgap)}if(this.options.carouselpagination)if(this.visibleElemLength>this.options.carouselcolumn*this.options.carouselpaginationrow){this.options.carouselHeight=this.options.carouselpaginationrow*(this.options.thumbheight+this.options.thumbrowgap);var activepage=0;
46if($(".html5gallery-pagination-"+this.id).length>0){var itemindex=$(".html5gallery-pagination-"+this.id).data("itemindex");activepage=Math.floor(itemindex/(this.options.carouselcolumn*this.options.carouselpaginationrow))}this.drawPagination(activepage)}else this.resetPagination()}else if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize){this.options.thumbwidth=this.options.thumbsmallwidth;this.options.thumbheight=this.options.thumbsmallheight;this.options.thumbtitleheight=this.options.thumbsmalltitleheight}else if(fullW<this.options.thumbmediumsize){this.options.thumbwidth=this.options.thumbmediumwidth;this.options.thumbheight=this.options.thumbmediumheight;this.options.thumbtitleheight=this.options.thumbmediumtitleheight}else{this.options.thumbwidth=this.options.thumboriginalwidth;this.options.thumbheight=this.options.thumboriginalheight;this.options.thumbtitleheight=this.options.thumboriginaltitleheight}this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight}}if(this.options.responsivefullscreen&&this.container.parent().height()>0){this.options.containerHeight=this.container.parent().height();this.options.totalHeight=this.options.containerHeight;this.options.height=this.options.totalHeight-(this.options.headerHeight+2*this.options.padding);if(this.options.carouselHeight+this.options.carouselmargin>0)this.options.height-=this.options.carouselHeight+this.options.carouselmargin}else{this.options.height=Math.round(this.options.width*this.CalcOriginalHeight(this.options.originalHeight)/this.options.originalWidth);this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerHeight=this.options.totalHeight}if(this.options.showcarousel&&this.options.showcategory){this.options.totalHeight+=this.options.categoryheight;this.options.containerHeight+=this.options.categoryheight}this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});this.options.boxWidth=this.options.width;if(this.options.headerpos=="bottomoutside")this.options.boxHeight=this.options.height;else this.options.boxHeight=this.options.height+this.options.headerHeight;if(this.options.slideshadow)this.options.boxWidth+=8;if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselLeft=this.options.padding;if(this.options.carouselposition=="top")this.options.carouselTop=this.options.padding;else this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin}$(".html5gallery-container-"+this.id).css({width:this.options.totalWidth+"px",height:this.options.totalHeight+"px"});$(".html5gallery-box-"+this.id).css({width:this.options.boxWidth+"px",height:this.options.boxHeight+"px"});var type=this.elemArray[this.curElem][ELEM_TYPE];if(type==TYPE_IMAGE||this.showingPoster){var imageWidth=this.showingPoster?this.elemArray[this.curElem][ELEM_POSTERWIDTH]:this.elemArray[this.curElem][ELEM_WIDTH];var imageHeight=this.showingPoster?this.elemArray[this.curElem][ELEM_POSTERHEIGHT]:this.elemArray[this.curElem][ELEM_HEIGHT];var scale;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/imageWidth,fullH/imageHeight);scale=scale>1?1:scale}else if(this.options.resizemode=="fill")scale=Math.max(this.options.width/imageWidth,this.options.height/imageHeight);else scale=Math.min(this.options.width/imageWidth,this.options.height/imageHeight);var w=Math.round(scale*imageWidth);var h=Math.round(scale*imageHeight);var w1=this.isFullscreen?w:this.options.width;var h1=this.isFullscreen?h:this.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(this.isFullscreen)this.adjustFullscreen(w1,h1,true);
46$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-img-"+this.id).css({width:w1+"px",height:h1+"px"});$(".html5gallery-elem-image-"+this.id).css({width:w+"px",height:h+"px",top:t+"px",left:l+"px"})}else if(type==TYPE_IFRAME||type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO){var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var fullW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fullH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;scale=Math.min(fullW/dataW,fullH/dataH);scale=scale>1?1:scale;w1=Math.round(scale*dataW);h1=Math.round(scale*dataH);this.adjustFullscreen(w1,h1,true)}else{w1=this.options.width;h1=this.options.height}
46$(".html5gallery-elem-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id).css({"width":"100%","height":"100%"});$(".html5gallery-elem-video-container-"+ 47this.id).find("video").css({"width":"100%","height":"100%"});$("#html5gallery-elem-video-"+this.id).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id).attr("width",w1);$("#html5gallery-elem-video-"+this.id).attr("height",h1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id).find("iframe").attr("height",h1);$(".html5gallery-elem-iframe-"+this.id).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-iframe-"+this.id).find("iframe").attr("width",w1);$(".html5gallery-elem-iframe-"+this.id).find("iframe").attr("height",h1)}var titleTop=0;var socialTop=0;if(this.options.headerpos=="bottom"){titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}else if(this.options.headerpos=="bottomoutside")if(this.options.showcarousel){titleTop=this.options.height+this.options.carouselHeight;if(this.options.showcategory)titleTop+=this.options.categoryheight}else titleTop=this.options.height;var titleWidth=this.options.slideshadow?this.options.boxWidth-8:this.options.boxWidth;
47$(".html5gallery-title-"+this.id).css({width:titleWidth+"px"});if(!this.options.titleoverlay)$(".html5gallery-title-"+this.id).css({top:titleTop+"px"});$(".html5gallery-viral-"+this.id).css({top:socialTop+"px"});$(".html5gallery-timer-"+this.id).css({top:String(this.options.elemTop+this.options.height-2)+"px"});if(this.options.showcarousel){$(".html5gallery-car-"+this.id).css({width:this.options.width+"px",top:this.options.carouselTop+"px"});var carLeft=4;var carRight=4;$(".html5gallery-car-list-"+this.id).css({width:String(this.options.width-carLeft-carRight)+"px"});this.options.carouselNavButton=false;if(!this.options.carouselmultirows&&Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+ 48this.options.thumbgap))<this.visibleElemLength)this.options.carouselNavButton=true;var carButtonW=this.options.carouselNavButton?this.options.carouselarrowwidth*2+8:0;$(".html5gallery-car-left-"+this.id).css({display:this.options.carouselNavButton?"block":"none"});$(".html5gallery-car-right-"+this.id).css({display:this.options.carouselNavButton?"block":"none"});this.options.thumbShowNum=Math.floor((this.options.width-carLeft-carRight-carButtonW)/(this.options.thumbwidth+this.options.thumbgap));if(this.options.thumbShowNum<1)this.options.thumbShowNum=1;this.options.thumbMaskWidth=this.options.thumbShowNum*this.options.thumbwidth+this.options.thumbShowNum*this.options.thumbgap;this.options.thumbTotalWidth=this.visibleElemLength*this.options.thumbwidth+(this.visibleElemLength-1)*this.options.thumbgap;var marginL=0;if(this.options.carouselmultirows){if(this.options.thumbresponsive=="samecolumn")$(".html5gallery-thumbs-"+this.id).css({"margin-left":"0px",width:String((this.options.thumbwidth+this.options.thumbgap)*this.options.carouselcolumn)+"px"});else{var column=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(column<1)column=1;marginL=(this.options.width-column*this.options.thumbwidth-(column-1)*this.options.thumbgap)/2;$(".html5gallery-thumbs-"+this.id).css({"margin-left":marginL+"px",width:this.options.width+"px"})}$(".html5gallery-tn-"+this.id).css({width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px"});$(".html5gallery-tn-selected-"+this.id).css({width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px"});$(".html5gallery-tn-img-"+this.id).css({width:String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px",height:String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px"});
48$(".html5gallery-tn-image-"+this.id).parent().css({width:this.options.thumbimagewidth+"px",height:this.options.thumbimageheight+"px"});$(".html5gallery-tn-title-"+this.id).css({width:String(this.options.thumbwidth-2)+"px"});$(".html5gallery-tn-title-"+this.id).css({height:this.options.thumbtitleheight+"px"})}else{this.options.thumbShowNum=Math.floor((this.options.width-carLeft-carRight-carButtonW)/(this.options.thumbwidth+this.options.thumbgap));if(this.options.thumbShowNum<1)this.options.thumbShowNum=1;this.options.thumbMaskWidth=this.options.thumbShowNum*this.options.thumbwidth+this.options.thumbShowNum*this.options.thumbgap;this.options.thumbTotalWidth=this.visibleElemLength*this.options.thumbwidth+(this.visibleElemLength-1)*this.options.thumbgap;var marginL=0;if(this.options.thumbMaskWidth>this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;this.options.carouselTotalHeight=this.options.carouselHeight+(this.options.showcategory?this.options.categoryheight:0);
48$(".html5gallery-car-"+this.id).css({height:this.options.carouselTotalHeight+"px"});$(".html5gallery-car-list-"+this.id).css({height:this.options.carouselHeight+"px"});$(".html5gallery-car-left-"+this.id).css({top:String(this.options.carouselHeight/2-this.options.carouselarrowheight/2)+"px"});$(".html5gallery-car-right-"+this.id).css({top:String(this.options.carouselHeight/2-this.options.carouselarrowheight/2)+"px"});$(".html5gallery-tn-title-"+this.id).css({width:String(this.options.thumbwidth-2)+"px"});$(".html5gallery-tn-title-"+this.id).css({height:this.options.thumbtitleheight+"px"});$(".html5gallery-tn-"+this.id).css({width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px"});$(".html5gallery-tn-selected-"+this.id).css({width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px"});$(".html5gallery-tn-img-"+this.id).css({width:String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px",height:String(this.options.thumbimageheight+2*this.options.thumbimageborder)+"px"});
48$(".html5gallery-tn-image-"+this.id).parent().css({width:this.options.thumbimagewidth+"px",height:this.options.thumbimageheight+"px"});$(".html5gallery-thumbs-"+this.id).css({"margin-left":marginL+"px",width:String(this.visibleElemLength*(this.options.thumbwidth+ 49this.options.thumbgap))+"px"})}var w="100%";var h="auto";$(".html5gallery-tn-image-"+this.id).each(function(){var originalwidth=$(this).data("originalwidth");var originalheight=$(this).data("originalheight");if(originalwidth>0&&originalheight>0){var scale=Math.max(instance.options.thumbimagewidth/originalwidth,instance.options.thumbimageheight/originalheight);w=Math.round(scale*originalwidth)+"px";h=Math.round(scale*originalheight)+"px"}$(this).css({width:w,height:h})});var maskLeft=Math.round((this.options.width- 50carLeft-carRight)/2-this.options.thumbMaskWidth/2);$(".html5gallery-car-mask-"+this.id).css({left:maskLeft+"px",width:this.options.thumbMaskWidth+"px",height:this.options.carouselHeight+"px"});if(this.options.carouselmultirows&&this.options.carouselpagination){$(".html5gallery-thumbs-"+this.id).css({"margin-left":"0"});$(".html5gallery-car-mask-"+this.id).css({"margin-left":marginL+"px"})}this.carouselHighlight(this.curElem,true)}},resetPagination:function(){$(".html5gallery-pagination-"+this.id).remove();this.movePagination(0,this.visibleElemLength)},drawPagination:function(activepage){var inst=this;this.options.numperpage=this.options.carouselcolumn*this.options.carouselpaginationrow;this.options.page_count=Math.ceil(this.visibleElemLength/this.options.numperpage);if(activepage>=this.options.page_count)activepage=this.options.page_count-1;if(activepage<0)activepage=0;var itemindex=activepage*this.options.numperpage;var page_buttons='<div class="html5gallery-pagination-'+this.id+'" data-itemindex='+ 51itemindex+" data-activepage="+activepage+">";for(var i=0;i<=this.options.page_count-1;i++)page_buttons+='<button type="button" class="html5gallery-pagination-btn'+(i==activepage?" html5gallery-pagination-btn-selected":"")+'" data-pageindex="'+i+'">'+(i+1).toString()+"</button>";page_buttons+="</div>";$(".html5gallery-pagination-"+this.id).remove();
51$(".html5gallery-car-"+this.id).append(page_buttons);this.movePagination(activepage,this.options.numperpage);$(".html5gallery-pagination-"+this.id+" .html5gallery-pagination-btn").click(function(){var activepage=$(this).data("pageindex");inst.drawPagination(activepage)})},movePagination:function(activepage,numperpage){var itemStart=activepage*numperpage;var itemIndex=0;$(".html5gallery-tn-"+this.id).each(function(){if($(this).hasClass("html5gallery-tn-hidden"))return true;if(itemIndex>=itemStart&&itemIndex<itemStart+numperpage)$(this).css({display:"block"});else $(this).css({display:"none"});itemIndex++})},createStyleDefault:function(){this.options.originalWidth=this.options.width;this.options.originalHeight=this.options.height;this.options.height=Math.round(this.options.width*this.CalcOriginalHeight(this.options.originalHeight)/this.options.originalWidth);this.options.thumboriginalwidth=this.options.thumbwidth;this.options.thumboriginalheight=this.options.thumbheight;this.options.thumboriginaltitleheight=this.options.thumbtitleheight;if(this.options.thumbresponsive=="samecolumn"){this.options.carouselcolumn=this.options.thumbcolumns;if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize)this.options.carouselcolumn=this.options.thumbsmallcolumns;else if(fullW<this.options.thumbmediumsize)this.options.carouselcolumn=this.options.thumbmediumcolumns}this.options.thumbwidth=Math.min((this.options.width-this.options.thumbgap*(this.options.carouselcolumn-1))/this.options.carouselcolumn);this.options.thumbheight=this.options.thumbwidth*this.options.thumboriginalheight/this.options.thumboriginalwidth}else if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize){this.options.thumbwidth=this.options.thumbsmallwidth;this.options.thumbheight=this.options.thumbsmallheight;this.options.thumbtitleheight=this.options.thumbsmalltitleheight}else if(fullW<this.options.thumbmediumsize){this.options.thumbwidth=this.options.thumbmediumwidth;this.options.thumbheight=this.options.thumbmediumheight;this.options.thumbtitleheight=this.options.thumbmediumtitleheight}}this.options.thumbimagewidth=this.options.thumbwidth- 522*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight;if(!this.options.showtitle)this.options.titleheight=0;if(!this.options.showsocialmedia||!this.options.showfacebooklike&&!this.options.showtwitter&&!this.options.showgoogleplus)this.options.socialheight=0;this.options.headerHeight=this.options.titleoverlay?this.options.socialheight:this.options.titleheight+ 53this.options.socialheight;this.options.boxWidth=this.options.width;if(this.options.headerpos=="bottomoutside")this.options.boxHeight=this.options.height;else this.options.boxHeight=this.options.height+this.options.headerHeight;this.options.boxLeft=this.options.padding;this.options.boxTop=this.options.padding;if(this.options.slideshadow){this.options.boxWidth+=8;this.options.boxLeft-=4;this.options.boxTop-=4}if(this.options.showcarousel){this.options.carouselWidth=this.options.width;this.options.carouselHeight=this.options.thumbheight+2*this.options.thumbmargin;this.options.carouselLeft=this.options.padding;if(this.options.carouselposition=="top"){this.options.carouselTop=this.options.padding;this.options.boxTop=this.options.padding+this.options.carouselHeight+this.options.carouselmargin;if(this.options.showcategory)this.options.boxTop+=this.options.categoryheight}else this.options.carouselTop=this.options.padding+this.options.boxHeight+this.options.carouselmargin;if(this.options.carouselmultirows){if(this.options.thumbresponsive=="samecolumn"){this.options.carouselcolumn=this.options.thumbcolumns;if(this.options.thumbcolumnsresponsive){var fullW=$(window).width();if(fullW<this.options.thumbsmallsize)this.options.carouselcolumn=this.options.thumbsmallcolumns;else if(fullW<this.options.thumbmediumsize)this.options.carouselcolumn=this.options.thumbmediumcolumns}this.options.thumbwidth=Math.min((this.options.width-this.options.thumbgap*(this.options.carouselcolumn-1))/this.options.carouselcolumn);this.options.thumbheight=this.options.thumbwidth*this.options.thumboriginalheight/this.options.thumboriginalwidth;this.options.thumbimagewidth=this.options.thumbwidth-2*this.options.thumbimageborder;this.options.thumbimageheight=this.options.thumbheight-2*this.options.thumbimageborder;if(this.options.thumbshowtitle)this.options.thumbheight+=this.options.thumbtitleheight;this.options.carouselHeight=Math.ceil(this.elemArray.length/this.options.carouselcolumn)*(this.options.thumbheight+this.options.thumbrowgap)}else{this.options.carouselcolumn=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(this.options.carouselcolumn<1)this.options.carouselcolumn=1;this.options.carouselHeight=Math.ceil(this.elemArray.length/this.options.carouselcolumn)*(this.options.thumbheight+this.options.thumbrowgap)}if(this.options.carouselpagination)if(this.visibleElemLength>this.options.carouselcolumn*this.options.carouselpaginationrow){this.options.carouselHeight=this.options.carouselpaginationrow*(this.options.thumbheight+this.options.thumbrowgap);this.drawPagination(0)}}}else{this.options.carouselWidth=0;this.options.carouselHeight=0;this.options.carouselLeft=0;this.options.carouselTop=0;this.options.carouselmargin=0}this.options.totalWidth=this.options.width+2*this.options.padding;this.options.totalHeight=this.options.height+this.options.carouselHeight+this.options.carouselmargin+this.options.headerHeight+2*this.options.padding;this.options.containerWidth=this.options.totalWidth;this.options.containerHeight=this.options.totalHeight;if(this.options.responsive)this.container.css({"max-width":"100%"});else this.container.css({"width":this.options.containerWidth,"height":this.options.containerHeight});var titleTop=0;var socialTop=0;this.options.elemTop=0;if(this.options.headerpos=="top"){socialTop=0;titleTop=this.options.socialheight;this.options.elemTop=this.options.headerHeight}else if(this.options.headerpos=="bottom"){this.options.elemTop=0;titleTop=this.options.titleoverlay?this.options.height-this.options.titleheight:this.options.height;socialTop=this.options.titleoverlay?this.options.height:this.options.height+this.options.titleheight}var styleCss="";
53$(".html5gallery-container-"+this.id).css({display:"block",position:"absolute",left:0,top:0,width:this.options.totalWidth+"px",height:this.options.totalHeight+"px","background-color":this.options.bgcolor});if(this.options.bgimage)$(".html5gallery-container-"+this.id).css({background:"url('"+this.options.bgimage+"') center top"});if(this.options.galleryshadow)styleCss+=" .html5gallery-container-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";$(".html5gallery-box-"+this.id).css({display:"block",position:"absolute","text-align":"center",left:this.options.boxLeft+"px",top:this.options.boxTop+"px",width:this.options.boxWidth+"px",height:this.options.boxHeight+"px"});var viralPaddingTop=Math.round(this.options.socialheight/2-12);styleCss+=" .html5gallery-title-text-"+this.id+" "+this.options.titlecss+" .html5gallery-title-text-"+this.id+" "+this.options.titlecsslink+" .html5gallery-error-"+this.id+" "+this.options.errorcss;styleCss+=" .html5gallery-description-text-"+ 54this.id+" "+this.options.descriptioncss+" .html5gallery-description-text-"+this.id+" "+this.options.descriptioncsslink;styleCss+=" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlecss+" .html5gallery-fullscreen-title-"+this.id+""+this.options.lightboxtitlelinkcss;styleCss+=" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptioncss+" .html5gallery-fullscreen-description-"+this.id+""+this.options.lightboxdescriptionlinkcss;styleCss+=" .html5gallery-viral-"+ 55this.id+" {display:block; overflow:hidden; position:absolute; text-align:left; top:"+socialTop+"px; left:0px; width:"+this.options.boxWidth+"px; height:"+this.options.socialheight+"px; padding-top:"+viralPaddingTop+"px;}";var titleWidth=this.options.slideshadow?this.options.boxWidth-8:this.options.boxWidth;styleCss+=" .html5gallery-title-"+this.id+" {display:"+(this.options.titleoverlay&&this.options.titleautohide?"none":"block")+"; overflow:hidden; position:absolute; left:0px; width:"+titleWidth+"px; ";if(!this.options.titleoverlay){styleCss+="top:"+titleTop+"px; height:"+this.options.titleheight+"px; }";if(this.options.titlesmallscreen)styleCss+=" @media (max-width: "+this.options.titlesmallscreenwidth+"px) { .html5gallery-title-"+this.id+" {height:"+this.options.titleheightsmallscreen+"px; }}"}else if(this.options.headerpos=="top")styleCss+="top:0px; height:auto; }";else styleCss+="bottom:0px; height:auto; }";styleCss+=" .html5gallery-timer-"+this.id+" {display:block; position:absolute; top:"+ 56String(this.options.elemTop+this.options.height-2)+"px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }";styleCss+=" .html5gallery-elem-"+this.id+" {display:block; overflow:hidden; position:absolute; top:"+this.options.elemTop+"px; left:0px; width:"+this.options.width+"px; height:"+this.options.height+"px;}";if(this.options.isIE7||this.options.isIE6){styleCss+=" .html5gallery-loading-"+this.id+" {display:none; }";styleCss+=" .html5gallery-loading-center-"+ 57this.id+" {display:none; }"}else{styleCss+=" .html5gallery-loading-"+this.id+" {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('"+this.options.loadinggif+"') no-repeat top right;}";styleCss+=" .html5gallery-loading-center-"+this.id+" {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('"+this.options.centerloadinggif+"') no-repeat center center;}"}if(this.options.borderradius>0)styleCss+=" .html5gallery-elem-"+ 58this.id+" {overflow:hidden; border-radius:"+this.options.borderradius+"px; -moz-border-radius:"+this.options.borderradius+"px; -webkit-border-radius:"+this.options.borderradius+"px;}";if(this.options.slideshadow){styleCss+=" .html5gallery-title-"+this.id+" { padding:4px;}";styleCss+=" .html5gallery-timer-"+this.id+" { margin:4px;}";styleCss+=" .html5gallery-elem-"+this.id+" { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"}if(this.options.showcarousel)this.visibleElemLength=this.elemArray.length;if(this.options.showcarousel&&this.options.carouselmultirows){if(this.options.carouselpagination){styleCss+=" .html5gallery-car-mask-"+this.id+"{overflow:hidden;}";styleCss+=".html5gallery-pagination-"+this.id+"{display:block;text-align:center;margin:0 auto;}";styleCss+=".html5gallery-pagination-"+this.id+" .html5gallery-pagination-btn {display:inline-block;margin:6px;padding:4px 8px;background:#ededed;border:1px solid #dcdcdc;background:linear-gradient(to bottom, #ededed 0%, #dfdfdf 100%);color:#333;transition: background-color 0.5s ease;cursor:pointer;}";styleCss+=".html5gallery-pagination-"+this.id+" .html5gallery-pagination-btn:hover,"+".html5gallery-pagination-"+this.id+" .html5gallery-pagination-btn-selected {background: #dfdfdf;background: linear-gradient(to bottom, #fdfdfd 0%, #ededed 100%);}"}styleCss+=" .html5gallery-car-"+this.id+" { position:absolute; display:block; overflow:hidden; left:"+this.options.carouselLeft+"px; top:"+this.options.carouselTop+"px; width:"+this.options.width+"px;";if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+="background:url('"+this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var column=Math.floor(this.options.width/(this.options.thumbwidth+this.options.thumbgap));if(column<1)column=1;var marginL=(this.options.width-column*this.options.thumbwidth-(column-1)*this.options.thumbgap)/2;var thumbsWidth=this.options.thumbresponsive=="samecolumn"?(this.options.thumbwidth+this.options.thumbgap)*this.options.carouselcolumn:this.options.width;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+ 59thumbsWidth+"px; top:0px; }";
59$(".html5gallery-tn-"+this.id).css({display:"block","float":"left","margin-left":0,"margin-right":this.options.thumbgap+"px","margin-bottom":this.options.thumbrowgap+"px","text-align":"center",cursor:"pointer",width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px",overflow:"hidden"});if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; float:left; margin-left:0px; margin-right:"+this.options.thumbgap+"px; margin-bottom:"+this.options.thumbrowgap+"px; text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+ 602*this.options.thumbimageborder)+"px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+=" .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";this.carouselHighlight=function(index,nonanimation){}}else if(this.options.showcarousel){styleCss+=" .html5gallery-car-"+this.id+" {";this.options.carouselTotalHeight=this.options.carouselHeight+(this.options.showcategory?this.options.categoryheight:0);
60$(".html5gallery-car-"+this.id).css({position:"absolute",display:"block",overflow:"hidden",left:this.options.carouselLeft+"px",top:this.options.carouselTop+"px",width:this.options.width+"px",height:this.options.carouselTotalHeight+"px"});if(this.options.carouselbgtransparent)styleCss+="background-color:transparent;";else styleCss+="border-top:1px solid "+this.options.carouseltopborder+";"+"border-bottom:1px solid "+this.options.carouselbottomborder+";"+"background-color: "+this.options.carouselbgcolorend+"; "+"background: "+this.options.carouselbgcolorend+" -webkit-gradient(linear, left top, left bottom, from("+this.options.carouselbgcolorstart+"), to("+this.options.carouselbgcolorend+")) no-repeat; "+"background: "+this.options.carouselbgcolorend+" -moz-linear-gradient(top, "+this.options.carouselbgcolorstart+", "+this.options.carouselbgcolorend+") no-repeat; "+"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+") no-repeat; "+"-ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr="+this.options.carouselbgcolorstart+", endColorstr="+this.options.carouselbgcolorend+")' no-repeat;";if(this.options.carouselbgimage)styleCss+="background:url('"+ 61this.options.skinfolder+this.options.carouselbgimage+"') center top;";styleCss+="}";var carLeft=4;var carRight=4;styleCss+=" .html5gallery-car-list-"+this.id+" { position:relative; display:block; overflow:hidden; left:"+carLeft+"px; width:"+String(this.options.width-carLeft-carRight)+"px; height:"+this.options.carouselHeight+"px; "+"}";this.options.carouselNavButton=false;if(Math.floor((this.options.width-carLeft-carRight)/(this.options.thumbwidth+this.options.thumbgap))<this.elemArray.length)this.options.carouselNavButton=true;styleCss+=" .html5gallery-car-left-"+this.id+" { position:absolute; overflow:hidden; width:"+this.options.carouselarrowwidth+"px; height:"+this.options.carouselarrowheight+"px; left:0px; top:"+String(this.options.carouselHeight/2-this.options.carouselarrowheight/2)+"px; background:url('"+this.options.skinfolder+"carousel_left.png') no-repeat 0px 0px;} "+" .html5gallery-car-right-"+this.id+" { position:absolute; overflow:hidden; width:"+this.options.carouselarrowwidth+"px; height:"+this.options.carouselarrowheight+"px; right:0px; top:"+String(this.options.carouselHeight/2-this.options.carouselarrowheight/2)+"px; background:url('"+this.options.skinfolder+"carousel_right.png') no-repeat 0px 0px;} ";var carButtonW=this.options.carouselNavButton?this.options.carouselarrowwidth*2+8:0;$(".html5gallery-car-left-"+this.id).css({display:this.options.carouselNavButton?"block":"none"});
61$(".html5gallery-car-right-"+this.id).css({display:this.options.carouselNavButton?"block":"none"});this.options.thumbShowNum=Math.floor((this.options.width- 62carLeft-carRight-carButtonW)/(this.options.thumbwidth+this.options.thumbgap));if(this.options.thumbShowNum<1)this.options.thumbShowNum=1;this.options.thumbMaskWidth=this.options.thumbShowNum*this.options.thumbwidth+this.options.thumbShowNum*this.options.thumbgap;this.options.thumbTotalWidth=this.elemArray.length*this.options.thumbwidth+(this.elemArray.length-1)*this.options.thumbgap;var marginL=0;if(this.options.thumbMaskWidth>this.options.thumbTotalWidth)marginL=this.options.thumbMaskWidth/2-this.options.thumbTotalWidth/2-this.options.thumbgap/2;styleCss+=".html5gallery-thumbs-"+this.id+" { position:relative; display:block; margin-left:"+marginL+"px; width:"+String(this.elemArray.length*(this.options.thumbwidth+this.options.thumbgap))+"px; top:"+Math.round(this.options.carouselHeight/2-this.options.thumbheight/2)+"px; }";var maskLeft=Math.round((this.options.width-carLeft-carRight)/2-this.options.thumbMaskWidth/2);$(".html5gallery-car-mask-"+this.id).css({position:"absolute",display:"block","text-align":"left",overflow:"hidden",left:maskLeft+"px",width:this.options.thumbMaskWidth+"px",top:0,height:this.options.carouselHeight+"px"});$(".html5gallery-tn-"+this.id).css({display:"block","float":"left","margin-left":Math.floor(this.options.thumbgap/2)+"px","margin-right":Math.floor(this.options.thumbgap/2)+"px","text-align":"center",cursor:"pointer",width:this.options.thumbwidth+"px",height:this.options.thumbheight+"px",overflow:"hidden"});if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-selected-"+this.id+" { display:block; float:left; margin-left:"+Math.floor(this.options.thumbgap/2)+"px; margin-right:"+Math.floor(this.options.thumbgap/2)+"px;text-align:center; cursor:pointer; width:"+this.options.thumbwidth+"px;height:"+this.options.thumbheight+"px;overflow:hidden;}";if(this.options.thumbshadow)styleCss+=" .html5gallery-tn-selected-"+this.id+" { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}";styleCss+=" .html5gallery-tn-"+this.id+" {background-color:"+this.options.thumbimagebordercolor+";}"+" .html5gallery-tn-"+this.id+" { filter:alpha(opacity="+Math.round(this.options.thumbopacity*100)+"); opacity:"+this.options.thumbopacity+"; } "+" .html5gallery-tn-selected-"+this.id+" { filter:alpha(opacity=100); opacity:1; } ";styleCss+=" .html5gallery-tn-img-"+this.id+" {display:block; overflow:hidden; width:"+String(this.options.thumbimagewidth+2*this.options.thumbimageborder)+"px;height:"+String(this.options.thumbimageheight+ 632*this.options.thumbimageborder)+"px;}";if(this.options.thumbunselectedimagebordercolor)styleCss+=" .html5gallery-tn-selected-"+this.id+" {background-color:"+this.options.thumbunselectedimagebordercolor+";}";if(this.options.thumbshowtitle){styleCss+=" .html5gallery-tn-title-"+this.id+" {display:block; overflow:hidden; float:top; height:"+this.options.thumbtitleheight+"px;width:"+String(this.options.thumbwidth-2)+"px;}";styleCss+=" .html5gallery-tn-title-"+this.id+this.options.thumbtitlecss}else styleCss+=" .html5gallery-tn-title-"+this.id+" {display:none;}";this.carouselHighlight=function(index,nonanimation){$("#html5gallery-tn-"+this.id+"-"+index,this.$gallery).addClass("html5gallery-tn-selected-"+this.id);if(this.options.thumbShowNum>=this.visibleElemLength){$(".html5gallery-car-left-"+this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-left-"+this.id,this.$gallery).data("disabled",true);$(".html5gallery-car-right-"+ 64this.id,this.$gallery).css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$(".html5gallery-car-right-"+this.id,this.$gallery).data("disabled",true);return}var pos=Math.floor(index/this.options.thumbShowNum)*this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos>=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap;pos=-pos;if(nonanimation)$(".html5gallery-thumbs-"+this.id,this.$gallery).css({marginLeft:pos});else $(".html5gallery-thumbs-"+this.id,this.$gallery).animate({marginLeft:pos},500);this.updateCarouseButtons(pos)};this.carouselPrev=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==0)return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))-this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos<0)pos=0;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.carouselNext=function(){var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);if(parseInt($thumbContainer.css("margin-left"))==-(this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap))return;else{var pos=-1*parseInt($thumbContainer.css("margin-left"))+this.options.thumbShowNum*(this.options.thumbwidth+this.options.thumbgap);if(pos>=this.options.thumbTotalWidth- 65this.options.thumbMaskWidth+this.options.thumbgap)pos=this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap;$thumbContainer.animate({marginLeft:-pos},500,this.options.carouseleasing);this.updateCarouseButtons(-pos)}};this.updateCarouseButtons=function(pos){var $leftButton=$(".html5gallery-car-left-"+this.id,this.$gallery);var $rightButton=$(".html5gallery-car-right-"+this.id,this.$gallery);var rightMost=-1*(this.options.thumbTotalWidth-this.options.thumbMaskWidth+this.options.thumbgap);if(pos==0){$leftButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$leftButton.data("disabled",true)}else if($leftButton.data("disabled")){$leftButton.css({"background-position":"0px 0px",cursor:"pointer"});
65$leftButton.data("disabled",false)}if(pos==rightMost){$rightButton.css({"background-position":"-"+String(this.options.carouselarrowwidth*2)+"px 0px",cursor:""});$rightButton.data("disabled",true)}else if($rightButton.data("disabled")){$rightButton.css({"background-position":"0px 0px",cursor:"pointer"});$rightButton.data("disabled",false)}}}else $(".html5gallery-car-"+this.id).css({display:"none"});styleCss+=".html5gallery-container-"+this.id+" div {box-sizing:content-box;}";styleCss+=this.addCommonStyle();if(this.options.showcarousel&&this.options.showcategory){var catSelect='<div class="html5gallery-cat-selection-'+this.id+'">';if(this.options.categorystyle=="dropdown"){catSelect+='<select class="html5gallery-cat-dropdown-'+this.id+'">';for(var i=0;i<this.options.categorylist.length;i++)catSelect+="<option"+(this.selectedcategory==this.options.categorylist[i].slug?" selected":"")+' value="'+this.options.categorylist[i].slug+'">'+this.options.categorylist[i].caption+"</option>";catSelect+="</select>"}else for(var i=0;i<this.options.categorylist.length;i++)catSelect+='<div class="html5gallery-cat-tag-'+this.id+(this.selectedcategory==this.options.categorylist[i].slug?" html5gallery-cat-tag-selected-"+this.id:"")+'" data-catslug="'+this.options.categorylist[i].slug+'">'+this.options.categorylist[i].caption+"</div>";catSelect+="</div>";
65$(".html5gallery-car-"+this.id).prepend(catSelect);var instance=this;if(this.options.categorystyle=="dropdown")$(".html5gallery-cat-dropdown-"+this.id).change(function(){instance.selectedcategory=String($(this).val());if(instance.options.carouselmultirows&&instance.options.carouselpagination)if($(".html5gallery-pagination-"+instance.id).length>0)$(".html5gallery-pagination-"+instance.id).data("itemindex",0);instance.resizeStyleDefault()});else $(".html5gallery-cat-tag-"+ 66this.id).click(function(){$(".html5gallery-cat-tag-"+instance.id).removeClass("html5gallery-cat-tag-selected-"+instance.id);$(this).addClass("html5gallery-cat-tag-selected-"+instance.id);instance.selectedcategory=String($(this).data("catslug"));if(instance.options.carouselmultirows&&instance.options.carouselpagination)if($(".html5gallery-pagination-"+instance.id).length>0)$(".html5gallery-pagination-"+instance.id).data("itemindex",0);instance.resizeStyleDefault()})}$("head").append("<style type='text/css' data-creator='html5gallery'>"+ 67styleCss+"</style>")},addCommonStyle:function(){var styleCss="";if(this.options.thumbverticalmiddle)styleCss+=".html5gallery-tn-image-"+this.id+" {position:relative;top:50%;transform:translateY(-50%);}";return styleCss},html2Text:function(html){var tag=document.createElement("div");tag.innerHTML=html;return tag.innerText},loadCarousel:function(){var instance=this;var $thumbContainer=$(".html5gallery-thumbs-"+this.id,this.$gallery);$thumbContainer.empty();for(var i=0;i<this.elemArray.length;i++){var $thumb=$("<div "+(this.options.enabletabindex?"tabindex='0' ":"")+"id='html5gallery-tn-"+this.id+"-"+i+"' class='html5gallery-tn-"+this.id+"'"+(this.elemArray[i][ELEM_CATEGORY]?" data-category='"+this.elemArray[i][ELEM_CATEGORY]+"'":"")+" data-index="+i+" ></div>");$thumb.appendTo($thumbContainer);if(this.options.enabletabindex)$thumb.on("keydown",function(e){if(e.keyCode==13)$(this).click()});if(!this.options.thumblinkintitle){$thumb.off("click").click(function(event){instance.onThumbClick($(this).data("index"));instance.slideRun($(this).data("index"),true,true)});if(instance.options.switchonmouseover)$thumb.hover(function(){if(instance.curElem!=$(this).data("index"))$(this).click()})}$thumb.hover(function(){instance.onThumbOver($(this).data("index"));$(this).addClass("html5gallery-tn-selected-"+instance.id)},function(){if($(this).data("index")!==instance.curElem)$(this).removeClass("html5gallery-tn-selected-"+instance.id)});if(this.elemArray[i][ELEM_THUMBNAIL]&&this.options.thumbshowimage){var imgLoader=new Image;imgLoader.data=i;$(imgLoader).on("load",function(){$(this).data("originalwidth",this.width);$(this).data("originalheight",this.height);var scale=Math.max(instance.options.thumbimagewidth/this.width,instance.options.thumbimageheight/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var videoPlay=instance.options.thumbshowplayonvideo&&instance.elemArray[this.data][ELEM_TYPE]!=1?"<div class='html5gallery-tn-img-play-"+instance.id+"' style='display:block; overflow:hidden; position:absolute; width:100%;height:100%; top:"+ 68instance.options.thumbimageborder+"px; left:"+instance.options.thumbimageborder+'px;background:url("'+instance.options.playvideothumbimage+"\") no-repeat center center;'></div>":"";var imgtitle=instance.options.addthumbnailtitle&&instance.elemArray[this.data][ELEM_TITLE]?' title="'+instance.elemArray[this.data][ELEM_TITLE]+'"':"";if(instance.options.carouselmultirows&&instance.options.thumbresponsive=="samecolumn")$("#html5gallery-tn-"+instance.id+"-"+this.data,$thumbContainer).append("<div class='html5gallery-tn-img-"+ 69instance.id+"'"+imgtitle+" style='position:relative;width:"+String(instance.options.thumbimagewidth+2*instance.options.thumbimageborder)+"px;height:"+String(instance.options.thumbimageheight+2*instance.options.thumbimageborder)+"px;'><div style='display:block; overflow:hidden; position:absolute; width:"+instance.options.thumbimagewidth+"px;height:"+instance.options.thumbimageheight+"px; top:"+instance.options.thumbimageborder+"px; left:"+instance.options.thumbimageborder+"px;'>"+"<img alt='"+instance.html2Text(instance.elemArray[this.data][ELEM_ALT])+"'"+(instance.options.addimgtitle?" title='"+instance.html2Text(instance.elemArray[this.data][ELEM_TITLE])+"'":"")+" data-originalwidth="+this.width+" data-originalheight="+this.height+" class='html5gallery-tn-image html5gallery-tn-image-"+instance.id+"'"+imgtitle+" style='border:none; padding:0px; margin:0px; max-width:100%; max-height:none; width:"+w+"px; height:"+h+"px;' src='"+instance.elemArray[this.data][ELEM_THUMBNAIL]+"' /></div>"+videoPlay+"</div><div class='html5gallery-tn-title-"+instance.id+"' style='width:"+String(instance.options.thumbwidth-2)+"px;'>"+instance.elemArray[this.data][ELEM_TITLE]+(instance.options.thumbshowdescription?"<br /><span class='html5gallery-tn-description-"+instance.id+"'>"+instance.elemArray[this.data][ELEM_INFORMATION]+"</span>":"")+"</div>");else $("#html5gallery-tn-"+instance.id+"-"+this.data,$thumbContainer).append("<div class='html5gallery-tn-img-"+instance.id+"'"+imgtitle+" style='position:relative;'><div style='display:block; overflow:hidden; position:absolute; width:"+ 70instance.options.thumbimagewidth+"px;height:"+instance.options.thumbimageheight+"px; top:"+instance.options.thumbimageborder+"px; left:"+instance.options.thumbimageborder+"px;'>"+"<img alt='"+instance.html2Text(instance.elemArray[this.data][ELEM_ALT])+"'"+(instance.options.addimgtitle?" title='"+instance.html2Text(instance.elemArray[this.data][ELEM_TITLE])+"'":"")+" data-originalwidth="+this.width+" data-originalheight="+this.height+" class='html5gallery-tn-image html5gallery-tn-image-"+instance.id+"'"+imgtitle+" style='border:none; padding:0px; margin:0px; max-width:100%; max-height:none; width:"+w+"px; height:"+h+"px;' src='"+instance.elemArray[this.data][ELEM_THUMBNAIL]+"' /></div>"+videoPlay+"</div><div class='html5gallery-tn-title-"+instance.id+"'>"+instance.elemArray[this.data][ELEM_TITLE]+(instance.options.thumbshowdescription?"<br /><span class='html5gallery-tn-description-"+instance.id+"'>"+instance.elemArray[this.data][ELEM_INFORMATION]+"</span>":"")+"</div>");if(instance.options.thumblinkintitle){var $thumbImage=$(".html5gallery-tn-img-"+instance.id,$thumbContainer);$thumbImage.each(function(){$(this).off("click").click(function(event){var parent=$(this).closest(".html5gallery-tn-"+instance.id);if(parent.length>0){instance.onThumbClick(parent.data("index"));instance.slideRun(parent.data("index"),true,true)}});if(instance.options.switchonmouseover)$(this).off("hover").hover(function(){var parent=$(this).closest(".html5gallery-tn-"+instance.id);if(parent.length>0&&instance.curElem!=parent.data("index")){instance.onThumbClick(parent.data("index"));instance.slideRun(parent.data("index"),true,true)}})})}});imgLoader.src=this.elemArray[i][ELEM_THUMBNAIL]}else $("#html5gallery-tn-"+instance.id+"-"+i,$thumbContainer).append("<div class='html5gallery-tn-title-"+instance.id+"'>"+instance.elemArray[i][ELEM_TITLE]+(instance.options.thumbshowdescription?"<br /><span class='html5gallery-tn-description-"+instance.id+"'>"+instance.elemArray[i][ELEM_INFORMATION]+"</span>":"")+"</div>")}if(this.options.carouselmultirows)$thumbContainer.append("<div style='clear:both;'></div>")},goNormal:function(){this.isFullscreen=false;if($(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).length>0)$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).stop();this.slideshowTimeout.stop();$(document).off("keyup.html5gallery");$(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});if($(".html5gallery-elem-"+this.id,this.$fullscreen).length>0){var $elem=$(".html5gallery-elem-"+this.id,this.$fullscreen).empty().css({top:this.options.elemTop});$(".html5gallery-box-"+this.id,this.$gallery).prepend($elem)}this.slideRun(this.curElem);this.$fullscreen.remove();if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(this.elemArray[this.curElem][ELEM_TYPE]);else this.hideimagetoolbox()},goFullscreen:function(){this.hideimagetoolbox();this.slideshowTimeout.stop();$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});this.isFullscreen=true;this.fullscreenInitial=20;this.fullscreenMargin=this.options.lightboxborder;this.fullscreenBarH=this.options.lightboxtextheight;this.fullscreenOutsideMargin=this.options.lightboxmargin;var fullW=$(window).width();var w=this.elemArray[this.curElem][ELEM_WIDTH],h=this.elemArray[this.curElem][ELEM_HEIGHT];this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var fW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;var scale=Math.min(fW/w,fH/h);if(scale<1)w*=scale,h*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h+2*this.fullscreenMargin+this.fullscreenBarH))/2);this.$fullscreen=$("<div class='html5gallery-fullscreen-"+this.id+"' style='position:absolute;top:0px;left:0px;width:"+fullW+"px;height:"+ 71fullH+"px;text-align:center;z-index:99999;'>"+"<div class='html5gallery-fullscreen-overlay-"+this.id+"' style='display:block;position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#000000;opacity:0.9;filter:alpha(opacity=80);'></div>"+"<div class='html5gallery-fullscreen-box-"+this.id+"' style='display:block;overflow:hidden;position:relative;margin:0px auto;top:"+marginT+"px;width:"+this.fullscreenInitial+"px;height:"+this.fullscreenInitial+"px;'>"+"<div class='html5gallery-fullscreen-elem-"+ 72this.id+"' style='display:block;position:relative;overflow:hidden;width:"+String(w+2*this.fullscreenMargin)+"px;height:"+String(h+2*this.fullscreenMargin)+"px;background-color:"+this.options.lightboxbgcolor+";'>"+"<div class='html5gallery-fullscreen-elem-wrapper-"+this.id+"' style='display:block;position:relative;overflow:hidden;margin:"+this.fullscreenMargin+"px;'>"+"<div class='html5gallery-fullscreen-timer-"+this.id+"' style='display:block; position:absolute; top:"+String(h-4)+"px; left:0px; width:0px; height:4px; background-color:#666; filter:alpha(opacity=60); opacity:0.6;'></div>"+"</div>"+"</div>"+"<div class='html5gallery-fullscreen-bar-"+this.id+"' style='display:block;position:relative;width:"+String(w+2*this.fullscreenMargin)+"px;height:auto;min-height:36px;background-color:"+this.options.lightboxbgcolor+";'>"+"<div class='html5gallery-fullscreen-bar-wrapper-"+this.id+"' style='display:block;position:relative;padding:0px "+this.fullscreenMargin+"px "+this.fullscreenMargin+"px "+this.fullscreenMargin+"px;'>"+"<div class='html5gallery-fullscreen-close-"+this.id+"' style='display:block;position:relative;float:right;cursor:pointer;width:32px;height:32px;top:0px;background-image:url(\""+ 73this.options.skinfolder+"lightbox_close.png\");'></div>"+"<div class='html5gallery-fullscreen-play-"+this.id+"' style='display:"+(this.isPaused&&this.elemArray.length>1&&this.elemArray[this.curElem][ELEM_TYPE]==1?"block":"none")+';position:relative;float:right;cursor:pointer;width:32px;height:32px;top:0px;background-image:url("'+this.options.skinfolder+"lightbox_play.png\");'></div>"+"<div class='html5gallery-fullscreen-pause-"+this.id+"' style='display:"+(this.isPaused||this.elemArray.length<=1||this.elemArray[this.curElem][ELEM_TYPE]!=1?"none":"block")+';position:relative;float:right;cursor:pointer;width:32px;height:32px;top:0px;background-image:url("'+this.options.skinfolder+"lightbox_pause.png\");'></div>"+"<div class='html5gallery-fullscreen-title-"+this.id+"' style='display:block;position:relative;float:left;width:"+String(w-2*this.fullscreenMargin-72)+"px;height:auto;top:0px;left:0px;text-align:left;'></div>"+"<div style='clear:both;'></div>"+"</div>"+"</div>"+"<div class='html5gallery-fullscreen-next-"+ 74this.id+"' style='display:none;position:absolute;cursor:pointer;width:48px;height:48px;right:"+this.fullscreenMargin+"px;top:"+Math.round(h/2)+'px;background-image:url("'+this.options.skinfolder+"lightbox_next.png\");'></div>"+"<div class='html5gallery-fullscreen-prev-"+this.id+"' style='display:none;position:absolute;cursor:pointer;width:48px;height:48px;left:"+this.fullscreenMargin+"px;top:"+Math.round(h/2)+'px;background-image:url("'+this.options.skinfolder+"lightbox_prev.png\");'></div>"+"</div>"+"</div>");this.$fullscreen.appendTo("body");var instance=this;$(window).scroll(function(){if(instance.options.isMobile&&!instance.options.mobileresizeevent)return;var $box=$(".html5gallery-fullscreen-box-"+instance.id,instance.$fullscreen);var winH=$(window).height();var marginT=$(window).scrollTop()+Math.round((winH-$box.height())/2);$box.css({"top":marginT})});this.createSocial(true);$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({height:h+2*this.fullscreenMargin},instance.options.lightboxanimationspeed,function(){$(this).animate({width:w+2*instance.fullscreenMargin},instance.options.lightboxanimationspeed,function(){$(this).animate({height:"+="+instance.fullscreenBarH},instance.options.lightboxanimationspeed,function(){if(instance.isFullscreen){var $elem=$(".html5gallery-elem-"+instance.id,instance.$gallery).empty().css({top:0,position:"relative"});$(".html5gallery-fullscreen-elem-wrapper-"+instance.id,instance.$fullscreen).prepend($elem);instance.slideRun(instance.curElem);if(instance.options.showsocial)$(".html5gallery-fullscreen-social-"+ 75instance.id,instance.$fullscreen).show()}})})});$(".html5gallery-fullscreen-overlay-"+this.id,this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).hover(function(){if(instance.elemArray.length>1){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeIn();$(".html5gallery-fullscreen-prev-"+instance.id,instance.$fullscreen).fadeIn()}},function(){$(".html5gallery-fullscreen-next-"+instance.id,instance.$fullscreen).fadeOut();$(".html5gallery-fullscreen-prev-"+instance.id,instance.$fullscreen).fadeOut()});if(instance.options.enabletouchswipe){var preventBrowser=instance.options.isAndroid&&instance.options.enabletouchswipeonandroid?true:false;$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).touchSwipe({preventWebBrowser:preventBrowser,swipeLeft:function(){if(!instance.disableTouchSwipe)instance.slideRun(-1)},swipeRight:function(){if(!instance.disableTouchSwipe)instance.slideRun(-2)}})}$(".html5gallery-fullscreen-close-"+ 76this.id,this.$fullscreen).click(function(){instance.goNormal()});$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-1)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).click(function(){instance.slideRun(-2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id,instance.$fullscreen).hide();$(".html5gallery-fullscreen-pause-"+instance.id,instance.$fullscreen).show();instance.isPaused=false;var slideshowinterval=instance.elemArray[instance.curElem][ELEM_DURATION]?instance.elemArray[instance.curElem][ELEM_DURATION]:instance.options.slideshowinterval;instance.slideshowTimeout.setInterval(slideshowinterval);instance.slideshowTimeout.start();$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0})});$(".html5gallery-fullscreen-pause-"+this.id,this.$fullscreen).click(function(){$(".html5gallery-fullscreen-play-"+instance.id,instance.$fullscreen).show();$(".html5gallery-fullscreen-pause-"+ 77instance.id,instance.$fullscreen).hide();instance.isPaused=true;instance.slideshowTimeout.stop();$(".html5gallery-fullscreen-timer-"+instance.id,instance.$fullscreen).css({width:0})});$(document).on("keyup.html5gallery",function(e){if(e.keyCode==27)instance.goNormal();else if(e.keyCode==39)instance.slideRun(-1);else if(e.keyCode==37)instance.slideRun(-2)})},calcIndex:function(index){this.savedElem=this.curElem;if(index==-2){this.nextElem=this.curElem;this.curElem=this.prevElem;this.prevElem=this.curElem- 781<0?this.elemArray.length-1:this.cur
78Elem-1}else if(index==-1){this.prevElem=this.curElem;this.curElem=this.nextElem;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}else if(index>=0){this.curElem=index;this.prevElem=this.curElem-1<0?this.elemArray.length-1:this.curElem-1;this.nextElem=this.curElem+1>=this.elemArray.length?0:this.curElem+1}},showSlideTimer:function(){var slideshowinterval=this.elemArray[this.curElem][ELEM_DURATION]?this.elemArray[this.curElem][ELEM_DURATION]:this.options.slideshowinterval;this.slideTimerCount++;if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).width(Math.round($(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).width()*50*(this.slideTimerCount+1)/slideshowinterval));else $(".html5gallery-timer-"+this.id,this.$gallery).width(Math.round(this.options.boxWidth*50*(this.slideTimerCount+1)/slideshowinterval))},setHd:function(isHd,switching){var type=this.elemArray[this.curElem][ELEM_TYPE];var toSwitch=this.isHd!=isHd&&switching&&(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM);this.isHd=isHd;if(toSwitch)this.slideRun(this.curElem,false,false,true)},enableUpdateCarousel:function(){this.disableupdatecarousel=false},slideRun:function(index,navClicked,thumbClicked,videoSwitching){this.slideshowTimeout.stop();if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});else $(".html5gallery-timer-"+this.id,this.$gallery).css({width:0});if(this.options.showcarousel&&this.curElem>=0)$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).removeClass("html5gallery-tn-selected-"+this.id);this.calcIndex(index);if(this.isFullscreen){this.$fullscreen.addClass("html5gallery-fullscreen-activeslide-"+this.id+"-"+this.curElem);if(this.prevElem>=0)this.$fullscreen.removeClass("html5gallery-fullscreen-activeslide-"+this.id+"-"+this.prevElem)}else{this.$gallery.addClass("html5gallery-activeslide-"+this.id+"-"+this.curElem);if(this.prevElem>=0)this.$gallery.removeClass("html5gallery-activeslide-"+ 79this.id+"-"+this.prevElem)}if(!this.options.arrowloop)if(this.isFullscreen){$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).css({visibility:this.curElem==0?"hidden":"visible"});$(".html5gallery-fullscreen-next-"+this.id,this.$fullscreen).css({visibility:this.curElem==this.elemArray.length-1?"hidden":"visible"})}else{$(".html5gallery-left-"+this.id,this.$gallery).css({visibility:this.curElem==0?"hidden":"visible"});$(".html5gallery-right-"+this.id,this.$gallery).css({visibility:this.curElem==this.elemArray.length-1?"hidden":"visible"})}if(this.options.socialurlforeach)this.createSocialMedia();if(!this.isFullscreen&&this.options.showcarousel){$("#html5gallery-tn-"+this.id+"-"+this.curElem,this.$gallery).addClass("html5gallery-tn-selected-"+this.id);if(!this.options.notupdatecarousel&&!this.disableupdatecarousel)this.carouselHighlight(this.curElem)}if(this.options.showtitle||this.options.lightboxshowtitle||this.options.lightboxshowdescription){var title=this.elemArray[this.curElem][ELEM_TITLE];var description=this.elemArray[this.curElem][ELEM_INFORMATION];if(this.options.shownumbering)title=this.options.numberingformat.replace("%NUM",this.curElem+1).replace("%TOTAL",this.elemArray.length)+" "+title;if(this.isFullscreen){var fullscreentitle="";if(this.options.lightboxshowtitle&&title)fullscreentitle+=title;if(this.options.lightboxshowdescription&&description)fullscreentitle+="<div class='html5gallery-fullscreen-description-"+this.id+"'>"+description+"</div>";$(".html5gallery-fullscreen-title-"+ 80this.id,this.$fullscreen).html(fullscreentitle)}else if(this.options.showtitle){var titleHtml="";if(title)titleHtml+="<div class='html5gallery-title-text-"+this.id+"'>"+title+"</div>";if(this.options.showdescription&&description)titleHtml+="<div class='html5gallery-description-text-"+this.id+"'>"+description+"</div>";$(".html5gallery-title-"+this.id,this.$gallery).html(titleHtml)}if(!this.options.titleoverlay||!this.options.titleautohide)$(".html5gallery-title-"+this.id,this.$gallery).show()}var type=this.elemArray[this.curElem][ELEM_TYPE];if(type<0)return;if(!this.isFullscreen&&navClicked)if(this.options.showimagetoolbox=="always"){if(this.options.imagetoolboxmode=="mouseover"||this.options.imagetoolboxmode=="show")this.showimagetoolbox(type)}else{if(this.options.showimagetoolbox=="image"&&type!=TYPE_IMAGE)this.hideimagetoolbox()}else if(this.options.imagetoolboxmode=="show")this.showimagetoolbox(type);else this.hideimagetoolbox();this.onChange();var $elem=$(".html5gallery-elem-"+this.id,parent);$elem.find("iframe").each(function(){$(this).attr("src","")});$elem.find("video").each(function(){$(this).attr("src","")});this.disableTouchSwipe=false;this.isVideoPlaying=false;var playVideo=this.options.autoplayvideo||this.options.playvideoonclick&&thumbClicked||videoSwitching;var parent=this.isFullscreen?this.$fullscreen:this.$gallery;this.showingPoster=false;if(!this.options.donotuseposter&&(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM||type==TYPE_VIDEO_YOUTUBE||type==TYPE_VIDEO_VIMEO||type==TYPE_EMBED_VIDEO)&&!playVideo&&this.elemArray[this.curElem][ELEM_POSTER]){this.showingPoster=true;this.showPoster()}else{if($(".html5gallery-video-play-"+this.id,parent).length)$(".html5gallery-video-play-"+this.id,parent).remove();if(type==TYPE_IMAGE)this.showImage();else{if(this.options.hidetitlewhenvideoisplaying)$(".html5gallery-title-"+this.id,parent).hide();if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)this.showVideo(playVideo,videoSwitching);else if(type==TYPE_VIDEO_YOUTUBE)this.showYoutube(playVideo);else if(type==TYPE_VIDEO_VIMEO)this.showVimeo(playVideo);else if(type==TYPE_EMBED_VIDEO)this.showEmbedVideo(playVideo);else if(type==TYPE_SWF)this.showSWF();else if(type==TYPE_IFRAME)this.showIframe()}}this.checkMK();if(this.prevElem in this.elemArray&&this.elemArray[this.prevElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.prevElem][ELEM_SRC];if(this.nextElem in this.elemArray&&this.elemArray[this.nextElem][ELEM_TYPE]==1)(new Image).src=this.elemArray[this.nextElem][ELEM_SRC];if(this.prevElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.prevElem][ELEM_POSTER])(new Image).src=this.elemArray[this.prevElem][ELEM_POSTER];if(this.nextElem in this.elemArray&&!this.options.autoplayvideo&&this.elemArray[this.nextElem][ELEM_POSTER])(new Image).src=this.elemArray[this.nextElem][ELEM_POSTER];if(this.curElem==this.elemArray.length-1)this.looptimes++;var instance=this;if((type==TYPE_IMAGE||this.showingPoster)&&!this.isPaused&&this.elemArray.length>1&&(!this.options.loop||this.looptimes<this.options.loop)){var slideshowinterval=this.elemArray[this.curElem][ELEM_DURATION]?this.elemArray[this.curElem][ELEM_DURATION]:this.options.slideshowinterval;
80if(this.firstrun&&this.options.setfirstslideshowinterval)slideshowinterval=this.options.firstslideshowinterval;this.slideshowTimeout.setInterval(slideshowinterval);this.slideshowTimeout.start();if(this.isFullscreen)$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({width:0});else $(".html5gallery-timer-"+this.id,this.$gallery).css({width:0})}if(this.options.loop&&this.looptimes>=this.options.loop){this.looptimes=0;this.pauseGallery()}var type=this.elemArray[this.curElem][ELEM_TYPE];if((this.elemArray[this.curElem][ELEM_LINK]||(this.options.lightbox||this.elemArray[this.curElem][ELEM_LIGHTBOX])&&!this.isFullscreen)&&!(this.options.linkonlyonvideo&&(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM))){$elem.css({cursor:"pointer"});$elem.off("click").on("click",function(){if((instance.options.lightbox||instance.elemArray[instance.curElem][ELEM_LIGHTBOX])&&!instance.isFullscreen)instance.goFullscreen();else if(instance.elemArray[instance.curElem][ELEM_LINK])if(instance.elemArray[instance.curElem][ELEM_LINKTARGET])window.open(instance.elemArray[instance.curElem][ELEM_LINK],instance.elemArray[instance.curElem][ELEM_LINKTARGET]);else window.open(instance.elemArray[instance.curElem][ELEM_LINK])})}else{$elem.css({cursor:""});$elem.off("click")}},showImage:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("<div class='html5gallery-loading-center-"+this.id+"'></div>").appendTo($elem);else $preloading=$("<div class='html5gallery-loading-"+this.id+"'></div>").appendTo($elem);var instance=this;var imgLoader=new Image;$(imgLoader).on("load",function(){$preloading.remove();instance.elemArray[instance.curElem][ELEM_WIDTH]=this.width;instance.elemArray[instance.curElem][ELEM_HEIGHT]=this.height;var scale;if(instance.isFullscreen){var fullW=instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH],instance.fullscreenWidth):instance.fullscreenWidth;var fullH=instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT],instance.fullscreenHeight):instance.fullscreenHeight;scale=Math.min(fullW/this.width,fullH/this.height);scale=scale>1?1:scale}else if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale=Math.min(instance.options.width/this.width,instance.options.height/this.height);var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var w1=instance.isFullscreen?w:instance.options.width;var h1=instance.isFullscreen?h:instance.options.height;var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("<div class='html5gallery-elem-img-"+instance.id+"' style='display:block; position:absolute; overflow:hidden; width:"+w1+"px; height:"+h1+"px; left:0px; margin-left:"+(instance.options.slideshadow&&!instance.isFullscreen?4:0)+"px; top:0px; margin-top:"+(instance.options.slideshadow&&!instance.isFullscreen?4:0)+"px;'>"+"<img alt='"+instance.html2Text(instance.elemArray[instance.curElem][ELEM_ALT])+"'"+(instance.options.addimgtitle?" title='"+instance.html2Text(instance.elemArray[instance.curElem][ELEM_TITLE])+"'":"")+" class='html5gallery-elem-image html5gallery-elem-image-"+instance.id+"' style='border:none; position:absolute; opacity:inherit; filter:inherit; padding:0px; margin:0px; left:"+l+"px; top:"+t+"px; max-width:none; max-height:none; width:"+w+"px; height:"+h+"px;' src='"+instance.elemArray[instance.curElem][ELEM_SRC]+"' />"+instance.options.watermarkcode+"</div>");var $imgPrev=$(".html5gallery-elem-img-"+instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id,$imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(instance.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Image",{"Action":"Play","URL":instance.elemArray[instance.curElem][ELEM_SRC]});if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
80sh(["_trackEvent","Image","Play",instance.elemArray[instance.curElem][ELEM_SRC]]);instance.checkMK()});$(imgLoader).on("error",function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width,instance.options.height);$elem.html("<div class='html5gallery-elem-error-"+instance.id+"' style='display:block; position:absolute; overflow:hidden; text-align:center; width:"+instance.options.width+"px; left:0px; top:"+Math.round(instance.options.height/2-10)+"px; margin:4px;'><div class='html5gallery-error-"+instance.id+"'>The requested content cannot be found</div>");if(instance.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Image",{"Action":"Error","URL":instance.elemArray[instance.curElem][ELEM_SRC]});if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_SRC]])});imgLoader.src=this.elemArray[this.curElem][ELEM_SRC]},adjustFullscreen:function(w1,h1,noanimation){var fullW=$(window).width();this.fullscreenWidth=fullW-2*this.fullscreenMargin-2*this.fullscreenOutsideMargin;var winH=$(window).height();this.fullscreenHeight=winH-2*this.fullscreenMargin-this.fullscreenBarH-2*this.fullscreenOutsideMargin;var fullH=Math.max(winH,$(document).height());var fW=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):this.fullscreenWidth;var fH=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):this.fullscreenHeight;var scale=Math.min(fW/w1,fH/h1);if(scale<1)w1*=scale,h1*=scale;var marginT=$(window).scrollTop()+Math.round((winH-(h1+2*this.fullscreenMargin+this.fullscreenBarH))/2);$(".html5gallery-fullscreen-"+this.id).css({width:fullW+"px",height:fullH+"px"});$(".html5gallery-fullscreen-title-"+this.id,this.$fullscreen).css({"width":w1-2*this.fullscreenMargin-72});if(noanimation){$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+this.fullscreenBarH,"top":marginT});$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin});$(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).css({"width":w1,"height":h1});$(".html5gallery-fullscreen-bar-"+this.id,this.$fullscreen).css({"width":w1+2*this.fullscreenMargin})}else{$(".html5gallery-fullscreen-box-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin+ 81this.fullscreenBarH,"top":marginT},this.options.lightboxanimationspeed);$(".html5gallery-fullscreen-elem-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin,"height":h1+2*this.fullscreenMargin},this.options.lightboxanimationspeed);$(".html5gallery-fullscreen-elem-wrapper-"+this.id,this.$fullscreen).animate({"width":w1,"height":h1},this.options.lightboxanimationspeed);$(".html5gallery-fullscreen-bar-"+this.id,this.$fullscreen).animate({"width":w1+2*this.fullscreenMargin},this.options.lightboxanimationspeed)}$(".html5gallery-fullscreen-next-"+ 82this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-prev-"+this.id,this.$fullscreen).css({"top":Math.round(h1/2)});$(".html5gallery-fullscreen-play-"+this.id,this.$fullscreen).css("display",this.isPaused&&this.elemArray.length>1&&this.elemArray[this.curElem][ELEM_TYPE]==1?"block":"none");$(".html5gallery-fullscreen-pause-"+this.id,this.$fullscreen).css("display",this.isPaused||this.elemArray.length<=1||this.elemArray[this.curElem][ELEM_TYPE]!=1?"none":"block");$(".html5gallery-elem-"+ 83this.id,this.$fullscreen).css({"width":w1,"height":h1});$(".html5gallery-fullscreen-timer-"+this.id,this.$fullscreen).css({top:String(h1-4)+"px"});$(".html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-video-container-"+this.id,this.$fullscreen).css({"width":"100%","height":"100%"});$(".html5gallery-elem-video-container-"+this.id,this.$fullscreen).find("video").css({"width":"100%","height":"100%"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).attr("height",h1);$(".html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$(".html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("height",h1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$("#html5gallery-elem-video-"+this.id,this.$fullscreen).find("iframe").attr("height",h1);$(".html5gallery-elem-iframe-"+this.id,this.$fullscreen).css({"width":w1+"px","height":h1+"px"});$(".html5gallery-elem-iframe-"+this.id,this.$fullscreen).find("iframe").attr("width",w1);$(".html5gallery-elem-iframe-"+this.id,this.$fullscreen).find("iframe").attr("height",h1)},showPoster:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var $elem=$(".html5gallery-elem-"+this.id,parent);if($elem.html()==="")$preloading=$("<div class='html5gallery-loading-center-"+ 84this.id+"'></div>").appendTo($elem);else $preloading=$("<div class='html5gallery-loading-"+this.id+"'></div>").appendTo($elem);var instance=this;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var imgLoader=new Image;$(imgLoader).on("load",function(){$preloading.remove();instance.elemArray[instance.curElem][ELEM_POSTERWIDTH]=this.width;instance.elemArray[instance.curElem][ELEM_POSTERHEIGHT]=this.height;var scale,w1,h1;if(instance.isFullscreen){var lw=instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXWIDTH],instance.fullscreenWidth):Math.min(dataW,instance.fullscreenWidth);var lh=instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(instance.elemArray[instance.curElem][ELEM_LIGHTBOXHEIGHT],instance.fullscreenHeight):Math.min(dataH,instance.fullscreenHeight);scale=Math.max(lw/this.width,lh/this.height);scale=scale>1?1:scale;w1=lw;h1=lh}
84else{if(instance.options.resizemode=="fill")scale=Math.max(instance.options.width/this.width,instance.options.height/this.height);else scale=Math.min(instance.options.width/this.width,instance.options.height/this.height);w1=instance.options.width;h1=instance.options.height}var w=Math.round(scale*this.width);var h=Math.round(scale*this.height);var l=Math.round(w1/2-w/2);var t=Math.round(h1/2-h/2);if(instance.isFullscreen)instance.adjustFullscreen(w1,h1);$elem.css({"width":w1,"height":h1});var $imgCur=$("<div class='html5gallery-elem-img-"+ 85instance.id+"' style='display:block; position:absolute; overflow:hidden; width:"+w1+"px; height:"+h1+"px; left:0px; margin-left:"+(instance.options.slideshadow&&!instance.isFullscreen?4:0)+"px; top:0px; margin-top:"+(instance.options.slideshadow&&!instance.isFullscreen?4:0)+"px;'>"+"<img alt='"+instance.html2Text(instance.elemArray[instance.curElem][ELEM_ALT])+"'"+(instance.options.addimgtitle?" title='"+instance.html2Text(instance.elemArray[instance.curElem][ELEM_TITLE])+"'":"")+" class='html5gallery-elem-image html5gallery-elem-image-"+ 86instance.id+"' style='border:none; position:absolute; opacity:inherit; filter:inherit; padding:0px; margin:0px; left:"+l+"px; top:"+t+"px; max-width:none; max-height:none; width:"+w+"px; height:"+h+"px;' src='"+instance.elemArray[instance.curElem][ELEM_POSTER]+"' />"+instance.options.watermarkcode+"</div>");var $imgPrev=$(".html5gallery-elem-img-"+instance.id,$elem);if($imgPrev.length){$elem.prepend($imgCur);$elem.html5boxTransition(instance.id,$imgPrev,$imgCur,{effect:instance.options.effect,easing:instance.options.easing,duration:instance.options.duration,direction:instance.curElem>=instance.savedElem,slide:instance.options.slide},function(){})}else $elem.html($imgCur);if(!$(".html5gallery-video-play-"+instance.id,parent).length){var $play=$("<div class='html5gallery-video-play-"+instance.id+"' style='position:absolute;display:block;cursor:pointer;top:50%;left:50%;width:64px;height:64px;margin-left:-32px;margin-top:-32px;background:url(\""+instance.options.playvideoimage+"\") no-repeat center center;'></div>").appendTo($elem);$play.off(instance.eClick).on(instance.eClick,function(){if(instance.options.hidetitlewhenvideoisplaying)$(".html5gallery-title-"+instance.id,instance.$gallery).hide();$(this).remove();instance.slideshowTimeout.stop();$(".html5gallery-timer-"+instance.id,instance.$gallery).css({width:0});instance.showingPoster=false;var type=instance.elemArray[instance.curElem][ELEM_TYPE];if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)instance.showVideo(true);else if(type==TYPE_VIDEO_YOUTUBE)instance.showYoutube(true);else if(type==TYPE_VIDEO_VIMEO)instance.showVimeo(true);else if(type==TYPE_EMBED_VIDEO)instance.showEmbedVideo(true);instance.checkMK()})}instance.checkMK()});$(imgLoader).on("error",function(){$preloading.remove();if(instance.isFullscreen)instance.adjustFullscreen(instance.options.width,instance.options.height);$elem.html("<div class='html5gallery-elem-error-"+instance.id+"' style='display:block; position:absolute; overflow:hidden; text-align:center; width:"+ 87instance.options.width+"px; left:0px; top:"+Math.round(instance.options.height/2-10)+"px; margin:4px;'><div class='html5gallery-error-"+instance.id+"'>The requested content cannot be found</div>");if(instance.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Image",{"Action":"Error","URL":instance.elemArray[instance.curElem][ELEM_POSTER]});if(instance.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
87sh(["_trackEvent","Image","Error",instance.elemArray[instance.curElem][ELEM_POSTER]])});imgLoader.src=this.elemArray[this.curElem][ELEM_POSTER]},getFlashMovieObject:function(movieName){if(window.document[movieName])return window.document[movieName];if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[movieName])return document.embeds[movieName]}else return document.getElementById(movieName)},playVideo:function(){var type=this.elemArray[this.curElem][ELEM_TYPE];if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)if(this.isHTML5&&$("#html5gallery-elem-html5-video-"+this.id).length>0)$("#html5gallery-elem-html5-video-"+this.id,this.container).get(0).play();else{var flashObj=this.getFlashMovieObject("html5gallery-elem-video-flash-"+this.id);if(flashObj&&typeof flashObj.playVideo==="function")flashObj.playVideo()}},stopAllPlaying:function(){if($("video").length)$("video").each(function(){this.pause()});if($("audio").length)$("audio").each(function(){this.pause()});if(typeof html5GalleryObjects!=="undefined"&&html5GalleryObjects&&html5GalleryObjects.objects)for(var i=0;i<html5GalleryObjects.objects.length;i++){if(html5GalleryObjects.objects[i].id==this.id)continue;try{if(html5GalleryObjects.objects[i].ytPlayer&&typeof html5GalleryObjects.objects[i].ytPlayer.pauseVideo=="function")html5GalleryObjects.objects[i].ytPlayer.pauseVideo();if(html5GalleryObjects.objects[i].vimeoPlayer)html5GalleryObjects.objects[i].vimeoPlayer.api("pause")}catch(err){}}},pauseVideo:function(){var type=this.elemArray[this.curElem][ELEM_TYPE];if(type==TYPE_VIDEO_FLASH||type==TYPE_VIDEO_MP4||type==TYPE_VIDEO_OGG||type==TYPE_VIDEO_WEBM)if(this.isHTML5&&$("#html5gallery-elem-html5-video-"+this.id).length>0)$("#html5gallery-elem-html5-video-"+this.id,this.container).get(0).pause();else{var flashObj=this.getFlashMovieObject("html5gallery-elem-video-flash-"+this.id);if(flashObj&&typeof flashObj.pauseVideo==="function")flashObj.pauseVideo()}else if(type==TYPE_VIDEO_YOUTUBE){if(this.ytPlayer&&typeof this.ytPlayer.pauseVideo=="function")this.ytPlayer.pauseVideo()}else if(type==TYPE_VIDEO_VIMEO){if(this.vimeoPlayer)this.vimeoPlayer.api("pause")}else if($("video",this.container).length)$("video",this.container).get(0).pause()},showVideo:function(autoPlay,videoSwitching){if(this.options.stopallplaying)this.stopAllPlaying();this.isVideoPlaying=true;if(autoPlay&&this.options.autoslideandplayafterfirstplayed){this.options.autoplayvideo=true;this.isPaused=false}this.disableTouchSwipe=true;var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+ 88this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var timeStamp=-1;if(videoSwitching&&$(".html5gallery-elem-"+this.id,parent).find("video").length)timeStamp=$(".html5gallery-elem-"+this.id,parent).find("video:first").get(0).currentTime;$(".html5gallery-elem-"+this.id,parent).html("<div class='html5gallery-loading-center-"+this.id+"'></div><div class='html5gallery-elem-video-"+this.id+"' style='display:block;position:absolute;overflow:hidden;top:"+ 89(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;left:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;width:"+w1+"px;height:"+h1+"px;'></div>"+this.options.watermarkcode);this.isHTML5=false;if(this.options.isIE678||this.options.isIE9&&this.options.useflashonie9||this.options.isIE10&&this.options.useflashonie10||this.options.isIE11&&this.options.useflashonie11)this.isHTML5=false;else if(this.options.isMobile)this.isHTML5=true;else if((this.options.html5player||!this.options.flashInstalled)&&this.options.html5VideoSupported){this.isHTML5=true;if(this.options.isFirefox||this.options.isOpera)if(!this.elemArray[this.curElem][ELEM_SRC_WEBM]&&!this.elemArray[this.curElem][ELEM_SRC_OGG]&&(!this.options.canplaymp4||this.options.useflashformp4onfirefox))this.isHTML5=false}var videoSrc=this.elemArray[this.curElem][ELEM_SRC];var videoHd=this.elemArray[this.curElem][ELEM_HD];if(this.options.isFirefox||this.options.isOpera){if(this.elemArray[this.curElem][ELEM_SRC_WEBM])videoSrc=this.elemArray[this.curElem][ELEM_SRC_WEBM];else if(this.elemArray[this.curElem][ELEM_SRC_OGG])videoSrc=this.elemArray[this.curElem][ELEM_SRC_OGG];if(this.elemArray[this.curElem][ELEM_HD_WEBM])videoHd=this.elemArray[this.curElem][ELEM_HD_WEBM];else if(this.elemArray[this.curElem][ELEM_HD_OGG])videoHd=this.elemArray[this.curElem][ELEM_HD_OGG]}this.embedHTML5Video($(".html5gallery-elem-video-"+this.id,parent),w1,h1,videoSrc,videoHd,autoPlay,timeStamp,videoSwitching);if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Video",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
89sh(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showSWF:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var w1=this.elemArray[this.curElem][ELEM_WIDTH];var h1=this.elemArray[this.curElem][ELEM_HEIGHT];if(this.isFullscreen)this.adjustFullscreen(w1,h1);else $(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});$(".html5gallery-elem-"+this.id,parent).html("<div class='html5gallery-elem-error-"+this.id+"' style='display:block; position:absolute; overflow:hidden; text-align:center; width:"+this.options.width+"px; left:0px; top:"+Math.round(this.options.height/2-10)+"px; margin:4px;'><div class='html5gallery-error-"+this.id+"'>Adobe Flash has been discontinued!</div>");if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Flash",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Flash","Play",this.elemArray[this.curElem][ELEM_SRC]])},prepareYoutubeHref:function(href){var youtubeId=href.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];if(!youtubeId){var regExp=/(?:www\.)?youtube\.com\/shorts\/([\w-]+)/;var match=href.match(regExp);if(match&&match[1]&&match[1].length==11)youtubeId=match[1]}var youtubedomain=href.indexOf("youtube-nocookie.com")!==-1?"youtube-nocookie.com":"youtube.com";var result="https://www."+youtubedomain+"/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},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},initYoutubeApi:function(){var i,initYoutube=false;var initVimeo=false;for(i=0;i<this.elemArray.length;i++)if(this.elemArray[i][ELEM_TYPE]==TYPE_VIDEO_YOUTUBE&&this.elemArray[i][ELEM_SRC].indexOf("youtube-nocookie.com")===-1)initYoutube=true;else if(this.elemArray[i][ELEM_TYPE]==TYPE_VIDEO_VIMEO)initVimeo=true;if(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(initVimeo){var tag=document.createElement("script");tag.src=this.options.jsfolder+"froogaloop2.min.js";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}},showEmbedVideo:function(autoPlay){if(this.options.stopallplaying)this.stopAllPlaying();this.isVideoPlaying=true;if(autoPlay&&this.options.autoslideandplayafterfirstplayed){this.options.autoplayvideo=true;this.isPaused=false}var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("<div class='html5gallery-loading-center-"+this.id+"'></div><div id='html5gallery-elem-video-"+this.id+"' style='display:block;position:absolute;overflow:hidden;top:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;left:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;width:"+w1+"px;height:"+h1+"px;'></div>"+this.options.watermarkcode);if(src.match(/\:\/\/.*(dai\.ly)/i)){var id=src.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2];src="https://www.dailymotion.com/embed/video/"+id}if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";$("#html5gallery-elem-video-"+this.id,parent).html("<iframe width='"+w1+"' height='"+h1+"' src='"+src+"' frameborder='0' allow='autoplay' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");
89if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Video",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.push(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showYoutube:function(autoPlay){if(this.options.stopallplaying)this.stopAllPlaying();this.isVideoPlaying=true;if(autoPlay&&this.options.autoslideandplayafterfirstplayed){this.options.autoplayvideo=true;this.isPaused=false}var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+this.id,parent).html("<div class='html5gallery-loading-center-"+this.id+"'></div><div id='html5gallery-elem-video-"+this.id+"' style='display:block;position:absolute;overflow:hidden;top:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;left:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;width:"+w1+"px;height:"+h1+"px;'></div>"+this.options.watermarkcode);var youtubeNoCookie=src.indexOf("youtube-nocookie.com")!==-1;var instance=this;if(!ASYouTubeIframeAPIReady&&!youtubeNoCookie){ASYouTubeTimeout+=100;if(ASYouTubeTimeout<3E3){setTimeout(function(){instance.showYoutube(autoPlay)},100);return}}if(ASYouTubeIframeAPIReady&&!this.options.isMobile&&!this.options.isIE6&&!this.options.isIE7&&!youtubeNoCookie){var id=this.elemArray[this.curElem][ELEM_SRC].match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];var onPlayReady=function(event){};if(autoPlay)onPlayReady=function(event){event.target.playVideo()};var youtubeParams=this.getYoutubeParams(this.elemArray[this.curElem][ELEM_SRC]);youtubeParams=$.extend({"html5":1,"controls":instance.options.videohidecontrols?"0":"1","showinfo":instance.options.videohidecontrols?"0":"1","autoplay":autoPlay?1:0,"rel":0,"wmode":"transparent"},youtubeParams);if(instance.options.mutevideo)youtubeParams=$.extend({"mute":1},youtubeParams);this.ytPlayer=new YT.Player("html5gallery-elem-video-"+this.id,{width:w1,height:h1,videoId:id,playerVars:youtubeParams,events:{"onReady":onPlayReady,"onStateChange":function(event){if(event.data==YT.PlayerState.ENDED){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)}}}})}else{src=this.prepareYoutubeHref(src);if(autoPlay)if(src.indexOf("?")<0)src+="?autoplay=1";else src+="&autoplay=1";if(src.indexOf("?")<0)src+="?wmode=transparent&rel=0";else src+="&wmode=transparent&rel=0";if(instance.options.videohidecontrols)src+="&controls=0&showinfo=0";if(instance.options.mutevideo)src+="mute=1";src+="&version=3&enablejsapi=1";$("#html5gallery-elem-video-"+this.id,parent).html("<iframe width='"+w1+"' height='"+h1+"' src='"+src+"' frameborder='0' allow='autoplay' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")}if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Video",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
89sh(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showVimeo:function(autoPlay){if(this.options.stopallplaying)this.stopAllPlaying();this.isVideoPlaying=true;if(autoPlay&&this.options.autoslideandplayafterfirstplayed){this.options.autoplayvideo=true;this.isPaused=false}var instance=this;if(typeof $f!=="function"){ASVimeoTimeout+=100;if(ASVimeoTimeout<3E3){setTimeout(function(){instance.showVimeo(autoPlay)},100);return}}var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}
89else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];if(src.indexOf("?")<0)src+="?";else src+="&";if(autoPlay)src+="autoplay=1";else src+="autoplay=0";if(this.options.mutevideo)src+="muted=1";src+="&api=1&player_id=html5gallery_vimeo_"+this.id;$(".html5gallery-elem-"+ 90this.id,parent).html("<div class='html5gallery-loading-center-"+this.id+"'></div><div class='html5gallery-elem-video-"+this.id+"' style='display:block;position:absolute;overflow:hidden;top:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;left:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;width:"+w1+"px;height:"+h1+"px;'></div>"+this.options.watermarkcode);$(".html5gallery-elem-video-"+this.id,parent).html("<iframe id='html5gallery_vimeo_"+this.id+"' width='"+w1+"' height='"+h1+"' src='"+src+"' frameborder='0' allow='autoplay' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");if(typeof $f==="function"&&autoPlay){var vimeoIframe=$("#html5gallery_vimeo_"+this.id)[0];var instance=this;instance.vimeoPlayer=$f(vimeoIframe);instance.vimeoPlayer.addEvent("ready",function(){instance.vimeoPlayer.addEvent("finish",function(id){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)})})}if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Video",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
90sh(["_trackEvent","Video","Play",this.elemArray[this.curElem][ELEM_SRC]])},showIframe:function(){var parent=this.isFullscreen?this.$fullscreen:this.$gallery;var dataW=this.elemArray[this.curElem][ELEM_WIDTH];var dataH=this.elemArray[this.curElem][ELEM_HEIGHT];var w1,h1;if(this.isFullscreen){var lw=this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXWIDTH],this.fullscreenWidth):Math.min(dataW,this.fullscreenWidth);var lh=this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT]?Math.min(this.elemArray[this.curElem][ELEM_LIGHTBOXHEIGHT],this.fullscreenHeight):Math.min(dataH,this.fullscreenHeight);this.adjustFullscreen(lw,lh);w1=lw;h1=lh}else{$(".html5gallery-elem-"+this.id,this.$gallery).css({"width":this.options.width,"height":this.options.height});w1=this.options.width;h1=this.options.height}var src=this.elemArray[this.curElem][ELEM_SRC];$(".html5gallery-elem-"+ 91this.id,parent).html("<div class='html5gallery-loading-center-"+this.id+"'></div><div class='html5gallery-elem-iframe-"+this.id+"' style='display:block;position:absolute;overflow:hidden;top:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;left:"+(this.options.slideshadow&&!this.isFullscreen?4:0)+"px;width:"+w1+"px;height:"+h1+"px;'></div>"+this.options.watermarkcode);$(".html5gallery-elem-iframe-"+this.id,parent).html("<iframe id='html5gallery-iframe-"+this.id+"' width='"+w1+"' height='"+ 92h1+"' src='"+src+"' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");if(this.options.enablega4&&typeof window.gtag==="function")window.gtag("event","Iframe",{"Action":"Play","URL":this.elemArray[this.curElem][ELEM_SRC]});if(this.options.googleanalyticsaccount&&window._gaq)window._gaq.pu
92sh(["_trackEvent","Iframe","Play",this.elemArray[this.curElem][ELEM_SRC]])},checkType:function(href){if(!href)return-1;if(href.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i))return TYPE_IMAGE;if(href.match(/[^\.]\.(swf)\s*$/i))return TYPE_SWF;if(href.match(/[^\.]\.(mp3)\s*$/i))return TYPE_MP3;if(href.match(/[^\.]\.(pdf)\s*$/i))return TYPE_PDF;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)||href.match(/\:\/\/.*(youtube-nocookie\.com)/i))return TYPE_VIDEO_YOUTUBE;if(href.match(/\:\/\/.*(vimeo\.com)/i))return TYPE_VIDEO_VIMEO;if(href.match(/\:\/\/.*(dailymotion\.com)/i)||href.match(/\:\/\/.*(dai\.ly)/i))return TYPE_EMBED_VIDEO;return TYPE_IMAGE},onChange:function(){$(window).trigger("html5gallery.onchange",[this.id,this.curElem]);if(this.options.onchange&&window[this.options.onchange]&&typeof window[this.options.onchange]=="function")window[this.options.onchange](this.elemArray[this.curElem].concat([this.id]))},onSlideshowOver:function(){$(window).trigger("html5gallery.onslideshowover",[this.id,this.curElem]);if(this.options.onslideshowover&&window[this.options.onslideshowover]&&typeof window[this.options.onslideshowover]=="function")window[this.options.onslideshowover](this.elemArray[this.curElem])},onThumbOver:function(index){$(window).trigger("html5gallery.onthumbover",[this.id,index]);if(this.options.onthumbover&&window[this.options.onthumbover]&&typeof window[this.options.onthumbover]=="function")window[this.options.onthumbover](this.elemArray[index])},onThumbClick:function(index){$(window).trigger("html5gallery.onthumbclick",[this.id,index]);if(this.options.onthumbclick&&window[this.options.onthumbclick]&&typeof window[this.options.onthumbclick]=="function")window[this.options.onthumbclick](this.elemArray[index].concat([this.id]));if(this.options.thumbjumptotop)if(this.options.thumbjumpanchor&&this.options.thumbjumpanchor.length>0&&$("#"+this.options.thumbjumpanchor).length>0){var t0=$("#"+this.options.thumbjumpanchor).offset().top;$(window).scrollTop(t0)}else if(this.options.thumbjumpposition>=0)$(window).scrollTop(this.options.thumbjumpposition);else{var t=this.container.offset().top;if(t<$(window).scrollTop())$(window).scrollTop(t)}},onVideoEnd:function(){$(window).trigger("html5gallery.videoend",[this.id,this.curElem]);if(this.options.onvideoend&&window[this.options.onvideoend]&&typeof window[this.options.onvideoend]=="function")window[this.options.onvideoend](this.elemArray[this.curElem]);if(this.options.reloadonvideoend)this.slideRun(this.curElem);else if(this.options.loadnextonvideoend)this.slideRun(-1)},embedHTML5Video:function($container,w,h,src,hd,autoPlay,timeStamp,videoSwitching){var instance=this;if((this.options.isIE11||this.options.isIE)&&this.options.usenativehtml5controlsonie||this.options.isFirefox&&this.options.usenativehtml5controlsonfirefox||this.options.isIPhone&&this.options.usenativehtml5controlsoniphone||this.options.isIPad&&this.options.usenativehtml5controlsonipad||this.options.isAndroid&&this.options.usenativehtml5controlsonandroid)this.options.nativehtml5controls=true;if(this.options.isIOS||this.options.isAndroid)this.options.fullscreennativecontrols=true;if(this.options.mutevideo)this.options.defaultvideovolume=0;$container.html("<div class='html5gallery-elem-video-container-"+this.id+"' style='position:relative;display:block;background-color:#000;width:100%;height:100%;'><video id='html5gallery-elem-html5-video-"+this.id+"' width='100%' height='100%'"+(this.options.nativehtml5controls&&!this.options.videohidecontrols?" controls":"")+(this.options.html5videonodownload?' controlsList="nodownload"':"")+(this.options.mutevideo?" muted":"")+(this.options.playsinline?" playsinline":"")+(this.options.loopvideo?" loop":"")+(this.options.donotuseposter&&this.options.showhtml5videoposter&&this.elemArray[this.curElem][ELEM_POSTER]?' poster="'+this.elemArray[this.curElem][ELEM_POSTER]+'"':"")+">"+(this.elemArray[this.curElem][ELEM_VTT]?'<track default src="'+this.elemArray[this.curElem][ELEM_VTT]+'" kind="subtitles" srclang="'+this.elemArray[this.curElem][ELEM_VTTLANG]+'" label="'+this.elemArray[this.curElem][ELEM_VTTLABEL]+'">':"")+"</video>"+"</div>");$("video",$container).get(0).setAttribute("src",(hd&&this.isHd?hd:src)+(timeStamp>0?"#t="+timeStamp:""));if(!this.options.nativehtml5controls&&!this.options.videohidecontrols){$("video",$container).data("src",src);$("video",$container).data("hd",hd);$("video",$container).data("ishd",this.isHd);$("video",$container).addHTML5VideoControls(this.options.skinfolder,this,"#html5gallery-elem-html5-video-"+this.id,false,false,this.options.defaultvideovolume,this.options.fullscreennativecontrols,this.options.html5videonod
92ownload,{playbutton:this.options.playvideoimage},this.elemArray[this.curElem][ELEM_VTT]?true:false,this.options.vttline,this.options.showsubtitlebydefault);$("video",$container).extraHTML5VideoControls({enableclick:this.options.html5videoenableclick,enablespacekey:this.options.html5enablespacekey})}if(this.elemArray[this.curElem][ELEM_LINK]){$("video",$container).css({cursor:"pointer"});$("video",$container).off("click").on("click",function(){if(instance.elemArray[instance.curElem][ELEM_LINK])if(instance.elemArray[instance.curElem][ELEM_LINKTARGET])window.open(instance.elemArray[instance.curElem][ELEM_LINK],instance.elemArray[instance.curElem][ELEM_LINKTARGET]);else window.open(instance.elemArray[instance.curElem][ELEM_LINK])})}if(autoPlay||videoSwitching)$("video",$container).get(0).play();$("video",$container).off("ended").on("ended",function(){instance.onVideoEnd();if(!instance.isPaused)instance.slideRun(-1)})}};this.each(function(){var $this=$(this);options=options||{};for(var key in options)if(key.toLowerCase()!==key){options[key.toLowerCase()]=options[key];delete options[key]}if($(this).data("donotinit")&&(!options||!options["forceinit"]))return;if($(this).data("inited"))return;$(this).data("inited",1);this.options=$.extend({},options);var instance=this;$.each($this.data(),function(key,value){instance.options[key.toLowerCase()]=value});if("skin"in this.options)this.options.skin=this.options.skin.toLowerCase();var commonOptions={freelink:"https://www.wonderplugin.com/wordpress-gallery/",watermark:"",watermarklink:"",enabletabindex:false,playvideoimage:"playvideo_64.png",playvideothumbimage:"playvideo.png",loadinggif:"loading.gif",centerloadinggif:"loading_center.gif",skin:"horizontal",googlefonts:"",mobileresizeevent:false,enabletouchswipe:true,enabletouchswipeonandroid:false,disablehovereventontouch:false,responsive:true,responsivefullscreen:false,resizedelay:10,screenquery:{},ratioresponsive:false,ratiomediumscreen:1024,ratiomediumheight:1.6,ratiosmallscreen:767,ratiosmallheight:2.4,firstitemid:0,addimgtitle:false,src:"",xml:"",xmlnocache:true,stopallplaying:false,lightbox:false,autoslide:false,slideshowinterval:6E3,random:false,borderradiu
92s:0,loop:0,pauseonmouseover:false,arrowloop:true,setfirstslideshowinterval:false,firstslideshowinterval:6E3,reverse:false,notupdatecarousel:false,updatecarouselinterval:6E4,youtubeimage:"0.jpg",youtubethumb:"0.jpg",autoplayvideo:false,html5player:true,playvideoonclick:true,videohidecontrols:false,useflashformp4onfirefox:false,reloadonvideoend:false,loadnextonvideoend:false,nativehtml5controls:false,hddefault:false,useflashonie9:true,useflashonie10:false,useflashonie11:false,fullscreennativecontrols:true,html5videonodownload:true,html5videoenableclick:false,html5enablespacekey:false,vttline:-4,vttlang:"en",vttlabel:"English",showsubtitlebydefault:true,usenativehtml5controlsoniphone:true,usenativehtml5controlsonipad:true,usenativehtml5controlsonandroid:true,usenativehtml5controlsonie:false,usenativehtml5controlsonfirefox:false,defaultvideovolume:1,mutevideo:false,playsinline:false,loopvideo:false,autoslideandplayafterfirstplayed:false,lazyloadtags:"lazy-src,lazyload-src,cfsrc,src,orig-src",linkonlyonvideo:true,hidetitlewhenvideoisplaying:false,hideplaypausefullscreenwhenvideoisplaying:false,lightboxborder:8,lightboxtextheight:72,lightboxmargin:12,lightboxbgcolor:"#fff",lightboxshowtitle:true,lightboxtitlecss:" {color:#333333; font:bold 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:18px;}",lightboxtitlelinkcss:" a {color:#333333;}",lightboxshowdescription:true,lightboxdescriptioncss:" {color:#333333; font:normal 12px Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; line-height:14px;}",lightboxdescriptionlinkcss:" a {color:#333333;}",lightboxanimationspeed:400,effect:"fade",easing:"easeOutCubic",duration:1500,slide:{duration:1E3,easing:"easeOutExpo"},width:480,height:270,showtimer:true,resizemode:"fit",showtitle:true,titleheight:45,errorcss:" {text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",shownumbering:false,numberingformat:"%NUM / %TOTAL",ga4account:"",enablega4:true,googleanalyticsaccount:"",showsocialmedia:false,socialheight:30,socialurlforeach:false,showfacebooklike:true,facebooklikeurl:"",twitterurl:"",twitterusername:"",twittervia:"html5box",showgoogleplus:true,googleplusurl:"",initsocial:false,showsocial:false,sharemediaurl:false,socialmode:"mouseover",socialposition:"position:absolute;top:8px;right:8px;",socialpositionlightbox:"position:absolute;top:8px;right:8px;",socialdirection:"horizontal",socialbuttonsize:32,socialbuttonfontsize:18,socialrotateeffect:true,showfacebook:true,showtwitter:true,showpinterest:true,showlinkedin:false,showgplus:false,showemail:false,showimagetoolbox:"always",imagetoolboxstyle:"side",imagetoolboxmode:"mouseover",showplaybutton:true,showprevbutton:true,shownextbutton:true,showfullscreenbutton:true,showplaypausefullscreenforall:false,showcarouselforsingle:false,carouselbgtransparent:true,carouselbgcolorstart:"#ffffff",carouselbgcolorend:"#ffffff",carouseltopborder:"#ffffff",carouselbottomborder:"#ffffff",carouselbgimage:"",carouseleasing:"easeOutCirc",carouselarrowwidth:32,carouselarrowheight:32,showcategory:true,categorystyle:"dropdown",categoryheight:48,categorydefault:"all",thumbresponsive:"samesize",thumbcolumns:5,thumbcolumnsresponsive:false,thumbmediumcolumns:3,thumbmediumsize:800,thumbsmallcolumns:2,thumbsmallsize:480,thumbmediumwidth:64,thumbmediumheight:64,thumbsmallwidth:48,thumbsmallheight:48,addthumbnailtitle:false,switchonmouseover:false,thumbverticalmiddle:false,carouselmultirows:false,thumbrowgap:16,carouselpagination:false,carouselpaginationrow:3,thumblinkintitle:false,thumbjumptotop:false,thumbjumpposition:-1,thumbjumpanchor:"",thumbshowimage:true,thumbshowtitle:false,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden;}",thumbtitleheight:24,thumbmediumtitleheight:48,thumbsmalltitleheight:72,youtubeapikey:"",youtubeplaylistid:"",youtubeplaylistmaxresults:"",youtubeplaylistusemaxres:true,titlesmallscreen:false,titlesmallscreenwidth:640,titleheightsmallscreen:148,donotuseposter:false,showhtml5videoposter:true,splitvsliderontouch:true,forcetouch:false,version:"9.7",frve:false,fm:"87,111,
92114,100,80,114,101,115,115,32,71,97,108,108,101,114,121,32,84,114,105,97,108,32,86,101,114,115,105,111,110"};var horizontalSkinOptions={skinfolder:"skins/horizontal/",padding:6,bgcolor:"#ffffff",bgimage:"",galleryshadow:true,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:13px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }
92",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:0,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var lightSkinOptions={padding:12,skinfolder:"skins/light/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }
92",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:48,thumbheight:48,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8};var mediapageSkinOptions={padding:0,skinfolder:"skins/mediapage/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }
92",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:24,carouselmultirows:true,thumbrowgap:16,carouselpagination:false,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:10,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:0,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbjumptotop:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden;}",thumbtitleheight:24};var gallerySkinOptions={padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"top",showdescription:true,titleoverlay:true,titleautohide:true,titlecss:" {color:#ffffff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }
92",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",thumbtitleheight:18};var galleryWithTextSkinOptions={padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"bottom",showdescription:true,titleoverlay:false,titleheight:72,titleautohide:true,titlecss:"{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",titlecsslink:"a{color:#333;}",descriptioncss:"{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",descriptioncsslink:"a{color:#333;}",titlesmallscreen:true,showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:false,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",thumbtitleheight:18};var galleryWithTextTopThumbnailsSkinOptions={padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"bottom",showdescription:true,titleoverlay:false,titleheight:72,titleautohide:true,titlecss:"{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",titlecsslink:"a{color:#333;}",descriptioncss:"{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",descriptioncsslink:"a{color:#333;}",titlesmallscreen:true,showcarousel:true,carouselmargin:10,carouselposition:"top",carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",thumbtitleheight:18};var galleryWithTextBottomSkinOptions={padding:12,skinfolder:"skins/gallery/",bgcolor:"",bgimage:"",galleryshadow:false,slideshadow:true,showsocialmedia:false,headerpos:"bottomoutside",showdescription:true,titleoverlay:false,titleheight:72,titleautohide:true,titlecss:"{color:#333;font-size:14px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:16px 8px 4px 8px;}",titlecsslink:"a{color:#333;}",descriptioncss:"{color:#333;font-size:12px;font-family:Arial,Helvetica,sans-serif;overflow:hidden;text-align:center;padding:4px 8px; }",descriptioncsslink:"a{color:#333;}",titlesmallscreen:true,showcarousel:true,carouselmargin:10,carouselbgtransparent:true,thumbwidth:120,thumbheight:60,thumbgap:8,thumbmargin:12,thumbunselectedimagebordercolor:"#fff",thumbimageborder:2,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:true,thumbopacity:0.8,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#000; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}",thumbtitleheight:18};var darknessSkinOptions={skinfolder:"skins/darkness/",padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",thumbwidth:64,thumbheight:48,thumbgap:4,thumbmargin:6,thumbunselectedimagebordercolor:"#ffffff",thumbimageborder:1,thumbimagebordercolor:"",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8};var verticalLightSkinOptions={skinfolder:"skins/verticallight/",padding:12,bgcolor:"#fff",bgimage:"",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#333; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#333;}
92",descriptioncss:" {color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#333;}",showcarousel:true,carouselmargin:8,carouselposition:"right",carouselposresponsive:true,carouselposresponsiveonscreenwidth:800,carouselheight:280,carouselbgtransparent:false,carouselbgcolorstart:"#fff",carouselbgcolorend:"#fff",carouseltopborder:"#fff",carouselbottomborder:"#fff",carouselhighlightbgcolorstart:"#f0f0f0",carouselhighlightbgcolorend:"#f0f0f0",carouselhighlighttopborder:"#f0f0f0",carouselhighlightbottomborder:"#f0f0f0",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:48,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"",thumbimageborder:0,thumbimagebordercolor:"#fff",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}"};var verticalLightWithLeftSkinOptions=$.extend({},verticalLightSkinOptions,{carouselposition:"left"});var verticalSkinOptions={skinfolder:"skins/vertical/",padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"right",carouselposresponsive:true,carouselposresponsiveonscreenwidth:800,carouselheight:280,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:48,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"",thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:center; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal;}"};var verticalWithLeftSkinOptions=$.extend({},verticalSkinOptions,{carouselposition:"left"});var showcaseSkinOptions={skinfolder:"skins/showcase/",padding:12,bgcolor:"#444444",bgimage:"background.jpg",galleryshadow:false,slideshadow:false,showsocialmedia:false,headerpos:"bottom",showdescription:false,titleoverlay:false,titleautohide:false,titlecss:" {color:#ffffff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",titlecsslink:" a {color:#ffffff;}",descriptioncss:" {color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",descriptioncsslink:" a {color:#ffffff;}",showcarousel:true,carouselmargin:8,carouselposition:"bottom",carouselheight:280,carouselposresponsive:false,carouselbgtransparent:false,carouselbgcolorstart:"#494f54",carouselbgcolorend:"#292c31",carouseltopborder:"#666666",carouselbottomborder:"#111111",carouselhighlightbgcolorstart:"#999999",carouselhighlightbgcolorend:"#666666",carouselhighlighttopborder:"#cccccc",carouselhighlightbottomborder:"#444444",carouselhighlightbgimage:"",thumbwidth:148,thumbheight:60,thumbgap:2,thumbmargin:6,thumbunselectedimagebordercolor:"",thumbimageborder:1,thumbimagebordercolor:"#cccccc",thumbshowplayonvideo:true,thumbshadow:false,thumbopacity:0.8,thumbshowimage:true,thumbshowtitle:true,thumbtitlecss:"{text-align:left; color:#ffffff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; padding: 6px 0;}",thumbshowdescription:true,thumbdescriptioncss:"{font-size:10px;}"};var sysOptions=commonOptions;if(this.options.skin=="vertical")sysOptions=$.extend(sysOptions,verticalSkinOptions);else if(this.options.skin=="verticalwithleft")sysOptions=$.extend(sysOptions,verticalWithLeftSkinOptions);else if(this.options.skin=="verticallight")sysOptions=$.extend(sysOptions,verticalLightSkinOptions);else if(this.options.skin=="verticallightwithleft")sysOptions=$.extend(sysOptions,verticalLightWithLeftSkinOptions);else if(this.options.skin=="showcase")sysOptions=$.extend(sysOptions,showcaseSkinOptions);else if(this.options.skin=="light")sysOptions=$.extend(sysOptions,lightSkinOptions);else if(this.options.skin=="gallery")sysOptions=$.extend(sysOptions,gallerySkinOptions);else if(this.options.skin=="gallerywithtext")sysOptions=$.extend(sysOptions,galleryWithTextSkinOptions);else if(this.options.skin=="gallerywithtopthumbs")sysOptions=$.extend(sysOptions,galleryWithTextTopThumbnailsSkinOptions);else if(this.options.skin=="gallerywithtextbottom")sysOptions=$.extend(sysOptions,galleryWithTextBottomSkinOptions);else if(this.options.skin=="horizontal")sysOptions=$.extend(sysOptions,horizontalSkinOptions);else if(this.options.skin=="darkness")sysOptions=$.extend(sysOptions,darknessSkinOptions);else if(this.options.skin=="mediapage")sysOptions=$.extend(sysOptions,mediapageSkinOptions);else sysOptions=$.extend(sysOptions,horizontalSkinOptions);this.options=$.extend(sysOptions,this.options);this.options.titleheightlargescreen=this.options.titleheight;if(this.options.lightbox)this.options.showfullscreenbutton=false;if("slideduration"in this.options)this.options.slide.duration=this.options.slideduration;this.options.htmlfolder=window.location.href.substr(0,window.location.href.lastIndexOf("/")+1);if(!this.options.jsfolder||!this.options.jsfolder.length)this.options.jsfolder=jsFolder;if(this.options.skinfolder.charAt(0)!="/"&&this.options.skinfolder.substring(0,5)!="http:"&&this.options.skinfolder.substring(0,6)!="https:")this.options.skinfolder=this.options.jsfolder+this.options.skinfolder;var image_list=["bgimage","playvideoimage","playvideothumbimage","loadinggif","centerloadinggif"];for(var i=0;i<image_list.length;i++)if(this.options[image_list[i]]&&this.options[image_list[i]].length>0&&this.options[image_list[i]].substring(0,7).toLowerCase()!="http://"&&this.options[image_list[i]].substring(0,8).toLowerCase()!="https://")this.options[image_list[i]]=this.options.skinfolder+this.options[image_list[i]];var i;var l;var mark="";var bytes=this.options.fm.split(",");for(i=0;i<bytes.length;i++)mark+=String.fromCharCode(bytes[i]);this.options.frvem=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.htmlfolder.indexOf(d0)!=-1)this.options.frve=false;var screenWidth=$(window).width();if(this.options.screenquery)for(var i in this.options.screenquery)if(screenWidth<=this.options.screenquery[i].screenwidth){if(this.options.screenquery[i].gallerywidth)this.options.width=this.options.screenquery[i].gallerywidth;if(this.options.screenquery[i].galleryheight)this.options.height=this.options.screenquery[i].galleryheight;if(this.options.screenquery[i].thumbwidth)this.options.thumbwidth=this.options.screenquery[i].thumbwidth;if(this.options.screenquery[i].thumbheight)this.options.thumbheight=this.options.screenquery[i].thumbheight}var galleryid;if("galleryid"in this.options)galleryid=this.options.galleryid;else{galleryid=html5GalleryId;html5GalleryId++}
92var html5GalleryObject=new Html5Gallery($this,this.options,galleryid);$this.data("html5galleryobject",html5GalleryObject);$this.data("html5galleryid",galleryid);$this.data("object",html5GalleryObject);$this.data("id",galleryid);if(typeof html5GalleryObjects!=="undefined"&&html5GalleryObjects&&html5GalleryObjects.objects)html5GalleryObjects.addObject(html5GalleryObject)});return this}})(jQuery);jQuery(document).ready(function(){jQuery(".wonderplugin-engine").css({display:"none"});if(jQuery.fn.wonderplugingallery)jQuery(".wonderplugingallery").wonderplugingallery()})} 93function HTML5GalleryTimer(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.setInterval=function(interval){timerInstance.timeout=interval};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}} 94(function(){var scripts=document.getElementsByTagName("script");var jsFolder="";for(var i=0;i<scripts.length;i++)if(scripts[i].src&&scripts[i].src.match(/wonderplugingallery\.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(false){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;loadHtml5Gallery(jsFolder)}};else script.onload=function(){loadHtml5Gallery(jsFolder)};script.setAttribute("src",jsFolder+"jquery.js");head.appendChild(script)}else loadHtml5Gallery(jsFolder)})(); 95;void 0===TCB_Front.js_modules["post-list"]&&TCB_Front.setModuleLoadedStatus("post-list",!1),(t=>{if(!TCB_Front.isModuleLoaded("post-list")){t(window).on("tcb_after_dom_ready",()=>{t(".tcb-post-list").each((i,s)=>{new e(t(s)).renderPagination()})});class e{constructor(e){this.$element=e,this.content="",this.listArgs={};let i=this.getAttr("data-css");const s=t.Event("tcb_post_list_identifier.tcb");if(this.$element.trigger(s),s.identifier&&(i=s.identifier),this.identifier=i,this.listIdentifier="article",tve_frontend_options.is_editor_page?this.editorInit():this.frontendInit(),this.isCarousel()){this.isEditor=tve_frontend_options.is_editor_page;const t=this.$element.find(".tcb-carousel-container");t.attr("data-carousel-settings",decodeURI(t.attr("data-carousel-settings"))),this.carousel=new TCB_Front.Carousel(this),this.carousel.initCarousel()}}getPaginationInstance(){if(this.listArgs&&this.listArgs.attr){const t=this.listArgs.attr["pagination-type"];if(t.length&&"none"!==t&&void 0!==TCB_Front.Pagination)return TCB_Front.Pagination.factory(t,this)}}renderPagination(){this.pagination=this.getPaginationInstance(),this.pagination&&(tve_frontend_options.is_editor_page||this.pagination.addLoadListeners(),this.pagination.render())}editorInit(){this.listArgs={attr:{"pagination-type":this.getAttr("data-pagination-type"),total_post_count:this.getAttr("data-total_post_count")?this.getAttr("data-total_post_count"):100,pages_near_current:this.getAttr("data-pages_near_current")?this.getAttr("data-pages_near_current"):2},query:{posts_per_page:this.getAttr("data-posts_per_page")?this.getAttr("data-posts_per_page"):6,paged:1}}}frontendInit(){"undefined"==typeof tcb_post_lists?console.warn("Error initializing the post list parameters"):(this.listArgs=tcb_post_lists.find(t=>
95this.$element.is(t.identifier)),this.listArgs&&(this.listArgs.query&&void 0!==this.listArgs.query.offset&&delete this.listArgs.query.offset,this.listArgs.attr.queried_object=0,this.listArgs.query.queried_object=tve_frontend_options.queried_object,this.content=t('.tcb-post-list-template[data-identifier="'+this.listArgs.template+'"]').html()))}getAttr(t){return this.$element.attr(t)}getItems(t,e=this.listArgs){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.posts+"/html",data:{content:this.content,args:e}}).done(e=>{"function"==typeof t&&t(e),this.initItems(),TCB_Front.event_triggers(this.$element)}).fail(()=>{console.warn("There was an error and the content could not be loaded.")})}insertItems(e,i=!1){if(e.count&&e.posts){const s=this.$element.clone().empty();for(const t in e.posts)e.posts.hasOwnProperty(t)&&s.append(e.posts[t]);i?(this.$element.replaceWith(s),this.identifier.includes("tve-u-")?this.$element=t(`.tcb-post-list[data-css=${this.identifier}]`):this.$element=t(this.identifier),t(window).trigger("tcb_post_list_after_item_insert")):this.isCarousel()&&this.carousel?(this.$element.find(".slick-track").append(s.html()),this.carousel.initCarousel(!0)):(this.$element.append(s.html()),this.masonryRedo()),e.total_post_count&&(this.listArgs.attr.total_post_count=e.total_post_count)}}isLoading(){return this.$element.data("loading")}enableLoading(t=""){this.$element.addClass("tve-loading"+(t.length?" "+t:"")),this.$element.data("loading",!0)}disableLoading(){setTimeout(()=>this.$element.removeClass("tve-loading load-bot"),100),this.$element.data("loading",!1)}masonryRedo(t=this.$element){if(t.length&&t.data("masonry")){const e=t.find(`${this.listIdentifier}:not(.masonry-brick)`);t.masonry("appended",e),t.masonry("layout")}}initItems(){(this.$element.find(".tcb-custom-field-source.thrv-rating").length||this.$element.find("[data-shortcode-id*='acf_']").length)&&TCB_Front.dynamicElements.init()}isCarousel(){return"carousel"===this.$element.attr("data-type")}}window.TCB_Front.PostList=e,TCB_Front.setModuleLoadedStatus("post-list",!0)}})(ThriveGlobal.$j);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.