/* Use this script if you need to support IE 7 and IE 6. */ window.onload = function() { function addIcon(el, entity) { var html = el.innerHTML; el.innerHTML = '' + entity + '' + html; } var icons = { 'fui-volume-16' : '', 'fui-video-16' : '', 'fui-time-16' : '', 'fui-settings-16' : '', 'fui-plus-16' : '', 'fui-new-16' : '', 'fui-menu-16' : '', 'fui-man-16' : '', 'fui-mail-16' : '', 'fui-lock-16' : '', 'fui-location-16' : '', 'fui-heart-16' : '', 'fui-eye-16' : '', 'fui-cross-16' : '', 'fui-cmd-16' : '', 'fui-checkround-16' : '', 'fui-checkmark-16' : '', 'fui-camera-16' : '', 'fui-calendar-16' : '', 'fui-bubble-16' : '' }, els = document.getElementsByTagName('*'), i, attr, html, c, el; for (i = 0; i < els.length; i += 1) { el = els[i]; attr = el.getAttribute('data-icon'); if (attr) { addIcon(el, attr); } c = el.className; c = c.match(/fui-[^\s'"]+/); if (c && icons[c[0]]) { addIcon(el, icons[c[0]]); } } };