/*! * Name : Just Another Parallax [Jarallax] * Version : 1.7.0 * Author : _nK https://nkdev.info * GitHub : https://github.com/nk-o/jarallax */ !function(a){"use strict";function l(){j=a.innerWidth||document.documentElement.clientWidth,k=a.innerHeight||document.documentElement.clientHeight}function o(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent("on"+b,function(){c.call(a)})}function p(b){a.requestAnimationFrame(function(){"scroll"!==b.type&&l();for(var a=0,c=m.length;a0&&"none"!==c}(),c=navigator.userAgent.toLowerCase().indexOf("android")>-1,d=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!a.MSStream,e=!!a.opera,f=/Edge\/\d+/.test(navigator.userAgent),g=/Trident.*rv[ :]*11\./.test(navigator.userAgent),h=!!Function("/*@cc_on return document.documentMode===10@*/")(),i=document.all&&!a.atob;l();var m=[],n=function(){function b(b,i){var k,j=this;if(j.$item=b,j.defaults={type:"scroll",speed:.5,imgSrc:null,imgWidth:null,imgHeight:null,enableTransform:!0,elementInViewport:null,zIndex:-100,noAndroid:!1,noIos:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null},k=JSON.parse(j.$item.getAttribute("data-jarallax")||"{}"),j.options=j.extend({},j.defaults,k,i),!(c&&j.options.noAndroid||d&&j.options.noIos)){j.options.speed=Math.min(2,Math.max(-1,parseFloat(j.options.speed)));var l=j.options.elementInViewport;l&&"object"==typeof l&&void 0!==l.length&&(l=l[0]),!l instanceof Element&&(l=null),j.options.elementInViewport=l,j.instanceID=a++,j.image={src:j.options.imgSrc||null,$container:null,$item:null,width:j.options.imgWidth||null,height:j.options.imgHeight||null,useImgTag:d||c||e||g||h||f},j.initImg()&&j.init()}}var a=0;return b}();n.prototype.css=function(b,c){if("string"==typeof c)return a.getComputedStyle?a.getComputedStyle(b).getPropertyValue(c):b.style[c];c.transform&&(c.WebkitTransform=c.MozTransform=c.transform);for(var d in c)b.style[d]=c[d];return b},n.prototype.extend=function(a){a=a||{};for(var b=1;b1)&&(l=i*Math.max(e,k)/2),i<0||i>1?n=Math.max(e,k)+2*Math.abs(l):n+=Math.abs(k-e)*(1-i)),m=n*g/h,m=0&&h.right>=0&&h.top<=k&&h.left<=j,a||c.isElementInViewport){var l=Math.max(0,e),m=Math.max(0,f+e),n=Math.max(0,-e),o=Math.max(0,e+f-k),p=Math.max(0,f-(e+f-k)),q=Math.max(0,-e+k-f),r=1-2*(k-e)/(k+f),s=1;if(f