jQuery(document).ready(function($){ "use strict"; var window_width, window_height, scroll_top; var adminbar=$('#wpadminbar'); var adminbar_height=0; var header=$('#cshero-header'); var header_top=0; var scroll_status=''; $('.felugro-kep').magnificPopup({ type: 'image' }); $(window).on('load', function(){ scroll_top=$(window).scrollTop(); window_width=$(window).width(); window_height=$(window).height(); adminbar_height=adminbar.length > 0 ? adminbar.outerHeight(true):0 ; header_top=header.length > 0 ? header.offset().top - adminbar_height:0 ; if(CMSOptions.menu_sticky=='1'){ cms_stiky_menu(scroll_top); } cms_auto_video_width(); cms_mobile_menu(); cms_page_loading(); cms_enscroll(); cms_add_class(); cms_scroll_to_content(); demos(); cms_section_offset(); if(CMSOptions.back_to_top=='1'){ $('body').append('
'); cms_back_to_top(); } $(".cms-carousel-attorney-layout1").css('opacity','1'); $(".view-demos").css('opacity','1'); $(".vc_row-o-full-height").addClass('row-show').css('opacity','1'); }); window.onbeforeunload=function(){ cms_page_loading(1); } $(window).on('resize', function(event, ui){ window_width=$(event.target).width(); window_height=$(window).height(); scroll_top=$(window).scrollTop(); if(CMSOptions.menu_sticky=='1'){ cms_stiky_menu(scroll_top); } cms_mobile_menu(); cms_auto_video_width(); cms_enscroll(); demos(); cms_section_offset(); }); var lastScrollTop=0; $(window).on('scroll', function(){ scroll_top=$(window).scrollTop(); if(scroll_top < lastScrollTop){ scroll_status='up'; }else{ scroll_status='down'; } lastScrollTop=scroll_top; if(CMSOptions.menu_sticky=='1'){ cms_stiky_menu(); } cms_back_to_top(); }); function cms_stiky_menu(){ if(header_top < scroll_top&&window_width > 992){ switch (true){ case (window_width > 0): header.addClass('header-fixed'); break; }}else{ header.removeClass('header-fixed'); }} $('body').on('click', '#cshero-menu-mobile .cms-icon-menu', function(){ var navigation=$(this).parents().find('#cshero-header-navigation'); if(!navigation.hasClass('collapse')){ navigation.addClass('collapse'); }else{ navigation.removeClass('collapse'); }}); function cms_page_loading($load){ switch ($load){ case 1: $('#cms-loadding').css('display','block') break; default: $('#cms-loadding').css('display','none') break; }} function cms_mobile_menu(){ var menu=$('#cshero-header-navigation'); switch (true){ case (window_width <=992&&window_width >=768): menu.removeClass('phones-nav').addClass('tablets-nav'); cms_mobile_menu_group(menu); break; case (window_width <=768): menu.removeClass('tablets-nav').addClass('phones-nav'); break; default: menu.removeClass('mobile-nav tablets-nav'); menu.find('li').removeClass('mobile-group'); break; }} function demos(){ var demo_content_h=$('.view-demos-content').height(); $('.view-demos').css('margin-bottom',-demo_content_h+'px'); $('.view-demos .open').on('click', function(){ $('.view-demos').toggleClass('opened'); }) } if(CMSOptions.one_page==true){ var one_page_options={'filter':'.onepage'}; if(CMSOptions.one_page_speed!=undefined) one_page_options.speed=parseInt(CMSOptions.one_page_speed); if(CMSOptions.one_page_easing!=undefined) one_page_options.easing=CMSOptions.one_page_easing; $('#site-navigation').singlePageNav(one_page_options); } function cms_mobile_menu_group(nav){ nav.each(function(){ $(this).find('li').each(function(){ if($(this).find('ul:first').length > 0){ $(this).addClass('mobile-group'); }}); }); } $('.cms-gallery-item').magnificPopup({ delegate: 'a.p-view', type: 'image', gallery: { enabled: true }, mainClass: 'mfp-fade' }); function cms_scroll_to_content(){ $('.scroll-to-content').on('click', function(e){ var id_scroll=$(this).attr('href'); var sticky_height=$('.header-fixed').height(); e.preventDefault(); $("html, body").animate({ scrollTop: $(id_scroll).offset().top - 55 }, 800); }); } $('.cms-image-zoom').magnificPopup({ delegate: 'a.p-view', type: 'image', mainClass: 'mfp-fade', }); $('.popup-modal').magnificPopup({ type: 'inline', preloader: false, focus: '#name', callbacks: { beforeOpen: function(){ if($(window).width() < 700){ this.st.focus=false; }else{ this.st.focus='#name'; }} }}); var cms_parallax=$('.cms_parallax'); if(cms_parallax.length > 0){ cms_parallax.each(function(){ "use strict"; var speed=$(this).attr('data-speed'); speed=(speed!=undefined&&speed!='') ? speed:0.1 ; $(this).parallax("50%", speed); }); } $('body').on('click', '#back_to_top', function (){ $("html, body").animate({ scrollTop: 0 }, 1500); }); $('.cs-social.default [data-rel="tooltip"]').tooltip(); $('.single-gallery-wrap [data-rel="tooltip"]').tooltip(); $('#sidebar #searchform').find("input[type='text']").each(function(ev){ if(!$(this).val()){ $(this).attr("placeholder", "Search..."); }}); $('#searchform').find("input[type='text']").each(function(ev){ if(!$(this).val()){ $(this).attr("placeholder", "Type Your Search Words"); }}); $('.tnp-field-email').find("input[type='email']").each(function(ev){ if(!$(this).val()){ $(this).attr("placeholder", "Subscribe Our Newsletter"); }}); function cms_back_to_top(){ if(scroll_top < window_height){ $('#back_to_top').addClass('off').removeClass('on'); }else{ $('#back_to_top').removeClass('off').addClass('on'); }} $(document).on('click',function(e){ if(e.target.className=='cshero-popup-search open') $('.cshero-popup-search').removeClass('open'); }); function cms_auto_video_width(){ $('.entry-video iframe').each(function(){ var v_width=$(this).width(); v_width=v_width / (16/9); $(this).attr('height',v_width + 35); }) } function cms_enscroll(){ $('.cshero-hidden-sidebar .sidebar-inner').enscroll(); $('#cshero-header-left').enscroll(); $('.cshero-popup-menu .menu-main-menu').enscroll(); } function cms_add_class(){ $(".cart-contents").on('click',function(){ $('.widget_shopping_cart').toggleClass('open'); }) $(".nav-button-icon .fa-search").on('click',function(){ $('.widget-search-header').toggleClass('open'); }) $(".nav-button-icon .fa-shopping-cart").on('click',function(){ $('.widget_shopping_cart').toggleClass('open'); }) $("#cshero-header-navigation .hidden-sidebar").on('click',function(){ $('.cshero-hidden-sidebar').toggleClass('open'); $('#cms-theme').toggleClass('hidden-sidebar-active'); }) $(".get-form-quote").on('click',function(){ $('.quote-form-popup-wrapper').addClass('open'); }) $(".quote-form-popup-wrapper .form-close").on('click',function(){ $('.quote-form-popup-wrapper').removeClass('open'); }) $("
").insertAfter(".rev_slider .tparrows:last-child"); } $('.request-form').parents('.wpcf7-form').addClass('request-form-active'); $('.plus').on('click', function(){ $(this).parent().find('input[type="number"]').get(0).stepUp(); }); $('.minus').on('click', function(){ $(this).parent().find('input[type="number"]').get(0).stepDown(); }); $(document).on('keyup',function(evt){ if(evt.keyCode==27){ $('.quote-form-popup-wrapper').removeClass('open'); $('#cms-theme').removeClass('hidden-sidebar-active'); }}); $(document).on('click',function(e){ if(e.target.className=='quote-form-popup-wrapper open') $('.quote-form-popup-wrapper').removeClass('open'); }); $('.sidebar-close').on('click',function(){ $('.cshero-hidden-sidebar').removeClass('open'); $('#cms-theme').removeClass('hidden-sidebar-active'); }); $('#cshero-menu-left-mobile').on('click',function(){ $('#cshero-menu-left-mobile .popup_menu').toggleClass('active'); $('.header-14').toggleClass('menu-left-open'); }); $('.cms-button-video').magnificPopup({ type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); $(".dislink a").click(function(){ return false; }); $('.login-open').on('click',function(){ $('.cms-login-wrap').addClass('open'); }); $('.register-open').on('click',function(){ $('.cms-register-wrap').addClass('open'); }); $('.switch_to_login').on('click',function(){ $('.cms-register-wrap').removeClass('open'); $('.cms-login-wrap').addClass('open'); }); $('.switch_to_sign_up').on('click',function(){ $('.cms-login-wrap').removeClass('open'); $('.cms-register-wrap').addClass('open'); }); $(document).on('keyup',function(evt){ if(evt.keyCode==27){ $('.cms-login-wrap').removeClass('open'); $('.cms-register-wrap').removeClass('open'); }}); $(document).on('click',function(e){ if(e.target.className=='cms-login-wrap cms-popup open'){ $('.cms-login-wrap').removeClass('open'); } if(e.target.className=='cms-register-wrap cms-popup open'){ $('.cms-register-wrap').removeClass('open'); }}); $('.ytp-large-play-button').trigger('click'); $(".row-overlay").append("
"); function cms_section_offset(){ if($(window).width() > 992){ var w_desktop=$(window).width(); var w_padding=(w_desktop - 1140)/2; $('.section-offset-left > .vc_column-inner').css('padding-left',w_padding+'px'); $('.section-offset-right > .vc_column-inner').css('padding-right',w_padding+'px'); }} $(".h-button-menu").on('click',function(){ $('.cshero-popup-menu').toggleClass('open'); }) $(".menu-popup-close").on('click',function(){ $('.cshero-popup-menu').removeClass('open'); }) }); (function ($){ "use strict"; $(document).ready(function(){ var $menu=$('.main-navigation'); $menu.find('li').each(function(){ var $submenu=$(this).find('> ul'); if($submenu.length==1){ $(this).on('hover', function(){ if($submenu.offset().left + $submenu.width() > $(window).width()){ $submenu.addClass('back'); }else if($submenu.offset().left < 0){ $submenu.addClass('back'); }}); }}); $('.nav-menu li.menu-item-has-children').append(''); $('.cs-menu-toggle').on('click',function(){ $(this).prev().toggleClass('submenu-open'); $(this).prev().fadeToggle('slow'); }); var nav_height=$('.cshero-popup-menu .menu-main-menu').height(); $('.cshero-popup-menu .menu-main-menu').css('height',nav_height+'px'); }); })(jQuery); ;(function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ factory(require('jquery')); }else{ factory(window.jQuery||window.Zepto); }}(function($){ var CLOSE_EVENT='Close', BEFORE_CLOSE_EVENT='BeforeClose', AFTER_CLOSE_EVENT='AfterClose', BEFORE_APPEND_EVENT='BeforeAppend', MARKUP_PARSE_EVENT='MarkupParse', OPEN_EVENT='Open', CHANGE_EVENT='Change', NS='mfp', EVENT_NS='.' + NS, READY_CLASS='mfp-ready', REMOVING_CLASS='mfp-removing', PREVENT_CLOSE_CLASS='mfp-prevent-close'; var mfp, MagnificPopup=function(){}, _isJQ = !!(window.jQuery), _prevStatus, _window=$(window), _document, _prevContentType, _wrapClasses, _currPopupType; var _mfpOn=function(name, f){ mfp.ev.on(NS + name + EVENT_NS, f); }, _getEl=function(className, appendTo, html, raw){ var el=document.createElement('div'); el.className='mfp-'+className; if(html){ el.innerHTML=html; } if(!raw){ el=$(el); if(appendTo){ el.appendTo(appendTo); }}else if(appendTo){ appendTo.appendChild(el); } return el; }, _mfpTrigger=function(e, data){ mfp.ev.triggerHandler(NS + e, data); if(mfp.st.callbacks){ e=e.charAt(0).toLowerCase() + e.slice(1); if(mfp.st.callbacks[e]){ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data:[data]); }} }, _getCloseBtn=function(type){ if(type!==_currPopupType||!mfp.currTemplate.closeBtn){ mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%', mfp.st.tClose)); _currPopupType=type; } return mfp.currTemplate.closeBtn; }, _checkInstance=function(){ if(!$.magnificPopup.instance){ mfp=new MagnificPopup(); mfp.init(); $.magnificPopup.instance=mfp; }}, supportsTransitions=function(){ var s=document.createElement('p').style, // 's' for style. better to create an element if body yet to exist v=['ms','O','Moz','Webkit']; // 'v' for vendor if(s['transition']!==undefined){ return true; } while(v.length){ if(v.pop() + 'Transition' in s){ return true; }} return false; }; MagnificPopup.prototype={ constructor: MagnificPopup, init: function(){ var appVersion=navigator.appVersion; mfp.isIE7=appVersion.indexOf("MSIE 7.")!==-1; mfp.isIE8=appVersion.indexOf("MSIE 8.")!==-1; mfp.isLowIE=mfp.isIE7||mfp.isIE8; mfp.isAndroid=(/android/gi).test(appVersion); mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion); mfp.supportsTransition=supportsTransitions(); mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent)); _document=$(document); mfp.popupsCache={};}, open: function(data){ var i; if(data.isObj===false){ mfp.items=data.items.toArray(); mfp.index=0; var items=data.items, item; for(i=0; i < items.length; i++){ item=items[i]; if(item.parsed){ item=item.el[0]; } if(item===data.el[0]){ mfp.index=i; break; }} }else{ mfp.items=$.isArray(data.items) ? data.items:[data.items]; mfp.index=data.index||0; } if(mfp.isOpen){ mfp.updateItemHTML(); return; } mfp.types=[]; _wrapClasses=''; if(data.mainEl&&data.mainEl.length){ mfp.ev=data.mainEl.eq(0); }else{ mfp.ev=_document; } if(data.key){ if(!mfp.popupsCache[data.key]){ mfp.popupsCache[data.key]={};} mfp.currTemplate=mfp.popupsCache[data.key]; }else{ mfp.currTemplate={};} mfp.st=$.extend(true, {}, $.magnificPopup.defaults, data); mfp.fixedContentPos=mfp.st.fixedContentPos==='auto' ? !mfp.probablyMobile:mfp.st.fixedContentPos; if(mfp.st.modal){ mfp.st.closeOnContentClick=false; mfp.st.closeOnBgClick=false; mfp.st.showCloseBtn=false; mfp.st.enableEscapeKey=false; } if(!mfp.bgOverlay){ mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS, function(){ mfp.close(); }); mfp.wrap=_getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e){ if(mfp._checkIfClose(e.target)){ mfp.close(); }}); mfp.container=_getEl('container', mfp.wrap); } mfp.contentContainer=_getEl('content'); if(mfp.st.preloader){ mfp.preloader=_getEl('preloader', mfp.container, mfp.st.tLoading); } var modules=$.magnificPopup.modules; for(i=0; i < modules.length; i++){ var n=modules[i]; n=n.charAt(0).toUpperCase() + n.slice(1); mfp['init'+n].call(mfp); } _mfpTrigger('BeforeOpen'); if(mfp.st.showCloseBtn){ if(!mfp.st.closeBtnInside){ mfp.wrap.append(_getCloseBtn()); }else{ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item){ values.close_replaceWith=_getCloseBtn(item.type); }); _wrapClasses +=' mfp-close-btn-in'; }} if(mfp.st.alignTop){ _wrapClasses +=' mfp-align-top'; } if(mfp.fixedContentPos){ mfp.wrap.css({ overflow: mfp.st.overflowY, overflowX: 'hidden', overflowY: mfp.st.overflowY }); }else{ mfp.wrap.css({ top: _window.scrollTop(), position: 'absolute' }); } if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){ mfp.bgOverlay.css({ height: _document.height(), position: 'absolute' }); } if(mfp.st.enableEscapeKey){ _document.on('keyup' + EVENT_NS, function(e){ if(e.keyCode===27){ mfp.close(); }}); } _window.on('resize' + EVENT_NS, function(){ mfp.updateSize(); }); if(!mfp.st.closeOnContentClick){ _wrapClasses +=' mfp-auto-cursor'; } if(_wrapClasses) mfp.wrap.addClass(_wrapClasses); var windowHeight=mfp.wH=_window.height(); var windowStyles={}; if(mfp.fixedContentPos){ if(mfp._hasScrollBar(windowHeight)){ var s=mfp._getScrollbarSize(); if(s){ windowStyles.marginRight=s; }} } if(mfp.fixedContentPos){ if(!mfp.isIE7){ windowStyles.overflow='hidden'; }else{ $('body, html').css('overflow', 'hidden'); }} var classesToadd=mfp.st.mainClass; if(mfp.isIE7){ classesToadd +=' mfp-ie7'; } if(classesToadd){ mfp._addClassToMFP(classesToadd); } mfp.updateItemHTML(); _mfpTrigger('BuildControls'); $('html').css(windowStyles); mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||$(document.body)); mfp._lastFocusedEl=document.activeElement; setTimeout(function(){ if(mfp.content){ mfp._addClassToMFP(READY_CLASS); mfp._setFocus(); }else{ mfp.bgOverlay.addClass(READY_CLASS); } _document.on('focusin' + EVENT_NS, mfp._onFocusIn); }, 16); mfp.isOpen=true; mfp.updateSize(windowHeight); _mfpTrigger(OPEN_EVENT); return data; }, close: function(){ if(!mfp.isOpen) return; _mfpTrigger(BEFORE_CLOSE_EVENT); mfp.isOpen=false; if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){ mfp._addClassToMFP(REMOVING_CLASS); setTimeout(function(){ mfp._close(); }, mfp.st.removalDelay); }else{ mfp._close(); }}, _close: function(){ _mfpTrigger(CLOSE_EVENT); var classesToRemove=REMOVING_CLASS + ' ' + READY_CLASS + ' '; mfp.bgOverlay.detach(); mfp.wrap.detach(); mfp.container.empty(); if(mfp.st.mainClass){ classesToRemove +=mfp.st.mainClass + ' '; } mfp._removeClassFromMFP(classesToRemove); if(mfp.fixedContentPos){ var windowStyles={marginRight: ''}; if(mfp.isIE7){ $('body, html').css('overflow', ''); }else{ windowStyles.overflow=''; } $('html').css(windowStyles); } _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); mfp.ev.off(EVENT_NS); mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); mfp.bgOverlay.attr('class', 'mfp-bg'); mfp.container.attr('class', 'mfp-container'); if(mfp.st.showCloseBtn && (!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){ if(mfp.currTemplate.closeBtn) mfp.currTemplate.closeBtn.detach(); } if(mfp._lastFocusedEl){ $(mfp._lastFocusedEl).focus(); } mfp.currItem=null; mfp.content=null; mfp.currTemplate=null; mfp.prevHeight=0; _mfpTrigger(AFTER_CLOSE_EVENT); }, updateSize: function(winHeight){ if(mfp.isIOS){ var zoomLevel=document.documentElement.clientWidth / window.innerWidth; var height=window.innerHeight * zoomLevel; mfp.wrap.css('height', height); mfp.wH=height; }else{ mfp.wH=winHeight||_window.height(); } if(!mfp.fixedContentPos){ mfp.wrap.css('height', mfp.wH); } _mfpTrigger('Resize'); }, updateItemHTML: function(){ var item=mfp.items[mfp.index]; mfp.contentContainer.detach(); if(mfp.content) mfp.content.detach(); if(!item.parsed){ item=mfp.parseEl(mfp.index); } var type=item.type; _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type:'', type]); mfp.currItem=item; if(!mfp.currTemplate[type]){ var markup=mfp.st[type] ? mfp.st[type].markup:false; _mfpTrigger('FirstMarkupParse', markup); if(markup){ mfp.currTemplate[type]=$(markup); }else{ mfp.currTemplate[type]=true; }} if(_prevContentType&&_prevContentType!==item.type){ mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); } var newContent=mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); mfp.appendContent(newContent, type); item.preloaded=true; _mfpTrigger(CHANGE_EVENT, item); _prevContentType=item.type; mfp.container.prepend(mfp.contentContainer); _mfpTrigger('AfterChange'); }, appendContent: function(newContent, type){ mfp.content=newContent; if(newContent){ if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside && mfp.currTemplate[type]===true){ if(!mfp.content.find('.mfp-close').length){ mfp.content.append(_getCloseBtn()); }}else{ mfp.content=newContent; }}else{ mfp.content=''; } _mfpTrigger(BEFORE_APPEND_EVENT); mfp.container.addClass('mfp-'+type+'-holder'); mfp.contentContainer.append(mfp.content); }, parseEl: function(index){ var item=mfp.items[index], type; if(item.tagName){ item={ el: $(item) };}else{ type=item.type; item={ data: item, src: item.src };} if(item.el){ var types=mfp.types; for(var i=0; i < types.length; i++){ if(item.el.hasClass('mfp-'+types[i])){ type=types[i]; break; }} item.src=item.el.attr('data-mfp-src'); if(!item.src){ item.src=item.el.attr('href'); }} item.type=type||mfp.st.type||'inline'; item.index=index; item.parsed=true; mfp.items[index]=item; _mfpTrigger('ElementParse', item); return mfp.items[index]; }, addGroup: function(el, options){ var eHandler=function(e){ e.mfpEl=this; mfp._openClick(e, el, options); }; if(!options){ options={};} var eName='click.magnificPopup'; options.mainEl=el; if(options.items){ options.isObj=true; el.off(eName).on(eName, eHandler); }else{ options.isObj=false; if(options.delegate){ el.off(eName).on(eName, options.delegate , eHandler); }else{ options.items=el; el.off(eName).on(eName, eHandler); }} }, _openClick: function(e, el, options){ var midClick=options.midClick!==undefined ? options.midClick:$.magnificPopup.defaults.midClick; if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey)){ return; } var disableOn=options.disableOn!==undefined ? options.disableOn:$.magnificPopup.defaults.disableOn; if(disableOn){ if($.isFunction(disableOn)){ if(!disableOn.call(mfp)){ return true; }}else{ if(_window.width() < disableOn){ return true; }} } if(e.type){ e.preventDefault(); if(mfp.isOpen){ e.stopPropagation(); }} options.el=$(e.mfpEl); if(options.delegate){ options.items=el.find(options.delegate); } mfp.open(options); }, updateStatus: function(status, text){ if(mfp.preloader){ if(_prevStatus!==status){ mfp.container.removeClass('mfp-s-'+_prevStatus); } if(!text&&status==='loading'){ text=mfp.st.tLoading; } var data={ status: status, text: text }; _mfpTrigger('UpdateStatus', data); status=data.status; text=data.text; mfp.preloader.html(text); mfp.preloader.find('a').on('click', function(e){ e.stopImmediatePropagation(); }); mfp.container.addClass('mfp-s-'+status); _prevStatus=status; }}, _checkIfClose: function(target){ if($(target).hasClass(PREVENT_CLOSE_CLASS)){ return; } var closeOnContent=mfp.st.closeOnContentClick; var closeOnBg=mfp.st.closeOnBgClick; if(closeOnContent&&closeOnBg){ return true; }else{ if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){ return true; } if((target!==mfp.content[0]&&!$.contains(mfp.content[0], target))){ if(closeOnBg){ if($.contains(document, target)){ return true; }} }else if(closeOnContent){ return true; }} return false; }, _addClassToMFP: function(cName){ mfp.bgOverlay.addClass(cName); mfp.wrap.addClass(cName); }, _removeClassFromMFP: function(cName){ this.bgOverlay.removeClass(cName); mfp.wrap.removeClass(cName); }, _hasScrollBar: function(winHeight){ return((mfp.isIE7 ? _document.height():document.body.scrollHeight) > (winHeight||_window.height())); }, _setFocus: function(){ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus(); }, _onFocusIn: function(e){ if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){ mfp._setFocus(); return false; }}, _parseMarkup: function(template, values, item){ var arr; if(item.data){ values=$.extend(item.data, values); } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function(key, value){ if(value===undefined||value===false){ return true; } arr=key.split('_'); if(arr.length > 1){ var el=template.find(EVENT_NS + '-'+arr[0]); if(el.length > 0){ var attr=arr[1]; if(attr==='replaceWith'){ if(el[0]!==value[0]){ el.replaceWith(value); }}else if(attr==='img'){ if(el.is('img')){ el.attr('src', value); }else{ el.replaceWith(''); }}else{ el.attr(arr[1], value); }} }else{ template.find(EVENT_NS + '-'+key).html(value); }}); }, _getScrollbarSize: function(){ if(mfp.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return mfp.scrollbarSize; }}; $.magnificPopup={ instance: null, proto: MagnificPopup.prototype, modules: [], open: function(options, index){ _checkInstance(); if(!options){ options={};}else{ options=$.extend(true, {}, options); } options.isObj=true; options.index=index||0; return this.instance.open(options); }, close: function(){ return $.magnificPopup.instance&&$.magnificPopup.instance.close(); }, registerModule: function(name, module){ if(module.options){ $.magnificPopup.defaults[name]=module.options; } $.extend(this.proto, module.proto); this.modules.push(name); }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '', tClose: 'Close (Esc)', tLoading: 'Loading...' }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
'); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ $(document.body).removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur){ $(document.body).addClass(_ajaxCur); } mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ $(document.body).addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ $(document.body).removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
'+ '
'+ ''+ '
', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery', supportsFastClick=Boolean($.fn.mfpFastClick); mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); var eName=supportsFastClick ? 'mfpFastClick':'click'; arrowLeft[eName](function(){ mfp.prev(); }); arrowRight[eName](function(){ mfp.next(); }); if(mfp.isIE7){ _getEl('b', arrowLeft[0], false, true); _getEl('a', arrowLeft[0], false, true); _getEl('b', arrowRight[0], false, true); _getEl('a', arrowRight[0], false, true); } mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); if(mfp.arrowLeft&&supportsFastClick){ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick(); } mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); /* Touch Support that might be implemented some day addSwipeGesture: function(){ var startX, moved, multipleTouches; return; var namespace='.mfp', addEventNames=function(pref, down, move, up, cancel){ mfp._tStart=pref + down + namespace; mfp._tMove=pref + move + namespace; mfp._tEnd=pref + up + namespace; mfp._tCancel=pref + cancel + namespace; }; if(window.navigator.msPointerEnabled){ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); }else if('ontouchstart' in window){ addEventNames('touch', 'start', 'move', 'end', 'cancel'); }else{ return; } _window.on(mfp._tStart, function(e){ var oE=e.originalEvent; multipleTouches=moved=false; startX=oE.pageX||oE.changedTouches[0].pageX; }).on(mfp._tMove, function(e){ if(e.originalEvent.touches.length > 1){ multipleTouches=e.originalEvent.touches.length; }else{ moved=true; }}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e){ if(moved&&!multipleTouches){ var oE=e.originalEvent, diff=startX - (oE.pageX||oE.changedTouches[0].pageX); if(diff > 20){ mfp.next(); }else if(diff < -20){ mfp.prev(); }} }); }, */ var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); /** * FastClick event implementation. (removes 300ms delay on touch devices) * Based on https://developers.google.com/mobile/articles/fast_buttons * * You may use it outside the Magnific Popup by calling just: * * $('.your-el').mfpFastClick(function(){ * console.log('Clicked!'); * }); * * To unbind: * $('.your-el').destroyMfpFastClick(); * * * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound. * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick * */ (function(){ var ghostClickDelay=1000, supportsTouch='ontouchstart' in window, unbindTouchMove=function(){ _window.off('touchmove'+ns+' touchend'+ns); }, eName='mfpFastClick', ns='.'+eName; $.fn.mfpFastClick=function(callback){ return $(this).each(function(){ var elem=$(this), lock; if(supportsTouch){ var timeout, startX, startY, pointerMoved, point, numPointers; elem.on('touchstart' + ns, function(e){ pointerMoved=false; numPointers=1; point=e.originalEvent ? e.originalEvent.touches[0]:e.touches[0]; startX=point.clientX; startY=point.clientY; _window.on('touchmove'+ns, function(e){ point=e.originalEvent ? e.originalEvent.touches:e.touches; numPointers=point.length; point=point[0]; if(Math.abs(point.clientX - startX) > 10 || Math.abs(point.clientY - startY) > 10){ pointerMoved=true; unbindTouchMove(); }}).on('touchend'+ns, function(e){ unbindTouchMove(); if(pointerMoved||numPointers > 1){ return; } lock=true; e.preventDefault(); clearTimeout(timeout); timeout=setTimeout(function(){ lock=false; }, ghostClickDelay); callback(); }); }); } elem.on('click' + ns, function(){ if(!lock){ callback(); }}); }); }; $.fn.destroyMfpFastClick=function(){ $(this).off('touchstart' + ns + ' click' + ns); if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns); };})(); _checkInstance(); })); var j$=jQuery; j$.noConflict(); j$(document).ready(function(){ (function(j$){ j$.fn.visible=function(partial){ var j$t=j$(this), j$w=j$(window), viewTop=j$w.scrollTop(), viewBottom=viewTop + j$w.height(), _top=j$t.offset().top+100, _bottom=_top + j$t.height(), compareTop=partial===true ? _bottom:_top, compareBottom=partial===true ? _top:_bottom; return ((compareBottom <=viewBottom)&&(compareTop >=viewTop)); };})(jQuery); var win=j$(window); var allMods=j$(".rda_opacity,.rda_toleft,.rda_toright,.rda_totop,.rda_tobottom,.rd_chart_black,.rd_chart_white,.rda_fadeIn,.rda_fadeInDown,.rda_fadeInUp,.rda_fadeInLeft,.rda_fadeInRight,.rda_bounceIn,.rda_bounceInDown,.rda_bounceInUp,.rda_bounceInLeft,.rda_bounceInRight,.rda_zoomIn,.rda_flipInX,.rda_flipInY,.rda_bounce,.rda_flash,.rda_shake,.rda_pulse,.rda_swing,.rda_rubberBand,.rda_wobble,.rda_tada"); var count=j$(".rd_count_to"); allMods.each(function(i, el){ var el=j$(el); if(el.visible(true)){ el.addClass("already-visible"); }}); count.each(function(i, el){ var el=j$(el); if(el.visible(true)){ var countAsset=j$(this), countNumber=countAsset.find('.count_number'), countDivider=countAsset.find('.count_line').find('span'), countSubject=countAsset.find('.count_title'); el.removeClass("rd_count_to"); el.addClass("rd_count_to_over"); countNumber.countTo({ onComplete: function (){ countDivider.animate({ 'width': 50 }, 400, 'easeOutCubic'); countSubject.delay(100).animate({ 'opacity':1, 'bottom':'0px' }, 600, 'easeOutCubic'); }}); }}); win.scroll(function(event){ j$(".rda_fadeIn").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated fadeIn'); }, 50 * i); }}); j$(".rda_fadeInDown").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated fadeInDown'); }, 50 * i); }}); j$(".rda_fadeInUp").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated fadeInUp'); }, 50 * i); }}); j$(".rda_fadeInLeft").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated fadeInLeft'); }, 50 * i); }}); j$(".rda_fadeInRight").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated fadeInRight'); }, 50 * i); }}); j$(".rda_bounceIn").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounceIn'); }, 50 * i); }}); j$(".rda_bounceInDown").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounceInDown'); }, 50 * i); }}); j$(".rda_bounceInUp").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounceInUp'); }, 50 * i); }}); j$(".rda_bounceInLeft").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounceInLeft'); }, 50 * i); }}); j$(".rda_bounceInRight").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounceInRight'); }, 50 * i); }}); j$(".rda_zoomIn").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated zoomIn'); }, 50 * i); }}); j$(".rda_flipInX").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated flipInX'); }, 50 * i); }}); j$(".rda_flipInY").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated flipInY'); }, 50 * i); }}); j$(".rda_bounce").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated bounce'); }, 50 * i); }}); j$(".rda_flash").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated flash'); }, 50 * i); }}); j$(".rda_shake").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated shake'); }, 50 * i); }}); j$(".rda_pulse").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated pulse'); }, 50 * i); }}); j$(".rda_swing").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated swing'); }, 50 * i); }}); j$(".rda_rubberBand").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated rubberBand'); }, 50 * i); }}); j$(".rda_wobble").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated wobble'); }, 50 * i); }}); j$(".rda_tada").each(function(i, el){ var el=j$(el); if(el.visible(true)){ setTimeout(function (){ el.addClass('animated tada'); }, 50 * i); }}); j$(".rd_count_to").each(function(i, el){ var el=j$(el); if(el.visible(true)){ var countAsset=j$(this), countNumber=countAsset.find('.count_number'), countDivider=countAsset.find('.count_line').find('span'), countSubject=countAsset.find('.count_title'); el.removeClass("rd_count_to"); el.addClass("rd_count_to_over"); countNumber.countTo({ onComplete: function (){ countDivider.animate({ 'width': 50 }, 400, 'easeOutCubic'); countSubject.delay(100).animate({ 'opacity':1, 'bottom':'0px' }, 600, 'easeOutCubic'); }}); }}); }); }); (function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight= function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this); a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b), f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");b={display:b};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))), a.css(d.property,f-b+"px"))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements, this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery); (function ($){ "use strict";$(function(){ $('.column-same-height .wpb_column').matchHeight(); $('.row-same-height .same-col').matchHeight(); $.fn.matchHeight._beforeUpdate=function(event, groups){ } $.fn.matchHeight._afterUpdate=function(event, groups){ }}); })(jQuery); !function(a,b,c,d){var e={verticalScrolling:!0,horizontalScrolling:!1,verticalScrollerSide:"right",showOnHover:!1,scrollIncrement:20,minScrollbarLength:40,pollChanges:!0,drawCorner:!0,drawScrollButtons:!1,clickTrackToScroll:!0,easingDuration:500,propagateWheelEvent:!0,verticalTrackClass:"vertical-track",horizontalTrackClass:"horizontal-track",horizontalHandleClass:"horizontal-handle",verticalHandleClass:"vertical-handle",scrollUpButtonClass:"scroll-up-btn",scrollDownButtonClass:"scroll-down-btn",scrollLeftButtonClass:"scroll-left-btn",scrollRightButtonClass:"scroll-right-btn",cornerClass:"scrollbar-corner",zIndex:1,addPaddingToPane:!0,horizontalHandleHTML:'
',verticalHandleHTML:'
'},f=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},g=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,17)},h=function(b,c){var d=a(b).css(c),e=/^-?\d+/.exec(d);return e?+e[0]:0},i=function(a){var b,c,d={width:"5px",height:"1px",overflow:"hidden",padding:"8px 0",visibility:"hidden",whiteSpace:"pre-line",font:"10px/1 serif"},e=document.createElement(a),f=document.createTextNode("a\na");for(c in d)e.style[c]=d[c];return e.appendChild(f),document.body.appendChild(e),b=e.scrollHeight<28,document.body.removeChild(e),b},j=.5*Math.PI,k=10*Math.log(2),l=function(a,b,c){var d=j/b,e=a*d;return Math.round(e*Math.cos(d*c))},m=function(a,b,c){return Math.round(a*k*Math.pow(2,-10*c/b+1)/b)},n=function(a,b,c,d){return 2*c/Math.PI*Math.asin((d-a)/b)},o=function(b){var c=a(this).data("enscroll"),d=this,e=c.settings,f=function(){var b=a(this).data("enscroll"),c=b.settings;b&&c.showOnHover&&(c.verticalScrolling&&a(b.verticalTrackWrapper).is(":visible")&&a(b.verticalTrackWrapper).stop().fadeTo(275,0),c.horizontalScrolling&&a(b.horizontalTrackWrapper).is(":visible")&&a(b.horizontalTrackWrapper).stop().fadeTo(275,0),b._fadeTimer=null)};c&&e.showOnHover&&(c._fadeTimer?clearTimeout(c._fadeTimer):(e.verticalScrolling&&a(c.verticalTrackWrapper).is(":visible")&&a(c.verticalTrackWrapper).stop().fadeTo(275,1),e.horizontalScrolling&&a(c.horizontalTrackWrapper).is(":visible")&&a(c.horizontalTrackWrapper).stop().fadeTo(275,1)),b!==!1&&(c._fadeTimer=setTimeout(function(){f.call(d)},1750)))},p=function(b,c){var d=a(b),e=d.data("enscroll"),f=d.scrollTop();e&&e.settings.verticalScrolling&&(d.scrollTop(f+c),e.settings.showOnHover&&o.call(b))},q=function(b,c){var d=a(b),e=d.data("enscroll"),f=d.scrollLeft();e&&e.settings.horizontalScrolling&&(d.scrollLeft(f+c),e.settings.showOnHover&&o.call(b))},r=function(b){if(1===b.which){var d,e,f,h,i,j,k,l,m,n=b.data.pane,p=a(n),q=p.data("enscroll"),r=!0,s=function(){r&&(f!==h&&(q._scrollingY||(q._scrollingY=!0,q._startY=p.scrollTop(),g(function(){t(p)})),e.style.top=f+"px",q._endY=f*m/l,h=f),g(s),q.settings.showOnHover&&o.call(n))},u=function(a){return r&&(f=a.clientY-j-i,f=Math.min(0>f?0:f,l)),!1},v=function(){return r=!1,c.body.style.cursor=k,this.style.cursor="",d.removeClass("dragging"),a(c.body).off("mousemove.enscroll.vertical").off("mouseup.enscroll.vertical"),a(c).off("mouseout.enscroll.vertical"),p.on("scroll.enscroll.pane",function(a){x.call(this,a)}),!1};return d=a(q.verticalTrackWrapper).find(".enscroll-track"),e=d.children().first()[0],f=parseInt(e.style.top,10),m=n.scrollHeight-(q._scrollHeightNoPadding?a(n).height():a(n).innerHeight()),i=b.clientY-a(e).offset().top,l=d.height()-a(e).outerHeight(),j=d.offset().top,p.off("scroll.enscroll.pane"),a(c.body).on({"mousemove.enscroll.vertical":u,"mouseup.enscroll.vertical":function(a){v.call(e,a)}}),a(c).on("mouseout.enscroll.vertical",function(a){a.target.nodeName&&"HTML"===a.target.nodeName.toUpperCase()&&v.call(e,a)}),d.hasClass("dragging")||(d.addClass("dragging"),k=a(c.body).css("cursor"),this.style.cursor=c.body.style.cursor="ns-resize"),g(s),!1}},s=function(b){if(1===b.which){var d,e,f,h,i,j,k,l,m,n=b.data.pane,p=a(n),q=a(n).data("enscroll"),r=!0,s=function(){r&&(f!==h&&(q._scrollingX||(q._scrollingX=!0,q._startX=p.scrollLeft(),g(function(){t(p)})),e.style.left=f+"px",q._endX=f*i/m,h=f),g(s),q.settings.showOnHover&&o.call(n))},u=function(a){return r&&(f=a.clientX-k-j,f=Math.min(0>f?0:f,m)),!1},v=function(){return r=!1,d.removeClass("dragging"),c.body.style.cursor=l,this.style.cursor="",d.removeClass("dragging"),a(c.body).off("mousemove.enscroll.horizontal").off("mouseup.enscroll.horizontal"),a(c).off("mouseout.enscroll.horizontal"),p.on("scroll.enscroll.pane",function(a){x.call(this,a)}),!1};return d=a(q.horizontalTrackWrapper).find(".enscroll-track"),e=d.children().first()[0],f=parseInt(e.style.left,10),i=n.scrollWidth-a(n).innerWidth(),j=b.clientX-a(e).offset().left,m=d.width()-a(e).outerWidth(),k=d.offset().left,p.off("scroll.enscroll.pane"),a(c.body).on({"mousemove.enscroll.horizontal":u,"mouseup.enscroll.horizontal":function(a){v.call(e,a)}}),a(c).on("mouseout.enscroll.horizontal",function(a){a.target.nodeName&&"HTML"===a.target.nodeName.toUpperCase()&&v.call(e,a)}),d.hasClass("dragging")||(d.addClass("dragging"),l=a("body").css("cursor"),this.style.cursor=c.body.style.cursor="ew-resize"),g(s),!1}},t=function(a){var b,c,d,e=a.data("enscroll"),f=e._duration;e._scrollingX===!0&&(b=e._endX-e._startX,0===b?e._scrollingX=!1:(c=a.scrollLeft(),d=n(e._startX,b,f,c),b>0?c>=e._endX||ce._startX?e._scrollingX=!1:(q(a,Math.min(-1,l(b,f,d))),g(function(){t(a)})))),e._scrollingY===!0&&(b=e._endY-e._startY,0===b?e._scrollingY=!1:(c=a.scrollTop(),d=n(e._startY,b,f,c),b>0?c>=e._endY||ce._startY?e._scrollingY=!1:(p(a,Math.min(-1,l(b,f,d))),g(function(){t(a)}))))},u=function(a,b){var c=a.data("enscroll"),d=a.scrollLeft(),e=a[0].scrollWidth-a.innerWidth();return!c.settings.horizontalScrolling||c._scrollingY?!1:(c._scrollingX||(c._scrollingX=!0,c._startX=d,c._endX=c._startX,g(function(){t(a)})),c._endX=b>0?Math.min(d+b,e):Math.max(0,d+b),0>b&&d>0||b>0&&e>d)},v=function(a,b){var c=a.data("enscroll"),d=a.scrollTop(),e=a[0].scrollHeight-(c._scrollHeightNoPadding?a.height():a.innerHeight());return!c.settings.verticalScrolling||c._scrollingX?!1:(c._scrollingY||(c._scrollingY=!0,c._startY=d,c._endY=c._startY,g(function(){t(a)})),c._endY=b>0?Math.min(d+b,e):Math.max(0,d+b),0>b&&d>0||b>0&&e>d)},w=function(b){var c,d=a(this),e=d.data("enscroll"),g=e.settings.scrollIncrement,h="deltaX"in b?-b.deltaX:"wheelDeltaX"in b?b.wheelDeltaX:0,i="deltaY"in b?-b.deltaY:"wheelDeltaY"in b?b.wheelDeltaY:"wheelDelta"in b?b.wheelDelta:0;Math.abs(h)>Math.abs(i)?(c=(h>0?-g:g)<<2,(u(d,c)||!e.settings.propagateWheelEvent)&&f(b)):(c=(i>0?-g:g)<<2,(v(d,c)||!e.settings.propagateWheelEvent)&&f(b))},x=function(){var b,c,d,e=a(this),f=e.data("enscroll");f&&(f.settings.verticalScrolling&&(c=a(f.verticalTrackWrapper).find(".enscroll-track")[0],b=c.firstChild,d=e.scrollTop()/(this.scrollHeight-(f._scrollHeightNoPadding?e.height():e.innerHeight())),d=isNaN(d)?0:d,b.style.top=d*(a(c).height()-a(b).outerHeight())+"px"),f.settings.horizontalScrolling&&(c=a(f.horizontalTrackWrapper).find(".enscroll-track")[0],b=c.firstChild,d=e.scrollLeft()/(this.scrollWidth-e.innerWidth()),d=isNaN(d)?0:d,b.style.left=d*(a(c).width()-a(b).innerWidth())+"px"))},y=function(b){var c,d=a(this),e=d.data("enscroll");if(!/(input)|(select)|(textarea)/i.test(this.nodeName)&&b.target===this&&e){switch(c=e.settings.scrollIncrement,b.keyCode){case 32:case 34:return v(d,d.height()),!1;case 33:return v(d,-d.height()),!1;case 35:return v(d,this.scrollHeight),!1;case 36:return v(d,-this.scrollHeight),!1;case 37:return u(d,-c),!1;case 38:return v(d,-c),!1;case 39:return u(d,c),!1;case 40:return v(d,c),!1}return!0}},z=function(){var b=this,d=a(b).data("enscroll").settings,e=!0,f=0,h=0,i=a(b).offset().top,j=i+a(b).outerHeight(),k=a(b).offset().left,l=k+a(b).outerWidth(),m=function(a){var b=a.pageX,c=a.pageY;f=k>b?b-k:b>l?b-l:0,h=i>c?c-i:c>j?c-j:0},n=function(){d.horizontalScrolling&&f&&q(b,parseInt(f/4,10)),d.verticalScrolling&&h&&p(b,parseInt(h/4,10)),e&&g(n)},o=function(){e=!1,a(c).off("mousemove.enscroll.pane").off("mouseup.enscroll.pane")};g(n),a(c).on({"mousemove.enscroll.pane":m,"mouseup.enscroll.pane":o})},A=function(a){var b,c,e,h,i,j,k,l=this,n=function(a){b=a.touches[0].clientX,c=a.touches[0].clientY,e||(e=c===i&&b===h?d:Math.abs(i-c)>Math.abs(h-b)?"y":"x"),f(a)},o=function(){j&&("y"===e?(p(l,i-c),k=i-c,i=c):"x"===e&&(q(l,h-b),k=h-b,h=b),g(o))},r=function(){var a=0,b=Math.abs(1.5*k);this.removeEventListener("touchmove",n,!1),this.removeEventListener("touchend",r,!1),j=!1,g(function c(){var d;a===b||j||(d=m(k,b,a),isNaN(d)||0===d||(a+=1,"y"===e?p(l,d):q(l,d),g(c)))})};1===a.touches.length&&(h=a.touches[0].clientX,i=a.touches[0].clientY,j=!0,this.addEventListener("touchmove",n,!1),this.addEventListener("touchend",r,!1),g(o))},B={reposition:function(){return this.each(function(){var b,c,d,e=a(this),f=e.data("enscroll"),g=function(a,b,c){a.style.left=b+"px",a.style.top=c+"px"};f&&(d=e.position(),b=f.corner,f.settings.verticalScrolling&&(c=f.verticalTrackWrapper,g(c,"right"===f.settings.verticalScrollerSide?d.left+e.outerWidth()-a(c).width()-h(this,"border-right-width"):d.left+h(this,"border-left-width"),d.top+h(this,"border-top-width"))),f.settings.horizontalScrolling&&(c=f.horizontalTrackWrapper,g(c,d.left+h(this,"border-left-width"),d.top+e.outerHeight()-a(c).height()-h(this,"border-bottom-width"))),b&&g(b,d.left+e.outerWidth()-a(b).outerWidth()-h(this,"border-right-width"),d.top+e.outerHeight()-a(b).outerHeight()-h(this,"border-bottom-width")))})},resize:function(){return this.each(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=a(this),s=r.data("enscroll");return s?(b=s.settings,r.is(":visible")?(b.verticalScrolling&&(e=s.verticalTrackWrapper,c=r.innerHeight(),f=c/this.scrollHeight,g=a(e).find(".enscroll-track")[0],j=a(e).find("."+b.scrollUpButtonClass),k=a(e).find("."+b.scrollDownButtonClass),i=b.horizontalScrolling?c-a(s.horizontalTrackWrapper).find(".enscroll-track").outerHeight():c,i-=a(g).outerHeight()-a(g).height()+j.outerHeight()+k.outerHeight(),n=g.firstChild,p=Math.max(f*i,b.minScrollbarLength),p-=a(n).outerHeight()-a(n).height(),e.style.display="none",g.style.height=i+"px",n.style.height=p+"px",1>f&&(f=r.scrollTop()/(this.scrollHeight-r.height()),n.style.top=f*(i-p)+"px",e.style.display="block")),b.horizontalScrolling&&(e=s.horizontalTrackWrapper,d=r.innerWidth(),f=d/this.scrollWidth,g=a(e).find(".enscroll-track")[0],l=a(e).find("."+b.scrollLeftButtonClass),m=a(e).find("."+b.scrollRightButtonClass),h=b.verticalScrolling?d-a(s.verticalTrackWrapper).find(".enscroll-track").outerWidth():d,h-=a(g).outerWidth()-a(g).width()+l.outerWidth()+m.outerWidth(),n=g.firstChild,o=Math.max(f*h,b.minScrollbarLength),o-=a(n).outerWidth()-a(n).width(),e.style.display="none",g.style.width=h+"px",n.style.width=o+"px",1>f&&(f=r.scrollLeft()/(this.scrollWidth-r.width()),n.style.left=f*(h-o)+"px",e.style.display="block"),s._prybar&&(q=s._prybar,this.removeChild(q),b.verticalScrolling&&(q.style.width=this.scrollWidth+a(s.verticalTrackWrapper).find(".enscroll-track").outerWidth()+"px",this.appendChild(q)))),s.corner&&(s.corner.style.display=s.verticalTrackWrapper&&s.horizontalTrackWrapper&&a(s.verticalTrackWrapper).is(":visible")&&a(s.horizontalTrackWrapper).is(":visible")?"":"none")):(b.verticalScrolling&&(s.verticalTrackWrapper.style.display="none"),b.horizontalScrolling&&(s.horizontalTrackWrapper.style.display="none"),s.corner&&(s.corner.style.display="none")),void 0):!0})},startPolling:function(){return this.each(function(){var b,c=a(this).data("enscroll"),d=this,e=a(d),f=-1,g=-1,h=-1,i=-1,j=function(){if(c.settings.pollChanges){var a=d.scrollWidth,k=d.scrollHeight,l=e.width(),m=e.height(),n=e.offset();(c.settings.verticalScrolling&&(m!==g||k!==i)||c.settings.horizontalScrolling&&(l!==f||a!==h))&&(h=a,i=k,B.resize.call(e)),(b.left!==n.left||b.top!==n.top||l!==f||m!==g)&&(b=n,f=l,g=m,B.reposition.call(e)),setTimeout(j,350)}};c&&(c.settings.pollChanges=!0,i=d.scrollHeight,h=d.scrollWidth,b=e.offset(),j())})},stopPolling:function(){return this.each(function(){var b=a(this).data("enscroll");b&&(b.settings.pollChanges=!1)})},destroy:function(){return this.each(function(){var c,d,e=a(this),f=e.data("enscroll");f&&(B.stopPolling.call(e),d=f._mouseScrollHandler,f.settings.verticalScrolling&&(c=f.verticalTrackWrapper,a(c).remove(),c=null),f.settings.horizontalScrolling&&(c=f.horizontalTrackWrapper,a(c).remove(),c=null),f._fadeTimer&&clearTimeout(f._fadeTimer),f.corner&&a(f.corner).remove(),f._prybar&&f._prybar.parentNode&&f._prybar.parentNode===this&&a(f._prybar).remove(),this.setAttribute("style",f._style||""),f._hadTabIndex||e.removeAttr("tabindex"),e.off("scroll.enscroll.pane").off("keydown.enscroll.pane").off("mouseenter.enscroll.pane").off("mousedown.enscroll.pane").data("enscroll",null),this.removeEventListener?(this.removeEventListener("wheel",d,!1),this.removeEventListener("mousewheel",d,!1),this.removeEventListener("touchstart",A,!1)):this.detachEvent&&this.detachEvent("onmousewheel",d),a(b).off("resize.enscroll.window"))})}};a.fn.enscroll=function(d){var f;return B[d]?B[d].call(this):(f=a.extend({},e,d),this.each(function(){if(f.verticalScrolling||f.horizontalScrolling){var d,e,g,j,k,l,m,n,t,C,D,E,F,G,H,I,J,K,L=a(this),M=this,N=L.attr("style"),O=!0,P={position:"absolute","z-index":f.zIndex,margin:0,padding:0},Q=function(a){w.call(M,a)},R=function(b,c){"string"==typeof c?a(b).html(c):b.appendChild(c)};if(f.verticalScrolling){e=c.createElement("div"),j=c.createElement("div"),l=c.createElement("a"),a(j).css("position","relative").addClass("enscroll-track").addClass(f.verticalTrackClass).appendTo(e),f.drawScrollButtons&&(m=c.createElement("a"),n=c.createElement("a"),a(m).css({display:"block","text-decoration":"none"}).attr("href","").html(" ").addClass(f.scrollUpButtonClass).on("click",function(){return p(M,-f.scrollIncrement),!1}).insertBefore(j),a(n).css({display:"block","text-decoration":"none"}).attr("href","").html(" ").on("click",function(){return p(M,f.scrollIncrement),!1}).addClass(f.scrollDownButtonClass).appendTo(e)),f.clickTrackToScroll&&a(j).on("click",function(b){b.target===this&&v(L,b.pageY>a(l).offset().top?L.height():-L.height())}),a(l).css({position:"absolute","z-index":1}).attr("href","").addClass(f.verticalHandleClass).mousedown({pane:this},r).click(function(){return!1}).appendTo(j),R(l,f.verticalHandleHTML),a(e).css(P).insertAfter(this),f.showOnHover&&a(e).css("opacity",0).on("mouseover.enscroll.vertical",function(){o.call(M,!1)}).on("mouseout.enscroll.vertical",function(){o.call(M)}),E=a(j).outerWidth(),f.addPaddingToPane&&(K="right"===f.verticalScrollerSide?{"padding-right":h(this,"padding-right")+E+"px"}:{"padding-left":h(this,"padding-left")+E+"px"},L.css(a.extend({width:L.width()-E+"px"},K)));try{I=parseInt(L.css("outline-width"),10),0!==I&&!isNaN(I)||"none"!==L.css("outline-style")||L.css("outline","none")}catch(S){L.css("outline","none")}}f.horizontalScrolling&&(d=c.createElement("div"),g=c.createElement("div"),k=c.createElement("a"),a(g).css({position:"relative","z-index":1}).addClass("enscroll-track").addClass(f.horizontalTrackClass).appendTo(d),f.drawScrollButtons&&(t=c.createElement("a"),C=c.createElement("a"),a(t).css("display","block").attr("href","").on("click",function(){return q(M,-f.scrollIncrement),!1}).addClass(f.scrollLeftButtonClass).insertBefore(g),a(C).css("display","block").attr("href","").on("click",function(){return q(M,f.scrollIncrement),!1}).addClass(f.scrollRightButtonClass).appendTo(d)),f.clickTrackToScroll&&a(g).on("click",function(b){b.target===this&&u(L,b.pageX>a(k).offset().left?L.width():-L.width())}),a(k).css({position:"absolute","z-index":1}).attr("href","").addClass(f.horizontalHandleClass).click(function(){return!1}).mousedown({pane:this},s).appendTo(g),R(k,f.horizontalHandleHTML),a(d).css(P).insertAfter(this),f.showOnHover&&a(d).css("opacity",0).on("mouseover.enscroll.horizontal",function(){o.call(M,!1)}).on("mouseout.enscroll.horizontal",function(){o.call(M)}),D=a(g).outerHeight(),f.addPaddingToPane&&L.css({height:L.height()-D+"px","padding-bottom":parseInt(L.css("padding-bottom"),10)+D+"px"}),J=document.createElement("div"),a(J).css({width:"1px",height:"1px",visibility:"hidden",padding:0,margin:"-1px"}).appendTo(this)),f.verticalScrolling&&f.horizontalScrolling&&f.drawCorner&&(F=c.createElement("div"),a(F).addClass(f.cornerClass).css(P).insertAfter(this)),H=L.attr("tabindex"),H||(L.attr("tabindex",0),O=!1);try{G=L.css("outline"),(!G||G.length<1)&&L.css("outline","none")}catch(S){L.css("outline","none")}L.on({"scroll.enscroll.pane":function(a){x.call(this,a)},"keydown.enscroll.pane":y,"mousedown.enscroll.pane":z}).css("overflow","hidden").data("enscroll",{settings:f,horizontalTrackWrapper:d,verticalTrackWrapper:e,corner:F,_prybar:J,_mouseScrollHandler:Q,_hadTabIndex:O,_style:N,_scrollingX:!1,_scrollingY:!1,_startX:0,_startY:0,_endX:0,_endY:0,_duration:parseInt(f.easingDuration/16.66666,10),_scrollHeightNoPadding:i(this.nodeName)}),a(b).on("resize.enscroll.window",function(){B.reposition.call(L)}),f.showOnHover&&L.on("mouseenter.enscroll.pane",function(){o.call(this)}),this.addEventListener?("onwheel"in this||"WheelEvent"in b&&navigator.userAgent.toLowerCase().indexOf("msie")>=0?this.addEventListener("wheel",Q,!1):"onmousewheel"in this&&this.addEventListener("mousewheel",Q,!1),this.addEventListener("touchstart",A,!1)):this.attachEvent&&this.attachEvent("onmousewheel",Q),f.pollChanges&&B.startPolling.call(L),B.resize.call(L),B.reposition.call(L)}}))}}(jQuery,window,document); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); function vc_js(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_googleplus(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_google_fonts(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}function getSizeName(){var screen_w=jQuery(window).width();return 1170screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('
')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("
").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()});