/*! Offscreen.js | (c) 2016 @gijsroge | MIT license | https://github.com/gijsroge/offscreen.js */ !function(a){a.fn.offscreen=function(b){var c={rightClass:"right-edge",leftClass:"left-edge",topClass:"top-edge",bottomClass:"bottom-edge",offset:0,smartResize:!0},b=a.extend(c,b),d=this;return this.offscreenInitiate=function(){a(d).each(function(){var b=a(window).width(),d=a(window).height(),e=a(this).offset().top,f=a(this).outerHeight();de+1.5*f&&a(this).removeClass(c.bottomClass),e<0?a(this).addClass(c.topClass):e>f&&a(this).removeClass(c.topClass);var g=a(this).offset().left,h=a(this).outerWidth()+c.offset;bh&&a(this).removeClass(c.leftClass)})},this.offscreenInitiate(),!0===c.smartResize?(!function(a,b){var c=function(a,b,c){var d;return function(){function e(){c||a.apply(f,g),d=null}var f=this,g=arguments;d?clearTimeout(d):c&&a.apply(f,g),d=setTimeout(e,b||100)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}}(jQuery,"smartresize"),a(window).smartresize(function(){d.offscreenInitiate()})):a(window).resize(function(){d.offscreenInitiate()}),d.offscreenInitiate()},a("[data-offscreen]").offscreen()}(jQuery);