File size: 2,437 Bytes
6df3c38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0d6ddfa
6df3c38
0d6ddfa
6df3c38
 
 
 
 
0d6ddfa
6df3c38
 
 
 
 
 
 
 
 
 
 
 
0d6ddfa
6df3c38
0d6ddfa
 
 
6df3c38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0d6ddfa
6df3c38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0d6ddfa
6df3c38
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
$(document).ready(function () {
  /* Video Lightbox */
  if (!!$.prototype.simpleLightboxVideo) {
    $(".video").simpleLightboxVideo();
  }

  /*ScrollUp*/
  if (!!$.prototype.scrollUp) {
    $.scrollUp();
  }

  /*Responsive Navigation*/
  $("#nav-mobile").html($("#nav-main").html());
  $("#nav-trigger span").on("click", function () {
    if ($("nav#nav-mobile ul").hasClass("expanded")) {
      $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
      $(this).removeClass("open");
    } else {
      $("nav#nav-mobile ul").addClass("expanded").slideDown(250);
      $(this).addClass("open");
    }
  });

  $("#nav-mobile").html($("#nav-main").html());
  $("#nav-mobile ul a").on("click", function () {
    if ($("nav#nav-mobile ul").hasClass("expanded")) {
      $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250);
      $("#nav-trigger span").removeClass("open");
    }
  });

  /* Sticky Navigation */
  if (!!$.prototype.stickyNavbar) {
    $("#header").stickyNavbar();
  }

  $("#content").waypoint(function (direction) {
    if (direction === "down") {
      $("#header").addClass("nav-solid fadeInDown");
    } else {
      $("#header").removeClass("nav-solid fadeInDown");
    }
  });
});

/* Preloader and animations */
$(window).load(function () {
  // makes sure the whole site is loaded
  $("#status").fadeOut(); // will first fade out the loading animation
  $("#preloader").delay(350).fadeOut("slow"); // will fade out the white DIV that covers the website.
  $("body").delay(450).css({ "overflow-y": "visible" });

  /* WOW Elements */
  if (typeof WOW == "function") {
    new WOW().init();
  }

  /* Parallax Effects */
  if (!!$.prototype.enllax) {
    $(window).enllax();
  }
});
document.addEventListener("DOMContentLoaded", function () {
  const imageContainers = document.querySelectorAll(".image-container");

  imageContainers.forEach(function (container) {
    container.addEventListener("click", function () {
      const imageUrl = this.querySelector("img").src;
      const zoomedImageContainer = document.createElement("div");
      zoomedImageContainer.className = "zoomed-image-container";
      zoomedImageContainer.innerHTML =
        '<img src="' + imageUrl + '" alt="Zoomed Image" />';
      document.body.appendChild(zoomedImageContainer);

      zoomedImageContainer.addEventListener("click", function () {
        this.remove();
      });
    });
  });
});