if ($(window).width() < 500) {
    var itemnb = 1;
} else {
    var itemnb = 3;
}
$("#carousel-selectionlibrairie").touchCarousel({
    // The number of items to move per arrow click.
    itemsPerMove: itemnb
// Default width of the item in pixels. (used if impossible to get item width).
    , itemFallbackWidth: 120
    , loopItems: true
});
$("#carousel-news").touchCarousel({
            // The number of items to move per arrow click.
            itemsPerMove: itemnb
                    // Default width of the item in pixels. (used if impossible to get item width).
            , itemFallbackWidth: 120
 });

