window.onload = function()
{
	//Ajout dynamique des infobulles descriptives du glossaire
	Glossaire = {
		VOSTFR	: "Vidéo Originale Sous-Titrée en FRançais",
		VOSTA	: "Vidéo Originale Sous-Titrée en Anglais",
		MFT		: "Manga France Team - ScanTrad.fr",
		MS		: "Mangyekou Sharingan",
		"UTF-8"	: "Unicode 8-bit",
		CSS 	: "Cascading StyleSheet",
		JS 		: "JavaScript",
		VBS		: "Visual Basic Script",
		GNU		: "GNU is Not Unix",
		GPL		: "GNU General Public License"
	};
	//~ for(var n = 0, oLien; oLien = document.getElementsByTagName("a")[n]; n++)
		//~ if(oLien.getAttribute("title") == null || oLien.getAttribute("title") == "") oLien.setAttribute("title", oLien.getAttribute("href"));
	for(var n = 0, oEM; oEM = document.getElementsByTagName("em")[n]; n++)
	{
		if(typeof Glossaire[oEM.firstChild.nodeValue] != "undefined")
		{
			oEM.setAttribute("title", Glossaire[oEM.firstChild.nodeValue]);
			oEM.setAttribute("class", "note");
		}
	}
	
	//Liens automatiques
	for(var n = 0, oLien; oLien = dom.tag(document, "a", n); n++)
	{
		if(dom.att(oLien, "class") == "wiki")
		{
			//~ dom.att(oLien, "href", "http://fr.wikipedia.org/wiki/" + oLien.textContent);
			//~ dom.att(oLien, "title", "Définition du mot \"" + oLien.textContent + "\" sur Wikipedia-Fr");
			//~ dom.att(oLien, "target", "_blank");
			dom.att(oLien, {
				href: "http://fr.wikipedia.org/wiki/" + oLien.textContent,
				title: "Lire/rechercher \"" + oLien.textContent + "\" sur Wikipedia-Fr",
				target: "_blank"
			});
		}
		else if(utils.defined(dom.att(oLien, "href")) && 
		  ! /^http:\/\/www\.baba0rum\.com.*/.test(dom.att(oLien, "href")) && 
		  /^(?:http|ftp|mailto|news|irc):\/\/.*/.test(dom.att(oLien, "href")) && 
		  dom.att(oLien, "class") != "noweb")
		{
			dom.att(oLien, "class", "web");
			dom.after(oLien, dom.el("span", { html: "&#11008;" }, { color: "#7F7F7F" }));
		}
		if(utils.undef(dom.att(oLien, "title")) && utils.defined(dom.att(oLien, "href")))
			dom.att(oLien, "title", dom.att(oLien, "href"));
	}
};

