function getE(a) { var b; return document.getElementById ? b = document.getElementById(a) : document.all ? b = document.all[a] : document.layers && (b = document.layers[a]), b } function OpenWindow(a, b, c, d) { var e = (screen.width - b) / 2, f = (screen.height - c) / 2; winprops = "resizable=0, height=" + c + ",width=" + b + ",top=" + f + ",left=" + e + "w", d && (winprops += ",scrollbars=1"), window.open(a, "_blank", winprops) } function setLocation(a) { window.location.href="a" } function displayAjaxLoading(a) { a ? $(".ajax-loading-block-window").show() : $(".ajax-loading-block-window").hide("slow") } function AddFavorite(a, b) { try { window.external.addFavorite(a, b) } catch (c) { try { window.sidebar.addPanel(b, a, "") } catch (c) { alert("加入收藏失败,请使用Ctrl+D进行添加") } } } function SetHome(a) { document.all ? (document.body.style.behavior = "url(#default#homepage)", document.body.setHomePage(a)) : alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!") } function displayPopupNotification(a, b, c) { var d, e, f, g; if (d = "success" == b ? $("#dialog-notifications-success") : "error" == b ? $("#dialog-notifications-error") : $("#dialog-notifications-success"), e = "", "string" == typeof a) e = "
" + a + "
"; else for (f = 0; f < a.length; f++) e = e + "
" + a[f] + "
"; d.html(e), g = c ? !0 : !1, d.dialog({ modal: g }) } function displayBarNotification(a, b, c) { var d, e, f; if (clearTimeout(barNotificationTimeout), d = "success", "success" == b ? d = "success" : "error" == b && (d = "error"), $("#bar-notification").removeClass("success").removeClass("error"), $("#bar-notification .content").remove(), e = "", "string" == typeof a) e = '
' + a + "
"; else for (f = 0; f < a.length; f++) e = e + '
' + a[f] + "
"; $("#bar-notification").append(e).addClass(d).fadeIn("slow").mouseenter(function () { clearTimeout(barNotificationTimeout) }), $("#bar-notification .close").unbind("click").click(function () { $("#bar-notification").fadeOut("slow") }), c > 0 && (barNotificationTimeout = setTimeout(function () { $("#bar-notification").fadeOut("slow") }, c)) } function DynamicLoad(a) { var b = $(a), c = b.attr("isload"); 1 != c && b.hasClass("lazyload") && (b.attr("isload", 1), b.attr("src", b.attr("src"))) } function ShowMessageInBar(a) { var c = $("#progressbar", window.parent.document); c.html(a), c.show(), setTimeout(hideTheProgressbar, 300) } function hideTheProgressbar() { var a = $("#progressbar", window.parent.document); a.hide() } function htmlEncode(a) { return $("").text(a).html() } function htmlDecode(a) { return $("").html(a).text() } function toHexColor(a, b, c) { var d = "#", e = "0123456789ABCDEF"; return low = a % 16, high = (a - low) / 16, d += e.charAt(high) + e.charAt(low), low = b % 16, high = (b - low) / 16, d += e.charAt(high) + e.charAt(low), low = c % 16, high = (c - low) / 16, d += e.charAt(high) + e.charAt(low) } function addStrToArrayString(a, b) { var e, f, c = b.split(","), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return b; return c.push(a), f = c.join(","), 0 == f.indexOf(",") && (f = f.substring(1)), f } function removeStrFromArrayString(a, b) { var e, f, c = b.split(","), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return c.splice(e, 1), f = c.join(","), 0 == f.indexOf(",") && (f = f.substring(1)), f; return b } function isExsitInSem(a, b) { var e, c = b.split("^&"), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return !0; return !1 } function addStrToArrayStringSem(a, b) { var d, c = b.split("^*"); return c.push(a), d = c.join("^*"), 0 == d.indexOf("^*") && (d = d.substring(2)), d } function removeStrFromArrayStringSem(a, b) { var e, f, c = b.split("^*"), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return c.splice(e, 1), f = c.join("^*"), 0 == f.indexOf("^*") && (f = f.substring(2)), f; return b } function TurnPageSmartView(a, b, c, d, e, f, g, h, i, j) { var l, m, n, o, p, q, k = $("#bakload"); for ("" != k && null != k && void 0 != typeof k && k.show(), l = "true", m = b.split("_")[2], n = "/Plugins/RunTime/TurnPageSmartView?pagenumber=" + d + "&loaddesign=" + l + "&pageId=" + a + "&smartViewId=" + m + "&isDesign=" + c, "undefined" != typeof g && (n = n + "&keyword=" + h + "&searchCategory=" + g), o = f.split(","), p = "isAppend=" + e, "undefined" != i && (p += ""), q = 0; q < o.length - 1; q++) p = str + "&" + o[q] + "=" + $("#" + b + " .yibuFrameContent input[name='" + o[q] + "']").val(); $.ajax({ cache: !1, url: n, data: p, type: "get", success: function (a) { e ? "function" == typeof j ? j(m, $(a)) : ($("#" + b + " .yibuFrameContent .pager.f_clearfix").remove(), $("#" + b + " .yibuFrameContent .w_pager").remove(), $("#" + b + " .yibuFrameContent").append($(a)), $("#" + b + " .yibuFrameContent .pager").not(".f_clearfix").not(":first").remove()) : $("#" + b + " .yibuFrameContent").html(a), "" != k && null != k && "undefined" != typeof k && k.hide() } }) } function TurnNewPageSmartView(a, b, c, d, e, f, g) { var l, i = "true", j = b.split("_")[2], k = "/Plugins/RunTime/TurnPageSmartView?pagenumber=1&loaddesign=" + i + "&pageId=" + a + "&smartViewId=" + j + "&isDesign=" + c; k = k + "&keyword=" + d + "&categoryId=" + f + "&categoryName=" + g, l = "", "undefined" != e && (l += ""), $.ajax({ cache: !1, url: encodeURI(k), data: l, type: "get", success: function (a) { $("#" + b + " .yibuFrameContent").html($(a)) } }) } function TurnPageCategoryListSmartView(a, b, c, d, e, f, g, h, i, j) { var l, m, n, o, p, q, k = $("#bakload"); for ("" != k && null != k && void 0 != typeof k && k.show(), l = "true", m = b.split("_")[2], n = "/Plugins/RunTime/TurnPageSmartView?pagenumber=" + d + "&loaddesign=" + l + "&pageId=" + a + "&smartViewId=" + m + "&isDesign=" + c, "undefined" != typeof h && (n = n + "&EntityTypeName=" + g + "&categoryId=" + h), o = f.split(","), p = "isAppend=" + e, "undefined" != typeof i && (p += ""), q = 0; q < o.length - 1; q++) p = str + "&" + o[q] + "=" + $("#" + b + " .yibuFrameContent input[name='" + o[q] + "']").val(); $.ajax({ cache: !1, url: encodeURI(n), data: p, type: "get", success: function (a) { e ? "function" == typeof j ? j(m, $(a)) : ($("#" + b + " .yibuFrameContent .w_pager").remove(), $("#" + b + " .yibuFrameContent .pager.f_clearfix").remove(), $("#" + b + " .yibuFrameContent").append($(a)), $("#" + b + " .yibuFrameContent .pager").not(".f_clearfix").not(":first").remove()) : $("#" + b + " .yibuFrameContent").html(a), "" != k && null != k && void 0 != typeof k && k.hide() } }) } function PcListPagination(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { if (kino.razor.use("$"), "PageNumber" == c) $("#" + a + " #prePage").click(function () { var c, b = $("#" + a + " #pagerHtml a[class *='activi']"); "1" != b.html() && (c = $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])"), $.each(c, function () { parseInt($(this).html()) == parseInt(b.html()) - 1 && $(this).click() })) }), $("#" + a + " #nextPage").click(function () { var c, b = $("#" + a + " #pagerHtml a[class *='activi']"); b.html() != e.toString() && (c = $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])"), $.each(c, function () { parseInt($(this).html()) == parseInt(b.html()) + 1 && $(this).click() })) }), $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])").click(function () { var q = parseInt($(this).html()), r = $(this).html(); e > 5 && (4 > q ? ($("#" + a + " #firstdom").hide(), $("#" + a + " #lasedom").show(), $("#" + a + " #secondPage").html(2), $("#" + a + " #thirdPage").html(3), $("#" + a + " #forthPage").html(4)) : q > e - 3 ? ($("#" + a + " #firstdom").show(), $("#" + a + " #lasedom").hide(), $("#" + a + " #secondPage").html(e - 3), $("#" + a + " #thirdPage").html(e - 2), $("#" + a + " #forthPage").html(e - 1)) : ($("#" + a + " #firstdom").show(), $("#" + a + " #lasedom").show(), $("#" + a + " #secondPage").html(q - 1), $("#" + a + " #thirdPage").html(q), $("#" + a + " #forthPage").html(q + 1))), $("#" + a + " #pagerHtml").find("a").removeClass("activi"), $.each($("#" + a + " #pagerHtml").find("a"), function () { $(this).html() == r && $(this).addClass("activi") }), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p) }); else if ("NextPreview" == c) $("#" + a + " #prePage").click(function () { var q = parseInt($("#" + a + " #firstNum").html()); 1 != q && (q -= 1, $("#" + a + " #firstNum").html(q), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p)) }), $("#" + a + " #nextPage").click(function () { var q = parseInt($("#" + a + " #firstNum").html()); q != e && (q += 1, $("#" + a + " #firstNum").html(q), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p)) }), $("#" + a + " #goPage").click(function () { var q = $("#" + a + " #turnPage").val(), r = parseInt(q); !isNaN(r) && e >= r && r >= 1 && ($("#" + a + " #firstNum").html(r), AssembleData(a, b, c, d, r, e, f, g, h, i, j, k, l, m, n, o, p), $("#" + a + " #turnPage").val("")) }); else if ("MoreButton" == c) { var q = 1; $("#" + a + " #searchMore").click(function () { q++, q == e && $(this).parent().hide(), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p) }) } } function AssembleData(htmlId, listType, pagerStyle, pageSize, pageIndex, totalPage, categoryIds, entityIds, dateStyle, orderByField, orderByType, isCategoryList, postData, searchKeyWord, showImage, showPrice, callBack) { var param = { listType: listType, pageIndex: pageIndex - 1, pageSize: pageSize, showImgUrl: showImage, categoryIds: categoryIds, isCategoryList: isCategoryList, postData: postData, searchKeyWord: searchKeyWord, entityIds: entityIds, dateStyle: dateStyle, orderByField: orderByField, orderByType: orderByType }; $.post("/Plugins/ListDataCommon/GetListItems", param, function (data) { var preAddHetght, func; "PageNumber" == pagerStyle || "NextPreview" == pagerStyle ? ($("#ulList_" + htmlId + " li").remove(), $.each(data.Items, function (a, b) { $("#ulList_" + htmlId).append(kino.razor($("#listTemplate_" + htmlId).html(), { data: b })) })) : "MoreButton" == pagerStyle && (preAddHetght = $("#" + htmlId + " .yibuFrameContent").height(), $.each(data.Items, function (a, b) { $("#ulList_" + htmlId).append(kino.razor($("#listTemplate_" + htmlId).html(), { data: b })) }), ReComputeVisibleSmartViewTop()), isExitsFunction(callBack) && (func = eval(callBack), func()) }, "json") } function isExitsFunction(funcName) { try { if ("function" == typeof eval(funcName)) return !0 } catch (e) { } return !1 } function createBaiduMap(a, b) { var c, d, e, f, g, h, i, j, k, l, m, n; try { c = { offset: new BMap.Size(10, 5) }, d = new BMap.Map(a.id), e = new BMap.Point(116.404, 39.915), d.centerAndZoom(e, 15), a.ShowNavigation && d.addControl(new BMap.NavigationControl), a.ShowScale && d.addControl(new BMap.ScaleControl(c)), a.ShowMapType && d.addControl(new BMap.MapTypeControl), d.enableScrollWheelZoom(), h = '
' + a.content + "
", i = null, j = {}, j.title = a.title, j.width = 100, j.height = 105, j.panel = "panel", j.enableAutoPan = !0, k = [], a.ShowSearch && k.push(BMAPLIB_TAB_SEARCH), a.ShowToHere && k.push(BMAPLIB_TAB_TO_HERE), a.ShowFromHere && k.push(BMAPLIB_TAB_FROM_HERE), j.searchTypes = k, i = new BMapLib.SearchInfoWindow(d, h, j), l = new BMap.Geocoder, l.getPoint(a.address, function (b) { if (b && (g = b, d.centerAndZoom(b, 16), m = new BMap.Marker(b), d.addOverlay(m), a.ShowWindow && i.open(m), m.addEventListener("click", function () { i.open(m) }), void 0 != f)) { var c = new BMap.DrivingRoute(d, { renderOptions: { map: d, autoViewport: !0 } }); c.search(f, g) } }, ""), d.addEventListener("tilesloaded", function () { jQuery(".anchorBL").hide(); var a = jQuery(".BMap_cpyCtrl"); a.hide(), jQuery(".BMap_scaleCtrl").show() }), n = new BMap.Geolocation, n.getCurrentPosition(function (a) { var b, c; this.getStatus() == BMAP_STATUS_SUCCESS && (b = new BMap.Marker(a.point), d.addOverlay(b), d.panTo(a.point), f = a.point, void 0 != g && (c = new BMap.DrivingRoute(d, { renderOptions: { map: d, autoViewport: !0 } }), c.search(a.point, g))) }, { enableHighAccuracy: !0 }) } catch (o) { 0 == b && createBaiduMap(a, 1) } } function ShowCommonImageDialog(a, b) { var c = "/Plugins/Image/AddPicListPanel", d = [{ text: "确定", click: function () { $.ajax({ type: "post", url: "/Plugins/Image/ReturnImageJson", data: { ids: $("#hfImgId").val() }, dataType: "json", success: function (a) { b(a) } }), $(this).ajaxdialog("close") } }, { text: "取消", click: function () { $(this).ajaxdialog("close") } }], e = function (a, b) { b.htmlElement.html(b.httpData) }; ShowTopDialog(c, "选择图片", 600, 480, d, e) } function DisplayLang() { 0 == $("#wapPreview").length && 0 == $("#langyY").length && $.ajax({ cache: !1, url: "/Plugins/LanSwitchSmartView/QueryLang", type: "post", success: function (a) { var b, c, d, e; if ("" != a) for (b = "
", c = a.split("|"), d = 0; d < c.length; d++) "" != c[d] && (e = c[d].split(","), "CN" == e[0] ? b += "
切换至中文版本
" : "English" == e[0] && (b += "
切换至英文版本
")) } }) } function OnReviewsSubmit() { $.ajax({ cache: !1, url: "/Plugins/ProductInfoSmartView/AddProductReview", data: { ReviewTitle: $("#reviewtitle").val(), ReviewContent: $("#reviewcontent").val() }, type: "post", success: function (a) { }, error: function (a) { alert(a) } }) } function setRenderFullScreen(a, b) { var e, f, g, h, i, j, k, n, c = a.css("position"), d = a.parent().offset().left - $("body").offset().left; d += a.position().left, e = a.height(), f = $(window).width(), "window" != b ? ("auto" == b && f > window.screen.width && (f = window.screen.width), g = $(document).width(), g > f && (f = g)) : f = window.screen.width, h = f, i = parseInt(a.children("div").find(".renderfullScreen").css("border-right-width"), 10), j = parseInt(a.children("div").find(".renderfullScreen").css("border-left-width"), 10), isNaN(i) || isNaN(j) || (f = f - i - j), f > h && (f = h), "fixed" === c ? (d = a.position().left, k = parseInt(a.css("margin-left")), 0 != k && (d = k), a.css("top"), a.css("bottom"), n = "auto", a.children().css("overflow", "visible").children("div:eq(0)").css({ left: -d + "px", width: f, height: e, top: "0", bottom: "0", margin: n, position: "absolute" })) : a.children().css("overflow", "visible").children("div:eq(0)").css({ left: -d + "px", width: f, height: e }) } function setRenderMobileFullScreen(a) { var c, d, e; a.css("position"), c = a.height(), d = $(window).width(), e = 0, e = $(document).width(), a.css("left", "0px"), e > d && (d = e), a.children().css("overflow", "visible").children("div:eq(0)").css({ width: d, height: c }) } function SetNavSelectedStyle(a, b) { var c = decodeURI(window.location.pathname) + window.location.search; $("#" + a).children("li").each(function () { var a = $(this).find("a").attr("href"); return null != a && (a = a.replace(" ", "%20"), a.toLowerCase() == c.toLowerCase()) ? ("nav" == b ? $(this).addClass("w_nav_item_current") : $(this).addClass("w_vnav_item_current"), void 0) : ($(this).children("ul").length > 0 && $(this).children("ul").children("li").each(function () { return a = $(this).find("a").attr("href"), null != a && (a = a.replace(" ", "%20"), a.toLowerCase() == c.toLowerCase()) ? ("nav" == b ? $(this).addClass("w_subnav_item_current") : $(this).addClass("w_subvnav_item_current"), void 0) : void 0 }), void 0) }) } function GetAbsoluteLocationEx(a) { var b, c, d, e, f; if (1 != arguments.length || null == a) return null; for (b = a, c = b.offsetTop, d = b.offsetLeft, e = b.offsetWidth, f = b.offsetHeight; (b = b.offsetParent) && "absolute" != b.style.position && "relative" != b.style.position && ("visible" == b.style.overflow || "" == b.style.overflow) ;) c += b.offsetTop, d += b.offsetLeft; return { absoluteTop: c, absoluteLeft: d, offsetWidth: e, offsetHeight: f } } function BindOnePropertyToSmartView(a, b, c, d, e, f, g) { var h = YibuPropertyBinder.createNew(a, b, c, d, e, f, g); _eventBoundArray.push(h) } function BindOneEventFuncToSmartVeiw(a, b, c) { var d = YibuEventBinder.createNew(a, b, c); _eventBoundArray.push(d) } function BindAllEventsToSmartView(a) { var c, d, b = _eventBoundArray.length; for (c = 0; b > c; c++) d = _eventBoundArray[c], null != d.targetSelector && "undefined" != d.targetSelector ? d.srcElement.bind(d.eventKey, { bd: d }, function (b) { var c = b.data.bd, d = $("#" + a + " " + c.targetSelector, $("#mainFrame")[0].contentWindow.document), e = "", f = $(this); switch (c.srcProType) { case "attr": e = f.attr(c.srcProName); break; case "css": e = f.css(c.srcProName); break; case "val": e = f.val(); break; case "html": e = f.html() } switch (c.targetProType) { case "attr": d.attr(c.targetProName, e); break; case "css": d.css(c.targetProName, e); break; case "html": d.html(e); break; case "val": d.val(e) } }) : d.srcElement.bind(d.eventKey, { bd: d }, function (a) { a.data.bd.eventFunc(a.data.bd.srcElement) }) } function GetCurrentStrWidth(a, b) { var d, c = $("").hide().appendTo(document.body); return $(c).html(a).css("font-size", b), d = c.width(), c.remove(), d } function slideMenu(a) { jQuery("#" + a).slide({ type: "menu", titCell: ".w_nav_item", targetCell: ".w_subnav", effect: "slideDown", delayTime: 300, triggerTime: 0, returnDefault: !0 }) } function ChangeImage(a) { var b = $("#autosize_" + a + " img"), c = $("#autosize_" + a), d = $(c).parent().width(), e = $(c).parent().height(); $(b).css({ "max-width": d, "max-height": e, _width: d, "vertical-align": "middle" }), $(c).css({ "line-height": e + "px" }) } function IsPositionBehind(a, b) { var d, e, c = a.css("min-height"); return c = _.isUndefined(c) || 0 == c ? a.height() : parseInt(c.substring(0, c.length - 2)), a.offset() && (d = parseInt(a.offset().top) + c, e = parseInt(a.offset().left) + parseInt(a.width())), parseInt(b.offset().top) >= d && parseInt(b.offset().left + b.width()) > parseInt(a.offset().left) && parseInt(b.offset().left) < e ? !0 : !1 } function IsInContainerBehind(a, b) { var d, e, f, c = a.css("min-height"); return c = _.isUndefined(c) || 0 == c ? a.height() : parseInt(c.substring(0, c.length - 2)), d = a.attr("oheight"), "undefined" == typeof d || isNaN(d) || (c = parseInt(d, 10)), a.offset() && (e = parseInt(a.offset().top) + c, f = parseInt(a.offset().left) + parseInt(a.width())), parseInt(b.offset().top) >= e && parseInt(b.offset().left + b.width()) > parseInt(a.offset().left) && parseInt(b.offset().left) < f ? !0 : !1 } function RefreshAutoExpandHeight(a, b) { var c, d, e, f, g, h, i, j, k, l, m; b > 0 && (c = $(a).parentsUntil(".yibuFrameContent"), c.length > 0 ? (d = c.last().parent().parent(), "visible" == d.css("overflow") && "0px" != d.css("min-height") ? (e = d.height(), f = d.attr("oheight"), "undefined" == typeof f ? (f = e, d.attr("oheight", f)) : f = parseInt(f, 10), g = f + b, h = d.attr("cheight"), h = "undefined" != typeof h ? parseInt(h, 10) : 0, g > h && (c.each(function (a, b) { $(b).height(g) }), d.height(g), d.css({ "min-height": g + "px" }), d.attr("cheight", g), i = d.attr("expandH"), i = "undefined" == typeof i ? 0 : parseInt(i, 10), b > i && d.attr("expandH", b)), a.css({ "min-height": g + "px" }), a.attr("expandH", b)) : (e = d.height(), f = d.attr("oheight"), "undefined" == typeof f ? (f = e, d.attr("oheight", f)) : f = parseInt(f, 10), h = d.attr("cheight"), h = "undefined" != typeof h ? parseInt(h, 10) : 0, g = f + b, g > h && (c.each(function (a, c) { $(c).height(b) }), d.height(g), d.css({ "min-height": g + "px" }), d.attr("cheight", g), d.attr("expandH", b), j = d.attr("id"), k = j.split("_"), 4 == k.length && (l = k[1], ("banner" === l || "v2banner" === l) && $("#fullScreen_" + j).height(f + b))), a.css({ "min-height": g + "px" }), a.attr("expandH", b))) : $(a).parent().hasClass("yibuFrameContent") && (d = $(a).parent().parent(), m = $(a).parent(), e = d.height(), f = d.attr("oheight"), "undefined" == typeof f ? (f = e, d.attr("oheight", f)) : f = parseInt(f, 10), i = d.attr("expandH"), i = "undefined" == typeof i ? 0 : parseInt(i, 10), b > i && d.attr("expandH", b), d.height(f + b), m.height(f + b), j = d.attr("id"), k = j.split("_"), 4 == k.length && (l = k[1], ("banner" === l || "v2banner" === l) && (a.height(f + b), $("#fullScreen_" + j).height(f + b))))) } function parsePxToInt(a) { return parseInt(a.substring(0, a.length - 2)) } function ReComputeVisibleSmartViewTop(a) { var b = new ReComputeVisibleSmartView(a); b.recomputeTopV1() } function ReComputeVisibleSmartView(a) { this.callback = a } function ReComputMobileTop(a, b, c) { var e, f, g, h, i, j, k, d = a.parents(".page_header"); d.length > 0 ? (e = $(".page_header"), f = $(".page_main"), g = e.find("div[class^='yibuSmartViewMargin absPos']"), h = f.find("div[class^='yibuSmartViewMargin absPos']"), i = e.height(), g.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = $(this).attr("oldbottom"), g = parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) }), h.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")) + i; e > b && (f = $(this).attr("oldbottom"), g = parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) })) : (j = $(".page_header").length > 0 ? $(".page_main") : $(".mainSamrtView"), k = j.find("div[class^='yibuSmartViewMargin absPos']"), k.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = $(this).attr("oldbottom"), g = "0px" == $(this).css("min-height") ? parseFloat(f) - parseFloat($(this).css("height").replace("px", "")) + 2 : parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) })) } function Pagination(a, b, c, d, e, f) { var l, m, n, o, p, q, r, s, t, u, v, w, g = a, h = 5, i = 0, j = 0, k = $("#" + g); if (null != k.html()) { if (l = k.find("div").html().split("_ueditor_page_break_tag_"), m = l.length, 1 != m) { for (n = $("", { "class": "pagination" }), k.append(n), m > h && (n.append("" + (null == b || void 0 == b ? "首页" : b) + ""), n.append("" + (null == d || void 0 == d ? "上一页" : d) + "")), o = 0; m > o; o++) n.append("" + (o + 1) + ""); p = k.find(".page"), p.first().addClass("hover"), k.find(".page:gt(" + (h - 1) + ")").hide(), p.click(function () { var b, a = parseInt($(this).attr("id")); h > m ? (p.removeClass("hover"), k.find("div:eq(0)").html(l[a]), $(this).addClass("hover")) : m >= h && a > Math.floor(h / 2) ? (p.removeClass("hover"), k.find("div:eq(0)").html(l[a]), $(this).addClass("hover"), 0 === h % 2 ? (i = a - h / 2 + 1, j = a + h / 2) : (i = a - Math.floor(h / 2), j = a + Math.floor(h / 2)), i > m - h ? (k.find(".page:gt(" + (m - h) + ")").show(), k.find(".page:lt(" + (m - h) + ")").hide()) : (k.find(".page:lt(" + i + ")").hide(), k.find(".page:gt(" + j + ")").hide(), p.slice(i, j + 1).show())) : m >= h && a <= Math.floor(h / 2) && (p.removeClass("hover"), k.find("div:eq(0)").html(l[a]), $(this).addClass("hover"), k.find(".page:gt(" + (h - 1) + ")").hide(), k.find(".page:lt(" + h + ")").show()), m > h && (b = parseInt(k.find(".hover").attr("id")) + 1, $("#current_page_" + g).text(b + "/" + m)), "function" == typeof f && f() }), m > h && (q = parseInt(k.find(".hover").attr("id")) + 1, n.append("" + q + "/" + m + ""), n.append("" + (null == e || void 0 == e ? "下一页" : e) + ""), n.append("" + (null == c || void 0 == c ? "尾页" : c) + "")), r = $("#pre_page_" + g), s = $("#post_page_" + g), t = $("#first_page_" + g), u = $("#last_page_" + g), v = $("#to_page_" + g), w = $("#go_page_" + g), r.click(function () { var a = $(this).parent().find(".hover"); "0" !== a.attr("id") && (p.removeClass("hover"), a.prev().addClass("hover"), a.prev().click()), ReComputeVisibleSmartViewTop() }), s.click(function () { var a = $(this).parent().find(".hover").next(); a.attr("id") < $(this).parent().children("a").length && (p.removeClass("hover"), a.addClass("hover"), a.click()), ReComputeVisibleSmartViewTop() }), t.click(function () { p.removeClass("hover"), p.first().addClass("hover"); var a = p.first(); a.click() }), u.click(function () { p.removeClass("hover"), p.last().addClass("hover"); var a = p.last(); a.click() }), w.click(function () { var d, a = v.val(), b = /^[0-9]*[1-9][0-9]*$/, c = b.test(a); return parseInt(a) > m || !c ? (alert("无第【" + a + "】页,请重新键入"), void 0) : (p.removeClass("hover"), k.find(".page:eq(" + (a - 1) + ")").addClass("hover"), d = $(this).parent().find(".hover"), d.click(), void 0) }) } k.find("div:eq(0)").html(l[0]) } } function ListPagination() { } function BindHoldPlace(a, b) { var c = $(a); c.val(b), c.css("color", "rgb(171, 169, 177)"), c.focusin(function () { $(this).val() == b ? ($(this).css("color", "rgb(171, 169, 177)"), $(this).val("")) : $(this).css("color", "#000000") }), c.focusout(function () { "" == $(this).val() || $(this).val() == b ? ($(this).css("color", "rgb(171, 169, 177)"), $(this).val(b)) : $(this).css("color", "#000000") }), c.keyup(function () { "" == $(this).val() ? ($(this).css("color", "rgb(171, 169, 177)"), $(this).val(b)) : $(this).css("color", "#000000") }) } function GetStateProvince(a, b) { $.ajax({ cache: !1, url: "/Customer/GetStateProvinces", type: "get", dataType: "json", success: function (c) { null != c && $.each(c, function (c, d) { d["Id"] == a ? b.append("") : b.append("") }) }, error: function () { } }) } function GetCity(a, b, c) { $.ajax({ cache: !1, url: "/Customer/GetCitysByStateProvince", data: { stateProvinceId: a }, type: "get", dataType: "json", success: function (a) { null != a && $.each(a, function (a, d) { d["Id"] == b ? c.append("") : c.append("") }) }, error: function () { } }) } function GetRequest() { var c, d, a = location.search, b = new Object; if (-1 != a.indexOf("?")) for (c = a.substr(1), strs = c.split("&"), d = 0; d < strs.length; d++) b[strs[d].split("=")[0]] = unescape(strs[d].split("=")[1]); return b } function getQueryString(a) { var b = new RegExp("(^|&)" + a + "=([^&]*)(&|$)", "i"), c = window.location.search.substr(1).match(b); return null != c ? unescape(c[2]) : null } function SetCategorySelectedStyle(a) { var b = getQueryString("categoryId"); $("#" + a + " .for_search").each(function () { var a = $(this).attr("data-cid"); return b == a ? ($(this).addClass("category_select"), void 0) : void 0 }) } function SetCategorySelectedById(a, b) { $("#" + a + " .for_search").each(function () { var a = $(this).attr("data-cid"); return b == a ? ($(this).addClass("category_select"), void 0) : ($(this).removeClass("category_select"), void 0) }) } function GetOrigin() { return window.location.origin || (window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "")), window.location.origin } function ReComputTop(a, b, c) { var e, f, g, h, i, j, k, d = a.parents(".page_header"); d.length > 0 ? (e = $(".page_header"), f = $(".page_main"), g = e.find("div[class^='yibuSmartViewMargin absPos']"), h = f.find("div[class^='yibuSmartViewMargin absPos']"), i = e.height(), g.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = $(this).attr("oldbottom"), g = parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) }), h.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")) + i; e > b && (f = $(this).attr("oldbottom"), g = parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) })) : (j = $(".page_header").length > 1 ? $(".page_main") : $(".mainSamrtView"), k = j.find("div[class^='yibuSmartViewMargin absPos']"), k.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = $(this).attr("oldbottom"), g = parseFloat(f) - parseFloat($(this).css("min-height").replace("px", "")) + 2, h = g + c, $(this).css("top", h + "px")) })) } function ReComputTopForPc(a, b, c) { var e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, d = a.parents(".page_header"); if (d.length > 0) { if (e = $(".page_header"), f = $(".page_main"), g = e.find("div[class^='yibuSmartViewMargin absPos']"), h = f.find("div[class^='yibuSmartViewMargin absPos']"), i = e.height(), j = !1, g.each(function () { var f = parseFloat($(this).css("top").replace("px", "")); c > 0 ? f > b && b + c > f && (j = !0, a.attr("hasExpandView", "true")) : "true" == a.attr("hasExpandView") && (j = !0, a.attr("hasExpandView", "false")) }), !j) return; g.each(function () { var f, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = e + c, $(this).css("top", f + "px")) }), h.each(function () { var f, e = parseFloat($(this).css("top").replace("px", "")) + i; e > b && (f = e + c, $(this).css("top", f + "px")) }) } else { if (k = $(".page_header").length > 0 ? $(".page_main") : $(".mainSamrtView"), m = !1, n = !1, o = a.parents("div[id ^='view_banner_']"), o.length > 0 ? (l = o.find("div[class *='yibuSmartViewMargin absPos']"), p = parseInt(o.css("top").replace("px", "")), q = o.find(".flowsmartView"), r = q.height(), ReComputTopForPc(o, r + p, c)) : l = k.find("div[class *='yibuSmartViewMargin absPos']"), j = !1, l.each(function () { var e = parseFloat($(this).css("top").replace("px", "")); c > 0 ? e > b - 8 && b + c >= e && (j = !0, $(this).attr("needoffset", "true")) : j = !0 }), !j) return; l.each(function () { var f, g, h, e = parseFloat($(this).css("top").replace("px", "")); e > b - 8 && (void 0 == $(this).attr("old-top") ? "true" == $(this).attr("needoffset") && ($(this).attr("old-top", e), $(this).css("top", e + c + "px"), o.length > 0 && !m && (m = !0, f = o.find(".flowsmartView"), g = f.height(), f.css("height", g + c + "px"), h = f.siblings(".renderfullScreen"), h.length > 0 && h.css("height", g + c + "px"))) : ($(this).attr("old-top"), e = parseInt($(this).css("top").replace("px", "")), $(this).css("top", e + c + "px"), o.length > 0 && !n && (n = !0, f = o.find(".flowsmartView"), g = f.height(), f.css("height", g + c + "px"), h = f.siblings(".renderfullScreen"), h.length > 0 && h.css("height", g + c + "px")))) }), $(".page_footer").length > 0 && (c > 0 || 0 > c && 0 == o.length) && (s = k.find(".mainSamrtView "), s.css("height", s.height() + c + "px")) } } function ReComputTopForPcCommon(a, b, c) { var e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, d = a.parents(".page_header"); if (d.length > 0) { if (e = $(".page_header"), f = $(".page_main"), g = e.find("div[class^='yibuSmartViewMargin absPos']"), h = f.find("div[class^='yibuSmartViewMargin absPos']"), i = e.height(), j = !1, g.each(function () { var f = parseFloat($(this).css("top").replace("px", "")); c > 0 ? f > b && b + c > f && (j = !0, a.attr("hasExpandView", "true")) : "true" == a.attr("hasExpandView") && (j = !0, a.attr("hasExpandView", "false")) }), !j) return; g.each(function () { var f, e = parseFloat($(this).css("top").replace("px", "")); e > b && (f = e + c, $(this).css("top", f + "px")) }), h.each(function () { var f, e = parseFloat($(this).css("top").replace("px", "")) + i; e > b && (f = e + c, $(this).css("top", f + "px")) }) } else { if (k = $(".page_header").length > 0 ? $(".page_main") : $(".mainSamrtView"), l = a.parents("div[id ^='view_banner_']"), l.length > 0) { if (m = parseInt(l.css("top").replace("px", "")), n = l.find(".flowsmartView"), o = n.height(), c >= 0 && b + c > l.height()) return void 0 == n.attr("old-height") && n.attr("old-height", o), n.css("height", o + c + "px"), p = n.siblings(".renderfullScreen"), p.length > 0 && p.css("height", o + c + "px"), ReComputTopForPc(l, o + m, c), void 0; if (q = n.attr("old-height"), 0 > c && void 0 != q && o + c >= q) return n.css("height", o + c + "px"), p = n.siblings(".renderfullScreen"), p.length > 0 && p.css("height", o + c + "px"), ReComputTopForPc(l, o + m, c), void 0 } if (r = k.find("div[class *='yibuSmartViewMargin absPos']"), j = !1, s = !1, t = !1, r.each(function () { var f, e = parseFloat($(this).css("top").replace("px", "")); c > 0 ? e > b - 5 && b + c + 5 > e && (j = !0) : void 0 != $(this).attr("old-top") && (f = $(this).attr("old-top"), e = parseInt($(this).css("top").replace("px", "")), e + c >= f && (j = !0)) }), !j) return; r.each(function () { var f, g, h, i, e = parseFloat($(this).css("top").replace("px", "")); e > b - 5 && (void 0 == $(this).attr("old-top") ? ($(this).attr("old-top", e), $(this).css("top", e + c + "px"), l.length > 0 && !s && (s = !0, f = l.find(".flowsmartView"), g = f.height(), f.css("height", g + c + "px"), h = f.siblings(".renderfullScreen"), h.length > 0 && h.css("height", g + c + "px"))) : (i = $(this).attr("old-top"), e = parseInt($(this).css("top").replace("px", "")), e + c >= i && ($(this).css("top", e + c + "px"), l.length > 0 && !t && (t = !0, f = l.find(".flowsmartView"), g = f.height(), f.css("height", g + c + "px"), h = f.siblings(".renderfullScreen"), h.length > 0 && h.css("height", g + c + "px"))))) }), $(".page_footer").length > 0 && (u = k.find(".mainSamrtView "), u.css("height", u.height() + c + "px")) } } function refreshStaticData() { var b, c, d, e, f, a = $(".yibuFrameContent div[class^='yibuSmartViewMargin absPos'] .AR"); if (0 != a.length) { for (b = "", c = [], d = {}, a.each(function () { var a = $(this).attr("data-dt"); b = addStrToArrayString(a, b) }), c = b.split(","), e = 0; e < c.length; e++) f = "", a.each(function () { var a = $(this).attr("data-dt"); a == c[e] && (f = addStrToArrayString($(this).attr("data-key"), f)) }), d["postDatas[" + e + "].DataType"] = c[e], d["postDatas[" + e + "].DataKey"] = f; $.ajax({ url: "/getIdHitDic", data: d, dataType: "json", type: "POST", success: function (b) { a.each(function () { var e, f, g, a = $(this), c = $(this).attr("data-dt"), d = $(this).attr("data-key"); for (e = 0; e < b.length; e++) if (f = b[e].DataType, c == f) for (g = b[e].ListIdHits, j = 0; j < g.length; j++) d == g[j].Id && a.html(g[j].Hit) }) } }) } } function resetbtn(a) { var b, c, d; 0 != a.length && (b = a.find("div").css("white-space", "nowrap"), c = a.width() - (b.outerWidth(!0) - b.width()), d = a.height() - (b.outerHeight(!0) - b.height()), b.width(c).height(d).css("white-space", ""), b.find("a").width(c).height(d).css("line-height", d + "px")) } var barNotificationTimeout, _phct, _eventBoundArray, YibuPropertyBinder, YibuEventBinder, AjaxLoginCheck; !function () { var a = {}; this.tmpl = function b(c, d) { var e = /\W/.test(c) ? new Function("obj", "var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('" + c.replace(/[\r\t\n]/g, " ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g, "$1\r").replace(/\t=(.*?)%>/g, "',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'") + "');}return p.join('');") : a[c] = a[c] || b(document.getElementById(c).innerHTML); return d ? e(d) : e } }(), $(document).on("focusin", function (a) { null != a && $(a.target).find(".mce-window").length && a.stopImmediatePropagation() }); try {
!function (a) {
var c; a.widget("ui.ajaxdialog", a.ui.dialog, {
version: "1.10.3", options: { ajaxurl: "", httpType: "Get", data: null, processData: null }, open: function () {
this._super(), c = this, "" != this.options.ajaxurl && (this.element.html("
loading...
"), null != this.options.data ? a.ajax({ cache: !1, url: this.options.ajaxurl, type: this.options.httpType, data: this.options.data, success: this._processHtml, error: this.ajaxFailure }) : a.ajax({ cache: !1, url: this.options.ajaxurl, type: this.options.httpType, success: this._processHtml, error: this.ajaxFailure }))
}, _processHtml: function (b) { c._trigger("processData", a, { htmlElement: c.element, httpData: b }) }, ajaxFailure: function () { this.element.html("loading Error!") }, _makeDraggable: function () { function d(a) { return { position: a.position, offset: a.offset } } var b = this, c = this.options; this.uiDialog.draggable({ cancel: " .ui-dialog-titlebar-close", handle: ".contentDragHandler,.ui-dialog-titlebar", containment: "document", start: function (c, e) { a(this).addClass("ui-dialog-dragging"), b._blockFrames(), b._trigger("dragStart", c, d(e)) }, drag: function (a, c) { b._trigger("drag", a, d(c)) }, stop: function (e, f) { c.position = [f.position.left - b.document.scrollLeft(), f.position.top - b.document.scrollTop()], a(this).removeClass("ui-dialog-dragging"), b._unblockFrames(), b._trigger("dragStop", e, d(f)) } }) }
})
}(jQuery)
} catch (e) { } try { !function (a) { a.widget("ui.boxsable", a.ui.mouse, { version: "1.10.3", widgetEventPrefix: "boxs", options: { appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch", disabled: !1, draging: null, start: null, stop: null }, _create: function () { that = this, this.element.addClass("ui-boxable"), this.dragged = !1, this._mouseInit(), this.helper = a(".ui-selectable-helper").length > 0 ? a(".ui-selectable-helper") : a("") }, _destroy: function () { this.element.removeClass("ui-boxable ui-selectable-disabled"), this._mouseDestroy() }, _mouseStart: function (b) { var d = this.options; this.helper.html(""), this.opos = [b.pageX, b.pageY], this.options.disabled || (this._trigger("start", b), a(d.appendTo).append(this.helper), this.helper.css({ left: b.pageX, top: b.pageY, width: 0, height: 0, zIndex: 99999 })) }, _mouseDrag: function (a) { if (this.dragged = !0, !this.options.disabled) { this._propagate("draging", a); var b, e = (this.options, this.opos[0]), f = this.opos[1], g = a.pageX, h = a.pageY; return e > g && (b = g, g = e, e = b), f > h && (b = h, h = f, f = b), this.helper.css({ left: e, top: f, width: g - e, height: h - f }), this._trigger("draging", a, this.ui()), !1 } }, _mouseStop: function (a) { return this.options.disabled ? void 0 : (this.dragged = !1, this._trigger("stop", a, this.ui()), this.options.disabled = !0, !1) }, _propagate: function (b, c) { a.ui.plugin.call(this, b, [c, this.ui()]), "dragging" !== b && this._trigger(b, c, this.ui()) }, plugins: {}, ui: function () { return { element: this.element, helper: this.helper } } }) }(jQuery) } catch (e) { } _phct = !0, $(function () { $("#Pcolor0 li").click(function () { $("#Pcolor0 li").removeClass("selected"), $(this).addClass("selected") }), $("#Pcolor1 li").click(function () { $("#Pcolor1 li").removeClass("selected"), $(this).addClass("selected") }), $("#Pcolor2 li").click(function () { $("#Pcolor2 li").removeClass("selected"), $(this).addClass("selected") }), $("#Pcolor3 li").click(function () { $("#Pcolor3 li").removeClass("selected"), $(this).addClass("selected") }), $("#Pcolor4 li").click(function () { $("#Pcolor4 li").removeClass("selected"), $(this).addClass("selected") }), $("#ptabs #t1_1").click(function () { $("#ptabs li").removeClass("current"), $(this).addClass("current"), $("#d1_1").css("display", "block"), $("#d1_2").css("display", "none") }), $("#ptabs #t1_2").click(function () { $("#ptabs li").removeClass("current"), $(this).addClass("current"), $("#d1_2").css("display", "block"), $("#d1_1").css("display", "none") }), $("#pshare").click(function () { 77 == $(".p_share_bd ul").width() ? ($(".p_share_bd ul").removeClass("p_share_list_items"), $("#pshare").addClass("p_share_fts")) : ($(".p_share_bd ul").addClass("p_share_list_items"), $("#pshare").removeClass("p_share_fts")) }), $(".u_nav_item").mouseenter(function () { var c, d, e, f, g, h, b = $(this).children(".u_nav_submain"); $("#tempSubMenuId").remove(), b.length > 0 && (c = GetAbsoluteLocationEx($(this)[0]), d = $(this).attr("class"), e = $(this).parent().attr("class"), f = $(this).parent().parent().attr("class"), g = b.clone(), h = $("
").appendTo($("body")), g.appendTo(h.find("div>div")), h.css({ top: parseInt(c.absoluteTop) + ("u_nav_main_vleft" == e || "u_nav_main_vright" == e ? 0 : parseInt($(this).height())) + "px", left: c.absoluteLeft - ("u_nav_main_vright" == e ? 2 * parseInt(c.offsetWidth) : 0) + "px", position: "absolute", "min-width": $(this).width(), height: "auto", "z-index": 99999 }), h.attr("id", "tempSubMenuId"), g.css("width", "100%"), g.css("display", "block"), h.show()) }), $(document).on("click", function () { $("#tempSubMenuId").remove() }) }), $(window).resize(function () { $(".renderfullScreen").each(function () { var a = $(this).parentsUntil(".yibuSmartViewMargin").parent(); setRenderFullScreen(a, "auto") }), $(".rendermobilefullScreen").each(function () { var a = $(this).parentsUntil(".yibuSmartViewMargin").parent(); setRenderMobileFullScreen(a) }) }), Array.prototype.indexOf = function (a) { for (var b = 0, c = this.length; c > b; b++)if (this[b] === a) return b; return -1 }, String.prototype.format = function (a) { var c, d, e, b = this; if (arguments.length > 0) if (1 == arguments.length && "object" == typeof a) for (c in a) void 0 != a[c] && (d = new RegExp("({" + c + "})", "g"), b = b.replace(d, a[c])); else for (e = 0; e < arguments.length; e++)void 0 != arguments[e] && (d = new RegExp("({[" + e + "]})", "g"), b = b.replace(d, arguments[e])); return b }, jQuery.cookie = function (a, b, c) { var d, e, f, g, h, i, j, k, l; if ("undefined" == typeof b) { if (i = null, document.cookie && "" != document.cookie) for (j = document.cookie.split(";"), k = 0; k < j.length; k++)if (l = jQuery.trim(j[k]), l.substring(0, a.length + 1) == a + "=") { i = decodeURIComponent(l.substring(a.length + 1)); break } return i } c = c || {}, null === b && (b = "", c.expires = -1), d = "", c.expires && ("number" == typeof c.expires || c.expires.toUTCString) && ("number" == typeof c.expires ? (e = new Date, e.setTime(e.getTime() + 1e3 * 60 * 60 * 24 * c.expires)) : e = c.expires, d = "; expires=" + e.toUTCString()), f = c.path ? "; path=" + c.path : "", g = c.domain ? "; domain=" + c.domain : "", h = c.secure ? "; secure" : "", document.cookie = [a, "=", encodeURIComponent(b), d, f, g, h].join("") }, this.ShowFileDialog = function (a, b) { var c = KindEditor.editor({ fileManagerJson: "/admin/picture/GetImageFileList" }); $("#filemanager").unbind("click").click(function () { c.loadPlugin("filemanager", function () { c.plugin.filemanagerDialog({ viewType: "VIEW", dirName: "image", maxSelect: a, selectedIds: void 0 == $("#selectedIds") ? "" : $("#selectedIds").val(), success: function (a) { b(a), c.hideDialog() } }) }) }) }, _eventBoundArray = new Array, YibuPropertyBinder = { createNew: function (a, b, c, d, e, f, g) { var h = {}; return h.srcElement = a, h.eventKey = b, h.srcProType = c, h.srcProName = d, h.targetSelector = e, h.targetProType = f, h.targetProName = g, h } }, YibuEventBinder = { createNew: function (a, b, c) { var d = {}; return d.srcElement = a, d.eventKey = b, d.eventFunc = c, d } }, ReComputeVisibleSmartView.prototype.IsDynamicLoaded = function (a, b) { var c = 5e3, d = 0, e = setInterval(function () { var f = !0; _.each(a, function (a) { a && $(a).is("img") && !a.complete && (f = !1), 0 == $(a).attr("data-isload") && (f = !1) }), d += 50, (f || d >= c) && (clearInterval(e), b(a)) }, 50) }, ReComputeVisibleSmartView.prototype.sort = function (a, b) { return $(a).offset().top > $(b).offset().top ? 1 : -1 }, ReComputeVisibleSmartView.prototype.isAutoHeight = function (a) { var b = $(a).children(".yibuFrameContent"); return 0 == b.hasClass("overflow_hidden") && 0 == b.hasClass("overflow_auto") && "0px" != $(a).css("min-height") }, ReComputeVisibleSmartView.prototype.recomputeTopV1 = function () { var a = this, b = $(".main"), c = null; c = b.length > 0 ? b.find(".runTimeflowsmartView,.isflowcontainer") : $(".mainSamrtView").find(".runTimeflowsmartView,.isflowcontainer"), c = _.sortBy(c, function (a) { return $(a).hasClass("runTimeflowsmartView") ? 9999999 : $(a).parentsUntil(".yibuSmartViewMargin").position().top }), _.each(c, function (b) { var f, h, i, j, k, l, m, n, o, p, q, s, t, u, d = $(b), e = d.css("display"); "none" == e && d.addClass("notvisible").show(), f = d.children("div[class^='yibuSmartViewMargin absPos']"), f = f.sort(a.sort), f.each(function () { var e, f, c = $(this), d = c.children(".yibuFrameContent"); e = 0 == d.hasClass("overflow_hidden") && 0 == d.hasClass("overflow_auto") ? _.isUndefined(c.css("min-height")) || "0px" == c.css("min-height") ? c.height() : parsePxToInt(c.css("min-height")) : c.height(), f = parsePxToInt(c.css("top")), $(this).attr("oldBottom", f + e) }), new Array, h = _.filter(f, function (a) { var b = $(a), c = b.attr("id"), d = c.split("_")[1], e = b.children(".yibuFrameContent"); return "v2dropdownlist" !== d && "v2search" !== d && "v2address" !== d && "v2formdate" !== d && 0 == e.hasClass("overflow_hidden") && 0 == e.hasClass("overflow_auto") && "0px" != $(a).css("min-height") }), h = _.sortBy(h, function (a) { return $(a).offset().top }); for (i in h) try { j = $(h[i]), k = j.css("min-height"), k = "undefined" != typeof k ? parseInt(k, 10) : 0, l = j.height(), m = j.attr("cheight"), "undefined" != typeof m && (m = parseInt(m, 10), l = m), n = l - k, o = j.attr("expandH"), o = "undefined" != typeof o ? parseInt(o, 10) : 0, p = j.find(".isflowcontainer").length > 0 ? !0 : !1, p && (n = o), n > 0 && (p ? f.each(function (b) { var e, g, h, i, d = $(this); d != j && IsInContainerBehind(j, d) && (e = parsePxToInt(d.css("top")), d.css("top", e + n + "px"), g = d.attr("expandH"), g = "undefined" == typeof g ? 0 : parseInt(g, 10), h = d.find(".isflowcontainer").length > 0 ? !0 : !1, i = a.isAutoHeight(d), h && i ? b == f.length - 1 && d.attr("expandH", n + g) : d.attr("expandH", n + g)) }) : (f.each(function (b) { var e, g, h, i, d = $(this); d != j && IsPositionBehind(j, d) && (e = parsePxToInt(d.css("top")), d.css("top", e + n + "px"), g = d.attr("expandH"), g = "undefined" != typeof g ? parseInt(g, 10) : 0, h = d.find(".isflowcontainer").length > 0 ? !0 : !1, i = a.isAutoHeight(d), h && i ? b == f.length - 1 && d.attr("expandH", n + g) : d.attr("expandH", n + g)) }), q = k + n, j.css("min-height", q), j.attr("expandH", n + o))) } catch (r) { } s = null, t = 0, f.each(function () { var c = $(this); (null == s || parsePxToInt(c.css("top")) + c.height() > t) && (t = parsePxToInt(c.css("top")) + c.height(), s = c) }), null != s && t >= parseInt(s.attr("oldBottom")) && (u = parseInt(s.attr("expandH"), 10), u > 0 && RefreshAutoExpandHeight(d, u)), _.isUndefined(a.callback) || a.callback(), "none" == e && d.hide().removeClass("notvisible") }) }, ReComputeVisibleSmartView.prototype.recomputeTop = function () { var a = this, b = $(".runTimeflowsmartView,.isflowcontainer"); b = _.sortBy(b, function (a) { return -$(a).parents().length }), _.each(b, function (b) { var f, g, h, d = $(b), e = d.css("display"); "none" == e && d.addClass("notvisible").show(), f = d.children("div[class^='yibuSmartViewMargin absPos']"), f.each(function () { var e, f, c = $(this), d = c.children(".yibuFrameContent"); e = 0 == d.hasClass("overflow_hidden") && 0 == d.hasClass("overflow_auto") ? _.isUndefined(c.css("min-height")) || "0px" == c.css("min-height") ? c.height() : parsePxToInt(c.css("min-height")) : c.height(), f = parsePxToInt(c.css("top")), $(this).attr("oldBottom", f + e) }), g = new Array, h = _.filter(f, function (a) { $(a).find("img").each(function () { $(this).hasClass("lazyload") && $(this).attr("src", $(this).attr("src")), g.push(this) }), $(a).find(".comment_area").each(function () { g.push(this) }); var b = $(a).children(".yibuFrameContent"); return 0 == b.hasClass("overflow_hidden") && 0 == b.hasClass("overflow_auto") && "0px" != $(a).css("min-height") }), a.IsDynamicLoaded(g, function () { var c, g, i, j, l, m, n; h = _.sortBy(h, function (a) { return $(a).offset().top }); for (c in h) try { g = $(h[c]), i = g.css("min-height"), i = "undefined" != typeof i ? parseInt(i, 10) : 0, j = g.height() - i, f.each(function () { var d, c = $(this); c != g && IsPositionBehind(g, c) && (d = parsePxToInt(c.css("top")), c.css("top", d + j + "px")) }) } catch (k) { } l = null, m = 0, f.each(function () { var c = $(this); (null == l || parsePxToInt(c.css("top")) + c.height() > m) && (m = parsePxToInt(c.css("top")) + c.height(), l = c) }), null != l && m > parseInt(l.attr("oldBottom")) && (n = m - parseInt(l.attr("oldBottom")), RefreshAutoExpandHeight(d, n)), _.isUndefined(a.callback) || a.callback(), "none" == e && d.hide().removeClass("notvisible") }) }) }, AjaxLoginCheck = { callback: null, checkLogin: function () { $.ajax({ cache: !1, url: "/customer/CheckLoginState", type: "post", dataType: "json", success: function (a) { a.success ? window[AjaxLoginCheck.callback]() : AjaxLoginCheck.openLoginDialog(AjaxLoginCheck.callback) } }) }, openLoginDialog: function () { $.ajax({ cache: !1, url: "/customer/logindialog?callback=" + AjaxLoginCheck.callback, type: "get", success: function (a) { $("#loginForm").length > 0 && $("#loginForm").remove(), $("body").append(a) } }) } };