Magnetic properties of intermetallic hydrides