Magnetic interactions in intermetallics based on f and d elements