1$(document).ready(function(){ 2 3 $("#g-recaptcha-response").attr('aria-hidden', 'true'); 4 5// for pageinfo 6 var W = $( window ).width(); 7 var H = $( window ).height(); 8 $("#p1").text(W+' x '+H); 9 10 // on resizing 11 $( window ).resize(function() { 12 var W = $( window ).width(); 13 var H = $( window ).height(); 14 $("#p1").text(W+' x '+H); 15 close_dd(); 16 close_FRC(); 17 close_mobi_menu(); 18 if(W <= 767) 19 { 20 $('.menubar').removeClass('stuck'); 21 $('body').css('padding-top', '0'); 22 } 23 }); 24 25// adjust height to tallest element 26 function get_tallest(cname, setname){ 27 var tallest = 0; 28 $(cname).each(function() { 29 var tcH = $(this ).height(); 30 if(tcH > tallest) 31 tallest = tcH; 32 }); 33 $(setname).css('height', tallest+'px'); 34 } 35 36 37// tabbing fields 38 $("input").keyup(function () { 39 if (this.value.length == this.maxLength) { 40 $(this).next('input').focus(); 41 } 42 }); 43 44// close things 45 $( 'html' ).click(function() { 46 close_dd(); 47 close_hb(); 48 close_search(); 49 close_FRC(); 50 close_mobi_menu(); 51 }); 52 53// toggle aria-expanded 54 function toggle_expanded(obj) { 55 var exp = $(obj).attr("aria-expanded"); 56 if(exp === 'false') 57 $(obj).attr("aria-expanded", 'true'); 58 else 59 $(obj).attr("aria-expanded", 'false'); 60 } 61 62// smarter banner 63 $("#exappbanner").click(function(){ 64 $(".smarterbanner").slideUp("fast"); 65 }); 66 67 68// search 69 $('#sitesearch').click(function(s){ 70 s.stopPropagation(s); 71 $(".sitesearch").animate({width: 'toggle'}, 'slow'); 72// $(".sitesearch").slideToggle("slow"); 73 $(this).toggleClass("down"); 74 toggle_expanded(this); 75 close_hb(); 76 close_dd(); 77 close_FRC(); 78 close_mobi_menu(); 79 }); 80 81 $('#searchex').click(function(s){ 82 $(".sitesearch").animate({width: 'toggle'}, 'slow'); 83 toggle_expanded(this); 84 }); 85 86 87 function close_search(){ 88 $(".sitesearch").slideUp("fast"); 89 $('#sitesearch').attr("aria-expanded", 'false'); 90 $('#sitesearch').removeClass("down"); 91 } 92 93 $( '.sitesearch' ).click(function(s) { 94 s.stopPropagation(); 95 }); 96 97// hb 98 $( '#hbbttn' ).click(function(v) { 99 v.stopPropagation(); 100 $(".hb").toggleClass("dipped"); 101 $(".hbshadow").toggleClass("shadowed"); 102 $("a.homelink").toggleClass("moved"); 103 toggle_expanded(this); 104 $(this).toggleClass("down"); 105 $(".hb iframe").slideToggle("slow"); 106 close_search(); 107 close_dd(); 108 close_FRC(); 109 close_mobi_menu(); 110 }); 111 112 $( '#hbex' ).click(function(v) { 113 close_hb(); 114 }); 115 116 function close_hb(){ 117 $(".hb").removeClass("dipped"); 118 $(".hbshadow").removeClass("shadowed"); 119 $('#hbbttn').attr("aria-expanded", 'false'); 120 $('#hbbttn').removeClass("down"); 121 $("a.homelink").removeClass("moved"); 122 $(".hb iframe").slideUp("fast"); 123 } 124 125 $( '.hb' ).click(function(e) { 126 e.stopPropagation(); 127 }); 128 129// accordions 130 $('button.divheader').click(function(){ 131 var dc = $(this).attr("div"); 132 var headH = $('header.stuck').height(); 133 //var dc = $(this).attr("div"); 134 //var jump = $('#DH'+dc ); 135 //var howhigh = $(jump).offset(); 136 //var new_position = howhigh.top - parseInt(headH) - 20; // for fixed headers 137 //$('html, body').stop().animate({ scrollTop: new_position }, 500); 138 $('.divheader').each(function() { 139 var DC = $(this).attr("div"); 140 if(DC != dc) 141 { 142 $( this ).removeClass( "open" ); 143 $('#DC'+DC).slideUp("slow"); 144 } 145 }); 146 $( this ).toggleClass( "open" ); 147 $('#DC'+dc).slideToggle("slow"); 148 }); 149 150 151// menu 152 function get_left(obj) { 153 var W = $( window ).width(); 154 var childPos = $(obj).offset(); 155 var parentPos = $(obj).parent().offset(); 156 var childLeft = childPos.left - parentPos.left; 157 return childLeft; 158 } 159 160 function get_R(obj) { 161 var W = $( window ).width(); 162 var bttnW = $( obj ).width(); 163 var childPos = $(obj).offset(); 164 var parentPos = $(obj).parent().offset(); 165 var childR = childPos.left - parentPos.left - (460 - bttnW); 166 return childR; 167 } 168 169 $( '.CMitem' ).click(function(event) { 170 var which = $(this).attr("rel"); 171 close_hb(); 172 close_search(); 173 close_FRC();
174 Mpos = get_left(this); 175 event.stopPropagation(); 176 if($( this ).hasClass( "opened" ) ) 177 { 178 $(this).removeClass( "opened" ); 179 $("#CMc"+which).slideUp("fast"); 180 $(this).attr("aria-expanded", 'false'); 181 } 182 else 183 { 184 close_dd(); 185 $("#CMc"+which).slideDown("slow"); 186 if(which < 6) 187 $("#CMc"+which).css("left", Mpos+'px'); 188 else 189 $("#CMc"+which).css("right", 0); 190 $( this ).toggleClass( "opened" ); 191 $(this).attr("aria-expanded", 'true'); 192 } 193 }); 194 195 function close_dd(){ 196 $(".ddcontent").slideUp("fast"); 197 $('.opened').removeClass( "opened" ); 198 $(".CMsub").slideUp('fast'); 199 $('.CMitem' ).attr("aria-expanded", 'false'); 200 $('button.CMlink').attr("aria-expanded", 'false'); 201 } 202 203 $( '.ddcontent' ).click(function(event) { 204 event.stopPropagation(); 205 }); 206 207/* for 3rd level */ 208 $( 'button.CMlink' ).click(function(event) { 209 event.stopPropagation(); 210 toggle_expanded(this); 211 var which = $(this).attr("which"); 212 $("#CMs"+which).slideToggle('slow'); 213 $("button#CMb"+which).toggleClass( "opened" ); 214 }); 215 216// FRC menu 217 $( '#FRCmenu' ).click(function(frc) { 218 frc.stopPropagation(); 219 toggle_expanded(this); 220 $(".FRCmenu").toggleClass("out"); 221 $( "#FRCmenu span").toggleClass("out"); 222 }); 223 224 $( '.FRCmenu' ).click(function(frc) { 225 frc.stopPropagation(); 226 }); 227 228 function close_FRC(){ 229 $(".FRCmenu").removeClass("out"); 230 $( "#FRCmenu span").removeClass("out"); 231 $('#FRCmenu').attr("aria-expanded", 'false'); 232 } 233 234// mobi menu 235 236 $( '.menutoggler' ).click(function(m) { 237 m.stopPropagation(); 238 $("nav.mobile").toggleClass("out"); 239 toggle_expanded(this); 240 close_hb(); 241 close_search(); 242 }); 243 244 $( 'nav.mobile' ).click(function(m) { 245 m.stopPropagation(); 246 }); 247 248 $( '.menutoggler2' ).click(function(m) { 249 m.stopPropagation(); 250 close_mobi_menu(); 251 }); 252 253 function close_mobi_menu(){ 254 $("nav.mobile").removeClass("out"); 255 $('.menutoggler').attr("aria-expanded", 'false'); 256 } 257 258 $( 'nav.mobile button' ).click(function() { 259 var which = $(this).attr("which"); 260 $("#MM"+which).slideToggle("slow"); 261 $(this).toggleClass("flipped"); 262 toggle_expanded(this); 263 }); 264 265 266// stickiness 267 $(window).scroll(function(){ 268 var Htop = 0; 269 if($('.alertholder').length > 0) 270 Htop += $('.alertholder').height(); 271 if($('.smarterbanner').length > 0) 272 Htop += $('.smarterbanner').height(); 273 var headH = $('header').height(); 274 var wintop = $(window).scrollTop(); 275 var W = $( window ).width(); 276 277// if(W > 767) 278// { 279 if(wintop > Htop) 280 { 281 $('header').addClass('stuck'); 282 $('body').css('padding-top', headH+'px'); 283 } 284 else 285 { 286 $('header').removeClass('stuck'); 287 $('body').css('padding-top', '0'); 288 } 289// } 290 291 }); 292 293// languages 294 $("#T1").click(function(qlevent){ 295 qlevent.stopPropagation(); 296 $(".weglot-container").slideToggle("slow"); 297 $(this).toggleClass("spun"); 298 close_search(); 299 close_dd(); 300 close_FRC(); 301 close_mobi_menu(); 302 close_hb(); 303 }); 304 305 306 function close_weg(){ 307 $(".weglot-container").slideUp("fast"); 308 $('button.WLbttn').removeClass("spun"); 309 } 310 311 312// this is the end, my only friend, the end 313}); 314 315
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.