').append($.parseHTML(html));var $newContent=$html.find('#Content');if($newContent.length){$content.replaceWith($newContent);if($('.mfn-sidemenu-tmpl').length){$('.mfn-sidemenu-tmpl').each(function(){let id=$(this).attr('id');$(this).replaceWith($html.find('#'+id));});}
if(method==='GET'){var newUrl=url+(url.indexOf('?')>-1?'&':'?')+data;window.history.replaceState({},'',newUrl);}}else{window.location.href=method==='GET'?(url+(url.indexOf('?')>-1?'&':'?')+data):url;}}).fail(function(){window.location.href=method==='GET'?(url+(url.indexOf('?')>-1?'&':'?')+data):url;}).always(function(){$form.find('input,select,button').prop('disabled',false);$('#Content').removeClass('is-loading');$form.find('button.mfn-btn').removeClass('loading disabled');$(document).trigger('mfn:ajax:refresh');});},slider:function(){mfnAdvancedFilters.form.find('.mfn-advanced-filters-slider').each(function(i,slider){let input=$(this).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input');let min=input.attr('min').length?input.attr('min'):'0';let max=input.attr('max').length?input.attr('max'):'500';let val=input.val().length?input.val():'';$(this).slider({step:1,min:parseFloat(min),max:parseFloat(max),range:"min",value:val,create:function(){$(this).find(".ui-slider-handle").append('
');$(this).find(".mfn-ui-tip").text($(this).slider("value"));},slide:function(event,ui){input.val(ui.value);if(!input.parent('.mfn-input-wrapper').hasClass('mfn-not-empty'))input.parent('.mfn-input-wrapper').addClass('mfn-not-empty');$(this).find(".mfn-ui-tip").text(ui.value);},stop:function(){input.trigger('change');}});});},slider_range:function(){mfnAdvancedFilters.form.find('.mfn-advanced-filters-range-slider').each(function(i,slider){let input_min=$(this).closest('.mfn-advanced-filters-slider-wrapper').find('input.mfn-ui-slider-input-min');let input_max=$(this).closest('.mfn-advanced-filters-slider-wrapper').find('input.mfn-ui-slider-input-max');let min=typeof input_min.attr('min')!='undefined'?input_min.attr('min'):'0';let max=typeof input_max.attr('max')!='undefined'?input_max.attr('max'):'500';let val_min=input_min.val().length?input_min.val():min;let val_max=input_max.val().length?input_max.val():max;$(this).slider({range:true,step:1,min:parseFloat(min),max:parseFloat(max),values:[parseFloat(val_min),parseFloat(val_max)],create:function(event,ui){$(this).find(".ui-slider-handle").append('
');$(this).find(".mfn-ui-tip").first().text(val_min);$(this).find(".mfn-ui-tip").last().text(val_max);},slide:function(event,ui){$(ui.handle).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input-min').val(ui.values[0]);$(ui.handle).closest('.mfn-form-row-wrapper').find('input.mfn-ui-slider-input-max').val(ui.values[1]);if(!$(ui.handle).closest('.mfn-form-row-wrapper').find('.mfn-input-wrapper').hasClass('mfn-not-empty'))$(ui.handle).closest('.mfn-form-row-wrapper').find('.mfn-input-wrapper').addClass('mfn-not-empty');$(ui.handle).find(".mfn-ui-tip").text(ui.value);},stop:function(){input_min.trigger('change');}});});}}
$(document).on('click','.mfn-gdpr-button',function(){var closeAnimation=$('.mfn-gdpr-button').attr('data-animation');var barAligment=$('#mfn-gdpr').attr('data-aligment');switch(true){case'none'===closeAnimation:$('#mfn-gdpr').css('display','none');break;case'fade'===closeAnimation:$('#mfn-gdpr').fadeOut(300);break;case'slide'===closeAnimation&&'top'===barAligment:$('#mfn-gdpr').slideUp(300);break;default:$('#mfn-gdpr').slideToggle(300);break;}
setTimeout(function(){$('#mfn-gdpr').removeClass('show');gdpr_set_cookie();},300);});function gdpr_set_cookie(){if(navigator.cookieEnabled){var cookieDays=$('.mfn-gdpr-button').attr('data-cookiedays')||365;var cookieDate=new Date();var cookieText='';cookieDate.setTime(cookieDate.getTime()+(cookieDays*24*60*60*1000));cookieText+="mfn-gdpr=1";cookieText+="; expires="+cookieDate.toUTCString()+';';cookieText+="; path="+mfn.home_url+'/';document.cookie=cookieText;}}
function gdpr(){if(document.cookie!==""){var cookies=document.cookie.split(/; */);for(var cookie of cookies){var[cookieName]=cookie.split("=");if(cookieName==='mfn-gdpr'){return;}}}
$('#mfn-gdpr').addClass('show');}
function infiniteScrollFunction(infiniteLoadContainer,infiniteLoadButton,scrollDirection){var screenHeight=document.body.clientHeight;if(infiniteLoadContainer.attr('data-attr')===$(infiniteLoadButton).attr('href')){return;}else if(scrollDirection==='down'){infiniteLoadContainer.attr('data-attr',$(infiniteLoadButton).attr('href'));infiniteLoadButton.click();setTimeout(function(){var heightAfterLoadDifference=(document.body.clientHeight-screenHeight);if(heightAfterLoadDifference<249){infiniteScrollFunction(infiniteLoadContainer,infiniteLoadButton,scrollDirection);}},500);}}
$('body').on('click',".table_of_content .toggle",function(e){e.preventDefault();if($('.table_of_content').hasClass('hide')){$('.table_of_content').removeClass('hide');$('.table_of_content_wrapper').slideDown({duration:400,always:function(){$('.table_of_content').removeClass('hide_on_start');}});}else{$('.table_of_content_wrapper').slideUp({duration:400});$('.table_of_content').addClass('hide');}});function tableContentAttachId(){const container=$('.table_of_content');let tags;let anchorNumber=0;let anchorDom=$('.table_of_content_wrapper').find('a');if(tags=container.attr('data-tags')){tags=tags.split(/[ ,]+/).join(',');let columns=$('#Content .mfn-builder-content .column_column, #Content .mfn-builder-content .column_post_content, #Content .mfn-builder-content .column_heading, #Content .mfn-builder-content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');if($('#Content .mfn-single-post-tmpl-builder .column_post_content').length){columns=$('#Content .mfn-single-post-tmpl-builder .column_post_content .column_column, #Content .mfn-single-post-tmpl-builder .column_post_content, #Content .mfn-single-post-tmpl-builder .column_post_content .column_heading, #Content .mfn-single-post-tmpl-builder .column_post_content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');}else if($('#Content .mfn-single-portfolio-tmpl-builder .column_post_content').length){columns=$('#Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_column, #Content .mfn-single-portfolio-tmpl-builder .column_post_content, #Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_heading, #Content .mfn-single-portfolio-tmpl-builder .column_post_content .column_fancy_heading, .the_content_wrapper:not(.is-elementor), .elementor-widget:not(.elementor-widget-mfn_table_of_contents)');}
$(columns).each((index,element)=>{let headingsNoticed=$(element).find(tags);$(headingsNoticed).each((index,element)=>{if($(element).attr('id')){const idSet='#'+$(element).attr('id');$(anchorDom[anchorNumber]).attr('href',idSet);}else{let id=$(anchorDom[anchorNumber]).attr('href');if(typeof id!=='undefined')$(element).attr('id',id.substr(1));}
anchorNumber++;})})}}
var offCanvasSidebar={init:function(){$(document).on('click','.mfn-off-canvas-switcher',function(e){e.preventDefault();if($('html').hasClass('mfn-ofcs-opened')){$('html').removeClass('mfn-ofcs-opened');}else{$('html').addClass('mfn-ofcs-opened');}});},mobile:function(){if($('.sidebar .widget-area').length&&$('body').hasClass('ofcs-mobile')){if(!$('.mfn-off-canvas-sidebar').length){$('body').append('
');}
if($('body').hasClass('woocommerce-shop')&&!$('.mfn-woo-filters-wrapper .mfn-off-canvas-switcher').length){$('.mfn-woo-filters-wrapper').append('
');}
var $ofcs=$('.mfn-off-canvas-sidebar .mfn-off-canvas-content-wrapper .mfn-off-canvas-content');$ofcs.empty();$('.sidebar .widget-area').each(function(){$ofcs.append($(this));});offCanvasSidebar.init();}}}
function alignHeights(){var i=0;if(!$('.mfn-align-heights').length)return;$('.mfn-align-heights').each(function(){var max=0;var newclass='mfn-align-cont-'+i;$(this).addClass(newclass);$("").appendTo("body");$("."+newclass+" .mfn-align-me").each(function(){if($(this).outerHeight()>max){max=$(this).outerHeight();}});$("").appendTo("body");i++;});}
$(window).on('debouncedresize',alignHeights);var headerMegamenu={init:function(){if($('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children').length){$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children > a').on('click',function(e){let href=$(this).attr('href');if(!$(this).parent('li').hasClass('mfn-li-childrens-show')){e.preventDefault();e.stopPropagation();$(this).siblings('ul').slideDown(300);$(this).parent('li').addClass('mfn-li-childrens-show');}else if(href==''||href=='#'){e.preventDefault();e.stopPropagation();$(this).siblings('ul').slideUp(300);$(this).parent('li').removeClass('mfn-li-childrens-show');}});}
if($('.column_megamenu_menu ul.mfn-mm-menu-horizontal.mfn-mm-submenu-on-click li').length){$('.column_megamenu_menu ul.mfn-mm-menu-horizontal.mfn-mm-submenu-on-click li > a').on('click',function(e){if($(this).closest('li').hasClass('menu-item-has-children')&&!$(this).closest('li').hasClass('mfn-li-hover')){e.preventDefault();e.stopPropagation();$(this).closest('li').addClass('mfn-li-hover');}});}
if($('ul.mfn-menu-submenu-on-hover li.mfn-menu-item-has-megamenu, li.mfn-theme-options-menu.mfn-menu-item-has-megamenu').length){$('ul.mfn-menu-submenu-on-hover li.mfn-menu-item-has-megamenu, li.mfn-theme-options-menu.mfn-menu-item-has-megamenu').on('mouseenter mousemove',function(){if($(this).find('.mfn-megamenu-full-width').length||$(this).find('.mfn-megamenu-grid').length){headerMegamenu.setLeft($(this));}});}
if($('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu').length){$('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu > a.mfn-menu-link').on('click',function(e){let href=$(this).attr('href');if($(this).closest('li').find('.mfn-megamenu-full-width').length||$(this).closest('li').find('.mfn-megamenu-grid').length){headerMegamenu.setLeft($(this).closest('li'));}
if(href==''||href=='#'){e.preventDefault();e.stopPropagation();if($(this).closest('li').hasClass('mfn-li-hover')){$(this).closest('li').removeClass('mfn-li-hover');$(document).unbind('click',headerTemplate.bindUnclick);$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');}else{$('ul.mfn-menu-submenu-on-click li.mfn-menu-item-has-megamenu.mfn-li-hover').removeClass('mfn-li-hover');$(this).closest('li').addClass('mfn-li-hover');$(document).bind('click',headerTemplate.bindUnclick);headerTemplate.animContentAddClass();}}else if(!$(this).closest('li').hasClass('mfn-li-hover')){e.preventDefault();e.stopPropagation();if(!$(this).closest('li.mfn-li-hover').length){$('.mfn-header-tmpl ul li.mfn-li-hover').removeClass('mfn-li-hover');}else if($(this).closest('li.mfn-li-hover').find('li.mfn-li-hover').length){$(this).closest('li.mfn-li-hover').find('li.mfn-li-hover').removeClass('mfn-li-hover');}
if(!$(this).closest('.mfn-megamenu-menu').length&&!$(this).closest('li.mfn-li-hover').length){if($('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show').length){$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show ul').slideUp();$('.mfn-megamenu-menu.mfn-mm-submenu-toggled li.menu-item-has-children.mfn-li-childrens-show').removeClass('mfn-li-childrens-show');}}
headerTemplate.animContentAddClass();$(this).parent('li').addClass('mfn-li-hover');$(document).bind('click',headerTemplate.bindUnclick);}
headerMegamenu.afterShow();});}},afterShow:function(){bannerBox.init();$(window).trigger('resize');},setLeft:function($li){var $mm=$li.find('.mfn-menu-item-megamenu');var left=$li.offset().left;$mm.css('width',$(window).width()+'px');$mm.css('left','-'+left+'px');$mm.addClass('mfn-mm-grid-set');}}
var footerTemplate={init:function(){if($('body').hasClass('mfn-footer-stick')){footerTemplate.isSticky();}
if($('body').hasClass('mfn-footer-sliding')||$('body').hasClass('mfn-footer-fixed')){setTimeout(footerTemplate.isSliding(),300);}
return;},isSticky:function(){var offsetTop=$('.mfn-footer-tmpl').offset().top+$('.mfn-footer-tmpl').outerHeight();if(offsetTop<$(window).height()){$('.mfn-footer-tmpl').addClass('is-sticky');}else{$('.mfn-footer-tmpl').removeClass('is-sticky');}},isSliding:function(){var footer=$('.mfn-footer-tmpl').outerHeight();$('#Content').css('margin-bottom',footer);}}
var bannerBox={init:function(){setTimeout(bannerBox.set,300);},set:function(){if($('body').hasClass('mfn-ui'))return;if(!$('.column_banner_box .hidden-desc').length)return;if($(".mfn-banner-box .last-visible-el").length){$(".mfn-banner-box .last-visible-el").removeClass('last-visible-el');$('.hidden-wrapper .hidden-desc').removeAttr('style');}
$(".mfn-banner-box").each(function(){if($(this).find('.hidden-desc').length){if($(this).find('.hidden-desc').prev().length)$(this).find('.hidden-desc').prev().addClass("last-visible-el");var hd_h=$(this).find('.hidden-wrapper').outerHeight();$(this).find('.hidden-desc').css({'--mfn-banner-box-height':hd_h+'px'});}});}};var mfn_hotspot={init:function(){if($(window).width()>=960){mfn_hotspot.hover();}else{mfn_hotspot.click();}},hover:function(e){$('.mfn-image-hotspot .hotspot-point').on('mouseenter',function(){$(this).addClass('is-active');}).on('mouseleave',function(){$(this).removeClass('is-active');});$('.mfn-image-hotspot').on('mouseleave',function(){$('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');});},click:function(){$('.mfn-image-hotspot .hotspot-point').on('click',function(){if($('.mfn-image-hotspot .hotspot-point.is-active').length)$('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');$(this).addClass('is-active');$(document).bind('click',mfn_hotspot.bindUnclick);})},bindUnclick:function(e){if(!$('.mfn-image-hotspot .hotspot-point').is(e.target)&&$('.mfn-image-hotspot .hotspot-point').has(e.target).length===0){if($('.mfn-image-hotspot .hotspot-point.is-active').length)$('.mfn-image-hotspot .hotspot-point.is-active').removeClass('is-active');$(document).unbind('click',mfn_hotspot.bindUnclick);}}};var headerTemplate={hasSticky:false,isMobile:false,offsetScroll:60,hasBodyOffset:false,height:0,type:'default',animContentOnHover:function(){if($('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu').hasClass('mfn-menu-submenu-on-hover')){$('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.mfn-menu-item-has-megamenu, .mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.menu-item-has-children').on('mouseenter mousemove',function(){headerTemplate.animContentAddClass();}).on('mouseenter',function(){$(window).trigger('resize');});}
$('.mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.mfn-menu-item-has-megamenu, .mfn-header-tmpl.mfn-header-main .mfn-header-menu.mfn-header-mainmenu.mfn-menu-submenu-on-hover > li.menu-item-has-children').on('mouseleave',function(){$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');});},animContentAddClass:function(){if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-blur')){$('body').addClass('mfn-content-blur');}else if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-gray')){$('body').addClass('mfn-content-gray');}else if($('.mfn-header-tmpl.mfn-header-main').hasClass('mfn-header-content-overlay')){$('body').addClass('mfn-content-overlay');}},openOnClick:function(){$(document).on('click','.mfn-header-tmpl .mfn-header-menu.mfn-menu-submenu-on-click li.menu-item-has-children > a.mfn-menu-link',function(e){let href=$(this).attr('href');if($(this).closest('li').find('.mfn-megamenu-full-width').length||$(this).closest('li').find('.mfn-megamenu-grid').length){headerMegamenu.setLeft($(this).closest('li'));}
if(href==''||href=='#'){e.preventDefault();e.stopPropagation();if($(this).closest('li').hasClass('mfn-li-hover')){$(this).closest('li').removeClass('mfn-li-hover');$(document).unbind('click',headerTemplate.bindUnclick);$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');}else{$(this).closest('li').siblings('li').removeClass('mfn-li-hover');$(this).closest('li').addClass('mfn-li-hover');$(document).bind('click',headerTemplate.bindUnclick);headerTemplate.animContentAddClass();}}else if(!$(this).closest('li').hasClass('mfn-li-hover')){e.preventDefault();e.stopPropagation();$(this).closest('li').siblings('li').removeClass('mfn-li-hover');headerTemplate.animContentAddClass();$(this).parent('li').addClass('mfn-li-hover');$(document).bind('click',headerTemplate.bindUnclick);}
$(window).trigger('resize')});},bindUnclick:function(e){var $li=$('.mfn-header-tmpl ul li.mfn-li-hover');if(!$li.is(e.target)&&!$li.find(e.target).length){$li.removeClass('mfn-li-hover');$('body').removeClass('mfn-content-gray mfn-content-blur mfn-content-overlay');$(document).unbind('click',headerTemplate.bindUnclick);}},closeable:function(){if($('body').hasClass('mfn-ui'))return;$('.mfn-header-tmpl .close-closeable-section').on('click',function(){var $section=$(this).closest('.mcb-section');$section.addClass('closeable-hidden').slideUp(300,function(){headerTemplate.resetOffset();headerTemplate.offset();});if(typeof $section.attr('data-close-days')!=='undefined'&&$section.attr('data-close-days')!='0'){var days=$section.attr('data-close-days');var uid=$section.attr('data-uid');var date=new Date();date.setTime(date.getTime()+(parseInt(days)*24*60*60*1000));var expires="; expires="+date.toGMTString();document.cookie="mfn_closed_section_"+uid+"=1"+expires+"; path=/"}});},resetOffset:function(){if(headerTemplate.type!='default'&&headerTemplate.hasBodyOffset){$('#Wrapper').css({'padding-top':$('.mfn-header-tmpl').outerHeight()});}},detectHover:function(){$('.mfn-header-tmpl .mfn-menu-submenu-on-hover .mfn-menu-item-has-megamenu.mfn-menu-li').on('mouseenter',function(){headerMegamenu.afterShow();});},offset:function(){if(headerTemplate.hasSticky&&!headerTemplate.isMobile)return;headerTemplate.offsetScroll=0;var _screen='default';if(headerTemplate.isMobile)_screen='header-mobile';$('.mfn-header-tmpl .mfn-'+_screen+'-section.hide-on-scroll:not(.closeable-hidden)').each(function(){headerTemplate.offsetScroll+=$(this).outerHeight();});},init:function(){headerTemplate.hasBodyOffset=false;if(!$('body').hasClass('mfn-ui')&&$('.mfn-header-tmpl').find('.section.closeable-active').length){$('.mfn-header-tmpl').find('.section.closeable-active').each(function(){if(headerTemplate.readcookie('mfn_closed_section_'+$(this).attr('data-uid'))||headerTemplate.readcookie('mfn_closed_section')==$(this).attr('data-uid')){$(this).remove();}else{$(this).removeClass('mfn-temporary-hidden');}});}
if($(window).width()<767&&$('.mfn-header-tmpl').hasClass('mfn-hasMobile')){headerTemplate.isMobile=true;headerTemplate.type=$('.mfn-header-tmpl').attr('data-mobile-type');if($('.mfn-header-tmpl').hasClass('mfn-mobile-header-body-offset')){headerTemplate.hasBodyOffset=true;}else{headerTemplate.hasBodyOffset=false;}}else{headerTemplate.isMobile=false;headerTemplate.type=$('.mfn-header-tmpl').attr('data-type');if($('.mfn-header-tmpl').hasClass('mfn-header-body-offset')){headerTemplate.hasBodyOffset=true;}else{headerTemplate.hasBodyOffset=false;}}
if($('.mfn-header-tmpl .mfn-menu-submenu-on-click:not(.initialized)').length){$('.mfn-header-tmpl .mfn-menu-submenu-on-click').addClass('initialized');headerTemplate.openOnClick();}
if($('.mfn-header-tmpl .mfn-menu-submenu-on-hover .mfn-menu-item-has-megamenu.mfn-menu-li').length){headerTemplate.detectHover();}
if($('.mfn-header-tmpl').hasClass('mfn-header-content-blur')||$('.mfn-header-tmpl').hasClass('mfn-header-content-gray')||$('.mfn-header-tmpl').hasClass('mfn-header-content-overlay')){headerTemplate.animContentOnHover();}
if($('.mfn-header-tmpl').hasClass('mfn-hasSticky')){headerTemplate.hasSticky=true;}else{headerTemplate.hasSticky=false;}
if($('body style.tmp-mfn-header-template').length)$('body style.tmp-mfn-header-template').remove();if($('.mfn-header-tmpl .close-closeable-section').length)headerTemplate.closeable();if($('body').hasClass('mfn-header-scrolled')&&!$('.mfn-builder-active').length)$('body').removeClass('mfn-header-scrolled');headerTemplate.getHeight();headerTemplate.offset();headerTemplate.scroll();if($(window).scrollTop()>10){$(window).trigger('scroll');}
if($('#wpadminbar').length){let admin_bar_h=$('#wpadminbar').outerHeight();if($('.mfn-header-tmpl.mfn-header-tmpl-fixed').length)$('.mfn-header-tmpl.mfn-header-tmpl-fixed').css({'margin-top':admin_bar_h});if($(window).width()<767&&$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').length)$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').css({'margin-top':admin_bar_h});}},scroll:function(){if($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-default')&&headerTemplate.hasSticky&&!headerTemplate.isMobile){$('body').append('');}
$(window).scroll(function(){var scrolled=$(this).scrollTop();var scroll_offset=headerTemplate.offsetScroll;if(headerTemplate.hasSticky&&!headerTemplate.isMobile)scroll_offset=headerTemplate.height;if(scrolled>scroll_offset){$('body').addClass('mfn-header-scrolled');if(($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-fixed')&&!headerTemplate.isMobile)||($('.mfn-header-tmpl').hasClass('mfn-mobile-header-tmpl-fixed')&&headerTemplate.isMobile)&&$('.mfn-header-tmpl .hide-on-scroll:not(.closeable-hidden)').length){if(headerTemplate.hasSticky&&!headerTemplate.isMobile){$('.mfn-header-tmpl').css({'top':0});}else{$('.mfn-header-tmpl').css({'top':'-'+headerTemplate.offsetScroll+'px'});}}}else{$('body').removeClass('mfn-header-scrolled');if(($('.mfn-header-tmpl').hasClass('mfn-header-tmpl-fixed')&&!headerTemplate.isMobile)||($('.mfn-header-tmpl').hasClass('mfn-mobile-header-tmpl-fixed')&&headerTemplate.isMobile)&&$('.mfn-header-tmpl .hide-on-scroll:not(.closeable-hidden)').length){$('.mfn-header-tmpl').css({'top':'-'+scrolled+'px'});}
if($('#wpadminbar').length){let admin_bar_h=$('#wpadminbar').outerHeight();if($('.mfn-header-tmpl.mfn-header-tmpl-fixed').length)$('.mfn-header-tmpl.mfn-header-tmpl-fixed').css({'margin-top':admin_bar_h});if($(window).width()<767&&$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').length)$('.mfn-header-tmpl.mfn-mobile-header-tmpl-fixed').css({'margin-top':admin_bar_h});}}});},getHeight:function(){headerTemplate.height=$('.mfn-header-tmpl').outerHeight();if(headerTemplate.type!='default'&&headerTemplate.hasBodyOffset){$('#Wrapper').css({'padding-top':headerTemplate.height});}else{$('#Wrapper').removeAttr('style');}
$('.mfn-header-tmpl').removeAttr('style');},readcookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i
');}else{icon.remove();}}else{wrapper.find('.mfn-read-more-hidden').addClass('showed').slideDown(500);wrapper.addClass('mfn-read-more-expanded');label.html(label2);if(icon2!=''){if(icon.length){icon.html('');}else{if(box.find('.mfn-icon-box').length){box.find('.mfn-icon-box').prepend('');}else{box.prepend('');}}}}
$(window).trigger('resize');setTimeout(function(){$(window).trigger('resize');},600);});}}
let mfnPopup={init:function(){if($('body').hasClass('elementor-editor-active'))return;$(document).on('click','.open-mfn-popup',function(e){e.preventDefault();let popup_id=$(this).attr('data-mfnpopup');if(popup_id=='popup_id_required'){alert('Popup ID id required');}else if(!$(popup_id).length){alert('We cannot find popup with inserted ID');}else{mfnPopup.showPopup($(popup_id));}});if(!$('body').hasClass('mfn-cookies-open'))mfnPopup.open();$(document).on('click','.exit-mfn-popup',function(e){e.preventDefault();let $popup=$(this).closest('.mfn-popup-tmpl');mfnPopup.hidePopup($popup);});},open:function(){if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-scroll').length)mfnPopup.showOnScroll();if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-start-delay').length)mfnPopup.showOnDelay();if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-exit').length)mfnPopup.showOnExit();if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-scroll-to-element').length)mfnPopup.showOnScrollToElement();if($('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-start').length)mfnPopup.showOnStart();},hidePopup:function($popup){if($popup.find('video').length)$popup.find('video').get(0).pause();if($popup.find('iframe').length){var popup_iframe=$popup.find('iframe')[0];var ifr_src=$(popup_iframe).attr('src');if(typeof ifr_src!='undefined'){if(ifr_src.includes('youtu'))popup_iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');if(ifr_src.includes('vimeo')){$(popup_iframe).attr('src',ifr_src);}}}
$popup.removeClass('mfn-popup-active');$('html').removeClass('mfn-popup-browser-scroll-disabled');if($('style.mfn-popup-tmpl-blur-'+$popup.attr('data-id')).length){$('style.mfn-popup-tmpl-blur-'+$popup.attr('data-id')).remove();}
if($popup.hasClass('mfn-popup-tmpl-display-cookie-based')||$popup.hasClass('mfn-popup-tmpl-display-one')){let days=365;if($popup.hasClass('mfn-popup-tmpl-display-cookie-based'))days=parseInt($popup.attr('data-cookie'));let cookie_name='mfn_popup_'+$popup.attr('data-id');mfnPopup.addCookie(days,cookie_name);}},showPopup:function($popup){let cookie_name='mfn_popup_'+$popup.attr('data-id');if(mfnPopup.checkCookie(cookie_name))return;if(typeof $popup.attr('data-blur')!=='undefined'){$('body').append('');}
if(!$popup.hasClass('mfn-popup-active'))$popup.addClass('mfn-popup-active mfn-popup-showed');if($popup.hasClass('mfn-popup-tmpl-hide-automatically-delay'))mfnPopup.hideAutomatically($popup);if($popup.hasClass('mfn-popup-tmpl-close-button-show-delay'))mfnPopup.showExitButton($popup);if(!$('body').hasClass('mfn-ui')&&$popup.hasClass('mfn-popup-close-on-overlay-click')){$popup.bind('click',mfnPopup.closeOverlayClick);}
if(!$popup.hasClass('mfn-popup-browser-scroll-enabled')){$('html').addClass('mfn-popup-browser-scroll-disabled');}
bannerBox.set();if($popup.find('.slick-initialized').length){$popup.find('.slick-initialized').slick('refresh');}
$(document).trigger('mfnPopupInit');},closeOverlayClick:function(e){var div=$(e.delegateTarget).find('.mfn-popup-tmpl-content-wrapper');if(!div.is(e.target)&&div.has(e.target).length===0){mfnPopup.hidePopup($(e.delegateTarget));$(e.delegateTarget).unbind('click',mfnPopup.closeOverlayClick);}},hideAutomatically:function($popup){if($('body').hasClass('mfn-ui'))return;let delay=parseInt($popup.attr('data-hidedelay'));setTimeout(function(){mfnPopup.hidePopup($popup);},delay);},showExitButton:function($popup){let delay=parseInt($popup.attr('data-closebuttondelay'));setTimeout(function(){$popup.addClass('mfn-closebutton-active');},delay);},showOnScroll:function(){$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-scroll').each(function(){let $popup=$(this);let scroll_offset=parseInt($popup.attr('data-display'));$(window).on('scroll',function(){if($(window).scrollTop()>scroll_offset&&!$popup.hasClass('mfn-popup-showed'))mfnPopup.showPopup($popup);});});},showOnScrollToElement:function(){$('body').imagesLoaded(function(){$('.mfn-popup-tmpl.mfn-popup-tmpl-display-scroll-to-element').each(function(){let $popup=$(this);let scroll_offset=$($popup.attr('data-display')).length?parseInt($($popup.attr('data-display')).offset().top):100;$(window).on('scroll',function(){if($(window).scrollTop()>scroll_offset&&!$popup.hasClass('mfn-popup-showed'))mfnPopup.showPopup($popup);});});});},showOnDelay:function(){$('.mfn-popup-tmpl.mfn-popup-tmpl-display-start-delay').each(function(){let $popup=$(this);let delay=parseInt($popup.attr('data-display'));setTimeout(function(){mfnPopup.showPopup($popup)},delay);});},showOnExit:function(){$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-exit').each(function(){let $popup=$(this);$(document).on('mouseleave',function(){mfnPopup.showPopup($popup)});});},showOnStart:function(){$('.mfn-popup-tmpl.mfn-popup-tmpl-display-on-start').each(function(){let $popup=$(this);mfnPopup.showPopup($popup)});},addCookie(days,cookie_name){let date=new Date();date.setTime(date.getTime()+(parseInt(days)*24*60*60*1000));let expires="; expires="+date.toGMTString();document.cookie=cookie_name+"=true"+expires+"; path=/";},checkCookie(cookie_name){var nameEQ=cookie_name+"=";var ca=document.cookie.split(';');for(var i=0;i