1(function() { 2 3 $html = $('html'); 4 5 $body = $('body'); 6 7 // 8 // FONT SIZE 9 // 10 var fontSet = ''; 11 12 var $fontSize = $('.font-slct'); 13 14 try{ fontSet = localStorage.getItem('Select_Font_Size');}catch(e){}; 15 16 if(fontSet=='L'){ 17 18 $html.addClass('html-font-large'); 19 20 $fontSize.addClass('slct-large'); 21 22 } 23 24 $('.font-normal').on('click',function(){ 25 26 $html.removeClass('html-font-large'); 27 28 $fontSize.removeClass('slct-large'); 29 30 try{ localStorage.setItem('Select_Font_Size','N');}catch(e){}; 31 32 }); 33 34 $('.font-large').on('click',function(){ 35 36 $html.addClass('html-font-large'); 37 38 $fontSize.addClass('slct-large'); 39 40 try{ localStorage.setItem('Select_Font_Size','L');}catch(e){}; 41 42 }); 43 44 45 // 46 // HEADER TITLE 47 // 48 $('#title-head h1 .en, #title-head h1>span:only-child:not(.en)').each(function(){ 49 50 var $target = $(this); 51 52 var title_br_num = $(this).find('br').length; 53 54 var original_title = $target.html(); 55 56 var $page_title = ''; 57 58 $.each( $target.text().split('') , function(i,v){ 59 60 $page_title = $page_title + ((v==' ')?' ':'<em style="transition-delay:'+ i*0.03 +'s">'+ v + '</em>'); 61 62 }); 63 64 $target.html($page_title); 65 66 if( title_br_num ){ 67 68 var re = /<br>/g; 69 70 var result; 71 72 var br_count = 0; 73 74 while (result = re.exec(original_title)) { 75 76 var space_num = (original_title.slice(0, result.index).match(/ /g) || []).length; 77 78 $target.find('em').eq( result.index - space_num - br_count*4 ).before('<br>') 79 80 br_count++; 81 82 } 83 84 } 85 86 }); 87 88 89 $html.on('transitionend.init',function(){ 90 91 $html.off('transitionend.init'); 92 93 $('#title-head h1').addClass('trans-head-1'); 94 95 setTimeout(function(){ 96 97 $('#title-head h1 .en em:last').on('transitionend',function(){ 98 99 $('#title-head h1').addClass('trans-head-3'); 100 101 }); 102 103 $('#title-head h1').addClass('trans-head-2'); 104 105 },100); 106 107 }); 108 109 110 // 111 // HEADER CONTROL 112 // 113 if(location.pathname.indexOf('/ir/news/')<0 && location.pathname.indexOf('/library/')<0 && location.pathname.indexOf('/notice/')<0 && location.pathname.indexOf('/financial-data')<0){ 114 115 $('#user-lang a, #user-lang2 a').attr('href',location.href.replace('/jp/','/en/')); 116 117 } 118 119 var abc_responsive_point = ($('#logo').css('font-size')||''); 120 121 $(window).on('load scroll resize',function(event){ 122 123 if(event.type=='load'){ 124 125 $html.addClass('html-visible'); 126 127 if(location.hash){ 128 129 if($(location.hash).length>0){ 130 131 $('html,body').animate({ scrollTop: $(location.hash).offset().top - $('#cookie').height() - $('#head').height() - 30 },500,'swing'); 132 133 } 134 } 135 136 abc_responsive_point = $('#logo').css('font-size'); 137 } 138 139 if(event.type=='resize'){ 140 141 var current_point = $('#logo').css('font-size'); 142 143 if(current_point=='20px' && abc_responsive_point=='10px'){ // mo â pc 144 145 $('html.menu-open #menu-btn').trigger('click'); 146 147 }else if(current_point=='10px' && abc_responsive_point=='20px'){ // pc â mo 148 149// $('#gnav a.act').trigger('click'); 150 151 } 152 153 abc_responsive_point = current_point; 154 155 }else{ 156 157 if($(this).scrollTop()>=70){ 158 159 $('#logo').css('padding-top',0); 160 161 $('#wrapper').addClass('wrapper-up'); 162 163 }else{ 164 165 if(!$('body').hasClass('body-mask')){ 166 167 $('#logo').css('padding-top', $(this).scrollTop() - $(this).scrollTop()*0.64286 + 30); 168 } 169 170 $('#wrapper').removeClass('wrapper-up'); 171 172 } 173 174 } 175 }); 176 177 178 // 179 // PC GLOBAL NAVIGATION 180 // 181 $('.lnk-gume3 > a').prepend('<svg width="18" height="18" viewBox="0 0 18 18"><polyline points="5 1 13 9.01 5 17"/></svg>'); 182 183 $('.lnk-arr3 a').prepend('<svg width="12" height="12" viewBox="0 0 12 12"><polyline points="0 5.5 10.93 5.5 8.45 2.5"/></svg>'); 184 185 186 $('.gnav>a, .irnav>a, .companynav>a').each(function(){ 187 188 $(this).on({ 189 190 'mouseenter': function(){ $(this).addClass('hov');}, 191 192 'mouseleave': function(){ $(this).removeClass('hov');} 193 194 });
195 196 }); 197 198 var ir = ($('body').hasClass('_ir')) ? true : false; 199 var company = ($('body').hasClass('_company')) ? true : false; 200 201 var touchFlag = false; 202 203 $('#gnav .drop').each(function(index){ 204 205 var navTimer; 206 207 $(this).on('mouseenter',function(){ 208 209 var $traget = $(this); 210 211 navTimer = setTimeout(function(){ 212 $traget.children('.gnav-drop').addClass('gnav-open').prev('a').addClass('act'); 213 }, 100); 214 215 }).on('mouseleave',function(){ 216 217 clearTimeout(navTimer); 218 $(this).children('.gnav-drop').removeClass('gnav-open').prev('a').removeClass('act'); 219 220 }); 221 222 $(this).children('a').one('touchstart',function(){ 223 touchFlag = true; 224 }).on('touchstart',function(){ 225 226 if( $(this).next('.gnav-drop').hasClass('gnav-open') ){ 227 $(this).removeClass('act hov').next('.gnav-drop').removeClass('gnav-open'); 228 }else{ 229 $(this).addClass('act').next('.gnav-drop').addClass('gnav-open'); 230 } 231 232 }).on('click',function(){ 233 $(this).removeClass('hov'); 234 if(touchFlag) return false; 235 }); 236 237 }); 238 239 240 $('.ir_gnav-drop, .company_gnav-drop').on('transitionend',function(){ 241 242 if( $(this).hasClass('gnav-open') ){ 243 244 $(this).addClass('opend'); 245 246 }else{ 247 248 $(this).removeClass('opend'); 249 250 } 251 252 }); 253 254 255 $('.drop-ctg').on('click',function(e){ 256 257 e.stopPropagation(); 258 259 }); 260 261 262 263 // 264 // SP TOGGLE NAVIGATION 265 // 266 $('#menu-btn').on('click', function(){ 267 268 $html.toggleClass('menu-open'); 269 270 if($html.hasClass('menu-open')){ 271 272 $body.addClass('body-mask'); 273 274 $html.removeClass('search-open'); 275 276 bodyFixation(); 277 278 }else{ 279 280 $('#menu').scrollTop(0) 281 .find('.submenu-open').removeClass('submenu-open').next('ul').slideUp(0); 282 283 bodyRelease(); 284 285 } 286 287 return false; 288 289 }); 290 291 292 $('#menu-gnav>li').each(function(index){ 293 294 $(this).children('ul').prev('a').addClass('trigger').on('click',function(){ 295 296 $(this).toggleClass('submenu-open').next('ul').slideToggle(400) 297 .parent('li').siblings('li').children('ul').slideUp(400).prev('a').removeClass('submenu-open'); 298 299 if($(this).hasClass('submenu-open')){ 300 301 $('#menu').animate({ scrollTop:(index*56) },400,'swing'); 302 303 }else{ 304 305 $('#menu').animate({ scrollTop:0 },400,'swing',function(){ 306 307 $('#menu-gnav>li:not(.lnk-gume3)>ul .trigger').removeClass('submenu-open').next('ul').slideUp(0); 308 309 }); 310 311 } 312 313 return false; 314 315 }); 316 317 }); 318 319 320 $('#menu-gnav>li:not(.lnk-gume3)').each(function(){ 321 322 $(this).children('ul').find('ul').prev('a').addClass('trigger').on('click',function(){ 323 324 $(this).toggleClass('submenu-open').next('ul').slideToggle(400) 325 .parent('li').siblings('li').children('ul').slideUp(400).prev('a').removeClass('submenu-open'); 326 327 return false; 328 329 }); 330 331 }); 332 333 334 // 335 // DROP % MENU OPEN BODY 336 // 337 var currentscroll = $(window).scrollTop(); 338 339 function bodyFixation(){ 340 341 if($('#wrapper').hasClass('wrapper-up')){ 342 343 $('#wrapper').addClass('wrapper-updrop'); 344 345 } 346 347 currentscroll = $(window).scrollTop(); 348 349 $body.addClass('body-fixed').css('top',-currentscroll); 350 351 } 352 353 function bodyRelease(){ 354 355 if($('#wrapper').hasClass('wrapper-updrop')){ 356 357 $('#wrapper').removeClass('wrapper-updrop').addClass('wrapper-up'); 358 359 } 360 361 $body.removeClass('body-fixed body-mask').css('top',0); 362 363 $(window).scrollTop(currentscroll); 364 365 } 366 367 368 369 // 370 // SMOOTH SCROLL 371 // 372 $('a.scroll').on('click', function(){ 373 374 var href = $(this).attr('href'); 375 376 $('html,body').animate({ scrollTop:(href=='#')?0:( $(href).offset().top - 85 ) },500,'swing'); 377 378 return false; 379 380 }); 381 382 $('a.svg-anchor-btn').on('click', function(e){ 383 var href = $(this).attr('href') || $(this).attr('xlink:href') || $(this)[0].href.baseVal; 384 385 if ($(window).width() < 768) { 386 $('html,body').animate({ scrollTop:(href=='#')?0:( $(href).offset().top - 85 ) },500,'swing'); 387 } else { 388 $('html,body').animate({ scrollTop:(href=='#')?0:( $(href).offset().top - 165 ) },500,'swing'); 389 } 390 391 return false; 392 }); 393 394 395 // 396 // SCROLL EFFECT 397 // 398 $(window).on('load.effect resize.effect scroll.effect',function(){ 399 400 var $ready = $('.scroll-wait:not(.scroll-in)'); 401 402 if($ready.length == 0){ 403 404 $(window).off('load.effect resize.effect scroll.effect'); 405 406 return false; 407 408 } 409 410 $ready.each(function(index){ 411 412 var ef_position = ($(this).data('sc')/100 || .85); 413 414 if( $(window).scrollTop() + $(window).height()*ef_position > $(this).offset().top ){ 415 416 var $target = $(this).addClass('scroll-in'); 417 418 } 419 420 });
421 422 }); 423 424 425 // 426 // FINANCIAL TAB LINK 427 // 428 429 $('.financial-link').on('click',function(){ 430 431 if(!window.sessionStorage) return; 432 433 try{ sessionStorage.setItem('financial-link', $(this).attr('href').split('#')[1] ); }catch(e){} 434 435 location.href = $(this).attr('href').split('#')[0]; 436 437 return false; 438 }); 439 440 441 // 442 // PRINT 443 // 444 $('#user-prn a').on('click',function(){ 445 446 window.print(); 447 448 return false; 449 450 }); 451 452 453 // 454 // SEARCH BOX 455 // 456 $(window).on('load',function(){ 457 458 $('#sch-btn').on('click', function(){ 459 460 $('#gnav a.act, html.menu-open #menu-btn').trigger('click'); 461 462 $html.addClass('sch-box-open'); 463 464 $body.addClass('body-mask'); 465 466 $('#search-box').fadeIn().find('[type="search"]').val(''); 467 468 bodyFixation(); 469 470 return false; 471 472 }); 473 474 $('#search-box, #search-box .x-close').on('click', function(){ 475 476 $('#search-box').fadeOut(); 477 478 $html.removeClass('sch-box-open'); 479 480 bodyRelease(); 481 482 return false; 483 484 }); 485 486 $('#search-box .sch-box > div').on('click', function(e){ 487 488 e.stopPropagation(); 489 490 }); 491 492 $('.mt-site-search-form__button').text('').append('<svg width="25" height="25" viewBox="0 0 25 25"><path d="M5.64,4.79A7.11,7.11,0,1,1,5.3,14.84a7.11,7.11,0,0,1,.34-10M3.7,2.71a10,10,0,1,0,14.13.56l-.07-.08A10,10,0,0,0,3.7,2.71ZM17.29,17.25l5.83,6.24-5.83-6.23h0m-1-1a1.44,1.44,0,0,0-.07,2l5.83,6.23a1.42,1.42,0,1,0,2.08-1.94L18.3,16.31a1.43,1.43,0,0,0-2-.06Z"/></svg>') 493 494 .siblings('.mt-site-search-form__query').attr('title',''); 495 496 $('.sch-refin').each(function(){ 497 498 var $check_id = $(this); 499 500 var $hold_id = $(this).prev('.mt-site-search-container').children('.mt-site-search'); 501 502 var init_id = $hold_id.data('blog-ids'); 503 504 $check_id.find('input').on('change', function(){ 505 506 var blog_id = ''; 507 508 $check_id.find('input:checked').each(function(){ 509 510 blog_id += ',' + $(this).val(); 511 512 }); 513 514 var set_blog_id = (blog_id == '') ? init_id : blog_id.slice(1); 515 516 $hold_id[0].dataset.blogIds = set_blog_id; 517 518 }); 519 520 }); 521 522 }); 523 524 525 // 526 // MODAL 527 // 528 var modal_current = 0; 529 530 $('.modal-trigger').each(function(index){ 531 532 $(this).on('click', function(){ 533 534 modal_current = index; 535 536 $('#gnav a.act, html.menu-open #menu-btn, .sch-box-open #sch-btn').trigger('click'); 537 538 $html.addClass('html-modal-open'); 539 540 $body.addClass('body-mask'); 541 542 $('#modal-5').children('.modal-cont').eq(index).addClass('current').end().eq(index-1).addClass('previous') 543 .end().end().not(':has(.previous)').children('.modal-cont:last-child').addClass('previous'); 544 545 $('#modal-0').fadeIn(); 546 547 if( $('#modal-0').hasClass('fit-high') ){ 548 549 $('#modal-3').innerHeight( $(window).height() - $('#modal-close').innerHeight() - (($('#modal-prev').css('order')>0)?160:60) ); 550 551 }else{ 552 553 $('#modal-3').css('height','auto'); 554 555 var mh = $('#modal-3').innerHeight(); 556 557 var wh = $(window).height() - $('#modal-close').innerHeight() - 60; 558 559 if( $('#modal-3').innerHeight() > wh ){ 560 561 $('#modal-3').innerHeight(wh); 562 563 }else if(userAgentIE){ 564 565 $('#modal-3').innerHeight(mh); // IE 566 567 } 568 569 } 570 571 if( $('#modal-0').height() - $(window).height() > 0 ){ 572 573 var upper = $(window).height() - $('#modal-0').height(); 574 575 $('#modal-2').css('margin-top', upper + 'px') 576 577 } 578 579 bodyFixation(); 580 581 return false; 582 583 }); 584 585 }); 586 587 $('#modal-0, #modal-0 .x-close').on('click', function(){ 588 589 $('#modal-0').fadeOut(function(){ 590 591 $(this).find('.modal-cont').removeClass('current previous'); 592 593 $('#modal-3').removeAttr('style'); 594 595 $('#modal-5').removeAttr('class'); 596 597 }); 598 599 $html.removeClass('html-modal-open'); 600 601 bodyRelease(); 602 603 return false; 604 605 }); 606 607 $('#modal-2 > div').on('click', function(e){ 608 609 e.stopPropagation(); 610 611 }); 612
613 $('.slider #modal-prev').on('click', function(){ 614 615 $('#modal-5').removeAttr('class').addClass('modal-prev'); 616 617 }); 618 619 $('.slider #modal-next').on('click', function(){ 620 621 $('#modal-5').removeAttr('class').addClass('modal-next'); 622 623 }); 624 625 $('.slider .modal-cont').on('transitionend', function(e){ 626 627 e.stopPropagation(); 628 629 }); 630 631 $('.slider #modal-5').on('transitionend',function(){ 632 633 $(this).filter('.modal-next').children('.current').removeClass('current').next('.modal-cont').addClass('current') 634 .end().end().not(':has(.current)').children('.modal-cont:eq(0)').addClass('current'); 635 636 $(this).filter('.modal-prev').children('.current').removeClass('current').prev('.modal-cont').addClass('current') 637 .end().end().not(':has(.current)').children('.modal-cont:last-child').addClass('current'); 638 639 $(this).children('.previous').removeClass('previous') 640 .end().children('.current').prev('.modal-cont').addClass('previous') 641 .end().end().not(':has(.previous)').children('.modal-cont:last-child').addClass('previous'); 642 643 $(this).removeClass('modal-next modal-prev'); 644 645 }); 646 647 var modal_sliderX = 0; 648 649 $('.slider #modal-5').on('touchstart.slider',function(evt){ 650 651 modal_sliderX = evt.changedTouches[0].pageX; 652 653 }); 654 655 $('.slider #modal-5').on('touchend.slider',function(evt){ 656 657 if( modal_sliderX - evt.changedTouches[0].pageX > 30 ){ 658 659 $('.slider #modal-next').trigger('click'); 660 661 }else if( modal_sliderX - evt.changedTouches[0].pageX < -30 ){ 662 663 $('.slider #modal-prev').trigger('click'); 664 665 } 666 667 }); 668 669 670})(); 671 672 673// IE 11 674var userAgentIE = (window.navigator.userAgent.toLowerCase().indexOf('trident/7')>0)?true:false; 675 676 677// PICTURE SOURCE 678if(userAgentIE){ 679 680 $('picture.one-break').each(function(){ 681 682 var $img = $(this).children('img'); 683 684 var img_src = $img.attr('src'); 685 686 var sp_max = $(this).children('source').attr('media').match(/\d{3,4}/)[0]; 687 688 var srcset = $(this).children('source').attr('srcset'); 689 690 $(window).on('load resize',function(){ 691 692 if( window.innerWidth <= sp_max ){ 693 694 $img.attr('src', srcset ); 695 696 }else{ 697 698 $img.attr('src', img_src ); 699 700 } 701 702 }); 703 704 }); 705 706}
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.