[ad_1]
` )
);
// Facebook Script Embed
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src=”https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12&appId=166116077300962&autoLogAppEvents=1″;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));
// Twitter Script Embed
(function(d, s, id) {
var js, tjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.setAttribute(‘async’, ”);
js.src=”https://platform.twitter.com/widgets.js”;
tjs.parentNode.insertBefore(js, tjs);
}(document, ‘script’, ‘twitter-js’));
}
// Simplify some iframe stuff
var iframes = $(‘iframe’);
iframes
.filter( ‘.responsive’ )
.each( function( _, frame ) {
// 16×9 responsive ratio iframes
var $frame = $(frame);
$( frame ).css({
position : ‘absolute’,
top : 0, left : 0, right : 0,
width : ‘100%’,
height : ‘100%’,
}).parent().addClass( ‘wood-responsive-container wood-responsive-container-16×9’ );
});
var lazyFrames = iframes
.filter(‘[data-lazy-src]’);
function woodMakeLazyFrame( selector ) {
var observer;
var options = {
root : null,
rootMargin : ‘0px’,
threshold : 0,
};
function handler(entries, observer) {
entries.forEach(function(entry){
var ioR = entry.intersectionRatio;
if ( ioR > 0 ) {
entry.target.src = entry.target.dataset.lazySrc;
observer.unobserve(entry.target);
}
});
}
observer = new IntersectionObserver( handler, options );
observer.observe( selector );
}
lazyFrames.each( ( _, frame ) => woodMakeLazyFrame( frame ) );
});
}(jQuery))
Click Here For The Original Source.
————————————————————————————-