For instance, in the file modules/CRM/Contacts/ContactsCommon_0.php you can find the method:
public static function company_format_default($record,$nolink=false) {
In this method you can see the call:
$ret .= Utils_TooltipCommon::ajax_create($record['company_name'],array('CRM_ContactsCommon','company_get_tooltip'), array($record));
This is the method that creates a tooltip that is loaded using XHR request. Please check the method
company_get_tooltip in the same file to see the formatting used to display the data.
Now, in file modules\Premium\SalesOpportunity\SalesOpportunityCommon_0.php you can find method:
public static function display_opportunity_name($v, $nolink=false) {
As you probably see, it's the equivalent of method
company_format_default, but for Sales Opportunities. You need to modify this method in similar fashion that
company_format_default is written and then create your own method that will create the tooltip itself (equivalent of array('CRM_ContactsCommon','company_get_tooltip')). For now, you can simply create this method in SalesOpportunityCommon.
This is the quick and dirty way of going about that. The clean way would be to create your own custom module, put both methods there and in the installation procedure of this file set the display_callback of the field "Name" in SalesOpp to the one in your module.
Hope this helps,
Arek