PageSourceSearch

https://kamezi.villas/js/home.js

js kamezi.villas collected 2026-10-09 22:12:24 UTC 2,947 bytes, 141 lines download raw bytes

1$(document).ready(function () {
2	
3	//gsap
4	gsap.registerPlugin(ScrollTrigger);
5	gsap.config({ nullTargetWarn: false });
6  
7	
8	//preloader
9	
10	//if($(window).width() > 767) {
11		$(".page-loader").delay(300).fadeOut("slow");
12		$("#overlayer").delay(900).fadeOut("slow");	
13	//}
14	
15	
16	//navbar (transparent / white)
17	$('.navbar').addClass('transparent');
18	
19	/*$(document).scroll(function () {
20		var $nav = $(".navbar");
21		$nav.toggleClass('transparent', $(this).scrollTop() < '160');
22	});*/
23	
24	ScrollTrigger.create({
25		trigger: '.navbar',
26		end: "160",
27		once: false,
28		toggleClass: "transparent",
29	});
30	
31	//animate scroll
32	$('.target-experiencias').click(function(e) {
33		e.preventDefault();
34		$('#experiencias').animatescroll();
35	});
36
37
38	//video modal
39	lightGallery(document.getElementById('video-lightbox'), {
40		plugins: [lgVideo],
41		addClass: 'video-modal',
42		download: false,
43		controls: false,
44		counter: false,
45		zoomFromOrigin: false,
46		//startClass: 'lg-start-zoom',
47		startClass: 'lg-start-slide',
48		enableDrag: false,
49		enableSwipe: false,
50		mobileSettings: { showCloseIcon: true }
51	});
52	
53	//slider villas MOBILE
54	var swiper = new Swiper('.home-villas-mobile-swiper', {
55	  // Optional parameters
56	  slidesPerView: 1,
57	  //spaceBetween: 12,
58	  direction: 'horizontal',
59	  loop: true,
60	  //effect: "fade",
61	  speed: "800",
62	  autoplay: {
63		  disableOnInteraction: false,
64		  delay: 4000,
65	  },
66	  navigation: {
67		  nextEl: ".swiper-button-villas-next",
68		  prevEl: ".swiper-button-villas-prev",
69	  },
70	});
71	
72	//imgs y txts slider mobile
73	for (var i = 1; i < 7; i++) {
74		var src  = $('.img-links-slider img:nth-child(' + i + ')').attr("src");
75		var link = $('.links-slider .item:nth-child(' + i + ')').find('a').text();
76		$('.villas-slider-mobile .swiper-slide:nth-child(' + i + ')').find('a').html(link).parent().find('img').attr("src", src);
77	}
78	
79	
80	//slider gastro
81	var swiper = new Swiper('.gastro-swiper', {
82	  // Optional parameters
83	  direction: 'horizontal',
84	  loop: true,
85	  effect: "fade",
86	  speed: "800",
87	  autoplay: {
88		  disableOnInteraction: false,
89		  delay: 4000,
90	  },
91	});
92	
93	
94	//slider home experiencias
95	var swiper2 = new Swiper('.home-experiencias-swiper', {
96	  	// Optional parameters
97	  	slidesPerView: 1,
98		spaceBetween: 0,
99		loop: true,
100		speed: '800',
101		autoplay: {
102			delay: 4000,
103			disableOnInteraction: false,
104		},
105		navigation: {
106			nextEl: ".swiper-button-next",
107			prevEl: ".swiper-button-prev",
108		},
109		breakpoints: {
110			620: {
111				slidesPerView: 2,
112				spaceBetween: 20,
113			},
114			1240: {
115				slidesPerView: 2,
116				spaceBetween: 25,
117			},
118			1800: {
119				slidesPerView: 2,
120				spaceBetween: 30,
121			}	
122		},
123	});
124	
125	//vídeo al 100% al hacer scroll
126	gsap.to(".video-expand", {
127		duration: 3,
128		width: "100%",
129		marginTop: "0",
130		  scrollTrigger: {
131			  trigger: ".video-expand",
132			  start: "top 75%",
133			  end: "top 245px", //margin top 150px + header 83px
134			  scrub: 1,
135			  //markers: true,
136		  },
137	});
138
139
140	
141});

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.