PageSourceSearch

https://theboly.com/en/js/index.js

js theboly.com collected 2026-10-06 22:32:11 UTC 6,524 bytes, 223 lines download raw bytes

1// JavaScript Document
2$(function() {
3	
4//	//fade_logo
5//	
6//	//タイマー設定
7//	var now = new Date();//現在
8//	//設定期間
9//	var fade_logo_start = new Date('2020/03/29 00:00');//開始 2020.3/29 00:00
10//	var fade_logo_end = new Date('2021/03/28 23:59');//終了 2021.3/28 23:59
11//
12//	if ( now < fade_logo_start ){//開始前
13//		//console.log('開始前');
14//		$('body').css('height', 'auto');
15//		$('#fade_logo').hide();
16//	} else if ( fade_logo_start < now && now < fade_logo_end ) {//開始~終了(期間中)
17//		
18//		
19//    if(document.URL.match(/#/)) {
20//    	// URLに#が含まれる時に実行する処理を記述する
21//		//console.log('URLに#が含まれる');
22//		$('body').css('height', 'auto');
23//		$('#fade_logo').hide();
24//    }else{
25//    	// 上記の場合以外の時に行う処理を記述する
26//		//console.log('URLに#が含まれない');
27//		$('#fade_logo').addClass('active').css('height',$(window).innerHeight());
28//		//console.log('高さ調整した');
29//		setTimeout(function(){
30//		$('#fade_logo .logo').css('opacity', 1);
31//		},500);
32//		setTimeout(function(){
33//			$('body').css('height', 'auto');
34//			$('#fade_logo .logo').animate({opacity: 0}, 2000,'linear');
35//			$('#fade_logo').fadeOut(2000);
36//		},2000);
37//    }
38//		
39//		
40//	} else {//終了後
41//		//console.log('終了後');
42//		$('body').css('height', 'auto');
43//		$('#fade_logo').hide();
44//	}	
45    
46    $(function() {
47  //cookieの値がonじゃなかったら表示させる
48  if ($.cookie('bnrRead') != 'on') {
49	//予約特典モーダル表示
50	$('#yoyakutokutenn').prop('checked', true);
51  }
52
53	$('#next-nomodal').change(function(){
54    	var checked = $(this).prop('checked');
55		if( checked === true ){
56			//チェックが入っている場合の処理
57			$.cookie('bnrRead', 'on', { //cookieにbnrReadという名前でonという値をセット
58				expires: 100, //cookieの有効日数
59				path:'/' //有効にするパス
60			  });
61		}
62	});
63	
64	//予約特典モーダル閉じる
65	$('#tokuten-modal .close, #tokuten-modal .modal-overlay').click(function(){
66		$('#tokuten-modal').fadeOut();
67	});
68
69});
70
71	
72	//MVスライダー
73    $('.main_visual .slider').slick({
74		autoplay : true,
75		arrows : false,
76		dots : false,
77		fade: true,
78		speed: 3000
79	});
80	
81	//おすすめプランスライダー
82	var $reco_slider_container = $('#recommend .slider-container'),
83    $reco_slider = $('#recommend .slider');
84	//$reco_slider.on('init', function(){
85//	  $reco_slider_container.addClass('initialized');
86//	});
87	$reco_slider.slick({
88		autoplay : false,
89		arrows : true,
90		dots: true,
91		appendDots: $reco_slider_container,
92		appendArrows: $reco_slider_container,
93		prevArrow: '<div class="slider-prev"><img src="images/common/slick_prev2.png" alt="Prev"></div>',
94		nextArrow: '<div class="slider-next"><img src="images/common/slick_next2.png" alt="Next"></div>',
95		slidesToShow: 3,
96		slidesToScroll: 3,
97		swipeToSlide: true,
98		responsive: [
99		{
100		  breakpoint: 769,      // 415〜768px
101		  settings: {
102			slidesToShow: 2,
103			slidesToScroll: 2,
104			dots: false,
105		  }
106		},
107		{
108		  breakpoint: 415,      // 〜414px
109		  settings: {
110			slidesToShow: 1,
111			slidesToScroll: 1,
112			dots: false,
113		  }
114		}
115	  ],
116	});
117	$reco_slider.on('setPosition', function(){
118	  var slider_width = $reco_slider.width(),
119		  slide_gutter = $reco_slider.find('.slick-slide').eq(0).css('margin-right').split('px')[0],
120		  slides_num = $reco_slider.slick('slickGetOption', 'slidesToShow'),
121		  slide_width = (slider_width - slide_gutter * (slides_num - 1)) / slides_num;
122	  $reco_slider.find('.slick-active').css('width', slide_width + 'px');
123	});
124	
125	//ホテルのこだわりスライダー(swiper)
126	$(window).on('load resize', function() {
127	if(spJudge()){//スマホのみ
128	var swiper = new Swiper('.swiper-container', {
129		slidesPerView: 'auto',
130		spaceBetween: 50,
131		freeMode: true,
132		breakpoints: {
133			1024: {
134			  spaceBetween: 50,
135			},
136
137			768: {
138			  spaceBetween: 30,
139			},
140
141			414: {
142			  spaceBetween: 20,
143			}
144		}
145    });
146	}
147	});
148	
149	//画像オブジェクトフィット
150	objectFitImages('.main_visual img');
151	objectFitImages('#blog figure img');
152	
153	
154	//記事リストランダム画像入れ替え
155	$(function(){
156	var randomContent = [];
157	$('.rdm').each(function() {
158		randomContent.push($(this).html());
159	});
160	randomContent.sort(function() {
161		return Math.random() - Math.random();
162	});
163	$('.rdm').empty();
164	i = 0;
165	$('.rdm').each(function() {
166	$(this).append(randomContent[i]);
167	i++;
168	});
169	});
170	
171	
172	//レストランスライダー
173	$('#restaurant .slider').slick({
174		autoplay : true,
175		arrows : true,
176		dots : false,
177		fade: true,
178		speed: 3000,
179		prevArrow: '<div class="slider-prev"><img src="images/common/slick_prev3.png" alt="Prev"></div>',
180		nextArrow: '<div class="slider-next"><img src="images/common/slick_next3.png" alt="Next"></div>',
181	});
182	
183	//記事リストグリッド表示(PC)
184	//if(!spJudge()){
185//		jQuery(function($){
186//
187//		  //コンテンツを囲む要素をidで指定
188//		  var container = document.querySelector('#article_grid');
189//
190//		  //すべての画像を読み込み終わった後に関数を実行
191//		  imagesLoaded(container, function () {
192//			var msnry = new Masonry(container, {
193//			  itemSelector: '.item', //コンテンツのclass名
194//			  isFitWidth: true, //コンテナの親要素のサイズに基づいて、コンテンツのカラムを自動調節します。
195//			  columnWidth: 305, //カラムの幅を設定
196//			});
197//		  });
198//		});
199//	}
200
201});
202
203// 20250328追記
204jQuery(function () {
205            var webStorageAnimation = function () {
206                if (sessionStorage.getItem('access')) {
207                    // 2回目以降アクセス時の処理
208                    jQuery(".full-img").hide();
209                } else if (window.innerWidth <= 1024) {
210                    // 初回アクセス時 & 画面サイズ1024px以下のみ実行
211                    jQuery("html, body").css("overflow", "hidden"); // スクロール禁止
212                    setTimeout(function () {
213                        jQuery(".full-img").fadeOut(1000, function () {
214                            jQuery("html, body").css("overflow", ""); // スクロール許可
215                        });
216                    }, 5000);
217                    sessionStorage.setItem('access', 'true'); // sessionStorageに保存
218                } else {
219                    jQuery(".full-img").hide();
220                }
221            };
222            webStorageAnimation();
223        });

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.