when the magnets started moving, the amount of kinetic energy went down and the amount of potential energy went up.