PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
assets
/
js
(function ($) { "use strict"; // This case is important when theme is not active if (typeof qodef !== 'object') { window.qodef = {}; } window.qodefCore = {}; qodefCore.shortcodes = {}; qodefCore.listShortcodesScripts = { qodefSwiper: qodef.qodefSwiper, qodefPagination: qodef.qodefPagination, qodefFilter: qodef.qodefFilter, qodefMasonryLayout: qodef.qodefMasonryLayout, qodefJustifiedGallery: qodef.qodefJustifiedGallery, }; qodefCore.body = $('body'); qodefCore.html = $('html'); qodefCore.windowWidth = $(window).width(); qodefCore.windowHeight = $(window).height(); qodefCore.scroll = 0; $(document).ready(function () { qodefCore.scroll = $(window).scrollTop(); qodefInlinePageStyle.init(); }); $(window).resize(function () { qodefCore.windowWidth = $(window).width(); qodefCore.windowHeight = $(window).height(); }); $(window).scroll(function () { qodefCore.scroll = $(window).scrollTop(); }); var qodefScroll = { disable: function(){ if (window.addEventListener) { window.addEventListener('wheel', qodefScroll.preventDefaultValue, {passive: false}); } // window.onmousewheel = document.onmousewheel = qodefScroll.preventDefaultValue; document.onkeydown = qodefScroll.keyDown; }, enable: function(){ if (window.removeEventListener) { window.removeEventListener('wheel', qodefScroll.preventDefaultValue, {passive: false}); } window.onmousewheel = document.onmousewheel = document.onkeydown = null; }, preventDefaultValue: function(e){ e = e || window.event; if (e.preventDefault) { e.preventDefault(); } e.returnValue = false; }, keyDown: function(e) { var keys = [37, 38, 39, 40]; for (var i = keys.length; i--;) { if (e.keyCode === keys[i]) { qodefScroll.preventDefaultValue(e); return; } } } }; qodefCore.qodefScroll = qodefScroll; var qodefPerfectScrollbar = { init: function ($holder) { if ($holder.length) { qodefPerfectScrollbar.qodefInitScroll($holder); } }, qodefInitScroll: function ($holder) { var $defaultParams = { wheelSpeed: 0.6, suppressScrollX: true }; var $ps = new PerfectScrollbar($holder[0], $defaultParams); $(window).resize(function () { $ps.update(); }); } }; qodefCore.qodefPerfectScrollbar = qodefPerfectScrollbar; var qodefInlinePageStyle = { init: function () { this.holder = $('#webon-core-page-inline-style'); if (this.holder.length) { var style = this.holder.data('style'); if (style.length) { $('head').append('<style type="text/css">' + style + '</style>'); } } } }; })(jQuery); (function ($) { "use strict"; $(window).on( 'load', function () { qodefUncoverFooter.init(); } ); var qodefUncoverFooter = { holder: '', init: function () { this.holder = $('#qodef-page-footer.qodef--uncover'); if (this.holder.length && !qodefCore.html.hasClass('touchevents')) { qodefUncoverFooter.addClass(); qodefUncoverFooter.setHeight(this.holder); $(window).resize(function () { qodefUncoverFooter.setHeight(qodefUncoverFooter.holder); }); } }, setHeight: function ($holder) { $holder.css('height', 'auto'); var footerHeight = $holder.outerHeight(); if (footerHeight > 0) { $('#qodef-page-outer').css({'margin-bottom': footerHeight, 'background-color': qodefCore.body.css('backgroundColor')}); $holder.css('height', footerHeight); } }, addClass: function () { qodefCore.body.addClass('qodef-page-footer--uncover'); } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefBackToTop.init(); }); var qodefBackToTop = { init: function () { this.holder = $('#qodef-back-to-top'); if(this.holder.length) { // Scroll To Top this.holder.on('click', function (e) { e.preventDefault(); qodefBackToTop.animateScrollToTop(); }); qodefBackToTop.showHideBackToTop(); } }, animateScrollToTop: function() { var startPos = qodef.scroll, newPos = qodef.scroll, step = .9, animationFrameId; var startAnimation = function() { if (newPos === 0) return; newPos < 0.0001 ? newPos = 0 : null; var ease = qodefBackToTop.easingFunction((startPos - newPos) / startPos); $('html, body').scrollTop(startPos - (startPos - newPos) * ease); newPos = newPos * step; animationFrameId = requestAnimationFrame(startAnimation) } startAnimation(); $(window).one('wheel touchstart', function() { cancelAnimationFrame(animationFrameId); }); }, easingFunction: function(n) { return 0 == n ? 0 : Math.pow(1024, n - 1); }, showHideBackToTop: function () { $(window).scroll(function () { var $thisItem = $(this), b = $thisItem.scrollTop(), c = $thisItem.height(), d; if (b > 0) { d = b + c / 2; } else { d = 1; } if (d < 1e3) { qodefBackToTop.addClass('off'); } else { qodefBackToTop.addClass('on'); } }); }, addClass: function (a) { this.holder.removeClass('qodef--off qodef--on'); if (a === 'on') { this.holder.addClass('qodef--on'); } else { this.holder.addClass('qodef--off'); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefHeaderScrollAppearance.init(); }); var qodefHeaderScrollAppearance = { appearanceType: function () { return qodefCore.body.attr('class').indexOf('qodef-header-appearance--') !== -1 ? qodefCore.body.attr('class').match(/qodef-header-appearance--([\w]+)/)[1] : ''; }, init: function () { var appearanceType = this.appearanceType(); if (appearanceType !== '' && appearanceType !== 'none') { qodefCore[appearanceType + "HeaderAppearance"](); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefFullscreenMenu.init(); }); var qodefFullscreenMenu = { init: function () { var $fullscreenMenuOpener = $('a.qodef-fullscreen-menu-opener'), $menuItems = $('#qodef-fullscreen-area nav ul li a'); // Open popup menu $fullscreenMenuOpener.on('click', function (e) { e.preventDefault(); var $thisOpener = $(this); if (!qodefCore.body.hasClass('qodef-fullscreen-menu--opened')) { qodefFullscreenMenu.openFullscreen($thisOpener); $(document).keyup(function (e) { if (e.keyCode === 27) { qodefFullscreenMenu.closeFullscreen($thisOpener); } }); } else { qodefFullscreenMenu.closeFullscreen($thisOpener); } }); //open dropdowns $menuItems.on('tap click', function (e) { var $thisItem = $(this); if ($thisItem.parent().hasClass('menu-item-has-children')) { e.preventDefault(); qodefFullscreenMenu.clickItemWithChild($thisItem); } else if ($thisItem.attr('href') !== "http://#" && $thisItem.attr('href') !== "#") { qodefFullscreenMenu.closeFullscreen($fullscreenMenuOpener); } }); }, openFullscreen: function ($opener) { $opener.addClass('qodef--opened'); qodefCore.body.removeClass('qodef-fullscreen-menu-animate--out').addClass('qodef-fullscreen-menu--opened qodef-fullscreen-menu-animate--in'); qodefCore.qodefScroll.disable(); }, closeFullscreen: function ($opener) { $opener.removeClass('qodef--opened'); qodefCore.body.removeClass('qodef-fullscreen-menu--opened qodef-fullscreen-menu-animate--in').addClass('qodef-fullscreen-menu-animate--out'); qodefCore.qodefScroll.enable(); $("nav.qodef-fullscreen-menu ul.sub_menu").slideUp(200); }, clickItemWithChild: function (thisItem) { var $thisItemParent = thisItem.parent(), $thisItemSubMenu = $thisItemParent.find('.sub-menu').first(); if ($thisItemSubMenu.is(':visible')) { $thisItemSubMenu.slideUp(300); $thisItemParent.removeClass('qodef--opened'); } else { $thisItemSubMenu.slideDown(300); $thisItemParent.addClass('qodef--opened').siblings().find('.sub-menu').slideUp(400); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefMobileHeaderAppearance.init(); }); /* ** Init mobile header functionality */ var qodefMobileHeaderAppearance = { init: function () { if (qodefCore.body.hasClass('qodef-mobile-header-appearance--sticky')) { var docYScroll1 = qodefCore.scroll, displayAmount = qodefGlobal.vars.mobileHeaderHeight + qodefGlobal.vars.adminBarHeight, $pageOuter = $('#qodef-page-outer'); qodefMobileHeaderAppearance.showHideMobileHeader(docYScroll1, displayAmount, $pageOuter); $(window).scroll(function () { qodefMobileHeaderAppearance.showHideMobileHeader(docYScroll1, displayAmount, $pageOuter); docYScroll1 = qodefCore.scroll; }); $(window).resize(function () { $pageOuter.css('padding-top', 0); qodefMobileHeaderAppearance.showHideMobileHeader(docYScroll1, displayAmount, $pageOuter); }); } }, showHideMobileHeader: function(docYScroll1, displayAmount,$pageOuter){ if(qodefCore.windowWidth <= 1024) { if (qodefCore.scroll > displayAmount * 2) { //set header to be fixed qodefCore.body.addClass('qodef-mobile-header--sticky'); //add transition to it setTimeout(function () { qodefCore.body.addClass('qodef-mobile-header--sticky-animation'); }, 300); //300 is duration of sticky header animation //add padding to content so there is no 'jumping' $pageOuter.css('padding-top', qodefGlobal.vars.mobileHeaderHeight); } else { //unset fixed header qodefCore.body.removeClass('qodef-mobile-header--sticky'); //remove transition setTimeout(function () { qodefCore.body.removeClass('qodef-mobile-header--sticky-animation'); }, 300); //300 is duration of sticky header animation //remove padding from content since header is not fixed anymore $pageOuter.css('padding-top', 0); } if ((qodefCore.scroll > docYScroll1 && qodefCore.scroll > displayAmount) || (qodefCore.scroll < displayAmount * 3)) { //show sticky header qodefCore.body.removeClass('qodef-mobile-header--sticky-display'); } else { //hide sticky header qodefCore.body.addClass('qodef-mobile-header--sticky-display'); } } } }; })(jQuery); (function ($) { "use strict"; $( window ).on( 'load', function () { qodefParallaxBackground.init(); } ); /** * Init global parallax background functionality */ var qodefParallaxBackground = { init: function (settings) { this.$sections = $('.qodef-parallax'); // Allow overriding the default config $.extend(this.$sections, settings); var isSupported = !qodefCore.html.hasClass('touchevents') && !qodefCore.body.hasClass('qodef-browser--edge') && !qodefCore.body.hasClass('qodef-browser--ms-explorer'); if (this.$sections.length && isSupported) { this.$sections.each(function () { qodefParallaxBackground.ready($(this)); }); } }, ready: function ($section) { $section.$imgHolder = $section.find('.qodef-parallax-img-holder'); $section.$imgWrapper = $section.find('.qodef-parallax-img-wrapper'); $section.$img = $section.find('img.qodef-parallax-img'); var h = $section.height(), imgWrapperH = $section.$imgWrapper.height(); $section.movement = 100 * (imgWrapperH - h) / h / 2; //percentage (divided by 2 due to absolute img centering in CSS) $section.buffer = window.pageYOffset; $section.scrollBuffer = null; //calc and init loop requestAnimationFrame(function () { $section.$imgHolder.animate({opacity: 1}, 100); qodefParallaxBackground.calc($section); qodefParallaxBackground.loop($section); }); //recalc $(window).on('resize', function () { qodefParallaxBackground.calc($section); }); }, calc: function ($section) { var wH = $section.$imgWrapper.height(), wW = $section.$imgWrapper.width(); if ($section.$img.width() < wW) { $section.$img.css({ 'width': '100%', 'height': 'auto' }); } if ($section.$img.height() < wH) { $section.$img.css({ 'height': '100%', 'width': 'auto', 'max-width': 'unset' }); } }, loop: function ($section) { if ($section.scrollBuffer === Math.round(window.pageYOffset)) { requestAnimationFrame(function () { qodefParallaxBackground.loop($section); }); //repeat loop return false; //same scroll value, do nothing } else { $section.scrollBuffer = Math.round(window.pageYOffset); } var wH = window.outerHeight, sTop = $section.offset().top, sH = $section.height(); if ($section.scrollBuffer + wH * 1.2 > sTop && $section.scrollBuffer < sTop + sH) { var delta = (Math.abs($section.scrollBuffer + wH - sTop) / (wH + sH)).toFixed(4), //coeff between 0 and 1 based on scroll amount yVal = (delta * $section.movement).toFixed(4); if ($section.buffer !== delta) { $section.$imgWrapper.css('transform', 'translate3d(0,' + yVal + '%, 0)'); } $section.buffer = delta; } requestAnimationFrame(function () { qodefParallaxBackground.loop($section); }); //repeat loop } }; qodefCore.qodefParallaxBackground = qodefParallaxBackground; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefNavMenu.init(); }); var qodefNavMenu = { init: function () { qodefNavMenu.dropdownBehavior(); qodefNavMenu.wideDropdownPosition(); qodefNavMenu.dropdownPosition(); }, dropdownBehavior: function () { var $menuItems = $('.qodef-header-navigation > ul > li'); $menuItems.each(function () { var $thisItem = $(this); if ($thisItem.find('.qodef-drop-down-second').length) { $thisItem.waitForImages(function () { var $dropdownHolder = $thisItem.find('.qodef-drop-down-second'), $dropdownMenuItem = $dropdownHolder.find('.qodef-drop-down-second-inner ul'), dropDownHolderHeight = $dropdownMenuItem.outerHeight(); if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { $thisItem.on("touchstart mouseenter", function () { $dropdownHolder.css({ 'height': dropDownHolderHeight, 'overflow': 'visible', 'visibility': 'visible', 'opacity': '1' }); }).on("mouseleave", function () { $dropdownHolder.css({ 'height': '0px', 'overflow': 'hidden', 'visibility': 'hidden', 'opacity': '0' }); }); } else { if (qodefCore.body.hasClass('qodef-drop-down-second--animate-height')) { var animateConfig = { interval: 0, over: function () { setTimeout(function () { $dropdownHolder.addClass('qodef-drop-down--start').css({ 'visibility': 'visible', 'height': '0', 'opacity': '1' }); $dropdownHolder.stop().animate({ 'height': dropDownHolderHeight }, 400, 'easeInOutQuint', function () { $dropdownHolder.css('overflow', 'visible'); }); }, 100); }, timeout: 100, out: function () { $dropdownHolder.stop().animate({ 'height': '0', 'opacity': 0 }, 100, function () { $dropdownHolder.css({ 'overflow': 'hidden', 'visibility': 'hidden' }); }); $dropdownHolder.removeClass('qodef-drop-down--start'); } }; $thisItem.hoverIntent(animateConfig); } else { var config = { interval: 0, over: function () { setTimeout(function () { $dropdownHolder.addClass('qodef-drop-down--start').stop().css({'height': dropDownHolderHeight}); }, 150); }, timeout: 150, out: function () { $dropdownHolder.stop().css({'height': '0'}).removeClass('qodef-drop-down--start'); } }; $thisItem.hoverIntent(config); } } }); } }); }, wideDropdownPosition: function () { var $menuItems = $(".qodef-header-navigation > ul > li.qodef-menu-item--wide"); if ($menuItems.length) { $menuItems.each(function () { var $menuItem = $(this); var $menuItemSubMenu = $menuItem.find('.qodef-drop-down-second'); if ($menuItemSubMenu.length) { $menuItemSubMenu.css('left', 0); var leftPosition = $menuItemSubMenu.offset().left; if (qodefCore.body.hasClass('qodef--boxed')) { //boxed layout case var boxedWidth = $('.qodef--boxed #qodef-page-wrapper').outerWidth(); leftPosition = leftPosition - (qodefCore.windowWidth - boxedWidth) / 2; $menuItemSubMenu.css({'left': -leftPosition, 'width': boxedWidth}); } else if (qodefCore.body.hasClass('qodef-drop-down-second--full-width')) { //wide dropdown full width case $menuItemSubMenu.css({'left': -leftPosition}); } else { //wide dropdown in grid case $menuItemSubMenu.css({'left': -leftPosition + (qodefCore.windowWidth - $menuItemSubMenu.width()) / 2}); } } }); } }, dropdownPosition: function () { var $menuItems = $('.qodef-header-navigation > ul > li.qodef-menu-item--narrow.menu-item-has-children'); if ($menuItems.length) { $menuItems.each(function () { var $thisItem = $(this), menuItemPosition = $thisItem.offset().left, $dropdownHolder = $thisItem.find('.qodef-drop-down-second'), $dropdownMenuItem = $dropdownHolder.find('.qodef-drop-down-second-inner ul'), dropdownMenuWidth = $dropdownMenuItem.outerWidth(), menuItemFromLeft = $(window).width() - menuItemPosition; if (qodef.body.hasClass('qodef--boxed')) { //boxed layout case var boxedWidth = $('.qodef--boxed #qodef-page-wrapper').outerWidth(); menuItemFromLeft = boxedWidth - menuItemPosition; } var dropDownMenuFromLeft; if ($thisItem.find('li.menu-item-has-children').length > 0) { dropDownMenuFromLeft = menuItemFromLeft - dropdownMenuWidth; } $dropdownHolder.removeClass('qodef-drop-down--right'); $dropdownMenuItem.removeClass('qodef-drop-down--right'); if (menuItemFromLeft < dropdownMenuWidth || dropDownMenuFromLeft < dropdownMenuWidth) { $dropdownHolder.addClass('qodef-drop-down--right'); $dropdownMenuItem.addClass('qodef-drop-down--right'); } }); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSideArea.init(); }); var qodefSideArea = { init: function () { var $sideAreaOpener = $('a.qodef-side-area-opener'), $sideAreaClose = $('#qodef-side-area-close'), $sideArea = $('#qodef-side-area'); qodefSideArea.openerHoverColor($sideAreaOpener); // Open Side Area $sideAreaOpener.on('click', function (e) { e.preventDefault(); if (!qodefCore.body.hasClass('qodef-side-area--opened')) { qodefSideArea.openSideArea(); $(document).keyup(function (e) { if (e.keyCode === 27) { qodefSideArea.closeSideArea(); } }); } else { qodefSideArea.closeSideArea(); } }); $sideAreaClose.on('click', function (e) { e.preventDefault(); qodefSideArea.closeSideArea(); }); if ($sideArea.length && typeof qodefCore.qodefPerfectScrollbar === 'object') { qodefCore.qodefPerfectScrollbar.init($sideArea); } }, openSideArea: function () { var $wrapper = $('#qodef-page-wrapper'); var currentScroll = $(window).scrollTop(); $('.qodef-side-area-cover').remove(); $wrapper.prepend('<div class="qodef-side-area-cover"/>'); qodefCore.body.removeClass('qodef-side-area-animate--out').addClass('qodef-side-area--opened qodef-side-area-animate--in'); $('.qodef-side-area-cover').on('click', function (e) { e.preventDefault(); qodefSideArea.closeSideArea(); }); $(window).scroll(function () { if (Math.abs(qodefCore.scroll - currentScroll) > 400) { qodefSideArea.closeSideArea(); } }); }, closeSideArea: function () { qodefCore.body.removeClass('qodef-side-area--opened qodef-side-area-animate--in').addClass('qodef-side-area-animate--out'); }, openerHoverColor: function ($opener) { if (typeof $opener.data('hover-color') !== 'undefined') { var hoverColor = $opener.data('hover-color'); var originalColor = $opener.css('color'); $opener.on('mouseenter', function () { $opener.css('color', hoverColor); }).on('mouseleave', function () { $opener.css('color', originalColor); }); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { setTimeout(function () { qodefSmoothScroll.init(); }, 100); }); var qodefSmoothScroll = { init: function () { var smoothScrollEnabled = qodef.body.hasClass('qodef-scrolling-smooth'), isMac = navigator.appVersion.toLowerCase().indexOf('mac') > -1 ? true : false, isTouchDevice = qodef.html.hasClass('touchevents'), isMobileIE = navigator.userAgent.indexOf("IEMobile") > -1 ? true : false; if (smoothScrollEnabled && !isMac && !isTouchDevice && !isMobileIE) { gsap.registerPlugin(ScrollToPlugin); qodefSmoothScroll.startSmoothScroll(); } }, isRabbitToolbarOpened: function () { var $rabbitToolbar = $('.rbt-toolbar .rbt-sidearea'); if ($rabbitToolbar.length) { if ($rabbitToolbar.hasClass('rbt-active')) return true; return false; } }, startSmoothScroll: function () { if (window.addEventListener) { window.addEventListener('mousewheel', function (e) { !qodefSmoothScroll.isRabbitToolbarOpened() && qodefSmoothScroll.smoothScrollListener(e); }, { passive: false }); } }, getScrollSpeed: (function () { var lastPos, newPos, timer, delta; function clear() { lastPos = null; delta = 0; } clear(); return function () { newPos = window.scrollY; if (lastPos != null) { delta = newPos - lastPos; } lastPos = newPos; clearTimeout(timer); timer = setTimeout(clear, 50); return delta; }; })(), smoothScrollListener: function (event) { event.preventDefault(); var scrollTime = .9, scrollDir = event.deltaY < 0 ? 1 : -1, scrollTop = qodef.window.scrollTop(), scrollSpeed = Math.abs(qodefSmoothScroll.getScrollSpeed()); // Scroll Speed Boundaries scrollSpeed < 5 ? scrollSpeed = 5 : null; scrollSpeed > 80 ? scrollSpeed = 80 : null; var finalScroll = scrollTop - parseInt(scrollDir * scrollSpeed * 12); // coefficient gsap.to( qodef.window, scrollTime, { scrollTo: { y: finalScroll, autoKill: !0 }, ease: Power3.easeOut, overwrite: 'all' }); } } })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefReview.init(); }); var qodefReview = { init: function () { var ratingHolder = $('#qodef-page-comments-form .qodef-rating-inner'); var addActive = function (stars, ratingValue) { for (var i = 0; i < stars.length; i++) { var star = stars[i]; if (i < ratingValue) { $(star).addClass('active'); } else { $(star).removeClass('active'); } } }; ratingHolder.each(function () { var thisHolder = $(this), ratingInput = thisHolder.find('.qodef-rating'), ratingValue = ratingInput.val(), stars = thisHolder.find('.qodef-star-rating'); addActive(stars, ratingValue); stars.on('click', function () { ratingInput.val($(this).data('value')).trigger('change'); }); ratingInput.change(function () { ratingValue = ratingInput.val(); addActive(stars, ratingValue); }); }); } } })(jQuery); (function ($) { "use strict"; $( window ).on( 'load', function () { qodefSubscribeModal.init(); } ); var qodefSubscribeModal = { init: function () { this.holder = $('#qodef-subscribe-popup-modal'); if (this.holder.length) { var $preventHolder = this.holder.find('.qodef-sp-prevent'), $modalClose = $('.qodef-sp-close'), disabledPopup = 'no'; if ($preventHolder.length) { var isLocalStorage = this.holder.hasClass('qodef-sp-prevent-cookies'), $preventInput = $preventHolder.find('.qodef-sp-prevent-input'), preventValue = $preventInput.data('value'); if (isLocalStorage) { disabledPopup = localStorage.getItem('disabledPopup'); sessionStorage.removeItem('disabledPopup'); } else { disabledPopup = sessionStorage.getItem('disabledPopup'); localStorage.removeItem('disabledPopup'); } $preventHolder.children().on('click', function (e) { if (preventValue !== 'yes') { preventValue = 'yes'; $preventInput.addClass('qodef-sp-prevent-clicked').data('value', 'yes'); } else { preventValue = 'no'; $preventInput.removeClass('qodef-sp-prevent-clicked').data('value', 'no'); } if (preventValue === 'yes') { if (isLocalStorage) { localStorage.setItem('disabledPopup', 'yes'); } else { sessionStorage.setItem('disabledPopup', 'yes'); } } else { if (isLocalStorage) { localStorage.setItem('disabledPopup', 'no'); } else { sessionStorage.setItem('disabledPopup', 'no'); } } }); } if (disabledPopup !== 'yes') { if (qodefCore.body.hasClass('qodef-sp-opened')) { qodefSubscribeModal.handleClassAndScroll('remove'); } else { qodefSubscribeModal.handleClassAndScroll('add'); } $modalClose.on('click', function (e) { e.preventDefault(); qodefSubscribeModal.handleClassAndScroll('remove'); }); // Close on escape $(document).keyup(function (e) { if (e.keyCode === 27) { // KeyCode for ESC button is 27 qodefSubscribeModal.handleClassAndScroll('remove'); } }); } } }, handleClassAndScroll: function (option) { if (option === 'remove') { qodefCore.body.removeClass('qodef-sp-opened'); qodefCore.qodefScroll.enable(); } if (option === 'add') { qodefCore.body.addClass('qodef-sp-opened'); qodefCore.qodefScroll.disable(); } }, }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSpinner.init(); }); $(window).on('elementor/frontend/init', function() { var isEditMode = Boolean(elementorFrontend.isEditMode()); if (isEditMode) { qodefSpinner.init(isEditMode); } }); var qodefSpinner = { init: function (isEditMode) { this.holder = $('#qodef-page-spinner:not(.qodef--custom-spinner)'); if (this.holder.length) { qodefSpinner.animateSpinner(this.holder, isEditMode); qodefSpinner.fadeOutAnimation(); } }, animateSpinner: function ($holder, isEditMode) { if ($holder.hasClass('qodef-layout--predefined-svg')) { $holder.find('.qodef-m-predefined').addClass('qodef-spinner-animate'); } $(window).on('load', function () { qodefSpinner.fadeOutLoader($holder); }); if (isEditMode) { qodefSpinner.fadeOutLoader($holder); } }, fadeOutLoader: function ($holder, speed, delay, easing) { speed = speed ? speed : 600; delay = delay ? delay : 3000; easing = easing ? easing : 'swing'; var animatedElements = $('.qodef-landing-text, .qodef-landing-image'); $holder.delay(delay).fadeOut(speed, easing); setTimeout(function(){ animatedElements.addClass('qodef-ready'); }, delay); $(window).on('bind', 'pageshow', function (event) { if (event.originalEvent.persisted) { $holder.fadeOut(speed, easing); } }); }, fadeOutAnimation: function () { // Check for fade out animation if (qodefCore.body.hasClass('qodef-spinner--fade-out')) { var $pageHolder = $('#qodef-page-wrapper'), $linkItems = $('a'); // If back button is pressed, than show content to avoid state where content is on display:none window.addEventListener("pageshow", function (event) { var historyPath = event.persisted || (typeof window.performance !== "undefined" && window.performance.navigation.type === 2); if (historyPath && !$pageHolder.is(':visible')) { $pageHolder.show(); } }); $linkItems.on('click', function (e) { var $clickedLink = $(this); if ( e.which === 1 && // check if the left mouse button has been pressed $clickedLink.attr('href').indexOf(window.location.host) >= 0 && // check if the link is to the same domain !$clickedLink.hasClass('remove') && // check is WooCommerce remove link $clickedLink.parent('.product-remove').length <= 0 && // check is WooCommerce remove link $clickedLink.parents('.woocommerce-product-gallery__image').length <= 0 && // check is product gallery link typeof $clickedLink.data('rel') === 'undefined' && // check pretty photo link typeof $clickedLink.attr('rel') === 'undefined' && // check VC pretty photo link !$clickedLink.hasClass('lightbox-active') && // check is lightbox plugin active (typeof $clickedLink.attr('target') === 'undefined' || $clickedLink.attr('target') === '_self') && // check if the link opens in the same window $clickedLink.attr('href').split('#')[0] !== window.location.href.split('#')[0] // check if it is an anchor aiming for a different page ) { e.preventDefault(); $pageHolder.fadeOut(600, 'easeOutSine', function () { window.location = $clickedLink.attr('href'); }); } }); } } } })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_accordion = {}; $(document).ready(function () { qodefAccordionSimple.init(); qodefAccordionModern.init(); }); var qodefAccordionSimple = { init: function () { this.holder = $('.qodef-accordion.qodef-layout--simple'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this); if ($thisHolder.hasClass('qodef-behavior--accordion')) { qodefAccordionSimple.initAccordion($thisHolder); } if ($thisHolder.hasClass('qodef-behavior--toggle')) { qodefAccordionSimple.initToggle($thisHolder); } $thisHolder.addClass('qodef--init'); }); } }, initAccordion: function ($accordion) { $accordion.accordion({ animate: 'swing', collapsible: true, active: 0, icons: '', heightStyle: 'content', }); }, initToggle: function ($toggle) { var $toggleAccordionTitle = $toggle.find('.qodef-accordion-title'), $toggleAccordionContent = $toggleAccordionTitle.next(); $toggle.addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset"); $toggleAccordionTitle.addClass("ui-accordion-header ui-state-default ui-corner-top ui-corner-bottom"); $toggleAccordionContent.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(); $toggleAccordionTitle.each(function () { var $thisTitle = $(this); $thisTitle.on( 'mouseenter', function () { $thisTitle.addClass("ui-state-hover"); }).on( 'mouseleave', function () { $thisTitle.removeClass("ui-state-hover"); }); $thisTitle.on('click', function () { $thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom'); $thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400); }); }); } }; qodefCore.shortcodes.webon_core_accordion.qodefAccordionSimple = qodefAccordionSimple; var qodefAccordionModern = { init: function () { this.holder = $('.qodef-accordion.qodef-layout--modern'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), $accordionHolder = $thisHolder.find('.qodef-item-wrapper'); if ($thisHolder.hasClass('qodef-behavior--accordion')) { qodefAccordionModern.initAccordion($accordionHolder); } if ($thisHolder.hasClass('qodef-behavior--toggle')) { qodefAccordionModern.initToggle($thisHolder); } $thisHolder.addClass('qodef--init'); }); } }, initAccordion: function ($accordion) { $accordion.accordion({ animate: "swing", collapsible: true, active: 0, icons: "", heightStyle: "content" }); }, initToggle: function ($toggle) { var $toggleAccordionTitle = $toggle.find('.qodef-accordion-title'), $toggleAccordionContent = $toggleAccordionTitle.next(); $toggle.addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset"); $toggleAccordionTitle.addClass("ui-accordion-header ui-state-default ui-corner-top ui-corner-bottom"); $toggleAccordionContent.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(); $toggleAccordionTitle.each(function (index) { var $thisTitle = $(this); if ( 0 === index ) { $thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom'); $thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400); } $thisTitle.on( 'mouseenter', function () { $thisTitle.addClass("ui-state-hover"); }).on( 'mouseleave', function () { $thisTitle.removeClass("ui-state-hover"); }); $thisTitle.on('click', function () { $thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom'); $thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400); }); }); } }; qodefCore.shortcodes.webon_core_accordion.qodefAccordionModern = qodefAccordionModern; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_button = {}; $(document).ready(function () { qodefButton.init(); }); $(document).on('webon_trigger_get_new_posts', function (e, $holder) { qodefButton.init(); }); var qodefButton = { init: function () { this.buttons = $('.qodef-button'); if (this.buttons.length) { this.buttons.each(function () { var $thisButton = $(this); qodefButton.buttonHoverColor($thisButton); qodefButton.buttonHoverBgColor($thisButton); qodefButton.buttonHoverBorderColor($thisButton); qodefButton.buttonHoverAnimationClasses($thisButton); }); } }, buttonHoverColor: function ($button) { if (typeof $button.data('hover-color') !== 'undefined') { var hoverColor = $button.data('hover-color'); var originalColor = $button.css('color'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'color', hoverColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'color', originalColor); }); } }, buttonHoverBgColor: function ($button) { if (typeof $button.data('hover-background-color') !== 'undefined') { var hoverBackgroundColor = $button.data('hover-background-color'); var originalBackgroundColor = $button.css('background-color'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'background-color', hoverBackgroundColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'background-color', originalBackgroundColor); }); } }, buttonHoverBorderColor: function ($button) { if (typeof $button.data('hover-border-color') !== 'undefined') { var hoverBorderColor = $button.data('hover-border-color'); var originalBorderColor = $button.css('borderTopColor'); $button.on('mouseenter', function () { qodefButton.changeColor($button, 'border-color', hoverBorderColor); }); $button.on('mouseleave', function () { qodefButton.changeColor($button, 'border-color', originalBorderColor); }); } }, changeColor: function ($button, cssProperty, color) { $button.css(cssProperty, color); }, buttonHoverAnimationClasses: function ($button) { if ($button.hasClass('qodef-arrow-button')) { $button.each(function() { $(this).on("mouseenter", function () { $(this).removeClass("qodef-button-animation-out"); }) $(this).on("mouseleave", function () { $(this).addClass("qodef-button-animation-out"); }); }); } }, }; qodefCore.shortcodes.webon_core_button.qodefButton = qodefButton; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_counter = {}; $(document).ready(function () { qodefCounter.init(); }); var qodefCounter = { init: function () { this.counters = $('.qodef-counter'); if (this.counters.length) { this.counters.each(function () { var $thisCounter = $(this), $counterElement = $thisCounter.find('.qodef-m-digit'), options = qodefCounter.generateOptions($thisCounter); qodefCounter.counterScript($counterElement, options); }); } }, generateOptions: function($counter) { var options = {}; options.start = typeof $counter.data('start-digit') !== 'undefined' && $counter.data('start-digit') !== '' ? $counter.data('start-digit') : 0; options.end = typeof $counter.data('end-digit') !== 'undefined' && $counter.data('end-digit') !== '' ? $counter.data('end-digit') : null; options.step = typeof $counter.data('step-digit') !== 'undefined' && $counter.data('step-digit') !== '' ? $counter.data('step-digit') : 1; options.delay = typeof $counter.data('step-delay') !== 'undefined' && $counter.data('step-delay') !== '' ? parseInt( $counter.data('step-delay'), 10 ) : 100; options.txt = typeof $counter.data('digit-label') !== 'undefined' && $counter.data('digit-label') !== '' ? $counter.data('digit-label') : ''; return options; }, counterScript: function ($counterElement, options) { var defaults = { start: 0, end: null, step: 1, delay: 50, txt: "" }; var settings = $.extend(defaults, options || {}); var nb_start = settings.start; var nb_end = settings.end; $counterElement.text(nb_start + settings.txt); var counter = function() { // Definition of conditions of arrest if (nb_end !== null && nb_start >= nb_end) { return; } // incrementation nb_start = nb_start + settings.step; if( nb_start >= nb_end ) { nb_start = nb_end; } // display $counterElement.text(nb_start + settings.txt); }; // Timer // Launches every "settings.delay" $counterElement.appear(function() { setInterval(counter, settings.delay); }, { accX: 0, accY: 0 }); } }; qodefCore.shortcodes.webon_core_counter.qodefCounter = qodefCounter; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_countdown = {}; $(document).ready(function () { qodefCountdown.init(); }); var qodefCountdown = { init: function () { this.countdowns = $('.qodef-countdown'); if (this.countdowns.length) { this.countdowns.each(function () { var $thisCountdown = $(this), $countdownElement = $thisCountdown.find('.qodef-m-date'), options = qodefCountdown.generateOptions($thisCountdown); qodefCountdown.initCountdown($countdownElement, options); }); } }, generateOptions: function($countdown) { var options = {}; options.date = typeof $countdown.data('date') !== 'undefined' ? $countdown.data('date') : null; options.weekLabel = typeof $countdown.data('week-label') !== 'undefined' ? $countdown.data('week-label') : ''; options.weekLabelPlural = typeof $countdown.data('week-label-plural') !== 'undefined' ? $countdown.data('week-label-plural') : ''; options.dayLabel = typeof $countdown.data('day-label') !== 'undefined' ? $countdown.data('day-label') : ''; options.dayLabelPlural = typeof $countdown.data('day-label-plural') !== 'undefined' ? $countdown.data('day-label-plural') : ''; options.hourLabel = typeof $countdown.data('hour-label') !== 'undefined' ? $countdown.data('hour-label') : ''; options.hourLabelPlural = typeof $countdown.data('hour-label-plural') !== 'undefined' ? $countdown.data('hour-label-plural') : ''; options.minuteLabel = typeof $countdown.data('minute-label') !== 'undefined' ? $countdown.data('minute-label') : ''; options.minuteLabelPlural = typeof $countdown.data('minute-label-plural') !== 'undefined' ? $countdown.data('minute-label-plural') : ''; options.secondLabel = typeof $countdown.data('second-label') !== 'undefined' ? $countdown.data('second-label') : ''; options.secondLabelPlural = typeof $countdown.data('second-label-plural') !== 'undefined' ? $countdown.data('second-label-plural') : ''; return options; }, initCountdown: function ($countdownElement, options) { var $weekHTML = '<span class="qodef-digit-wrapper"><span class="qodef-label">' + '%!w:' + options.weekLabel + ',' + options.weekLabelPlural + ';</span><span class="qodef-digit">%w</span></span>'; var $dayHTML = '<span class="qodef-digit-wrapper"><span class="qodef-label">' + '%!d:' + options.dayLabel + ',' + options.dayLabelPlural + ';</span><span class="qodef-digit">%d</span></span>'; var $hourHTML = '<span class="qodef-digit-wrapper"><span class="qodef-label">' + '%!H:' + options.hourLabel + ',' + options.hourLabelPlural + ';</span><span class="qodef-digit">%H</span></span>'; var $minuteHTML = '<span class="qodef-digit-wrapper"><span class="qodef-label">' + '%!M:' + options.minuteLabel + ',' + options.minuteLabelPlural + ';</span><span class="qodef-digit">%M</span></span>'; var $secondHTML = '<span class="qodef-digit-wrapper"><span class="qodef-label">' + '%!S:' + options.secondLabel + ',' + options.secondLabelPlural + ';</span><span class="qodef-digit">%S</span></span>'; $countdownElement.countdown(options.date, function(event) { $(this).html(event.strftime($weekHTML + $dayHTML + $hourHTML + $minuteHTML + $secondHTML)); }); } }; qodefCore.shortcodes.webon_core_countdown.qodefCountdown = qodefCountdown; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_google_map = {}; $(document).ready(function () { qodefGoogleMap.init(); }); var qodefGoogleMap = { init: function () { this.holder = $('.qodef-google-map'); if (this.holder.length) { this.holder.each(function () { if (typeof window.qodefGoogleMap !== 'undefined') { window.qodefGoogleMap.initMap($(this).find('.qodef-m-map')); } }); } } }; qodefCore.shortcodes.webon_core_google_map.qodefGoogleMap = qodefGoogleMap; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_icon = {}; $(document).ready(function () { qodefIcon.init(); }); var qodefIcon = { init: function () { this.icons = $('.qodef-icon-holder'); if (this.icons.length) { this.icons.each(function () { var $thisIcon = $(this); qodefIcon.iconHoverColor($thisIcon); qodefIcon.iconHoverBgColor($thisIcon); qodefIcon.iconHoverBorderColor($thisIcon); }); } }, iconHoverColor: function ($iconHolder) { if (typeof $iconHolder.data('hover-color') !== 'undefined') { var spanHolder = $iconHolder.find('span'); var originalColor = spanHolder.css('color'); var hoverColor = $iconHolder.data('hover-color'); $iconHolder.on('mouseenter', function () { qodefIcon.changeColor(spanHolder, 'color', hoverColor); }); $iconHolder.on('mouseleave', function () { qodefIcon.changeColor(spanHolder, 'color', originalColor); }); } }, iconHoverBgColor: function ($iconHolder) { if (typeof $iconHolder.data('hover-background-color') !== 'undefined') { var hoverBackgroundColor = $iconHolder.data('hover-background-color'); var originalBackgroundColor = $iconHolder.css('background-color'); $iconHolder.on('mouseenter', function () { qodefIcon.changeColor($iconHolder, 'background-color', hoverBackgroundColor); }); $iconHolder.on('mouseleave', function () { qodefIcon.changeColor($iconHolder, 'background-color', originalBackgroundColor); }); } }, iconHoverBorderColor: function ($iconHolder) { if (typeof $iconHolder.data('hover-border-color') !== 'undefined') { var hoverBorderColor = $iconHolder.data('hover-border-color'); var originalBorderColor = $iconHolder.css('borderTopColor'); $iconHolder.on('mouseenter', function () { qodefIcon.changeColor($iconHolder, 'border-color', hoverBorderColor); }); $iconHolder.on('mouseleave', function () { qodefIcon.changeColor($iconHolder, 'border-color', originalBorderColor); }); } }, changeColor: function (iconElement, cssProperty, color) { iconElement.css(cssProperty, color); } }; qodefCore.shortcodes.webon_core_icon.qodefIcon = qodefIcon; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_image_gallery = {}; qodefCore.shortcodes.webon_core_image_gallery.qodefSwiper = qodef.qodefSwiper; qodefCore.shortcodes.webon_core_image_gallery.qodefMasonryLayout = qodef.qodefMasonryLayout; })(jQuery); (function ($) { 'use strict'; qodefCore.shortcodes.webon_core_frame_slider = {}; $(window).load(function() { qodefFrameSlider.init(); }); $(window).resize(function () { qodefFrameSlider.init(); }); var qodefFrameSlider = { init: function () { this.holder = $('.qodef-frame-slider-holder'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this); qodefFrameSlider.createSlider($thisHolder); }); } }, createSlider: function ($holder) { var $swiperHolder = $holder.find('.qodef-m-swiper'), $sliderHolder = $holder.find('.qodef-m-items'), $pagination = $holder.find('.swiper-pagination'); var $swiper = new Swiper($swiperHolder, { slidesPerView: 'auto', centeredSlides: true, spaceBetween: 0, autoplay: { delay: 2000, disableOnInteraction: false }, loop: true, speed: 800, grabCursor: true, pagination: { el: $pagination, type: 'bullets', clickable: true }, on: { init: function () { setTimeout(function () { $sliderHolder.addClass('qodef-swiper--initialized'); }, 1500); } } }); } }; qodefCore.shortcodes.webon_core_frame_slider.qodefFrameSlider = qodefFrameSlider; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_image_with_text = {}; qodefCore.shortcodes.webon_core_image_with_text.qodefMagnificPopup = qodef.qodefMagnificPopup; qodefCore.shortcodes.webon_core_image_with_text.qodefAppear = qodef.qodefAppear; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_interactive_link_showcase = {}; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_item_showcase = {}; $(document).ready(function () { qodefItemShowcaseList.init(); }); var qodefItemShowcaseList = { init: function () { this.holder = $('.qodef-item-showcase'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this); $thisHolder.appear(function(){ $thisHolder.addClass('qodef--init'); }, {accX: 0, accY: -100}); }); } } }; qodefCore.shortcodes.webon_core_item_showcase.qodefItemShowcaseList = qodefItemShowcaseList; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefParallaxImages.init(); }); $(window).load(function () { qodefParallaxImages.initParallaxElements(); }); var qodefParallaxImages = { init: function () { this.images = $('.qodef-parallax-images'); if (this.images.length) { this.images.each(function () { var $thisImage = $(this); // if (qodef.windowWidth > 1024) { // } qodefParallaxImages.parallaxElements($thisImage); }); } }, parallaxElements: function ($image) { var itemImage = $image.find('.qodef-m-images'), imgBack = itemImage.find('img.qodef-e-back-image'), imgCenter= itemImage.find('img.qodef-e-center-image'), imgFront= itemImage.find('img.qodef-e-front-image'); if (qodef.body.hasClass('qodef-scrolling-smooth')){ imgBack.attr('data-parallax', '{"y" : 100 , "smoothness": 35}'); imgCenter.attr('data-parallax', '{"y" : -50 , "smoothness": 30}'); imgFront.attr('data-parallax', '{"y" : -140 , "smoothness": 35}'); } else { imgBack.attr('data-parallax', '{"y" : 27 , "smoothness": 25}'); imgCenter.attr('data-parallax', '{"y" : -30 , "smoothness": 30}'); imgFront.attr('data-parallax', '{"y" : -60 , "smoothness": 35}'); } }, initParallaxElements: function () { var parallaxInstances = $(".qodef-parallax-images [data-parallax]"); if ( parallaxInstances.length ) { ParallaxScroll.init(); //initialzation removed from plugin js file to have it run only on non-touch devices } } }; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_single_image = {}; qodefCore.shortcodes.webon_core_single_image.qodefMagnificPopup = qodef.qodefMagnificPopup; $(document).ready(function () { qodefSingleImageParallaxBackground.init(); }); $(window).load(function () { qodefSingleImageParallaxBackground.initParallaxElements(); }); var qodefSingleImageParallaxBackground = { init: function () { this.images = $('.qodef-single-image.qodef--parallax-background-image'); if (this.images.length) { this.images.each(function () { var $thisImage = $(this); // if (qodef.windowWidth > 1024) { // } qodefSingleImageParallaxBackground.parallaxElements($thisImage); }); } }, parallaxElements: function ($image) { var itemImage = $image.find('.qodef-m-background-image'), imgBack = itemImage.find('img'); if (qodef.body.hasClass('qodef-scrolling-smooth')){ imgBack.attr('data-parallax', '{"y" : 120 , "smoothness": 20}'); } else { imgBack.attr('data-parallax', '{"y" : 70 , "smoothness": 20}'); } }, initParallaxElements: function () { var parallaxInstances = $(".qodef-single-image [data-parallax]"); if ( parallaxInstances.length ) { ParallaxScroll.init(); //initialzation removed from plugin js file to have it run only on non-touch devices } } }; })(jQuery); (function ($) { 'use strict'; qodefCore.shortcodes.webon_core_progress_bar = {}; $(document).ready(function () { qodefProgressBar.init(); }); /** * Init progress bar shortcode functionality */ var qodefProgressBar = { init: function () { this.holder = $('.qodef-progress-bar'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), layout = $thisHolder.data('layout'), numberColor = $thisHolder.data('number-color'), $VSSHolder = $('.qodef-vertical-split-slider'); $thisHolder.css("color", numberColor); if ($VSSHolder.length) { $thisHolder.addClass('qodef--init'); qodefProgressBar.drawProgress($thisHolder, layout); } else { $thisHolder.appear(function () { $thisHolder.addClass('qodef--init'); qodefProgressBar.drawProgress($thisHolder, layout); }); } }); } }, drawProgress : function ($thisHolder, layout){ var $container = $thisHolder.find('.qodef-m-canvas'), data = qodefProgressBar.generateBarData($thisHolder, layout), number = $thisHolder.data('number') / 100; switch (layout) { case 'circle': qodefProgressBar.initCircleBar($container, data, number); break; case 'semi-circle': qodefProgressBar.initSemiCircleBar($container, data, number); break; case 'line': data = qodefProgressBar.generateLineData($thisHolder, number); qodefProgressBar.initLineBar($container, data); break; case 'custom': qodefProgressBar.initCustomBar($container, data, number); break; } }, generateBarData: function (thisBar, layout) { var activeWidth = thisBar.data('active-line-width'); var activeColor = thisBar.data('active-line-color'); var inactiveWidth = thisBar.data('inactive-line-width'); var inactiveColor = thisBar.data('inactive-line-color'); var easing = 'linear'; var duration = typeof thisBar.data('duration') !== 'undefined' && thisBar.data('duration') !== '' ? parseInt(thisBar.data('duration'), 10) : 1600; var textColor = thisBar.data('text-color'); return { strokeWidth: activeWidth, color: activeColor, trailWidth: inactiveWidth, trailColor: inactiveColor, easing: easing, duration: duration, svgStyle: { width: '100%', height: '100%' }, text: { style: { color: textColor }, autoStyleContainer: false }, from: { color: inactiveColor }, to: { color: activeColor }, step: function (state, bar) { if (layout !== 'custom') { bar.setText('<span class="progressbar-text-inner">' + Math.round(bar.value() * 100) + '<span class="progressbar-percentage">%</span></span>'); } } }; }, generateLineData: function (thisBar, number) { var height = thisBar.data('active-line-width'); var activeColor = thisBar.data('active-line-color'); var inactiveHeight = thisBar.data('inactive-line-width'); var inactiveColor = thisBar.data('inactive-line-color'); var duration = typeof thisBar.data('duration') !== 'undefined' && thisBar.data('duration') !== '' ? parseInt(thisBar.data('duration'), 10) : 1600; var textColor = thisBar.data('text-color'); return { percentage: number * 100, duration: duration, fillBackgroundColor: activeColor, backgroundColor: inactiveColor, height: height, inactiveHeight: inactiveHeight, followText: thisBar.hasClass('qodef-percentage--floating'), textColor: textColor }; }, initCircleBar: function ($container, data, number) { if (qodefProgressBar.checkBar($container)) { var $bar = new ProgressBar.Circle($container[0], data); $bar.animate(number); } }, initSemiCircleBar: function ($container, data, number) { if (qodefProgressBar.checkBar($container)) { var $bar = new ProgressBar.SemiCircle($container[0], data); $bar.animate(number); } }, initCustomBar: function ($container, data, number) { if (qodefProgressBar.checkBar($container)) { var $bar = new ProgressBar.Path($container[0], data); $bar.set(0); $bar.animate(number); } }, initLineBar: function ($container, data) { $container.LineProgressbar(data); }, checkBar: function ($container) { // check if svg is already in container, elementor fix if ($container.find('svg').length) { return false; } return true; } }; qodefCore.shortcodes.webon_core_progress_bar.qodefProgressBar = qodefProgressBar; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_text_marquee = {}; $(document).ready(function () { qodefTextMarquee.init(); }); var qodefTextMarquee = { init: function () { this.holder = $('.qodef-text-marquee'); if (this.holder.length) { this.holder.each(function () { qodefTextMarquee.initMarquee($(this)); qodefTextMarquee.initResponsive($(this).find('.qodef-m-content')); }); } }, initResponsive: function (thisMarquee) { var fontSize, lineHeight, coef1 = 1, coef2 = 1; if (qodefCore.windowWidth < 1480) { coef1 = 0.8; } if (qodefCore.windowWidth < 1200) { coef1 = 0.7; } if (qodefCore.windowWidth < 768) { coef1 = 0.55; coef2 = 0.65; } if (qodefCore.windowWidth < 600) { coef1 = 0.45; coef2 = 0.55; } if (qodefCore.windowWidth < 480) { coef1 = 0.4; coef2 = 0.5; } fontSize = parseInt(thisMarquee.css('font-size')); if (fontSize > 200) { fontSize = Math.round(fontSize * coef1); } else if (fontSize > 60) { fontSize = Math.round(fontSize * coef2); } thisMarquee.css('font-size', fontSize + 'px'); lineHeight = parseInt(thisMarquee.css('line-height')); if (lineHeight > 70 && qodefCore.windowWidth < 1440) { lineHeight = '1.2em'; } else if (lineHeight > 35 && qodefCore.windowWidth < 768) { lineHeight = '1.2em'; } else { lineHeight += 'px'; } thisMarquee.css('line-height', lineHeight); }, initMarquee: function (thisMarquee) { var elements = thisMarquee.find('.qodef-m-text'), delta = 0.05; elements.each(function (i) { $(this).data('x', 0); }); requestAnimationFrame(function () { qodefTextMarquee.loop(thisMarquee, elements, delta); }); }, inRange: function (thisMarquee) { if (qodefCore.scroll + qodefCore.windowHeight >= thisMarquee.offset().top && qodefCore.scroll < thisMarquee.offset().top + thisMarquee.height()) { return true; } return false; }, loop: function (thisMarquee, elements, delta) { if (!qodefTextMarquee.inRange(thisMarquee)) { requestAnimationFrame(function () { qodefTextMarquee.loop(thisMarquee, elements, delta); }); return false; } else { elements.each(function (i) { var el = $(this); el.css('transform', 'translate3d(' + el.data('x') + '%, 0, 0)'); el.data('x', (el.data('x') - delta).toFixed(2)); el.offset().left < -el.width() - 25 && el.data('x', 100 * Math.abs(i - 1)); }); requestAnimationFrame(function () { qodefTextMarquee.loop(thisMarquee, elements, delta); }); } } }; qodefCore.shortcodes.webon_core_text_marquee.qodefTextMarquee = qodefTextMarquee; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_tabs = {}; $(document).ready(function () { qodefTabs.init(); }); var qodefTabs = { init: function () { this.holder = $('.qodef-tabs'); if (this.holder.length) { this.holder.each(function () { qodefTabs.initTabs($(this)); }); } }, initTabs: function ($tabs) { $tabs.children('.qodef-tabs-content').each(function (index) { index = index + 1; var $that = $(this), link = $that.attr('id'), $navItem = $that.parent().find('.qodef-tabs-navigation li:nth-child(' + index + ') a'), navLink = $navItem.attr('href'); link = '#' + link; if (link.indexOf(navLink) > -1) { $navItem.attr('href', link); } }); $tabs.addClass('qodef--init').tabs(); } }; qodefCore.shortcodes.webon_core_tabs.qodefTabs = qodefTabs; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_text_with_image_showcase = {}; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_vertical_split_slider = {}; $(document).ready(function () { qodefVerticalSplitSlider.init(); }); var qodefVerticalSplitSlider = { init: function () { var $holder = $('.qodef-vertical-split-slider'), $headerInner = $('#qodef-page-header-inner'), breakpoint = qodefVerticalSplitSlider.getBreakpoint($holder), initialHeaderStyle = ''; if ($headerInner.hasClass('qodef-skin--light')) { initialHeaderStyle = 'light'; } else if ($headerInner.hasClass('qodef-skin--dark')) { initialHeaderStyle = 'dark'; } if ($holder.length) { $holder.multiscroll({ navigation: true, navigationPosition: 'right', loopBottom: false, loopTop: false, easing: 'easeInOutCubic', scrollingSpeed: 800, afterRender: function () { qodefCore.body.addClass('qodef-vertical-split-slider--initialized'); qodefVerticalSplitSlider.headerClassHandler($('.ms-left .ms-section:first-child').data('header-skin'), initialHeaderStyle, $headerInner); }, onLeave: function (index, nextIndex) { qodefVerticalSplitSlider.headerClassHandler($($('.ms-left .ms-section')[nextIndex - 1]).data('header-skin'), initialHeaderStyle, $headerInner); } }); $holder.height(qodefCore.windowHeight); qodefVerticalSplitSlider.buildAndDestroy(breakpoint); $(window).resize(function () { qodefVerticalSplitSlider.buildAndDestroy(breakpoint); }); } }, getBreakpoint: function ($holder) { if ($holder.hasClass('qodef-disable-below--768')) { return 768; } else { return 1024; } }, buildAndDestroy: function (breakpoint) { if (qodefCore.windowWidth <= breakpoint) { $.fn.multiscroll.destroy(); $('html, body').css('overflow', 'initial'); qodefCore.body.removeClass('qodef-vertical-split-slider--initialized'); } else { $.fn.multiscroll.build(); } }, headerClassHandler: function (slideHeaderStyle, initialHeaderStyle, $headerInner) { var $controls = $('#multiscroll-nav'), $scrollIcon = $('.qodef-m-scroll-icon'); if (slideHeaderStyle !== undefined && slideHeaderStyle !== '') { $headerInner.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); if ($controls.length) { $controls.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); } if ($scrollIcon.length) { $scrollIcon.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); } } else if (initialHeaderStyle !== '') { $headerInner.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); if ($controls.length) { $controls.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); } if ($scrollIcon.length) { $scrollIcon.removeClass('qodef-skin--light qodef-skin--dark').addClass('qodef-skin--' + slideHeaderStyle); } } else { $headerInner.removeClass('qodef-skin--light qodef-skin--dark'); if ($controls.length) { $controls.removeClass('qodef-skin--light qodef-skin--dark'); } if ($scrollIcon.length) { $scrollIcon.removeClass('qodef-skin--light qodef-skin--dark'); } } } }; qodefCore.shortcodes.webon_vertical_split_slider.qodefVerticalSplitSlider = qodefVerticalSplitSlider; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_video_button = {}; qodefCore.shortcodes.webon_core_video_button.qodefMagnificPopup = qodef.qodefMagnificPopup; })(jQuery); (function ( $ ) { 'use strict'; $( window ).on( 'load', function () { qodefStickySidebar.init(); } ); var qodefStickySidebar = { init: function () { var info = $( '.widget_masterds_core_sticky_sidebar' ); if ( info.length && qodefCore.windowWidth > 1024 ) { info.wrapper = info.parents( '#qodef-page-sidebar' ); info.c = 24; info.offsetM = info.offset().top - info.wrapper.offset().top; info.adj = 15; qodefStickySidebar.callStack( info ); $( window ).on( 'resize', function () { if ( qodefCore.windowWidth > 1024 ) { qodefStickySidebar.callStack( info ); } } ); $( window ).on( 'scroll', function () { if ( qodefCore.windowWidth > 1024 ) { qodefStickySidebar.infoPosition( info ); } } ); } }, calc: function ( info ) { var content = $( '.qodef-page-content-section' ), headerH = qodefCore.body.hasClass( 'qodef-header-appearance--none' ) ? 0 : parseInt( qodefGlobal.vars.headerHeight, 10 ); info.start = content.offset().top; info.end = content.outerHeight(); info.h = info.wrapper.height(); info.w = info.outerWidth(); info.left = info.offset().left; info.top = headerH + qodefGlobal.vars.adminBarHeight + info.c - info.offsetM; info.data( 'state', 'top' ); }, infoPosition: function ( info ) { if ( qodefCore.scroll < info.start - info.top && qodefCore.scroll + info.h && info.data( 'state' ) !== 'top' ) { TweenMax.to( info.wrapper, .1, { y: 5, } ); TweenMax.to( info.wrapper, .3, { y: 0, delay: .1, } ); info.data( 'state', 'top' ); info.wrapper.css( { 'position': 'static', } ); } else if ( qodefCore.scroll >= info.start - info.top && qodefCore.scroll + info.h + info.adj <= info.start + info.end && info.data( 'state' ) !== 'fixed' ) { var c = info.data( 'state' ) === 'top' ? 1 : -1; info.data( 'state', 'fixed' ); info.wrapper.css( { 'position': 'fixed', 'top': info.top, 'left': info.left, 'width': info.w, } ); TweenMax.fromTo( info.wrapper, .2, { y: 0 }, { y: c * 10, ease: Power4.easeInOut } ); TweenMax.to( info.wrapper, .2, { y: 0, delay: .2, } ); } else if ( qodefCore.scroll + info.h + info.adj > info.start + info.end && info.data( 'state' ) !== 'bottom' ) { info.data( 'state', 'bottom' ); info.wrapper.css( { 'position': 'absolute', 'top': info.end - info.h - info.adj, 'left': 0, } ); TweenMax.fromTo( info.wrapper, .1, { y: 0 }, { y: -5, } ); TweenMax.to( info.wrapper, .3, { y: 0, delay: .1, } ); } }, callStack: function ( info ) { this.calc( info ); this.infoPosition( info ); } }; })( jQuery ); (function ($) { "use strict"; var shortcode = 'webon_core_blog_list'; qodefCore.shortcodes[shortcode] = {}; if (typeof qodefCore.listShortcodesScripts === 'object') { $.each(qodefCore.listShortcodesScripts, function (key, value) { qodefCore.shortcodes[shortcode][key] = value; }); } })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefStandardNavMenu.init(); }); var qodefStandardNavMenu = { backgroundAnimation: function() { var firstLevelMenus = $('.qodef-header-navigation > ul '); if ( firstLevelMenus.length ) { firstLevelMenus.each(function() { var mainMenu = $(this); mainMenu.append('<div class="qodef-main-menu-background"></div>'); var menuLine = mainMenu.find('.qodef-main-menu-background'), menuItems = mainMenu.find('> li.menu-item'), initialOffset; if ( menuItems.filter('.current-menu-ancestor').length ) { initialOffset = menuItems.filter('.current-menu-ancestor').offset().left; menuLine.css('width', menuItems.filter('.current-menu-ancestor').outerWidth()); } else { initialOffset = menuItems.first().offset().left; menuLine.css('width', 0); } //initial positioning menuLine.css('left', initialOffset - mainMenu.offset().left); //fx on menuItems.mouseenter(function() { var menuItem = $(this), menuItemWidth = menuItem.outerWidth(), mainMenuOffset = mainMenu.offset().left, menuItemOffset = menuItem.offset().left - mainMenuOffset; menuLine.css('width', menuItemWidth); menuLine.css('left', menuItemOffset); menuLine.css('animation', 'none'); }); //fx off mainMenu.mouseleave(function(){ if (menuItems.filter('.current-menu-ancestor').length) { menuLine.css('width', menuItems.filter('.current-menu-ancestor').outerWidth()); menuLine.css('left', initialOffset - mainMenu.offset().left); } else { menuLine.css('width', 0); menuLine.css('left', -30); menuLine.css('animation', 'qode-fade-out .1s .5s forwards'); } }); }); } }, widgetBackgroundAnimation: function() { var widgets = $('#qodef-page-header .qodef-widget-holder'); if ( widgets.length ) { widgets.each(function() { var widget = $(this); widget.append('<div class="qodef-widget-background"></div>'); var widgetBackground = widget.find('.qodef-widget-background'), widgetItems = widget.find('>.widget'), initialOffset; initialOffset = widget.first().offset().left; widgetBackground.css('width', '0'); //initial positioning widgetBackground.css('left', initialOffset - widget.offset().left); //fx on widgetItems.mouseenter(function() { var widgetItem = $(this), widgetItemWidth = widgetItem.outerWidth(), widgetOffset = widget.offset().left, widgetItemOffset = widgetItem.offset().left - widgetOffset; widgetBackground.css('width', widgetItemWidth); widgetBackground.css('left', widgetItemOffset); widgetBackground.css('animation', 'none'); }); //fx off widgetItems.mouseleave(function(){ widgetBackground.css('width', 0); widgetBackground.css('left', 0); widgetBackground.css('animation', 'qode-fade-out .1s .5s forwards'); }); }); } }, init: function () { var $standardMenuObject = $('.qodef-header--standard #qodef-page-header'); if ( $standardMenuObject.length ) { qodefStandardNavMenu.backgroundAnimation(); qodefStandardNavMenu.widgetBackgroundAnimation(); } } }; })(jQuery); (function ($) { "use strict"; var fixedHeaderAppearance = { showHideHeader: function ($pageOuter, $header) { if (qodefCore.windowWidth > 1024) { if (qodefCore.scroll <= 0) { qodefCore.body.removeClass('qodef-header--fixed-display'); $pageOuter.css('padding-top', '0'); $header.css('margin-top', '0'); } else { qodefCore.body.addClass('qodef-header--fixed-display'); $pageOuter.css('padding-top', parseInt(qodefGlobal.vars.headerHeight + qodefGlobal.vars.topAreaHeight) + 'px'); $header.css('margin-top', parseInt(qodefGlobal.vars.topAreaHeight) + 'px'); } } }, init: function () { if (!qodefCore.body.hasClass('qodef-header--vertical')) { var $pageOuter = $('#qodef-page-outer'), $header = $('#qodef-page-header'); fixedHeaderAppearance.showHideHeader($pageOuter, $header); $(window).scroll(function () { fixedHeaderAppearance.showHideHeader($pageOuter, $header); }); $(window).resize(function () { $pageOuter.css('padding-top', '0'); fixedHeaderAppearance.showHideHeader($pageOuter, $header); }); } } }; qodefCore.fixedHeaderAppearance = fixedHeaderAppearance.init; })(jQuery); (function ($) { "use strict"; var stickyHeaderAppearance = { displayAmount: function () { if (qodefGlobal.vars.qodefStickyHeaderScrollAmount !== 0) { return parseInt(qodefGlobal.vars.qodefStickyHeaderScrollAmount, 10); } else { return parseInt(qodefGlobal.vars.headerHeight + qodefGlobal.vars.adminBarHeight, 10); } }, showHideHeader: function (displayAmount) { if (qodefCore.scroll < displayAmount) { qodefCore.body.removeClass('qodef-header--sticky-display'); } else { qodefCore.body.addClass('qodef-header--sticky-display'); } }, init: function () { var displayAmount = stickyHeaderAppearance.displayAmount(); stickyHeaderAppearance.showHideHeader(displayAmount); $(window).scroll(function () { stickyHeaderAppearance.showHideHeader(displayAmount); }); } }; qodefCore.stickyHeaderAppearance = stickyHeaderAppearance.init; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSideAreaMobileHeader.init(); }); var qodefSideAreaMobileHeader = { init: function () { var $holder = $('#qodef-side-area-mobile-header'); if ($holder.length && qodefCore.body.hasClass('qodef-mobile-header--side-area')) { var $navigation = $holder.find('.qodef-m-navigation'); qodefSideAreaMobileHeader.initOpenerTrigger($holder, $navigation); qodefSideAreaMobileHeader.initNavigationClickToggle($navigation); if (typeof qodefCore.qodefPerfectScrollbar === 'object') { qodefCore.qodefPerfectScrollbar.init($holder); } } }, initOpenerTrigger: function ($holder, $navigation) { var $openerIcon = $('.qodef-side-area-mobile-header-opener'), $closeIcon = $holder.children('.qodef-m-close'); if ($openerIcon.length && $navigation.length) { $openerIcon.on('tap click', function (e) { e.stopPropagation(); e.preventDefault(); if ($holder.hasClass('qodef--opened')) { $holder.removeClass('qodef--opened'); } else { $holder.addClass('qodef--opened'); } }); } $closeIcon.on('tap click', function (e) { e.stopPropagation(); e.preventDefault(); if ($holder.hasClass('qodef--opened')) { $holder.removeClass('qodef--opened'); } }); }, initNavigationClickToggle: function ($navigation) { var $menuItems = $navigation.find('ul li.menu-item-has-children'); $menuItems.each(function () { var $thisItem = $(this), $elementToExpand = $thisItem.find(' > .qodef-drop-down-second, > ul'), $dropdownOpener = $thisItem.find('> a'), slideUpSpeed = 'fast', slideDownSpeed = 'slow'; $dropdownOpener.on('click tap', function (e) { e.preventDefault(); e.stopPropagation(); if ($elementToExpand.is(':visible')) { $thisItem.removeClass('qodef-menu-item--open'); $elementToExpand.slideUp(slideUpSpeed); } else if ($dropdownOpener.parent().parent().children().hasClass('qodef-menu-item--open') && $dropdownOpener.parent().parent().parent().hasClass('qodef-vertical-menu')) { $thisItem.parent().parent().children().removeClass('qodef-menu-item--open'); $thisItem.parent().parent().children().find(' > .qodef-drop-down-second').slideUp(slideUpSpeed); $thisItem.addClass('qodef-menu-item--open'); $elementToExpand.slideDown(slideDownSpeed); } else { if (!$thisItem.parents('li').hasClass('qodef-menu-item--open')) { $menuItems.removeClass('qodef-menu-item--open'); $menuItems.find(' > .qodef-drop-down-second, > ul').slideUp(slideUpSpeed); } if ($thisItem.parent().parent().children().hasClass('qodef-menu-item--open')) { $thisItem.parent().parent().children().removeClass('qodef-menu-item--open'); $thisItem.parent().parent().children().find(' > .qodef-drop-down-second, > ul').slideUp(slideUpSpeed); } $thisItem.addClass('qodef-menu-item--open'); $elementToExpand.slideDown(slideDownSpeed); } }); }); }, }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSearchCoversHeader.init(); }); var qodefSearchCoversHeader = { init: function () { var $searchOpener = $('a.qodef-search-opener'), $searchForm = $('.qodef-search-cover-form'), $searchClose = $searchForm.find('.qodef-m-close'); if ($searchOpener.length && $searchForm.length) { $searchOpener.on('click', function (e) { e.preventDefault(); qodefSearchCoversHeader.openCoversHeader($searchForm); }); $searchClose.on('click', function (e) { e.preventDefault(); qodefSearchCoversHeader.closeCoversHeader($searchForm); }); } }, openCoversHeader: function ($searchForm) { qodefCore.body.addClass('qodef-covers-search--opened qodef-covers-search--fadein'); qodefCore.body.removeClass('qodef-covers-search--fadeout'); setTimeout(function () { $searchForm.find('.qodef-m-form-field').focus(); }, 600); }, closeCoversHeader: function ($searchForm) { qodefCore.body.removeClass('qodef-covers-search--opened qodef-covers-search--fadein'); qodefCore.body.addClass('qodef-covers-search--fadeout'); setTimeout(function () { $searchForm.find('.qodef-m-form-field').val(''); $searchForm.find('.qodef-m-form-field').blur(); qodefCore.body.removeClass('qodef-covers-search--fadeout'); }, 300); } }; })(jQuery); (function($) { "use strict"; $(document).ready(function(){ qodefSearchFullscreen.init(); }); var qodefSearchFullscreen = { init: function(){ var $searchOpener = $('a.qodef-search-opener'), $searchHolder = $('.qodef-fullscreen-search-holder'), $searchClose = $searchHolder.find('.qodef-m-close'); if ($searchOpener.length && $searchHolder.length) { $searchOpener.on('click', function (e) { e.preventDefault(); if(qodefCore.body.hasClass('qodef-fullscreen-search--opened')){ qodefSearchFullscreen.closeFullscreen($searchHolder); }else{ qodefSearchFullscreen.openFullscreen($searchHolder); } }); $searchClose.on('click', function (e) { e.preventDefault(); qodefSearchFullscreen.closeFullscreen($searchHolder); }); //Close on escape $(document).keyup(function (e) { if (e.keyCode === 27 && qodefCore.body.hasClass('qodef-fullscreen-search--opened')) { //KeyCode for ESC button is 27 qodefSearchFullscreen.closeFullscreen($searchHolder); } }); } }, openFullscreen: function($searchHolder){ qodefCore.body.removeClass('qodef-fullscreen-search--fadeout'); qodefCore.body.addClass('qodef-fullscreen-search--opened qodef-fullscreen-search--fadein'); setTimeout(function () { $searchHolder.find('.qodef-m-form-field').focus(); }, 200); qodefCore.qodefScroll.disable(); }, closeFullscreen: function($searchHolder){ qodefCore.body.removeClass('qodef-fullscreen-search--opened qodef-fullscreen-search--fadein'); qodefCore.body.addClass('qodef-fullscreen-search--fadeout'); setTimeout(function () { $searchHolder.find('.qodef-m-form-field').val(''); $searchHolder.find('.qodef-m-form-field').blur(); qodefCore.body.removeClass('qodef-fullscreen-search--fadeout'); }, 300); qodefCore.qodefScroll.enable(); } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSearch.init(); }); var qodefSearch = { init: function () { this.search = $('a.qodef-search-opener'); if (this.search.length) { this.search.each(function () { var $thisSearch = $(this); qodefSearch.searchHoverColor($thisSearch); }); } }, searchHoverColor: function ($searchHolder) { if (typeof $searchHolder.data('hover-color') !== 'undefined') { var hoverColor = $searchHolder.data('hover-color'), originalColor = $searchHolder.css('color'); $searchHolder.on('mouseenter', function () { $searchHolder.css('color', hoverColor); }).on('mouseleave', function () { $searchHolder.css('color', originalColor); }); } } }; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefProgressBarSpinner.init(); }); var qodefProgressBarSpinner = { percentNumber: 0, init: function () { this.holder = $('#qodef-page-spinner.qodef-layout--progress-bar'); if (this.holder.length) { qodefProgressBarSpinner.animateSpinner(this.holder); } }, animateSpinner: function ($holder) { var $numberHolder = $holder.find('.qodef-m-spinner-number-label'), $spinnerLine = $holder.find('.qodef-m-spinner-line-front'), numberIntervalFastest, windowLoaded = false; $spinnerLine.animate({'width': '100%'}, 10000, 'linear'); var numberInterval = setInterval(function () { qodefProgressBarSpinner.animatePercent($numberHolder, qodefProgressBarSpinner.percentNumber); if (windowLoaded) { clearInterval(numberInterval); } }, 100); $(window).on('load', function () { windowLoaded = true; numberIntervalFastest = setInterval(function () { if (qodefProgressBarSpinner.percentNumber >= 100) { clearInterval(numberIntervalFastest); $spinnerLine.stop().animate({'width': '100%'}, 500); setTimeout(function () { $holder.addClass('qodef--finished'); setTimeout(function () { qodefProgressBarSpinner.fadeOutLoader($holder); }, 1000); }, 600); } else { qodefProgressBarSpinner.animatePercent($numberHolder, qodefProgressBarSpinner.percentNumber); } }, 6); }); }, animatePercent: function ($numberHolder, percentNumber) { if (percentNumber < 100) { percentNumber += 5; $numberHolder.text(percentNumber); qodefProgressBarSpinner.percentNumber = percentNumber; } }, fadeOutLoader: function ($holder, speed, delay, easing) { speed = speed ? speed : 600; delay = delay ? delay : 0; easing = easing ? easing : 'swing'; $holder.delay(delay).fadeOut(speed, easing); $(window).on('bind', 'pageshow', function (event) { if (event.originalEvent.persisted) { $holder.fadeOut(speed, easing); } }); } }; })(jQuery); (function($) { "use strict"; /* ** Re-init scripts on gallery loaded */ $(document).on('yith_wccl_product_gallery_loaded', function () { if (typeof qodefCore.qodefWooMagnificPopup === "function") { qodefCore.qodefWooMagnificPopup.init(); } }); })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_instagram_list = {}; $(document).ready(function () { qodefInstagram.init(); }); var qodefInstagram = { init: function () { this.holder = $('.sbi.qodef-instagram-swiper-container'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), sliderOptions = $thisHolder.parent().attr('data-options'), $instagramImage = $thisHolder.find('.sbi_item.sbi_type_image'), $imageHolder = $thisHolder.find('#sbi_images'); $thisHolder.attr('data-options', sliderOptions); $imageHolder.addClass('swiper-wrapper'); if ($instagramImage.length) { $instagramImage.each(function () { $(this).addClass('qodef-e qodef-image-wrapper swiper-slide'); }); } if (typeof qodef.qodefSwiper === 'object') { qodef.qodefSwiper.init($thisHolder); } }); } }, }; qodefCore.shortcodes.webon_core_instagram_list.qodefInstagram = qodefInstagram; qodefCore.shortcodes.webon_core_instagram_list.qodefSwiper = qodef.qodefSwiper; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_product_categories_list = {}; qodefCore.shortcodes.webon_core_product_categories_list.qodefMasonryLayout = qodef.qodefMasonryLayout; qodefCore.shortcodes.webon_core_product_categories_list.qodefSwiper = qodef.qodefSwiper; })(jQuery); (function ($) { "use strict"; var shortcode = 'webon_core_product_list'; qodefCore.shortcodes[shortcode] = {}; if (typeof qodefCore.listShortcodesScripts === 'object') { $.each(qodefCore.listShortcodesScripts, function (key, value) { qodefCore.shortcodes[shortcode][key] = value; }); } })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefSideAreaCart.init(); }); var qodefSideAreaCart = { init: function () { var $holder = $('.qodef-woo-side-area-cart'); if ($holder.length) { $holder.each(function () { var $thisHolder = $(this); if (qodefCore.windowWidth > 680) { qodefSideAreaCart.trigger($thisHolder); qodefCore.body.on('added_to_cart', function () { qodefSideAreaCart.trigger($thisHolder); }); } }); } }, trigger: function ($holder) { var $opener = $holder.find('.qodef-m-opener'), $close = $holder.find('.qodef-m-close'), $items = $holder.find('.qodef-m-items'); // Open Side Area $opener.on('click', function (e) { e.preventDefault(); if (!$holder.hasClass('qodef--opened')) { qodefSideAreaCart.openSideArea($holder); $(document).keyup(function (e) { if (e.keyCode === 27) { qodefSideAreaCart.closeSideArea($holder); } }); } else { qodefSideAreaCart.closeSideArea($holder); } }); $close.on('click', function (e) { e.preventDefault(); qodefSideAreaCart.closeSideArea($holder); }); if ($items.length && typeof qodefCore.qodefPerfectScrollbar === 'object') { qodefCore.qodefPerfectScrollbar.init($items); } }, openSideArea: function ($holder) { qodefCore.qodefScroll.disable(); $holder.addClass('qodef--opened'); $('#qodef-page-wrapper').prepend('<div class="qodef-woo-side-area-cart-cover"/>'); $('.qodef-woo-side-area-cart-cover').on('click', function (e) { e.preventDefault(); qodefSideAreaCart.closeSideArea($holder); }); }, closeSideArea: function ($holder) { if ($holder.hasClass('qodef--opened')) { qodefCore.qodefScroll.enable(); $holder.removeClass('qodef--opened'); $('.qodef-woo-side-area-cart-cover').remove(); } } }; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_clients_list = {}; qodefCore.shortcodes.webon_core_clients_list.qodefSwiper = qodef.qodefSwiper; $(document).ready(function () { qodefClientsList.init(); }); var qodefClientsList = { init: function () { this.boxes = $('.qodef-clients-list .qodef-e'); if (this.boxes.length) { this.boxes.each(function () { var $thisBox = $(this); qodefClientsList.boxHoverColor($thisBox); }); } }, boxHoverColor: function ($boxHolder) { if (typeof $boxHolder.find('.qodef-e-inner').data('hover-color') !== 'undefined') { var $box = $boxHolder.find('.qodef-e-inner'); var originalColor = $box.css('background-color'); var hoverColor = $box.data('hover-color'); $boxHolder.on('mouseenter', function () { qodefClientsList.changeColor($box, 'background-color', hoverColor); }); $boxHolder.on('mouseleave', function () { qodefClientsList.changeColor($box, 'background-color', originalColor); }); } }, changeColor: function (boxElement, cssProperty, color) { boxElement.css(cssProperty, color); }, }; qodefCore.shortcodes.webon_core_clients_list.qodefClientsList = qodefClientsList; })(jQuery); (function ($) { "use strict"; var shortcode = 'webon_core_portfolio_list'; qodefCore.shortcodes[shortcode] = {}; if (typeof qodefCore.listShortcodesScripts === 'object') { $.each(qodefCore.listShortcodesScripts, function (key, value) { qodefCore.shortcodes[shortcode][key] = value; }); } })(jQuery); (function ($) { "use strict"; var shortcode = 'webon_core_team_list'; qodefCore.shortcodes[shortcode] = {}; if (typeof qodefCore.listShortcodesScripts === 'object') { $.each(qodefCore.listShortcodesScripts, function (key, value) { qodefCore.shortcodes[shortcode][key] = value; }); } })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_testimonials_list = {}; qodefCore.shortcodes.webon_core_testimonials_list.qodefSwiper = qodef.qodefSwiper; })(jQuery); (function ($) { "use strict"; qodefCore.shortcodes.webon_core_testimonials_list_accordion = {}; $(document).ready(function () { qodefTestimonialsAccordion.init(); }); var qodefTestimonialsAccordion = { init: function () { this.holder = $('.qodef-testimonials-list-accordion'); if (this.holder.length) { this.holder.each(function () { $(this).children('.qodef-grid-inner').accordion({ animate: "swing", collapsible: true, active: 0, icons: "", heightStyle: "content" }); }); } }, }; qodefCore.shortcodes.webon_core_testimonials_list_accordion.qodefTestimonialsAccordion = qodefTestimonialsAccordion; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefInteractiveLinkShowcaseInteractiveList.init(); }); var qodefInteractiveLinkShowcaseInteractiveList = { init: function () { this.holder = $('.qodef-interactive-link-showcase.qodef-layout--interactive-list'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), $links = $thisHolder.find('.qodef-m-item'), x = 0, y = 0, currentXCPosition = 0, currentYCPosition = 0; if ($links.length) { $links.on('mouseenter', function () { $links.removeClass('qodef--active'); $(this).addClass('qodef--active'); }).on('mousemove', function (event) { var $thisLink = $(this), $followInfoHolder = $thisLink.find('.qodef-e-follow-content'), $followImage = $followInfoHolder.find('.qodef-e-follow-image'), $followImageItem = $followImage.find('img'), followImageWidth = $followImageItem.width(), followImagesCount = parseInt($followImage.data('images-count'), 10), followImagesSrc = $followImage.data('images'), $followTitle = $followInfoHolder.find('.qodef-e-follow-title'), itemWidth = $thisLink.outerWidth(), itemHeight = $thisLink.outerHeight(), itemOffsetTop = $thisLink.offset().top - qodefCore.scroll, itemOffsetLeft = $thisLink.offset().left; x = (event.clientX - itemOffsetLeft) >> 0; y = (event.clientY - itemOffsetTop) >> 0; if (x > itemWidth) { currentXCPosition = itemWidth; } else if (x < 0) { currentXCPosition = 0; } else { currentXCPosition = x; } if (y > itemHeight) { currentYCPosition = itemHeight; } else if (y < 0) { currentYCPosition = 0; } else { currentYCPosition = y; } if (followImagesCount > 1) { var imagesUrl = followImagesSrc.split('|'), itemPartSize = itemWidth / followImagesCount; $followImageItem.removeAttr('srcset'); if (currentXCPosition < itemPartSize) { $followImageItem.attr('src', imagesUrl[0]); } // -2 is constant - to remove first and last item from the loop for (var index = 1; index <= (followImagesCount - 2); index++) { if (currentXCPosition >= itemPartSize * index && currentXCPosition < itemPartSize * (index + 1)) { $followImageItem.attr('src', imagesUrl[index]); } } if (currentXCPosition >= itemWidth - itemPartSize) { $followImageItem.attr('src', imagesUrl[followImagesCount - 1]); } } $followImage.css({'top': itemHeight / 2}); $followTitle.css({'transform': 'translateY(' + -(parseInt(itemHeight, 10) / 2 + currentYCPosition) + 'px)', 'left': -(currentXCPosition - followImageWidth/2)}); $followInfoHolder.css({'top': currentYCPosition, 'left': currentXCPosition}); }).on('mouseleave', function () { $links.removeClass('qodef--active'); }); } $thisHolder.addClass('qodef--init'); }); } } }; qodefCore.shortcodes.webon_core_interactive_link_showcase.qodefInteractiveLinkShowcaseInteractiveList = qodefInteractiveLinkShowcaseInteractiveList; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefInteractiveLinkShowcaseList.init(); }); var qodefInteractiveLinkShowcaseList = { init: function () { this.holder = $('.qodef-interactive-link-showcase.qodef-layout--list'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), $images = $thisHolder.find('.qodef-m-image'), $links = $thisHolder.find('.qodef-m-item'); $images.eq(0).addClass('qodef--active'); $links.eq(0).addClass('qodef--active'); $links.on('touchstart mouseenter', function (e) { var $thisLink = $(this); if (!qodefCore.html.hasClass('touchevents') || (!$thisLink.hasClass('qodef--active') && qodefCore.windowWidth > 680)) { e.preventDefault(); $images.removeClass('qodef--active').eq($thisLink.index()).addClass('qodef--active'); $links.removeClass('qodef--active').eq($thisLink.index()).addClass('qodef--active'); } }).on('touchend mouseleave', function () { var $thisLink = $(this); if (!qodefCore.html.hasClass('touchevents') || (!$thisLink.hasClass('qodef--active') && qodefCore.windowWidth > 680)) { $images.removeClass('qodef--prev'); $images.filter('.qodef--active').addClass('qodef--prev'); $links.removeClass('qodef--active').eq($thisLink.index()).addClass('qodef--active'); $images.removeClass('qodef--active').eq($thisLink.index()).addClass('qodef--active'); } }); $thisHolder.addClass('qodef--init'); }); } } }; qodefCore.shortcodes.webon_core_interactive_link_showcase.qodefInteractiveLinkShowcaseList = qodefInteractiveLinkShowcaseList; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefInteractiveLinkShowcaseSlider.init(); }); var qodefInteractiveLinkShowcaseSlider = { init: function () { this.holder = $('.qodef-interactive-link-showcase.qodef-layout--slider'); if (this.holder.length) { this.holder.each(function () { var $thisHolder = $(this), $images = $thisHolder.find('.qodef-m-image'); var $swiperSlider = new Swiper($thisHolder.find('.swiper-container'), { loop: true, slidesPerView: 'auto', centeredSlides: true, speed: 1400, mousewheel: true, init: false }); $thisHolder.waitForImages(function () { $swiperSlider.init(); }); $swiperSlider.on('init', function () { $images.eq(0).addClass('qodef--active'); $thisHolder.find('.swiper-slide-active').addClass('qodef--active'); $swiperSlider.on('slideChangeTransitionStart', function () { var $swiperSlides = $thisHolder.find('.swiper-slide'), $activeSlideItem = $thisHolder.find('.swiper-slide-active'); $images.removeClass('qodef--active').eq($activeSlideItem.data('swiper-slide-index')).addClass('qodef--active'); $swiperSlides.removeClass('qodef--active'); $activeSlideItem.addClass('qodef--active'); }); $thisHolder.find('.swiper-slide').on('click', function (e) { var $thisSwiperLink = $(this), $activeSlideItem = $thisHolder.find('.swiper-slide-active'); if (!$thisSwiperLink.hasClass('swiper-slide-active')) { e.preventDefault(); e.stopImmediatePropagation(); if (e.pageX < $activeSlideItem.offset().left) { $swiperSlider.slidePrev(); return false; } if (e.pageX > $activeSlideItem.offset().left + $activeSlideItem.outerWidth()) { $swiperSlider.slideNext(); return false; } } }); $thisHolder.addClass('qodef--init'); }); }); } } }; qodefCore.shortcodes.webon_core_interactive_link_showcase.qodefInteractiveLinkShowcaseSlider = qodefInteractiveLinkShowcaseSlider; })(jQuery); (function ($) { "use strict"; $(document).ready(function () { qodefInfoFollow.init(); }); $(document).on('webon_trigger_get_new_posts', function () { qodefInfoFollow.init(); }); var qodefInfoFollow = { init: function () { var $gallery = $('.qodef-hover-animation--follow'); if ($gallery.length) { qodefCore.body.append('<div class="qodef-follow-info-holder"><div class="qodef-follow-info-inner"><span class="qodef-follow-info-category"></span><br/><span class="qodef-follow-info-title"></span></div></div>'); var $followInfoHolder = $('.qodef-follow-info-holder'), $followInfoCategory = $followInfoHolder.find('.qodef-follow-info-category'), $followInfoTitle = $followInfoHolder.find('.qodef-follow-info-title'); $gallery.each(function () { $gallery.find('.qodef-e-inner').each(function () { var $thisItem = $(this); //info element position $thisItem.on('mousemove', function (e) { if(e.clientX + 20 + $followInfoHolder.width() > qodefCore.windowWidth){ $followInfoHolder.addClass('qodef-right'); }else{ $followInfoHolder.removeClass('qodef-right'); } $followInfoHolder.css({ top: e.clientY + 20, left: e.clientX + 20 }); }); //show/hide info element $thisItem.on('mouseenter', function () { var $thisItemTitle = $(this).find('.qodef-e-title'), $thisItemCategory = $(this).find('.qodef-e-info-category'); if ($thisItemTitle.length) { $followInfoTitle.html($thisItemTitle.clone()); } if ($thisItemCategory.length) { $followInfoCategory.html($thisItemCategory.html()); } if (!$followInfoHolder.hasClass('qodef-is-active')) { $followInfoHolder.addClass('qodef-is-active'); } }).on('mouseleave', function () { if ($followInfoHolder.hasClass('qodef-is-active')) { $followInfoHolder.removeClass('qodef-is-active'); } }); }); }); } } }; qodefCore.shortcodes.webon_core_portfolio_list.qodefInfoFollow = qodefInfoFollow; })(jQuery);
[+]
..
[-] webon-core.js
[edit]
[+]
parts
[-] webon-core.min.js
[edit]