Magnetic media for intelligent release of biologically active substances