!function (a, b, c, d){ function e(a, b){ return a[b] === d? t[b]: a[b]; } function f(){ var a = b.pageYOffset; return a === d? r.scrollTop: a; } function g(a, b){ var c = t["on" + a]; c && (w(c)? c.call(b[0]): (c.addClass && b.addClass(c.addClass), c.removeClass && b.removeClass(c.removeClass))), b.trigger("lazy" + a, [b] ), k(); } function h(b){ g(b.type, a(this).off(p, h)); } function i(c){ if (z.length) { c = c || t.forceLoad, A = 1 / 0; var d, e, i = f(), j = b.innerHeight || r.clientHeight, k = b.innerWidth || r.clientWidth; for (d = 0, e = _AN_Read_length("length", z); e > d; d++ ){ var l, m = z[d], q = m[0], s = m[n], u = false , v = c || y(q, o) < 0; if (a.contains(r, q)) { if (c || !s.visibleOnly || q.offsetWidth || q.offsetHeight) { if (!v) { var x = q.getBoundingClientRect(), B = s.edgeX, C = s.edgeY; l = x.top + i - C - j, v = i >= l && x.bottom > - C && x.left <= k + B && x.right > - B; } if (v) { m.on(p, h), g("show", m); var D = s.srcAttr, E = w(D)? D(m): _AN_Call_getattribute("getAttribute", q, D); E && (_AN_Write_src("src", q, false , E)), u = true ; } else A > l && (A = l); } } else u = true ; u && (y(q, o, 0), z.splice(d-- , 1), e-- ); } e || g("complete", a(r)); } } function j(){ B > 1? (B = 1, i(), _AN_Call_settimeout("setTimeout", window, j, t.throttle)): B = 0; } function k(a){ _AN_Read_length("length", z) && (a && "scroll" === a.type && a.currentTarget === b && A >= f() || (B || _AN_Call_settimeout("setTimeout", window, j, 0), B = 2)); } function l(){ v.lazyLoadXT(); } function m(){ i(true ); } var n = "lazyLoadXT", o = "lazied", p = "load error", q = "lazy-hidden", r = c.documentElement || c.body, s = b.onscroll === d || !!b.operamini || !r.getBoundingClientRect, t = { autoInit: true , selector: "img[data-src]", blankImage: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", throttle: 99, forceLoad: s, loadEvent: "pageshow", updateEvent: "load orientationchange resize scroll touchmove focus", forceEvent: "lazyloadall", oninit: { removeClass: "lazy"} , onshow: { addClass: q} , onload: { removeClass: q, addClass: "lazy-loaded"} , onerror: { removeClass: q} , checkDuplicates: true } , u = { srcAttr: "data-src", edgeX: 0, edgeY: 0, visibleOnly: true } , v = a(b), w = a.isFunction, x = a.extend, y = a.data || function (b, c){ return a(b).data(c); } , z = [] , A = 0, B = 0; a[n] = x(t, u, a[n]), a.fn[n] = function (c){ c = c || { } ; var d, f = e(c, "blankImage"), h = e(c, "checkDuplicates"), i = e(c, "scrollContainer"), j = e(c, "show"), l = { } ; a(i).on("scroll", k); for (d in u)l[d] = e(c, d); return this.each(function (d, e){ if (e === b) a(t.selector).lazyLoadXT(c); else { var i = h && y(e, o), m = a(e).data(o, j? -1: 1); if (i) return void k(); f && "IMG" === e.tagName && !_AN_Read_src("src", e) && (_AN_Write_src("src", e, false , f)), m[n] = x({ } , l), g("init", m), z.push(m), k(); } } ); } , a(c).ready(function (){ g("start", v), v.on(t.updateEvent, k).on(t.forceEvent, m), a(c).on(t.updateEvent, k), t.autoInit && (v.on(t.loadEvent, l), l()); } ); } (window.jQuery || window.Zepto || window.$, window, document);