Submit
Path:
~
/
home
/
getwphos
/
public_html
/
almajd14
/
wp-content
/
plugins
/
halstein-core
/
assets
/
js
/
File Content:
halstein-core.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, }; 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(); } ); $( window ).load( function () { qodefParallaxItem.init(); qodefScrollZoom.init(); } ); /** * Check element to be in the viewport */ var qodefIsInViewport = { check: function ( $element, callback, onlyOnce ) { if ( $element.length ) { var offset = typeof $element.data( 'viewport-offset' ) !== 'undefined' ? $element.data( 'viewport-offset' ) : 0.15; // When item is 15% in the viewport var observer = new IntersectionObserver( function ( entries ) { // isIntersecting is true when element and viewport are overlapping // isIntersecting is false when element and viewport don't overlap if ( entries[0].isIntersecting === true ) { callback.call( $element ); // Stop watching the element when it's initialize if ( onlyOnce !== false ) { observer.disconnect(); } } }, { threshold: [offset] } ); observer.observe( $element[0] ); } }, }; qodefCore.qodefIsInViewport = qodefIsInViewport; 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 = $( '#halstein-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>' ); } } } }; /** * Init parallax item */ var qodefParallaxItem = { init: function () { var $items = $( '.qodef-parallax-item' ); if ( $items.length ) { $items.each( function () { var $currentItem = $( this ), $y = Math.floor( Math.random() * (-100 - (-25)) + (-25) ); if ( $currentItem.hasClass( 'qodef-grid-item' ) ) { $currentItem.children( '.qodef-e-inner' ).attr( 'data-parallax', '{"y": ' + $y + ', "smoothness": ' + '30' + '}' ); } else { $currentItem.attr( 'data-parallax', '{"y": ' + $y + ', "smoothness": ' + '30' + '}' ); } } ); } qodefParallaxItem.initParallax(); }, initParallax: function () { var parallaxInstances = $( '[data-parallax]' ); if ( parallaxInstances.length && ! qodefCore.html.hasClass( 'touchevents' ) && typeof ParallaxScroll === 'object' ) { ParallaxScroll.init(); //initialization removed from plugin js file to have it run only on non-touch devices } }, }; qodefCore.qodefParallaxItem = qodefParallaxItem; /** * Init zoom scroll */ var qodefScrollZoom = { init: function () { var $items = $( '.qodef-zoom-scroll' ); if ( $items.length && ! qodefCore.html.hasClass( 'touchevents' ) ) { $items.each( function () { var $currentItem = $( this ).find( 'img' ); $currentItem.attr( { 'data-bottom-top': 'transform: scale(1);', 'data-top-bottom': 'transform: scale(1.1);' } ); } ); } if ( $( window ).width() > 1024 ) { skrollr.init( { forceHeight: false } ); } } }; qodefCore.qodefScrollZoom = qodefScrollZoom; })( 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 () { window.scrollTo( { top: 0, behavior: 'smooth' } ); }, 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"; $( window ).on( 'load', function () { qodefBackgroundText.init(); } ); $( window ).resize( function () { qodefBackgroundText.init(); } ); var qodefBackgroundText = { init : function () { var $holder = $( '.qodef-background-text' ); if ($holder.length) { $holder.each( function () { qodefBackgroundText.responsiveOutputHandler( $( this ) ); } ); } }, responsiveOutputHandler : function ($holder) { var breakpoints = { 3840: 1441, 1440: 1367, 1366: 1025, 1024: 1 }; $.each( breakpoints, function (max, min) { if (qodef.windowWidth <= max && qodef.windowWidth >= min) { qodefBackgroundText.generateResponsiveOutput( $holder, max ); } } ); }, generateResponsiveOutput: function ($holder, width) { var $textHolder = $holder.find( '.qodef-m-background-text' ); if ($textHolder.length) { $textHolder.css( { 'font-size': $textHolder.data( 'size-' + width ) + 'px', 'top' : $textHolder.data( 'vertical-offset-' + width ) + 'px', } ); } }, }; window.qodefBackgroundText = qodefBackgroundText; })( 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 () { qodefFullscreenMenu.init(); } ); $( window ).on( 'resize', function () { qodefFullscreenMenu.handleHeaderWidth( 'resize' ); } ); var qodefFullscreenMenu = { init: function () { var $fullscreenMenuOpener = $( 'a.qodef-fullscreen-menu-opener' ), $menuItems = $( '#qodef-fullscreen-area nav ul li a' ); if ( $fullscreenMenuOpener.length ) { // prevent header changing width when fullscreen menu is open qodefFullscreenMenu.handleHeaderWidth( 'init' ); // 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 ); } }, handleHeaderWidth: function ( state ) { var $header = $( '#qodef-page-header' ); var $fullscreenMenuOpener = $( 'a.qodef-fullscreen-menu-opener' ); if ( $header.length && $fullscreenMenuOpener.length ) { // if desktop device if ( qodefCore.windowWidth > 1024 ) { // if page height is greater then window height, scroll bar is visible if ( qodefCore.body.height() > qodefCore.windowHeight ) { // on resize reset previously set inline width if ( 'resize' === state ) { $header.css( { 'width': '' } ); } $header.width( $header.width() ); } } else { // reset previously set inline width $header.css( { 'width': '' } ); } } } }; })( 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 () { 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'; $( 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 ) { qodef.qodefWaitForImages.check( $thisItem, 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, 'linear', 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, 'width': qodefCore.windowWidth } ); } 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'; $( 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 ); if ( this.$sections.length) { this.$sections.each( function () { qodefParallaxBackground.ready($( this )); $( this ).addClass('qodef-parallax--init'); } ); } }, ready: function ( $section ) { qodef.qodefWaitForImages.check( $section, function () { qodefParallaxBackground.animateParallax( $section ); } ); }, animateParallax: function ( $section ) { var $parallaxHolder = $section.find('.qodef-parallax-img-holder'), maxY = $parallaxHolder.outerHeight() - $section.outerHeight(); gsap.to( $parallaxHolder, { opacity: 1, } ) const tl = gsap.timeline({ scrollTrigger: { trigger: $section, scrub: 1.4,//change between 1 and 2 to get more or less smooth effect start: () => { return "top bottom" }, end: () => { return "bottom top"; }, // markers: true,//debugging } }); tl.to( $parallaxHolder, { y: -maxY, } ) } }; qodefCore.qodefParallaxBackground = qodefParallaxBackground; })( 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 () { qodefSpinner.init(); } ); $( window ).on( 'load', function () { qodefSpinner.windowLoaded = true; } ); $( window ).on( 'elementor/frontend/init', function () { var isEditMode = Boolean( elementorFrontend.isEditMode() ); if ( isEditMode ) { qodefSpinner.init( isEditMode ); } } ); var qodefSpinner = { holder: '', windowLoaded: false, preloaderFinished: false, init: function ( isEditMode ) { this.holder = $( '#qodef-page-spinner' ); if ( this.holder.length ) { $( 'body' ).addClass( 'qodef-has-spinner' ); if ( this.holder.hasClass( 'qodef-layout--halstein' ) ) { var $holder = this.holder; var titleWrapper = $holder.find( '.qodef-m-title' ); var subtitleWrapper = $holder.find( '.qodef-m-subtitle' ); titleWrapper.html( titleWrapper.text().replace( /\S/g, '<span class=\'qodef-letter\'>$&</span>' ) ); titleWrapper.addClass( 'qodef--appeared' ); setTimeout( function () { subtitleWrapper.addClass( 'qodef--appeared' ); }, 1000 ); var tl = gsap.timeline(); tl.from( $holder.find( '.qodef-m-title .qodef-letter' ), { duration: 0.8, delay: 0.3, opacity: 0, x: -15, ease: 'Power2.easeOut', stagger: 0.15, onComplete: function () { setTimeout( function () { qodefSpinner.preloaderFinished = true; qodefSpinner.animateSpinner( isEditMode ); qodefSpinner.fadeOutAnimation(); }, 300 ); } } ); } else { qodefSpinner.preloaderFinished = true; qodefSpinner.animateSpinner( isEditMode ); qodefSpinner.fadeOutAnimation(); } } }, animateSpinner: function ( isEditMode ) { var qodefLoadInterval = setInterval( function () { if ( qodefSpinner.windowLoaded && qodefSpinner.preloaderFinished ) { clearInterval( qodefLoadInterval ); $( 'body' ).addClass( 'qodef-spinner-finished' ); qodefSpinner.fadeOutLoader(); } }, 100 ); if ( isEditMode ) { qodefSpinner.fadeOutLoader(); } }, fadeOutLoader: function ( speed, delay, easing ) { var $holder = qodefSpinner.holder.length ? qodefSpinner.holder : $( '#qodef-page-spinner' ); 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 ); } } ); }, 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.halstein_core_accordion = {}; $( document ).ready( function () { qodefAccordion.init(); } ); var qodefAccordion = { init: function () { var $holder = $( '.qodef-accordion' ); if ( $holder.length ) { $holder.each( function () { qodefAccordion.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { if ( $currentItem.hasClass( 'qodef-behavior--accordion' ) ) { qodefAccordion.initAccordion( $currentItem ); } if ( $currentItem.hasClass( 'qodef-behavior--toggle' ) ) { qodefAccordion.initToggle( $currentItem ); } $currentItem.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' ); $toggleAccordionTitle.off().on( 'mouseenter', function () { $( this ).addClass( 'ui-state-hover' ); } ).on( 'mouseleave', function () { $( this ).removeClass( 'ui-state-hover' ); } ).on( 'click', function ( e ) { e.preventDefault(); e.stopImmediatePropagation(); var $thisTitle = $( this ); if ( $thisTitle.hasClass( 'ui-state-active' ) ) { $thisTitle.removeClass( 'ui-state-active' ); $thisTitle.next().removeClass( 'ui-accordion-content-active' ).slideUp( 300 ); } else { $thisTitle.addClass( 'ui-state-active' ); $thisTitle.next().addClass( 'ui-accordion-content-active' ).slideDown( 400 ); } } ); } }; qodefCore.shortcodes.halstein_core_accordion.qodefAccordion = qodefAccordion; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_button = {}; $( document ).ready( function () { qodefButton.init(); } ); var qodefButton = { init: function () { this.buttons = $( '.qodef-button' ); if ( this.buttons.length ) { this.buttons.each( function () { qodefButton.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { qodefButton.buttonHoverColor( $currentItem ); qodefButton.buttonHoverBgColor( $currentItem ); qodefButton.buttonHoverBorderColor( $currentItem ); }, buttonHoverColor: function ( $button ) { if ( typeof $button.data( 'hover-color' ) !== 'undefined' ) { var hoverColor = $button.data( 'hover-color' ); var originalColor = $button.css( 'color' ); $button.on( 'mouseenter touchstart', function () { qodefButton.changeColor( $button, 'color', hoverColor ); } ); $button.on( 'mouseleave touchend', 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 touchstart', function () { qodefButton.changeColor( $button, 'background-color', hoverBackgroundColor ); } ); $button.on( 'mouseleave touchend', 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 touchstart', function () { qodefButton.changeColor( $button, 'border-color', hoverBorderColor ); } ); $button.on( 'mouseleave touchend', function () { qodefButton.changeColor( $button, 'border-color', originalBorderColor ); } ); } }, changeColor: function ( $button, cssProperty, color ) { $button.css( cssProperty, color ); } }; qodefCore.shortcodes.halstein_core_button.qodefButton = qodefButton; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_charts = {}; $( document ).ready( function () { qodefCharts.init(); } ); /** * Init charts shortcode functionality */ var qodefCharts = { init: function () { this.holder = $( '.qodef-charts' ); if ( this.holder.length ) { this.holder.each( function () { qodefCharts.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { qodefCore.qodefIsInViewport.check( $currentItem, function () { qodefCharts.generateChartData( $currentItem ); } ); }, generateChartData: function ( thisChart ) { var type = thisChart.data( 'type' ); if ( type ) { type = 'pie'; } else { type = 'doughnut'; } var values = thisChart.data( 'values' ); var labels = thisChart.data( 'labels' ); var backgroundColors = thisChart.data( 'background-colors' ); var hoverBackgroundColors = thisChart.data( 'hover-background-colors' ); let chart; let chartOptions = { type: type, data: { datasets: [{ data: values, backgroundColor: backgroundColors, hoverBackgroundColor: hoverBackgroundColors, borderWidth: 0, }], labels: labels }, options: { responsive: true, animation: { animateScale: false, animateRotate: true }, plugins: { legend: { display: false, }, tooltip: { titleFont: { family: 'Montserrat', size: 12, weight: 300 }, displayColors: false, cornerRadius: 5, caretSize: 6, } }, } }; thisChart.addClass( 'qodef--init' ); var ctx = thisChart.find( 'canvas' ); chart = new Chart( ctx, chartOptions ); }, }; qodefCore.shortcodes.halstein_core_charts.qodefCharts = qodefCharts; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_countdown = {}; $( document ).ready( function () { qodefCountdown.init(); } ); var qodefCountdown = { init: function () { this.countdowns = $( '.qodef-countdown' ); if ( this.countdowns.length ) { this.countdowns.each( function () { qodefCountdown.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { var $countdownElement = $currentItem.find( '.qodef-m-date' ), dateFormats = ['week', 'day', 'hour', 'minute', 'second'], options = qodefCountdown.generateOptions( $currentItem, dateFormats ); qodefCountdown.initCountdown( $countdownElement, options, dateFormats ); }, generateOptions: function ( $countdown, dateFormats ) { var options = {}; options.date = typeof $countdown.data( 'date' ) !== 'undefined' ? $countdown.data( 'date' ) : null; for ( var i = 0; i < dateFormats.length; i++ ) { var label = dateFormats[i] + 'Label', labelPlural = dateFormats[i] + 'LabelPlural'; options[label] = typeof $countdown.data( dateFormats[i] + '-label' ) !== 'undefined' ? $countdown.data( dateFormats[i] + '-label' ) : ''; options[labelPlural] = typeof $countdown.data( dateFormats[i] + '-label-plural' ) !== 'undefined' ? $countdown.data( dateFormats[i] + '-label-plural' ) : ''; } return options; }, initCountdown: function ( $countdownElement, options, dateFormats ) { var countDownDate = new Date( options.date ).getTime(); // Update the count down every 1 second var x = setInterval( function () { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds this.weeks = Math.floor( distance / (1000 * 60 * 60 * 24 * 7) ); this.days = Math.floor( (distance % (1000 * 60 * 60 * 24 * 7)) / (1000 * 60 * 60 * 24) ); this.hours = Math.floor( (distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) ); this.minutes = Math.floor( (distance % (1000 * 60 * 60)) / (1000 * 60) ); this.seconds = Math.floor( (distance % (1000 * 60)) / 1000 ); for ( var i = 0; i < dateFormats.length; i++ ) { var dateName = dateFormats[i] + 's'; qodefCountdown.initiateDate( $countdownElement, this[dateName], dateFormats[i], options ); } // If the count down is finished, write some text if ( distance < 0 ) { clearInterval( x ); qodefCountdown.afterClearInterval( $countdownElement, dateFormats, options ); } }, 1000 ); }, initiateDate: function ( $countdownElement, date, dateFormat, options ) { var $holder = $countdownElement.find( '.qodef-' + dateFormat + 's' ); $holder.find( '.qodef-label' ).html( ( 1 === date ) ? options[dateFormat + 'Label'] : options[dateFormat + 'LabelPlural'] ); date = (date < 10) ? '0' + date : date; $holder.find( '.qodef-digit' ).html( date ); }, afterClearInterval: function( $countdownElement, dateFormats, options ) { for ( var i = 0; i < dateFormats.length; i++ ) { var $holder = $countdownElement.find( '.qodef-' + dateFormats[i] + 's' ); $holder.find( '.qodef-label' ).html( options[dateFormats[i] + 'LabelPlural'] ); $holder.find( '.qodef-digit' ).html( '00' ); } } }; qodefCore.shortcodes.halstein_core_countdown.qodefCountdown = qodefCountdown; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_counter = {}; $( document ).ready( function () { qodefCounter.init(); } ); var qodefCounter = { init: function () { this.counters = $( '.qodef-counter' ); if ( this.counters.length ) { this.counters.each( function () { qodefCounter.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { var $counterElement = $currentItem.find( '.qodef-m-digit' ), options = qodefCounter.generateOptions( $currentItem ); qodefCore.qodefIsInViewport.check( $currentItem, function () { qodefCounter.counterScript( $counterElement, options ); }, false ); }, 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 ); // Timer // Launches every "settings.delay" var counterInterval = setInterval( function () { // Definition of conditions of arrest if ( nb_end !== null && nb_start >= nb_end ) { return; } // incrementation nb_start = nb_start + settings.step; // Check is ended if ( nb_start >= nb_end ) { nb_start = nb_end; clearInterval( counterInterval ); } // display $counterElement.text( nb_start + settings.txt ); }, settings.delay ); } }; qodefCore.shortcodes.halstein_core_counter.qodefCounter = qodefCounter; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_google_map = {}; $( document ).on( 'qodefGoogleMapsCallbackEvent', function () { qodefGoogleMap.init(); } ); var qodefGoogleMap = { init: function () { this.holder = $( '.qodef-google-map' ); if ( this.holder.length ) { this.holder.each( function () { qodefGoogleMap.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { if ( typeof window.qodefGoogleMap !== 'undefined' ) { window.qodefGoogleMap.init( $currentItem.find( '.qodef-m-map' ) ); } }, }; qodefCore.shortcodes.halstein_core_google_map.qodefGoogleMap = qodefGoogleMap; })( jQuery ); (function ($) { 'use strict'; qodefCore.shortcodes.halstein_core_graphs = {}; $( document ).ready( function () { qodefGraphs.init(); } ); /** * Init graphs shortcode functionality */ var qodefGraphs = { init : function () { this.holder = $( '.qodef-graphs' ); if (this.holder.length) { this.holder.each( function () { qodefGraphs.initItem( $( this ) ); } ); } }, initItem : function ($currentItem) { qodefCore.qodefIsInViewport.check( $currentItem, function () { $currentItem.addClass( 'qodef--init' ); var ctx = $currentItem.find( 'canvas' ); var data = qodefGraphs.generateChartData( $currentItem, ctx ); var chart = new Chart( ctx, data ); } ); }, generateChartData: function (thisChart, ctx) { var type = thisChart.data( 'type' ); if (type) { type = 'line'; } else { type = 'bar'; } var fill = thisChart.data( 'fill' ); var linear = thisChart.data( 'linear' ); var values = thisChart.data( 'values' ); var item_labels = thisChart.data( 'item-labels' ); var labels = thisChart.data( 'labels' ); var backgroundColors = thisChart.data( 'background-colors' ); var hoverBackgroundColors = thisChart.data( 'hover-background-colors' ); var borderColors = thisChart.data( 'border-colors' ); var hoverBorderColors = thisChart.data( 'hover-border-colors' ); var gridColor = thisChart.data( 'grid-color' ); var labelColor = thisChart.data( 'label-color' ); var datasets = []; values.forEach( function (item, index) { var dataset_item = {}; dataset_item.data = values[index].split( ',' ); dataset_item.label = item_labels[index]; dataset_item.backgroundColor = backgroundColors[index]; dataset_item.hoverBackgroundColor = hoverBackgroundColors[index]; dataset_item.borderColor = borderColors[index]; dataset_item.hoverBorderColor = hoverBorderColors[index]; dataset_item.pointBackgroundColor = 'rgba(0,0,0,0)'; dataset_item.pointBorderColor = 'rgba(0,0,0,0)'; dataset_item.pointHoverBackgroundColor = 'rgba(0,0,0,0)'; dataset_item.pointHoverBorderColor = 'rgba(0,0,0,0)'; dataset_item.cubicInterpolationMode = 'default'; dataset_item.fill = fill[index]; dataset_item.tension = linear[index]; datasets.push( dataset_item ); } ); var data_temp = { type : type, data : { labels : labels, datasets: datasets }, options: { responsive : true, aspectRatio: 1.7, hover : { mode : 'nearest', intersect: true }, plugins : { legend : { display: false, }, tooltip: { mode : 'nearest', intersect : false, titleFont : { family: 'Montserrat', size : 12, weight: 300, }, displayColors: false, cornerRadius : 5, caretSize : 6, }, }, scales : { x: { display : true, scaleLabel: { display: true, }, ticks : { color : labelColor, font : { family: 'Montserrat', size : 12, }, padding: 10, }, grid : { color : gridColor, tickLength: 30, } }, y: { display : true, scaleLabel: { display: false, }, ticks : { color : labelColor, font : { family: 'Montserrat', size : 12, }, padding: 10, }, grid : { color: gridColor, } } } } }; return data_temp; }, }; qodefCore.shortcodes.halstein_core_graphs.qodefGraphs = qodefGraphs; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_icon = {}; $( document ).ready( function () { qodefIcon.init(); } ); var qodefIcon = { init: function () { this.icons = $( '.qodef-icon-holder' ); if ( this.icons.length ) { this.icons.each( function () { qodefIcon.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { qodefIcon.iconHoverColor( $currentItem ); qodefIcon.iconHoverBgColor( $currentItem ); qodefIcon.iconHoverBorderColor( $currentItem ); }, iconHoverColor: function ( $iconHolder ) { if ( typeof $iconHolder.data( 'hover-color' ) !== 'undefined' ) { var spanHolder = $iconHolder.find( 'span' ).length ? $iconHolder.find( 'span' ) : $iconHolder; 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.halstein_core_icon.qodefIcon = qodefIcon; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_image_gallery = {}; $( document ).ready( function () { qodefImageGallery.init(); } ); var qodefImageGallery = { init: function () { this.holder = $( '.qodef-image-gallery.qodef--has-appear' ); if ( this.holder.length ) { this.holder.each( function () { qodefImageGallery.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { $holder.addClass( 'qodef--appeared' ); var tl = gsap.timeline(); tl.from( $holder.find( '.swiper-wrapper' ), { duration: 0.8, delay: 0.3, opacity: 0, xPercent: 100, ease: 'Power2.easeOut', stagger: 0.2, } ); }, ); }, }; qodefCore.shortcodes.halstein_core_image_gallery.qodefSwiper = qodef.qodefSwiper; qodefCore.shortcodes.halstein_core_image_gallery.qodefMasonryLayout = qodef.qodefMasonryLayout; qodefCore.shortcodes.halstein_core_image_gallery.qodefMagnificPopup = qodef.qodefMagnificPopup; qodefCore.shortcodes.halstein_core_image_gallery.qodefImageGallery = qodefImageGallery; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_image_with_text = {}; qodefCore.shortcodes.halstein_core_image_with_text.qodefMagnificPopup = qodef.qodefMagnificPopup; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_interactive_link_showcase = {}; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_pricing_table = {}; $( document ).ready( function () { qodefPricingTable.init(); } ); var qodefPricingTable = { init: function () { this.holder = $( '.qodef-pricing-table' ); if ( this.holder.length ) { this.holder.each( function () { qodefPricingTable.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { $holder.addClass( 'qodef--appeared' ); }, ); }, }; qodefCore.shortcodes.halstein_core_pricing_table.qodefPricingTable = qodefPricingTable; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_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 () { qodefProgressBar.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { var layout = $currentItem.data( 'layout' ); qodefCore.qodefIsInViewport.check( $currentItem, function () { $currentItem.addClass( 'qodef--init' ); var $container = $currentItem.find( '.qodef-m-canvas' ), data = qodefProgressBar.generateBarData( $currentItem, layout ), number = $currentItem.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( $currentItem, number ); qodefProgressBar.initLineBar( $container, data ); break; case 'custom': qodefProgressBar.initCustomBar( $container, data, number ); break; } }, false ); }, 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( Math.round( bar.value() * 100 ) + '%' ); } }, }; }, 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.halstein_core_progress_bar.qodefProgressBar = qodefProgressBar; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_separator = {}; $( document ).ready( function () { qodefSeparator.init(); } ); var qodefSeparator = { init: function () { this.holder = $( '.qodef-separator.qodef--has-appear' ); if ( this.holder.length ) { this.holder.each( function () { qodefSeparator.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { $holder.addClass( 'qodef--appeared' ); }, ); }, }; qodefCore.shortcodes.halstein_core_separator.qodefSeparator = qodefSeparator; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_single_image = {}; $( document ).ready( function () { qodefSingleImage.init(); } ); var qodefSingleImage = { init: function () { this.holder = $( '.qodef-single-image.qodef--has-appear' ); if ( this.holder.length ) { this.holder.each( function () { qodefSingleImage.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { var $body = $( 'body' ); if ( $body.hasClass( 'qodef-has-spinner' ) ) { var qodefSectionTitleInterval = setInterval( function () { if ( $body.hasClass( 'qodef-spinner-finished' ) ) { clearInterval( qodefSectionTitleInterval ); $holder.addClass( 'qodef--appeared' ); } }, 100 ); } else { $holder.addClass( 'qodef--appeared' ); } }, ); }, }; qodefCore.shortcodes.halstein_core_single_image.qodefMagnificPopup = qodef.qodefMagnificPopup; qodefCore.shortcodes.halstein_core_single_image.qodefSingleImage = qodefSingleImage; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_tabs = {}; $( document ).ready( function () { qodefTabs.init(); } ); var qodefTabs = { init: function () { this.holder = $( '.qodef-tabs' ); if ( this.holder.length ) { this.holder.each( function () { qodefTabs.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { $currentItem.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 ); } } ); $currentItem.addClass( 'qodef--init' ).tabs(); } }; qodefCore.shortcodes.halstein_core_tabs.qodefTabs = qodefTabs; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_vertical_split_slider = {}; $( document ).ready( function () { qodefVerticalSplitSlider.init(); } ); var qodefVerticalSplitSlider = { init: function () { var $holder = $( '.qodef-vertical-split-slider' ); if ( $holder.length ) { qodefVerticalSplitSlider.initItem( $holder ); } }, initItem: function ( $currentItem ) { var $headerInner = $( '#qodef-page-header-inner' ), breakpoint = qodefVerticalSplitSlider.getBreakpoint( $currentItem ), initialHeaderStyle = ''; if ( $headerInner.hasClass( 'qodef-skin--light' ) ) { initialHeaderStyle = 'light'; } else if ( $headerInner.hasClass( 'qodef-skin--dark' ) ) { initialHeaderStyle = 'dark'; } $currentItem.multiscroll( { navigation: true, navigationPosition: 'right', 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 ); }, } ); $currentItem.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(); qodefCore.body.removeClass( 'qodef-vertical-split-slider--initialized' ); } else { $.fn.multiscroll.build(); qodefCore.body.addClass( 'qodef-vertical-split-slider--initialized' ); } }, headerClassHandler: function ( slideHeaderStyle, initialHeaderStyle, $headerInner ) { var $controls = $( '#multiscroll-nav' ); 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 ); } } 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 ); } } else { $headerInner.removeClass( 'qodef-skin--light qodef-skin--dark' ); if ( $controls.length ) { $controls.removeClass( 'qodef-skin--light qodef-skin--dark' ); } } } }; qodefCore.shortcodes.halstein_vertical_split_slider.qodefVerticalSplitSlider = qodefVerticalSplitSlider; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_video_button = {}; qodefCore.shortcodes.halstein_core_video_button.qodefMagnificPopup = qodef.qodefMagnificPopup; })( jQuery ); (function ( $ ) { 'use strict'; var shortcode = 'halstein_core_blog_list'; qodefCore.shortcodes[shortcode] = {}; if ( typeof qodefCore.listShortcodesScripts === 'object' ) { $.each( qodefCore.listShortcodesScripts, function ( key, value ) { qodefCore.shortcodes[shortcode][key] = value; } ); } qodefCore.shortcodes[shortcode].qodefResizeIframes = qodef.qodefResizeIframes; })( jQuery ); (function ($) { 'use strict'; var shortcode = 'halstein_core_blog_slider_with_text'; qodefCore.shortcodes[shortcode] = {}; if (typeof qodefCore.listShortcodesScripts === 'object') { $.each( qodefCore.listShortcodesScripts, function (key, value) { qodefCore.shortcodes[shortcode][key] = value; } ); } qodefCore.shortcodes[shortcode].qodefResizeIframes = qodef.qodefResizeIframes; })(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 = { header: '', docYScroll: 0, init: function () { var displayAmount = stickyHeaderAppearance.displayAmount(); // Set variables stickyHeaderAppearance.header = $( '.qodef-header-sticky' ); stickyHeaderAppearance.docYScroll = $( document ).scrollTop(); // Set sticky visibility stickyHeaderAppearance.setVisibility( displayAmount ); $( window ).scroll( function () { stickyHeaderAppearance.setVisibility( displayAmount ); } ); }, displayAmount: function () { if ( qodefGlobal.vars.qodefStickyHeaderScrollAmount !== 0 ) { return parseInt( qodefGlobal.vars.qodefStickyHeaderScrollAmount, 10 ); } else { return parseInt( qodefGlobal.vars.headerHeight + qodefGlobal.vars.adminBarHeight, 10 ); } }, setVisibility: function ( displayAmount ) { var isStickyHidden = qodefCore.scroll < displayAmount; if ( stickyHeaderAppearance.header.hasClass( 'qodef-appearance--up' ) ) { var currentDocYScroll = $( document ).scrollTop(); isStickyHidden = (currentDocYScroll > stickyHeaderAppearance.docYScroll && currentDocYScroll > displayAmount) || (currentDocYScroll < displayAmount); stickyHeaderAppearance.docYScroll = $( document ).scrollTop(); } stickyHeaderAppearance.showHideHeader( isStickyHidden ); }, showHideHeader: function ( isStickyHidden ) { if ( isStickyHidden ) { qodefCore.body.removeClass( 'qodef-header--sticky-display' ); } else { qodefCore.body.addClass( 'qodef-header--sticky-display' ); } }, }; qodefCore.stickyHeaderAppearance = stickyHeaderAppearance.init; })( jQuery ); (function ( $ ) { 'use strict'; $( document ).ready( function() { qodefProgressBarSpinner.init(); } ); $( window ).on( 'load', function () { qodefProgressBarSpinner.windowLoaded = true; qodefProgressBarSpinner.completeAnimation(); } ); $( window ).on( 'elementor/frontend/init', function () { var isEditMode = Boolean( elementorFrontend.isEditMode() ); if ( isEditMode ) { qodefProgressBarSpinner.init( isEditMode ); } } ); var qodefProgressBarSpinner = { holder: '', windowLoaded: false, percentNumber: 0, init: function ( isEditMode ) { this.holder = $( '#qodef-page-spinner.qodef-layout--progress-bar' ); if ( this.holder.length ) { qodefProgressBarSpinner.animateSpinner( this.holder, isEditMode ); } }, animateSpinner: function ( $holder, isEditMode ) { var $numberHolder = $holder.find( '.qodef-m-spinner-number-label' ), $spinnerLine = $holder.find( '.qodef-m-spinner-line-front' ); $spinnerLine.animate( { 'width': '100%' }, 10000, 'linear' ); var numberInterval = setInterval( function () { qodefProgressBarSpinner.animatePercent( $numberHolder, qodefProgressBarSpinner.percentNumber ); if ( qodefProgressBarSpinner.windowLoaded ) { clearInterval( numberInterval ); } }, 100 ); if ( isEditMode ) { qodefProgressBarSpinner.fadeOutLoader( $holder ); } }, completeAnimation: function () { var $holder = qodefProgressBarSpinner.holder.length ? qodefProgressBarSpinner.holder : $( '#qodef-page-spinner.qodef-layout--progress-bar' ); var numberIntervalFastest = setInterval( function () { if ( qodefProgressBarSpinner.percentNumber >= 100 ) { clearInterval( numberIntervalFastest ); $holder.find( '.qodef-m-spinner-line-front' ).stop().animate( { 'width': '100%' }, 500 ); $holder.addClass( 'qodef--finished' ); setTimeout( function () { qodefProgressBarSpinner.fadeOutLoader( $holder ); }, 600 ); } else { qodefProgressBarSpinner.animatePercent( $holder.find( '.qodef-m-spinner-number-label' ), 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'; $( document ).ready( function() { qodefTextualSpinner.init(); } ); $( window ).on( 'load', function(){ qodefTextualSpinner.windowLoaded = true; } ); $( window ).on( 'elementor/frontend/init', function(){ const isEditMode = Boolean( elementorFrontend.isEditMode() ); if ( isEditMode ) { qodefTextualSpinner.init( isEditMode ); } } ); const qodefTextualSpinner = { init( isEditMode ) { const $holder = $( '#qodef-page-spinner.qodef-layout--textual' ); if ( $holder.length ) { if ( isEditMode ) { qodefTextualSpinner.fadeOutLoader( $holder ); } else { qodefTextualSpinner.splitText( $holder ); } } }, splitText( $holder ) { const $textHolder = $holder.find( '.qodef-m-text' ); if ( $textHolder.length ) { let text = $textHolder.text().trim(), chars = text.split( '' ), cssClass = ''; $textHolder.empty(); chars.forEach( function( c ) { cssClass = (c === ' ' ? 'qodef-m-empty-char' : ' '); $textHolder.append( '<span class="qodef-m-char ' + cssClass + '">' + c + '</span>' ); } ); setTimeout( function() { qodefTextualSpinner.animateSpinner( $holder ); }, 100 ); } }, animateSpinner( $holder ) { $holder.addClass( 'qodef--init' ); function animationLoop( animationProps ) { const $chars = $holder.find( '.qodef-m-char' ), charsLength = $chars.length - 1; if ( $chars.length ) { $chars.each( function ( i ) { const $thisChar = $( this ); setTimeout( function() { $thisChar.animate( animationProps.type, animationProps.duration, animationProps.easing, function() { if ( i === charsLength ) { if ( 1 === animationProps.repeat ) { animationLoop( { type: { opacity: 0 }, duration: 1200, easing: 'swing', delay: 0, repeat: 0, } ); } else { if ( ! qodefTextualSpinner.windowLoaded ) { animationLoop( { type: { opacity: 1 }, duration: 1800, easing: 'swing', delay: 160, repeat: 1, } ); } else { qodefTextualSpinner.fadeOutLoader( $holder, 600, 0, 'swing' ); setTimeout( function() { const $revSlider = $( '.qodef-after-spinner-rev rs-module' ); if ( $revSlider.length ) { $revSlider.revstart(); } }, 800 ); } } } } ); }, i * animationProps.delay ); } ); } } animationLoop( { type: { opacity: 1 }, duration: 1800, easing: 'swing', delay: 160, repeat: 1, } ); }, fadeOutLoader( $holder, speed, delay, easing ) { speed = speed ? speed : 500; delay = delay ? delay : 0; easing = easing ? easing : 'swing'; if ( $holder.length ) { $holder.delay( delay ).fadeOut( speed, easing ); $( window ).on( 'bind', 'pageshow', function( event ) { if ( event.originalEvent.persisted ) { $holder.fadeOut( speed, easing ); } } ); } } }; })( jQuery ); (function ( $ ) { 'use strict'; $( document ).ready( function () { qodefContactForm7.init(); } ); var qodefContactForm7 = { init: function () { var $holder = $( '.qodef-contact-form-7.qodef-button-layout--textual' ), $button = $holder.find( 'button.action-button' ); if ( $button.length ) { $button.each( function () { var $thisButton = $( this ), buttonText = $thisButton.text(), buttonIcon = '', buttonContent = ''; if ( $thisButton.hasClass( 'cf7mls_next' ) ) { buttonIcon = '<svg class="qodef-svg--button-arrow" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="17" viewBox="0 0 17 20" style="enable-background:new 0 0 17 20;" xml:space="preserve"><polyline class="qodef-m-arrow" points="7.1,3.9 13,9.8 7.1,15.9 "/><rect class="qodef-m-line" width="1" height="20"/></svg>'; } if ( $thisButton.hasClass( 'cf7mls_back' ) ) { buttonIcon = '<svg class="qodef-svg--button-arrow qodef--back" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="17" viewBox="0 0 17 20" style="enable-background:new 0 0 17 20;" xml:space="preserve"><polyline class="qodef-m-arrow" points="7.1,3.9 13,9.8 7.1,15.9 "/><rect class="qodef-m-line" width="1" height="20"/></svg>'; } buttonContent = '<span class="qodef-m-text">' + buttonText + '</span><span class="qodef-m-icon">' + buttonIcon + '</span>'; $thisButton.empty().append( buttonContent ); } ); } } }; })( jQuery ); (function ( $ ) { 'use strict'; $( document ).ready( function () { qodefContactForm7.init(); } ); var qodefContactForm7 = { init: function () { var $holder = $( '.qodef-contact-form-7.qodef-button-layout--textual' ), $button = $holder.find( 'button:not(.action-button)' ); if ( $button.length ) { $button.each( function () { var $thisButton = $( this ), buttonText = $thisButton.text(), buttonIcon = '<svg class="qodef-svg--button-arrow" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="17" viewBox="0 0 17 20" style="enable-background:new 0 0 17 20;" xml:space="preserve"><polyline class="qodef-m-arrow" points="7.1,3.9 13,9.8 7.1,15.9 "/><rect class="qodef-m-line" width="1" height="20"/></svg>', buttonContent = '<span class="qodef-m-text">' + buttonText + '</span><span class="qodef-m-icon">' + buttonIcon + '</span>'; $thisButton.empty().append( buttonContent ); } ); } } }; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_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 () { qodefInstagram.initSlider( $( this ) ); } ); } }, initSlider: function ( $currentItem, $initAllItems ) { var sliderOptions = $currentItem.parent().attr( 'data-options' ), $instagramImage = $currentItem.find( '.sbi_item.sbi_type_image' ), $imageHolder = $currentItem.find( '#sbi_images' ); $currentItem.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' ) { if ( false === $initAllItems ) { qodef.qodefSwiper.initSlider( $currentItem ); } else { qodef.qodefSwiper.init( $currentItem ); } } }, }; qodefCore.shortcodes.halstein_core_instagram_list.qodefInstagram = qodefInstagram; qodefCore.shortcodes.halstein_core_instagram_list.qodefSwiper = qodef.qodefSwiper; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_product_category_list = {}; qodefCore.shortcodes.halstein_core_product_category_list.qodefMasonryLayout = qodef.qodefMasonryLayout; qodefCore.shortcodes.halstein_core_product_category_list.qodefSwiper = qodef.qodefSwiper; })( jQuery ); (function ( $ ) { 'use strict'; var shortcode = 'halstein_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 () { qodefDropDownCart.init(); } ); var qodefDropDownCart = { init: function () { var $holder = $( '.qodef-widget-dropdown-cart-content' ); if ( $holder.length ) { $holder.off().each( function () { var $thisHolder = $( this ); qodefDropDownCart.trigger( $thisHolder ); qodefCore.body.on( 'added_to_cart removed_from_cart', function () { qodefDropDownCart.init(); } ); } ); } }, trigger: function ( $holder ) { var $items = $holder.find( '.qodef-woo-mini-cart' ); if ( $items.length && typeof qodefCore.qodefPerfectScrollbar === 'object' ) { qodefCore.qodefPerfectScrollbar.init( $items ); } }, }; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_clients_list = {}; qodefCore.shortcodes.halstein_core_clients_list.qodefSwiper = qodef.qodefSwiper; })( jQuery ); (function ( $ ) { 'use strict'; var shortcode = 'halstein_core_events_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 = 'halstein_core_masonry_gallery_list'; qodefCore.shortcodes[shortcode] = {}; qodefCore.shortcodes[shortcode].qodefMasonryLayout = qodef.qodefMasonryLayout; })( jQuery ); (function ( $ ) { 'use strict'; var shortcode = 'halstein_core_portfolio_list'; qodefCore.shortcodes[shortcode] = {}; if ( typeof qodefCore.listShortcodesScripts === 'object' ) { $.each( qodefCore.listShortcodesScripts, function ( key, value ) { qodefCore.shortcodes[shortcode][key] = value; } ); } $( document ).ready( function () { qodefPortfolioList.init(); } ); var qodefPortfolioList = { init: function () { this.holder = $( '.qodef-portfolio-list.qodef--has-appear' ); if ( this.holder.length ) { this.holder.each( function () { qodefPortfolioList.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { $holder.addClass( 'qodef--appeared' ); var tl = gsap.timeline(); tl.from( $holder.find( 'article' ), { duration: 0.8, delay: 0.3, opacity: 0, xPercent: 100, ease: 'Power2.easeOut', stagger: 0.2, } ); }, ); }, }; qodefCore.shortcodes.halstein_core_portfolio_list.qodefPortfolioList = qodefPortfolioList; })( jQuery ); (function ( $ ) { 'use strict'; var shortcode = 'halstein_core_team_list'; qodefCore.shortcodes[shortcode] = {}; if ( typeof qodefCore.listShortcodesScripts === 'object' ) { $.each( qodefCore.listShortcodesScripts, function ( key, value ) { qodefCore.shortcodes[shortcode][key] = value; } ); } $( document ).ready( function () { qodefTeamList.init(); } ); var qodefTeamList = { init: function () { this.holder = $( '.qodef-team-list.qodef--has-appear' ); if ( this.holder.length ) { this.holder.each( function () { qodefTeamList.initAppear( $( this ) ); } ); } }, initAppear: function ( $holder ) { qodefCore.qodefIsInViewport.check( $holder, function () { $holder.addClass( 'qodef--appeared' ); var tl = gsap.timeline(); tl.from( $holder.find( '.qodef-e' ), { duration: 0.8, delay: 0.3, opacity: 0, xPercent: 100, ease: 'Power2.easeOut', stagger: 0.2, } ); }, ); }, }; qodefCore.shortcodes.halstein_core_team_list.qodefTeamList = qodefTeamList; })( jQuery ); (function ( $ ) { 'use strict'; qodefCore.shortcodes.halstein_core_testimonials_list = {}; qodefCore.shortcodes.halstein_core_testimonials_list.qodefSwiper = qodef.qodefSwiper; })( 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 () { qodefInteractiveLinkShowcaseList.initItem( $( this ) ); } ); } }, initItem: function ( $currentItem ) { var $images = $currentItem.find( '.qodef-m-image' ), $links = $currentItem.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' )) ) { 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' )) ) { $links.removeClass( 'qodef--active' ).eq( $thisLink.index() ).addClass( 'qodef--active' ); $images.removeClass( 'qodef--active' ).eq( $thisLink.index() ).addClass( 'qodef--active' ); } } ); $currentItem.addClass( 'qodef--init' ); }, }; qodefCore.shortcodes.halstein_core_interactive_link_showcase.qodefInteractiveLinkShowcaseList = qodefInteractiveLinkShowcaseList; })( jQuery );
Submit
FILE
FOLDER
Name
Size
Permission
Action
halstein-core.js
84485 bytes
0644
halstein-core.min.js
42190 bytes
0644
N4ST4R_ID | Naxtarrr