trAvis - MANAGER
Edit File: siteorigin-legacy-parallax.min.js
/** * @copyright Greg Priday - <https://siteorigin.com/> * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html */ !function(a){a.fn.siteOriginParallax=function(i){var o=a(this);if("refreshParallax"===i)return o.trigger("refreshParallax");null===(i=a.extend({backgroundUrl:null,backgroundSize:null,backgroundAspectRatio:null,backgroundSizing:"scaled",limitMotion:"auto"},i)).backgroundAspectRatio&&(i.backgroundAspectRatio=i.backgroundSize[0]/i.backgroundSize[1]);var n=function(){if("undefined"!=typeof parallaxStyles&¶llaxStyles["parallax-mobile"]&&window.matchMedia("(max-width: "+parallaxStyles["mobile-breakpoint"]+")").matches)o.css("background-position","50% 50%");else try{var n,t=[o.outerWidth(),o.outerHeight()],r=o[0].getBoundingClientRect(),e=a(window).outerHeight();void 0===o.data("siteorigin-parallax-init")&&o.css({"background-image":"url("+i.backgroundUrl+")"}),n="auto"===i.limitMotion?e<720?.55:e>1300?.45:-17e-5*(e-720)+.55:parseFloat(i.limitMotion);var l=((r.bottom+(r.top-e))/(e+r.height)-1)/-2,s=0,c=1,u=i.backgroundSize;if("scaled"===i.backgroundSizing){var g=t[1]/(n||1),d=t[0]/u[0];if(g>u[1]*d&&(d=g/u[1],n=!1),o.css("background-size",u[0]*d+"px "+u[1]*d+"px"),r.top>-t[1]&&r.bottom-e<t[1]){var b=u[1]*d;n&&b>e*n&&(l=l*(c=e*n/b)+(1-c)/2),s=-(b-t[1])*l}o.css("background-position","50% "+s+"px")}else"original"===i.backgroundSizing&&(n&&u[1]>e*n&&(l=l*(c=e*n/u[1])+(1-c)/2),s=-(u[1]-t[1])*l,o.css("background-size","auto"),o.css("background-position","50% "+s+"px"))}catch(a){console.log(a.message),o.css({"background-size":"scaled"===i.backgroundSizing?"cover":"auto","background-position":"50% 50%"})}};n(),a(window).on("scroll",n),a(window).on("resize",n),a(window).on("panelsStretchRows",n),o.on("refreshParallax",n),setTimeout((function(){n()}),100)}}(jQuery),jQuery((function(a){a("[data-siteorigin-parallax]").each((function(){a(this).siteOriginParallax(a(this).data("siteorigin-parallax"))}))}));