jQuery(document).ready(function(e){var s="is-active",t=e("#js-header");t.hasClass("l-header--fixed")&&e(window).scroll(function(){e(window).scrollTop()>0?t.addClass("is-active"):t.removeClass("is-active")}),e("#js-menu-btn").click(function(s){s.preventDefault(),e(this).toggleClass("is-active"),e("#js-global-nav").slideToggle()}),e(".sub-menu-toggle").click(function(){return e(this).toggleClass("is-active").parent("a").next(".sub-menu").slideToggle(),!1}),e("#js-blog-slider__inner").length&&e("#js-blog-slider__inner").slick({autoplay:!0,infinite:!0,slidesToShow:3,responsive:[{breakpoint:992,settings:{arrows:!1}},{breakpoint:768,settings:{arrows:!1,slidesToShow:2}}]});var a=e("#js-pagetop");if(e(window).scroll(function(){e(window).scrollTop()>100?a.addClass("is-active"):a.removeClass("is-active")}),e(".p-tab-panel").length&&e(".p-tab-panel").each(function(){var s=e(this);e(".p-tab-panel__tab-item:first",s).addClass("is-active"),e(".p-tab-panel__tab a",s).click(function(t){e(this).parent().hasClass("is-active")||(e(".is-active",s).removeClass("is-active"),e(this).parent().addClass("is-active"),e(".p-tab-panel__panel",s).hide(),e(e(this).attr("href")).show()),t.preventDefault()})}),e(".p-dropdown").length&&e(".p-dropdown__title").click(function(){e(this).toggleClass("is-active"),e("+ .p-dropdown__list:not(:animated)",this).slideToggle()}),e("#js-comment__tab").length){var i=e("#js-comment__tab");i.find("a").click(function(t){t.preventDefault(),e(this).parent().hasClass(s)||(e(e(".is-active a",i).attr("href")).animate({opacity:"hide"},0),e(".is-active",i).removeClass(s),e(this).parent().addClass(s),e(e(this).attr("href")).animate({opacity:"show"},1e3))})}e("#js-style-gallery-slider").length&&e("#js-style-gallery-nav .p-style__gallery-nav-img").click(function(){var s=e(this).index();e("#js-style-gallery-slider").slick("slickGoTo",parseInt(s))})
var searchWidgets=document.querySelectorAll('.widget_search #searchsubmit, .google_search #searchsubmit');
searchWidgets.forEach(function(searchWidget){
var wrapper=document.createElement('div');
wrapper.className='submit_button';
searchWidget.parentNode.insertBefore(wrapper, searchWidget);
wrapper.appendChild(searchWidget);
});
var calendarCells=document.querySelectorAll('.wp-calendar-table td');
calendarCells.forEach(function(cell){
if(cell.children.length===0){
cell.classList.add('no_link');
var span=document.createElement('span');
while (cell.firstChild){
span.appendChild(cell.firstChild);
}
cell.appendChild(span);
}else{
cell.classList.add('has_link');
}});
var textWidgets=document.querySelectorAll('.widget_text .textwidget');
textWidgets.forEach(function(textWidget){
textWidget.classList.add('p-entry__body');
});
var archiveSelects=document.querySelectorAll('.widget_archive select');
archiveSelects.forEach(function(select){
var wrapper=document.createElement('div');
wrapper.className='select_wrap';
select.parentNode.insertBefore(wrapper, select);
wrapper.appendChild(select);
});
var categoryForms=document.querySelectorAll('.widget_categories form');
categoryForms.forEach(function(form){
var wrapper=document.createElement('div');
wrapper.className='select_wrap';
form.parentNode.insertBefore(wrapper, form);
wrapper.appendChild(form);
});
});