// ==UserScript==
// @name           Seamless Web Description Inliner
// @namespace      http://www.arantius.com/misc/greasemonkey/
// @description    Put descriptions inline, instead of on hover.
// @include        http://www.seamlessweb.com/*.m*
// @exclude        http://www.seamlessweb.com/login.m*
// ==/UserScript==

//console=unsafeWindow.console;

var res=document.evaluate(
	'//div[@class="ExtendedInfo"]//a[starts-with(@onmouseover, "showInfoPopup")]',
	document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null
);
for (var i=0, el=null; el=res.snapshotItem(i); i++) {
	try {
		var desc=el.getAttribute('onmouseover').split('|')[1];

		var div=document.createElement('div');
		div.style.margin='0px 3px';
		div.appendChild(document.createTextNode(desc));
		
		el.parentNode.insertBefore(div, null);

		el.removeAttribute('onclick');
		el.removeAttribute('onmouseout');
		el.removeAttribute('onmouseover');
	} catch (e) {
		//console.error(e);
	}
}
