1 2var POTENZA = {}; 3 4(function ($) { 5 "use strict"; 6 7// var numbres = $(".centernumbers").html().split(','); 8 9// $.each(numbres,function(i,data){ 10// console.log(data); 11 12// }); 13 14 15 16 17 var owlCarousel = $('.owl-carousel'); 18 owlCarousel.mouseover(function () { 19 owlCarousel.trigger('stop.owl.autoplay'); 20 }); 21 22 owlCarousel.mouseleave(function () { 23 owlCarousel.trigger('play.owl.autoplay', [1000]); 24 }); 25 26 //slider 27 var swiper = new Swiper(".hotelSwiper", { 28 slidesPerView: "3", 29 centeredSlides: false, 30 spaceBetween: 30, 31 loop: true, 32 autoplay: { 33 delay: 2500, 34 disableOnInteraction: false, 35 }, 36 pagination: { 37 el: ".swiper-pagination", 38 clickable: true, 39 }, 40 navigation: { 41 nextEl: ".swiper-button-next", 42 prevEl: ".swiper-button-prev", 43 }, 44 breakpoints: { 45 0: { 46 slidesPerView: 1, 47 spaceBetween: 20, 48 }, 49 768: { 50 slidesPerView: 2, 51 spaceBetween: 40, 52 }, 53 1199: { 54 slidesPerView: 3, 55 spaceBetween: 50, 56 }, 57 }, 58 }); 59//home slider 60 var swiper = new Swiper(".homesliderSwiper", { 61 slidesPerView: "1", 62 centeredSlides: false, 63 spaceBetween: 30, 64 loop: true, 65 autoplay: { 66 delay: 2500, 67 disableOnInteraction: false, 68 }, 69 navigation: { 70 nextEl: ".swiper-button-next", 71 prevEl: ".swiper-button-prev", 72 } 73 }); 74 75 //trending properites 76 var swiper = new Swiper(".trendingSwiper", { 77 slidesPerView: "4", 78 centeredSlides: false, 79 spaceBetween: 30, 80 loop: true, 81 autoplay: { 82 delay: 2500, 83 disableOnInteraction: false, 84 }, 85 pagination: { 86 el: ".swiper-pagination", 87 clickable: true, 88 }, 89 navigation: { 90 nextEl: ".swiper-button-next", 91 prevEl: ".swiper-button-prev", 92 }, 93 breakpoints: { 94 0: { 95 slidesPerView: 2, 96 spaceBetween: 20, 97 }, 98 768: { 99 slidesPerView: 2, 100 spaceBetween: 40, 101 }, 102 992: { 103 slidesPerView: 3, 104 spaceBetween: 40, 105 }, 106 1199: { 107 slidesPerView: 4, 108 spaceBetween: 30, 109 }, 110 }, 111 }); 112 113 //listingwrapper 114 115// var swiper = new Swiper(".htlistingSwiper", { 116// spaceBetween: 10, 117// slidesPerView: 4, 118// freeMode: true, 119// watchSlidesProgress: true, 120// }); 121// var swiper2 = new Swiper(".htlistingSwiper2", { 122// spaceBetween: 10, 123// navigation: { 124// nextEl: ".swiper-button-next", 125// prevEl: ".swiper-button-prev", 126// }, 127// thumbs: { 128// swiper: swiper, 129// }, 130// }); 131 132// setInterval(function () { 133// var swiper = new Swiper(".htlistingSwiper", { 134// spaceBetween: 10, 135// slidesPerView: 4, 136// freeMode: true, 137// watchSlidesProgress: true, 138// }); 139// var swiper2 = new Swiper(".htlistingSwiper2", { 140// spaceBetween: 10, 141// navigation: { 142// nextEl: ".swiper-button-next", 143// prevEl: ".swiper-button-prev", 144// }, 145// thumbs: { 146// swiper: swiper, 147// }, 148// }); 149// }, 2000); 150 151 if ($(".timepicker").length > 0) { 152 var $DT = ($DT = $(".timepicker").pickatime()).pickatime("picker"); 153 $.extend($.fn.pickadate.defaults, {format: "dd-mm-yyyy", hiddenName: true}), 154 ($DS = ( 155 $DS = $(".datepicker-start").pickadate( 156 { 157 selectMonths: true, 158 selectYears: true, 159 } 160 )).pickadate("picker")).set({min: new Date()}), 161 $DS.on({ 162 set: function (e) { 163 $DE.set({min: new Date($DS.get("select").year, $DS.get("select").month, $DS.get("select").date)}); 164 }, 165 }); 166 } 167 168 $(window).on("load", function () { 169 $("#preloader").fadeOut(); 170 });
171 172 $.fn.mla = function (options) { 173 var $sidebar = $(this); 174 var defaults = { 175 anchor: "a", 176 activeClass: "expended", 177 hasClass: "contained", 178 hasIconClass: "ico", 179 activeHtml: "+", 180 inActiveHtml: "-", 181 onActive: function () {}, 182 onDeactive: function () {} 183 } 184 var settings = $.extend(defaults, options); 185 var $a = $sidebar.find(settings.anchor); 186 var $ul = $sidebar.find('ul'); 187 $ul.hide(); 188 $ul.eq(0).show(); 189 // click 190 $a.on("click", function (e) { 191 var $this = $(this); 192 var $li = $this.closest("li"); 193 var $siblings = $li.siblings(); 194 var $childrens = $li.children("ul").length; 195 if (!$li.hasClass(settings.activeClass)) { 196 if ($childrens > 0) { 197 e.preventDefault(); 198 $siblings.removeClass(settings.activeClass); 199 $siblings.find('li').removeClass(settings.activeClass); 200 $li.addClass(settings.activeClass); 201 $siblings.find('ul').slideUp(); 202 $li.children("ul").slideDown(); 203 $siblings.find('a >
203 .' + settings.hasIconClass).html(settings.activeHtml); 204 $this.find('.' + settings.hasIconClass).html(settings.inActiveHtml); 205 settings.onActive.call(this); 206 } 207 } else { 208 e.preventDefault(); 209 $siblings.removeClass(settings.activeClass); 210 $siblings.find('li').removeClass(settings.activeClass); 211 $li.removeClass(settings.activeClass); 212 $li.children("ul").slideUp(); 213 $this.find('.' + settings.hasIconClass).html(settings.activeHtml); 214 settings.onDeactive.call(this); 215 } 216 }); 217 // load 218 $(window).on("load", function () { 219 $a.each(function () { 220 if ($(this).closest("li").children('ul').length > 0) { 221 $(this).closest("li").addClass(settings.hasClass); 222 $(this).closest("li > a").prepend("<span class='" + settings.hasIconClass + "'>" + settings.activeHtml + "</span>"); 223 } 224 ; 225 }); 226 }); 227 } 228 $(".sidebarmy").mla(); 229 230 $(".mobileheader .logocontainer span").on("click", function (e) { 231 e.preventDefault(); 232 e.stopPropagation(); 233 $(".sidebarmy").toggleClass("open"); 234 $("body").toggleClass("sidebarmy-open"); 235 }); 236 $(".sidebarmy").on("click", function (e) { 237 e.stopPropagation(); 238 }); 239 $(document).on("click", function (e) { 240 $(".sidebarmy").removeClass("open"); 241 $("body").removeClass("sidebarmy-open"); 242 }); 243 $(".sidebarmy-close").on("click", function (e) { 244 $(".sidebarmy").removeClass("open"); 245 $("body").removeClass("sidebarmy-open"); 246 }); 247 248 249 $(function () { 250 $('[data-toggle="tooltip"]').tooltip() 251 }) 252 253 /************************* 254 Predefined Variables 255 *************************/ 256 var $window = $(window), 257 $document = $(document), 258 $body = $('body'), 259 $countdownTimer = $('.countdown'), 260 $counter = $('.counter-main'); 261 262//Check if function exists 263 $.fn.exists = function () { 264 return this.length > 0; 265 }; 266 267 268 /************************* 269 Predefined Variables 270 *************************/ 271 var $window = $(window), 272 $document = $(document), 273 $body = $('body'), 274 $countdownTimer = $('.countdown'), 275 $bar = $('.bar'), 276 $progressBar = $('.progress-bar'), 277 $counter = $('.counter'); 278 279 //Check if function exists 280 $.fn.exists = function () { 281 return this.length > 0; 282 }; 283 284 285 /************************* 286 Preloader 287 *************************/ 288 POTENZA.preloader = function () { 289 290 291 }; 292 293 294 /************************* 295 Mega menu 296 *************************/ 297 POTENZA.megaMenu = function () { 298 $('#menu').megaMenu({ 299 // DESKTOP MODE SETTINGS 300 logo_align: 'left', // align the logo left or right. options (left) or (right) 301 links_align: 'left', // align the links left or right. options (left) or (right) 302 socialBar_align: 'left', // align the socialBar left or right. options (left) or (right) 303 searchBar_align: 'right', // align the search bar left or right. options (left) or (right) 304 trigger: 'hover', // show drop down using click or hover. options (hover) or (click) 305 effect: 'fade', // drop down effects. options (fade), (scale), (expand-top), (expand-bottom), (expand-left), (expand-right) 306 effect_speed: 400, // drop down show speed in milliseconds 307 sibling: true, // hide the others showing drop downs if this option true. this option works on if the trigger option is "click". options (true) or (false) 308 outside_click_close: true, // hide the showing drop downs when user click outside the menu. this option works if the trigger option is "click". options (true) or (false) 309 top_fixed: false, // fixed the menu top of the screen. options (true) or (false) 310 sticky_header: true, // menu fixed on top when scroll down down. options (true) or (false) 311 sticky_header_height: 250, // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value. 312 menu_position: 'horizontal', // change the menu position. options (horizontal), (vertical-left) or (vertical-right) 313 full_width: false, // make menu full width. options (true) or (false) 314 // MOBILE MODE SETTINGS 315 mobile_settings: { 316 collapse: false, // collapse the menu on click. options (true) or (false) 317 sibling: true, // hide the others showing drop downs when click on current drop down. options (true) or (false) 318 scrollBar: true, // enable the scroll bar. options (true) or (false) 319 scrollBar_height: 400, // scroll bar height in px value. this option works if the scrollBar option true. 320 top_fixed: false, // fixed menu top of the screen. options (true) or (false) 321 sticky_header: false, // menu fixed on top when scroll down down. options (true) or (false) 322 sticky_header_height: 200 // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value. 323 } 324 }); 325 } 326 327 328 /************************* 329 counter 330 *************************/ 331 332 POTENZA.counters = function () { 333 if ($counter.exists()) { 334 $counter.each(function () { 335 var $elem = $(this);
336 $elem.appear(function () { 337 $elem.find('.timer').countTo(); 338 }); 339 }); 340 } 341 }; 342 343 344 /************************* 345 Accordion 346 *************************/ 347 POTENZA.accordion = function () { 348 var $acpanel = $(".accordion .acd-group > .acd-des"), 349 $acsnav = $(".accordion .acd-group > .acd-heading"); 350 351 $acpanel.hide().first().slideDown("easeOutExpo"); 352 $acsnav.first().addClass("acd-active"); 353 $acsnav.on('click', function () { 354 var $this = $(this).next(".acd-des"); 355 $acsnav.parent().removeClass("acd-active"); 356 $(this).parent().addClass("acd-active"); 357 $acpanel.not($this).slideUp("easeInExpo"); 358 $(this).next().slideDown("easeOutExpo"); 359 return false; 360 }); 361 } 362 363 /************************* 364 owl-carousel 365 *************************/ 366 367 POTENZA.carousel = function () { 368 369 370 if (!$(".owl-carousel").hasClass('forspaces')) { 371 $(".owl-carousel").each(function () { 372 var $this = $(this), 373 $items = ($this.attr('data-items')) ? $this.data('items') : 1, 374 $loop = ($this.attr('data-loop')) ? $this.data('loop') : true, 375 $navdots = ($this.attr('data-nav-dots')) ? $this.data('nav-dots') : false, 376 $navarrow = ($this.attr('data-nav-arrow')) ? $this.data('nav-arrow') : false, 377 $autoplay = ($this.attr('data-autoplay')) ? $this.data('autoplay') : true, 378 $space = ($this.attr('data-space')) ? $this.data('space') : 30, 379 $delay = ($this.attr('data-delay')) ? $this.data('delay') : 2000; 380 381 $(this).owlCarousel({ 382 loop: $loop, 383 items: $items, 384 responsive: { 385 0: {items: $this.data('xx-items') ? $this.data('xx-items') : 1}, 386 480: {items: $this.data('xs-items') ? $this.data('xs-items') : 1}, 387 768: {items: $this.data('sm-items') ? $this.data('sm-items') : 2}, 388 980: {items: $this.data('md-items') ? $this.data('md-items') : 3}, 389 1200: {items: $items} 390 }, 391 dots: $navdots, 392 margin: $space, 393 nav: $navarrow, 394 navText: false, 395 autoplay: $autoplay, 396 autoplayTimeout: $delay, 397 autoplayHoverPause: true 398 }); 399 400 }); 401 } 402 403 } 404 405 /************************* 406 Countdown 407 *************************/ 408 POTENZA.countdownTimer = function () { 409 if ($countdownTimer.exists()) { 410 $countdownTimer.downCount({ 411 date: '10/05/2019 12:00:00', 412 offset: 400 413 }); 414 } 415 }; 416 417 /************************* 418 Magnific Popup 419 *************************/ 420 POTENZA.mediaPopups = function () { 421 if ($(".popup-gallery").exists()) { 422 $('.popup-gallery').magnificPopup({ 423 delegate: 'a.popup-img', 424 type: 'image', 425 tLoading: 'Loading image #%curr%...', 426 mainClass: 'mfp-img-mobile', 427 fixedContentPos: true, 428 gallery: { 429 enabled: true, 430 navigateByImgClick: true, 431 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 432 }, 433 image: { 434 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 435 titleSrc: function (item) { 436 return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; 437 } 438 } 439 }); 440 } 441 if ($(".popup-youtube, .popup-vimeo, .popup-gmaps").exists()) { 442 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 443 disableOn: 700, 444 type: 'iframe', 445 mainClass: 'mfp-fade', 446 removalDelay: 160, 447 preloader: false,
448 fixedContentPos: false 449 }); 450 } 451 } 452 453 454 /************************* 455 Isotope 456 *************************/ 457 POTENZA.Isotope = function () { 458 var $isotope = $(".isotope"), 459 $itemElement = '.grid-item', 460 $filters = $('.isotope-filters'); 461 if ($isotope.exists()) { 462 $isotope.isotope({ 463 resizable: true, 464 itemSelector: $itemElement, 465 masonry: { 466 gutterWidth: 10 467 } 468 }); 469 $filters.on('click', 'button', function () { 470 var $val = $(this).attr('data-filter'); 471 $isotope.isotope({filter: $val}); 472 $filters.find('.active').removeClass('active'); 473 $(this).addClass('active'); 474 }); 475 } 476 } 477 478 // masonry 479 POTENZA.masonry = function () { 480 var $masonry = $('.masonry-main .masonry'), 481 $itemElement = '.masonry-main .masonry-item'; 482 if ($masonry.exists()) { 483 $masonry.isotope({ 484 resizable: true, 485 itemSelector: $itemElement, 486 masonry: { 487 gutterWidth: 10 488 } 489 }); 490 } 491 } 492 493 /************************* 494 Progressbar 495 *************************/ 496 POTENZA.progressBar = function () { 497 498 if ($progressBar.exists()) { 499 $progressBar.each(function (i, elem) { 500 var $elem = $(this), 501 percent = $elem.attr('data-percent') || "100", 502 delay = $elem.attr('data-delay') || "100", 503 type = $elem.attr('data-type') || "%"; 504 505 if (!$elem.hasClass('progress-animated')) { 506 $elem.css({ 507 'width': '0%' 508 }); 509 } 510 511 var progressBarRun = function () { 512 $elem.animate({ 513 'width': percent + '%' 514 }, 'easeInOutCirc').addClass('progress-animated'); 515 516 $elem.delay(delay).append('<span class="progress-type animated fadeIn">' + type + '</span><span class="progress-number animated fadeIn">' + percent + '</span>'); 517 }; 518 519 $(elem).appear(function () { 520 setTimeout(function () { 521 progressBarRun(); 522 }, delay); 523 }); 524 }); 525 } 526 }; 527 528 529 /************************* 530 parallax 531 *************************/ 532 POTENZA.Parallax = function () { 533 var $parallaxdiv = $('.parallax'), 534 parallax = document.querySelectorAll(".parallax"), speed = 0.5; 535 if ($parallaxdiv.exists()) { 536 window.onscroll = function () { 537 [].slice.call(parallax).forEach(function (el, i) { 538 var windowYOffset = window.pageYOffset, 539 elBackgrounPos = "0 " + (windowYOffset * speed) + "px"; 540 el.style.backgroundPosition = elBackgrounPos; 541 542 }); 543 }; 544 } 545 } 546 547 /************************* 548 Php Contact Form 549 *************************/ 550 /*POTENZA.Contactform = function () { 551 $("#contactform").submit(function (event) { 552 $("#ajaxloader").show(); 553 $("#contactform").hide(); 554 $.ajax({
555 url: 'php/contact-form.php', 556 data: $(this).serialize(), 557 type: 'post', 558 success: function (response) { 559 $("#ajaxloader").hide(); 560 $("#contactform").show(); 561 $("#contactform").find("input, textarea").val(""); 562 $("#formmessage").html(response).show().delay(2000).fadeOut('slow'); 563 } 564 }); 565 event.preventDefault(); 566 }); 567 }*/ 568 569 /************************* 570 Countdown 571 *************************/ 572 POTENZA.countdownTimer = function () { 573 if ($countdownTimer.exists()) { 574 $countdownTimer.downCount({ 575 date: '10/05/2019 12:00:00', 576 offset: 400 577 }); 578 } 579 }; 580 581 582 /************************* 583 Back to top 584 *************************/ 585 POTENZA.goToTop = function () { 586 var $goToTop = $('#back-to-top'); 587 $goToTop.hide(); 588 $window.scroll(function () { 589 if ($window.scrollTop() > 100) 590 $goToTop.fadeIn(); 591 else 592 $goToTop.fadeOut(); 593 }); 594 $goToTop.on("click", function () { 595 $('body,html').animate({scrollTop: 0}, 1000); 596 return false; 597 }); 598 } 599 600 /**************************************************** 601 POTENZA Window load and functions 602 ****************************************************/ 603 604 //Window load functions 605 606 window.addEventListener('load', function () { 607 POTENZA.preloader(), 608 POTENZA.Isotope(), 609 POTENZA.masonry(), 610 POTENZA.progressBar(); 611 }); 612 613 //Document ready functions 614 $document.ready(function () { 615 POTENZA.megaMenu(), 616 POTENZA.counters(), 617 POTENZA.accordion(), 618 POTENZA.carousel(), 619 POTENZA.Parallax(), 620 //POTENZA.Contactform(), 621 POTENZA.countdownTimer(), 622 POTENZA.goToTop(), 623 POTENZA.mediaPopups(), 624 POTENZA.countdownTimer(); 625 }); 626 627// $('.stay-datepicker').pickadate({ 628// 629// min: new Date(), 630// format: 'dd-mm-yyyy', 631// formatSubmit: 'yyyy-mm-dd', 632// selectYears: 1, 633// onClose: function () { 634// 635// this.$node.val(this.get()); 636// console.log("ALEERT-------------------->") 637// } 638// }); 639// 640// 641// $('.stay-datepicker-two').pickadate({ 642// min: new Date(), 643// format: 'dd-mm-yyyy', 644// formatSubmit: 'dd-mm-yyyy', 645// selectYears: 1, 646// onClose: function () { 647// 648// this.$node.val(this.get()); 649//// this.$node.val("2024-02-14"); 650// console.log("ALEERT-------------------->" + this.get()); 651// } 652// }); 653 654 $('.stay-timepicker').pickatime({ 655 format: 'hh:i A', 656 formatSubmit: 'HH:i' 657 658// interval: 15, 659// min: [5, 30], 660// max: [23, 0], 661// formatSubmit: 'HH:i', 662// hiddenName: true 663 }); 664 665 666// Initialize check-in 667 var $checkin = $('.stay-datepicker').pickadate({ 668 min: new Date(), 669 format: 'dd-mm-yyyy', 670 formatSubmit: 'yyyy-mm-dd', 671 selectYears: 1, 672 onClose: function () { 673 this.$node.val(this.get()); 674 }, 675 onSet: function (context) { 676 if (context.select) { 677 var checkinDate = new Date(context.select); 678 679 // add 1 day 680 var minCheckoutDate = new Date(checkinDate); 681 minCheckoutDate.setDate(minCheckoutDate.getDate() + 1); 682 683 // update checkout min date 684 $checkout.set('min', minCheckoutDate); 685 686 // if checkout is empty OR before the new min, set it to +1 day 687 var currentCheckout = $checkout.get('select'); 688 if (!currentCheckout || new Date(currentCheckout.pick) < minCheckoutDate) { 689 $checkout.set('select', minCheckoutDate); 690 } 691 } 692 } 693 }).pickadate('picker'); 694 695// Initialize checkout 696 var $checkout = $('.stay-datepicker-two').pickadate({ 697 min: new Date(), 698 format: 'dd-mm-yyyy', 699 formatSubmit: 'yyyy-mm-dd', 700 selectYears: 1, 701 onClose: function () { 702 this.$node.val(this.get()); 703 } 704 }).pickadate('picker'); 705 706})(jQuery);
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.