var custom = {
/*
** accordion function
**/
accordion: function () {
var opener = jQuery('.faq-article .faq-article__title');
jQuery('.faq-article .faq-article__text').slideUp();
opener.on("click", function () {
opener.next().slideUp();
opener.removeClass('active');
if (jQuery(this).next().is(':visible') == false) {
jQuery(this).addClass('active');
jQuery(this).next().slideDown();
}
});
},
/*
** SlickCarousel Function
**/
InitSlickCarousel: function () {
jQuery('.testimonial-slider').slick({
slidesToScroll: 1,
slidesToShow: 1,
rows: 0,
arrows: true,
draggable: true,
prevArrow: '',
nextArrow: ''
});
},
/*
** FooterAccordion Function
**/
FooterAccordion: function () {
jQuery('.footer-opener').next().css('display', 'block');
if(jQuery(window).width() < 768) {
jQuery('.footer-opener').next().css('display', 'none');
jQuery(".footer-opener").unbind("click");
jQuery(".footer-opener").bind("click", function () {
jQuery('.footer-opener').next().slideUp();
jQuery('.footer-opener').removeClass('active');
if (jQuery(this).next().is(':visible') == false) {
jQuery(this).addClass('active');
jQuery(this).next().slideDown();
}
});
}
},
/*
** Resize Effect Function
**/
ResizeEffect: function () {
jQuery(window).resize(function () {
custom.FooterAccordion();
});
},
styleDisableRemove:function(){
var disabledStyle = [ 'thrive-leadpops-style', 'duplicate-post', 'yoast-seo-adminbar','colorbox', 'contact-form-7', 'foobox-min', 'font-awsome',/*'fancybox',*/'dashicons', 'admin-bar', 'lp-child-style'];
setTimeout(function () {
jQuery.each(disabledStyle,function (index, value) {
jQuery('#'+value).attr('disabled',false);
if(value == 'admin-bar'){
jQuery('#wpadminbar').show();
}
})
},3000);
},
/*
** init function
**/
init: function() {
custom.styleDisableRemove();
custom.accordion();
custom.InitSlickCarousel();
custom.FooterAccordion();
custom.ResizeEffect();
}
}
jQuery(document).ready(function() {
custom.init();
var webp = new Image();
webp.onerror = function(){
jQuery('body').removeClass('webp')
jQuery('body').addClass('no-webp')
};
webp.onload = function(){
jQuery('body').removeClass('no-webp')
jQuery('body').addClass('webp')
};
webp.src = 'data:image/webp;base64,UklGRjIAAABXRUJQVlA4ICYAAACyAgCdASoBAAEALmk0mk0iIiIiIgBoSygABc6zbAAA/v56QAAAAA==';
});