
function initGallery() {
    
    hideAllDescs();
    
}

var actualDesc = null; //aktualne zobrazeny popisek

function showDesc(id) {
    hideAllDescs();
    
    var newDesc = document.getElementById(id);
    newDesc.style.display = "block";
    
}

function showAllDescs() {
    var descs = document.getElementById("popisky").childNodes;
    
    for (var i = 0; i < descs.length; i++) {
        if (descs[i].nodeType != 1) continue;
        
        descs[i].style.display = "block";
    }
    
}

function hideAllDescs() {
    var descs = document.getElementById("popisky").childNodes;
    
    for (var i = 0; i < descs.length; i++) {
        if (descs[i].nodeType != 1) continue;
        
        descs[i].style.display = "none";
    }
    
}


window.addEventListener("load", initGallery);