!function(g){"use strict";if(void 0!==window.dike_plc&&!window.dike_plc("lcweb","gg"))return console.error("Global Gallery - validate the license"),!1;var t=[],a=[],i=[];window.gg_gallery_pag=[],window.gg_gall_curr_filter=[],window.gg_gall_curr_search=[];var e=[],l=[],_=[],n=[],r=[],o=[],s=[],c=[],d=[],u=[],h=[],f=[],p=[],m=[],v=!1,w="",y=!1;const b='
';window.gg_galleries_init=function(t,a){if(void 0!==t&&t){if(!g("#"+t).length)return!1;void 0===a&&(_[t]=1,n[t]=1,r[t]=0),x(t,a)}else g(".gg_gallery_wrap").not(":empty").each((function(){var t=g(this).attr("id");gg_galleries_init(t,a)}))};const x=function(e,l){if(void 0===e)return!1;!function(e,l){var _=g("#"+e).hasClass("gg_collection_wrap")?".gg_coll_container":"";if(t[e]=_?g("#"+e+" .gg_coll_container").width():g("#"+e).width(),void 0!==l)return!0;i[e]=parseInt(g("#"+e+" "+_+" .gg_img").first().css("border-right-width")),a[e]=parseInt(g("#"+e+" "+_+" .gg_img").first().css("margin-right")),g("#"+e).hasClass("gg_masonry_gallery")?a[e]=parseInt(g("#"+e+" "+_+" .gg_img").first().css("padding-right")):g("#"+e).hasClass("gg_collection_wrap")&&(a[e]=parseInt(g("#"+e+" "+_+" .gg_coll_img_wrap").first().css("padding-right")))}(e,l),g("#"+e).hasClass("gg_standard_gallery")?k(e):g("#"+e).hasClass("gg_columnized_gallery")?T(e):g("#"+e).hasClass("gg_masonry_gallery")?O(e):g("#"+e).hasClass("gg_string_gallery")?z(e):g("#"+e).hasClass("gg_collection_wrap")&&A(e)},C=function(t,a){g(void 0===a?"#"+t+" .gg_main_thumb":"#"+t+" .gg_coll_outer_container .gg_main_thumb").each((function(){"undefined"!=g(this).data("gg-lazy-src")&&(g(this).attr("src",g(this).data("gg-lazy-src")),g(this).removeAttr("gg-lazy-src"))}))},k=function(t){if(!g("#"+t+" .gg_img").length)return!1;C(t),n[t]&&lc_lazyload("#"+t+" .gg_img .gg_main_thumb",{allLoaded:function(a){g("#"+t+" .gg_loader").fadeOut("fast"),g("#"+t+" .gg_img").each((function(e){g(this).addClass(t+"-"+e).css("width",Object.keys(a)[0].w+2*i[t]);var l=g("#"+t+" .gg_img").not(".gg_shown");0==e&&R(t,l.not(".gg_tags_excluded_img").length),e==g("#"+t+" .gg_img").length-1&&l.gg_display_images(t)})),n[t]=0,g(window).trigger("gg_loaded_gallery",[t])}}),K(t)},T=function(t){if(!g("#"+t+" .gg_img").length)return!1;C(t);var i=I(t);g("#"+t+" .gg_container").css("width","calc(100% + "+a[t]+"px + "+i+"px)"),g("#"+t+" .gg_img").css("width","calc("+100/i+"% - "+a[t]+"px - 1px)"),K(t),n[t]&&lc_lazyload("#"+t+" .gg_img .gg_main_thumb",{allLoaded:function(a){g("#"+t+" .gg_loader").fadeOut("fast"),g("#"+t+" .gg_img").each((function(a){g(this).addClass(t+"-"+a);var i=g("#"+t+" .gg_img").not(".gg_shown");0==a&&R(t,i.not(".gg_tags_excluded_img").length),a==g("#"+t+" .gg_img").length-1&&i.gg_display_images(t)})),n[t]=0,g(window).trigger("gg_loaded_gallery",[t])}}),K(t)},I=function(i){for(var e=t[i]-a[i],l=1,_=e,n=parseInt(g("#"+i).data("col-maxw"));_>=n;)l++,_=Math.round(e/l)-a[i];return l},O=function(i){C(i);for(var e=parseInt(g("#"+i).data("col-num")),l=a[i],_=Math.floor((t[i]+l)/e),r=void 0!==g("#"+i).data("minw")?parseInt(g("#"+i).data("minw")):lcgg.masonry_min_w;_0&&g("#"+i+" .gg_container").css("left",Math.floor(o/2)),K(i),n[i]?lc_lazyload("#"+i+" .gg_img:not(.gg_tags_excluded_img) .gg_main_thumb",{allLoaded:function(t){g("#"+i+" .gg_loader").fadeOut("fast"),g("#"+i+" .gg_container").isotope({percentPosition:!0,isResizeBound:!1,resize:!1,originLeft:!lcgg.rtl,masonry:{columnWidth:1},containerClass:"gg_isotope",itemClass:"gg_isotope-item",itemSelector:".gg_img:not(.gg_old_page)",transitionDuration:0}),setTimeout((function(){var t=g("#"+i+" .gg_img").not(".gg_shown");R(i,t.not(".gg_tags_excluded_img").length),t.gg_display_images(i),n[i]=0,g(window).trigger("gg_loaded_gallery",[i])}),300)}}):setTimeout((function(){g("#"+i+" .gg_container").isotope("layout")}),100)},z=function(t,a){C(t),n[t]?lc_lazyload("#"+t+" .gg_img .gg_main_thumb",{allLoaded:function(i){S(t,a),g("#"+t+" .gg_loader").fadeOut("fast");var e=g("#"+t+" .gg_img").not(".gg_shown");R(t,e.not(".gg_tags_excluded_img").length),e.gg_display_images(t),n[t]=0,g(window).trigger("gg_loaded_gallery",[t])}}):S(t,a),K(t)},S=function(e,l){if(void 0!==l){var _=l+" .gg_img .gg_main_thumb";e=l.replace("#gg_fakebox_","")}else _="#"+e+" .gg_img:not(.gg_tags_excluded_img) .gg_main_thumb";f[e]=0,p[e]=[],m[e]=[];var n=t[e]+a[e];g(_).each((async function(t,_){var r=g(this),o=g(this).parents(".gg_img"),s=e+"-"+o.data("img-id"),c=0,d=!1;if(o.css("width","auto").css("maxWidth","none"),await setTimeout((function(){o.css("maxWidth",r.width()+i[e]),o.addClass(s);var g=r.width();if(g){if(g=g-2+i[e]+a[e],p[e].push("."+s),m[e].push(g),f[e]=f[e]+g,c=f[e],n==c)p[e]=[],m[e]=[],f[e]=0;else if(nl&&!s&&c<100;){c++;var d=Math.ceil(_/(p[t].length-o.length)),u=!1;g.each(m[t],(function(a,e){if(-1!==g.inArray(a,o))return!0;var l=e-d;if(lr&&(l=r),o.push(a),u=!0,_-=m[t][a]-l}})),u||(g.each(m[t],(function(a,i){if(-1!==g.inArray(a,o))return!0;m[t][a]=i-d})),r=m[t],_=M(r)-l,o.length>=p[t].length&&(d=Math.ceil(_/p[t].length),g.each(m[t],(function(g,a){m[t][g]=a-d})),s=!0),r=m[t])}g.each(p[t],(function(i,e){g(e).css("width",m[t][i]-a[t])}));var h=l-M(m[t]);h>0&&g.each(p[t],(function(i,e){if(-1===g.inArray(i,o)||i==p[t].length-1)return g(e).css("width",m[t][i]-a[t]+h),!1}))},M=function(t){var a=0;return g.each(t,(function(g,t){a+=parseFloat(t)})),a},A=function(t){C(t,!0);var i=j(t);g("#"+t+" .gg_coll_container").css("width","calc(100% + "+a[t]+"px + "+i+"px)"),g("#"+t+" .gg_coll_img_wrap").css("width","calc("+100/i+"% - 1px)"),lcgg.rtl&&g("#"+t+" .gg_coll_container").css("left",-1*i),K(t),s[t]?setTimeout((function(){g("#"+t+" .gg_container").isotope("layout")}),300):lc_lazyload("#"+t+" .gg_coll_img .gg_main_thumb",{allLoaded:function(a){g("#"+t+" .gg_loader").fadeOut("fast"),g("#"+t+" .gg_coll_img").each((function(a){var i=t+"-"+a;g(this).addClass(i)}));var i=g("#"+t+" .gg_cats_selected").length&&"*"!=g("#"+t+" .gg_cats_selected").data("coll-filter-id")?g("#"+t+" .gg_cats_selected").data("coll-filter-id"):"";g("#"+t+" .gg_coll_container").isotope({layoutMode:"fitRows",percentPosition:!0,isResizeBound:!1,resize:!1,originLeft:!lcgg.rtl,containerClass:"gg_isotope",itemClass:"gg_isotope-item",itemSelector:".gg_coll_img_wrap",transitionDuration:"0.6s",filter:i?":not(.gg_coll_pag_hidden) .ggc_"+i:":not(.gg_coll_pag_hidden)"}),setTimeout((function(){var a=g("#"+t+" .gg_coll_img_wrap").not(".gg_shown");R(t,a.length,!0),a.gg_display_images(),n[t]=0,g(window).trigger("gg_loaded_collection",[t])}),300)}})},j=function(g){for(var i=t[g]-a[g],e=1,l=i;l>=lcgg.coll_max_w;)e++,l=Math.round(i/e)-a[g];return e};g(document).ready((function(){g(document).on("click",".gg_coll_img:not(.gg_linked_img)",(function(){var t=g(this).parents(".gg_collection_wrap").attr("id"),a=g(this).parents(".gg_collection_wrap").data("cid"),i=g(this).data("gall-data"),e=g(this).data("coll-gid");if(void 0===d[t]||!d[t]){var l=g(this).parents(".gg_collection_wrap").find(".gg_img_title_under").length?g(this).next().find(".gg_img_title_under").text():g(this).find(".gg_img_title").text();F(a,"gcg_",e,l),G(t,i)}}))}));const G=function(t,a){var i=g(location).attr("href");void 0===u[t]&&(u[t]=[]),h[t]=g("#"+t+' .gg_coll_img[data-gall-data="'+a+'"]'),g("#"+t+" .gg_coll_gallery_container .gg_gallery_wrap").length&&(g("#"+t+" .gg_coll_gallery_container .gg_gallery_wrap").remove(),g("#"+t+" .gg_coll_gallery_container").append(''+b+"
")),g("#"+t+" .gg_coll_gallery_container .gg_gallery_wrap").addClass("gg_coll_ajax_wait"),g("#"+t+" > table").animate({left:"-100%"},700,(function(){g("#"+t+" .gg_coll_table_first_cell").css("opacity",0)})),setTimeout((function(){g("#"+t+" .gg_coll_table_first_cell").css("position","absolute")}),710);var e=g("#"+t).offset().top;if(g(window).scrollTop()>e){const t=void 0===window.gg_addit_scrolltop?0:parseInt(window.gg_addit_scrolltop,10);g("html, body").animate({scrollTop:e-(15+t)},600)}if(void 0!==u[t][a])W(t,u[t][a]);else{var l={gg_type:"load_coll_gallery",cid:t,gdata:a};d[t]=g.post(i,l,(function(i){if(-1===g.trim(i).indexOf("gg_coll_gall_topmargin"))return W(t,"Error retrieving gallery code
"),!1;u[t][a]=i,W(t,i),"undefined"!=typeof gg_lcl_allow_deeplink&&gg_lcl_allow_deeplink()})).fail((function(g){console.error(g),W(t,"Error retrieving gallery code
")}))}},W=function(t,a){g("#"+t+" .gg_coll_gallery_container .gg_gallery_wrap").remove(),g("#"+t+" .gg_coll_gallery_container").removeClass("gg_main_loader").append(a),g("#"+t+" .gg_coll_gall_title").length>1&&g("#"+t+" .gg_coll_gall_title").first().remove(),tg(g("#"+t+" .gg_coll_gallery_container")),P(t),d[t]=null},P=function(t){g("#"+t+" .gg_coll_gall_title").each((function(){var t=g(this).parents(".gg_coll_table_cell").width();g(this).parent().find(".gg_coll_go_back").outerWidth(!0)+g(this).outerWidth(!0)>t?g(this).addClass("gg_narrow_coll"):g(this).removeClass("gg_narrow_coll")}))};g(document).ready((function(){g(document).on("click",".gg_coll_go_back",(function(){var t=g(this).parents(".gg_collection_wrap").attr("id"),a=g(this).parents(".gg_collection_wrap").data("cid");void 0!==d[t]&&d[t]&&(d[t].abort(),d[t]=null);var i=g(window).scrollTop(),e=i+g(window).height();if(void 0!==h[t]){var l=h[t].offset().top;if(l+h[t].height()>e||l table").animate({left:0},700),setTimeout((function(){g("#"+t+" .gg_coll_gallery_container > *").not(".gg_coll_go_back").remove(),Q("gcg_"+a)}),700)}))})),g(document).ready((function(){g(document).on("click",".gg_filter a",(function(t){t.preventDefault();var a=g(this).parents(".gg_filter").attr("id").substr(4),i=g(this).data("coll-filter-id"),e="#"+g(this).parents(".gg_collection_wrap").attr("id");g("#ggf_"+a+" a").removeClass("gg_cats_selected"),g(this).addClass("gg_cats_selected"),D(a,i,e),g("#ggmf_"+a).length&&(g("#ggmf_"+a+" option").removeAttr("selected"),"*"!==g(this).data("coll-filter-id")&&g("#ggmf_"+a+" option[value="+g(this).data("coll-filter-id")+"]").attr("selected","selected"))})),g(document).on("change",".gg_coll_table_cell .gg_mobile_filter_dd",(function(t){var a=g(this).parents(".gg_mobile_filter").attr("id").substr(5),i=g(this).val(),e="#"+g(this).parents(".gg_collection_wrap").attr("id");D(a,i,e);var l="*"==g(this).val()?".ggf_all":".ggf_id_"+i;g("#ggf_"+a+" a").removeClass("gg_cats_selected"),g("#ggf_"+a+" "+l).addClass("gg_cats_selected")}))}));const D=function(t,a,i){if("*"!==a)var e=g(".ggf_id_"+a).text();"*"!==a?F(t,"gcc_",a,e):Q("gcc_"+t),"*"!==a&&(a=".ggc_"+a),"*"==a?g(".cid_"+t).find(".gg_coll_pag_wrap").fadeIn():g(".cid_"+t).find(".gg_coll_pag_wrap").fadeOut(),a="*"==a?":not(.gg_coll_pag_hidden)":a,g(i+" .gg_coll_container").isotope({filter:a})};g.fn.gg_display_images=function(t,a){if(void 0!==t&&void 0!==gg_gall_curr_filter[t]&&gg_gall_curr_filter[t]&&void 0===a)return this.gg_display_images(t,":not(.gg_tags_excluded_img)"),this.gg_display_images(t,".gg_tags_excluded_img"),!0;(void 0===a?this:g(this).filter(a)).each((function(t,a){var i=g(this),e=lcgg.delayed_fx?170:0;setTimeout((function(){i.addClass("gg_shown")}),e*t)}))};const R=function(t,a,i){if(void 0!==o[t]&&o[t])return!1;var e=g((i=void 0!==i)?"#"+t+" .gg_coll_container":"#"+t+" .gg_container");const l=e.outerHeight(!1);let r=setInterval((function(){e.find(".gg_loader").length&&!i||(e.animate({"max-height":l+1e4},7e3,"linear",(function(){e.css("max-height","none")})),o[t]=!1,clearInterval(r))}),300);n[t]&&setTimeout((function(){n[t]=0,g("#"+t+" .gg_paginate > div").not(".gg_loader").fadeTo(150,1)}),600),_[t]=0,s[t]=!0},E=function(){if(-1!==(v=decodeURIComponent(window.location.href)).indexOf("#")){var t=v.split("#");v=t[0],w="#"+t[1]}var a={},i=v.slice(v.indexOf("?")+1).split("&");return g.each(i,(function(g,t){var i=t.split("=");a[i[0]]=i[1]})),a},H=function(t){return-1!==g.inArray(t,lcgg.deeplinked_elems)},F=function(t,a,i,e){if(y||!H(a))return!1;if(!lcgg.dl_coll_gall&&g(".gg_collection_wrap .gid_"+t).length)return!1;var l=E(),_=a+t,n=void 0!==e&&e?i+"/"+function(g){g=(g=g.toString().replace(/^\s+|\s+$/g,"")).toLowerCase();for(var t="àáäâèéëêìíïîòóöôùúüûñç·/_,:;",a=0;a<28;a++)g=g.replace(new RegExp(t.charAt(a),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(a));return g.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}(e):i,r=_+"="+n+w;if(-1===v.indexOf("?"))history.pushState(null,null,v+"?"+r);else{if(void 0!==l[_]&&l[_]==n)return!0;var o=v.slice(0,v.indexOf("?")+1),s=0,c=!1;g.each(l,(function(g,i){return void 0===g||(("tag"==a||"search"==a)&&g=="ggp_"+t||(s>0&&(o+="&"),void(g!=_?(o+=i?g+"="+i:g,c=!0,s++):!0)))})),c&&(o+="&"),o+=r,lcgg.basic_deeplink?history.replaceState(null,null,o):history.pushState(null,null,o)}},Q=function(t){var a=E();if(void 0===a[t])return!1;var i=[];g.each(a,(function(g,a){if(void 0!==g&&g&&g!=t){var e=a?g+"="+a:g;i.push(e)}}));var e=i.length?"?":"",l=v.slice(0,v.indexOf("?"))+e+i.join("&")+w;history.replaceState(null,null,l),-1===v.indexOf("ggt_")&&-1===v.indexOf("ggc_")&&-1===v.indexOf("ggp_")&&-1===v.indexOf("ggs_")&&!1};window.addEventListener("popstate",(function(t){var a=E();y=!0;var i={galls:{},colls:{}},e={ggt:"",ggs:"",ggp:1,gcc:""};g.each(a,(function(t,a){if(void 0===a)return!0;var l=parseInt(t.substr(4),10);if(!g(".gid_"+l).length&&!g(".cid_"+l).length)return!0;var _=a.split("/");if(a=_[0],g(".gid_"+l).length){var n=g(".gid_"+l).attr("id"),r=g('.gg_pre_gallery[data-gid="'+n+'"]');void 0===i.galls[n]&&(i.galls[n]=e),H("ggt_")&&-1!==t.indexOf("ggt_")&&r.find('.gg_tag[data-tag="'+a+'"]').length&&(i.galls[n].ggt=r.find('.gg_tag[data-tag="'+a+'"]').data("images").toString().split(",")),H("ggs_")&&-1!==t.indexOf("ggs_")&&r.find(".gg_gall_search_form input").length&&(i.galls[n].ggs=a),H("ggp_")&&-1!==t.indexOf("ggp_")&&!g("#"+n+" .gg_infinite_scroll").length&&(i.galls[n].ggp=parseInt(a,10))}else void 0===i.colls[l]&&(i.colls[l]=e),H("gcc_")&&-1!==t.indexOf("gcc_")&&g(".ggf_id_"+a).length&&(i.colls[l].gcc=parseInt(a,10)),H("gcg_")&&-1!==t.indexOf("gcg_")&&g(".gg_coll_img[rel="+a+"]").length&&(i.colls[l].gcg=parseInt(a,10))})),g(".gg_true_gallery").each((function(){var t=g(this).attr("id"),a=(g(this).find(".gg_paginate").length,i.galls);void 0===a[t]&&(a[t]=e),void 0===gg_gallery_pag[t]&&(gg_gallery_pag[t]=1),void 0===gg_gall_curr_filter[t]&&(gg_gall_curr_filter[t]=""),void 0===gg_gall_curr_search[t]&&(gg_gall_curr_search[t]="");var l=gg_gall_curr_filter[t];gg_gall_curr_search[t];gg_gallery_pag[t]=a[t].ggp,gg_gall_curr_filter[t]=a[t].ggt,gg_gall_curr_search[t]=a[t].ggs,"undefined"!=typeof gg_pag_vars&&void 0!==gg_pag_vars[t]?U(t):l!=gg_gall_curr_filter[t]?gg_gall_curr_filter[t]?g('.gg_pre_gallery[data-gid="'+t+'"] .gg_tag[data-tag="'+gg_gall_curr_filter[t].join(",")+'"]').trigger("click"):g('.gg_pre_gallery[data-gid="'+t+'"] .gg_tag[data-tag="*"]').trigger("click"):g('.gg_pre_gallery[data-gid="'+t+'"] .gg_gall_search_form input').val(gg_gall_curr_search[t]).trigger("keyup")})),g(".gg_collection_wrap").each((function(){var t=parseInt(g(this).data("cid"),10),a=i.colls;if(!g(".cid_"+t+" .ggf_all").length)return!0;H("gcc_")&&(void 0!==a[t]&&void 0!==a[t].gcc?g(".cid_"+t+" .ggf_id_"+a[t].gcc).trigger("click"):g(".cid_"+t+" .ggf_all").trigger("click")),void 0!==a[t]&&void 0!==a[t].gcg?g(".cid_"+t+" .gg_coll_img[rel="+a[t].gcg+"]").trigger("click"):g(".cid_"+t+" .gg_coll_go_back").trigger("click")})),-1===v.indexOf("ggt_")&&-1===v.indexOf("ggp_")&&-1===v.indexOf("ggs_")&&-1===v.indexOf("gcc_")&&!1,y=!1})),g(document).ready((function(){g(document).on("click",".gg_true_gallery .gg_next_page",(function(){var t=g(this).parents(".gg_gallery_wrap").attr("id");if(!g(this).hasClass("gg_pag_disabled")&&0==r[t]){var a=void 0===gg_gallery_pag[t]?1:gg_gallery_pag[t];gg_gallery_pag[t]=a+1,U(t,!0)}})),g(document).on("click",".gg_true_gallery .gg_prev_page",(function(){var t=g(this).parents(".gg_gallery_wrap").attr("id");if(!g(this).hasClass("gg_pag_disabled")&&0==r[t]){var a=void 0===gg_gallery_pag[t]?1:gg_gallery_pag[t],i=a-1<1?1:a-1;gg_gallery_pag[t]=i,U(t,!0)}})),g(document).on("click",".gg_true_gallery .gg_num_btns_wrap > div, .gg_true_gallery .gg_dots_pag_wrap > div",(function(){var t=g(this).parents(".gg_gallery_wrap").attr("id");g(this).hasClass("gg_pag_disabled")||0!=r[t]||(gg_gallery_pag[t]=g(this).data("pag"),U(t,!0))})),g(document).on("click",".gg_true_gallery .gg_infinite_scroll",(function(){var t=g(this).parents(".gg_gallery_wrap").attr("id");if(r[t])return!1;var a=void 0===gg_gallery_pag[t]?2:gg_gallery_pag[t]+1;gg_gallery_pag[t]=a,U(t)}))}));const U=function(t,a){window.location.href;var i=g("#"+t).data("gid");if(g("#"+t).hasClass("gg_filtering_imgs")||r[t])return console.error("GG - wait till previous tag filter or pagination to end"),!1;r[t]=1,void 0===gg_gall_curr_filter[t]&&(gg_gall_curr_filter[t]=""),void 0===gg_gall_curr_search[t]&&(gg_gall_curr_search[t]=""),void 0!==a&&(gg_gallery_pag[t]>1?F(i,"ggp_",gg_gallery_pag[t]):Q("ggp_"+i));var e={gid:g("#"+t).data("gid"),gg_type:"gg_pagination",gg_filtered_imgs:gg_gall_curr_filter[t],gg_search_str:gg_gall_curr_search[t],gg_ol:g("#"+t).data("gg_ol"),gg_page:gg_gallery_pag[t],gg_pag_vars:gg_pag_vars[t]},_=JSON.stringify(e),n=void 0!==l[t]&&void 0!==l[t][_];if(1!=gg_gallery_pag[t]&&g("#"+t+" .gg_infinite_scroll").length)g("#"+t+" .gg_container").stop(!0).css("max-height",g("#"+t+" .gg_container").height()),g("#"+t+" .gg_paginate .gg_loader").length&&g("#"+t+" .gg_paginate .gg_loader").remove(),g("#"+t+" .gg_infinite_scroll").fadeTo(200,0),setTimeout((function(){g("#"+t+" .gg_paginate").prepend(b)}),200);else{var s=g("#"+t+" .gg_container").height(),c=Math.round(s/30*20);c<220&&(c=220),void 0!==o[t]&&(clearTimeout(o[t]),o[t]=!1),g("#"+t+" .gg_container").css("max-height",s).stop(!0).animate({"max-height":150},c),g("#"+t+" .gg_img").addClass("gg_old_page");setTimeout((function(){!1,g("#"+t+" .gg_old_page").remove()}),c),setTimeout((function(){g("#"+t+" .gg_loader").fadeIn("fast"),g("#"+t+" .gg_paginate").remove()}),200);const a=g(window).scrollTop(),i=g("#"+t).offset().top;if(a>i){const t=void 0===window.gg_addit_scrolltop?0:parseInt(window.gg_addit_scrolltop,10);g("html, body").animate({scrollTop:i-(30+t)},c)}}return n?(g("#"+t+" .gg_paginate").fadeOut(),setTimeout((function(){B(t,l[t][_])}),500)):(void 0===l[t]&&(l[t]=[]),g.post(window.location.href,e,(function(g){l[t][_]=g,B(t,g)}))),!0},B=function(t,a){var i=g(""+a+"
"),e={imgs:i.find(".gg_img"),pag:i.find(".gg_paginate")};g("#"+t).hasClass("gg_string_gallery")?(g("#"+t+" .gg_container .gg_string_clear_both").remove(),g("#"+t+" .gg_container").append(e.imgs),g("#"+t+" .gg_container").append('')):g("#"+t+" .gg_container").append(e.imgs),g("#"+t).hasClass("gg_masonry_gallery")&&g("#"+t+" .gg_container").isotope("reloadItems"),g("#"+t+" .gg_img").length||g("#"+t).addClass("gg_noresult"),setTimeout((function(){if(e.pag.length){g("#"+t).find(".gg_img").length,parseInt(g("#"+t).find(".gg_paginate").data("gg-totimgs"),10);e.pag.css("opacity",0),g("#"+t).find(".gg_paginate").replaceWith(e.pag),e.pag.length&&!g("#"+t).find(".gg_paginate").length&&g("#"+t+" .gg_container").after(e.pag),g("#"+t).find(".gg_infinite_scroll").length&&g("#"+t).find(".gg_infinite_scroll").fadeTo(200,1),setTimeout((function(){g("#"+t+" .gg_paginate").fadeTo(400,1)}),1e3)}else g("#"+t).find(".gg_infinite_scroll").length&&g("#"+t).find(".gg_infinite_scroll").remove();g("#"+t+" .gg_loader").fadeOut()}),100),r[t]=0,n[t]=1,x(t)};g(document).ready((function(){g(document).on("click",".gg_coll_pag_wrap .gg_next_page:not(.gg_pag_disabled)",(function(){var t=g(this).parents(".gg_coll_pag_wrap"),a=t.attr("id");if(r[a])return!1;var i=parseInt(t.attr("data-pag"),10)+1;i>=parseInt(t.data("totpag"),10)&&g(this).addClass("gg_pag_disabled"),t.find(".gg_prev_page").removeClass("gg_pag_disabled"),t.find(".gg_nav_mid span").text(i),q(t,i,!1)})),g(document).on("click",".gg_coll_pag_wrap .gg_prev_page:not(.gg_pag_disabled)",(function(){var t=g(this).parents(".gg_coll_pag_wrap"),a=t.attr("id");if(r[a])return!1;var i=parseInt(t.attr("data-pag"),10)-1;i<=1&&g(this).addClass("gg_pag_disabled"),t.find(".gg_next_page").removeClass("gg_pag_disabled"),t.find(".gg_nav_mid span").text(i),q(t,i,!1)})),g(document).on("click",".gg_coll_pag_wrap .gg_num_btns_wrap > div:not(.gg_pag_disabled), .gg_coll_pag_wrap .gg_dots_pag_wrap > div:not(.gg_pag_disabled)",(function(){var t=g(this).parents(".gg_coll_pag_wrap"),a=t.attr("id");if(r[a])return!1;parseInt(t.attr("data-pag"),10);var i=parseInt(g(this).data("pag"),10);t.find(".gg_pagenum, .gg_pag_dot").removeClass("gg_pag_disabled"),g(this).addClass("gg_pag_disabled"),q(t,i,!1)})),g(document).on("click",".gg_coll_pag_wrap .gg_infinite_scroll",(function(){var t=g(this).parents(".gg_coll_pag_wrap"),a=t.attr("id");if(r[a])return!1;var i=parseInt(t.data("totpag"),10),e=parseInt(t.attr("data-pag"),10)+1;e>=i&&g(this).fadeOut((function(){t.slideUp()})),q(t,e,!0)}))})),g(window).scroll((function(){var t=g(this).scrollTop();g(".gg_auto_inf_scroll").each((function(){var a=g(this),i=a.offset().top,e=a.outerHeight(),l=g(window).height();t>i+e-l&&a.trigger("click")}))}));const q=function(t,a,i){var e=t.parents(".gg_collection_wrap"),l=(parseInt(t.data("totpag"),10),parseInt(t.data("per-pag"),10)),_=1,n=1;t.attr("data-pag",a),e.find(".gg_coll_img_wrap").removeClass("gg_coll_pag_hidden"),e.find(".gg_coll_img_wrap").each((function(t,e){(!i&&n!=a||i&&n>a)&&g(this).addClass("gg_coll_pag_hidden"),++_>l&&(_=1,n++)})),e.find(".gg_coll_container").isotope({filter:":not(.gg_coll_pag_hidden)"})};g(document).ready((function(){g(document).on("click",".gg_tag:not(.gg_tag_sel)",(function(t){g(this).trigger("gg-click")})),g(document).on("gg-click",".gg_tag",(function(t){var a=g(this).parents(".gg_tags_wrap").data("gid"),i=g("#"+a).data("gid"),e=g(this).data("tag");if("*"==e)var l="*";else l=g(this).data("images").toString().split(",");J(a,l,"tags")&&(g(this).parents(".gg_tags_wrap").find(".gg_tag_sel").removeClass("gg_tag_sel"),g(this).addClass("gg_tag_sel"),gg_gall_curr_filter[a]&&"*"!=l?F(i,"ggt_",g(".gg_tag_gid_"+i+" .gg_tag_sel").attr("data-tag")):Q("ggt_"+i)),g(this).parents(".gg_tags_wrap").find(".gg_tags_dd").length&&(g(this).parents(".gg_tags_wrap").find(".gg_tags_dd option").removeAttr("selected"),"*"!==e&&g(this).parents(".gg_tags_wrap").find('.gg_tags_dd option[value="'+e+'"]').attr("selected","selected"))})),g(document).on("change",".gg_tags_dd",(function(t){var a=g(this).parents(".gg_tags_wrap"),i=a.data("gid"),e=g("#"+i).data("gid"),l="*"==g(this).val()?"*":a.find('.gg_tag[data-tag="'+g(this).val()+'"]').data("images"),_="*"==l?l:l.toString().split(",");if(!J(i,_,"tags"))return!1;a.find(".gg_tag_sel").removeClass("gg_tag_sel"),a.find('.gg_tag[data-images="'+l+'"]').addClass("gg_tag_sel"),gg_gall_curr_filter[i]&&"*"!=_?F(e,"ggt_",g(".gg_tag_gid_"+e+" .gg_tag_sel").attr("data-tag")):Q("ggt_"+e)}))}));const J=function(t,a,i){var l=g("#"+t),_=l.find(".gg_paginate").length;if(void 0===e[t]&&(e[t]=!1),l.hasClass("gg_filtering_imgs")&&r[t])return console.error("GG - wait till previous tag filter or pagination to end"),!1;if("tags"==i&&(gg_gall_curr_filter[t]="*"==a?"":a),n=!1,!_){var n=!0;"*"!=a?g.each(a,(function(a,i){if(!g("#"+t+' .gg_img[data-img-id="'+i+'"]').length)return n=!1,!1})):e[t]&&(n=!1)}return n&&!e[t]&&("undefined"==typeof gg_pag_vars||void 0===gg_pag_vars[t])||"tags"==i&&!gg_gall_curr_filter[t]&&gg_gall_curr_search[t]&&!_&&n||"tags"==i&&gg_gall_curr_filter[t]&&gg_gall_curr_search[t]&&!_||"search"==i&&!gg_gall_curr_search[t]&&gg_gall_curr_filter[t]&&!_&&n||"search"==i&&gg_gall_curr_search[t]&&gg_gall_curr_filter[t]&&!_?N(l,a,i):(gg_gallery_pag[t]=1,e[t]=!0,Q("ggp_"+l.data("gid")),g("#"+t).removeClass("gg_noresult"),!U(t)||gg_gall_curr_filter[t]||gg_gall_curr_search[t]||(e[t]=!1)),!0},N=function(t,a,i){var e=t.attr("id"),l=t.find(".gg_container"),_="gg_fakebox_"+e,n=t.hasClass("gg_string_gallery"),r="tags"==i?"gg_tags_excluded_img":"gg_search_excluded_img",o=".gg_tags_excluded_img, .gg_search_excluded_img",s=0;if(t.hasClass("gg_masonry_gallery"))t.addClass("gg_filtering_imgs"),t.find(".gg_img").each((function(){var t=g(this).data("img-id");"*"==a||-1!==g.inArray(t.toString(),a)?(g(this).removeClass(r),s++):g(this).addClass(r)})),l.isotope({filter:":not("+o+")"});else{l.css("height",l.outerHeight());var c=t.hasClass("gg_standard_gallery")?"text-align: center;":"",d=n?t.outerWidth(!0):l.outerWidth(!0);g("body").append(''),n&&(g("#"+_).html(t.clone()),g("#"+_+" .gg_string_gallery").removeAttr("id"),g("#"+_+" .gg_img").removeClass(r).removeAttr("style")),t.find(".gg_img").each((function(){var t=g(this),i=t.data("img-id");"*"==a||-1!==g.inArray(i.toString(),a)?(s++,n||g("#"+_).append('')):g("#"+_).find('[data-img-id="'+i+'"]').remove();var e=t.position();t.css({left:e.left+"px",top:e.top+"px"})})),t.find(".gg_img").css("position","absolute"),setTimeout((function(){t.addClass("gg_filtering_imgs"),s&&n&&S(!1,"#"+_),t.find(".gg_img").each((function(){var t=g(this).data("img-id");if("*"==a||-1!==g.inArray(t.toString(),a)){var i=g("#"+_+' [data-img-id="'+t+'"]').position();g(this).css({left:i.left+"px",top:i.top+"px"}),g(this).removeClass(r)}else g(this).css({left:"auto",top:"auto"}),g(this).addClass(r)}));var i=g("#"+_+" div").length?g("#"+_+" div").last().position().top+g("#"+_+" div").last().height():100;l.css("height",i),s&&n&&S(e)}),50)}s?t.removeClass("gg_noresult"):t.addClass("gg_noresult"),setTimeout((function(){t.removeClass("gg_filtering_imgs"),t.hasClass("gg_masonry_gallery")||(l.css("height","auto"),t.find(".gg_img").not(o).css("position","static"),g("#"+_).remove())}),500)};let $;g(document).on("keyup input",".gg_gall_search_form input",(function(){$&&clearTimeout($);var t=g(this);$=setTimeout((function(){var a=t.parents(".gg_pre_gallery").data("gid"),i=g("#"+a),e=g("#"+a).data("gid"),l=[],_=g.trim(t.val());if(_.length<2)_="",l="*",t.parents(".gg_gall_search_form").removeClass("ggs_has_txt");else{t.parents(".gg_gall_search_form").addClass("ggs_has_txt");var n=_.toLowerCase().split(" ");i.find(".gg_img").each((function(){var t=(t=g(this).data("gg-title")+" "+g(this).data("gg-descr")+" "+g(this).data("gg-author")+" "+g(this).data("gg-tags")).toLowerCase(),a=g(this).data("img-id");g.each(n,(function(g,i){return i.length<2||(-1!==t.indexOf(i)?(l.push(""+a),!1):void 0)}))}))}gg_gall_curr_search[a]=_,J(a,l,"search",_),_?F(e,"ggs_",_):Q("ggs_"+e)}),300)})),g(document).on("click",".gg_clear_search",(function(){var t=g(this).parents(".gg_gall_search_form").find("input");t.val(""),t.trigger("keyup")})),jQuery(document).on("keypress",".gg_gall_search_form input",(function(g){return 13!=g.keyCode}));const K=function(t,a){g("#"+t+" .gg_img").each((function(t,a){var i=g(this);g.trim(i.find(".gg_img_title").html())?i.find(".gg_main_overlay").show():i.find(".gg_main_overlay").hide()}))};"ontouchstart"in window&&(g(".gg_img").on("touchstart",(function(){g(this).addClass("gg_touch_on")})),g(".gg_img").on("touchend",(function(){g(this).removeClass("gg_touch_on")}))),window.gg_itg_init=function(t){C(t),lc_lazyload("#"+t+" .gg_img .gg_main_thumb",{allLoaded:function(){g("#"+t+" .gg_itg_container").addClass("gg_itg_shown")}})},g(document).on("click",".gg_itg_wrap",(function(t){var a=g(this).attr("id");if("undefined"==typeof gg_itg_obj||void 0===gg_itg_obj[a])return console.error("Global Gallery - gg_itg_obj not found"),!1;if(g(t.terget).hasClass("gg_itg_img"))var i=g(t.target).data("index");else if(g(t.target).parents(".gg_itg_img").length)i=g(t.target).parents(".gg_itg_img").data("index");else i=0;"undefined"!=typeof gg_throw_lb&&gg_throw_lb(gg_itg_obj[a],a,i,!0)})),window.gg_galleria_show=function(t){setTimeout((function(){g(t+" .galleria-stage").length?(g(t).removeClass("gg_show_loader"),g(t+" .galleria-container").fadeTo(200,1)):gg_galleria_show(t)}),50)};const V=function(t){return g(t).hasClass("gg_galleria_responsive")?parseFloat(g(t).data("asp-ratio")):g(t).height()};window.gg_galleria_init=function(t){var a=g(t).data("gg-autoplay"),i=!!(lcgg.slider_autoplay&&"0"!=a||"1"==a);let e=lcgg.slider_crop;"true"==e?e=!0:"false"==e&&(e=!1),Galleria.run(t,{theme:"ggallery",height:V(t),transition:lcgg.slider_fx,touchTransition:lcgg.slider_fx,transitionSpeed:lcgg.slider_fx_time,fullscreenDoubleTap:!1,imageCrop:e,wait:!0,debug:!1,dataConfig:function(t){return{title:g(t).attr("alt"),description:g(t).data("description")}},extend:function(){var a=this;g(t+" .galleria-loader").append(b),i&&setTimeout((function(){g(t+" .galleria-gg-play").addClass("galleria-gg-pause"),a.play(lcgg.slider_interval)}),50),g(t+" .galleria-gg-play").click((function(){g(this).toggleClass("galleria-gg-pause"),a.playToggle(lcgg.slider_interval)})),g(t+" .galleria-gg-lightbox").click((function(){g(t+" .galleria-thumbnails > div").each((function(t,a){g(this).hasClass("active")&&(window.gg_active_index=t)})),g(t+" .galleria-gg-play").removeClass("galleria-gg-pause"),a.pause()})),g(t+" .galleria-gg-toggle-thumb").click((function(){var t=g(this).parents(".gg_galleria_slider_wrap"),a=g(this).parents(".gg_galleria_slider_wrap").find(".galleria-thumbnails-container").height();t.hasClass("galleria-gg-show-thumbs")||t.hasClass("gg_galleria_slider_show_thumbs")?(t.stop().animate({"padding-bottom":"15px"},400),t.find(".galleria-thumbnails-container").stop().animate({bottom:"20px",opacity:0},400),t.removeClass("galleria-gg-show-thumbs"),t.hasClass("gg_galleria_slider_show_thumbs")&&t.removeClass("gg_galleria_slider_show_thumbs")):(t.stop().animate({"padding-bottom":a+2+12},400),t.find(".galleria-thumbnails-container").stop().animate({bottom:"-"+(a+2+10)+"px",opacity:1},400),t.addClass("galleria-gg-show-thumbs"))})),"undefined"!=typeof gg_lcl_allow_deeplink&&gg_lcl_allow_deeplink()}})},window.gg_car_calc_breakpoints=function(t,a,i,e){var l=[];if(e){var _=g("#gg_car_"+t).width()+50,n=Math.round(_/e),r={breakpoint:_,settings:{slidesToShow:e,slidesToScroll:i?e:1}};l.push(r);for(let g=e;g>=1;g--)r={breakpoint:_-n*(e-g),settings:{slidesToShow:g,slidesToScroll:i?g:1}},l.push(r)}else for(let g=1;g<100;g++){var o=g*a;if(o>2e3)break;r={breakpoint:o,settings:{slidesToShow:g,slidesToScroll:i?g:1}};l.push(r)}return l},window.gg_carousel_preload=function(t,a){if(g("#gg_car_"+t).prepend(b),g("#gg_car_"+t+" .gg_grayscale_fx").length||g("#gg_car_"+t+" .gg_blur_fx").length)i=!1;else{lc_lazyload("#gg_car_"+t+" img",{allLoaded:function(a){g("#gg_car_"+t+" .gg_img_inner").height()}});var i=!0}lc_lazyload("#gg_car_"+t+" "+(i?"":".slick-active")+" img",{allLoaded:function(e){g("#gg_car_"+t+" .gg_loader").fadeOut(200,(function(){g(this).remove()})),g("#gg_car_"+t).removeClass("gg_car_preload"),a&&g("#gg_car_"+t).slick("slickPlay"),setTimeout((function(){X(t),g(window).trigger("gg_loaded_carousel",[t])}),i?1200:320)}})};const X=function(t){g((void 0===t?"":"#gg_car_"+t)+" .gg_img.gg_car_item").each((function(t,a){var i=g(this),e=i.find(".gg_main_img_wrap > *"),l=g(this).width(),_=g(this).height();g("
").on("load",(function(){var g=Math.max(l/this.width,_/this.height),t=this.width*g,a=this.height*g,n=Math.ceil((_-a)/2),r=Math.ceil((l-t)/2);n>0&&(n=0),r>0&&(r=0),e.css("width",t).css("height",a),i.addClass("gg_car_img_ready")})).attr("src",i.find(".gg_main_thumb").attr("src"))}))};g(document).ready((function(t){g(document).on("mouseenter touchstart",".gg_car_pause_on_h",(function(t){void 0!==g(this).slick()&&g(this).slick("slickPause")})).on("mouseleave touchend",".gg_car_pause_on_h",(function(t){g(this).hasClass("gg_car_autoplay")&&void 0!==g(this).slick()&&g(this).slick("slickPlay")})),g(document).on("click",".gg_carousel_wrap .gg_img:not(.gg_linked_img)",(function(t){var a=g(this);setTimeout((function(){a.parents(".gg_carousel_wrap").slick("slickPause")}),150)})),g(document).on("click",".gg_carousel_wrap .slick-arrow, .gg_carousel_wrap .slick-dots li:not(.slick-active)",(function(t){g(this).parents(".gg_carousel_wrap").removeClass("gg_car_autoplay")})),g(document).on("swipe",".gg_carousel_wrap",(function(t){g(this).removeClass("gg_car_autoplay")}))}));const Y=function(g,t,a,i){g.fn[t]=function(g){return g?this.on(a,(e=g,function(){var g=this,t=arguments;n?clearTimeout(n):_&&e.apply(g,t),n=setTimeout((function(){_||e.apply(g,t),n=null}),l||i)})):this.trigger(t);var e,l,_,n}};Y(g,"gg_smartresize","resize",49),g(window).gg_smartresize((function(){g(".gg_galleria_responsive").each((function(){var t=g(this).width(),a=parseFloat(g(this).data("asp-ratio")),i=Math.ceil(t*a);g(this).css("height",i)}))})),Y(g,"gg_smartscroll","scroll",50),g(window).gg_smartscroll((function(){Z()}));const Z=function(){g(".gg_coll_back_to_new_style").length&&lcgg.back_to_gall_scroll&&g(".gg_coll_gallery_container .gg_gallery_wrap").each((function(t,a){var i=g(this).height(),e=g(this).parents(".gg_coll_gallery_container").find(".gg_coll_go_back");if(i>g(window).height()){var l=g(this).offset();if(g(window).scrollTop()>l.top&&g(window).scrollTop()=850?g(i).removeClass("gg_pg_on_mobile"):g(i).addClass("gg_pg_on_mobile")),g(this).hasClass("gg_collection_wrap")&&g(this).find(".gg_coll_gallery_container .gg_container").length&&P(a),g(this).hasClass("gg_carousel_wrap")?X(a):gg_galleries_init(a,!0)}))})),lcgg.preload_hires_img&&g(document).ready((function(){var t=g(".gg_gallery_wrap, .gg_carousel_wrap").length,a=0;t&&g(window).on("gg_loaded_gallery gg_loaded_collection gg_loaded_carousel",(function(){++a==t&&setTimeout((function(){g(".gg_img").not(".gg_coll_img, .gg_linked_img").each((function(){g("
")[0].src=g(this).data("gg-url")}))}),300)}))})),g(document).on("click",".gg_linked_img",(function(){const g=jQuery(this).data("gg-link");window.open(g,lcgg.link_target)})),lcgg.no_rclick&&g(document).on("contextmenu",".gg_gallery_wrap *, .gg_galleria_slider_wrap *, #lcl_wrapper *",(function(g){g.preventDefault()})),window.gg_lb_html_fix=function(t){var a="string"==typeof t?t.replace(/"/g,""").replace(//g,">"):"";return g.trim(a)},g(document).ready((function(){g(document).on("click",".gg_gallery_wrap:not(.gg_static_car) div.gg_img:not(.gg_coll_img, .gg_linked_img, .gg_tags_excluded_img)",(function(t){t.preventDefault();var a=[],i=g(this),e=i.data("gid"),l=i.parents(".gg_gallery_wrap").attr("id"),_=i.data("gg-url"),n=0;g("#"+l+" .gg_img:not(.gg_coll_img, .gg_linked_img, .gg_tags_excluded_img)").each((function(t,i){var e=g(this).data("gg-url");void 0===a[e]&&(a[e]={img:window.gg_gdrive_img_url_trick(e),title:gg_lb_html_fix(g(this).data("gg-title")),descr:gg_lb_html_fix(g(this).data("gg-descr")),author:gg_lb_html_fix(g(this).data("gg-author"))},e==_&&(n=t))})),"undefined"!=typeof gg_throw_lb&&gg_throw_lb(a,e,n)}))})),window.gg_slider_lightbox=function(t,a){var i=g.now(),e={};g.each(t,(function(g,t){e[t.big]={img:window.gg_gdrive_img_url_trick(t.big),title:gg_lb_html_fix(t.title),descr:gg_lb_html_fix(t.description),author:""}})),"undefined"!=typeof gg_throw_lb&&(gg_throw_lb(e,i,a),"lcweb"==lcgg.lightbox&&setTimeout((function(){gg_throw_lb(e,i,a)}),170))},window.gg_gdrive_img_url_trick=function(g){if(-1===g.indexOf("drive.google.com"))return g;const t=new URL(g);return t.searchParams.get("id")&&(g="https://drive.google.com/thumbnail?sz=w5000&id="+t.searchParams.get("id")),g}}(jQuery);