PageSourceSearch

https://kasama-kankou.jp/skin/common/js/ready.common.js

js kasama-kankou.jp collected 2026-10-01 14:44:54 UTC 3,358 bytes, 138 lines download raw bytes

1/*****************************************************************
2*	Copyright(c) 2013 @Kuro 
3*-----------------------------------------------------------------
4*	File Name: ready.common.js
5/****************************************************************/
6$(function() {
7	// Switch PC To SP
8	$.SwitchPC2SP({
9		finishCallback: function() {
10			var $viewPC2SP = $('#viewPC2SP');
11			if( $viewPC2SP.css('display') == 'block' ) {
12				$('#header').css('top', $viewPC2SP.outerHeight(true) + 'px');
13			}
14		}
15	});
16	
17	// Foreigners Pull Down
18	$('#foreigners').on('mouseover mouseleave', function(ev) {
19		if( ev.type == 'mouseover' ) {
20			$(this).children('ul:not(:animated)').slideDown('fast');
21		} else {
22			$(this).children('ul').slideUp('fast');
23		}
24	});
25	// Accessibility Pull Down
26	$('#accessibility').on('mouseover mouseleave', function(ev) {
27		if( ev.type == 'mouseover' ) {
28			$('#accessibilityInner:not(:animated)').slideDown('fast');
29		} else {
30			$('#accessibilityInner').slideUp('fast');
31		}
32	});
33
34	// Nav Switch
35	$('#navMenu').TabSwitch({
36		active_tab: 0
37	});
38
39	// Font Size Change
40	$('#wrapper').ChangeFontSize({
41		max_value: 20,
42		zoom_value: 2,
43		cookie_name: COOKIE_CLIENT_NAME + '_fontsize'
44	});
45
46	// Background Color Change
47	$('#colorChanger').StyleSwitchBgColor({
48		cookie_name: COOKIE_CLIENT_NAME + '_bgcolor'
49	});
50
51	// Social Buttons
52	if( $('#social').length ) {
53		$('#social .twitter').socialbutton('twitter', {
54			button: 'horizontal'
55		}).width(142);
56		$('#social .facebook').socialbutton('facebook_like', {
57			button: 'button_count'
58		}).width(142);
59	}
60
61	// Placeholder
62	$('#field_search').SetupPlaceholder();
63
64	// Suggest Keyword
65	$('#field_search').autocomplete({
66		source: function(req, resp) {
67			SuggestSearchKeyword(req, resp);
68		}
69	});
70
71	// Tag Cloud
72	$('#wellSearchKeyword').TagCloud({
73		tag_type: 'ul',
74		site_url: WEB_DOMAIN
75	});
76
77	// Top Of Page
78	$('#pageTop').TopOfPage();
79
80	// Print Dialog
81	$('#print').PrintDialog();
82
83	// Page Calendar
84	$('.calendar_page').PageCalendar({
85		site_url: WEB_DOMAIN
86	});
87
88	// Page Counter
89	$('#counter').PageCounter({
90		content: 'span',
91		site_url: WEB_DOMAIN
92	});
93
94	// Light Box
95	if( $('a[rel="lightbox"]').length ) {
96		$('a[rel="lightbox"]').colorbox({
97			rel: 'lightbox',
98			maxWidth: '100%',
99			maxHeight: '100%',
100			previous: '前へ',
101			next: '次へ',
102			close: '閉じる',
103			current: ''
104		});
105	}
106	
107	// Photo Change Gallery
108	if( $('.photoGallery').length ) {
109		$('.photoGallery').PhotoChangeGallery();
110	}
111
112	// Map Link
113	$('img[usemap]').rwdImageMaps();
114});
115$(window).on('load', function() {
116	// Anchor Link
117	var hashId = location.hash;
118	if( hashId ) {
119		AnchorLink(hashId);
120	}
121	
122	$('#contents a[href^=#],.scroll').on('click', function() {
123		AnchorLink($(this).attr('href'));
124	});
125
126	function AnchorLink(hash) {
127		var headerHeight = $('#header').outerHeight(true);
128
129		hash = hash.replace('#', '');
130		if( $('a[name=' + hash + ']').length ) {
131			var position = $('a[name=' + hash + ']').offset().top - headerHeight - 40;
132			$('html, body').animate({scrollTop: position}, 500);
133		} else if( $('[id=' + hash + ']').length ) {
134			var position = $('#' + hash).offset().top - headerHeight - 40;
135			$('html, body').animate({scrollTop: position}, 500);
136		}
137	}
138});

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.