The Jahn-Teller effect in solid state chemistry of transition metal compounds