Edit File: themify.parallaxit.min.js
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,d,f){a!=Array.prototype&&a!=Object.prototype&&(a[d]=f.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return $jscomp.SYMBOL_PREFIX+(a||"")+$jscomp.symbolCounter_++}; $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var d=0;return $jscomp.iteratorPrototype(function(){return d<a.length?{done:!1,value:a[d++]}:{done:!0}})}; $jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.iteratorFromArray=function(a,d){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var f=0,e={next:function(){if(f<a.length){var g=f++;return{value:d(g,a[g]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}; $jscomp.polyfill=function(a,d,f,e){if(d){f=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var g=a[e];g in f||(f[g]={});f=f[g]}a=a[a.length-1];e=f[a];d=d(e);d!=e&&null!=d&&$jscomp.defineProperty(f,a,{configurable:!0,writable:!0,value:d})}};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6-impl","es3"); (function(a,d){"function"===typeof define&&define.amd?define([],d):"object"===typeof module&&module.exports?module.exports=d():a.Rellax=d()})(this,function(){var a={};return Rellax=function(d,f){var e=Object.create(Rellax.prototype),g=0,k=0,t=!1,h=!0,n,u,y=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(b){setTimeout(b,1E3/60)},p=window.transformProp||function(){var b=document.createElement("div"); if(null===b.style.transform){var a=["Webkit","Moz","ms"],c;for(c in a)if(void 0!==b.style[a[c]+"Transform"])return a[c]+"Transform"}return"transform"}(),q=function(a,e,c){return a<=e?e:a>=c?c:a};e.options={speed:-2,center:!1,round:!0};f&&Object.keys(f).forEach(function(a){e.options[a]=f[a]});e.options.speed=q(e.options.speed,-10,10);var l=Array.prototype.slice.call(d).filter(function(a){return a.offsetParent}),z=function(a){var b=a.dataset.rellaxPercentage,c=a.dataset.parallaxElementSpeed,d=a.dataset.parallaxElementReverse? !0:!1,f=b||e.options.center?window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop:0,m=a.offsetTop+jQuery(a.offsetParent).offset().top,g=a.offsetHeight||a.clientHeight||a.scrollHeight,f=b?b:(f-m+k)/(g+k);e.options.center&&(f=.5);var h=c?q(c,-10,10):e.options.speed;if(b||e.options.center)h=q(c||e.options.speed,-5,5);return{base:v(f,{data:{speed:h},el:a}),top:m,height:g,reverse:d,speed:h,fade:a.dataset.parallaxFade?!0:!1,style:a.style.cssText}},w=function(){if(!h)return!0;var a= g;g=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;return a!==g},v=function(a,d){var b=d.el.dataset.currentPos||0,b=b-.08*(b-(0-d.data.speed/10*a));return e.options.round?Math.round(10*b)/10:b},x=function(){!1===t&&w()&&r();n=y(x)},r=function(b){g=window.pageYOffset;k=window.innerHeight;for(var e in a){b=a[e];var c=b;var d=v(c.data.reverse?c.data.top+c.data.height-g-k:g+k-(c.data.top+c.data.height),c);c.data.reverse&&(d= Math.max(d,-(k-c.data.height)),d=Math.min(d,k/4));c=d;d="translate3d(0,"+c+"px,0)";b.el.dataset.currentPos=c;if(b.data.fade){var f=b.el.getBoundingClientRect(),m=f.bottom-.15*k;b.el.style.opacity=0<=f.bottom&&m<=b.data.height?m/b.data.height:0<f.top?1:""}b.data.runningAnimation&&"absolute"!==b.el.style.position?(b.el.style.position="relative",b.el.style.top=c+"px",b.el.style[p]=""):(b.el.style.top&&(b.el.style.position=b.el.style.top=""),b.el.style[p]=d)}};Rellax.destroy=function(b){function d(b, d){var c=b.el;c.style.cssText=b.data.style;c.removeAttribute("data-parallax-element-speed");c.removeAttribute("data-parallax-fade");c.removeAttribute("data-parallax-element-reverse");c.removeAttribute("data-current-pos");c.removeAttribute("data-rellax-index");delete c.dataset.rellaxIndex;delete c.dataset.currentPos;delete c.dataset.parallaxFade;delete c.dataset.parallaxElementSpeed;delete c.dataset.parallaxElementReverse;c.style.opacity=c.style[p]="";delete a[d]}if(b&&void 0!==a[b])d(a[b],b);else for(var c in a)d(a[c], c);0===Object.keys(a).length&&(t=!0,jQuery(window).off("tfsmartresize.tb_parallax"));n&&cancelAnimationFrame(n)};Rellax.disableCheckPosition=function(){h=!1};Rellax.enableCheckPosition=function(){h=!0};(function(){k=window.innerHeight;w();for(var b=0,d=l.length;b<d;++b){var c=void 0!==l[b].dataset.rellaxIndex?l[b].dataset.rellaxIndex:Object.keys(a).length;l[b].dataset.rellaxIndex=c;a[c]={};a[c].el=l[b];a[c].data=z(l[b])}jQuery(window).off("tfsmartresize.tb_parallax").on("tfsmartresize.tb_parallax", r);window.addEventListener("scroll",function(){h&&(h=!1);clearTimeout(u);u=setTimeout(function(){h=!0},2E3)},{passive:!0,capture:!0});for(b in a)a[b].el.addEventListener("animationstart",function(a){this.data.runningAnimation=!0}.bind(a[b]),{passive:!0}),a[b].el.addEventListener("animationend",function(){this.data.runningAnimation=!1}.bind(a[b]),{passive:!0});x();r()})();return e}});
Back to File Manager