Your IP : 216.73.216.147


Current Path : /home/lejardintz/www/templates/as002085/js/
Upload File :
Current File : /home/lejardintz/www/templates/as002085/js/jquery.lazy.min.js

/*!
 * http://jquery.eisbehr.de/lazy/
 * http://eisbehr.de/
 *
 * Copyright 2014, Daniel 'Eisbehr' Kern
 *
 * Dual licensed under the MIT and GPL v2 licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl-2.0.html
 *
 */
 
!function(t,e,n){t.fn.lazy=function(o){function r(n){"boolean"!=typeof n&&(n=!1),s.each(function(o){var r=t(this),i=this.tagName.toLowerCase();if((l(r)||n)&&r.attr(f.attribute)&&("img"==i&&r.attr(f.attribute)!=r.attr("src")||"img"!=i&&r.attr(f.attribute)!=r.css("background-image"))&&!r.data("loaded")&&(r.is(":visible")||!f.visibleOnly)){var a=t(new Image);++b,a.error(f.onError?function(){c(f.onError,r),u()}:function(){u()});var d=!0;a.one("load",function(){var t=function(){return d?void e.setTimeout(t,100):(r.hide(),"img"==i?r.attr("src",a.attr("src")):r.css("background-image","url("+a.attr("src")+")"),setTimeout(function(){r[f.effect](f.effectTime)},50*o),f.removeAttribute&&r.removeAttr(f.attribute),c(f.afterLoad,r),a.unbind("load"),a.remove(),void u())};t()}),c(f.beforeLoad,r),a.attr("src",f.baseurl+r.attr(f.attribute)),c(f.onLoad,r),d=!1,a.complete&&a.load(),r.data("loaded",!0)}}),s=t(s).filter(function(){return!t(this).data("loaded")})}function i(){f.delay>=0&&setTimeout(function(){r(!0)},f.delay),(f.delay<0||f.combined)&&(r(!1),t(f.appendScroll).bind("scroll",d(f.throttle,r)),t(f.appendScroll).bind("resize",d(f.throttle,r)))}function l(t){var e=n.documentElement.scrollTop?n.documentElement.scrollTop:n.body.scrollTop;return e+a()+f.threshold>t.offset().top}function a(){return e.innerHeight?e.innerHeight:n.documentElement&&n.documentElement.clientHeight?n.documentElement.clientHeight:n.body&&n.body.clientHeight?n.body.clientHeight:n.body&&n.body.offsetHeight?n.body.offsetHeight:f.fallbackHeight}function d(t,e){function n(){function n(){r=+new Date,e.apply()}var i=+new Date-r;o&&clearTimeout(o),i>t||!f.enableThrottle?n():o=setTimeout(n,t-i)}var o,r=0;return n}function u(){--b,s.size()||b||c(f.onFinishedAll,null)}function c(t,n){t&&(null!==e?t(n):t())}var f={baseurl:"",bind:"load",threshold:500,fallbackHeight:2e3,visibleOnly:!0,appendScroll:e,delay:-1,combined:!1,attribute:"data-src",removeAttribute:!0,effect:"show",effectTime:0,enableThrottle:!1,throttle:250,beforeLoad:null,onLoad:null,afterLoad:null,onError:null,onFinishedAll:null};o&&t.extend(f,o);var s=this,b=0;return"load"==f.bind?t(e).load(i):"event"==f.bind&&i(),f.onError&&s.bind("error",function(){c(f.onError,t(this))}),this},t.fn.Lazy=t.fn.lazy}(jQuery,window,document);