/*! * name : just another parallax [jarallax] * version : 1.7.2 * author : _nk https://nkdev.info * github : https://github.com/nk-o/jarallax */ !function(e){"use strict";function t(){i=e.innerwidth||document.documentelement.clientwidth,a=e.innerheight||document.documentelement.clientheight}function n(e,t,n){e.addeventlistener?e.addeventlistener(t,n):e.attachevent("on"+t,function(){n.call(e)})}function o(n){e.requestanimationframe(function(){"scroll"!==n.type&&t();for(var e=0,o=g.length;e0&&"none"!==t}(),l=navigator.useragent.tolowercase().indexof("android")>-1,s=/ipad|iphone|ipod/.test(navigator.useragent)&&!e.msstream,m=!!e.opera,c=/edge\/\d+/.test(navigator.useragent),p=/trident.*rv[ :]*11\./.test(navigator.useragent),u=!!function("/*@cc_on return document.documentmode===10@*/")(),d=document.all&&!e.atob;t();var g=[],f=function(){function e(e,n){var o,i=this;if(i.$item=e,i.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},o=json.parse(i.$item.getattribute("data-jarallax")||"{}"),i.options=i.extend({},i.defaults,o,n),!(l&&i.options.noandroid||s&&i.options.noios)){i.options.speed=math.min(2,math.max(-1,parsefloat(i.options.speed)));var a=i.options.elementinviewport;a&&"object"==typeof a&&"undefined"!=typeof a.length&&(a=a[0]),!a instanceof element&&(a=null),i.options.elementinviewport=a,i.instanceid=t++,i.image={src:i.options.imgsrc||null,$container:null,$item:null,width:i.options.imgwidth||null,height:i.options.imgheight||null,useimgtag:s||l||m||p||u||c},i.initimg()&&i.init()}}var t=0;return e}();f.prototype.css=function(t,n){if("string"==typeof n)return e.getcomputedstyle?e.getcomputedstyle(t).getpropertyvalue(n):t.style[n];n.transform&&(n.webkittransform=n.moztransform=n.transform);for(var o in n)t.style[o]=n[o];return t},f.prototype.extend=function(e){e=e||{};for(var t=1;t1)&&(p=m*math.max(o,a)/2),m<0||m>1?d=math.max(o,a)+2*math.abs(p):d+=math.abs(a-o)*(1-m)),u=d*l/s,u=0&&m.right>=0&&m.top<=a&&m.left<=i,e||t.iselementinviewport){var c=math.max(0,o),p=math.max(0,l+o),u=math.max(0,-o),g=math.max(0,o+l-a),f=math.max(0,l-(o+l-a)),h=math.max(0,-o+a-l),y=1-2*(a-o)/(a+l),v=1;if(l