{extends_parent}

{block "header"}
   {include "components/header.tpl" progress_bar=true}
{/block}

{block "main-class"}main-article{/block}
{block "breadcrumbs-wrapper"}{/block}


<script>
   {block onready}
   var $progress = $('[data-progress-bar]');

   var winHeight = $(window).height(),
           docHeight,
           max,
           value = $(window).scrollTop();

   $progress.attr('max', winHeight);

   setTimeout(function (e) {
      docHeight = $('.article-detail').height() /*- $('.articles-row-detail').height()*/ + 250,
              max = docHeight - winHeight;

      $progress.attr('max', max);
      $progress.attr('value', value);
   }, 1500);

   $(document).on('scroll', function () {
      value = $(window).scrollTop();
      $progress.attr('value', value);
   });

   {/block}
</script>
