{"size": 2048, "ext": "js", "max_stars_repo_path": "assets/js/common.js", "max_stars_repo_name": "Speennaker/tanyaprykhodko", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/common.js", "max_issues_repo_name": "Speennaker/tanyaprykhodko", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/common.js", "max_forks_repo_name": "Speennaker/tanyaprykhodko", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.6756756757, "max_line_length": 114, "alphanum_fraction": 0.5229492188}
$(document).ready(function () {
  
  // create vertical dots
  (function(){
    var imgs = $('.b_section-wrap');
    var menu =  $('.vertical-dots-nav');
    $.each(imgs, function(index, val) {
      menu.find('ul').append('<li data-href="'+ $(val).data('id') +'"></li>');
    });
    menu.find('li').click(function(event) {
      console.log($('[data-id='+$(this).data("href")+']').offset().top);
      $('html, body').animate({scrollTop: $('[data-id='+$(this).data("href")+']').offset().top}, 2000, function(){
        console.log('scroll finish');
      });
    });
    var wh = window.innerHeight;
    menu.css({
      'margin-top':(wh - menu.height())/2 -100 +'px'
    });
  }());


  // init cusom scrollbar
  $(".default-skin").customScrollbar();

  $('#toogleMenu').click(function(e){
    e.preventDefault();
    // console.log('sdfds');
    $('#mainMenu').toggle();
    // $(this).data('action') == 'show' ? $(this).data('action', 'hide') : $(this).data('action', 'show');
    // console.log($(this).data('action'));
  });

  // $('#mainMenu').on('shown.bs.collapse', function () {
  //   console.log('asdsad');
  // });  

  // remove loader form page
  setTimeout(function(){
    $('body').addClass('loaded');
  }, 1000);

  if (window.innerWidth > 767){
    setTimeout(function(){
      $('.b_page-nav').removeClass('is_shown');
    }, 5000);
  }

  // block scroller & links
  (function(){
    var blockScroller =  $(".b_sections-container").blockScroll({
      scrollDuration:400,
      fadeBlocks: false,
      fadeDuration: 200
    });
    var links =  $('.b_page-nav_list a[href="#"]');
    links.bind('click', function(e){
      e.preventDefault();
      var n = $(this).data('href');
      $('html, body').animate({scrollTop: $('[data-id='+n+']').offset().top}, 2000, function(){
        if ($('#mainMenu').css('display') == 'block') {
          $('#mainMenu').toggle();
        }
      });
    });
    if(contacts == '1')
    {
      $('html, body').animate({scrollTop: $('[data-id=11]').offset().top}, 10);

    }
  }());
});

