1jQuery(function () { 2 var win = $(window); 3 var cursor = $('.cursor > div'); 4 var cur1 = $('.cur-1'); 5 var cur2 = $('.cur-2'); 6 var color = '#6a605d'; 7 var white = '#fff'; 8 9 function disableScrolling() { 10 var x = window.scrollX; 11 var y = window.scrollY; 12 window.onscroll = function () { 13 window.scrollTo(x, y); 14 }; 15 } 16 17 function enableScrolling() { 18 window.onscroll = function () {}; 19 } 20 21 function moveCursor(c) { 22 var timesel = 0.3; 23 24 cursor.each(function (index, val) { 25 if (index == 1) { 26 TweenLite.to($(this), timesel, {css: {left: c.clientX, top: c.clientY}, delay: 0 + (index / 750)}); 27 } else { 28 TweenLite.to($(this), 0.05, {css: {left: c.clientX, top: c.clientY}, delay: 0 + (index / 750)}); 29 } 30 }); 31 } 32 33 function showMenu() { 34 $('.header-menu').each(function () { 35 $(this).click(function () { 36 $('#menu').stop().toggleClass('open'); 37 if ($('#menu').hasClass('open')) { 38 disableScrolling(); 39 40 $('.midnightHeader.white').hide(); 41 } else { 42 enableScrolling(); 43 $('.midnightHeader.white').show(); 44 } 45 }); 46 }); 47 48 if (win.width() > 767) { 49 var t = $('.menu-wrap .swiper-container'); 50 var swiper = new Swiper(t, { 51 centeredSlides: true, 52 coverflowEffect: { 53 depth: 160, 54 rotate: 0, 55 slideShadows: false 56 }, 57 effect: 'coverflow', 58 initialSlide: $('.swiper-slide[data-active=true]').index(), 59 slidesPerView: 'auto', 60 spaceBetween: 200, 61 breakpoints: { 62 767: { 63 allowTouchMove: false, 64 spaceBetween: 0 65 }, 66 1023: { 67 spaceBetween: 100 68 }, 69 1349: { 70 spaceBetween: 140 71 } 72 }, 73 pagination: { 74 el: t.parent().find(".swiper-pagination")[0], 75 clickable: true, 76 renderBullet: function (index, className) { 77 var titles = []; 78 t.find('.swiper-slide').each(function (i) { 79 titles[i] = $(this).text(); 80 }); 81 82 return '<span class="' + className + '"><span></span>' + titles[index] + '</span>'; 83 } 84 } 85 }); 86 87 $('.menu-wrap .swiper-slide').click(function () { 88 var me = $(this); 89 var index = me.index(); 90 var url = me.attr('data-target'); 91 92 if (me.hasClass('swiper-slide-active')) { 93 me.attr('href', url); 94 } else { 95 swiper.slideTo(index); 96 } 97 }); 98 } else { 99 $('.menu-wrap .swiper-slide').click(function () { 100 var me = $(this); 101 var url = me.attr('data-target'); 102 103 me.attr('href', url); 104 }); 105 } 106 } 107 108 function showBe() { 109 $('.header-book').each(function () { 110 $(this).click(function () { 111 $('#booking').stop().toggleClass('open'); 112 disableScrolling(); 113 }); 114 }); 115 116 $('.booking-close, .booking-mask').each(function () { 117 $(this).click(function () { 118 $('#booking').removeClass('open'); 119 enableScrolling(); 120 }); 121 }); 122 } 123 124 function roomSlider() { 125 $('.room-slider').each(function () { 126 var t = $(this).find('.swiper-container'); 127 var c = $(this).find('.swiper-wrapper'); 128 var swiper = new Swiper(t, { 129 centeredSlides: true, 130 slidesPerView: 'auto' 131 }); 132 133 $('.room-slider .swiper-slide').click(function () { 134 var me = $(this); 135 var index = me.index(); 136 var url = me.attr('data-target'); 137 138 if (me.hasClass('swiper-slide-active')) { 139 me.attr('href', url); 140 } else { 141 swiper.slideTo(index); 142 } 143 }); 144 145 swiper.on('slideChange', function () { 146 TweenMax.set(".room-slider .swiper-wrapper", { 147 right: 0, 148 left: 0 149 }); 150 leftMove.reverse(); 151 rightMove.reverse(); 152 }); 153 154 var leftMove = new TimelineLite({paused: true}); 155 var rightMove = new TimelineLite({paused: true}); 156
157 leftMove.to(".room-slider .swiper-wrapper", .3, { 158 right: 'auto', 159 left: '5vw' 160 }, 0); 161 162 rightMove.to(".room-slider .swiper-wrapper", .3, { 163 right: '5vw', 164 left: 'auto' 165 }, 0); 166 167 $('.swiper-slide').hover(function () { 168 if ($(this).hasClass('swiper-slide-next')) { 169 rightMove.play(); 170 } else if ($(this).hasClass('swiper-slide-prev')) { 171 leftMove.play(); 172 } 173 }, function () { 174 if ($(this).hasClass('swiper-slide-next')) { 175 rightMove.reverse(); 176 } else if ($(this).hasClass('swiper-slide-prev')) { 177 leftMove.reverse(); 178 } 179 }); 180 }); 181 } 182 183 function accordionMenu() { 184 var Accordion = function (el, multiple) { 185 this.el = el || {}; 186 this.multiple = multiple || false; 187 188 var links = this.el.find('.direction-link'); 189 links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown); 190 }; 191 192 Accordion.prototype.dropdown = function (e) { 193 var $el = e.data.el; 194 $this = $(this), 195 $next = $this.next(); 196 197 $next.slideToggle(); 198 $this.parent().toggleClass('open'); 199 200 if (!e.data.multiple) { 201 $el.find('.direction-txt').not($next).slideUp().parent().removeClass('open'); 202 } 203 }; 204 205 var accordion = new Accordion($('.directions'), false); 206 } 207 208 // MOBILE DETECTION 209 var isMobile = false; 210 if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
210substr(0, 4))) 211 isMobile = true; 212 213 win.load(function () { 214 $('.cursor-on, .midnightHeader.white').hover(function () { 215 TweenMax.to(cur1, .3, { 216 background: white 217 }); 218 TweenMax.to(cur2, .3, { 219 borderColor: white 220 }); 221 }, function () { 222 TweenMax.to(cur1, .3, { 223 background: color 224 }); 225 TweenMax.to(cur2, .3, { 226 borderColor: color 227 }); 228 }); 229 }); 230 231 win.scroll(function () { 232 var st = $(this).scrollTop(); 233 234 $('#hero').each(function () { 235 var label = $(this).find('h1'); 236 237 label.css({ 238 marginTop: (st * 0.4) + 'px', 239 opacity: 1 - (st / 300) 240 }); 241 }); 242 }); 243 244 $(document).mousemove(function (c) { 245 moveCursor(c); 246 }); 247 248 $(document).mouseleave(function () { 249 TweenMax.set(cursor, { 250 autoAlpha: 0 251 }); 252 }); 253 254 $(document).mouseenter(function () { 255 TweenMax.set(cursor, { 256 autoAlpha: 1 257 }); 258 }); 259 260 $(document).ready(function () { 261 if (isMobile) { 262 $('body').addClass('mobile'); 263 } else { 264// $('html').easeScroll({ 265// animationTime: 1700, 266// stepSize: 80 267// }); 268 269 $('body').mouseover(function () { 270 $(this).css({ 271 cursor: 'none' 272 }); 273 }); 274 275 $('.front-page').each(function () { 276 setTimeout(function () { 277 $('.header-book').trigger('click'); 278 }, 3000); 279 }); 280 281 } 282 283 showMenu(); 284 285 showBe(); 286 287 roomSlider(); 288 289 accordionMenu(); 290 291 $('#header').each(function () { 292 $(this).midnight(); 293 }); 294 295 setTimeout(function () { 296 $('.midnightHeader').addClass('loaded'); 297 }, 1000); 298 }); 299});
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.