Development of nanostructured magnetic capsules by means of the layer by layer technique