function magnify()
{
    $(".magnified").click(
        function()
        {
            $(this).css({
                display : 'none'
            });    
        });
    $(".magnified").css({
        display: 'none'
    });
    $(".magnify").click(
        function()
        {
            $(this).siblings(".magnified").each(
                function()
                {
                    var left = (window.innerWidth - 400) / 2;
                    var top = (window.innerHeight - 300) / 2;
                    
                    left = left + 'px';
                    top = top + 'px';
                    $(this).children("img").css({
                        'margin-top' : top
                    });
                    $(this).css({  
                        'background-color' : 'rgba(0, 0, 0, 0.7)',
                        display: 'block',
                        float : 'left',
                        'text-align': 'center',
                        'vertical-align': 'middle',
                        left : '0',
                        top : '0',
//                        left : left,
//                        top : top,
                        position: 'fixed',
//                        width: '400px',
//                        height: '300px'
                        width : window.innerWidth + 'px',
                        height : window.innerHeight + 'px'
                        
                    }); 
                });
            
            /*
            $(this).siblings(".magnified").html("<img src=\""+ ($this) + "\" />");
            */
            return false;
        });
}
