text: (function($) {
    "use strict"; 
    
    $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
        var target = $(this.hash);
        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
        if (target.length) {
          $('html, body').animate({
            scrollTop: (target.offset().top - 56)
          }, 1000, "easeInOutExpo");
          return false;
        }
      }
    });
  
    $('.js-scroll-trigger').click(function() {
      $('.navbar-collapse').collapse('hide');
    });
  
    $('body').scrollspy({
      target: '#mainNav',
      offset: 57
    });
  
    var navbarCollapse = function() {
      if ($("#mainNav").offset().top > 100) {
        $("#mainNav").addClass("navbar-shrink");
      } else {
        $("#mainNav").removeClass("navbar-shrink");
      }
    };
    
    navbarCollapse();
   
    $(window).scroll(navbarCollapse);
  
  
    window.sr = ScrollReveal();
  
    sr.reveal('.sr-icon-1', {
      delay: 200,
      scale: 0
    });
    sr.reveal('.sr-icon-2', {
      delay: 400,
      scale: 0
    });
    sr.reveal('.sr-icon-3', {
      delay: 600,
      scale: 0
    });
    sr.reveal('.sr-icon-4', {
      delay: 800,
      scale: 0
    });
    sr.reveal('.sr-button', {
      delay: 200,
      distance: '15px',
      origin: 'bottom',
      scale: 0.8
    });
    sr.reveal('.sr-contact-1', {
      delay: 200,
      scale: 0
    });
    sr.reveal('.sr-contact-2', {
      delay: 400,
      scale: 0
    });
  
    $('.popup-gallery').magnificPopup({
      delegate: 'a',
      type: 'image',
      tLoading: 'Loading image #%curr%...',
      mainClass: 'mfp-img-mobile',
      gallery: {
        enabled: true,
        navigateByImgClick: true,
        preload: [0, 1]
      },
      image: {
        tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
      }
    });
  
  })(jQuery); 
  