/** * author Christopher Blum * based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/ * forked from http://github.com/zuk/jquery.inview/ */ !function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if (t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if (t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if (!h||!o)return;g.top+u.height>h.top&&g.toph.left&&g.leftg.left?"right":h.left+o.widthg.top?"bottom":h.top+o.height