Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. (function ($) {
  2. // Preloader
  3. $(window).on('load', () => {
  4. if ($('#preloader')) {
  5. $('#preloader').fadeOut('slow', function () {
  6. $(this).remove();
  7. });
  8. }
  9. });
  10. // Back to top button
  11. $(window).scroll(function () {
  12. if ($(this).scrollTop() > 100) {
  13. $('.back-to-top').fadeIn('slow');
  14. } else {
  15. $('.back-to-top').fadeOut('slow');
  16. }
  17. });
  18. $('.back-to-top').click(() => {
  19. $('html, body').animate({
  20. scrollTop: 0,
  21. }, 1500, 'easeInOutExpo');
  22. return false;
  23. });
  24. const nav = $('nav');
  25. const navHeight = nav.outerHeight();
  26. /* --/ ScrollReveal /Easy scroll animations for web and mobile browsers /--*/
  27. window.sr = ScrollReveal();
  28. sr.reveal('.foo', {
  29. duration: 1000,
  30. delay: 15,
  31. });
  32. /* --/ Carousel owl /--*/
  33. $('#carousel').owlCarousel({
  34. loop: true,
  35. margin: -1,
  36. items: 1,
  37. nav: true,
  38. navText: ['<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  39. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>',
  40. ],
  41. autoplay: true,
  42. autoplayTimeout: 3000,
  43. autoplayHoverPause: true,
  44. });
  45. /* --/ Animate Carousel /--*/
  46. $('.intro-carousel').on('translate.owl.carousel', () => {
  47. $('.intro-content .intro-title').removeClass('zoomIn animated').hide();
  48. $('.intro-content .intro-price').removeClass('fadeInUp animated').hide();
  49. $('.intro-content .intro-title-top, .intro-content .spacial').removeClass(
  50. 'fadeIn animated'
  51. )
  52. .hide();
  53. });
  54. $('.intro-carousel').on('translated.owl.carousel', () => {
  55. $('.intro-content .intro-title').addClass('zoomIn animated').show();
  56. $('.intro-content .intro-price').addClass('fadeInUp animated').show();
  57. $('.intro-content .intro-title-top, .intro-content .spacial').addClass('fadeIn animated')
  58. .show();
  59. });
  60. /* --/ Navbar Collapse /--*/
  61. $('.navbar-toggle-box-collapse').on('click', () => {
  62. $('body').removeClass('box-collapse-closed').addClass('box-collapse-open');
  63. });
  64. $('.close-box-collapse, .click-closed').on('click', () => {
  65. $('body').removeClass('box-collapse-open').addClass('box-collapse-closed');
  66. $('.menu-list ul').slideUp(700);
  67. });
  68. /* --/ Navbar Menu Reduce /--*/
  69. $(window).trigger('scroll');
  70. $(window).bind('scroll', () => {
  71. let pixels = 50;
  72. let top = 1200;
  73. if ($(window).scrollTop() > pixels) {
  74. $('.navbar-default').addClass('navbar-reduce');
  75. $('.navbar-default').removeClass('navbar-trans');
  76. } else {
  77. $('.navbar-default').addClass('navbar-trans');
  78. $('.navbar-default').removeClass('navbar-reduce');
  79. }
  80. if ($(window).scrollTop() > top) {
  81. $('.scrolltop-mf').fadeIn(1000, 'easeInOutExpo');
  82. } else {
  83. $('.scrolltop-mf').fadeOut(1000, 'easeInOutExpo');
  84. }
  85. });
  86. /* --/ Property owl /--*/
  87. $('#property-carousel').owlCarousel({
  88. loop: true,
  89. margin: 30,
  90. responsive: {
  91. 0: {
  92. items: 1,
  93. },
  94. 769: {
  95. items: 2,
  96. },
  97. 992: {
  98. items: 3,
  99. },
  100. },
  101. });
  102. /* --/ Property owl owl /--*/
  103. $('#property-single-carousel').owlCarousel({
  104. loop: true,
  105. margin: 0,
  106. nav: true,
  107. navText: ['<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  108. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>',
  109. ],
  110. responsive: {
  111. 0: {
  112. items: 1,
  113. },
  114. },
  115. });
  116. /* --/ News owl /--*/
  117. $('#new-carousel').owlCarousel({
  118. loop: true,
  119. margin: 30,
  120. responsive: {
  121. 0: {
  122. items: 1,
  123. },
  124. 769: {
  125. items: 2,
  126. },
  127. 992: {
  128. items: 3,
  129. },
  130. },
  131. });
  132. /* --/ Testimonials owl /--*/
  133. $('#testimonial-carousel').owlCarousel({
  134. margin: 0,
  135. autoplay: true,
  136. nav: true,
  137. animateOut: 'fadeOut',
  138. animateIn: 'fadeInUp',
  139. navText: ['<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  140. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>',
  141. ],
  142. autoplayTimeout: 4000,
  143. autoplayHoverPause: true,
  144. responsive: {
  145. 0: {
  146. items: 1,
  147. },
  148. },
  149. });
  150. }(jQuery));