PageSourceSearch

https://niigata-kankou.or.jp/js/responsive/main/module.js?v=476a30988f0c4c03ec9600e4973a6037de4dbd88

js niigata-kankou.or.jp collected 2026-09-24 18:23:12 UTC 12,704 bytes, 450 lines download raw bytes

1// var windowMobile = 768;
2
3(function($) {
4	$(function(){
5		$('.fancybox').fancybox({
6			dummy: 1
7			,padding: [0,0,0,0]
8		});
9
10		$('.js-rwdImageMap').rwdImageMaps();
11// $('.js-mikan_animation:first-child').trigger('click');
12
13		//--------------------------------------------------------------------
14
15		var osusumeIndex = 0;
16		$('.js-osusumeMore').click(function() {
17			var $target = $('.js-osusumeList.osusume'+osusumeIndex);
18			if ($target.length) {
19				$target.slideDown();
20			}
21			else {
22				$(this).fadeOut();
23			}
24
25			osusumeIndex++;
26
27			// check
28			if (!$('.js-osusumeList.osusume'+osusumeIndex).length) {
29				$(this).fadeOut();
30			}
31
32			return false;
33		});
34		$('.js-osusumeMore').trigger('click');
35
36		//--------------------------------------------------------------------
37		// var tanojiLink1 = function() {
38		// 	var image = $(this).data('image');
39		// 	$('.js-tanojiImage img').attr('src', image);
40		// };
41		// var tanojiLink2 = function() {
42		// 	var $_ = $('.js-tanojiImage img');
43		// 	$_.attr('src', $_.data('base'));
44		// };
45		$('.js-tanojiLink').hover(function() {
46			var image = $(this).data('image');
47			$('.js-tanojiImage img').attr('src', image);
48
49			$(this).parent('li').siblings().children('a').addClass('shadow');
50		}, function() {
51			var $_ = $('.js-tanojiImage img');
52			$_.attr('src', $_.data('base'));
53
54			$('.js-tanojiLink').removeClass('shadow');
55		});
56
57
58		$("#section-map .mapImage a").hover(
59			function() {
60				$("#section-map .mapImage .img"+$(this).data("target")).addClass("active");
61			},
62			function() {
63				$("#section-map .mapImage .img"+$(this).data("target")).removeClass("active");
64			}
65		);
66
67		//--------------------------------------------------------------------
68
69		// $(".tablist ul li").click(function() {
70
71		// 	alert(999);
72
73		// 	$(this).siblings("li").removeClass("active");
74		// 	$(this).removeClass("active");
75		// 	$(this).addClass("active");
76		// 	var content = $(this).data("content");
77		// 	$(".tabcontent.content-" + content).siblings(".tabcontent").hide();
78		// 	// $(".tabcontent").hide();
79		// 	$(".tabcontent.content-" + content).fadeIn();
80
81		// 	return false;
82		// });
83
84		// $(".js-view_topics_tab li a").click(function() {
85
86		// 	// alert(888);
87
88		// 	$(".js-view_topics_link").attr("href", $(this).data("listurl"));
89		// });
90		// //--------------------------------------------------------------------
91		// var nowMonth = new Date().getMonth() + 1;
92		// var monthIndex = 4;
93		// if (false);
94		// else if (3 <= nowMonth && nowMonth <= 5) {
95		// 	monthIndex = 1;
96		// }
97		// else if (6 <= nowMonth && nowMonth <= 8) {
98		// 	monthIndex = 2;
99		// }
100		// else if (9 <= nowMonth && nowMonth <= 11) {
101		// 	monthIndex = 3;
102		// }
103		// var $thisMonthTab = $('section.section.season .nav-tabs.tabs li a[href="#tab-season' + monthIndex + '"]');
104
105		// var $window = $(window);
106
107		// var pickupSlexslider = { vars:{} };
108		// var seasonsActive = function(fsCont) {
109		// 	$(fsCont).flexslider({
110		// 		 animation: "slide"
111		// 		,slideshow: false
112		// 		,animationLoop: true
113		// 		,controlNav: false
114		// 		,itemWidth: 320
115		// 		,itemMargin: 20
116		// 		,prevText: " "
117		// 		,nextText: " "
118		// 		,minItems: ((windowMobile >= window.innerWidth) ? 1 : 3)
119		// 		,maxItems: ((windowMobile >= window.innerWidth) ? 1 : 3)
120		// 		,start: function(slider) {
121		// 			pickupSlexslider = slider;
122		// 			$(fsCont).css("visibility", "visible");
123		// 		}
124		// 	});
125		// }
126
127
128		// var featureBannersSlider = false;
129		// var featureLoadOptions = {
130		// 	touch: {
131		// 		auto: true,
132		// 		responsive: true,
133		// 		pause: 3000,
134		// 		speed: 1000,
135		// 		pager: false,
136		// 		moveSlides: 1,
137		// 		minSlides: 3,
138		// 		maxSlides: 3,
139		// 		slideWidth: 175,
140		// 		slideMargin: 2
141		// 	},
142		// 	wide: {
143		// 		auto: true,
144		// 		responsive: false,
145		// 		pause: 3000,
146		// 		speed: 1000,
147		// 		pager: false,
148		// 		slideMargin: 2,
149		// 		minSlides: 12,
150		// 		maxSlides: 12,
151		// 		moveSlides: 1,
152		// 		slideWidth: 175
153		// 	}
154		// };
155		// var featureLoad = function(type) {
156		// 	if (!featureBannersSlider) {
157		// 		featureBannersSlider = $('section.section.feature .slider ul').bxSlider(featureLoadOptions[type]);
158		// 	}
159		// 	else {
160		// 		featureBannersSlider.reloadSlider(featureLoadOptions[type]);
161		// 	}
162		// };
163		// featureLoad((windowMobile >= window.innerWidth) ? 'touch' : 'wide');
164
165		// $('section.section.feature .slider .bx-controls-direction a').click(function() {
166		// 	try {
167		// 		featureBannersSlider.stopAuto();
168		// 	}
169		// 	catch(e) {}
170		// });
171
172		// var featureType = false;
173		// var featureBannersWideInit = false;
174		// var featureBannersTouchInit = false;
175		// var featureBannersWideWrap = $('section.section.feature .bannerList');
176		// var featureBannersTouchWrap = $('section.section.feature .bannerList2');
177		// var featureBannersWide = $('section.section.feature .slider ul');
178		// var featureBannersTouch = $('section.section.feature .slider2 ul');
179		// var featureLoad = function(ft) {
180		// 	if (ft != featureType) {
181		// 		if (ft == 'touch') {
182		// 			featureBannersWideWrap.hide();
183		// 			featureBannersTouchWrap.show();
184
185		// 			// if (featureBannersWideInit) return true;
186		// 			featureBannersTouch.bxSlider({
187		// 				auto: true,
188		// 				responsive: true,
189		// 				pause: 2000,
190		// 				speed: 1000,
191		// 				pager: false,
192		// 				moveSlides: 1,
193		// 				minSlides: 3,
194		// 				maxSlides: 3,
195		// 				slideWidth: 175,
196		// 				slideMargin: 2
197		// 			});
198		// 			featureBannersTouchInit = true;
199		// 			log('featureLoad: touch');
200		// 		}
201		// 		else {
202		// 			featureBannersWideWrap.show();
203		// 			featureBannersTouchWrap.hide();
204
205		// 			// if (featureBannersWideInit) return false;
206		// 			featureBannersWide.bxSlider({
207		// 				auto: true,
208		// 				responsive: false,
209		// 				randomStart: false,
210		// 				pause: 2000,
211		// 				speed: 1000,
212		// 				pager: false,
213		// 				slideMargin: 2,
214		// 				minSlides: 12,
215		// 				maxSlides: 12,
216		// 				moveSlides: 1,
217		// 				slideWidth: 175
218		// 			});
219		// 			featureBannersWideInit = true;
220		// 			log('featureLoad: wide');
221		// 		}
222
223		// 		featureType = ft;
224
225		// 		log('featureType: ' + featureType);
226		// 	}
227		// }
228		// featureLoad((windowMobile >= window.innerWidth) ? 'touch' : 'wide');
229
230
231		// $("#bannerlist-portal-feature").flexslider({
232		// 	 animation: "slide"
233		// 	,slideshow: false
234		// 	,animationLoop: true
235		// 	,controlNav: false
236		// 	,itemWidth: 175
237		// 	,itemMargin: 2
238		// 	,prevText: " "
239		// 	,nextText: " "
240		// 	,minItems: ((windowMobile >= window.innerWidth) ? 1 : 24)
241		// 	,maxItems: ((windowMobile >= window.innerWidth) ? 1 : 24)
242		// 	,start: function(slider) {
243		// 		featureFlexslider = slider;
244		// 		$("#bannerlist-portal-feature").css("visibility", "visible");
245		// 	}
246		// });
247
248
249		// // portal-pr2 --------------------------------------------------------
250		// var pr2Slexslider = { vars:{} };
251		// $('#bannerlist-portal-pr2').flexslider({
252		// 	 animation: "slide"
253		// 	,slideshow: true
254		// 	,animationLoop: true
255		// 	,controlNav: false
256		// 	,itemWidth: 234
257		// 	,itemMargin: 10
258		// 	,prevText: " "
259		// 	,nextText: " "
260		// 	,minItems: ((windowMobile >= window.innerWidth) ? 2 : 4)
261		// 	,maxItems: ((windowMobile >= window.innerWidth) ? 2 : 4)
262		// 	,start: function(slider) {
263		// 		pr2Slexslider = slider;
264		// 		$("#bannerlist-portal-pr2").css("visibility", "visible");
265		// 	}
266		// });
267		// //--------------------------------------------------------------------
268
269		// // portal-pr3 --------------------------------------------------------
270		// var pr3Slexslider = { vars:{} };
271		// $('#bannerlist-portal-pr3').flexslider({
272		// 	 animation: "slide"
273		// 	,slideshow: true
274		// 	,animationLoop: true
275		// 	,controlNav: false
276		// 	,itemWidth: 234
277		// 	,itemMargin: 10
278		// 	,prevText: " "
279		// 	,nextText: " "
280		// 	,minItems: ((windowMobile >= window.innerWidth) ? 2 : 4)
281		// 	,maxItems: ((windowMobile >= window.innerWidth) ? 2 : 4)
282		// 	,start: function(slider) {
283		// 		pr3Slexslider = slider;
284		// 		$("#bannerlist-portal-pr3").css("visibility", "visible");
285		// 	}
286		// });
287		// //--------------------------------------------------------------------
288
289		// ranking -----------------------------------------------------------
290		// var $thisRankTab = "shimanami";
291		// var rankingLoad = function(arg) {
292		// 	if (arg === undefined) arg = '';
293		// 	if(arg != "") {
294		// 		// ranking
295		// 		$("#sec-rankings .nav-list a").removeClass("active");
296		// 		$("#sec-rankings .nav-list a." + arg).addClass("active");
297
298		// 		$("#sec-rankings .list-content section").hide();
299		// 		$("#sec-rankings .list-content section." + arg).show();
300		// 	}else {
301		// 		$("#sec-rankings .list-content section").show();
302		// 	}
303		// }
304		// $("#sec-rankings .nav-list a").click(function() {
305		// 	rankingLoad($thisRankTab = $(this).attr("href").substr(1));
306		// 	return false;
307		// });
308		// rankingLoad((windowMobile >= window.innerWidth) ? $thisRankTab : "");
309
310
311
312		var $thisRankTab = 1;
313		var rankingLoad = function(arg) {
314// log(arg);
315			if (arg === undefined) arg = '';
316			if(arg != "") {
317				var $tab = $(".js-rankTabList li a.area"+arg);
318				var $tabs = $(".js-rankTabList li a");
319				var $content = $(".js-rankContent.area"+arg);
320// log($tabs);
321// log($content);
322
323				$tabs.removeClass("active");
324				$tab.addClass("active");
325
326				$content.siblings().hide();
327				$content.show();
328			}
329			else {
330				$(".js-rankContent").show();
331			}
332		}
333		// $("#sec-rankings .nav-list a").click(function() {
334		// 	rankingLoad($thisRankTab = $(this).attr("href").substr(1));
335		// 	return false;
336		// });
337		$(".js-rankTabList a").click(function() {
338			$thisRankTab = $(this).data("id");
339
340			rankingLoad($thisRankTab);
341			return false;
342		});
343		rankingLoad((windowMobile >= window.innerWidth) ? $thisRankTab : "");
344		//--------------------------------------------------------------------
345
346		// // event -----------------------------------------------------------
347		// var $thisEventTab = "yamanami";
348		// var eventLoad = function(arg) {
349		// 	if (arg === undefined) arg = '';
350		// 	if(arg != "") {
351		// 		// ranking
352		// 		$("#sec-events .nav-list a").removeClass("active");
353		// 		$("#sec-events .nav-list a." + arg).addClass("active");
354
355		// 		$("#sec-events .list-content section").hide();
356		// 		$("#sec-events .list-content section." + arg).show();
357		// 	}else {
358		// 		$("#sec-events .list-content section").show();
359		// 	}
360		// }
361		// $("#sec-events .nav-list a").click(function() {
362		// 	eventLoad($thisEventTab = $(this).attr("href").substr(1));
363		// 	return false;
364		// });
365		// eventLoad((windowMobile >= window.innerWidth) ? $thisEventTab : "");
366		// //--------------------------------------------------------------------
367
368		// // news --------------------------------------------------------------
369		// $('#sec-news a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
370		// 	var url = "/news";
371		// 	var target = $(e.target).data('url');
372		// 	if(target != "") {
373		// 		url = url + "/category:" + target;
374		// 	}
375		// 	$('#sec-news .nav-url a').attr('href', url);
376		// });
377		// //--------------------------------------------------------------------
378
379
380		var onWindowResized = function() {
381			var isMobileWindow = (windowMobile >= window.innerWidth);
382			if (isMobileWindow) {
383				// // pickupSlexslider
384				// pickupSlexslider.vars.minItems = 1;
385				// pickupSlexslider.vars.maxItems = 1;
386				// seasonsActive('#tab-season' + monthIndex + ' .portal-seasons');
387
388				// // portal-pr2
389				// try {
390				// 	pr2Slexslider.vars.minItems = 2;
391				// 	pr2Slexslider.vars.maxItems = 2;
392				// } catch (e){}
393
394				// // portal-pr3
395				// try {
396				// 	pr3Slexslider.vars.minItems = 2;
397				// 	pr3Slexslider.vars.maxItems = 2;
398				// } catch (e){}
399
400				// feature
401				// featureLoad('touch');
402
403				// ranking
404				rankingLoad($thisRankTab);
405
406				// event
407				// eventLoad($thisEventTab);
408			}
409			else {
410				// // pickupSlexslider
411				// pickupSlexslider.vars.minItems = 3;
412				// pickupSlexslider.vars.maxItems = 3;
413
414				// // pr2Slexslider
415				// try {
416				// 	pr2Slexslider.vars.minItems = 4;
417				// 	pr2Slexslider.vars.maxItems = 4;
418				// } catch (e){}
419
420				// // pr3Slexslider
421				// try {
422				// 	pr3Slexslider.vars.minItems = 4;
423				// 	pr3Slexslider.vars.maxItems = 4;
424				// } catch (e){}
425
426				// feature
427				// featureLoad('wide');
428
429				// ranking
430				rankingLoad();
431
432				// event
433				// eventLoad();
434			}
435		};
436
437
438		$(window).resize(function() {
439			onWindowResized();
440		});
441
442		// $('section.section.season a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
443		// 	var target = $(e.target).attr('href');
444		// 	var fsCont = target + ' .portal-seasons';
445		// 	seasonsActive(fsCont);
446		// });
447
448		// $thisMonthTab.trigger('click');
449	});
450})(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.