var Codevz=(function($){"use strict";var wind=$(window),body=$(document.body),page=$('html, body'),inla=$('.inner_layout').length?$('.inner_layout'):body;$.extend($.easing,{def:'easeInOutCodevz',easeInOutCodevz:function(x){return x===0?0:x===1?1:x<0.5?Math.pow(2,20*x-10)/2:(2-Math.pow(2,-20*x+10))/2;}});if(!$.fn.codevz){$.fn.codevz=function(data,callback){if($(this).length){var $this=$(this),run=function(e){var l=e.length,i=0;for(i;i=docViewTop-offset));},init:function(){if(!body.hasClass('xtra-no-fade')){setTimeout(function(){body.animate({opacity:1},200);},400);} $('div[class*="cz_row_shape_"]').codevz('row_shape',function(x){Codevz.heightChanged(x,function(){var cls='.'+(x.attr('class')||'').replace(/ | /g,'.'),hei=x.height()+37;!x.find('> style').length&&x.append('');x.find('> style').html(cls+' .row:before,'+cls+' .row:after{width:'+hei+'px}.elms_row '+cls+':before, .elms_row '+cls+':after{width:'+hei+'px}');});});body.on('click','.xtra-social-icon-trigger',function(){var x=$(this),box=x.next('.xtra-social-dropdown');if(box.length){if(box.is(':visible')){box.fadeOut('fast');}else{box.fadeIn('fast');}}}).on('click',function(e){if($(e.target).closest('.cz_elm').length){return;} $('.xtra-social-dropdown').fadeOut('fast');});var alignFull=$('.alignfull'),headerLine=$('.header_line_1'),fixedFooter=$('.cz_fixed_footer'),videos=$('.cz_iframe, .content iframe, object, embed').not('.wp-embedded-content'),timeout;wind.on('resize.xtra',function(){clearTimeout(timeout);timeout=setTimeout(function(){var wind_width=wind.width();alignFull.length&&alignFull.each(function(i,x){var x=$(x),inla_width=x.parent().width(),from_left=((wind_width-inla_width)/2);x.css({width:wind_width,left:-from_left});});fixedFooter.length&&body.css('margin-bottom',fixedFooter.height());videos.length&&videos.each(function(i,x,w){x=$(x);x.attr('data-aspectRatio',x.height()/x.width()).removeAttr('height width');w=x.parent().width();x.width(w).height(w*x.attr('data-aspectRatio'));});},1000);}).trigger('resize.xtra');setTimeout(function(){headerLine.codevz('full_line',function(x){Codevz.heightChanged(x.closest('.row'),function(){x.css('height','0px');setTimeout(function(){x.css('height',x.closest('.row').height());},10);});});},body.hasClass('elementor-editor-active')?3000:1500);$('.cz_default_loop_grid').closest('.cz_posts_container').codevz('dlg_equal',function(x){x.addClass('cz_posts_equal');});$('.widget_nav_menu .menu-item-has-children > a').codevz('wnmi',function(x){if(!x.find('.fa-angle-down').length){x.append('');}});body.on('click','.widget_nav_menu .menu-item-has-children > a > i',function(e){$(this).toggleClass('fa-angle-down fa-angle-up').closest('li').find('> ul').slideToggle();e.preventDefault();}).on('mouseenter','.sf-menu .menu-item-has-children',function(){var dropdown=$(this).find('> ul').removeClass('cz_open_menu_reverse'),isVisible=dropdown.offset().left+dropdown.width()<=inla.width();dropdown[isVisible?'removeClass':'addClass']('cz_open_menu_reverse');});$('.sf-menu').each(function(i){var x=$(this),indicator=x.data('indicator')||(x.hasClass('offcanvas_menu')?'fa fa-angle-down':''),indicator2=x.data('indicator2')||(x.hasClass('offcanvas_menu')?'fa fa-angle-down':'');x.codevzMenu({onInit:function(){$('.sub-menu',this).parent().each(function(){var en=$(this),a=en.find('> a, > h6');if(!a.find('.cz_indicator').length){if($('.cz_menu_subtitle',a).length){$('.cz_menu_subtitle',a).before('');}else{a.append('');}} if(indicator||indicator2){$('.cz_indicator',a).addClass(a.closest('.sub-menu').length?indicator2:indicator);} if(!en.find('li, div').length){en.find('.cz_indicator').remove();en.next('ul').remove();} !en.attr('href')&&en.removeClass('current_menu');en.find('.current_menu').length&&setTimeout(function(){en.addClass('current_menu');},250);});if(x.find('.current_menu ul > .current-menu-item').length){x.find('.current_menu ul > .current-menu-item').siblings().removeClass('current_menu');}else if(!x.find('.current_menu').length&&x.find('.current-page-ancestor, .current-post-ancestor, .current-menu-item').length){$(x.find('.current-page-ancestor, .current-post-ancestor, .current-menu-item')[0]).addClass('current_menu');} if(x.not('#menu_header_4, #menu_fixed_side_1, .cz-not-three-dots').length){if(x.parent().parent().find('.cz_elm').length==1){x.parent().parent().append('
 
');} wind.on('resize.responsive',function(){var en=x,parent=en.parent(),elementor=en.closest('.elementor-container'),menu_margin=parseFloat(parent.css('margin-left'))+parseFloat(parent.css('margin-right')),elements=0,container,three_dots=(body.attr('class').indexOf('codevz-plus')>=0)?'':'...';setTimeout(function(){en.append(en.find('.cz-extra-menus > .sub-menu > li')).find('.cz-extra-menus').remove();if(!en.find('.cz-extra-menus').length){var submenu_title=$('.cz_menu_subtitle').text()?' ':'';en.append('
  • ');} var nw=en.find('.cz-extra-menus'),nw_ul=nw.find('> ul');nw.hide().prev().addClass('cz-last-child');en.parent().parent().find('.cz_elm').not(parent).each(function(){elements+=$(this).outerWidth()+parseFloat($(this).css('margin-left'))+parseFloat($(this).css('margin-right'));});nw_ul.find('> li').appendTo(en);$(en.find('> li').not('.cz-extra-menus').get().reverse()).each(function(){if(elementor.length){container=elementor.outerWidth();}else{container=en.closest('.have_center').length?parent.parent().parent().outerWidth():parent.parent().outerWidth();} if((parent.outerWidth()+menu_margin)+elements+(elementor?0:25)>container){$(this).prependTo(nw_ul);nw.show();}});},1000);}).trigger('resize.responsive');}},onBeforeShow:function(){var x=$(this);if(x.hasClass('sub-menu')){if(x.parent().hasClass('cz_megamenu_width_fullwide')){var megamenu_row=body,megamenu_row_offset=megamenu_row.offset().left,megamenu_row_width=megamenu_row.width();x.attr('style',x.attr('style')+'width: '+wind.width()+'px;left:'+(megamenu_row_offset-x.parent().offset().left)+'px;margin-right:0;margin-left:0;right:auto !important;');} if(x.parent().data('sub-menu')){setTimeout(function(){x.attr('style',x.attr('style')+x.parent().data('sub-menu'));},50);} if(x.parent().hasClass('cz_parent_megamenu')){x.addClass('cz_megamenu_'+$('> .cz',x).length).find('ul').addClass('cz_megamenu_inner_ul clr');} if(x.parent().hasClass('cz_megamenu_width_full_row')){var megamenu_row=$('.row'),megamenu_row_offset=megamenu_row.offset().left,megamenu_row_width=megamenu_row.width();if(x.closest('.cz-extra-menus').length){megamenu_row_width=megamenu_row_width-(megamenu_row.width()-x.parent().offset().left+10);} x.attr('style',x.attr('style')+'width: '+megamenu_row_width+'px;left:'+(megamenu_row_offset-x.parent().offset().left)+'px;');}} if(x.closest('.fixed_side').length){var pwidth=x.parent().closest('.sub-menu').length?'.sub-menu':'.sf-menu',ff_pos=$('.fixed_side').hasClass('fixed_side_left')?'left':'right';x.css(ff_pos,x.closest(pwidth).width());} setTimeout(function(){wind.trigger('scroll.lazyload');if(x.find('.slick').length){wind.trigger('resize.slick');}},200);}});});$('i.icon_mobile_offcanvas_menu').removeClass('hide');body.on('click','.icon_dropdown_menu',function(e){var x=$(this),pos=x.position(),nav=x.parent().find('.sf-menu'),row=$(this).closest('.row').height(),offset=((inla.outerWidth()+inla.offset().left)-x.offset().left);nav.fadeToggle('fast');body.on('click.cz_idm',function(e){nav.fadeOut('fast');body.off('click.cz_idm');});$('.cz',nav).on('mouseenter mouseleave',function(e){e.stopPropagation();}).off('click').on('click',function(e){if($(e.target).hasClass('cz_indicator')){$(this).closest('li').find('> ul').fadeToggle('fast');e.preventDefault();e.stopPropagation();}});e.stopPropagation();}).on('click','.icon_open_horizontal',function(e){var x=$(this),pos=x.position(),nav=x.parent().find('.sf-menu'),row=$(this).closest('.row').height(),offset=((inla.outerWidth()+inla.offset().left)-x.offset().left);nav.fadeToggle('fast');Codevz.showOneByOne($('> .cz',nav),100,(nav.hasClass('inview_left')?'left':'right'));body.on('click.cz_ioh',function(e){nav.fadeOut('fast');body.off('click.cz_ioh');});e.stopPropagation();}).on('click','i.icon_mobile_offcanvas_menu',function(){var x=$(this);if(!x.hasClass('done')){Codevz.offCanvas(x.addClass('done'),1);var ul_offcanvas=$('ul.offcanvas_area'),indicator=ul_offcanvas.data('indicator'),default_ind=ul_offcanvas.hasClass('offcanvas_menu')?'fa fa-angle-down':'',indicator=indicator?indicator:default_ind,indicator2=ul_offcanvas.data('indicator2'),indicator2=indicator2?indicator2:default_ind,additional=x.parent().find('.xtra-mobile-menu-additional');additional.length&&ul_offcanvas.append('
  • '+additional.html()+'
  • ');if(indicator.length||indicator2.length){x.next('.sf-menu').find('.sf-with-ul').each(function(){$('.cz_indicator',this).addClass((x.parent().parent().hasClass('sf-menu')?indicator:indicator2));});} $('.sf-with-ul, .cz > h6',ul_offcanvas).on('click',function(e){if($(e.target).hasClass('cz_indicator')||$(e.target).attr('href')=='#'){$(this).next().slideToggle('fast');e.preventDefault();}});}}).on('click','.offcanvas_container > i',function(){var x=$(this);if(!x.hasClass('done')){Codevz.offCanvas(x.addClass('done'),1);}}).on('click','.icon_fullscreen_menu',function(e){var x=$('.fullscreen_menu');body.addClass('cz_noStickySidebar').find('.fixed_side_1.have_center').find('.fullscreen_menu,.xtra-close-icon').appendTo('.fixed_side_1.have_center');x.fadeIn('fast').on('click',function(){$(this).delay(500).fadeOut('fast',function(){body.removeClass('cz_noStickySidebar');$('.xtra-close-icon').addClass('hide');page.removeClass('no-scroll');});});if(x.is(':visible')){page.addClass('no-scroll');Codevz.showOneByOne($('> .cz',x),150);} var h=x.find('> li').height()*((x.find('> li').length-1)/2);x.css('padding-top',((wind.height()/2)-h));$('.xtra-close-icon').toggleClass('hide').off().on('click',function(){$(this).addClass('hide');x.fadeOut('fast');page.removeClass('no-scroll');});}).on('mouseenter mouseleave','ul.fullscreen_menu .cz',function(e){e.stopPropagation();}).on('click','ul.fullscreen_menu .cz',function(e){if($(e.target).hasClass('cz_indicator')){$(this).closest('li').find('> ul').fadeToggle('fast');e.preventDefault();e.stopPropagation();}}).on('click','.hf_elm_icon',function(e){var x=$(this);x.next('.hf_elm_area').slideToggle('fast').css({width:inla.outerWidth(),left:inla.offset().left,top:x.offset().top+x.outerHeight()});body.on('click.cz_hf_elm',function(e){$('.hf_elm_area').slideUp('fast');body.off('click.cz_hf_elm');});e.preventDefault();e.stopPropagation();});$('.tagcloud').addClass('clr');$('.form-submit .submit, input.search-submit, .wpcf7-submit').codevz('button',function(){var x=$(this);$('').insertAfter(x);x.detach();});$('.xtra-post-views').codevz('post_views',function(){var x=$(this);$.ajax({type:"GET",url:body.data('ajax')||ajaxurl,dataType:'html',data:"action=codevz_ajax_post_views&id="+x.attr('data-id')+"&nonce="+x.attr('data-nonce'),success:function(data){console.log(data);},error:function(xhr,status,error){console.log(xhr,status,error);}});});this.menu_anchor();},menu_anchor:function(){if(typeof elementorFrontend!='undefined'){setTimeout(function(){elementorFrontend.elements.$document.off('click',elementorFrontend.utils.anchors.getSettings('selectors.links'),elementorFrontend.utils.anchors.handleAnchorLinks);},500);} $("a[href='#']").not('a[target="_blank"]').on('click.prevent_jump',function(e){e.preventDefault();});var aBar=body.hasClass('admin-bar')?32:0,mLink=$("a[href*='#']").not("a[href='#'],a[target='_blank'],a[href*='#/']"),sticky=$('.header_is_sticky').not('.smart_sticky, .header_4'),scrollTop=0,timeout,scrollToAnchor=function(target){clearTimeout(timeout);timeout=setTimeout(function(){target=target.replace('%20',' ');target=(target.indexOf('#')>=0)?$(target):$('#'+target);if(target.length&&!target.hasClass('cz_popup_modal')){scrollTop=$(document).scrollTop();if(wind.width()<768&&$('.header_4.header_is_sticky').length){sticky=$('.header_4.header_is_sticky').not('.smart_sticky');} if(scrollTop==0&&sticky.length){$(document).scrollTop(1);} setTimeout(function(){page.animate({scrollTop:target.offset().top-aBar-(sticky.outerHeight()||0)},1200,'easeInOutCodevz',function(){page.stop();});$('.offcanvas-close').trigger('click');},scrollTop==0?450:1);}},50);};var target=window.location.hash;if(target){target=target.replace('#','').replace('%20',' ');if($('#'+target).length){page.animate({scrollTop:0},1);setTimeout(function(){scrollToAnchor(target);},1500);}} if(mLink.length){mLink.off('click.anchor').on('click.anchor',function(e){if($(this).not('a[href*="#top"],[data-tab],.cz_popup_modal,.cz_no_anchor,.cz_no_anchor a, .vc_general, .cz_no_anchor a, .cz_lrpr a, .wc-tabs a, .cz_edit_popup_link, .page-numbers a, #cancel-comment-reply-link, .vc_carousel-control, [data-vc-container],.comment-form-rating a,.sm2-bar-ui a,.lwptoc a').length){if(!$(e.target).hasClass('cz_indicator')){if($(this.hash).length&&location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){scrollToAnchor(this.hash);}else if(this.hash){location=$(this).attr('href');}} e.preventDefault();}});var mPage=$('.sf-menu'),mPageH=mPage.outerHeight()+15,mItems=mPage.find("a[href*='#']").not("a[href='#'],a[href*='#/']"),sItems=mItems.map(function(){var item=$($(this).attr("href").replace(/\s+|%20/g,"").replace(/^.*\#(.*)$/g,"#$1"));if(item.length){return item;}});wind.on('scroll.anchor',function(){clearTimeout(timeout);timeout=setTimeout(function(){var ft=$(this).scrollTop()+mPageH+aBar+(sticky.outerHeight()||0),cur=sItems.map(function(){if($(this).offset().top=0){area.before('');}else{area.before('');} close=area.prev('.offcanvas-close');close.on('click',function(e){if(click){body.removeClass('active_offcanvas');area.removeClass('active_offcanvas');overlay.fadeOut();setTimeout(function(){$('.offcanvas-close').detach();wind.trigger('resize');page.removeClass('no-scroll');},500);click=0;}else{overlay.trigger('click');}});close.css((isRight?'right':'left'),area.outerWidth()+fixed_side);body.addClass('offcanvas_doing active_offcanvas'+(isRight?' cz_offcanvas_right':' cz_offcanvas_left'));area.addClass('active_offcanvas');if(wind.width()>768){if(($('.fixed_side_left').length&&$('.cz_offcanvas_left').length)||$('.fixed_side_right').length&&$('.cz_offcanvas_right').length){if(!$('#cz_ofs').length){$('head').append('');} fixed_side=$('.fixed_side').width();$('#cz_ofs').html('.active_offcanvas .offcanvas_area.active_offcanvas{transform:translateX('+(isRight?'-':'')+fixed_side+'px)}');}} overlay.fadeIn();setTimeout(function(){body.removeClass('offcanvas_doing');},1250);} e.stopPropagation();});if(click){selector.trigger('click');} area.on('click',function(e){e.stopPropagation();});this.menu_anchor();overlay.on('click',function(e){if($('.active_offcanvas').length&&!body.hasClass('offcanvas_doing')){body.removeClass('active_offcanvas');area.removeClass('active_offcanvas');overlay.fadeOut();setTimeout(function(){$('.offcanvas-close').detach();wind.trigger('resize');page.removeClass('no-scroll');},500);} setTimeout(function(){if(!overlay.is(':visible')&&$('.active_offcanvas').length){$('.offcanvas-close').trigger('click');page.removeClass('no-scroll');}},500);});wind.on('resize.offcanvas_close',function(e){clearTimeout(timeout);timeout=setTimeout(function(){var mh4=$('#menu_header_4');if(mh4.hasClass('active_offcanvas')&&wind.width()>768){mh4.prev('i').trigger('click');}},50);});if(!area.hasClass('xtra-reload-js')){area.find('.cz a').on('click',function(e){if($(e.target).hasClass('cz_indicator')){var en=$(this);en.attr('data-href',en.attr('href')).attr('href','#');setTimeout(function(){en.attr('href',en.attr('data-href'));},250);}});if(typeof Codevz_Plus!='undefined'){Codevz_Plus.init();if(typeof Codevz_Plus.working_hours!='undefined'){Codevz_Plus.working_hours();}} setTimeout(function(){$(window).trigger('scroll.lazyload');area.find('[data-src]').each(function(){$(this).attr('src',$(this).data('src')).removeAttr('data-src');});area.find('.cz_tooltip').removeClass('cz_tooltip_down cz_tooltip_right cz_tooltip_left').addClass('cz_tooltip_up');},500);if(typeof wpcf7!='undefined'&&area.find('.wpcf7').length){area.find('div.wpcf7 > form').each(function(){var $this=$(this);if($.fn.initForm){wpcf7.initForm($this);if(wpcf7.cached){wpcf7.refill($this);}}});} setTimeout(function(){if(window.FB){FB.XFBML.parse();}},2000);area.addClass('xtra-reload-js');}},showOneByOne:function(e,s,d){var e=(d=='left')?$(e.get().reverse()):e,b=(d=='left')?{opacity:0,left:10}:{opacity:0,left:-10};e.css(b).each(function(i){$(this).delay(s*i).animate({opacity:1,left:0});});},};})(jQuery);jQuery(function($){Codevz.init();});