Noncontact friction between nanostructures