ie7.js 2.06 KB
/* 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: \'icon-coms02\'">' + entity + '</span>' + html;
	}
	var icons = {
		'icon-coms02-Exit-full-screen': '&#xe958;',
		'icon-coms02-core-mail': '&#xe957;',
		'icon-coms02-exmail-qq': '&#xe956;',
		'icon-coms02-Label': '&#xe955;',
		'icon-coms02-Choice': '&#xe954;',
		'icon-coms02-download': '&#xe953;',
		'icon-coms02-from-Full-screen': '&#xe94e;',
		'icon-coms02-Report-form': '&#xe94c;',
		'icon-coms02-Check-work-attendance': '&#xe94d;',
		'icon-coms02-Positioning': '&#xe94a;',
		'icon-coms02-Cancel-leave': '&#xe900;',
		'icon-coms02-Childrens-education': '&#xe901;',
		'icon-coms02-City-information': '&#xe905;',
		'icon-coms02-Continuing-Education': '&#xe908;',
		'icon-coms02-Dependant-information': '&#xe90e;',
		'icon-coms02-Educational-information': '&#xe911;',
		'icon-coms02-Family-members': '&#xe914;',
		'icon-coms02-form-Sign': '&#xe917;',
		'icon-coms02-form-to-write': '&#xe919;',
		'icon-coms02-from-cancel': '&#xe91b;',
		'icon-coms02-from-Empty': '&#xe91d;',
		'icon-coms02-from-SignList': '&#xe91f;',
		'icon-coms02-from-Switching': '&#xe925;',
		'icon-coms02-from-Text': '&#xe92b;',
		'icon-coms02-Housing-rent': '&#xe92d;',
		'icon-coms02-Lease-information': '&#xe934;',
		'icon-coms02-Loan-contract': '&#xe937;',
		'icon-coms02-Loan-interest': '&#xe93a;',
		'icon-coms02-Old-man': '&#xe93e;',
		'icon-coms02-Personal-information': '&#xe943;',
		'icon-coms02-Real-estate-certificate': '&#xe947;',
		'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(/icon-coms02-[^\s'"]+/);
		if (c && icons[c[0]]) {
			addIcon(el, icons[c[0]]);
		}
	}
}());