7035639c34d320263f52d2b7fa683832a45714d132eb46d0c65161615eaf72d5

Source Code:

var LazyLoadImage=function(){"use strict";var s=this,a="section",r="image",i="bkg",n="video",o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);s.init=function(t){var e;s.isObserverDisabled=t&&void 0!==t.disableObserver&&t.disableObserver,s.supportsObserver="IntersectionObserver"in window,s.supportsObserver&&!s.isObserverDisabled&&(e={root:null,rootMargin:"0px",threshold:[t&&void 0!==t.threshold?t.threshold:0]},s.setObserver(e)),s.params=s.params||{},t&&void 0!==t.sections&&void 0!==t.thumbUrl&&(s.params[a]=s.setParams(t.sections,"src",function(e){return e.getAttribute("data-"+t.thumbUrl)},"#"," li:not(.hidden) img:not(.offsetLoad)"),s.subscribe(a)),t&&void 0!==t.class_name&&void 0!==t.dataSrc&&(s.params[r]=s.setParams(t.class_name,"src",function(e){return e.getAttribute("data-"+t.dataSrc)},".",""),s.subscribe(r)),t&&void 0!==t.classBkg&&void 0!==t.dataBkg&&(s.params[i]=s.setParams(t.classBkg,"style",function(e){return'url("'+e.getAttribute("data-"+t.dataBkg)+'")'},".",""),s.subscribe(i)),t&&void 0!==t.classVideo&&void 0!==t.dataPoster&&(s.params[n]=s.setParams(t.classVideo,"poster",function(e){return e.getAttribute("data-"+t.dataPoster)},".",""),s.subscribe(n))},s.setParams=function(e,t,a,r,s){return{tag:e,attr:t,value:a,prefix:r,suffix:s}},s.subscribe=function(a){var r=s.params[a];r.tag=r.tag instanceof Array?r.tag:[r.tag],[].forEach.call(r.tag,function(e){var t=document.querySelectorAll(r.prefix+e+r.suffix+":not([data-img_type])");[].forEach.call(t,function(e){s.params[a].value(e)&&(s.supportsObserver&&!s.isObserverDisabled?(e.setAttribute("data-img_type",a),s.observer.observe(e)):!o&&!window.isAndroid||s.isVisible(e)?s.loadImage(e,s.params[a].attr,s.params[a].value(e),a):setTimeout(function(){s.loadImage(e,s.params[a].attr,s.params[a].value(e),a)},2e3))})})},s.setObserver=function(e){s.observer=new IntersectionObserver(function(e){e.forEach(function(e){var t,a;e.isIntersecting&&(a=(t=e.target).getAttribute("data-img_type"),s.loadImage(t,s.params[a].attr,s.params[a].value(t),a),s.observer.unobserve(t))})},e)},s.loadImage=function(e,t,a,r){r===i?e.style.backgroundImage=a:e.setAttribute(t,a)},s.isVisible=function(e){var t=e.getBoundingClientRect();return 0<=t.top&&t.top+10<(window.innerHeight||document.documentElement.clientHeight)||0<t.bottom&&t.bottom<(window.innerHeight||document.documentElement.clientHeight)}},myRawLazy=new LazyLoadImage;myRawLazy.supportsObserver||"undefined"==typeof jQuery||"function"!=typeof jQuery(document).ready?window.addEventListener("load",function(){myRawLazy.init(page_params.lazyLoad)},!1):jQuery(document).ready(function(){myRawLazy.init(page_params.lazyLoad)});