<% if ((is_post() || (is_page() && page.image_zoom)) && theme.post.image_zoom.enable) { %>
  <%- js_ex(theme.static_prefix.fancybox, 'jquery.fancybox.min.js') %>
  <%- css_ex(theme.static_prefix.fancybox, 'jquery.fancybox.min.css') %>

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>
<% } %>
