1var wpAjaxUrl = 'https://peppermintridgefarm.au/wp-admin/admin-ajax.php';var flBuilderUrl = 'https://peppermintridgefarm.au/wp-content/plugins/bb-plugin/';var FLBuilderLayoutConfig = { 2 anchorLinkAnimations : { 3 duration : 1000, 4 easing : 'swing', 5 offset : 100 6 }, 7 paths : { 8 pluginUrl : 'https://peppermintridgefarm.au/wp-content/plugins/bb-plugin/', 9 wpAjaxUrl : 'https://peppermintridgefarm.au/wp-admin/admin-ajax.php' 10 }, 11 breakpoints : { 12 small : 768, 13 medium : 992, 14 large : 1200 }, 15 waypoint: { 16 offset: 80 17 }, 18 emptyColWidth: '0%', 19 i18n : { 20 opensInNewTab : '(opens in new tab)' 21 } 22}; 23(function($){ 24 25 if(typeof FLBuilderLayout != 'undefined') { 26 return; 27 } 28 29 /** 30 * Helper class with generic logic for a builder layout. 31 * 32 * @class FLBuilderLayout 33 * @since 1.0 34 */ 35 FLBuilderLayout = { 36 37 /** 38 * Initializes a builder layout. 39 * 40 * @since 1.0 41 * @method init 42 */ 43 init: function() 44 { 45 // Destroy existing layout events. 46 FLBuilderLayout._destroy(); 47 48 // Init CSS classes. 49 FLBuilderLayout._initClasses(); 50 51 // Init backgrounds.
52 FLBuilderLayout._initBackgrounds(); 53 54 // Init buttons. 55 FLBuilderLayout._initButtons(); 56 57 // Init row shape layer height. 58 FLBuilderLayout._initRowShapeLayerHeight(); 59 60 // Init the new tab notice on links opening in a new tab. 61 FLBuilderLayout._initLinkNotices(); 62 63 // Only init if the builder isn't active. 64 if ( 0 === $('.fl-builder-edit').length ) { 65 66 // Init anchor links. 67 FLBuilderLayout._initAnchorLinks(); 68 69 // Init the browser hash. 70 FLBuilderLayout._initHash(); 71 72 // Init forms. 73 FLBuilderLayout._initForms(); 74 75 FLBuilderLayout._reorderMenu(); 76 } 77 else { 78 FLBuilderLayout._initNestedColsWidth(); 79 } 80 $('body').removeClass( 'fl-no-js' ); 81 }, 82 83 /** 84 * Public method for refreshing Wookmark or MosaicFlow galleries 85 * within an element. 86 * 87 * @since 1.7.4 88 * @method refreshGalleries 89 */ 90 refreshGalleries: function( element ) 91 { 92 var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ), 93 mfContent = $element.find( '.fl-mosaicflow-content' ), 94 wmContent = $element.find( '.fl-gallery' ), 95 mfObject = null; 96 97 if ( mfContent ) { 98 99 mfObject = mfContent.data( 'mosaicflow' ); 100 101 if ( mfObject ) { 102 mfObject.columns = $( [] ); 103 mfObject.columnsHeights = []; 104 mfContent.data( 'mosaicflow', mfObject ); 105 mfContent.mosaicflow( 'refill' ); 106 } 107 } 108 if ( wmContent ) { 109 wmContent.trigger( 'refreshWookmark' ); 110 } 111 }, 112 113 /** 114 * Public method for refreshing Masonry within an element 115 * 116 * @since 1.8.1 117 * @method refreshGridLayout 118 */ 119 refreshGridLayout: function( element ) 120 { 121 var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ), 122 msnryContent = $element.find('.masonry'); 123 124 if ( msnryContent.length ) { 125 msnryContent.masonry('layout'); 126 } 127 }, 128 129 /** 130 * Public method for reloading BxSlider within an element 131 * 132 * @since 1.8.1 133 * @method reloadSlider 134 */ 135 reloadSlider: function( content ) 136 { 137 var $content = 'undefined' == typeof content ? $('body') : $(content); 138 139 // reload sliders. 140 if ($content.find('.bx-viewport > div').length > 0) { 141 $.each($content.find('.bx-viewport > div'), function (key, slider) { 142 setTimeout(function () { 143 $(slider).data('bxSlider').reloadSlider(); 144 }, 100); 145 }); 146 } 147 }, 148 149 /** 150 * Public method for resizing WP audio player 151 * 152 * @since 1.8.2 153 * @method resizeAudio 154 */ 155 resizeAudio: function( element ) 156 { 157 var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ), 158 audioPlayers = $element.find('.wp-audio-shortcode.mejs-audio'), 159 player = null, 160 mejsPlayer = null, 161 rail = null, 162 railWidth = 400; 163 164 if ( audioPlayers.length && typeof mejs !== 'undefined' ) { 165 audioPlayers.each(function(){ 166 player = $(this); 167 mejsPlayer = mejs.players[player.attr('id')]; 168 rail = player.find('.mejs-controls .mejs-time-rail'); 169 var innerMejs = player.find('.mejs-inner'), 170 total = player.find('.mejs-controls .mejs-time-total'); 171 172 if ( typeof mejsPlayer !== 'undefined' ) { 173 railWidth = Math.ceil(player.width() * 0.8); 174 175 if ( innerMejs.length ) { 176 177 rail.css('width', railWidth +'px!important'); 178 //total.width(rail.width() - 10); 179 180 mejsPlayer.options.autosizeProgress = true; 181 182 // webkit has trouble doing this without a delay 183 setTimeout(function () { 184 mejsPlayer.setControlsSize(); 185 }, 50); 186 187 player.find('.mejs-inner').css({ 188 visibility: 'visible', 189 height: 'inherit' 190 }); 191 } 192 } 193 }); 194 } 195 }, 196 197 /** 198 * Public method for preloading WP audio player when it's inside the hidden element 199 * 200 * @since 1.8.2 201 * @method preloadAudio 202 */ 203 preloadAudio: function(element) 204 { 205 var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ), 206 contentWrap = $element.closest('.fl-accordion-item'), 207 audioPlayers = $element.find('.wp-audio-shortcode.mejs-audio'); 208 209 if ( ! contentWrap.hasClass('fl-accordion-item-active') && audioPlayers.find('.mejs-inner').length ) { 210 audioPlayers.find('.mejs-inner').css({ 211 visibility : 'hidden', 212 height: 0 213 }); 214 } 215 }, 216 217 /** 218 * Public method for resizing slideshow momdule within the tab 219 * 220 * @since 1.10.5 221 * @method resizeSlideshow 222 */ 223 resizeSlideshow: function(){ 224 if(typeof YUI !== 'undefined') { 225 YUI().use('node-event-simulate', function(Y) { 226 Y.one(window).simulate("resize"); 227 }); 228 } 229 }, 230 231 /** 232 * Public method for reloading an embedded Google Map within the tabs or hidden element. 233 * 234 * @since 2.2 235 * @method reloadGoogleMap 236 */ 237 reloadGoogleMap: function(element){ 238 var $element = 'undefined' == typeof element ? $( 'body' ) : $( element ),
239 googleMap = $element.find( 'iframe[src*="google.com/maps"]' ); 240 241 if ( googleMap.length ) { 242 googleMap.attr( 'src', function(i, val) { 243 return val; 244 }); 245 } 246 }, 247 248 /** 249 * Unbinds builder layout events. 250 * 251 * @since 1.0 252 * @access private 253 * @method _destroy 254 */ 255 _destroy: function() 256 { 257 var win = $(window); 258 259 win.off('scroll.fl-bg-parallax'); 260 win.off('resize.fl-bg-video'); 261 }, 262 263 /** 264 * Checks to see if the current device has touch enabled. 265 * 266 * @since 1.0 267 * @access private 268 * @method _isTouch 269 * @return {Boolean} 270 */ 271 _isTouch: function() 272 { 273 if(('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) { 274 return true; 275 } 276 277 return false; 278 }, 279 280 /** 281 * Checks to see if the current device is mobile. 282 * 283 * @since 1.7 284 * @access private 285 * @method _isMobile 286 * @return {Boolean} 287 */ 288 _isMobile: function() 289 { 290 return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test( navigator.userAgent ); 291 }, 292 293 /** 294 * Initializes builder body classes. 295 * 296 * @since 1.0 297 * @access private 298 * @method _initClasses 299 */ 300 _initClasses: function() 301 { 302 var body = $( 'body' ), 303 ua = navigator.userAgent; 304 305 // Add the builder body class (skip on block-only frontend to avoid layout break). 306 if ( ! body.hasClass( 'fl-builder-blocks-only' ) && ! body.hasClass( 'archive' ) && $( '.fl-builder-content-primary' ).length > 0 ) { 307 body.addClass('fl-builder'); 308 } 309 310 // Add the builder touch body class. 311 if(FLBuilderLayout._isTouch()) { 312 body.addClass('fl-builder-touch'); 313 } 314 315 // Add the builder mobile body class. 316 if(FLBuilderLayout._isMobile()) { 317 body.addClass('fl-builder-mobile'); 318 } 319 320 if ( $(window).width() < FLBuilderLayoutConfig.breakpoints.small ) { 321 body.addClass( 'fl-builder-breakpoint-small' ); 322 } 323 324 if ( $(window).width() > FLBuilderLayoutConfig.breakpoints.small && $(window).width() < FLBuilderLayoutConfig.breakpoints.medium ) { 325 body.addClass( 'fl-builder-breakpoint-medium' ); 326 } 327 328 if ( $(window).width() > FLBuilderLayoutConfig.breakpoints.medium && $(window).width() < FLBuilderLayoutConfig.breakpoints.large ) { 329 body.addClass( 'fl-builder-breakpoint-large' ); 330 } 331 332 if ( $(window).width() > FLBuilderLayoutConfig.breakpoints.large ) { 333 body.addClass( 'fl-builder-breakpoint-default' ); 334 } 335 336 // IE11 body class. 337 if ( ua.indexOf( 'Trident/7.0' ) > -1 && ua.indexOf( 'rv:11.0' ) > -1 ) { 338 body.addClass( 'fl-builder-ie-11' ); 339 } 340 }, 341 342 /** 343 * Initializes builder node backgrounds that require 344 * additional JavaScript logic such as parallax. 345 * 346 * @since 1.1.4 347 * @access private
348 * @method _initBackgrounds 349 */ 350 _initBackgrounds: function() 351 { 352 var win = $(window); 353 354 // Init parallax backgrounds. 355 if($('.fl-row-bg-parallax').length > 0 && !FLBuilderLayout._isMobile()) { 356 FLBuilderLayout._scrollParallaxBackgrounds(); 357 FLBuilderLayout._initParallaxBackgrounds(); 358 win.on('resize.fl-bg-parallax', FLBuilderLayout._initParallaxBackgrounds); 359 win.on('scroll.fl-bg-parallax', FLBuilderLayout._scrollParallaxBackgrounds); 360 } 361 362 // Init video backgrounds. 363 if($('.fl-bg-video').length > 0) { 364 FLBuilderLayout._initBgVideos(); 365 FLBuilderLayout._resizeBgVideos(); 366 367 // Ensure FLBuilderLayout._resizeBgVideos() is only called once on window resize. 368 var resizeBGTimer = null; 369 win.on('resize.fl-bg-video', function(e){ 370 clearTimeout( resizeBGTimer ); 371 resizeBGTimer = setTimeout(function() { 372 FLBuilderLayout._resizeBgVideos(e); 373 }, 100 ); 374 }); 375 } 376 }, 377 378 /** 379 * Initializes all buttons in a layout. 380 * 381 * @since 2.10 382 * @access private 383 * @method _initButtons 384 */ 385 _initButtons: function() 386 { 387 // Trigger click event on Enter or Space key press for deprecated button markup. 388 $('a.fl-button[role="button"]').on('keydown', function(event) { 389 if (event.key === 'Enter' || event.key === ' ') { 390 // Necessary to prevent the default behavior of the space key from scrolling the page 391 event.preventDefault(); 392 $(this).trigger('click'); 393 } 394 }); 395 }, 396 397 /** 398 * Initializes all parallax backgrounds in a layout. 399 * 400 * @since 1.1.4 401 * @access private 402 * @method _initParallaxBackgrounds 403 */ 404 _initParallaxBackgrounds: function() 405 { 406 $('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground); 407 }, 408 409 /** 410 * Initializes a single parallax background. 411 * 412 * @since 1.1.4 413 * @access private 414 * @method _initParallaxBackgrounds 415 */ 416 _initParallaxBackground: function() 417 { 418 var row = $(this), 419 content = row.find('> .fl-row-content-wrap'), 420 winWidth = $(window).width(), 421 screenSize = '', 422 imageSrc = { 423 default: '', 424 medium: '', 425 responsive: '', 426 }; 427 428 imageSrc.default = row.data('parallax-image') || ''; 429 imageSrc.medium = row.data('parallax-image-medium') || imageSrc.default; 430 imageSrc.responsive = row.data('parallax-image-responsive') || imageSrc.medium; 431 432 if (winWidth > FLBuilderLayoutConfig.breakpoints.medium) { 433 screenSize = 'default'; 434 } else if (winWidth > FLBuilderLayoutConfig.breakpoints.small && winWidth <= FLBuilderLayoutConfig.breakpoints.medium ) { 435 screenSize = 'medium'; 436 } else if (winWidth <= FLBuilderLayoutConfig.breakpoints.small) { 437 screenSize = 'responsive'; 438 } 439 440 content.css('background-image', 'url(' + imageSrc[screenSize] + ')'); 441 row.data('current-image-loaded', screenSize ); 442 443 }, 444 445 /** 446 * Fires when the window is scrolled to adjust 447 * parallax backgrounds. 448 * 449 * @since 1.1.4 450 * @access private 451 * @method _scrollParallaxBackgrounds 452 */ 453 _scrollParallaxBackgrounds: function() 454 { 455 $('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground); 456 }, 457 458 /** 459 * Fires when the window is scrolled to adjust 460 * a single parallax background. 461 * 462 * @since 1.1.4 463 * @access private 464 * @method _scrollParallaxBackground 465 */ 466 _scrollParallaxBackground: function() 467 { 468 var win = $(window), 469 row = $(this), 470 content = row.find('> .fl-row-content-wrap'), 471 speed = row.data('parallax-speed'), 472 offset = content.offset(), 473 yPos = -((win.scrollTop() - offset.top) / speed), 474 initialOffset = ( row.data('parallax-offset') != null ) ? row.data('parallax-offset') : 0, 475 totalOffset = yPos - initialOffset; 476 477 content.css('background-position', 'center ' + totalOffset + 'px'); 478 }, 479 480 /** 481 * Initializes all video backgrounds. 482 * 483 * @since 1.6.3.3 484 * @access private 485 * @method _initBgVideos 486 */ 487 _initBgVideos: function() 488 { 489 $('.fl-bg-video').each(FLBuilderLayout._initBgVideo); 490 }, 491 492 /** 493 * Initializes a video background. 494 * 495 * @since 1.6.3.3 496 * @access private 497 * @method _initBgVideo 498 */ 499 _initBgVideo: function() 500 { 501 var wrap = $( this ), 502 width = wrap.data( 'width' ), 503 height = wrap.data( 'height' ), 504 mp4 = wrap.data( 'mp4' ), 505 youtube = wrap.data( 'youtube'), 506 vimeo = wrap.data( 'vimeo'), 507 mp4Type = wrap.data( 'mp4-type' ), 508 webm = wrap.data( 'webm' ), 509 webmType = wrap.data( 'webm-type' ), 510 fallback = wrap.data( 'fallback' ), 511 loaded = wrap.data( 'loaded' ), 512 videoMobile = wrap.data( 'video-mobile' ), 513 playPauseButton = wrap.find('.fl-bg-video-play-pause-control'), 514 fallbackTag = '', 515 videoTag = null, 516 mp4Tag = null, 517 webmTag = null; 518 519 // Return if the video has been loaded for this row. 520 if ( loaded ) { 521 return; 522 } 523
524 videoTag = $( '<video autoplay loop muted playsinline></video>' ); 525 526 /** 527 * Add poster image (fallback image) 528 */ 529 if( 'undefined' != typeof fallback && '' != fallback ) { 530 videoTag.attr( 'poster', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' ) 531 videoTag.css({ 532 backgroundImage: 'url("' + fallback + '")', 533 backgroundColor: 'transparent', 534 backgroundRepeat: 'no-repeat', 535 backgroundSize: 'cover', 536 backgroundPosition: 'center center', 537 }) 538 } 539 540 // MP4 Source Tag 541 if ( 'undefined' != typeof mp4 && '' != mp4 ) { 542 543 mp4Tag = $( '<source />' ); 544 mp4Tag.attr( 'src', mp4 ); 545 mp4Tag.attr( 'type', mp4Type ); 546 547 videoTag.append( mp4Tag ); 548 } 549 // WebM Source Tag 550 if ( 'undefined' != typeof webm && '' != webm ) { 551 552 webmTag = $( '<source />' ); 553 webmTag.attr( 'src', webm ); 554 webmTag.attr( 'type', webmType ); 555 556 videoTag.append( webmTag ); 557 } 558 559 // This is either desktop, or mobile is enabled. 560 if ( ! FLBuilderLayout._isMobile() || ( FLBuilderLayout._isMobile() && "yes" == videoMobile ) ) { 561 if ( 'undefined' != typeof youtube ) { 562 FLBuilderLayout._initYoutubeBgVideo.apply( this ); 563 } 564 else if ( 'undefined' != typeof vimeo ) { 565 FLBuilderLayout._initVimeoBgVideo.apply( this ); 566 } 567 else { 568 wrap.append( videoTag ); 569 570 if ( playPauseButton.length > 0 ) { 571 var video = videoTag[0]; 572 573 playPauseButton.on( 'click', { video: video }, function(e) { 574 var video = e.data.video; 575 576 if ( video.paused ) { 577 video.play(); 578 } else { 579 video.pause(); 580 } 581 } ); 582 583 $( video ).on( 'play playing', function () { 584 playPauseButton.removeClass( 'fa-play' ).addClass( 'fa-pause' ); 585 } ); 586 587 $( video ).on( 'pause ended waiting', function () { 588 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 589 } ); 590 } 591 } 592 } 593 else { 594 // if we are here, it means we are on mobile and NO is set so remove video src and use fallback 595 videoTag.attr('src', '') 596 wrap.append( videoTag ); 597 } 598 599 // Mark this video as loaded. 600 wrap.data('loaded', true); 601 }, 602 603 /** 604 * Initializes Youtube video background 605 * 606 * @since 1.9 607 * @access private 608 * @method _initYoutubeBgVideo 609 */ 610 _initYoutubeBgVideo: function() 611 { 612 var playerWrap = $(this), 613 videoId = playerWrap.data('video-id'), 614 videoPlayer = playerWrap.find('.fl-bg-video-player'), 615 enableAudio = playerWrap.data('enable-audio'), 616 audioButton = playerWrap.find('.fl-bg-video-audio'), 617 playPauseButton = playerWrap.find('.fl-bg-video-play-pause-control'), 618 startTime = 'undefined' !== typeof playerWrap.data('start') ? playerWrap.data('start') : 0, 619 startTime = 'undefined' !== typeof playerWrap.data('t') && startTime === 0 ? playerWrap.data('t') : startTime, 620 endTime = 'undefined' !== typeof playerWrap.data('end') ? playerWrap.data('end') : 0, 621 loop = 'undefined' !== typeof playerWrap.data('loop') ? playerWrap.data('loop') : 1, 622 stateCount = 0, 623 player,fallback_showing; 624 625 if ( videoId ) { 626 fallback = playerWrap.data('fallback') || false 627 if( fallback ) { 628 playerWrap.find('iframe').remove() 629 fallbackTag = $( '<div></div>' ); 630 fallbackTag.addClass( 'fl-bg-video-fallback' ); 631 fallbackTag.css( 'background-image', 'url(' + playerWrap.data('fallback') + ')' ); 632 fallbackTag.css( 'background-size', 'cover' ); 633 fallbackTag.css( 'transition', 'background-image 1s') 634 playerWrap.append( fallbackTag ); 635 fallback_showing = true; 636 } 637 FLBuilderLayout._onYoutubeApiReady( function( YT ) { 638 setTimeout( function() { 639 640 player = new YT.Player( videoPlayer[0], { 641 videoId: videoId, 642 events: { 643 onReady: function(event) { 644 if ( "no" === enableAudio || FLBuilderLayout._isMobile() ) { 645 event.target.mute(); 646 } 647 else if ( "yes" === enableAudio && event.target.isMuted ) { 648 event.target.unMute(); 649 } 650 651 // Store an instance to a parent 652 playerWrap.data('YTPlayer', player); 653 FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap); 654 655 // Queue the video. 656 event.target.playVideo(); 657 658 if ( audioButton.length > 0 && ! FLBuilderLayout._isMobile() ) {
659 audioButton.on( 'click', {button: audioButton, player: player}, FLBuilderLayout._toggleBgVideoAudio ); 660 } 661 662 if ( playPauseButton.length > 0 ) { 663 playPauseButton.on( 'click', {player: player}, function(e) { 664 var player = e.data.player; 665 666 if ( 1 === player.getPlayerState() ) { 667 player.pauseVideo(); 668 } else { 669 player.playVideo(); 670 } 671 }); 672 } 673 }, 674 onStateChange: function( event ) { 675 676 if ( event.data === 1 ) { 677 if ( fallback_showing ) { 678 $( '.fl-bg-video-fallback' ).css( 'background-image', 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)' ) 679 } 680 } 681 // Manual check if video is not playable in some browsers. 682 // StateChange order: [-1, 3, -1] 683 if ( stateCount < 4 ) { 684 stateCount++; 685 } 686 687 // Comply with the audio policy in some browsers like Chrome and Safari. 688 if ( stateCount > 1 && -1 === event.data && "yes" === enableAudio ) { 689 player.mute(); 690 player.playVideo(); 691 audioButton.show(); 692 } 693 694 if ( event.data === YT.PlayerState.ENDED && 1 === loop ) { 695 if ( startTime > 0 ) { 696 player.seekTo( startTime ); 697 } 698 else { 699 player.playVideo(); 700 } 701 } 702 703 if ( event.data === YT.PlayerState.PLAYING ) { 704 playPauseButton.removeClass( 'fa-play' ).addClass( 'fa-pause' ); 705 } else if ( event.data === YT.PlayerState.PAUSED ) { 706 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 707 } else if ( event.data === YT.PlayerState.BUFFERING ) { 708 playPauseButton.removeClass( 'fa-play' ).addClass( 'fa-pause' ); 709 } else if ( event.data === YT.PlayerState.CUED ) { 710 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 711 } else if ( event.data === YT.PlayerState.ENDED ) { 712 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 713 } 714 }, 715 onError: function(event) { 716 console.info('YT Error: ' + event.data) 717 FLBuilderLayout._onErrorYoutubeVimeo(playerWrap) 718 } 719 }, 720 playerVars: { 721 playsinline: FLBuilderLayout._isMobile() ? 1 : 0, 722 controls: 0, 723 showinfo: 0, 724 rel : 0, 725 start: startTime, 726 end: endTime, 727 } 728 } ); 729 }, 1 ); 730 } ); 731 } 732 }, 733 734 /** 735 * On youtube or vimeo error show the fallback image if available. 736 * @since 2.0.7 737 */ 738 _onErrorYoutubeVimeo: function(playerWrap) { 739 740 fallback = playerWrap.data('fallback') || false 741 if( ! fallback ) { 742 return false; 743 } 744 playerWrap.find('iframe').remove() 745 fallbackTag = $( '<div></div>' ); 746 fallbackTag.addClass( 'fl-bg-video-fallback' ); 747 fallbackTag.css( 'background-image', 'url(' + playerWrap.data('fallback') + ')' ); 748 playerWrap.append( fallbackTag ); 749 }, 750 751 /** 752 * Check if Youtube API has been downloaded 753 * 754 * @since 1.9 755 * @access private 756 * @method _onYoutubeApiReady 757 * @param {Function} callback Method to call when YT API has been loaded 758 */ 759 _onYoutubeApiReady: function( callback ) { 760 if ( window.YT && YT.loaded ) { 761 callback( YT ); 762 } else { 763 // If not ready check again by timeout.. 764 setTimeout( function() { 765 FLBuilderLayout._onYoutubeApiReady( callback ); 766 }, 350 ); 767 } 768 }, 769 770 /** 771 * Initializes Vimeo video background 772 * 773 * @since 1.9 774 * @access private 775 * @method _initVimeoBgVideo 776 */ 777 _initVimeoBgVideo: function() 778 { 779 var playerWrap = $(this), 780 videoId = playerWrap.data('video-id'), 781 videoHash = playerWrap.data('video-hash'), 782 videoPlayer = playerWrap.find('.fl-bg-video-player'), 783 enableAudio = playerWrap.data('enable-audio'), 784 audioButton = playerWrap.find('.fl-bg-video-audio'), 785 playPauseButton = playerWrap.find('.fl-bg-video-play-pause-control'), 786 playerState = '', 787 player, 788 width = playerWrap.outerWidth(), 789 ua = navigator.userAgent; 790 791 if ( typeof Vimeo !== 'undefined' && videoId ) { 792 793 const vimOptions = { 794 loop : true, 795 title : false, 796 portrait : false, 797 background : true, 798 autopause : false, 799 muted : true, 800 }; 801 802 if ( videoHash.length ) { 803 vimOptions.url = `https://player.vimeo.com/video/${ videoId }?h=${ videoHash }`; 804 } else { 805 vimOptions.id = videoId; 806 } 807 808 player = new Vimeo.Player(videoPlayer[0], vimOptions ); 809 playerWrap.data('VMPlayer', player); 810 if ( "no" === enableAudio ) { 811 player.setVolume(0); 812 } 813 else if ("yes" === enableAudio ) { 814 // Chrome, Safari, Firefox have audio policy restrictions for autoplay videos. 815 if ( ua.indexOf("Safari") > -1 || ua.indexOf("Chrome") > -1 || ua.indexOf("Firefox") > -1 ) { 816 player.setVolume(0); 817 audioButton.show(); 818 } 819 else { 820 player.setVolume(1); 821 } 822 } 823 824 player.play().catch(function(error) { 825 FLBuilderLayout._onErrorYoutubeVimeo(playerWrap) 826 }); 827 828 if ( audioButton.length > 0 ) {
829 audioButton.on( 'click', {button: audioButton, player: player}, FLBuilderLayout._toggleBgVideoAudio ); 830 } 831 832 player.on( 'play', function() { 833 playerState = 'play'; 834 playPauseButton.removeClass( 'fa-play' ).addClass( 'fa-pause' ); 835 } ); 836 player.on( 'pause', function() { 837 playerState = 'pause'; 838 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 839 } ); 840 player.on( 'ended', function() { 841 playerState = 'ended'; 842 playPauseButton.removeClass( 'fa-pause' ).addClass( 'fa-play' ); 843 } ); 844 player.on( 'bufferstart', function() { 845 playerState = 'bufferstart'; 846 playPauseButton.removeClass( 'fa-play' ).addClass( 'fa-pause' ); 847 } ); 848 849 if ( playPauseButton.length > 0 ) { 850 playPauseButton.on( 'click', { player: player }, function( e ) { 851 var player = e.data.player; 852 853 if ( playerState === 'play' ) { 854 player.pause(); 855 } else { 856 player.play(); 857 } 858 } ); 859 } 860 } 861 }, 862 863 /** 864 * Mute / unmute audio on row's video background. 865 * It works for both Youtube and Vimeo. 866 * 867 * @since 2.1.3 868 * @access private 869 * @method _toggleBgVideoAudio 870 * @param {Object} e Method arguments 871 */ 872 _toggleBgVideoAudio: function( e ) { 873 var player = e.data.player, 874 control = e.data.button.find('.fl-audio-control'); 875 876 if ( control.hasClass( 'fa-volume-off' ) ) { 877 // Unmute 878 control 879 .removeClass( 'fa-volume-off' ) 880 .addClass( 'fa-volume-up' ); 881 e.data.button.find( '.fa-times' ).hide(); 882 883 if ( 'function' === typeof player.unMute ) { 884 player.unMute(); 885 } 886 else { 887 player.setVolume( 1 ); 888 } 889 } 890 else { 891 // Mute 892 control 893 .removeClass( 'fa-volume-up' ) 894 .addClass( 'fa-volume-off' ); 895 e.data.button.find( '.fa-times' ).show(); 896 897 if ( 'function' === typeof player.unMute ) { 898 player.mute(); 899 } 900 else { 901 player.setVolume( 0 ); 902 } 903 } 904 }, 905 906 /** 907 * Fires when there is an error loading a video 908 * background source and shows the fallback. 909 * 910 * @since 1.6.3.3 911 * @access private 912 * @method _videoBgSourceError 913 * @param {Object} e An event object 914 * @deprecated 2.0.3 915 */ 916 _videoBgSourceError: function( e ) 917 { 918 var source = $( e.target ), 919 wrap = source.closest( '.fl-bg-video' ), 920 vid = wrap.find( 'video' ), 921 fallback = wrap.data( 'fallback' ), 922 fallbackTag = ''; 923 source.remove(); 924 925 if ( vid.find( 'source' ).length ) { 926 // Don't show the fallback if we still have other sources to check. 927 return; 928 } else if ( '' !== fallback ) { 929 fallbackTag = $( '<div></div>' ); 930 fallbackTag.addClass( 'fl-bg-video-fallback' ); 931 fallbackTag.css( 'background-image', 'url(' + fallback + ')' ); 932 wrap.append( fallbackTag ); 933 vid.remove(); 934 } 935 }, 936 937 /** 938 * Fires when the window is resized to resize 939 * all video backgrounds. 940 * 941 * @since 1.1.4 942 * @access private 943 * @method _resizeBgVideos 944 */ 945 _resizeBgVideos: function() 946 { 947 $('.fl-bg-video').each( function() { 948 949 FLBuilderLayout._resizeBgVideo.apply( this ); 950 951 if ( $( this ).parent().find( 'img' ).length > 0 ) { 952 $( this ).parent().imagesLoaded( $.proxy( FLBuilderLayout._resizeBgVideo, this ) ); 953 } 954 } ); 955 }, 956 957 /** 958 * Fires when the window is resized to resize 959 * a single video background. 960 * 961 * @since 1.1.4 962 * @access private 963 * @method _resizeBgVideo 964 */ 965 _resizeBgVideo: function() 966 { 967 if ( 0 === $( this ).find( 'video' ).length && 0 === $( this ).find( 'iframe' ).length ) { 968 return; 969 } 970 971 var wrap = $(this), 972 wrapHeight = wrap.outerHeight(), 973 wrapWidth = wrap.outerWidth(), 974 vid = wrap.find('video'), 975 vidHeight = wrap.data('height'), 976 vidWidth = wrap.data('width'), 977 newWidth = wrapWidth, 978 newHeight = Math.round(vidHeight * wrapWidth/vidWidth), 979 newLeft = 0, 980 newTop = 0, 981 iframe = wrap.find('iframe'), 982 isRowFullHeight = $(this).closest('.fl-row-bg-video').hasClass('fl-row-full-height'), 983 vidCSS = { 984 top: '50%', 985 left: '50%', 986 transform: 'translate(-50%,-50%)', 987 }; 988 989 if ( vid.length ) { 990 if(vidHeight === '' || typeof vidHeight === 'undefined' || vidWidth === '' || typeof vidWidth === 'undefined') { 991 vid.css({ 992 'left' : '0px', 993 'top' : '0px', 994 'width' : newWidth + 'px' 995 }); 996 997 // Try to set the actual video dimension on 'loadedmetadata' when using URL as video source 998 vid.on('loadedmetadata', FLBuilderLayout._resizeOnLoadedMeta); 999 1000 return; 1001 } 1002 1003 if ( ! isRowFullHeight ) { 1004 if ( newHeight < wrapHeight ) { 1005 newHeight = wrapHeight; 1006 newWidth = vidHeight ? Math.round(vidWidth * wrapHeight/vidHeight) : newWidth; 1007 newLeft = -((newWidth - wrapWidth) / 2); 1008 } 1009 else { 1010 newTop = -((newHeight - wrapHeight)/2); 1011 } 1012 vidCSS = { 1013 left : newLeft + 'px', 1014 top : newTop + 'px', 1015 height : newHeight + 'px', 1016 width : newWidth + 'px', 1017 } 1018 } 1019 1020 vid.css( vidCSS ); 1021 1022 } 1023 else if ( iframe.length ) { 1024 1025 // Resize Youtube video player within iframe tag 1026 if ( typeof wrap.data('youtube') !== 'undefined' ) { 1027 FLBuilderLayout._resizeYoutubeBgVideo.apply(this); 1028 } 1029 } 1030 }, 1031 1032 /** 1033 * Fires when video meta has been loaded. 1034 * This will be Triggered when width/height attributes were not specified during video background resizing. 1035 * 1036 * @since 1.8.5 1037 * @access private 1038 * @method _resizeOnLoadedMeta 1039 */ 1040 _resizeOnLoadedMeta: function(){ 1041 var video = $(this), 1042 wrapHeight = video.parent().outerHeight(), 1043 wrapWidth = video.parent().outerWidth(), 1044 vidWidth = video[0].videoWidth, 1045 vidHeight = video[0].videoHeight, 1046 newHeight = Math.round(vidHeight * wrapWidth/vidWidth), 1047 newWidth = wrapWidth, 1048 newLeft = 0, 1049 newTop = 0; 1050 1051 if(newHeight < wrapHeight) { 1052 newHeight = wrapHeight; 1053 newWidth = Math.round(vidWidth * wrapHeight/vidHeight); 1054 newLeft = -((newWidth - wrapWidth)/2); 1055 } 1056 else { 1057 newTop = -((newHeight - wrapHeight)/2); 1058 } 1059 1060 video.parent().data('width', vidWidth); 1061 video.parent().data('height', vidHeight); 1062 1063 video.css({ 1064 'left' : newLeft + 'px', 1065 'top' : newTop + 'px', 1066 'width' : newWidth + 'px', 1067 'height' : newHeight + 'px' 1068 }); 1069 }, 1070 1071 /** 1072 * Fires when the window is resized to resize 1073 * a single Youtube video background. 1074 * 1075 * @since 1.9 1076 * @access private 1077 * @method _resizeYoutubeBgVideo 1078 */ 1079 _resizeYoutubeBgVideo: function() 1080 { 1081 var wrap = $(this), 1082 wrapWidth = wrap.outerWidth(), 1083 wrapHeight = wrap.outerHeight(), 1084 player = wrap.data('YTPlayer'), 1085 video = player ? player.getIframe() : null, 1086 aspectRatioSetting = '16:9', // Medium 1087 aspectRatioArray = aspectRatioSetting.split( ':' ),
1088 aspectRatio = aspectRatioArray[0] / aspectRatioArray[1], 1089 ratioWidth = wrapWidth / aspectRatio, 1090 ratioHeight = wrapHeight * aspectRatio, 1091 isWidthFixed = wrapWidth / wrapHeight > aspectRatio, 1092 width = isWidthFixed ? wrapWidth : ratioHeight, 1093 height = isWidthFixed ? ratioWidth : wrapHeight; 1094 1095 if ( video ) { 1096 $(video).width( width ).height( height ); 1097 } 1098 }, 1099 1100 /** 1101 * Opens a tab or accordion item if the browser hash is set 1102 * to the ID of one on the page. 1103 * 1104 * @since 1.6.0 1105 * @access private 1106 * @method _initHash 1107 */ 1108 _initHash: function() 1109 { 1110 var hash = window.location.hash.replace( '#', '' ).split( '/' ).shift(), 1111 element = null, 1112 tabs = null, 1113 responsiveLabel = null, 1114 tabIndex = null, 1115 label = null; 1116 1117 if ( '' !== hash ) { 1118 1119 try { 1120 1121 element = $( '#' + hash ); 1122 1123 if ( element.length > 0 ) { 1124 1125 if ( element.hasClass( 'fl-accordion-item' ) ) { 1126 setTimeout( function() { 1127 element.find( '.fl-accordion-button' ).trigger( 'click' ); 1128 }, 100 ); 1129 } 1130 if ( element.hasClass( 'fl-tabs-panel' ) ) { 1131 setTimeout( function() { 1132 tabs = element.closest( '.fl-tabs' ); 1133 responsiveLabel = element.find( '.fl-tabs-panel-label' ); 1134 tabIndex = responsiveLabel.data( 'index' ); 1135 label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' ); 1136 1137 label[0].click(); 1138 FLBuilderLayout._scrollToElement(element); 1139 }, 100 ); 1140 } 1141 } 1142 } 1143 catch( e ) {} 1144 } 1145 }, 1146 1147 /** 1148 * Adds a visually-hidden "(opens in new tab)" notice to links 1149 * inside a builder layout that target a new tab, and removes it 1150 * from ones that don't. Runs on the live DOM only, across every 1151 * module, so the notice is never part of any saved content. Covers 1152 * both real anchors (`target` attribute) and non-anchor elements 1153 * like the Box module's `role="link"` div, which carries the same 1154 * intent via a `data-link-target` attribute instead. 1155 * 1156 * @since 2.12 1157 * @access private 1158 * @method _initLinkNotices 1159 */ 1160 _initLinkNotices: function() 1161 { 1162 $( '.fl-builder-content a[target], .fl-builder-content [role="link"][data-link-target]' ).each( function() { 1163 var link = $( this ), 1164 notice = link.children( 'span.fl-new-tab-notice' ), 1165 target = link.attr( 'target' ) || link.attr( 'data-link-target' ); 1166 1167 if ( '_blank' === target ) { 1168 if ( 0 === notice.length ) { 1169 link.append( '<span class="fl-new-tab-notice sr-only">' + FLBuilderLayoutConfig.i18n.opensInNewTab + '</span>' ); 1170 } 1171 } else if ( notice.length > 0 ) { 1172 notice.remove(); 1173 } 1174 }); 1175 }, 1176 1177 /** 1178 * Initializes all anchor links on the page for smooth scrolling. 1179 * 1180 * @since 1.4.9 1181 * @access private 1182 * @method _initAnchorLinks 1183 */ 1184 _initAnchorLinks: function() 1185 { 1186 $( 'a, [role="link"]' ).each( FLBuilderLayout._initAnchorLink ); 1187 }, 1188 1189 /** 1190 * Initializes a single anchor link for smooth scrolling. 1191 * 1192 * @since 1.4.9 1193 * @access private 1194 * @method _initAnchorLink 1195 */ 1196 _initAnchorLink: function() 1197 { 1198 var link = $( this ), 1199 href = link.data( 'url' ) ? link.data( 'url' ) : link.attr( 'href' ), 1200 target = link.data( 'url' ) ? new URL( href, window.location.href ) : this, 1201 loc = window.location, 1202 id = null, 1203 element = null, 1204 flNode = false; 1205 1206 if ( 'undefined' != typeof href && href.indexOf( '#' ) > -1 && link.closest('svg').length < 1 ) { 1207 1208 if ( loc.pathname.replace( /^\//, '' ) == target.pathname.replace( /^\//, '' ) && loc.hostname == target.hostname ) { 1209 1210 try { 1211 1212 id = href.split( '#' ).pop(); 1213 // If there is no ID then we have nowhere to look 1214 // Fixes a quirk in jQuery and FireFox 1215 if( ! id ) { 1216 return; 1217 } 1218 element = $( '#' + id ); 1219 1220 if ( element.length > 0 ) { 1221 flNode = element.hasClass( 'fl-row' ) || element.hasClass( 'fl-col' ) || element.hasClass( 'fl-module' ); 1222 if ( !element.hasClass( 'fl-no-scroll' ) && ( link.hasClass( 'fl-scroll-link' ) || flNode ) ) { 1223 $( link ).on( 'click', FLBuilderLayout._scrollToElementOnLinkClick ); 1224 } 1225 if ( element.hasClass( 'fl-accordion-item' ) ) { 1226 $( link ).on( 'click', FLBuilderLayout._scrollToAccordionOnLinkClick ); 1227 } 1228 if ( element.hasClass( 'fl-tabs-panel' ) ) { 1229 $( link ).on( 'click', FLBuilderLayout._scrollToTabOnLinkClick ); 1230 } 1231 } 1232 } 1233 catch( e ) {} 1234 } 1235 } 1236 }, 1237 1238 /** 1239 * Scrolls to an element when an anchor link is clicked. 1240 * 1241 * @since 1.4.9 1242 * @access private 1243 * @method _scrollToElementOnLinkClick 1244 * @param {Object} e An event object. 1245 * @param {Function} callback A function to call when the scroll is complete. 1246 */ 1247 _scrollToElementOnLinkClick: function( e, callback ) 1248 { 1249 var attribute = $( this ).data( 'url' ) ? $( this ).data( 'url' ) : $( this ).attr( 'href' ); 1250 var element = $( '#' + attribute.split( '#' ).pop() ); 1251 1252 FLBuilderLayout._scrollToElement( element, callback ); 1253 1254 e.preventDefault(); 1255 }, 1256 1257 /** 1258 * Scrolls to an element. 1259 * 1260 * @since 1.6.4.5 1261 * @access private 1262 * @method _scrollToElement 1263 * @param {Object} element The element to scroll to. 1264 * @param {Function} callback A function to call when the scroll is complete. 1265 */ 1266 _scrollToElement: function( element, callback ) 1267 { 1268 var config = FLBuilderLayoutConfig.anchorLinkAnimations, 1269 dest = 0, 1270 win = $( window ), 1271 doc = $( document ); 1272 1273 if ( element.length > 0 ) { 1274 1275 if ( 'fixed' === element.css('position') || 'fixed' === element.parent().css('position') ) { 1276 dest = element.position().top; 1277 } 1278 else if ( element.offset().top > doc.height() - win.height() ) { 1279 dest = doc.height() - win.height(); 1280 } 1281 else { 1282 dest = element.offset().top - config.offset; 1283 } 1284 1285 $( 'html, body' ).stop( true ).animate( { scrollTop: dest }, config.duration, config.easing, function() { 1286 1287 if ( 'undefined' != typeof callback ) { 1288 callback(); 1289 } 1290 1291 if ( undefined != element.attr( 'id' ) && window.location.hash !== '#' + element.attr( 'id' ) ) { 1292 1293 var firefox_version = window.navigator.userAgent.match( /Firefox\/(\d+)\./ ), 1294 firefox_version = firefox_version ? parseInt( firefox_version[1], 10 ) : null; 1295 1296 if ( firefox_version !== null && firefox_version < 135 ) { 1297 window.location.hash = element.attr( 'id' ); 1298 } else { 1299 if ( history.pushState ) { 1300 history.pushState( null, null, '#' + element.attr( 'id' ) ); 1301 } else { 1302 window.location.hash = element.attr( 'id' ); 1303 } 1304 } 1305 } 1306 } ); 1307 } 1308 }, 1309 1310 /** 1311 * Scrolls to an accordion item when a link is clicked. 1312 * 1313 * @since 1.5.9 1314 * @access private 1315 * @method _scrollToAccordionOnLinkClick 1316 * @param {Object} e An event object. 1317 */ 1318 _scrollToAccordionOnLinkClick: function( e ) 1319 { 1320 var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() ); 1321 1322 if ( element.length > 0 ) { 1323 1324 var callback = function() { 1325 if ( element ) { 1326 element.find( '.fl-accordion-button' ).trigger( 'click' ); 1327 element = false;
1328 } 1329 }; 1330 1331 FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback ); 1332 } 1333 }, 1334 1335 /** 1336 * Scrolls to a tab panel when a link is clicked. 1337 * 1338 * @since 1.5.9 1339 * @access private 1340 * @method _scrollToTabOnLinkClick 1341 * @param {Object} e An event object. 1342 */ 1343 _scrollToTabOnLinkClick: function( e ) 1344 { 1345 var element = $( '#' + $( this ).attr( 'href' ).split( '#' ).pop() ), 1346 tabs = null, 1347 label = null, 1348 responsiveLabel = null; 1349 1350 if ( element.length > 0 ) { 1351 1352 tabs = element.closest( '.fl-tabs' ); 1353 responsiveLabel = element.find( '.fl-tabs-panel-label' ); 1354 tabIndex = responsiveLabel.data( 'index' ); 1355 label = tabs.find( '.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']' ); 1356 1357 if ( responsiveLabel.is( ':visible' ) ) { 1358 1359 var callback = function() { 1360 if ( element ) { 1361 responsiveLabel.trigger( $.Event( 'click', { which: 1 } ) ); 1362 } 1363 }; 1364 1365 FLBuilderLayout._scrollToElementOnLinkClick.call( this, e, callback ); 1366 } 1367 else { 1368 label[0].click(); 1369 FLBuilderLayout._scrollToElement( element ); 1370 } 1371 1372 e.preventDefault(); 1373 } 1374 }, 1375 1376 /** 1377 * Initializes all builder forms on a page. 1378 * 1379 * @since 1.5.4 1380 * @access private 1381 * @method _initForms 1382 */ 1383 _initForms: function() 1384 { 1385 if ( ! FLBuilderLayout._hasPlaceholderSupport ) { 1386 $( '.fl-form-field input' ).each( FLBuilderLayout._initFormFieldPlaceholderFallback ); 1387 } 1388 1389 $( '.fl-form-field input' ).on( 'focus', FLBuilderLayout._clearFormFieldError ); 1390 }, 1391 1392 /** 1393 * Checks to see if the current device has HTML5 1394 * placeholder support. 1395 * 1396 * @since 1.5.4 1397 * @access private 1398 * @method _hasPlaceholderSupport 1399 * @return {Boolean} 1400 */ 1401 _hasPlaceholderSupport: function() 1402 { 1403 var input = document.createElement( 'input' ); 1404 1405 return 'undefined' != input.placeholder; 1406 }, 1407 1408 /** 1409 * Initializes the fallback for when placeholders aren't supported. 1410 * 1411 * @since 1.5.4 1412 * @access private 1413 * @method _initFormFieldPlaceholderFallback 1414 */ 1415 _initFormFieldPlaceholderFallback: function() 1416 { 1417 var field = $( this ), 1418 val = field.val(), 1419 placeholder = field.attr( 'placeholder' ); 1420 1421 if ( 'undefined' != placeholder && '' === val ) { 1422 field.val( placeholder ); 1423 field.on( 'focus', FLBuilderLayout._hideFormFieldPlaceholderFallback ); 1424 field.on( 'blur', FLBuilderLayout._showFormFieldPlaceholderFallback ); 1425 } 1426 }, 1427 1428 /** 1429 * Hides a fallback placeholder on focus. 1430 * 1431 * @since 1.5.4 1432 * @access private 1433 * @method _hideFormFieldPlaceholderFallback 1434 */ 1435 _hideFormFieldPlaceholderFallback: function() 1436 { 1437 var field = $( this ), 1438 val = field.val(), 1439 placeholder = field.attr( 'placeholder' ); 1440 1441 if ( val == placeholder ) { 1442 field.val( '' ); 1443 } 1444 }, 1445 1446 /** 1447 * Shows a fallback placeholder on blur. 1448 * 1449 * @since 1.5.4 1450 * @access private 1451 * @method _showFormFieldPlaceholderFallback 1452 */ 1453 _showFormFieldPlaceholderFallback: function() 1454 { 1455 var field = $( this ), 1456 val = field.val(), 1457 placeholder = field.attr( 'placeholder' ); 1458 1459 if ( '' === val ) { 1460 field.val( placeholder ); 1461 } 1462 }, 1463 1464 /** 1465 * Clears a form field error message. 1466 * 1467 * @since 1.5.4 1468 * @access private 1469 * @method _clearFormFieldError 1470 */ 1471 _clearFormFieldError: function() 1472 { 1473 var field = $( this ); 1474 1475 field.removeAttr( 'aria-invalid' ); 1476 field.removeClass( 'fl-form-error' ); 1477 const message = field.attr('aria-describedby'); 1478 message ? $( '#' + message ).hide() : field.siblings( '.fl-form-error-message' ).hide(); 1479 }, 1480 1481 /** 1482 * Init Row Shape Layer's height. 1483 * 1484 * @since 2.5.3 1485 * @access private 1486 * @method _initRowShapeLayerHeight 1487 */ 1488 _initRowShapeLayerHeight: function () { 1489 FLBuilderLayout._adjustRowShapeLayerHeight(); 1490 $( window ).on( 'resize', FLBuilderLayout._adjustRowShapeLayerHeight ); 1491 }, 1492 1493 /** 1494 * Set parent column width of nested columns when it's zero or blank. 1495 * 1496 * @since 2.7.4 1497 * @access private 1498 * @method _initNestedColsWidth 1499 */ 1500 _initNestedColsWidth: function() 1501 { 1502 var nestedCols = $( '.fl-col-has-cols' ); 1503 1504 if ( nestedCols.length <= 0 ) { 1505 return; 1506 } 1507 1508 $( nestedCols ).each( function(index, col ){ 1509 if ( $( col ).width() <= 0 ) { 1510 $( col ).css( 'width', FLBuilderLayoutConfig.emptyColWidth ); 1511 } 1512 }); 1513 }, 1514 1515 /** 1516 * Adjust Row Shape Layer's height to fix to remove the fine line that appears on certain screen sizes. 1517 * 1518 * @since 2.5.3 1519 * @access private 1520 * @method _adjustRowShapeLayerHeight 1521 */
1522 _adjustRowShapeLayerHeight: function() { 1523 var rowShapeLayers = $('.fl-builder-shape-layer'); 1524 1525 $( rowShapeLayers ).each(function (index) { 1526 var rowShapeLayer = $(this), 1527 shape = $(rowShapeLayer).find('svg'), 1528 height = shape.height(), 1529 excludeShapes = '.fl-builder-shape-circle, .fl-builder-shape-dot-cluster, .fl-builder-shape-topography, .fl-builder-shape-rect'; 1530 1531 if ( ! rowShapeLayer.is( excludeShapes ) ) { 1532 $(shape).css('height', Math.ceil( height ) ); 1533 } 1534 }); 1535 }, 1536 _string_to_slug: function( str ) { 1537 str = str.replace(/^\s+|\s+$/g, ''); // trim 1538 if ( 'undefined' == typeof window._fl_string_to_slug_regex ) { 1539 regex = new RegExp('[^a-zA-Z0-9\'":() !.,-_|]', 'g'); 1540 } else { 1541 regex = new RegExp('[^' + window._fl_string_to_slug_regex + '\'":\(\) !.,-_|\\\p{Letter}]', 'ug'); 1542 } 1543 str = str.replace(regex, '') // remove invalid chars 1544 .replace(/\s+/g, ' '); // collapse whitespace and replace by a space 1545 return str; 1546 }, 1547 _reorderMenu: function() { 1548 if ( $('#wp-admin-bar-fl-builder-frontend-edit-link-default li').length > 1 ) { 1549 $( '#wp-admin-bar-fl-builder-frontend-duplicate-link' ) 1550 .appendTo('#wp-admin-bar-fl-builder-frontend-edit-link-default') 1551 .css( 'padding-top', '5px' ) 1552 .css( 'border-top', '2px solid #1D2125' ) 1553 .css( 'margin-top', '5px' ) 1554 } 1555 } 1556 }; 1557 1558 /* Initializes the builder layout. */ 1559 $(function(){ 1560 FLBuilderLayout.init(); 1561 }); 1562 1563})(jQuery); 1564(function($){ 1565 1566 if(typeof FLBuilderLayoutModules !== 'undefined') { 1567 return; 1568 } 1569 1570 /** 1571 * Helper class with generic logic for builder modules. 1572 * If generic module code needs to work in both the block 1573 * editor and builder, it should go here. Otherwise, it 1574 * should go on FLBuilderLayout. 1575 * 1576 * @since 2.9 1577 */ 1578 FLBuilderLayoutModules = { 1579 1580 /** 1581 * Initializes builder module logic. 1582 * 1583 * @since 2.9 1584 * @method init 1585 */ 1586 init: function() 1587 { 1588 // Only init if the builder isn't active. 1589 if ( 0 === $('.fl-builder-edit').length ) { 1590 1591 // Init module animations. 1592 FLBuilderLayoutModules._initModuleAnimations(); 1593 } 1594 }, 1595 1596 /** 1597 * Initializes module animations. 1598 * 1599 * @since 1.1.9 1600 * @access private 1601 * @method _initModuleAnimations 1602 */ 1603 _initModuleAnimations: function() 1604 { 1605 if(typeof jQuery.fn.waypoint !== 'undefined') { 1606 $('.fl-animation').each( function() { 1607 var node = $( this ), 1608 nodeTop = node.offset().top, 1609 winHeight = $( window ).height(), 1610 bodyHeight = $( 'body' ).height(), 1611 waypoint = FLBuilderLayoutConfig.waypoint, 1612 offset = '80%'; 1613 1614 if ( typeof waypoint.offset !== undefined ) { 1615 offset = FLBuilderLayoutConfig.waypoint.offset + '%'; 1616 } 1617 1618 if ( bodyHeight - nodeTop < winHeight * 0.2 ) { 1619 offset = '100%'; 1620 } 1621 1622 node.waypoint({ 1623 offset: offset, 1624 handler: FLBuilderLayoutModules._doModuleAnimation 1625 }); 1626 } ); 1627 } 1628 }, 1629 1630 /** 1631 * Runs a module animation. 1632 * 1633 * @since 1.1.9 1634 * @access private 1635 * @method _doModuleAnimation 1636 */ 1637 _doModuleAnimation: function() 1638 { 1639 var module = 'undefined' == typeof this.element ? $(this) : $(this.element), 1640 delay = parseFloat(module.data('animation-delay')), 1641 duration = parseFloat(module.data('animation-duration')); 1642 1643 if ( ! isNaN( duration ) ) { 1644 module.css( 'animation-duration', duration + 's' ); 1645 } 1646 1647 if(!isNaN(delay) && delay > 0) { 1648 setTimeout(function(){ 1649 module.addClass('fl-animated'); 1650 }, delay * 1000); 1651 } else { 1652 setTimeout(function(){ 1653 module.addClass('fl-animated'); 1654 }, 1); 1655 } 1656 } 1657 }; 1658 1659 /* Initializes builder module logic. */ 1660 $(function(){ 1661 FLBuilderLayoutModules.init(); 1662 }); 1663 1664})(jQuery); 1665 1666/* Start Global JS */ 1667 1668/* End Global JS */ 1669 1670 1671;(function($) { 1672 1673 WooPackGrid = function(settings) { 1674 this.settings = settings; 1675 this.nodeClass = '.fl-node-' + settings.id; 1676 this.wrapperClass = this.nodeClass + ' .woopack-products-grid-wrap ul.products'; 1677 this.postClass = this.wrapperClass + ' .woopack-product-grid'; 1678 this.perPage = settings.perPage; 1679 this.matchHeight = settings.matchHeight === 'yes' ? true : false;
1680 this.layoutStyle = settings.layoutStyle; 1681 this.masonry = settings.matchHeight === 'no' ? true : false; 1682 this.filters = settings.filters === 'yes' ? true : false; 1683 this.filterTax = settings.filterTax; 1684 this.filterType = settings.filterType; 1685 this.defaultFilter = settings.defaultFilter; 1686 this.isDefaultFilter = false; 1687 this.activeFilter = ''; 1688 this.isFiltering = false; 1689 this.isotopeData = {}; 1690 this.template = settings.template; 1691 this.cacheData = {}; 1692 this.currentPage = 1; 1693 1694 if(this._hasPosts()) { 1695 this._initInfiniteScroll(); 1696 //this._matchWidth(); 1697 this._gridLayout(); 1698 this._reLayout(); 1699 } 1700 }; 1701 1702 WooPackGrid.prototype = { 1703 1704 settings : {}, 1705 nodeClass : '', 1706 wrapperClass : '', 1707 postClass : '', 1708 perPage : '', 1709 matchHeight : false, 1710 layoutStyle : 1, 1711 masonry : false, 1712 filters : false, 1713 filterTax : '', 1714 filterType : '', 1715 isotopeData : '', 1716 template : '', 1717 cacheData : {}, 1718 1719 _hasPosts: function() 1720 { 1721 return $(this.postClass).length > 0; 1722 }, 1723 1724 _matchWidth: function() 1725 { 1726 var wrap = $(this.wrapperClass); 1727 1728 wrap.imagesLoaded( $.proxy( function() { 1729 if ( 3 == this.layoutStyle || 4 == this.layoutStyle ) { 1730 var img_width = $( this.postClass + ' .woopack-product-image img').attr('width'); 1731 $( this.postClass + ' .woopack-product-content').css({ 'width': 'calc(100% - ' + img_width+ 'px)' }); 1732 } 1733 }, this ) ); 1734 }, 1735 1736 _gridLayout: function() 1737 { 1738 var self = this; 1739 var wrap = $(this.wrapperClass); 1740 1741 var postFilterData = { 1742 itemSelector: '.woopack-product-grid', 1743 percentPosition: true, 1744 transitionDuration: '0.2s', 1745 hiddenStyle: { 1746 opacity: 0 1747 }, 1748 visibleStyle: { 1749 opacity: 1 1750 }, 1751 isOriginLeft: ! $('body').hasClass( 'rtl' ), 1752 }; 1753 1754 if ( ! this.masonry ) { 1755 postFilterData = $.extend( {}, postFilterData, { 1756 layoutMode: 'fitRows', 1757 fitRows: { 1758 gutter: '.woopack-grid-sizer' 1759 }, 1760 } ); 1761 } 1762 1763 if ( this.masonry ) { 1764 1765 postFilterData = $.extend( {}, postFilterData, { 1766 masonry: { 1767 columnWidth: '.woopack-product-grid', 1768 gutter: '.woopack-grid-sizer' 1769 }, 1770 } ); 1771 } 1772 1773 this.isotopeData = postFilterData; 1774 1775 // set default filter as active filter. 1776 if ( this.settings.defaultFilter !== '' ) { 1777 this.activeFilter = this.settings.defaultFilter; 1778 } 1779 1780 wrap.imagesLoaded( $.proxy( function() { 1781 1782 var node = $(this.nodeClass); 1783 var base = this; 1784 1785 this._initSlider(); 1786 1787 var postFilters = $(this.nodeClass).find('ul.products').isotope(postFilterData); 1788 1789 if ( this.filters || this.masonry ) { 1790 1791 var filterWrap = $(this.nodeClass).find('.woopack-product-filters'); 1792 var filterToggle = $(this.nodeClass).find('.woopack-product-filters-toggle'); 1793 1794 filterToggle.on('click', function() { 1795 filterWrap.slideToggle(function() { 1796 if ( $(this).is(':visible') ) { 1797 $(this).addClass('woopack-product-filters-open'); 1798 } 1799 if ( ! $(this).is(':visible') ) { 1800 $(this).removeClass('woopack-product-filters-open'); 1801 } 1802 }); 1803 }); 1804 1805 filterWrap.on('click keyup', '.woopack-product-filter', function(e) { 1806 var shouldFilter = 'click' === e.type || ( 'keyup' === e.type && ( 13 === e.keyCode || 13 === e.which ) ) 1807 if ( ! shouldFilter ) { 1808 return; 1809 } 1810 1811 // set active filter globally to use later for ajax scroll pagination. 1812 base.activeFilter = $(this).data('term'); 1813 base.isFiltering = true; 1814 1815 if ( 'static' === base.filterType ) { 1816 var filterVal = $(this).attr('data-filter'); 1817 postFilters.isotope({ filter: filterVal }); 1818 } else { 1819 $(base.nodeClass).addClass( 'woopack-products-loading' ); 1820 var term = $(this).data('term'); 1821 base._getPosts(term, postFilterData); 1822 } 1823 1824 filterWrap.find('.woopack-product-filter').removeClass('woopack-filter-active'); 1825 $(this).addClass('woopack-filter-active'); 1826 1827 filterToggle.find('span.toggle-text').html($(this).text()); 1828 if (filterWrap.hasClass('woopack-product-filters-open')) { 1829 filterWrap.slideUp(); 1830 } 1831 $(base.nodeClass).trigger('grid.filter.change'); 1832 }); 1833 1834 if ('dynamic' === base.filterType) {
1835 $(base.nodeClass).find('.fl-builder-pagination a').off('click').on('click', function (e) { 1836 e.preventDefault(); 1837 var pageNumber = self._getPageNumber( this ); 1838 base.currentPage = pageNumber; 1839 base._getPosts('', postFilterData, pageNumber); 1840 }); 1841 } 1842 1843 // Default filter. 1844 if ( base.defaultFilter !== '' ) { 1845 var $defaultFilter = filterWrap.find('li[data-term="' + base.defaultFilter + '"]'); 1846 if ( $defaultFilter.length > 0 && ! $defaultFilter.hasClass( 'woopack-filter-active' ) ) { 1847 self.isDefaultFilter = true; 1848 $defaultFilter.trigger('click'); 1849 } 1850 } 1851 1852 // Trigger filter by hash parameter in URL. 1853 if ( '' !== location.hash ) { 1854 var filterHash = location.hash.split('#')[1]; 1855 1856 filterWrap.find('li[data-term="' + filterHash + '"]').trigger('click'); 1857 } 1858 1859 // Trigger filter on hash change in URL. 1860 $(window).on('hashchange', function() { 1861 if ( '' !== location.hash ) { 1862 var filterHash = location.hash.split('#')[1]; 1863 1864 filterWrap.find('li[data-term="' + filterHash + '"]').trigger('click'); 1865 } 1866 }); 1867 } 1868 1869 if( !this.masonry ) { 1870 setTimeout( function() { 1871 base._gridLayoutMatchHeight(); 1872 node.find('ul.products').isotope('layout'); 1873 }, 1000 ); 1874 } 1875 1876 if ( this.filters || this.masonry ) { 1877 setTimeout( function() { 1878 if ( 'static' === base.filterType ) { 1879 node.find('.woopack-filter-active').trigger('click'); 1880 } 1881 if ( ! base.masonry ) { 1882 base._gridLayoutMatchHeight(); 1883 } 1884 node.find('ul.products').isotope('layout'); 1885 }, 1000 ); 1886 } 1887 1888 }, this ) ); 1889 }, 1890 1891 _getPageNumber: function( pageElement ) { 1892 var pageNumber = parseInt( $(pageElement).text() ); //$(pageElement).attr('href').split('#page-')[1]; 1893 1894 if ( $(pageElement).hasClass('next') ) { 1895 pageNumber = parseInt( $(pageElement).parents('.fl-builder-pagination').find('.current').text() ) + 1; 1896 } 1897 if ( $(pageElement).hasClass('previous') ) { 1898 pageNumber = parseInt( $(pageElement).parents('.fl-builder-pagination').find('.current').text() ) - 1; 1899 } 1900 1901 return pageNumber; 1902 }, 1903 1904 _initSlider: function() { 1905 if ( $('body').hasClass('fl-builder-edit') ) { 1906 return; 1907 } 1908 1909 var wrap = $(this.wrapperClass); 1910 1911 if ( ! this.settings.imagesSlider ) { 1912 // Workaround for custom layout. 1913 if ( 'undefined' === typeof wrap.find( '.woopack-has-slider' ).get(0) ) { 1914 return; 1915 } 1916 } 1917 if ( 'undefined' === typeof jQuery.fn.slick ) { 1918 return; 1919 } 1920 1921 wrap.find('.product').each(function() { 1922 var product = $(this), 1923 slider = $(this).find('.woopack-product-images'), 1924 slides = slider.find('.woopack-product-image-slide'), 1925 settings = slider.data('settings'); 1926 1927 if ( slides.length > 1 && slider.find('.slick-slide').length === 0 ) { 1928 if ( slides.length === 1 ) { 1929 return; 1930 } 1931 var opts = { 1932 autoplay: true, 1933 autoplaySpeed: settings && settings.autoplaySpeed ? settings.autoplaySpeed : 600, 1934 pauseOnHover: false, 1935 arrows: false, 1936 adaptiveHeight: false, 1937 centerMode: false, 1938 cssEase: 'ease', 1939 fade: settings && settings.fade ? settings.fade : false, 1940 rtl: $('body').hasClass('rtl') 1941 }; 1942 slider.slick( opts ); 1943 setTimeout(function() { 1944 slider.slick('slickPause'); 1945 }, 200); 1946 } 1947 }); 1948 1949 wrap.find('.product').on('mouseenter', function(e) { 1950 e.stopPropagation(); 1951 var product = $(this), 1952 slider = $(this).find('.woopack-product-images'), 1953 slides = slider.find('.woopack-product-image-slide'); 1954 slider.show(function() { 1955 if ( slides.length > 1 ) { 1956 slider.slick('slickPlay'); 1957 } 1958 }); 1959 }).on('mouseleave', function(e) { 1960 e.stopPropagation(); 1961 var product = $(this), 1962 slider = $(this).find('.woopack-product-images'); 1963 1964 if ( slider.find('.slick-slide').length === 0 ) { 1965 return; 1966 } 1967 1968 slider.slick('slickPause'); 1969 1970 setTimeout(function() { 1971 slider.slick('slickGoTo', 0); 1972 }, 100); 1973 }); 1974 }, 1975 1976 _getPosts: function (term, isotopeData, paged) { 1977 var processAjax = false, 1978 filter = term, 1979 paged = (!paged || 'undefined' === typeof paged) ? 1 : paged; 1980 1981 if ('undefined' === typeof term || '' === filter) { 1982 filter = 'all'; 1983 } 1984 1985 var cacheData = this._getCacheData(filter); 1986 1987 if ('undefined' === typeof cacheData) { 1988 processAjax = true; 1989 } else { 1990 var cachedResponse = cacheData.page[paged]; 1991 if ('undefined' === typeof cachedResponse) { 1992 processAjax = true; 1993 } else { 1994 this._renderPosts(cachedResponse, { 1995 term: term, 1996 isotopeData: isotopeData, 1997 page: paged 1998 }); 1999 } 2000 } 2001 2002 if (processAjax) { 2003 this._getAjaxPosts(term, isotopeData, paged); 2004 } 2005 }, 2006 2007 _getAjaxPosts: function(term, isotopeData, paged) 2008 { 2009 var taxonomy = this.filterTax, 2010 perPage = this.perPage, 2011 layout = this.layoutStyle, 2012 paged = 'undefined' === typeof paged ? false : paged, 2013 self = this; 2014 2015 var wrap = $(this.wrapperClass), 2016 gridWrap = $(this.nodeClass).find('.woopack-products-grid-wrap'); 2017 2018 var currentPage = woopack_config.current_page.split('?')[0]; 2019 2020 var data = { 2021 woopack_action: 'woopack_grid_get_posts', 2022 node_id: this.settings.id, 2023 paged: ! paged ? woopack_config.page : paged, 2024 current_page: currentPage, 2025 settings: this.settings.fields 2026 }; 2027 2028 // Archive. 2029 if ( 'undefined' !== typeof woopack_config.conditionals.is_archive ) { 2030 data['is_archive'] = true; 2031 } 2032 2033 // Term. 2034 if ('undefined' !== typeof term && '' !== term) { 2035 data['term'] = term; 2036 } else if ( woopack_config.conditionals.is_tax && woopack_config.conditionals.current_term ) { 2037 data['is_tax'] = true; 2038 data['taxonomy'] = woopack_config.conditionals.current_tax; 2039 data['term'] = woopack_config.conditionals.current_term; 2040 } 2041 2042 // Author. 2043 if ( woopack_config.conditionals.is_author && woopack_config.conditionals.current_author ) { 2044 data['is_author'] = true; 2045 data['author_id'] = woopack_config.conditionals.current_author; 2046 } 2047 2048 // Search. 2049 if ( woopack_config.conditionals.is_search ) { 2050 data['is_search'] = true; 2051 data['search_term'] = woopack_config.conditionals.search_term; 2052 } 2053 2054 // Orderby. 2055 if ( 'undefined' !== typeof woopack_config.orderby || '' !== woopack_config.orderby ) { 2056 data['orderby'] = woopack_config.orderby; 2057 } 2058 2059 gridWrap.addClass('woopack-is-filtering'); 2060 2061 $.ajax({ 2062 type: 'post', 2063 url: window.location.href.split('#').shift(), 2064 data: data, 2065 success: function (response) { 2066 self._setCacheData(term, response, paged); 2067 self._renderPosts(response, { 2068 term: term, 2069 isotopeData: isotopeData, 2070 page: paged 2071 }); 2072 gridWrap.removeClass('woopack-is-filtering'); 2073 } 2074 }); 2075 }, 2076 2077 _renderPosts: function (response, args) 2078 { 2079 var self = this, 2080 wrap = $(this.wrapperClass), 2081 gridWrap = $(this.nodeClass).find('.woopack-products-grid-wrap'); //console.log('_renderPosts'); 2082 2083 if ( $(self.nodeClass).hasClass('woopack-products-loading') || ( 'load_more' !== self.settings.pagination && 'scroll' !== self.settings.pagination ) ) { 2084 wrap.isotope('remove', $(this.postClass)); 2085 $(self.nodeClass).removeClass('woopack-products-loading'); 2086 } 2087 2088 wrap.isotope('insert', $(response.data), $.proxy(this._isotopeCallback, this)); 2089 2090 wrap.find('.woopack-grid-sizer').remove(); 2091 wrap.append('<li class="woopack-grid-sizer"></li>'); 2092 2093 wrap.imagesLoaded(function () { 2094 setTimeout(function () { 2095 if (!self.masonry) { 2096 self._gridLayoutMatchHeight(); 2097 } 2098 wrap.isotope('layout'); 2099 setTimeout(function() { 2100 self._initSlider(); 2101 }, 500); 2102 }, 200); 2103 2104 $(document).trigger( 'woopack.grid.rendered', [self] ); 2105 }); 2106 2107 if (response.pagination) {
2108 $(self.nodeClass).find('.fl-builder-pagination').remove(); 2109 $(self.nodeClass).find('.fl-module-content').append(response.pagination); 2110 $(self.nodeClass).find('.woopack-ajax-pagination a').off('click').on('click', function (e) { 2111 e.preventDefault(); 2112 var pageNumber = self._getPageNumber( this ); 2113 self._getPosts(args.term, args.isotopeData, pageNumber); 2114 }); 2115 } else { 2116 $(self.nodeClass).find('.fl-builder-pagination').remove(); 2117 } 2118 2119 if ( self.settings.scrollTo && ! self.isDefaultFilter ) { 2120 var scrollToClass = self.settings.scrollToClass || self.nodeClass; 2121 var offsetTop = $(scrollToClass).offset().top - 200; 2122 $('html, body').stop().animate({ 2123 scrollTop: offsetTop 2124 }, 300); 2125 } 2126 2127 if ( self.isFiltering ) { 2128 self.isFiltering = false; 2129 $(self.nodeClass).trigger( 'grid.filter.complete' ); 2130 } 2131 }, 2132 2133 _isotopeCallback: function() { 2134 var self = this, 2135 wrap = $(this.wrapperClass); 2136 2137 if ( ! this.masonry ) { 2138 wrap.imagesLoaded(function () { 2139 setTimeout(function () { 2140 self._gridLayoutMatchHeight(); 2141 }, 150); 2142 }); 2143 } 2144 $( this.wrapperClass ).isotope( 'layout' ); 2145 $( this.nodeClass ).removeClass('woopack-products-loading'); 2146 }, 2147 2148 _setCacheData: function (filter, response, paged) 2149 { 2150 if ('undefined' === typeof filter || '' === filter) { 2151 filter = 'all'; 2152 } 2153 if ('undefined' === typeof paged || !paged) { 2154 paged = 1; 2155 } 2156 2157 if ('undefined' === typeof this.cacheData.ajaxCache) { 2158 this.cacheData.ajaxCache = {}; 2159 } 2160 if ('undefined' === typeof this.cacheData.ajaxCache[filter]) { 2161 this.cacheData.ajaxCache[filter] = {}; 2162 } 2163 if ('undefined' === typeof this.cacheData.ajaxCache[filter].page) { 2164 this.cacheData.ajaxCache[filter].page = {}; 2165 } 2166 2167 return this.cacheData.ajaxCache[filter].page[paged] = response; 2168 }, 2169 2170 _getCacheData: function (filter) 2171 { 2172 var cacheData = this.cacheData; 2173 2174 if ('undefined' === typeof cacheData.ajaxCache) { 2175 cacheData.ajaxCache = {}; 2176 } 2177 //console.log(cacheData); 2178 2179 return cacheData.ajaxCache[filter]; 2180 }, 2181 2182 _gridLayoutMatchHeight: function() 2183 { 2184 var highestBox = 0; 2185 var postElements = $(this.postClass + ':visible'); 2186 var columns = this.settings.columns.desktop; 2187 2188 if (! this.matchHeight || 1 === columns) { 2189 return; 2190 } 2191 2192 if ( 'style-9' === this.style ) { 2193 return; 2194 } 2195 2196 if ( this.masonry ) { 2197 return; 2198 } 2199 2200 if (window.innerWidth <= 980) { 2201 columns = this.settings.columns.medium; 2202 } 2203 if (window.innerWidth <= 767) { 2204 columns = this.settings.columns.responsive; 2205 } 2206 2207 if ( 1 === columns ) { 2208 return; 2209 } 2210 2211 postElements.css('height', 'auto'); 2212 2213 var rows = Math.round(postElements.length / columns); 2214 2215 if ( postElements.length % columns > 0 ) { 2216 rows = rows + 1; 2217 } 2218 2219 // range. 2220 var j = 1, 2221 k = columns; 2222 2223 for( var i = 0; i < rows; i++ ) { 2224 // select number of posts in the current row. 2225 var postsInRow = $(this.postClass + ':visible:nth-child(n+' + j + '):nth-child(-n+' + k + ')'); 2226 2227 // get height of the larger post element within the current row. 2228 postsInRow.css('height', '').each(function () { 2229 if ($(this).height() > highestBox) { 2230 highestBox = $(this).height(); 2231 } 2232 }); 2233 // apply the height to all posts in the current row. 2234 postsInRow.height(highestBox); 2235 2236 // increment range. 2237 j = k + 1; 2238 k = k + columns; 2239 if ( k > postElements.length ) { 2240 k = postElements.length; 2241 } 2242 highestBox = 0; 2243 } 2244 }, 2245 2246 _reLayout: function() 2247 { 2248 var self = this; 2249 var wrap = $(this.wrapperClass); 2250 var fix = function() { 2251 wrap.imagesLoaded(function() { 2252 if ( ! self.masonry ) { 2253 self._gridLayoutMatchHeight(); 2254 } 2255 setTimeout(function() { 2256 self._initSlider(); 2257 if ( wrap.data( 'isotope' ) ) { 2258 wrap.isotope('destroy'); 2259 } 2260 self._gridLayout(); 2261 }, 500); 2262 }); 2263 }; 2264 2265 // Search and Filter plugin fix. 2266 $(document).on('sf:ajaxfinish', '.searchandfilter', function(){ 2267 self._gridLayout(); 2268 }); 2269 2270 // FacetWP fix. 2271 $(document).on('facetwp-loaded', function() { 2272 fix(); 2273 }); 2274 2275 // WooCommerce Product Filters fix. 2276 $(window).on('wcpf_after_ajax_filtering', function() { 2277 fix(); 2278 }); 2279 2280 // YITH Ajax Product Filters fix. 2281 $(document).on('yith-wcan-ajax-filtered', function() { 2282 fix(); 2283 }); 2284 2285 // WP Grid Builder 2286 $(window).on( 'wpgb.loaded', function() { 2287 if ( 'undefined' === typeof WP_Grid_Builder ) { 2288 return; 2289 } 2290 if ( 'undefined' === typeof WP_Grid_Builder['on'] ) { 2291 return; 2292 } 2293 2294 WP_Grid_Builder.on( 'init', function( wpgb ) { 2295 if ( wpgb.facets && 'undefined' !== typeof wpgb.facets['on'] ) { 2296 wpgb.facets.on( 'appended', fix ); 2297 } 2298 } ); 2299 } ); 2300 2301 // PowerPack Advanced Tabs fix.
2302 $(document).on('pp-tabs-switched', function(e, content) { 2303 if ( content.find(this.nodeClass).length === 0 ) { 2304 return; 2305 } 2306 if ( ! self.masonry ) { 2307 self._gridLayoutMatchHeight(); 2308 } 2309 if ( self.filters || self.masonry ) { 2310 if ( content.find('ul.products').data( 'isotope' ) ) { 2311 content.find('ul.products').isotope('layout'); 2312 } else { 2313 self._gridLayout(); 2314 } 2315 } 2316 setTimeout(function() { 2317 self._initSlider(); 2318 }, 500); 2319 }); 2320 }, 2321 2322 _initInfiniteScroll: function() 2323 { 2324 if (parseInt( this._getTotalPages() ) > 1 && this.settings.pagination == 'scroll' && typeof FLBuilder === 'undefined') { 2325 this._infiniteScroll(); 2326 2327 $(this.nodeClass).on( 'grid.filter.complete', this._infiniteScroll.bind( this ) ); 2328 } 2329 }, 2330 2331 _infiniteScroll: function(e) 2332 { 2333 2334 if ( $(this.wrapperClass).data( 'infinitescroll' ) ) { 2335 $(this.wrapperClass).infinitescroll( 'destroy' ); 2336 $(this.wrapperClass).removeData( 'infinitescroll' ); 2337 this.currentPage = 1; 2338 } 2339 2340 var path = $(this.nodeClass + ' .fl-builder-pagination a.next').attr('href'), 2341 pagePattern = /(.*?(\/|\&|\?)paged-[0-9]{1,}(\/|=))([0-9]{1,})+(.*)/, 2342 wpPattern = /^(.*?\/?page\/?)(?:\d+)(.*?$)/, 2343 pageMatched = null, 2344 scrollData = { 2345 navSelector : this.nodeClass + ' .fl-builder-pagination', 2346 nextSelector : this.nodeClass + ' .fl-builder-pagination a.next', 2347 itemSelector : this.postClass, 2348 prefill : true, 2349 bufferPx : 200, 2350 animate : false, 2351 loading : { 2352 msgText : 'Loading', 2353 finishedMsg : '', 2354 img : FLBuilderLayoutConfig.paths.pluginUrl + 'img/ajax-loader-grey.gif', 2355 speed : 1 2356 } 2357 }; 2358 2359 // Define path since Infinitescroll incremented BB's custom pagination '/paged-2/2/' to '/paged-3/2/'. 2360 if ( pagePattern.test( path ) ) { 2361 scrollData.path = function( currPage ){ 2362 pageMatched = path.match( pagePattern ); 2363 path = pageMatched[1] + currPage + pageMatched[5]; 2364 return path; 2365 } 2366 } else if ( wpPattern.test( path ) ) { 2367 scrollData.path = path.match( wpPattern ).slice( 1 ); 2368 } 2369 2370 $(this.wrapperClass).infinitescroll(scrollData, $.proxy(this._infiniteScrollComplete, this) ); 2371 2372 setTimeout(function(){ 2373 $(window).trigger('resize'); 2374 }, 100); 2375 }, 2376 2377 _infiniteScrollComplete: function(elements) 2378 { 2379 var self = this; 2380 var wrap = $(this.wrapperClass); 2381 2382 this.currentPage = this.currentPage + 1; 2383 2384 if ( this.currentPage === parseInt( self._getTotalPages() ) ) { 2385 $(window).unbind('.infscr'); 2386 } 2387 2388 elements = $(elements); 2389 2390 if (!this.masonry) { 2391 if ( wrap.data( 'isotope' ) ) { 2392 wrap.isotope('insert', elements, $.proxy(this._gridLayoutMatchHeight, this)); 2393 } 2394 wrap.imagesLoaded($.proxy(function () { 2395 setTimeout(function () { 2396 self._gridLayoutMatchHeight(); 2397 }, 150); 2398 }, this)); 2399 } else { 2400 if ( wrap.data( 'isotope' ) ) { 2401 wrap.isotope('insert', elements); 2402 } 2403 } 2404 2405 elements.css('visibility', 'visible'); 2406 wrap.find('.woopack-grid-sizer').remove(); 2407 wrap.append('<li class="woopack-grid-sizer"></li>'); 2408 2409 wrap.imagesLoaded($.proxy(function () { 2410 setTimeout(function () { 2411 if (!this.masonry) { 2412 self._gridLayoutMatchHeight(); 2413 } 2414 wrap.isotope('layout'); 2415 setTimeout(function() { 2416 self._initSlider(); 2417 }, 500); 2418 }, 200); 2419 2420 $(document).trigger( 'woopack.grid.rendered', [self] ); 2421 }, this)); 2422 }, 2423 2424 _getTotalPages: function() { 2425 var pages = $( this.nodeClass + ' .fl-builder-pagination' ).find( 'li .page-numbers:not(.next)' ); 2426 var totalPages = 1; 2427 2428 if ( pages.length > 1) { 2429 var total = pages.last().text().replace( /\D/g, '' ) 2430 totalPages = parseInt( total ); 2431 } 2432 2433 return totalPages; 2434 } 2435 }; 2436 2437})(jQuery); 2438(function($){ 2439 2440 var WooPackGridOptions = { 2441 id: 'p5ibxj4gyl3c', 2442 layout: '1', 2443 layoutStyle: 1, 2444 isCustomLayout: false, 2445 columns: { 2446 desktop: 4, 2447 medium: 3, 2448 responsive: 1, 2449 }, 2450 pagination: 'none', 2451 perPage: '40', 2452 matchHeight: 'yes', 2453 filters: 'no', 2454 filterTax: 'product_brand', 2455 filterType: 'static', 2456 defaultFilter: '', 2457 fields: {"layout":"pre-defined","custom_layout":{"html":"[wpbb-if post:featured_image]\n<div class=\"woopack-product-image\">\n [wpbb post:woocommerce_sale_flash]\n\t[wpbb post:featured_image size=\"large\" display=\"tag\" linked=\"yes\"]\n\t[wpbb post:woopack_quick_view_button icon='fas fa-eye' text='Quick View']\n<\/div>\n[\/wpbb-if]\n\n<div class=\"woopack-product-content\">\n\n <h3 class=\"woopack-product-title\">[wpbb post:link text=\"title\"]<\/h3>\n \n <div class=\"woopack-product-rating\">\n [wpbb post:woopack_product_rating show_count='yes' text_singular='customer review' text_plural='customer reviews']\n <\/div>\n \n <div class=\"woopack-product-price\">\n [wpbb post:woocommerce_product_price]\n <\/div>\n \n [wpbb post:woopack_add_to_cart_button qty_input='before_button' variation_fields='no']\n\n <div class=\"woopack-product-meta\">\n \tCategory: \n\t\t[wpbb post:terms_list taxonomy=\"product_cat\" separator=\", \"]\n <\/div>\n<\/div>\n","css":".woopack-product-image {\n\tposition: relative;\n padding: 0;\n}\n.woopack-product-image a {\n display: block;\n}\n.woopack-product-content {\n padding: 0;\n}\n.woopack-product-title {\n\tmargin: 0;\n\tpadding: 0;\n}\n.woopack-product-rating .star-rating {\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n.woopack-product-meta {\n\tpadding: 0;\n\tmargin-top: 10px;\n}\n.woopack-product-meta a {\n\ttext-decoration: none;\n}\n.woopack-product-meta,\n.woopack-product-meta a {\n font-size: 12px;\n}\n.woopack-product-action .woopack-qty-input,\n.woopack-product-action .variations_form .quantity {\n\tdisplay: inline-block;\n margin-right: 2px;\n}\n.woopack-product-action.woopack-qty-custom .quantity {\n\tborder: 1px solid #ddd;\n}\n.woopack-product-action.woopack-qty-custom .quantity input.qty {\n\tborder: 1px solid #ddd;\n border-top: 0;\n border-bottom: 0;\n background: none;\n border-radius: 0;\n}\n.woopack-product-action form > table {\n\tmargin-left: auto;\n\tmargin-right: auto;\n\ttext-align: left;\n}\n.woopack-product-action form > table td.value {\n\tpadding: 2px 0px;\n}\n.woopack-product-action form > table td.label {\n\tcolor: inherit;\n text-transform: capitalize;\n}\n.woopack-product-action form > table .reset_variations {\n\tmargin-left: 5px;\n}\n.woopack-product-quick-view {\n background-color: rgba(255, 255, 255, 0.6);\n position: absolute;\n bottom: 0;\n height: 50px;\n\twidth: 100%;\n\topacity: 0;\n transition: all 0.3s;\n}\n.woopack-product-grid:hover .woopack-product-quick-view,\n.woopack-product-carou
2457sel:hover .woopack-product-quick-view {\n\topacity: 1;\n}\n.woopack-product-quick-icon + .woopack-quick-view-text {\n margin-left: 10px;\n}"},"product_layout":"1","posts_per_page":"40","product_columns":"4","product_columns_large":"","product_columns_medium":"3","product_columns_responsive":"1","product_spacing":"2","product_spacing_unit":"%","product_spacing_large":"","product_spacing_large_unit":"%","product_spacing_medium":"","product_spacing_medium_unit":"%","product_spacing_responsive":"","product_spacing_responsive_unit":"%","product_align":"default","match_height":"yes","enable_filter":"no","filter_taxonomy":"product_brand","filter_type":"static","filter_terms":"","filter_archive_terms":"","filter_term_default":"","filter_all_label":"All","filter_order_by":"name","filter_order_by_meta_key":"","filter_order":"ASC","filter_position":"top","filter_alignment":"left","filter_color":"","filter_hover_color":"","filter_bg_color":"","filter_bg_hover_color":"","filter_border":"solid","filter_border_pos":"default","filter_border_el":"active","filter_border_width":"0","filter_border_color":"","filter_border_hover_color":"","filter_padding_v":"10","filter_padding_h":"10","filter_margin_h":"20","filter_margin_v":"20","filter_radius":"0","filter_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"filter_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"filter_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"filter_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"filter_toggle_color":"","filter_toggle_bg_color":"","pagination":"none","no_results_message":"Sorry, we couldn't find any products. Please try a different search.","show_search":"1","pagination_align":"center","pagination_bg_color":"","pagination_bg_color_hover":"","pagination_color":"","pagination_color_hover":"","pagination_border":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"pagination_border_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"pagination_border_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"pagination_border_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"pagination_border_color_hover":"","pagination_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"pagination_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"pagination_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"pagination_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"content_bg_color":"","content_bg_color_hover":"","box_border_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""}
2457,"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_group_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_group_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_group_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_hover_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_hover_group_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_hover_group_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"box_border_hover_group_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"badge_position":"top-left","badge_bg_color":"","badge_color":"","badge_margin_left_right":"","badge_margin_left_right_large":"","badge_margin_left_right_medium":"","badge_margin_left_right_responsive":"","badge_margin_top_bottom":"","badge_margin_top_bottom_large":"","badge_margin_top_bottom_medium":"","badge_margin_top_bottom_responsive":"","badge_padding_left_right":"","badge_padding_left_right_large":"","badge_padding_left_right_medium":"","badge_padding_left_right_responsive":"","badge_padding_top_bottom":"","badge_padding_top_bottom_large":"","badge_padding_top_bottom_medium":"","badge_padding_top_bottom_responsive":"","sale_badge_border_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"sale_badge_border_group_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"sale_badge_border_group_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"sale_badge_border_group_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"out_of_stock_bg_color":"rgba(0,0,0,.7)","out_of_stock_color":"#ffffff","out_of_stock_border_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"out_of_stock_border_group_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"out_of_stock_border_group_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""}
2457,"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"out_of_stock_border_group_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"meta_text_color":"","meta_link_color":"","meta_border":"yes","meta_border_color":"#eeeeee","product_rating_size":"","product_rating_size_large":"","product_rating_size_medium":"","product_rating_size_responsive":"","product_rating_default_color":"","product_rating_color":"","product_rating_margin_bottom":"10","product_rating_margin_bottom_large":"","product_rating_margin_bottom_medium":"","product_rating_margin_bottom_responsive":"","product_rating_count_color":"","quick_view_text_color":"","quick_view_bg_color":"","quick_view_popup_width":"auto","quick_view_popup_width_custom":"670","quick_view_popup_overlay_bg_color":"","variation_table_style":"no","variation_table_width":"full","variation_table_border_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""}},"variation_table_cell_padding":"5","variation_table_label_bg_color":"#fcfcfc","variation_table_label_text_color":"","variation_table_value_bg_color":"","variation_table_value_text_color":"","button_alignment":"","button_width":"auto","button_width_custom":"","button_width_custom_large":"","button_width_custom_medium":"","button_width_custom_responsive":"","button_margin_top":"10","button_margin_top_large":"","button_margin_top_medium":"","button_margin_top_responsive":"","button_margin_bottom":"15","button_margin_bottom_large":"","button_margin_bottom_medium":"","button_margin_bottom_responsive":"","button_bg_color":"rgb(94, 184, 56)","button_bg_color_hover":"rgb(65, 137, 41)","button_color":"rgb(255, 255, 255)","button_color_hover":"","button_border_group":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"button_border_group_large":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"button_border_group_medium":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"button_border_group_responsive":{"style":"","color":"","width":{"top":"","right":"","bottom":"","left":""},"radius":{"top_left":"","top_right":"","bottom_left":"","bottom_right":""},"shadow":{"color":"","horizontal":"","vertical":"","blur":"","spread":""}},"button_border_color_hover":"","button_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"16","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"button_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"button_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"button_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"product_title_heading_tag":"h3","product_title_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"product_title_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"product_title_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"product_title_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"product_title_color":"","product_title_color_hover":"","product_title_margin_top":"10","product_title_margin_top_large":"","product_title_margin_top_medium":"","product_title_margin_top_responsive":"","product_title_margin_bottom":"10","product_title_margin_bottom_large":"","product_title_margin_bottom_medium":"","product_title_margin_bottom_responsive":"","regular_price_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"regular_price_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"regular_price_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"regular_price_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"regular_price_color":"","product_price_margin_bottom":"","product_price_margin_bottom_large":"","product_price_margin_bottom_medium":"","product_price_margin_bottom_responsive":"","sale_price_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_price_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_price_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_price_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_price_color":"","short_description_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"short_description_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"short_description_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"short_description_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"short_description_color":"","product_description_margin_bottom":"","product_description_margin_bottom_large":"","product_description_margin_bottom_medium":"","product_description_margin_bottom_responsive":"","sale_badge_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_badge_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_badge_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"sale_badge_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"out_of_stock_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"out_of_stock_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"out_of_stock_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"out_of_stock_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"meta_typography":{"font_family":"Default","font_weight":"400","font_size":{"length":"14","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"meta_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"meta_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"meta_typography_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"rating_count_taxonomy":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"rating_count_taxonomy_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"rating_count_taxonomy_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"rating_count_taxonomy_responsive":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"quick_view_typography":{"font_family":"Default","font_weight":"default","font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"quick_view_typography_large":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"quick_view_typography_medium":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"quick_view_typography_responsi
2457ve":{"font_size":{"length":"","unit":"px"},"line_height":{"length":"","unit":""},"text_align":"","letter_spacing":{"length":"","unit":"px"},"text_transform":"","text_decoration":"","font_style":"","font_variant":"","text_shadow":{"color":"","horizontal":"","vertical":"","blur":""}},"responsive_display":"desktop,large,medium,mobile","visibility_display":"","visibility_user_capability":"","visibility_logic":"[]","animation":{"style":"","delay":"0","duration":"1"},"container_element":"div","id":"","class":"","node_label":"","custom_attributes":[{"key":"","value":"","target":"wrapper","selector":"","0":""}],"export":"","import":"","pagination_padding_top":"","pagination_padding_top_large":"","pagination_padding_top_medium":"","pagination_padding_top_responsive":"","pagination_padding_right":"","pagination_padding_right_large":"","pagination_padding_right_medium":"","pagination_padding_right_responsive":"","pagination_padding_bottom":"","pagination_padding_bottom_large":"","pagination_padding_bottom_medium":"","pagination_padding_bottom_responsive":"","pagination_padding_left":"","pagination_padding_left_large":"","pagination_padding_left_medium":"","pagination_padding_left_responsive":"","pagination_margin_top":"","pagination_margin_top_large":"","pagination_margin_top_medium":"","pagination_margin_top_responsive":"","pagination_margin_right":"","pagination_margin_right_large":"","pagination_margin_right_medium":"","pagination_margin_right_responsive":"","pagination_margin_bottom":"","pagination_margin_bottom_large":"","pagination_margin_bottom_medium":"","pagination_margin_bottom_responsive":"","pagination_margin_left":"","pagination_margin_left_large":"","pagination_margin_left_medium":"","pagination_margin_left_responsive":"","box_padding_top":"","box_padding_top_large":"","box_padding_top_medium":"","box_padding_top_responsive":"","box_padding_right":"","box_padding_right_large":"","box_padding_right_medium":"","box_padding_right_responsive":"","box_padding_bottom":"","box_padding_bottom_large":"","box_padding_bottom_medium":"","box_padding_bottom_responsive":"","box_padding_left":"","box_padding_left_large":"","box_padding_left_medium":"","box_padding_left_responsive":"","content_padding_top":"","content_padding_top_large":"","content_padding_top_medium":"","content_padding_top_responsive":"","content_padding_right":"","content_padding_right_large":"","content_padding_right_medium":"","content_padding_right_responsive":"","content_padding_bottom":"","content_padding_bottom_large":"","content_padding_bottom_medium":"","content_padding_bottom_responsive":"","content_padding_left":"","content_padding_left_large":"","content_padding_left_medium":"","content_padding_left_responsive":"","out_of_stock_padding_top":"8","out_of_stock_padding_top_large":"","out_of_stock_padding_top_medium":"","out_of_stock_padding_top_responsive":"","out_of_stock_padding_right":"8","out_of_stock_padding_right_large":"","out_of_stock_padding_right_medium":"","out_of_stock_padding_right_responsive":"","out_of_stock_padding_bottom":"8","out_of_stock_padding_bottom_large":"","out_of_stock_padding_bottom_medium":"","out_of_stock_padding_bottom_responsive":"","out_of_stock_padding_left":"8","out_of_stock_padding_left_large":"","out_of_stock_padding_left_medium":"","out_of_stock_padding_left_responsive":"","meta_padding_top":"","meta_padding_top_large":"","meta_padding_top_medium":"","meta_padding_top_responsive":"","meta_padding_right":"","meta_padding_right_large":"","meta_padding_right_medium":"","meta_padding_right_responsive":"","meta_padding_bottom":"","meta_padding_bottom_large":"","meta_padding_bottom_medium":"","meta_padding_bottom_responsive":"","meta_padding_left":"","meta_padding_left_large":"","meta_padding_left_medium":"","meta_padding_left_responsive":"","quick_view_padding_top":"","quick_view_padding_top_large":"","quick_view_padding_top_medium":"","quick_view_padding_top_responsive":"","quick_view_padding_right":"","quick_view_padding_right_large":"","quick_view_padding_right_medium":"","quick_view_padding_right_responsive":"","quick_view_padding_bottom":"","quick_view_padding_bottom_large":"","quick_view_padding_bottom_medium":"","quick_view_padding_bottom_responsive":"","quick_view_padding_left":"","quick_view_padding_left_large":"","quick_view_padding_left_medium":"","quick_view_padding_left_responsive":"","button_padding_top":"10","button_padding_top_large":"","button_padding_top_medium":"","button_padding_top_responsive":"","button_padding_right":"15","button_padding_right_large":"","button_padding_right_medium":"","button_padding_right_responsive":"","button_padding_bottom":"10","button_padding_bottom_large":"","button_padding_bottom_medium":"","button_padding_bottom_responsive":"","button_padding_left":"15","button_padding_left_large":"","button_padding_left_medium":"","button_padding_left_responsive":"","margin_top":"","margin_unit":"px","margin_top_large":"","margin_large_unit":"px","margin_top_medium":"","margin_medium_unit":"px","margin_top_responsive":"","margin_responsive_unit":"px","margin_right":"","margin_right_large":"","margin_right_medium":"","margin_right_responsive":"","margin_bottom":"","margin_bottom_large":"","margin_bottom_medium":"","margin_bottom_responsive":"","margin_left":"","margin_left_large":"","margin_left_medium":"","margin_left_responsive":"","type":"product-grid","bb_css_code":"","bb_js_code":"","item_html_tag":"li","layout_style":"grid","responsive_display_filtered":true,"data_source":"custom_query","data_source_acf_relational_type":"relationship","data_source_acf_relational_key":"","post_type":"product","order":"ASC","order_by":"title","order_by_meta_key":"","offset":"0","product_source":"all","exclude_current":"no","posts_product_matching":"1","posts_product":"","tax_product_product_brand_matching":"1","tax_product_product_brand":"","tax_product_product_cat_matching":"1","tax_product_product_cat":"145","tax_product_product_tag_matching":"1","tax_product_product_tag":"","users_matching":"1","users":"","product_title":"yes","product_price":"yes","product_rating":"no","product_rating_count":"no","connections":{"product_rating_text":"","taxonomy_custom_text":"","quick_view_custom_text":"","filter_term_default":"","filter_color":"","filter_hover_color":"","filter_bg_color":"","filter_bg_hover_color":"","filter_border_color":"","filter_typography":"","filter_typography_large":"","filter_typography_medium":"","filter_typography_responsive":"","filter_toggle_color":"","filter_toggle_bg_color":"","no_results_message":"","pagination_bg_color":"","pagination_bg_color_hover":"","pagination_color":"","pagination_color_hover":"","pagination_border":"","pagination_border_large":"","pagination_border_medium":"","pagination_border_responsive":"","pagination_border_color_hover":"","pagination_typography":"","pagination_typography_large":"","pagination_typography_medium":"","pagination_typography_responsive":"","content_bg_color":"","content_bg_color_hover":"","box_border_group":"","box_border_group_large":"","box_border_group_medium":"","box_border_group_responsive":"","box_border_hover_group":"","box_border_hover_group_large":"","box_border_hover_group_medium":"","box_border_hover_group_responsive":"","badge_bg_color":"","badge_color":"","sale_badge_border_group":"","sale_badge_border_group_large":"","sale_badge_border_group_medium":"","sale_badge_border_group_responsive":"","out_of_stock_bg_color":"","out_of_stock_color":"","out_of_stock_border_group":"","out_of_stock_border_group_large":"","out_of_stock_border_group_medium":"","out_of_stock_border_group_responsive":"","meta_text_color":"","meta_link_color":"","meta_border_color":"","product_rating_default_color":"","product_rating_color":"","product_rating_count_color":"","quick_view_text_color":"","quick_view_bg_color":"","quick_view_popup_overlay_bg_color":"","variation_table_border_group":"","variation_table_label_bg_color":"","variation_table_label_text_color":"","variation_table_value_bg_color":"","variation_table_value_text_color":"","button_bg_color":"","button_bg_color_hover":"","button_color":"","button_color_hover":"","button_border_group":"","button_border_group_large":"","button_border_group_medium":"","button_border_group_responsive":"","button_border_color_hover":"","button_typography":"","button_typography_large":"","button_typography_medium":"","button_typography_responsive":"","product_title_typography":"","product_title_typography_large":"","product_title_typography_medium":"","product_title_typography_responsive":"","product_title_color":"","product_title_color_hover":"","regular_price_typography":"","regular_price_typography_large":"","regular_price_typography_medium":"","regular_price_typography_responsive":"","regular_price_color":"","sale_price_typography":"","sale_price_typography_large":"","sale_price_typography_medium":"","sale_price_typography_responsive":"","sale_price_color":"","short_description_typography":"","short_description_typography_large":"","short_description_typography_medium":"","short_description_typography_responsive":"","short_description_color":"","sale_badge_typography":"","sale_badge_typography_large":"","sale_badge_typography_medium":"","sale_badge_typography_responsive":"","out_of_stock_typography":"","out_of_stock_typography_large":"","out_of_stock_typography_medium":"","out_of_stock_typography_responsive":"","meta_typography":"","meta_typography_large":"","meta_typography_medium":"","meta_typography_responsive":"","rating_count_taxonomy":"","rating_count_taxonomy_large":"","rating_count_taxonomy_medium":"","rating_count_taxonomy_responsive":"","quick_view_typography":"","quick_view_typography_large":"","quick_view_typography_medium":"","quick_view_typography_responsive":""},"product_rating_text":"customer review","product_short_description":"no","show_image":"yes","image_size":"woocommerce_thumbnail","image_slider":"yes","show_sale_badge":"yes","out_of_stock_text":"Out of Stock","button_type":"cart","button_text":"View More","button_target":"_self","qty_input":"before_button","variation_fields":"no","show_taxonomy":"yes","select_taxonomy":"product_tag","show_taxonomy_custom_text":"yes","taxonomy_custom_text":"Tag: ","show_quick_view":"yes","quick_view_custom_text":"Quick View","quick_view_type":"image_hover","quick_view_template":"","as_values_posts_product":"","as_values_tax_product_product_brand":"","as_values_tax_product_product_cat":"","as_values_tax_product_product_tag":"","as_values_users":""}, 2458 template: '', 2459 imagesSlider: true, 2460 scrollTo: true, 2461 }; 2462 2463 woopack_p5ibxj4gyl3c = new WooPackGrid( WooPackGridOptions ); 2464 2465 // Layout fix in PowerPack Advanced Tabs module 2466 $(document).on('pp-tabs-switched', function(e, selector) { 2467 if ( selector.find('.woopack-grid-wrap').length > 0 ) { 2468 var wrap = selector.find('#woopack-p5ibxj4gyl3c .woopack-products'); 2469 if ( 'undefined' !== typeof $.fn.isotope && 'undefined' !== typeof $.fn.imagesLoaded ) { 2470 setTimeout(function() { 2471 if ( ! wrap.hasClass('woopack-isotope-initialized') ) { 2472 wrap.imagesLoaded(function() {
2473 var hasSlider = false; 2474 if ( wrap.find( '.slick-slider' ).length > 0 ) { 2475 hasSlider = true; 2476 wrap.find( '.slick-slider' ).slick('unslick'); 2477 } 2478 if ( ! wrap.data('isotope') ) { 2479 wrap.isotope( woopack_p5ibxj4gyl3c.isotopeData ); 2480 } 2481 if ( hasSlider ) { 2482 woopack_p5ibxj4gyl3c._initSlider(); 2483 } 2484 2485 wrap.isotope('layout'); 2486 wrap.addClass('woopack-isotope-initialized'); 2487 }); 2488 } 2489 }, 500); 2490 } 2491 } 2492 }); 2493 2494})(jQuery); 2495 2496/* Start Global Node Custom JS */ 2497 2498/* End Global Node Custom JS */ 2499 2500 2501/* Start Layout Custom JS */ 2502 2503/* End Layout Custom JS */ 2504
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.