PageSourceSearch

https://fukatsu-clinic.com/style/js/common.js?20261005094220

js fukatsu-clinic.com collected 2026-10-05 00:42:35 UTC 11,992 bytes, 458 lines download raw bytes

1//spMenubtn
2$(function () {
3	if (window.matchMedia('screen and (min-width:768px)').matches) {} else {
4		$("#panel-btn").click(function () {
5				$(this).toggleClass("on"),
6					$("#navGlobal").toggleClass("on"),
7					$("#navGlobal").fadeToggle("fast"),
8					$('html').toggleClass('spOpenBody')
9			}),
10			$("#navGlobal ul").click(function () {
11				$("#navGlobal").fadeToggle("fast"),
12					$('html').removeClass('spOpenBody')
13			});
14	}
15});
16
17$(function () {
18	//clickable
19	$(".clickable").click(function () {
20		if ($(this).find("a").attr("target") == "_blank") {
21			window.open($(this).find("a").attr("href"), '_blank');
22		} else {
23			window.location = $(this).find("a").attr("href");
24		}
25		return false;
26	});
27
28	// scroll top
29
30	$(function () {
31		$(window).scroll(function () {
32			var s = $(this).scrollTop();
33			var m = 300;
34			if (s > m) {
35				$("#pagetop").fadeIn('slow');
36			} else if (s < m) {
37				$("#pagetop").fadeOut('slow');
38			}
39		});
40	});
41
42	$(function () {
43		$('a[href^="#"]:not([href$="#"])').click(function () {
44			var href = $(this).attr('href');
45			var pos = $(href).offset().top;
46			var duration = 600;
47			$('body, html').animate({
48				scrollTop: pos
49			}, duration, 'linear');
50			return false;
51		});
52	});
53
54
55
56	$(function () {
57
58
59
60		var headerHight = $("#header").outerHeight();
61		$("a").click(function () {
62			var href = $(this).attr("href");
63			var target = $(href == "#" || href == "" ? "body" : href);
64			var position = target.offset().top - headerHight;
65			$("html, body").animate({
66				scrollTop: position
67			}, 500, "swing");
68			return false;
69		});
70
71
72
73
74		$(window).on("scroll", function () {
75			$("#header").toggleClass("fixed", $(this).scrollTop() > 61)
76		});
77
78
79
80
81	});
82
83
84
85
86
87	//tel link
88	$(function () {
89		var ua = navigator.userAgent;
90		if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0) {
91			$('.tel-link').each(function () {
92				var str = $(this).text();
93				$(this).html($('<a>').attr('href', 'tel:' + str.replace(/-/g, '')).append(str + '</a>'));
94			});
95		}
96	});
97
98
99
100	// loop slider
101	$(function () {
102		var setElm = $('.loopSlider'),
103			slideSpeed = 18000;
104
105		setElm.each(function () {
106			var self = $(this),
107				selfWidth = self.innerWidth(),
108				findUl = self.find('ul'),
109				findLi = findUl.find('li'),
110				listWidth = findLi.outerWidth(),
111				listCount = findLi.length,
112				loopWidth = listWidth * listCount;
113
114			findUl.wrapAll('<div class="loopSliderWrap" />');
115			var selfWrap = self.find('.loopSliderWrap');
116
117			if (loopWidth > selfWidth) {
118				findUl.css({
119					width: loopWidth
120				}).clone().appendTo(selfWrap);
121
122				selfWrap.css({
123					width: loopWidth * 2
124				});
125
126				function loopMove() {
127					selfWrap.animate({
128						left: '-' + (loopWidth) + 'px'
129					}, slideSpeed * listCount, 'linear', function () {
130						selfWrap.css({
131							left: '0'
132						});
133						loopMove();
134					});
135				};
136				loopMove();
137
138				setElm.hover(function () {
139					selfWrap.pause();
140				}, function () {
141					selfWrap.resume();
142				});
143			}
144		});
145	});
146
147
148
149	/*
150	 * responsive image
151	 */
152
153	$(function () {
154		var $setElem = $('.switch'),
155			pcName = '_pc',
156			spName = '_sp',
157			replaceWidth = 767;
158
159		$setElem.each(function () {
160			var $this = $(this);
161
162			function imgSize() {
163				if (window.innerWidth > replaceWidth) {
164					$this.attr('src', $this.attr('src').replace(spName, pcName)).css({
165						visibility: 'visible'
166					});
167				} else {
168					$this.attr('src', $this.attr('src').replace(pcName, spName)).css({
169						visibility: 'visible'
170					});
171				}
172			}
173			$(window).resize(function () {
174				imgSize();
175			});
176			imgSize();
177		});
178	});
179
180
181
182
183
184	$(function () {
185
186
187		//tel link
188		var ua = navigator.userAgent;
189		if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0) {
190			$('.tel-link').each(function () {
191				var str = $(this).text();
192				$(this).html($('<a>').attr('href', 'tel:' + str.replace(/-/g, '')).append(str + '</a>'));
193			});
194		}
195
196	});
197
198
199
200	// tile.js
201	/**
202	 * Flatten height same as the highest element for each row.
203	 *
204	 * Copyright (c) 2011 Hayato Takenaka
205	 * Dual licensed under the MIT and GPL licenses:
206	 * http://www.opensource.org/licenses/mit-license.php
207	 * http://www.gnu.org/licenses/gpl.html
208	 * @author: Hayato Takenaka (https://github.com/urin/jquery.tile.js)
209	 * @version: 1.1.1
210	 **/
211	$.fn.tile = function (columns) {
212		var tiles, $tile, max, c, h, remove, s = document.body.style,
213			a = ["height"],
214			last = this.length - 1;
215		if (!columns) columns = this.length;
216		remove = s.removeProperty ? s.removeProperty : s.removeAttribute;
217		return this.each(function () {
218			remove.apply(this.style, a);
219		}).each(function (i) {
220			c = i % columns;
221			if (c == 0) tiles = [];
222			$tile = tiles[c] = $(this);
223			h = ($tile.css("box-sizing") == "border-box") ? $tile.outerHeight() : $tile.innerHe
223ight();
224			if (c == 0 || h > max) max = h;
225			if (i == last || c == columns - 1) {
226				$.each(tiles, function () {
227					this.css("height", max);
228				});
229			}
230		});
231	};
232});
233
234
235/******************************************************
236 ** File Name : medica.js powered by yuga.js
237 ** Creater : miura@MMP
238 ** Summary : custom yuga.js
239 ** Modified : 2008.07.29
240/ *****************************************************
241/*
242 * yuga.js 0.7.1 - 優雅なWeb制作のためのJS
243 *
244 * Copyright (c) 2009 Kyosuke Nakamura (kyosuke.jp)
245 * Licensed under the MIT License:
246 * http://www.opensource.org/licenses/mit-license.php
247 *
248 * Since:     2006-10-30
249 * Modified:  2009-01-27
250 *
251 * jQuery 1.3.1
252 * ThickBox 3.1
253 */
254
255
256(function ($) {
257
258	$(function () {
259		$.yuga.selflink();
260	});
261
262	//---------------------------------------------------------------------
263
264	$.yuga = {
265		// URIを解析したオブジェクトを返すfunction
266		Uri: function (path) {
267			var self = this;
268			this.originalPath = path;
269			//絶対パスを取得
270			this.absolutePath = (function () {
271				var e = document.createElement('span');
272				e.innerHTML = '<a href="' + path + '" />';
273				return e.firstChild.href;
274			})();
275			//絶対パスを分解
276			var fields = {
277				'schema': 2,
278				'username': 5,
279				'password': 6,
280				'host': 7,
281				'path': 9,
282				'query': 10,
283				'fragment': 11
284			};
285			var r = /^((\w+):)?(\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/.exec(this.absolutePath);
286			for (var field in fields) {
287				this[field] = r[fields[field]];
288			}
289			this.querys = {};
290			if (this.query) {
291				$.each(self.query.split('&'), function () {
292					var a = this.split('=');
293					if (a.length == 2) self.querys[a[0]] = a[1];
294				});
295			}
296		},
297		//現在のページと親ディレクトリへのリンク
298		selflink: function (options) {
299			var c = $.extend({
300				selfLinkAreaSelector: 'body',
301				selfLinkClass: 'current',
302				parentsLinkClass: 'parentsLink',
303				postfix: '_cr',
304				changeImgSelf: true,
305				changeImgParents: true
306			}, options);
307			$(c.selfLinkAreaSelector + ((c.selfLinkAreaSelector) ? ' ' : '') + 'a[href]').each(function () {
308				var href = new $.yuga.Uri(this.getAttribute('href'));
309				var setImgFlg = false;
310				if ((href.absolutePath == location.href) && !href.fragment) {
311					//同じ文書にリンク
312					$(this).addClass(c.selfLinkClass);
313					setImgFlg = c.changeImgSelf;
314				} else if (0 <= location.href.search(href.absolutePath)) {
315					//親ディレクトリリンク
316					$(this).addClass(c.parentsLinkClass);
317					setImgFlg = c.changeImgParents;
318				}
319				if (setImgFlg) {
320					//img要素が含まれていたら現在用画像(_cr)に設定
321					$(this).find('img').each(function () {
322					  if(!$(this).closest('.ftBlogBanner').hasClass('ftBlogBanner')){
323						this.originalSrc = $(this).attr('src');
324						this.current_Src = this.originalSrc.replace(new RegExp('(' + c.postfix + ')?(\.gif|\.jpg|\.png)$'), c.postfix + "$2");
325						$(this).attr('src', this.current_Src);
326					  }
327					});
328				}
329			});
330		}
331	};
332})(jQuery);
333
334
335
336
337
338
339
340
341
342/*--------------------------------------------------------------------------*
343 *  
344 *  heightLine JavaScript Library beta4
345 *  
346 *  MIT-style license. 
347 *  
348 *  2007 Kazuma Nishihata 
349 *  http://www.webcreativepark.net
350 *  
351 *--------------------------------------------------------------------------*/
352new function () {
353
354	function heightLine() {
355
356		this.className = "heightLine";
357		this.parentClassName = "heightLineParent"
358		reg = new RegExp(this.className + "-([a-zA-Z0-9-_]+)", "i");
359		objCN = new Array();
360		var objAll = document.getElementsByTagName ? document.getElementsByTagName("*") : document.all;
361		for (var i = 0; i < objAll.length; i++) {
362			var eltClass = objAll[i].className.split(/\s+/);
363			for (var j = 0; j < eltClass.length; j++) {
364				if (eltClass[j] == this.className) {
365					if (!objCN["main CN"]) objCN["main CN"] = new Array();
366					objCN["main CN"].push(objAll[i]);
367					break;
368				} else if (eltClass[j] == this.parentClassName) {
369					if (!objCN["parent CN"]) objCN["parent CN"] = new Array();
370					objCN["parent CN"].push(objAll[i]);
371					break;
372				} else if (eltClass[j].match(reg)) {
373					var OCN = eltClass[j].match(reg)
374					if (!objCN[OCN]) objCN[OCN] = new Array();
375					objCN[OCN].push(objAll[i]);
376					break;
377				}
378			}
379		}
380
381		//check font size
382		var e = document.createElement("div");
383		var s = document.createTextNode("S");
384		e.appendChild(s);
385		e.style.visibility = "hidden"
386		e.style.position = "absolute"
387		e.style.top = "0"
388		document.body.appendChild(e);
389		var defHeight = e.offsetHeight;
390
391		changeBoxSize = function () {
392			for (var key in objCN) {
393				if (objCN.hasOwnProperty(key)) {
394					//parent type
395					if (key == "parent CN") {
396						for (var i = 0; i < objCN[key].length; i++) {
397							var max_height = 0;
398							var CCN = objCN[key][i].childNodes;
399							for (var j = 0; j < CCN.length; j++) {
400								if (CCN[j] && CCN[j].nodeType == 1) {
401									CCN[j].style.height = "auto";
402									max_height = max_height > CCN[j].offsetHeight ? max_height : CCN[j].offsetHeight;
403								}
404							}
405							for (var j = 0; j < CCN.length; j++) {
406								if (CCN[j].style) {
407									var stylea = CCN[j].currentStyle || document.defaultView.getComputedStyle(CCN[j], '');
408									var newheight = max_height;
409									if (stylea.paddingTop) newheight -= stylea.paddingTop.replace("px", "");
410									if (stylea.paddingBottom) newheight -= stylea.paddingBottom.replace("px", "");
411									if (stylea.borderTopWidth && stylea.borderTopWidth != "medium") newheight -= stylea.borderTopWidth.replace("px", "");
412									if (stylea.borderBottomWidth && stylea.borderBottomWidth != "medium") newheight -= stylea.borderBottomWidth.replace("px", "");
413									CCN[j].style.height = newheight + "px";
414								}
415							}
416						}
417					} else {
418						var max_height = 0;
419						for (var i = 0; i < objCN[key].length; i++) {
420							objCN[key][i].style.height = "auto";
421							max_height = max_height > objCN[key][i].offsetHeight ? max_height : objCN[key][i].offsetHeight;
422						}
423						for (var i = 0; i < objCN[key].length; i++) {
424							if (objCN[key][i].style) {
425								var stylea = objCN[key][i].currentStyle || document.defaultView.getComputedStyle(objCN[key][i], '');
426								var newheight = max_height;
427								if (stylea.paddingTop) newheight -= stylea.paddingTop.replace("px", "");
428								if (stylea.paddingBottom) newheight -= stylea.paddingBottom.replace("px", "");
429								if (stylea.borderTopWidth && stylea.borderTopWidth != "medium") newheight -= stylea.borderTopWidth.replace("px", "")
430								if (stylea.borderBottomWidth && stylea.borderBottomWidth != "medium") newheight -= stylea.borderBottomWidth.replace("px", "");
431								objCN[key][i].style.height = newheight + "px";
432							}
433						}
434					}
435				}
436			}
437		}
438
439		checkBoxSize = function () {
440			if (defHeight != e.offsetHeight) {
441				changeBoxSize();
442				defHeight = e.offsetHeight;
443			}
444		}
445		changeBoxSize();
446		setInterval(checkBoxSize, 1000)
447		window.onresize = changeBoxSize;
448	}
449
450	function addEvent(elm, listener, fn) {
451		try {
452			elm.addEventListener(listener, fn, false);
453		} catch (e) {
454			elm.attachEvent("on" + listener, fn);
455		}
456	}
457	addEvent(window, "load", heightLine);
458}

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.