lots of tooltip mods do this, I believe. I like AF_ToolTip, because it's attractive and gives me all the information I need.
Whether it plays nicely with cosmos or not, I don't know, because I haven't used cosmos since level 3 or so.
Click This Link for the AF_ToolTip Download page
A picture of the mod.
The new modified ToolTip shows a players guild (be they alliance/horde) in <x> format, eg. <Crimson Dreams>. If they are in your own guild, the tag will be green. If they are an enemy the tag is red, if friendly the tag is blue.
When the Mod is installed, use simple / commands to place the tip in different locations (default bottom left {same as bliz's default}). This mod replaces your normal tooltip.
I like to use /aftt top, which makes tooltips appear in top center of screen.