/* $Rev: 3634 $ */
var originalIframeWidth=parseInt($('#page .flash_preview_box .flashbox iframe').css('width'));
if (originalIframeWidth>980) {
    var previewCenterTag=$('#page .flash_preview_box .flashbox center');
    function alignPreview(windowWidth) {
        if (windowWidth>originalIframeWidth+18) {
            previewCenterTag.css('width','auto');
        } else {
            if (windowWidth>1000) {
                previewCenterTag.css('width',windowWidth-18);
            } else {
                previewCenterTag.css('width','980px');
            }
        }
    }
    alignPreview($(window).width());
    var resizeTimeout=0;
    $(function() {
        $(window).resize(function() {alignPreview($(this).width())});
    });
}


