!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('"),c=e('

'),p=e('').append(c),f=e("
").addClass("jp-carousel-image-meta").css({float:"right","margin-top":"20px",width:"250px"}),0