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} 17 18document.documentElement.className += ' js_active '; 19 20(function() 21{ 22 //set transform property 23 var prefix = [ '-webkit-', '-moz-', '-ms-', '' ], 24 transform = '', 25 transform2d = false, 26 transform3d = false; 27 28 for( var i in prefix ) 29 { 30 // http://artsy.github.io/blog/2012/10/18/so-you-want-to-do-a-css3-3d-transform/ 31 if( prefix[i] + 'transform' in document.documentElement.style ) 32 { 33 transform2d = true; 34 transform = prefix[i] + 'transform'; 35 } 36 37 if( prefix[i] + 'perspective' in document.documentElement.style ) 38 { 39 transform3d = true; 40 } 41 } 42 43 if( transform2d ) 44 { 45 document.documentElement.className += ' avia_transform '; 46 } 47 48 if( transform3d ) 49 { 50 document.documentElement.className += ' avia_transform3d '; 51 } 52 53 //set parallax position to prevent jump at pageload 54 if( typeof document.getElementsByClassName == 'function' && typeof document.documentElement.getBoundingClientRect == "function" && avia_is_mobile == false ) 55 { 56 if( transform && window.innerHeight > 0 ) 57 { 58 setTimeout( function() 59 { 60 var y = 0, 61 offsets = {}, 62 transY = 0, 63 parallax = document.getElementsByClassName( "av-parallax" ), 64 winTop = window.pageYOffset || document.documentElement.scrollTop; 65 66 for( y = 0; y < parallax.length; y++ ) 67 { 68 parallax[y].style.top = "0px"; 69 offsets = parallax[y].getBoundingClientRect(); 70 transY = Math.ceil( (window.innerHeight + winTop - offsets.top) * 0.3 ); 71 parallax[y].style[transform] = "translate(0px, " + transY + "px)"; 72 parallax[y].style.top = "auto"; 73 parallax[y].className += ' enabled-parallax '; 74 } 75 }, 50); 76 } 77 } 78})();
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.