PageSourceSearch

https://www.torelete.jp/shared/js/base.js

js torelete.jp collected 2026-10-05 06:51:37 UTC 30,895 bytes, 947 lines download raw bytes

1/*===========================================
2base.js
3ver2.2.2 Jun 05, 2019
4
5* functions
6    -UserAgent SmartPhone
7    -UserAgent Judgment
8    -SmartPhone Judgment
9    -AutoHeight settings
10    -resetAutoHeight
11    -Window Resize Event
12* Code to carry out after an HTML road ---------------- $(function(){});
13* Code to carry out after an HTML and Images road ----- jQuery.event.add(window, "load", function(){});
14* Plugins
15    -Original Methods --------(function($){})(jQuery);
16===========================================*/
17
18/*=====================================
19functions
20=====================================*/
21
22/* for Debug */
23if (!console) console = {log: function(){}};
24
25// UserAgent Judgment
26var $UA = $UA || {};
27;(function($, undefined) {
28  $UA.SP = (navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0;
29  $UA.name = window.navigator.userAgent.toLowerCase();
30  $UA.isIE = ($UA.name.indexOf('msie') >= 0 || $UA.name.indexOf('trident') >= 0);
31  $UA.isiPhone = $UA.name.indexOf('iphone') >= 0;
32  $UA.isiPod = $UA.name.indexOf('ipod') >= 0;
33  $UA.isiPad = $UA.name.indexOf('ipad') >= 0;
34  $UA.isiOS = ($UA.isiPhone || $UA.isiPod || $UA.isiPad);
35  $UA.isAndroid = $UA.name.indexOf('android') >= 0;
36  $UA.isTablet = ($UA.isiPad || ($UA.isAndroid && $UA.name.indexOf('mobile') < 0));
37
38  if ($UA.isIE) {
39    $UA.verArray = /(msie|rv:?)\s?([0-9]{1,})([\.0-9]{1,})/.exec($UA.name);
40    if ($UA.verArray) {
41        $UA.ver = parseInt($UA.verArray[2], 10);
42    }
43  }
44  if ($UA.isiOS) {
45    $UA.verArray = /(os)\s([0-9]{1,})([\_0-9]{1,})/.exec($UA.name);
46    if ($UA.verArray) {
47        $UA.ver = parseInt($UA.verArray[2], 10);
48    }
49  }
50  if ($UA.isAndroid) {
51    $UA.verArray = /(android)\s([0-9]{1,})([\.0-9]{1,})/.exec($UA.name);
52    if ($UA.verArray) {
53        $UA.ver = parseInt($UA.verArray[2], 10);
54    }
55  }
56}(jQuery));
57
58
59
60$(function(){
61
62  // GlobalNavi
63  //--------------------------------
64  if($('#siteFunctions').length){
65    $('#wrapper').before('<div id="gnavOverlay"></div>');
66    var $gnav = $('#globalNav'),
67        $gnavul = $("ul",$gnav),
68        $glink = $("ul>li>a",$gnav),
69        $ovly = $('#gnavOverlay'),
70        $drawer = $('#drawer'),
71        $search = $('#searchSet'),
72        $funcbtn = $('#funcBtns'),
73        $openS = $('#searchOpen'),
74        $openR = $('#regionOpen'),
75        $reglang = $('#regionLang'),
76        $subnav = {},
77        $regions = {},
78        $gtog = {},
79        $location = document.location.pathname.split('/'),
80        _current = 'current',
81        _off = 'off',
82        _search = '',
83        ovlyout = function(){
84          $ovly.fadeOut(200);
85        },
86        ovlyin = function(){
87          $ovly.fadeIn(300);
88        },
89        closeFuncs = function(){
90          if($gnav.length){
91            $glink.removeClass(_off);
92            $glink.removeClass(_current);
93            $subnav.slideUp(200);
94          }
95          $search.slideUp(200);
96          $regions.slideUp(200);
97        };
98
99    // search
100    //---------------------------------------
101    _search +=
102    '<div class="mf_finder_container">'+
103    '<mf-search-box '+
104    'submit-text="" '+
105    'ajax-url="https://finder.api.mf.marsflag.com/api/v1/finder_service/documents/3666a3aa/search" '+
106    'serp-url="/search_result.html" '+
107    'sort-text-csv="マッチ順,日時順" '+
108    'imgsize-text-csv="サムネイル なし,サムネイル 小,サムネイル 中,サムネイル 大" '+
109    'imgsize-default="3"'+
110    '></mf-search-box>'+
111    '</div>';
112    $search.append(_search);
113
114    var search_css = document.createElement('link'),
115        search_script = document.createElement('script');
116    search_css.href = 'https://ce.mf.marsflag.com/latest/css/mf-search.css';
117    search_css.rel = 'stylesheet';
118    search_css.type = 'text/css';
119    search_css.media = 'all';
120    search_css.charset = 'UTF-8';
121    document.head.appendChild(search_css);
122
123    if($('body').attr('id') != 'mf_Result'){
124      var G = GALFSRAM = window.GALFSRAM || {}
125        G.mfx = G.mfx || {}
126        G.mfx.router_mode = 'history'
127      search_script.src = 'https://ce.mf.marsflag.com/latest/js/mf-search.js';
128      search_script.charset='UTF-8';
129      document.body.appendChild(search_script);
130    }
131
132    // load region_lang
133    //---------------------------------------
134    if($reglang.length){
135      $reglang.load('/shared/js/region_lang.html',function(){
136        $regions = $reglang.find('#selectRegion');
137        var arrlocation = document.location.pathname.split('/'),
138            startpath = 1,//for Production
139            // startpath = 2,//for test
140            path = '',
141            $langs = $('.langSelect'),
142            mylang = $langs.find('a.active').attr('data-lang'),
143            defaultlang = $langs.find('a').eq(0).attr('data-lang');
144
145        for(var i=startpath; i<arrlocation.length; i++){
146          path+= '/'+ arrlocation[i];
147        }
148        if(mylang != defaultlang){
149          path = path.substr(3);
150        }
151
152        // mirror language contents
153        if($langs.hasClass('mirror')){
154          var $langlink = $langs.find('a');
155          $langlink.each(function(){
156            var datalang = $(this).data('lang');
157
158            if(datalang === defaultlang){
159              datalang = path;//for Production
160              // datalang = '/' + arrlocation[1] + path; //for test
161            }else if(datalang === mylang){
162              datalang = '';
163            }
164            else{
165              datalang = '/' + datalang + path;//for Production
166              // datalang = '/' + arrlocation[1]+ '/' + datalang + path; //for test
167            }
168            $(this).attr('href',datalang);
169          });
170        }
171      });
172    }//END if[region_lang]
173
174
175    if($gnav.length){
176      /* gnavTrigger */
177      $funcbtn.append('<li id="gnavTrigger"><span></span></li>');
178      $gtog = $('#gnavTrigger');
179      $gtog.on('click',function(){
180        if($ovly.hasClass(_current)){
181          $gnav.slideDown(300);
182          $drawer.removeClass(_current);
183          $ovly.removeClass(_current);
184        }else if(!$ovly.is(':hidden')){
185          $gnav.slideDown(300);
186          $drawer.removeClass(_current);
187          $ovly.removeClass(_current);
188        }else{
189          $gnav.slideToggle(300);
190          $drawer.removeClass(_current);
191          $ovly.removeClass(_current);
192          if(!$drawer.hasClass(_current)){
193            $drawer.addClass(_current);
194            $ovly.addClass(_current);
195          }
196        }
197      });
198
199      var $checkgnav = '';
200      $glink.each(function(){
201        $checkgnav += $(this).html();
202      });
203      
204      if ( $checkgnav.indexOf('<br>') != -1) {
205        $('body').addClass('gnavMultipleLines');
206      }
207      // console.log($checkgnav);
208
209      // add subGnav
210      //---------------------------------------
211      $.ajax({
212        type: 'GET',
213        url: '/shared/js/gNavi.html',
214        dataType: 'html'
215      })
216      .done(function(data){
217        $gnav.append(data);
218        $subnav = $('.subGnav',$gnav);
219        $subnav.each(function(i){
220          $('.parentNav>li',$gnav).eq(i).append($(this));
221          if($(this).children().length == 0){
222            $(this).parent().addClass('noList');
223          }else{
224            // $(this).append('<p class="close"></p>');
225          }
226        });
227        /* Clone gnav */
228        if(!$UA.SP && !$gnavul.is('#noSubGnav')){
229          var $gclone = $gnav.clone(true),
230              $foot = $('footer');
231          $gclone.attr('id','footerNav');
232          if(!$foot.hasClass('hideFooterNav')){
233            $foot.prepend($gclone);
234          }
235        }
236        var $gclone = $gnav.clone(true);
237        $gclone.attr('id','gNavSP');
238        $search.after($gclone);
239      });
240
241      //toggle menu (sp)
242      //--------------------------------
243      $('<a class="menuToggle"></a>').insertAfter($glink);
244      $glink.next('a').on('click',function(){
245        if(!$(this).hasClass('open')){
246          $(this).addClass('open')
247                  .next().slideDown(200);
248        }else{
249          $(this).removeClass('open')
250                  .next().slideUp(100);
251        }
252      });
253
254      // current nav (sp)
255      //--------------------------------
256      if($gnav.is($("[class^='active']"))){
257        var $t = $('ul.parentNav>li',$gnav),
258            $c = parseInt($gnav.attr('class').slice(6,7))-1;
259        $t.eq($c).addClass('lowerOpen');
260        $t.eq($c).children('a.menuToggle').addClass('open');
261      }
262
263      // dropdown subGnav
264      //--------------------------------
265      // gnav click event
266      if(!$gnavul.is('#noSubGnav')){
267        $glink.on('click', function(e){
268          var $p = $(this).parent(),
269              sub = $(this).parent().children('div');
270
271          if(parseInt($(window).width())>767 && !$p.is('.noList')){
272            e.preventDefault();
273            $p.siblings().children().removeClass(_current).addClass(_off);
274            $(this).removeClass(_off).addClass(_current);
275
276            // subGnav open/close
277            if ($(sub).is(':hidden')) {
278              e.stopPropagation();
279              $('div.subGnav:visible',$gnav).hide();
280              $(sub).slideDown('fast');
281              $(this).addClass(_current);
282              ovlyin();
283              $search.slideUp(200);
284              $regions.slideUp(200);
285            }else{
286              $(sub).slideUp(200);
287              $p.siblings().children().removeClass(_off);
288              $(this).removeClass(_current);
289              ovlyout();
290            }
291            $(this).attr('href','javascript:;');
292          }
293        });
294      }
295    }else{
296      $drawer.addClass('noGnav');
297      $ovly.addClass('noGnav');
298    }//END if[#globalNav]
299
300    $ovly.on('click',function(){
301      $('.subGnav',$gnav).slideUp(200);
302      closeFuncs();
303      ovlyout();
304    });
305
306    $openS.on('click',function(){
307      if ($search.is(':hidden')) {
308        closeFuncs();
309        $search.slideDown(200);
310        ovlyin();
311        $('input[type="text"]',$search).focus();
312      }else{
313        $search.slideUp(200);
314        ovlyout();
315      }
316    });
317
318    $openR.on('click',function(){
319      if ($regions.is(':hidden')) {
320        closeFuncs();
321        $regions.slideDown(200);
322        ovlyin();
323      }else{
324        $regions.slideUp(200);
325        ovlyout();
326      }
327    });
328
329    var gnavAttachScrollEvent = function(){
330      var scTop = 90;
331      $(window).on('scroll.o', $.debounce(50, function(){
332        if ($(window).scrollTop() > scTop && $(window).width()>767) {
333          $gnav.slideUp(200);
334          if(!$ovly.is(':hidden')){
335            closeFuncs();
336            ovlyout();
337          }
338          $drawer.addClass(_current);
339          $ovly.addClass(_current);
340        }else{
341          $drawer.removeClass(_current);
342          $ovly.removeClass(_current);
343          $gnav.slideDown(300);
344        }
345      }));
346    };
347    gnavAttachScrollEvent();
348
349    // drawer menu
350    //--------------------------------
351    (function(){
352      var $sitefunc = $('#siteFunctions'),
353          $Drawer = $('#drawer'),
354          scroll = 0,
355          menuflag = false,
356          menuEvent = function(){
357            var $bodyHeight = window.innerHeight - 62;
358            $Drawer.height($bodyHeight);
359            $('#siteFunctions').css({'transform': 'translate3d(0, 0, 0)'});
360            if($sitefunc.is(':hidden')){
361              scroll = $(window).scrollTop();
362              $sitefunc.slideDown(200,function(){
363                $('html').css({'overflow-y':'hidden'});
364                if($UA.isiPhone === true) {
365                  setTimeout(function() {
366                    $bodyHeight = window.innerHeight - 62;
367                    $Drawer.height($bodyHeight);
368                  }, 500);
369                  $('html,body').css({'-webkit-overflow-scrolling': 'touch','overflow': 'auto','height': '100%'});
370                  $('#selectRegion').find('a').focus().blur();
371                  $('#drawer').scrollTop(0);
372                  $('#logo,#contents,footer').on('touchmove.nscrll',function(e){
373                    e.preventDefault();
374                  });
375                }
376              });
377            }else{
378              $('html,body').css({'-webkit-overflow-scrolling': 'none','height': 'auto'}).scrollTop(scroll);
379              $sitefunc.slideUp(200,function(){
380                $('html').css({'overflow-y':'auto'});
381                if($UA.isiPhone === true) {
382                  $('#wrapper').css({'position':'static'});
383                  $('#logo,#contents,footer').off('.nscrll');
384                }
385              });
386            }
387          };
388
389      $('#spMenuBtn a').on('touchstart click', function(event) {
390        if (event.type === 'touchstart') {
391          menuflag = true;
392        }
393        if (menuflag) {
394          menuflag = false;
395        } else {
396          menuEvent();
397          $(this).toggleClass('active');
398        }
399      });
400    })();
401
402  }// END if[#siteFunctions]
403});
404
405
406
407var TORAY = TORAY || {};
408;(function($, undefined) {
409  TORAY.winW = $(window).width();
410  TORAY.resizeW = TORAY.winW;
411
412  TORAY.util = {
413    hashCtrl: function(){
414      try{
415        var h = location.hash;
416        if(h.indexOf('#/') == 0){
417          // throw new Error('#/ exists.');
418        }else if($(h).length > 0){
419          $(window).load(function() {
420            var target = $(h), position = 0;
421            if (target.length >= 1) {
422              position = Number(target.offset().top) || position;
423              $('html, body').animate({
424                scrollTop : position - 110
425              }, 500, 'easeOutExpo');
426            }
427          });
428        }
429      }catch(e){
430        // Proceed to the next process
431      }
432      $('a[href^="#"]').filter(function(){
433        return $(this).parent().attr('id') != 'pagetop' &&
434          !$(this).parent().parent().parent().hasClass('tabNav') &&
435          !$(this).parent().parent().is('#chukiNav') && // for IR
436          !$(this).parent().parent().is('#skipLink') &&
437          $(this).attr('href').indexOf('#modalWin') == -1 &&
438          !$(this).hasClass('boxer');
439      }).on('click.o',  function() {
440        var target = $($(this).attr("href")),
441            position = 0;
442          if (target.length >= 1) {
443            position = Number(target.offset().top) || position;
444            $('html, body').animate({
445              scrollTop : position - 110
446            }, 500, 'easeOutExpo');
447          }
448        return;
449      });
450    }
451  };
452
453  TORAY.copyright = function(){
454    var $copy = $('#copyright'),
455        tDate = new Date(),
456        tYear = "Copyright &copy; "+tDate.getFullYear()+" TORAY INTERNATIONAL, INC.";
457    $copy.html(tYear);
458  };
459
460  TORAY.bxwrap = function(h) {
461    $('.kvWrap').each(function(){
462      $(this).after('<hr>');
463      var optname = $(this).data('change');
464      if(optname == 'toggleImg'){
465        var $t = $(this).find('img');
466        $t.each(function(){
467          $(this).attr("src", $(this).attr("src").replace("/kv_","/sp_kv_"));
468        });
469      }
470    });
471  };
472
473  TORAY.loader = function(){
474    $('.loadspinner').css('display','block');
475  };
476
477  TORAY.spkvchange = function(){
478    var currentIndex = 0,
479        intv,
480        current = 'current',
481        $container = $('.spKVSubstitution');
482    // $kvSet.parent().height(TORAY.winW+30);
483
484    intv = setInterval(function() {
485      currentIndex = (currentIndex + 1) % 3;
486
487      $container.each(function(){
488        var $kvSet = $('.kvSet > li',this),
489            $kvSetDots = $('.kvSetDots > li',this);
490        $kvSet.each( function(i) {
491          if ( i == currentIndex ) {
492            $(this).addClass(current);
493          } else {
494            $(this).removeClass(current);
495          }
496        });
497        $kvSetDots.each( function(i) {
498          if ( i == currentIndex ) {
499            $(this).addClass(current);
500          } else {
501            $(this).removeClass(current);
502          }
503        });
504      });
505    }, 5000);
506  };
507
508  TORAY.pagetop = (function() {
509    if(!'debounce' in $) return;
510    var elm = '',
511    scTop = 90,
512    settings = function(){
513      bindElement();
514      if(elm.length > 0){
515        setDefault();
516        attachUIEvent();
517        attachScrollEvent();
518      }
519    },
520    setDefault = function (){
521      elm.children('a').attr('href','javascript:;');
522      elm.css({
523        '-webkit-transition': 'all 500ms cubic-bezier(.21,.66,.54,.94)',
524        '-moz-transition': 'all 500ms cubic-bezier(.21,.66,.54,.94)',
525        '-o-transition': 'all 500ms cubic-bezier(.21,.66,.54,.94)',
526        'transition': 'all 500ms cubic-bezier(.21,.66,.54,.94)',
527        '-webkit-transform': 'translateY(200px)',
528        'transform': 'translateY(200px)',
529        'display': 'block'
530      });
531    },
532    attachUIEvent = function(){
533      elm.on('click.o touchend.o', 'a', function(){
534        elm.css({'-webkit-transform': 'translateY(0px)','transform': 'translateY(0px)'});
535        $('html, body').stop().animate({
536            scrollTop : 0
537        }, 500, 'easeOutExpo');
538        return;
539      });
540    },
541    attachScrollEvent = function(){
542      $(window).on('scroll.o', $.debounce(110, function(){
543        if ($(window).scrollTop() > scTop) {
544          elm.css({'-webkit-transform': 'translateY(0px)','transform': 'translateY(0px)'});
545        } else {
546          elm.css({'-webkit-transform': 'translateY(200px)','transform': 'translateY(200px)'});
547        }
548       }));
549    },
550    bindElement = function(){
551      elm = $('#pagetop');
552    };
553    return {
554      init:function(){
555        settings();
556      }
557    };
558  }());
559
560  $(function() {
561    TORAY.pagetop.init();
562    TORAY.util.hashCtrl();
563    TORAY.copyright();
564    if($('.kvWrap').length && TORAY.winW < 768){
565      TORAY.bxwrap();
566    }
567    if($('.loadspinner').length){
568      TORAY.loader();
569    }
570    if($('.spKVSubstitution').length){
571      $('.spKVSubstitution').each(function(){
572        TORAY.spkvchange();
573      });
574    }
575    if (!$UA.SP) {
576      $('a[href^="tel:"]').on('click', function(e) {
577        e.preventDefault();
578      });
579    }
580  });
581}(jQuery));
582
583
584// after load
585$(window).load(function () {
586  $('.loadspinner').delay(700).fadeOut(500);
587});
588
589
590// SmartPhone Judgment
591//--------------------------------
592function lowerAndroid(n) {
593  var bo = false;
594  var ua = navigator.userAgent.toLowerCase();
595  var version = ua.substr(ua.indexOf('android')+8, 3);
596  if(ua.indexOf("android")) if(parseFloat(version) <= n) bo = true;
597  return bo;
598}
599
600// window close
601//--------------------------------
602function clsWin(){
603  window.opener = window;
604  var win = window.open(location.href,"_self");
605  win.close();
606}
607
608// Window Resize Event
609//--------------------------------
610(function(){
611  var $timer = false;
612  $(window).resize(function() {
613    if ($timer !== false) {
614      clearTimeout($timer);
615    }
616    $timer = setTimeout(function(){
617      TORAY.resizeW = $(window).width();
618      if(parseInt(TORAY.resizeW)<768){
619        //
620      }else{
621        //
622      }
623    }, 200);
624  });
625})();
626
627
628/*=====================================
629Code to carry out after an HTML road
630=====================================*/
631$(function(){
632
633  //match height
634  $('.insideLinksWid li').matchHeight();
635  // $('ul[class*="fluid"]:not(.fluid) li').matchHeight();
636  $('.row [class*="inner-col"]').matchHeight();
637  $('.row [class*="img-cap"]').matchHeight();
638  $('.linksWrap li').matchHeight();
639  $('.inductionNav .inductionBox').matchHeight();//techhology
640  $('.inductionNav h2').matchHeight();//techhology
641  $('.filterColumn .columnBox').matchHeight();//techhology
642  $('.siblingsNav li span').matchHeight();//techhology
643  $('[class*="imgColumn"] li').matchHeight();//Older version of the grid system
644
645  // for Tablet
646  //--------------------------------
647  if ($UA.isTablet) {
648    $("meta[name='viewport']").attr('content','');
649    $('html').addClass('tablet');
650  }
651
652  /* KV height adjust */
653  if(parseInt(TORAY.winW)<768){
654    var $winW = TORAY.winW;
655    // if($('.chapterKV').length){
656    //   $('.chapterKV').css({'height':$winW});
657    // }
658  }
659
660  // contactCover
661  //--------------------------------
662  $(".contactCover").click(function(e){
663    e.preventDefault();
664    _this = $(this);
665    if(_this.attr("target") == "_blank"){
666      window.open(_this.attr("href") + "?" + location.href.replace(/\?.*/,""), "contactwin");
667    } else {
668      location.href = _this.attr("href") + "?" + location.href.replace(/\?.*/, "");
669    }
670  });
671
672
673  // tabSection
674  //--------------------------------
675  if($('.tabSection').length){
676    $('.tabSection').each(function(){
677      if(!$(".tabBtns li a",this).length){
678        var $h = $(".tabBtns li",this);
679        var $e = $(".tabElement",this);
680        $h.eq(0).addClass('active');
681        $e.addClass('none');
682        $e.eq(0).removeClass('none');
683        $e.eq(0).addClass('block');
684
685        $h.click(function() {
686          var num = $h.index(this);
687          $e.addClass('none');
688          $e.removeClass('block');
689          $e.eq(num).removeClass('none');
690          $h.removeClass('active');
691          $(this).addClass('active');
692        });
693      }
694    });
695  }
696
697  // sidebar
698  //--------------------------------
699  if($('#sidebar').length){
700    $('#sidebar dl dd ul:first-child').spSidebar();
701  }
702
703  // Accordion
704  //--------------------------------
705  $('.accoTab').each(function(){
706    $(this).easyResponsiveTabs({
707      type: 'default', //Types: default, vertical, accordion
708      width: 'auto', //auto or any width like 600px
709      fit: true   // 100% fit in a container
710    });
711  });
712
713  $('.verticalTab').each(function(){
714    $(this).easyResponsiveTabs({
715      type: 'vertical',
716      width: 'auto',
717      fit: true
718    });
719  });
720
721  // products photo
722  //--------------------------------
723  if($('.productDetail').length){
724    var click_flg = false,
725        $pd = $('.productDetail'),
726        $photo = $("#proPhoto"),
727        $media = $('#mediaWrap',$pd);
728    $("#proThumb a").on('click',function(e){
729     if(click_flg == false) {
730        click_flg = true;
731        if($(this).hasClass('media')){
732          e.preventDefault();
733          var $target = $(this).attr('data-label');
734          $photo.children().eq(0).before($($target).clone());
735          // $($target).addClass('current');
736        }else{
737          $photo.children().eq(0).before("<img src='"+$(this).attr("href")+"' alt=''>");
738        }
739        $photo.children().eq(1).stop(true, false).fadeOut("fast",function(){
740          $(this).remove();
741          click_flg = false;
742        });
743        return false;
744      }else{
745        return false;
746      }
747    });
748  }
749
750  // products photo
751  //--------------------------------
752  $.fn.slideFadeToggle = function(speed, easing, callback) {
753    return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
754  };
755
756  // Accordion
757  //--------------------------------
758  if($('.accWrap').length){
759    var locationSearch = window.location.search.substr(1);
760    if( locationSearch !== '' && locationSearch.indexOf('bTabOpen=') !== -1 ){
761      var tabNo = locationSearch.replace ('bTabOpen=','');
762      $('.accWrap .accHead').filter(':eq('+tabNo+')').trigger('click');
763      $('.accWrap .accHead').filter(':eq('+tabNo+')').addClass('accordion-open').removeClass('accordion-close');
764    }
765  }
766
767
768  // iframe height
769  //--------------------------------
770  if(parseInt($(window).width())<768 && $('.iframePress').length){
771    $('.iframePress').attr('scrolling','yes');
772  }
773
774  if($('.iframePress').length){
775    var obj = $('.iframePress');
776    obj.on('load',function(){
777      $(window).scrollTop(0);
778    });
779  }
780
781
782  // inductionNav [for /technology]
783  //--------------------------------
784  if($(".inductionNav").length){
785    $(".inductionNav").each(function() {
786      $(this).children().eq(0).addClass('firstChild');
787    });
788  }
789
790});// END
791
792
793/*=====================================
794Code to carry out after an HTML and Images road
795=====================================*/
796jQuery.event.add(window, "load", function(){
797
798});//END
799
800
801/*=====================================
802Plugins
803=====================================*/
804(function($) {
805  $.extend({
806    /****** tab ******/
807    tab : function(){
808      var obj = $.extend({
809        trigger : $(".tabNav a"),
810        targets : $(".linksWrap"),
811        currentClass : "on",
812        dontScrollClass : "dontScroll"
813      },obj || {});
814
815      obj
816      .trigger
817      .addClass(obj.dontScrollClass)
818      .click(function(){
819
820        var target = $(this).attr("href");
821        $(this)
822        .parent()
823        .addClass(obj.currentClass)
824        .siblings()
825        .removeClass(obj.currentClass);
826
827        $(target).show().siblings().hide();
828        return false;
829
830      })
831      .focus(function(){
832        $(this).blur();
833      });
834
835      var locationSearch = window.location.search.substr(1);
836      if( locationSearch !== '' && locationSearch.indexOf('bTabOpen=') !== -1 ){
837        var tabNo = locationSearch.replace ('bTabOpen=','');
838        obj.trigger.filter(':eq('+tabNo+')').trigger('click');
839      }
840    }
841  });
842
843  $.fn.extend({
844    /****** sidebar ******/
845    spSidebar : function(){
846      var $li = $('li.spAppear',this);
847      $li.clone(true)
848          .addClass('appear')
849          .removeClass('spAppear')
850          .appendTo(this);
851    },
852    /****** Accordion ******/
853    easyResponsiveTabs: function (options) {
854    //Set the default values, use comma to separate the settings, example:
855    var defaults = {
856        type: 'default', //default, vertical, accordion;
857        width: 'auto',
858        fit: true
859    };
860    //Variables
861    var options = $.extend(defaults, options);
862    var opt = options, jtype = opt.type, jfit = opt.fit, jwidth = opt.width, vtabs = 'vertical', accord = 'accordion';
863    //Main function
864    this.each(function () {
865        var $respTabs = $(this);
866        $respTabs.find('ul.accoTab-list li').addClass('resp-tab-item');
867        $respTabs.css({
868            'display': 'block',
869            'width': jwidth
870        });
871        $respTabs.find('.accoTab-container > div').addClass('resp-tab-content');
872        jtab_options();
873        //Properties Function
874        function jtab_options() {
875            if (jtype == vtabs) {
876                $respTabs.addClass('resp-vtabs');
877            }
878            if (jfit == true) {
879                $respTabs.css({ width: '100%', margin: '0px' });
880            }
881            if (jtype == accord) {
882                $respTabs.addClass('resp-easy-accordion');
883                $respTabs.find('.accoTab-list').css('display', 'none');
884            }
885        }
886        //Assigning the h2 markup
887        var $tabItemh2;
888        $respTabs.find('.resp-tab-content').before("<h2 class='resp-accordion' role='tab'><span class='resp-arrow'></span></h2>");
889        var itemCount = 0;
890        $respTabs.find('.resp-accordion').each(function () {
891            $tabItemh2 = $(this);
892            var innertext = $respTabs.find('.resp-tab-item:eq(' + itemCount + ')').text();
893            $respTabs.find('.resp-accordion:eq(' + itemCount + ')').append(innertext);
894            $tabItemh2.attr('aria-controls', 'tab_item-' + (item
894Count));
895            itemCount++;
896        });
897        //Assigning the 'aria-controls' to Tab items
898        var count = 0,
899            $tabContent;
900        $respTabs.find('.resp-tab-item').each(function () {
901            $tabItem = $(this);
902            $tabItem.attr('aria-controls', 'tab_item-' + (count));
903            $tabItem.attr('role', 'tab');
904            //First active tab
905            $respTabs.find('.resp-tab-item').first().addClass('resp-tab-active');
906            $respTabs.find('.resp-accordion').first().addClass('resp-tab-active');
907            $respTabs.find('.resp-tab-content').first().addClass('resp-tab-content-active').attr('style', 'display:block');
908            //Assigning the 'aria-labelledby' attr to tab-content
909            var tabcount = 0;
910            $respTabs.find('.resp-tab-content').each(function () {
911                $tabContent = $(this);
912                $tabContent.attr('aria-labelledby', 'tab_item-' + (tabcount));
913                tabcount++;
914            });
915            count++;
916        });
917        //Tab Click action function
918        $respTabs.find("[role=tab]").each(function () {
919            var $currentTab = $(this);
920            $currentTab.click(function () {
921                var $tabAria = $currentTab.attr('aria-controls');
922                if ($currentTab.hasClass('resp-accordion') && $currentTab.hasClass('resp-tab-active')) {
923                    $respTabs.find('.resp-tab-content-active').slideUp('', function () { $(this).addClass('resp-accordion-closed'); });
924                    $currentTab.removeClass('resp-tab-active');
925                    return false;
926                }
927                if (!$currentTab.hasClass('resp-tab-active') && $currentTab.hasClass('resp-accordion')) {
928                    $respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
929                    $respTabs.find('.resp-tab-content-active').slideUp().removeClass('resp-tab-content-active resp-accordion-closed');
930                    $respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
931                    $respTabs.find('.resp-tab-content[aria-labelledby = ' + $tabAria + ']').slideDown().addClass('resp-tab-content-active');
932                } else {
933                    $respTabs.find('.resp-tab-active').removeClass('resp-tab-active');
934                    $respTabs.find('.resp-tab-content-active').removeAttr('style').removeClass('resp-tab-content-active').removeClass('resp-accordion-closed');
935                    $respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active');
936                    $respTabs.find('.resp-tab-content[aria-labelledby = ' + $tabAria + ']').addClass('resp-tab-content-active').attr('style', 'display:block');
937                }
938            });
939            //Window resize function
940            $(window).resize(function () {
941                $respTabs.find('.resp-accordion-closed').removeAttr('style');
942            });
943        });
944    });
945}
946  });
947})(jQuery);

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.