1/* ------------------------------------------------------- 2 3[ Custom settings ] 4 501. ScrollIt 602. Navbar scrolling background 703. Close navbar-collapse when a clicked 804. Sections background image from data background 905. Animations 1006. YouTubePopUp 1107. Testimonials owlCarousel 1208. Rooms 1 owlCarousel 1309. Rooms Page owlCarousel 1410. Pricing owlCarousel 1511. News owlCarousel 1612. Team owlCarousel 1713. Clients owlCarousel 1814. Restaurant Menu owlCarousel 1915. Restaurant Menu Tabs 2016. Accordion Box (for Faqs) 2117. MagnificPopup Gallery 2218. Smooth Scrolling 2319. Scroll back to top 2420. Select2 2521. Datapicker 2622. Slider 2723. Preloader 2824. Contact Form 2925. Slider Grid Background 30 31------------------------------------------------------- */ 32$(function () { 33 "use strict"; 34 var wind = $(window); 35 36 37 // ScrollIt 38 $.scrollIt({ 39 upKey: 38, // key code to navigate to the next section 40 downKey: 40, // key code to navigate to the previous section 41 easing: 'swing', // the easing function for animation 42 scrollTime: 600, // how long (in ms) the animation takes 43 activeClass: 'active', // class given to the active nav element 44 onPageChange: null, // function(pageIndex) that is called when page is changed 45 topOffset: -70 // offste (in px) for fixed top navigation 46 }); 47 48 49 // Navbar scrolling background 50 wind.on("scroll", function () { 51 var bodyScroll = wind.scrollTop(), 52 navbar = $(".navbar"), 53 logo = $(".navbar .logo> img"); 54 if (bodyScroll > 100) { 55 navbar.addClass("nav-scroll"); 56 logo.attr('src', '/img/auburn-logo-1.webp'); 57 } else { 58 navbar.removeClass("nav-scroll"); 59 logo.attr('src', '/img/auburn-logo-w.webp'); 60 } 61 }); 62 63 64 // Close navbar-collapse when a clicked 65 $(".navbar-nav .dropdown-item a").on('click', function () { 66 $(".navbar-collapse").removeClass("show"); 67 }); 68 69 70 // Sections background image from data background 71 var pageSection = $(".bg-img, section"); 72 pageSection.each(function (indx) { 73 if ($(this).attr("data-background")) { 74 $(this).css("background-image", "url(" + $(this).data("background") + ")"); 75 } 76 }); 77 78 79 // Animations 80 var contentWayPoint = function () { 81 var i = 0; 82 $('.animate-box').waypoint(function (direction) { 83 if (direction === 'down' && !$(this.element).hasClass('animated')) { 84 i++; 85 $(this.element).addClass('item-animate'); 86 setTimeout(function () { 87 $('body .animate-box.item-animate').each(function (k) { 88 var el = $(this); 89 setTimeout(function () { 90 var effect = el.data('animate-effect'); 91 if (effect === 'fadeIn') { 92 el.addClass('fadeIn animated'); 93 } else if (effect === 'fadeInLeft') { 94 el.addClass('fadeInLeft animated'); 95 } else if (effect === 'fadeInRight') { 96 el.addClass('fadeInRight animated'); 97 } else { 98 el.addClass('fadeInUp animated'); 99 } 100 el.removeClass('item-animate'); 101 }, k * 200, 'easeInOutExpo'); 102 }); 103 }, 100); 104 } 105 }, { 106 offset: '85%' 107 }); 108 }; 109 $(function () { 110 contentWayPoint(); 111 }); 112 113 114 // YouTubePopUp 115 $("a.vid").YouTubePopUp(); 116 117 118 // Testimonials owlCarousel * 119 $('.testimonials .owl-carousel').owlCarousel({ 120 loop: true, 121 margin: 30, 122 mouseDrag: true, 123 autoplay: false, 124 dots: true, 125 nav: false, 126 navText: ["<span class='lnr ti-angle-left'></span>", "<span class='lnr ti-angle-right'></span>"], 127 responsiveClass: true, 128 responsive: { 129 0: { 130 items: 1, 131 }, 132 600: { 133 items: 1 134 }, 135 1000: { 136 items: 1 137 } 138 } 139 }); 140 141 // Rooms 1 owlCarousel * 142 $('.rooms1 .owl-carousel').owlCarousel({ 143 loop: true, 144 margin: 30, 145 mouseDrag: true, 146 autoplay: false, 147 dots: true, 148 autoplayHoverPause: true, 149 nav: false, 150 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 151 responsiveClass: true, 152 responsive: { 153 0: { 154 items: 1, 155 }, 156 600: { 157 items: 2 158 }, 159 1000: { 160 items: 3 161 } 162 } 163 }); 164 165 // Rooms 2 owlCarousel * 166 $('.rooms2 .owl-carousel').owlCarousel({ 167 loop: true, 168 margin: 30, 169 mouseDrag: true, 170 autoplay: false, 171 dots: true, 172 autoplayHoverPause: true, 173 nav: false, 174 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 175 responsiveClass: true, 176 responsive: { 177 0: { 178 items: 1, 179 }, 180 600: { 181 items: 1 182 }, 183 1000: { 184 items: 1 185 } 186 } 187 }); 188 189 // Rooms 3 owlCarousel * 190 $('.rooms3 .owl-carousel').owlCarousel({ 191 loop: true, 192 margin: 30, 193 mouseDrag: true, 194 autoplay: false, 195 dots: true, 196 autoplayHoverPause: true, 197 nav: false, 198 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 199 responsiveClass: true, 200 responsive: { 201 0: { 202 items: 1, 203 }, 204 600: { 205 items: 2 206 }, 207 1000: { 208 items: 3 209 } 210 } 211 }); 212 213 // Rooms Page owlCarousel * 214 $('.rooms-page .owl-carousel').owlCarousel({ 215 loop: true, 216 margin: 30, 217 mouseDrag: true, 218 autoplay: true, 219 dots: false, 220 nav: false, 221 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 222 responsiveClass: true, 223 responsive: { 224 0: { 225 items: 1, 226 }, 227 600: { 228 items: 1 229 }, 230 1000: { 231 items: 1 232 } 233 } 234 }); 235 236 // Pricing owlCarousel * 237 $('.pricing .owl-carousel').owlCarousel({ 238 loop: true, 239 margin: 30, 240 mouseDrag: true, 241 autoplay: false, 242 dots: true, 243 autoplayHoverPause: true, 244 nav: false, 245 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 246 responsiveClass: true, 247 responsive: { 248 0: { 249 items: 1 250 }, 251 600: { 252 items: 1 253 }, 254 1000: { 255 items: 2 256 } 257 } 258 }); 259 260 // News owlCarousel * 261 $('.news .owl-carousel').owlCarousel({ 262 loop: true, 263 margin: 30, 264 mouseDrag: true, 265 autoplay: false, 266 dots: false, 267 nav: true, 268 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 269 responsiveClass: true, 270 responsive: { 271 0: { 272 items: 1, 273 dots: true, 274 nav: false 275 }, 276 600: { 277 items: 2, 278 dots: true, 279 nav: false 280 }, 281 1000: { 282 items: 3 283 } 284 } 285 }); 286 287 // Team owlCarousel * 288 $('.team .owl-carousel').owlCarousel({ 289 loop: true, 290 margin: 30, 291 dots: true, 292 mouseDrag: true, 293 autoplay: false, 294 nav: false, 295 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 296 responsiveClass: true, 297 responsive: { 298 0: { 299 items: 1, 300 dots: true 301 }, 302 600: { 303 items: 2 304 }, 305 1000: { 306 items: 3 307 } 308 } 309 }); 310 311 // Clients owlCarousel * 312 $('.clients .owl-carousel').owlCarousel({ 313 loop: true, 314 margin: 30, 315 mouseDrag: true, 316 autoplay: true, 317 dots: false, 318 nav: false, 319 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 320 responsiveClass: true, 321 responsive: { 322 0: { 323 margin: 10, 324 items: 3 325 }, 326 600: { 327 items: 3 328 }, 329 1000: { 330 items: 3 331 } 332 } 333 }); 334 335 // Restaurant Menu owlCarousel
336 $('.restaurant-menu .owl-carousel').owlCarousel({ 337 loop: true, 338 margin: 0, 339 autoplay: false, 340 dots: false, 341 nav: true, 342 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 343 responsiveClass: true, 344 responsive: { 345 0: { 346 items: 2, 347 nav: false 348 }, 349 600: { 350 items: 3, 351 nav: false 352 }, 353 1000: { 354 items: 4 355 } 356 } 357 }); 358 359 // Restaurant Menu Tabs 360 $(".restaurant-menu .tabs-icon").on("click", ".item", function () { 361 $(".item").removeClass("active"); 362 var myID = $(this).attr("id"); 363 $(".restaurant-menu .cont").hide(); 364 $("#" + myID + "-content").fadeIn(); 365 }); 366 $(".restaurant-menu .tabs-icon").on("click", ".owl-item", function () { 367 $(this).addClass("actived").siblings().removeClass("actived"); 368 }); 369 370 371 372 // Accordion Box (for Faqs) 373 if ($(".accordion-box").length) { 374 $(".accordion-box").on("click", ".acc-btn", function () { 375 var outerBox = $(this).parents(".accordion-box"); 376 var target = $(this).parents(".accordion"); 377 if ($(this).next(".acc-content").is(":visible")) { 378 //return false; 379 $(this).removeClass("active"); 380 $(this).next(".acc-content").slideUp(300); 381 $(outerBox).children(".accordion").removeClass("active-block"); 382 } else { 383 $(outerBox).find(".accordion .acc-btn").removeClass("active"); 384 $(this).addClass("active"); 385 $(outerBox).children(".accordion").removeClass("active-block"); 386 $(outerBox).find(".accordion").children(".acc-content").slideUp(300); 387 target.addClass("active-block"); 388 $(this).next(".acc-content").slideDown(300); 389 } 390 }); 391 } 392 393 394 // MagnificPopup Gallery 395 $('.gallery').magnificPopup({ 396 delegate: '.popimg', 397 type: 'image', 398 gallery: { 399 enabled: true 400 } 401 }); 402 $(".img-zoom").magnificPopup({ 403 type: "image", 404 closeOnContentClick: !0, 405 mainClass: "mfp-fade", 406 gallery: { 407 enabled: !0, 408 navigateByImgClick: !0, 409 preload: [0, 1] 410 } 411 }) 412 $('.magnific-youtube, .magnific-vimeo, .magnific-custom').magnificPopup({ 413 disableOn: 700, 414 type: 'iframe', 415 mainClass: 'mfp-fade', 416 removalDelay: 300, 417 preloader: false, 418 fixedContentPos: false 419 }); 420 421 422 // Smooth Scrolling 423 $('a[href*="#"]') 424 // Remove links that don't actually link to anything 425 .not('[href="#"]').not('[href="#0"]').click(function (event) { 426 // On-page links 427 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 428 // Figure out element to scroll to 429 var target = $(this.hash); 430 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 431 // Does a scroll target exist? 432 if (target.length) { 433 // Only prevent default if animation is actually gonna happen 434 event.preventDefault(); 435 $('html, body').animate({ 436 scrollTop: target.offset().top 437 }, 1000, function () { 438 // Callback after animation 439 // Must change focus! 440 var $target = $(target); 441 $target.focus(); 442 if ($target.is(":focus")) { // Checking if the target was focused 443 return false; 444 } else { 445 $target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable 446 $target.focus(); // Set focus again 447 }; 448 }); 449 } 450 } 451 }); 452 453 // Scroll back to top 454 var progressPath = document.querySelector('.progress-wrap path'); 455 var pathLength = progressPath.getTotalLength(); 456 progressPath.style.transition = progressPath.style.WebkitTransition = '
456none'; 457 progressPath.style.strokeDasharray = pathLength + ' ' + pathLength; 458 progressPath.style.strokeDashoffset = pathLength; 459 progressPath.getBoundingClientRect(); 460 progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; 461 var updateProgress = function () { 462 var scroll = $(window).scrollTop(); 463 var height = $(document).height() - $(window).height(); 464 var progress = pathLength - (scroll * pathLength / height); 465 progressPath.style.strokeDashoffset = progress; 466 } 467 updateProgress(); 468 $(window).scroll(updateProgress); 469 var offset = 150; 470 var duration = 550; 471 jQuery(window).on('scroll', function () { 472 if (jQuery(this).scrollTop() > offset) { 473 jQuery('.progress-wrap').addClass('active-progress'); 474 } else { 475 jQuery('.progress-wrap').removeClass('active-progress'); 476 } 477 }); 478 jQuery('.progress-wrap').on('click', function (event) { 479 event.preventDefault(); 480 jQuery('html, body').animate({ 481 scrollTop: 0 482 }, duration); 483 return false; 484 }) 485 486 487 // Select2 488 $('.select2').select2({ 489 minimumResultsForSearch: Infinity, 490 }); 491 492 493 // Datapicker 494 $(".datepicker").datepicker({ 495 orientation: "top" 496 }); 497 498}); 499 500 501// Slider 502$(document).ready(function () { 503 var owl = $('.header .owl-carousel'); 504 505 // Slider owlCarousel - (Inner Page Slider) 506 $('.slider .owl-carousel').owlCarousel({ 507 items: 1, 508 loop: true, 509 dots: true, 510 margin: 0, 511 autoplay: true, 512 autoplayTimeout: 5000, 513 nav: false, 514 navText: ['<i class="ti-angle-left" aria-hidden="true"></i>', '<i class="ti-angle-right" aria-hidden="true"></i>'], 515 responsiveClass: true, 516 responsive: { 517 0: { 518 dots: true 519 }, 520 600: { 521 dots: true 522 }, 523 1000: { 524 dots: true 525 } 526 } 527 }); 528 529 // Slider owlCarousel (Homepage Slider) 530 $('.slider-fade .owl-carousel').owlCarousel({ 531 items: 1, 532 loop: true, 533 dots: true, 534 margin: 0, 535 autoplay: true, 536 autoplayTimeout: 5000, 537 animateOut: 'fadeOut', 538 nav: false, 539 navText: ['<i class="ti-angle-left" aria-hidden="true"></i>', '<i class="ti-angle-right" aria-hidden="true"></i>'], 540 responsiveClass: true, 541 responsive: { 542 0: { 543 dots: false 544 }, 545 600: { 546 dots: false 547 }, 548 1000: { 549 dots: true 550 } 551 } 552 }); 553 owl.on('changed.owl.carousel', function (event) { 554 var item = event.item.index - 2; // Position of the current item 555 $('span').removeClass('animated fadeInUp'); 556 $('h4').removeClass('animated fadeInUp'); 557 $('h1').removeClass('animated fadeInUp'); 558 $('p').removeClass('animated fadeInUp'); 559 $('.butn-light').removeClass('animated fadeInUp'); 560 $('.butn-dark').removeClass('animated fadeInUp'); 561 $('.owl-item').not('.cloned').eq(item).find('span').addClass('animated fadeInUp'); 562 $('.owl-item').not('.cloned').eq(item).find('h4').addClass('animated fadeInUp'); 563 $('.owl-item').not('.cloned').eq(item).find('h1').addClass('animated fadeInUp'); 564 $('.owl-item').not('.cloned').eq(item).find('p').addClass('animated fadeInUp'); 565 $('.owl-item').not('.cloned').eq(item).find('.butn-light').addClass('animated fadeInUp'); 566 $('.owl-item').not('.cloned').eq(item).find('.butn-dark').addClass('animated fadeInUp'); 567 }); 568}); 569 570 571// Preloader 572var CustomApp = { 573 init: function () { 574 this.handlePreloader(); 575 }, 576 handlePreloader: function () { 577 const preloader = document.getElementById('preloader'); 578 const preloaderBg = document.querySelector('.preloader-bg'); 579 const hidePreloader = () => { 580 preloader.classList.add('fade-out'); 581 preloaderBg.classList.add('fade-out'); 582 setTimeout(() => { 583 preloader.remove(); 584 preloaderBg.remove(); 585 }, 600); // CSS transition süresiyle uyumlu 586 }; 587 // When the page is fully loaded 588 window.addEventListener('load', hidePreloader); 589 // 5 seconds fallback 590 setTimeout(hidePreloader, 5000); 591 } 592}; 593CustomApp.init(); 594 595 596 597// Contact Form 598var form = $('.contact__form'), 599 message = $('.contact__msg'), 600 form_data; 601 // success function 602 function done_func(response) { 603 message.fadeIn().removeClass('alert-danger').addClass('alert-success'); 604 message.text(response); 605 setTimeout(function () { 606 message.fadeOut(); 607 }, 2000);
608 form.find('input:not([type="submit"]), textarea').val(''); 609 } 610 // fail function 611 function fail_func(data) { 612 message.fadeIn().removeClass('alert-success').addClass('alert-success'); 613 message.text(data.responseText); 614 setTimeout(function () { 615 message.fadeOut(); 616 }, 2000); 617 } 618 form.submit(function (e) { 619 e.preventDefault(); 620 form_data = $(this).serialize(); 621 $.ajax({ 622 type: 'POST', 623 url: form.attr('action'), 624 data: form_data 625 }).done(done_func).fail(fail_func); 626 }); 627 628// Slider Grid Background 629 (function () { 630 var imageElements = document.querySelectorAll('.grid-img'); 631 var itemElements = document.querySelectorAll('.grid-con'); 632 if (itemElements.length) { 633 itemElements.forEach(function (item, index) { 634 item.addEventListener('mouseenter', function () { 635 imageElements.forEach(function (image) { 636 image.classList.remove('grid-img-active'); 637 }); 638 itemElements.forEach(function (card) { 639 card.classList.remove('grid-con-active'); 640 }); 641 item.classList.add('grid-con-active'); 642 imageElements[index].classList.add('grid-img-active'); 643 }); 644 }); 645 } 646 })(); 647 648// Slider Grid Background owlCarousel * 649 $('.slider-grid-bg .owl-carousel').owlCarousel({ 650 loop: true, 651 margin: 30, 652 mouseDrag: true, 653 autoplay: false, 654 dots: true, 655 nav: false, 656 navText: ["<span class='lnr ti-angle-left'></span>","<span class='lnr ti-angle-right'></span>"], 657 responsiveClass: true, 658 responsive: { 659 0: { 660 items: 1, 661 dots: true, 662 nav: false 663 }, 664 600: { 665 items: 2, 666 dots: true, 667 nav: false 668 }, 669 1000: { 670 items: 3 671 } 672 } 673 }); 674
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.