1// initialize hype header 2 3var windowWidth = $(window).width(); 4 5var localeSuffix = ""; 6 7if(globalLang == "da" || globalLang == "el" || globalLang == "pt" || globalLang == "he" || globalLang == "ja" || globalLang == "hu" || globalLang == "no" || globalLang == "ru" || globalLang == "es" || globalLang == "fr" || globalLang == "nl" || globalLang == "sv" || globalLang == "de" || globalLang == "it") { 8 localeSuffix = "_" + globalLang; 9} 10 11var headerURL = '/files/scn/hype-resources/headers/beginning-services-header' + localeSuffix + '/header-mobile.hyperesources/headermobile_hype_generated_script.js?efwfvw'; 12var headerID = "headermobile_hype_container"; 13 14if(windowWidth > 768) { 15 headerID = 'header_hype_container'; 16 headerURL = '/files/scn/hype-resources/headers/beginning-services-header' + localeSuffix + '/header.hyperesources/header_hype_generated_script.js?efwfvw'; 17} 18 19var containerWidth = $('.header .container').outerWidth(); 20if(containerWidth < 1110) { 21 $("<style type='text/css'> .beginning-services--hype{ height:"+(containerWidth * 0.5)+"px !important;} </style>").appendTo("head"); 22 TweenMax.set($('.beginning-services--hype'), { scale:containerWidth/1080 }); 23} 24 25$('.beginning-services--hype').attr('id', headerID); 26$('.beginning-services--hype').html('<script type="text/javascript" charset="utf-8" src="'+headerURL+'"></script>'); 27 28$.easing['easeInCirc'] = function (p) { 29 return 1 - Math.sqrt(1 - p * p); 30}; 31 32$.easing['easeOutCirc'] = function (p) { 33 return Math.sqrt(1 - (1 - p) * (1 - p)); 34}; 35 36jQuery.fn.size = function () { 37 return this.length; 38}; 39 40function snake_move() { 41 $('.big-snake').delay(5000).animate({ 42 height: 40 43 }, 500, 'easeOutCirc', function () { 44 $('.big-snake').addClass('mature'); 45 $('.big-snake').animate({ 46 width: 568 // 654 47 }, 300, 'easeOutCirc', function () { 48 $('.big-snake').animate({ 49 height: 80 50 }, 300, 'easeOutCirc'); 51 }); 52 }); 53} 54 55setTimeout(function(){ 56 snake_move(); 57}, 4000); 58 59function hover_on_timer2(the_selector, on_function, off_function) { 60 61 $(the_selector).hover( 62 function () { 63 var $this = $(this); 64 var that = this; 65 66 if ($this.hasClass('active')) { 67 return; 68 } 69 70 if (!$this.data('timer2')) { 71 $this.data('timer2', setTimeout(function () { 72 on_function.apply(that); 73 }, 100)); 74 } 75 76 }, 77 function () { 78 var $this = $(this); 79 80 if ($this.data('timer2')) { 81 clearTimeout($this.data('timer2')); 82 $this.data('timer2', 0); 83 } 84 85 off_function.apply(this); 86 87 } 88 ); 89 90} 91 92 93// overwrite the default value of this from docker.js 94docker_pad_top = 10; 95 96$('img.bottom').css('opacity', 0).css('visibility', 'visible'); 97 98hover_on_timer2('.ruin-block', 99 function () { 100 101 var $this = $(this); 102 var $parent = $this.parents('.ruin-block-wrapper'); 103 104 $parent.children('.active').removeClass('active'); 105 $parent.find('.img-holder a').attr('href', $(this).find('a').attr('href')); 106 $this.addClass('active'); 107 108 var $img = $this.parents('.block-elem').find('img').not('.bottom').stop(true, true); 109 var $bottom_img = $this.parents('.block-elem').find('img.bottom').stop(true, true); 110 111 // if the images are flipped, flipped the vars as well 112 if ($img.css('z-index') == 4) { 113 var $temp = $img; 114 $img = $bottom_img; 115 $bottom_img = $temp; 116 } 117 118 $bottom_img.css('opacity', 0); 119 $img.css('z-index', 4); 120 $bottom_img.css('z-index', 5); 121 $bottom_img.attr('srcset', $this.attr('data-imgset')); 122 $bottom_img.animate({ opacity: 1 }, 300); 123 124 $parent.find('.snake').stop(true, false).animate({ 125 height: $parent.find('.ruin-block.active').position().top + 18 126 }, 100, 'easeOutCirc', function () { 127 $parent.find('.snake-head').addClass('popping').animate({ 128 width: 50 129 }, 150, 'easeOutCirc', function () { 130 $parent.removeClass('initial'); 131 $parent.addClass('super-active'); 132 }); 133 }); 134 135 }, 136 function () { 137 } 138); 139 140$('.ruin-block-wrapper').hover( 141 function () { 142 var $this = $(this); 143 if (!$this.data('timer')) { 144 $this.data('timer', setTimeout(function () { 145 146 $('.ruin-block-wrapper.active').removeClass('active'); 147 $this.addClass('active'); 148 149 $this.find('.snake').stop(true, false).animate({ 150 height: $this.find('.ruin-block.active').position().top + 18 151 }, 150, 'easeOutCirc', function () { 152 $this.find('.snake-head').addClass('popping').animate({ 153 width: 50 154 }, 150, 'easeOutCirc', function () { 155 $this.removeClass('initial'); 156 $this.addClass('super-active'); 157 }); 158 }); 159 $this.find('.back-to-top').stop(true, true).fadeIn(); 160 161 }, 300)); 162 } 163 }, 164 function () { 165 166 var $this = $(this); 167 if ($this.data('timer')) { 168 clearTimeout($this.data('timer')); 169 $this.data('timer', 0); 170 } 171 172 $this.removeClass('super-active'); 173 $this.find('.snake-head').stop(true, true).animate({ 174 width: ($this.hasClass('initial') ? 17 : 3) 175 }, 150, 'easeInCirc', function () { 176 $(this).removeClass('popping'); 177 $this.find('.snake').animate({ 178 height: 0 179 }, 150, 'easeOutCirc', function () { 180 $this.removeClass('active'); 181 }); 182 183 }); 184 185 $this.find('.back-to-top').stop(true, true).fadeOut(); 186 } 187); 188 189$('.back-to-top').click(function (e) { 190 $('html,body').stop(true, false).animate({ scrollTop: 0 }, 500, 'easeOutCirc'); 191 e.preventDefault(); 192}); 193 194$('.docker-link').click(function (e) { 195 var href = $(this).attr('href'), 196 to = $(href).offset().top; 197 $('html,body').stop(true, false).animate({ scrollTop: to }, 500, 'easeOutCirc'); 198 e.preventDefault(); 199});
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.