1"use strict"; 2 3$(document).ready(function () { 4 "use strict"; 5 6 var vh = window.innerHeight * 0.01; 7 document.documentElement.style.setProperty('--vh', "".concat(vh, "px")); 8 $('.circle').on('click', function () { 9 $(".circleFill").attr("class", "circleFill filled"); 10 }); 11 // PageLoad(); 12 // HomeSlider(); //CursorAnimation(); 13 14 // NavigationClick(); 15 fixedHeader(); 16 SwiperSlider(); 17 YoutubeVideoThumb(); 18 CustomPageScroll(); 19 OnScrollAnimation(); 20 21}); 22 23 24/*---------------------------------------------------- 25Function Fixed Header 26----------------------------------------------------*/ 27 28 29function fixedHeader() { 30 var stickyOffset = 1; 31 $(window).scroll(function () { 32 var scroll = $(window).scrollTop(); 33 34 if (scroll >= stickyOffset) { 35 $("header").addClass("fixed"); 36 } else { 37 $("header").removeClass("fixed"); 38 } 39 }); 40} 41/*---------------------------------------------------- 42Function Swiper Slider 43----------------------------------------------------*/ 44 45 46function SwiperSlider() { 47 var swiper = new Swiper('#gallery-carousel', { 48 direction: "horizontal", 49 loop: false, 50 grabCursor: true, 51 resistance: true, 52 resistanceRatio: 0.6, 53 speed: 1000, 54 spaceBetween: 40, 55 slidesPerView: 1, 56 autoplay: true, 57 effect: "slide", 58 mousewheel: false, 59 navigation: { 60 nextEl: '.arrow-next', 61 prevEl: '.arrow-prev' 62 }, 63 breakpoints: { 64 800: { 65 slidesPerView: 1 66 }, 67 520: { 68 slidesPerView: 1 69 } 70 } 71 }); 72 73 74 var swiper = new Swiper('#gallery-carousel2', { 75 direction: "horizontal", 76 loop: false, 77 grabCursor: true, 78 resistance: true, 79 resistanceRatio: 0.6, 80 speed: 1000, 81 spaceBetween: 40, 82 slidesPerView: 1, 83 autoplay: true, 84 effect: "slide", 85 mousewheel: false, 86 navigation: { 87 nextEl: '.arrow-next', 88 prevEl: '.arrow-prev' 89 }, 90 breakpoints: { 91 800: { 92 slidesPerView: 1 93 }, 94 520: { 95 slidesPerView: 1 96 } 97 } 98 }); 99 100 101 var swiper = new Swiper('#amenities-carousel', { 102 direction: "horizontal", 103 loop: false, 104 grabCursor: true, 105 resistance: true, 106 resistanceRatio: 0.6, 107 speed: 500, 108 spaceBetween: 0, 109 slidesPerView: 4, 110 autoplay: true, 111 effect: "slide", 112 mousewheel: false, 113 navigation: { 114 nextEl: '.ame-next', 115 prevEl: '.ame-prev' 116 }, 117 breakpoints: { 118 800: { 119 slidesPerView: 3 120 }, 121 520: { 122 slidesPerView: 1 123 } 124 } 125 }); // var swiper = new Swiper('#about-carousel', { 126 // direction: "horizontal", 127 // loop: false, 128 // grabCursor: true, 129 // resistance : true, 130 // resistanceRatio : 0.6, 131 // speed:1000, 132 // spaceBetween: 40, 133 // slidesPerView: 4, 134 // autoplay: true, 135 // effect: "slide", 136 // mousewheel: true, 137 // breakpoints: { 138 // 800: { 139 // slidesPerView: 2 140 // } 141 // }, 142 // pagination: { 143 // el: '.swiper-pagination', 144 // }, 145 // }); 146} 147/*---------------------------------------------------- 148Function Youtube Video 149----------------------------------------------------*/ 150 151 152function YoutubeVideoThumb() { 153 $('.yt-thumb').on('click', function () { 154 $(this).css('z-index', '1'); 155 var symbol = $("#ytVideo")[0].src.indexOf("?") > -1 ? "&" : "?"; 156 $("#ytVideo")[0].src += symbol + "autoplay=1"; 157 }); 158 $('.yt-thumb').each(function () { 159 var getImageSrc = $(this).children('img').attr('src'); 160 var getImageSrcW = $(this).children('img').width(); 161 var getImageSrcH = $(this).children('img').height(); 162 $(this).css({ 163 'width': getImageSrcW + 'px', 164 'height': getImageSrcH + 'px' 165 }); 166 $(this).css({ 167 'background-image': 'url(' + getImageSrc + ')' 168 }); 169 $(this).children('img').remove(); 170 }); 171} 172/*---------------------------------------------------- 173Function Custom Page Scroll 174----------------------------------------------------*/ 175 176 177function CustomPageScroll() {} // 178 179/*---------------------------------------------------- 180Function On Scroll Animation 181----------------------------------------------------*/ 182 183 184function OnScrollAnimation() { 185 var controller = new ScrollMagic.Controller(); 186 $('[data-scrollmagic]').each(function (index) { 187 var tl = new TimelineMax(); 188 tl.fromTo(this, 0.4, { 189 delay: 1, 190 y: 100, 191 opacity: 0 192 }, { 193 y: 0, 194 opacity: 1,
195 ease: Power2.EaseInOut 196 }); 197 var scene = new ScrollMagic.Scene({ 198 triggerElement: this, 199 triggerHook: 0.6, 200 reverse: false 201 }).setTween(tl).addTo(controller); 202 }); 203 var controller2 = new ScrollMagic.Controller(); 204 $('[data-scrollmagic2]').each(function (index) { 205 var tl = new TimelineMax(); 206 tl.to($('.bgInner'), 0.4, { 207 width: "100%" 208 }); 209 tl.to($('.yt-video'), 0.4, { 210 delay: 1, 211 alpha: 1, 212 className: '+=reveal' 213 }); 214 var scene = new ScrollMagic.Scene({ 215 triggerElement: this, 216 triggerHook: 0.6, 217 reverse: false 218 }).setTween(tl).addTo(controller2); 219 }); 220 $('.has-animation').each(function () { 221 var $this = $(this); 222 var $thisHeight = $(this).height(); 223 var scene = new ScrollMagic.Scene({ 224 triggerElement: $this[0], 225 duration: $thisHeight 226 }).addTo(controller); 227 scene.triggerHook(1); 228 scene.on('enter', function () { 229 $this.delay($this.attr('data-delay')).queue(function (next) { 230 TweenMax.to($this, 0.6, { 231 force3D: true, 232 opacity: 1, 233 y: 0, 234 scale: 1, 235 delay: 0.1, 236 ease: Power2.easeOut 237 }); 238 next(); 239 }); 240 }); 241 scene.on('leave', function (event) { 242 $this.removeClass('active'); 243 }); 244 245 if ($("body").hasClass("smooth-scroll")) { 246 scrollbar.addListener(function () { 247 scene.refresh(); 248 }); 249 } 250 }); 251}
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.