function lbs_swap() {
    
    if(lbs_imgIndex == lbs_imgCounter-1){
        document.getElementById("lightboxesButtonForward").style.display = "none";
    } else {
        document.getElementById("lightboxesButtonForward").style.display = "block";
    }
    if(lbs_imgIndex==0){   
        document.getElementById("lightboxesButtonBack").style.display = "none";
    } else {
        document.getElementById("lightboxesButtonBack").style.display = "block";
    }
    
    document.getElementById("lightboxesImgWrapper").innerHTML = '<img src="'+lbs_images[lbs_imgIndex]+'" class="lightboxesImg" id="lbs_currImg">';
    document.getElementById("lbs_currImg").addEventListener("load", function(){
        lbs_resize(document.getElementById("lbs_currImg"));
        document.getElementById("lightboxesLoading").style.display = "none";
    });  
    
    if(lbs_previewMode){
        lbs_preview();
    }
    if(lbs_progressMode){
        document.getElementById('lightboxesProgressBarIndicator').style.width = ((lbs_imgIndex+1)*100)/lbs_imgCounter + "%";
    }
    if(lbs_infoboxMode){
        lbs_infoboxDataUpdate();
        lbs_infoboxVisibility();
    }
}
//swaps the displayed image to the current image
swaps the displayed image to the current image
swaps the displayed image to the current image
function lbs_swap() {
    if(lbs_imgIndex == lbs_imgCounter-1){
        document.getElementById("lightboxesButtonForward").style.display = "none";
    } else {
        document.getElementById("lightboxesButtonForward").style.display = "block";
    }
    if(lbs_imgIndex==0){   
        document.getElementById("lightboxesButtonBack").style.display = "none";
    } else {
        document.getElementById("lightboxesButtonBack").style.display = "block";
    }
    document.getElementById("lightboxesImgWrapper").innerHTML = '<img src="'+lbs_images[lbs_imgIndex]+'" class="lightboxesImg" id="lbs_currImg">';
    document.getElementById("lbs_currImg").addEventListener("load", function(){
        lbs_resize(document.getElementById("lbs_currImg"));
        document.getElementById("lightboxesLoading").style.display = "none";
    });  
    if(lbs_previewMode){
        lbs_preview();
    }
    if(lbs_progressMode){
        document.getElementById('lightboxesProgressBarIndicator').style.width = ((lbs_imgIndex+1)*100)/lbs_imgCounter + "%";
    }
    if(lbs_infoboxMode){
        lbs_infoboxDataUpdate();
        lbs_infoboxVisibility();
    }
}
function lbs_swap ( ) { if ( lbs_imgIndex == lbs_imgCounter - 1 ) { document . getElementById ( "lightboxesButtonForward" ) . style . display = "none" ; } else { document . getElementById ( "lightboxesButtonForward" ) . style . display = "block" ; } if ( lbs_imgIndex == 0 ) { document . getElementById ( "lightboxesButtonBack" ) . style . display = "none" ; } else { document . getElementById ( "lightboxesButtonBack" ) . style . display = "block" ; } document . getElementById ( "lightboxesImgWrapper" ) . innerHTML = '<img src="' + lbs_images [ lbs_imgIndex ] + '" class="lightboxesImg" id="lbs_currImg">' ; document . getElementById ( "lbs_currImg" ) . addEventListener ( "load" , function ( ) { lbs_resize ( document . getElementById ( "lbs_currImg" ) ) ; document . getElementById ( "lightboxesLoading" ) . style . display = "none" ; } ) ; if ( lbs_previewMode ) { lbs_preview ( ) ; } if ( lbs_progressMode ) { document . getElementById ( 'lightboxesProgressBarIndicator' ) . style . width = ( ( lbs_imgIndex + 1 ) * 100 ) / lbs_imgCounter + "%" ; } if ( lbs_infoboxMode ) { lbs_infoboxDataUpdate ( ) ; lbs_infoboxVisibility ( ) ; } }
swaps the displayed image to the current image
swaps the displayed image to the current image