//----JavaScript Document(是定义编辑、预览、正常浏览模式下共同使用输出)----


//----JavaScript Document(是定义可视化编辑器模式下输出)----
///处理详细模块的高度
$.PluginInfoViewHeight = function (o) {
    $(window).load(function () {
        o.c = $("#" + ); o.t = $("#" + );
         =  ? (true) : 0;
        o.t.h =  ? () : 0;
        (o.t.h <  ?  : o.t.h);
         = (",");  = (",");
        o.d =  - o.t.h;
        (function (cri) {
             = $("#" + cri);
            if ( > 0) {
                (o.d > 0 ? o.d + () : ());
            }
            if (("_proot")<0) {
                 = ("div[data-type]");
                (function () {
                    if ($(this).offset().top - ().top > ().top) {
                        $(this).css("top", $(this).offset().top - ().top + o.d);
                    }
                });
            }
        });
        (function (ari) {
             = $("#" + ari);
            if ( > 0) {
                (o.d > 0 ? o.d + () : ());
            }
        });
    });
}
// 设置为主页 
$.SetHome=function(obj, vrl) {
    try {
         = 'url(#default#homepage)'; (vrl);
    }
    catch (e) {
        if () {
            try {
                ("UniversalXPConnect");
            }
            catch (e) {
                alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [_principal_support]的值设置为'true',双击即可。");
            }
            var prefs = ['@/preferences-service;1'].getService();
            ('', vrl);
        } else {
            alert("您的浏览器不支持,请按照下面步骤操作:1.打开浏览器设置。2.点击设置网页。3.输入:" + vrl + "点击确定。");
        }
    }
}
// 加入收藏 兼容360和IE6 
$.shoucang =function (sTitle, sURL) {
    try {
        (sURL, sTitle);
    }
    catch (e) {
        try {
            (sTitle, sURL, "");
        }
        catch (e) {
            alert("加入收藏失败,请使用Ctrl+D进行添加");
        }
    }
}

///***异步加载点击率
$.AjaxModelClick = function (modelId) {
     = function () {
        $._modelthis = $("div[data-id='" + modelId + "']");
        $.ajaxArray = $._("*[ajaxviewid]");
        $(function (item) {
            $.post("/online_editsite/webjsonhtml_ashx/web_", { modelId: modelId, infoId: $($.ajaxArray[item]).attr("ajaxviewid") }, function (result) {
                $($.ajaxArray[item]).html(result);
            });
        });
    }
}