PageSourceSearch

https://ansahotels.com/kualalumpur/themes/osboot/js/scripts.js?srnhcr

js ansahotels.com collected 2026-10-07 23:10:37 UTC 7,490 bytes, 249 lines download raw bytes

1/*	---------------------------------------------
2
3	Melonism
4	Powered by OrangeSoft 
5	Designed by Melon
6
7	--------------------------------------------- */
8
9jQuery(function($) {
10
11	$(document).ready(function(){
12	    
13	    $( ".header-logo .logo img, .secondary-logo img" ).attr({
14             alt: "ANSA Hotel Kuala	Lumpur logo",
15             title: "ANSA Hotel Kuala Lumpur logo"
16        });
17
18		$.getScript( "/kualalumpur/themes/osboot/js/default.js" );
19		$.getScript( "/kualalumpur/themes/osboot/js/booking.js" );
20
21		// check rates button
22		// display booking form after click
23
24	    var today = new Date();
25	    var dd = today.getDate();
26	    var mm = today.getMonth() + 1;
27	    var mm2 = (mm < 10 ? '0' : '') + mm
28	    var yyyy = today.getFullYear();
29
30	    // document.querySelector("").value = dd + "-" + mm + "-" + yyyy;
31	    $('#txtCi2').attr('value', yyyy + "-" + mm2 + "-" + dd);
32
33		$('header#header .check-rates a').click(function(event) {
34			$('#reserveForm').toggleClass('hide')
35		});
36		
37		var isshow = localStorage.getItem('isshow');
38	    if (isshow== null) {
39	        localStorage.setItem('isshow', 1);
40
41	        // Show popup here
42	        $('.block-announcement-modal.spb_overlay').show();
43		    $('#block-announcement').show();
44	    }
45
46		$('#announce-icon').click(function(event) {
47			$('.block-announcement-modal.spb_overlay').show();
48			$('#block-announcement').show();
49		});
50
51		$('.block-announcement-modal-close.spb_close').click(function(event) {
52			$('.block-announcement-modal.spb_overlay').hide();
53			$('#block-announcement').hide();
54		});
55
56		$('.block-announcement-modal-minimize.spb_minimize').click(function(event) {
57			$('.block-announcement-modal.spb_overlay').hide();
58			$('#block-announcement').hide();
59		});
60
61		$('.block-announcement-modal.spb_overlay').click(function(event) {
62			$('.block-announcement-modal.spb_overlay').hide();
63			$('#block-announcement').hide();
64		});
65
66		$(".path-sitemap .sitemap h2").prependTo(".path-sitemap .main-container");
67
68		$(".form-item-agree-condition .js-form-required:contains('Condition')").html(function(_, html) {
69		   return  html.replace(/(Agree Condition)/g, '<span>$1</span>')
70		});
71		$(".form-item-agree-condition .js-form-required span").hide();
72		$("#edit-agree-condition--description").appendTo(".form-item-agree-condition .js-form-required");
73		$("#edit-agree-condition--description").append('<span></span>');
74		$(".form-item-agree-condition").css("display", "block");
75
76		$(".path-frontpage .region-content .content #scrollingPanel img").addClass("lazy");
77
78		$(function() {
79	        $('.path-frontpage .region-content .content #scrollingPanel .paragraph--type--text-with-background').Lazy();
80	    });
81		// $('.path-frontpage .region-content article.page > .content').fullpage({
82		// 	/*anchors: ['para1', 'para2', 'para3', 'para4', 'para5', 'para6', 'para7'],*/
83		// 	navigation: true,
84		// 	navigationTooltips: ['The Taaras', 'Getting Here', 'Rooms Offer', 'Video', 'Package', 'Dining', 'Experience', 'Footer'],
85		// 	responsive: '768',
86		// });
87
88		// Rooms & Suites Slider
89		$('.outerLayer-156 .paragraph--type--slider .field--items').slick({
90			slidesToShow: 1,
91			slidesToScroll: 1,
92			fade: true,
93			arrows: true,
94			infinite: true,
95			swipeToSlide: true,
96			autoplay: true,
97		  	autoplaySpeed: 3000,
98			prevArrow:"<i class='fa fa-chevron-left' aria-hidden='true'></i>",
99		  	nextArrow:"<i class='fa fa-chevron-right' aria-hidden='true'></i>",
100		})
101
102		// Rooms & Suites Slider
103		$('.content-room .room-main .gallery-wrap').slick({
104			slidesToShow: 3,
105			arrows: true,
106			infinite: false,
107			swipeToSlide: true,
108			autoplay: true,
109		  	autoplaySpeed: 3000,
110			prevArrow:"<i class='fa fa-chevron-left' aria-hidden='true'></i>",
111		  	nextArrow:"<i class='fa fa-chevron-right' aria-hidden='true'></i>",
112			responsive: [{
113				breakpoint: 991,
114				settings: {
115					slidesToShow: 2
116				}
117			}]
118		})
119
120
121		$('.path-frontpage .view-experience .view-content').slick({
122			slidesToShow: 3,
123			slidesToScroll: 1,
124			infinite: true,
125			swipeToSlide: true,
126			/*centerMode: true,
127  			centerPadding: '60px',*/
128			autoplay: true,
129		  	autoplaySpeed: 3000,
130		  	arrows: true,
131			prevArrow:"<i class='fa fa-chevron-left' aria-hidden='true'></i>",
132		  	nextArrow:"<i class='fa fa-chevron-right' aria-hidden='true'></i>",
133			rows: 0,
134			responsive: [
135			{
136				breakpoint: 991,
137				settings: {
138					slidesToShow: 2
139				}
140			},
141			{
142				breakpoint: 767,
143				settings: {
144					slidesToShow: 1,
145					centerMode: true,
146  					centerPadding: '20px',
147				}
148			}
149			]
150		})
151
152		// Rooms & Suites Slider popup
153		// $('.content-room .room-main .gallery-wrap').slickLightbox({
154		// 	itemSelector: '.gallery-item img',
155		// 	src: "data-image",
156		// 	caption: "caption"
157		// })
158
159		// Rooms & Suites Slider popup
160		$('.content-room .room-main .gallery-wrap .gallery-item img').colorbox({
161			rel:'gal',
162			maxWidth:'90%', 
163			maxHeight:'90%'
164		});
165
166		// Galleries Images popup
167		/*$('.image-teaser .gallery-wrap .gallery-item img').colorbox({
168			rel:'gal1',
169			maxWidth:'90%', 
170			maxHeight:'90%'
171		});*/
172
173		var checkRatesBlock = $('.check-rates-block')
174		var languageSwitcher = $('.language-switcher')
175		if ( $(window).width() < 768 ) {
176			$('.toggle-menu-box').prepend(checkRatesBlock)
177			$('#block-osboot-main-menu .menu-logo').append(languageSwitcher)
178		}
179
180		$(window).resize(function(event) {
181			if ( $(window).width() < 768 ) {
182				$('.toggle-menu-box').prepend(checkRatesBlock)
183				$('#block-osboot-main-menu .menu-logo').append(languageSwitcher)
184			} else {
185				languageSwitcher.insertAfter('#block-osboot-main-menu')
186				checkRatesBlock.insertAfter('#block-osboot-main-menu')
187			}
188		});
189	
190		$.colorbox.settings.onLoad = function() {
191		    colorboxResize();
192		  }
193		   
194		  //Customize colorbox dimensions
195		  var colorboxResize = function(resize) {
196		    var width = "90%";
197		    var height = "90%";
198		    
199		    if($(window).width() > 960) { width = "860", height = "600" }
200		    if($(window).width() < 960) { width = "860", height = "auto" }
201		    //if($(window).height() > 700) { height = "auto" }
202		    //if($(window).height() < 700) { height = "100%" }
203		   
204		    $.colorbox.settings.height = height;
205		    $.colorbox.settings.width = width;
206		    
207		    //if window is resized while lightbox open
208		    if(resize) {
209		      $.colorbox.resize({
210		        'height': height,
211		        'width': width
212		      });
213		    } 
214		  }
215		  
216		  //In case of window being resized
217		  $(window).resize(function() {
218		    colorboxResize(true);
219		  });
220		  
221		  // Slider
222          $('.paragraph.reviews-slider .view-display-id-block_reviews > .view-content').slick({
223              dots: true,
224              prevArrow:"<i class='fa fa-chevron-left' aria-hidden='true'></i>",
225              nextArrow:"<i class='fa fa-chevron-right' aria-hidden='true'></i>",
226          });
227		  
228		  // Newsletter fixed btn
229          $(".newsletter-fixed .fixed-btn .subscribe-news").click(function(){
230		    $(this).toggleClass("btn-show");
231		  });
232		  	// $('body').click(function (e) {
233		   //      if(e.target.className == 'subscribe-news') {        
234		   //           e.stopPropagation();
235		   //      }
236		   //      else {
237		   //          $("*").removeClass("btn-show");
238		   //      }
239		   //  }); 
240		  // $('body').click(function(){
241		  //   $(".newsletter-fixed .fixed-btn .subscribe-news").removeClass("btn-show");
242		  // });
243		  // $(".newsletter-fixed").click(function(){
244		  //   $(this).find('.fixed-btn').toggleClass("btn-slide");
245		  // });
246		  
247	})
248
249})

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.