!function(a){void 0===mejs.plugins&&(mejs.plugins={},mejs.plugins.silverlight=[],mejs.plugins.silverlight.push({types:[]})),mejs.HtmlMediaElementShim=mejs.HtmlMediaElementShim||{getTypeFromFile:mejs.Utils.getTypeFromFile},void 0===mejs.MediaFeatures&&(mejs.MediaFeatures=mejs.Features),void 0===mejs.Utility&&(mejs.Utility=mejs.Utils);var e=MediaElementPlayer.prototype.init;MediaElementPlayer.prototype.init=function(){this.options.classPrefix="mejs-",this.$media=this.$node=a(this.node),e.call(this)};var t=MediaElementPlayer.prototype._meReady;MediaElementPlayer.prototype._meReady=function(){this.container=a(this.container),this.controls=a(this.controls),this.layers=a(this.layers),t.apply(this,arguments)},MediaElementPlayer.prototype.getElement=function(e){return void 0!==a&&e instanceof a?e[0]:e},MediaElementPlayer.prototype.buildfeatures=function(e,t,i,s){for(var r=["playpause","current","progress","duration","tracks","volume","fullscreen"],l=0,n=this.options.features.length;l'+mejsL10n.strings["mejs.download-file"]+""},n(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(e)}}},n(e.wp.mediaelement.initialize)}(window,jQuery);; (function (e) { "use strict"; var n = window.TWP_JS || {}; var iScrollPos = 0; var loadType, loadButton, loader, pageNo, loading, morePost, scrollHandling; n.mobileMenu = { init: function () { this.toggleMenu(); this.menuMobile(); this.menuArrow(); }, toggleMenu: function () { e('#masthead').on('click', '.toggle-menu', function (event) { setTimeout(function () { e('a.toggle-menu').focus(); }, 1000); var ethis = e('.main-navigation .menu .menu-mobile'); if (ethis.css('display') == 'block') { ethis.slideUp('300'); e("#masthead").removeClass('menu-active'); } else { ethis.slideDown('300'); e("#masthead").addClass('menu-active'); } e('.ham').toggleClass('exit'); }); e( 'input, a, button' ).on( 'focus', function() { if ( e( '.site-header' ).hasClass( 'menu-active' ) ) { if( e(this).hasClass('skip-link-menu-start') ){ e('.menu ul li:last-child a').focus(); } if( e(this).hasClass('skip-link-menu-end') ){ e('.toggle-menu').focus(); } } } ); e('#masthead .main-navigation ').on('click', '.menu-mobile a i', function (event) { event.preventDefault(); var ethis = e(this), eparent = ethis.closest('li'), esub_menu = eparent.find('> .sub-menu'); if (esub_menu.css('display') == 'none') { esub_menu.slideDown('300'); ethis.addClass('active'); } else { esub_menu.slideUp('300'); ethis.removeClass('active'); } return false; }); // Action On Esc Button e(document).keyup(function(j) { if (j.key === "Escape") { // escape key maps to keycode `27` if( e('#masthead').hasClass('menu-active') ){ e('#masthead').removeClass('menu-active'); var ethis = e('.main-navigation .menu .menu-mobile'); if (ethis.css('display') == 'block') { ethis.slideUp('300'); e("#masthead").removeClass('menu-active'); } else { ethis.slideDown('300'); e("#masthead").addClass('menu-active'); } e('.ham').toggleClass('exit'); setTimeout(function () { e('a.toggle-menu').focus(); }, 300); } } }); }, menuMobile: function () { if (e('.main-navigation .menu > ul').length) { var ethis = e('.main-navigation .menu > ul'), eparent = ethis.closest('.main-navigation'), pointbreak = eparent.data('epointbreak'), window_width = window.innerWidth; if (typeof pointbreak == 'undefined') { pointbreak = 991; } if (pointbreak >= window_width) { ethis.addClass('menu-mobile').removeClass('menu-desktop'); e('.main-navigation .toggle-menu').css('display', 'block'); } else { ethis.addClass('menu-desktop').removeClass('menu-mobile').css('display', ''); e('.main-navigation .toggle-menu').css('display', ''); } } }, menuArrow: function () { if (e('#masthead .main-navigation div.menu > ul').length) { e('#masthead .main-navigation div.menu > ul .sub-menu').parent('li').find('> a').append(''); } } }; n.twp_preloader = function () { e(window).load(function () { setTimeout(function () { e('.preloader').addClass('loaded'); }, 1000); }); }; n.TwpReveal = function () { e('.icon-search').on('click', function (event) { e('body').toggleClass('reveal-search'); setTimeout(function(){ e('a.close-popup').focus(); }, 300); }); e('.close-popup').on('click', function (event) { e('body').removeClass('reveal-search'); setTimeout(function(){ e('.icon-search').focus(); }, 300); }); e( 'input, a, button' ).on( 'focus', function() { if ( e( 'body' ).hasClass( 'reveal-search' ) ) { if( e(this).hasClass('skip-link-search') ){ e('a.close-popup').focus(); } if( e(this).hasClass('skip-link-search-end') ){ e('.popup-search .search-field').focus(); } } } ); // Action On Esc Button e(document).keyup(function(j) { if (j.key === "Escape") { // escape key maps to keycode `27` if ( e( 'body' ).hasClass( 'reveal-search' ) ) { e('body').removeClass('reveal-search'); e('html').attr('style',''); setTimeout(function(){ e('.icon-search').focus(); }, 300); } } }); }; n.TwpHeadroom = function () { e("#nav-affix").headroom({ "tolerance": 0, "offset": 164, "classes": { "initial": "animated", "pinned": "slideDown", "unpinned": "slideUp", "top": "headroom--top", "notTop": "headroom--not-top" } }); }; n.DataBackground = function () { e('.bg-image').each(function () { var src = e(this).children('img').attr('src'); if( src ){ e(this).css('background-image', 'url(' + src + ')').children('img').hide(); } }); }; n.InnerBanner = function () { var pageSection = e(".data-bg"); pageSection.each(function (indx) { if (e(this).attr("data-background")) { e(this).css("background-image", "url(" + e(this).data("background") + ")"); } }); }; n.TwpSlider = function () { e(".twp-slider").each(function () { e(this).owlCarousel({ loop: (e('.twp-slider').children().length) == 1 ? false : true, autoplay: 5000, nav: true, navText: ["", ""], items: 1, dots: false }); }); e(".gallery-columns-1").each(function () { e(this).owlCarousel({ loop: (e('.gallery-columns-1').children().length) == 1 ? false : true, margin: 3, autoplay: 5000, nav: true, navText: ["", ""], items: 1 }); }); e("ul.wp-block-gallery.columns-1").each(function () { e(this).owlCarousel({ loop: (e('ul.wp-block-gallery.columns-1').children().length) == 1 ? false : true, margin: 3, autoplay: 5000, nav: true, navText: ["", ""], items: 1 }); }); e(".wp-block-gallery.columns-1 .blocks-gallery-grid").each(function () { e(this).owlCarousel({ loop: (e('.wp-block-gallery.columns-1 .blocks-gallery-grid').children().length) == 1 ? false : true, margin: 3, autoplay: 5000, nav: true, navText: ["", ""], items: 1 }); }); }; n.MagnificPopup = function () { e('.gallery, .blocks-gallery-item').each(function () { e(this).magnificPopup({ delegate: 'a', type: 'image', gallery: { enabled: true }, zoom: { enabled: true, duration: 300, opener: function (element) { return element.find('img'); } } }); }); }; n.show_hide_scroll_top = function () { if (e(window).scrollTop() > e(window).height() / 2) { e(".scroll-up").fadeIn(300); } else { e(".scroll-up").fadeOut(300); } }; n.scroll_up = function () { e(".scroll-up").on("click", function () { e("html, body").animate({ scrollTop: 0 }, 700); return false; }); }; n.twp_matchheight = function () { e('.widget-area').theiaStickySidebar({ additionalMarginTop: 30 }); }; n.setLoadPostDefaults = function () { if (e('.load-more-posts').length > 0) { loadButton = e('.load-more-posts'); loader = e('.load-more-posts .ajax-loader'); loadType = loadButton.attr('data-load-type'); pageNo = 2; loading = false; morePost = true; scrollHandling = { allow: true, reallow: function () { scrollHandling.allow = true; }, delay: 400 }; } }; n.fetchPostsOnScroll = function () { if (e('.load-more-posts').length > 0 && 'scroll' === loadType) { var iCurScrollPos = e(window).scrollTop(); if (iCurScrollPos > iScrollPos) { if (!loading && scrollHandling.allow && morePost) { scrollHandling.allow = false; setTimeout(scrollHandling.reallow, scrollHandling.delay); var offset = e(loadButton).offset().top - e(window).scrollTop(); if (2000 > offset) { loading = true; n.ShowPostsAjax(loadType); } } } iScrollPos = iCurScrollPos; } }; n.fetchPostsOnClick = function () { if (e('.load-more-posts').length > 0 && 'click' === loadType) { e('.load-more-posts a').on('click', function (event) { event.preventDefault(); n.ShowPostsAjax(loadType); }); } }; n.ShowPostsAjax = function (loadType) { e.ajax({ type: 'GET', url: jumlaVal.ajaxurl, data: { action: 'jumla_load_more', nonce: jumlaVal.nonce, page: pageNo, post_type: jumlaVal.post_type, search: jumlaVal.search, cat: jumlaVal.cat, taxonomy: jumlaVal.taxonomy, author: jumlaVal.author, year: jumlaVal.year, month: jumlaVal.month, day: jumlaVal.day }, dataType: 'json', beforeSend: function () { loader.addClass('ajax-loader-enabled'); }, success: function (response) { loader.removeClass('ajax-loader-enabled'); if (response.success) { e('.jumla-posts-lists').append(response.data.content); pageNo++; loading = false; if (!response.data.more_post) { morePost = false; loadButton.fadeOut(); } } else { loadButton.fadeOut(); } } }); }; e(document).ready(function () { n.mobileMenu.init(); n.TwpSlider(); n.TwpReveal(); n.TwpHeadroom(); n.twp_preloader(); n.DataBackground(); n.InnerBanner(); n.MagnificPopup(); n.scroll_up(); n.twp_matchheight(); n.setLoadPostDefaults(); n.fetchPostsOnClick(); }); e(window).scroll(function () { n.show_hide_scroll_top(); n.fetchPostsOnScroll(); }); e(window).resize(function () { n.mobileMenu.menuMobile(); }); })(jQuery);; /* Do not modify this file directly. It is compiled from other files. */ !function(){var e,t,i,o=document.cookie.replace(/(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/,"$1"),n=document.getElementById("eu-cookie-law"),s=document.querySelector(".widget_eu_cookie_law_widget"),a=s&&s.hasAttribute("data-customize-widget-id");if(null!==s&&null!==n){if(e=function(){return Math.abs(document.body.getBoundingClientRect().y)},n.classList.contains("top")&&s.classList.add("top"),n.classList.contains("ads-active")){var c=document.cookie.replace(/(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/,"$1");""===o||""===c||a||n.parentNode.removeChild(n)}else""===o||a||n.parentNode.removeChild(n);document.body.appendChild(s),n.querySelector("form").addEventListener("submit",r),n.classList.contains("hide-on-scroll")?(t=e(),i=function(){Math.abs(e()-t)>50&&r()},window.addEventListener("scroll",i)):n.classList.contains("hide-on-time")&&setTimeout(r,1e3*n.getAttribute("data-hide-timeout"));var d=!1}function r(e){if(!d){d=!0,e&&e.preventDefault&&e.preventDefault(),n.classList.contains("hide-on-scroll")&&window.removeEventListener("scroll",i);var t=new Date;t.setTime(t.getTime()+24*n.getAttribute("data-consent-expiration")*60*60*1e3),document.cookie="eucookielaw="+t.getTime()+";path=/;expires="+t.toGMTString(),n.classList.contains("ads-active")&&n.classList.contains("hide-on-button")&&(document.cookie="personalized-ads-consent="+t.getTime()+";path=/;expires="+t.toGMTString()),n.classList.add("hide"),setTimeout(function(){n.parentNode.removeChild(n);var e=document.querySelector(".widget.widget_eu_cookie_law_widget");e.parentNode.removeChild(e)},400)}}}();; !function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){!function(t,e){"use strict";if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)"isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var n=[];r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},r.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},r.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(i(t,"resize",this._checkForIntersections,!0),i(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),n=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var i=r.element,s=h(i),c=this._rootContainsTarget(i),u=r.entry,a=e&&c&&this._computeTargetAndRootIntersection(i,n),l=r.entry=new o({time:t.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:n,intersectionRect:a});u?e&&c?this._hasCrossedThreshold(u,l)&&this._queuedEntries.push(l):u&&u.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,o){if("none"!=t.getComputedStyle(n).display){for(var r,i,s,c,a,l,p,f,d=h(n),g=u(n),_=!1;!_;){var v=null,m=1==g.nodeType?t.getComputedStyle(g):{};if("none"==m.display)return;if(g==this.root||g==e?(_=!0,v=o):g!=e.body&&g!=e.documentElement&&"visible"!=m.overflow&&(v=h(g)),v&&(r=v,i=d,s=void 0,c=void 0,a=void 0,l=void 0,p=void 0,f=void 0,s=Math.max(r.top,i.top),c=Math.min(r.bottom,i.bottom),a=Math.max(r.left,i.left),l=Math.min(r.right,i.right),f=c-s,!(d=(p=l-a)>=0&&f>=0&&{top:s,bottom:c,left:a,right:l,width:p,height:f})))break;g=u(g)}return d}},r.prototype._getRootRect=function(){var t;if(this.root)t=h(this.root);else{var n=e.documentElement,o=e.body;t={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(t)},r.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var r=0;r0;)s(e[0])}function l(t){for(var a=0;a0&&(n.unobserve(r.target),s(r.target))}0===e.length&&n.disconnect()}function c(){if(!t&&(e.length>0||r.length>0)){(t=document.createElement("div")).id="loadingWarning",t.style.fontWeight="bold",t.innerText=jetpackLazyImagesL10n.loading_warning;var n=document.createElement("style");n.innerHTML="#loadingWarning { display: none; }\n@media print {\n#loadingWarning { display: block; }\nbody > #loadingWarning ~ * { display: none !important; }\n}",t.appendChild(n),i.insertBefore(t,i.firstChild)}e.length>0&&d(),t&&alert(jetpackLazyImagesL10n.loading_warning)}function s(t){var n;if(t instanceof HTMLImageElement){var a=t.getAttribute("data-lazy-srcset"),i=t.getAttribute("data-lazy-sizes");t.removeAttribute("data-lazy-srcset"),t.removeAttribute("data-lazy-sizes"),t.removeAttribute("data-lazy-src"),t.classList.add("jetpack-lazy-image--handled"),t.setAttribute("data-lazy-loaded",1),i&&t.setAttribute("sizes",i),a?t.setAttribute("srcset",a):t.removeAttribute("srcset"),t.setAttribute("loading","eager"),r.push(t);var o=e.indexOf(t);o>=0&&e.splice(o,1),t.complete?u.call(t,null):(t.addEventListener("load",u,{once:!0}),t.addEventListener("error",u,{once:!0}));try{n=new Event("jetpack-lazy-loaded-image",{bubbles:!0,cancelable:!0})}catch(e){(n=document.createEvent("Event")).initEvent("jetpack-lazy-loaded-image",!0,!0)}t.dispatchEvent(n)}}function u(){var n=r.indexOf(this);n>=0&&r.splice(n,1),t&&0===e.length&&0===r.length&&(t.parentNode.removeChild(t),t=null)}i&&(i.addEventListener("is.post-load",o),i.addEventListener("jetpack-lazy-images-load",o))};"interactive"===document.readyState||"complete"===document.readyState?n():document.addEventListener("DOMContentLoaded",n)}]);; /* Do not modify this file directly. It is compiled from other files. */ /** The MIT License Copyright (c) 2010 Daniel Park (http://metaweb.com, http://postmessage.freebaseapps.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ var NO_JQUERY={};!function(e,a,s){if(!("console"in e)){var t=e.console={};t.log=t.warn=t.error=t.debug=function(){}}a===NO_JQUERY&&(a={fn:{},extend:function(){for(var e=arguments[0],a=1,s=arguments.length;a-1)&&jetpackIsScrolledIntoView(this)){jetpackLikesWidgetBatch.push(this.id);var t,i=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(this.id);i&&5===i.length&&(t={blog_id:i[2],width:this.width},"post"===i[1]?t.post_id=i[3]:"comment"===i[1]&&(t.comment_id=i[3]),t.obj_id=i[4],e.push(t))}}),e.length>0&&JetpackLikesPostMessage({event:"initialBatch",requests:e},window.frames["likes-master"])}function JetpackLikesMessageListener(e,t){var i,a,s,d,o,r;if(void 0!==e.event&&("https://widgets.wp.com","https://widgets.wp.com"===t.origin))switch(e.event){case"masterReady":jQuery(document).ready(function(){jetpackLikesMasterReady=!0;var e={event:"injectStyles"},t=jQuery(".sd-text-color"),i=jQuery(".sd-link-color");jQuery("iframe.admin-bar-likes-widget").length>0&&(JetpackLikesPostMessage({event:"adminBarEnabled"},window.frames["likes-master"]),e.adminBarStyles={background:jQuery("#wpadminbar .quicklinks li#wp-admin-bar-wpl-like > a").css("background"),isRtl:"rtl"===jQuery("#wpadminbar").css("direction")}),window.addEventListener||jQuery("#wp-admin-bar-admin-bar-likes-widget").hide(),e.textStyles={color:t.css("color"),fontFamily:t.css("font-family"),fontSize:t.css("font-size"),direction:t.css("direction"),fontWeight:t.css("font-weight"),fontStyle:t.css("font-style"),textDecoration:t.css("text-decoration")},e.linkStyles={color:i.css("color"),fontFamily:i.css("font-family"),fontSize:i.css("font-size"),textDecoration:i.css("text-decoration"),fontWeight:i.css("font-weight"),fontStyle:i.css("font-style")},JetpackLikesPostMessage(e,window.frames["likes-master"]),JetpackLikesBatchHandler()});break;case"showLikeWidget":case"showCommentLikeWidget":jQuery("#"+e.id+" .likes-widget-placeholder").fadeOut("fast");break;case"killCommentLikes":jQuery(".jetpack-comment-likes-widget-wrapper").remove();break;case"clickReblogFlair":wpcom_reblog.toggle_reblog_box_flair(e.obj_id);break;case"showOtherGravatars":i=jQuery("#likes-other-gravatars"),a=i.find("ul"),i.hide(),a.html(""),i.find(".likes-text span").text(e.total),jQuery.each(e.likers,function(e,t){var i;"http"===t.profile_URL.substr(0,4)&&((i=jQuery("
  • ")).addClass(t.css_class),i.find("a").attr({href:t.profile_URL,rel:"nofollow",target:"_parent"}).addClass("wpl-liker"),i.find("img").attr({src:t.avatar_URL,alt:t.name}).css({width:"30px",height:"30px",paddingRight:"3px"}),a.append(i))}),s=jQuery("body").find("[name='"+e.parent+"']").offset(),i.css("left",s.left+e.position.left-10+"px"),i.css("top",s.top+e.position.top-33+"px"),d=Math.floor(e.width/37),(o=37*Math.ceil(e.likers.length/d)+13)>204&&(o=204),i.css("height",o+"px"),i.css("width",37*d-7+"px"),a.css("width",37*d+"px"),i.fadeIn("slow"),(r=a[0].offsetWidth-a[0].clientWidth)>0&&(i.width(i.width()+r),a.width(a.width()+r))}}function JetpackLikesWidgetQueueHandler(){var e;if(jetpackLikesMasterReady){jetpackUnloadScrolledOutWidgets();var t=jetpackGetUnloadedWidgetsInView();t.length>0&&JetpackLikesBatchHandler();for(var i=0,a=t.length;i<=a-1;i++)(e=t[i].id)&&jetpackLoadLikeWidgetIframe(e)}else setTimeout(JetpackLikesWidgetQueueHandler,500)}function jetpackLoadLikeWidgetIframe(e){var t;if(void 0!==e){(t=jQuery("#"+e)).find("iframe").remove();var i=t.find(".likes-widget-placeholder");if(i.hasClass("post-likes-widget-placeholder")){var a=document.createElement("iframe");a.class="post-likes-widget jetpack-likes-widget",a.name=t.data("name"),a.src=t.data("src"),a.height="18px",a.width="200px",a.frameBorder="0",a.scrolling="no",t.hasClass("slim-likes-widget")?(a.height="22px",a.width="68px",a.scrolling="no"):(a.height="55px",a.width="100%"),i.after(a)}if(i.hasClass("comment-likes-widget-placeholder")){var s=document.createElement("iframe");s.class="comment-likes-widget-frame jetpack-likes-widget-frame",s.name=t.data("name"),s.src=t.data("src"),s.height="18px",s.width="100%",s.frameBorder="0",s.scrolling="no",t.find(".comment-like-feedback").after(s),jetpackCommentLikesLoadedWidgets.push(s)}t.removeClass("jetpack-likes-widget-unloaded").addClass("jetpack-likes-widget-loading"),t.find("iframe").load(function(e){var i=jQuery(e.target);JetpackLikesPostMessage({event:"loadLikeWidget",name:i.attr("name"),width:i.width()},window.frames["likes-master"]),t.removeClass("jetpack-likes-widget-loading").addClass("jetpack-likes-widget-loaded"),t.hasClass("slim-likes-widget")&&t.find("iframe").Jetpack("resizeable")})}}function jetpackGetUnloadedWidgetsInView(){return jQuery("div.jetpack-likes-widget-unloaded").filter(function(){return jetpackIsScrolledIntoView(this)})}function jetpackIsScrolledIntoView(e){var t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+jetpackLikesLookAhead>=0&&i<=window.innerHeight+jetpackLikesLookAhead}function jetpackUnloadScrolledOutWidgets(){for(var e=jetpackCommentLikesLoadedWidgets.length-1;e>=0;e--){var t=jetpackCommentLikesLoadedWidgets[e];if(!jetpackIsScrolledIntoView(t)){var i=jQuery(t).parent().parent();i.removeClass("jetpack-likes-widget-loaded jetpack-likes-widget-loading").addClass("jetpack-likes-widget-unloaded"),i.children(".comment-likes-widget-placeholder").fadeIn(),jetpackCommentLikesLoadedWidgets.splice(e,1),jQuery(t).remove()}}}pm.bind("likesMessage",JetpackLikesMessageListener),jQuery(document).click(function(e){var t=jQuery("#likes-other-gravatars");0===t.has(e.target).length&&t.fadeOut("slow")});var jetpackWidgetsDelayedExec=function(e,t){var i;return function(){i&&clearTimeout(i),i=setTimeout(t,e)}},jetpackOnScrollStopped=jetpackWidgetsDelayedExec(250,JetpackLikesWidgetQueueHandler);JetpackLikesWidgetQueueHandler(),window.addEventListener("scroll",jetpackOnScrollStopped,!0);; /*! This file is auto-generated */ !function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;oo?a.width(o).height(o*r):a.width(e).height(i)})}var e;t(document).ready(function(){t(window).on("load.jetpack",a).on("resize.jetpack",function(){clearTimeout(e),e=setTimeout(a,500)}).on("post-load.jetpack",a).resize()})}(jQuery);; /* Do not modify this file directly. It is compiled from other files. */ /* global jetpackCarouselStrings, DocumentTouch */ jQuery(document).ready(function(e){var t,a,i,o,r,s,n,l,c,d,u,p,m,h,f,g=e("body").css("overflow"),j=e("html").css("overflow"),w="",_=function(e){switch(e.which){case 38:e.preventDefault(),i.scrollTop(i.scrollTop()-100);break;case 40:e.preventDefault(),i.scrollTop(i.scrollTop()+100);break;case 39:e.preventDefault(),a.jp_carousel("next");break;case 37:case 8:e.preventDefault(),a.jp_carousel("previous");break;case 27:e.preventDefault(),i.jp_carousel("close")}},v=function(){if(u=110,window.innerWidth<=760){u=Math.round(window.innerWidth/760*110);var e="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;u<40&&e&&(u=0)}},x=function(){var e=window.matchMedia&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;clearTimeout(n),n=setTimeout(function(){v(),a.jp_carousel("slides").jp_carousel("fitSlide",e),a.jp_carousel("updateSlidePositions",e),a.jp_carousel("fitMeta",e)},200)},b=function(){e("a img[data-attachment-id]").each(function(){var t=e(this).parent();if(!t.parent(".gallery-icon").length&&void 0!==e(t).attr("href")){var a=!1;e(t).attr("href").split("?")[0]===e(this).attr("data-orig-file").split("?")[0]&&1===Number(jetpackCarouselStrings.single_image_gallery_media_file)&&(a=!0),e(t).attr("href")===e(this).attr("data-permalink")&&(a=!0),a&&(e(t).addClass("single-image-gallery"),e(t).data("carousel-extra",{blog_id:Number(jetpackCarouselStrings.blog_id)}))}})},y={testForData:function(t){return!(!(t=e(t)).length||!t.data("carousel-extra"))},testIfOpened:function(){return!(void 0===a||void 0===a.opened||!a.opened)},openOrSelectSlide:function(t){e(this).jp_carousel("testIfOpened")?a.jp_carousel("selectSlideAtIndex",t):e(this).jp_carousel("open",{start_index:t})},open:function(n){var c={items_selector:".gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id], img[data-attachment-id]",start_index:0},d=e(this).data("carousel-extra");if(d&&(function(){if(!t){i=e(".jp-carousel-wrap"),t=i.find(".jp-carousel-overlay"),a=i.find(".jp-carousel"),s=i.find(".jp-carousel-caption"),l=i.find(".jp-carousel-photo-info"),o=i.find(".jp-carousel-info"),h=i.find(".jp-carousel-comment-form-container"),p=i.find(".jp-carousel-image-meta"),m=i.find(".jp-carousel-titleanddesc");var n=i.find(".jp-carousel-next-button"),c=i.find(".jp-carousel-previous-button");v(),a.jp_carousel("fitMeta",!1),i.click(function(t){var r=e(t.target),s=r.parents("div.jp-carousel-wrap"),n=s.data("carousel-extra"),l=s.find("div.selected").data("attachment-id");if(n=n||[],r.is(a)||r.parents().add(r).is(i.find(".jp-carousel-close-hint")))window.matchMedia("(max-device-width: 760px)").matches?(r.parents().add(r).is(i.find(".jp-carousel-close-hint"))&&i.jp_carousel("close"),t.pageX<=70&&i.jp_carousel("previous"),e(window).width()-t.pageX<=70&&i.jp_carousel("next")):i.jp_carousel("close");else if(r.hasClass("jp-carousel-commentlink"))t.preventDefault(),t.stopPropagation(),e(window).unbind("keydown",_),i.animate({scrollTop:parseInt(o.position().top,10)},"fast"),e("#jp-carousel-comment-form-submit-and-info-wrapper").slideDown("fast"),e("#jp-carousel-comment-form-comment-field").focus();else if(r.hasClass("jp-carousel-comment-login")){var c=jetpackCarouselStrings.login_url+"%23jp-carousel-"+l;window.location.href=c}else if(r.parents("#jp-carousel-comment-form-container").length){var d=e("#jp-carousel-comment-form-comment-field").blur(function(){e(window).bind("keydown",_)}).focus(function(){e(window).unbind("keydown",_)}),u=e("#jp-carousel-comment-form-email-field").blur(function(){e(window).bind("keydown",_)}).focus(function(){e(window).unbind("keydown",_)}),p=e("#jp-carousel-comment-form-author-field").blur(function(){e(window).bind("keydown",_)}).focus(function(){e(window).unbind("keydown",_)}),m=e("#jp-carousel-comment-form-url-field").blur(function(){e(window).bind("keydown",_)}).focus(function(){e(window).unbind("keydown",_)});if(d&&d.attr("id")===r.attr("id"))e(window).unbind("keydown",_),e("#jp-carousel-comment-form-submit-and-info-wrapper").slideDown("fast");else if(r.is('input[type="submit"]')){t.preventDefault(),t.stopPropagation(),e("#jp-carousel-comment-form-spinner").show();var h={action:"post_attachment_comment",nonce:jetpackCarouselStrings.nonce,blog_id:n.blog_id,id:l,comment:d.val()};if(!h.comment.length)return void a.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.no_comment_text});if(1!==Number(jetpackCarouselStrings.is_logged_in)&&(h.email=u.val(),h.author=p.val(),h.url=m.val(),1===Number(jetpackCarouselStrings.require_name_email))){if(!h.email.length||!h.email.match("@"))return void a.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-email-field",error:jetpackCarouselStrings.no_comment_email});if(!h.author.length)return void a.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-author-field",error:jetpackCarouselStrings.no_comment_author})}e.ajax({type:"POST",url:jetpackCarouselStrings.ajaxurl,data:h,dataType:"json",success:function(t){"approved"===t.comment_status?e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"):"unapproved"===t.comment_status?e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"):e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"),a.jp_carousel("clearCommentTextAreaValue"),a.jp_carousel("getComments",{attachment_id:l,offset:0,clear:!0}),e("#jp-carousel-comment-form-button-submit").val(jetpackCarouselStrings.post_comment),e("#jp-carousel-comment-form-spinner").hide()},error:function(){a.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.comment_post_error})}})}}else r.parents(".jp-carousel-info").length||(window.matchMedia("(max-device-width: 760px)").matches?(t.pageX<=70&&i.jp_carousel("previous"),e(window).width()-t.pageX<=70&&i.jp_carousel("next")):i.jp_carousel("next"))}).bind("jp_carousel.afterOpen",function(){e(window).bind("keydown",_),e(window).bind("resize",x),a.opened=!0,x()}).bind("jp_carousel.beforeClose",function(){var t=e(window).scrollTop();e(window).unbind("keydown",_),e(window).unbind("resize",x),e(window).scrollTop(t),e(".jp-carousel-previous-button").hide(),e(".jp-carousel-next-button").hide(),e("html").css("height","")}).bind("jp_carousel.afterClose",function(){window.location.hash&&history.back&&history.back(),w="",a.opened=!1}).on("transitionend.jp-carousel ",".jp-carousel-slide",function(t){if("transform"===t.originalEvent.propertyName){var a=(Date.now()-r)/1e3/t.originalEvent.elapsedTime;i.off("transitionend.jp-carousel"),a>=2&&e(".jp-carousel-transitions").removeClass("jp-carousel-transitions")}}),i.touchwipe({wipeLeft:function(e){e.preventDefault(),a.jp_carousel("next")},wipeRight:function(e){e.preventDefault(),a.jp_carousel("previous")},preventDefaultEvents:!1}),n.add(c).click(function(e){e.preventDefault(),e.stopPropagation(),n.is(this)?a.jp_carousel("next"):a.jp_carousel("previous")})}}(),!a.jp_carousel("testIfOpened")))return g=e("body").css("overflow"),e("body").css("overflow","hidden"),j=e("html").css("overflow"),e("html").css("overflow","hidden"),f=e(window).scrollTop(),i.data("carousel-extra",d),this.each(function(){var t=e(this);n&&e.extend(c,n),-1===c.start_index&&(c.start_index=0),i.trigger("jp_carousel.beforeOpen").fadeIn("fast",function(){i.trigger("jp_carousel.afterOpen"),a.jp_carousel("initSlides",t.find(c.items_selector),c.start_index).jp_carousel("selectSlideAtIndex",c.start_index)}),a.html("")})},selectSlideAtIndex:function(e){var t=this.jp_carousel("slides"),i=t.eq(e);return 0===i.length&&(i=t.eq(0)),a.jp_carousel("selectSlide",i,!1),this},close:function(){return e("body").css("overflow",g),e("html").css("overflow",j),this.jp_carousel("clearCommentTextAreaValue"),i.trigger("jp_carousel.beforeClose").fadeOut("fast",function(){i.trigger("jp_carousel.afterClose"),e(window).scrollTop(f)})},next:function(){this.jp_carousel("previousOrNext","nextSlide")},previous:function(){this.jp_carousel("previousOrNext","prevSlide")},previousOrNext:function(e){if(!this.jp_carousel("hasMultipleImages"))return!1;var t=a.jp_carousel(e);t&&(i.animate({scrollTop:0},"fast"),this.jp_carousel("clearCommentTextAreaValue"),this.jp_carousel("selectSlide",t))},selectedSlide:function(){return this.find(".selected")},setSlidePosition:function(e){return r=Date.now(),this.css({"-webkit-transform":"translate3d("+e+"px,0,0)","-moz-transform":"translate3d("+e+"px,0,0)","-ms-transform":"translate("+e+"px,0)","-o-transform":"translate("+e+"px,0)",transform:"translate3d("+e+"px,0,0)"})},updateSlidePositions:function(e){var t=this.jp_carousel("selectedSlide"),i=a.width(),o=t.width(),r=a.jp_carousel("prevSlide"),s=a.jp_carousel("nextSlide"),n=r.prev(),l=s.next(),c=Math.floor(.5*(i-o));t.jp_carousel("setSlidePosition",c).show(),a.jp_carousel("fitInfo",e),1===(d.is(t.prevAll())?1:-1)?(l.is(r)||l.jp_carousel("setSlidePosition",i+s.width()).show(),n.is(s)||n.jp_carousel("setSlidePosition",-n.width()-o).show()):l.is(r)||l.jp_carousel("setSlidePosition",i+o).show(),r.jp_carousel("setSlidePosition",Math.floor(-r.width()+.75*u)).show(),s.jp_carousel("setSlidePosition",Math.ceil(i-.75*u)).show()},selectSlide:function(t,o){d=this.find(".selected").removeClass("selected");var r,n,l=a.jp_carousel("slides").css({position:"fixed"}),c=e(t).addClass("selected").css({position:"relative"}),u=c.data("attachment-id"),p=a.jp_carousel("prevSlide"),m=a.jp_carousel("nextSlide"),h=p.prev(),f=m.next();a.jp_carousel("loadFullImage",c),s.hide(),0===m.length&&l.length<=2?e(".jp-carousel-next-button").hide():e(".jp-carousel-next-button").show(),0===p.length&&l.length<=2?e(".jp-carousel-previous-button").hide():e(".jp-carousel-previous-button").show(),r=c.add(p).add(h).add(m).add(f).jp_carousel("loadSlide"),l.not(r).hide(),a.jp_carousel("updateSlidePositions",o),i.trigger("jp_carousel.selectSlide",[c]),a.jp_carousel("getTitleDesc",{title:c.data("title"),desc:c.data("desc")});var g=c.data("image-meta");a.jp_carousel("updateExif",g),a.jp_carousel("updateFullSizeLink",c),1==+jetpackCarouselStrings.display_comments&&(a.jp_carousel("testCommentsOpened",c.data("comments-opened")),a.jp_carousel("getComments",{attachment_id:u,offset:0,clear:!0}),e("#jp-carousel-comment-post-results").slideUp()),c.data("caption")?((n=e("
    ").text(c.data("caption")).html())===e("
    ").text(c.data("title")).html()&&e(".jp-carousel-titleanddesc-title").fadeOut("fast").empty(),n===e("
    ").text(c.data("desc")).html()&&e(".jp-carousel-titleanddesc-desc").fadeOut("fast").empty(),s.html(c.data("caption")).fadeIn("slow")):s.fadeOut("fast").empty(),jetpackCarouselStrings.stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+jetpackCarouselStrings.stats+"&post="+encodeURIComponent(u)+"&rand="+Math.random()),e(m).add(p).each(function(){a.jp_carousel("loadFullImage",e(this))}),window.location.hash=w="#jp-carousel-"+u},slides:function(){return this.find(".jp-carousel-slide")},slideDimensions:function(){return{width:e(window).width()-2*u,height:Math.floor(e(window).height()/100*85-60)}},loadSlide:function(){return this.each(function(){var t=e(this);t.find("img").one("load",function(){t.jp_carousel("fitSlide",!1)})})},bestFit:function(){var e,t,i=a.jp_carousel("slideDimensions"),o=this.jp_carousel("originalDimensions"),r=o.width/o.height,s=1,n=1;return o.width>i.width&&(s=i.width/o.width),o.height>i.height&&(n=i.height/o.height),s")[0].src=e(t[i]).data("gallery-src"));var o=t.first().closest(".tiled-gallery.type-rectangular").length>0;return t.each(function(t){var r=e(this),s=r.data("attachment-id")||0,n=r.data("comments-opened")||0,l=r.data("image-meta")||{},c=r.data("orig-size")||"",d={width:r[0].naturalWidth,height:r[0].naturalHeight},u=r.data("image-title")||"",p=r.data("image-description")||"",m=r.parents(".gallery-item").find(".gallery-caption").html()||"",h=r.data("gallery-src")||"",f=r.data("medium-file")||"",g=r.data("large-file")||"",j=r.data("orig-file")||"",w=r.parents("div.tiled-gallery-item").find("div.tiled-gallery-caption").html();if(w&&(m=w),s&&c.length){u=a.jp_carousel("texturize",u),p=a.jp_carousel("texturize",p),m=a.jp_carousel("texturize",m);var _=e("").attr("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7").css("width","100%").css("height","100%"),v=e('').hide().css({left:t1&&(e.max_width=e.max_width*window.devicePixelRatio,e.max_height=e.max_height*window.devicePixelRatio),s>=e.max_width||n>=e.max_height)return e.large_file;if(l>=e.max_width||c>=e.max_height)return e.medium_file;if(i){var d=e.large_file.lastIndexOf("?"),u=e.large_file;return-1!==d&&(u=e.large_file.substring(0,d),(e.orig_width>e.max_width||e.orig_height>e.max_height)&&(u+="?fit="+e.orig_max_width+"%2C"+e.orig_max_height)),u}return e.orig_file},getImageSizeParts:function(e,t,a){var i=a?e.replace(/.*=([\d]+%2C[\d]+).*$/,"$1"):e.replace(/.*-([\d]+x[\d]+)\..+$/,"$1"),o=i!==e?a?i.split("%2C"):i.split("x"):[t,0];return"9999"===o[0]&&(o[0]="0"),"9999"===o[1]&&(o[1]="0"),o},originalDimensions:function(){var t=e(this).data("orig-size").split(",");return{width:parseInt(t[0],10),height:parseInt(t[1],10)}},format:function(e){if("object"!=typeof e&&(e={}),e.text&&void 0!==e.text)return e.replacements&&void 0!==e.replacements?e.text.replace(/{(\d+)}/g,function(t,a){return void 0!==e.replacements[a]?e.replacements[a]:t}):e.text},shutterSpeed:function(e){return e>=1?Math.round(10*e)/10+"s":"1/"+Math.round(1/e)+"s"},parseTitleDesc:function(e){return!e.match(" ")&&e.match("_")?"":e},getTitleDesc:function(t){var i,o,r="",s="";(o=e("div.jp-carousel-titleanddesc","div.jp-carousel-wrap")).hide(),r=a.jp_carousel("parseTitleDesc",t.title)||"",i=a.jp_carousel("parseTitleDesc",t.desc)||"",(r.length||i.length)&&(e("
    ").html(r).text()===e("
    ").html(i).text()&&(r=""),s=r.length?'":"",s+=i.length?'":"",o.html(s).fadeIn("slow")),e("div#jp-carousel-comment-form-container").css("margin-top","20px"),e("div#jp-carousel-comments-loading").css("margin-top","20px")},updateExif:function(t){if(!t||1!==Number(jetpackCarouselStrings.display_exif))return!1;var i=e("");e.each(t,function(t,o){if(0!==parseFloat(o)&&o.length&&-1!==e.inArray(t,e.makeArray(jetpackCarouselStrings.meta_data))){switch(t){case"focal_length":o+="mm";break;case"shutter_speed":o=a.jp_carousel("shutterSpeed",o);break;case"aperture":o="f/"+o}i.append("
  • "+jetpackCarouselStrings[t]+"
    "+o+"
  • ")}}),e("div.jp-carousel-image-meta ul.jp-carousel-image-exif").replaceWith(i)},updateFullSizeLink:function(t){if(!t||!t.data)return!1;var i,o=t.data("orig-size").split(","),r=document.createElement("a");r.href=t.data("src").replace(/\?.+$/,""),i=null!==r.hostname.match(/^i[\d]{1}.wp.com$/i)?r.href:t.data("orig-file").replace(/\?.+$/,"");var s=e(""+a.jp_carousel("format",{text:jetpackCarouselStrings.download_original,replacements:o})+"").addClass("jp-carousel-image-download").attr("href",i).attr("target","_blank");e("div.jp-carousel-image-meta a.jp-carousel-image-download").replaceWith(s)},testCommentsOpened:function(t){1===parseInt(t,10)?(e(".jp-carousel-buttons").fadeIn("fast"),h.fadeIn("fast")):(e(".jp-carousel-buttons").fadeOut("fast"),h.fadeOut("fast"))},getComments:function(t){if(clearInterval(c),"object"==typeof t&&void 0!==t.attachment_id&&t.attachment_id){(!t.offset||void 0===t.offset||t.offset<1)&&(t.offset=0);var i=e(".jp-carousel-comments"),o=e("#jp-carousel-comments-loading").show();t.clear&&i.hide().empty(),e.ajax({type:"GET",url:jetpackCarouselStrings.ajaxurl,dataType:"json",data:{action:"get_attachment_comments",nonce:jetpackCarouselStrings.nonce,id:t.attachment_id,offset:t.offset},success:function(r){t.clear&&i.fadeOut("fast").empty(),e(r).each(function(){var o=e("
    ").addClass("jp-carousel-comment").attr("id","jp-carousel-comment-"+this.id).html('
    '+this.gravatar_markup+'
    '+this.author_markup+'
    '+this.date_gmt+'
    '+this.content+"
    ");i.append(o),clearInterval(c),c=setInterval(function(){e(".jp-carousel-overlay").height()-1500?i.height():p.height())+200),i.show(),o.hide()},error:function(){i.fadeIn("fast"),o.fadeOut("fast")}})}},postCommentError:function(t){"object"!=typeof t&&(t={}),t.field&&void 0!==t.field&&t.error&&void 0!==t.error&&(e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"),e("#jp-carousel-comment-form-spinner").hide())},setCommentIframeSrc:function(t){var a=e("#jp-carousel-comment-iframe");a&&a.length&&(a.attr("src",a.attr("src").replace(/(postid=)\d+/,"$1"+t)),a.attr("src",a.attr("src").replace(/(%23.+)?$/,"%23jp-carousel-"+t)))},clearCommentTextAreaValue:function(){var t=e("#jp-carousel-comment-form-comment-field");t&&t.val("")},nextSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.last())?e.first():t.next()},prevSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.first())?e.last():t.prev()},loadFullImage:function(t){var a=t.find("img:first");a.data("loaded")||(a.on("load.jetpack",function(){a.off("load.jetpack"),e(this).closest(".jp-carousel-slide").css("background-image","")}),!t.data("preview-image")||t.data("thumb-size")&&t.width()>t.data("thumb-size").width?a.attr("src",a.closest(".jp-carousel-slide").data("src")).attr("itemprop","image"):a.attr("src",t.data("preview-image")).attr("itemprop","image"),a.data("loaded",1))},hasMultipleImages:function(){return a.jp_carousel("slides").length>1}};e.fn.jp_carousel=function(t){return y[t]?y[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.jp_carousel"):y.open.apply(this,arguments)},e(document.body).on("click.jp-carousel","div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, figure.blocks-gallery-grid, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery",function(t){if(e(this).jp_carousel("testForData",t.currentTarget)){if(e(t.target).parents().eq(1).hasClass("wp-block-image")){var a=e(t.target).parent().attr("href");if(a.split("?")[0]!==e(t.target).attr("data-orig-file").split("?")[0]&&a!==e(t.target).attr("data-permalink"))return}e(t.target).parent().hasClass("gallery-caption")||e(t.target).parent().is("figcaption")||(e("html").css("height","auto"),t.preventDefault(),t.stopPropagation(),e(this).jp_carousel("open",{start_index:e(this).find(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item, .wp-block-image").index(e(t.target).parents(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item, .wp-block-image"))}))}}),1===Number(jetpackCarouselStrings.single_image_gallery)&&(b(),e(document.body).on("post-load",function(){b()})),e(window).on("hashchange.jp-carousel",function(){var t,o,r,s=/jp-carousel-(\d+)/;window.location.hash&&s.test(window.location.hash)?window.location.hash===w&&a.opened||(window.location.hash&&a&&!a.opened&&history.back?history.back():(w=window.location.hash,t=window.location.hash.match(s),o=parseInt(t[1],10),e("div.gallery, div.tiled-gallery, a.single-image-gallery, ul.wp-block-gallery, div.wp-block-jetpack-tiled-gallery").each(function(t,a){if(e(a).find("img").each(function(t,i){if(e(i).data("attachment-id")===parseInt(o,10))return r={index:t,gallery:a},!1}),r)return e(r.gallery).jp_carousel("openOrSelectSlide",r.index),!1}))):a&&a.opened&&i.jp_carousel("close")}),window.location.hash&&e(window).trigger("hashchange")}),function(e){e.fn.touchwipe=function(t){var a,i={threshold:150,restraint:100,allowedTime:300,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};return t&&e.extend(i,t),this.each(function(){var e,t,o=!1;function r(){this.removeEventListener("touchmove",s),e=null,o=!1}function s(s){if(i.preventDefaultEvents&&s.preventDefault(),o){var n=s.touches[0].pageX,l=s.touches[0].pageY,c=e-n,d=t-l;(new Date).getTime()-a<=i.allowedTime&&(Math.abs(c)>=i.threshold&&Math.abs(d)<=i.restraint?(r(),c>0?i.wipeLeft(s):i.wipeRight(s)):Math.abs(d)>=i.threshold&&Math.abs(c)<=i.restraint&&(r(),d>0?i.wipeDown(s):i.wipeUp(s)))}}"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",function(i){1===i.touches.length&&(a=(new Date).getTime(),e=i.touches[0].pageX,t=i.touches[0].pageY,o=!0,this.addEventListener("touchmove",s,!1))},!1)}),this}}(jQuery);; var ak_js = document.getElementById( "ak_js" ); if ( ! ak_js ) { ak_js = document.createElement( 'input' ); ak_js.setAttribute( 'id', 'ak_js' ); ak_js.setAttribute( 'name', 'ak_js' ); ak_js.setAttribute( 'type', 'hidden' ); } else { ak_js.parentNode.removeChild( ak_js ); } ak_js.setAttribute( 'value', ( new Date() ).getTime() ); var commentForm = document.getElementById( 'commentform' ); if ( commentForm ) { commentForm.appendChild( ak_js ); } else { var replyRowContainer = document.getElementById( 'replyrow' ); if ( replyRowContainer ) { var children = replyRowContainer.getElementsByTagName( 'td' ); if ( children.length > 0 ) { children[0].appendChild( ak_js ); } } }; function socializer_addbookmark(t){var e=navigator.userAgent.toLowerCase(),s=-1!=e.indexOf("mac"),r="";t.preventDefault(),r=(s?"Command/Cmd":"CTRL")+" + D",alert("Press "+r+" to bookmark this page")}function socializer_shortlink(t,e){t.preventDefault(),link=e.getAttribute("href"),"#"!=link&&prompt("Short link",link)}window.wpsr_helpers={addClass:function(t,e){t.classList?t.classList.add(e):t.className+=" "+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")},popup:function(t,e,s,r){var n=screen.width/2-s/2,a=screen.height/2-r/2;return window.open(t,e,"toolbar=no,location=no,menubar=no,scrollbars=yes,width="+s+",height="+r+",top="+a+",left="+n)},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},ajax:function(t,e,s,r,n){var a=new XMLHttpRequest;a.props=n,a.open(e,t,!0),"POST"==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),a.onreadystatechange=function(){if(4==a.readyState&&200==a.status)return r(a)},a.send(s)},format_num:function(t){if(t<1e3)return t;for(var e=["k","m","b","t"],s=t,r=0;r1e3)){s=Math.round(100*t)/100+e[r];break}return s},is_mobile:function(){return/Mobi|Android/i.test(navigator.userAgent)}},document.addEventListener("DOMContentLoaded",function(){var t=document.querySelectorAll(".socializer.sr-popup a");for(_=0;_"'\/\\=&%]/g,""),f=document.querySelectorAll(w),_=0;_0&&["resize","load"].forEach(function(t){window.addEventListener(t,function(){for(var t=0;t0)for(_=0;_0){var k={},A=wpsr_ajax_url+"?action=wpsr_share_count";for(_=0;_