Almost periodicity of some Jacobi matrices