text: /* =========================================
                  Preloader
  ============================================ */
  $(window).on('load', function() { // makes sure that whole site is loaded
      $('#status').fadeOut();
      $('#preloader').delay(350).fadeOut('slow');
      if ($(window).scrollTop() == 0)
          $('#slidebox').animate({ 'right': '0px' }, 300);
  });
  
  
  /* =========================================
                  Team
  ============================================ */
  $(function() {
      $("#team-members").owlCarousel({
          items: 3,
          autoplay: true,
          smartSpeed: 800,
          loop: true,
          autoplayHoverPause: true,
          nav: true,
          dots: false,
          navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
          responsive: {
              // breakpoint from 0 up
              0: {
                  items: 2
              },
              // breakpoint from 480 up
              480: {
                  items: 3
              }
          }
      });
  });
  
  /* =========================================
                  Progress Bars
  ============================================ */
  
  /*
  $(function () {
  
      $("#progress-elements").waypoint(function () {
  
          $(".progress-bar").each(function () {
  
              $(this).animate({
                  width: $(this).attr("aria-valuenow") + "%"
              }, 2000);
  
          });
  
          this.destroy();
      }, {
          offset: 'bottom-in-view'
      });
  
  });
  */
  /* =========================================
                 Responsive Tabs
  ============================================ */
  $(function() {
  
      $("#services-tabs").responsiveTabs({
          animation: 'slide'
      });
  
  });
  
  
  
  /* =========================================
                 Responsive Tabs
  ============================================ */
  $(function() {
  
      $("#services-tabs-indices").responsiveTabs({
          animation: 'slide'
      });
  
  });
  
  
  
  
  /* =========================================
                 Portfolio
  ============================================ */
  $(window).on('load', function() {
  
      // Initialize Isotope
      $("#isotope-container").isotope({});
  
      // filter items on button click
      $("#isotope-filters").on('click', 'button', function() {
  
          // get filter value
          var filterValue = $(this).attr('data-filter');
  
          // filter portfolio
          $("#isotope-container").isotope({
              filter: filterValue
          });
  
          // active button
          $("#isotope-filters").find('.active').removeClass('active');
          $(this).addClass('active');
      });
  });
  /* =========================================
                 Magnifier
  ============================================ */
  $(function() {
  
      $("#portfolio-wrapper").magnificPopup({
          delegate: 'a', // child items selector, by clicking on it popup will open
          type: 'image',
          gallery: {
              enabled: true
          }
      });
  
  });
  
  /* =========================================
                 Testimonials
  ============================================ */
  $(function() {
      $("#testimonial-slider").owlCarousel({
          items: 1,
          autoplay: false,
          smartSpeed: 700,
          loop: true,
          autoplayHoverPause: true,
          nav: true,
          dots: false,
          navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>']
      });
  });
  
  
  /* =========================================
                Stats
  ============================================ */
  $(function() {
  
      $(".counter").counterUp({
          delay: 10,
          time: 2000
      });
  
  });
  
  
  /* =========================================
                Clients
  ============================================ */
  $(function() {
      $("#clients-list").owlCarousel({
          items: 4,
          autoplay: true,
          smartSpeed: 800,
          loop: true,
          autoplayHoverPause: false,
          nav: true,
          dots: false,
          navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
          responsive: {
              // breakpoint from 0 up
              0: {
                  items: 2
              },
              // breakpoint from 480 up
              480: {
                  items: 3
              },
              // breakpoint from 768 up
              768: {
                  items: 4
              }
          }
      });
  });
  
  
  /* =========================================
                Google Map
  ============================================ */
  $(window).on('load', function() {
      /*
          // Map Variables
          var addressString = '230 Broadway, NY, New York 10007, USA';
          var myLatlng = {
              lat: 40.712685,
              lng: -74.005920
          };
  
          // 1. Render Map
          var map = new google.maps.Map(document.getElementById('map'), {
              zoom: 11,
              center: myLatlng
          });
  
          // 2. Add Marker
          var marker = new google.maps.Marker({
              position: myLatlng,
              map: map,
              title: "Click To See Address"
          });
  
          // 3. Add Info Window
          var infowindow = new google.maps.InfoWindow({
              content: addressString
          });
  
          // Show info window when user clicks marker
          marker.addListener('click', function() {
              infowindow.open(map, marker);
          });
  
          // 4. Resize Function
          google.maps.event.addDomListener(window, 'resize', function() {
  
              var center = map.getCenter();
              google.maps.event.trigger(map, 'resize');
              map.setCenter(center);
  
          });
  
          */
  
  });
  
  
  /* =========================================
                Navigation
  ============================================ */
  
  /* Show & Hide White Navigation */
  $(function() {
  
      // show/hide nav on page load
      showHideNav();
  
      $(window).scroll(function() {
  
          // show/hide nav on window's scroll
          showHideNav();
      });
  
      function showHideNav() {
  
          if ($(window).scrollTop() > 50) {
  
              // Show white nav
              $("nav").addClass("white-nav-top");
  
              // Show dark logo
              $(".navbar-brand img").attr("src", "img/logo/logo-dark.jpg");
  
              // Show back to top button
              $("#back-to-top").fadeIn();
  
          } else {
  
              // Hide white nav
              $("nav").removeClass("white-nav-top");
  
              // Show logo
              $(".navbar-brand img").attr("src", "img/logo/logo.jpg");
  
              // Hide back to top button
              $("#back-to-top").fadeOut();
          }
      }
  });
  
  // Smooth Scrolling
  $(function() {
  
      $("a.smooth-scroll").click(function(event) {
  
          event.preventDefault();
  
          // get section id like #about, #servcies, #work, #team and etc.
          var section_id = $(this).attr("href");
  
          $("html, body").animate({
              scrollTop: $(section_id).offset().top - 64
          }, 1250, "easeInOutExpo");
  
      });
  
  });
  
  /* =========================================
                Mobile Menu
  ============================================ */
  $(function() {
  
      // Show mobile nav
      $("#mobile-nav-open-btn").click(function() {
          $("#mobile-nav").css("height", "100%");
      });
  
      // Hide mobile nav
      $("#mobile-nav-close-btn, #mobile-nav a").click(function() {
          $("#mobile-nav").css("height", "0%");
      });
  
  });
  
  /* =========================================
                  Animation
  ============================================ */
  // animate on scroll
  $(function() {
      new WOW().init();
  });
  
  // home animation on page load
  $(window).on('load', function() {
  
      $("#home-heading-1").addClass("animated fadeInDown");
      $("#home-heading-2").addClass("animated fadeInLeft");
      $("#home-text").addClass("animated zoomIn");
      $("#home-btn").addClass("animated zoomIn");
      $("#arrow-down i").addClass("animated fadeInDown infinite");
  
  });
  $(function() {
      $(window).scroll(function() {
          /* when reaching the element with id "last" we want to show the slidebox. Let's get the distance from the top to the element */
          //var distanceTop = $('#last').offset().top - $(window).height();
          if ($(window).scrollTop() == 0)
              $('#slidebox').animate({ 'right': '0px' }, 300);
          //else
          if ($(window).scrollTop() > 10)
              $('#slidebox').stop(true).animate({ 'right': '-430px' }, 100);
      });
      /* remove the slidebox when clicking the cross */
      $('#slidebox .close').bind('click', function() {
          $(this).parent().remove();
      });
  });