<a data-id="id" onclick="toggle" ><a>
function toggle (e) {
var id = e.currentTarget.dataset.id;
var block = document.querySelector('#' + id);
block.style.display = block.style.display === 'none' ? 'block' : 'none';
}
window.onbeforeunload = function() {
return "Вы потеряете свои данные!";
}
setInterval(function(){
var $nextSlide = $('.cd-slider-navigation .selected').next();
if( $nextSlide.length == 0 ) {
$nextSlide = $('.cd-slider-navigation li').first();
}
$nextSlide.click();
}, 7000);