Magnetic interactions and covalency effects in mainly ionic compounds