Relative equilibria and the virial theorem