<script type="text/javascript">
(function() {
    //font icons: for browsers that don't support ':before'
    var pseudo_test = $('body').append('<span class="sf-icon-share pseudo-test" style="color:#fff;position:fixed;left:0;bottom:0;"></span>').children('.pseudo-test');
    if (pseudo_test.width() == 0) {
        var setCon = function(icon, icon_class_prefix, icon_list) {
            for (var i = 0, len = icon_list.length; i < len; i++) {
                if (icon.hasClass(icon_class_prefix + icon_list[i].name)) {
                    icon.html('&#x' + icon_list[i].con + ';');
                    break;
                }
            }
        };
        var sf_icons = [
            {'name':'share', 'con':'e001'},
            {'name':'removeformat', 'con':'f1e7'}
        ];
        var fa_icons = [ 
            {'name':'trash', 'con':'f014'},
            {'name':'cog', 'con':'f013'},
            {'name':'cloud-download', 'con':'f0ed'},
            {'name':'search', 'con':'f002'},
            {'name':'minus', 'con':'f068'},
            {'name':'plus', 'con':'f067'},
            {'name':'pencil', 'con':'f040'},
            {'name':'globe', 'con':'f0ac'},
            {'name':'comment-alt', 'con':'f0e5'},
            {'name':'double-angle-right', 'con':'f101'},
            {'name':'font', 'con':'f031'},
            {'name':'text-height', 'con':'f034'},
            {'name':'tint', 'con':'f043'},
            {'name':'bold', 'con':'f032'},
            {'name':'italic', 'con':'f033'},
            {'name':'strikethrough', 'con':'f0cc'},
            {'name':'underline', 'con':'f0cd'},
            {'name':'list-ul', 'con':'f0ca'},
            {'name':'list-ol', 'con':'f0cb'},
            {'name':'indent-left', 'con':'f03b'},
            {'name':'indent-right', 'con':'f03c'},
            {'name':'align-left', 'con':'f036'},
            {'name':'align-center', 'con':'f037'},
            {'name':'align-right', 'con':'f038'},
            {'name':'align-justify', 'con':'f039'},
            {'name':'link', 'con':'f0c1'},
            {'name':'cut', 'con':'f0c4'},
            {'name':'picture', 'con':'f03e'},
            {'name':'undo', 'con':'f0e2'},
            {'name':'repeat', 'con':'f01e'},
            {'name':'envelope', 'con':'f003'},
            {'name':'star', 'con':'f005'},
            {'name':'star-empty', 'con':'f006'},
            {'name':'caret-down', 'con':'f0d7'},
            {'name':'caret-up', 'con':'f0d8'},
            {'name':'caret-right', 'con':'f0da'},
            {'name':'ok', 'con':'f00c'},
            {'name':'double-angle-left', 'con':'f100'},
            {'name':'double-angle-right', 'con':'f101'},
            {'name':'double-angle-up', 'con':'f102'},
            {'name':'double-angle-down', 'con':'f103'},
            {'name':'zoom-in', 'con':'f00e'},
            {'name':'zoom-out', 'con':'f010'},
            {'name':'signout', 'con':'f08b'},
            {'name':'plus-sign-alt', 'con':'f0fe'},
            {'name':'upload', 'con':'f01b'},
            {'name':'ban-circle', 'con':'f05e'},
            {'name':'move', 'con':'f047'},
            {'name':'copy', 'con':'f0c5'},
            {'name':'th', 'con':'f00a'},
            {'name':'folder-close', 'con':'f07b'},
            {'name':'rss', 'con':'f09e'},
            {'name':'desktop', 'con':'f108'},
            {'name':'user', 'con':'f007'},
            {'name':'book', 'con':'f02d'},
            {'name':'comment', 'con':'f075'},
            {'name':'file', 'con':'f15b'},
            {'name':'wrench', 'con':'f0ad'},
            {'name':'group', 'con':'f0c0'},
            {'name':'lightbulb', 'con':'f0eb'},
            {'name':'upload-alt', 'con':'f093'},
            {'name':'download', 'con':'f01a'},
            {'name':'archive', 'con':'f187'}
        ];  
           
        $('[class^="sf-icon-"]').each(function() {
            setCon($(this), 'sf-icon-', sf_icons);
        }); 
        $('[class^="icon-"], [class$=" icon-"]').each(function() {
            setCon($(this), 'icon-', fa_icons);
        }); 
    }
    pseudo_test.remove();
})();
</script>
