PageSourceSearch

https://official.sand-minamisatsuma.jp/wp-content/themes/sunano-sa…?ver=ac1cca4606da22a21d9e9dbfdd8622ab

js sand-minamisatsuma.jp collected 2026-10-04 07:45:23 UTC 36,865 bytes, 1,144 lines download raw bytes

1var dw_l  = 1260;
2var dw_m  = 767;
3var dw_s  = 509;
4var dw_lp = dw_l + 1;
5var dw_mp = dw_m + 1;
6var dw_sp = dw_s + 1;
7
8var header_c = "01";
9
10+function($) {
11	/* variables */
12	var elementWindow            = $(window);
13	var elementHtmlBody          = $('html, body');
14	var elementImg               = $('img');
15	var elementScrollBackImage   = $('.scroll-back-image');
16	var attributeScrollBackImage = [[]];
17	var elementScrollBackPattern = $('.scroll-back-pattern');
18	var elementScrollUp          = $('#scroll-up');
19	var elementScrollxWrap       = document.getElementsByClassName('scrollx-wrap');
20	var scrollxWrapBol_x         = {},
21		scrollxWrapBol_l         = {},
22		scrollxWrapBol_m         = {},
23		scrollxWrapBol_s         = {};
24
25	var elementEeffect           = $('.effect');
26	var elementEffectOnce        = $('.effect-once');
27
28	var displayWidth             = '';
29	var displayHeight            = '';
30	var scrollTop                = '';
31
32	/* load */
33	elementWindow.on('load', function() {
34		displayWidth  = document.documentElement.clientWidth;
35		displayHeight = document.documentElement.clientHeight;
36		tabActive();
37		actionSmoothScroll();
38		var inViewTimer;
39		inViewTimer = setInterval(function() {
40			if ( elementEeffect.length === 0 && elementEffectOnce.length === 0 ) {
41				clearInterval( inViewTimer );
42				inViewTimer = null;
43			} else {
44				effectInViewport( elementEeffect );
45				effectOnceInViewport( elementEffectOnce );
46			}
47		}, 200);
48	});
49
50	/* timer */
51	var timer          = false;
52	var loadResizeOnce = true;
53	elementWindow.on('load resize orientationchange', function() {
54		if (timer !== false) {
55			clearTimeout(timer);
56		}
57		timer = setTimeout(function() {
58			displayWidth  = document.documentElement.clientWidth;
59			displayHeight = document.documentElement.clientHeight;
60			tabLabelOverflow();
61			tableLikeColumn();
62			deviceShowGroup();
63			clipShortcode();
64			verticalColumn();
65			adjustArea();
66			equalJustify();
67			scrollBackImagePosition();
68			scrollX();
69			loopSliderSetting();
70			windowResize();
71			if (loadResizeOnce) {
72				scrollFunction();
73				loadResizeOnce = false;
74			}
75		}, 200);
76	});
77
78	window.onload = function() {
79		setTimeout(function() {
80			adjustArea();
81		}, 2000)
82	};
83
84	var interval = 20;
85	var lastTime = new Date().getTime() - interval;
86	elementWindow.on('scroll', function() {
87		if ((lastTime + interval) <= new Date().getTime()) {
88	        lastTime = new Date().getTime();
89			scrollFunction();
90		}
91	});
92
93	function scrollFunction() {
94		scrollTop = parseInt(elementWindow.scrollTop());
95		scrollUpFade(elementScrollUp);
96		scrollBackImageInViewport(elementScrollBackImage, attributeScrollBackImage);
97		scrollBackPatternInViewport(elementScrollBackPattern);
98	}
99
100	/* navigation */
101	if ( header_c !== '02' ) {
102		function mainNavigation() {
103			var container, button;
104
105			container = document.getElementById( 'site-navigation' );
106			if ( ! container )
107				return;
108
109			button = container.getElementsByTagName( 'h2' )[0];
110			if ( 'undefined' === typeof button )
111				return;
112
113			button.onclick = function() {
114				if ( container.className.indexOf( 'main-small-navigation' ) !== -1 ) {
115					button.getElementsByTagName( 'span' )[4].innerText = button.getElementsByTagName( 'span' )[4].innerText.replace( 'CLOSE', 'MENU' );
116					container.className = container.className.replace( 'main-small-navigation', 'main-navigation' );
117				} else {
118					button.getElementsByTagName( 'span' )[4].innerText = button.getElementsByTagName( 'span' )[4].innerText.replace( 'MENU', 'CLOSE' );
119					container.className = container.className.replace( 'main-navigation', 'main-small-navigation' );
120				}
121			};
122			return;
123		}
124		mainNavigation();
125	}
126
127	/* element nesting */
128	function elementNesting(target_class, add_class) {
129		let elements       = document.getElementsByClassName( target_class );
130		let elementsLength = elements.length;
131		for ( let i = 0; i < elementsLength; i++ ) {
132			elements[i].innerHTML = '<span class="' + add_class + '">' + elements[i].innerHTML + '</span>';
133		}
134	}
135	//elementNesting('large-headline-copy', 'decoration');
136
137	/* tabs */
138	function tabLabelOverflow() {
139		$('.tab-label-inner').each(function() {
140			var tabLabelWidth      = $(this).parent().width();
141			var tabLabelInnerWidth = 1;
142			for ( var i = 0; i < $(this).find('li').length; i++ ) {
143				tabLabelInnerWidth += $(this).find('li').eq(i).width();
144			}
145			if ( tabLabelWidth < tabLabelInnerWidth && tabLabelWidth !== 0 ) {
146				$(this).css({'width':tabLabelInnerWidth});
147				$(this).parent().addClass('tab-overflow');
148			} else {
149				$(this).css({ 'width':'auto' });
150				$(this).parent().removeClass('tab-overflow');
151			}
152		});
153	}
154	function tabActive() {
155		$('.tab-label-inner>li:first-child').addClass('active');
156		$('.tab-content>div:first-child').addClass('active');
157	}
158	$('.tab-label-inner a').on('click', function(e) {
159		e.preventDefault();
160		var target = $(this).attr('href');
161		if ( ! $(target).length ) return false;
162		$('>li', $(this).closest('.tab-label-inner')).removeClass('active');
163		$(this).closest('.tab-label-inner>li').addClass('active');
164		$('>div', $(target).closest('.tab-content')).removeClass('active');
165		$(target).addClass('active');
166	});
167
168	/* accordion */
169	$('.accordion-header').on('click', function() {
170		$(this).next().slideToggle().siblings('.accordion-content').slideUp();
171		let thisFindSpan = $(this).find('span');
172		if (thisFindSpan.hasClass('icon-plus')) {
173			thisFindSpan.removeClass('icon-plus').addClass('icon-minus');
174			$(this).siblings('.accordion-header').find('span').removeClass('icon-minus').addClass('icon-plus');
175		} else {
176			thisFindSpan.removeClass('icon-minus').addClass('icon-plus');
177		}
178		tabLabelOverflow();
179	});
180
181	/* toggle */
182	$('.toggle-header').on('click', function() {
183		$(this).next().slideToggle();
184		let thisFindSpan = $(this).find('span');
185		if ( thisFindSpan.hasClass('icon-plus') ) {
186			thisFindSpan.removeClass('icon-plus').addClass('icon-minus');
187		} else {
188			thisFindSpan.removeClass('icon-minus').addClass('icon-plus');
189		}
190		tabLabelOverflow();
191
192		sleep(100, function() {
193			scrollBackImagePosition();
194		});
195	});
196
197	function sleep(waitSec, callbackFunc) {
198		var spanedSec = 0;
199		var waitFunc = function () {
200			spanedSec++;
201			if ( spanedSec >= waitSec ) {
202				if (callbackFunc) callbackFunc();
203				return;
204			}
205			clearTimeout(id);
206			id = setTimeout(waitFunc);
207		};
208		var id = setTimeout(waitFunc);
209	}
210
211	/* tableLikeColumn */
212	function tableLikeColumn() {
213		if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
214			tableLikeColumnParts('x');
215		}
216		if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
217			tableLikeColumnParts('l');
218		}
219		if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
220			tableLikeColumnParts('m');
221		}
222		if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
223			tableLikeColumnParts('s');
224		}
225	}
226	function tableLikeColumnParts( responsiveSize ) {
227		var tableRowLike = document.querySelectorAll('.table-like-row');
228		if ( typeof tableRowLike[0] !== 'undefined' ) {
229			for ( var i = 0, len = tableRowLike.length; i < len; i++ ) {
230				tableRowLike[i].outerHTML = tableRowLike[i].innerHTML;
231			}
232		}
233		for ( var h = 2; h <= 6; h++ ) {
234			var divTable = document.querySelectorAll('.table-like-column-' + h + '-' + responsiveSize);
235			if ( typeof divTable[0] !== 'undefined' ) {
236				for ( var i = 0, len = divTable.length; i < len; i++ ) {
237					var divTableCell = divTable[i].children;
238					var divTableChildCount = divTable[i].childElementCount;
239					var divTableCellFilter = [];
240					for ( var j = 0; j < divTableChildCount; j++ ) {
241						if ( divTable[i].querySelector(':scope > div:nth-child(' + ( j + 1 ) + '):not(.table-like-caption-' + responsiveSize + ')') ) {
242							divTableCellFilter.push(divTable[i].querySelector(':scope > div:nth-child(' + ( j + 1 ) + '):not(.table-like-caption-' + responsiveSize + ')'));
243						}
244					}
245					if ( typeof divTableCellFilter[0] !== 'undefined' ) {
246						for ( var j = 0, lenCell = divTableCellFilter.length; j < lenCell; j += h ) {
247							var divTableCellHTML = '<div class="table-like-row">';
248							for ( var k = 0, lenCol = h; k < lenCol; k++ ) {
249								if ( typeof divTableCellFilter[j+k] !== 'undefined' ) {
250									divTableCellHTML = divTableCellHTML + divTableCellFilter[j+k].outerHTML;
251								}
252							}
253							divTableCellHTML = divTableCellHTML + '</div>';
254							divTableCellFilter[j].outerHTML = divTableCellHTML;
255						}
256						for ( var lenCell = divTableCellFilter.length, j = lenCell; 0 < j; j-- ) {
257							if ( typeof divTableCellFilter[j] !== 'undefined' ) {
258								if ( j % h !== 0 ) {
259									divTableCellFilter[j].parentNode.removeChild(divTableCellFilter[j]);
260								}
261							}
262						}
263					}
264				}
265			}
266		}
267	}
268
269	/* device show group */
270	function deviceShowGroup() {
271		$('.device-show-group-source').each(function() {
272			const targetHtml = $(this).prop('outerHTML');
273			const targetId   = $(this).attr('data-show-group');
274			$(this).remove();
275			$('.device-show-group-destination[data-show-group="' + targetId + '"]').each(function() {
276				$(this).children().remove();
277				if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches && $(this).attr('data-show-device').indexOf('x') !== -1 ) {
278					$(this).html( targetHtml );
279				}
280				if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches && $(this).attr('data-show-device').indexOf('l') !== -1 ) {
281					$(this).html( targetHtml );
282				}
283				if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches && $(this).attr('data-show-device').indexOf('m') !== -1 ) {
284					$(this).html( targetHtml );
285				}
286				if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches && $(this).attr('data-show-device').indexOf('s') !== -1 ) {
287					$(this).html( targetHtml );
288				}
289			});
290		});
291	}
292
293	/* clip-path */
294	function clipShortcode() {
295		const clipClass = document.getElementsByClassName('clip');
296		if ( clipClass[0] !== undefined ) {
297			for ( let i = 0; i < clipClass.length; i++ ) {
298				let dataStyle = '';
299				if ( clipClass[i].hasAttribute( 'data-style' ) ) {
300					dataStyle = clipClass[i].getAttribute( 'data-style' );
301				}
302				if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
303					if ( clipClass[i].hasAttribute( 'data-style-x' ) ) {
304						dataStyle = clipClass[i].getAttribute( 'data-style-x' );
305					}
306				}
307				if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
308					if ( clipClass[i].hasAttribute( 'data-style-l' ) ) {
309						dataStyle = clipClass[i].getAttribute( 'data-style-l' );
310					}
311				}
312				if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
313					if ( clipClass[i].hasAttribute( 'data-style-m' ) ) {
314						dataStyle = clipClass[i].getAttribute( 'data-style-m' );
315					}
316				}
317				if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
318					if ( clipClass[i].hasAttribute( 'data-style-s' ) ) {
319						dataStyle = clipClass[i].getAttribute( 'data-style-s' );
320					}
321				}
322				clipClass[i].setAttribute( 'style', dataStyle );
323			}
324		}
325	}
326
327	/* vertical column */
328	function verticalColumn() {
329		let classIncludeVerticalColumn = $('[class*="vertical-column-"]');
330		if ( classIncludeVerticalColumn.length ) {
331			var columnHeight;
332			classIncludeVerticalColumn.css({ 'height':'' });
333			if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
334				$('.vertical-column-x').each(function() {
335					columnHeight = $(this).prop('scrollHeight') + 'px';
336					$(this).css({ 'height':columnHeight });
337				});
338			}
339			if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
340				$('.vertical-column-l').each(function() {
341					columnHeight = $(this).prop('scrollHeight') + 'px';
342					$(this).css({ 'height':columnHeight });
343				});
344			}
345			if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
346				$('.vertical-column-m').each(function() {
347					columnHeight = $(this).prop('scrollHeight') + 'px';
348					$(this).css({ 'height':columnHeight });
349				});
350			}
351			if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
352				$('.vertical-column-s').each(function() {
353					columnHeight = $(this).prop('scrollHeight') + 'px';
354					$(this).css({ 'height':columnHeight });
355				});
356			}
357		}
358	}
359
360	/* adjust */
361	function adjustArea() {
362		if($('.adjust').find('*').hasClass('adjust-content')) {
363			var adjustCount = $('.adjust').length;
364			var adjustSelector;
365			var tallest;
366			var thisHeight;
367			for ( var i = 1 ; i <= adjustCount ; i++ ) {
368				adjustSelector = '.adjust:eq(' + (i - 1) + ') .adjust-content';
369				tallest        = 0;
370				$(adjustSelector).each(function() {
371					$(this).css( 'height', '' );
372					thisHeight = $(this).height();
373					if(thisHeight > tallest) {
374						tallest = thisHeight;
375					}
376				});
377				$(adjustSelector).each(function() {
378					$(this).height(tallest);
379				});
380			}
381			if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
382				$('.adjust-invalid-x').each(function() {
383					$(this).find('.adjust-content').css( 'height', '' );
384				});
385			}
386			if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
387				$('.adjust-invalid-l').each(function() {
388					$(this).find('.adjust-content').css( 'height', '' );
389				});
390			}
391			if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
392				$('.adjust-invalid-m').each(function() {
393					$(this).find('.adjust-content').css( 'height', '' );
394				});
395			}
396			if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
397				$('.adjust-invalid-s').each(function() {
398					$(this).find('.adjust-content').css( 'height', '' );
399				});
400			}
401		}
402	}
403
404	/* equal-justify */
405	function equalJustify() {
406		if($('.equal-justify').find('*').hasClass('equal-text')) {
407			var adjustCount = $('.equal-justify').length;
408			var adjustSelector;
409			var widest;
410			var thisWidth;
411			for ( var i = 1 ; i <= adjustCount ; i++ ) {
412				adjustSelector = '.equal-justify:eq(' + (i - 1) + ') .equal-text';
413				widest         = 0;
414				$(adjustSelector).each(function() {
415					$(this).css( 'width', '' );
416					thisWidth = $(this).width();
417					if(thisWidth > widest) {
418						widest = thisWidth;
419					}
420				});
421				$(adjustSelector).each(function() {
422					$(this).width(widest);
423				});
424			}
425			if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
426				$('.equal-justify-invalid-x').each(function() {
427					$(this).find('.equal-text').css( 'width', '' );
428				});
429			}
430			if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
431				$('.equal-justify-invalid-l').each(function() {
432					$(this).find('.equal-text').css( 'width', '' );
433				});
434			}
435			if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
436				$('.equal-justify-invalid-m').each(function() {
437					$(this).find('.equal-text').css( 'width', '' );
438				});
439			}
440			if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
441				$('.equal-justify-invalid-s').each(function() {
442					$(this).find('.equal-text').css( 'width', '' );
443				});
444			}
445		}
446	}
447
448	/* skrollr setting */
449	var elementDiv = $('div');
449 // 対象要素を取得
450	if ( elementDiv.is('[data-bottom-top]') || elementDiv.is('[data-top-bottom]') ) {
451		var s = skrollr.init({
452			forceHeight:             false,
453			smoothScrolling:         true,
454			smoothScrollingDuration: 0,
455		});
456		if (s.isMobile()) {
457			s.destroy();
458		} else {
459			for (var i = 0; i < elementImg.length; i++) {
460				elementImg.eq(i).on('load', function() {
461					s.refresh($('.skrollr-contents'));
462				});
463			};
464		}
465	}
466
467	/* scrollBackImagePosition */
468	function scrollBackImagePosition() {
469		let elementScrollBackImageLength = elementScrollBackImage.length;
470		if (typeof jQuery === 'function' && elementScrollBackImage instanceof jQuery && elementScrollBackImageLength) {
471			for ( let i = 0; i < elementScrollBackImageLength; i++ ) {
472				if ( i !== 0 ) {
473					attributeScrollBackImage.push([]);
474				}
475				attributeScrollBackImage[i]['objectPosTop'] = parseInt($(elementScrollBackImage[i]).offset().top);
476				attributeScrollBackImage[i]['objectHeight'] = parseInt($(elementScrollBackImage[i]).outerHeight());
477			}
478		}
479	}
480
481	/* SmoothScroll */
482	function actionSmoothScroll() {
483		var ua = window.navigator.userAgent.toLowerCase();
484		if( ua.indexOf("windows nt") !== -1 ) {
485			SmoothScroll.destroy();
486		} else {
487			SmoothScroll({
488				animationTime: 500,
489				stepSize: 75,
490				keyboardSupport: false
491			});
492		}
493	}
494
495	/* scroll up */
496	function scrollUpFade( elementScrollUp ) {
497		if ( scrollTop > 1000 ) {
498			elementScrollUp.fadeIn();
499		} else {
500			elementScrollUp.fadeOut();
501		}
502	}
503	elementScrollUp.hide().on('click', function () {
504		elementHtmlBody.animate({
505			scrollTop: 0
506		}, 800);
507		return false;
508	});
509	$('a[href^="#"]:not(.no-scroll)').on('click', function () {
510		var speed    = 800;
511		var href     = $(this).attr('href');
512		var target   = $(href == '#' || href == '' ? 'html' : href);
513		var position = target.offset().top;
514		elementHtmlBody.animate({scrollTop:position}, speed, 'swing');
515		return false;
516	});
517
518	/* background parallax */
519	function scrollBackImageInViewport( element, attribute ) {
520		let elementLength = element.length;
521		for ( let i = 0; i < elementLength; i++ ) {
522			if ( inViewport( element[i] ) && typeof attribute[i] !== 'undefined' ) {
523				var objectPosTop = attribute[i]['objectPosTop'];
524				var displayTop   = scrollTop - objectPosTop + displayHeight;
525				var objectHeight = attribute[i]['objectHeight'];
526				var bgPosition   = Math.round( displayTop / ( displayHeight + objectHeight ) * 100 );
527				if( bgPosition ) {
528					$(element[i]).css('background-position', 'center bottom ' + bgPosition + '%');
529				}
530			}
531		}
532	}
533
534	function scrollBackPatternInViewport( element ) {
535		var bgPosition    = Math.round( scrollTop / 3 );
536		let elementLength = element.length;
537		for ( let i = 0; i < elementLength; i++ ) {
538			if ( inViewport( element[i] ) ) {
539				if( bgPosition ) {
540					$(element[i]).css('background-position', 'center top ' + bgPosition + 'px');
541				}
542			}
543		}
544	}
545
546	function effectInViewport( element ) {
547		let elementLength = element.length;
548		for ( let i = 0; i < elementLength; i++ ) {
549			if ( inViewport( element[i] ) ) {
550				$(element[i]).stop().addClass('on');
551			} else {
552				$(element[i]).stop().removeClass('on');
553			}
554		}
555	}
556
557	function effectOnceInViewport( element ) {
558		let elementLength = element.length;
559		for ( let i = 0; i < elementLength; i++ ) {
560			if ( inViewport( element[i] ) ) {
561				$(element[i]).stop().addClass('on');
562			}
563		}
564	}
565
566	/* loop slider */
567	function loopSliderSetting() {
568		var setElm = document.querySelectorAll('.loop-slider');
569		setElmLength = setElm.length;
570		if ( setElmLength ) {
571			var loopPosition = new Array();
572			for ( var i = 0; i < setElmLength; i++ ) {
573				var self         = setElm[i];
574				var selfWidth    = self.clientWidth;
575
576				if ( self.querySelector('.loop-slider-slide-group') ) {
577					self.innerHTML = self.querySelector('.loop-slider-slide-group').innerHTML;
578				}
579				console.log(self.innerHTML);
580
581				self.innerHTML        = '<div class="loop-slider-slide-group">' + self.innerHTML + '</div>';
582				self.innerHTML        = '<div class="loop-slider-inner">' + self.innerHTML + '</div>';
583				var slideGroup        = self.querySelector('.loop-slider-slide-group');
584				var selfInner         = self.querySelector('.loop-slider-inner');
585				var slids             = self.querySelectorAll('.loop-slider-slide');
586				var slidsLength       = slids.length;
587				var img               = self.querySelectorAll('img');
588				var imgWidth          = img[i].clientWidth;
589				var imgWidthNum       = Number( imgWidth );
590				var imgHeight         = img[i].clientHeight;
591				var slideGap          = '5px';
592				var slideGapNum       = Number( slideGap.split('px')[0] ) * 2;
593				var imgOffsetWidthNum = imgWidthNum + slideGapNum;
594
595				// slide内の画像とパディングを含めた幅がloop-sliderの幅より小さい時
596				if ( selfWidth < imgOffsetWidthNum ) {
597					imgWidth          = selfWidth - slideGapNum + 'px';
598					imgWidthNum       = Number( imgWidth.split('px')[0] );
599					imgOffsetWidthNum = imgWidthNum + slideGapNum;
600					imgHeight         = ( selfWidth - slideGapNum ) / 3 * 2 + 'px';
601				}
602
603				for ( var j = 0; j < slidsLength; j++ ) {
604					slids[j].style.padding = '0 ' + slideGap;
605				}
606
607				self.style.height = imgHeight;
608				var loopWidthNum  = imgOffsetWidthNum * slidsLength;
609				
610				if ( loopWidthNum > selfWidth ) {
611					selfInner.appendChild( slideGroup.cloneNode( true ) );
612					selfInner.appendChild( slideGroup.cloneNode( true ) );
613					selfInner.style.width = ( loopWidthNum * 3 ) + 'px';
614					selfInner.style.position = 'relative';
615
616					loopPosition[i] = 0;
617
618					function loopSlideAnimation( selfInner, i ) {
619						loopPosition[i]      += 1;
620						selfInner.style.left  = -1 * loopPosition[i] + 'px';
621						if ( loopPosition[i] > loopWidthNum ) {
622							loopPosition[i] = 0;
623						}
624					}
625					setInterval(loopSlideAnimation, 30, selfInner, i);
626
627					selfInner.style.transform = 'translateX(0px)';
628					var props = selfInner.style.transform;
629
630					function loopScroll( selfInner ) {
631						var props = selfInner.style.transform;
632						if (props !== undefined) {
633							function translateX_value(e) {
634								var value = e.split('(')[1];
635								value     = value.split('px)')[0];
636								return value;
637							}
638							if ( Math.abs(translateX_value(props)) > loopWidthNum ) {
639								selfInner.style.marginLeft = loopWidthNum + 'px';
640							} else {
641								selfInner.style.marginLeft = 0;
642							}
643							translateX_value(props);
644						}
645					}
646					setInterval(loopScroll, 200, selfInner);
647				}
648
649				let loopSliderViewport = self;
650				let loopSliderContent  = loopSliderViewport.childNodes[0];
651
652				let sb = new ScrollBooster({
653					viewport: loopSliderViewport,
654					content:  loopSliderContent,
655					friction: 0.1,
656					onUpdate: function (data) {
657						loopSliderContent.style.transform = 'translateX(' + -data.position.x + 'px)'
658					}
659				});
660			}
661		}
662	}
663
664	/* loop slider home image */
665	function loopSliderSetting() {
666		var setElm = document.querySelectorAll('.loop-slider-home-image');
667		setElmLength = setElm.length;
668		if ( setElmLength ) {
669			var loopPosition = new Array();
670			for ( var i = 0; i < setElmLength; i++ ) {
671				var self         = setElm[i];
672				var selfWidth    = self.clientWidth;
673
674				if ( self.querySelector('.loop-slider-slide-group') ) {
675					self.innerHTML = self.querySelector('.loop-slider-slide-group').innerHTML;
676				}
677				console.log(self.innerHTML);
678
679				self.innerHTML        = '<div class="loop-slider-slide-group">' + self.innerHTML + '</div>';
680				self.innerHTML        = '<div class="loop-slider-inner">' + self.innerHTML + '</div>';
681				var slideGroup        = self.querySelector('.loop-slider-slide-group');
682				var selfInner         = self.querySelector('.loop-slider-inner');
683				var slids             = self.querySelectorAll('.loop-slider-slide');
684				var slidsLength       = slids.length;
685				if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
686					var imgWidth  = '480px';
687					var imgHeight = '320px';
688					var slideGap  = '0px';
689				}
690				if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
691					var imgWidth  = '360px';
692					var imgHeight = '240px';
693					var slideGap  = '0px';
694				}
695				if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
696					var imgWidth  = '270px';
697					var imgHeight = '180px';
698					var slideGap  = '0px';
699				}
700				if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
701					var imgWidth  = '210px';
702					var imgHeight = '140px';
703					var slideGap  = '0px';
704				}
705				var imgWidthNum       = Number( imgWidth.split('px')[0] );
706				var slideGapNum       = Number( slideGap.split('px')[0] ) * 2;
707				var imgOffsetWidthNum = imgWidthNum + slideGapNum;
708
709				// slide内の画像とパディングを含めた幅がloop-sliderの幅より小さい時
710				if ( selfWidth < imgOffsetWidthNum ) {
711					imgWidth          = selfWidth - slideGapNum + 'px';
712					imgWidthNum       = Number( imgWidth.split('px')[0] );
713					imgOffsetWidthNum = imgWidthNum + slideGapNum;
714					imgHeight         = ( selfWidth - slideGapNum ) / 3 * 2 + 'px';
715				}
716
717				for ( var j = 0; j < slidsLength; j++ ) {
718					slids[j].style.padding = '0 ' + slideGap;
719				}
720
721				self.style.height = imgHeight;
722				var loopWidthNum  = imgOffsetWidthNum * slidsLength;
723
724				if ( loopWidthNum > selfWidth ) {
725					selfInner.appendChild( slideGroup.cloneNode( true ) );
726					selfInner.appendChild( slideGroup.cloneNode( true ) );
727					selfInner.style.width = ( loopWidthNum * 3 ) + 'px';
728					selfInner.style.position = 'relative';
729
730					loopPosition[i] = 0;
731
732					function loopSlideAnimation( selfInner, i ) {
733						loopPosition[i]      += 1;
734						selfInner.style.left  = -1 * loopPosition[i] + 'px';
735						if ( loopPosition[i] > loopWidthNum ) {
736							loopPosition[i] = 0;
737						}
738					}
739					setInterval(loopSlideAnimation, 45, selfInner, i);
740
741					selfInner.style.transform = 'translateX(0px)';
742					var props = selfInner.style.transform;
743
744					function loopScroll( selfInner ) {
745						var props = selfInner.style.transform;
746						if (props !== undefined) {
747							function translateX_value(e) {
748								var value = e.split('(')[1];
749								value     = value.split('px)')[0];
750								return value;
751							}
752							if ( Math.abs(translateX_value(props)) > loopWidthNum ) {
753								selfInner.style.marginLeft = loopWidthNum + 'px';
754							} else {
755								selfInner.style.marginLeft = 0;
756							}
757							translateX_value(props);
758						}
759					}
760					setInterval(loopScroll, 200, selfInner);
761				}
762
763				let loopSliderViewport = self;
764				let loopSliderContent  = loopSliderViewport.childNodes[0];
765
766				let sb = new ScrollBooster({
767					viewport: loopSliderViewport,
768					content:  loopSliderContent,
769					friction: 0.1,
770					onUpdate: function (data) {
771						loopSliderContent.style.transform = 'translateX(' + -data.position.x + 'px)'
772					}
773				});
774			}
775		}
776	}
777
778	function inViewport( element ) {
779		var elementBounds = element.getBoundingClientRect();
780		return (
781			elementBounds.top    <= displayHeight
782		 && elementBounds.right  <= displayWidth
783		 && elementBounds.bottom >= 0
784		 && elementBounds.left   >= 0
785		);
786	}
787
788	/* slick setting */
789	var classHomeSlickEyecatch = $('.home-slick-eyecatch');
790	if ( classHomeSlickEyecatch.length ) {
791		classHomeSlickEyecatch.slick({
792			infinite:       true,
793			slidesToShow:   1,
794			centerMode:     true,
795			variableWidth:  true,
796			adaptiveHeight: true,
797			centerPadding:  '0px',
798			autoplay:       true,
799			autoplaySpeed:  6000,
800			speed:          750,
801			fade:           false,
802			pauseOnHover:   false,
803			pauseOnFocus:   false,
804			responsive: [
805				{
806					breakpoint: dw_l - 30,
807					settings: {
808						infinite:      true,
809						slidesToShow:  1,
810						centerMode:    true,
811						variableWidth: false,
812						centerPadding: '0px',
813						autoplay:      true,
814						autoplaySpeed: 6000,
815						speed:         750,
816						pauseOnHover:  false,
817						pauseOnFocus:  false,
818					}
819				}
820			]
821		});
822	}
823	var classSimpleSlider = $('.simple-slider');
824	if ( classSimpleSlider.length ) {
825		classSimpleSlider.slick({
826			slidesToShow:   1,
827			slidesToScroll: 1,
828			autoplay:       true,
829			autoplaySpeed:  4500,
830			speed:          3000,
831			arrows:         true,
832			fade:           true,
833		});
834	}
835	var classSimpleSliderDots = $('.simple-slider-dots');
836	if ( classSimpleSliderDots.length ) {
837		classSimpleSliderDots.slick({
838			dots:           true,
839			slidesToShow:   1,
840			slidesToScroll: 1,
841			autoplay:       true,
842			autoplaySpeed:  4500,
843			speed:          3000,
844			arrows:         false,
845			fade:           true,
846		});
847	}
848	var classThumbnailSlider = $('.thumbnail-slider');
849	if ( classThumbnailSlider.length ) {
850		classThumbnailSlider.each(function(i){
851			$(this).find('.thumbnail-slider-for').addClass('thumbnail-slider-for'+i).slick({
852				slidesToShow:   1,
853				slidesToScroll: 1,
854				autoplay:       true,
855				autoplaySpeed:  5000,
856				speed:          750,
857				arrows:         false,
858				fade:           true,
859				adaptiveHeight: true,
860				asNavFor:       '.thumbnail-slider-nav'+i,
861			}),
862			$(this).find('.thumbnail-slider-nav').addClass('thumbnail-slider-nav'+i).slick({
863				lazyLoad:       'ondemand',
864				slidesToShow:   5,
865				slidesToScroll: 1,
866				asNavFor:       '.thumbnail-slider-for'+i,
867				arrows:         true,
868				focusOnSelect:  true,
869				appendArrows:   $(this).find('.thumbnail-slider-arrows'),
870				responsive: [
871					{
872						breakpoint: dw_lp,
873						settings: {
874							slidesToShow: 3,
875						}
876					}
877				]
878			});
879		});
880	}
881	var classTileSlider = $('.tile-slider');
882	if ( classTileSlider.length ) {
883		classTileSlider.each(function(i){
884			$(this).find('.tile-slider-for').addClass('tile-slider-for'+i).slick({
885				slidesToShow:   1,
886				slidesToScroll: 1,
887				autoplay:       true,
888				autoplaySpeed:  5000,
889				speed:          750,
890				arrows:         false,
891				fade:           true,
892				adaptiveHeight: true,
893				asNavFor:       '.tile-slider-nav'+i,
894			}),
895			$(this).find('.tile-slider-nav').addClass('tile-slider-nav'+i).slick({
896				lazyLoad:      'ondemand',
897				slidesToShow:  9,
898				asNavFor:      '.tile-slider-for'+i,
899				arrows:        true,
900				focusOnSelect: true,
901				responsive: [
902					{
903						breakpoint: dw_lp,
904						settings: {
905							slidesToShow: 9,
906						}
907					}
908				]
909			});
910		});
911	}
912	var classProductSlider = $('.products-slider');
913	if ( classProductSlider.length ) {
914		classProductSlider.each(function(i){
915			$(this).find('.products-slider-for').addClass('products-slider-for'+i).slick({
916				slidesToShow:   1,
917				slidesToScroll: 1,
918				autoplay:       true,
919				autoplaySpeed:  5000,
920				speed:          750,
921				arrows:         false,
922				fade:           true,
923				adaptiveHeight: true,
924				asNavFor:       '.products-slider-nav'+i,
925			}),
926			$(this).find('.products-slider-nav').addClass('products-slider-nav'+i).slick({
927				lazyLoad:       'ondemand',
928				slidesToShow:   4,
929				slidesToScroll: 1,
930				asNavFor:       '.products-slider-for'+i,
931				arrows:         true,
932				focusOnSelect:  true,
933				appendArrows:   $(this).find('.products-slider-arrows')
934			});
935		});
936	}
937	var classEventSlider = $('.event-slider');
938	if ( classEventSlider.length ) {
939		classEventSlider.each(function(i){
940			$(this).find('.event-slider-for').addClass('event-slider-for'+i).slick({
941				infinite: true,
942				slidesToShow:   1,
943				centerMode:     true,
944				variableWidth:  true,
945				adaptiveHeight: true,
946				autoplay:       true,
947				autoplaySpeed:  6000,
948				speed:          750,
949				pauseOnHover:   false,
950				pauseOnFocus:   false,
951				dots:           true,
952				arrows:         true,
953				responsive: [
954					{
955						breakpoint: 870,
956						settings: {
957							centerMode:    false,
958							variableWidth: false,
959						}
960					}
961				]
962			});
963		});
964	}
965	var moreSlider = $('.primary-ad-slider');
966	if ( moreSlider.length ) {
967		moreSlider.slick({
968			slidesToShow:   3,
969			slidesToScroll: 1,
970			autoplay:       true,
971			autoplaySpeed:  3000,
972			speed:          1000,
973			arrows:         true,
974			responsive: [
975				{
976					breakpoint: dw_lp,
977					settings: {
978						slidesToShow: 2,
979					}
980				},
981				{
982					breakpoint: dw_sp,
983					settings: {
984						slidesToShow:  1,
985						variableWidth: false,
986						centerPadding: '8vw',
987					}
988				}
989			]
990		});
991	}
992
993	/* scrollbooster */
994	function scrollX() {
995		let elementScrollxWrapLength = elementScrollxWrap.length;
996		if ( 'undefined' !== typeof elementScrollxWrap && elementScrollxWrapLength ) {
997			var content_x = {},
998			content_l     = {},
999			content_m     = {},
1000			content_s     = {};
1001			for ( var i = 0; i < elementScrollxWrapLength; i++ ) {
1002				content_x[i] = elementScrollxWrap[i].querySelector('.scrollx-x'),
1003				content_l[i] = elementScrollxWrap[i].querySelector('.scrollx-l'),
1004				content_m[i] = elementScrollxWrap[i].querySelector('.scrollx-m'),
1005				content_s[i] = elementScrollxWrap[i].querySelector('.scrollx-s');
1006				if ( window.matchMedia('screen and (min-width: ' + dw_lp + 'px)').matches ) {
1007					if ( content_x[i] ) {
1008						if ( 'undefined' !== typeof scrollxWrapBol_x[i] ) {
1009							scrollxWrapBol_x[i].destroy();
1010						}
1011						let i_let = i;
1012						scrollxWrapBol_x[i] = new ScrollBooster({
1013							viewport: elementScrollxWrap[i_let],
1014							content:  content_x[i_let],
1015							friction: 0.1,
1016							onUpdate: function (data) {
1017								content_x[i_let].style.transform = 'translateX(' + -data.position.x + 'px)'
1018							}
1019						});
1020					} else {
1021						if ( 'undefined' !== typeof scrollxWrapBol_l[i] ) {
1022							scrollxWrapBol_l[i].destroy();
1023						}
1024						if ( 'undefined' !== typeof scrollxWrapBol_m[i] ) {
1025							scrollxWrapBol_m[i].destroy();
1026						}
1027						if ( 'undefined' !== typeof scrollxWrapBol_s[i] ) {
1028							scrollxWrapBol_s[i].destroy();
1029						}
1030					}
1031				}
1032
1033				if ( window.matchMedia('screen and (min-width: ' + dw_mp + 'px) and (max-width: ' + dw_l + 'px)').matches ) {
1034					if ( content_l[i] ) {
1035						if ( 'undefined' !== typeof scrollxWrapBol_l[i] ) {
1036							scrollxWrapBol_l[i].destroy();
1037						}
1038						let i_let = i;
1039						scrollxWrapBol_l[i] = new ScrollBooster({
1040							viewport: elementScrollxWrap[i_let],
1041							content:  content_l[i_let],
1042							friction: 0.1,
1043							onUpdate: function (data) {
1044								content_l[i_let].style.transform = 'translateX(' + -data.position.x + 'px)'
1045							}
1046						});
1047					} else {
1048						if ( 'undefined' !== typeof scrollxWrapBol_x[i] ) {
1049							scrollxWrapBol_x[i].destroy();
1050						}
1051						if ( 'undefined' !== typeof scrollxWrapBol_m[i] ) {
1052							scrollxWrapBol_m[i].destroy();
1053						}
1054						if ( 'undefined' !== typeof scrollxWrapBol_s[i] ) {
1055							scrollxWrapBol_s[i].destroy();
1056						}
1057					}
1058				}
1059
1060				if ( window.matchMedia('screen and (min-width: ' + dw_sp + 'px) and (max-width: ' + dw_m + 'px)').matches ) {
1061					if ( content_m[i] ) {
1062						if ( 'undefined' !== typeof scrollxWrapBol_m[i] ) {
1063							scrollxWrapBol_m[i].destroy();
1064						}
1065						let i_let = i;
1066						scrollxWrapBol_m[i] = new ScrollBooster({
1067							viewport: elementScrollxWrap[i_let],
1068							content:  content_m[i_let],
1069							friction: 0.1,
1070							onUpdate: function (data) {
1071								content_m[i_let].style.transform = 'translateX(' + -data.position.x + 'px)'
1072							}
1073						});
1074					} else {
1075						if ( 'undefined' !== typeof scrollxWrapBol_x[i] ) {
1076							scrollxWrapBol_x[i].destroy();
1077						}
1078						if ( 'undefined' !== typeof scrollxWrapBol_l[i] ) {
1079							scrollxWrapBol_l[i].destroy();
1080						}
1081						if ( 'undefined' !== typeof scrollxWrapBol_s[i] ) {
1082							scrollxWrapBol_s[i].destroy();
1083						}
1084					}
1085				}
1086
1087				if ( window.matchMedia('screen and (max-width: ' + dw_s + 'px)').matches ) {
1088					if ( content_s[i] ) {
1089						if ( 'undefined' !== typeof scrollxWrapBol_s[i] ) {
1090							scrollxWrapBol_s[i].destroy();
1091						}
1092						let i_let = i;
1093						scrollxWrapBol_s[i] = new ScrollBooster({
1094							viewport: elementScrollxWrap[i_let],
1095							content:  content_s[i_let],
1096							friction: 0.1,
1097							onUpdate: function (data) {
1098								content_s[i_let].style.transform = 'translateX(' + -data.position.x + 'px)'
1099							}
1100						});
1101					} else {
1102						if ( 'undefined' !== typeof scrollxWrapBol_x[i] ) {
1103							scrollxWrapBol_x[i].destroy();
1104						}
1105						if ( 'undefined' !== typeof scrollxWrapBol_l[i] ) {
1106							scrollxWrapBol_l[i].destroy();
1107						}
1108						if ( 'undefined' !== typeof scrollxWrapBol_m[i] ) {
1109							scrollxWrapBol_m[i].destroy();
1110						}
1111					}
1112				}
1113			}
1114		}
1115	}
1116
1117	/* masonry */
1118	var rowMasonry = $('.row-masonry');
1119	if ( rowMasonry.length ) {
1120		rowMasonry.masonry({
1121			itemSelector:    '.col-scope',
1122			columnWidth:     '.col-scope',
1123			percentPosition: true,
1124		});
1125	}
1126
1127	function windowResize() {
1128    var windowWidth = $(window).width();
1129    var htmlStr = $('#pageplugin').html();
1130    var timer = null;
1131    $(window).on('resize',function() {
1132        var resizedWidth = $(window).width();
1133        if(windowWidth != resizedWidth && resizedWidth < 500) {
1134            clearTimeout(timer);
1135            timer = setTimeout(function() {
1136                $('#pageplugin').html(htmlStr);
1137                window.FB.XFBML.parse();
1138								//window.FB.XFBML.parse()で再レンダリングします。
1139                var windowWidth = $(window).width();
1140            }, 500);
1141        }
1142    });
1143}
1144}(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.