

$.fn.jshadow = function() {
    var box;
    this.each(function() {

        var jq = $(this)
        if(!jq.children('.jshadow').length) {
            jq.append(['',
                '<div class="jshadow top_left"></div>',
                '<div class="jshadow top_right"></div>',
                '<div class="jshadow bot_left"></div>',
                '<div class="jshadow bot_mid"></div>',
                '<div class="jshadow bot_right"></div>'
            ].join(''))
            jq.css({overflow: 'visible'})
        }
        
        var left = jq.offset().left
        var top = jq.offset().top
        var width = jq.outerWidth()
        var height = jq.outerHeight()
        
        // place left shadow
        $('.jshadow.top_left').css({left: -20, top: 0, height: height}).ifixpng()
        $('.jshadow.top_right').css({right: -20, top: 0, height: height}).ifixpng()        
        $('.jshadow.bot_left').css({left: -20, bottom: -30}).ifixpng()                
        $('.jshadow.bot_right').css({right: -20, bottom: -30}).ifixpng()
        $('.jshadow.bot_mid').css({left: 0, bottom: -30, width: width}).ifixpng()
        
        

    })
    return box;
}

