← Back
Editing: main.min.js
!function(a){"use strict";window.qodef={},window.qodefEmptyCallback=function(){},qodef.body=a("body"),qodef.html=a("html"),qodef.window=a(window),qodef.windowWidth=a(window).width(),qodef.windowHeight=a(window).height(),qodef.scroll=0,a(document).ready(function(){qodef.scroll=a(window).scrollTop(),i.init(),b.init(),o.init(),s.init(),e.init()}),a(window).resize(function(){qodef.windowWidth=a(window).width(),qodef.windowHeight=a(window).height()}),a(window).scroll(function(){qodef.scroll=a(window).scrollTop()}),a(document).on("zoya_trigger_get_new_posts",function(){b.init(),o.init()});var i={init:function(){i.addBodyClassName()},isBrowser:function(e){var t=!1;switch(e){case"chrome":t=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);break;case"safari":t=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);break;case"firefox":t=-1<navigator.userAgent.toLowerCase().indexOf("firefox");break;case"ie":t=0<window.navigator.userAgent.indexOf("MSIE ")||!!navigator.userAgent.match(/Trident.*rv\:11\./);break;case"edge":t=/Edge\/\d./i.test(navigator.userAgent)}return t},addBodyClassName:function(){a.each(["chrome","safari","firefox","ie","edge"],function(e,t){i.isBrowser(t)&&void 0!==qodef.body&&("ie"===t&&(t="ms-explorer"),qodef.body.addClass("qodef-browser--"+t))})}},b={init:function(e){var t,i,o,n;this.holder=a(".qodef-swiper-container"),a.extend(this.holder,e),this.holder.length&&this.holder.each(function(){b.createSlider(a(this))}),this.holder.length&&(e=b.getOptions(this.holder),n=parseInt(e.slidesPerView),t=e.navigation.nextEl,i=e.navigation.prevEl,o=this.holder[0].swiper.realIndex+1,n=b.getIndexes(n,e.numberOfSlides,o,e.centeredSlides),t.html('<span class="qodef-next-number">'+n.nextSlideNumber+'</span><span class="qodef-nav-line"></span>'),i.html('<span class="qodef-nav-line"></span><span class="qodef-prev-number">'+n.prevSlideNumber+"</span>"))},createSlider:function(e){var t=b.getOptions(e),i=b.getEvents(e,t);new Swiper(e,Object.assign(t,i))},getOptions:function(e,t){var i=void 0!==e.data("options")?e.data("options"):{},o=void 0!==i.spaceBetween&&""!==i.spaceBetween?i.spaceBetween:0,n=void 0!==i.slidesPerView&&""!==i.slidesPerView?i.slidesPerView:1,a=void 0!==i.centeredSlides&&""!==i.centeredSlides&&i.centeredSlides,s=void 0!==i.sliderScroll&&""!==i.sliderScroll&&i.sliderScroll,d=void 0===i.loop||""===i.loop||i.loop,r=void 0===i.autoplay||""===i.autoplay||i.autoplay,l=void 0!==i.speed&&""!==i.speed?parseInt(i.speed,10):5e3,f=void 0!==i.speedAnimation&&""!==i.speedAnimation?parseInt(i.speedAnimation,10):800,c=void 0!==i.effect&&""!==i.effect?i.effect:"slide",u=void 0!==i.fadeEffect&&""!==i.fadeEffect&&i.fadeEffect,h=void 0!==i.customStages&&""!==i.customStages&&i.customStages,g=void 0!==i.outsideNavigation&&"yes"===i.outsideNavigation,p=g?".swiper-button-next-"+i.unique:e.find(".swiper-button-next"),g=g?".swiper-button-prev-"+i.unique:e.find(".swiper-button-prev"),m=e.find(".swiper-pagination"),w=e.find(".swiper-slide:not(.swiper-slide-duplicate)").length,l=(!1!==r&&5e3!==l&&(r={delay:l}),void 0!==i.slidesPerView1440&&""!==i.slidesPerView1440?parseInt(i.slidesPerView1440,10):5),v=void 0!==i.slidesPerView1366&&""!==i.slidesPerView1366?parseInt(i.slidesPerView1366,10):4,q=void 0!==i.slidesPerView1024&&""!==i.slidesPerView1024?parseInt(i.slidesPerView1024,10):3,y=void 0!==i.slidesPerView768&&""!==i.slidesPerView768?parseInt(i.slidesPerView768,10):2,_=void 0!==i.slidesPerView680&&""!==i.slidesPerView680?parseInt(i.slidesPerView680,10):1,i=void 0!==i.slidesPerView480&&""!==i.slidesPerView480?parseInt(i.slidesPerView480,10):1,h=(h||(n<2?y=q=v=l=n:n<3?q=v=l=n:n<4?v=l=n:n<5&&(l=n)),"bullets");return e.hasClass("qodef-blog")&&(h="progressbar"),e.hasClass("qodef-fade-effect--enabled")&&(c="fade",u={crossFade:!0}),Object.assign({numberOfSlides:w,slidesPerView:n,centeredSlides:a,sliderScroll:s,spaceBetween:o,autoplay:r,loop:d,speed:f,effect:c,fadeEffect:u,navigation:{nextEl:p,prevEl:g},pagination:{el:m,type:h,clickable:!0},breakpoints:{0:{slidesPerView:i},481:{slidesPerView:_},681:{slidesPerView:y},769:{slidesPerView:q},1025:{slidesPerView:v},1367:{slidesPerView:l},1441:{slidesPerView:n}}},b.getSliderDatas(e))},getSliderDatas:function(e){var t,i=e.data(),o={};for(t in i)i.hasOwnProperty(t)&&"options"!==t&&void 0!==i[t]&&""!==i[t]&&(o[t]=i[t]);return o},getIndexes:function(e,t,i,o){var n,a=0;return o&&(o=parseInt(e/2),a=parseInt((e-1)/2),e-=o),o=1==i?(n=t-a,i+e):i==t?(n=i-1-a,e):t<i+e?(n=i-1-a,i+e-t):(n=i-1-a,i+e),n<=0&&(n+=t),{prevSlideNumber:n,nextSlideNumber:o}},getEvents:function(n,a){return{on:{init:function(){var t;n.addClass("qodef-swiper--initialized"),a.sliderScroll&&(t=!1,n.on("mousewheel",function(e){e.preventDefault(),t||(t=!0,e.deltaY<0?n[0].swiper.slideNext():n[0].swiper.slidePrev(),setTimeout(function(){t=!1},1e3))}))},slideChangeTransitionStart:function(){var e=n[0].swiper,t=parseInt(e.params.slidesPerView),i=a.navigation.nextEl,o=a.navigation.prevEl,e=e.realIndex+1,t=b.getIndexes(t,a.numberOfSlides,e,a.centeredSlides);i.find(".qodef-next-number").html(t.nextSlideNumber),o.find(".qodef-prev-number").html(t.prevSlideNumber)}}}}},o=(qodef.qodefSwiper=b,{init:function(e){this.holder=a(".qodef-magnific-popup"),a.extend(this.holder,e),this.holder.length&&this.holder.each(function(){var e=a(this);e.hasClass("qodef-popup-item")?o.initSingleImagePopup(e):e.hasClass("qodef-popup-gallery")&&o.initGalleryPopup(e)})},initSingleImagePopup:function(e){var t=e.data("type");e.magnificPopup({type:t,titleSrc:"title",image:{cursor:null},closeMarkup:'<button title="%title%" type="button" class="mfp-close">'+qodefGlobal.vars.iconClose+"</button>"})},initGalleryPopup:function(e){var e=e.find(".qodef-popup-item"),t=o.generateGalleryItems(e);e.each(function(e){a(this).magnificPopup({items:t,gallery:{enabled:!0,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%">'+qodefGlobal.vars.iconArrowLeft+"</button>"},index:e,type:"image",image:{cursor:null},closeMarkup:'<button title="%title%" type="button" class="mfp-close">'+qodefGlobal.vars.iconClose+"</button>"})})},generateGalleryItems:function(e){var t=[];return e.length&&e.each(function(){var e=a(this),e={src:e.attr("href"),title:e.attr("title"),type:e.data("type")};t.push(e)}),t}}),s=(qodef.qodefMagnificPopup=o,{items:"",init:function(e){this.holder=a(".qodef-anchor"),a.extend(this.holder,e),this.holder.length&&(s.items=this.holder,s.clickTrigger(),a(window).on("load",function(){s.checkAnchorOnScroll(),s.checkAnchorOnLoad()}))},clickTrigger:function(){s.items.on("click",function(e){var t=s.getAnchorItem(this),i=t.attr("href"),o=t.prop("hash").split("#")[1],n=window.location.href,a=-1<n.indexOf("#")?n.split("#")[1]:0;(i.indexOf("http")<0||i===n||0!==a&&i.substring(0,i.length-o.length-1)===n.substring(0,n.length-a.length-1)||0===a&&i.substring(0,i.length-o.length-1)===n)&&e.preventDefault(),s.animateScroll(t,o)})},checkAnchorOnLoad:function(){var t=window.location.hash.split("#")[1];void 0!==t&&""!==t&&s.items.length&&s.items.each(function(){var e=s.getAnchorItem(this);-1<e.attr("href").indexOf(t)&&s.animateScroll(e,t)})},checkAnchorOnScroll:function(){var e;1024<qodef.windowWidth&&(e=a("#qodef-page-inner *[id]")).length&&e.each(function(){var e=a(this),t=a('[href*="#'+e.attr("id")+'"]');t.length&&(s.isTargetInView(e)&&s.setActiveState(t),a(window).scroll(function(){s.isTargetInView(e)?s.setActiveState(t):t.removeClass(s.getItemClasses(t))}))})},isTargetInView:function(e){var e=e[0].getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight;return!(Math.floor(100-(0<=e.top?0:e.top)/-+e.height*100)<20||Math.floor(100-(e.bottom-t)/e.height*100)<20)},getAnchorItem:function(e){return"A"===e.tagName?a(e):a(e).children("a")},animateScroll:function(e,t){var i=""!==t?a('[id="'+t+'"]'):"";if(i.length)return i=i.offset().top-s.getHeaderHeight()-qodefGlobal.vars.adminBarHeight,s.setActiveState(e),qodef.html.stop().animate({scrollTop:Math.round(i)},1e3,function(){history.pushState&&history.pushState(null,"","#"+t)}),!1},getHeaderHeight:function(){var e=0;return e=1024<qodef.windowWidth&&null!==qodefGlobal.vars.headerHeight&&""!==qodefGlobal.vars.headerHeight?parseInt(qodefGlobal.vars.headerHeight,10):e},setActiveState:function(e){var t=!e.parent().hasClass("qodef-anchor"),i=s.getItemClasses(e);s.items.removeClass(i),(t?e:e.parent()).addClass(i)},getItemClasses:function(e){return"qodef-anchor--active"+(e.parents("#qodef-page-header")?" current-menu-item current_page_item":"")}}),e=(qodef.qodefAnchor=s,{init:function(){this.holders=a("#qodef-page-sidebar .widget.qodef-author-info, .elementor-widget-sidebar .widget.qodef-author-info, #qodef-page-sidebar .widget.widget_zoya_core_contact_form_7, .elementor-widget-sidebar .widget.widget_zoya_core_contact_form_7, .widget_zoya_core_social_icons_box, div[class*=zoya_core_contact_form_7]:not(.widget) .qodef-contact-form-7, #qodef-page-comments-form, .qodef-subtitle-lines-animation--enabled"),this.holders.length&&this.holders.each(function(){var e=a(this),t=680<qodef.windowWidth?-300:-100;e.appear(function(){e.addClass("qodef--appeared")},{accX:0,accY:t})})}});qodef.qodefAppearAnimation=e,"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var t=1;t<arguments.length;t++){var i=arguments[t];if(null!==i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e})}(jQuery),function(o){"use strict";o(document).ready(function(){n.init()}),o(window).resize(function(){n.init()}),o(document).on("zoya_trigger_get_new_posts",function(e,t){t.hasClass("qodef-blog")&&(i.resize(t),n.resize(t))});var i={init:function(){var e=o(".qodef-blog");e.length&&i.resize(e)},resize:function(e){e=e.find(".wp-video-shortcode, .wp-audio-shortcode").not(".mejs-container");e.length&&e.each(function(){var e=o(this);"function"==typeof e.mediaelementplayer&&e.mediaelementplayer({videoWidth:"100%",videoHeight:"56.5%"})})}},n=(qodef.qodefReInitMediaElementPostFormats=i,{init:function(){var e=o(".qodef-blog");e.length&&n.resize(e)},resize:function(e){e=e.find(".qodef-e-media iframe");e.length&&e.each(function(){var e=o(this),t=e.attr("width"),i=e.attr("height"),t=e.width()/t*i;e.css("height",t)})}});qodef.qodefResizeIframes=n}(jQuery),function(o){"use strict";o(document).ready(function(){s.init()}),o(document).on("zoya_trigger_get_new_posts",function(e,t){t.hasClass("qodef-filter--on")&&t.removeClass("qodef--filter-loading")});var s={customListQuery:{},init:function(e){this.holder=o(".qodef-filter--on"),o.extend(this.holder,e),this.holder.length&&this.holder.each(function(){var e=o(this),t=e.find(".qodef-m-filter-item");s.checkCustomListQuery(e.data("options")),s.clickEvent(e,t)})},checkCustomListQuery:function(e){void 0!==e.additional_query_args&&void 0!==e.additional_query_args.tax_query&&(s.customListQuery=e.additional_query_args.tax_query)},clickEvent:function(t,i){i.on("click",function(e){e.preventDefault();e=o(this);e.hasClass("qodef--active")||(t.addClass("qodef--filter-loading"),i.removeClass("qodef--active"),e.addClass("qodef--active"),s.setVisibility(t,e))})},setVisibility:function(e,t){var i=t.data("taxonomy"),t=t.data("filter"),o="*"===t,n=e.data("options"),a={},a=o?s.customListQuery:{0:{taxonomy:i,field:"number"==typeof t?"term_id":"slug",terms:t}};n.additional_query_args={tax_query:a},qodef.body.trigger("zoya_trigger_load_more",[e,1])},isMasonryLayout:function(e){return e.hasClass("qodef-layout--masonry")},hasLoadMore:function(e){return e.hasClass("qodef-pagination-type--load-more")}};qodef.qodefFilter=s}(jQuery),function(d){"use strict";d(document).ready(function(){t.init()}),d(document).on("zoya_trigger_get_new_posts",function(){t.init()});var t={init:function(){var e=d(".qodef-layout--justified-gallery");e.length&&e.each(function(){t.setJustifyGallery(d(this))})},setJustifyGallery:function(e){var t=e.data("options"),i=e.children(".qodef-grid-inner"),o=void 0!==t.justified_gallery_row_height&&""!==t.justified_gallery_row_height?t.justified_gallery_row_height:150,n=void 0!==t.justified_gallery_row_height_max&&""!==t.justified_gallery_row_height_max&&t.justified_gallery_row_height_max,a=void 0!==t.space_value?2*t.space_value:0,s=void 0!==t.justified_gallery_treshold&&""!==t.justified_gallery_treshold?t.justified_gallery_treshold:.75;i.waitForImages(function(){"function"==typeof i.justifiedGallery&&i.justifiedGallery({captions:!1,rowHeight:o,maxRowHeight:n,margins:a,border:0,lastRow:"nojustify",justifyThreshold:s,selector:".qodef-grid-item"}).on("jg.complete jg.rowflush",function(){var t=d(this),i=!1;t.find(".qodef-grid-item").addClass("show").each(function(){var e=d(this);e.height(Math.round(e.height())),i||0!==e.width()||(t.height(t.height()-e.height()-a),i=!0)})}),e.addClass("qodef--justified-gallery-init")})}};qodef.qodefJustifiedGallery=t}(jQuery),function(t){"use strict";t(document).ready(function(){n.init()}),t(window).resize(function(){n.reInit()}),t(document).on("zoya_trigger_get_new_posts",function(e,t){t.hasClass("qodef-layout--masonry")&&n.init()});var n={init:function(e){this.holder=t(".qodef-layout--masonry"),t.extend(this.holder,e),this.holder.length&&this.holder.each(function(){n.createMasonry(t(this))})},reInit:function(e){this.holder=t(".qodef-layout--masonry"),t.extend(this.holder,e),this.holder.length&&this.holder.each(function(){var e=t(this).find(".qodef-grid-inner");"function"==typeof e.isotope&&e.isotope("layout")})},createMasonry:function(t){var i=t.find(".qodef-grid-inner"),o=i.find(".qodef-grid-item");i.waitForImages(function(){var e;"function"==typeof i.isotope&&(i.isotope({layoutMode:"packery",itemSelector:".qodef-grid-item",percentPosition:!0,masonry:{columnWidth:".qodef-grid-masonry-sizer",gutter:".qodef-grid-masonry-gutter"}}),t.hasClass("qodef-items--fixed")&&(e=n.getFixedImageSize(i,o),n.setFixedImageProportionSize(i,o,e)),i.isotope("layout")),i.addClass("qodef--masonry-init")})},getFixedImageSize:function(e,t){var i,o=e.find(".qodef-item--square");return o.length?(i=(o=o.find("img")).width())!==(o=o.height())?o:i:e.find(".qodef-grid-masonry-sizer").width()-2*parseInt(t.css("paddingLeft"),10)},setFixedImageProportionSize:function(e,t,i){var o=parseInt(t.css("paddingLeft"),10),n=(e.find(".qodef-item--square"),e.find(".qodef-item--landscape")),a=e.find(".qodef-item--portrait"),e=e.find(".qodef-item--huge-square"),s=qodef.windowWidth<=680;t.css("height",i),n.length&&n.css("height",Math.round(i/2)),a.length&&a.css("height",Math.round(2*(i+o))),s||(n.length&&n.css("height",i),e.length&&e.css("height",Math.round(2*(i+o))))}};qodef.qodefMasonryLayout=n}(jQuery),function(t){"use strict";t(document).ready(function(){i.init()});var i={init:function(){var e=t("#qodef-page-mobile-header");e.length&&(i.initMobileHeaderOpener(e),i.initDropDownMobileMenu())},initMobileHeaderOpener:function(e){var t,i=e.find(".qodef-mobile-header-opener");i.length&&(t=e.find(".qodef-mobile-header-navigation"),i.on("tap click",function(e){e.preventDefault(),t.is(":visible")?(t.slideUp(450),i.removeClass("qodef--opened")):(t.slideDown(450),i.addClass("qodef--opened"))}))},initDropDownMobileMenu:function(){var e=t(".qodef-mobile-header-navigation .menu-item-has-children > a");e.length&&e.each(function(){var o=t(this);o.on("tap click",function(e){e.preventDefault();var t,e=o.parent(),i=e.siblings(".menu-item-has-children");e.hasClass("menu-item-has-children")&&((t=e.find("ul.sub-menu").first()).is(":visible")?(t.slideUp(450),e.removeClass("qodef--opened")):(e.addClass("qodef--opened"),(0===i.length?e:e.siblings().removeClass("qodef--opened")).find(".sub-menu").slideUp(400,function(){t.slideDown(400)})))})})}}}(jQuery),function(a){a(document).ready(function(){e.init(),t.init()});var e={init:function(){var e=a(".qodef-header-navigation.qodef-header-navigation-initial > ul > li.qodef-menu-item--narrow.menu-item-has-children");e.length&&e.each(function(){var e,t=a(this),i=t.offset().left,o=t.find(" > ul"),n=o.outerWidth(),i=a(window).width()-i;0<t.find("li.menu-item-has-children").length&&(e=i-n),o.removeClass("qodef-drop-down--right"),(i<n||e<n)&&o.addClass("qodef-drop-down--right")})}},t={underlineAnimation:function(){var e=a("body:not(.qodef-header--divided) .qodef-header-navigation > ul ");e.length&&e.each(function(){var e,o=a(this),n=(o.append('<li class="qodef-main-menu-line"></li>'),o.find(".qodef-main-menu-line")),t=o.find("> li.menu-item");t.filter(".menu-item[class*=current-menu]").length?(e=t.filter(".menu-item[class*=current-menu]").offset().left,n.css("width",t.filter(".menu-item[class*=current-menu]").outerWidth())):(e=t.first().offset().left,n.css("width",t.first().outerWidth())),n.css("left",e-o.offset().left),t.mouseenter(function(){var e=a(this),t=e.outerWidth(),i=o.offset().left,e=e.offset().left-i;n.css("width",t),n.css("left",e)}),o.mouseleave(function(){t.filter(".menu-item[class*=current-menu]").length?n.css("width",t.filter(".menu-item[class*=current-menu]").outerWidth()):n.css("width",t.first().outerWidth()),n.css("left",e-o.offset().left)})})},init:function(){t.underlineAnimation()}}}(jQuery),function(a){"use strict";a(document).ready(function(){r.init()}),a(window).scroll(function(){r.scroll()}),a(document).on("zoya_trigger_load_more",function(e,t,i){r.triggerLoadMore(t,i)});var r={init:function(e){this.holder=a(".qodef-pagination--on"),a.extend(this.holder,e),this.holder.length&&this.holder.each(function(){var e=a(this);r.initPaginationType(e)})},scroll:function(e){this.holder=a(".qodef-pagination--on"),a.extend(this.holder,e),this.holder.length&&this.holder.each(function(){var e=a(this);e.hasClass("qodef-pagination-type--infinite-scroll")&&r.initInfiniteScroll(e)})},initPaginationType:function(e){e.hasClass("qodef-pagination-type--standard")?r.initStandard(e):e.hasClass("qodef-pagination-type--load-more")?r.initLoadMore(e):e.hasClass("qodef-pagination-type--infinite-scroll")&&r.initInfiniteScroll(e)},initStandard:function(i,e){var t,o=i.find(".qodef-m-pagination-items");o.length&&(t=i.data("options"),e=void 0!==e&&""!==e?parseInt(e,10):1,r.changeStandardState(i,t.max_pages_num,e),o.children().each(function(){var t=a(this);t.on("click",function(e){e.preventDefault(),t.hasClass("qodef--active")||r.getNewPosts(i,t.data("paged"))})}))},changeStandardState:function(e,t,i){var o,n,a,s,d;e.hasClass("qodef-pagination-type--standard")&&(o=(e=e.find(".qodef-m-pagination-items")).children(".qodef--number"),n=e.children(".qodef--prev"),a=e.children(".qodef--next"),s=e.children(".qodef--first"),d=e.children(".qodef--last"),r.standardPaginationVisibility(e,t),o.removeClass("qodef--active").eq(i-1).addClass("qodef--active"),n.data("paged",i-1),1<i?(n.show(),n.next().removeClass("qodef-prev--hidden")):(n.hide(),n.next().addClass("qodef-prev--hidden")),2<i?s.show():s.hide(),a.data("paged",i+1),i===t?a.hide():a.show(),i===t-1||i===t?d.hide():d.show())},standardPaginationVisibility:function(e,t){1===t?e.hide():1<t&&!e.is(":visible")&&e.show()},changeStandardHtml:function(e,t,i,o){var n,a;e.hasClass("qodef-pagination-type--standard")&&(n=e.find(".qodef-m-pagination"),a=e.find(".qodef-m-pagination-spinner"),r.standardPaginationVisibility(n,t),n.remove(),a.remove(),e.append(o),r.initStandard(e,i))},triggerStandardScrollAnimation:function(e){e.hasClass("qodef-pagination-type--standard")&&a("html, body").animate({scrollTop:e.offset().top-100},500)},initLoadMore:function(t){t.find(".qodef-load-more-button").on("click",function(e){e.preventDefault(),r.getNewPosts(t)})},triggerLoadMore:function(e,t){r.getNewPosts(e,t)},loadMoreButtonVisibility:function(e,t){e.hasClass("qodef-pagination-type--load-more")&&(t.next_page>t.max_pages_num||1===t.max_pages_num?e.find(".qodef-load-more-button").hide():1<t.max_pages_num&&t.next_page<=t.max_pages_num&&e.find(".qodef-load-more-button").show())},initInfiniteScroll:function(e){var t=e.outerHeight()+e.offset().top,i=qodef.scroll+qodef.windowHeight,o=e.data("options");!e.hasClass("qodef--loading")&&t<i&&o.max_pages_num>=o.next_page&&r.getNewPosts(e)},getNewPosts:function(t,i){t.addClass("qodef--loading");var o=t.children(".qodef-grid-inner"),n=t.data("options");r.setNextPageValue(n,i,!1),a.ajax({type:"GET",url:qodefGlobal.vars.restUrl+qodefGlobal.vars.paginationRestRoute,data:{options:n},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",qodefGlobal.vars.restNonce)},success:function(e){"success"===e.status?(n.max_pages_num!==e.data.max_pages_num&&(n.max_pages_num=e.data.max_pages_num),r.setNextPageValue(n,i,!0),r.changeStandardHtml(t,n.max_pages_num,i,e.data.pagination_html),o.waitForImages(function(){r.addPosts(o,e.data.html,i),r.reInitMasonryPosts(t,o),setTimeout(function(){qodef.body.trigger("zoya_trigger_get_new_posts",[t,e.data,i])},300)}),r.triggerStandardScrollAnimation(t),r.loadMoreButtonVisibility(t,n)):console.log(e.message)},complete:function(){setTimeout(function(){t.removeClass("qodef--loading")},50)}})},setNextPageValue:function(e,t,i){void 0===t||""===t||i?i&&(e.next_page=parseInt(e.next_page,10)+1):e.next_page=t},addPosts:function(e,t,i){void 0!==i&&""!==i?e.html(t):e.append(t)},reInitMasonryPosts:function(e,t){e.hasClass("qodef-layout--masonry")&&(t.isotope("reloadItems").isotope({sortBy:"original-order"}),setTimeout(function(){t.isotope("layout")},200))}};qodef.qodefPagination=r}(jQuery),function(r){"use strict";r(document).ready(function(){i.init(),e.init(),t.init(),o.init(),n.init()});var i={init:function(e){this.holder=[],this.holder.push({holder:r("#qodef-woo-page .woocommerce-ordering select"),options:{minimumResultsForSearch:1/0}}),this.holder.push({holder:r("#qodef-woo-page .variations select"),options:{minimumResultsForSearch:1/0}}),this.holder.push({holder:r("#qodef-woo-page #calc_shipping_country"),options:{}}),this.holder.push({holder:r("#qodef-woo-page .shipping select#calc_shipping_state"),options:{}}),this.holder.push({holder:r(".widget.widget_archive select"),options:{}}),this.holder.push({holder:r(".widget.widget_categories select"),options:{}}),this.holder.push({holder:r(".widget.widget_text select"),options:{}}),r.extend(this.holder,e),"object"==typeof this.holder&&r.each(this.holder,function(e,t){i.createSelect2(t.holder,t.options)})},createSelect2:function(e,t){"function"==typeof e.select2&&e.select2(t)}},e={init:function(){r(document).on("click",".qodef-quantity-minus, .qodef-quantity-plus",function(e){e.stopPropagation();var t,e=r(this),i=e.siblings(".qodef-quantity-input"),o=parseFloat(i.data("step")),n=parseFloat(i.data("max")),a=parseFloat(i.data("min")),s=!1,d="function"==typeof Number.isNaN&&Number.isNaN(parseFloat(i.val()))?a:parseFloat(i.val());(s=e.hasClass("qodef-quantity-minus")?!0:s)?a<=(t=d-o)?i.val(t):i.val(a):(t=d+o,void 0!==n&&n<=t?i.val(n):i.val(t)),i.trigger("change")})}},t={init:function(){var e;"object"==typeof qodef.qodefMagnificPopup&&(e=r(".qodef--single.qodef-magnific-popup.qodef-popup-gallery .woocommerce-product-gallery__image")).length&&(e.each(function(){r(this).children("a").attr("data-type","image").addClass("qodef-popup-item")}),qodef.qodefMagnificPopup.init())}},o=(qodef.qodefWooMagnificPopup=t,{init:function(){var e=r(".widget .wc-block-product-search");e.length&&e.each(function(){var e=r(this).find(".wc-block-product-search__label"),t=r(this).find(".wc-block-product-search__fields"),i=r(this).find(".wc-block-product-search__field"),o=r(this).find(".wc-block-product-search__button");e.length&&e.removeClass().addClass("qodef-search-form-label"),t.length&&t.removeClass().addClass("qodef-search-form-inner"),i.length&&i.removeClass().addClass("qodef-search-form-field"),o.length&&(o.removeClass().addClass("qodef-search-form-button qodef--button-inside qodef--has-icon"),o.html(qodefGlobal.vars.iconSearch))})}}),n={init:function(){var e=r("#qodef-woo-page.qodef--single").find(".wc-tabs");e.length&&n.animateBorder(e)},animateBorder:function(e){e.append("<span class='qodef-following-border'></span>");var t,i,o=r(".qodef-following-border");o.width(r(".active").width()).css("left",r(".active a").position().left).data("defaultLeft",o.position().left).data("defaultWidth",o.width()),r(".wc-tabs li a").hover(function(){i=r(this),t=i.position().left,i=i.parent().width(),o.stop().animate({left:t,width:i})},function(){o.stop().animate({left:o.data("defaultLeft"),width:o.data("defaultWidth")})}),r(".wc-tabs li a").on("click",function(){setTimeout(function(){o.width(r(".active").width()).css("left",r(".active a").position().left).data("defaultLeft",o.position().left).data("defaultWidth",o.width())},100)})}}}(jQuery);
Save File
Cancel