1$(function(){ 2 setTimeout(function(){ document.body.classList.add('render') }, 60); 3 imagesLoaded(document.body, function(){ document.body.classList.remove('loading') }); 4 5 // util 6 var menu_open = 0; 7 var page = $('body').attr("id"); 8 var headerHeight = 70; 9 10 var device = 'pc'; 11 var wsize = 'pc'; 12 var md = new MobileDetect(window.navigator.userAgent); 13 if (md.tablet()) { 14 device = 'tablet'; 15 }else if (md.mobile()) { 16 device = 'mobile'; 17 } 18 19 var check_wsize = function(){ 20 if ( window.innerWidth <= 768 ){ 21 wsize = 'mobile'; 22 }else{ 23 wsize = 'pc'; 24 } 25 }; 26 check_wsize(); 27 28 $(window).on('resize', function() { 29 check_wsize(); 30 }); 31 32 /* function 33 ----------------------------------------*/ 34 // header 35 var header_adjust = function(){ 36 if ( $(this).scrollTop() > 60){ 37 $('#header').addClass('view-active'); 38 $('.header-logo').addClass('down'); 39 }else{ 40 $('#header').removeClass('view-active'); 41 $('.header-logo').removeClass('down'); 42 } 43 } 44 45 // scroll top button 46 var scroll_btn_adjust = function(){ 47 if ( $(this).scrollTop() > 60){ 48 $('.btn-top').addClass('active'); 49 }else{ 50 $('.btn-top').removeClass('active'); 51 } 52 } 53 54 55 // URLã®ããã·ã¥å¤ãåå¾ 56 var urlHash = location.hash; 57 if(urlHash) { 58 $('body,html').stop().scrollTop(0); 59 setTimeout(function () { 60 scrollToAnker(urlHash); 61 }, 100); 62 } 63 64 // é常ã®ã¯ãªãã¯æ 65 $('a[href^="#"]').on('click', function() { 66 console.log('normal_hash_link'); 67 var href= $(this).attr("href"); 68 var hash = href == "#" || href == "" ? 'html' : href; 69 $('body,html').stop().scrollTop(0); 70 scrollToAnker(hash); 71 if(menu_open){ 72 $('.menu-trigger').toggleClass('active'); 73 $('.drawer-menu').toggleClass('active'); 74 } 75 return false; 76 }); 77 78 var scrollToAnker = function(hash) { 79 var target = $(hash); 80 var position = target.offset().top; 81 var adjust_height = 140; 82 if ( wsize == 'mobile' ){ 83 adjust_height = 100; 84 } 85 $('body,html').stop().animate({scrollTop:position - adjust_height}, 500); 86 } 87 88 // initialize function 89 var init = function(){ 90// top_hero_visual_adjust(); 91 scroll_btn_adjust(); 92 if ( device == 'pc' || device == 'tablet' ){ 93 header_adjust(); 94 } 95 } 96 97 if( $('#carousel').length ){ 98 $('#carousel').slick({ 99 slidesToShow: 3, 100 slidesToScroll: 3, 101 102 responsive: [ 103 { 104 breakpoint: 768, 105 settings: { 106 slidesToShow: 2, 107 slidesToScroll: 2, 108 infinite: true 109 } 110 } 111 ] 112 }); 113 } 114 115 if( $('.gallery').length ){ 116 $('.gallery').slick({ 117 slidesToShow: 1, 118 slidesToScroll: 1, 119 120 responsive: [ 121 { 122 breakpoint: 768, 123 settings: { 124 slidesToShow: 1, 125 slidesToScroll: 1, 126 infinite: true 127 } 128 } 129 ] 130 }); 131 } 132 133 // acordion 134 if( $('.career-list-item-toggle').length ){ 135 $(".career-list-item-toggle").on("click", function(event) { 136 if ($(this).children(".accordion_icon").hasClass('active')) { 137 $(this).children(".accordion_icon").removeClass('active'); 138 $(this).parent().next().removeClass('active'); 139 $(this).parents('.career-list-item').removeClass('active'); 140 }else { 141 $(this).children(".accordion_icon").addClass('active'); 142 $(this).parent().next().addClass('active'); 143 $(this).parents('.career-list-item').addClass('active'); 144 } 145 $(this).parent().next().slideToggle(); 146 }); 147 } 148 149 /* action 150 ----------------------------------------*/ 151 // on load 152 $(window).on('load', function() { 153 init(); 154 objectFitImages(); 155 }); 156 157 // scroll action 158 $(window).scroll(function() { 159 scroll_btn_adjust(); 160 if ( device == 'pc' || device == 'tablet' ){ 161 header_adjust(); 162 } 163 }); 164 165 // to top 166 $('.btn-top').on('click', function(e){
167 e.preventDefault(); 168 $('html,body').animate({scrollTop: 0}, 300); 169 }); 170 171 // click menu trigger 172 $('.menu-trigger').on('click', function(){ 173 $(this).toggleClass('active'); 174 $('.drawer-menu').toggleClass('active'); 175 176 $(window).on('touchmove', function(event) { 177 event.preventDefault(); 178 }); 179 if ( $('.drawer-menu').is('.active') ){ 180 menu_open = 1; 181 // $('html, body').css('overflow', 'hidden'); 182 }else{ 183 menu_open = 0; 184 // $('html').removeAttr('style'); 185 // $('body').removeAttr('style'); 186 // $(".nav-parent").removeClass('active'); 187 // $(".nav-child").slideUp(); 188 } 189 }); 190 $(".nav-parent").on("click", function() { 191 $(this).toggleClass('active'); 192 $(".nav-child").slideUp(); 193 if ($(this).next().is(':hidden')) { $(this).next().slideDown(); } 194 }); 195 $("#nav-parent").on("click", function() { 196 $(this).toggleClass('active'); 197 $("#nav-child").slideUp(); 198 if ($(this).next().is(':hidden')) { $(this).next().slideDown(); } 199 }); 200 201 /* animation 202 ----------------------------------------*/ 203 if ( $('.js-h2-title').length ){ 204 $('.js-h2-title').css({ opacity: 0}); 205 $('.js-h2-title').one('inview', function(event, isInView) { 206 if (isInView){ 207 h2_title_anim($(this)); 208 } 209 }); 210 } 211 212 // common h2 title animation object 213 var h2_title_anim = function(inview_el){ 214 $el = inview_el; 215 $el.css({ opacity: 0 }); 216 var tl_h2_title = new TimelineMax(); 217 var $container = $el; 218 var $en_title = $el.find('.en'); 219 var $ja_title = $el.find('.ja'); 220 var mySplitText = new SplitText($en_title, {type: 'chars'}); 221 var chars = mySplitText.chars; 222 223 tl_h2_title 224 .set($container, { transformOrigin: 'left top', x: -30, rotationZ: 40, autoAlpha: 0 }) 225 .set($ja_title, { x: 20, autoAlpha: 0 }) 226 .to($container, 0.3, { x: 0, rotationZ: 0, autoAlpha: 1 }) 227 .staggerFrom(chars, 0.3, {opacity:0, y:10, ease: Power4.easeInOut}, 0.03) 228 .to($ja_title, 0.3, { x: 0, autoAlpha: 1 }, '-=0.1'); 229 } 230 231 // top main visual 232 if ( $('.js-top-recruit').length ){ 233 var tl_top_recruit = new TimelineMax(); 234 $('.js-top-recruit').one('inview', function(event, isInView) { 235 var $container = $('.recruit-nav-content'); 236 var $container_image = $('.recruit-nav-image'); 237 $container_image.append('<div class="rect"></div>'); 238 var $container_image_obj = $container_image.find('img'); 239 var $container_image_rect = $container_image.find('.rect'); 240 var $container_h2_title = $container.find('.js-h2-title'); 241 var $container_btn = $container.find('.js-btn'); 242 243 if (isInView) { 244 tl_top_recruit 245 .set($container, { transformOrigin: 'right top', scaleX: 0 }) 246 .set($container_image_rect, { transformOrigin: 'left top' }) 247 .set($container_image_obj, { autoAlpha: 0 }) 248 .to($container, 0.3, { scaleX: 1 }) 249 .to($container_image_rect, 0.3, { scaleX: 1 }) 250 .to($container_image_obj, 0, { autoAlpha: 1 }) 251 .to($container_image_rect, 0.3, { transformOrigin: 'right top', scaleX: 0, ease: Power4.easeInOut }); 252 } 253 }); 254 } 255 256 // top service list 257 if ( $('.js-top-service-list-anim').length ){ 258 var tl_top_service_list = new TimelineMax(); 259 var $service_container = $('.js-top-service-list-anim'); 260 var $service_container_list = $service_container.find('.services-content'); 261 tl_top_service_list.from($service_container_list, 0.3, { autoAlpha: 0, y: 100, ease: Power2.easeInOut }); 262 tl_top_service_list.pause(); 263 264 $('.js-top-service-list-anim').one('inview', function(event, isInView) { 265 if (isInView) { 266 var $container_h2_title = $service_container.find('.js-h2-title'); 267 h2_title_anim($container_h2_title); 268 tl_top_service_list.play(); 269 } 270 }); 271 } 272 273 // top news list 274 if ( $('.js-top-news-list-anim').length ){ 275 $('.js-top-news-list-anim').one('inview', function(event, isInView) { 276 var tl_top_news_list = new TimelineMax(); 277 var $container = $('.js-top-news-list-anim'); 278 var $news_title_wrapper = $container.find('.news-title-wrapper'); 279 var $news_content = $container.find('.news-content'); 280 var $news_list = $container.find('.news-list'); 281 282 tl_top_news_list 283 .set($news_title_wrapper, { transformOrigin: 'left top', scaleX: 0 }) 284 .set($news_content, { transformOrigin: 'right top', scaleX: 0 }) 285 .set($news_list, { opacity: 0, y: 10 }) 286 .to($news_title_wrapper, 0.4, { scaleX: 1, ease: Power2.easeInOut }) 287 .to($news_content, 0.4, { scaleX: 1, ease: Power2.easeInOut }) 288 .to($news_list, 0.4, { opacity: 1, y: 0, ease: Power2.easeInOut }); 289 tl_top_news_list.pause(); 290 291 if (isInView) { 292 var $container_h2_title = $container.find('.js-h2-title'); 293 h2_title_anim($container_h2_title); 294 tl_top_news_list.play(); 295 } 296 });
297 } 298 299 // top company 300 if ( $('.js-top-company-anim').length ){ 301 $('.js-top-company-anim').one('inview', function(event, isInView) { 302 var tl_top_company = new TimelineMax(); 303 var $container = $('.js-top-company-anim'); 304 var $company_title_wrapper = $container.find('.company-title-wrapper'); 305 var $company_content = $container.find('.company-content'); 306 var $company_nav = $container.find('.company-nav'); 307 var $container_h2_title = $container.find('.js-h2-title'); 308 309 tl_top_company 310 .set($company_title_wrapper, { transformOrigin: 'left top', opacity: 0, y: 50 }) 311 .set($company_content, { transformOrigin: 'right top', scaleX: 0 }) 312 .set($company_nav, { opacity: 0, y: 10 }); 313 314 if (isInView) { 315 tl_top_company 316 .to($company_content, 0.4, { scaleX: 1, ease: Power2.easeInOut, onComplete: function(){ h2_title_anim($container_h2_title); } }) 317 .to($company_title_wrapper, 0.8, { opacity: 1, y:0, ease: Power2.easeOut }) 318 .to($company_nav, 0.4, { opacity: 1, y: 0, ease: Power2.easeInOut }); 319 } 320 }); 321 } 322 323 // title rectangle animation 324 if ( $('.js-rect-anim').length ){ 325 var tl_rect_anim = new TimelineMax(); 326 $('.js-rect-anim').one('inview', function(event, isInView) { 327 if (isInView) { 328 var $child_el = $(this).children('div'); 329 $child_el.each(function(index, el){ 330 $(el).append('<div class="rect"></div>'); 331 }); 332 var $target_rect = $(this).find('.rect'); 333 var $target_text = $(this).find('.text'); 334 335 tl_rect_anim 336 .staggerTo($target_rect, 0.4, { transformOrigin: 'left top', scaleX: 1, ease: Power4.easeInOut }, 0.2) 337 .staggerTo($target_text, 0, { opacity: 1, ease: Power4.easeInOut }, '-=0.2') 338 .staggerTo($target_rect, 0.4, { transformOrigin: 'right top', scaleX: 0, ease: Power4.easeInOut }, 0.2); 339 } 340 }); 341 } 342 343 // content slidein animation 344 var slidein_anim = function($el){ 345 var tl = new TimelineMax(); 346 tl.to( $el, 0.5, { opacity: 1, y: 0, ease: Power2.easeOut }); 347 } 348 if ( $('.js-content-slidein').length ){ 349 $('.js-content-slidein').one('inview', function(event, isInView) { 350 if(isInView){ 351 slidein_anim($(this)); 352 } 353 }); 354 } 355 356 // company philosophy 357 if ( $('.philosophy').length ){ 358 var philosophy_anim = (function(){ 359 $('.philosophy').one('inview', function(event, isInView) { 360 if(isInView){ 361 $('.philosophy-inner').addClass('active'); 362 } 363 }); 364 }()); 365 } 366 367 // company benefits 368 if ( $('.benefits').length ){ 369 var pop_anim = (function(){ 370 var tl = new TimelineMax(); 371 var $el = $('.benefits-card'); 372 var $el_item = $el.find('li'); 373 tl.staggerFrom( $el_item, 0.5, { autoAlpha: 0, scale: 1.3, ease: Power4.easeInOut }, 0.2).pause(); 374 375 $('.benefits-card').one('inview', function(event, isInView) { 376 if(isInView){ 377 tl.play(); 378 } 379 }); 380 }()); 381 } 382 383 // multiline animation 384 if( $('.js-textline').length ){ 385 var textline_anim = (function(){ 386 var tl = new TimelineMax(); 387 var $el = $('.js-textline'); 388 var mySplitText = new SplitText($el, {type: 'lines'}); 389 var lines = mySplitText.lines; 390 tl.staggerFrom(lines, 0.5, {opacity:0, y:20, ease: Power2.easeOut }, 0.5).pause(); 391 392 $el.one('inview', function(event, isInView) { 393 if (isInView) { 394 tl.play(); 395 } 396 }); 397 }()); 398 } 399 400 401 402 if ( $('.js-btn-about').length ){ 403 var about_btn_anim = (function(){ 404 var tl_btn = new TimelineMax(); 405 var $el = $('.js-btn-about'); 406 var $container_btn = $el.find('.btn-rounded-square'); 407 tl_btn 408 .set($container_btn, { autoAlpha: 0, scale: 0 }) 409 .to($container_btn, 0.5, { autoAlpha: 1, scale: 1, ease: Back.easeInOut.config(1.7), delay: 0.4 }) 410 .pause(); 411 $('.js-btn-about').one('inview', function(event, isInView) { 412 if (isInView) { 413 tl_btn.play(); 414 } 415 }); 416 }()); 417 } 418 419 if ($('.js-bounce-anim').length){ 420 var bounce_anim = (function(){ 421 var tl = new TimelineMax(); 422 var $el = $('.js-bounce-anim'); 423 tl 424 .set($el, { scale: 0 }) 425 .to($el, 0.5, { scale: 1, ease: Bounce.easeOut }) 426 .pause(); 427 428 $el.one('inview', function(event, isInView) { 429 if (isInView) { 430 tl.play(); 431 } 432 }); 433 }()); 434 } 435 436 // company about acroll 437 // $("[id^='sectionBtn']").each(function(index, element){ 438 // console.log('element: ' + element); 439 // $(this).on('click', function(){ 440 441 // console.log('this: ' + $(this)); 442 // console.log('index: ' + index); 443 444 // var offset = 120; 445 // if( wsize == 'mobile' ){ 446 // offset = 120; 447 // } 448 // TweenMax.to( window, 1, { scrollTo: { y: "#section"+ ( index + 1 ), offsetY: 120 }}); 449 // }) 450 // }) 451 452 // common footer recruit 453 if ( $('#footer-recruit').length ){ 454 var footer_recruit = (function(){ 455 var tl = new TimelineMax(); 456 var $el = $('#footer-recruit'); 457 var $recruit_nav_content = $el.find('.recruit-nav-content'); 458 var $recruit_nav_image = $el.find('.recruit-nav-image'); 459 $recruit_nav_image_img = $recruit_nav_image.find('img'); 460 461 var $container_h2_title = $el.find('.js-h2-title'); 462 463 tl 464 .set($recruit_nav_content, { transformOrigin: 'left top', scaleY: 0 }) 465 .set($recruit_nav_image_img, { autoAlpha: 0 }) 466 .to($recruit_nav_content, 0.4, { scaleY: 1 }) 467 //.to($recruit_nav_content, 0.4, { scaleY: 1, onComplete: function(){ h2_title_anim($container_h2_title); } }) 468 .to($recruit_nav_image_img, 0.4, { autoAlpha: 1 }) 469 .pause(); 470 471 $('#footer-recruit').one('inview', function(event, isInView) { 472 if (isInView) { 473 tl.play(); 474 } 475 }); 476 }()); 477 } 478 479 // common footer interview 480 if ( $('#footer-interview').length ){ 481 var footer_interview = (function(){ 482 var tl = new TimelineMax(); 483 var $el = $('#footer-interview'); 484 var $interview_image = $el.find('.interview-image'); 485 $interview_image.append('<div class="rect"></div>'); 486 $interview_image_rect = $interview_image.find('.rect'); 487 $interview_image_img = $interview_image.find('img'); 488 489 var $container_h2_title = $el.find('.js-h2-title'); 490 491 tl 492 .set($interview_image_rect, { transformOrigin: 'left bottom', scaleX: 1, scaleY: 0, backgroundColor: '#ddd'}) 493 .set($interview_image_img, { autoAlpha: 0 }) 494 // .to($interview_image_rect, 0.4, { scaleY: 1, onComplete: function(){ h2_title_anim($container_h2_title); }}) 495 .to($interview_image_rect, 0.4, { scaleY: 1 }) 496 .to($interview_image_img, 0.2, { autoAlpha: 1 }) 497 .to($interview_image_rect, 0.2, { transformOrigin: 'left top', scaleY: 0, delay: 0.2 }) 498 .pause(); 499 500 $('#footer-interview').one('inview', function(event, isInView) { 501 if (isInView) { 502 tl.play(); 503 } 504 }); 505 }()); 506 } 507 508 // common subpage main title 509 if ( $('.js-page-service-title').length){ 510 var page_service_title = (function(){ 511 var tl = new TimelineMax(); 512 var $el = $('.js-page-service-title'); 513 var $en_title = $el.find('.en'); 514 var mySplitText = new SplitText($en_title, {type: 'chars'}); 515 var chars = mySplitText.chars; 516 517 var $desc = $el.find('.hero-desc-text'); 518 var $desc_text = $desc.find('span'); 519 520 tl 521 .set($desc, { scaleX: 0 }) 522 .set($desc_text, { opacity: 0 }) 523 .staggerFrom(chars, 0.3, { autoAlpha: 0, y: 10, ease: Power4.easeInOut }, 0.03) 524 .to($desc, 0.4, { scaleX: 1 }) 525 .to($desc_text, 0.4, { opacity: 1 }); 526 tl.pause(); 527 528 $('.js-page-service-title').one('inview', function(event, isInView) { 529 if (isInView) { 530 tl.play(); 531 } 532 }); 533 })(); 534 } 535 536 // text animation 537 if ( $('.js-chars-anim').length ){ 538 var chars_anim = (function(){ 539 var tl = new TimelineMax(); 540 var $chars_anim = $('.js-chars-anim'); 541 var mySplitText = new SplitText($chars_anim, {type: 'words, chars'}); 542 var chars = mySplitText.chars; 543 tl 544 .staggerFrom(chars, 0.5, {opacity:0, y:20, ease: Power4.easeInOut}, 0.02) 545 .stop(); 546 $('.js-chars-anim').one('inview', function(event, isInView) { 547 if (isInView) { 548 tl.play(); 549 } 550 }); 551 }()); 552 } 553 554 // countup 555 if ( $('.js-countup').length ){ 556 $('.js-countup').one('inview', function(event, isInView) { 557 if(isInView){ 558 var countElm = $(this), 559 countSpeed = 10; 560 countElm.each(function(){ 561 var self = $(this), 562 countMax = self.attr('data-num'), 563 thisCount = self.text(), 564 few = '', 565 countTimer; 566 567 if(countMax.match(/^-?[0-9]+\.[0-9]+$/)){ 568 few = String(countMax).split(".")[1]; 569 countMax = String(countMax).split(".")[0]; 570 timer(few); 571 }else{ 572 timer(few); 573 } 574 575 function timer(few){ 576 countTimer = setInterval(function(){ 577 var countNext = thisCount++; 578 self.text(countNext); 579 if(countNext == countMax){ 580 clearInterval(countTimer); 581 if (few != ""){ 582 countNext = countNext + "." +few; 583 self.text(countNext); 584 } 585 } 586 },countSpeed); 587 } 588 }); 589 590 } 591 });
592 } 593 594 // common button 595 var btn_anim = function($el){ 596 var tl_btn = new TimelineMax(); 597 var $container_btn = $el.find('.btn'); 598 tl_btn 599 .set($container_btn, { autoAlpha: 0, scale: 0 }) 600 .to($container_btn, 0.5, { autoAlpha: 1, scale: 1, ease: Back.easeInOut.config(1.7) }); 601 }; 602 if ( $('.js-btn').length ){ 603 $('.js-btn').one('inview', function(event, isInView) { 604 if (isInView) { 605 btn_anim($(this)); 606 } 607 }); 608 } 609 610 611 if ( wsize != 'mobile' || device == 'pc' ){ 612 var header_hover_active = 0; 613 $('.g-nav a:not(".nav-child a")').hover( 614 function(){ 615 $('.g-nav a').removeClass('active'); 616 $(this).addClass('active'); 617 $('#header').addClass('hover-active'); 618 header_hover_active = 1; 619 }, 620 function(){ 621 } 622 ); 623 624 $('#header').hover( 625 function(){}, 626 function(){ 627 if ( header_hover_active > 0 ){ 628 $('.g-nav a').removeClass('active'); 629 $('#header').removeClass('hover-active'); 630 header_hover_active = 0; 631 } 632 } 633 ); 634 635 // common button hover 636 $('.btn').hover(function(){ 637 var tl_btn_hover = new TimelineMax(); 638 var splitText = new SplitText($(this), {type: 'chars'}); 639 var chars = splitText.chars; 640 if (tl_btn_hover.isActive()){ 641 tl_btn_hover.restart(); 642 }else{ 643 tl_btn_hover.staggerFrom(chars, 0.5, { opacity: 0, y:10, ease: Power4.easeInOut }, 0.05); 644 } 645 },function (){}); 646 647 $('.btn-rounded-square').hover(function(){ 648 var tl_btn_hover = new TimelineMax(); 649 var splitText = new SplitText($(this), {type: 'chars'}); 650 var chars = splitText.chars; 651 if (tl_btn_hover.isActive()){ 652 tl_btn_hover.restart(); 653 }else{ 654 tl_btn_hover.staggerFrom(chars, 0.5, { opacity: 0, y:10, ease: Power4.easeInOut }, 0.05); 655 } 656 },function (){}); 657 } 658 659});
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.