( function() { var nativeLazyloadInitialize = function() { var lazyElements, script; if ( 'loading' in HTMLImageElement.prototype ) { lazyElements = [].slice.call( document.querySelectorAll( '.native-lazyload-js-fallback' ) ); lazyElements.forEach( function( element ) { if ( ! element.dataset.src ) { return; } element.src = element.dataset.src; delete element.dataset.src; if ( element.dataset.srcset ) { element.srcset = element.dataset.srcset; delete element.dataset.srcset; } if ( element.dataset.sizes ) { element.sizes = element.dataset.sizes; delete element.dataset.sizes; } element.classList.remove( 'native-lazyload-js-fallback' ); } ); } else if ( ! document.querySelector( 'script#native-lazyload-fallback' ) ) { script = document.createElement( 'script' ); script.id = 'native-lazyload-fallback'; script.type = 'text/javascript'; script.src = 'https://aptox.com.br/wp-content/plugins/native-lazyload/assets/js/src/lazyload.js'; script.defer = true; document.body.appendChild( script ); } }; if ( document.readyState === 'complete' || document.readyState === 'interactive' ) { nativeLazyloadInitialize(); } else { window.addEventListener( 'DOMContentLoaded', nativeLazyloadInitialize ); } }() );