Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. /* eslint-disable */
  2. (function($) {
  3. // Preloader
  4. $(window).on("load", () => {
  5. if ($("#preloader")) {
  6. $("#preloader").fadeOut("slow", function() {
  7. $(this).remove();
  8. });
  9. }
  10. });
  11. // Back to top button
  12. $(window).scroll(function() {
  13. if ($(this).scrollTop() > 100) {
  14. $(".back-to-top").fadeIn("slow");
  15. } else {
  16. $(".back-to-top").fadeOut("slow");
  17. }
  18. });
  19. $(".back-to-top").click(() => {
  20. $("html, body").animate(
  21. {
  22. scrollTop: 0
  23. },
  24. 1500,
  25. "easeInOutExpo"
  26. );
  27. return false;
  28. });
  29. const nav = $("nav");
  30. const navHeight = nav.outerHeight();
  31. /* --/ ScrollReveal /Easy scroll animations for web and mobile browsers /--*/
  32. window.sr = ScrollReveal();
  33. sr.reveal(".foo", {
  34. duration: 1000,
  35. delay: 15
  36. });
  37. // Smooth scroll for the menu and links with .scrollto classes
  38. $(".nav-menu a, #mobile-nav a, .scrollto").on("click", function() {
  39. if (
  40. location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") &&
  41. location.hostname == this.hostname
  42. ) {
  43. var target = $(this.hash);
  44. if (target.length) {
  45. var top_space = 0;
  46. if ($("#header").length) {
  47. top_space = $("#header").outerHeight();
  48. if (!$("#header").hasClass("header-fixed")) {
  49. top_space = top_space - 20;
  50. }
  51. }
  52. $("html, body").animate(
  53. {
  54. scrollTop: target.offset().top - top_space
  55. },
  56. 1500,
  57. "easeInOutExpo"
  58. );
  59. if ($(this).parents(".nav-menu").length) {
  60. $(".nav-menu .menu-active").removeClass("menu-active");
  61. $(this)
  62. .closest("li")
  63. .addClass("menu-active");
  64. }
  65. if ($("body").hasClass("mobile-nav-active")) {
  66. $("body").removeClass("mobile-nav-active");
  67. $("#mobile-nav-toggle i").toggleClass("fa-times fa-bars");
  68. $("#mobile-body-overly").fadeOut();
  69. }
  70. return false;
  71. }
  72. }
  73. });
  74. // Mobile Navigation
  75. if ($("#nav-menu-container").length) {
  76. var $mobile_nav = $("#nav-menu-container")
  77. .clone()
  78. .prop({
  79. id: "mobile-nav"
  80. });
  81. $mobile_nav.find("> ul").attr({
  82. class: "",
  83. id: ""
  84. });
  85. $("body").append($mobile_nav);
  86. $("body").prepend(
  87. '<button type="button" id="mobile-nav-toggle"><i class="fa fa-bars"></i></button>'
  88. );
  89. $("body").append('<div id="mobile-body-overly"></div>');
  90. $("#mobile-nav")
  91. .find(".menu-has-children")
  92. .prepend('<i class="fa fa-chevron-down"></i>');
  93. $(document).on("click", ".menu-has-children i", function(e) {
  94. $(this)
  95. .next()
  96. .toggleClass("menu-item-active");
  97. $(this)
  98. .nextAll("ul")
  99. .eq(0)
  100. .slideToggle();
  101. $(this).toggleClass("fa-chevron-left fa-chevron-down");
  102. });
  103. $(document).on("click", "#mobile-nav-toggle", function(e) {
  104. $("body").toggleClass("mobile-nav-active");
  105. $("#mobile-nav-toggle i").toggleClass("fa-times fa-bars");
  106. $("#mobile-body-overly").toggle();
  107. });
  108. $(document).click(function(e) {
  109. var container = $("#mobile-nav, #mobile-nav-toggle");
  110. if (!container.is(e.target) && container.has(e.target).length === 0) {
  111. if ($("body").hasClass("mobile-nav-active")) {
  112. $("body").removeClass("mobile-nav-active");
  113. $("#mobile-nav-toggle i").toggleClass("fa-times fa-bars");
  114. $("#mobile-body-overly").fadeOut();
  115. }
  116. }
  117. });
  118. } else if ($("#mobile-nav, #mobile-nav-toggle").length) {
  119. $("#mobile-nav, #mobile-nav-toggle").hide();
  120. }
  121. /* --/ Carousel owl /--*/
  122. $("#carousel").owlCarousel({
  123. loop: true,
  124. margin: -1,
  125. items: 1,
  126. nav: true,
  127. navText: [
  128. '<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  129. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>'
  130. ],
  131. autoplay: true,
  132. autoplayTimeout: 3000,
  133. autoplayHoverPause: true
  134. });
  135. /* --/ Animate Carousel /--*/
  136. $(".intro-carousel").on("translate.owl.carousel", () => {
  137. $(".intro-content .intro-title")
  138. .removeClass("zoomIn animated")
  139. .hide();
  140. $(".intro-content .intro-price")
  141. .removeClass("fadeInUp animated")
  142. .hide();
  143. $(".intro-content .intro-title-top, .intro-content .spacial")
  144. .removeClass("fadeIn animated")
  145. .hide();
  146. });
  147. $(".intro-carousel").on("translated.owl.carousel", () => {
  148. $(".intro-content .intro-title")
  149. .addClass("zoomIn animated")
  150. .show();
  151. $(".intro-content .intro-price")
  152. .addClass("fadeInUp animated")
  153. .show();
  154. $(".intro-content .intro-title-top, .intro-content .spacial")
  155. .addClass("fadeIn animated")
  156. .show();
  157. });
  158. /* --/ Navbar Collapse /--*/
  159. $(".navbar-toggle-box-collapse").on("click", () => {
  160. $("body")
  161. .removeClass("box-collapse-closed")
  162. .addClass("box-collapse-open");
  163. });
  164. $(".close-box-collapse, .click-closed").on("click", () => {
  165. $("body")
  166. .removeClass("box-collapse-open")
  167. .addClass("box-collapse-closed");
  168. $(".menu-list ul").slideUp(700);
  169. });
  170. /* --/ Navbar Menu Reduce /--*/
  171. $(window).trigger("scroll");
  172. $(window).bind("scroll", () => {
  173. const pixels = 50;
  174. const top = 1200;
  175. if ($(window).scrollTop() > pixels) {
  176. $(".navbar-default").addClass("navbar-reduce");
  177. $(".navbar-default").removeClass("navbar-trans");
  178. } else {
  179. $(".navbar-default").addClass("navbar-trans");
  180. $(".navbar-default").removeClass("navbar-reduce");
  181. }
  182. if ($(window).scrollTop() > top) {
  183. $(".scrolltop-mf").fadeIn(1000, "easeInOutExpo");
  184. } else {
  185. $(".scrolltop-mf").fadeOut(1000, "easeInOutExpo");
  186. }
  187. });
  188. /* --/ Property owl /--*/
  189. $("#property-carousel").owlCarousel({
  190. loop: true,
  191. margin: 30,
  192. responsive: {
  193. 0: {
  194. items: 1
  195. },
  196. 769: {
  197. items: 2
  198. },
  199. 992: {
  200. items: 3
  201. }
  202. }
  203. });
  204. /* --/ Property owl owl /--*/
  205. $("#property-single-carousel").owlCarousel({
  206. loop: true,
  207. margin: 0,
  208. nav: true,
  209. navText: [
  210. '<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  211. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>'
  212. ],
  213. responsive: {
  214. 0: {
  215. items: 1
  216. }
  217. }
  218. });
  219. /* --/ News owl /--*/
  220. $("#new-carousel").owlCarousel({
  221. loop: true,
  222. margin: 30,
  223. responsive: {
  224. 0: {
  225. items: 1
  226. },
  227. 769: {
  228. items: 2
  229. },
  230. 992: {
  231. items: 3
  232. }
  233. }
  234. });
  235. /* --/ Testimonials owl /--*/
  236. $("#testimonial-carousel").owlCarousel({
  237. margin: 0,
  238. autoplay: true,
  239. nav: true,
  240. animateOut: "fadeOut",
  241. animateIn: "fadeInUp",
  242. navText: [
  243. '<i class="ion-ios-arrow-back" aria-hidden="true"></i>',
  244. '<i class="ion-ios-arrow-forward" aria-hidden="true"></i>'
  245. ],
  246. autoplayTimeout: 4000,
  247. autoplayHoverPause: true,
  248. responsive: {
  249. 0: {
  250. items: 1
  251. }
  252. }
  253. });
  254. })(jQuery);