/* 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 = { 'social-facebook' : 'a', 'social-twitter' : 'b', 'social-twitter-2' : 'c', 'social-twitter-3' : 'd', 'social-facebook-2' : 'e', 'social-gplus' : 'f', 'social-google-plus' : 'g', 'social-feed' : 'h', 'social-feed-2' : 'i', 'social-feed-3' : 'j', 'social-pinterest' : 'k', 'social-pinterest-2' : 'l', 'social-linkedin' : 'm', 'social-skype' : 'n', 'social-flickr' : 'o', 'social-flickr-2' : 'p', 'social-flickr-3' : 'q', 'social-forrst' : 'r', 'social-yahoo' : 's', 'social-deviantart' : 't', 'social-deviantart-2' : 'u', 'social-wordpress' : 'v', 'social-wordpress-2' : 'w', 'social-stumbleupon' : 'x', 'social-stumbleupon-2' : 'y', 'social-tumblr' : 'z', 'social-tumblr-2' : '1', 'social-dribbble' : '2', 'social-dribbble-2' : '3', 'social-picassa' : '4', 'social-blogger' : '5', 'social-blogger-2' : '6' }, 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(/social-[^\s'"]+/); if (c) { addIcon(el, icons[c[0]]); } } };