;(function(){

    new Swiper('.person-swiper', {
        slidesPerView : 6,
        centeredSlides : true,
        initialSlide :3,
        slidesOffsetBefore : 12,
        slideToClickedSlide: true,
        on: {
            slideChange: function(){
                var slide = this.slides[this.activeIndex];
                var id = $(slide).find('.item').attr('data-id');
                refreshPerson(id);
            }
        }
    });

    function refreshPerson (id){
        $('.person.active').removeClass('active');
        $('#' + id).addClass('active');
    }

})();
