PageSourceSearch

https://marukayoutuu.com/wp-content/themes/selfull/js/common.js?20230510_2

js marukayoutuu.com collected 2026-10-08 00:42:25 UTC 11,431 bytes, 411 lines download raw bytes

1jQuery(function($) {
2	$('.parts-item .slick-contents').slick({
3		dots: false
4	});
5
6	var youtubeLazyLoadReady = false;
7	var handleYoutubeLazyLoad = function() {
8		if (!youtubeLazyLoadReady) {
9			youtubeLazyLoadReady = true;
10			return;
11		}
12		$('iframe[loading=lazy][data-src]').each(function() {
13			var $iframe = $(this);
14			var dataSrc = $iframe.attr('data-src');
15			if (dataSrc.indexOf('https://www.youtube.com/embed') !== -1) {
16				console.log(dataSrc);
17				$iframe.attr('src', dataSrc);
18			}
19		});
20		$(window).off('scroll', handleYoutubeLazyLoad);
21	};
22	$(window).on('scroll', handleYoutubeLazyLoad);
23});
24
25
26var MYAPP = {};
27
28// Browser Distinction
29MYAPP.browser = {
30	isMac			: navigator.platform.indexOf('Mac') != -1,
31	isAndroid		: navigator.userAgent.indexOf('Android') != -1,
32	isWindowsPhone	: navigator.userAgent.indexOf('Windows Phone') != -1,
33	isBlackBerry	: navigator.userAgent.indexOf('BlackBerry') != -1,
34	isIPhone		: navigator.userAgent.indexOf('iPhone') != -1,
35	isIPad			: navigator.userAgent.indexOf('iPad') != -1,
36	isIPod			: navigator.userAgent.indexOf('iPod') != -1,
37	isIE6			: navigator.appVersion.indexOf('MSIE 6.0') > -1,
38	isIE7			: navigator.appVersion.indexOf('MSIE 7.0') > -1,
39	isIE8			: navigator.appVersion.indexOf('MSIE 8.0') > -1,
40	isIE9			: navigator.appVersion.indexOf('MSIE 9.0') > -1,
41	isChrome		: navigator.userAgent.indexOf('Chrome/') != -1 || navigator.userAgent.indexOf('Mac/') != -1 || navigator.userAgent.indexOf('Win/') != -1 && window.chrome,
42	isSafari		: navigator.userAgent.indexOf('Safari/') != -1 && !window.chrome && !navigator.userAgent.indexOf('Mobile/')
43}
44
45;(function($,win,doc){
46
47	/**
48	 ** windowのWidth,Height,scrollTop取得
49	 **/
50	var winH, winW, winT;
51	var getWinInfo = function (config){
52
53		var defaults = {
54			h:false,
55			w:false,
56			t:false
57		}
58		var options = $.extend(defaults,config);
59
60		if(options.h){
61			$(win).resize(function(){
62				winH = $(win).height();
63			});
64		}
65		if(options.w){
66			$(win).resize(function(){
67				winW = $(win).width();
68			});
69		}
70		if(options.t){
71			$(win).scroll(function(){
72				winT = $(win).scrollTop();
73			});
74		}
75
76		$(win).trigger('scroll').trigger('resize');
77
78	}
79
80
81
82	/**
83	 ** Smooth Scroll
84	 **/
85	$.fn.smoothScroll= function(){
86		$(this).click(function() {
87			// スクロールの速度
88			var speed = 300;// ミリ秒
89			// アンカーの値取得
90			var href= $(this).attr("href");
91			// 移動先を取得
92			var target = $(href == "#" || href == "" ? 'html' : href);
93
94			// 移動先が無い場合
95			if(target.length===0) return false;
96
97			// 移動先を数値で取得
98			var position = target.offset().top;
99			// スムーススクロール
100			$('html,body').stop().animate({scrollTop:position}, speed, 'swing');
101
102			return false;
103		});
104
105		return this;
106
107	}
108
109
110	/**
111	 ** Hover Image
112	 **/
113	$.fn.hovImg = function(str){
114
115		var postfix = str;
116		var ovImgFadeTime = 300;
117
118		$(this).not('[src*="'+ postfix +'."]').each(function() {
119			var img = $(this);
120			var src = img.attr('src');
121			var src_on = src.substr(0, src.lastIndexOf('.'))
122					   + postfix
123					   + src.substring(src.lastIndexOf('.'));
124			var img_on = $('<img class="img_on">');
125
126			$(img_on).attr('src', src_on);
127
128			if(img.hasClass("ovImgFd") && !MYAPP.browser.isIE6 ){
129				$(img_on).css({'position':'absolute','opacity':0}).insertBefore(img);
130				img_on.hover(function() {
131					$(img_on).stop().animate({'opacity':1},ovImgFadeTime);
132				}, function() {
133					$(img_on).stop().animate({'opacity':0},ovImgFadeTime);
134				});
135			} else {
136				img.hover(function() {
137					img.attr('src', src_on);
138				}, function() {
139					img.attr('src', src);
140				});
141			}
142		});
143
144		return this;
145
146	}
147
148
149
150
151	//start
152	$(function(){
153
154		//$('.style-title,h1').wrapInner('<span class="inner01"><span class="inner02"></span></span>')
155
156		$('a.scroll[href^=#]').smoothScroll();
157		$('.ovImg,.ovImgFd').hovImg('_on');
158
159
160		getWinInfo({
161			h:false,
162			w:false,
163			t:false
164		});
165
166
167	});
168
169
170	/**
171	 ** ページトップ 表示 非表示
172	 **/
173  $(function(){
174    var pageTop = $('#pageTop');
175    pageTop.hide();
176    $(window).scroll(function(){
177      if($(this).scrollTop() > 400) {
178        pageTop.fadeIn();
179      } else {
180        pageTop.fadeOut();
181      }
182    });
183		$('body').on({
184			mouseenter: function() {
185				$(this).stop().animate({opacity: 1}, 100);
186			},
187			mouseleave: function() {
188				$(this).stop().animate({opacity: 0.5}, 50);
189			},
190			click: function() {
191				$('body,html').animate({scrollTop: 0}, 300);
192			},
193		}, '#pageTop');
194  });
195
196	//PCグローバルナビ固定
197	$(window).scroll(function () {
198		var headerPc = $('#global-nav-pc.fixed-set');
199		var globalHeader = $('#global-header');
200		if($(this).scrollTop() > 300) {
201			headerPc.addClass('fixed');
202
203			if($('#window-size-check').css('display') == 'block'){
204				globalHeader.css('padding-top', $('#global-nav-pc').height());
205			}
206		} else {
207			headerPc.removeClass('fixed');
208
209			if($('#window-size-check').css('display') == 'block'){
210				globalHeader.css('padding-top', 0);
211			}
212		}
213	});
214
215	//ヘッダー固定(more)
216	var sitePadding = parseInt($('#global-header-main-pc-more').height()) + parseInt($('#global-header-main-pc-more').css('margin-top')) + 'px';
217
218	$(window).scroll(function () {
219		var headerPc = $('#global-header-main-pc-more.fixed-set');
220		var site = $('#site');
221
222		if($(this).scrollTop() > 300) {
223			if($('#window-size-check').css('display') == 'block'){
224				site.css('padding-top', sitePadding);
225			}
226
227			headerPc.addClass('fixed');
228
229		} else {
230			headerPc.removeClass('fixed');
231
232			if($('#window-size-check').css('display') == 'block'){
233				site.css('padding-top', 0);
234			}
235		}
236	});
237
238	//SPヘッダー固定
239	$(window).scroll(function () {
240		var header = $('#global-header');
241		var headerSp = $('#global-header-main-sp.fixed-set');
242		var site = $('#site');
243		if($(this).scrollTop() > 100) {
244			header.addClass('header-fixed-sp');
245			headerSp.addClass('fixed');
246			if($('#window-size-check').css('display') == 'none'){
247				site.css('padding-top', $('#global-header-main-sp').height());
248			}
249		} else {
250			headerSp.removeClass('fixed');
251			header.removeClass('header-fixed-sp');
252			if($('#window-size-check').css('display') == 'none'){
253				site.css('padding-top', 0);
254			}
255		}
256	});
257
258	//文字入力中は、固定表示のCTAボタンを非表示
259	$(function() {
260		$('input[type="text"],input[type="number"],input[type="email"],input[type="tel"],input[type="url"],input[type="password"],input[type="date"],input[type="datetime-local"],input[type="month"],input[type="week"],input[type="time"],textarea').focus(function() {
261			$('#global-nav-sp').addClass('inactive');
262		}).blur(function() {
263			$('#global-nav-sp').removeClass('inactive');
264		});
265	});
266
267	//PCフッター固定
268	$(window).scroll(function () {
269		var footerPc = $('#global-footer.fixed-set');
270		if($(this).scrollTop() > 300) {
271			footerPc.addClass('fixed');
272		} else {
273			footerPc.removeClass('fixed');
274		}
275	});
276
277	$('#main iframe').each(function(){
278		let iframeSrc = $(this).attr('src');
279		if (iframeSrc && iframeSrc.indexOf('maps') !== -1) {
280			$(this).addClass('googlemap');
281		}
282		if (iframeSrc && iframeSrc.indexOf('youtube') !== -1) {
283			$(this).addClass('youtube');
284		}
285		let iframeDataSrc = $(this).attr('data-src');
286		if (iframeDataSrc && iframeDataSrc.indexOf('youtube') !== -1) {
287			$(this).addClass('youtube');
288		}
289	});
290
291	var sp_menu = false;
292	jQuery(function($){
293		//menu
294		$('#menu_btn').on('click', function() {
295			var $menu = $('#sp-menu');
296			var $contents = $('#sp-menu-contents');
297			var background_url = $('#menu_btn').css('background-image');
298			if (!sp_menu) {
299				$contents.html("");
300				$('.sp-set').each(function() {
301					var html = $(this).prop('outerHTML');
302					var htmlRoop = true;
303
304					while (htmlRoop) {
305						var htmlMatch = html.match(/<script[\s\S]*?<\/script>/);
306
307						if(htmlMatch !== null) {
308							html = html.replace(/<script[\s\S]*?<\/script>/, '');
309						}else {
310							htmlRoop = false;
311						}
312					}
313					$contents.append(html);
314				});
315
316				if($('body').hasClass('design-menu-original')){
317					$('#menu_btn').addClass('close');
318				}else{
319					$('#menu_btn').css('background-image', background_url.replace("open.png", "close.png"));
320					var backgroundImage = $('#menu_btn').attr('style');
321					var backgroundImage2 = backgroundImage.replace('.png")', '.png") !important');
322					$('#menu_btn').css({'cssText': backgroundImage2});
323				}
324
325				$menu.stop().animate({'left':'0'}, 200, function() {
326					$menu.children('#sp-menu-lightbox').stop().animate({'opacity':'0.3'},100);
327				});
328				sp_menu = true;
329			} else {
330				$('#menu_btn').css('background-image', background_url.replace("close.png", "open.png"));
331				$('#menu_btn').removeClass('close');
332				$menu.children('#sp-menu-lightbox').css('opacity', 0);
333				$menu.stop().animate({'left':'-105%'}, 200);
334				sp_menu = false;
335			}
336			return false;
337		});
338		$('#sp-menu-lightbox').on('click', function() {
339			$('#menu_btn').trigger('click');
340			return false;
341		});
342	});
343
344	$('.sp-modal-btn-line').click(function(){
345		$('#sp-modal').show();
346		$('#sp-modal .sp-modal-main-line').show();
347		$('body').addClass('no-scroll-sp');
348		return false;
349	});
350
351	$('.sp-modal-btn-tel').click(function(){
352		$('#sp-modal').show();
353		$('#sp-modal .sp-modal-main-tel').show();
354		$('body').addClass('no-scroll-sp');
355		return false;
356	});
357
358	$('#sp-modal .sp-modal-head .close-btn').click(function(){
359		$('#sp-modal').hide();
360		$('#sp-modal').scrollTop(0);
361		$('#sp-modal .sp-modal-main-line').hide();
362		$('#sp-modal .sp-modal-main-tel').hide();
363		$('body').removeClass('no-scroll-sp');
364	});
365
366	$('#global-header-main-pc-more .menu-btn .open').click(function(){
367		$('#global-header-main-pc-more .menu-01-pc').show();
368		$('#global-header-main-pc-more .menu-btn .open').hide();
369		$('#global-header-main-pc-more .menu-btn .close').show();
370		$('body').addClass('no-scroll-pc');
371	});
372
373	$('#global-header-main-pc-more .menu-btn .close').click(function(){
374		$('#global-header-main-pc-more .menu-01-pc').scrollTop(0);
375		$('#global-header-main-pc-more .menu-01-pc').hide();
376		$('#global-header-main-pc-more .menu-btn .open').show();
377		$('#global-header-main-pc-more .menu-btn .close').hide();
378		$('body').removeClass('no-scroll-pc');
379	});
380
381	// setInterval(function(){
382	// 	$('#global-header-main-pc-more .menu-01-pc').height($(window).height() - $('#global-header-main-pc-more').height());
383	// }, 300);
384
385
386	$(document).on('click', '.newpost1 .morepostBtn', function () {
387
388		$('.newpost1 .morepostBtn').siblings('li.hide:lt(10)').slideDown(function(){
389			if($('.newpost1 .morepostBtn').siblings('li.hide').length==0){$('.newpost1 .morepostBtn').slideUp();}
390		}).removeClass('hide');
391
392		$('#sp-menu .newpost1 .morepostBtn').siblings('li.hide:lt(10)').slideDown(function(){
393			if($('#sp-menu .newpost1 .morepostBtn').siblings('li.hide').length==0){$('#sp-menu .newpost1 .morepostBtn').slideUp();}
394		}).removeClass('hide');
395
396		return false;
397	});
398
399	$(document).on('click', '.newpost2 .morepostBtn', function () {
400
401		$('.newpost2 .morepostBtn').siblings('li.hide:lt(10)').slideDown(function(){
402			if($('.newpost2 .morepostBtn').siblings('li.hide').length==0){$('.newpost2 .morepostBtn').slideUp();}
403		}).removeClass('hide');
404
405		$('#sp-menu .newpost2 .morepostBtn').siblings('li.hide:lt(10)').slideDown(function(){
406			if($('#sp-menu .newpost2 .morepostBtn').siblings('li.hide').length==0){$('#sp-menu .newpost2 .morepostBtn').slideUp();}
407		}).removeClass('hide');
408
409		return false;
410	});
411})(jQuery,window,document);

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.