jQuery(document).ready(function($) {
$('#carouselExampleControls').carousel({
interval: 20000
});
$('#golos-text').html($('#golos-content-0').html());
//Handles the carousel thumbnails
$('[id^=carousel-selector-]').click( function(){
var id_selector = $(this).attr("id");
var id = id_selector.substr(id_selector.length -1);
var id = parseInt(id);
$('#carouselExampleControls').carousel(id);
});
// When the carousel slides, auto update the text
/*$('#carouselExampleControls').on('slid', function (e) {
var id = $('.carousel-item.active').data('slide-number');
$('#golos-text').html($('#golos-content-'+id).html());
});*/
// When the carousel slides, auto update the text
$('#carouselExampleControls').on('slid.bs.carousel', function (e) {
var id = $('.carousel-item.active').data('slide-number');
$('#golos-text').html($('#golos-content-'+id).html());
});
});