Electrolytic deposition of magnesium-substituted hydroxyapatite crystals on titanium substrate