PageSourceSearch

https://iptsusho.com/js/public/sp_onload.js?1719563163

js iptsusho.com collected 2026-10-04 19:08:04 UTC 58,037 bytes, 1,735 lines download raw bytes

1!function($) {
2	if(document.querySelector('body.old_query')){
3        //旧バージョン
4		$(function() {
5			public_sp_onlaod();
6		});
7	}else{
8		public_sp_onlaod();
9	}
10
11
12	function public_sp_onlaod(){
13		var $win          = $(window);
14		var $body         = $('body');
15		var scroll        = $win.scrollTop();
16		var windowHeight  = $win.height();
17		var $bg           = $('#bg');
18		var device        = $bg.data('device');
19		var $main         = $('#main');
20		var $sections     = $('section.section');
21		var $area         = $sections.find('div.section-area');
22		var $animate_item = $area.find('div.animate-item');
23		var $totop_btn    = $('#totop-btn');
24		//#4713 //#5088
25		var $hblock_menu  = $('#header .section-menu.hmenu2,#mobile-menu ul.msection-menu,#mobile-menu ul.marquee-menu');
26
27		var $DSheder_menu = $("#header-menu,#header .header-menu,#header .normal-menu");
28		var $header_image_area  = $("#header div.header-image-area");
29		var visittimer    = false;
30
31
32/**marqueeMenu移植*/
33
34		/*var $marqueeMenu = $('#header').find('nav ul.marquee-menu');
35		var $marquees    = $marqueeMenu.find('a > span');
36		var length       = $marquees.length;
37
38		if (length) {
39			var $marqueeSubMenu = $marqueeMenu.find('ul.current');
40			if ($marqueeSubMenu.length) {
41				$marqueeSubMenu.show();
42			}
43
44			//#4083 matuuchi
45			var $marqueeSubMenu2 = $marqueeMenu.filter("ul.current");
46			if($marqueeSubMenu2.length){
47				$marqueeSubMenu2.show();
48			}
49
50			for (var i = 0;i < length;i++) {
51				$m       = $marquees.eq(i);
52				var text = $m.html();
53				if (text) {
54					$div = $("<span>"+text+"</span>");
55					$div.css({
56						'font-size'		: $m.css('font-size'),
57						'font-family'	: $m.css('font-family')
58					});
59					$m.parent().append($div);
60
61					var menu_width = $m.parent().outerWidth();
62					var max        = menu_width - (parseInt($m.css('margin-left').replace("px", "")) + parseInt($m.css('margin-right').replace("px", ""))) - (parseInt($m.css('padding-left').replace("px", "")) + parseInt($m.css('padding-right').replace("px", "")));
63					var mywidth = parseInt($div.outerWidth());
64
65					if (max <= mywidth) {
66						$ins = $('<ins style="display:block;text-decoration:none;" class="marquee">'+text+'</ins>');
67						$m.html($ins);
68					}
69					$div.remove();
70				}
71			}
72
73			$marqueeMenu.find('ins.marquee').marquee('pointer ad-not-link').on('mouseover touchstart', function() {
74				if (!$(this).closest('.ad-editting-item').length) {
75					$(this).trigger('start');
76				}
77			}).on('touchstart',function (e) {
78				if (!$(this).closest('.ad-editting-item').length) {
79					var link = $(this);
80					if (link.hasClass('marquee-hover')) {
81						$(this).trigger('stop');
82						return true;
83					} else {
84						$(this).trigger('start');
85						link.addClass('marquee-hover');
86						$marqueeTitle.find('ins.marquee').not(this).removeClass('marquee-hover').marquee('pointer').trigger('stop');
87
88						e.preventDefault();
89						return false;
90					}
91				}
92			}).on('mouseout', function() {
93				$(this).trigger('stop');
94			}).each(function() {
95				if (device == "smart") {
96					var $mbox = $(this);
97					var $mdiv = $mbox.children().eq(0);
98					var $rfix = $mdiv.find('.r-fix').eq(0);
99
100					if ($rfix.find('.fa-angle-right').length) {
101						var move_width = $mbox.width() - ($rfix.outerWidth() + 6);
102
103						$mbox.width(move_width);
104						$mdiv.css('paddingRight',move_width);
105					}
106				}
107			});
108
109			if ($marqueeSubMenu.length) {
110				$marqueeSubMenu.attr('style', "");
111			}
112
113			//#4083 matuuchi
114			if($marqueeSubMenu2.length){
115				$marqueeSubMenu2.attr("style","");
116			}
117		}*/
118
119
120		// パララックスタイプなら現在地追加
121		$('a:not(.ad-btn)').click(function(e) {
122			var url      = location.href;
123			var nextPage = $(this).attr('href');
124			if ($(this).attr("target") != "_blank" && $(this).attr('href') && !BaseUrl.match(/(dsadmin)/) && $(this).attr("id") != "totop-btn") {
125				if ($bg.data('sp-type')) {
126					var nextPage = $(this).attr('href');
127					if (nextPage.match(/#section/) || nextPage.match(/#sp_/)) {
128						if($bg.data('sp-type') == 0){
129							var location_url = nextPage.split("#");
130							var url          = location.href.split("#");
131							if (location_url[0] == url[0] || location_url[0] + "/" == url[0]) {
132								hash = location_url[1].replace("sp_", "");
133								var href = $("#"+hash);
134								if (href.length) {
135									var hrefOffset = href.offset().top;
136									$('html,body').animate({scrollTop: hrefOffset}, 'slow');
137								}
138							}
139						}
140					} else {
141						e.preventDefault();
142						var location_url = nextPage.split("#");
143						var url          = location.href.split("#");
144						if (location_url[0] != url[0]) {
145							var sec = $(".section.active").attr("id");
146							// 現在のページを上書き
147							history.pushState(null, null, url[0] + "#sp_" + sec);
148						}
149
150						location.href = nextPage;
151					}
152				} else if(nextPage.indexOf('#') != -1 && nextPage.indexOf("#mobile-menu") == -1 && nextPage.indexOf("#menu-close") 
152== -1 && !($("#detail-box").length) && nextPage.indexOf("categoryid") == -1){
153					var nextPagehost = $(this).prop('href', nextPage).prop('hostname');
154					var urlhost = location.host;
155					if(nextPagehost == urlhost){
156						var next_url = nextPage.match(/index\/(\d+)/);
157						if (next_url) {
158							var next_urlid = next_url[1];
159							var now_pageid = $body.data("page-id");
160							if(next_urlid == now_pageid){
161								//トピックス カテゴリ"すべて"を選択した際、ページ遷移しないため、preventDefault()を実行しないよう調整
162								if(!$(this).hasClass("tab_no1")){
163									e.preventDefault();
164								}
165								var location_url = nextPage.split("#");
166								hash = location_url[1].replace("sp_", "");
167								var href = $("#"+hash);
168								if (href.length) {
169									var hrefOffset = href.offset().top;
170									$('html,body').animate({scrollTop: hrefOffset}, 'slow');
171								}else {
172									location.href = nextPage;
173								}
174							}
175						}else{
176							var now_url = url.match(/index\/(\d+)/);
177							// トップページに設定してハンバーガーメニューからページ内リンクに飛ぶ場合正常に動かないため以下の処理を飛ばす
178							var sp_url = url.match(/\/sp#mobile-menu|\/sp\/#mobile-menu/);
179							if(!now_url && !sp_url){
180								e.preventDefault();
181								var location_url = nextPage.split("#");
182								hash = location_url[1].replace("sp_", "");
183								var href = $("#"+hash);
184								if (href.length) {
185									var hrefOffset = href.offset().top;
186									$('html,body').animate({scrollTop: hrefOffset}, 'slow');
187								}else {
188									location.href = nextPage;
189								}
190							}
191						}
192					}
193				}
194			}
195		});
196
197		//サブメニュー表示
198		//ul.nav-hoverの要素が生成される前にeachしてしまうため処理開始を遅らせる
199		setTimeout(function(){
200			$("nav ul.nav-hover:not(.beside-nav)").each(function() {
201				var $_this = $(this);
202				var $menulist_li = $_this.find("li");
203
204				//#4083 matuuchi
205				if ($_this.parent().data("area") == "top" || $_this.closest("#header").length || $_this.closest("#hd-sc-menu").length) {
206					var $menulist_parent_li = $_this.find("> li");
207				}else{
208					$menulist_parent_li = $_this;
209				}
210
211				$menulist_parent_li.off("mouseleave").on("mouseleave",function() {
212					$menulist_li.removeClass("rollover");
213				});
214
215				$menulist_li.off("mouseenter").on("mouseenter",function() {
216					$(this).addClass("rollover");
217				});
218			});
219		},500);
220
221		//matu
222		//画像保存禁止処理(右クリック禁止)
223		if ($('#img_preserve_flg').val() == "1") {
224			$('body').bind('contextmenu', function(e) {
225				return false;
226			});
227		//画像保存禁止処理(画像上クリック禁止)
228		} else if ($('#img_preserve_flg').val() == "2") {
229			var obj = $('img');
230			if (obj.length) {
231				for (var i = 0;i < obj.length;i++) {
232					// IE 対策
233					$(obj[i]).bind('contextmenu', function(e) {
234						return false;
235					});
236				}
237			}
238		}
239/**********************/
240
241        //froala css適応用
242		$('#header').each(function() {
243			$(this).find('[data-direct-type="editor"]').addClass("fr-view");
244		});
245
246		$.extend({
247			marquee_init:function($elem){
248				//$params = $("#params");
249				//device = $params.data("device");
250
251				//タイトルorメニュー文字スクロール
252				/*var $marqueeTitle = $elem.find("h2.marquee-title,h3.marquee-title,div.marquee-title,nav > .menu-top");
253				var $marquees = $marqueeTitle.find("> span");
254				var length = $marquees.length;
255*/
256
257				var $marqueeMenu = $elem.find('nav ul.marquee-menu');
258				var $marquees    = $marqueeMenu.find('a > span');
259				var length       = $marquees.length;
260				if(length){
261
262					var $marqueeSubMenu = $marqueeMenu.find('ul.current');
263					if ($marqueeSubMenu.length) {
264						$marqueeSubMenu.show();
265					}
266
267					//#4083 matuuchi
268					var $marqueeSubMenu2 = $marqueeMenu.filter("ul.current");
269					if($marqueeSubMenu2.length){
270						$marqueeSubMenu2.show();
271					}
272
273					for(var i=0;i < length;i++){
274						$m =  $marquees.eq(i);
275						var text = $m.html();
276						if(text){
277							$div = $("<span>"+text+"</span>").hide();
278							$div.css({
279								"font-size":$m.css("font-size"),
280								"font-family":$m.css("font-family")
281							});
282							$m.parent().append($div);
283
284							var menu_width = $m.parent().outerWidth();
285							var max = menu_width - (parseInt($m.css('margin-left').replace("px","")) + parseInt($m.css('margin-right').replace("px",""))) - (parseInt($m.css('padding-left').replace("px","")) + parseInt($m.css('padding-right').replace("px","")));
286							var mywidth = parseInt($div.outerWidth());
287
288							if(max <= mywidth){
289								//#2320 スマホ右から
290								/*if(device == "smart"){
291									$ins = $('<ins style="display:block;text-decoration:none;" class="marquee cursor_default" direction="left">'+text+'</ins>');
292								}else{
293									$ins = $('<ins style="display:block;text-decoration:none;" class="marquee cursor_default">'+text+'</ins>');
294								}*/
295
296								$ins = $('<ins style="display:block;text-decoration:none;" class="marquee">'+text+'</ins>');
297
298								$m.html($ins);
299							}
300							$div.remove();
301						}
302					}
303
304					/*if(device == "smart"){
305						// #2320 KAWANAKA
306						$marqueeTitle.find('ins.marquee').marquee('pointer').find("div").css("paddingLeft", max).trigger('start');
307					}else{*/
308					$marqueeMenu.find('ins.marquee').marquee('pointer').on("mouseover",function () {
309						if(!$(this).closest(".ad-editting-item").length){
310							$(this).trigger('start');
311						}
312					}).on("touchstart",function (e) {
313						if(!$(this).closest(".ad-editting-item").length){
314
315							var link = $(this);
316							if (link.hasClass('marquee-hover')) {
317								$(this).trigger('stop');
318							}else{
319								$(this).trigger('start');
320								link.addClass("marquee-hover");
321								$marqueeMenu.find('ins.marquee').not(this).removeClass("marquee-hover").marquee('pointer').trigger('stop');
322							}
323						}
324
325					}).on("mouseout",function () {
326						$(this).trigger('stop');
327						});
328					//}
329
330					if ($marqueeSubMenu.length) {
331						$marqueeSubMenu.attr('style', "");
332					}
333
334					//#4083 matuuchi
335					if($marqueeSubMenu2.length){
336						$marqueeSubMenu2.attr("style","");
337					}
338
339				}
340
341
342
343			},section_init			: function($elem) {
344
345				//#2765 スマホ theta背景非対応
346				if ($elem.find('div.bg-theta:not(.no-style)').length && device == "pc") {
347					//theta
348					$elem.find('div.bg-theta:not(.no-style)').theta_bg({});
349				}
350
351				// youtube background
352				if ($elem.find('div.backgroundYoutube').length) {
353					$elem.find('div.backgroundYoutube').each(function() {
354						var ytOptions = {
355							videoId	: $(this).data('m-id'),
356							target	: $(this)
357						};
358						$(this).tubular(ytOptions);
359						background_size_cover('.backgroundYoutube', 16, 9);
360					});
361				}
362				// theta全面表示対応
363				if ($elem.find('div.tour-theta').length && !BaseUrl.match(/(dsadmin)/) && device == "pc") {
364					$elem.find('div.tour-theta').each(function() {
365						var obj         = $(this);
366						var thetaHeight = $elem.height();
367						var topY        = 0;
368						var leftX       = obj.offset().left * -1;
369
370						// 幅固定の場合再計算
371						var sec = $elem.parent();
372						if (sec.hasClass("section-full0")) {
373							var bg = $elem.parent().parent().find(".section-area-bg");
374
375							thetaWidth  = sec.width();
376							thetaHeight = sec.height();
377							leftX       = ($elem.outerWidth() - $elem.find("div:nth-child(2)").outerWidth()) / 2 * -1;
378						} else {
379							thetaWidth = $('#middle-area').width();
380						}
381
382						// PCの場合高さposition計算
383						if (device == "pc") {
384							var $header = $('#header');
385							if ($header.hasClass('pos2')) {//固定
386								topY        = topY + $header.height();
387								thetaHeight = thetaHeight - $header.height();
388							} else {
389								if ($bg.data('sp-type')) {
390									// 1段目かどうか
391									var index = $('section').index($elem.parent());
392									if (index == 0) {
393										topY        = topY + $header.height();
394										thetaHeight = thetaHeight - $header.height();
395									} else {
396										topY = 0;
397									}
398								} else {
399									topY = 0;
400								}
401							}
402
403							var $footer = $('#footer');
404							if ($footer.hasClass('pos2')) {//固定
405								if ($bg.data('sp-type')) {
406									thetaHeight = thetaHeight - $footer.height();
407								} else {
408									// 最後かどうか
409									var size  = $('section').length;
410									var index = $('section').index($elem.parent());
411									if (size == index + 1) {
412										thetaHeight = thetaHeight - $footer.height();
413									}
414								}
415							} else {
416								if ($bg.data('sp-type')) {
417									if ($elem.siblings('#footer').attr('id') == "footer") {
418										thetaHeight = thetaHeight - $footer.height();
419									}
420								}
421							}
422						}
423
424						obj.css({
425							width	: thetaWidth,
426							height	: thetaHeight,
427							top		: topY,
428							left	: leftX
429						});
430					});
431				} else if ($elem.find('div.tour-theta').length && BaseUrl.match(/(dsadmin)/) && device == "pc") {
432					var sec = $elem.parent();
433					if (sec.hasClass("section-full0")) {
434						$elem.find('div.tour-theta').each(function() {
435							var obj         = $(this);
436							var thetaHeight = $elem.height();
437							var topY        = 0;
438							var leftX       = ($('#middle-area').outerWidth() - $(".block-area").outerWidth()) / 2 * -1;
439
440							obj.css({
441								width	: $('#middle-area').outerWidth(),
442								height	: thetaHeight,
443								top		: topY,
444								left	: leftX,
445								right	: 0
446							});
447						});
448					}
449				}
450			},
451			section_animate_init	: function($elem) {
452				scroll       = $win.scrollTop();
453				windowHeight = $win.height();
454
455				$elem.find('div.animate-item').each(function() {
456					$.item_animate_init($(this));
457				});
458			},
459			item_animate_init		: function($elem) {
460				//#4954 ie アクニーション動かない件調整
461				var imgPos = $elem.offset().top;
462				if($bg.data('sp-type') == 1 && (real_device == 'pc' && device == 'pc') && !BaseUrl.match(/(dsadmin)/)){
463					imgPos = $elem.get( 0 ).offsetTop;
464				}
465
466				if (imgPos < (scroll + windowHeight)) {
467					setTimeout(function() {
468						$elem.addClass('animated '+$elem.data('animate'));
469
470						/*#4310*/
471						if($('section.section').length == 1){
472							$elem.removeClass("animate-item");
473						}
474					}, $elem.data('timer'));
475				} else {
476					$elem.removeClass('animated '+$elem.data('animate'));
477				}
478			},
479			/*管理画面用イベント*/
480			admin_animate_init		: function() {
481				$sections     = $('section.section');
482				$area         = $sections.find('> div.section-area');
483				$animate_item = $area.find('div.animate-item');
484			},
485			toptop_pos				: function() {
486				var now          = $win.scrollTop();
487				var $footer      = $('#footer');
488				var $fixedbanner = $('#fixedbanner');
489				var bottom       = 20;
490
491				if ($footer.length) {
492					var footer_pos = $footer.offset();
493					var max_bottom = footer_pos.top;
494					var under      = (now + $win.height());
495					if (max_bottom <= under) {
496						bottom = $footer.height();
497					}
498				}
499
500				// #2827 固定バナー KAWANAKA
501				if ($fixedbanner.length) {
502					// #3017 バナーの表示確認追加
503					if ($fixedbanner.css('display') == 'block') {
504						bottom += $fixedbanner.height();
505
506						if (device == 'smart' && ($totop_btn.data('admin-flg') === "1" || $totop_btn.data('admin-flg') === 1)) {
507							bottom += 20;
508						}
509					}
510				}
511
512				// 固定メニュー
513				var fixed_menu_pos = $('#fixed_menu').data('fm-pos');
514				if ($('#fixed_menu').length && device == 'smart' && fixed_menu_pos == 1) {
515					bottom += $('#fixed_menu').height();
516				}
517				if ($('#pc-fixed-menu').length && device == 'pc') {
518					bottom += $('#pc-fixed-menu').height();
519				}
520
521				// #2660 SP・デザイン調整 KAWANAKA ページ内移動ボタン
522				if ($totop_btn.data('position') === "center") {
523					var totop_btn_w = $totop_btn.width();
524
525					if ($totop_btn.data('admin-flg') === "1" || $totop_btn.data('admin-flg') === 1) {
526						var totop_left = Math.floor(($main.width() - totop_btn_w) / 2) + $main.offset().left;
527					} else {
528						var totop_left = Math.floor(($totop_btn.closest('#bg').width() - totop_btn_w) / 2);
529					}
530
531					if (totop_left < 0) {
532						totop_left = 0;
533					}
534
535					$totop_btn.css({'left': totop_left});
536				}
537
538				$totop_btn.css('bottom', bottom);
539			},
540			admin_type005_init		: function($elem) {
541				var $left    = $elem.find('.left-col');
542				var $right   = $elem.find('.right-col');
543				var block_id = $elem.data('block-id');
544
545				$left.resizable({
546					'handles'	: 'e',
547					'start'		: function(e, ui) {
548						$right.width('auto');
549					},
550					'stop'		: function(e, ui) {
551						//幅 %計算
552						var width   = ui.size.width;
553						var $line   = $(ui.element).closest('.record');
554						var l_width = $line.width();
555						var n       = 2;
556
557						var ratio_lw = Math.ceil(((width / l_width) * 100) * Math.pow(10, n)) / Math.pow(10, n);
558						var ratio_rw = Math.ceil((100 - ratio_lw) * Math.pow(10, n)) / Math.pow(10, n);
559
560						$left.css('width', ratio_lw + "%");
561						$right.css('width', ratio_rw + "%");
562						$.fn.editBlockField({'td_l_width': ratio_lw, 'td_r_width': ratio_rw}, block_id, $elem);
563						$.fn.setPageUpdate();
564					},
565					resize		: function(e, ui) {
566						var width = ui.size.width;
567						$left.not($(ui.element)).css('width', width + "px");
568					}
569				});
570			},
571			onepageToMove		: function(target) {
572				var index = 0;
573				//#SPトピックス kondo
574				if(target.match(/(no)/)){
575					var repTar = target.replace("no", "");
576					var tar_href = '#'+ repTar;
577					$('ul.onepage-pagination li').find('a').each(function(){
578						if($(this).attr('href') == tar_href){
579							$(this).trigger('click');
580						}
581					})
582					return false;
583				}
584				if ($bg.find("#"+target).length) {
585					index = $sections.index($bg.find("#"+target));
586				}
587
588				$('ul.onepage-pagination li').eq(index).find('a').trigger('click');
589			},
590			// #2660 SP・デザイン調整 KAWANAKA ロゴ/メニュー中央揃え
591			// #3236 フッター対応のため共通関数化 T
592			partsSetLayout		: function(name, parts) {
593				switch (name) {
594					case 'logo':
595						var $elm_list = parts.find('.logo');
596						break;
597					case 'hmenus':
598						var $elm_list = parts.find('.hmenus').eq(0);
599						break;
600					case 'copyright':
601						var $elm_list = parts.find('.copyright').eq(0);
602						break;
603				};
604
605				$elm_list.each(function() {
606					var $elm = $(this);
607					if ($elm.attr('data-center-flg') == 1) {
608						var parts_w = parts.outerWidth(),
609							elm_w   = $elm.outerWidth(),
610							elm_l   = Math.floor((parts_w - elm_w) / 2);
611						if (elm_w < 0) {
612							elm_l = 0;
613						}
614						$elm.css({
615							left	: elm_l,
616							right	: "auto"
617						});
618					}
619				});
620			},
621			// #2660 SP・デザイン調整 KAWANAKA ヘッダーメニュー固定
622			header_fixed		: function(zero_flg) {
623				var $header     = $('#header');
624				var $inner_list = $header.find('.container').children();
625
626				if (zero_flg) {
627					$inner_list.each(function(i) {
628						if (i == 0) {
629							$header.css('minHeight', 50).animate({
630								'height': $header.attr('data-original-height')
631							}, 750, function() {
632								$header.removeClass('header-fixing');
633							});
634						}
635
636						var $elm = $(this);
637						if ($elm.hasClass('hmenus')) {
638							$elm.animate({
639								'top': $elm.attr('data-original-top')
640							}, 750);
641						} else {
642							if ($elm.attr('data-header-fixed-hide') === true || $elm.attr('data-header-fixed-hide') === "true") {
643								//#4768
644								//なぜがタブレットで幅がとれなくなるためこっちにする
645								//$elm.show();
646								$elm.css("visibility","visible").css("display","block");
647							}
648						}
649					});
650				} else if (!$header.hasClass('header-fixing')) {
651					var $hmenus = $("");
652					$inner_list.each(function(i) {
653						var $elm = $(this);
654						if ($elm.hasClass('hmenus')) {
655							$hmenus = $elm;
656						} else {
657							if (!$elm.is(':hidden')) {
658								//#4768
659								//なぜがタブレットで幅がとれなくなるためこっちにする
660								//$elm.hide().attr('data-header-fixed-hide', true);
661								$elm.css("visibility","hidden").css("display","none").attr('data-header-fixed-hide', true);
662							}
663						}
664
665						if ((i + 1) == $inner_list.length) {
666							if (typeof $header.attr('data-original-height') === "undefined") {
667								$header.attr('data-original-height', $header.height());
668							}
669
670							//#4242
671							if (typeof $hmenus.attr('data-original-top') === "undefined") {
672								$hmenus.attr('data-original-top', $hmenus.css('top'));
673							}
674
675							var fixed_space = 15;
676							var fixed_h     = $hmenus.height() + (fixed_space * 2);
677
678							$hmenus.animate({
679								'top': fixed_space
680							}, 500);
681
682							$header.css('minHeight', fixed_h).animate({
683								'height': fixed_h
684							}, 500, function() {
685								$header.addClass('header-fixing');
686							});
687						}
688					});
689				}
690			},
691			/* #2827 固定バナー中央寄せ */
692			fixedbannerPartsSetLayout	: function() {
693				var $fixedbanner = $('#fixedbanner');
694
695				var $elm_list = $fixedbanner.find('.banner');
696
697				//バナー表示確認用
698				var banner_flg = [];
699				//バナーの左位置取得
700				var banner_l = [];
701				//バナーの幅
702				var banner_w = [];
703				//バナー取得
704				var banner = [];
705
706				var center_flg = false;
707
708				$elm_list.each(function() {
709					var $elm = $(this);
710					if ($elm.attr('data-center-flg') == 1) {
711						var fixed_w = $fixedbanner.outerWidth();
712						var elm_w   = $elm.outerWidth();
713
714						if ($elm.css('display') != "none") {
715							banner.push($elm);
716							banner_w.push(elm_w);
717							var elm_l = $elm.position();
718							banner_l.push(elm_l.left);
719
720							center_flg = true;
721						}
722					}
723				});
724
725				if (center_flg) {
726					var banner_box_w = $fixedbanner.find('.fixed-banner-box').width();
727					$fixedbanner.find('.fixed-banner-box').css({
728						margin: "auto"
729					});
730
731					if (banner[0] && banner[1]) {
732						var banner1 = banner[0];
733						var banner2 = banner[1];
734
735						var fixed_box_w = $fixedbanner.find('.fixedbanner-box').width();
736
737						var banner1_top  = parseInt(banner1.css('top'));
738						var banner1_left = parseInt(banner1.css('left'));
739
740						var banner2_top  = parseInt(banner2.css('top'));
741						var banner2_left = parseInt(banner2.css('left'));
742
743						var banner1_bottom = banner1_top + banner1.outerHeight();
744						var banner2_bottom = banner2_top + banner2.outerHeight();
745
746						if (banner1_left < banner2_left) {
747							banner1.css({left: "0px", right: "auto"});
748							banner2.css({left: "auto", right: "0px"});
749
750							if (banner1_bottom <= banner2_top) {
751								/* バナー1上 バナー2下 */
752								if (banner1.outerWidth() >= banner2.outerWidth()) {
753									/* バナー1が大きい場合 */
754									var banner_l = Math.floor((fixed_box_w - banner2.outerWidth()) / 2);
755									banner1.css('left', "0px");
756									banner1.css('right', "auto");
757									banner2.css('left', banner_l+"px");
758									banner2.css('right', "auto");
759								} else {
760									/* バナー2が大きい場合 */
761									var banner_l = Math.floor((fixed_box_w - banner1.outerWidth()) / 2);
762									banner1.css('left', banner_l+"px");
763									banner1.css('right', "auto");
764									banner2.css('left', "0px");
765									banner2.css('right', "auto");
766								}
767							} else if (banner2_bottom <= banner1_top) {
768								/* バナー1が下 バナー2が上 */
769								if (banner1.outerWidth() >= banner2.outerWidth()) {
770									var banner_l = Math.floor((fixed_box_w - banner2.outerWidth()) / 2);
771									banner1.css('left', "0px");
772									banner1.css('right', "auto");
773									banner2.css('left', banner_l+"px");
774									banner2.css('right', "auto");
775								} else {
776									var banner_l = Math.floor((fixed_box_w - banner1.outerWidth()) / 2);
777									banner1.css('left', banner_l+"px");
778									banner1.css('right', "auto");
779									banner2.css('left', "0px");
780									banner2.css('right', "auto");
781								}
782							}
783						} else {
784							banner1.css({left: "auto", right: "0px"});
785							banner2.css({left: "0px", right: "auto"});
786
787							if (banner1_bottom <= banner2_top) {
788								/* バナー1上 バナー2下 */
789								if (banner1.outerWidth() >= banner2.outerWidth()) {
790									/* バナー1が大きい場合 */
791									var banner_l = Math.floor((fixed_box_w - banner2.outerWidth()) / 2);
792									banner1.css('left', "0px");
793									banner1.css('right', "auto");
794									banner2.css('left', banner_l+"px");
795									banner2.css('right', "auto");
796								} else {
797									/* バナー2が大きい場合 */
798									var banner_l = Math.floor((fixed_box_w - banner1.outerWidth()) / 2);
799									banner1.css('left', banner_l+"px");
800									banner1.css('right', "auto");
801									banner2.css('left', "0px");
802									banner2.css('right', "auto");
803								}
804							} else if (banner2_bottom <= banner1_top) {
805								/* バナー1が下 バナー2が上 */
806								if (banner1.outerWidth() >= banner2.outerWidth()) {
807									var banner_l = Math.floor((fixed_box_w - banner2.outerWidth()) / 2);
808									banner1.css('left', "0px");
809									banner1.css('right', "auto");
810									banner2.css('left', banner_l+"px");
811									banner2.css('right', "auto");
812								} else {
813									var banner_l = Math.floor((fixed_box_w - banner1.outerWidth()) / 2);
814									banner1.css('left', banner_l+"px");
815									banner1.css('right', "auto");
816									banner2.css('left', "0px");
817									banner2.css('right', "auto");
818								}
819							}
820						}
821					} else {
822						banner[0].css({left: "0px", right: "auto"});
823					}
824				}
825/*\
826				if (banner.length == 2) {
827					// バナーが2つの場合
828					if (banner_l[0] < banner_l[1]) {
829						var space        = banner_l[1] - (banner_l[0] + banner_w[0]);
830						var banner_box_w = (banner_l[1] + banner_w[1]) - banner_l[0];
831						var left1        = Math.floor(($fixedbanner.outerWidth() - banner_box_w) / 2);
832						//var right = $fixedbanner.outerWidth() - (left + banner_box_w);
833						var left2 = left1 + banner_w[0] + space;
834
835						banner[0].css({
836							left	: left1,
837							right	: "auto"
838						});
839
840						banner[1].css({
841							left	: left2,
842							right	: "auto"
843						});
844					} else {
845						var space        = banner_l[0] - (banner_l[1] + banner_w[1]);
846						var banner_box_w = (banner_l[0] + banner_w[0]) - banner_l[1];
847						var left1        = Math.floor(($fixedbanner.outerWidth() - banner_box_w) / 2);
848						//var right      = $fixedbanner.outerWidth() - (left + banner_box_w);
849						var left2        = left1 + banner_w[1] + space;
850
851						banner[0].css({
852							left	: left2,
853							right	: "auto"
854						});
855
856						banner[1].css({
857							left	: left1,
858							right	: "auto"
859						});
860					}
861				} else if (banner.length == 1) {
862					//バナー1のみの場合
863					var elm_l = Math.floor(($fixedbanner.outerWidth() - banner_w[0]) / 2);
864
865					if (banner_w[0] < 0) {
866						elm_l = 0;
867					}
868
869					banner[0].css({
870						left	: elm_l,
871						right	: "auto"
872					});
873				}
874*/
875			},
876
877			/* 固定メニュー */
878			fixed_menu_init	: function(configs) {
879				var $win                  = $(window);
880				var $fixed_menu           = $('#fixed_menu');
881				var $fixed_menu_list      = $('#fixed_menu_list');
882				var $fixed_menu_scroll    = $('#fixed_menu_scroll');
883				var $share_list           = $('#share-list');
884				var $share_list_top       = $('.share-list-top');
885				var $share_list_scroll    = $('#share-list-scroll');
886				var $language_list        = $('#language-list');
887				var $language_list_top    = $('.language-list-top');
888				var $language_list_scroll = $('#language-list-scroll');
889				var admin_flg             = configs.admin_flg;
890				var fixed_menu_pos        = configs.fixed_menu_pos;
891				var hp_pos                = configs.hp_pos;
892				var hp_overlaid           = configs.hp_overlaid;
893
894				if (fixed_menu_pos == 1) {
895					if($('#footer').length){
896						$('#footer').css('margin-bottom', '50px');
897					}else{
898						$('#middle-area').css('margin-bottom', '50px');
899					}
900					var fixedMenuHeight = $fixed_menu.height();
901					if ($('.share-list-bottom').length) {
902						$('.share-list-bottom').css('bottom', fixedMenuHeight + 'px');
903					}
904					if ($('.language-list-bottom').length) {
905						$('.language-list-bottom').css('bottom', fixedMenuHeight + 'px');
906					}
907					if ($('#current-language').length) {
908						$('#current-language').css('bottom', fixedMenuHeight + 'px');
909					}
910				} else {
911					$fixed_menu.parent('#parts39-center').addClass('bottom-edit-panel');
912					//ヘッダー固定しない場合
913					if (hp_pos == 1) {
914					//ヘッダー固定する場合
915					} else {
916						$('#header').css('cssText', 'padding-top: 0 !important;');
917						$('#header').find('#a-logo-area').css('position', 'static');
918					}
919					$win.on('load scroll', function() {
920						var value = $(this).scrollTop();
921						if (value > 100) {
922							$fixed_menu_scroll.addClass('fm_scroll');
923						} else {
924							$fixed_menu_scroll.removeClass('fm_scroll');
925							if ($('.share-list-scroll').hasClass('fm-share-show')) {
926								$('.share-list-scroll').removeClass('fm-share-show');
927							}
928							if ($('.language-list-scroll').hasClass('fm-language-show')) {
929								$('.language-list-scroll').removeClass('fm-language-show');
930							}
931						}
932					});
933				}
934
935				//シェアプルダウン
936				$fixed_menu.find('.fm-share-btn').on('click', function () {
937					$share_list.toggleClass('fm-share-show');
938					//言語切替プルダウンが出てたら閉じる
939					if ($language_list.hasClass('fm-language-show')) {
940						$language_list.removeClass('fm-language-show');
941					}
942					if ($fixed_menu.find('#current-language').hasClass('fm-language-show')) {
943						$fixed_menu.find('#current-language').removeClass('fm-language-show');
944					}
945				});
946				$fixed_menu_scroll.find('.fm-share-btn').on('click', function() {
947					$share_list_scroll.toggleClass('fm-share-show');
948					//言語切替プルダウンが出てたら閉じる
949					if ($language_list_scroll.hasClass('fm-language-show')) {
950						$language_list_scroll.removeClass('fm-language-show');
951					}
952					//スクロール前のシェアプルダウンが出てたら閉じる
953					if ($share_list_top.hasClass('fm-share-show')) {
954						$share_list_top.removeClass('fm-share-show');
955					}
956					//言語切替プルダウンが出てたら閉じる
957					if ($language_list.hasClass('fm-language-show')) {
958						$language_list.removeClass('fm-language-show');
959					}
960				});
961
962				//言語切替プルダウン
963				$fixed_menu.find('#current-language').on('click', function () {
964					$language_list.toggleClass('fm-language-show');
965					$fixed_menu.find('#current-language').removeClass('fm-language-show');
966				});
967				$fixed_menu.find('.fm-language-btn').on('click', function () {
968					$fixed_menu.find('#current-language').toggleClass('fm-language-show');
969					//シェアプルダウンが出てたら閉じる
970					if ($share_list.hasClass('fm-share-show')) {
971						$share_list.removeClass('fm-share-show');
972					}
973					if ($language_list.hasClass('fm-language-show')) {
974						$language_list.removeClass('fm-language-show');
975						$fixed_menu.find('#current-language').removeClass('fm-language-show');
976					}
977				});
978				$fixed_menu_scroll.find('.fm-language-btn').on('click', function() {
979					$language_list_scroll.toggleClass('fm-language-show');
980					//シェアプルダウンが出てたら閉じる
981					if ($share_list_scroll.hasClass('fm-share-show')) {
982						$share_list_scroll.removeClass('fm-share-show');
983					}
984					//スクロール前の言語切替プルダウンが出てたら閉じる
985					if ($language_list_top.hasClass('fm-language-show')) {
986						$language_list_top.removeClass('fm-language-show');
987					}
988					//シェアプルダウンが出てたら閉じる
989					if ($share_list.hasClass('fm-share-show')) {
990						$share_list.removeClass('fm-share-show');
991					}
992				});
993			},
994		});
995
996		/*一旦スクリプトで高さをいれる、あとで高さの%について検討*/
997		if (((real_device != 'pc' && device == 'pc') || (!$bg.data('sp-type') && device == "pc") || (device == "pc" && $bg.data('capture'))) && !BaseUrl.match(/(dsadmin)/)) {
998			var winW = $win.width();
999			if (!winW) {
1000				if ($bg.data('capture')) {
1001					winW = 1020;
1002				} else {
1003					winW = 1280;
1004				}
1005			}
1006			var winH = (parseInt(winW) / 16) * 9;
1007
1008			if (!$bg.data('sp-type')) {
1009				$sections.each(function() {
1010					var $_this = $(this);
1011
1012					if(!$(this).data('detail-flg')){
1013						var sctH   = winH;
1014
1015						if ($_this.find('.block-area').length && ($_this.find('.block-area').length <= 1)) {
1016							sctw = $_this.find('.block-area').eq(0).width();
1017							sctH = (parseInt(sctw) / 16) * 9;
1018						}
1019
1020						var formHeight = $_this.data('form-height');
1021						//一度背景編集でheightを入れていればそちらの値を使用
1022						if (formHeight){
1023							var $header = $('#header');
1024							var fixedFlg = $header.data('fixed-flg');
1025							if ($_this.index() == 0 && fixedFlg == 0){
1026								var windowHeight = $win.height();
1027								var headerHeight = $header.height();
1028								// formHeight = Math.round(((windowHeight - headerHeight) / windowHeight) * 10000) / 100;
1029								$_this.css('height', 'calc(100vh - '+headerHeight+'px)');
1030							}else{
1031								$_this.height(formHeight);
1032							}
1033						}else{
1034							//var h = sctH * (parseInt($_this.data('height')) / 100);
1035							var h = sctH * (parseFloat($_this.data('height')) / 100);
1036							h = Math.round(h);
1037							$_this.height(h);
1038						}
1039					}else{
1040						var h = sctH * (parseFloat($_this.data('height')) / 100);
1041						$_this.height(h);
1042					}
1043				});
1044			} else {
1045				$('body, html').css('overflow', 'visible');
1046				$sections.height(winH);
1047			}
1048
1049			//#4274 matuuchi シングルページ タブレット対応
1050			if(real_device == "tablet" && !BaseUrl.match(/(dsadmin)/) && $bg.find(".section-full0").length){
1051				//var tb_fs = $bg.find(".section-full0").eq(0).css("font-size");
1052				var tbfontSize = parseInt($bg.data('bd_fsize'));
1053				var bW_size = parseInt($bg.find(".block-area").eq(0).width());
1054				var tbRatio = bW_size / 1100;
1055
1056				//tbfontSize = Math.floor(tbfontSize * (bW_size / 1100));
1057				//tbfontSize = tbfontSize * (bW_size / 1100);
1058				tbfontSize = Math.floor(tbfontSize * tbRatio);
1059
1060				$bg.find(".section-full0").css("font-size",tbfontSize + "px");
1061			}
1062		}
1063		//タブレット表示時 セクション次へ前へは稼働しないようにしているので非表示
1064		if(real_device == "tablet" && !BaseUrl.match(/(dsadmin)/) && $bg.find(".section-full1").length){
1065			$(".toscroll-btn-box").hide();
1066		}
1067
1068		var winW = $win.width();
1069		if (!winW) winW = 1280;
1070		var full_flg = false;
1071
1072		window.onload = function() {
1073			if (device == 'pc') {
1074				//ページタイプが全てできたら下のif文へ
1075				var timer    = false,
1076					$fontBtn = $('#header .font-size-btns');
1077				$(window).on('resize.fontsize', $.throttle(1000, function(i) {
1078					//フルページ 高さが変わった際の対応
1079					var r_width      = 16,
1080						winH         = (parseInt($bg.width()) / r_width) * 9,
1081						$sections    = $('section.section-full1'),
1082						rwinH        = $win.height(),
1083						full_flg     = false,
1084						text_history = 1; //#2750
1085
1086					if (rwinH < winH && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) {
1087						winW     = ($win.height() / 9) * 16;
1088						full_flg = true;
1089					} else {
1090						winW = $bg.width();
1091					}
1092
1093					//#2750
1094					if ($fontBtn.find('.font-btn.active').length) {
1095						var history  = parseInt($fontBtn.find('.font-btn.active').data('size'), 10);
1096						text_history = ((history - 1) * 0.2) + 1;
1097					}
1098
1099					//windowサイズ変更時 フォントサイズ変更
1100					basis = 1100;
1101					if (BaseUrl.match(/(dsadmin)/) || $bg.data('capture')) {
1102						if (winW < basis) {
1103							winW = basis;
1104						}
1105					}
1106
1107					fontSize = parseInt($bg.data('bd_fsize'));
1108					fontSize = Math.floor((fontSize * (winW / basis)) * 100) / 100;
1109					$bg.data('rsize-font', fontSize);
1110
1111					//matu スペシャルページ パララックスタイプ時 文字拡大が動かなくなるので戻す
1112					// fontSize = fontSize * text_history;
1113					// $sections.each(function () {
1114					// 	$(this).css('font-size', fontSize + "px").addClass('font-resize');
1115					// });
1116					fontSize = fontSize * text_history;
1117					$bg.css('font-size', fontSize + "px").addClass('font-resize');
1118
1119					if (!BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) {
1120						if (full_flg) {
1121							$sections.each(function() {
1122								var $_this = $(this);
1123								$_this.find('.section-area').each(function() {
1124									var r_split  = Math.ceil(parseInt(winH) / $(this).width()),
1125										br_width = r_width / r_split,
1126										b_width  = (rwinH / 9) * br_width;
1127									$(this).find('.block-area').css({'height': "100%", 'top': "auto", 'margin-top': "auto"});
1128									$(this).find('.block-area').css('width', b_width + "px");
1129								});
1130							});
1131						} else {
1132							$sections.each(function(){
1133								var $_this = $(this);
1134								$_this.find('.block-area').css({'width': "100%", 'height': "100%"});
1135							});
1136						}
1137					}
1138				})).trigger('resize.fontsize');
1139			}
1140
1141			// #2660 SP・デザイン調整 KAWANAKA ロゴ/メニュー中央揃え
1142			if (device == 'pc') {
1143				$win.on('resize.center_layout', $.throttle(1000, function(i) {
1144					$.partsSetLayout('logo', $('#header'));
1145					$.partsSetLayout('hmenus', $('#header'));
1146
1147					// #3236 フッターロゴ/コピーライトのセンタリング
1148					$.partsSetLayout('logo', $('#footer'));
1149					$.partsSetLayout('copyright', $('#footer'));
1150
1151					// #2827 固定バナー
1152					$.fixedbannerPartsSetLayout('banner');
1153				}));
1154			}
1155
1156			setTimeout(function() {
1157				
1158				//2023/1/6 mizue 管理画面で要素が取れていなかったので再度取得
1159				$totop_btn = $('#totop-btn');
1160
1161				if (real_device == 'pc' && device == 'pc' && $bg.data('sp-type') == 1 && !BaseUrl.match(/(dsadmin)/) && !$bg.data('capture')) {
1162					// #4285 matuuchi ナビげージョン表示しない場合 メニュー等の移動が行えないため
1163					// #2660 SP・デザイン調整 KAWANAKA サイドナビゲーション設定
1164					var sidenav_flg = ($bg.data('sidenav-flg') === 1 || $bg.data('sidenav-flg') === "1");
1165
1166					//if ($sections.length <= 1) {
1167					//	pagination = false;
1168					//}
1169
1170					var pagination = true;
1171
1172					$('#main').onepage_scroll({
1173						sectionContainer	: "section",
1174						responsiveFallback	: 600,
1175						loop				: true,
1176						// #2660 SP・デザイン調整 KAWANAKA サイドナビゲーション設定
1177						pagination			: pagination,
1178						afterMove			: function(i) {
1179							if ($animate_item.length) {
1180								$.section_animate_init($sections.eq(i - 1));
1181							}
1182
1183							if ($totop_btn.length) {
1184								if (i <= 1) {
1185									$totop_btn.fadeOut(300);
1186								} else {
1187									$totop_btn.fadeIn(300);
1188								}
1189								$.toptop_pos();
1190							}
1191							scrollheat(i - 1);
1192
1193							if (i == $sections.length) {
1194								$('#toscroll-btn-down-box').addClass('hide-down');
1195								$('#toscroll-btn-up-box').addClass('show-up');
1196							} else {
1197								$('#toscroll-btn-down-box').removeClass('hide-down');
1198								$('#toscroll-btn-up-box').removeClass('show-up');
1199							}
1200						},
1201						beforeMove			: function(i) {
1202							// #2660 SP・デザイン調整 KAWANAKA ヘッダーメニュー固定
1203							if ($('#header').data('fixed-flg') === 1 || $('#header').data('fixed-flg') === "1") {
1204								$.header_fixed((i == 1));
1205							}
1206
1207							//ナビゲーション統一化 メニュースクロール時動作種別 kondo
1208							var $hmpScFlg = 0;
1209							var $hmpFlg   = 0;
1210							if($('.parts-area').data('area') == 'header'){
1211								$hmpScFlg = $('.parts-area').data('hmp-sc-flg');
1212								$hmpFlg   = $('.parts-area').data('hmp-flg');
1213							}
1214							if ($('#header').hasClass('normal-header')) {
1215								if (i <= 1) {
1216									if($hmpScFlg == 1){
1217										$.hidden_hdmenu();
1218									}else if($hmpScFlg == 2 && $hmpFlg == 0){
1219										$.hidden_normal_hdmenu();
1220									}
1221								} else {
1222									if($hmpScFlg == 1){
1223										$.visible_hdmenu();
1224									}else if($hmpScFlg == 2 && $hmpFlg == 0){
1225										$.visible_normal_hdmenu();
1226									}
1227
1228								}
1229							}
1230
1231							//#3307 matuuchi spブロック1枚時アニメーション制御
1232							if ($animate_item.length && pagination) {
1233								$sections.eq(i - 1).find('div.animate-item').each(function() {
1234									$(this).removeClass('animated '+$(this).data('animate'));
1235								});
1236							}
1237
1238							if ($totop_btn.length) {
1239								if (i <= 1) {
1240									$totop_btn.fadeOut(300);
1241								} else {
1242									$totop_btn.fadeIn(300);
1243								}
1244								$.toptop_pos();
1245							}
1246						}
1247					});
1248
1249					// #4285 matuuchi ナビげージョン表示しない場合 メニュー等の移動が行えないため
1250					//ナビげージョン見せなくする
1251					if (sidenav_flg < 1) {
1252						$('ul.onepage-pagination').hide();
1253					}
1254
1255					if ($animate_item.length) {
1256						$.section_animate_init($sections.eq(0));
1257					}
1258
1259					//TOPへ戻るボタン
1260					$totop_btn.on('click', function() {
1261						$('ul.onepage-pagination li:first a').trigger('click');
1262						return false;
1263					});
1264
1265					// #2660 SP・デザイン調整 KAWANAKA ページ内移動ボタン
1266					var $toscroll_btn_list = $('.toscroll-btn-box');
1267					var $main              = $('#main');
1268					var $footer            = $('#footer');
1269					var footer_h           = 0;
1270					var $fixedbanner       = $('#fixedbanner');
1271					var fixedbanner_h      = 0;
1272					var fd_pos             = $('#bg').data('fd-pos');
1273					//#4841
1274					var $toscroll_up_btn = $('#toscroll-btn-up-box');
1275
1276
1277					// #2660 SP・デザイン調整 KAWANAKA ページ内移動ボタン
1278					if ($footer.length) {
1279						footer_h = $('#footer').height();
1280					}
1281
1282					// #2827 固定バナー KAWANAKA
1283					if ($fixedbanner.length) {
1284						fixedbanner_h = $fixedbanner.height();
1285					}
1286
1287					// #2660 SP・デザイン調整 KAWANAKA ページ内移動ボタン
1288					$toscroll_btn_list.each(function(i) {
1289						var $toscroll_btn = $(this);
1290						var $a            = $toscroll_btn.find('a').eq(0);
1291						var toscroll_top  = 20;
1292						//#4841
1293						var toscroll_last_top  = 20;
1294
1295						if (fd_pos === "2" || fd_pos === 2) {
1296							toscroll_top += (footer_h + fixedbanner_h);
1297							toscroll_last_top = toscroll_top;
1298						} else {
1299							//#4841 フッター固定ではない時の対応
1300							toscroll_last_top += (footer_h + fixedbanner_h);
1301							// #4972
1302							if ($fixedbanner.length) {
1303								toscroll_top += fixedbanner_h;
1304							}
1305						}
1306
1307						$toscroll_btn.css('bottom', toscroll_top);
1308						$toscroll_up_btn.css('bottom', toscroll_last_top);	//#4841
1309
1310						if ($toscroll_btn.data('position') === "right") {
1311							$toscroll_btn.css('paddingRight', 20);
1312							$toscroll_btn.css('textAlign', "right");
1313
1314							var box_w = $toscroll_btn.width();
1315							var a_w   = $a.width();
1316
1317							var a_m_left = box_w - (a_w + 20);
1318							if (a_m_left > 0) {
1319								$a.css('marginLeft', a_m_left);
1320							}
1321						}
1322
1323						$a.on('click', function() {
1324							//#4242
1325						    // 2重送信防止クラスのチェック
1326						    if ( $(this).hasClass('double_click') ){
1327						        return false;
1328						    }
1329							$(this).addClass('double_click');
1330
1331							$main.moveDown();
1332
1333							//#4242
1334							$(this).removeClass('double_click');
1335
1336							return false;
1337						});
1338					});
1339
1340					if (window.location.hash != "") {
1341						if (window.location.hash.match(/#sp_/)) {
1342							$.onepageToMove(window.location.hash.replace("#sp_", ""));
1343						} else {
1344							$.onepageToMove(window.location.hash.replace("#", ""));
1345						}
1346					}
1347
1348					if ($hblock_menu.length || $area.length || $header_image_area || $DSheder_menu.length) {
1349						$hblock_menu.find('a').on('click', function() {
1350							var href = $(this).attr('href');
1351							var hash = window.location.hash;
1352
1353							//#4713
1354							if (href.match(/#sp_/)) {
1355								href = $(this).attr('href').split("#")[1];
1356								$.onepageToMove(href.replace("#sp_", ""));
1357							} else {
1358								if(href.match("#section")){
1359									href = $(this).attr('href').split("#")[1];
1360									$.onepageToMove(href.replace("#", ""));
1361								//#4760
1362								}else{
1363									return true;
1364								}
1365							}
1366							return false;
1367						});
1368
1369
1370						$header_image_area.find('a').on('click', function() {
1371							var href = $(this).attr('href');
1372							if(href.match("#section")){
1373								href = href.replace(/.*#section/,"section");
1374								$.onepageToMove(href);
1375							//#4507
1376							}else if(href.match(/#sp_/)){
1377								$.onepageToMove(href.replace("#sp_", ""));
1378							}else{
1379								return true;
1380							}
1381							return false;
1382						});
1383
1384						// #3592 ページ内リンクの修正
1385						$area.find('a').on('click', function() {
1386							var href = $(this).attr('href').split("#");
1387							var hash = window.location.hash;
1388							if (hash) {
1389								var location_url = window.location.href.split("#");
1390								var location_url = location_url[0];
1391							} else {
1392								var location_url = window.location.href
1393							}
1394
1395							if (href[0] == location_url && href[1]) {
1396								var hash = "#"+href[1];
1397								if (hash.match(/#sp_/)) {
1398									$.onepageToMove(hash.replace("#sp_", ""));
1399								} else {
1400									$.onepageToMove(hash.replace("#", ""));
1401								}
1402								return false;
1403							}
1404						});
1405
1406						//#4760
1407						$DSheder_menu.find('a').on('click', function() {
1408							var href = $(this).attr('href').split("#");
1409							var hash = window.location.hash;
1410							if (hash) {
1411								var location_url = window.location.href.split("#");
1412								var location_url = location_url[0];
1413							} else {
1414								var location_url = window.location.href
1415							}
1416
1417							if (href[0] == location_url && href[1]) {
1418								var hash = "#"+href[1];
1419								if (hash.match(/#sp_/)) {
1420									$.onepageToMove(hash.replace("#sp_", ""));
1421								} else {
1422									$.onepageToMove(hash.replace("#", ""));
1423								}
1424								return false;
1425							}
1426						});
1427					}
1428				} else {
1429					//アニメション
1430					if ($animate_item.length) {
1431						target = window;
1432						if($("#bg").hasClass('ad-admin')) target = document;
1433						$(target).on('scroll.anim', $.throttle(1000, function(i) {
1434							scroll       = $win.scrollTop();
1435							windowHeight = $win.height();
1436
1437							$animate_item.each(function() {
1438								$.item_animate_init($(this));
1439							});
1440						})).trigger('scroll.anim');
1441					}
1442
1443					if ($totop_btn.length) {
1444						$(window).on('scroll.totop', function(i) {
1445							var now      = $win.scrollTop();
1446							windowHeight = $win.height();
1447
1448							// 最上部から現在位置までの距離を取得して、変数[now]に格納
1449							if (50 < now) {
1450								$totop_btn.fadeIn(300);
1451							} else {
1452								$totop_btn.fadeOut(300);
1453							}
1454
1455							$.toptop_pos();
1456						}).trigger('scroll.totop');
1457
1458						$totop_btn.on('click', function() {
1459							$('html,body').animate({scrollTop: 0}, 'slow');
1460							return false;
1461						});
1462					}
1463
1464					if (!BaseUrl.match(/(dsadmin)/)) {
1465						// #3592 スマフォ画面のページ内リンクの修正
1466						if (window.location.hash != "") {
1467							if (window.location.hash.match(/#sp_/)) {
1468								position   = window.location.hash.replace("#sp_", "");
1469								hrefOffset = $('#'+position).offset().top;
1470								$('body,html').animate({scrollTop: hrefOffset}, 'slow');
1471							}
1472						}
1473
1474						if ($hblock_menu.length || $area.length || $header_image_area.length || $DSheder_menu.length) {
1475							$hblock_menu.find('a').on('click', function() {
1476								var href = $(this.hash);
1477
1478								//#4713
1479								var hash = this.hash;
1480								if(hash.length && hash.match(/#sp_/)){
1481									hash = hash.replace("#sp_", "");
1482									href = $("#" + hash);
1483								}
1484
1485								if (href) {
1486									var hrefOffset = href.offset().top;
1487									$('html,body').animate({scrollTop: hrefOffset}, 'slow');
1488								}
1489							});
1490
1491							if($header_image_area.find('a').length){
1492								if($header_image_area.find('a').attr('href').match("#section")){
1493									$header_image_area.find('a').on('click', function() {
1494										var href = $(this.hash);
1495										if (href) {
1496											var hrefOffset = href.offset().top;
1497											$('html,body').animate({scrollTop: hrefOffset}, 'slow');
1498										}
1499									});
1500								}
1501							}
1502
1503							// #3592 スマフォ画面のページ内リンクの修正
1504							$area.find('a').on('click', function() {
1505								var href = $(this).attr('href').split('#');
1506								var hash = window.location.hash;
1507
1508								if (hash) {
1509									var location_url = window.location.href.split('#');
1510									var location_url = location_url[0];
1511								} else {
1512									var location_url = window.location.href
1513								}
1514
1515								if(href[0].slice(-1) != "/"){
1516									href[0] = href[0] + "/";
1517								}
1518
1519								if (href[0] == location_url && href[1]) {
1520
1521									var hash = "#"+href[1];
1522									if (hash.match(/#sp_/)) {
1523										position   = hash.replace("#sp_", "");
1524										hrefOffset = $("#"+position).offset().top;
1525										$('html,body').animate({scrollTop: hrefOffset}, 'slow');
1526
1527										return false;
1528									}
1529								}
1530							});
1531
1532							// #3592 スマフォ画面のページ内リンクの修正
1533							$DSheder_menu.find('a').on('click', function() {
1534								var href = $(this).attr('href').split('#');
1535								var hash = window.location.hash;
1536
1537								if (hash) {
1538									var location_url = window.location.href.split('#');
1539									var location_url = location_url[0];
1540								} else {
1541									var location_url = window.location.href
1542								}
1543
1544								if (href[0] == location_url && href[1]) {
1545									var hash = "#"+href[1];
1546									if (hash.match(/#sp_/)) {
1547										position   = hash.replace("#sp_", "");
1548										hrefOffset = $("#"+position).offset().top;
1549										$('html,body').animate({scrollTop: hrefOffset}, 'slow');
1550
1551										return false;
1552									}
1553								}
1554							});
1555						}
1556					}
1557
1558					/* #2827 固定バナー 2016-12-26 */
1559					var $fixedbanner = $('#fixedbanner');
1560					if ($('#fixedbanner-box').length) {
1561						fixedbanner_h = $fixedbanner.outerHeight();
1562						$('#fixedbanner-padding-box').css('min-height', fixedbanner_h);
1563					}
1564				}
1565
1566				// #2660 SP・デザイン調整 KAWANAKA ヘッダーメニュー固定
1567				var $header = $('#header');
1568
1569				// #2660 SP・デザイン調整 KAWANAKA ヘッダーメニュー固定
1570				if ($header.data('fixed-flg') === 1 || $header.data('fixed-flg') === "1") {
1571					$win.on('scroll.header_fixed', $.throttle(1000, function(i) {
1572						// #3592
1573						if (window.location.hash != "") {
1574							if (window.location.hash.match(/#sp_/)) {
1575								var hash          = window.location.hash;
1576								var section_id    = window.location.hash.replace("sp_", "");
1577								// #4721
1578								if ($bg.data('sp-type')) {
1579									var section_order = $(section_id).attr('data-index');
1580								} else {
1581									$(section_id).attr('data-index');
1582									var section_order = $win.scrollTop();
1583								}
1584							} else {
1585								var section_order = $win.scrollTop();
1586							}
1587						} else {
1588							var section_order = $win.scrollTop();
1589						}
1590
1591						$.header_fixed((section_order <= 1 || !section_order));
1592					})).trigger('scroll.header_fixed');
1593				}
1594
1595				setTimeout(function() {
1596					$area.each(function() {
1597						$.section_init($(this));
1598					});
1599				}, 100);
1600			}, 50);
1601
1602			if (device == 'smart') {
1603				var $mmenu_wrap = $('#mobile-menu');
1604				$mmenu_wrap.find('li > a span.sm-open-btn').on('click', function(e) {
1605					$mbtn = $(this).closest('a').next();
1606					if ($mbtn.length) {
1607						$mbtn.toggle();
1608
1609						var visible_flg = false;
1610						if ($mbtn.is(':visible')) {
1611							visible_flg = true;
1612						} else if ($mbtn.css('display') === "block") {
1613							visible_flg = true;
1614						}
1615
1616						if (visible_flg) {
1617							$(this).find('i').attr('class', "fa fa-minus-square-o");
1618						} else {
1619							$(this).find('i').attr('class', "fa fa-plus-square-o");
1620						}
1621					}
1622					return false;
1623				}).end().find("li.open-sub-menu:not(.local-menu) > a span.sm-open-btn").trigger("click");
1624
1625				$('a[href^="tel:"]').bind('click', function() {
1626					if(typeof gtag !== "undefined") {
1627						gtag('event', 'tap', {
1628							'event_category': "mobile",
1629							'event_label': "tel"
1630						});
1631					}
1632
1633					if(typeof ga !== "undefined") {
1634						ga('send', 'event', "mobile", "tap", "tel");
1635					}
1636
1637					if(typeof _gaq !== "undefined") {
1638						_gaq.push(['_trackEvent', 'mobile', 'tap', 'tel']);
1639					}
1640				});
1641
1642			}
1643
1644			// #2660 SP・デザイン調整 KAWANAKA ロゴ/メニュー中央揃え
1645			$.partsSetLayout('logo', $('#header'));
1646			$.partsSetLayout('hmenus', $('#header'));
1647
1648			// #3236 フッターロゴ/コピーライトのセンタリング
1649			$.partsSetLayout('logo', $('#footer'));
1650			$.partsSetLayout('copyright', $('#footer'));
1651
1652			// #2827 固定バナー
1653			$.fixedbannerPartsSetLayout('banner');
1654		}
1655
1656		// リサイズ時に画像調整を実行
1657		$(window).on('resize', function() {
1658			background_size_cover('.backgroundYoutube', 16, 9);
1659		});
1660	//});
1661	}
1662
1663	// 背景動画のサイズ調整
1664	function background_size_cover(selector, aspectW, aspectH) {
1665		$(selector).each(function() {
1666			// 画面サイズの取得
1667			var windowWidth  = $(this).closest('.section-area').width();
1668			var windowHeight = $(this).closest('.section-area').height();
1669
1670			// 画面サイズの比率を引数で設定した比率と比較
1671			if ((windowWidth / aspectW * aspectH) < windowHeight) {
1672				// 画面の比率が縦長の場合
1673				// 縦横比を保持して、画面を完全に覆う最小サイズと配置位置を取得
1674				var bgWidth  = windowWidth;
1675				var bgHeight = Math.floor(bgWidth / aspectW * aspectH);
1676				var bgTop    = (windowHeight - bgHeight) / 2;
1677				var bgLeft   = 0;
1678			} else {
1679				// 画面の比率が横長の場合
1680				// 縦横比を保持して、画面を完全に覆う最小サイズと配置位置を取得
1681				var bgHeight = windowHeight;
1682				var bgWidth  = Math.floor(bgHeight / aspectH * aspectW);
1683				var bgTop    = 0;
1684				var bgLeft   = (windowWidth - bgWidth) / 2;
1685			}
1686
1687			// 動画のサイズと位置の指定
1688			$(this).css({
1689				top		: bgTop,
1690				left	: bgLeft,
1691				width	: bgWidth,
1692				height	: bgHeight
1693			});
1694		});
1695	}
1696
1697	// scrollヒート(パララックスタイプ用)
1698	function scrollheat(st_index) {
1699		var sectionh         = $('section.section-full1').eq(0).height();
1700		var sectionC         = $('section.section').length;
1701		var scroll_y         = sectionh * st_index;
1702		var pageHeight       = sectionh * sectionC;
1703		var scroll_count_url = analysisUrl+'/scroll_tracking';
1704		var windowWidth      = $(window).width();
1705		var windowHeight     = $(window).height();
1706
1707		// 送信データ
1708		sc_data = {
1709			x			: 0,
1710			y			: scroll_y,
1711			page_id		: $('#bg').data('page-id'),
1712			site_type	: $('#bg').data('device'),
1713			url			: location.href,
1714			'window'	: windowWidth + ',' + windowHeight,
1715			'height'	: windowHeight,
1716			'width'		: windowWidth,
1717			'page_size'	: windowWidth + ',' + pageHeight,
1718		};
1719
1720		$.ajax({
1721			type	: "POST",
1722			cache	: false,
1723			data	: sc_data,
1724			async	: true,
1725			url		: scroll_count_url,
1726			success	: function() {
1727
1728			}
1729        });
1730
1731		if(typeof $.insertUAObj== 'function') {
1732			$.insertUAObj('scroll',sc_data);
1733		}
1734	}
1735}($);

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.