/*! JinXin LazyLoad 1.0.0 - By Datou*/ !function(f,e){var h={getByClass:function(j,i){for(var n=j.getElementsByTagName("*"),m=[],l=new RegExp("\\b"+i+"\\b","i"),k=0;k1){for(var k=0;k0?Math.ceil(a):Math.floor(a),b!=c[d]&&(k=!1),"opacity"==d?(i.style.filter="alpha(opacity:"+(b+a)+")",i.style.opacity=(b+a)/100):i.style[d]=b+a+"px"}k&&(clearInterval(i.timer),j&&j())},60)},getStyle:function(d,c){return d.currentStyle?d.currentStyle[c]:getComputedStyle(d,!1)[c]}},g={init:function(){this.parm(),this.getImg(),this.getPos(),this.bindEvent(),this.lazyShow()},parm:function(){var b=e.getElementById("jxManLazyLoad");this.img={},this.img.onerrorImgUrl="",this.img.srcStore=b?b.getAttribute("jxdata-attr"):"jxLazyImg",this.img.className=b?b.getAttribute("jxdata-class"):"jxLazyClass",this.img.lazy=b?parseInt(b.getAttribute("jxdata-lazy")):20},getImg:function(){this.img.node=h.getByClass(e.getElementsByTagName("body")[0],this.img.className),this.img.length=this.img.node.length},getPos:function(){for(var d=g,c=0;c0&&(h.addEvent(f,"scroll",this.lazyShow),h.addEvent(f,"resize",this.getPos))},lazyShow:function(){var d=g,c=f.innerHeight||document.documentElement.clientHeight,b=document.body.scrollTop||document.documentElement.scrollTop;if(d.img.length>0){for(var a=0;a=i.xLazyPos.top&&b-d.img.lazy<=i.xLazyPos.top){var k=new Image;k.onload=function(){i.style.filter="alpha(opacity=0)",i.style.opacity=0,i.removeAttribute(d.img.srcStore),h.removeClass(i,d.img.className),d.img.length--,i.setAttribute("src",l),h.startMove(i,{opacity:"100"})},k.src=l}}(a)}}else{d.img.node=h.getByClass(e.getElementsByTagName("body")[0],d.img.className),d.img.length=d.img.node.length,d.img.length<=0&&(h.removeEvent(f,"scroll",d.lazyShow),h.removeEvent(f,"resize",d.getPos))}}};g.init()}(window,document);