Jahn-Teller mediated ordering in layered Li{sub x}MO{sub 2} compounds