!function(t){var n=t(window),a=n.height();n.resize(function(){a=n.height()}),t.fn.parallax=function(o,r,i){function s(){var i=n.scrollTop();l.each(function(){var n=t(this),s=n.offset().top;s+c(n)<i||s>i+a||!l.data("sppbparallax")||l.css("backgroundPosition",o+" "+Math.round((e-i)*r)+"px")})}var c,e,l=t(this);l.data("sppbparallax",!0),l.css("backgroundAttachment","fixed"),l.each(function(){e=l.offset().top}),c=i?function(t){return t.outerHeight(!0)}:function(t){return t.height()},(arguments.length<1||null===o)&&(o="50%"),(arguments.length<2||null===r)&&(r=.15),(arguments.length<3||null===i)&&(i=!0),n.bind("scroll",s).resize(s),s()},t.fn.parallaxDestroy=function(n,a){var o=t(this);o.data("sppbparallax")&&(n?o.css("backgroundPosition",n):o.css("backgroundPosition","0% 0%"),a?o.css("backgroundAttachment",a):o.css("backgroundAttachment","inherit"),o.data("sppbparallax",!1))}}(jQuery);