PageSourceSearch

https://www.lawsonkenpo.or.jp/common/std/js/common.js

js lawsonkenpo.or.jp collected 2026-10-05 01:06:56 UTC 3,926 bytes, 162 lines download raw bytes

1/*****************************************************************************************
2	Modules
3******************************************************************************************/
4
5
6
7/*****************************************************************************************
8	Page Loaded
9******************************************************************************************/
10
11$(window).load(function() {
12
13	if(UA.Android) {
14		$('meta[name=viewport]').remove();
15		var meta = document.createElement('meta');
16		meta.setAttribute('name','viewport');
17		meta.setAttribute('content','width=device-width,initial-scale=1.0');
18		document.getElementsByTagName('head')[0].appendChild(meta);
19	}
20
21	//pngfix
22	if(UA.IE6) {
23		DD_belatedPNG.fix('.pf');
24	}
25});
26
27$(function() {
28	    var zIndexNumber = 1000;
29	    $('nav').each(function() {
30	        $(this).css('zIndex', zIndexNumber);
31	        zIndexNumber -= 10;
32	    });
33	});
34
35/*****************************************************************************************
36	DOM Loaded
37******************************************************************************************/
38
39$(function() {
40/*
41	if(!$('body').hasClass('bHome') && UA.SP) {
42		$('#siteId a').attr('href').replace(/(index.*?.html)/, 'index_sp.html');
43	}*/
44
45	if(!UA.SP) {
46		exchangeFontStyle();
47		setSubNavigation();
48		$(".imgover").rollover();
49	} else {
50		/*
51		if(!$('body').hasClass('bHome')) {
52			$('#siteId a').attr('href').replace(/(index.*?.html)/, 'index_sp.html');
53		}*/
54		
55		//setSearchForm();
56	}
57
58	// scroll
59	$('a[href^="#"]:not(.uiTab li a)' || 'area[href^="#"]').click(function(){
60		var href= $(this).attr("href");
61		var target = $(href);
62		if (href.length > 1 && target.length) {
63			var position = target.offset().top;
64			$('html, body').stop().animate({ scrollTop: position }, 400, 'swing');
65		}else{
66			return true;
67		}
68		return false;
69	});
70	
71	//placeholder
72	$("input.placeholder, textarea.placeholder").placeholder();
73
74	//gNavHealth05 表示テキスト書き換え
75	$('#gNavHealth05 .Extratitle').each(function() {
76		if ($(this).text() === 'ふれあい健康教室のご案内') {
77			$(this).text('健康・介護・子育て支援教室');
78		}
79	});
80
81});
82
83function setSubNavigation() {
84	$('#gNav > ul > li').hoverIntent(
85		function(){
86			var $this = $(this);
87			var $anchor = $this.find('> a');
88			
89			$this.addClass('hover');
90			$anchor
91				.addClass('hover')
92				.next('div')
93				.show();
94		},
95		function() {
96			var $this = $(this);
97			var $anchor = $this.find('> a');
98			
99			$this.removeClass('hover');
100			$anchor
101				.removeClass('hover')
102				.next('div')
103				.hide();
104		}
105	);
106}
107
108function setSearchForm() {
109	$('#siteHdSearchFormIn')
110		.find('> dt a')
111		.click(function() {
112			var $t = $($(this).attr('href'));
113			if($t.length > 0) {
114				if($t.is(':visible')) {
115					$t.slideUp();
116				} else {
117					$t.slideDown();
118				}
119			}
120			
121			return false;
122		});
123}
124
125function exchangeFontStyle() {
126	//font exchange
127	var $alt_css = $('link[rel="alternate stylesheet"]');
128	var setCss = function(title) {
129		title = title || 'medium';
130		var $css = $alt_css.filter('[title=' + title + ']');
131		if ($css.length) {
132			$alt_css.prop('disabled', true);
133			$css.prop('disabled', false);
134			var date = new Date();
135			date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
136			$.cookie('css', title, {path: '/', expires: date});
137		}
138	};
139	// default css
140	setCss($.cookie('css'));
141	$('#siteHdLang li a').unbind('click').click(function() {
142		var fontsize = $(this).attr('href').replace(/^#/, '');
143		setCss(fontsize);
144		return false;
145	});	
146}
147
148/*****************************************************************************************
149	Google Analytics
150******************************************************************************************/
151
152
153
154
155
156
157
158
159
160  
161  
162  

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.