// source --> https://www.jk-consulting.at/wp-content/themes/mentry/js/core.min.js?ver=de02204058f7a5551b1e00cf74dc4a3f 
"use strict";var themesion_sticky_header=function(){if(jQuery('.thsn-header-sticky-yes').length>0){var header_html=jQuery('#masthead .thsn-header-inner').html();jQuery('.thsn-sticky-header').append(header_html);jQuery('.thsn-sticky-header #menu-toggle').attr('id','menu-toggle2');jQuery('#menu-toggle2').on('click',function(){jQuery("#menu-toggle").trigger("click");});jQuery('.thsn-sticky-header .main-navigation ul, .thsn-sticky-header .main-navigation ul li, .thsn-sticky-header .main-navigation ul li a').removeAttr('id');jQuery('.thsn-sticky-header h1').each(function(){var thisele=jQuery(this);var thisele_class=jQuery(this).attr('class');thisele.replaceWith('<span class="'+thisele_class+'">'+jQuery(thisele).html()+'</span>');});if(jQuery('.site-header').hasClass('thsn-header-style-4')){jQuery(".thsn-sticky-header .thsn-header-menu").insertAfter(".thsn-sticky-header .site-branding");jQuery('.thsn-sticky-header .thsn-header-info, .thsn-sticky-header .thsn-mobile-search, .thsn-sticky-header .thsn-social-links , .thsn-header-style-4 .thsn-sticky-header .thsn-pre-header-wrapper ').remove();}}}
var thsn_sticky_header_class=function(){if(jQuery('#wpadminbar').length>0){jQuery('#masthead').addClass('thsn-adminbar-exists');}
var offset_px=40;if(jQuery('.thsn-header-inner').length>0){offset_px=jQuery('.thsn-header-inner').height()+offset_px;}
if(jQuery(window).scrollTop()>offset_px){jQuery('#masthead').addClass('thsn-fixed-header');jQuery('.thsn-sticky-header .mega-menu.max-mega-menu.mega-menu-horizontal').attr("id","mega-menu-themesion-top");}else{jQuery('#masthead').removeClass('thsn-fixed-header');}
jQuery(window).scroll(function(){if(jQuery(window).scrollTop()>offset_px){jQuery('#masthead').addClass('thsn-fixed-header');jQuery('.thsn-sticky-header .mega-menu.max-mega-menu.mega-menu-horizontal').attr("id","mega-menu-themesion-top");}else{jQuery('#masthead').removeClass('thsn-fixed-header');}});}
var thsn_toggleSidebar=function(){jQuery('#menu-toggle').on('click',function(){jQuery("body:not(.mega-menu-themesion-top) .thsn-navbar > div, body:not(.mega-menu-themesion-top)").toggleClass("active");})
if(jQuery('.thsn-navbar > div > .closepanel').length==0){jQuery('.thsn-navbar > div').append("<span class='closepanel'><i class='thsn-base-icon-cancel'></i></span>");jQuery('.thsn-navbar > div > .closepanel, .mega-menu-themesion-top .nav-menu-toggle').on('click',function(){jQuery(".thsn-navbar > div, body, .mega-menu-wrap").toggleClass("active");});return false;}}
var thsn_preloader=function(){jQuery(".thsn-preloader").fadeOut('600');}
var themesion_stretched_col_calc=function(){if(jQuery('.wpb_column.thsn-col-stretched-yes').length>0){var window_width=jQuery(window).width();var document_width=jQuery(document).width();jQuery('.wpb_column.thsn-col-stretched-yes').each(function(){var this_ele=jQuery(this);var main_width=jQuery('#main').width();var extra_width=((window_width-main_width)/2);var curr_width=jQuery('.wpb_wrapper',this_ele).width();var wrapper_div='';var minimum_width=0;var both_margin=false;if(this_ele.parent().hasClass('thsn-break-col-1200')){minimum_width=1200;}else if(this_ele.parent().hasClass('thsn-break-col-991')){minimum_width=991;}else if(this_ele.parent().hasClass('thsn-break-col-767')){minimum_width=767;}
if(minimum_width>0&&document_width<minimum_width){both_margin=true;}
if(this_ele.hasClass('thsn-col-stretched-right')){if(this_ele.hasClass('thsn-col-stretched-content-yes')){wrapper_div=', .vc_column-inner > .wpb_wrapper';}
jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-right','-'+extra_width+'px');if(both_margin==true){jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-left','-'+extra_width+'px');}else{jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-left','');}}else{if(this_ele.hasClass('thsn-col-stretched-content-yes')){wrapper_div=', .vc_column-inner > .wpb_wrapper';}
jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-left','-'+extra_width+'px');if(both_margin==true){jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-right','-'+extra_width+'px');}else{jQuery('.vc_column-inner > .thsn-stretched-div'+wrapper_div,this_ele).css('margin-right','');}}});}}
var thsn_wc_cart_page_qty_update=function(){if(typeof jQuery.fn.observe=="function"){jQuery('.wp-block-woocommerce-cart').observe('childlist subtree characterData',function(record){setTimeout(function(){thsn_wc_update_header_cart_total();},500);});jQuery('.wc-block-components-totals-wrapper').observe('childlist subtree characterData',function(record){setTimeout(function(){thsn_wc_update_header_cart_total();},500);});jQuery('.wc-block-components-quantity-selector__button--plus, .wc-block-components-quantity-selector__button--minus, .wc-block-cart-item__remove-link').on('click, mousedown',function(){setTimeout(function(){thsn_wc_update_header_cart_total();},500);});jQuery(".product-quantity .quantity input.input-text.qty, .wc-block-components-quantity-selector__input").on("input",function(){setTimeout(function(){thsn_wc_update_header_cart_total();},500);});}}
var thsn_wc_update_header_cart_total=function(){var total_qty=0;var total_amount='';var curent_qty=0;if(jQuery('table.wc-block-cart-items.wp-block-woocommerce-cart-line-items-block > tbody > tr').length>0){jQuery('table.wc-block-cart-items.wp-block-woocommerce-cart-line-items-block > tbody > tr').each(function(){curent_qty=parseInt(jQuery(this).find('input.wc-block-components-quantity-selector__input').val());total_qty=total_qty+curent_qty;});total_amount=jQuery('.wc-block-components-totals-footer-item-tax-value').html();}
jQuery('.thsn-cart-count').html(total_qty);jQuery('.thsn-cart-wrapper .woocommerce-Price-amount').html(total_amount);}
var thsn_preloader=function(){jQuery(".thsn-preloader").fadeOut('600');}
var thsn_sorting=function(){jQuery('.thsn-sortable-yes').each(function(){var boxes=jQuery('.thsn-element-posts-wrapper',this);var links=jQuery('.thsn-sortable-list a',this);boxes.isotope({animationEngine:'best-available'});links.on('click',function(e){var selector=jQuery(this).data('sortby');if(selector!='*'){var selector='.'+selector;}
boxes.isotope({filter:selector,itemSelector:'.thsn-ele',layoutMode:'fitRows'});links.removeClass('thsn-selected');jQuery(this).addClass('thsn-selected');e.preventDefault();});});}
var thsn_back_to_top=function(){var btn=jQuery('.scroll-to-top');jQuery(window).scroll(function(){if(jQuery(window).scrollTop()>300){btn.addClass('show');}else{btn.removeClass('show');}});btn.on('click',function(e){e.preventDefault();jQuery('html, body').animate({scrollTop:0},'300');});}
var thsn_navbar=function(){jQuery('.thsn-navbar > div > ul li:has(ul)').append("<span class='sub-menu-toggle'><i class='thsn-base-icon-down-open-big'></i></span>");jQuery('.thsn-navbar li').on('hover',function(){if(jQuery(this).children("ul").length==1){var parent=jQuery(this);var child_menu=jQuery(this).children("ul");if(jQuery(parent).offset().left+jQuery(parent).width()+jQuery(child_menu).width()>jQuery(window).width()){jQuery(child_menu).addClass('thsn-nav-left');}else{jQuery(child_menu).removeClass('thsn-nav-left');}}});jQuery('.sub-menu-toggle').on('click',function(){if(jQuery(this).siblings('.sub-menu, .children').hasClass('show')){jQuery(this).siblings('.sub-menu, .children').removeClass('show');jQuery('i',jQuery(this)).removeClass('thsn-base-icon-up-open-big').addClass('thsn-base-icon-down-open-big');}else{jQuery(this).siblings('.sub-menu, .children').addClass('show');jQuery('i',jQuery(this)).removeClass('thsn-base-icon-down-open-big').addClass('thsn-base-icon-up-open-big');}
return false;});}
var thsn_lightbox=function(){var i_type='image';jQuery('a.thsn-lightbox, a.thsn-lightbox-video, .thsn-lightbox-video a, .thsn-lightbox a').each(function(){if(jQuery(this).hasClass('thsn-lightbox-video')||jQuery(this).closest('.wpb_single_image').hasClass('thsn-lightbox-video')||jQuery(this).closest('.vc_icon_element').hasClass('thsn-lightbox-video')||jQuery(this).closest('.vc_btn3-container').hasClass('thsn-lightbox-video')){i_type='iframe';}else{i_type='image';}
jQuery(this).magnificPopup({type:i_type});});}
var thsn_video_popup=function(){jQuery('.thsn-popup').on('click',function(event){event.preventDefault();var href=jQuery(this).attr('href');var title=jQuery(this).attr('title');window.open(href,title,"width=600,height=500");});}
var thsn_testimonial=function(){jQuery('.thsn-testimonial-active').each(function(){var ele_parent=jQuery(this).closest('.thsn-element-posts-wrapper');jQuery('.themesion-ele.themesion-ele-testimonial',ele_parent).on('mouseover',function(){jQuery('.themesion-ele.themesion-ele-testimonial',ele_parent).removeClass('thsn-testimonial-active');jQuery(this).addClass('thsn-testimonial-active');});});}
var thsn_search_btn=function(){jQuery(function(){jQuery('.thsn-header-search-btn').on("click",function(event){event.preventDefault();jQuery(".thsn-header-search-form-wrapper").addClass("open");jQuery('.thsn-header-search-form-wrapper input[type="search"]').focus();});jQuery(".thsn-search-close").on("click keyup",function(event){jQuery(".thsn-header-search-form-wrapper").removeClass("open");});});}
var thsn_gallery=function(){jQuery("div.thsn-gallery").each(function(){jQuery(this).lightSlider({item:1,auto:true,loop:true,controls:false,speed:1500,pause:5500});});}
var thsn_validate=function(){jQuery("#commentform").submit(function(event){var error=false;jQuery('.thsn-form-error').hide();if(jQuery("#author").length>0&&!jQuery("#author").val()){jQuery('.comment-form-author .thsn-form-error').show();error=true;}
if(jQuery("#comment").length>0&&!jQuery("#comment").val()){jQuery('.comment-form-comment .thsn-form-error').show();error=true;}
if(jQuery("#email").length>0){if(!jQuery("#email").val()){jQuery('.comment-form-email .thsn-form-error.thsn-empty-email').show();error=true;}else{var valid_email=(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(jQuery("#email").val()));if(valid_email!=true){jQuery('.comment-form-email .thsn-form-error.thsn-invalid-email').show();error=true;}}}
if(error==true){event.preventDefault();return false;}else{return true;}});}
var thsn_tta_faq_click_solution=function(){jQuery(document).on('click','li.vc_tta-tab a,li.vc_tta-tab,.vc_tta-panel-title',function(){jQuery('html, body').stop();});};jQuery(window).resize(function(){setTimeout(function(){themesion_stretched_col_calc();},100);});jQuery(document).ready(function(){thsn_toggleSidebar();thsn_validate();thsn_sorting();themesion_stretched_col_calc();thsn_back_to_top();themesion_sticky_header();thsn_sticky_header_class();thsn_navbar();thsn_lightbox();thsn_video_popup();thsn_testimonial();thsn_search_btn();thsn_tta_faq_click_solution();});jQuery(window).on('load',function(){jQuery('#vc_templates-more-layouts').off('click').on('click',function(){window.top.thsn_call_custom_template();});thsn_preloader();thsn_sorting();thsn_gallery();setTimeout(function(){thsn_wc_cart_page_qty_update();},500);});