!function(e){e.fn.appear=function(a,p){var r=e.extend({data:void 0,one:!0,accX:0,accY:0,accTop:0},p);return this.each(function(){var p=e(this);if(p.appeared=!1,a){var n=e(window),t=function(){if(p.is(":visible")){var e=n.scrollLeft(),a=n.scrollTop(),t=p.offset(),c=t.left,o=t.top,i=r.accX,f=r.accY,s=r.accTop,l=p.height(),h=n.height(),d=p.width(),u=n.width();o+l+f>=a&&o<=a+h+f&&o<=a+h+s&&c+d+i>=e&&c<=e+u+i?p.appeared||p.trigger("appear",r.data):p.appeared=!1}else p.appeared=!1},c=function(){if(p.appeared=!0,r.one){n.unbind("scroll",t);var c=e.inArray(t,e.fn.appear.checks);c>=0&&e.fn.appear.checks.splice(c,1)}a.apply(this,arguments)};r.one?p.one("appear",r.data,c):p.bind("appear",r.data,c),n.scroll(t),e.fn.appear.checks.push(t),t()}else p.trigger("appear",r.data)})},e.extend(e.fn.appear,{checks:[],timeout:null,checkAll:function(){var a=e.fn.appear.checks.length;if(a>0)for(;a--;)e.fn.appear.checks[a]()},run:function(){e.fn.appear.timeout&&clearTimeout(e.fn.appear.timeout),e.fn.appear.timeout=setTimeout(e.fn.appear.checkAll,20)}}),e.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(a,p){var r=e.fn[p];r&&(e.fn[p]=function(){var a=r.apply(this,arguments);return e.fn.appear.run(),a})})}(jQuery);