{"size": 1340, "ext": "js", "max_stars_repo_path": "_sass/pbsorg/components/carousel/favorite-show/carousel.js", "max_stars_repo_name": "pbs/alexandria", "max_stars_repo_stars_event_min_datetime": "2017-03-16T11:41:22.000Z", "max_stars_repo_stars_event_max_datetime": "2017-03-16T11:41:22.000Z", "max_issues_repo_path": "_sass/pbsorg/components/carousel/favorite-show/carousel.js", "max_issues_repo_name": "pbs/alexandria", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "_sass/pbsorg/components/carousel/favorite-show/carousel.js", "max_forks_repo_name": "pbs/alexandria", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.4202898551, "max_line_length": 73, "alphanum_fraction": 0.4798507463}
'use strict';

let jQuery = window.jQuery = require('jquery'),
  Carousel = require('../carousel'),
  PBS = require('../../../scripts/_pbs');

// responsive image processor
require('picturefill');

jQuery(($) => {

  let init = () => {

    // init the responsive images plugin;
    window.picturefill();

    setupCarousel();

  },

  /**
   * Creates up carousel instance with custom settings.
   */
  setupCarousel = () => {

    let options = {
      carousel: $('.carousel-favorite-show').find('.carousel-container'),
      settings: {
        infinite: true,
        dots: false,
        slidesToShow: 6,
        responsive: [
          {
            breakpoint: PBS.breakpoints.slick.lg,
            settings: {
              slidesToShow: 5
            }
          },
          {
            breakpoint: PBS.breakpoints.slick.md,
            settings: {
              slidesToShow: 4
            }
          },
          {
            breakpoint: PBS.breakpoints.slick.sm,
            settings: {
              slidesToShow: 3
            }
          },
          {
            breakpoint: PBS.breakpoints.slick.smaller,
            settings: {
              slidesToShow: 2
            }
          }
        ]
      }
    },

    // create new carousel instance and init
    carousel = new Carousel(options);

  };

  init();

});
