$(function(){
    
    $(window).resize(drawFontShadow)
    //$(window).resize()
    
    setTimeout("drawFontShadow()", 500);
})

function drawFontShadow(){
   $('.fontShadowElement').remove();
    
   $('.fontShadow').each(function(){
        $(this).css({
            position: 'relative',
            zIndex: 1000
        })
        
        var p = $(this).offset();

        var element = $('<span class="fontShadowElement"></span>');
        element.css({
            position: 'absolute',
            left: (p.left + 1) +'px',
            top: (p.top + 1) +'px',
            color: '#000000',
            fontSize: $(this).css('fontSize'),
            fontFamily: $(this).css('fontFamily'),
            zIndex: parseInt($(this).css('zIndex'))-1,
            width: '150px'
        })
        
        element.text($(this).text())
        
        $(this).parent().append(element)
        
    })
}
