text: $(document).ready(function () {
  
    isMobile() && FastClick.attach(document.body);
  
    $("#posts").find('img').lazyload({
      placeholder: "{{ url_for(theme.images) }}/loading.gif",
      effect: "fadeIn"
    });
  
    $('.back-to-top').on('click', function () {
      $('body').velocity('scroll');
    });
  
    $('.top-to-back').on('click', function () {
      $('body').animate({scrollTop: $(document).height()}, 'slow');
    });
  
    $('.site-nav-toggle button').on('click', function () {
      var $siteNav = $('.site-nav');
      var ON_CLASS_NAME = 'site-nav-on';
      var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME);
      var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown';
      var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass';
  
      $siteNav.stop()[animateAction]('fast', function () {
        $siteNav[animateCallback](ON_CLASS_NAME);
      });
    });
  
    // Define Motion Sequence.
    motionIntegrator
      .add(motionMiddleWares.logo)
      .add(motionMiddleWares.menu)
      .add(motionMiddleWares.postList)
      .add(motionMiddleWares.sidebar);
  
    // Bootstrap Motion.
    CONFIG.motion && motionIntegrator.bootstrap();
  });
  