setInterval( backgroundSwitching, 7500 );

let id = 2;

function backgroundSwitching () {
    $( `#img${id}` ).addClass( 'visible' );
    if ( id > 6 ) {
        id = 2;
        $( `.hidables` ).removeClass( 'visible' );
    } else {
        id++;
    }
}