PageSourceSearch

https://www.lilybells.jp/common/js/content/home.js

js lilybells.jp collected 2026-10-04 12:43:20 UTC 10,034 bytes, 461 lines download raw bytes

1/**
2 *================================================
3 *
4 * [home]
5 * 
6 *================================================
7 */	
8var slider 			= false,
9	spSlider 		= false,
10	cbSlider 		= false,
11	totalSlide 		= 0,
12	video01 		= null,
13	videoSrc01mp4 	= tmpl_dir + 'movie/movie01.mp4',
14	videoSrc01webm 	= tmpl_dir + 'movie/movie01.webm',
15	videoSrc01ogv 	= tmpl_dir + 'movie/movie01.ogv',
16	video01Poster 	= tmpl_dir + 'images/content/home/bgImage03.jpg',
17	video02 		= null,
18	videoSrc02mp4 	= tmpl_dir + 'movie/movie02.mp4',
19	videoSrc02webm 	= tmpl_dir + 'movie/movie02.webm',
20	videoSrc02ogv 	= tmpl_dir + 'movie/movie02.ogv',
21	video02Poster 	= tmpl_dir + 'images/content/home/bgImage04.jpg',
22	isFirst 		= true,
23	isSkip 			= false,
24	isOpen 			= false,
25	movieSrc 		= '';
26
27(function($) {
28	$(function() {
29		/**
30		 ********************************************
31		 * load event
32		 ******************************************** 
33		 */
34		$(window).load(function() {
35			query=retrieveGETqs();
36			isSkip = true;
37			
38			contentInit();
39			videoInit();
40			//gMapInit();
41		});
42		/**
43		 ********************************************
44		 * resize event
45		 ******************************************** 
46		 */
47		$(window).resize(function() {
48			contentAdjust();
49			videoInit();
50			sliderToggle();
51		});
52		/**
53		 ********************************************
54		 * click event
55		 ******************************************** 
56		 */
57		$('#mainVisualWrapper .scrollBtn').click(function() {
58			$('#content').velocity('scroll', {
59				duration: 500,
60				easing: 'easeInQuad'
61			});
62			
63			return false;
64		});
65		/**
66		 ********************************************
67		 * mousewheel event
68		 ******************************************** 
69		 */
70		
71		/**
72		 ********************************************
73		 * key event
74		 ******************************************** 
75		 */
76		
77		/**
78		 ********************************************
79		 * etc
80		 ******************************************** 
81		 */
82		$('#commentArea .comment').jScrollPane();
83		popupInit();
84		loadResultsOutput();
85	});
86}(jQuery));
87/**
88 ********************************************************** 
89 * 
90 * functions 
91 * 
92 ********************************************************** 
93 */
94function contentInit() {
95	$('#wrapper').css({
96		opacity: 0,
97		visibility: 'visible'
98	});
99	
100	totalSlide=$('#mainVisual li').length;
101	
102	contentAdjust();
103	introInit();
104	cbSliderInit();
105}
106
107function contentAdjust() {
108	if (!isRespMode) {
109		/*if (!isHeaderMini) {
110			$('#mainVisualWrapper').css({
111				paddingTop: 150
112			});
113		} else {
114			$('#mainVisualWrapper').css({
115				paddingTop: 100
116			});
117		}*/
118		$('#mainVisualWrapper, #mainVisual li').css({
119			// width: wWidth,
120			height: wHeight
121		});
122		$('#content').css({
123			marginTop: wHeight,
124			minHeight: wHeight
125		});
126	} else {
127		/*$('#mainVisualWrapper').css({
128			paddingTop: 60
129		});*/
130		$('#mainVisualWrapper, #mainVisual li').css({
131			// width: wWidth,
132			height: 'auto'
133		});
134		$('#content').css({
135			marginTop: 0,
136			minHeight: 0
137		});
138	}
139	
140	// sliderToggle();
141}
142
143function sliderToggle() {
144	if (!isRespMode) {
145		if (!slider) sliderInit();
146		if (spSlider) spSliderUnInit();
147	} else {
148		if (slider) sliderUnInit();
149		if (!spSlider) spSliderInit();
150	}
151}
152
153function sliderUnInit() {
154	slider.destroySlider();
155	slider=false;
156}
157
158function spSliderUnInit() {
159	spSlider.destroySlider();
160	spSlider=false;
161}
162
163function introInit() { $('#opening').remove(); 
164					  $('#loading').velocity('fadeOut', 300);
165					  $('#wrapper').stop().velocity({opacity: 1}, 1000);
166setTimeout(function() { 
167sliderToggle(); 
168}, 500); 
169} 
170
171function sliderInit() {
172	slider=$('#mainVisual').bxSlider({
173		mode: 'fade',
174		useCSS: false,
175		easing: 'easeOutExpo',
176		// pagerCustom: '#sliderPager',
177		pager: false,
178		controls: false,
179		// nextSelector: '#sliderNextBt',
180		// prevSelector: '#sliderPrevBt',
181		speed: 2000,
182		pause: 2000,
183		auto: true,
184		slideMargin: 0,
185		startSlide: 0,
186		infiniteLoop: true,
187		// minSlides: 3,
188		// maxSlides: 1,
189		onSlideBefore: function(a, b, c) {
190			slider.stopAuto();
191		},
192		onSlideAfter: function(a, b, c) {
193			slider.startAuto();
194		}, 
195		onSliderLoad: function() {
196			$('#mainVisualWrapper').css('visibility', 'visible');
197		}
198	});
199}
200
201function spSliderInit() {
202	spSlider=$('#mainVisualSP').bxSlider({
203		mode: 'fade',
204		useCSS: false,
205		easing: 'easeOutExpo',
206		// pagerCustom: '#sliderPager',
207		pager: false,
208		controls: false,
209		// nextSelector: '#sliderNextBt',
210		// prevSelector: '#sliderPrevBt',
211		speed: 2000,
212		pause: 2000,
213		auto: true,
214		slideMargin: 0,
215		startSlide: 0,
216		infiniteLoop: true,
217		// minSlides: 3,
218		// maxSlides: 1,
219		touchEnabled: false,
220		onSlideBefore: function(a, b, c) {
221			spSlider.stopAuto();
222		},
223		onSlideAfter: function(a, b, c) {
224			spSlider.startAuto();
225		}, 
226		onSliderLoad: function() {
227			$('#mainVisualWrapper').css('visibility', 'visible');
228		}
229	});
230}
231
232function cbSliderInit() {
233	$('#contentsBannerArea .sliderWrapper').append('<span class="controlItem" id="cbSliderPrevBt" /><span class="controlItem" id="cbSliderNextBt" />');
234	
235	cbSlider=$('#contentsBannerArea .slider').bxSlider({
236		// mode: 'fade',
237		useCSS: false,
238		easing: 'easeOutExpo',
239		// pagerCustom: '#sliderPager',
240		pager: false,
241		// controls: false,
242		nextSelector: '#cbSliderNextBt',
243		prevSelector: '#cbSliderPrevBt',
244		speed: 1000,
245		// pause: 10,
246		// auto: true,
247		slideMargin: 0,
248		// startSlide: isFirst ? 0 : totalSlide - 1,
249		infiniteLoop: true,
250		// minSlides: 3,
251		// maxSlides: 1,
252		onSlideBefore: function(a, b, c) {
253			// slider.startAuto();
254		},
255		onSlideAfter: function(a, b, c) {
256			// slider.stopAuto();
257		}, 
258		onSliderLoad: function() {
259			// 
260		}
261	});
262}
263
264function videoInit() {
265	if (!isRespMode) {
266		if (video01 !== null || video02 !== null) return;
267		
268		$('.bgVideo').empty();
269		$('.bgVideo').append('<video />');
270		
271		video01=$('#reasonVideo video')[0];
272		
273		/*if (video01.canPlayType('video/mp4')) {
274			video01.src=videoSrc01mp4;
275		} else if (video01.canPlayType('video/webm')) {
276			video01.src=videoSrc01webm;
277		} else if (video01.canPlayType('video/ogg')) {
278			video01.src=videoSrc01ogv;
279		} else {
280			video01.src='';
281		}
282		video01.poster 		= video01Poster,
283		video01.loop 		= true,
284		video01.autoplay 	= true,
285		video01.play();*/
286		
287		video02=$('#supportVideo video')[0];
288		
289		/*if (video02.canPlayType('video/mp4')) {
290			video02.src=videoSrc02mp4;
291		} else if (video02.canPlayType('video/webm')) {
292			video02.src=videoSrc02webm;
293		} else if (video02.canPlayType('video/ogg')) {
294			video02.src=videoSrc02ogv;
295		} else {
296			video02.src='';
297		}
298		video02.poster 		= video02Poster,
299		video02.loop 		= true,
300		video02.autoplay 	= true,
301		video02.play();*/
302	} else {
303		video01=null,
304		video02=null;
305		
306		$('.bgVideo').empty();
307	}
308}
309
310var gMapObj 		= null,
311	currentInfoWin 	= null;
312
313function gMapInit() {
314	var options={
315		zoom: 15,
316		center: new google.maps.LatLng(35.7589895, 140.293279),
317		mapTypeId: google.maps.MapTypeId.ROADMAP,
318		scaleControl: true,
319		scrollwheel: false
320	};
321	
322	gMapObj=new google.maps.Map(document.getElementById('gMap'), options);
323	
324	var mapObjs={
325		latlng: new google.maps.LatLng(35.7589895, 140.293279),
326		title: 'リリーベルクリニック'
327	};
328	
329	addMarker(mapObjs);
330}
331
332function addMarker(obj) {
333	if (gMapObj) {
334		var marker=new google.maps.Marker({ 
335			position: obj.latlng, 
336			map: gMapObj, 
337			title: obj.title,
338			// icon: 'images/content/home/marker.png',
339			animation: google.maps.Animation.DROP,
340			optimized: false
341		});
342		
343		var infoWin=new google.maps.InfoWindow({
344			content: '<div class="gmapWin"><div class="inner"><h3>' + obj.title + '</h3></div></div>'
345		});
346		
347		google.maps.event.addListener(marker, 'click', function() {
348			if (currentInfoWin) currentInfoWin.close();
349			infoWin.open(gMapObj, marker);
350			currentInfoWin=infoWin;
351			// gMapObj.panTo(obj.latlng);
352		});
353	}
354}
355
356function popupInit() {
357	$('<div id="alphaBg"></div>').prependTo('#wrapper').css({
358		opacity: 0,
359		height: wHeight
360	});
361	
362	$('.popupCloseBt, #alphaBg').click(function() {
363		popupClose();
364	});
365	
366	$('.popupBtItem').click(function() {
367		if ($('.popupWrapper').is(':animated')) return;
368		
369		$('.popupWrapper').css('opacity', 0).show();
370		
371		var index=$('.popupBtItem').index(this),
372			id=$('.popupWrapper').eq(index).attr('id');
373			
374		if (id=== 'popupWrapper01') {
375			movieSrc='<iframe width="800" height="600" src="https://www.youtube.com/embed/XtOp81kiCgo?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>';
376			
377			$('#popupWrapper01').find('.movie').html(movieSrc);
378		}
379		
380		$('.popupWrapper').hide().css('opacity', 1);
381		adjust();
382		popupChange('#' + id);
383	});
384	
385	function popupChange(id) {
386		var popup=id;
387		
388		if (!isOpen) {
389			isOpen=true;
390			$('#alphaBg').stop().show().animate({
391				opacity: 0.8
392			}, 500, function() {
393				if (isIE6 || isIE7 || isIE8) {
394					$(popup).show();
395				} else {
396					$(popup).fadeIn(500);
397				}
398			});	
399		} else {
400			$(popup).fadeIn(500);
401		}
402	}
403	
404	function popupClose() {
405		if (isIE6 || isIE7 || isIE8) {
406			$('.popupWrapper').hide();
407			$('#alphaBg').stop().animate({
408				opacity: 0
409			}, 500, function() {
410				$(this).hide();
411				isOpen=false;
412				
413				$('#popupWrapper01').find('.movie').empty();
414			});
415		} else {
416			$('.popupWrapper').fadeOut(500, function() {
417				$('#alphaBg').stop().animate({
418					opacity: 0
419				}, 500, function() {
420					$(this).hide();
421					isOpen=false;
422					
423					$('#popupWrapper01').find('.movie').empty();
424				});
425			});
426		}
427	}
428	
429	function adjust() {
430		$('.popupWrapper').each(function() {
431			var scrollPos=$(window).scrollTop(),
432				pHeight=$(this).outerHeight();
433				
434			if (scrollPos > pHeight) {
435				if (isRespMode) {
436					$(this).css({
437						top: scrollPos + 30
438					});
439				} else {
440					var padding=wHeight > pHeight ? (wHeight - pHeight) / 2 : 0;
441					
442					$(this).css({
443						top: (scrollPos - wHeight) + padding
444					});
445				}
446			}
447		});
448		$('#alphaBg').css({
449			height: wHeight
450		});
451	}
452	
453	$(window).load(function() {
454		adjust();
455		$('.popupWrapper').css('visibility', 'visible').hide();
456	});
457	
458	$(window).resize(function() {
459		adjust();
460	});
461}

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.