/* To avoid CSS expressions while still supporting IE 7 and IE 6, use this script */
/* The script tag referencing this file must be placed before the ending body tag. */

/* Use conditional comments in order to target IE 7 and older:
	<!--[if lt IE 8]><!-->
	<script src="ie7/ie7.js"></script>
	<!--<![endif]-->
*/

(function() {
	function addIcon(el, entity) {
		var html = el.innerHTML;
		el.innerHTML = '<span style="font-family: \'tlcd96\'">' + entity + '</span>' + html;
	}
	var icons = {
		'tlcd96-fonts-code': '&#xe909;',
		'tlcd96-fonts-cog': '&#xe90a;',
		'tlcd96-fonts-settings': '&#xe90a;',
		'tlcd96-fonts-software': '&#xe90b;',
		'tlcd96-fonts-program': '&#xe90b;',
		'tlcd96-fonts-programs': '&#xe90b;',
		'tlcd96-fonts-youtube': '&#xe907;',
		'tlcd96-fonts-youtube_user': '&#xe908;',
		'tlcd96-fonts-youtube-user': '&#xe908;',
		'tlcd96-fonts-discord-server': '&#xe904;',
		'tlcd96-fonts-discord_server': '&#xe904;',
		'tlcd96-fonts-discord-user': '&#xe905;',
		'tlcd96-fonts-discord_user': '&#xe905;',
		'tlcd96-fonts-server': '&#xe906;',
		'tlcd96-fonts-oneux': '&#xe903;',
		'tlcd96-fonts-oux': '&#xe903;',
		'tlcd96-fonts-crowdin': '&#xe900;',
		'tlcd96-fonts-discord': '&#xe901;',
		'tlcd96-fonts-twitter': '&#xe902;',
		'tlcd96-fonts-x': '&#xe902;',
		'0': 0
		},
		els = document.getElementsByTagName('*'),
		i, c, el;
	for (i = 0; ; i += 1) {
		el = els[i];
		if(!el) {
			break;
		}
		c = el.className;
		c = c.match(/tlcd96-fonts-[^\s'"]+/);
		if (c && icons[c[0]]) {
			addIcon(el, icons[c[0]]);
		}
	}
}());
