!function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.r(t);var r=n(1),c=n.n(r),a=function(e){return Math.abs(parseInt(e,10))},i=n(0),o=n.n(i),u=function(e,t){var n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-"),t="custom-".concat(t));var r=e.getAttribute("data-status");return e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t&&e.classList.remove(r),t},s=function(e,t,n){var r=new CustomEvent("wpcf7".concat(t),{bubbles:!0,detail:n});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(r)};function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new FormData(e);t.submitter&&t.submitter.name&&n.append(t.submitter.name,t.submitter.value);var r={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(n,(function(e){var t=e[0],n=e[1];return!t.match(/^_/)&&{name:t,value:n}})).filter((function(e){return!1!==e})),formData:n},c=function(t){var n=document.createElement("li");n.setAttribute("id",t.error_id),t.idref?n.insertAdjacentHTML("beforeend",'').concat(t.message,"")):n.insertAdjacentText("beforeend",t.message),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(n)},a=function(t){var n=e.querySelector(t.into),r=n.querySelector(".wpcf7-form-control");r.classList.add("wpcf7-not-valid"),r.setAttribute("aria-invalid","true"),r.setAttribute("aria-describedby",t.error_id);var c=document.createElement("span");c.setAttribute("class","wpcf7-not-valid-tip"),c.setAttribute("aria-hidden","true"),c.insertAdjacentText("beforeend",t.message),n.appendChild(c),r.closest(".use-floating-validation-tip")&&(r.addEventListener("focus",(function(e){c.setAttribute("style","display: none")})),c.addEventListener("mouseover",(function(e){c.setAttribute("style","display: none")})))};o()({path:"contact-form-7/v1/contact-forms/".concat(e.wpcf7.id,"/feedback"),method:"POST",body:n,wpcf7:{endpoint:"feedback",form:e,detail:r}}).then((function(t){var n=u(e,t.status);return r.status=t.status,r.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(n)?s(e,n,r):["sent","failed"].includes(n)&&s(e,"mail".concat(n),r),s(e,"submit",r),t})).then((function(t){t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&e.reset(),t.invalid_fields&&(t.invalid_fields.forEach(c),t.invalid_fields.forEach(a)),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((function(e){e.innerText=t.message}))})).catch((function(e){return console.error(e)}))}o.a.use((function(e,t){if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){var n=e.wpcf7,r=n.form,c=n.detail;l(r),s(r,"beforesubmit",c),u(r,"submitting")}return t(e)}));var l=function(e){e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.wpcf7.parent.querySelector(".screen-reader-response ul").innerText="",e.querySelectorAll(".wpcf7-not-valid-tip").forEach((function(e){e.remove()})),e.querySelectorAll(".wpcf7-form-control").forEach((function(e){e.setAttribute("aria-invalid","false"),e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid")})),e.querySelectorAll(".wpcf7-response-output").forEach((function(e){e.innerText=""}))};function p(e){var t=new FormData(e),n={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(function(e){var t=e[0],n=e[1];return!t.match(/^_/)&&{name:t,value:n}})).filter((function(e){return!1!==e})),formData:t};o()({path:"contact-form-7/v1/contact-forms/".concat(e.wpcf7.id,"/refill"),method:"GET",wpcf7:{endpoint:"refill",form:e,detail:n}}).then((function(t){"sent"===n.status?u(e,"mail_sent"):u(e,"init"),n.apiResponse=t,s(e,"reset",n)})).catch((function(e){return console.error(e)}))}o.a.use((function(e,t){if(e.wpcf7&&"refill"===e.wpcf7.endpoint){var n=e.wpcf7,r=n.form;n.detail,l(r),u(r,"resetting")}return t(e)}));var d=function(e,t){var n=function(n){var r=t[n];e.querySelectorAll('input[name="'.concat(n,'"]')).forEach((function(e){e.value=""})),e.querySelectorAll("img.wpcf7-captcha-".concat(n)).forEach((function(e){e.setAttribute("src",r)}));var c=/([0-9]+)\.(png|gif|jpeg)$/.exec(r);c&&e.querySelectorAll('input[name="_wpcf7_captcha_challenge_'.concat(n,'"]')).forEach((function(e){e.value=c[1]}))};for(var r in t)n(r)},v=function(e,t){var n=function(n){var r=t[n][0],c=t[n][1];e.querySelectorAll(".wpcf7-form-control-wrap.".concat(n)).forEach((function(e){e.querySelector('input[name="'.concat(n,'"]')).value="",e.querySelector(".wpcf7-quiz-label").textContent=r,e.querySelector('input[name="_wpcf7_quiz_answer_'.concat(n,'"]')).value=c}))};for(var r in t)n(r)};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){var t=new FormData(e);e.wpcf7={id:a(t.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:t.get("_wpcf7_version"),locale:t.get("_wpcf7_locale"),unitTag:t.get("_wpcf7_unit_tag"),containerPost:a(t.get("_wpcf7_container_post")),parent:e.closest(".wpcf7")},e.querySelectorAll(".wpcf7-submit").forEach((function(e){e.insertAdjacentHTML("afterend",'')})),function(e){e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((function(t){t.addEventListener("change",(function(t){var n=t.target.getAttribute("name");e.querySelectorAll('input[type="checkbox"][name="'.concat(n,'"]')).forEach((function(e){e!==t.target&&(e.checked=!1)}))}))}))}(e),function(e){e.querySelectorAll(".has-free-text").forEach((function(t){var n=t.querySelector("input.wpcf7-free-text"),r=t.querySelector('input[type="checkbox"], input[type="radio"]');n.disabled=!r.checked,e.addEventListener("change",(function(e){n.disabled=!r.checked,e.target===r&&r.checked&&n.focus()}))}))}(e),function(e){e.querySelectorAll(".wpcf7-validates-as-url").forEach((function(e){e.addEventListener("change",(function(t){var n=e.value.trim();n&&!n.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==n.indexOf(".")&&(n="http://"+(n=n.replace(/^\/+/,""))),e.value=n}))}))}(e),function(e){if(e.querySelector(".wpcf7-acceptance")&&!e.classList.contains("wpcf7-acceptance-as-validation")){var t=function(){var t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((function(e){if(t&&!e.classList.contains("optional")){var n=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&n.checked||!e.classList.contains("invert")&&!n.checked)&&(t=!1)}})),e.querySelectorAll(".wpcf7-submit").forEach((function(e){e.disabled=!t}))};t(),e.addEventListener("change",(function(e){t()})),e.addEventListener("wpcf7reset",(function(e){t()}))}}(e),function(e){var t=function(e,t){var n=a(e.getAttribute("data-starting-value")),r=a(e.getAttribute("data-maximum-value")),c=a(e.getAttribute("data-minimum-value")),i=e.classList.contains("down")?n-t.value.length:t.value.length;e.setAttribute("data-current-value",i),e.innerText=i,r&&r form").forEach((function(e){return wpcf7.init(e)}))}))}]);;
/*! This file is auto-generated */
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1};C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);t=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),o=0,i=d.length;o= $t.find('.swiper-slide').length) $t.addClass('pagination-hidden');
else $t.removeClass('pagination-hidden');
paginationSlice.show();
});
}
if (!_ismobile) {
$(window).resize(function() {
resizeCall();
});
} else {
window.addEventListener("orientationchange", function() {
resizeCall();
}, false);
}
function stickyVideo() {
var video = '.tt-fluid-inner .tt-iframe';
var button = '#lp-pom-button-16';
var frame = '.tt-video-post-wrapper';
var offset = ($('.tt-content').length) ? $('.tt-content').offset().top : 0;
var showHeight = offset - 220;
var targetClass = 'smallVid';
var adjustClass = 'vidAdjust';
var classSelect = '.smallVid';
var noClose = true;
var initWidth = $(video).width();
var initHeight = $(video).height();
$(window).scroll(function() {
//console.log($(this).scrollTop());
if ($(this).scrollTop() > showHeight && noClose) {
$(video).addClass(targetClass + ' ' + adjustClass);
$(frame).addClass('tt-on-scroll');
$(video).removeClass('tt-fluid-inner-iframe');
$(button).addClass(targetClass);
} else {
$(video).removeClass(targetClass, adjustClass);
$(video).addClass('tt-fluid-inner-iframe');
$(frame).removeClass('tt-on-scroll');
$(button).removeClass(targetClass);
}
});
$(button).click(function() {
$(video).removeClass('smallVid vidAdjust');
$(button).removeClass('smallVid');
targetClass - null;
adjustClass - null;
noClose = false;
});
}
function matchHeight() {
var blogPostGrid = $('.post-grid-view'),
blogTwoCol = $('.tt-post-two-col');
blogPostGrid.imagesLoaded(function() {
blogPostGrid.find('.post-handy-picked').not('.slick-slide').matchHeight();
});
blogTwoCol.imagesLoaded(function() {
blogTwoCol.find('.tt-post-two-col-item').not('.slick-slide').matchHeight();
});
}
/*=====================*/
/* 07 - swiper sliders */
/*=====================*/
function initSwiper() {
var initIterator = 0;
$('.swiper-container').each(function() {
var $t = $(this);
var index = 'swiper-unique-id-' + initIterator;
$t.addClass('swiper-' + index + ' initialized').attr('id', index);
$t.find('.pagination').addClass('pagination-' + index);
var autoPlayVar = parseInt($t.attr('data-autoplay'), 10);
autoPlayVar = (autoPlayVar == 1) ? true:autoPlayVar;
var centerVar = parseInt($t.attr('data-center'), 10);
var simVar = ($t.closest('.circle-description-slide-box').length) ? false : true;
var slidesPerViewVar = $t.attr('data-slides-per-view');
if (slidesPerViewVar == 'responsive') {
slidesPerViewVar = updateSlidesPerView($t);
} else if (slidesPerViewVar != 'auto') slidesPerViewVar = parseInt(slidesPerViewVar, 10);
var loopVar = parseInt($t.attr('data-loop'), 10);
var speedVar = parseInt($t.attr('data-speed'), 10);
var autoPlayVar = ($('.tt-gallery-post').length) ? 0 : autoPlayVar;
console.log(autoPlayVar);
swipers['swiper-' + index] = new Swiper('.swiper-' + index, {
speed: speedVar,
pagination: {
el: '.pagination-' + index,
clickable: true,
},
loop: loopVar,
paginationClickable: true,
autoplay: autoPlayVar,
slidesPerView: slidesPerViewVar,
keyboardControl: true,
allowSwipeToPrev: false,
allowSwipeToNext: false,
calculateHeight: true,
simulateTouch: simVar,
centeredSlides: centerVar,
roundLengths: true,
onSlideChangeEnd: function(swiper) {
var activeIndex = (loopVar === true) ? swiper.activeIndex : swiper.activeLoopIndex;
$('.img-block .bg.active').removeClass('active');
$('.img-block .bg').eq(activeIndex).addClass('active');
var qVal = $t.find('.swiper-slide-active').attr('data-val');
$t.find('.swiper-slide[data-val="' + qVal + '"]').addClass('active');
},
onSlideChangeStart: function(swiper) {
$t.find('.swiper-slide.active').removeClass('active');
},
onSlideClick: function(swiper) {
}
});
if ($t.attr('data-slides-per-view') == 'responsive') {
var paginationSpan = $t.find('.pagination span');
var paginationSlice = paginationSpan.hide().slice(0, (paginationSpan.length + 1 - slidesPerViewVar));
if (paginationSlice.length <= 1 || slidesPerViewVar >= $t.find('.swiper-slide').length) $t.addClass('pagination-hidden');
else $t.removeClass('pagination-hidden');
paginationSlice.show();
}
initIterator++;
});
}
function updateSlidesPerView(swiperContainer) {
if (winW >= addPoint) return parseInt(swiperContainer.attr('data-add-slides'), 10);
else if (winW >= lgPoint) return parseInt(swiperContainer.attr('data-lg-slides'), 10);
else if (winW >= mdPoint) return parseInt(swiperContainer.attr('data-md-slides'), 10);
else if (winW >= smPoint) return parseInt(swiperContainer.attr('data-sm-slides'), 10);
else return parseInt(swiperContainer.attr('data-xs-slides'), 10);
}
//swiper arrows
$('.swiper-arrow-left, .swiper-arrow-left-content').on('click', function() {
swipers['swiper-' + $(this).parent().attr('id')].slidePrev();
});
$('.swiper-arrow-right, .swiper-arrow-right-content').on('click', function() {
swipers['swiper-' + $(this).parent().attr('id')].slideNext();
});
//swiper arrows
$('.custom-arrow-left').on('click', function() {
swipers['swiper-' + $(this).closest('.tt-custom-arrows').find('.swiper-container').attr('id')].slidePrev();
});
$('.custom-arrow-right').on('click', function() {
swipers['swiper-' + $(this).closest('.tt-custom-arrows').find('.swiper-container').attr('id')].slideNext();
});
/*==============================*/
/* 08 - buttons, clicks, hovers */
/*==============================*/
function stickHeader() {
var isSticky = $('body').hasClass('tt-header-sticky');
if (winScr > 0 && isSticky) {
$(".tt-header").addClass("stick");
} else {
$(".tt-header").removeClass("stick");
}
if ($(".tt-header-banner").length) {
var bannerH = $(".tt-header-banner").height();
if (winScr > bannerH && isSticky) {
$(".tt-header").addClass("move");
} else {
$(".tt-header").removeClass("move");
}
}
}
function headerHeight() {
var outerHeight = $('.tt-header').outerHeight();
$('.tt-header-height').css('height', outerHeight);
}
function youtubePlaylist() {
if ($('.yt-playlist').length) {
var wrapper = $('#frame');
var channelId = wrapper.data('channel-id');
var ytp = new YTV('frame', {
channelId: channelId,
playerTheme: 'dark',
responsive: true
});
}
}
function parallax() {
$('.tt-parallax-on').codeStarParallax();
}
function qtyStepper() {
if (typeof $.fn.number != 'function') {
return;
}
if ($('input[type=number]').length) {
console.log('sfsdf');
$('input[type=number]').number();
};
}
/*mobile menu*/
$('.cmn-mobile-switch,.tt-mobile-close,.tt-mobile-overlay').on('click', function(e) {
$('.tt-mobile-overlay').toggleClass('active');
$('#content-wrapper').toggleClass('active');
$('.tt-mobile-block').toggleClass('active');
e.preventDefault();
});
$('.tt-mobile-nav .menu-toggle').on('click', function(e) {
$(this).closest('li').addClass('select').siblings('.select').removeClass('select');
$(this).closest('li').siblings('.parent').find('ul').slideUp();
$(this).parent().siblings('ul').slideToggle();
e.preventDefault();
});
$(document).on('mouseover', '.tt-mobile-nav>ul>li>a, .tt-mobile-nav>ul>li>ul>li>a', function(e) {
e.preventDefault();
$(this).siblings('ul').slideToggle();
});
/*search popup*/
$('.tt-s-popup-btn').on('click', function(e) {
$('.tt-s-popup').addClass('open');
e.preventDefault();
});
$('.tt-s-popup-close, .tt-s-popup-layer').on('click', function(e) {
$('.tt-s-popup').removeClass('open');
e.preventDefault();
});
/*tt-thumb*/
$('.tt-thumb').on('click', function(e) {
var img = $(this).attr('href');
$('.tt-thumb-popup-img').attr('src', img);
$('.tt-thumb-popup').addClass('active');
e.preventDefault();
});
$('.tt-thumb-popup-close, .tt-thumb-popup-layer').on('click', function(e) {
$('.tt-thumb-popup').removeClass('active');
e.preventDefault();
});
/*tt-video*/
$(document).on('click', '.tt-video-open', function(e) {
e.preventDefault();
var video = $(this).attr('href');
$('.tt-video-popup-container iframe').attr('src', video);
$('.tt-video-popup').addClass('active');
});
$('.tt-video-popup-close, .tt-video-popup-layer').on('click', function(e) {
$('.tt-video-popup').removeClass('active');
$('.tt-video-popup-container iframe').attr('src', 'about:blank')
e.preventDefault();
});
$('.open-video').on('click', function() {
$('.tt-video-wrapper .tt-item-video[data-rel="' + $(this).data('rel') + '"]').find('.embed-responsive').html('');
return false;
});
/*==================================================*/
/* 09 - form elements - checkboxes and radiobuttons */
/*==================================================*/
$container = $('.isotope-content');
function customTabs() {
var tabFinish = 0;
$('.tt-nav-tab-item').on('click', function(e) {
var $t = $(this);
if (tabFinish || $t.hasClass('active')) e.preventDefault();
tabFinish = 1;
$t.closest('.tt-nav-tab').find('.tt-nav-tab-item').removeClass('active');
$t.addClass('active');
var index = $t.parent().parent().find('.tt-nav-tab-item').index(this);
$t.closest('.tt-tab-wrapper').find('.tt-tab-info:visible').fadeOut(500, function() {
$t.closest('.tt-tab-wrapper').find('.tt-tab-info').eq(index).fadeIn(500, function() {
tabFinish = 0;
});
});
});
}
//Tabs
//Tabs
var megaFinish = 0;
$(".tt-mega-list li").on({
mouseenter: function() {
fixMegaMenuHeight();
var $t = $(this);
if (megaFinish || $t.hasClass('active')) e.preventDefault();
megaFinish = 1;
$t.siblings('.active').removeClass('active');
$t.addClass('active');
var index = $t.parent().parent().find('.tt-mega-list li').index(this);
$t.closest('.tt-mega-wrapper').find('.tt-mega-entry.active').fadeOut(200, function() {
$(this).removeClass('active');
$t.closest('.tt-mega-wrapper').find('.tt-mega-entry').eq(index).fadeIn(200, function() {
megaFinish = 0;
$(this).addClass('active');
});
});
},
mouseleave: function() {
//console.log('leave');
//$('.tt-mega-list li').siblings('.active').removeClass('active');
}
});
function fixMegaMenuHeight() {
var _this = $('.tt-mega-list'),
_height = _this.outerHeight();
_this.siblings('.tt-mega-content').css({ 'height': _height + 53 });
}
function progressBar() {
var progressBar = $('.progress-bar');
progressBar.each(function(indx) {
$(this).appear(function() {
$(this).css('width', $(this).attr('aria-valuenow') + '%');
});
});
}
function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
$(window).on("scroll", function() {
winScr = $(window).scrollTop();
if (winScr > 500) {
$(".tt-shortcode-1").addClass("open");
} else {
$(".tt-shortcode-1").removeClass("open");
}
});
$(document).on('click', '.tt-shortcode-1 .tt-title-block', function(e) {
e.preventDefault();
$('.tt-shortcode-1').toggleClass('active');
return false;
});
$(window).on("scroll", function() {
winScr = $(window).scrollTop();
if (winScr > 500) {
$(".tt-shortcode-2.visible").addClass("open");
} else {
$(".tt-shortcode-2.visible").removeClass("open");
}
});
$(document).on('click', '.tt-shortcode-2-close', function(e) {
e.preventDefault();
$('.tt-shortcode-2').removeClass('open').removeClass('visible');
return false;
});
$('.ajax-load-more.load-more').each(function() {
var $this = $(this),
$container = $this.parent().parent().find('.isotope-content'),
token = $this.data('token'),
settings = window['magplus_load_more_' + token],
is_isotope = parseInt(settings.isotope),
paging = 1,
flood = false,
ajax_data;
$this.bind('click', function() {
if (flood === false) {
paging++;
flood = true;
// set ajax data
ajax_data = $.extend({}, { action: 'ajax-pagination', paged: paging }, settings);
$.ajax({
type: 'POST',
url: magplus_ajax.ajaxurl,
data: ajax_data,
dataType: 'html',
beforeSend: function() {
$this.addClass('more-loading');
$this.html('Loading...');
},
success: function(html) {
var content = $(html).css('opacity', 0);
if (is_isotope) {
content.imagesLoaded(function() {
$container.append(content).isotope('appended', content);
$container.isotope('layout');
});
} else {
$(content).insertBefore($this.parent());
}
content.animate({ 'opacity': 1 }, 250);
// load button affecting after images loaded
$this.removeClass('more-loading');
$this.html('Load More');
if (parseInt(settings.max_pages) == paging) { $this.hide(); }
flood = false;
}
});
}
return false;
});
});
$('.ajax-load-more.infinite-scroll').each(function() {
var $this = $(this),
$container = $this.parent().parent().find('.isotope-content'),
token = $this.data('token'),
settings = window['magplus_load_more_' + token],
is_isotope = parseInt(settings.isotope),
paging = 2,
flood = false,
ajax_data;
$(window).scroll(function() {
if (flood === false) {
paging++;
flood = true;
// set ajax data
ajax_data = $.extend({}, { action: 'ajax-pagination', paged: paging }, settings);
$('.ajax-load-more.infinite-scroll').appear(function() {
$.ajax({
type: 'POST',
url: magplus_ajax.ajaxurl,
data: ajax_data,
dataType: 'html',
beforeSend: function() {
$this.addClass('more-loading');
$this.html('Loading...');
},
success: function(html) {
var content = $(html).css('opacity', 0);
if (is_isotope) {
content.imagesLoaded(function() {
$container.append(content).isotope('appended', content);
$container.isotope('layout');
});
} else {
$(content).insertBefore($this.parent());
}
content.animate({ 'opacity': 1 }, 250);
// load button affecting after images loaded
$this.removeClass('more-loading');
$this.html('Load More');
if (parseInt(settings.max_pages) == paging) { $this.hide(); }
flood = false;
}
});
});
//}
}
return false;
});
});
$(window).on('elementor/frontend/init', function() {
elementorFrontend.hooks.addAction('frontend/element_ready/rs-blog-masonry-widget.default', function($scope, $) {
$('.isotope').imagesLoaded(function() {
if ($('.isotope').length) {
var $container;
$container = $('.isotope-content');
$container.isotope({ itemSelector: '.isotope-item', masonry: { gutter: 0, columnWidth: '.grid-sizer' } });
}
});
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-hand-picked-blog-widget.default', function($scope, $) {
matchHeight();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-gallery-showcase-widget.default', function($scope, $) {
initSwiper();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-featured-blog-widget.default', function($scope, $) {
matchHeight();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-progress-bar-rating-widget.default', function($scope, $) {
progressBar();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-youtube-video-playlist-widget.default', function($scope, $) {
youtubePlaylist();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-tabs-widget.default', function($scope, $) {
customTabs();
});
elementorFrontend.hooks.addAction('frontend/element_ready/rs-post-video-playlist-widget.default', function($scope, $) {
postVideoTab();
});
});
})(jQuery, window, document);
;
/**
* jquery.matchHeight-min.js master
* http://brm.io/jquery-match-height/
* License: MIT
*/
(function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=
function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this);
a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),
f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");b={display:b};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),
a.css(d.property,f-b+"px"))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,
this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);;
!function(e){e.fn.appear=function(a,r){var n=e.extend({data:void 0,one:!0,accX:0,accY:0},r);return this.each(function(){var r=e(this);if(r.appeared=!1,!a)return void r.trigger("appear",n.data);var p=e(window),t=function(){if(!r.is(":visible"))return void(r.appeared=!1);var e=p.scrollLeft(),a=p.scrollTop(),t=r.offset(),c=t.left,i=t.top,o=n.accX,f=n.accY,s=r.height(),u=p.height(),d=r.width(),l=p.width();i+s+f>=a&&a+u+f>=i&&c+d+o>=e&&e+l+o>=c?r.appeared||r.trigger("appear",n.data):r.appeared=!1},c=function(){if(r.appeared=!0,n.one){p.unbind("scroll",t);var c=e.inArray(t,e.fn.appear.checks);c>=0&&e.fn.appear.checks.splice(c,1)}a.apply(this,arguments)};n.one?r.one("appear",n.data,c):r.bind("appear",n.data,c),p.scroll(t),e.fn.appear.checks.push(t),t()})},e.extend(e.fn.appear,{checks:[],timeout:null,checkAll:function(){var a=e.fn.appear.checks.length;if(a>0)for(;a--;)e.fn.appear.checks[a]()},run:function(){e.fn.appear.timeout&&clearTimeout(e.fn.appear.timeout),e.fn.appear.timeout=setTimeout(e.fn.appear.checkAll,20)}}),e.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(a,r){var n=e.fn[r];n&&(e.fn[r]=function(){var a=n.apply(this,arguments);return e.fn.appear.run(),a})})}(jQuery);;
;(function($,window,document){'use strict';$.fn.codeStarParallax=function(){return this.each(function(){var $this=$(this),offset=0,boxHeight=0,winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0),winHeight=Math.max(document.documentElement.clientHeight,window.innerHeight||0),imgHeight=$this.data('height')||0,ratio=$this.data('ratio')||0.5,positionX=$this.css('background-position-x')||'50%';function scrolling(){var scrollTop=$(window).scrollTop(),boxOffset=$this.offset().top;if(boxOffset+boxHeight<=scrollTop||boxOffset>=scrollTop+winHeight){return;}
$this.css({'background-position':positionX+' '+Math.round((offset+ratio)*(boxOffset-scrollTop))+'px'});}
function resizing(){winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);winHeight=Math.max(document.documentElement.clientHeight,window.innerHeight||0);boxHeight=$this.outerHeight();imgHeight=imgHeight||boxHeight;ratio=Math.min(ratio,imgHeight/(winHeight+boxHeight));offset=Math.min(offset,(Math.min(0,winHeight-imgHeight-ratio)*Math.min(0,winHeight-boxHeight))/2);scrolling();}
$(window).on('scroll',scrolling).on('resize',resizing);resizing();});};})(jQuery,window,document);
;
/*! This file is auto-generated */
/*!
* imagesLoaded PACKAGED v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o0}});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)}]);;
/*! 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;o").addClass("jp-carousel-overlay").css({position:"fixed",top:0,right:0,bottom:0,left:0});var d=1==+jetpackCarouselStrings.display_comments,m=d?'":"";Number(jetpackCarouselStrings.is_logged_in),m=e(''+m+"
"),c=e(''),p=e('').append(c),f=e("").addClass("jp-carousel-image-meta").css({float:"right","margin-top":"20px",width:"250px"}),0").append("").append(""),g=e("").addClass("jp-carousel-titleanddesc").css({width:"100%","margin-top":f.css("margin-top")});var h=e(window).width()-2*_-(f.width()+40);if(h+="px",w=e("").addClass("jp-carousel-left-column-wrapper").css({width:Math.floor(h)}).append(g),d){var v='").css({width:"100%","margin-top":"20px",color:"#999"}),a=e("").addClass("jp-carousel-comments").css({width:"100%",bottom:"10px","margin-top":"20px"});var x=e('").css({width:"100%",bottom:"10px","margin-top":"20px"});w.append(j).append(a).append(x)}var b=e("").addClass("jp-carousel-fadeaway");n=e("").addClass("jp-carousel-info").css({top:Math.floor(e(window).height()/100*85),left:_,right:_}).append(p).append(f),window.innerWidth<=760?(p.remove().insertAfter(g),n.prepend(w)):n.append(w);var S=e(window).height()-parseInt(n.css("top"),10)+"px";s=e("
").addClass("jp-carousel-next-button").css({right:"15px"}).hide(),r=e("
").addClass("jp-carousel-previous-button").css({left:0}).hide(),s.add(r).css({position:"fixed",top:"40px",bottom:S,width:_}),i=e("").addClass("jp-carousel").css({position:"absolute",top:0,bottom:S,left:0,right:0}),u=e('✖
').css({position:"fixed"}),o=e("").addClass("jp-carousel-wrap").addClass("jp-carousel-transitions"),"white"===jetpackCarouselStrings.background_color&&o.addClass("jp-carousel-light"),o.attr("itemscope",""),o.attr("itemtype","https://schema.org/ImageGallery"),o.css({position:"fixed",top:0,right:0,bottom:0,left:0,"z-index":2147483647,"overflow-x":"hidden","overflow-y":"auto",direction:"ltr"}).hide().append(t).append(i).append(b).append(n).append(s).append(r).append(u).appendTo(e("body")).click(function(t){var a=e(t.target),s=a.parents("div.jp-carousel-wrap"),r=s.data("carousel-extra"),l=s.find("div.selected").data("attachment-id");if(r=r||[],a.is(i)||a.parents().add(a).is(u))window.matchMedia("(max-device-width: 760px)").matches?(a.parents().add(a).is(u)&&o.jp_carousel("close"),t.pageX<=70&&o.jp_carousel("previous"),e(window).width()-t.pageX<=70&&o.jp_carousel("next")):o.jp_carousel("close");else if(a.hasClass("jp-carousel-commentlink"))t.preventDefault(),t.stopPropagation(),e(window).unbind("keydown",k),o.animate({scrollTop:parseInt(n.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(a.hasClass("jp-carousel-comment-login")){var c=jetpackCarouselStrings.login_url+"%23jp-carousel-"+l;window.location.href=c}else if(a.parents("#jp-carousel-comment-form-container").length){var d=e("#jp-carousel-comment-form-comment-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),p=e("#jp-carousel-comment-form-email-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),m=e("#jp-carousel-comment-form-author-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),h=e("#jp-carousel-comment-form-url-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)});if(d&&d.attr("id")===a.attr("id"))e(window).unbind("keydown",k),e("#jp-carousel-comment-form-submit-and-info-wrapper").slideDown("fast");else if(a.is('input[type="submit"]')){t.preventDefault(),t.stopPropagation(),e("#jp-carousel-comment-form-spinner").show();var f={action:"post_attachment_comment",nonce:jetpackCarouselStrings.nonce,blog_id:r.blog_id,id:l,comment:d.val()};if(!f.comment.length)return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.no_comment_text});if(1!==Number(jetpackCarouselStrings.is_logged_in)&&(f.email=p.val(),f.author=m.val(),f.url=h.val(),1===Number(jetpackCarouselStrings.require_name_email))){if(!f.email.length||!f.email.match("@"))return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-email-field",error:jetpackCarouselStrings.no_comment_email});if(!f.author.length)return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-author-field",error:jetpackCarouselStrings.no_comment_author})}e.ajax({type:"POST",url:jetpackCarouselStrings.ajaxurl,data:f,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"),i.jp_carousel("clearCommentTextAreaValue"),i.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(){i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.comment_post_error})}})}}else a.parents(".jp-carousel-info").length||(window.matchMedia("(max-device-width: 760px)").matches?(t.pageX<=70&&o.jp_carousel("previous"),e(window).width()-t.pageX<=70&&o.jp_carousel("next")):o.jp_carousel("next"))}).bind("jp_carousel.afterOpen",function(){e(window).bind("keydown",k),e(window).bind("resize",C),i.opened=!0,C()}).bind("jp_carousel.beforeClose",function(){var t=e(window).scrollTop();e(window).unbind("keydown",k),e(window).unbind("resize",C),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(),y="",i.opened=!1}).on("transitionend.jp-carousel ",".jp-carousel-slide",function(t){if("transform"===t.originalEvent.propertyName){var a=(Date.now()-l)/1e3/t.originalEvent.elapsedTime;o.off("transitionend.jp-carousel"),a>=2&&e(".jp-carousel-transitions").removeClass("jp-carousel-transitions")}}),e(".jp-carousel-wrap").touchwipe({wipeLeft:function(e){e.preventDefault(),i.jp_carousel("next")},wipeRight:function(e){e.preventDefault(),i.jp_carousel("previous")},preventDefaultEvents:!1}),s.add(r).click(function(e){e.preventDefault(),e.stopPropagation(),s.is(this)?i.jp_carousel("next"):i.jp_carousel("previous")})}}(),!i.jp_carousel("testIfOpened")))return x=e("body").css("overflow"),e("body").css("overflow","hidden"),b=e("html").css("overflow"),e("html").css("overflow","hidden"),v=e(window).scrollTop(),o.data("carousel-extra",h),this.each(function(){var t=e(this);d&&e.extend(m,d),-1===m.start_index&&(m.start_index=0),o.trigger("jp_carousel.beforeOpen").fadeIn("fast",function(){o.trigger("jp_carousel.afterOpen"),i.jp_carousel("initSlides",t.find(m.items_selector),m.start_index).jp_carousel("selectSlideAtIndex",m.start_index)}),i.html("")})},selectSlideAtIndex:function(e){var t=this.jp_carousel("slides"),a=t.eq(e);return 0===a.length&&(a=t.eq(0)),i.jp_carousel("selectSlide",a,!1),this},close:function(){return e("body").css("overflow",x),e("html").css("overflow",b),this.jp_carousel("clearCommentTextAreaValue"),o.trigger("jp_carousel.beforeClose").fadeOut("fast",function(){o.trigger("jp_carousel.afterClose"),e(window).scrollTop(v)})},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=i.jp_carousel(e);t&&(o.animate({scrollTop:0},"fast"),this.jp_carousel("clearCommentTextAreaValue"),this.jp_carousel("selectSlide",t))},selectedSlide:function(){return this.find(".selected")},setSlidePosition:function(e){return l=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"),a=i.width(),o=t.width(),s=i.jp_carousel("prevSlide"),r=i.jp_carousel("nextSlide"),n=s.prev(),l=r.next(),c=Math.floor(.5*(a-o));t.jp_carousel("setSlidePosition",c).show(),i.jp_carousel("fitInfo",e),1===(h.is(t.prevAll())?1:-1)?(l.is(s)||l.jp_carousel("setSlidePosition",a+r.width()).show(),n.is(r)||n.jp_carousel("setSlidePosition",-n.width()-o).show()):l.is(s)||l.jp_carousel("setSlidePosition",a+o).show(),s.jp_carousel("setSlidePosition",Math.floor(-s.width()+.75*_)).show(),r.jp_carousel("setSlidePosition",Math.ceil(a-.75*_)).show()},selectSlide:function(t,a){h=this.find(".selected").removeClass("selected");var s,r,n=i.jp_carousel("slides").css({position:"fixed"}),l=e(t).addClass("selected").css({position:"relative"}),d=l.data("attachment-id"),p=i.jp_carousel("prevSlide"),u=i.jp_carousel("nextSlide"),m=p.prev(),f=u.next();i.jp_carousel("loadFullImage",l),c.hide(),0===u.length&&n.length<=2?e(".jp-carousel-next-button").hide():e(".jp-carousel-next-button").show(),0===p.length&&n.length<=2?e(".jp-carousel-previous-button").hide():e(".jp-carousel-previous-button").show(),s=l.add(p).add(m).add(u).add(f).jp_carousel("loadSlide"),n.not(s).hide(),i.jp_carousel("updateSlidePositions",a),o.trigger("jp_carousel.selectSlide",[l]),i.jp_carousel("getTitleDesc",{title:l.data("title"),desc:l.data("desc")});var g=l.data("image-meta");i.jp_carousel("updateExif",g),i.jp_carousel("updateFullSizeLink",l),i.jp_carousel("updateMap",g),1==+jetpackCarouselStrings.display_comments&&(i.jp_carousel("testCommentsOpened",l.data("comments-opened")),i.jp_carousel("getComments",{attachment_id:d,offset:0,clear:!0}),e("#jp-carousel-comment-post-results").slideUp()),l.data("caption")?((r=e("").text(l.data("caption")).html())===e("").text(l.data("title")).html()&&e(".jp-carousel-titleanddesc-title").fadeOut("fast").empty(),r===e("").text(l.data("desc")).html()&&e(".jp-carousel-titleanddesc-desc").fadeOut("fast").empty(),c.html(l.data("caption")).fadeIn("slow")):c.fadeOut("fast").empty(),jetpackCarouselStrings.stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+jetpackCarouselStrings.stats+"&post="+encodeURIComponent(d)+"&rand="+Math.random()),e(u).add(p).each(function(){i.jp_carousel("loadFullImage",e(this))}),window.location.hash=y="#jp-carousel-"+d},slides:function(){return this.find(".jp-carousel-slide")},slideDimensions:function(){return{width:e(window).width()-2*_,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,a=i.jp_carousel("slideDimensions"),o=this.jp_carousel("originalDimensions"),s=o.width/o.height,r=1,n=1;return o.width>a.width&&(r=a.width/o.width),o.height>a.height&&(n=a.height/o.height),r")[0].src=e(t[a]).data("gallery-src"));var o=t.first().closest(".tiled-gallery.type-rectangular").length>0;return t.each(function(t){var s=e(this),r=s.data("attachment-id")||0,n=s.data("comments-opened")||0,l=s.data("image-meta")||{},c=s.data("orig-size")||"",d={width:s[0].naturalWidth,height:s[0].naturalHeight},p=s.data("image-title")||"",u=s.data("image-description")||"",m=s.parents(".gallery-item").find(".gallery-caption").html()||"",h=s.data("gallery-src")||"",f=s.data("medium-file")||"",g=s.data("large-file")||"",j=s.data("orig-file")||"",w=s.parents("div.tiled-gallery-item").find("div.tiled-gallery-caption").html();if(w&&(m=w),r&&c.length){p=i.jp_carousel("texturize",p),u=i.jp_carousel("texturize",u),m=i.jp_carousel("texturize",m);var v=e("
").attr("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7").css("width","100%").css("height","100%"),_=e('').hide().css({left:t1&&(e.max_width=e.max_width*window.devicePixelRatio,e.max_height=e.max_height*window.devicePixelRatio),r>=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(a){var d=e.large_file.lastIndexOf("?"),p=e.large_file;return-1!==d&&(p=e.large_file.substring(0,d),(e.orig_width>e.max_width||e.orig_height>e.max_height)&&(p+="?fit="+e.orig_max_width+"%2C"+e.orig_max_height)),p}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 a,o,s="",r="";(o=e("div.jp-carousel-titleanddesc","div.jp-carousel-wrap")).hide(),s=i.jp_carousel("parseTitleDesc",t.title)||"",a=i.jp_carousel("parseTitleDesc",t.desc)||"",(s.length||a.length)&&(e("").html(s).text()===e("").html(a).text()&&(s=""),r=s.length?''+s+"
":"",r+=a.length?''+a+"
":"",o.html(r).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 a=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=i.jp_carousel("shutterSpeed",o);break;case"aperture":o="f/"+o}a.append(""+jetpackCarouselStrings[t]+"
"+o+"")}}),e("div.jp-carousel-image-meta ul.jp-carousel-image-exif").replaceWith(a)},updateFullSizeLink:function(t){if(!t||!t.data)return!1;var a,o=t.data("orig-size").split(","),s=document.createElement("a");s.href=t.data("src").replace(/\?.+$/,""),a=null!==s.hostname.match(/^i[\d]{1}.wp.com$/i)?s.href:t.data("orig-file").replace(/\?.+$/,"");var r=e(""+i.jp_carousel("format",{text:jetpackCarouselStrings.download_original,replacements:o})+"").addClass("jp-carousel-image-download").attr("href",a).attr("target","_blank");e("div.jp-carousel-image-meta a.jp-carousel-image-download").replaceWith(r)},updateMap:function(t){if(t.latitude&&t.longitude&&1===Number(jetpackCarouselStrings.display_geo)){var a=t.latitude,i=t.longitude,o=e("div.jp-carousel-image-meta","div.jp-carousel-wrap"),s="&scale=2&style=feature:all|element:all|invert_lightness:true|hue:0x0077FF|saturation:-50|lightness:-5|gamma:0.91";e("").addClass("jp-carousel-image-map").html('
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t').prependTo(o)}},testCommentsOpened:function(t){1===parseInt(t,10)?(e(".jp-carousel-buttons").fadeIn("fast"),j.fadeIn("fast")):(e(".jp-carousel-buttons").fadeOut("fast"),j.fadeOut("fast"))},getComments:function(t){if(clearInterval(m),"object"==typeof t&&void 0!==t.attachment_id&&t.attachment_id){(!t.offset||void 0===t.offset||t.offset<1)&&(t.offset=0);var a=e(".jp-carousel-comments"),o=e("#jp-carousel-comments-loading").show();t.clear&&a.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(s){t.clear&&a.fadeOut("fast").empty(),e(s).each(function(){var o=e("").addClass("jp-carousel-comment").attr("id","jp-carousel-comment-"+this.id).html('");a.append(o),clearInterval(m),m=setInterval(function(){e(".jp-carousel-overlay").height()-1500?a.height():f.height())+200),a.show(),o.hide()},error:function(e,t,i){console.log("Comment get fail...",e,t,i),a.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 i.jp_carousel("slides").length>1}};e.fn.jp_carousel=function(t){return I[t]?I[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"):I.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)&&(S(),e(document.body).on("post-load",function(){S()})),e(window).on("hashchange.jp-carousel",function(){var t,a,s,r=/jp-carousel-(\d+)/;window.location.hash&&r.test(window.location.hash)?window.location.hash===y&&i.opened||(window.location.hash&&i&&!i.opened&&history.back?history.back():(y=window.location.hash,t=window.location.hash.match(r),a=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,i){if(e(i).find("img").each(function(t,o){if(e(o).data("attachment-id")===parseInt(a,10))return s={index:t,gallery:i},!1}),s)return e(s.gallery).jp_carousel("openOrSelectSlide",s.index),!1}))):i&&i.opened&&o.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 s(){this.removeEventListener("touchmove",r),e=null,o=!1}function r(r){if(i.preventDefaultEvents&&r.preventDefault(),o){var n=r.touches[0].pageX,l=r.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?(s(),c>0?i.wipeLeft(r):i.wipeRight(r)):Math.abs(d)>=i.threshold&&Math.abs(c)<=i.restraint&&(s(),d>0?i.wipeDown(r):i.wipeUp(r)))}}"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",r,!1))},!1)}),this}}(jQuery);;
/* Do not modify this file directly. It is compiled from other files. */
/*global google:true*/
/*global _wp_google_translate_widget:true*/
/*exported googleTranslateElementInit*/
function googleTranslateElementInit(){var e,a="en",t=/[?]lang=([a-zA-Z\-_]+)/;"object"==typeof _wp_google_translate_widget&&"string"==typeof _wp_google_translate_widget.lang&&(a=_wp_google_translate_widget.lang),(e=window.location.href.match(t))&&(window.location.href=window.location.href.replace(t,"").replace(/#googtrans\([a-zA-Z\-_|]+\)/,"")+"#googtrans("+a+"|"+e[1]+")"),new google.translate.TranslateElement({pageLanguage:a,layout:_wp_google_translate_widget.layout,autoDisplay:!1},"google_translate_element")};