1(function($) { 2 $.fn.thegemPreloader = function(callback) { 3 $(this).each(function() { 4 var $el = $(this), 5 hasSrc = ['img', 'iframe'].indexOf($el[0].nodeName.toLowerCase()) != -1; 6 7 $el.data('thegemPreloader', $('img, iframe', $el).add($el.filter('img, iframe')).length); 8 9 if ($el.data('thegemPreloader') == 0 || (hasSrc && !$el.attr('src'))) { 10 $el.prev('.preloader').remove(); 11 callback(); 12 $el.trigger('thegem-preloader-loaded'); 13 return; 14 } 15 16 if(!$el.prev('.preloader').length) { 17 $('<div class="preloader">').insertBefore($el); 18 } 19 20 $('img, iframe', $el).add($el.filter('img, iframe')).each(function() { 21 function preloaderItemLoaded() { 22 $el.data('thegemPreloader', $el.data('thegemPreloader')-1); 23 if($el.data('thegemPreloader') == 0) { 24 $el.prev('.preloader').remove(); 25 callback(); 26 $el.trigger('thegem-preloader-loaded'); 27 } 28 } 29 30 if (!$(this).attr('src')) { 31 preloaderItemLoaded(); 32 return; 33 } 34 35 var $obj = $('<img>'); 36 if($(this).prop('tagName').toLowerCase() == 'iframe') { 37 $obj = $(this); 38 } 39 $obj.attr('src', $(this).attr('src')); 40 $obj.on('load error', preloaderItemLoaded); 41 }); 42 }); 43 } 44})(jQuery); 45 46(function($) { 47 48 var oWidth=$.fn.width; 49 $.fn.width=function(argument) { 50 if (arguments.length==0 && this.length==1 && this[0]===window) { 51 if (window.gemOptions.innerWidth != -1) { 52 return window.gemOptions.innerWidth; 53 } 54 var width = oWidth.apply(this,arguments); 55 window.updateGemInnerSize(width); 56 return width; 57 } 58 59 return oWidth.apply(this,arguments); 60 }; 61 62 var $page = $('#page'); 63 64 $(window).on('load', function() { 65 var $preloader = $('#page-preloader'); 66 if ($preloader.length && !$preloader.hasClass('preloader-loaded')) { 67 $preloader.addClass('preloader-loaded'); 68 } 69 }); 70 71 $.fn.updateTabs = function() { 72 73 jQuery('.gem-tabs', this).each(function(index) { 74 var $tabs = $(this); 75 $tabs.thegemPreloader(function() { 76 $tabs.easyResponsiveTabs({ 77 type: 'default', 78 width: 'auto', 79 fit: false, 80 activate: function(currentTab, e) { 81 var $tab = $(currentTab.target); 82 var controls = $tab.attr('aria-controls'); 83 $tab.closest('.ui-tabs').find('.gem_tab[aria-labelledby="' + controls + '"]').trigger('tab-update'); 84 } 85 }); 86 }); 87 }); 88 89 jQuery('.gem-tour', this).each(function(index) { 90 var $tabs = $(this); 91 $tabs.thegemPreloader(function() { 92 $tabs.easyResponsiveTabs({ 93 type: 'vertical', 94 width: 'auto', 95 fit: false, 96 activate: function(currentTab, e) { 97 var $tab = $(currentTab.target); 98 var controls = $tab.attr('aria-controls'); 99 $tab.closest('.ui-tabs').find('.gem_tab[aria-labelledby="' + controls + '"]').trigger('tab-update'); 100 } 101 }); 102 }); 103 }); 104 105 }; 106 107 function fullwidth_block_after_update($item) { 108 $item.trigger('updateTestimonialsCarousel'); 109 $item.trigger('updateClientsCarousel'); 110 $item.trigger('fullwidthUpdate'); 111 } 112 113 function fullwidth_block_update($item, pageOffset, pagePaddingLeft, pageWidth,skipTrigger) { 114 var $prevElement = $item.prev(), 115 extra_padding = 0; 116 if ($prevElement.length == 0 || $prevElement.hasClass('fullwidth-block') || $prevElement.is('style')) { 117 $prevElement = $item.parent(); 118 extra_padding = parseInt($prevElement.css('padding-left')); 119 } 120 121 var offsetKey = window.gemSettings.isRTL ? 'right' : 'left'; 122 var cssData = { 123 width: pageWidth 124 }; 125 cssData[offsetKey] = pageOffset.left - ($prevElement.length ? $prevElement.offset().left - parseInt($prevElement.css('margin-left')) : 0) + parseInt(pagePaddingLeft) - extra_padding; 126 127 $item.css(cssData); 128 129 if (!skipTrigger) { 130 fullwidth_block_after_update($item); 131 } 132 } 133 134 var inlineFullwidths = [], 135 notInlineFullwidths = []; 136 137 $('.fullwidth-block').each(function() { 138 var $item = $(this), 139 $parents = $item.parents('.vc_row'), 140 fullw = { 141 isInline: false 142 }; 143 144 $parents.each(function() { 145 if (this.hasAttribute('data-vc-full-width')) { 146 fullw.isInline = true; 147 return false; 148 } 149 }); 150 151 if (fullw.isInline) { 152 inlineFullwidths.push(this); 153 } else { 154 notInlineFullwidths.push(this); 155 } 156 }); 157 158 function update_fullwidths(inline, init) { 159 var $needUpdate = []; 160
161 (inline ? inlineFullwidths : notInlineFullwidths).forEach(function(item) { 162 $needUpdate.push(item); 163 }); 164 165 if ($needUpdate.length > 0) { 166 var pageOffset = $page.offset(), 167 pagePaddingLeft = $page.css('padding-left'), 168 pageWidth = $page.width(); 169 170 $needUpdate.forEach(function(item) { 171 fullwidth_block_update($(item), pageOffset, pagePaddingLeft, pageWidth); 172 }); 173 } 174 } 175 176 if (!window.disableGemSlideshowPreloaderHandle) { 177 jQuery('.gem-slideshow-with-preloader:not(.gem-slideshow-rs)').each(function() { 178 var $slideshow = $(this); 179 $slideshow.thegemPreloader(function() {}); 180 }); 181 } 182 183 var revapi = jQuery(document).ready(function() {}); 184 revapi.one('revolution.slide.onloaded', function() { 185 jQuery('.gem-slideshow').prev('.slideshow-preloader').remove(); 186 }); 187 188 $(function() { 189 $('#gem-icons-loading-hide').remove(); 190 191 if (window.tgpLazyItems===undefined) { 192 $('#thegem-preloader-inline-css').remove(); 193 } 194 195 /*jQuery('iframe').not('.gem-video-background iframe, .wcppec-checkout-buttons iframe').each(function() { 196 $(this).thegemPreloader(function() {}); 197 });*/ 198 199 jQuery('.gem-video-background').each(function() { 200 var $videoBG = $(this); 201 var $videoContainer = $('.gem-video-background-inner', this); 202 var ratio = $videoBG.data('aspect-ratio') ? $videoBG.data('aspect-ratio') : '16:9'; 203 var regexp = /(\d+):(\d+)/; 204 var $fullwidth = $videoBG.closest('.fullwidth-block'); 205 ratio = regexp.exec(ratio); 206 if(!ratio || parseInt(ratio[1]) == 0 || parseInt(ratio[2]) == 0) { 207 ratio = 16/9; 208 } else { 209 ratio = parseInt(ratio[1])/parseInt(ratio[2]); 210 } 211 212 function gemVideoUpdate() { 213 $videoContainer.removeAttr('style'); 214 if($videoContainer.width() / $videoContainer.height() > ratio) { 215 $videoContainer.css({ 216 height: ($videoContainer.width() / ratio) + 'px', 217 marginTop: -($videoContainer.width() / ratio - $videoBG.height()) / 2 + 'px' 218 }); 219 } else { 220 $videoContainer.css({ 221 width: ($videoContainer.height() * ratio) + 'px', 222 marginLeft: -($videoContainer.height() * ratio - $videoBG.width()) / 2 + 'px' 223 }); 224 } 225 } 226 227 if ($videoBG.closest('.page-title-block').length > 0) { 228 gemVideoUpdate(); 229 } 230 231 if ($fullwidth.length) { 232 $fullwidth.on('fullwidthUpdate', gemVideoUpdate); 233 } else { 234 $(window).resize(gemVideoUpdate); 235 } 236 }); 237 238 update_fullwidths(false, true); 239 240 241 $('.fullwidth-block').each(function() { 242 var $item = $(this), 243 mobile_enabled = $item.data('mobile-parallax-enable') || '0', 244 is_custom_title = $item.hasClass('custom-title-background'); 245 246 if (!window.gemSettings.isTouch || mobile_enabled == '1') { 247 if ($item.hasClass('fullwidth-block-parallax-vertical')) { 248 var parallaxOptions = {}; 249 if (is_custom_title) { 250 parallaxOptions.position = 'top'; 251 } 252 253 $('.fullwidth-block-background', $item).each(function() { 254 var backgroundImageCss = $(this).css('background-image') || ''; 255 256 if (backgroundImageCss == 'none' || backgroundImageCss == '') { 257 $(this).on('tgpliVisible', function() { 258 $(this).parallaxVertical('50%', parallaxOptions); 259 }); 260 261 return; 262 } 263 264 $(this).parallaxVertical('50%', parallaxOptions); 265 }); 266 } else if ($item.hasClass('fullwidth-block-parallax-horizontal')) { 267 $('.fullwidth-block-background', $item).each(function() { 268 if (!window.gemSettings.parallaxDisabled) { 269 var backgroundImageCss = $(this).css('background-image') || ''; 270 271 if (backgroundImageCss == 'none' || backgroundImageCss == '') { 272 $(this).on('tgpliVisible', function() { 273 $(this).parallaxHorizontal(); 274 }); 275 276 return; 277 } 278 279 $(this).parallaxHorizontal(); 280 } 281 }); 282 } 283 } else { 284 $('.fullwidth-block-background', $item).css({ 285 backgroundAttachment: 'scroll' 286 }); 287 } 288 }); 289 290 if(!window.gemSettings.isTouch) { 291 $('.page-title-parallax-background').each(function() { 292 var backgroundImageCss = $(this).css('background-image') || ''; 293 if (backgroundImageCss == 'none' || backgroundImageCss == '') { 294 $(this).on('tgpliVisible', function() { 295 $(this).parallaxVertical('50%', { 296 position: 'top' 297 }); 298 }); 299 return; 300 } 301 302 $(this).parallaxVertical('50%', { 303 position: 'top' 304 }); 305 }); 306 } else { 307 $('.page-title-parallax-background').css({ 308 backgroundAttachment: 'scroll' 309 }); 310 } 311 312 313 314 $(window).resize(function() { 315 update_fullwidths(false, false); 316 }); 317 318 $(window).on('load', function() { 319 update_fullwidths(false, false); 320 }); 321 322 jQuery('select.gem-combobox, .gem-combobox select, .widget_archive select').each(function(index) { 323 $(this).combobox(); 324 }); 325 326 jQuery('.widget_categories select').each(function() { 327 this.onchange = null; 328 $(this).on('change', function() { 329 if($(this).val() != -1) { 330 $(this).closest('form').submit(); 331 } 332 }); 333 }); 334 335 jQuery('input.gem-checkbox, .gem-checkbox input').each(function(index) { 336 $(this).checkbox(); 337 }); 338 339 if (typeof($.fn.ReStable) == "function") { 340 jQuery('.gem-table-responsive').each(function(index) { 341 $('> table', this).ReStable({ 342 maxWidth: 768, 343 rowHeaders : $(this).hasClass('row-headers') 344 }); 345 }); 346 } 347 348 jQuery('.fancybox').each(function() { 349 $(this).fancybox(); 350 }); 351 352 jQuery(document).on('click', 'a[href^="%thegem-action"], a[href^="#thegem-action"]', function(e) { 353 thegemRunClickAction(e); 354 }); 355 356 thegemLightbox = function(settings) { 357 console.log(settings); 358 jQuery.fancybox.open({ 359 src: settings.url 360 }); 361 } 362 363 thegemPopupOpen = function(settings) { 364 if(settings.id && jQuery('#thegem-dynamic-popup-' + settings.id).length) { 365 jQuery.fancybox.open({ 366 src: '#thegem-dynamic-popup-' + settings.id, 367 type: 'inline' 368 }); 369 } 370 } 371 372 thegemPopupClose = function() { 373 $.fancybox.close(); 374 } 375 376 thegemClickAction = function(url) { 377 thegemActions = { 378 lightbox: thegemLightbox, 379 popupOpen: thegemPopupOpen, 380 popupClose: thegemPopupClose, 381 }; 382 url = decodeURIComponent(url); 383 const actionMatch = url.match(/action=(.+?)&/); 384 if (!actionMatch) { 385 return; 386 } 387 const action = thegemActions[actionMatch[1]]; 388 if (!action) { 389 return; 390 } 391 let settings = {};
392 const settingsMatch = url.match(/settings=(.+)/); 393 if (settingsMatch) { 394 settings = JSON.parse(atob(settingsMatch[1])); 395 } 396 settings.previousEvent = event; 397 for (var _len = arguments.length, restArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 398 restArgs[_key - 1] = arguments[_key]; 399 } 400 action(settings, ...restArgs); 401 } 402 thegemRunClickAction = function(event) { 403 event.preventDefault(); 404 this.thegemClickAction(jQuery(event.currentTarget).attr('href'), event); 405 } 406 407 if (typeof jQuery.fn.scSticky === 'function') { 408 jQuery('.panel-sidebar-sticky > .sidebar').scSticky(); 409 } 410 411 if (typeof jQuery.fn.sticky === 'function') { 412 stickyColumns(); 413 414 function stickyColumns() { 415 416 const $header = $('#site-header-wrapper'), 417 headerH = $header.length > 0 ? $header[0].clientHeight : 0, 418 offset = headerH - 1; 419 420 $('.thegem-column-sticky .elementor-column-wrap, .thegem-column-sticky > .elementor-widget-wrap').each(function (){ 421 422 if ($(this).data('sticky')) { 423 $(this).sticky('destroy'); 424 } 425 426 const stickyTo = $(this).parent().data('sticky-to') ? $(this).parent().data('sticky-to') : 'top', 427 stickyOffset = $(this).parent().data('sticky-offset') !== '' ? $(this).parent().data('sticky-offset') : stickyTo === 'bottom' ? 0 : offset; 428 429 $(this).sticky({ 430 to: stickyTo, 431 offset: stickyOffset, 432 effectsOffset: stickyOffset, 433 parent: 'parent', 434 spacerHide: '.elementor-element' 435 }); 436 }); 437 } 438 } 439 440 jQuery('iframe + .map-locker').each(function() { 441 var $locker = $(this); 442 $locker.click(function(e) { 443 e.preventDefault(); 444 if($locker.hasClass('disabled')) { 445 $locker.prev('iframe').css({ 'pointer-events' : 'none' }); 446 } else { 447 $locker.prev('iframe').css({ 'pointer-events' : 'auto' }); 448 } 449 $locker.toggleClass('disabled'); 450 }); 451 }); 452 453 $('.primary-navigation a.mega-no-link').closest('li').removeClass('menu-item-active current-menu-item'); 454 455 function getElementPagePosition(element) { 456 var width = element.offsetWidth, 457 height = element.offsetHeight, 458 left = 0, 459 top = 0; 460 461 while (element && element.id != 'page') { 462 left += element.offsetLeft; 463 top += element.offsetTop; 464 element = element.offsetParent; 465 } 466
467 return {"left": left, "top": top, "width": width, "height": height}; 468 } 469 470 var $anhorsElements = []; 471 $('a[href*="#"]').not('[data-vc-accordion], [data-vc-tabs], .scroll-to-content').each(function(e) { 472 var $anhor = $(this); 473 var link = $anhor.attr('href'); 474 if(!link) return ; 475 link = link.split('#'); 476 var currentUrl = window.location.href.split('#')[0]; 477 if(link[0] !== '' && link[0] !== currentUrl) return ; 478 try { 479 if($('#'+link[1]).hasClass('vc_tta-panel')) return ; 480 if($('#'+link[1]).length) { 481 $anhor.closest('li').removeClass('menu-item-active current-menu-item'); 482 $anhor.closest('li').parents('li').removeClass('menu-item-current'); 483 $(document).on('update-page-scroller', function(e, elem) { 484 var $elem = $(elem); 485 if(!$anhor.closest('li.menu-item').length) return ; 486 if($elem.is($('#'+link[1])) || $elem.find($('#'+link[1])).length) { 487 $anhor.closest('li').addClass('menu-item-active'); 488 $anhor.closest('li').parents('li').addClass('menu-item-current'); 489 } else { 490 $anhor.closest('li').removeClass('menu-item-active'); 491 $anhor.closest('li').parents('li.menu-item-current').each(function() { 492 if(!$('.menu-item-active', this).length) { 493 $(this).removeClass('menu-item-current'); 494 } 495 }); 496 } 497 }); 498 $anhor.click(function(e) { 499 e.preventDefault(); 500 history.replaceState('data to be passed', $anhor.text(), $anhor.attr('href')); 501 var correction = 0; 502 var isPerspectiveMenu = $('#thegem-perspective.modalview').length; 503 504 if($('#site-header.animated-header').length) { 505 var shrink = $('#site-header').hasClass('shrink'); 506 $('#site-header').addClass('scroll-counting'); 507 $('#site-header').addClass('fixed shrink'); 508 correction = $('#site-header').outerHeight(); 509 if (!isPerspectiveMenu) { 510 var siteHeaderTop = $('#site-header').position().top; 511 if ($('#site-header').hasClass('shrink')) { 512 siteHeaderTop = 0; 513 } 514 correction += siteHeaderTop; 515 } 516 517 if(!shrink) { 518 $('#site-header').removeClass('fixed shrink'); 519 } 520 setTimeout(function() { 521 $('#site-header').removeClass('scroll-counting'); 522 }, 50); 523 } 524 if($('#site-header.header-sticky').length && $('.header-sticky-template').length) { 525 correction = $('.header-sticky-template').outerHeight(); 526 } 527 var target_top = getElementPagePosition( $('#'+link[1])[0] ).top - correction + 1; 528 if(getElementPagePosition( $('#'+link[1])[0] ).top == 0) { target_top = 0; } 529 if($('body').hasClass('page-scroller') && $('.page-scroller-nav-pane').is(':visible')) { 530 var $block = $('#'+link[1]+'.scroller-block').add($('#'+link[1]).closest('.scroller-block')).eq(0); 531 if($block.length) { 532 $('.page-scroller-nav-pane .page-scroller-nav-item').eq($('.scroller-block').index($block)).trigger('click'); 533 } 534 if($anhor.closest('.overlay-menu-wrapper').length && $anhor.closest('.overlay-menu-wrapper').hasClass('active')) { 535 if($anhor.closest('#primary-navigation').length && $anhor.closest('#primary-navigation').hasClass('responsive')) { 536 $anhor.closest('.thegem-te-menu').find('.menu-toggle').trigger('click'); 537 $anhor.closest('#primary-navigation').find('.menu-toggle').trigger('click'); 538 } else { 539 $anhor.closest('.thegem-te-menu').find('.overlay-toggle').trigger('click'); 540 $anhor.closest('#primary-navigation').find('.overlay-toggle').trigger('click'); 541 } 542 } 543 } else { 544 if (isPerspectiveMenu) { 545 $('#page').stop(true, true).animate({scrollTop:target_top}, 1500, 'easeInOutCubic', function() { 546 if($anhor.closest('#thegem-perspective').length && $anhor.closest('#thegem-perspective').hasClass('modalview')) { 547 $anhor.closest('.thegem-te-menu').find('.perspective-menu-close').trigger('click'); 548 $anhor.closest('#primary-navigation').find('.perspective-menu-close').trigger('click'); 549 } 550 }); 551 } else { 552 $('html, body').stop(true, true).animate({scrollTop:target_top}, 1500, 'easeInOutCubic'); 553 } 554 if($anhor.closest('#primary-menu').length && $anhor.closest('#primary-menu').hasClass('dl-menuopen')) { 555 $anhor.closest('.thegem-te-menu').find('.menu-toggle').trigger('click'); 556 $anhor.closest('#primary-navigation').find('.menu-toggle').trigger('click'); 557 } 558 if($anhor.closest('.mobile-menu-slide-wrapper').length && $anhor.closest('.mobile-menu-slide-wrapper').hasClass('opened')) { 559 $anhor.closest('.thegem-te-menu').find('.mobile-menu-slide-close').trigger('click'); 560 $anhor.closest('#primary-navigation').find('.mobile-menu-slide-close').trigger('click'); 561 } 562 if($anhor.closest('.overlay-menu-wrapper').length && $anhor.closest('.overlay-menu-wrapper').hasClass('active')) { 563 if($anhor.closest('#primary-navigation').length && $anhor.closest('#primary-navigation').hasClass('responsive')) { 564 $anhor.closest('.thegem-te-menu').find('.menu-toggle').trigger('click'); 565 $anhor.closest('#primary-navigation').find('.menu-toggle').trigger('click'); 566 } else { 567 $anhor.closest('.thegem-te-menu').find('.overlay-toggle-close').trigger('click'); 568 $anhor.closest('#primary-navigation').find('.overlay-toggle-close').trigger('click'); 569 } 570 } 571 if($anhor.closest('#primary-navigation').length && $anhor.closest('#primary-navigation').hasClass('hamburger-active')) { 572 $anhor.closest('.thegem-te-menu').find('.hamburger-toggle').trigger('click'); 573 $anhor.closest('#primary-navigation').find('.hamburger-toggle').trigger('click'); 574 } 575 } 576 }); 577 $anhorsElements.push($anhor[0]); 578 } 579 } catch(e) { return; } 580 }); 581 582 if ($anhorsElements.length) { 583 function anchorLinksScroll() { 584 var isPerspectiveMenu = $('#thegem-perspective.modalview').length; 585 var correction = 0; 586 587 if (!$page.hasClass('vertical-header')) { 588 correction = $('#site-header').outerHeight(); 589 if (!isPerspectiveMenu) { 590 var siteHeaderTop = $('#site-header').length ? $('#site-header').position().top : 0; 591 if ($('#site-header').hasClass('shrink')) { 592 siteHeaderTop = 0; 593 } 594 correction += siteHeaderTop; 595 } 596 } 597 598 if($('#site-header.header-sticky').length && $('.header-sticky-template').length) { 599 correction = $('.header-sticky-template').outerHeight(); 600 } 601 602 for (var i = 0; i < $anhorsElements.length; i++) { 603 var $anhor = $($anhorsElements[i]);
604 var link = $anhor.attr('href'); 605 if(!link) continue ; 606 link = link.split('#'); 607 var scrollY = getScrollY() + $page.scrollTop(); 608 609 if(!$anhor.closest('li.menu-item').length) continue ; 610 var target_top = getElementPagePosition( $('#'+link[1])[0] ).top - correction; 611 if(scrollY >= target_top && scrollY <= target_top + $('#'+link[1]).outerHeight()) { 612 $anhor.closest('li').addClass('menu-item-active'); 613 $anhor.closest('li').parents('li').addClass('menu-item-current'); 614 } else { 615 $anhor.closest('li').removeClass('menu-item-active'); 616 $anhor.closest('li').parents('li.menu-item-current').each(function() { 617 if(!$('.menu-item-active', this).length) { 618 $(this).removeClass('menu-item-current'); 619 } 620 }); 621 } 622 } 623 } 624 625 $(window).scroll(anchorLinksScroll); 626 if ($('#thegem-perspective').length) { 627 $page.scroll(anchorLinksScroll); 628 } 629 630 $(window).on('load', function() { 631 for (var i = 0; i < $anhorsElements.length; i++) { 632 var anhor = $anhorsElements[i]; 633 if (anhor.href != undefined && anhor.href && window.location.href == anhor.href) { 634 anhor.click(); 635 break; 636 } 637 } 638 }); 639 } 640 641 $('body').on('click', '.post-footer-sharing .gem-button', function(e) { 642 e.stopPropagation(); 643 e.preventDefault(); 644 $(this).closest('.post-footer-sharing').find('.sharing-popup').toggleClass('active'); 645 }); 646 647 var scrollTimer, 648 body = document.body; 649 650 $(window).scroll(function() { 651 clearTimeout(scrollTimer); 652 if(!body.classList.contains('disable-hover')) { 653 //body.classList.add('disable-hover') 654 } 655 656 scrollTimer = setTimeout(function(){ 657 //body.classList.remove('disable-hover') 658 }, 300); 659 660 if(getScrollY() > 0) { 661 $('.scroll-top-button').addClass('visible'); 662 } else { 663 $('.scroll-top-button').removeClass('visible'); 664 } 665 }).scroll(); 666 667 function getScrollY(elem){ 668 return window.pageYOffset || document.documentElement.scrollTop; 669 } 670 671 $('a.hidden-email').each(function() { 672 $(this).attr('href', 'mailto:'+$(this).data('name')+'@'+$(this).data('domain')); 673 }); 674 675 var initFooterWidgetArea = function() { 676 if (window.tgpLazyItems !== undefined) { 677 var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) { 678 initFooterWidgetArea.call(node); 679 }); 680 if (!isShowed) { 681 return; 682 } 683 } 684 685 var self = this; 686 $(self).thegemPreloader(function() { 687 $(self).thegem_isotope({ 688 itemSelector: '.widget', 689 layoutMode: 'masonry' 690 }); 691 }); 692 }; 693 694 $('#colophon .footer-widget-area').each(initFooterWidgetArea); 695 696 $('body').updateTabs(); 697 }); 698 699 $(document).on('show.vc.accordion', '[data-vc-accordion]', function() { 700 var $target = $(this).data('vc.accordion').getContainer(); 701 var correction = 0; 702 if(!$target.find('.vc_tta-tabs').length || !$(this).is(':visible') || $target.data('vc-tta-autoplay')) return ; 703 if($('#site-header.animated-header').length && $('#site-header').hasClass('fixed')) { 704 var shrink = $('#site-header').hasClass('shrink'); 705 $('#site-header').addClass('scroll-counting'); 706 $('#site-header').addClass('fixed shrink'); 707 correction = $('#site-header').outerHeight() + $('#site-header').position().top; 708 if(!shrink) { 709 $('#site-header').removeClass('fixed shrink'); 710 } 711 $('#site-header').removeClass('scroll-counting'); 712 } 713 var target_top = $target.offset().top - correction - 100 + 1; 714 $('html, body').stop(true, true).animate({scrollTop:target_top}, 500, 'easeInOutCubic'); 715 }); 716 717 var vc_update_fullwidth_init = true; 718 $(document).on('vc-full-width-row', function(e) { 719 if (window.gemOptions.clientWidth - $page.width() > 25 || window.gemSettings.isRTL) { 720 for (var i = 1; i < arguments.length; i++) { 721 var $el = $(arguments[i]); 722 $el.addClass("vc_hidden"); 723 var $el_full = $el.next(".vc_row-full-width"); 724 $el_full.length || ($el_full = $el.parent().next(".vc_row-full-width")); 725 var el_margin_left = parseInt($el.css("margin-left"), 10), 726 el_margin_right = parseInt($el.css("margin-right"), 10), 727 offset = 0 - $el_full.offset().left - el_margin_left + $('#page').offset().left + parseInt($('#page').css('padding-left')), 728 width = $('#page').width(); 729 730 var offsetKey = window.gemSettings.isRTL ? 'right' : 'left'; 731 var cssData = { 732 position: "relative", 733 left: offset, 734 "box-sizing": "border-box", 735 width: $("#page").width() 736 }; 737 cssData[offsetKey] = offset; 738 739 if ($el.css(cssData), !$el.data("vcStretchContent")) { 740 var padding = -1 * offset; 741 0 > padding && (padding = 0); 742 var paddingRight = width - padding - $el_full.width() + el_margin_left + el_margin_right; 743 0 > paddingRight && (paddingRight = 0), $el.css({ 744 "padding-left": padding + "px", 745 "padding-right": paddingRight + "px" 746 }) 747 } 748 $el.attr("data-vc-full-width-init", "true"), $el.removeClass("vc_hidden"); 749 $el.trigger('VCRowFullwidthUpdate'); 750 } 751 } 752 update_fullwidths(true, vc_update_fullwidth_init); 753 vc_update_fullwidth_init = false;
754 }); 755 756 $('body').on('click', '.gem-button[href^="#give-form-"]', function(e) { 757 var form_id = $(this).attr('href').replace('#give-form-', ''); 758 form_id = parseInt(form_id); 759 if (!isNaN(form_id)) { 760 $('#give-form-' + form_id + ' .give-btn-modal').click(); 761 } 762 e.preventDefault(); 763 return false; 764 }); 765 766 $('body').on('click', '.close-fancybox', function (e){ 767 if (parent.jQuery.fancybox.getInstance()) { 768 e.preventDefault(); 769 parent.jQuery.fancybox.getInstance().close(); 770 } 771 }); 772 773})(jQuery); 774 775// Ajax Notification Hidden Sidebar 776(function($) { 777 778 $('body.notification-hidden-sidebar').on('added_to_cart', function () { 779 $('.thegem-popup-notification-wrap > .thegem-popup-notification.cart').remove(); 780 781 $('body').addClass('notification-locked'); 782 $('.thegem-popup-notification-sidebar').addClass('active'); 783 784 setTimeout(() => { 785 $.fancybox.close(); 786 }, 200) 787 }); 788 789 $('body.notification-hidden-sidebar').on('click touchend', '.thegem-popup-notification-sidebar .close', function (e) { 790 $('.thegem-popup-notification-sidebar').removeClass('active'); 791 $('body').removeClass('notification-locked'); 792 }); 793 794 $('body.notification-hidden-sidebar').on('click touchend', '.thegem-popup-notification-sidebar', function (e) { 795 const wrap = $('.thegem-popup-notification-sidebar .notification-sidebar'); 796 if (!wrap.is(e.target) && wrap.has(e.target).length === 0) { 797 $('.thegem-popup-notification-sidebar').removeClass('active'); 798 $('body').removeClass('notification-locked'); 799 } 800 }); 801 802 $('body.notification-hidden-sidebar').on('click touchend', 'a.minicart-menu-link', function (e) { 803 e.preventDefault(); 804 805 $('body').addClass('notification-locked'); 806 $('.thegem-popup-notification-sidebar').addClass('active'); 807 }); 808 809 $('body.notification-hidden-sidebar').on('click', '.woocommerce-mini-cart-item__qty > .plus, .woocommerce-mini-cart-item__qty > .minus', function () { 810 // Get values 811 var $qty = $(this).closest('.woocommerce-mini-cart-item__qty').find('.qty'), 812 currentVal = parseFloat($qty.val()), 813 max = parseFloat($qty.attr('max')), 814 min = parseFloat($qty.attr('min')), 815 step = $qty.attr('step'); 816 817 // Format values 818 if (!currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0; 819 if (max === '' || max === 'NaN') max = ''; 820 if (min === '' || min === 'NaN') min = 0; 821 if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step = 1; 822 823 // Change the value 824 if ($(this).is('.plus')) { 825 if (max && (max == currentVal || currentVal > max)) { 826 $qty.val(max); 827 } else { 828 $qty.val(currentVal + parseFloat(step)); 829 } 830 } else { 831 if (min && (min == currentVal || currentVal < min)) { 832 $qty.val(min); 833 } else if (currentVal > 0) { 834 $qty.val(currentVal - parseFloat(step)); 835 } 836 } 837 $qty.trigger('change'); 838 }); 839 840 $('body.notification-hidden-sidebar').on('change input', '.woocommerce-mini-cart .quantity .qty', function () { 841 var input = $(this); 842 var qtyVal = input.val(); 843 var itemID = input.parents('.woocommerce-mini-cart-item').data('key'); 844 845 clearTimeout(window.thegem_cart_update); 846 847 window.thegem_cart_update = setTimeout(function() { 848 $.ajax({ 849 url: woocommerce_params.ajax_url, 850 data: { 851 action: 'thegem_notification_sidebar_update_cart_item', 852 item_id: itemID, 853 qty: qtyVal 854 }, 855 success: function (data) { 856 if (data && data.fragments) { 857 $.each(data.fragments, function (key, value) { 858 if ($(key).hasClass('widget_shopping_cart_content')) { 859 const dataItemValue = $(value).find('.woocommerce-mini-cart-item[data-key="' + itemID + '"]'); 860 const dataFooterValue = $(value).find('.woocommerce-mini-cart__subtotal'); 861 const $itemSelector = $(key).find('.woocommerce-mini-cart-item[data-key="' + itemID + '"]'); 862 863 if (!data.cart_hash) { 864 $(key).replaceWith(value); 865 } else { 866 $itemSelector.replaceWith(dataItemValue); 867 $('.woocommerce-mini-cart__subtotal').replaceWith(dataFooterValue); 868 } 869 } else { 870 $(key).replaceWith(value); 871 } 872 }); 873 } 874 }, 875 dataType: 'json', 876 method: 'GET' 877 }); 878 }, 500); 879 }); 880})(jQuery); 881 882(function($) { 883 $(window).on( 'elementor/frontend/init', function() { 884 elementorFrontend.on( 'components:init', function() { 885 if(typeof elementorFrontend.utils.anchors !== 'undefined') { 886 elementorFrontend.elements.$document.off( 887 'click', 888 elementorFrontend.utils.anchors.getSettings('selectors.links'), 889 elementorFrontend.utils.anchors.handleAnchorLinks 890 ); 891 } 892 if(typeof elementorFrontend.utils.anchor_scroll_margin !== 'undefined') { 893 elementorFrontend.utils.anchor_scroll_margin.setSettings( 'selectors.links', '.elementor-element.elementor-widget:not([data-widget_type*="thegem"]) a[href*="#"]' ); 894 } 895 }); 896 }); 897})(jQuery);
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.