(function(c,w,x,C){function y(a,b){this.element=a;m=m=c.extend({},c.fn[n].defaults,b);this._defaults=c.fn[n].defaults;this._name=n;p.push(a);var d=(new k(c(a),f)).isOnScreen();c(a).data("onScreen",d);if(d)m.onWindowEnter(c(a))}function k(a,b){var d=Math.round(a.offset().top-b.scrollTop()),c=Math.round(d+a.height()),e=Math.round(b.height()),g=Math.round(a.height());this.isOnScreen=function(){return a.is(":visible")&&de&&0>d&&(a=d<-1*e?-1* e:d,a+=b.scrollTop());return a};this.nextInternalFrame=function(){var a=null;g>e&&c>e&&(a=c>2*e?e:c-e,a+=b.scrollTop());return a};this.snapPosition=function(){var l=0;a.height()Math.abs(l)&&(l=0)):0b.docHeight()&&(l=b.docHeight()-e);0>l&&(l=0);return l};this.window=function(){return a}}var n="windows",m={},q=c(w),u=0,p=[],r=function(){var a=99999,b=p[0],d=null,h=0;c.each(p,function(e){d=new k(c(this),f);d.isOnScreen()&&(h=Math.abs(d.snapPosition()- f.scrollTop()),hd&&c(this).is(":visible"))&&(d=g,h=c(this))});h&&(a=new k(c(h),f),b.pos=a.snapPosition(),b.win=a.window())}return b},s=function(){var a=new k(r(),f),b={pos:a.nextInternalFrame(),win:a.window()};if(null===b.pos){var d=999999,h=null,e=r().offset().top,g;c.each(p,function(a){g=c(this).offset().top;g>e&&(g