AlkantarClanX12
Current Path : /home/thanudqk/128shen.com/wp-content/themes/darcie-light/assets/js/ |
Current File : /home/thanudqk/128shen.com/wp-content/themes/darcie-light/assets/js/functions.min.js |
!function(o){var e,n,t,a,s;function i(){910<=window.innerWidth?(o(document.body).on("touchstart.nusicBand",function(e){o(e.target).closest(".main-navigation li").length||o(".main-navigation li").removeClass("focus")}),e.find(".menu-item-has-children > a, .page_item_has_children > a").on("touchstart.nusicBand",function(e){var n=o(this).parent("li");n.hasClass("focus")||(e.preventDefault(),n.toggleClass("focus"),n.siblings(".focus").removeClass("focus"))})):e.find(".menu-item-has-children > a, .page_item_has_children > a").unbind("touchstart.nusicBand")}function r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}o(window).on("load.darcie resize.darcie",function(){var e;"function"==typeof o.fn.owlCarousel&&(e={rtl:!!darcieOptions.rtl,autoHeight:!0,margin:0,items:1,nav:!1,dots:!0,autoplay:!0,autoplayTimeout:4e3,loop:!0,responsive:{0:{items:1}},navText:[darcieOptions.iconNavPrev,darcieOptions.iconNavNext]},o(".main-slider").owlCarousel(e),e={rtl:!!darcieOptions.rtl,autoHeight:!0,margin:0,items:1,nav:!0,dots:!0,autoplay:!0,autoplayTimeout:4e3,loop:!0,center:!0,responsive:{0:{items:1},568:{items:2}},navText:[darcieOptions.iconTestimonialNavPrev,darcieOptions.iconTestimonialNavNext],dotsContainer:"#slider-dots",navContainer:"#slider-nav"},o(".testimonial-slider").owlCarousel(e)),"function"==typeof o.fn.masonry&&"function"==typeof o.fn.imagesLoaded&&(($blocks=o(".grid")).imagesLoaded(function(){$blocks.masonry({itemSelector:".grid-item",columnWidth:".grid-item",transitionDuration:"1s"}),o(".grid-item").fadeIn(),$blocks.find(".grid-item").animate({opacity:1})}),o(function(){setTimeout(function(){$blocks.masonry()},2e3)}),o(window).on("resize",function(){$blocks.masonry()}))}),o(document).on("wp-custom-header-video-loaded",function(){o("body").addClass("has-header-video")}),o(function(){o(document).ready(function(){var e;!0==((e=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI))&&(document.documentElement.className=document.documentElement.className.replace(/(\s*)no-svg(\s*)/,"$1svg$2"))})}),o(document).ready(function(){o(".search-toggle").on("click",function(){o(this).toggleClass("open"),o(this).attr("aria-expanded","false"===o(this).attr("aria-expanded")?"true":"false"),o(".search-wrapper").toggle(),o("body").toggleClass("search-wrapper-open"),o("#primary-search-wrapper").hasClass("is-open")&&setTimeout(function(){o(".search-inside-wrapper input.search-field")[0].focus()},500)}),o(".close-submit").on("click",function(){o("body").removeClass("search-wrapper-open")})}),n=o(".main-navigation"),t=o("<button />",{class:"dropdown-toggle","aria-expanded":!1}).append(darcieOptions.dropdownIcon).append(o("<span />",{class:"screen-reader-text",text:darcieOptions.screenReaderText.expand})),n.find(".menu-item-has-children > a, .page_item_has_children > a").after(t),n.find(".menu-item-has-children > a, .page_item_has_children > a").append(darcieOptions.dropdownIcon),n.find(".current-menu-ancestor > button").addClass("toggled-on"),n.find(".current-menu-ancestor > .sub-menu").addClass("toggled-on"),n.find(".menu-item-has-children, .page_item_has_children").attr("aria-haspopup","true"),n.find(".dropdown-toggle").on("click",function(e){var n=o(this),t=n.find(".screen-reader-text");e.preventDefault(),n.toggleClass("toggled-on"),n.next(".children, .sub-menu").toggleClass("toggled-on"),n.attr("aria-expanded","false"===n.attr("aria-expanded")?"true":"false"),t.text(t.text()===darcieOptions.screenReaderText.expand?darcieOptions.screenReaderText.collapse:darcieOptions.screenReaderText.expand)}),t=o("#masthead"),n=t.find(".menu-toggle"),t.find("#site-header-menu"),e=t.find("#site-navigation"),t=t.find("#social-navigation"),o(".below-site-header").prepend('<div class="overlay">'),s=0,n.length&&(n.on("click.nusicBand",function(){o(this).add(e).attr("aria-expanded","false"===o(this).add(e).attr("aria-expanded")?"true":"false")}),n.add(e).attr("aria-expanded","false"),n.add(t).attr("aria-expanded","false"),n.on("click.nusicBand",function(){var e=o(this).parents(".menu-wrapper"),e=(o(".menu-toggle").not(this).removeClass("selected"),o(".menu-wrapper").not(e).removeClass("is-open"),o(this).toggleClass("selected"),o(e).toggleClass("is-open"),o(e).hasClass("is-open")),n=o("#primary-search-wrapper").hasClass("is-open");e&&!jQuery("body").hasClass("menu-open")?(0===s&&(s=o("body").scrollTop()),o("body").addClass("menu-open")):e||(o("body").removeClass("menu-open"),o("body").scrollTop(s),s=0),n&&o("body").removeClass("menu-open")}),o(document).on("click touchstart",function(){o("body").removeClass("menu-open"),o(".menu-toggle").removeClass("selected"),o(".menu-wrapper").removeClass("is-open")}),o(".close-toggle").on("click touchstart",function(){return o("body").removeClass("menu-open"),o(".menu-toggle").removeClass("selected"),o(".menu-wrapper").removeClass("is-open"),!1}),a=document.getElementsByClassName("search-content")[0],document.addEventListener("click",function(e){a===e.target||a.contains(e.target)||o("body").removeClass("search-wrapper-open")}),o(".site-header-menu,.menu-toggle, .dropdown-toggle, .search-field, #site-navigation, #social-search-wrapper, #social-navigation .search-submit").on("click touchstart",function(e){e.stopPropagation()})),e.length&&e.children().length&&("ontouchstart"in window&&(o(window).on("resize.nusicBand",i),i()),e.find("a").on("focus.nusicBand blur.nusicBand",function(){o(this).parents(".menu-item").toggleClass("focus")})),o(document).ready(function(){o(".toggle-top").on("click",function(e){o(this).toggleClass("toggled-on")}),o("#search-toggle").on("click",function(){o("#header-menu-social, #share-toggle").removeClass("toggled-on"),o("#header-search-container").toggleClass("toggled-on")}),o("#share-toggle").on("click",function(e){e.stopPropagation(),o("#header-search-container, #search-toggle").removeClass("toggled-on"),o("#header-menu-social").toggleClass("toggled-on")})}),o("body").on("click touch",".scroll-down",function(e){var n=o(this).parents(".section, .custom-header").next().attr("class").split(" "),n=o("."+n[0]).offset().top;o("html, body").animate({scrollTop:n},1e3)}),jQuery(document).ready(function(){jQuery(document.body),jQuery(window).on("load.darcie resize.darcie",function(){window.innerWidth<1024&&jQuery("#primary-menu-wrapper").on("focusout",function(){var e=jQuery(this);setTimeout(function(){e.find(":focus").length||jQuery("#primary-menu-wrapper .menu-toggle").trigger("focus")},0)}),jQuery("#social-menu-wrapper .menu-inside-wrapper").on("focusout",function(){var e=jQuery(this);setTimeout(function(){e.find(":focus").length||jQuery("#share-toggle").trigger("focus")},0)}),jQuery("#primary-search-wrapper .menu-inside-wrapper").on("focusout",function(){var e=jQuery(this);setTimeout(function(){e.find(":focus").length||jQuery("#search-toggle").trigger("focus")},0)}),jQuery(".search-inside-wrapper").on("focusout",function(){var e=jQuery(this);setTimeout(function(){e.find(":focus").length||jQuery(".close-submit").trigger("focus")},0)})})}),1<o("#site-generator").children().size()&&(o("#site-generator").removeClass("one"),o("#site-generator").addClass("two")),o(".section-title, #contact-section .entry-title").html(function(){var e=o(this).text().trim().split(" "),n=e.pop();return e.join(" ")+(0<e.length?" <span class='title-two'>"+r(n)+"</span>":r(n))})}(jQuery);