$('.content-block-slideshow').on('beforeChange', function(event, slick, currentSlide, nextSlide) {
if ($('.slideshow .slide[data-id="' + nextSlide + '"]').hasClass('dark')) {
$('body').addClass('dark');
} else {
$('body').removeClass('dark');
}
});

