1/* 2 this prevents dom flickering for elements hidden with js, needs to be outside of dom.ready event.also adds several extra classes for better browser support 3 this is a separate file that needs to be loaded at the top of the page. other js functions are loaded before the closing body tag to make the site render faster 4*/ 5"use strict" 6 7var avia_is_mobile = false; 8if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement) 9{ 10 avia_is_mobile = true; 11 document.documentElement.className += ' avia_mobile '; 12} 13else 14{ 15 document.documentElement.className += ' avia_desktop '; 16} 17document.documentElement.className += ' js_active '; 18 19(function(){ 20 //set transform property 21 var prefix = ['-webkit-','-moz-', '-ms-', ""], transform = ""; 22 for (var i in prefix) 23 { 24 // http://artsy.github.io/blog/2012/10/18/so-you-want-to-do-a-css3-3d-transform/ 25 if(prefix[i]+'transform' in document.documentElement.style) 26 { document.documentElement.className += " avia_transform "; transform = prefix[i]+'transform'} 27 if(prefix[i]+'perspective' in document.documentElement.style) document.documentElement.className += " avia_transform3d "; 28 } 29 30 //set parallax position to prevent jump at pageload 31 if(typeof document.getElementsByClassName == 'function' && typeof document.documentElement.getBoundingClientRect == "function" && avia_is_mobile == false) 32 { 33 if(transform && window.innerHeight > 0) 34 { 35 setTimeout(function(){ 36 var y = 0, offsets = {}, transY = 0, parallax = document.getElementsByClassName("av-parallax"), 37 winTop = window.pageYOffset || document.documentElement.scrollTop; 38 39 for (y = 0; y < parallax.length; y++) { 40 parallax[y].style.top = "0px"; 41 offsets = parallax[y].getBoundingClientRect(); 42 transY = Math.ceil( (window.innerHeight + winTop - offsets.top) * 0.3 ); 43 parallax[y].style[transform] = "translate(0px, "+transY+"px)"; 44 parallax[y].style.top = "auto"; 45 parallax[y].className += ' enabled-parallax '; 46 } 47 }, 50); 48 } 49 } 50})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.