/* * arrive.js * v2.3.0 * https://github.com/uzairfarooq/arrive * MIT licensed * * Copyright (c) 2014-2015 Uzair Farooq */ var Arrive=function(r,n,q){function t(e,a,c){f.addMethod(a,c,e.unbindEvent);f.addMethod(a,c,e.unbindEventWithSelectorOrCallback);f.addMethod(a,c,e.unbindEventWithSelectorAndCallback)}function p(e){e.arrive=k.bindEvent;t(k,e,"unbindArrive");e.leave=h.bindEvent;t(h,e,"unbindLeave")}if(r.MutationObserver&&"undefined"!==typeof HTMLElement){var w=0,f=function(){var e=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector; return{matchesSelector:function(a,c){return a instanceof HTMLElement&&e.call(a,c)},addMethod:function(a,c,d){var b=a[c];a[c]=function(){if(d.length==arguments.length)return d.apply(this,arguments);if("function"==typeof b)return b.apply(this,arguments)}},callCallbacks:function(a){for(var c=0,d;d=a[c];c++)d.callback.call(d.elem)},checkChildNodesRecursively:function(a,c,d,b){for(var u=0,m;m=a[u];u++)d(m,c,b)&&b.push({callback:c.callback,elem:m}),0