Percolation in magnetic composites