1var animation = false; 2$(document).ready(function () { 3 $(".village-card-body h3, .single-apartment-title-container h3").each(function () { 4 if ($(this).text().toLowerCase().includes("garda")) { 5 $(this).addClass("new2023"); 6 } 7 }); 8 9 var pageWidth = $(window).width(); 10 $(window).resize(function () { 11 if ($(window).width() != pageWidth) return; 12 pageWidth = $(window).width(); 13 14 if ($("#hamburger-menu").hasClass("menu-open")) { 15 $("#mobile-menu").css({ height: window.innerHeight + 60, "max-height": window.innerHeight + 60 }); 16 } 17 }); 18 19 if ($("#popup-offer")) { 20 $("#popup-offer").modal("toggle"); 21 } 22 23 $(window).on("load resize", function () { 24 if ($("#hp-offer-carousel").length) { 25 if ($(window).width() < 1200) { 26 cutOffer(); 27 } 28 } 29 }); 30 31 /********** MENU ANIMATION ***********/ 32 $("#hamburger-menu").on("click", function () { 33 if (animation == false) { 34 animation = menuAnimation(); 35 } 36 }); 37 38 $("body").on("mouseenter", ".menu-closed", function () { 39 $(".menu-closed>div:nth-of-type(1)").css("margin-top", "25px"); 40 $(".menu-closed>div:nth-of-type(3)").css("margin-top", "25px"); 41 }); 42 43 $("body").on("mouseleave", ".menu-closed", function () { 44 $(".menu-closed>div:nth-of-type(1)").css("margin-top", "5px"); 45 $(".menu-closed>div:nth-of-type(3)").css("margin-top", "5px"); 46 }); 47 48 $("body").on("mouseenter", ".menu-open", function () { 49 $(".menu-open>div:nth-of-type(1)").css("margin-top", "-15px"); 50 $(".menu-open>div:nth-of-type(3)").css("margin-top", "-15px"); 51 }); 52 53 $("body").on("mouseleave", ".menu-open", function () { 54 $(".menu-open>div:nth-of-type(1)").css("margin-top", "-15px"); 55 $(".menu-open>div:nth-of-type(3)").css("margin-top", "25px"); 56 }); 57 58 /********** SLICK CAROUSEL **********/ 59 //homepage background 60 if ($("#hp-carousel").length) { 61 $("#hp-carousel").slick({ 62 infinite: true, 63 speed: 800, 64 autoplay: true, 65 autoplaySpeed: 3500, 66 slidesToShow: 1, 67 slidesToScroll: 1, 68 prevArrow: "<i class='fas fa-angle-left a-left control-c prev'></i>", 69 nextArrow: "<i class='fas fa-angle-right a-right control-c next'></i>", 70 arrows: true, 71 responsive: [ 72 { 73 breakpoint: 768, 74 settings: { 75 arrows: false, 76 dots: true, 77 }, 78 }, 79 ], 80 }); 81 } 82 83 // homepage offer 84 if ($("#hp-offer-carousel").length) { 85 $("#hp-offer-carousel").slick({ 86 prevArrow: "<i class='fas fa-angle-left a-left control-c prev'></i>", 87 nextArrow: "<i class='fas fa-angle-right a-right control-c next'></i>", 88 arrows: true, 89 dots: false, 90 infinite: true, 91 speed: 500, 92 slidesToShow: 3, 93 responsive: [ 94 { 95 breakpoint: 1800, 96 settings: { 97 slidesToShow: 2, 98 }, 99 }, 100 { 101 breakpoint: 768, 102 settings: { 103 slidesToShow: 1, 104 }, 105 }, 106 ], 107 }); 108 } 109 110 // services 111 if ($(".services-carousel").length) { 112 $(".services-carousel").slick({ 113 infinite: true, 114 speed: 500, 115 slidesToShow: 1, 116 prevArrow: "<i class='fas fa-angle-left a-left control-c prev'></i>", 117 nextArrow: "<i class='fas fa-angle-right a-right control-c next'></i>", 118 arrows: true, 119 slidesToScroll: 1, 120 responsive: [ 121 { 122 breakpoint: 992, 123 settings: { 124 slidesToShow: 1, 125 arrows: false, 126 dots: true, 127 }, 128 }, 129 ], 130 }); 131 } 132 133 // single apartment 134 if ($(".single-apartment-carousel").length) { 135 var photoNumber = $(".single-apartment-carousel").attr("data-totalimage"); 136 $(".single-apartment-carousel").slick({ 137 infinite: true, 138 speed: 300, 139 slidesToShow: 3, 140 initialSlide: photoNumber - 1, 141 prevArrow: "<i class='fas fa-angle-left a-left control-c prev'></i>", 142 nextArrow: "<i class='fas fa-angle-right a-right control-c next'></i>", 143 arrows: true, 144 responsive: [ 145 { 146 breakpoint: 1200, 147 settings: { 148 slidesToShow: 1, 149 initialSlide: 0, 150 }, 151 }, 152 { 153 breakpoint: 768, 154 settings: { 155 slidesToShow: 1, 156 arrows: false, 157 initialSlide: 0, 158 dots: true, 159 }, 160 }, 161 ], 162 }); 163 } 164 165 /********** SLICK LIGHTBOX **********/ 166 if ($(".services-carousel").length) { 167 $(".services-carousel").slickLightbox({ 168 src: "src", 169 itemSelector: "img", 170 }); 171 } 172 173 $(window).resize(function () { 174 if ($(window).width() > 1150) { 175 if ($("#hamburger-menu").hasClass("menu-open")) { 176 menuAnimation(); 177 } 178 } 179 }); 180 181 /*************** FILTER FOR VILLAGGI PAGE *****************/ 182 var villaggi = $(".village-card"); 183 var itemTipologia = $(".tipologia"); 184 var itemPeople = $(".nPeople"); 185 186 //active filter-active to the first tipology list item 187 itemTipologia.eq("0").addClass("filter-active"); 188 189 itemPeople.click(function () { 190 villaggi.addClass("anim-started"); 191 //remove filter-active class to all itemPeoples 192 itemPeople.removeClass("filter-active"); 193 //active filter-active to the people that was clicked 194 $(this).addClass("filter-active"); 195 let value = $(this).attr("data-maxPeople"); 196 villaggi.each(function () { 197 filterByAttributeValue($(this), "data-people", value); 198 }); 199 }); 200 201 itemTipologia.click(function () { 202 villaggi.addClass("anim-started"); 203 //remove filter-active class to all itemTipologias 204 itemTipologia.removeClass("filter-active"); 205 //active filter-active to the tipology that was clicked 206 $(this).addClass("filter-active"); 207 let value = $(this).attr("data-tipologia"); 208 villaggi.each(function () { 209 filterByAttributeValue($(this), "data-type", value); 210 }); 211 }); 212 213 function filterByAttributeValue(element, attribute, valueToFilter) { 214 if (element.attr(attribute) === valueToFilter || valueToFilter === "tutte") element.parent().show(); 215 else element.parent().hide(); 216 } 217 218 /*************** FILTER CATEGORY FOR BLOG PAGE *****************/ 219 220 var filtroCatBlog = $(".filtro_cat"); 221 filtroCatBlog.eq("0").addClass("filtro-selected"); 222 223 filtroCatBlog.click(function () { 224 $(".blog-card").addClass("anim-started"); 225 filter_tag($(this).attr("data-cat")); 226 }); 227 228 // Promo popup con widget 229 if ($("#promo-popup").length > 0) { 230 const miniWidget = $("#promo-mini"); 231 const modal = $("#promo-popup"); 232 233 // Recupera lingua corrente (es. da attributo html lang o da variabile globale) 234 const lang = $("html").attr("lang") || "it"; 235 const storageKey = "promoClosed_" + lang; 236 237 // Se non è chiuso in questa lingua, apri il popup 238 if (!sessionStorage.getItem(storageKey)) { 239 modal.modal("show"); 240 } else { 241 miniWidget.addClass("show"); 242 } 243 244 // Gestione chiusura â salva in sessionStorage 245 const btnClose = $("#promo-popup button.close"); 246 btnClose.on("click", function () { 247 modal.modal("hide"); 248 }); 249 250 // Quando il popup viene nascosto, mostra il mini-widget 251 modal.on("hidden.bs.modal", function () { 252 miniWidget.addClass("show"); 253 sessionStorage.setItem(storageKey, "true"); 254 }); 255 256 // Clic sul mini-widget â riapre sempre nella stessa sessione 257 miniWidget.on("click", function () { 258 miniWidget.removeClass("show"); 259 modal.modal("show"); 260 }); 261 } 262}); 263 264document.addEventListener("DOMContentLoaded", function () { 265 // Verifica che la parte hash dell'URL sia #hp-cont-map 266 if (window.location.hash === "#hp-cont-map") { 267 // Attendere che tutti gli script siano stati caricati 268 window.addEventListener("load", function () { 269 // Impostare un timeout di 300ms 270 setTimeout(function () { 271 // Trova l'elemento con l'ID hp-cont-map 272 var element = document.getElementById("hp-cont-map"); 273 274 // Se l'elemento esiste, scorrere fino ad esso 275 if (element) { 276 element.scrollIntoView({ behavior: "smooth" }); 277 } 278 }, 300); 279 }); 280 } 281}); 282 283$(".fullScreenSwiper .swiper-slide").length > 1 && 284 $(".fullScreenSwiper").each(function () { 285 new Swiper($(this)[0], { 286 slidesPerView: 1, 287 spaceBetween: 0, 288 grabCursor: !0, 289 observer: !0, 290 speed: 1e3, 291 autoplay: { 292 delay: 4e3, 293 disableOnInteraction: !1, 294 }, 295 pagination: { 296 el: $(this)[0].children[1], 297 clickable: !0, 298 }, 299 navigation: { 300 nextEl: ".fullScreenSwiper .swiper-button-next", 301 prevEl: ".fullScreenSwiper .swiper-button-prev", 302 }, 303 }); 304 }); 305 306/* $(".middleA-swiper").length > 0 && $(".middleA-swiper").each(function () { var e = $(this)[0].nextElementSibling, s = $(this)[0].parentElement.nextElementSibling; new Swiper($(this)[0], { slidesPerView: 1, spaceBetween: 24, grabCursor: !0, observer: !0, scrollbar: { el: $(e)[0].children[0], draggable: !0 }, navigation: { nextEl: $(s)[0].children[2], prevEl: $(s)[0].children[0] }, observeParents: !0, breakpoints: { 499: { slidesPerView: 1, spaceBetween: 32 }, 649: { slidesPerView: 2, spaceBetween: 24 }, 699: { slidesPerView: 2, spaceBetween: 32 }, 991: { slidesPerView: 3, spaceBetween: 32 }, 1000: { slidesPerView: 3, spaceBetween: 36 }, 1100: { slidesPerView: 3, spaceBetween: 48 }, 1200: { slidesPerView: 4, spaceBetween: 24 }, 1440: { slidesPerView: 4, spaceBetween: 40 }, 1600: { slidesPerView: 4, spaceBetween: 48 } } }) }); */ 307 308$(".middleB .swiper").length > 0 && 309 $(".middleB .swiper").each(function () { 310 var e = $(this)[0]; 311 new Swiper($(this)[0], { 312 slidesPerView: 1, 313 spaceBetween: 0, 314 grabCursor: !0, 315 speed: 500, 316 autoplay: { delay: 2e3, disableOnInteraction: !1 }, 317 pagination: { el: e.nextElementSibling, clickable: !0 },
318 }); 319 }); 320 321$(".middleD .swiper").length > 0 && 322 $(".middleD .swiper").each(function () { 323 var e = $(this)[0]; 324 new Swiper($(this)[0], { 325 slidesPerView: 1, 326 spaceBetween: 0, 327 grabCursor: !0, 328 speed: 500, 329 autoplay: { delay: 2500, disableOnInteraction: !1 }, 330 navigation: { 331 nextEl: e.nextElementSibling.nextElementSibling, 332 prevEl: e.nextElementSibling.nextElementSibling.nextElementSibling, 333 }, 334 pagination: { el: e.nextElementSibling, clickable: !0 }, 335 }); 336 }); 337 338if ($(".cat-section-product .swiper").length > 0) { 339 $(".cat-section-product .swiper").each(function () { 340 var e = $(this)[0]; 341 342 var nextEl = e.nextElementSibling ? (e.nextElementSibling.nextElementSibling ? e.nextElementSibling.nextElementSibling : null) : null; 343 var prevEl = nextEl ? (nextEl.nextElementSibling ? nextEl.nextElementSibling : null) : null; 344 345 new Swiper(e, { 346 slidesPerView: 1, 347 spaceBetween: 0, 348 navigation: { 349 nextEl: nextEl, 350 prevEl: prevEl, 351 }, 352 pagination: { 353 el: e.nextElementSibling ? e.nextElementSibling : null, 354 clickable: true, 355 }, 356 }); 357 }); 358} 359 360if ($(".middleF .swiper").length > 0) { 361 $(".middleF .swiper").each(function () { 362 var e = $(this)[0]; 363 new Swiper($(this)[0], { 364 slidesPerView: 1, 365 spaceBetween: 0, 366 navigation: { 367 nextEl: e.nextElementSibling.nextElementSibling, 368 prevEl: e.nextElementSibling.nextElementSibling.nextElementSibling, 369 }, 370 pagination: { 371 el: e.nextElementSibling, 372 clickable: true, 373 }, 374 }); 375 }); 376} 377 378if ($(".middleG-1 .swiper").length > 0) { 379 $(".middleG-1 .swiper").each(function () { 380 var e = $(this)[0]; 381 new Swiper($(this)[0], { 382 slidesPerView: 1, 383 spaceBetween: 0, 384 pagination: { 385 el: e.nextElementSibling, 386 clickable: true, 387 }, 388 }); 389 }); 390} 391 392if ($(".section-articoli-evidenza-slider").length > 0) 393 var swiperMostSelled = new Swiper(".section-articoli-evidenza-slider", { 394 slidesPerView: 1, 395 spaceBetween: 24, 396 grabCursor: !0, 397 observer: !0, 398 navigation: { 399 nextEl: ".section-articoli-evidenza .swiper-button-next", 400 prevEl: ".section-articoli-evidenza .swiper-button-prev", 401 }, 402 scrollbar: { 403 el: ".section-articoli-evidenza .swiper-scrollbar", 404 draggable: !0, 405 }, 406 observeParents: !0, 407 breakpoints: { 408 0: { 409 slidesPerView: 1, 410 spaceBetween: 15, 411 }, 412 449: { 413 slidesPerView: 1, 414 spaceBetween: 25, 415 }, 416 576: { 417 slidesPerView: 2, 418 spaceBetween: 25, 419 }, 420 649: { 421 slidesPerView: 2, 422 spaceBetween: 24, 423 }, 424 767: { 425 slidesPerView: 2, 426 spaceBetween: 32, 427 }, 428 849: { 429 slidesPerView: 2, 430 spaceBetween: 40, 431 }, 432 899: { 433 slidesPerView: 2, 434 spaceBetween: 24, 435 }, 436 991: { 437 slidesPerView: 3, 438 spaceBetween: 32, 439 }, 440 1440: { 441 slidesPerView: 3, 442 spaceBetween: 40, 443 }, 444 1600: { 445 slidesPerView: 3, 446 spaceBetween: 48, 447 }, 448 }, 449 }); 450 451if ($(".section-reviews-slider").length > 0) { 452 var swiperMostSelled = new Swiper(".section-reviews-slider", { 453 slidesPerView: 1, 454 spaceBetween: 24, 455 grabCursor: !0, 456 observer: !0, 457 navigation: { 458 nextEl: ".section-reviews .swiper-button-next", 459 prevEl: ".section-reviews .swiper-button-prev", 460 }, 461 scrollbar: { 462 el: ".section-reviews .swiper-scrollbar", 463 draggable: !0, 464 }, 465 observeParents: !0, 466 breakpoints: { 467 0: { 468 slidesPerView: 1, 469 spaceBetween: 15, 470 }, 471 449: { 472 slidesPerView: 1, 473 spaceBetween: 25, 474 }, 475 676: { 476 slidesPerView: 2, 477 spaceBetween: 32, 478 }, 479 1200: { 480 slidesPerView: 3, 481 spaceBetween: 40, 482 }, 483 1600: { 484 slidesPerView: 3, 485 spaceBetween: 48, 486 }, 487 }, 488 }); 489} 490 491if ($("#section-blog-filters .swiper").length > 0) { 492 var swiperBlogFilters = new Swiper("#section-blog-filters .swiper", { 493 slidesPerView: "auto", 494 spaceBetween: 10, 495 observer: !0, 496 navigation: { 497 nextEl: "#section-blog-filters .swiper-button-next", 498 prevEl: "#section-blog-filters .swiper-button-prev", 499 }, 500 }); 501} 502 503$(".post_content .swiper").length > 0 && 504 $(".post_content .swiper").each(function () { 505 new Swiper($(this)[0], { 506 slidesPerView: 1, 507 spaceBetween: 10, 508 pagination: { el: $(this)[0].children[1], clickable: !0 },
509 }); 510 }); 511 512if ($(".body-home .portfolio-projects-list .swiper").length > 0) { 513 $(".body-home .portfolio-projects-list .swiper").each(function () { 514 new Swiper($(this)[0], { 515 slidesPerView: 1, 516 spaceBetween: 10, 517 navigation: { 518 nextEl: $(this)[0].children[2], 519 prevEl: $(this)[0].children[1], 520 }, 521 scrollbar: { 522 el: $(this)[0].children[3], 523 draggable: true, 524 }, 525 breakpoints: { 526 419: { 527 slidesPerView: 1, 528 spaceBetween: 25, 529 }, 530 520: { 531 slidesPerView: 2, 532 }, 533 767: { 534 slidesPerView: 2, 535 spaceBetween: 20, 536 }, 537 899: { 538 slidesPerView: 3, 539 spaceBetween: 10, 540 }, 541 991: { 542 slidesPerView: 3, 543 spaceBetween: 20, 544 }, 545 1199: { 546 slidesPerView: 3, 547 spaceBetween: 40, 548 }, 549 }, 550 }); 551 }); 552} 553 554$("body.body-home .portfolio-category-scroll .card_categoria").on("click", function () { 555 if (!$(this).hasClass("active")) { 556 var catActive = $(this).attr("data-catid"); 557 $(".body-home .portfolio-category-scroll .card_categoria").removeClass("active"); 558 $(this).addClass("active"); 559 $(".body-home .portfolio-projects-list .swiper").hide(); 560 $(".body-home .portfolio-projects-list .swiper[data-catid=" + catActive + "]").show(); 561 } 562});
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.