text: // Off Canvas Sliding
  $(document).ready(function(){
    // Menu button click
    $('#js-menu-trigger,#js-menu-screen').on('click touchstart', function(e){
      // $('#js-body').toggleClass('no-scroll');
      $('#js-menu, #js-menu-screen').toggleClass('is-visible');
      $('#js-menu-trigger').toggleClass('slide close');
      // $('#masthead, #page-wrapper').toggleClass('slide');
      e.preventDefault();
    });
  });
  
  // Smooth scrolling to sections
  $(function() {
    $('a[href*="#"]:not([href="#"])').on("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 // Amount of offset
          }, 600);
          return false;
        }
      }
    });
  });
  
  // FitVids
  $(document).ready(function(){
  	// Target your .container, .wrapper, .post, etc.
  	$("#main").fitVids();
  });
  
  // Table of Contents title. Change text to localize
  $("#markdown-toc").prepend("<li><h6>{{ site.data.messages.locales[site.locale].overview }}</h6></li>");
  
  // Animated scroll to top
  $('.totop').on("click", function(event){
    event.preventDefault();
    $('html, body').animate({scrollTop: 0}, 900);
  });
  
  // Expander
  $(document).ready(function() {
    $('.expander-trigger').on("click", function(){
      $(this).toggleClass("expander-hidden");
    });
  });
  
  // Loading Animation
  $(document).ready(function() {
    $('.holds-the-iframe').removeClass('holds-the-iframe');
  });
  
  // Fade
  $(document).ready(function() {
    var element = document.getElementById("js-fadeInElement");
    $(element).addClass('js-fade-element-hide');
  
    $(window).on("scroll", function() {
      if( $("#js-fadeInElement").length > 0 ) {
        var elementTopToPageTop = $(element).offset().top;
        var windowTopToPageTop = $(window).scrollTop();
        var windowInnerHeight = window.innerHeight;
        var elementTopToWindowTop = elementTopToPageTop - windowTopToPageTop;
        var elementTopToWindowBottom = windowInnerHeight - elementTopToWindowTop;
        var distanceFromBottomToAppear = 300;
  
        if(elementTopToWindowBottom > distanceFromBottomToAppear) {
          $(element).addClass('js-fade-element-show');
        }
        else if(elementTopToWindowBottom < 0) {
          $(element).removeClass('js-fade-element-show');
          $(element).addClass('js-fade-element-hide');
        }
      }
    });
  });
  