(function(n){function e(){var t,o,u,e;for(f=!1,t=0,o=r.length;t<o;t++)u=n(r[t]).filter(function(){return n(this).is(":appeared")}),u.trigger("appear",[u]),i[t]&&(e=i[t].not(u),e.trigger("disappear",[e])),i[t]=u}function s(n){r.push(n);i.push()}var r=[],u=!1,f=!1,o={interval:250,force_process:!1},t=n(window),i=[];n.expr[":"].appeared=function(i){var r=n(i);if(!r.is(":visible"))return!1;var u=t.scrollLeft(),f=t.scrollTop(),e=r.offset(),o=e.left,s=e.top;return s+r.height()>=f&&s-(r.data("appear-top-offset")||0)<=f+t.height()&&o+r.width()>=u&&o-(r.data("appear-left-offset")||0)<=u+t.width()?!0:!1};n.fn.extend({appear:function(t){var i=n.extend({},o,t||{}),h=this.selector||this,r;return u||(r=function(){f||(f=!0,setTimeout(e,i.interval))},n(window).scroll(r).resize(r),u=!0),i.force_process&&setTimeout(e,i.interval),s(h),n(h)}});n.extend({force_appear:function(){return u?(e(),!0):!1}})})(function(){return typeof module!="undefined"?require("jquery"):jQuery}())