define(['jquery'],function($){$.fn.mfblogunveil=function(threshold,callback){var $w=$(window),th=threshold||0,attrib='data-original',images=this,loaded;this.one("mfblogunveil",function(){var source=this.getAttribute(attrib);if(source){var style=this.getAttribute('style')?(this.getAttribute('style')+'; '):'';style=style+'background-image: url("'+source+'");'
this.setAttribute('style',style);if(typeof callback==="function")callback.call(this);}});function mfblogunveil(){var inview=images.filter(function(){var $e=$(this);if($e.is(":hidden"))return;var wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th;});loaded=inview.trigger("mfblogunveil");images=images.not(loaded);}
$w.on("scroll.mfblogunveil resize.mfblogunveil lookup.mfblogunveil",mfblogunveil);mfblogunveil();return this;};});