PageSourceSearch

https://technoproholdings.com/common/js/common.js

js technoproholdings.com collected 2026-10-02 16:57:37 UTC 28,618 bytes, 1,043 lines download raw bytes

1var ROOT_PATH = "";
2
3
4
5var Main = Main || {};
6
7
8
9/*
10// SP:縦サイズ調整
11//-------------------*/
12var winW;
13var navX;
14var conH;
15var designW = 750;
16function getNewSize(h, win){
17	if(!win){
18		winW = $(this).width();
19		if((winW > 320)&&(winW <= 480)){//320pxより上480以下	
20			winW = $(this).width();
21		}else if(winW <= 320){//320px以下
22			winW = 320;
23		}else if(winW > 480){//480pxより上
24			//winW = 480;
25			winW = $(this).width();
26		}
27	}else{
28		winW = $(this).width();
29	}
30	var w = designW;			//デザイン横幅
31	var newH = Math.floor((h * winW)/w);
32	return newH;
33}
34function getNewSizePer(h, win){
35	if(!win){
36		var w = designW;			//デザイン横幅	
37	}else{
38		var w = win;
39	}
40	var newHper = Math.floor(((h * 100)/w)*100)/100;
41	return newHper;
42}
43
44
45//----------------
46//language change button
47//----------------
48function chglang(page, categoryTop){
49	//英語ページがない場合は引数をfalseに設定、ある場合はtrueに設定
50	var pathArr = location.href.split("/");
51	var arrCnt = pathArr.length;
52	var splitpath = pathArr.slice(3);
53	if(splitpath[0] == "en"){
54		langPATH = "";
55	}else{
56		langPATH = "/en"
57	}
58	var bstr = "";
59	for(var i=0; i < arrCnt; i++){
60		if(langPATH){
61			//japanese → english
62			if(i>=3){
63				bstr += "/" + pathArr[i];
64			}
65		}else{
66			//english → japanese
67			if(i>=4){
68				bstr += "/" + pathArr[i];
69			}
70		}
71	}
72  
73	if(page == 1){
74		//Current page
75		window.location.href= langPATH + bstr;
76	}else if(page == 0){
77		//Category Top page
78		//japanese → english ONLY
79    if(categoryTop){
80      //カテゴリトップあり
81		  window.location.href = langPATH + "/" + pathArr[3];
82    }else{
83      //カテゴリトップなしの場合はトップページ
84      window.location.href = langPATH + "/";
85    }
86	}else{
87		//Current page 任意の(DWテンプレ値langURL)のページへ
88		window.location.href = page;
89	}
90}
91
92//スライド処理:共通
93//--------------------
94//function slideSet(mytarget, myresponsive, myfxtype, myitemV, mybtnprev, mybtnnext,calW){
95function slideSet(mytarget, myresponsive, myfxtype, myitemView, myscrollitem, mybtnprev, mybtnnext, mythumbnail, myimgW, myimgH, myduration, mytimer, scrollauto) {
96	var target = mytarget; //カルーセルする対象
97	var responsive = myresponsive; //レスポンシブかどうか
98	var fx = myfxtype; //エフェクトの種類(無い場合は横スライド)
99	var itemV = myitemView; //表示されるアイテム数
100	var scrollitem = myscrollitem; //スクロールされるアイテム数
101	var len = mytarget.children().length; //カルーセルするアイテムの数
102	var btnprev = ""; //コントローラ前に戻る
103	var thumbnail;
104	var myeasing;
105	if (myeasing) {
106		easing = myeasing;
107	} else {
108		easing = "linear";
109	}
110	if (mybtnprev) {
111		btnprev = mybtnprev;
112	}
113	var btnnext = "";
114	if (mybtnnext) {
115		btnnext = mybtnnext;
116	}
117	var duration;
118	if (myduration) {
119		duration = myduration;
120	} else {
121		duration = 800;
122	}
123	var slidetimer;
124	if (mytimer) {
125		slidetimer = mytimer;
126	} else {
127		slidetimer = 3000;
128	}
129	if (mythumbnail) {
130		thumbnail = mythumbnail;
131		$(thumbnail).find("a").each(function (i) {
132			$(this).addClass('pn' + i);
133			$(this).click(function () {
134				$(mytarget).trigger('slideTo', [i + 2, 0, true]);
135				return false;
136			});
137		});
138	}
139	//slide
140	//-----------------------
141	if (target.length > 0) {
142		target.carouFredSel({
143			responsive: responsive,
144			width: myimgW,
145			height: myimgH,
146			items: {
147				visible: itemV,
148				start: 0,
149				height: myimgH
150			},
151      pagination:thumbnail,
152      auto:scrollauto,
153			scroll: {
154				fx: fx,
155				items: scrollitem,
156				duration: duration,
157				timeoutDuration: slidetimer,
158				easing: easing,
159				pauseOnHover: true,
160				onBefore: function () {
161					var pos = $(this).triggerHandler('currentPosition');
162					if (pos == len) {
163						pos = 0;
164					}
165					if (mythumbnail) {
166						$(thumbnail).find("a").removeClass('active');
167						$(thumbnail).find("a.pn" + pos).addClass('active');
168					}
169				}
170			},
171			prev: btnprev,
172			next: btnnext
173		});
174		/*
175		preload = function(){
176			for(var i = 0; i<arguments.length; i++){
177				$("<img>").attr("src", arguments[i]);
178			}
179		};
180		preload(
181			"/img/img_main02.png"
182		);
183		*/
184	}
185}
186
187//var sp = 0; //PCだったらsp = 0 / スマホだったらsp = 1
188//	if ((navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) {
189		//スマホ
190		//----------
191	//	sp = 1;
192//	}
193
194var $win = $(window);	
195var $doc = $(document),
196    $body = $('body'),
197    resizeTimer = false,
198	// function
199	common, appear,
200	// variable
201	appearLine;
202
203
204
205$win.on('load', function() {
206    
207    if($(".cboxElement").length>0){
208	$(".cboxElement").colorbox({maxWidth:"90%",
209      maxHeight:"90%"});
210	
211    }
212	
213	
214	
215    // スクロールで表示
216    // -------------------------------------------------- 
217    Main.AppearAction = function() {
218        if (!this.dataSetted) {
219            this.setData();
220        }
221    };
222    
223    Main.AppearAction.prototype.setData = function() {
224        this.appearedElm = $('[data-appeared]');
225        this.appearedElmLen = this.appearedElm.length;
226        this.appearElmData = [];
227		
228        
229        for (var i = 0; i < this.appearedElmLen; i++) {
230            this.appearElmData[i] = {
231                element: this.appearedElm.eq(i),
232                appeared: false,
233                position: this.appearedElm.eq(i).offset().top
234            }
235        }
236        this.dataSetted = true;
237    };
238    
239    Main.AppearAction.prototype.onScroll = function() {
240        var self = this;
241        for (var i = 0; i < this.appearedElmLen; i++) {
242            if (Main.scrollTop + appearLine > this.appearElmData[i].position) {
243                if (!this.appearElmData[i].appeared) {
244                    this.appearElmData[i].appeared = true;
245                    this.appearElmData[i].element.attr('data-appeared', true);
246                }
247            } else {
248                if (this.appearElmData[i].appeared) {
249                    this.appearElmData[i].appeared = false;
250                    this.appearElmData[i].element.attr('data-appeared', false);
251                }
252            }
253        }
254    };
255    
256    function onScroll() {
257        Main.scrollTop = $win.scrollTop();
258        Main.scrollBtm = Main.scrollTop + Main.winH;
259        Main.scrollCnt = Main.scrollTop + Main.winH / 2;
260        
261        if (appear !== undefined) appear.onScroll();
262    }
263	appear = new Main.AppearAction();
264    Main.winW = $win.width();
265    Main.winH = $win.height();
266    appearLine = Main.winH * 0.75;
267	
268	$win.on("scroll",function(){
269		onScroll();
270	});
271	
272	$win.on("resize",function(){
273		onScroll();
274	});
275	
276	
277	
278	
279	
280	
281	$("#pulldown").removeClass("first");
282	$(".nav").removeClass("active");
283	
284	//----------------
285	//indexOf
286	//----------------
287	//IE(indexOf)
288	if (!Array.prototype.indexOf)
289	{
290	  Array.prototype.indexOf = function(elt /*, from*/)
291	  {
292		var len = this.length;
293	
294		var from = Number(arguments[1]) || 0;
295		from = (from < 0)
296			 ? Math.ceil(from)
297			 : Math.floor(from);
298		if (from < 0)
299		  from += len;
300	
301		for (; from < len; from++)
302		{
303		  if (from in this &&
304			  this[from] === elt)
305			return from;
306		}
307		return -1;
308	  };
309	}
310});
311
312
313$win.on('load', function() {
314		
315	//---------------------------------------
316	/* PC、SP共通処理
317	--------------------------------------*/
318	//----------------
319	//ページのパス
320	//----------------
321	var splitpath = location.href.split("/").slice(3);
322	var cnt = splitpath.length-1;
323	var anchorpath = location.href.split("#")[1];
324	var clearpath = location.href.split("#")[0];
325	var lastpath = clearpath.substr(clearpath.length-1);
326	var pagepath;
327	var opennavi = false;
328	var laststr="";
329	var parentpath ="";
330	if(lastpath != "/"){
331		if(lastpath == "l"){
332			laststr = ".html";
333		}else if(lastpath == "p"){
334			laststr = ".php";
335		}
336	}
337	if(cnt == 0){	// ルート
338		pagepath = "/"+splitpath[0]+"/";
339	}else if(cnt == 1){
340		if(laststr !=""){
341			//2階層(.html)
342			opennavi = true;
343			if(lastpath == "l"){
344				pagepath = "/"+splitpath[0]+"/"+splitpath[1].split(".html")[0]+laststr;
345			}else if(lastpath == "p"){
346				pagepath = "/"+splitpath[0]+"/"+splitpath[1].split(".php")[0]+laststr;
347			}
348		}else{
349			//2階層(カテゴリトップ)
350			pagepath = "/"+splitpath[0]+"/"
351		}
352	}else if(cnt == 2){
353		if(laststr !=""){
354			//3階層(.html)
355			opennavi = true;
356			if(lastpath == "l"){
357				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2].split(".html")[0]+laststr;
358			}else if(lastpath == "p"){
359				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2].split(".php")[0]+laststr;
360			}
361
362		}else{
363			//3階層(カテゴリトップ)
364			pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"
365		}
366	}else if(cnt == 3){
367		if(laststr !=""){
368			//4階層(.html)
369			opennavi = true;
370			if(lastpath == "l"){
371				parentpath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/";
372				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3].split(".html")[0]+laststr;
373			}else if(lastpath == "p"){
374				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3].split(".php")[0]+laststr;
375			}
376
377		}else{
378			//4階層(カテゴリトップ)
379			pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/";
380		}
381	}else if(cnt == 4){
382		if(laststr !=""){
383			//5階層(.html)
384			opennavi = true;
385			if(lastpath == "l"){
386				parentpath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3]+"/";
387				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3]+"/"+splitpath[4].split(".html")[0]+laststr;
388			}else if(lastpath == "p"){
389					pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3]+"/"+splitpath[4].split(".php")[0]+laststr;
390				}
391
392			}else{
393				//5階層(カテゴリトップ)
394				pagepath = "/"+splitpath[0]+"/"+splitpath[1]+"/"+splitpath[2]+"/"+splitpath[3]+"/";
395			}
396		}
397		var category = splitpath[0];
398
399		//グローバルメニュー現在地表示:プルダウンバージョン
400		//------------------------
401		$("#nav li").each(function(){
402			if(category == $(this).data("category")){
403				$(this).find("a").addClass("active");
404			}else if(category == "index.html"){
405				$("a[href='/']","#nav").addClass("active");
406			}
407		});
408	
409  if((pagepath == "/sustainability/")||(pagepath == "/sustainability/index.html")){
410    $("body").addClass("noh1");
411  }
412
413		//サイドメニュー現在地表示
414		//------------------------
415		if($("#side").length > 0){
416			var self;	
417			if(pagepath.indexOf("index.html")>0){
418				pagepath = pagepath.split("index.html")[0];
419				self = $("a[href='"+pagepath+"']","#side");	
420				self.parent().addClass("active");
421			}else{
422				self = $("a[href='"+pagepath+"']","#side");	
423				self.addClass("active");
424				self.parent().addClass("active");
425				if(self.parent().parent().parent().length > 0){
426					if(self.parent().parent().parent().get(0).tagName == "LI"){
427						self.parent().parent().parent().addClass("active");
428					}
429				}
430				if(self.parent().parent().parent().parent().parent().length > 0){
431					if(self.parent().parent().parent().parent().parent().get(0).tagName == "LI"){
432						self.parent().parent().parent().parent().parent().addClass("active");
433					}
434				}
435				if(self.parent().parent().parent().parent().parent().parent().parent().length > 0){
436					if(self.parent().parent().parent().parent().parent().parent().parent().get(0).tagName == "LI"){
437						self.parent().parent().parent().parent().parent().parent().parent().addClass("active");
438					}
439				}
440			}
441		}
442
443
444	
445	
446		//----------------
447		//line set
448		//----------------	
449		if ($(".lineset").length > 0) {
450			var ulcnt = $(".lineset").length;
451			var linearr = [];
452			$(".lineset").each(function (i) {
453				if(sp){
454					var colcnt = $(this).data("spcol"); //data-col:1行に並ぶ数を設定
455				}else{
456					var colcnt = $(this).data("col"); //data-col:1行に並ぶ数を設定
457				}
458				var target = $(this).data("targetobj"); //data-targetobj:高さをそろえる要素を指定、複数ある場合は,カンマ区切り(例:.sttl,p)
459				var pconly = $(this).data("pconly"); //data-targetobj:高さをそろえる要素を指定、複数ある場合は,カンマ区切り(例:.sttl,p)
460				var targetArr;
461				var targetcnt;
462				if ($(this).find(target).length > 0) {
463					targetArr = target.split(",");
464					targetcnt = targetArr.length;
465				}
466
467
468				var len = $(this).length;
469				var linecnt = 0;
470				var tlinecnt = 0;
471				var i = i;
472				line = Math.floor(len / colcnt);
473				if (len > (line * colcnt)) {
474					line++;
475				}
476				var alllinecnt = 0;
477				$(this).children().each(function (j) {
478					if (j % colcnt == 0) {
479						linecnt++;
480					}
481					linearr[i] = linecnt;
482
483					if ($(this).find(target).length > 0) {
484						for (var k = 0; k < targetcnt; k++) {
485
486							$(this).find(targetArr[k]).addClass("heightLineT-" + i + "-" + linecnt + "-" + k);
487						}
488					} else {
489						$(this).addClass("heightLine" + i + "-" + linecnt);
490					}
491
492				});
493				if (pconly) {
494					if (!sp) {
495						setline(target, targetcnt);
496					}
497				} else {
498					setline(target, targetcnt);
499				}
500			});
501
502			function setline(target, targetcnt) {
503				for (var i = 0; i < ulcnt; i++) {
504					for (var j = 0; j <= linearr[i]; j++) {
505						if (target) {
506							for (var k = 0; k < targetcnt; k++) {
507								$(".heightLineT-" + i + "-" + j + "-" + k).heightLine();
508							}
509						} else {
510							if ($(".heightLine" + i + "-" + j).length > 0) {
511								$(".heightLine" + i + "-" + j).heightLine();
512							}
513						}
514
515					}
516				}
517			}
518
519		}
520	if($(".heightLine-1").length > 0){
521		$(".heightLine-1").heightLine();
522	}
523	if($(".heightLine-2").length > 0){
524		$(".heightLine-2").heightLine();
525	}
526	if($(".heightLine-3").length > 0){
527		$(".heightLine-3").heightLine();
528	}
529	if($(".heightLine-4").length > 0){
530		$(".heightLine-4").heightLine();
531	}
532	if($(".heightLine-5").length > 0){
533		$(".heightLine-5").heightLine();
534	}
535	if($(".tabs li a").length > 0){
536		$(".tabs li a").heightLine();
537	}
538
539	/*
540	if($(".btngroup .jptxt").length > 0){
541		$(".btngroup .jptxt").heightLine();
542	}
543	
544*/	
545		//----------------
546		//icon
547		//----------------
548		//pdf
549		if($("a[href$='pdf']","#main,#news").length>0){
550			$("a[href$='pdf']","#main,#news").each(function(){
551				$(this).addClass("pdf");
552				if($(this).data('size')){
553					$(this).not(":has(img)").append('<span class="iconpdf"></span>'+$(this).data('size')+'');
554					
555				}else{
556					$(this).not(":has(img)").append('<img src="'+ROOT_PATH+'/common/img/common_icon_pdf.svg" width="18" height="20" alt="" class="icon">');
557
558				}
559			});
560		}
561		//pdf
562		if(($("a[href$='xls']","#main,#news").length>0)||($("a[href$='xlsx']","#main,#news").length>0)){
563			$("a[href$='xls'],a[href$='xlsx']","#main,#news").each(function(){
564				$(this).addClass("xls");
565				if($(this).data('size')){
566					$(this).not(":has(img)").append('<span class="iconxls"></span>'+$(this).data('size')+'');
567					
568				}else{
569					$(this).not(":has(img)").append('<img src="'+ROOT_PATH+'/common/img/common_icon_xls.svg" width="18" height="20" alt="" class="icon">');
570
571				}
572			});
573		}
574		//movie
575		if($(".iconmov").length>0){
576			$(".iconmov a").each(function(){
577				if(sp){
578					$(this).append('<img src="/common/img/icon_movie.png" width="22" alt="" class="icon"/>');
579				}else{					
580					$(this).append('<img src="/common/img/sp/icon_movie_sp.png" width="22" alt="" class="icon"/>');
581				}
582			});
583		}
584		//blank
585		if($("a[target='_blank']","#main, #topmain").length>0){
586			$("a[target='_blank']","#main, #topmain").each(function(){
587				var urlpath = $(this).attr("href");
588				if((urlpath.indexOf(".pdf")<0)&&(urlpath.indexOf(".zip")<0)&&(urlpath.indexOf(".mov")<0)&&(urlpath.indexOf(".wma")<0)&&(urlpath.indexOf(".mp3")<0)&&(urlpath.indexOf("eir-parts")<0)&&(urlpath.indexOf(".xls")<0)){
589					
590				$(this).addClass("blank");
591					
592					if($(this).not(":has(span)").length>0){
593					//SPANなし
594						if($(this).hasClass("btn1")){
595							$(this).not(":has(img)").append('<span class="iconblank"></span>');
596						}else{
597							if($(this).hasClass("iconari")){
598								$(this).append('<span class="iconblank"></span>');
599							}else{
600								//$(this).not(":has(img)").append('<img src="'+ROOT_PATH+'/common/img/common_icon_blank.svg" width="14" height="14" alt="" class="icon">');
601								$(this).not(":has(img)").append('<span class="iconblank"></span>');
602							}
603						}
604
605					}else{
606					//SPANあり
607						if($(this).hasClass("btn1")){
608							$(this).not(":has(img)").append('<span class="iconblank"></span>');
609						}else if($(this).hasClass("btnblank")){
610						}else if($(this).hasClass("btnicon")){
611						}else{
612							$(this).not(":has(img)").find("span").append('<span class="iconblank"></span>');
613						}
614					}
615				}
616			});
617		}
618    
619
620	
621	
622		/* col3 */
623		if($(".col3").length>0){
624			$(".col3").each(function(){
625				var amari = $(this).find("li").length % 3;
626				if(amari == 1){
627					$(this).find("li:last-child").addClass("last1");
628				}else if(amari == 2){
629					$(this).find("li:last-child").addClass("last2");
630				}
631			});
632		}
633
634		/* col4 */
635		if($(".col4").length>0){
636			$(".col4").each(function(){
637				var amari = $(this).find("li").length % 4;
638				if(amari == 1){
639					$(this).find("li:last-child").addClass("last1");
640				}else if(amari == 2){
641					$(this).find("li:last-child").addClass("last2");
642				}else if(amari == 3){
643					$(this).find("li:last-child").addClass("last3");
644				}
645			});
646		}
647		/* iconslist */
648		if($(".iconslist").length>0){
649			$(".iconslist").each(function(){
650        if(sp){
651				  var amari = $(this).find("li").length % 3;          
652        }else{
653				  var amari = $(this).find("li").length % 6;          
654        }
655				if(amari == 1){
656					$(this).find("li:last-child").addClass("last1");
657				}else if(amari == 2){
658					$(this).find("li:last-child").addClass("last2");
659				}else if(amari == 3){
660					$(this).find("li:last-child").addClass("last3");
661				}else if(amari == 4){
662					$(this).find("li:last-child").addClass("last4");
663				}else if(amari == 5){
664					$(this).find("li:last-child").addClass("last5");
665				}
666			});
667		}
668		/* anchorimg */
669		if($(".anchorimg").length>0){
670			$(".anchorimg").each(function(){
671				var amari = $(this).find("li").length % 3;
672				if(amari == 1){
673					$(this).find("li:last-child").addClass("last1");
674				}else if(amari == 2){
675					$(this).find("li:last-child").addClass("last2");
676				}
677			});
678		}
679  
680  
681		//ページトップ
682		//--------------------------
683		var targetbtn = $("#btnpagetop");
684		var isHtmlScroll = (function(){
685			var html = $('html'), top = html.scrollTop();
686			var el = $('<div/>').height(10000).prependTo('body');
687			html.scrollTop(10000);
688			var rs = !!html.scrollTop();
689			html.scrollTop(top);
690			el.remove();
691			return rs;
692		})();
693		var t = isHtmlScroll ? 'html' : 'body';
694		var w = $(window);
695		var winH = w.height();
696		var winW = w.width();
697		var footH = $("#footer").outerHeight();
698		if(sp){
699			var btnR = getNewSize(16);
700			var navH = 0;
701		}else{
702			var btnR = 25;
703		}
704		var contentsH = $("#allwrap").outerHeight()- $("#footer").outerHeight();
705		var btm = 0;
706		targetbtn.css("right",btnR + "px");
707		
708	
709		btnAreaH = (targetbtn.height() / 2) + btm;
710		var btnbtm = contentsH - btnAreaH;
711		var opacityflag = 0;
712		function resetH(){
713			contentsH = $("#allwrap").outerHeight()- $("#footer").outerHeight();
714			btnbtm = contentsH - btnAreaH;
715			var d = contentsH -(w.scrollTop() + winH);
716			if(d < footH){
717				targetbtn.removeClass("fix");
718				targetbtn.css("top",  btnbtm+"px");
719			}else{
720				//ページ下部に固定
721				targetbtn.addClass("fix");
722				targetbtn.css("bottom",btm+"px").css("top","auto");
723			}
724		}
725
726		targetbtn.stop().animate({opacity:0},0);
727
728		function scr(){
729			contentsH = $("#allwrap").outerHeight()- $("#footer").outerHeight()
730			btnbtm = contentsH - btnAreaH;
731			
732			var d = contentsH -(w.scrollTop() + winH);
733			if(d < (btnAreaH/2)-20){
734				//下までスクロールしたらフッタの上部に固定
735				targetbtn.removeClass("fix");
736				targetbtn.css("top",  btnbtm+"px").css("bottom", "auto");
737			}else{
738				//ページ下部に固定
739				targetbtn.addClass("fix");
740				targetbtn.css("bottom",btm+"px").css("top","auto");
741			}
742			if(w.scrollTop() > 0){
743				if(opacityflag != 1){
744					targetbtn.stop().animate({
745						opacity:1
746					},300);
747					opacityflag = 1;
748				}
749			}else{
750				if(opacityflag != 0 ){
751					targetbtn.stop().animate({
752						opacity:0
753					},300);
754					opacityflag = 0;
755				}
756			}
757		}
758		scr();
759		w.on("scroll",function(){
760			scr();
761		});
762		
763		//ページトップへ
764		targetbtn.find("a").on("click",function(){
765			$(t).stop().animate({
766				scrollTop:0
767			//},1000);
768			},{duration:1000,easing:'linear'});
769		});
770	
771	
772		//accordionbox
773		//---------------------
774		if($(".figurebox a").length>0){
775			$(".figurebox a").each(function(){
776				$(this).parent().next().each(function(){
777					$(this).animate({
778						height:"hide"
779					},0);
780					var timer = setTimeout(function(){
781						appear.setData();
782						appear.onScroll();
783					},500);
784					
785				});
786				$(this).on("click",function(){
787					
788					if($(this).hasClass("active")>0){
789						//close
790						$(this).parent().next().stop().animate({
791							height:"hide"
792						},500);
793						$(this).removeClass("active");
794						var timer = setTimeout(function(){
795						appear.setData();
796						appear.onScroll();					
797						},500);
798					}else{
799						//open
800						$(this).parent().next().stop().animate({
801							height:"show"
802						},500);
803						$(this).addClass("active");
804						var timer = setTimeout(function(){
805						appear.setData();
806						appear.onScroll();				
807						},500);
808					}
809					
810				});
811			});
812		}
813	
814	
815	
816	
817		//---------------------------------------
818		/* SP処理
819		--------------------------------------*/
820		if(sp){
821			
822			//SP:プルダウンメニュー
823			//--------------------------
824			var menuflag = false;
825			$("#btnmenu").on("click", function(){
826				if(menuflag){
827					$(this).find(".hamburger").removeClass("is-active");
828					$("#pulldown").removeClass("show");
829					$("#cover3").removeClass("show");
830					menuflag = false;
831				}else{
832					$(this).find(".hamburger").addClass("is-active");
833					$("#pulldown").addClass("show");
834					$("#cover3").addClass("show");	
835					menuflag = true;
836				}
837			});
838			$("#cover3").on("click",function(){
839				$("#btnmenu .hamburger").removeClass("is-active");
840				$("#pulldown").removeClass("show");
841				$(this).removeClass("show");
842				menuflag = false;
843			});
844			
845			$(".category a.sp").each(function(){
846				var subflag = false;
847				$(this).on("click", function(){
848					if(subflag){
849						$(this).removeClass("active");
850						$(this).parent().next().removeClass("show");
851						subflag = false;
852					}else{
853						$(this).addClass("active");
854						$(this).parent().next().addClass("show");
855						subflag = true;
856					}
857				});
858				
859			});
860			
861		//---------------------------------------
862		/* PC処理
863		--------------------------------------*/
864		}else{
865			//検索エリア
866			if ($(".btnsearch").length > 0) {
867				$(".btnsearch").on("click",function(){
868					$(".btnsearch").css("display","none");
869					$("#header").addClass("active");
870				});
871				$("#btnclose a").on("click",function(){
872					$(".btnsearch").css("display","block");
873					$("#header").removeClass("active");
874				});
875			}
876			
877			//フォントサイズ変更
878			$("#txtchg a").on("click",function(){
879				location.reload();
880			 });
881			
882			//PC:プルダウンメニュー
883			//--------------------------
884			$("#nav a").on("mouseover click", function(){
885				var mynum = $(this).attr("id").substr(3);
886					$("#nav a").each(function(){
887						$(this).removeClass("over");					
888					})
889					$(".sub").each(function(){
890						$(this).removeClass("active");
891					});
892					$("#pulldown").removeClass("active");
893				//if(mynum != 5){
894					if($("#pulldown").hasClass("active")){
895					}else{
896						//$("#pulldown").addClass("show");
897						$("#pulldown").addClass("active");
898						$("#cover").addClass("show");
899						$("#cover2").addClass("show");	
900					}
901					$(this).addClass("over");
902					$("#sub"+mynum).addClass("active");
903			//	}
904			});
905			$("#cover").on("mouseover click",function(){
906				//$("#pulldown").removeClass("show");
907				$("#pulldown").removeClass("active");
908				$("#cover2").removeClass("show");
909				$(this).removeClass("show");
910				$("#nav a").each(function(){
911					$(this).removeClass("over");					
912				})
913			});
914			$("#cover2").on("mouseover click",function(){
915				//$("#pulldown").removeClass("show");
916				$("#pulldown").removeClass("active");
917				$("#cover").removeClass("show");
918				$(this).removeClass("show");
919				$("#nav a").each(function(){
920					$(this).removeClass("over");					
921				})
922			});
923
924			/* pulldownmenu */
925			if($(".sublist").length>0){
926				$(".sublist").each(function(){
927					var amari = $(this).find("li:not(.sp)").length % 3;
928					if(amari == 1){
929						$(this).find("li:last-child").addClass("last1");
930					}else if(amari == 2){
931						$(this).find("li:last-child").addClass("last2");
932					}
933				});
934			}
935			
936			//pc
937			if($(".PCheightLine-1").length > 0){
938				$(".PCheightLine-1").heightLine();
939			}
940			if($(".PCheightLine-2").length > 0){
941				$(".PCheightLine-2").heightLine();
942			}
943			/*
944			if($(".listwrap").length > 0){
945				$(".listwrap").heightLine();
946			}
947			*/
948			
949			
950		}
951	
952	
953	
954	
955		
956	});
957
958
959function initializeAccordion() {
960  //accordionbox
961  //---------------------
962  if($(".inofficerbox2 a").length > 0) {
963    $(".inofficerbox2 a").each(function() {
964      // 初期状態ですべてのアコーディオンを非表示
965      $(this).parent().next().hide();
966
967      // クリック時のイベント処理
968      $(this).on("click", function() {
969        if ($(this).hasClass("active")) {
970          // close
971          $(this).parent().next().stop().slideUp(500);
972          $(this).removeClass("active");
973        } else {
974          // open
975          $(this).parent().next().stop().slideDown(500);
976          $(this).addClass("active");
977        }
978      });
979    });
980  }
981}
982
983// アンカーリンクで遷移した場合の処理を関数化
984function handleAnchorLink() {
985  var hash = location.hash;
986  if (hash) {
987    $(".inofficerbox2 a").removeClass("active");
988    var $hash = $(hash).find(".inofficerbox2 a").addClass("active");
989
990    setTimeout(function() {
991      var position = $hash.offset();
992      $('body,html').animate({scrollTop: position}, 0, 'swing');
993    }, 50);
994  }
995}
996
997// DOMの準備ができたら実行
998$(document).ready(function() {
999  initializeAccordion(); // アコーディオンを初期化
1000  handleAnchorLink();    // アンカーリンクの処理
1001});
1002
1003// 全てのリソースが読み込まれたら、もう一度アンカーリンクの処理を実行
1004$win.on('load', function() {
1005  handleAnchorLink();
1006});
1007
1008//プルダウンの選択で遷移
1009$(function() {
1010  if ($('#jumpMenu').length > 0) {
1011    var $sel = $('#jumpMenu');
1012    if (!$sel.length) return;
1013    var currentPath = location.pathname;
1014    var $currentOpt = $sel.find('option').filter(function () {
1015        var v = $(this).val();
1016        if (!v) return false;
1017        return currentPath.indexOf(v) !== -1;
1018    }).first();
1019
1020    if ($currentOpt.length) {
1021        var label = $currentOpt.text();
1022
1023        $sel.prepend(
1024            $('<option>', {
1025                text: label,
1026                value: '',
1027                selected: true,
1028                hidden: true
1029            })
1030        );
1031    }
1032
1033    // ▼ 選択したら遷移
1034    $sel.on('change', function () {
1035        var url = $(this).val();
1036        if (!url) return;
1037        if (currentPath.indexOf(url) !== -1) {
1038            return;
1039        }
1040        location.href = url;
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.