PageSourceSearch

https://www.smauto.co.jp/assets/js/script.js

js smauto.co.jp collected 2026-10-02 17:33:54 UTC 26,935 bytes, 1,043 lines download raw bytes

1/*============================
2class='tel'の箇所はスマホ環境で
3電話リンクを含んだaタグが追加される
4============================*/
5if (navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/)) {
6  $('.tel').each(function() {
7    var str = $(this).html();
8    if ($(this).children().is('img')) {
9      $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>')); //画像のALTがtel:に挿入される
10    } else {
11      $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>'));
12    }
13  });
14}
15
16
17/*============================
18スムーズスクロール
19ページ内リンク(#から始まるリンク)に対して発動
20============================*/
21$('a[href^="#"]').not('.-modal').on('click', function() {
22  var speed = 500;
23  var href = $(this).attr('href');
24  var target = $(href == '#' || href == '' ? 'html' : href);
25  var position = target.offset().top;
26
27  if (window.matchMedia('(min-width: 768px)').matches) {
28    var position = position - 148;
29  }
30
31  if (window.matchMedia('(max-width: 767px)').matches) {
32    var position = position - 117;
33  }
34
35  $('html, body').animate({
36    scrollTop: position
37  }, speed, 'swing');
38  return false;
39});
40
41/*============================
42アクセスされた時に「#」がついていた時のスムーズスクロール
43============================*/
44if(location.hash) {
45  if(location.hash.indexOf('#/') === -1) {
46    $target = $(location.hash);
47    if($target.length) {
48      var speed = 500;
49      var position = $target.offset().top;
50
51      if (window.matchMedia('(min-width: 768px)').matches) {
52        var position = position - 148;
53      }
54
55      if (window.matchMedia('(max-width: 767px)').matches) {
56        var position = position - 117;
57      }
58
59      $('html, body').animate({
60        scrollTop: position
61      }, speed, 'swing');
62    }
63  }
64}
65
66
67/*============================
68アニメーション
69
70■data-trigger='single'
71<p class='exsample__single -fadeup' data-trigger='single'></p>
72
73■data-trigger='group'
74<ul class='exsample__group' data-trigger='group'>
75<li class='exsample__item -fadeup-1'></li>
76<li class='exsample__item -fadeup-2'></li>
77<li class='exsample__item -fadeup-3'></li>
78</ul>
79============================*/
80document.addEventListener('DOMContentLoaded', function() {
81  var singles = document.querySelectorAll('[data-trigger="single"]');
82  var singlesArray = Array.prototype.slice.call(singles, 0);
83  var groups = document.querySelectorAll('[data-trigger="group"]');
84  var groupsArray = Array.prototype.slice.call(groups, 0);
85  var options = {
86    root: null,
87    rootMargin: '0px 50%',
88    threshold: 0,
89  };
90
91  var observerS = new IntersectionObserver(doWhenIntersectS, options);
92  var observerG = new IntersectionObserver(doWhenIntersectG, options);
93
94  singlesArray.forEach(function (single) {
95    observerS.observe(single);
96  });
97
98  groupsArray.forEach(function (group) {
99    observerG.observe(group);
100  });
101
102  function doWhenIntersectS(entries) {
103    var entriesArray = Array.prototype.slice.call(entries, 0);
104
105    entriesArray.forEach(function (entry) {
106      if (entry.isIntersecting) {
107        entry.target.classList.add('-is-animated');
108      }
109    });
110  }
111
112  function doWhenIntersectG(entries) {
113    var entriesArray = Array.prototype.slice.call(entries, 0);
114
115    entriesArray.forEach(function (entry) {
116    var children = entry.target.children;
117
118    if (entry.isIntersecting) {
119    Array.prototype.slice.call(children, 0).forEach(function (child) {
120    child.classList.add('-is-animated');
121    });
122    }
123    });
124  }
125
126  $.setLinkInfo();
127});
128
129$(window).on('load', function() {
130  $('[data-trigger="single"]').each(function() {
131    var elemPos = $(this).offset().top;
132    var scroll = $(window).scrollTop();
133    var windowHeight = $(window).height();
134    if (scroll > elemPos - windowHeight + 65) {
135      $(this).addClass('-is-animated');
136    }
137  });
138
139  $('[data-trigger="group"]').each(function() {
140    var elemPos = $(this).offset().top;
141    var scroll = $(window).scrollTop();
142    var windowHeight = $(window).height();
143    if (scroll > elemPos - windowHeight + 65) {
144      $(this).children().addClass('-is-animated');
145    }
146  });
147});
148
149
150/*============================
151同意チェックボックスと送信ボタンの連動
152============================*/
153function change() {
154  var element;
155
156  if(document.getElementById('privacy').checked) {
157    element = document.getElementById('submit');
158    element.disabled = false;
159    element.classList.remove('btn--disabled');
160  } else {
161    element = document.getElementById('submit');
162    element.disabled = true;
163    element.classList.add('btn--disabled');
164  }
165}
166
167
168/*============================
169決済画面ローディングアニメーション
170============================*/
171$('#settlement').on('click', function() {
172  $('#loading').show();
173});
174
175
176/*============================
177マウスオーバーで画像が拡大
178============================*/
179$('.megamenu__thumbnailimg').parents('.megamenu__thumbnaillink').hover(function() {
180  $(this).find('.megamenu__thumbnailimg').addClass('scale');
181}, function() {
182  $(this).find('.megamenu__thumbnailimg').removeClass('scale');
183});
184
185
186/*============================
187Global Navigation
188============================*/
189var globalnav = $('#globalnav');
190var globalnavLink = $('.globalnav__link');
191var megamenu = $('.megamenu');
192var globalnavLinkText = $('.globalnav__linktext');
193var globalnavBtn = $('.globalnav__btn');
194var toggleArea = $('#globalnav, body, .header, .globalnav__contact, .globalnav__email');
195var globalnavContact = $('.globalnav__contact');
196var submenu = $('.submenu');
197var header = $('.header');
198var logo = $('.logo');
199var menuIsOpen = false;
200
201// submenu.clone().insertAfter('.globalnav__list');
202
203// pc mega menu
204var globalnavItem = $('.globalnav__item');
205
206function is_pc() {
207  return window.matchMedia('(min-width: 768px)').matches;
208}
209
210globalnavItem.hover(function() {
211  if(is_pc()) {
212    $(this).find(megamenu).stop().fadeIn();
213    $(this).find(megamenu).addClass('active');
214
215    if($(this).find(megamenu).length) {
216      header.addClass('active');
217      $(this).find(globalnavLink).addClass('active');
218    }
219  }
220}, function() {
221  if(is_pc()) {
222    $(this).find(megamenu).stop().fadeOut('fast');
223    $(this).find(megamenu).removeClass('active');
224
225    if($(this).find(megamenu).length) {
226      header.removeClass('active');
227      $(this).find(globalnavLink).removeClass('active');
228    }
229  }
230});
231
232$(window).on('load scroll', function() {
233  var scroll = $(window).scrollTop();
234  var windowHeight = $(window).innerHeight();
235  var opacity = Math.min(scroll / (windowHeight / 8), 1);
236  // if($('.slider_video').length) {
237  //   opacity = 0.9;
238  // }
239
240  if (scroll >= 100) {
241    header.css('background-color', 'rgba(255, 255, 255, 1)');
242  } else {
243    header.css('background-color', `rgba(255, 255, 255, ${opacity})`);
244  }
245  if(is_pc()) {
246  }else{
247
248    if (scroll >= 100) {
249    } else {
250      if (megamenu.hasClass('active')) {
251        header.addClass('active');
252      } else {
253        header.removeClass('active');
254      }
255    }
256  }
257});
258
259globalnavLink.on('click', function() {
260  if($(this).attr('data-href')) {
261    if(is_pc()) {
262
263      var thisContent = $(this);
264      location.href = thisContent.attr('data-href');
265
266      megamenu.removeClass('active');
267      globalnavLinkText.removeClass('active');
268
269    }else{
270      var thisContent = $(this);
271
272      thisContent.next(megamenu).stop().slideToggle();
273      thisContent.find(globalnavLinkText).toggleClass('active');
274
275      globalnavLink.not(thisContent).next(megamenu).stop().slideUp();
276      globalnavLink.not(thisContent).find(globalnavLinkText).removeClass('active');
277    }
278  }
279});
280
281globalnavBtn.on('click', function() {
282  if($(this).hasClass('is-openable')) {
283    if(!is_pc()) {
284      if(!logo.hasClass('open')) {
285        menuIsOpen = true;
286        logo.addClass('open');
287        $(this).children().addClass('open');
288        toggleArea.addClass('open');
289        submenu.addClass('open');
290        globalnav.stop().fadeIn('fast');
291      }else{
292        logo.removeClass('open');
293        $(this).children().removeClass('open');
294        toggleArea.removeClass('open');
295        submenu.removeClass('open');
296        globalnav.stop().fadeOut('fast');
297        menuIsOpen = false;
298      }
299
300      var recruitnav = $('#recruitnav');
301
302      if ($('#globalnav').hasClass('open')) {
303        // globalnavContact.insertBefore('.mf-sp-menu');
304        globalnavContact.insertBefore('.globalnav__recruit');
305        logo.hide().stop().fadeIn();
306        if(recruitnav.length) {
307          recruitnav.hide();
308        }
309      } else {
310        globalnavContact.insertAfter('#globalnav');
311        logo.hide().stop().fadeIn();
312        if(recruitnav.length) {
313          recruitnav.stop().fadeIn();
314        }
315      }
316    }
317  }
318});
319
320$('.globalnav__list a').on('click', function() {
321  if(!is_pc()) {
322    globalnavBtn.children().removeClass('open');
323    toggleArea.removeClass('open');
324  }
325});
326
327
328$(window).on('load', function() {
329  globalnavBtn.addClass('is-openable');
330  var recruitnav = $('#recruitnav');
331  if(recruitnav.length) {
332    recruitnav.addClass('scroll');
333  }
334});
335
336$(window).on('load resize', function() {
337
338  if (is_pc()) {
339
340    globalnavItem.each(function() {
341      if ($(this).find(megamenu).length) {
342        $(this).find(globalnavLinkText).addClass('toggle');
343      }
344    });
345
346    megamenu.removeClass('active');
347
348
349    globalnavBtn.children().removeClass('open');
350    toggleArea.removeClass('open');
351    globalnavContact.insertAfter('#globalnav');
352    globalnav.show();
353    submenu.insertBefore('.globalnav');
354
355    var recruitnav = $('#recruitnav');
356    if(recruitnav.length) {
357      recruitnav.show();
358    }
359
360  } else {
361    // smp menu
362    if(!menuIsOpen) {
363      globalnav.hide();
364      logo.hide().stop().fadeIn();
365      logo.removeClass('open');
366      submenu.insertAfter('.globalnav__list');
367      
368      var recruitnav = $('#recruitnav');
369      if(recruitnav.length) {
370        recruitnav.show();
371      }
372    }
373  }
374
375  // $(window).on('scroll', function() {
376  // });
377
378  // $(window).trigger('scroll');
379});
380
381
382/*============================
383アコーディオン
384============================*/
385var accordionHead = $('.accordion__head');
386var accordionClose = $('.js-accordion-close');
387
388accordionHead.on('click', function() {
389  var thisContent = $(this);
390  var accordionText = thisContent.next('.accordion__text');
391  var accordionToggle = thisContent.find('.accordion__toggle');
392
393  accordionText.toggleClass('active');
394  accordionToggle.toggleClass('active');
395
396  // accordionHead.not(thisContent).next(accordionText).removeClass('active');
397  // accordionHead.not(thisContent).find(accordionToggle).removeClass('active');
398});
399
400accordionClose.on('click', function() {
401  var thisContent = $(this).closest('.accordion__text');
402  var accordionToggle = thisContent.prev('.accordion__head').find('.accordion__toggle');
403
404  thisContent.removeClass('active');
405  accordionToggle.removeClass('active');
406});
407
408
409/*============================
410スクロールのドラッグ有効化
411============================*/
412if (window.matchMedia("(min-width: 768px)").matches) {
413  $.prototype.mousedragScrollable = function () {
414    let target;
415
416    $(this).each(function (i, e) {
417      $(e).mousedown(function (event) {
418        event.preventDefault();
419        target = $(e);
420        $(e).data({
421          down: true,
422          move: false,
423          x: event.clientX,
424          y: event.clientY,
425          scrollleft: $(e).scrollLeft(),
426          scrolltop: $(e).scrollTop(),
427        });
428        return false;
429      });
430      $(e).on('click', function (event) {
431        if ($(e).data("move")) {
432          return false;
433        }
434      });
435    });
436
437    $(document).mousemove(function (event) {
438      if ($(target).data("down")) {
439        event.preventDefault();
440        let move_x = $(target).data("x") - event.clientX;
441        let move_y = $(target).data("y") - event.clientY;
442        if (move_x !== 0 || move_y !== 0) {
443          $(target).data("move", true);
444        } else {
445          return;
446        }
447        $(target).scrollLeft($(target).data("scrollleft") + move_x);
448        $(target).scrollTop($(target).data("scrolltop") + move_y);
449        return false;
450      }
451    }).mouseup(function (event) {
452      $(target).data("down", false);
453      return false;
454    });
455  };
456
457  $('.table__scroll, .tab__scroll, .pre').mousedragScrollable();
458}
459
460
461/*============================
462レコメンド導線スライダー(swiper)
463============================*/
464const breakpoints = [
465  {
466    breakpoint: 0,
467    slidesPerView: 1,
468
469  },
470  {
471    breakpoint: 768,
472    slidesPerView: 2,
473  }
474];
475breakpoints.reverse();
476
477let recommend, mySlidesPerView;
478let isInited = false;
479const slideLength = document.querySelectorAll('.recommend .swiper-slide').length;
480
481const checkBreakpoint = () => {
482  for (let key in breakpoints) {
483    let bp = breakpoints[key]['breakpoint'];
484    if (window.matchMedia('(min-width:' + bp + 'px)').matches) {
485      mySlidesPerView = breakpoints[key]['slidesPerView'];
486      break;
487    }
488  }
489
490  if (slideLength > mySlidesPerView) {
491    if (!isInited) {
492      initSwiper();
493      isInited = true;
494    }
495  } else {
496    if (isInited) {
497      recommend.destroy(false, true);
498      isInited = false;
499    }
500  }
501};
502
503const initSwiper = () => {
504  recommend = new Swiper('.recommend', {
505    loop: true,
506    spaceBetween: 8,
507    speed: 1000,
508    centeredSlides: true,
509    pagination: {
510      el: '.recommend .swiper-pagination',
511      clickable: true,
512    },
513    breakpoints: {
514      768: {
515        slidesPerView: 2,
516        centeredSlides: false,
517        spaceBetween: 48
518      }
519    }
520  });
521};
522
523window.addEventListener('resize', function() {
524  checkBreakpoint();
525});
526
527checkBreakpoint();
528
529const breakpointsPattern2 = [
530  {
531    breakpoint: 0,
532    slidesPerView: 1,
533
534  },
535  {
536    breakpoint: 768,
537    slidesPerView: 3,
538  }
539];
540breakpoints.reverse();
541
542let recommendPattern2, mySlidesPerViewPattern2;
543let isInitedPattern2 = false;
544const slideLengthPattern2 = document.querySelectorAll('.recommend__pattern2 .swiper-slide').length;
545let swiperbool;
546
547if (window.matchMedia('(min-width: 768px)').matches) {
548  if (slideLengthPattern2 <= 3) {
549    var loopPattern2 = false;
550    $('.recommend__pattern2 .swiper-pagination').hide();
551  } else {
552    var loopPattern2 = true;
553  }
554}
555
556if (slideLengthPattern2 <= 1) {
557  $('.recommend__pattern2 .swiper-slide').addClass('recommend__pattern2list');
558} else {
559  $('.recommend__pattern2 .swiper-slide').removeClass('recommend__pattern2list');
560}
561
562const checkBreakpointPattern2 = () => {
563  for (let key in breakpointsPattern2) {
564    let bp = breakpointsPattern2[key]['breakpoint'];
565    if (window.matchMedia('(min-width:' + bp + 'px)').matches) {
566      mySlidesPerViewPattern2 = breakpointsPattern2[key]['slidesPerView'];
567      break;
568    }
569  }
570
571  if (slideLengthPattern2 > mySlidesPerViewPattern2) {
572    if (!isInitedPattern2) {
573      initSwiperPattern2();
574      isInitedPattern2 = true;
575    }
576  } else {
577    if (isInitedPattern2) {
578      recommendPattern2.destroy(false, true);
579      isInitedPattern2 = false;
580    }
581  }
582
583  if (window.matchMedia('(max-width: 767px)').matches){
584    if(swiperbool){
585      // SPサイズかつスワイパーがonの時
586      recommendPattern2.destroy(false, true);
587      swiperbool = false;
588    }
589  } else {
590    if(!swiperbool){
591    // PCサイズかつスワイパーがoffの時
592      initSwiperPattern2();
593    }
594  }
595};
596
597const initSwiperPattern2 = () => {
598  recommendPattern2 = new Swiper('.recommend__pattern2', {
599    loop: true,
600    autoplay: {
601      delay: 5000,
602      disableOnInteraction: false
603    },
604    spaceBetween: 8,
605    speed: 1000,
606    centeredSlides: true,
607    pagination: {
608      el: '.recommend__pattern2 .swiper-pagination',
609      clickable: true,
610    },
611    breakpoints: {
612      768: {
613        loop: loopPattern2,
614        slidesPerView: 3,
615        centeredSlides: false,
616        spaceBetween: 48
617      }
618    },
619    navigation: {
620      nextEl: '.swiper-navigation__next',
621      prevEl: '.swiper-navigation__prev',
622    }
623  });
624  swiperbool = true;
625};
626
627window.addEventListener('resize', function() {
628  checkBreakpointPattern2();
629});
630
631checkBreakpointPattern2();
632
633
634/*============================
635レコメンド導線スライダー(3個)(swiper)
636============================*/
637const tripleBreakpoints = [
638  {
639    breakpoint: 0,
640    slidesPerView: 1,
641
642  },
643  {
644    breakpoint: 768,
645    slidesPerView: 3,
646  }
647];
648tripleBreakpoints.reverse();
649
650let tripleRecommend, myTripleSlidesPerView;
651let isTripleInited = false;
652const TripleSlideLength = document.querySelectorAll('.recommend__triple .swiper-slide').length;
653
654const checkTripleBreakpoint = () => {
655  for (let key in tripleBreakpoints) {
656    let bp = tripleBreakpoints[key]['breakpoint'];
657    if (window.matchMedia('(min-width:' + bp + 'px)').matches) {
658      myTripleSlidesPerView = tripleBreakpoints[key]['slidesPerView'];
659      break;
660    }
661  }
662
663  if (TripleSlideLength > myTripleSlidesPerView) {
664    if (!isTripleInited) {
665      initTripleSwiper();
666      isTripleInited = true;
667    }
668  } else {
669    if (isTripleInited) {
670      tripleRecommend.destroy(false, true);
671      isTripleInited = false;
672    }
673  }
674};
675
676const initTripleSwiper = () => {
677  tripleRecommend = new Swiper('.recommend__triple', {
678    loop: true,
679    spaceBetween: 8,
680    speed: 1000,
681    slidesPerView: 2,
682    centeredSlides: true,
683    pagination: {
684      el: '.swiper-pagination',
685      clickable: true,
686    },
687    breakpoints: {
688      0: {
689        slidesPerView: 1,
690        centeredSlides: false,
691        spaceBetween: 8
692      },
693      768: {
694        slidesPerView: 3,
695        centeredSlides: false,
696        spaceBetween: 33
697      }
698    }
699  });
700};
701
702window.addEventListener('resize', function() {
703  checkTripleBreakpoint();
704});
705checkTripleBreakpoint();
706
707
708/*============================
709タブレイアウト
710============================*/
711$('.tab__list:first-of-type, .tab__content:first-of-type').addClass('on');
712
713$('.tab__list').on('click', function() {
714  $(this).parents('.tab__scroll').find('.on').removeClass('on');
715  $(this).addClass('on');
716  const index = $(this).index();
717  $(this).parents('.tab__scroll').next('.tab__wrap').find('.tab__content').hide().eq(index).fadeIn(300).addClass('on');
718});
719
720
721/*============================
722ローカルナビ
723============================*/
724var href = location.href;
725var eachElement = $('.localnav__childlink, .localnav__grandchildlink');
726var localnavParent = $('.localnav__parent');
727var localnavChildLink = $('.localnav__childlink');
728
729localnavParent.each(function (index, value) {
730  if (value.href == href) {
731    localnavParent.eq(index).addClass('current');
732  }
733});
734
735eachElement.each(function (index, value) {
736  if (href.match(value.href) !== null) {
737    $(this).parents('.localnav__child').prev(localnavParent).addClass('current');
738  }
739});
740
741localnavChildLink.each(function() {
742  var localnavGrandchild = $('.localnav__grandchild');
743
744  if ($(this).next(localnavGrandchild).length) {
745    $(this).addClass('toggle');
746
747    $(this).on('click', function(e) {
748      const name = e.target.getAttribute('name');
749      const href = $(this).closest('.localnav__childlink').attr('href');
750      if (name === 'localnav_link' && href !== null) {
751        location.href = href;
752        return ;
753      }
754      e.preventDefault();
755
756      var thisContent = $(this);
757
758      thisContent.toggleClass('active');
759      thisContent.next(localnavGrandchild).toggleClass('active');
760
761      localnavChildLink.not(thisContent).removeClass('active');
762      localnavChildLink.not(thisContent).next(localnavGrandchild).removeClass('active');
763    });
764  }
765});
766
767
768/*============================
769カルーセル(swiper)
770============================*/
771const carouselBreakpoints = [
772  {
773    breakpoint: 0,
774    slidesPerView: 1
775  },
776  {
777    breakpoint: 768,
778    slidesPerView: 3
779  }
780];
781carouselBreakpoints.reverse();
782
783let carousel, carouselPerView;
784let carouselIsInited = false;
785const carouselSlideLength = document.querySelectorAll('.carousel .swiper-slide').length;
786
787if (carouselSlideLength > 2) {
788  $('.carousel__btn').stop().fadeIn();
789
790  const carouselCheckBreakpoint = () => {
791    for (let key in carouselBreakpoints) {
792      let bp = carouselBreakpoints[key]['breakpoint'];
793      if (window.matchMedia('(min-width:' + bp + 'px)').matches) {
794        carouselPerView = carouselBreakpoints[key]['slidesPerView'];
795        break;
796      }
797    }
798
799    if (carouselSlideLength > carouselPerView) {
800      if (!carouselIsInited) {
801        carouselInitSwiper();
802        carouselIsInited = true;
803      }
804    } else {
805      if (carouselIsInited) {
806        carousel.destroy(false, true);
807        carouselIsInited = false;
808      }
809    }
810  };
811
812  const carouselInitSwiper = () => {
813    carousel = new Swiper('.carousel', {
814      loop: true,
815      loopAdditionalSlides: 1,
816      slidesPerView: 1,
817      spaceBetween: 16,
818      speed: 1000,
819      grabCursor: true,
820      navigation: {
821        nextEl: '.carousel__next',
822        prevEl: '.carousel__prev',
823      },
824      breakpoints: {
825        768: {
826          slidesPerView: 3,
827          spaceBetween: 18
828        }
829      }
830    });
831  };
832
833  window.addEventListener('resize', function() {
834    carouselCheckBreakpoint();
835  });
836
837  carouselCheckBreakpoint();
838}
839
840
841/*============================
842フィルタリング(カテゴリ)
843============================*/
844function getParameterCategory(category) {
845  category = category.replace(/[\[\]]/g, "\\$&");
846  var regex = new RegExp("[?&]" + category + "(=([^&#]*)|&|#|$)"),
847      results = regex.exec(window.location.href);
848  if (!results) return null;
849  if (!results[2]) return '';
850  return decodeURIComponent(results[2].replace(/\+/g, " "));
851}
852
853let categoryRadio = $('.radio__input'),
854    radioCategoryChecked = getParameterCategory('category'),
855    filterList = $('.news__list, .thumbnailcard__pattern1, .thumbnailcard__pattern3');
856
857categoryRadio.on('change', function() {
858  // ラジオボタン
859  var thisContent = $(this),
860      radioChecked = $('.radio__input:checked'),
861      categoryCheckCount = radioChecked.length,
862      categoryVal = thisContent.val();
863
864  // フィルタリング機能
865  filterList.stop().animate({
866    'opacity': 0
867  }, 300, function() {
868    filterList.hide();
869
870    if (categoryVal === 'all' || categoryCheckCount === 0) {
871      filterList.show();
872      filterList.stop().animate({
873        'opacity': 1
874      }, 300);
875    } else {
876      filterList.filter('[data-filter~="' + categoryVal + '"]').each(function(i) {
877        $(this).show();
878        $(this).stop().animate({
879          'opacity': 1
880        }, 300);
881      });
882    }
883  });
884});
885
886var ref = document.referrer;
887
888if (ref.match('/news/') || ref.match('/service/details/') || ref.match('/case/') || ref.match('/sustainability/activities/')) {
889  $('.btn--back').attr('href', 'javascript:history.back();');
890}
891
892if (radioCategoryChecked) {
893  if (radioCategoryChecked !== 'all') {
894    filterList.hide();
895  }
896}
897
898filterList.filter('[data-filter~="' + radioCategoryChecked + '"]').each(function(i) {
899  if (radioCategoryChecked !== 'all') {
900    $(this).show();
901  }
902});
903
904
905/*============================
906_blank 自動付与
907============================*/
908$.setLinkInfo = function (options) {
909  if (!this) {
910    return false;
911  }
912
913  var o = $.extend({
914    // 'root': '.main',
915    'root': 'body',
916    'notCls': 'no-set-info'
917  }, options);
918  var $elm = $(o.root).find('a');
919  var i;
920
921  for (i = 0; i < $elm.length; i++) {
922    var $aElm = $elm.eq(i);
923    var aHref = $aElm.attr('href');
924
925    if ($aElm.hasClass(o.notCls)) {
926      continue;
927    }
928    if (/\.pdf/.test(aHref)) {
929      $aElm.attr('target', '_blank').addClass('icon-pdf');
930    }
931
932    if (/http(s)?:\/\//.test(aHref) && !$aElm.hasClass('icon-pdf')) {
933      $aElm.attr('target', '_blank').addClass('icon-blank');
934    }
935
936  }
937};
938
939
940/*============================
941table 空の時
942============================*/
943$(".table:has('.table__row1th:empty')").each(function(){
944  // console.log($(this).html());
945  $(this).find('.table__row1').each(function(){
946    // console.log($(this).html());
947    // console.log($(this).find('.table__row1th:empty').length);
948    if($(this).find('.table__row1th:empty').length) {
949      // 空の場合
950      $(this).addClass('row-empty');
951    }else{
952      // 何か入っている場合
953      $(this).addClass('row-full');
954    }
955  });
956});
957
958
959/*============================
960ソート部分まで戻る
961============================*/
962var startPosition = 0,
963  windowPosition,
964  $window = $(window),
965  $sortArea = $('.js-scroll-sort-area');
966  $sortBtn = $('.js-scroll-sort-btn');
967
968if($sortArea.length && $sortBtn.length) {
969  $window.on('scroll', function () {
970    var scroll = $(window).scrollTop(),
971      windowPosition = $(this).scrollTop(),
972      windowHeight = $window.innerHeight();
973
974    // console.log(windowPosition, startPosition);
975
976    if ((windowPosition < startPosition) && ($sortArea.offset().top - $('.header').innerHeight() < scroll )) {
977      $sortBtn.addClass('js-show');
978    } else {
979      $sortBtn.removeClass('js-show');
980    }
981
982    startPosition = windowPosition;
983  });
984}
985
986/*============================
987MF フォーム送信したら閉じる
988============================*/
989$(function(){
990  $('#globalnav .mf_finder_searchBox_form').submit(function(){
991    $('.globalnav__btn').trigger('click');
992  });
993});
994
995/*============================
996高さ合わせ
997============================*/
998$(function(){
999  $(window).on('load resize', function(){
1000    if(is_pc()) {
1001      $('[data-height-item-pc]').each(function(){
1002        const key = $(this).attr('data-height-item-pc');
1003        $(this).height($(`[data-height-target-pc="${key}"]`).height());
1004      });
1005    }else{
1006      $('[data-height-item-pc]').removeAttr('style');
1007    }
1008  });
1009});
1010
1011/*============================
1012高さ合わせ;表組(table__row1)
1013============================*/
1014$(function(){
1015  let _pt = parseInt($('.table__row1td').css('padding-top'));
1016  let _pb = parseInt($('.table__row1td').css('padding-bottom'));
1017
1018  $(window).on('load resize', function(){
1019    if(is_pc()) {
1020      $('.table:has(.table__row1)').each(function(){
1021        $('.table__row1th, .table__row1td').removeAttr('style');
1022
1023        $rowL = $(this).find('.table__row1').eq(0);
1024        $rowR = $(this).find('.table__row1').eq(1);
1025        $itemsL = $rowL.find('.table__row1th, .table__row1td');
1026        $itemsR = $rowR.find('.table__row1th, .table__row1td');
1027
1028        $itemsL.each(function(i){
1029          const $itemL = $(this);
1030          const $itemR = $itemsR.eq(i);
1031
1032          if($itemL.innerHeight() != $itemR.innerHeight()) {
1033            const _max = Math.max($itemL.innerHeight(), $itemR.innerHeight());
1034            $itemL.height(_max - _pt - _pb);
1035            $itemR.height(_max - _pt - _pb);
1036          }
1037        });
1038      });
1039    }else{
1040      $('.table__row1th, .table__row1td').removeAttr('style');
1041    }
1042  });
1043});

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.