$(document).ready(function() {
    $('.text').css('font-size', (1*screen.width)/1024+'em');

    width  = (30.75*screen.width)/1280;
    height = (6.75*screen.width)/1280;
    if ($.browser.msie && ($.browser.version == '6.0')) {
        $('#slg > img').load(function() {
           $('#slg > img').attr('class', 'g-png24');
        });
        $('#slg > img').attr('src', '../resources/images/slg.png.php?width='+(width*16)+'&height='+(height*16));
    } else {
        $('#slg > img').attr('src', '../resources/images/slg.png');

        $('#slg > img').css('width', width+'em');
        $('#slg > img').css('height', height+'em');
    }
    
    $('.gl > img').css('width', (11.06*screen.width)/1280+'em');
    $('.gl > img').css('height', (8.19*screen.width)/1280+'em');
    
    $('.fancy_cat > img').css('width', (12.50*screen.width)/1560+'em');
    $('.fancy_cat > img').css('height', (8.75*screen.width)/1560+'em');
    
    $('.fancy_cat_thumb > img').css('width', (10.00*screen.width)/1560+'em');
    $('.fancy_cat_thumb > img').css('height', (6.25*screen.width)/1560+'em');
    
    $('.preview_catalog_link').css('font-size', (1*screen.width)/1280+'em');
    $('.header').css('font-size', (1*screen.width)/1280+'em');
    $('.news_text').css('font-size', (1*screen.width)/1560+'em');
    //$('.caption').css('font-size', (1*screen.width)/1560+'em');

    $('.cover').css({
        width: (12.5*screen.width)/1280+'em',
        height: (8.75*screen.width)/1280+'em'
    });

    var content_box_w = $('.content-box').width()-150;
    
    $('img[src^=/resources/files/fckeditor/]', $('.content-box')).each(function() {
        if (content_box_w < $(this).width()) {
            $(this).css('height', ((content_box_w)*$(this).height())/$(this).width());
            $(this).css('width', content_box_w);
        }
    });

    //$('.cover-label').css('font-size', (1.13*screen.width)/1280+'em');
});


