$(function(){
    // Swipe sur la home avec objectif
    /* var mySwipe = $('#slider').Swipe( {
        startSlide: 0,
        speed: 400,
        auto: 0,
        draggable: false,
        continuous: false,
        disableScroll: false,
        stopPropagation: false,
        callback: function(index, elem, dir) {
            console.log('swipe');
            $('.swipe-controls .btn').each(function(){
                if($(this).hasClass('active')){
                    $(this).removeClass('active');
                }else{
                    $(this).addClass('active');
                }
            });
        },
        transitionEnd: function(index, elem) {}
    }).data('Swipe');
    $('#prev').on('click', function(){
        mySwipe.prev();
    });
    $('#next').on('click', function(){
        mySwipe.next();
    }); */
    $('.prev').on('click', function(){
        $('.element').removeClass('visible');
        $('.sport').addClass('visible');
        $('.btn-primary').removeClass('active');
        $(this).addClass('active');
    });
    $('.next').on('click', function(){
        $('.element').removeClass('visible');
        $('.nutrition').addClass('visible');
        $('.btn-primary').removeClass('active');
        $(this).addClass('active');
    });
});