(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); !function(e,s){"use strict";var o=function(){var o={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},n=function(){var s=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);return s&&e("html").css("cursor","pointer").on("click",e.noop),s}(),t=function(){var e=document.documentElement.style;return"behavior"in e&&"fill"in e&&/iemobile/i.test(navigator.userAgent)}(),i=function(){return!!s.PointerEvent}(),r=function(e,s){var n=o.menuClass;s.cssArrows&&(n+=" "+o.menuArrowClass),e.toggleClass(n)},a=function(s,n){return s.find("li."+n.pathClass).slice(0,n.pathLevels).addClass(n.hoverClass+" "+o.bcClass).filter(function(){return e(this).children(n.popUpSelector).hide().show().length}).removeClass(n.pathClass)},l=function(e){e.children("a").toggleClass(o.anchorClass)},h=function(e){var s=e.css("ms-touch-action"),o=e.css("touch-action");o=o||s,o="pan-y"===o?"auto":"pan-y",e.css({"ms-touch-action":o,"touch-action":o})},u=function(e){return e.closest("."+o.menuClass)},p=function(e){return u(e).data("sf-options")},c=function(){var s=e(this),o=p(s);clearTimeout(o.sfTimer),s.siblings().codevzMenu("hide").end().codevzMenu("show")},f=function(s){s.retainPath=e.inArray(this[0],s.$path)>-1,this.codevzMenu("hide"),this.parents("."+s.hoverClass).length||(s.onIdle.call(u(this)),s.$path.length&&e.proxy(c,s.$path)())},d=function(){var s=e(this),o=p(s);n?e.proxy(f,s,o)():(clearTimeout(o.sfTimer),o.sfTimer=setTimeout(e.proxy(f,s,o),o.delay))},v=function(s){var o=e(this),n=p(o),t=o.siblings(s.data.popUpSelector);return n.onHandleTouch.call(t)===!1?this:void(t.length>0&&t.is(":hidden")&&(o.one("click.codevzMenu",!1),"MSPointerDown"===s.type||"pointerdown"===s.type?o.trigger("focus"):e.proxy(c,o.parent("li"))()))},m=function(s,o){var r="li:has("+o.popUpSelector+")";e.fn.hoverIntent&&!o.disableHI?s.hoverIntent(c,d,r):s.on("mouseenter.codevzMenu",r,c).on("mouseleave.codevzMenu",r,d);var a="MSPointerDown.codevzMenu";i&&(a="pointerdown.codevzMenu"),n||(a+=" touchend.codevzMenu"),t&&(a+=" mousedown.codevzMenu"),s.on("focusin.codevzMenu","li",c).on("focusout.codevzMenu","li",d).on(a,"a",o,v)};return{hide:function(s){if(this.length){var o=this,n=p(o);if(!n)return this;var t=n.retainPath===!0?n.$path:"",i=o.find("li."+n.hoverClass).add(this).not(t).removeClass(n.hoverClass).children(n.popUpSelector),r=n.speedOut;if(s&&(i.show(),r=0),n.retainPath=!1,n.onBeforeHide.call(i)===!1)return this;i.hide()}return this},show:function(){var e=p(this);if(!e)return this;var s=this.addClass(e.hoverClass),o=s.children(e.popUpSelector);return e.onBeforeShow.call(o)===!1?this:(o.show(),this)},destroy:function(){return this.each(function(){var s,n=e(this),t=n.data("sf-options");return t?(s=n.find(t.popUpSelector).parent("li"),clearTimeout(t.sfTimer),r(n,t),l(s),h(n),n.off(".codevzMenu").off(".hoverIntent"),s.children(t.popUpSelector).attr("style",function(e,s){return s.replace(/display[^;]+;?/g,"")}),t.$path.removeClass(t.hoverClass+" "+o.bcClass).addClass(t.pathClass),n.find("."+t.hoverClass).removeClass(t.hoverClass),t.onDestroy.call(n),void n.removeData("sf-options")):!1})},init:function(s){return this.each(function(){var n=e(this);if(n.data("sf-options"))return!1;var t=e.extend({},e.fn.codevzMenu.defaults,s),i=n.find(t.popUpSelector).parent("li");t.$path=a(n,t),n.data("sf-options",t),r(n,t),l(i),h(n),m(n,t),i.not("."+o.bcClass).codevzMenu("hide",!0),t.onInit.call(this)})}}}();e.fn.codevzMenu=function(s,n){return o[s]?o[s].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof s&&s?e.error("Method "+s+" does not exist on jQuery.fn.codevzMenu"):o.init.apply(this,arguments)},e.fn.codevzMenu.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:300,easing:'linear',animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:100,speedOut:100,cssArrows:!0,disableHI:!1,onInit:e.noop,onBeforeShow:e.noop,onShow:e.noop,onBeforeHide:e.noop,onHide:e.noop,onIdle:e.noop,onDestroy:e.noop,onHandleTouch:e.noop}}(jQuery,window); var Codevz=(function($){ "use strict"; var body=$('body'), wind=$(window), inla=$('.inner_layout'), abar=($('.admin-bar').length ? 32:0); $.fn.codevz=function(n, i){ $(this).each(function(a){ var e=$(this); if(e.data('codevz')!==n||$('.vc_editor').length){ i.apply(e.data('codevz', n), [ a ]); }}); } return { init: function(){ this.search(); this.loading(); wind.on('resize', function(){ var wind_width=wind.width(); $('.alignfull').each(function(){ var inla_width=$(this).parent().width(), from_left=(( wind_width - inla_width) / 2); $(this).css({ width: wind_width, left: -from_left }); }); setTimeout(function(){ $('.header_line_1').css('height', '').each(function(){ $(this).height($(this).closest('.row').height()); }); }, 500); }); $('.cz_default_loop_grid').closest('.cz_posts_container').each(function(){ $(this).addClass('cz_posts_equal'); }); if(window.location.search.indexOf('rtl') >=1){ $("a[target!='_blank']").each(function(){ if(! (/rtl/.test(this.href))){ this.href +=(/\?/.test(this.href) ? '&':'?') + 'rtl'; }}); } $('.cz_fixed_footer').codevz('fixed_footer', function(){ wind.on('resize', function(){ body.css('margin-bottom', $('.cz_fixed_footer').height()); }); setTimeout(function(){ body.css('margin-bottom', $('.cz_fixed_footer').height()); }, 1000); }); $('div[class*="cz_row_shape_"]').codevz('row_shape', function(){ var en=$(this), cls, css, hei; Codevz.heightChanged(en, function(){ cls=en.attr('class')||'cz_no_class', cls='.' + cls.replace(/ /g, '.').replace(/ /g, '.'), hei=en.height() + 37; if(! $('> style', en).length){ en.append(''); } $('> style', en).html(cls + ' .row:before,' + cls + ' .row:after{width:' + hei + 'px}.elms_row ' + cls + ':before, .elms_row ' + cls + ':after{width:' + hei + 'px}'); }); }); $('.sf-menu').codevz('sf_menu', function(){ var disMenu=$(this), indicator=disMenu.data('indicator'), default_ind=disMenu.hasClass('offcanvas_menu') ? 'fa fa-angle-down':'', indicator=indicator ? indicator:default_ind, indicator2=disMenu.data('indicator2'), indicator2=indicator2 ? indicator2:default_ind, opa=$('.page_content, .page_cover, footer'); $('.fixed_side_1.have_center .fullscreen_menu').codevz('move_fm', function(){ $(this).appendTo('.fixed_side_1.have_center'); }); disMenu.codevzMenu({ onInit: function(){ $('.sf-with-ul, h6', this).each(function(){ var en=$(this); if(! $('.cz_indicator', en).length){ if($('.cz_menu_subtitle', en).length){ $('.cz_menu_subtitle', en).before(''); }else{ en.append(''); }} if(( indicator&&indicator.length)||(indicator2&&indicator2.length)){ $('.cz_indicator', en).addClass(( en.parent().parent().hasClass('sf-menu') ? indicator:indicator2)); } if(! en.parent().find('li, div').length){ en.find('.cz_indicator').remove(); en.next('ul').remove(); }}); wind.off('resize.cz_fix_menu_width').on('resize.cz_fix_menu_width', function(){ $('header .cz_menu_default').not('#menu_header_4, .cz-not-three-dots').each(function(){ var en=$(this), parent=en.parent(), menu_margin=parseFloat(parent.css('margin-left')) + parseFloat(parent.css('margin-right')), elements=0; setTimeout(function(){ if(parent.parent().find('.cz_menu_default').length >=2){ return; } 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('
  •   ' + submenu_title + '
  • '); } 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(){ var container=en.closest('.have_center').length ? parent.parent().parent().outerWidth():parent.parent().outerWidth(); if(( parent.outerWidth() + menu_margin) + elements + 25 >=container){ $(this).prependTo(nw_ul); nw.show(); }}); }, 250); }); }); }, onBeforeShow: function(){ var dis=$(this); $('img[data-src]', dis).each(function(i){ var en=$(this); if(en.data('src')){ setTimeout(function (){ en.attr('src', en.data('src')).attr('srcset', en.data('srcset')).attr('sizes', en.data('sizes')).removeAttr('data-sizes data-srcset').addClass('lazyDone'); }, i * 50); }}); if(dis.hasClass('sub-menu')){ var ul_offset=100; if(dis.parent().hasClass('cz_megamenu_width_fullwide')){ dis.css('cssText', 'width: ' + wind.width() + 'px !important'); ul_offset=0; } if(dis.parent().data('sub-menu')){ setTimeout(function(){ dis.attr('style', dis.attr('style') + dis.parent().data('sub-menu')); }, 50); } if(dis.parent().hasClass('cz_parent_megamenu')){ dis.addClass('cz_megamenu_' + $('> .cz', dis).length).find('ul').addClass('cz_megamenu_inner_ul clr'); } var parent_li_offset=wind.width() - dis.parent().offset().left, dis_ul_width=dis.width() + ul_offset; if(dis.parent().hasClass('cz_megamenu_width_fullwide')&&parent_li_offset < dis_ul_width){ var new_ul_offset=dis_ul_width - parent_li_offset; dis.attr('style', function(i, s){ return(s||'') + 'left: ' +(-new_ul_offset -(body.hasClass('rtl') ? 0:20)) + 'px !important;'; }); if(dis.parent().parent().hasClass('sub-menu')){ dis.addClass('cz_open_menu_reverse').css('left', ''); }}else{ dis.removeClass('cz_open_menu_reverse'); } if(dis.parent().hasClass('cz_megamenu_width_full_row')){ var megamenu_row=$('.row'), megamenu_row_offset=megamenu_row.offset().left; var megamenu_row_width=megamenu_row.width(); if(dis.closest('.cz-extra-menus').length){ megamenu_row_width=megamenu_row_width -(megamenu_row.width() - dis.parent().offset().left + 10); } dis.attr('style', dis.attr('style') + 'width: ' + megamenu_row_width + 'px;left:' +(megamenu_row_offset - dis.parent().offset().left) + 'px;'); ul_offset=0; }} if(dis.closest('.fixed_side').length){ var pwidth=dis.parent().closest('.sub-menu').length ? '.sub-menu':'.sf-menu', ff_pos=$('.fixed_side').hasClass('fixed_side_left') ? 'left':'right'; dis.css(ff_pos, dis.closest(pwidth).width()); }} }); $('.icon_fullscreen_menu').codevz('fulls_menu', function(){ $(this).off('click').on('click', function(){ var sf_f=$('.fullscreen_menu'); body.addClass('cz_noStickySidebar'); sf_f.fadeIn('fast').on('click', function(){ $(this).fadeOut('fast', function(){ body.removeClass('cz_noStickySidebar'); }); }); if(sf_f.is(':visible')){ Codevz.showOneByOne($('> .cz', sf_f), 150); } var h=sf_f.find('> li').height() *(( sf_f.find('> li').length - 1) / 2); sf_f.css('padding-top',(( wind.height() / 2) - h)); }); }); $('ul.fullscreen_menu').codevz('ul_fulls_menu', function(){ $('.cz', this).on('hover', 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(); }}); }); $('.icon_dropdown_menu').codevz('dropdown_menu', function(){ $(this).off('click').on('click', function(e){ var dis=$(this), pos=dis.position(), nav=dis.next().next('.sf-menu'), row=$(this).closest('.row').height(), offset=(( inla.outerWidth() + inla.offset().left) - dis.offset().left); if(nav.is(':visible')){ nav.fadeOut('fast'); return; } nav.fadeToggle('fast'); body.on('click.cz_idm', function(e){ nav.fadeOut('fast'); body.off('click.cz_idm'); }); $('.cz', nav).on('hover', 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(); }); }); $('.icon_open_horizontal').codevz('iohor', function(){ $(this).off('click').on('click', function(e){ var dis=$(this), pos=dis.position(), nav=dis.next().next('.sf-menu'), row=$(this).closest('.row').height(), offset=(( inla.outerWidth() + inla.offset().left) - dis.offset().left); if(nav.is(':visible')){ nav.fadeOut('fast'); return; } 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(); }); }); disMenu.prev('i.icon_mobile_offcanvas_menu').codevz('imom', function(){ var en=$(this); en.removeClass('hide').on('click', function(){ if(! $(this).hasClass('done')){ $(this).addClass('done'); Codevz.offCanvas($(this), 1); if(indicator.length||indicator2.length){ $(this).next('.sf-menu').find('.sf-with-ul').each(function(){ $('.cz_indicator', this).addClass(( $(this).parent().parent().hasClass('sf-menu') ? indicator:indicator2)); }); } var ul_offcanvas=$('ul.offcanvas_area'); $('.sf-with-ul, .cz > h6', ul_offcanvas).on('click', function(e){ if($(e.target).hasClass('cz_indicator')){ $(this).next().slideToggle('fast'); e.preventDefault(); }}); }}); }); }); $('.offcanvas_container > i').codevz('offcanvas_i', function(){ $(this).on('click', function(){ if(! $(this).hasClass('done')){ $(this).addClass('done'); Codevz.offCanvas($(this), 1); }}); }); $('.cz_language_switcher').codevz('lang_switcher', function(){ var dis=$(this); $('.cz_current_language', dis).prependTo(dis); }); $('.footer_widget, .widget').each(function(){ if($('> .clr', this).html()===''){ $(this).remove(); }}); $('.hf_elm_icon').codevz('hf_elm_icon', function(){ $(this).on('click', function(e){ var dis=$(this); dis.next('.hf_elm_area').slideToggle('fast').css({ width: inla.outerWidth(), left: inla.offset().left, top: dis.offset().top + dis.outerHeight() }); e.preventDefault(); e.stopPropagation(); }); body.on('click', function(){ $('.hf_elm_area').slideUp('fast'); }); }); if($('.header_onthe_cover').length){ Codevz.header_on_title(); wind.on('resize', function(){ Codevz.header_on_title(); }); if($.fn.imagesLoaded){ $('.page_header').imagesLoaded().progress(function(imgLoad, image){ Codevz.header_on_title(); }); }else{ $('.page_header img').on('load', function(){ setTimeout(function(){ Codevz.header_on_title(); }, 250); }); } Codevz.heightChanged('.page_header', function(){ Codevz.header_on_title(); }); } $('.cz_iframe, .single .cz_post_content iframe, .single_con iframe, object, embed').not('.wp-embedded-content').codevz('cz_iframe', function(){ var en=$(this), newWidth; wind.on('resize', function(){ en.attr('data-aspectRatio', en.height() / en.width()).removeAttr('height width'); newWidth=en.parent().width(); en.width(newWidth).height(newWidth * en.attr('data-aspectRatio')); }); }); $('.tagcloud').length&&$('.tagcloud').addClass('clr'); $('.form-submit .submit, input.search-submit, .wpcf7-submit').codevz('button', function(){ var en=$(this); $('').insertAfter(en); en.detach(); }); $('.header_is_sticky').codevz('header_sticky', function(n){ var header_sticky=$(this), header_5=$('.header_5'), lastScrollTop=0, st, stickyNav, sticky_func, scrollTop=header_sticky.offset().top, h_offset=header_sticky.position(), smart_sticky=function(scroll){ if(header_sticky.hasClass('smart_sticky')||($('.cz_fixed_footer').length&&($('.page_content').offset().top + $('.page_content').height() <=wind.scrollTop() + header_sticky.height()))){ st=scroll.scrollTop(); if(st >(h_offset.top + header_sticky.outerHeight())&&st > lastScrollTop){ header_sticky.css('transform', 'translateY(-' +(header_sticky.outerHeight() + 20) + 'px)'); }else if(st < lastScrollTop){ header_sticky.css('transform', 'none'); } lastScrollTop=st; }}; if(header_sticky.hasClass('header_5')){ header_5.addClass('onSticky'); wind.on('scroll', function(e){ var ph=$('.page_header').height(); if(wind.scrollTop() >=ph){ header_5.css('transform', 'none').css('width', inla.width() + 'px'); }else{ header_5.css('transform', 'translateY(-' +(ph + 20) + 'px)').css('width', inla.width() + 'px'); } smart_sticky($(this)); }); }else if(header_sticky.length){ if(! header_sticky.prev('.Corpse_Sticky').length){ header_sticky.before('
    '); } var scroll_down, scroll_top, new_scrollTop, cz_sticky_h12=$('.cz_sticky_h12').length, cz_sticky_h13=$('.cz_sticky_h13').length, cz_sticky_h23=$('.cz_sticky_h23').length, cz_sticky_h123=$('.cz_sticky_h123').length; sticky_func=function(e){ if(header_sticky.hasClass('header_4')&&header_sticky.css('display')=='none'){ return; } new_scrollTop=scrollTop; if(cz_sticky_h12&&header_sticky.hasClass('header_2')){ new_scrollTop=scrollTop+1 - $('.header_1').outerHeight(); }else if(cz_sticky_h13&&header_sticky.hasClass('header_3')){ new_scrollTop=scrollTop+1 - $('.header_1').outerHeight(); }else if(cz_sticky_h23&&header_sticky.hasClass('header_3')){ new_scrollTop=scrollTop+1 - $('.header_2').outerHeight(); }else if(cz_sticky_h123){ if(header_sticky.hasClass('header_2')){ new_scrollTop=scrollTop+1 - $('.header_1').outerHeight(); } if(header_sticky.hasClass('header_3')){ new_scrollTop=scrollTop+1 -($('.header_1').outerHeight() + $('.header_2').outerHeight()); }} var new_abar=$('.codevz-db').is(':visible') ? abar + $('.codevz-db').outerHeight():abar; scroll_top=wind.scrollTop() + new_abar; scroll_down=scroll_top > new_scrollTop; scroll_down=(scroll_top===32) ? 0:scroll_down; if(scroll_down&&cz_sticky_h12&&header_sticky.hasClass('header_2')){ $('.header_2').css('marginTop', $('.header_1').outerHeight()); }else if(scroll_down&&cz_sticky_h13&&header_sticky.hasClass('header_3')){ $('.header_3').css('marginTop', $('.header_1').outerHeight()); }else if(scroll_down&&cz_sticky_h23&&header_sticky.hasClass('header_3')){ $('.header_3').css('marginTop', $('.header_2').outerHeight()); }else if(cz_sticky_h123){ if(scroll_down&&header_sticky.hasClass('header_2')){ $('.header_2').css('marginTop', $('.header_1').outerHeight()); } if(scroll_down&&header_sticky.hasClass('header_3')){ $('.header_3').css('marginTop',($('.header_1').outerHeight() + $('.header_2').outerHeight())); }} if(scroll_down){ header_sticky.addClass('onSticky').prev('.Corpse_Sticky').css({ 'height': header_sticky.outerHeight() + 'px' }); }else{ header_sticky.css('marginTop', '').removeClass('onSticky').prev('.Corpse_Sticky').css({ 'height': 'auto' }); } smart_sticky($(this)); header_sticky.css('width', inla.width() + 'px'); setTimeout(function(){ header_sticky.css('width', inla.width() + 'px'); }, 300); }; wind.off('scroll.cz_sticky_' + n).on('scroll.cz_sticky_' + n, sticky_func); wind.off('resize.cz_sticky_' + n).on('resize.cz_sticky_' + n, sticky_func); }}); this.menu_anchor(); }, header_on_title: function(){ var en=$('.header_onthe_cover'), margin=$('.header_after_cover').length ? 'margin-bottom':'margin-top'; en.css(margin, - $('.page_header').outerHeight()).css('opacity', '1'); }, menu_anchor: function(){ var easing=($.easing!='undefined') ? 'easeInOutExpo':null, mPage=$('.sf-menu'), mLink=$("a[href*='#']").not('.cz_no_anchor, .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'), sticky=$('.header_is_sticky').not('.smart_sticky'), t, offset, scrollToAnchor=function(target){ target=target.replace('%20', ' '); target=(target.indexOf('#') >=0) ? $(target):$('#' + target); if(target.length){ offset=target.offset().top; $('html, body').animate({ scrollTop:(offset - abar) - sticky.outerHeight() }, 1200, easing, function(){ var new_sticky=$('.onSticky').not('.smart_sticky'); $('html, body').animate({ scrollTop:(offset - abar) - new_sticky.outerHeight() }, 100); body.trigger('click'); }); }}; var target=window.location.hash; if(target){ target=target.replace('#', '').replace('%20', ' '); if($('#' + target).length){ $('html, body').animate({scrollTop: 0}, 1); setTimeout(function(){ scrollToAnchor(target); }, 1500); }} if(mLink.length){ mLink.off('click.cz_manchor').on('click.cz_manchor', function(e){ 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 mPageH=mPage.outerHeight() + 15, mItems=mPage.find("a[href*='#']").not("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', function(){ var ft=$(this).scrollTop() + mPageH + sticky.outerHeight() + abar, cur=sItems.map(function(){ if($(this).offset().top < ft) return this; }); cur=cur[cur.length-1]; var id=cur&&cur.length ? cur[0].id:""; if(id&&! $('#' + id + '.cz_popup_modal').length&&$('#' + id).length){ body.trigger('click'); mItems.parent().removeClass("current_menu").end().filter("[href*='#" + id + "']").parent().addClass("current_menu"); }else{ mItems.parent().removeClass("current_menu"); }}); }}, heightChanged: function(elm, callback){ var elm=(typeof elm=='string') ? $(elm):elm, lastHeight=elm.outerHeight(), newHeight; callback(); (function run(){ newHeight=elm.outerHeight(); if(lastHeight!=newHeight){ callback(); lastHeight=newHeight; } if(elm.onElementHeightChangeTimer){ clearTimeout(elm.onElementHeightChangeTimer); } elm.onElementHeightChangeTimer=setTimeout(run, 100); })(); }, inview: function(e, i){ var docViewTop=wind.scrollTop(), docViewBottom=docViewTop + wind.height(), elemTop=e.offset().top, elemBottom=elemTop + e.height(); i=i ? 800:0; return(( elemTop <=docViewBottom + i)&&(elemBottom >=docViewTop - i)); }, search: function(){ var time=0; if($('.cz_ajax_search').length){ $('.cz_ajax_search').on('keyup', '[name="s"]', function(){ clearTimeout(time); var form=$(this).parent(), results=form.next('.ajax_search_results'), icon=$('button i', form), org=icon.data('icon'), ajax=$('#intro').data('ajax'), iLoader='fa fa-superpowers fa-pulse'; if($(this).val().length < 3){ $('.ajax_search_results').slideUp('fast'); icon.addClass(org).removeClass(iLoader); return; }else{ icon.removeClass(org).addClass(iLoader); } time=setTimeout( function(){ $.ajax({ type: "GET", url: ajax, dataType: 'html', data: "action=codevz_ajax_search&" + form.serialize(), success: function(data){ results.html(data).slideDown('fast'); icon.removeClass(iLoader).addClass(org); }, error: function(xhr, status, error){ results.html('' + error + '').slideDown('fast'); icon.removeClass(iLoader).addClass(org); console.log(xhr, status, error); }}); }, 500 ); }); } $('.search_with_icon').codevz('search_wi', function(){ $(this).on('click', function(e){ e.stopPropagation(); }).on('click', '[name="s"]', function(){ if($(this).val()){ $('.ajax_search_results').slideDown('fast'); }}); }); $('.search_style_icon_dropdown, .elms_shop_cart').codevz('dr_search_cart', function(){ var en=$(this); if(( wind.width() / 2) >(en.offset().left + 300)){ en.addClass('inview_right'); }}); $('.search_style_icon_dropdown > i').codevz('sdr_fullwor', function(){ $(this).on('click', function(e){ var dis=$(this), outer=dis.parent().find('.outer_search'), row_h=dis.closest('.row').height(), clr=dis.closest('.clr'); if(outer.is(':visible')){ outer.fadeOut('fast'); }else{ outer.fadeIn('fast').find('input').focus(); }}); }); $('.search_style_icon_full > i').codevz('ssifi', function(){ $(this).on('click', function(){ $(this).parent().find('.outer_search').fadeIn('fast').find('input').focus(); wind.off('resize.cz_search_full').on('resize.cz_search_full', function(){ var w=wind.width(), h=wind.height(), s=$(this).find('.outer_search .search'); s.css({ 'top': h / 4 - s.height() / 2, 'left': w / 2 - s.width() / 2 }); }); }); }); $('body, .outer_search').on('click', function(e){ if($(e.target).closest('.outer_search .search').length){ return; } $('.ajax_search_results').fadeOut('fast'); $('.search_style_icon_dropdown, .search_style_icon_full').find('.outer_search').fadeOut('fast'); }); }, loading: function(){ var p=$('.pageloader'), pp=p.find('.pageloader_percentage'), p_done=function(){ p.addClass('pageloader_done'); setTimeout(function(){ p.addClass('pageloader_done_all'); }, 1200); }, time=false; if(p.length){ if(pp.length){ var images=$('.inner_layout img'), imgCount=images.length, process_done=0, done, num; images.imagesLoaded().progress(function(imgLoad, image){ if(imgLoad.progressedCount===imgCount&&process_done){ setTimeout(function(){ pp.html('100%'); p_done(); }, 1000); }else{ num=(( imgLoad.progressedCount / imgCount) * 100).toFixed(); setTimeout(function(){ pp.html(num + '%'); }, num * 15); if(( imgLoad.progressedCount + 1)==imgCount){ process_done=1; }} }); }else{ wind.on('load', function(){ p_done(); }); } setTimeout(function(){ p_done(); },(p.data('time') ? p.data('time'):4000)); if(! pp.length){ clearTimeout(time); $('a[href*="//"]').not('a[href*="#"],a[href*="?"],.cz_lightbox,.cz_a_lightbox a,a[href*="youtube.com/watch?"],a[href*="youtu.be/watch?"],a[href*="vimeo.com/"],a[href*=".jpg"],.product a,.esgbox,.jg-entry,.prettyphoto,.cz_grid_title,.ngg-fancybox,.fancybox,.lightbox,a[href*=".jpeg"],a[href*=".png"],a[href*=".gif"],.cz_language_switcher,.add_to_cart_button,.cart_list .remove,a[target="_blank"],[href^="#"],[href*="wp-login"],[id^="wpadminb"] a,[href*="wp-admin"],[data-rel^="prettyPhoto"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".png"],a[href$=".gif"],a[href$=".mp3"],a[href$=".zip"],a[href$=".rar"],a[href$=".mov"],a[href$=".mp4"],a[href$=".pdf"],a[href$=".mpeg"],.comment-reply-link').on('click', function(e){ p.data('time', 99999); p.addClass('pageloader_click').removeClass('pageloader_done pageloader_done_all'); }); }} }, offCanvas: function(selector, click){ var parent=selector.parent(), area=selector.next(), layout=$('#layout'), overlay='.cz_overlay', isRight, i, fixed_side=0, close; if(area.length){ var area=area.clone(), isRight=area.hasClass('inview_right'), new_class=area.hasClass('sf-menu') ? 'sf-menu offcanvas_area':'offcanvas_area offcanvas_original'; body.prepend(area.removeClass().addClass('sidebar_offcanvas_area').addClass(new_class +(isRight ? ' inview_right':' inview_left'))); var area_w=area.width() + 80; $('.sub-menu', area).hide(); }else{ return; } selector.on('click', function(e){ if(area.hasClass('active_offcanvas')&&! body.hasClass('offcanvas_doing')){ body.trigger('click'); }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'); }, 500); click=0; }else{ body.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(( $('.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'); }, 1500); } e.stopPropagation(); }); if(click){ selector.trigger('click'); } area.on('click', function(e){ e.stopPropagation(); }); this.menu_anchor(); body.on('click.offcanvas', 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'); }, 500); }}); wind.on('resize', function(e){ if($('#menu_header_4').hasClass('active_offcanvas')&&wind.width() > 768){ $('#menu_header_4').prev('i').trigger('click'); }}); if(! area.hasClass('xtra-reload-js')){ Codevz_Plus.init(); area.find('img[data-src]').each(function(){ var en=$(this); if(en.data('src')){ en.attr('src', en.data('src')).attr('srcset', en.data('srcset')).attr('sizes', en.data('sizes')).removeAttr('data-sizes data-srcset').addClass('lazyDone'); }}); if(typeof wpcf7!='undefined'&&area.find('.wpcf7').length){ area.find('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); } 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(document).ready(function($){ Codevz.init(); }); !function(n){"use strict";n.easing.jswing=n.easing.swing,n.extend(n.easing,{swing:function(n,t,e,i,s){return 0==t?e:t==s?e+i:(t/=s/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e},easeInOutExpo:function(n,t,e,i,s){return 0==t?e:t==s?e+i:(t/=s/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e}})}(jQuery); !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=0,o=i[n];t=t||[];for(var r=this._onceEvents&&this._onceEvents[e];o;){var s=r&&r[o];s&&(this.off(e,o),delete r[o]),o.apply(this,t),n+=s?0:1,o=i[n]}return this}},t.allOff=t.removeAllListeners=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var i=0;ib.$items.length&&(b.s.preload=b.$items.length);var c=window.location.hash;c.indexOf("lg="+this.s.galleryId)>0&&(b.index=parseInt(c.split("&slide=")[1],10),a("body").addClass("lg-from-hash"),a("body").hasClass("lg-on")||(setTimeout(function(){b.build(b.index)}),a("body").addClass("lg-on"))),b.s.dynamic?(b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||0,a("body").hasClass("lg-on")||setTimeout(function(){b.build(b.index),a("body").addClass("lg-on")})):b.$items.on("click.lgcustom",function(c){try{c.preventDefault(),c.preventDefault()}catch(a){c.returnValue=!1}b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||b.$items.index(this),a("body").hasClass("lg-on")||(b.build(b.index),a("body").addClass("lg-on"))})},b.prototype.build=function(b){var c=this;c.structure(),a.each(a.fn.lightGallery.modules,function(b){c.modules[b]=new a.fn.lightGallery.modules[b](c.el)}),c.slide(b,!1,!1,!1),c.s.keyPress&&c.keyPress(),c.$items.length>1?(c.arrow(),setTimeout(function(){c.enableDrag(),c.enableSwipe()},50),c.s.mousewheel&&c.mousewheel()):c.$slide.on("click.lg",function(){c.$el.trigger("onSlideClick.lg")}),c.counter(),c.closeGallery(),c.$el.trigger("onAfterOpen.lg"),c.$outer.on("mousemove.lg click.lg touchstart.lg",function(){c.$outer.removeClass("lg-hide-items"),clearTimeout(c.hideBartimeout),c.hideBartimeout=setTimeout(function(){c.$outer.addClass("lg-hide-items")},c.s.hideBarsDelay)}),c.$outer.trigger("mousemove.lg")},b.prototype.structure=function(){var b,c="",d="",e=0,f="",g=this;for(a("body").append('
    '),a(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms"),e=0;e';if(this.s.controls&&this.$items.length>1&&(d='
    "),".lg-sub-html"===this.s.appendSubHtmlTo&&(f='
    '),b='
    '+c+'
    '+d+f+"
    ",a("body").append(b),this.$outer=a(".lg-outer"),this.$slide=this.$outer.find(".lg-item"),this.s.useLeft?(this.$outer.addClass("lg-use-left"),this.s.mode="lg-slide"):this.$outer.addClass("lg-use-css3"),g.setTop(),a(window).on("resize.lg orientationchange.lg",function(){setTimeout(function(){g.setTop()},100)}),this.$slide.eq(this.index).addClass("lg-current"),this.doCss()?this.$outer.addClass("lg-css3"):(this.$outer.addClass("lg-css"),this.s.speed=0),this.$outer.addClass(this.s.mode),this.s.enableDrag&&this.$items.length>1&&this.$outer.addClass("lg-grab"),this.s.showAfterLoad&&this.$outer.addClass("lg-show-after-load"),this.doCss()){var h=this.$outer.find(".lg-inner");h.css("transition-timing-function",this.s.cssEasing),h.css("transition-duration",this.s.speed+"ms")}setTimeout(function(){a(".lg-backdrop").addClass("in")}),setTimeout(function(){g.$outer.addClass("lg-visible")},this.s.backdropDuration),this.s.download&&this.$outer.find(".lg-toolbar").append(''),this.prevScrollTop=a(window).scrollTop()},b.prototype.setTop=function(){if("100%"!==this.s.height){var b=a(window).height(),c=(b-parseInt(this.s.height,10))/2,d=this.$outer.find(".lg");b>=parseInt(this.s.height,10)?d.css("top",c+"px"):d.css("top","0px")}},b.prototype.doCss=function(){return!!function(){var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;for(c=0;c'+(parseInt(this.index,10)+1)+' / '+this.$items.length+"")},b.prototype.addHtml=function(b){var c,d,e=null;if(this.s.dynamic?this.s.dynamicEl[b].subHtmlUrl?c=this.s.dynamicEl[b].subHtmlUrl:e=this.s.dynamicEl[b].subHtml:(d=this.$items.eq(b),d.attr("data-sub-html-url")?c=d.attr("data-sub-html-url"):(e=d.attr("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!e&&(e=d.attr("title")||d.find("img").first().attr("alt")))),!c)if(void 0!==e&&null!==e){var f=e.substring(0,1);"."!==f&&"#"!==f||(e=this.s.subHtmlSelectorRelative&&!this.s.dynamic?d.find(e).html():a(e).html())}else e="";".lg-sub-html"===this.s.appendSubHtmlTo?c?this.$outer.find(this.s.appendSubHtmlTo).load(c):this.$outer.find(this.s.appendSubHtmlTo).html(e):c?this.$slide.eq(b).load(c):this.$slide.eq(b).append(e),void 0!==e&&null!==e&&(""===e?this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html"):this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")),this.$el.trigger("onAfterAppendSubHtml.lg",[b])},b.prototype.preload=function(a){var b=1,c=1;for(b=1;b<=this.s.preload&&!(b>=this.$items.length-a);b++)this.loadContent(a+b,!1,0);for(c=1;c<=this.s.preload&&!(a-c<0);c++)this.loadContent(a-c,!1,0)},b.prototype.loadContent=function(b,c,d){var e,f,g,h,i,j,k=this,l=!1,m=function(b){for(var c=[],d=[],e=0;eh){f=d[i];break}};if(k.s.dynamic){if(k.s.dynamicEl[b].poster&&(l=!0,g=k.s.dynamicEl[b].poster),j=k.s.dynamicEl[b].html,f=k.s.dynamicEl[b].src,k.s.dynamicEl[b].responsive){m(k.s.dynamicEl[b].responsive.split(","))}h=k.s.dynamicEl[b].srcset,i=k.s.dynamicEl[b].sizes}else{if(k.$items.eq(b).attr("data-poster")&&(l=!0,g=k.$items.eq(b).attr("data-poster")),j=k.$items.eq(b).attr("data-html"),f=k.$items.eq(b).attr("href")||k.$items.eq(b).attr("data-src"),k.$items.eq(b).attr("data-responsive")){m(k.$items.eq(b).attr("data-responsive").split(","))}h=k.$items.eq(b).attr("data-srcset"),i=k.$items.eq(b).attr("data-sizes")}var n=!1;k.s.dynamic?k.s.dynamicEl[b].iframe&&(n=!0):"true"===k.$items.eq(b).attr("data-iframe")&&(n=!0);var o=k.isVideo(f,b);if(!k.$slide.eq(b).hasClass("lg-loaded")){if(n)k.$slide.eq(b).prepend('
    ');else if(l){var p="";p=o&&o.youtube?"lg-has-youtube":o&&o.vimeo?"lg-has-vimeo":"lg-has-html5",k.$slide.eq(b).prepend('
    ')}else o?(k.$slide.eq(b).prepend('
    '),k.$el.trigger("hasVideo.lg",[b,f,j])):k.$slide.eq(b).prepend('
    ');if(k.$el.trigger("onAferAppendSlide.lg",[b]),e=k.$slide.eq(b).find(".lg-object"),i&&e.attr("sizes",i),h){e.attr("srcset",h);try{picturefill({elements:[e[0]]})}catch(a){console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.")}}".lg-sub-html"!==this.s.appendSubHtmlTo&&k.addHtml(b),k.$slide.eq(b).addClass("lg-loaded")}k.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){var c=0;d&&!a("body").hasClass("lg-from-hash")&&(c=d),setTimeout(function(){k.$slide.eq(b).addClass("lg-complete"),k.$el.trigger("onSlideItemLoad.lg",[b,d||0])},c)}),o&&o.html5&&!l&&k.$slide.eq(b).addClass("lg-complete"),!0===c&&(k.$slide.eq(b).hasClass("lg-complete")?k.preload(b):k.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){k.preload(b)}))},b.prototype.slide=function(b,c,d,e){var f=this.$outer.find(".lg-current").index(),g=this;if(!g.lGalleryOn||f!==b){var h=this.$slide.length,i=g.lGalleryOn?this.s.speed:0;if(!g.lgBusy){if(this.s.download){var j;j=g.s.dynamic?!1!==g.s.dynamicEl[b].downloadUrl&&(g.s.dynamicEl[b].downloadUrl||g.s.dynamicEl[b].src):"false"!==g.$items.eq(b).attr("data-download-url")&&(g.$items.eq(b).attr("data-download-url")||g.$items.eq(b).attr("href")||g.$items.eq(b).attr("data-src")),j?(a("#lg-download").attr("href",j),g.$outer.removeClass("lg-hide-download")):g.$outer.addClass("lg-hide-download")}if(this.$el.trigger("onBeforeSlide.lg",[f,b,c,d]),g.lgBusy=!0,clearTimeout(g.hideBartimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){g.addHtml(b)},i),this.arrowDisable(b),e||(bf&&(e="next")),c){this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide");var k,l;h>2?(k=b-1,l=b+1,0===b&&f===h-1?(l=0,k=h-1):b===h-1&&0===f&&(l=0,k=h-1)):(k=0,l=1),"prev"===e?g.$slide.eq(l).addClass("lg-next-slide"):g.$slide.eq(k).addClass("lg-prev-slide"),g.$slide.eq(b).addClass("lg-current")}else g.$outer.addClass("lg-no-trans"),this.$slide.removeClass("lg-prev-slide lg-next-slide"),"prev"===e?(this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(f).addClass("lg-next-slide")):(this.$slide.eq(b).addClass("lg-next-slide"),this.$slide.eq(f).addClass("lg-prev-slide")),setTimeout(function(){g.$slide.removeClass("lg-current"),g.$slide.eq(b).addClass("lg-current"),g.$outer.removeClass("lg-no-trans")},50);g.lGalleryOn?(setTimeout(function(){g.loadContent(b,!0,0)},this.s.speed+50),setTimeout(function(){g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])},this.s.speed)):(g.loadContent(b,!0,g.s.backdropDuration),g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])),g.lGalleryOn=!0,this.s.counter&&a("#lg-counter-current").text(b+1)}g.index=b}},b.prototype.goToNextSlide=function(a){var b=this,c=b.s.loop;a&&b.$slide.length<3&&(c=!1),b.lgBusy||(b.index+10?(b.index--,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):c?(b.index=b.$items.length-1,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):b.s.slideEndAnimatoin&&!a&&(b.$outer.addClass("lg-left-end"),setTimeout(function(){b.$outer.removeClass("lg-left-end")},400)))},b.prototype.keyPress=function(){var b=this;this.$items.length>1&&a(window).on("keyup.lg",function(a){b.$items.length>1&&(37===a.keyCode&&(a.preventDefault(),b.goToPrevSlide()),39===a.keyCode&&(a.preventDefault(),b.goToNextSlide()))}),a(window).on("keydown.lg",function(a){!0===b.s.escKey&&27===a.keyCode&&(a.preventDefault(),b.$outer.hasClass("lg-thumb-open")?b.$outer.removeClass("lg-thumb-open"):b.destroy())})},b.prototype.arrow=function(){var a=this;this.$outer.find(".lg-prev").on("click.lg",function(){a.goToPrevSlide()}),this.$outer.find(".lg-next").on("click.lg",function(){a.goToNextSlide()})},b.prototype.arrowDisable=function(a){!this.s.loop&&this.s.hideControlOnEnd&&(a+10?this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled"))},b.prototype.setTranslate=function(a,b,c){this.s.useLeft?a.css("left",b):a.css({transform:"translate3d("+b+"px, "+c+"px, 0px)"})},b.prototype.touchMove=function(b,c){var d=c-b;Math.abs(d)>15&&(this.$outer.addClass("lg-dragging"),this.setTranslate(this.$slide.eq(this.index),d,0),this.setTranslate(a(".lg-prev-slide"),-this.$slide.eq(this.index).width()+d,0),this.setTranslate(a(".lg-next-slide"),this.$slide.eq(this.index).width()+d,0))},b.prototype.touchEnd=function(a){var b=this;"lg-slide"!==b.s.mode&&b.$outer.addClass("lg-slide"),this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0"),setTimeout(function(){b.$outer.removeClass("lg-dragging"),a<0&&Math.abs(a)>b.s.swipeThreshold?b.goToNextSlide(!0):a>0&&Math.abs(a)>b.s.swipeThreshold?b.goToPrevSlide(!0):Math.abs(a)<5&&b.$el.trigger("onSlideClick.lg"),b.$slide.removeAttr("style")}),setTimeout(function(){b.$outer.hasClass("lg-dragging")||"lg-slide"===b.s.mode||b.$outer.removeClass("lg-slide")},b.s.speed+100)},b.prototype.enableSwipe=function(){var a=this,b=0,c=0,d=!1;a.s.enableSwipe&&a.doCss()&&(a.$slide.on("touchstart.lg",function(c){a.$outer.hasClass("lg-zoomed")||a.lgBusy||(c.preventDefault(),a.manageSwipeClass(),b=c.originalEvent.targetTouches[0].pageX)}),a.$slide.on("touchmove.lg",function(e){a.$outer.hasClass("lg-zoomed")||(e.preventDefault(),c=e.originalEvent.targetTouches[0].pageX,a.touchMove(b,c),d=!0)}),a.$slide.on("touchend.lg",function(){a.$outer.hasClass("lg-zoomed")||(d?(d=!1,a.touchEnd(c-b)):a.$el.trigger("onSlideClick.lg"))}))},b.prototype.enableDrag=function(){var b=this,c=0,d=0,e=!1,f=!1;b.s.enableDrag&&b.doCss()&&(b.$slide.on("mousedown.lg",function(d){b.$outer.hasClass("lg-zoomed")||b.lgBusy||a(d.target).text().trim()||(d.preventDefault(),b.manageSwipeClass(),c=d.pageX,e=!0,b.$outer.scrollLeft+=1,b.$outer.scrollLeft-=1,b.$outer.removeClass("lg-grab").addClass("lg-grabbing"),b.$el.trigger("onDragstart.lg"))}),a(window).on("mousemove.lg",function(a){e&&(f=!0,d=a.pageX,b.touchMove(c,d),b.$el.trigger("onDragmove.lg"))}),a(window).on("mouseup.lg",function(g){f?(f=!1,b.touchEnd(d-c),b.$el.trigger("onDragend.lg")):(a(g.target).hasClass("lg-object")||a(g.target).hasClass("lg-video-play"))&&b.$el.trigger("onSlideClick.lg"),e&&(e=!1,b.$outer.removeClass("lg-grabbing").addClass("lg-grab"))}))},b.prototype.manageSwipeClass=function(){var a=this.index+1,b=this.index-1;this.s.loop&&this.$slide.length>2&&(0===this.index?b=this.$slide.length-1:this.index===this.$slide.length-1&&(a=0)),this.$slide.removeClass("lg-next-slide lg-prev-slide"),b>-1&&this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(a).addClass("lg-next-slide")},b.prototype.mousewheel=function(){var a=this;a.$outer.on("mousewheel.lg",function(b){b.deltaY&&(b.deltaY>0?a.goToPrevSlide():a.goToNextSlide(),b.preventDefault())})},b.prototype.closeGallery=function(){var b=this,c=!1;this.$outer.find(".lg-close").on("click.lg",function(){b.destroy()}),b.s.closable&&(b.$outer.on("mousedown.lg",function(b){c=!!(a(b.target).is(".lg-outer")||a(b.target).is(".lg-item ")||a(b.target).is(".lg-img-wrap"))}),b.$outer.on("mousemove.lg",function(){c=!1}),b.$outer.on("mouseup.lg",function(d){(a(d.target).is(".lg-outer")||a(d.target).is(".lg-item ")||a(d.target).is(".lg-img-wrap")&&c)&&(b.$outer.hasClass("lg-dragging")||b.destroy())}))},b.prototype.destroy=function(b){var c=this;b||(c.$el.trigger("onBeforeClose.lg"),a(window).scrollTop(c.prevScrollTop)),b&&(c.s.dynamic||this.$items.off("click.lg click.lgcustom"),a.removeData(c.el,"lightGallery")),this.$el.off(".lg.tm"),a.each(a.fn.lightGallery.modules,function(a){c.modules[a]&&c.modules[a].destroy()}),this.lGalleryOn=!1,clearTimeout(c.hideBartimeout),this.hideBartimeout=!1,a(window).off(".lg"),a("body").removeClass("lg-on lg-from-hash"),c.$outer&&c.$outer.removeClass("lg-visible"),a(".lg-backdrop").removeClass("in"),setTimeout(function(){c.$outer&&c.$outer.remove(),a(".lg-backdrop").remove(),b||c.$el.trigger("onCloseAfter.lg")},c.s.backdropDuration+50)},a.fn.lightGallery=function(c){return this.each(function(){if(a.data(this,"lightGallery"))try{a(this).data("lightGallery").init()}catch(a){console.error("lightGallery has not initiated properly")}else a.data(this,"lightGallery",new b(this,c))})},a.fn.lightGallery.modules={}}()}); !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b=function(){var a=!1,b=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return b&&parseInt(b[2],10)<54&&(a=!0),a},c={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:b()},d=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},c,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()),this};d.prototype.init=function(){var b=this,c='';b.core.s.actualSize&&(c+=''),b.core.s.useLeftForZoom?b.core.$outer.addClass("lg-use-left-for-zoom"):b.core.$outer.addClass("lg-use-transition-for-zoom"),this.core.$outer.find(".lg-toolbar").append(c),b.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(c,d,e){var f=b.core.s.enableZoomAfter+e;a("body").hasClass("lg-from-hash")&&e?f=0:a("body").removeClass("lg-from-hash"),b.zoomabletimeout=setTimeout(function(){b.core.$slide.eq(d).addClass("lg-zoomable")},f+30)});var d=1,e=function(c){var d,e,f=b.core.$outer.find(".lg-current .lg-image"),g=(a(window).width()-f.prop("offsetWidth"))/2,h=(a(window).height()-f.prop("offsetHeight"))/2+a(window).scrollTop();d=b.pageX-g,e=b.pageY-h;var i=(c-1)*d,j=(c-1)*e;f.css("transform","scale3d("+c+", "+c+", 1)").attr("data-scale",c),b.core.s.useLeftForZoom?f.parent().css({left:-i+"px",top:-j+"px"}).attr("data-x",i).attr("data-y",j):f.parent().css("transform","translate3d(-"+i+"px, -"+j+"px, 0)").attr("data-x",i).attr("data-y",j)},f=function(){d>1?b.core.$outer.addClass("lg-zoomed"):b.resetZoom(),d<1&&(d=1),e(d)},g=function(c,e,g,h){var i,j=e.prop("offsetWidth");i=b.core.s.dynamic?b.core.s.dynamicEl[g].width||e[0].naturalWidth||j:b.core.$items.eq(g).attr("data-width")||e[0].naturalWidth||j;var k;b.core.$outer.hasClass("lg-zoomed")?d=1:i>j&&(k=i/j,d=k||2),h?(b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop()):(b.pageX=c.pageX||c.originalEvent.targetTouches[0].pageX,b.pageY=c.pageY||c.originalEvent.targetTouches[0].pageY),f(),setTimeout(function(){b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},h=!1;b.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(a,c){var d=b.core.$slide.eq(c).find(".lg-image");d.on("dblclick",function(a){g(a,d,c)}),d.on("touchstart",function(a){h?(clearTimeout(h),h=null,g(a,d,c)):h=setTimeout(function(){h=null},300),a.preventDefault()})}),a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop(),e(d)}),a("#lg-zoom-out").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d-=b.core.s.scale,f())}),a("#lg-zoom-in").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d+=b.core.s.scale,f())}),a("#lg-actual-size").on("click.lg",function(a){g(a,b.core.$slide.eq(b.core.index).find(".lg-image"),b.core.index,!0)}),b.core.$el.on("onBeforeSlide.lg.tm",function(){d=1,b.resetZoom()}),b.zoomDrag(),b.zoomSwipe()},d.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()},d.prototype.zoomSwipe=function(){var a=this,b={},c={},d=!1,e=!1,f=!1;a.core.$slide.on("touchstart.lg",function(c){if(a.core.$outer.hasClass("lg-zoomed")){var d=a.core.$slide.eq(a.core.index).find(".lg-object");f=d.prop("offsetHeight")*d.attr("data-scale")>a.core.$outer.find(".lg").height(),e=d.prop("offsetWidth")*d.attr("data-scale")>a.core.$outer.find(".lg").width(),(e||f)&&(c.preventDefault(),b={x:c.originalEvent.targetTouches[0].pageX,y:c.originalEvent.targetTouches[0].pageY})}}),a.core.$slide.on("touchmove.lg",function(g){if(a.core.$outer.hasClass("lg-zoomed")){var h,i,j=a.core.$slide.eq(a.core.index).find(".lg-img-wrap");g.preventDefault(),d=!0,c={x:g.originalEvent.targetTouches[0].pageX,y:g.originalEvent.targetTouches[0].pageY},a.core.$outer.addClass("lg-zoom-dragging"),i=f?-Math.abs(j.attr("data-y"))+(c.y-b.y):-Math.abs(j.attr("data-y")),h=e?-Math.abs(j.attr("data-x"))+(c.x-b.x):-Math.abs(j.attr("data-x")),(Math.abs(c.x-b.x)>15||Math.abs(c.y-b.y)>15)&&(a.core.s.useLeftForZoom?j.css({left:h+"px",top:i+"px"}):j.css("transform","translate3d("+h+"px, "+i+"px, 0)"))}}),a.core.$slide.on("touchend.lg",function(){a.core.$outer.hasClass("lg-zoomed")&&d&&(d=!1,a.core.$outer.removeClass("lg-zoom-dragging"),a.touchendZoom(b,c,e,f))})},d.prototype.zoomDrag=function(){var b=this,c={},d={},e=!1,f=!1,g=!1,h=!1;b.core.$slide.on("mousedown.lg.zoom",function(d){var f=b.core.$slide.eq(b.core.index).find(".lg-object");h=f.prop("offsetHeight")*f.attr("data-scale")>b.core.$outer.find(".lg").height(),g=f.prop("offsetWidth")*f.attr("data-scale")>b.core.$outer.find(".lg").width(),b.core.$outer.hasClass("lg-zoomed")&&a(d.target).hasClass("lg-object")&&(g||h)&&(d.preventDefault(),c={x:d.pageX,y:d.pageY},e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.zoom",function(a){if(e){var i,j,k=b.core.$slide.eq(b.core.index).find(".lg-img-wrap");f=!0,d={x:a.pageX,y:a.pageY},b.core.$outer.addClass("lg-zoom-dragging"),j=h?-Math.abs(k.attr("data-y"))+(d.y-c.y):-Math.abs(k.attr("data-y")),i=g?-Math.abs(k.attr("data-x"))+(d.x-c.x):-Math.abs(k.attr("data-x")),b.core.s.useLeftForZoom?k.css({left:i+"px",top:j+"px"}):k.css("transform","translate3d("+i+"px, "+j+"px, 0)")}}),a(window).on("mouseup.lg.zoom",function(a){e&&(e=!1,b.core.$outer.removeClass("lg-zoom-dragging"),!f||c.x===d.x&&c.y===d.y||(d={x:a.pageX,y:a.pageY},b.touchendZoom(c,d,g,h)),f=!1),b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},d.prototype.touchendZoom=function(a,b,c,d){var e=this,f=e.core.$slide.eq(e.core.index).find(".lg-img-wrap"),g=e.core.$slide.eq(e.core.index).find(".lg-object"),h=-Math.abs(f.attr("data-x"))+(b.x-a.x),i=-Math.abs(f.attr("data-y"))+(b.y-a.y),j=(e.core.$outer.find(".lg").height()-g.prop("offsetHeight"))/2,k=Math.abs(g.prop("offsetHeight")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").height()+j),l=(e.core.$outer.find(".lg").width()-g.prop("offsetWidth"))/2,m=Math.abs(g.prop("offsetWidth")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").width()+l);(Math.abs(b.x-a.x)>15||Math.abs(b.y-a.y)>15)&&(d&&(i<=-k?i=-k:i>=-j&&(i=-j)),c&&(h<=-m?h=-m:h>=-l&&(h=-l)),d?f.attr("data-y",Math.abs(i)):i=-Math.abs(f.attr("data-y")),c?f.attr("data-x",Math.abs(h)):h=-Math.abs(f.attr("data-x")),e.core.s.useLeftForZoom?f.css({left:h+"px",top:i+"px"}):f.css("transform","translate3d("+h+"px, "+i+"px, 0)"))},d.prototype.destroy=function(){var b=this;b.core.$el.off(".lg.zoom"),a(window).off(".lg.zoom"),b.core.$slide.off(".lg.zoom"),b.core.$el.off(".lg.tm.zoom"),b.resetZoom(),clearTimeout(b.zoomabletimeout),b.zoomabletimeout=!1},a.fn.lightGallery.modules.zoom=d}()}); !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(a,b,c,d){var e=this;if(e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c,"lg-object",!0,b,d)),d)if(e.core.s.videojs)try{videojs(e.core.$slide.eq(b).find(".lg-html5").get(0),e.core.s.videojsOptions,function(){!e.videoLoaded&&e.core.s.autoplayFirstVideo&&this.play()})}catch(a){console.error("Make sure you have included videojs")}else!e.videoLoaded&&e.core.s.autoplayFirstVideo&&e.core.$slide.eq(b).find(".lg-html5").get(0).play()}function c(a,b){var c=this.core.$slide.eq(b).find(".lg-video-cont");c.hasClass("lg-has-iframe")||(c.css("max-width",this.core.s.videoMaxWidth),this.videoLoaded=!0)}function d(b,c,d){var e=this,f=e.core.$slide.eq(c),g=f.find(".lg-youtube").get(0),h=f.find(".lg-vimeo").get(0),i=f.find(".lg-dailymotion").get(0),j=f.find(".lg-vk").get(0),k=f.find(".lg-html5").get(0);if(g)g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(h)try{$f(h).api("pause")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(i)i.contentWindow.postMessage("pause","*");else if(k)if(e.core.s.videojs)try{videojs(k).pause()}catch(a){console.error("Make sure you have included videojs")}else k.pause();j&&a(j).attr("src",a(j).attr("src").replace("&autoplay","&noplay"));var l;l=e.core.s.dynamic?e.core.s.dynamicEl[d].src:e.core.$items.eq(d).attr("href")||e.core.$items.eq(d).attr("data-src");var m=e.core.isVideo(l,d)||{};(m.youtube||m.vimeo||m.dailymotion||m.vk)&&e.core.$outer.addClass("lg-hide-download")}var e={videoMaxWidth:"855px",autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.videoLoaded=!1,this.init(),this};f.prototype.init=function(){var e=this;e.core.$el.on("hasVideo.lg.tm",b.bind(this)),e.core.$el.on("onAferAppendSlide.lg.tm",c.bind(this)),e.core.doCss()&&e.core.$items.length>1&&(e.core.s.enableSwipe||e.core.s.enableDrag)?e.core.$el.on("onSlideClick.lg.tm",function(){var a=e.core.$slide.eq(e.core.index);e.loadVideoOnclick(a)}):e.core.$slide.on("click.lg",function(){e.loadVideoOnclick(a(this))}),e.core.$el.on("onBeforeSlide.lg.tm",d.bind(this)),e.core.$el.on("onAfterSlide.lg.tm",function(a,b){e.core.$slide.eq(b).removeClass("lg-video-playing")}),e.core.s.autoplayFirstVideo&&e.core.$el.on("onAferAppendSlide.lg.tm",function(a,b){if(!e.core.lGalleryOn){var c=e.core.$slide.eq(b);setTimeout(function(){e.loadVideoOnclick(c)},100)}})},f.prototype.loadVideo=function(b,c,d,e,f){var g="",h=1,i="",j=this.core.isVideo(b,e)||{};if(d&&(h=this.videoLoaded?0:this.core.s.autoplayFirstVideo?1:0),j.youtube)i="?wmode=opaque&autoplay="+h+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(i=i+"&"+a.param(this.core.s.youtubePlayerParams)),g='';else if(j.vimeo)i="?autoplay="+h+"&api=1",this.core.s.vimeoPlayerParams&&(i=i+"&"+a.param(this.core.s.vimeoPlayerParams)),g='';else if(j.dailymotion)i="?wmode=opaque&autoplay="+h+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(i=i+"&"+a.param(this.core.s.dailymotionPlayerParams)),g='';else if(j.html5){var k=f.substring(0,1);"."!==k&&"#"!==k||(f=a(f).html()),g=f}else j.vk&&(i="&autoplay="+h,this.core.s.vkPlayerParams&&(i=i+"&"+a.param(this.core.s.vkPlayerParams)),g='');return g},f.prototype.loadVideoOnclick=function(a){var b=this;if(a.find(".lg-object").hasClass("lg-has-poster")&&a.find(".lg-object").is(":visible"))if(a.hasClass("lg-has-video")){var c=a.find(".lg-youtube").get(0),d=a.find(".lg-vimeo").get(0),e=a.find(".lg-dailymotion").get(0),f=a.find(".lg-html5").get(0);if(c)c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(d)try{$f(d).api("play")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(e)e.contentWindow.postMessage("play","*");else if(f)if(b.core.s.videojs)try{videojs(f).play()}catch(a){console.error("Make sure you have included videojs")}else f.play();a.addClass("lg-video-playing")}else{a.addClass("lg-video-playing lg-has-video");var g,h,i=function(c,d){if(a.find(".lg-video").append(b.loadVideo(c,"",!1,b.core.index,d)),d)if(b.core.s.videojs)try{videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0),b.core.s.videojsOptions,function(){this.play()})}catch(a){console.error("Make sure you have included videojs")}else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play()};b.core.s.dynamic?(g=b.core.s.dynamicEl[b.core.index].src,h=b.core.s.dynamicEl[b.core.index].html,i(g,h)):(g=b.core.$items.eq(b.core.index).attr("href")||b.core.$items.eq(b.core.index).attr("data-src"),h=b.core.$items.eq(b.core.index).attr("data-html"),i(g,h));var j=a.find(".lg-object");a.find(".lg-video").append(j),a.find(".lg-video-object").hasClass("lg-html5")||(a.removeClass("lg-complete"),a.find(".lg-video-object").on("load.lg error.lg",function(){a.addClass("lg-complete")}))}},f.prototype.destroy=function(){this.videoLoaded=!1},a.fn.lightGallery.modules.video=f}()}); } !function(t){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=function(i,s){return void 0===s&&(s="undefined"!=typeof window?require("jquery"):require("jquery")(i)),t(s),s}:t(jQuery)}(function(t){return t.fn.tilt=function(i){var s=function(){this.ticking||(requestAnimationFrame(g.bind(this)),this.ticking=!0)},e=function(){var i=this;t(this).on("mousemove",o),t(this).on("mouseenter",a),this.settings.reset&&t(this).on("mouseleave",h),this.settings.glare&&t(window).on("resize",u.bind(i))},n=function(){var i=this;void 0!==this.timeout&&clearTimeout(this.timeout),t(this).css({transition:this.settings.speed+"ms "+this.settings.easing}),this.settings.glare&&this.glareElement.css({transition:"opacity "+this.settings.speed+"ms "+this.settings.easing}),this.timeout=setTimeout(function(){t(i).css({transition:""}),i.settings.glare&&i.glareElement.css({transition:""})},this.settings.speed)},a=function(i){this.ticking=!1,t(this).css({"will-change":"transform"}),n.call(this),t(this).trigger("tilt.mouseEnter")},r=function(i){return"undefined"==typeof i&&(i={pageX:t(this).offset().left+t(this).outerWidth()/2,pageY:t(this).offset().top+t(this).outerHeight()/2}),{x:i.pageX,y:i.pageY}},o=function(t){this.mousePositions=r(t),s.call(this)},h=function(){n.call(this),this.reset=!0,s.call(this),t(this).trigger("tilt.mouseLeave")},l=function(){var i=t(this).outerWidth(),s=t(this).outerHeight(),e=t(this).offset().left,n=t(this).offset().top,a=(this.mousePositions.x-e)/i,r=(this.mousePositions.y-n)/s,o=(this.settings.maxTilt/2-a*this.settings.maxTilt).toFixed(2),h=(r*this.settings.maxTilt-this.settings.maxTilt/2).toFixed(2),l=Math.atan2(this.mousePositions.x-(e+i/2),-(this.mousePositions.y-(n+s/2)))*(180/Math.PI);return{tiltX:o,tiltY:h,percentageX:100*a,percentageY:100*r,angle:l}},g=function(){return this.transforms=l.call(this),this.reset?(this.reset=!1,t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX(0deg) rotateY(0deg)"),void(this.settings.glare&&(this.glareElement.css("transform","rotate(180deg) translate(-50%, -50%)"),this.glareElement.css("opacity","0")))):(t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX("+("x"===this.settings.axis?0:this.transforms.tiltY)+"deg) rotateY("+("y"===this.settings.axis?0:this.transforms.tiltX)+"deg) scale3d("+this.settings.scale+","+this.settings.scale+","+this.settings.scale+")"),this.settings.glare&&(this.glareElement.css("transform","rotate("+this.transforms.angle+"deg) translate(-50%, -50%)"),this.glareElement.css("opacity",""+this.transforms.percentageY*this.settings.maxGlare/100)),t(this).trigger("change",[this.transforms]),void(this.ticking=!1))},c=function(){var i=this.settings.glarePrerender;if(i||t(this).append('
    '),this.glareElementWrapper=t(this).find(".js-tilt-glare"),this.glareElement=t(this).find(".js-tilt-glare-inner"),!i){var s={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};this.glareElementWrapper.css(s).css({overflow:"hidden"}),this.glareElement.css({position:"absolute",top:"50%",left:"50%","pointer-events":"none","background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth(),transform:"rotate(180deg) translate(-50%, -50%)","transform-origin":"0% 0%",opacity:"0"})}},u=function(){this.glareElement.css({width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth()})};return t.fn.tilt.destroy=function(){t(this).each(function(){t(this).find(".js-tilt-glare").remove(),t(this).css({"will-change":"",transform:""}),t(this).off("mousemove mouseenter mouseleave")})},t.fn.tilt.getValues=function(){var i=[];return t(this).each(function(){this.mousePositions=r.call(this),i.push(l.call(this))}),i},t.fn.tilt.reset=function(){t(this).each(function(){var i=this;this.mousePositions=r.call(this),this.settings=t(this).data("settings"),h.call(this),setTimeout(function(){i.reset=!1},this.settings.transition)})},this.each(function(){var s=this;this.settings=t.extend({maxTilt:t(this).is("[data-tilt-max]")?t(this).data("tilt-max"):20,perspective:t(this).is("[data-tilt-perspective]")?t(this).data("tilt-perspective"):300,easing:t(this).is("[data-tilt-easing]")?t(this).data("tilt-easing"):"cubic-bezier(.03,.98,.52,.99)",scale:t(this).is("[data-tilt-scale]")?t(this).data("tilt-scale"):"1",speed:t(this).is("[data-tilt-speed]")?t(this).data("tilt-speed"):"400",transition:!t(this).is("[data-tilt-transition]")||t(this).data("tilt-transition"),axis:t(this).is("[data-tilt-axis]")?t(this).data("tilt-axis"):null,reset:!t(this).is("[data-tilt-reset]")||t(this).data("tilt-reset"),glare:!!t(this).is("[data-tilt-glare]")&&t(this).data("tilt-glare"),maxGlare:t(this).is("[data-tilt-maxglare]")?t(this).data("tilt-maxglare"):1},i),this.init=function(){t(s).data("settings",s.settings),s.settings.glare&&c.call(s),e.call(s)},this.init()})},t("[data-tilt]").tilt(),!0});}(jQuery); !function(i){"use strict";i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width().theiaStickySidebar:after {content: ""; display: table; clear: both;}')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("
    ").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery); !function(n,t){"use strict";var e=function(n,t,e){var r;return function(){var u=this,i=arguments;r?clearTimeout(r):e&&n.apply(u,i),r=setTimeout(function(){e||n.apply(u,i),r=null},t||100)}};jQuery.fn[t]=function(n){return n?this.on("DOMNodeInserted DOMNodeRemoved",e(n)):this.trigger(t)}}(jQuery,"codevzWatch"); var Codevz_Plus=(function($){ "use strict"; if(! $.fn.codevz){ $.fn.codevz=function(n, i){ $(this).each(function(a){ var e=$(this); if(e.data('codevz')!==n||$('.vc_editor').length){ i.apply(e.data('codevz', n), [a]); }}); }} var body=$('body'), wind=$(window), lightbox_exclude='.xtra-share a,.entry-summary a,.esgbox,.jg-entry,.prettyphoto,.cz_grid_title,.ngg-fancybox,.fancybox,.lightbox,.kraut-lightbox-slickslider', lightbox_selector='.cz_lightbox:not(.cz_no_lightbox),.cz_a_lightbox:not(.cz_no_lightbox) a:not(.cz_no_lightbox),a[href*="youtube.com/watch?"]:not(.cz_no_lightbox),a[href*="youtu.be/watch?"]:not(.cz_no_lightbox),a[href*="vimeo.com/"]:not(.cz_no_lightbox),a[href*=".jpg"]:not(' + lightbox_exclude + '),a[href*=".jpeg"]:not(' + lightbox_exclude + '),a[href*=".png"]:not(' + lightbox_exclude + '),a[href*=".gif"]:not(' + lightbox_exclude + ')', ajaxurl=$('#intro').data('ajax')||ajaxurl, runScrollTime=0; return { init: function(){ this.popup(); this.css(); this.tabs(); this.tilt(); this.menus(); this.login(); this.share(); this.counter(); this.lazyLoad(); this.parallax(); this.accordion(); this.countdown(); this.backtotop(); this.separator(); this.image_zoom(); this.content_box(); this.extra_panel(); this.woocommerce(); this.team_tooltip(); this.lightGallery(); this.progress_bar(); this.inline_video(); this.before_after(); this.sticky_columns(); this.show_more_less(); this.responsive_text(); this.dwqa_textarea_lh(); this.load_google_map_js(); this.working_hours_line(); this.fix_wp_editor_google_fonts(); this.fix_header_icon_text_2(); this.runScroll(); }, runScroll: function(){ clearTimeout(runScrollTime); runScrollTime=setTimeout(function(){ Codevz_Plus.wpbakery_fix_full_row(); if(! $('.compose-mode').length){ wind.trigger('resize'); } wind.trigger('scroll'); }, 500); }, inview: function(e, i){ var docViewTop=wind.scrollTop(), docViewBottom=docViewTop + wind.height(), elemTop=e.offset().top, elemBottom=elemTop + e.height(); i=i ? 750:0; return(( elemTop <=docViewBottom + i)&&(elemBottom >=docViewTop - i)); }, wpbakery_fix_full_row: function(){ if($('.layout_1, .layout_2').length){ if($('[data-vc-stretch-content]').length||$('.compose-mode').length){ wind.off('resize.cz_fix_row').on('resize.cz_fix_row', function(){ setTimeout(function(){ $('[data-vc-stretch-content]').each(function(){ var la=$('.inner_layout'), eh=(la.width() - la.find('.page_content > .row').width()) / 2; $(this).css({ 'width': la.width(), 'left': body.hasClass('rtl') ? eh:-eh, 'margin-left': 0, 'margin-right': 0, }); }); }, 200); }); if($('.compose-mode').length){ setTimeout(function(){ wind.trigger('resize'); }, 100); }} } if($('.is_fixed_side').length&&body.hasClass('rtl')){ wind.on('resize', function(){ $('[data-vc-full-width="true"]').each(function(){ var en=$(this), offset=$('.page_content > .row > section').offset(); if($('.fixed_side_left').length){ en.css('padding-left', offset.left); }else if($('.fixed_side_right').length){ en.css('padding-left', offset.left); }}); }); }}, fix_header_icon_text_2: function(){ var icon_text=$('header .cz_elm_info_box'), breakpoint=960; icon_text.each(function(){ if($(this).parent().parent().find('.cz_elm_info_box').length){ breakpoint=1024; }}); wind.off('resize.cz_fix_row').on('resize.cz_fix_row', function(){ if(wind.width() < breakpoint){ icon_text.addClass('xtra-hide-text'); }else{ icon_text.removeClass('xtra-hide-text'); }}); }, responsive_text: function(){ var px_to_vw=function(s, w){ var n=s.match(/\d+/) - 2, v=(n / (w / 100)); return v > 2 ? v + 'vw':n + 'px'; }, elms=$('.cz_smart_fs').find('.cz_wpe_content [style*="font-size"]'), winWidth, cz='resize.cz_responsive_text'; if(elms.length){ wind.off(cz).on(cz, function(){ winWidth=wind.width(); if(winWidth <=1170){ elms.removeClass('js_smart_fs').codevz('smart_fs', function(){ var en=$(this), style, match; if(en.attr('data-ori-style')){ return; } if(! en.attr('data-ori-style')){ style=en.attr('style'); en.attr('data-ori-style', style); } match=style.match(/font-size: \d+.\w+px|font-size: \w+px/); if(match){ var nu=match[0].match(/\d+/); if(nu&&nu[0] > 18){ var vw=px_to_vw(match[0], winWidth), cw=en.closest('.cz_wpe_content').width(), pw=en.closest('.cz_smart_fs').parent().width(); if(cw > pw){ var tt=pw / cw; vw=vw.match(/\d+/) * tt; if(winWidth==pw){ vw=vw - 2; } vw=(vw - 2) + 'vw'; } vw&&en.attr('style', style.replace(match[0], 'font-size: ' + vw)); }} }); }else{ $('[data-ori-style]').each(function(){ var en=$(this); en.attr('style', en.attr('data-ori-style')).removeAttr('data-ori-style'); }); }}); }}, css: function(){ $('[data-cz-style]').codevz('data_style', function(){ var d=$(this), s=d.data('cz-style'); if(! $('#codevz_inline_styles').length){ $('head').append(''); } $('#codevz_inline_styles').append(s); setTimeout(function(){ d.removeAttr('data-cz-style'); }, 500); }); }, lightGallery: function(){ if($.fn.lightGallery&&! body.hasClass('no_lightbox')){ var d=body.data('lightGallery'); d&&d.destroy(true); $('.cz_grid').each(function(i){ $(this).lightGallery({ selector: lightbox_selector, galleryId: i + 1 }); }); body.attr('data-lightGallery', 1).lightGallery({ selector: lightbox_selector }); }}, sticky_columns: function(){ $('.fixed_side').codevz('fixed_side', function(){ var en=$(this), ff_pos=en.hasClass('fixed_side_left') ? 'left':'right', inla=$('.inner_layout'); en.theiaStickySidebar({additionalMarginTop: 0,updateSidebarHeight: false}); wind.on('resize', function(){ if(en.css('display')==='none'){ inla.css('width', '100%'); }else{ en.css('height', wind.height() - parseInt($('#layout').css('marginTop') + body.css('marginTop'))); inla.css('width', 'calc(100% - ' + en.outerWidth() + 'px)'); }}); }); $('.cz_sticky .row > aside, .cz_sticky_col').codevz('sticky', function(){ $(this).theiaStickySidebar({additionalMarginTop:($('.header_is_sticky:not(.smart_sticky)').height() + 60),updateSidebarHeight: false}); }); }, backtotop: function(){ $('.backtotop, a[href*="#top"]').codevz('backtotop', function(){ var en=$(this); en.on('click', function(e){ $('html, body').animate({scrollTop: 0}, 1200, 'easeInOutExpo'); e.preventDefault(); }); if(en.hasClass('backtotop')){ wind.on('scroll', function(){ if($(this).scrollTop() < 600){ en.fadeOut('fast').next('.fixed_contact').css({right: 30}); }else{ en.fadeIn('fast').next('.fixed_contact').css({right:(en.outerHeight() + 34)}); var jch=$('._bottom_3v'); if(jch.length){ if($('.headerBox_2k').css('display')=='block'){ jch=$('.headerBox_2k').height() - 20; }else{ jch=jch.height() - 20; } en.css('marginBottom', jch).next('.fixed_contact').css('marginBottom', jch); }else if($('.__jivoMobileButton').length){ jch=$('.__jivoMobileButton').height() - 10; en.css('marginBottom', jch).next('.fixed_contact').css('marginBottom', jch); }} }); }}); $('.fixed_contact').codevz('fixed_contact', function(){ $(this).on('click', function(e){ $(this).next('.fixed_contact').fadeToggle('fast').css({bottom: $(this).height() + parseInt($(this).css('margin-bottom')) + 40 }); e.stopPropagation(); }); body.on('click', function (e){ if($('div.fixed_contact').is(':visible')){ $('div.fixed_contact').fadeOut('fast'); }}); }); }, working_hours_line: function(){ wind.off('resize.cz_whlb').on('resize.cz_whlb', function(){ $('.cz_wh_line_between .cz_wh_line').codevz('whlb', function(){ var en=$(this), pa=en.parent(), ic=pa.find('span i'), ll=pa.find('.cz_wh_left b').outerWidth(true) +(ic.length ? ic.outerWidth(true) + 8:0) + 12 + 'px', rr=pa.find('.cz_wh_right').outerWidth(true) + 12 + 'px', is_rtl=body.hasClass('rtl'); en.attr('style', en.attr('style')).css({ 'left':(is_rtl ? rr:ll), 'right':(is_rtl ? ll:rr) }); }); }); }, team_tooltip: function(){ body.on({ mouseenter: function (){ $('.cz_team_content', this).fadeIn(100); }, mouseleave: function (){ $('.cz_team_content', this).fadeOut(100); }, mousemove: function (e){ var w=$('.cz_team_content', this).width() / 2, x=e.offsetX, y=e.offsetY + 30; $('.cz_team_content', this).css({top: y, left: x}); }}, '.cz_team_6 .cz_team_img, .cz_team_7 .cz_team_img'); }, stringToSlug: function(str){ var s='', t=$.trim(str); s=t.replace(/[^a-z0-9-]/gi, '-').replace(/-+/g, '_').replace(/^-|-$/g, ''); return s.toLowerCase(); }, fix_wp_editor_google_fonts: function(){ $('.wpb_text_column, .cz_wpe_content').find('[style*="font-family"]').not('i').codevz('fonts', function(){ var f_fonts=[], o_fonts, el, id, defs; el=$(this).css('font-family'), defs=[ 'FontAwesome', 'fontelo', 'Open Sans', 'Arial', 'Impact', 'monospace', 'Tahoma', 'sans-serif', 'Sans serif', 'VC-Icons', 'Arial Black', 'Comic Sans MS', 'Lucida Sans Unicode', 'Trebuchet MS', 'Verdana', 'Courier New', 'Lucida Console', 'Palatino Linotype', 'Times New Roman' ]; if(typeof el!=='undefined'&&el&&f_fonts.indexOf(el)==-1&&defs.indexOf(el)==-1&&el.indexOf(',') <=0){ f_fonts.push(el); } $('link[href*="fonts.googleapis.com"]').each(function(){ o_fonts +=$(this).attr('href'); }); $.each(f_fonts, function(n, i){ i=i.replace(/\s/g, '+').replace(/\"|\'/g, ''), id='cz_gfont_' + Codevz_Plus.stringToSlug(i); if(o_fonts&&o_fonts.indexOf(i) <=0&&! $('#' + id).length){ $('head').append(''); }}); }); }, popup: function(i){ $('.cz_popup_modal').codevz('popup_clone', function(){ var en=$(this), outer=en.parent(); if(outer.length&&! en.closest('.vc_cz_popup').length){ body.append(outer[0].outerHTML); outer.remove(); }}); if($('.compose-mode').length){ $('.cz_edit_popup_link', parent.document.body).remove(); } $('.cz_popup_modal').each(function(){ var dis=$(this), idd=dis.attr('id'), ovl=dis.data('overlay-bg'), dly=dis.data('settimeout'), scr=dis.data('after-scroll'), par=$('#' + idd).closest('.vc_cz_popup'), show_popup=function(){ par.fadeIn('fast'); $('.vc_cz_popup, #' + idd).fadeIn('fast').delay(1000).addClass('cz_show_popup'); $('.cz_overlay', dis).css('background', ovl).fadeIn('fast'); if(typeof Codevz_Plus.slick!='undefined'){ Codevz_Plus.slick(); }}; if(typeof wpcf7!='undefined'&&dis.find('.wpcf7').length){ dis.find('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); } if($.fn.lightGallery){ $('#' + idd).lightGallery({selector: lightbox_selector}); } $("a[href*='#" + idd + "']").off().on('click', function(e){ show_popup(); e.preventDefault(); }); dis.attr('data-popup', idd); if($('#' + idd).length){ if(par.length){ $('#' + idd).each(function(){ $('.vc_navbar-nav', parent.document.body).append(''); }); par.attr('style', $('#' + idd).attr('style')); $('.edit_' + idd, parent.document.body).off().on('click', function(e){ show_popup(); e.preventDefault(); }); $("#" + idd + " .cz_close_popup, #cz_close_popup, .cz_overlay, a[href*='#cz_close_popup']").off(); $('.vc_control-btn-delete', par).on('click', function(){ $('.edit_' + idd, parent.document.body).closest('li').remove(); }); } $("#" + idd + " .cz_close_popup, #cz_close_popup, .cz_overlay, a[href*='#cz_close_popup']").on('click', function(e){ $('.cz_overlay').fadeOut('fast').removeClass('cz_show_popup').css('background', ''); $('.vc_cz_popup, .vc_cz_popup, #' + idd).hide().removeClass('cz_show_popup'); if(dis.hasClass('cz_popup_show_once')){ localStorage.setItem(idd, 1); }}); if(dis.hasClass('cz_popup_show_always')&&localStorage.getItem(idd)){ localStorage.removeItem(idd); } if(dis.hasClass('cz_popup_page_start')&&! localStorage.getItem(idd)){ show_popup(); }else if(dis.hasClass('cz_popup_page_loaded')&&! localStorage.getItem(idd)){ wind.on('load', function(){ show_popup(); }); } if(dly){ setTimeout(function(){ show_popup(); }, dly); } if(scr){ wind.on('scroll.popup_scroll', function(){ var scrollPercent=100 * $(window).scrollTop() / ($(document).height() - $(window).height()); if(scrollPercent >=scr){ show_popup(); wind.off('scroll.popup_scroll'); }}); }}else{ console.log('Popup not found, id: #' + idd); }}); }, tabs: function(){ $('.compose-mode').length&&$('.cz_tabs').data('js_tabs', 0); $('.cz_tabs').codevz('tabs', function(){ var dis=$(this), nav=dis.hasClass('cz_tabs_nav_after') ? 'append':'prepend'; if(! $('.cz_tabs_nav', dis).length){ dis[nav]('
    '); } $('.cz_tabs_nav div', dis).html(''); $('.cz_tab_a', dis).each(function(){ $('.cz_tabs_nav div', dis).prepend($(this).removeClass('vc_empty-element').clone()); }); if(! dis.find('> select').length){ dis.prepend('