!function(O,z,A,w){"use strict";O.isFunction=O.isFunction||function(e){return"function"==typeofe&&"number"!=typeofe.nodeType},z=void0!==z&&z.Math==Math?z:"undefined"!=typeofself&&self.Math==Math?self:Function("return this")(),O.fn.visibility=function(h){varx,e=O(this),P=e.selector||"",y=(newDate).getTime(),C=[],S=h,R="string"==typeofS,V=[].slice.call(arguments,1),k=e.length,T=0;returne.each(function(){vare,o,n,i=O.isPlainObject(h)?O.extend(!0,{},O.fn.visibility.settings,h):O.extend({},O.fn.visibility.settings),t=i.className,s=i.namespace,r=i.error,c=i.metadata,a="."+s,l="module-"+s,d=O(z),u=O(this),f=[z,A].indexOf(i.context)<0?O(A).find(i.context):O(i.context),b=u.data(l),m=z.requestAnimationFrame||z.mozRequestAnimationFrame||z.webkitRequestAnimationFrame||z.msRequestAnimationFrame||function(e){setTimeout(e,0)},g=this,p=!1,v={initialize:function(){v.debug("Initializing",i),v.setup.cache(),v.should.trackChanges()&&("image"==i.type&&v.setup.image(),"fixed"==i.type&&v.setup.fixed(),i.observeChanges&&v.observeChanges(),v.bind.events()),v.save.position(),v.is.visible()||v.error(r.visible,u),i.initialCheck&&v.checkVisibility(),v.instantiate()},instantiate:function(){v.debug("Storing instance",v),u.data(l,v),b=v},destroy:function(){v.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),d.off("load"+a,v.event.load).off("resize"+a,v.event.resize),f.off("scroll"+a,v.event.scroll).off("scrollchange"+a,v.event.scrollchange),"fixed"==i.type&&(v.resetFixed(),v.remove.placeholder()),u.off(a).removeData(l)},observeChanges:function(){"MutationObserver"inz&&(o=newMutationObserver(v.event.contextChanged),n=newMutationObserver(v.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(g,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",n))},bind:{events:function(){v.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&d.on("load"+a,v.event.load),d.on("resize"+a,v.event.resize),f.off("scroll"+a).on("scroll"+a,v.event.scroll).on("scrollchange"+a,v.event.scrollchange)}},event:{changed:function(e){v.verbose("DOM tree modified, updating visibility calculations"),v.timer=setTimeout(function(){v.verbose("DOM tree modified, updating sticky menu"),v.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==g||0<O(e).find(g).length)&&(v.debug("Element removed from DOM, tearing down events"),v.destroy())})})},resize:function(){v.debug("Window resized"),i.refreshOnResize&&m(v.refresh)},load:function(){v.debug("Page finished loading"),m(v.refresh)},scroll:function(){i.throttle?(clearTimeout(v.timer),v.timer=setTimeout(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])},i.throttle)):m(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])})},scrollchange:function(e,o){v.checkVisibility(o)}},precache:function(e,o){for(varn=(e=einstanceofArray?e:[e]).length,t=0,i=[],s=A.createElement("img"),c=function(){++t>=e.length&&O.isFunction(o)&&o()};n--;)(s=A.createElement("img")).onload=c,s.onerror=c,s.src=e[n],i.push(s)},enableCallbacks:function(){v.debug("Allowing callbacks to occur"),p=!1},disableCallbacks:function(){v.debug("Disabling all callbacks temporarily"),p=!0},should:{trackChanges:function(){returnR?(v.debug("One time query, no need to bind events"),!1):(v.debug("Callbacks being attached"),!0)}},setup:{cache:function(){v.cache={occurred:{},screen:{},element:{}}},image:function(){vare=u.data(c.src);e&&(v.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){v.debug("Image on screen",g),v.precache(e,function(){v.set.image(e,function(){++T==k&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){v.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,h.transition||(i.transition=!1),v.create.placeholder(),v.debug("Added placeholder",e),i.onTopPassed=function(){v.debug("Element passed, adding fixed position",u),v.show.placeholder(),v.set.fixed(),i.transition&&O.fn.transition!==w&&u.transition(i.