This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allImages = document.querySelectorAll('img'), imageIndex; | |
for (imageIndex = 0; imageIndex < allImages.length; ++imageIndex) { | |
var src = allImages[imageIndex].getAttribute('src'); | |
allImages[imageIndex].removeAttribute('src'); | |
allImages[imageIndex].setAttribute('data-src',src); | |
} | |
var allIframes = document.querySelectorAll('iframe'), iframeIndex; | |
for (iframeIndex = 0; iframeIndex < allIframes.length; ++iframeIndex) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getNumberWithOrdinal(n) { | |
var s=["th","st","nd","rd"], | |
v=n%100; | |
return n+(s[(v-20)%10]||s[v]||s[0]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//move recaptcha block to visible area | |
jQuery( document ).on( 'submit', '.gform_wrapper form', function() { | |
var n = 0; | |
var i = setInterval( function() { | |
if ( n < 20 ) { | |
jQuery( 'iframe[src*="recaptcha/api2/bframe"]' ).each( function( i, item ) { | |
var holder = jQuery( item ).parent().parent(); | |
if ( holder.length && holder.css( 'visibility' ) == 'visible' ) { | |
holder.css( 'top', jQuery( window ).scrollTop() + 'px' ); | |
clearInterval( i ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@supports (-webkit-overflow-scrolling: touch) { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video width="1920" height="1080" autoplay playsinline loop muted> | |
... | |
</video> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="https://www.youtube.com/watch?v=ZNr5KdZNThQ" class="btn play-video youtube">Play</a> | |
$( '.banner .play-video.youtube' ).magnificPopup( { | |
type: 'iframe', | |
iframe: { | |
markup: '<div class="mfp-iframe-scaler">'+ | |
'<div class="mfp-close"></div>'+ | |
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>'+ | |
'</div>', | |
patterns: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allImages = document.querySelectorAll('img'), imageIndex; | |
for (imageIndex = 0; imageIndex < allImages.length; ++imageIndex) { | |
var src = allImages[imageIndex].getAttribute('src'); | |
allImages[imageIndex].removeAttribute('src'); | |
allImages[imageIndex].setAttribute('data-src',src); | |
} | |
var allBgImages = document.querySelectorAll('[style*=background-image]'), imageBgIndex; | |
for (imageBgIndex = 0; imageBgIndex < allBgImages.length; ++imageBgIndex) { | |
var url = allBgImages[imageBgIndex].style.backgroundImage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//chat and recaptcha position | |
function chatAndRecaptchaPosition() { | |
if (!$('html').hasClass('has-cookie-bar cookie-bar-bottom-bar')) { | |
return; | |
}; | |
var height = parseInt($('#catapult-cookie-bar').outerHeight()); | |
var styles = '<style>.has-cookie-bar.cookie-bar-bottom-bar body > .container {margin-bottom:' + height + 'px;} .has-cookie-bar.cookie-bar-bottom-bar .mcwidget-embed {bottom:' + parseInt(height - 30) + 'px;} .has-cookie-bar.cookie-bar-bottom-bar .grecaptcha-badge {bottom:' + parseInt(height + 1) + 'px !important;}</style>'; | |
$('#additional-styles').html(styles); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).load(function () { | |
if (document.documentMode || /Edge/.test(navigator.userAgent)) { | |
var bottom = $('.faq').offset().top + $('.faq').outerHeight(); | |
var minimumSpace = 1000; | |
$('.faq .item').each(function (i, item) { | |
var space = bottom - ($(item).offset().top + $(item).outerHeight()); | |
minimumSpace = (space < minimumSpace) ? space : minimumSpace; | |
}); | |
$('.faq .inner').css('margin-bottom', 100 - minimumSpace); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.initMap = () => { | |
jQuery('.map-canvas').each((index, element) => { | |
let map = jQuery(element); | |
const position = new google.maps.LatLng(map.data('latitude'), map.data('longitude')); | |
const markerIcon = map.data('icon'); | |
const mapZoom = map.data('zoom'); | |
const dataPlaceId = map.data('place-id') || 'null'; | |
let infowindow = new google.maps.InfoWindow(); | |
map = new google.maps.Map(element, { |