$(function () {
    /* // 2009-03-02 修正
    var $staticFrame = $('#staticFrame').hide();
    if ($.browser.msie) {
        var $static = $('#static');
        var staticSource = $('#staticSource').val();
        $static.load(staticSource, {}, function () {
            var html = $static.html();

            // 一般圖片
            var source = String($frontendVars.baseUrl + '/static/images').replace(/\//g, '\\/');
            var pattern = new RegExp(source, 'g');
            newHtml = html.replace(pattern, $frontendVars.baseUrl + '/pub/static/images');
            // 背景
            var source = String('background=images').replace(/\//g, '\\/'); // IE 會忽略雙引號
            var pattern = new RegExp(source, 'g');
            newHtml = newHtml.replace(pattern, 'background=' + $frontendVars.baseUrl + '/pub/static/images');
            // MM 函數中的圖片
            var pattern = new RegExp('\'images', 'g');
            newHtml = newHtml.replace(pattern, '\'' + $frontendVars.baseUrl + '/pub/static/images');

            $static.html(newHtml);
        });
    } else {
        $staticFrame.show();
        var staticFrame = $staticFrame.get(0);
        $(staticFrame).load(function () {
            setTimeout(function () {
                staticFrame.style.height = staticFrame.contentWindow.document.body.offsetHeight + 'px';
            }, 0);
        });
        var _source = staticFrame.src;
        staticFrame.src = '';
        staticFrame.src = _source;
    }
    */
    
    var $staticFrame = $('#staticFrame').hide();
    $staticFrame.show();
    var staticFrame = $staticFrame.get(0);
    $(staticFrame).load(function () {
        setTimeout(function () {
            if ($.browser.msie) {
                staticFrame.style.height = staticFrame.contentWindow.document.body.scrollHeight + 'px';
            } else {
                staticFrame.style.height = staticFrame.contentWindow.document.body.offsetHeight + 'px';
            }
        }, 0);
    });
    var _source = staticFrame.src;
    staticFrame.src = '';
    staticFrame.src = _source;
});