if(typeof Mobi=="undefined"){Mobi={}}Mobi.getPreviewWindow=function(){var b=Fai.top.document.getElementById("mobiReviewPageFrame");var a=!b?window:b.contentWindow;return a};Mobi.getPreviewDocument=function(){var a=Mobi.getPreviewWindow().document;return a};Mobi.getPreviewObject=function(a){if(!a){return}return Mobi.getPreviewDocument().getElementById(a)};Mobi.getPreviewObjectClass=function(a){if(!a){return}return Mobi.getPreviewDocument().getElementsByClassName(a)};Mobi.getJQMobi=function(){var b=Mobi.getPreviewWindow(),a=b.jm;return a};Mobi.unifiedAttrVal=function(b,d,a){var c=b.find(d);var e=0;c.each(function(){var f=jm(this).css(a);f=parseInt(f);if(f>e){e=f}});c.each(function(){jm(this).css(a,e+"px")})};Mobi.orientationchange=function(){var a="onorientationchange" in window,b=a?"orientationchange":"resize";window.addEventListener(b,function(){Mobi.orientationFunctions()},false)};Mobi.orientationFunctions=function(){Mobi.logoSizeCompressByMargin();Mobi.titlePositionRefreshByLogo()};Mobi.createElementByHtml=function(a){var b=document.createElement("div");b.innerHTML=a;b=b.firstChild;b.parentNode.removeChild(b);return b};Mobi.isNull=function(a){return(typeof a=="undefined")||(a==null)};Mobi.addInterval=function(d,c,a){if(Mobi.isNull(Mobi.intervalFunc)){Mobi.intervalFunc=new Array()}for(var b=0;b=2000&&Fai.top._templateFrameId<3000){jm("#fk-gWebPlaceholdPT").remove();return}var l=Mobi.webTop(),h=Mobi.getPreviewObject("g_web"),k=Mobi.getPreviewObject("webTop"),j=Mobi.getPreviewObject("webBodyBackground"),e=Mobi.getPreviewObject("webHeaderBox");e.style.top="";k.style.top="";if(f!==2&&f!==7&&f!==8){var d=Mobi.getPreviewObject("fk-gWebPlaceholdPT");if(d){d.style.height=l+"px"}else{d=jm("
");jm(h).prepend(d)}return}if(f==7){var c=jm("#webHeader"),b=Mobi.getPreviewObject("navbar");if(l>0){b.style.top=l+"px"}if(c.css("display")==="none"){return}}e.style.top=l+"px";k.style.top=l+"px";var d=Mobi.getPreviewObject("fk-gWebPlaceholdPT");var a=Mobi.getPreviewObject("webHeader");if(d){d.style.height=(a.offsetHeight+l)+"px"}else{d=jm("
");jm(h).prepend(d)}};Mobi.webTop=function(){var b=0,a=Mobi.getPreviewObject("mobiTipsMarquee");if(!a){return b}else{var c=Mobi.getPreviewObject("webTips").offsetHeight;b=c;return b}};Mobi.topTipMarquee=function(){var d=Mobi.getPreviewObject("mobiTipsMarquee");if(!d){return false}var f=Mobi.getPreviewObjectClass("J_marquee")[0],j=d.querySelectorAll("li"),b=jm(f).width(),h=f.offsetWidth,a=false,c=[],k=0;for(var e=0;ec[e]){k=(e==0)?b:parseInt(k)+c[e]}else{k=(e==0)?c[e]:parseInt(k)+c[e]}}if(j.length==1&&c[0]"),c;e.appendChild(f);for(var d=0;d<=a;d++){c=jm(h[d]).clone();jm(f).append(c)}};Mobi.initTipsMarquee=function(f){var e=0,d=Mobi.getPreviewObjectClass("J_marqueeContainer")[0],a=Mobi.getPreviewObject("mobiTipsMarquee"),b=Mobi.getPreviewObject("J_mobiTipsMarqueeCopy"),c;jm(a).addClass("j-marquee");jm(a).css({width:f+"px",left:"0",top:"0"});c=a.offsetWidth;jm(b).css({width:f+"px",left:c+"px",top:"0"});Mobi.setParentMarquee(a,b)};Mobi.setParentMarquee=function(b,c){var a=b.offsetWidth,e=c.offsetWidth,f=a+e,d=Mobi.getPreviewObjectClass("J_marqueeContainer")[0],h=70;jm(d).css({width:f+"px",left:"0",top:"0"});d.setAttribute("style",d.getAttribute("style")+Mobi.marqueeAnimation(f,h))};Mobi.marqueeAnimation=function(b,c){var a="mobi_notice_right_to_left_50";return"-webkit-animation: "+a+" "+b/c+"s linear 1s infinite;-moz-animation: "+a+" "+b/c+"s linear 1s infinite;-o-animation: "+a+" "+b/c+"s linear 1s infinite;animation: "+a+" "+b/c+"s linear 1s infinite;"};Mobi.ingTigs=function(k,j){var e=(k==null||k=="")?"正在处理...":k;var d=Fai.top.document.body.clientWidth;var a=Fai.top.document.body.clientHeight;var f="";f="
";if(jm("#mobiIng").length==0){jm(f).appendTo("body")}var b=jm("#mobiIng");var c=parseInt(Math.random()*10000);var h='
'+e+"
";b.find(".mobiTips").remove();jm("#mobiIngTigs").find(".mobiTips").remove();jm(h).appendTo(b);window.setTimeout(function(){b.css("visibility","hidden");b.css("opacity","0")},2500);window.setTimeout(function(){jm("#"+c).remove();b.css("visibility","visible");b.css("opacity","1")},3000)};Mobi.ing=function(p,q,m){var e=(p==null||p=="")?"正在处理...":p;var o="";if(q==""||q==null||q==0){o="
"}else{if(q==1){o="
"}else{if(q==-1){o=""}}}m=m?m:false;var d=Fai.top.document.body.clientWidth;var a=Fai.top.document.body.clientHeight;var k=jm("body").attr("class");var j="";if(k.indexOf("2052")>=0){j=parseFloat(p.length);if(j>13&&j<39){j=15;e=p.substring(0,13)+"
"+p.substring(13)}else{if(j>39){j=15;e=p.substring(0,13)+"
"+p.substring(13,39)+"
"+p.substring(39)}}}else{j=parseFloat(p.length)/2;if(j>15){var h=p.substring(0,30).lastIndexOf(" ");if(p.charAt(30)!=""&&j<50){if(h<15){h=30}e=p.substring(0,h)+"
"+p.substring(h)}else{if(j>50){var f=p.substring(30,50).lastIndexOf(" ");e=p.substring(0,h)+"
"+p.substring(h,f)+"
"+p.substring(f)}}j=15}}j+="rem";b.html(n);if(!m){window.setTimeout(function(){b.css("visibility","hidden");b.css("opacity","0")},1500);window.setTimeout(function(){jm("#"+c).remove();b.remove()},2500)}};Mobi.initForms=function(){var d=document.querySelector("#webModuleContainer"),c=d.querySelectorAll(".form");for(var b=0;b0){if(e.getAttribute("showNav")=="true"){e.setAttribute("showNav","false");e.style.opacity=0;e.style.zIndex=-1}}else{if(e.getAttribute("showNav")=="false"){e.setAttribute("showNav","true");e.style.opacity=1;e.style.zIndex=5}}},false)}};Mobi.onlineServiceInputWord=function(){if(!Fai.top._manageMode&&!jm.os.supportsTouch){return}if(Fai.top._templateFrameId>=2000&&Fai.top._templateFrameId<3000){return}var h=document.querySelectorAll("input[type='text']"),f=document.querySelectorAll("textArea"),e=[],a=document.getElementById("webCustomerServiceBox"),d=false;if(a){d=a.querySelectorAll(".service").length>0?true:false}if(!a||!d){return}for(var c=0;c0){jm("#"+b).remove()}jm("#fullScreenDivCotainer").append("
");jm("#"+b).css("background-image","none");jm("#"+b).css("background-image",jm("#webBodyBackground").css("background-image"));jm.ajax({type:"post",url:"ajax/other_h.jsp?cmd="+c,data:a,error:function(){Mobi.closeLoading();Mobi.ing(LS.systemError);ajaxDone=true},success:function(d){var e=jm.parseJSON(d);if(e.success){jm("#"+b).append(e.html);jm("#"+b).addClass("showFullScreen");Mobi.getPreviewObject(b).focus();Mobi.switchJump();Mobi.initModulePhotoSwipe(b)}ajaxDone=true;Mobi.closeLoading()}})};Mobi.createInnerScreenDiv=function(a,e,m,c,j){if(!ajaxDone){return}if(!c){Mobi.ing(LS.mallStlSubmitError);return}if(!j){Mobi.ing(LS.mallStlSubmitError);return}var l=document.getElementById("ngGroupDiv").className;var b=new RegExp("ngTag","g");if(l.match(b)){for(var d=0;d")}else{jm("#comemtDiv").html("")}var a="id="+e;if(!isNaN(d)){a+=("&pageno="+d)}Mobi.mobiHideScroll();Mobi.showLoading();var b=jm("html").css("font-size");b=b.substring(0,b.length-2);jm.ajax({type:"post",url:"ajax/other_h.jsp?cmd="+c+"&rem="+b,data:a,error:function(){Mobi.closeLoading();Mobi.ing(LS.systemError)},success:function(f){var h=jm.parseJSON(f);if(h.success){jm("#comemtDiv").append(h.html);jm("#comemtDiv").addClass("showFullScreen")}Mobi.closeLoading();Mobi.hidePlaceholder();setTimeout(function(){var k=jm(".ct-s-content-m");if(typeof(k)!="undefined"&&k!=null){for(var l=0;l0){Mobi.bindCommImgShow(j)}}}},100)}})};Mobi.removeCommentDiv=function(){Mobi.mobiShowScroll();jm("#comemtDiv").remove();window.location.reload()};Mobi.productGroupCollapse=function(e){var d=jm("#pgBox");var l=jm("#pgBox2");var j=Mobi.getPreviewObject("group_"+groupId);var k=jm("#pgBox2_Item"+groupId);var f=jm("#pgSelect");var a=parseInt(d.height());var h=parseInt(l.height());var c=a>h?a:h;jm("#pgBox2").children(".pgBox2Item").removeClass("pgBox2ItemCollapse");d.addClass("pgBoxCollapse");l.addClass("pgBox2Collapse");l.css("height",c+"px");k.addClass("pgBox2ItemCollapse");var b=parseInt(j.offsetTop)+4;if(f.length>0){f.css("top",b+"px")}else{d.prepend("
")}setTimeout(function(){},100)};Mobi.disableSafeMode=function(){var b=Fai.top.$("#mobiReviewPageFrame").attr("src"),d,f,e=b.indexOf("?"),c=Fai.top.location.href||"";if(e!=-1){d=b.substring(0,e);f=b.substring(e+1);if(f.indexOf("_safeMode=true")>-1&&f.length>15){d+="?"+b.substring(e+1).replace("&_safeMode=true","").replace("_safeMode=true&","").replace("_safeMode=true","")}}Fai.top.$("#mobiReviewPageFrame").attr("src",d);location.hash=a(d);Fai.top.location.href=c.replace("_safeMode=true","_safeMode=false");function a(r){if(r){var n=r.indexOf("#"),o=r.indexOf(".jsp"),p=r.indexOf("?"),q=r.substring(n+2,o),h={},l="",j,k,m;if(p!=-1){j=r.substring(p+1).split("&");for(m=0;m";jm(e).insertAfter(c);jm("#fk-divTableContainer_"+b).append(c)}})};Mobi.viewPageBeforeInit=function(){if(!Fai.top._manageMode&&window.top!==window.self){jm("#g_body").addClass("g_viewMode");jm("#webTips").css("display","none")}};Mobi.getTransitionEndEventName=function(){var a,d,b=document.createElement("div"),c={transition:"transitionend",OTransition:"otransitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c){if(c.hasOwnProperty(a)&&b.style[a]!==d){return c[a]}}};Mobi.prompt=function(l){var f={content:"",textClass:"",cancelClass:"",};var l=jm.extend(f,l);var c=Fai.top.document.body.clientWidth;var a=Fai.top.document.body.clientHeight;var b=parseInt(Math.random()*10000);var j="
",h="
";jm(j).appendTo("body");jm(h).appendTo("body");var d=jm("#mobiPrompt"+b),k=jm("#mobiPrompt_Bg"+b);var e=[];e.push("
");e.push("
");e.push("
"+l.content+"
");e.push("
");e.push("
");e.push("
");e.push("
");e.push("
");e.push("
");e.push("
");d.append(e.join(""));if(l.callback){d.find(".J-prompt-save").on("click",function(){d.removeClass("mobiPromptShow");k.removeClass("mobiPromptBgShow");setTimeout(function(){d.remove();k.remove()},200);l.callback()})}if(l.cancelCallback){d.find(".J-prompt-cancel").on("click",function(){d.removeClass("mobiPromptShow");k.removeClass("mobiPromptBgShow");setTimeout(function(){d.remove();k.remove()},200);l.cancelCallback()})}else{d.find(".J-prompt-cancel").on("click",function(){d.removeClass("mobiPromptShow");k.removeClass("mobiPromptBgShow");setTimeout(function(){d.remove();k.remove()},200)})}window.setTimeout(function(){k.addClass("mobiPromptBgShow");d.addClass("mobiPromptShow")},100)};Mobi.customPopup=function(n){var f={content:"",};var n=jm.extend(f,n);var d=Fai.top.document.body.clientWidth;var a=Fai.top.document.body.clientHeight;var b=parseInt(Math.random()*10000);var m="
",k="
",h="
";jm(m).appendTo("body");jm(k).appendTo("body");jm(h).appendTo("body");var m=jm("#mobiPrelude"+b),c=jm("#mobiPrompt"+b),l=jm("#mobiPrompt_Bg"+b);var j=[];j.push("
");if(typeof n.prelude=="undefined"||n.prelude==null){n.prelude=""}j.push(n.prelude||"");j.push("
");m.append(j.join(""));var e=[];e.push("
");e.push(n.content);e.push("
");c.append(e.join(""));if(n.callback){c.find(".J-prompt-callback").on("click",function(){m.removeClass("mobiPreludeShow");c.removeClass("mobiPromptShow");l.removeClass("mobiPromptBgShow");setTimeout(function(){m.remove();c.remove();l.remove()},200);n.callback()})}if(n.cancelCallback){c.find(".J-prompt-cancel").on("click",function(){m.removeClass("mobiPreludeShow");c.removeClass("mobiPromptShow");l.removeClass("mobiPromptBgShow");setTimeout(function(){m.remove();c.remove();l.remove()},200);n.cancelCallback()})}else{c.find(".J-prompt-cancel").on("click",function(){m.removeClass("mobiPreludeShow");c.removeClass("mobiPromptShow");l.removeClass("mobiPromptBgShow");setTimeout(function(){m.remove();c.remove();l.remove()},200)})}window.setTimeout(function(){l.addClass("mobiPromptBgShow");m.addClass("mobiPreludeShow");if(!!n.mainFrameTimeout){window.setTimeout(function(){m.removeClass("mobiPreludeShow");m.remove();c.addClass("mobiPromptShow")},n.mainFrameTimeout)}else{c.addClass("mobiPromptShow")}},100)};Mobi.initWebPage=function(f){var r=f.triggerId,u=f.panelId,o=f.pageHtml,l=f.pageHead,c=f.pageBg||false,a=f.returnSeltFun||false,e=f.closeWebPage,k=f.closeCallBack||function(){},p=f.direction||"right",j=f.callback;var d="";if(!r){return}var t,h=jm("#webPagePanel"+r);if(h.length!==0){h.remove();h=jm("#webPagePanel"+r)}var n="webPagePanelRight";var m=false;if(p==="left"){n="webPagePanelLeft"}else{if(p==="top"){n="webPagePanelTop"}else{if(p==="bottom"){n="webPagePanelBottom"}}}var s="";if(c){s="
"}var d=0;var b=0;jm("#"+r).bind("click",function(v){jm("#g_body").css("overflow-y","hidden");q();if(!m){j&&j();m=true}window.scrollTo(0,b)});var q=function(){if(h.length==0||t==undefined){jm("#g_web").append("
"+s+"
");h=jm("#webPagePanel"+r);if(o){h.append(o);jm(".swipImgBox").each(function(A,B){if(B.children.length==3){jm(B).children().css("margin-right","0.6rem");jm(B).children().find(".shareNewIcon").css("width","3rem")}});t=jm(o);t=jm("#"+t[0].id)}else{if(!u){alert("panelId is null")}t=jm("#"+u);h.append(t)}t.addClass(n);t.addClass("webPagePanel");h.show();t.show();setTimeout(function(){t.addClass("webPagePanelShow")});if(c){Mobi.bindTouchAndClickEvent(jm("#webPagePanel"+r+" .webPagePanelBg"),function(A){t.removeClass("webPagePanelShow");t.removeClass("webPagePanelShow");jm("#g_body").css({overflow:"",height:"",top:""});jm("html").css({overflow:"",});jm("#g_web").removeClass("gwNoScroll");jm("#webPagePanel"+r).css("z-index","-1");window.scrollTo(0,b);return false})}var x=e.split(",");for(var y=0;y-1){Mobi.ing("复制成功",1)}else{Mobi.ingTigs("该浏览器不支持复制链接的功能,请手动复制")}A.destroy()})})};if(a){return function(){q();if(!m){j&&j();m=true}}}};Mobi.initProductGroundNav=function(f,b){var d=jm("#module"+f),c=d.find(".productNewGroup"),e=c.find(".J_navOpenBtn"),a=c.find(".J_navHorizon");e.on("click",function(){var h=c.find(".J_navMask");if(e.hasClass("faisco-icons-downward1")){e.removeClass("faisco-icons-downward1").addClass("faisco-icons-upward1");a.addClass("f-navOpenStyle");if(h.length>0){h.show()}else{c.append("
");c.find(".J_navMask").on("click",function(){e.trigger("click")})}}else{h.hide();e.removeClass("faisco-icons-upward1 f-navOpenStyle").addClass("faisco-icons-downward1");a.removeClass("f-navOpenStyle")}})};Mobi.initProductGroup=function(l,t,b){if(t==1||l==0){return false}var m=window.innerHeight?window.innerHeight:window.screen.height;var d=jm("#module22");var k=jm(".productNewGroup");var r=k.attr("_prUrl")||"";var n=d.height(),s=false,e,w,q,h,y,a,x;if(Fai.top._templateFrameId>=2000&&Fai.top._templateFrameId<3000){s=true}if(s){e=k.find(".firstGroup");jm("#webFooter").find(".footerMenu").hide();jm("#webFooter").find(".technical").hide();k.height(jm("body").height()-jm("#webHeaderBox").height()-jm("#fixedAreaBox").height()+"px")}var o=jm(k).find(".J_itemImage");for(var u=0;u0){F=setInterval(function(){if(a>0){a--;e[0].scrollLeft--}else{clearInterval(F)}},1)}else{F=setInterval(function(){if(a<0){a++;e[0].scrollLeft++}else{clearInterval(F)}},1)}}});if(l!=5&&l!=6){Mobi.SimpleDrag.__create(k.find(".firstGroupList"))}else{q=0;w.each(function(z,A){y=jm(A);h=A.offsetWidth+2+parseFloat(y.css("margin-right").replace("px",""));q+=h});k.find(".firstGroupList").width(q+"px")}if(!b||(!s&&l!=1)){return}var p=jm(k).find(".J_groupItem");var f={key:"productGroup",targets:p,type:Mobi.QuickIn.TYPE.FU,popupWindowOption:{settings:{title:"添加图片",maxSize:5,type:["jpg","jpeg","bmp","png","gif"],imgMode:2,maxChoiceList:1,netFileMode:true,openIcon:true,tabIndex:0},closeFunc:j}};function j(G,A){if(G.length==0||!A.fileId||A.fileId.length==0){return}var E=parseInt(jm(G).parent().attr("data-id"));var z=A.fileId;var D=A.filePath;var F=A.isDefaultColor;var B=A.color;var C="ajax/productGroup_h.jsp?cmd=setSingle&id="+E+"&mIcon="+z;if(!F){C=C+"&mIconColor="+Fai.top.Fai.encodeUrl(B)}jm.ajax({url:C,type:"get",error:function(){top.Fai.ing("服务繁忙,请稍候重试",false)},success:function(H){var K=$.parseJSON(H);if(K.success){var L=jm(G).parent().find(".J_itemImage");var J=jm(L).parent();var I=s?"f-itemImg":"itemImage";J.empty();if(top.Fai.isFontIcon(z)){if(!F){J.append("")}else{J.append("")}}else{J.append("")}v(jm(J).find(".J_itemImage"));top.Fai.ing(K.msg,true)}else{top.Fai.ing(K.msg,true)}}})}Mobi.QuickIn.__createInstance(f);function v(C){var B=parseInt(jm(C).attr("data-w")),D=parseInt(jm(C).attr("data-h")),A=s?"3.0rem":"2.8rem",z=s?"3.0rem":"2.9rem";if(B>=D){jm(C).css("width",A).css("height","auto").css("vertical-align","middle")}else{if(D>B){jm(C).css("width","auto").css("height",z).css("display","block").css("margin","0 auto")}}}};Mobi.QuickIn={TYPE:{FU:1},__data:{},__html:{},__func:{},__createInstance:new Function()};(function(f,a){function c(){if(!a.__data.init){b()}a.__data.init=true}function b(){a.__data.count=0;a.__data.init=false;a.__data.instances={};a.__html="
"}a.__createInstance=function(j){e(j)};function e(j){d(j);h()}function d(j){var m=a.__html.replace("_$dataId",a.__data.count).replace("_$dataType",j.type);for(var k=0;kp.moveOverflowRange){p.moveY=p.moveOverflowRange}else{if(p.moveY<(p.overflowHeight*-1-p.moveOverflowRange)){p.moveY=(p.overflowHeight*-1-p.moveOverflowRange)}}f(o).css("transform","translateY("+p.moveY+")").css("-webkit-transform","translateY("+p.moveY+"px)")}}function a(q,p){var o=parseInt(f(p).parent().height()),n=parseInt(f(p).height());q.startY=0;q.moveY=0;q.isClicking=false;q.overflowHeight=n-o;q.transformY=h(p);q.moveOverflowRange=f(f(p).children()[0]).height();if(n0){return 0}if(n.moveY<0){if((n.moveY*-1)>=n.overflowHeight){return n.overflowHeight*-1}}return n.moveY}function l(o){var n=o.clientY;if(o.touches){n=o.touches[0].clientY}return n}function h(n){if(n.length==0){return 0}var o=f(n).css("transform");if(!o){o=f(n).css("-webkit-transform")}if(o=="none"){o=0}else{o=o.replace("translateY(","").replace(")","");o=parseInt(o,10)}if(!o){o=0}return o}})(jm,Mobi.SimpleDrag);(function(a,b){if(typeof define==="function"&&define.amd){define(["$"],b)}else{if(typeof exports==="object"){module.exports=b()}else{a.Dialog=b(window.Zepto||window.jQuery||jm)}}})(this,function(b){b.fn.Dialog=function(c){var d=[];b(this).each(function(){var f=new a();var e=b.extend({trigger:b(this)},c);f.init(e);d.push(f)});return d};b.Dialog=function(c){if(c.type==="confirm"){var j=new a();var h='
'+c.content+"
";var e="";if(!c.buttons){c.buttons=[{no:"取消"},{yes:"完成"}]}var n="";for(var f=0,d=c.buttons.length;f"}if(k.yes){n+='"}}e=''+n+"
";h=e+h;var m=b.extend({target:h,animate:true,show:true,fixed:true,mask:true,className:"fkarea-ui-alert",afterHide:function(l){this.dispose()},beforeShow:function(l){j.touch(b(".fkarea-ui-confirm-submit",l),function(){c.callback&&c.callback.call(j,"yes",l);b("body").css({overflow:"auto"})});j.touch(b(".fkarea-ui-confirm-no",l),function(){c.callback&&c.callback.call(j,"no",l);b("body").css({overflow:"auto"})})}},c);j.init(m)}};b.confirm=function(f,e,j,d){var c={};var h={zIndex:1001,type:"confirm"};if(typeof f=="object"){c=b.extend(h,f)}else{c=b.extend(h,{content:f,buttons:e,callback:j})}b.Dialog(b.extend(c,d))};var a=function(){var c=Math.random().toString().replace(".","");this.id="dialog_"+c;this.settings={};this.settings.titleTpl=b('
');this.timer=null;this.showed=false;this.mask=b()};a.prototype={init:function(c){var e=this;this.settings=b.extend({fixed:false},this.settings,c);if(this.settings.mask){this.mask=b('
');b("body").append(this.mask)}b("body").append('
');this.dialogContainer=b("#"+this.id);var d=this.settings.zIndex||10;this.dialogContainer.css({zIndex:d});if(this.settings.className){this.dialogContainer.addClass(this.settings.className)}this.mask.css({zIndex:d-1});if(this.settings.title){this.dialogContainer.append(this.settings.titleTpl);this.settings.titleTpl.html(this.settings.title)}this.bindEvent();if(this.settings.show){this.show()}},touch:function(f,d){var c;b(f).on("click",e);function e(h){return d.call(this,h)}b(f).on("touchmove",function(h){c=true;h.preventDefault();h.stopPropagation()}).on("touchend",function(h){h.preventDefault();if(!c){var j=d.call(this,h,"touch");if(!j){h.preventDefault();h.stopPropagation()}}c=false})},bindEvent:function(){var c=this;if(this.settings.trigger){b(this.settings.trigger).click(function(){c.show()});c.touch(b(this.settings.trigger),function(){c.show()})}b(this.dialogContainer).on("click",".js-dialog-close",function(){c.hide();return false});b(this.dialogContainer).on("hide",function(){c.hide()})},dispose:function(){this.dialogContainer.remove();this.mask.remove();this.timer&&clearInterval(this.timer)},hide:function(){var c=this;if(c.settings.beforeHide){c.settings.beforeHide.call(c,c.dialogContainer)}this.showed=false;this.mask.hide();this.timer&&clearInterval(this.timer);if(this.settings.animate){this.dialogContainer.removeClass("fkarea-zoomIn").addClass("fkarea-zoomOut");setTimeout(function(){c.dialogContainer.hide();if(typeof c.settings.target==="object"){b("body").append(c.dialogContainer.hide())}if(c.settings.afterHide){c.settings.afterHide.call(c,c.dialogContainer)}},500)}else{this.dialogContainer.hide();if(typeof this.settings.target==="object"){b("body").append(this.dialogContainer)}if(this.settings.afterHide){this.settings.afterHide.call(this,this.dialogContainer)}}},show:function(){if(typeof this.settings.target==="string"){if(/^(\.|\#\w+)/gi.test(this.settings.target)){this.dailogContent=b(this.settings.target)}else{this.dailogContent=b("
"+this.settings.target+"
")}}else{this.dailogContent=this.settings.target}this.mask.show();this.mask.bind("touchmove",function(d){d.preventDefault()});b("body").css({overflow:"hidden"});this.dailogContent.show();this.dailogContent.bind("touchmove",function(d){d.preventDefault()});this.height=this.settings.height||"auto";this.width=this.settings.width||"auto";this.dialogContainer.append(this.dailogContent).show().css({height:this.height,width:this.width});if(this.settings.beforeShow){this.settings.beforeShow.call(this,this.dialogContainer)}this.showed=true;this.setPosition();var c=this;this.timer&&clearInterval(this.timer);if(this.settings.fixed){this.timer=setInterval(function(){c.setPosition()},1000)}if(this.settings.animate){this.dialogContainer.addClass("fkarea-zoomIn").removeClass("fkarea-zoomOut").addClass("fkarea-animated")}},setPosition:function(){if(this.showed){var j=this;this.dialogContainer.show();this.height=this.settings.height;this.width=this.settings.width;if(isNaN(this.height)){this.height=(this.dialogContainer.outerHeight&&this.dialogContainer.outerHeight())||this.dialogContainer.height()}if(isNaN(this.width)){this.width=(this.dialogContainer.outerWidth&&this.dialogContainer.outerWidth())||this.dialogContainer.width()}var h=this.settings.clientHeight||document.documentElement.clientHeight||document.body.clientHeight;var l=this.settings.clientWidth||document.documentElement.clientWidth||document.body.clientWidth;var e=this.width/2;var c=this.height/2;var d=l/2-e;var k=h/2-c;d=Math.floor(Math.max(0,d));k=Math.floor(Math.max(0,k));var f="absolute";var m="768px";if(jm&&jm("#g_web")&&jm("#g_web").length>0){m=jm("#g_web").css("max-width")}if(j.settings.fixed){f="fixed"}j.dialogContainer.css({position:f,top:k,width:"100%",left:0,right:0,maxWidth:m,margin:"0px auto"})}}};return a});(function(a,b){if(typeof define==="function"&&define.amd){define(["$","dialog"],b)}else{if(typeof define==="function"&&define.cmd){define(function(e,d,f){var h=e("$");var c=e("dialog");return b(h,c)})}else{if(typeof exports==="object"){module.exports=b()}else{a.MobileSelectArea=b(window.Zepto||window.jQuery||jm)}}}})(this,function(c,a){var b=function(){var d=Math.random().toString().replace(".","");this.id="scroller_"+d;this.scroller;this.data;this.index=0;this.value=[0,0,0];this.oldvalue;this.oldtext=[];this.text=["","",""];this.level=3;this.mtop=30;this.separator=""};b.prototype={init:function(d){this.settings=c.extend({eventName:"click"},d);this.lcid=parseInt(this.settings.lcid);this.trigger=c(this.settings.trigger);this.settings.init==undefined?this.init=1:this.init=0;level=parseInt(this.settings.level);this.level=level>0?level:3;this.trigger.attr("readonly","readonly");this.value=(this.settings.value&&this.settings.value.split(","))||[0,0,0];this.text=this.settings.text||this.trigger.val().split(" ")||["","",""];this.oldvalue=this.value.concat([]);this.oldtext=this.text.concat([]);this.clientHeight=document.documentElement.clientHeight||document.body.clientHeight;this.clientWidth=document.documentElement.clientWidth||document.body.clientWidth;this.bindEvent()},getData:function(){var d=this;if(typeof this.settings.data=="object"){this.data=this.settings.data}},bindEvent:function(){var d=this;this.trigger[d.settings.eventName](function(m){var l="";for(var k=0;k
"}if(d.lcid!=2052&&d.lcid!=1028){d.buttons=[{no:"cancel"},{yes:"fulfil"}]}else{d.buttons=null}c.confirm('
'+l+"

",d.buttons,function(e,p){if(e=="yes"){d.submit()}if(e=="no"){d.cancel()}this.dispose()},{width:320,height:215});d.scroller=c("#"+d.id);d.getData();d.format();var o=0,h=0;d.scroller.children().off("mousedown.area-scroller").on("mousedown.area-scroller",n);function n(e){e=e||window.event;o=e.pageY;c(window).off("mousemove.area-scroller").on("mousemove.area-scroller",f);c(window).off("mouseup.area-scroller").on("mouseup.area-scroller",j);e.preventDefault()}function f(p){p=p||window.event;h=p.pageY;var r=h-o;var e=c(p.target).parent();if(e[0].nodeName!="DL"){return}var q=parseInt(e.css("top")||0)+r;if(q<-c(e).height()+60){q=-c(e).height()+60}e.css("top",q+"px");o=h;p.preventDefault()}function j(e){e=e||window.event;h=e.pageY;c(window).off("mousemove.area-scroller");c(window).off("mouseup.area-scroller");var w=h-o;var s=c(e.target).parent();if(s[0].nodeName!="DL"){return}var q=c(s.parent()).index();var u=parseInt(s.css("top")||0)+w-30;if(u>d.mtop){u=d.mtop}if(u<-c(s).height()+60){u=-c(s).height()+60}var v=u/d.mtop;var r=Math.round(v);var t=Math.abs(r)+1;if(r==1){t=0}d.value[q]=c(s.children().get(t)).attr("ref");d.value[q]==0?d.text[q]="":d.text[q]=c(s.children().get(t)).html();for(var p=d.level-1;p>q;p--){d.value[p]=0;d.text[p]=""}if(!c(s.children().get(t)).hasClass("focus")){d.format()}c(s.children().get(t)).addClass("focus").siblings().removeClass("focus");s.css("top",r*d.mtop+"px");e.preventDefault()}d.scroller.children().bind("touchstart",function(p){o=(p.changedTouches||p.originalEvent.changedTouches)[0].pageY});d.scroller.children().bind("touchmove",function(s){h=(s.changedTouches||s.originalEvent.changedTouches)[0].pageY;var r=h-o;var p=c(s.target).parent();if(p[0].nodeName!="DL"){return}var q=parseInt(p.css("top")||0)+r;if(q<-c(p).height()+60){q=-c(p).height()+60}p.css("top",q+"px");o=h;return false});d.scroller.children().bind("touchend",function(u){h=(u.changedTouches||u.originalEvent.changedTouches)[0].pageY;var x=h-o;var s=c(u.target).parent();if(s[0].nodeName!="DL"){return}var q=c(s.parent()).index();var v=parseInt(s.css("top")||0)+x-30;if(v>d.mtop){v=d.mtop}if(v<-c(s).height()+60){v=-c(s).height()+60}var w=v/d.mtop;var r=Math.round(w);var t=Math.abs(r)+1;if(r==1){t=0}d.value[q]=c(s.children().get(t)).attr("ref");d.value[q]==0?d.text[q]="":d.text[q]=c(s.children().get(t)).html();for(var p=d.level-1;p>q;p--){d.value[p]=0;d.text[p]=""}if(!c(s.children().get(t)).hasClass("focus")){d.format()}c(s.children().get(t)).addClass("focus").siblings().removeClass("focus");s.css("top",r*d.mtop+"px");return false});return false})},format:function(){var e=this;var d=e.scroller.children();this.f(this.data)},f:function(l){var o=this;var s=l;if(!s){s=[]}var p='
——
';var t=0,f,q=o.mtop;if(o.index!==0&&o.value[o.index-1]=="0"&&this.init==0){p='
——
';o.value[o.index]=0;o.text[o.index]="";t=0}else{if(o.value[o.index]=="0"){p='
——
';t=0}if(s.length>0&&this.init==1){p="
";var m=s[0].pid||0;var d=s[0].id||0;t=s[0].id;if(o.lcid==2052||o.lcid==1028){f=site_cityUtil.getCities(s[0].id)}else{f=site_cityUtil.getCitiesEn(s[0].id)}if(!o.value[this.index]){o.value[this.index]=d;o.text[this.index]=s[0].name}p+='
'+s[0].name+"
"}for(var k=o.init,n=s.length;k'+s[k].name+""}}p+="
";var h=p;var e=o.scroller.children();c(e[o.index]).html(h);c(e[o.index]).children().css("top",q+30+"px");o.index++;if(o.index>o.level-1){o.index=0;return}o.f(f)},submit:function(){this.oldvalue=this.value.concat([]);this.oldtext=this.text.concat([]);if(this.trigger[0].nodeType==1){this.trigger.val(this.text.join(this.separator));this.trigger.attr("data-value",this.value.join(","))}this.settings.callback&&this.settings.callback.call(this,this.scroller,this.text,this.value)},cancel:function(){this.value=this.oldvalue.concat([]);this.text=this.oldtext.concat([])}};return b});Mobi.initProductGroupManage=function(b,c){if(Fai.top._templateFrameId<2000||Fai.top._templateFrameId>=3000){return}var a=Mobi.getPreviewDocument().getElementById("module"+b);$(a).mouseover(function(){Mobi.addModuleLayer("module"+b,c)}).mouseleave(function(){Mobi.removeModuleLayer("module"+b)})};Mobi.ajaxClick=function(h,f,c){showLoadingAgain=function(l){closeLoading(l);var e=['
','
加载失败,请点击重新加载
',"
"];jm("#module"+l+" .middleCenter").empty().append(e.join(""))};showLoading=function(l){var e=["
","
","","
","
"];jm("#module"+l+" .middleCenter").empty().append(e.join(""))};closeLoading=function(e){jm("#module"+e+" .moduleLoading").remove()};reloadingClick=function(e){loadingAjaxDom(e)};var b=jm(h).attr("href");if(c){b=h.children[h.selectedIndex].getAttribute("value")}var a=3;var k=0;try{a=Fai.top._colInfo.id;k=Fai.top._colInfo.extId}catch(j){a=3;k=0}var d=false;loadingAjaxDom=function(e){setTimeout(function(){if(!d){showLoading(e)}},1000);jm.ajax({type:"post",url:"ajax/ajaxLoadModuleDom_h.jsp",data:"cmd=getAjaxPageModuleInfo&_colId="+a+"&_extId="+k+"&moduleId="+e+"&href="+jm.encodeUrl(b),error:function(l){d=true;closeLoading(e);showLoadingAgain(e);Mobi.ing(LS.systemError)},success:function(l){d=true;closeLoading(e);var l=jm.parseJSON(l);if(l.success){var m=jm(l.domStr).find(".middleCenter"+e).html();var n=jm("#module"+e).find(".middleCenter"+e);n.html(m);jm.fkEval.call(window,l.scripts);Mobi.scrollToModule(e)}else{showLoadingAgain(e);Mobi.ing(l.msg)}}})};loadingAjaxDom(f)};Mobi.getOemViewUrl=function(a){return"http://www.webportal.cc/sys/view.jsp?id="+a};Mobi.showTopTips=function(c,a,f){var b=jm.parseJSON(f);var e="";if(c==undefined||c==0){e='
  • 免费域名不支持调用第三方代码,请使用已购买的域名进行访问   
  • '}else{if(c==1){e='
  • 网站内插入的代码存在非HTTPS链接,该链接无法正常加载显示,请替换成HTTPS链接或使用非HTTPS方式访问
  • '}else{if(c==2){e='
  • 免费域名不支持插件代码
  • '}else{if(c==3){e='
  • 基于安全原因,2018年4月11号起新注册的用户免费域名访问不支持插件代码和第三方代码,请使用绑定的域名进行访问。
  • '}}}}if(a&&a!=""){e=a}if(jm("#webTips").length>0){jm("#mobiTipsMarquee").append(e)}else{var d=['
    ','
    ','
    ','
    ','
      ',e,"
    ","
    ","
    ","
    ","
    ",];jm("body").prepend(d.join(""))}jm(".detailHeaderColor.detailHeaderColor").css("top","1.5rem");jm(".productDetailHeader").css("top","1.5rem");Mobi.topTipMarquee()};Mobi.fixWXPublicAttentionTip=function(b,e,a){var d=jm("#wxPublicAttentionService");if(a){d.show()}var c,h=d.find(".close"),f=d.find(".clickContent"),j=['
    ',"
    ",'
    ','
    ',' ',"
    ",'
    ',' ',"
    ",'
    '," 长按识别图中二维码快来关注我吧","
    ","
    ",];h.bind("click",function(){d.hide();jm.cookie("_hideWXPublicAttentionTip",1,{expires:1,path:"/"})});f.bind("click",function(){jm("body").append(j.join(""));if(e==""){jm("#wxPage").find(".img").hide()}jm("#wxTopTip").bind("click",function(){jm(this).remove();jm("#wxPage").remove()})});if(b){if(top.Fai.top._other.pa.st!=1){d.hide()}else{d.show()}}if(Fai.top._templateFrameId>=2000){if(jm("#serviceBtnOuter").length>0&&jm("#serviceBtnOuter").css("display")!="none"){c=jm("#serviceBtnOuter").height()}else{if(jm("#fixedAreaBox").length>0&&jm("#fixedAreaBox").css("display")!="none"){c=jm("#fixedAreaBox").height()}}}else{if(Fai.top._templateFrameId>=1000&&Fai.top._templateFrameId<2000){if(jm("#webCustomerServiceBox").length>0&&jm("#webCustomerServiceBox").css("display")!="none"){c=jm("#customerServiceDiv").height()}}else{if(jm("#webCustomerServiceBox").length>0&&jm("#webCustomerServiceBox").css("display")!="none"){c=jm("#customerServiceDiv").height()}}}d.css("bottom",c+"px")};Mobi.allFixWXPA=function(e,d,a){var c=jm("#wxPublicAttentionService"),b=0;if(e==1){if(Fai.top._openOnlineService){b=jm("#customerServiceDiv").height()}c.css("bottom",b+"px")}else{if(e==2){if(a){b=parseInt(jm("#module"+d).find(".newsBottom").height())}c.css("bottom",b+"px")}else{if(e==3){if(a){b=parseInt(jm(".productMallShop").height())}c.css("bottom",b+"px")}}}};Mobi.showNavItemContainer=function(){Mobi.hideNavItemContainer();Mobi.removeNavIconPositionFix();var w=Mobi.getPreviewObject("navbarList"),b=Mobi.getPreviewObject("navbar"),e=w,t=parseInt(jm(b).width()),m=0,l=b.querySelectorAll(".navItem"),v=b.querySelectorAll(".itemSep"),h=jm(b),E=h.find(".navItem"),z=jm(w),F=h.offset();for(var A=0;At){if(navigator.appVersion.match(/MSIE [\d.]+/)){if(parseInt(navigator.appVersion.match(/MSIE ([\d.]+)/)[1])===10){m=m+l.length*2}}jm(e).css("width",m+"px").removeClass("navbarList-horizontalLayout");var C=jm.getCookie("startX")?parseInt(jm.getCookie("startX")):0;if(jm.os.supportsTouch){var c=new iScroll(b,{x:C,scrollX:true,scrollY:false,mouseWheel:true,remarkXCoordinate:true,remarkNavLeftRight:B,onBeforeScrollMove:q});B(C,c);function q(){Mobi.hideOfficalNavSubMenu()}function B(j,p){var G=p.wrapper.querySelector(".navLeft")?p.wrapper.querySelector(".navLeft"):p.wrapper.querySelector(".navTouchLeft"),H=p.wrapper.querySelector(".navRight")?p.wrapper.querySelector(".navRight"):p.wrapper.querySelector(".navTouchRight");G.className="navTouchLeft";H.className="navTouchRight";if(j<0){G.style.display="block"}else{G.style.display="none"}if(p.maxScrollX===p.x){H.style.display="none"}else{H.style.display="block"}}}else{var r=jm(b).find(".navLeft"),D=jm(b).find(".navRight"),a=jm(b).find(".navbarList"),u=t-m;timer=null;if(C<0){r.css("display","block");jm(e).css("left",u+"px")}D.css("display","block");var x=jm.getCookie("startX_p")?parseInt(jm.getCookie("startX_p")):0;var y=0;var d=0;var f;if(jm(v[0]).css("display")){f=0}else{f=jm(b).find(".itemSep").width()/2}var o=b.offsetLeft;var s=[];jm(b).find(".navItem").each(function(j){s[j]=this.offsetLeft-o;y++});D.unbind("click");r.unbind("click");D.on("click",function(){k(this,"click");if(jm(".nav_offical_sub_menu_wrap").length>0){Mobi.hideOfficalNavSubMenu()}});r.on("click",function(){n(this,"click");if(jm(".nav_offical_sub_menu_wrap").length>0){Mobi.hideOfficalNavSubMenu()}});jm(b).bind("swipeLeft",function(j){}).bind("swipeRight",function(j){});function n(G,p){jm(G).unbind(p);if(x>=s.length){x=s.length-1}d=s[x]-s[x-1];if(x==1){d-=f}x--;if(x<0){x=0}var j=(e.offsetLeft+d);if(j>0){j=0}jm(e).css("left",j+"px");jm.setCookie("startX",j);jm.setCookie("startX_p",x);setTimeout(function(){if((Math.abs(e.offsetLeft)+t)=-1){r.css("display","none")}jm(G).bind(p,function(){n(this,p)})},600)}function k(G,p){jm(G).unbind(p);if(x>=s.length){x=s.length-1}d=s[x+1]-s[x];if(x==0){d-=f}x++;if(x==y){x=y-1}var j=(e.offsetLeft-d);if(Math.abs(j)+t>m){j=0-(m-t)}jm(e).css("left",j+"px");jm.setCookie("startX",j);jm.setCookie("startX_p",x);setTimeout(function(){if(e.offsetLeft<0){r.css("display","block")}if((Math.abs(e.offsetLeft)+t)>=m){D.css("display","none")}jm(G).bind(p,function(){k(this,p)})},1000)}}h.on("click.nav",".navItem",function(){var j=jm(this),H=j.offset(),G=jm.os.supportsTouch?c.x:parseInt(z.css("left").replace("px","")),p=parseInt(j.width());if(F.rightH.left){if(j.closest(".nav_1_level").length<1){jm.setCookie("startX",G+p)}else{if(h.hasClass("jz_subMenu_bubble")){}}}}})}jm(e).removeClass("navbarList-horizontalLayout")};Mobi.hideNavItemContainer=function(){jm(Mobi.getPreviewObject("navbarList")).removeAttr("style");jm(Mobi.getPreviewObject("navbar")).find(".navLeft").hide();jm(Mobi.getPreviewObject("navbar")).find(".navRight").hide()};Mobi.removeAllSwipeMenuClass=function(){a("moveAnimation");a("moveRight");jm("#navbar").removeClass("open");jm("#navButton").removeClass("navButtonOpen");jm("#navExistOffPanel").removeClass("navButtonOpen");function a(b){jm("#webHeaderBox").removeClass(b);jm("#webBannerBox").removeClass(b);jm("#webContainerBox").removeClass(b);jm("#customerServiceDiv").removeClass(b);jm("#webFooter").removeClass(b);jm("#bgm_icon").removeClass(b)}};Mobi.navSwipeMenu=function(a){var c="navButton",b=false;d("moveAnimation");function d(h){jm("#webBannerBox").addClass(h);jm("#webContainerBox").addClass(h);jm("#customerServiceDiv").addClass(h);jm("#webFooter").addClass(h);jm("#bgm_icon").addClass(h)}function f(h){jm("#webHeaderBox").removeClass(h);jm("#webBannerBox").removeClass(h);jm("#webContainerBox").removeClass(h);jm("#customerServiceDiv").removeClass(h);jm("#webFooter").removeClass(h);jm("#bgm_icon").removeClass(h)}function e(j){var h=Mobi.getPreviewObject("navbar").className;if(h.indexOf("open")!==-1){jm("#navbar").removeClass("open");jm("#navExistOffPanel").removeClass("navPanelOpen");jm("#navButton").removeClass("navButtonOpen");f("moveRight");if(a===2){jm("#webTop").css("height","")}}else{jm("#navbar").addClass("open");jm("#navExistOffPanel").addClass("navPanelOpen");jm("#navButton").addClass("navButtonOpen");d("moveRight");if(!b){Mobi.fixNavIconPosition();b=true}if(a===2){jm("#webTop").css("height","100%")}}}if(a!=5&&a!=2&&a!==8){Mobi.autoSetNavBarHeight(a)}Mobi.bindTouchAndClickEvent(jm("#"+c),function(){e();return false},"show");Mobi.bindTouchAndClickEvent(jm("#navExistOffPanel"),function(){e();return false})};Mobi.fixNavIconPosition=function(){var k=Fai.top._templateLayoutId,q=0,u=1,h=2,o=3,r=4,m=5,j=6,l=7,e=8;var s=jm("#navbar"),a=jm("#navbarList"),t=a.find(".J_imgIcon"),n=a.find(".J_fontIcon"),d=a.find(".icon-navItemIcon"),v,p,f,b,c;Mobi.removeNavIconPositionFix();if(!(k==h||k==r||k==l||k==m)){return}if(n.length<1||t.length<1){return}b=jm(n[0]);v=parseFloat(n[0].offsetWidth);b.addClass("fk-fixNavIconStyle");p=parseFloat(n[0].offsetWidth);f=parseFloat(n[0].offsetHeight);b.removeClass("fk-fixNavIconStyle");if(v>p){return}d.each(function(w,x){c=jm(x).parent().attr("id");Mobi.setCtrlStyleCssList("mobiStyleNav",c,[{cls:".icon-navItemIcon",key:"width",value:p+"px"},{cls:".icon-navItemIcon",key:"height",value:f+"px"}])})};Mobi.removeNavIconPositionFix=function(){var b=jm("#navbarList"),a=b.find(".icon-navItemIcon");if(Fai.top._manageMode){a.each(function(c,d){styleId=jm(d).parent().attr("id");Mobi.removeCtrlStyleCssList("mobiStyleNav",styleId,[{cls:".icon-navItemIcon",key:"width"},{cls:".icon-navItemIcon",key:"height"}])})}};Mobi.initNavSubMenu=function(l,a,b){var h=[],f=[],c,j=(Fai.top._manageMode&&Fai.top._columnStyleJson.s)||a,n=(Fai.top._manageMode&&Fai.top._other.templateInfo.templatePresetIndex)||b;for(var k in l){nav=l[k];c=nav.children||nav.cil,f.push(nav.id);if(Fai.top._manageMode){if(nav.children&&nav.children.length>0){for(var e=0;e=0){f.splice(index,1)}}var d=jm("#fixedAreaBox"),m=d.offset();for(var e=0;e0){for(var p=0;p";o+="";o+="";o+="";jm(o).appendTo(jm("#fixedAreaBox"));var E=jm(this),A=jm("#sub_menu_"+s.id),B=jm("#sub_menu_triangle"+s.id),u=parseFloat(B.width()),D=parseFloat(B.height()),J=parseFloat(E.offset().left)-m.left,C=parseFloat(E.width()),y=parseFloat(A[0].offsetWidth),G=d.height(),x=G.indexOf("rem")>-1?parseFloat(G.replace("rem",0)*_htmlFontSize):parseFloat(G),w=J+(C-y)/2,v=A[0].offsetWidth,I=w+v,H=jm("body")[0].offsetWidth;w=w<0?0:w;w=I>H?w-(I-H):w;if(j==6&&jm(event.target).closest(".bigCircle").length>0){var F=d.find(".bigCircle .mallNavBtnText");x=parseFloat(F.css("border-right-width").replace("px",""))*2+parseFloat(F.height())}A.css({left:w+"px",bottom:x+"px"});B.css({left:J+(C-u)/2+"px",bottom:(2+x+D/2)+"px"});d.data("subMenuOpen",s.id)})}})(e)}jm("body").off("click.subMenu").on("click.subMenu",function(o){if(jm(o.target).closest("#fixedAreaBox").length<1&&d.data("subMenuOpen")>0){Mobi.hideNavSubMenu()}})};Mobi.hideNavSubMenu=function(){var a=jm("#fixedAreaBox");jm(".nav_sub_menu_wrap").remove();a.data("subMenuOpen",0)};Mobi.initOfficalNavSubMenu=function(j,k,r){var d=[],o=[],s="ontouchstart" in window,b=s?"touchstart":"click",p=Fai.top._manageMode?"children":"cil",e=jm("#navbar"),n=jm("#navbarList"),l=jm("#navButton"),q=document.body.offsetHeight,m=Mobi.checkSubMenuType(),h=Fai.top._templateLayoutId,f;Mobi.initOfficalSubMenu();for(var u in j){nav=j[u];f=nav.children||nav.cil,o.push(nav.id);if(Fai.top._manageMode){if(nav.children&&nav.children.length>0){for(var t=0;t=0){o.splice(index,1)}}for(var t=0;t0){for(var w=0;w";if(I=="bubble"||I=="bubble_horizon"){D+=""}D+=""}D+=""}D+="";D+="";Mobi.hideOfficalNavSubMenu(true);A.addClass("subMenuOpen");n.addClass("jz_navbar_sub_menu_open");e.addClass("jz_navbar_sub_menu_open_1");if(I=="fold"||I=="fold2"){var H=e.find(".itemSelected a").css("background-color");Mobi.setCtrlStyleCssList("mobiStyleNav","",[{cls:".subMenuOpen",key:"background-color",value:H}])}if(I=="fold"||I=="fold2"){jm(D).insertAfter(A)}else{if(I=="panel"){n.append(D)}else{if(I=="panel2"){e.append(jm(D))}else{if(I=="bubble"||I=="bubble_horizon"||I=="dragDown"){jm("#g_web").append(jm(D))}}}}if(I=="bubble"||I=="dragDown"){setTimeout(function(){c(jm(".nav_offical_sub_menu_wrap"),v,I)},200)}else{if(I=="bubble_horizon"){a(jm(".nav_offical_sub_menu_wrap"),v)}}e.data("subMenuOpen",y.id);if(I=="panel"||I=="panel2"){jm(".parent_menu").on("click.nav",function(){Mobi.hideOfficalNavSubMenu()})}})})(t)}if(e.find(".nav_1_level").length>0){e.addClass("jz_subMenu_bar")}jm("body").off(b+".subMenu2").on(b+".subMenu2",function(v){if(jm(v.target).closest("#navbar").length<1&&e.data("subMenuOpen")>0){setTimeout(function(){Mobi.hideOfficalNavSubMenu()},200)}});if(m=="bubble_horizon"){e.off("scroll.subMenu").on("scroll.subMenu",function(){if(e.find(".subMenuOpen").length>0){Mobi.hideOfficalNavSubMenu()}})}l.on(b+".subMenu",function(){Mobi.hideOfficalNavSubMenu()});jm("#navExistOffPanel").off(b+".subMenu").on(b+".subMenu",function(){Mobi.hideOfficalNavSubMenu()});if(h==8||h==6||h==1||h==0){Mobi.showNavItemContainer()}function c(B,D,K){if(B.length<1||D.length<1){return}var H=jm("#g_web").offset(),L=D.offset(),C=H.width,y=B[0].offsetWidth,F=K=="dragDown"?0:0,z=L.left+(L.width-y)/2-F,J=z+y,E=J-H.left,w=J-H.left,I=jm("body")[0].offsetWidth,G=z-H.left<0,x=w>H.width,v,A;if(G||x){v=G?(z-H.left):(w-C)}z=G?(H.left+(0.5*_htmlFontSize)):z;z=x?z-(w-C):z;B.css({top:L.bottom+"px",left:z+"px"});if(v){A=(y/2)+v;jm(".nav_sub_menu_triangle2").css("left",A+"px")}}function a(D,F){if(D.length<1||F.length<1){return}var y=document.documentElement.scrollTop||document.body.scrollTop,x=y+q,w=y;var I=jm("#navbar").offset(),J=F.offset(),B=D.offset(),z=D[0].offsetWidth,H=J.top-(B.height-J.height)/2,A=I.left-z+1,G=H<=w,E=(H+B.height)>=x,v,C;if(G){H=_htmlFontSize+y;v=-(H+_htmlFontSize)}else{if(E){v=(H+B.height)-x+_htmlFontSize*0.5;H-=v}}D.css({top:H-y+"px",left:A+"px"});if(v){C=J.top-y;jm(".nav_sub_menu_triangle2").css("top",C+"px")}}};Mobi.checkSubMenuType=function(){var d="fold",a=Fai.top._templateLayoutId,c=[1022,1006],e=[1016,1008],b=[1005,1019],f=[1010,1020,326];switch(a){case 2:d="fold";break;case 0:case 3:case 6:d="bubble";break;case 4:d="panel";break;case 1:d="panel2";break;case 7:d="fold2";break;case 8:d="dragDown";break}if(c.indexOf(Fai.top._templateFrameId)>-1){d="panel"}else{if(e.indexOf(Fai.top._templateFrameId)>-1){d="bubble_horizon"}else{if(b.indexOf(Fai.top._templateFrameId)>-1){d="dragDown"}else{if(f.indexOf(Fai.top._templateFrameId)>-1){d="fold2"}}}}return d};Mobi.initOfficalSubMenu=function(b){var a=Mobi.checkSubMenuType(),c=jm("#navbar");Mobi.hideOfficalNavSubMenu(true);c.removeClass("jz_subMenu_fold jz_subMenu_fold2 jz_subMenu_bubble jz_subMenu_bubble_horizon jz_subMenu_panel jz_subMenu_panel2 jz_subMenu_dragDown jz_subMenu_"+b).addClass("jz_subMenu_"+a+" jz_subMenu_"+Fai.top._templateFrameId)};Mobi.hideOfficalNavSubMenu=function(b){var d=jm("#navbar"),c=Mobi.checkSubMenuType(),a=Fai.top._templateLayoutId;if(c=="fold"||c=="fold2"){Mobi.removeCtrlStyleCssList("mobiStyleNav","",[{cls:".subMenuOpen",keu:"background-color"}])}d.removeClass("jz_navbar_sub_menu_open_1");d.find(".subMenuOpen").removeClass("subMenuOpen");d.find(".jz_navbar_sub_menu_open").removeClass("jz_navbar_sub_menu_open");d.data("subMenuOpen",0);if(a==4&&!b){jm(".nav_offical_sub_menu_wrap").css({left:"100%",width:"0",height:"0"})}else{if(c=="panel2"&&!b){jm(".nav_offical_sub_menu_wrap").css({top:"100%"})}else{jm(".nav_offical_sub_menu_wrap").remove()}}};Mobi.getStyle=function(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle){c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}else{if(a.currentStyle){b=b.replace(/\-(\w)/g,function(d,e){return e.toUpperCase()});c=a.currentStyle[b]}}return c};Mobi.getFrameHeight=function(d){var c=parseInt(Mobi.getStyle(d,"padding-top").replace("px",""))+parseInt(Mobi.getStyle(d,"padding-bottom").replace("px",""));var b=parseInt(Mobi.getStyle(d,"margin-top").replace("px",""))+parseInt(Mobi.getStyle(d,"margin-bottom").replace("px",""));var a=parseInt(Mobi.getStyle(d,"border-top-width").replace("px",""))+parseInt(Mobi.getStyle(d,"border-bottom-width").replace("px",""));return a+b+c};Mobi.setModuleHeight2=function(a,l){var b=Mobi.getPreviewObject("module"+a);if(!b){return}var c=_htmlFontSize/20.5;l*=c;l=parseInt(l);b.style.height=l/_htmlFontSize+"rem";var e=b.querySelector(".formBannerTitle"+a);var h=b.querySelector(".formMiddle");var j=0;if(getComputedStyle(e).display!="none"){if(jm(b).hasClass("formStyle2")){j=2*_htmlFontSize}else{j=e.offsetHeight}}var f=l-j-Mobi.getFrameHeight(h);h.style.height=f/_htmlFontSize+"rem";var k=h.querySelector(".middleCenter");f=f-Mobi.getFrameHeight(k);var d=h.querySelector(".formMiddleContent");f=f-Mobi.getFrameHeight(d);d.style.height=f/_htmlFontSize+"rem";d.style.overflow="hidden";if(jm(b).hasClass("formStyle51")){h.querySelector(".J_packContentList").style.height=f/_htmlFontSize+"rem"}};Mobi.setModuleBannerHeight2=function(d,a){var c=Mobi.getPreviewObject("module"+d);var b=c.querySelector(".formBannerTitle");b.style.height=a/_htmlFontSize+"rem"};Mobi.scrollToModule=function(d){var b=jm("#module"+d),c=Mobi.getPreviewObject("webHeaderBox"),a=0;if(typeof b=="undefined"||b.length<1){return}if(jm(c).css("position")=="fixed"){a=parseInt(jm(c).height())}scrollElem=document.documentElement.scrollTop?document.documentElement:document.body;scrollElem.scrollTop=b.offset().top-a};Mobi.msgBoardShowMsg=function(a){jm(".notice").show();jm(".notice").html(a)};Mobi.msgBoardAddMsg=function(p,n,b){var a=jm("#reqName").val();var j=jm("#reqPhone").val();var k=jm("#reqEmail").val();var h=jm("#reqContent").val();var o=jm("#msgBoardCaptcha").val();var c=jm(".notice").show();var l=jm(".J_msgBoardCaptcha");var f=0;jm("input.msg_isMust").each(function(){var r=jm(this).attr("id");var s=jm(this).attr("placeholder");var q=jm(this).val();if(q==""||q==null){c.html(jm.format(LS.msgBoardInputIsEmpty,jm.encodeHtml(s)));Mobi.getPreviewObject(r).focus();f=1;return false}if(r=="reqPhone"&&!jm.isPhone(q)){c.html(jm.format(LS.msgBoardInputCorrect,jm.encodeHtml(s)));Mobi.getPreviewObject(r).focus();f=1;return false}if(r=="reqEmail"&&!jm.isEmail(q)){c.html(jm.format(LS.msgBoardInputCorrect,jm.encodeHtml(s)));Mobi.getPreviewObject(r).focus();f=1;return false}});if(f==1){return false}var e=0;jm("input.msg_ipt").each(function(){var r=jm(this).attr("id");var t=jm(this).attr("placeholder");var q=jm(this).val();var s=jm(this).attr("maxlength");if(q.length>s){c.html(jm.format(LS.msgBoardInputMaxLength,jm.encodeHtml(t),s));e=1;return false}if(r=="reqPhone"&&q.length&&!jm.isPhone(q)){c.html(jm.format(LS.msgBoardInputCorrect,jm.encodeHtml(t)));Mobi.getPreviewObject(r).focus();e=1;return false}if(r=="reqEmail"&&q.length&&!jm.isEmail(q)){c.html(jm.format(LS.msgBoardInputCorrect,jm.encodeHtml(t)));Mobi.getPreviewObject(r).focus();e=1;return false}});if(e==1){return false}if(h==null||h==""){Mobi.msgBoardShowMsg(LS.msgBoardInputContent);Mobi.getPreviewObject("reqContent").focus();return}var d=10000;if(h.length>d){Mobi.msgBoardShowMsg(jm.format(LS.msgBoardInputContent2,d));Mobi.getPreviewObject("reqContent").focus();return}if(!l.hasClass("msgBoardCaptchaHide")){if(o==null||o==""){Mobi.msgBoardShowMsg(LS.msgBoardInputValidateCode);Mobi.getPreviewObject("msgBoardCaptcha").focus();return}}Mobi.msgBoardShowMsg(LS.msgBoardDoing);var m={};jm("input.msg_ipt").each(function(){var r=jm(this).attr("id");var q=jm(this).val();m[r]=q.trim()});m.reqContent=h;m.memberId=(n===undefined)?0:n;jm.ajax({type:"post",url:"ajax/msgBoard_h.jsp",data:"cmd=add&msgBdData="+jm.encodeUrl(jm.toJSON(m))+"&validateCode="+jm.encodeUrl(o)+"&moduleId="+jm.encodeUrl(b),error:function(){Mobi.msgBoardShowMsg(LS.systemError)},success:function(q){q=jm.parseJSON(q);if(q.success){if(p){Mobi.ing(LS.msgBoardSendOkAutoOpen,1)}else{Mobi.ing(LS.msgBoardSendOk,1)}setTimeout(function(){Fai.top.location.reload()},1500)}else{if(q.errno==1){Mobi.msgBoardShowMsg(LS.captchaError)}else{if(q.errno==2){Mobi.msgBoardShowMsg(LS.argsError)}else{if(q.errno==-4){Mobi.msgBoardShowMsg(LS.msgBoardAddCountLimit)}else{Mobi.msgBoardShowMsg(LS.systemError)}}}if(q.needCode){Mobi.msgBoardShowMsg(q.msg);l.removeClass("msgBoardCaptchaHide")}if(q.hasFW){Mobi.ing(q.msg);jm(".notice").hide()}}Mobi.changeValidateCode(jm("#msgBoardCaptchaImg"))}})};Mobi.noticeLeftRightMarquee=function(e,A){var z={direction:"up",speed:"normal",loop:"infinite",moveout:false,isScrolling:false};jm.extend(z,e);if(z.speed=="normal"){jm.extend(z,{speed:70})}else{if(z.speed=="slow"){jm.extend(z,{speed:40})}else{jm.extend(z,{speed:100})}}jm("#noticeMarquee"+z.id).data("options",e);var n=z.id,w=Mobi.getPreviewObject("noticeMarquee"+n),h=w.offsetHeight,f=w.offsetWidth,q=0,a=w.querySelectorAll(".noticeMarqueeRow>span");for(var s=0;sd)?q:d;var E=z.direction,D=0,l="left",t=z.speed,C=(z.loop!="infinite"||z.loop<=0)?1:z.loop,o=false,F=z.isScrolling,y=z.noticeType,B=20,v=Mobi.createElementByHtml("
    ");var k="
    ";var j=Mobi.createElementByHtml("
    ");var p=Mobi.createElementByHtml(k);w.style.width=m+"px";function r(){c.appendChild(j);j.appendChild(p);p.appendChild(w);p.appendChild(v);if(!F){v.style.height=20+"px";v.style.width=d+"px"}else{v.appendChild(w.querySelector(".noticeMarqueeDiv").cloneNode(true))}if(E=="left"){D=h}else{D=0-m;if(F&&!o||!F&&!o){D=0}if(F&&o){D=-m}}if(o){w.style.left=0+"px"}else{w.style.left=D+"px"}if(E=="left"||E=="right"){w.style.top=0+"px"}b(E)}function b(G){if(G=="left"||G=="right"){p.style.position="relative";v.style.top=0+"px";if(G=="left"){if(F&&!o){p.style.width=m*2+"px";w.style.left=0+"px";v.style.left=m+"px"}if(F&&o){}if(!F&&!o){w.style.left=f+"px";v.style.left=m+d+"px"}if(!F&&o){}}else{w.style.width=m+"px";if(F&&!o){p.style.width=m*2+"px";w.style.paddingLeft=m+"px";p.style.left=-(m*2-d+23)+"px"}if(F&&o){p.style.width=m*2+"px";w.style.paddingLeft=m+"px";p.style.left=-(m*2-d+23)+"px"}if(!F&&!o){v.style.left=m+"px";p.style.left=-m+"px"}if(!F&&o){p.style.left=-(m+23)+"px";w.style.left=d+"px";v.style.left=0+"px"}}}}function x(H,J,K,I){var G;if(J=="left"){G=K?"mobi_notice_right_to_left_50":"mobi_notice_right_to_left"}else{if(J=="right"){G=K?"mobi_notice_left_to_right_50":"mobi_notice_left_to_right"}}return"-webkit-animation: "+G+" "+H/I+"s linear 1s infinite;-moz-animation: "+G+" "+H/I+"s linear 1s infinite;-o-animation: "+G+" "+H/I+"s linear 1s infinite;animation: "+G+" "+H/I+"s linear 1s infinite;"}function u(){if(E=="left"){var G=p.scrollLeft;G++;if(F&&!o){p.setAttribute("style",p.getAttribute("style")+x(m+d,E,F,t))}if(F&&o){}if(!F&&!o){p.setAttribute("style",p.getAttribute("style")+x(m+d,E,F,t))}if(!F&&o){p.className+=" mobi_notice_right_to_left";setTimeout(function(){p.style.left=d+"px"},15000)}}else{if(E=="right"){var G=p.scrollLeft;G--;if(F&&!o){p.setAttribute("style",p.getAttribute("style")+x(m+d,E,F,t))}if(F&&o){p.className+=" mobi_notice_left_to_right_50_"+t}if(!F&&!o){p.setAttribute("style",p.getAttribute("style")+x(m+d,E,F,t))}if(!F&&o){p.className+=" mobi_notice_left_to_right_"+t;setTimeout(function(){p.style.left=-(d+m+23)+"px"},15000)}}}}if(e!=null){r();u()}};Mobi.saveNoticeMarqueeProps=function(a){if(a!=null){jm("#noticeMarquee"+a.id).data("options",a)}jm("#module"+a.id).on("Fai_onModuleSizeChange",function(){Mobi.noticeMarquee(jm("#noticeMarquee"+a.id).data("options"),a.id)});jm("#module"+a.id).on("Fai_onModulePositionChange",function(){Mobi.noticeMarquee(jm("#noticeMarquee"+a.id).data("options"),a.id)})};Mobi.noticeMarqueeUpDown1=function(c){var b={direction:"top",speed:"normal",stopTime:1000};jm.extend(b,c);if("fast"===b.speed){jm.extend(b,{speed:500})}else{if("slow"===b.speed){jm.extend(b,{speed:1100})}else{jm.extend(b,{speed:850})}}var h=jm("#noticeScrollbar"+b.id+" li");if(h.length==1){var f=jm(h.get(0));var a="
  • "+f.html()+"
  • ";jm(a).insertAfter(f)}jm("#noticeScrollbar"+b.id).marquee({yScroll:b.direction,showSpeed:b.speed,pauseSpeed:b.stopTime,hoverChange:false});var e=jm("#module"+b.id+" .formMiddleContent");e.css("overflow","hidden");e.css("width","98%");var d=jm("#module"+b.id+" .formMiddleCenter");d.css("overflow","hidden")};Mobi.revertIcon=function(d){var c=jm("#module"+d);var b=false;var a=c.find(".noticeContainer").height();if(c.find(".noticeFontIcon").length!=0){b=true}if(b){c.find(".noticeFontIcon").css("font-size",21+"px").css("line-height",a+"px")}else{c.find(".noticeImg").css("width",21+"px").css("height",21+"px").css("margin-top",(a-21)/2/20.5+"rem")}};Mobi.noticeMarqueeUpDown=function(c){var w={direction:"top",speed:"normal",stopTime:1000};jm.extend(w,c);if("fast"===w.speed){jm.extend(w,{speed:500})}else{if("slow"===w.speed){jm.extend(w,{speed:1100})}else{jm.extend(w,{speed:850})}}var e=Mobi.getPreviewObject("noticeScrollbar"+w.id);if(e.length<1){return}var s=e.style,h=jm(e),v=e.querySelectorAll("li"),a=v.length,u="";if(a==1){var m="";if(a==1){m="
  • "+v[0].innerHTML+"
  • "+v[0].innerHTML+"
  • "}else{for(var q in v){m+="
  • "+v[q].innerHTML+"
  • "}}h.append(jm(m))}else{if(w.direction=="top"){u="
  • "+v[a-1].innerHTML+"
  • ";e.insertBefore(jm(u)[0],e.getElementsByClassName("scrollbarLi")[0])}else{u="
  • "+v[0].innerHTML+"
  • ";h.append(u)}}v=e.querySelectorAll("li");s[jm.feat.cssPrefix+"TransitionProperty"]="top";s[jm.feat.cssPrefix+"TransitionTimingFunction"]="ease";e.parentNode.style.height=v[0].offsetHeight+"px";var o=[];for(var t=0;t=0){clearTimeout(p)}var r=o.length-1,d=o.length,b=w.speed+"ms",f=0,l=jm.feat.cssPrefix+"TransitionDuration";if(v.length>1){n()}function n(){if(r0){jm.each(p,function(G,E){if(E.hide){return true}var B=E.id;var M=E.name;var C=E.must;var v=E.type;var I={};I.id=B;I.type=v;if(v==0){var K=jm("#M"+a+"F"+q+"siteFormInput"+B).val();if(C&&K==""){Mobi.ing(jm.format(LS.siteFormSubmitInputIsEmpty,jm.encodeHtml(M)));b=false;return false}if(K.length>l){Mobi.ing(jm.format(LS.siteFormSubmitInputMaxLength,jm.encodeHtml(M),l));b=false;return false}I.val=K}else{if(v==1){var r=jm("#M"+a+"F"+q+"siteFormTextArea"+B).val();if(C&&r==""){Mobi.ing(jm.format(LS.siteFormSubmitInputIsEmpty,jm.encodeHtml(M)));b=false;return false}if(r.length>d){Mobi.ing(jm.format(LS.siteFormSubmitInputMaxLength,jm.encodeHtml(M),d));b=false;return false}I.val=r}else{if(v==2){var x=document.querySelectorAll("input[name='M"+a+"F"+q+"siteFormRadioR"+B+"']:checked");if(C&&x.length==0){Mobi.ing(jm.format(LS.siteFormSubmitCheckIsEmpty,jm.encodeHtml(M)));b=false;return false}if(x.length>0){I.val=x[0].value}else{I.val=""}}else{if(v==3){var y=document.querySelectorAll("input[name='M"+a+"F"+q+"siteFormCheckboxR"+B+"']:checked");if(C&&y.length==0){Mobi.ing(jm.format(LS.siteFormSubmitCheckIsEmpty,jm.encodeHtml(M)));b=false;return false}var F=[];for(var G=0;G"+j+"",button_text_style:".fk_m_btText{text-align:center;font-family: 微软雅黑; color: #666666;font-size:"+m+"}",button_text_top_padding:10,file_queue_limit:1,requeue_on_error:false,post_params:{ctrl:"Filedata",app:21,type:0,isSiteForm:true},file_types:a.join(""),file_dialog_complete_handler:function(q){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(r,q,s){switch(q){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Mobi.ing(LS.siteFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Mobi.ing("不允许的文件类型",true);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Mobi.ing("一次只能上传一个文件",true);break;default:Mobi.ing("请重新选择文件上传。",true);break}},upload_success_handler:function(r,q){var s=jQuery.parseJSON(q);this._allSuccess=s.success;this._sysResult=s.msg;if(s.success){setTimeout(function(){Mobi.ing("文件上传成功",true)},2000);Mobi.onFileUploadEvent("upload",s,d,o)}else{Mobi.ing("文件"+r.name+","+s.msg)}},upload_error_handler:function(r,q,s){if(q==-280){Mobi.ing("文件取消成功",false)}else{if(q==-270){Mobi.ing("已经存在名称为"+r.name+"的文件。",true)}else{Mobi.ing("服务繁忙,文件"+r.name+"上传失败,请稍候重试。")}}},upload_complete_handler:function(q){if(q.filestatus==SWFUpload.FILE_STATUS.COMPLETE){setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(q.filestatus==SWFUpload.FILE_STATUS.ERROR){Mobi.ing("服务繁忙,文件"+q.name+"上传失败,请稍候重试。")}}},upload_start_handler:function(q){Mobi.ing("读取文件准备上传",false)},view_progress:function(q,t,s,r){var r=Math.ceil((t/s)*100);if(r==100){Mobi.ing("正在上传"+r+"%",true)}else{Mobi.ing("正在上传"+r+"%",false)}}};var e=document.createElement("script");e.type="text/javascript";e.src=c;e.onload=function(){var q=document.createElement("script");q.src=b;q.type="text/javascript";h.appendChild(q);q.onload=function(){swfObj=SWFUploadCreator.create(p);jm(".swfupload").css("vertical-align","middle")}};var h=document.documentElement||document.body;h.appendChild(e)};Mobi.siteFormFileUploadHtml=function(q,d,a,m,p,o,h,b,c,k,n){var l={siteFree:o,updateUrlViewRes:"updateUrlViewRes",auto:true,fileTypeExts:a.join(""),multi:false,fileSizeLimit:h*1024*1024,breakPoints:true,fileSplitSize:20*1024*1024,saveInfoLocal:false,showUploadedPercent:true,showUploadedSize:true,removeTimeout:9999999,post_params:{app:21,type:0,fileUploadLimit:h},isBurst:false,isDefinedButton:true,buttonText:n,getFileSizeUrl:"http://"+k+"/ajax/advanceUpload.jsp?cmd=_getUploadSize",uploader:"http://"+k+"/ajax/advanceUpload.jsp?cmd=_mobiupload",onUploadSuccess:function(s,u){var t=jQuery.parseJSON(u);if(t.success){var r={status:"end",id:s.id,title:"上传成功。"};j(r);Mobi.onFileUploadEvent("upload",t,d,q);setTimeout(function(){Mobi.ing("文件上传成功",true)},2500)}else{var r={status:"end",id:s.id,title:t.msg};j(r);Mobi.ing("文件:"+s.name+","+t.msg)}},onUploadError:function(r,s){$("#progressBody_ "+r.id).remove();$("#progressWrap_"+r.id).remove();Mobi.ing("网络繁忙,文件:"+r.name+"上传失败,请稍后重试")},onSelect:function(){if(m){Mobi.ing("已超过资源库容量限制,请升级网站版本。");return false}else{return true}},view_progress:function(r){var r=Math.ceil(r);if(r==100){Mobi.ing("正在上传"+r+"%",true)}else{Mobi.ing("正在上传"+r+"%",false,true)}}};function j(r){if(r.status=="start"){var s=['
    ','
    ','
    ','
    ','
    '+r.title+"
    ",'
    ','
    ','
    0%
    ',"
    ",'","
    ","
    "];$("body").append(s.join(""))}else{if(r.status=="ing"){$("#progressTitle"+r.id).text(r.title);$("#progress"+r.id).css("width",Math.round(r.percent)+"%");$("#progressNum"+r.id).html(Math.round(r.percent)+"%")}else{if(r.status=="end"){$("#progressTitle"+r.id).text(r.title);$("#progressBody_"+r.id).remove();$("#progressWrap_"+r.id).remove()}else{if(r.status=="error"){$("#progress"+r.id).addClass("progressError")}}}}}var e=document.createElement("script");e.type="text/javascript";e.src=b;e.onload=function(){var r=document.createElement("script");r.src=c;r.type="text/javascript";f.appendChild(r);r.onload=function(){upload=jm("#uploadButton"+d+q).uploadify(l)}};var f=document.documentElement||document.body;f.appendChild(e)};Mobi.onFileUploadEvent=function(p,m,q,j){if(p=="upload"){var e=m.id;var o=m.name;var c=m.type;var l=m.size;var k=m.path;var d=m.createTime;var a=m.groupId;var f="";var b=100;var n=100;var h=m.fileId;$("#module"+q).find("#siteForm"+q+"fileName"+j).html(o);$("#module"+q).find("#siteForm"+q+"fileName"+j).attr("_tmpFileId",e).attr("_tmpFileName",o).attr("title",o).attr("_fileId",h)}};Mobi.fixMobiFormDropdownItem=function(c,b,a){jm(jm("#M"+c+"F"+b+"siteFormSelect"+a+"").find("option")[0]).hide()};Mobi.fixIphoneStyle=function(c,b){var a=navigator.userAgent;if(a.indexOf("iPhone")>-1){jm("#module"+b+"").find(".F"+c+"siteFormItemShowVal").find("select").css({width:"85%",height:"2rem"})}};Mobi.siteFormSelectArea=function(c,e,d,b,h){var f;if(b==2052||b==1028){f=site_cityUtil.getProvince()}else{f=site_cityUtil.getProvinceEn()}var a=new MobileSelectArea();a.init({level:h,lcid:b,trigger:"#M"+d+"F"+e+"siteFormAddressInput"+c+"",value:jm("#M"+d+"F"+e+"siteFormAddressInput"+c+"").data("value"),data:f,eventName:"click",init:0})};Mobi.siteFormPhoneValidate=function(d,a){var e;e=d?jm("#module"+d).find("#"+a):jm("#"+a);var b;var c;if(e.length===0){return}e.keydown(function(f){c=f.which;if((c>47)&&(c<58)||(c>95)&&(c<106)||c===37||c===39||c===8){return true}else{return false}});e.keypress(function(f){c=f.which;if((c>47)&&(c<58)||(c>95)&&(c<106)){return true}else{return false}});e.on("input",function(h){var j=jm(this);var f=h.target.value;if(c!==8){if(f&&f.length>11){h.target.value=f.slice(0,11)}if(!f){h.target.value=(b==undefined?"":b)}}f=null;b=h.target.value;c=0});e.keyup(function(f){var h=jm(this);h.off("mousewheel.disabledScroll").on("mousewheel.disabledScroll",function(j){j.preventDefault()});h.get(0).addEventListener("DOMMouseScroll",function(j){j.preventDefault()},false);if(f.keyCode==38||f.keyCode==40){f.preventDefault()}})};Mobi.initmobiFormTimeBtn=function(f){var e=jm("#webFooterBox"),b="#Mobi"+f.moduleId+"Calendar"+f.siteFormItemId+"Plugins",a=jm(b),v=f.dateSetting,u=JSON.parse(JSON.stringify(v.od.unSelectDay)).sort(),t=(v.type==0&&v.accuracy==1),p=v.type==1,d=new Date(),w=new Date(d.getFullYear(),d.getMonth(),d.getDate()),n=[{elem:a,isStart:true}],l,j,c,o,m,q,k;if(p){o="#Mobi"+f.moduleId+"Calendar"+f.siteFormItemId+"Plugins_end";n.push({elem:jm(o),isStart:false})}else{for(var r=0;r<24;r++){if(jm.inArray(r,v.ot.unSelectTime)==-1){q=r;break}}}for(r=0;r请选择开始日期":"
    请选择结束日期
    "}z.Calendar({inputExtClass:y,minDate:B,yearChangeable:f.yearChangeable,monthChangeable:f.monthChangeable,slideAble:true,placeholder:f.placeholder,showHour:t,minHour:q||0,drawNavHeaderHtml:D,onBeforeInitCalendar:function(F){var E=F._options;if(F._container.hasClass("fk-startDateInput")){F._option("minDate",B);F._option("maxDate",null)}F._input[0].blur();e.addClass("fk-datepickerContainer")},onBeforeCancel:function(F){var E;if(p&&A){E=F.getTargetOption(F._container[0].id+"_end");E._hideDate(E._container,E)}},beforeShowTime:function(E,F){if(v.ot.unSelectTime.length>0&&jm.inArray(E,v.ot.unSelectTime)>-1){return false}return true},beforeShowDay:function(E,F){return h(E)},onAfterRefresh:function(G){var F=G._options,E;if(p){G._container.find(".ui-state-active").addClass("ui-state-active-hide");if(!A){G._container.find("td").not(".ui-calendar-unSelectable").eq(0).find(".ui-state-default").addClass("ui-calendar-startDate")}}},onSelectDate:function(J,K){if(!p){return}var H=J.replace(/-/g,"/"),M=new Date(H),R=new Date(M.getFullYear(),M.getMonth(),M.getDate()).getTime(),L={minDate:B,maxDate:null},F=K._container.hasClass("fk-startDateInput"),I,G,E,O,Q,N,P;if(F){L.minDate=M;if(v.banAll==1||v.banHoliday==1||u.length>0){for(r=1;r<365;r++){P=new Date(R+(r*86400000));if(!h(P)){L.maxDate=P;break}}}}if(F){E=K.getTargetOption(K._container[0].id+"_end");Q=E._input.val();N=typeof Q=="string"?Q.replace(/-/g,"/"):"";O=new Date(N).getTime();if(!!O&&((!!L.minDate&&OL.maxDate.getTime()))){E._input.val("")}}else{E=K.getTargetOption(K._container[0].id.replace("_end",""))}if(!!E){E._option("minDate",new Date(L.minDate));E._option("maxDate",L.maxDate!=null?new Date(L.maxDate):null);E.switchMonthTo(K._options._selectedMonth,K._options._selectedYear);E.refresh()}},onAfterSelectDate:function(E,F){if(A){}},onAfterHidePicker:function(E){if((p&&!A)||!p){e.removeClass("fk-datepickerContainer")}}})})(r)}if(p){j=jm(o+"input");l=jm(b+"input");jm("#Mobi"+f.moduleId+"CalendarInput"+f.siteFormItemId).insertBefore(j);s(l,o,b);s(j,o,b)}function s(C,x,z){var y,A,B;A=jm("
    ");y=jm("
    ");A.insertAfter(C);A.append(C);A.append(y);y.on("click",function(){jm(x+"input").trigger("click");jm(z+"input").trigger("click")})}function h(z){var y=true,x=z.getDay(),A=z.getTime();if(v.banAll==1){y=false}if(x==0||x==6){if(v.banHoliday==1){y=false}else{y=true}}if(v.od.t==1&&jm.inArray(A,v.od.unSelectDay)>-1){y=false}if(v.od.t==1&&jm.inArray(A,v.od.openDay)>-1){y=true}return y}};Mobi.voidFun=function(){};Mobi.codeInsertButtom=function(d){var b=/document.write/g;d=d.replace(b,"Mobi.voidFun");var a=document.createElement("script");a.type="text/javascript";try{a.appendChild(document.createTextNode(d))}catch(c){a.text=d}document.body.appendChild(a)};Mobi.storageReturnUrl=function(a){if(!a.match(/login.jsp$/)){localStorage.setItem("returnUrl",jm.encodeUrl(a))}};Mobi.loadReturnUrl=function(a){var c=localStorage.getItem("returnUrl");var b=false;if(a.indexOf("?")!=-1){b=true}if(c){if(b){document.location.href=a+"&returnUrl="+c}else{document.location.href=a+"?returnUrl="+c}}else{if(b){document.location.href=a+"&noReturn=true"}else{document.location.href=a+"?noReturn=true"}}};Mobi.mobileFastLoginToggle=function(){jm(".forAcctLogin").hide();jm(".forFastLogin").show();jm(".forFastLogin").css("display","inline-block")};Mobi.acctLoginToggle=function(){jm(".forAcctLogin").show();jm(".forFastLogin").hide();jm(".forAcctLogin").css("display","inline-block")};Mobi.loginAcquireCode=function(){var a=jm("#acquirerInput").val();if(Mobi.isNull(a)||!a){return false}if(!jm.isMobile(a)){Mobi.ing(LS.mobileNumRegular);return false}jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=sendMobileLoginCode",data:"memName="+jm.encodeUrl(a)+"&new=true",error:function(){Mobi.ing(LS.systemError)},success:function(b){var b=jm.parseJSON(b);if(b.success){Mobi.loginAcquireCodeCountdown(60);jm("#memCodeSign").val(b.mobileCodeSign)}else{if(b.argErr){Mobi.ing(LS.memberDialogSendMobileClose)}else{if(b.apiKeyNotFound){Mobi.ing(LS.memberDialogYunPianErr)}else{if(b.tplNotFound){Mobi.ing(LS.memberDialogMobileTplErr)}else{if(b.notFound){Mobi.ing(LS.memberDialogNotFound)}else{if(b.limitOne){Mobi.ing(LS.getMobileOneMin)}else{if(b.limitTwo){Mobi.ing(LS.getMobileHalfHour)}else{if(b.noMoney){Mobi.ing(LS.memberDialogMobileMoneyErr)}else{if(b.mobileErr){Mobi.ing(LS.memberDialogSendMobileCodeErr)}else{if(b.sendLimit){Mobi.ing(LS.memberDialogSendMobileCodeLimit)}else{if(b.mobileSysErr){Mobi.ing(LS.memberDialogSendMobileSysErr)}else{if(b.tplNationErr){Mobi.ing(LS.mobileNationTplErr)}else{if(b.systemErr){Mobi.ing(LS.systemError)}else{Mobi.ing(LS.argsError)}}}}}}}}}}}}}}})};Mobi.loginAcquireCodeCountdown=function(b){jm("#acquireCode").attr("onclick","");var a=setInterval(function(){jm("#acquireCode").attr("onclick","");jm("#acquireCode").text(jm.format(LS.reacquireMemCode,b));if(b<0){clearInterval(a);jm("#acquireCode").text(LS.memberDialogAcquireCode);jm("#acquireCode").attr("onclick","Mobi.loginAcquireCode();return false;")}b--},1000)};Mobi.fastLogin=function(url,mid,fid){var acquirer=jm("#acquirerInput").val();var code=jm("#memCodeInput").val();var memCodeSign=jm("#memCodeSign").val();var needCaptcha=(jm(".loginCaptchaCtrl").css("display")!="none");var captcha=jm("#loginCaptcha").val();if(mid!=null&&fid!=null){jm.cookie("_moduleid",mid);jm.cookie("_fileid",fid)}if(acquirer==null||acquirer==""){Mobi.showMemberLoginMsg(4,false);return}if(code==null||code==""){Mobi.showMemberLoginMsg(5,false);return}if(needCaptcha&&(captcha==null||captcha=="")){Mobi.showMemberLoginMsg(3,false);return}var loginBtn=jm(".loginSubmit");loginBtn.attr("disabled",true);jm(".g_botton").removeClass("sendIcon");var autoLoginBtn=jm("#autoLogin");var autoLogin=false;if(autoLoginBtn&&autoLoginBtn.prop("checked")){autoLogin=true}var data="memCode="+jm.encodeUrl(code)+"&memCodeSign="+jm.encodeUrl(memCodeSign)+"&acquirer="+jm.encodeUrl(acquirer)+"&mode="+jm.encodeUrl("mobile");jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=checkMobileCodeGeneral",data:data,error:function(){Mobi.ing(LS.systemError)},success:function(result){var result=jm.parseJSON(result);if(result.success){var memId=result.memId;jm.ajax({type:"post",url:"ajax/login_h.jsp",data:"cmd=loginMemberByMobile&memId="+jm.encodeUrl(memId)+"&captcha="+jm.encodeUrl(captcha)+"&autoLogin="+jm.encodeUrl(autoLogin),error:function(){loginBtn.removeAttr("disabled");Mobi.showMemberLoginMsg(-1)},success:function(result){loginBtn.removeAttr("disabled");var result=jm.parseJSON(result);if(result.success){jm("#_TOKEN").attr("value")||jm("#g_web").append("");Mobi.mallBuyLoginCheck();if(url.indexOf("javascript")==-1){Fai.top.location.href=url;return}else{var methods=url.split(";");for(var i=0;i");Mobi.mallBuyLoginCheck();if(url.indexOf("javascript")==-1){Fai.top.location.href=url;return}else{var methods=url.split(";");for(var i=0;i");l.push("
    ");l.push("
    "+k+"
    ");l.push("");l.push("
    ");l.push("
    ");l.push("
    ");l.push("
    ");l.push("");l.push("
    ");l.push("
    ");if(e=="other_qq"){l.push("")}else{if(e=="other_wb"){l.push("")}else{if(e=="other_wx"){l.push("")}}}l.push("
    ");jm("#bindOrLogin").parents(".g_web, .middleCenter").css("background","#f0f0f5");if(!jm("#bindOrLogin .loginContent").children().length){jm("#bindOrLogin .loginContent").append(l.join(""))}jm("#mLogin").hide();jm("#bindOrLogin").show();jm("#bindOrLogin #bindOrLoginBack").click(function(){jm("#bindOrLogin").hide();jm("#mLogin").show()})};Mobi.bindOtherAcctFirst=function(d,a,b,e){if(d=="other_qq"){d=1}else{if(d=="other_wb"){d=2}else{if(d=="other_wx"){d=4}}}var c="
    ";c+=" ";c+="
    ";c+="
    ";c+=" ";c+="
    ";c+="
    ";c+="";c+="
    ";if(!jm("#bindNow .loginContent").children().length){jm("#bindNow .loginContent").append(c)}jm("#bindOrLogin").hide();jm("#bindNow").show();jm("#bindNow #bindNowBack").click(function(){jm("#bindNow").hide();jm("#bindOrLogin").show()})};Mobi.memberOtherLoginFill=function(j,a,c,l,f,e,h,b){var m=[];m.push("
    ");if(f==1||f==4){m.push("
    ")}else{m.push("
    ")}m.push("
    "+a+"
    ");m.push("
    ");m.push("
    ");m.push("
    ");m.push("
    "+LS.memberOtherLgnLastStep+"
    ");m.push("
    ");var d="";if(Mobi.checkHasMobileOption(j)){d="tagWidth8"}var k="";jm.each(j,function(p,t){var r="";if(t.otherLoginMust){if("email"==t.fieldKey){k="icon-emailIcon g_mainColor"}else{if("phone"==t.fieldKey){k="icon-phoneIcon g_mainColor"}else{if("name"==t.fieldKey){k="icon-nameIcon g_mainColor"}else{k="icon-customIcon g_mainColor";r="customIcon"}}}var s="";if(t.placeholder==t.name){s=LS.memberOtherLgnPleaseInput+t.name}else{s=t.placeholder}if("mobile"==t.fieldKey){m.push("
    ");m.push("");m.push(""+LS.mobileAreaCode+"");m.push("
    ")}if(t.dropDownType){m.push("
    ");if(t.must){m.push("");m.push("")}var q=t.dropDownContent.split("&");for(var p=0;p"+q[p]+"")}m.push("");if(r!=""){m.push(""+t.name+"")}m.push("
    ")}else{m.push("
    ");if(t.must){m.push("")}else{m.push("")}if(r!=""){m.push(""+t.name+"")}m.push("
    ")}}});if(h){m.push("
    ");m.push("
    ");m.push("
    ");m.push("
    ");m.push("
    "+LS.getMobileCode+"
    ");m.push("
    ")}m.push("
    ");m.push("");m.push("
    ");jm("#fillAcctInfo").parents(".g_web, .middleCenter").css("background","#f0f0f5");if(!jm("#fillAcctInfo .loginContent").children().length){jm("#fillAcctInfo .loginContent").append(m.join(""))}jm("#mLogin").hide();jm("#bindOrLogin").hide();jm("#fillAcctInfo").show();jm("#fillAcctInfo #fillInfoBack").click(function(){jm("#fillAcctInfo").hide();jm("#mLogin").show()})};Mobi.memberOtherLoginAdd=function(b,c,l,k,d,e,j,f,h,a){var m=[];m.push("
    ");if(j==1||j==4){m.push("
    ")}else{m.push("
    ")}m.push("
    "+b+"
    ");m.push("
    ");m.push("
    ");if(j==1){m.push("
    "+LS.memberOtherLgnQQUser+":
    ")}else{if(j==2){m.push("
    "+LS.memberOtherLgnWBUser+":
    ")}else{m.push("
    "+LS.memberOtherLgnWXUser+":
    ")}}m.push("
    "+LS.memberOtherLgnBindAcctMsg+"
    ");m.push("
    ");m.push("
    ");m.push("
    "+LS.memberOtherLgnHaveAcct+"
    ");m.push("
    "+LS.memberOtherLgnBindNow+"
    ");m.push("
    "+LS.memberOtherLgnNotAcct+"
    ");m.push("");m.push("
    ");if(!jm("#bindAcct .loginContent").children().length){jm("#bindAcct .loginContent").append(m.join(""))}jm("#mLogin").hide();jm("#bindAcct").show();jm("#bindAcct #bindBack").click(function(){jm("#bindAcct").hide();jm("#mLogin").show()});jm("#signUp").click(function(){Mobi.signUp(k,d,e,j,c,l,f,h,a)})};Mobi.bindOtherAcct=function(f,e,a,d,c,b){jm("#changeOtherLoginAcct").click(function(){Mobi.logDog(200199,4);var k=jm.cookie("isOtherLogin");var j=true;var h="
    ";h+=" ";h+="
    ";h+="
    ";h+=" ";h+="
    ";h+="
    ";h+="";h+="
    ";h+="
    "+LS.memberSignUpNewAcct+"
    ";if(!jm("#bindOtherAcct .loginContent").children().length){jm("#bindOtherAcct .loginContent").append(h)}jm("#profile").hide();jm("#bindOtherAcct").show();jm("#bindOtherAcct #bindAcctBack").click(function(){jm("#bindOtherAcct").hide();jm("#profile").show()});jm("#signUp").click(function(){Mobi.logDog(200199,6);Mobi.signUp(f,e,a,d,k,c,b)})})};Mobi.signUp=function(f,k,a,c,h,e,j){var d=false;var m=[],b="";k=jm.parseJSON(k);e=jm.parseJSON(e);if(Mobi.checkHasMobileOption(k)){b="tagWidth8"}var l="";m.push("
    ");m.push("");m.push("
    ");m.push("
    ");m.push("");m.push("
    ");m.push("
    ");m.push("");m.push("
    ");jm.each(k,function(p,s){var q="";if("email"==s.fieldKey){l="icon-emailIcon g_mainColor"}else{if("phone"==s.fieldKey){l="icon-phoneIcon g_mainColor"}else{if("name"==s.fieldKey){l="icon-nameIcon g_mainColor"}else{l="icon-customIcon g_mainColor";q="customIcon"}}}var r="";if(s.placeholder==s.name){r=LS.memberOtherLgnPleaseInput+s.name}else{r=s.placeholder}if("mobile"==s.fieldKey){m.push("
    ");m.push("");m.push(""+LS.mobileAreaCode+"");m.push("
    ")}m.push("
    ");if(s.must){m.push("")}else{m.push("")}if(q!=""){m.push(""+s.name+"")}m.push("
    ")});if(a){m.push("
    ");m.push("");m.push("
    ")}if(j){m.push("
    ");m.push("
    ");m.push("
    ");m.push("
    ");m.push("
    "+LS.getMobileCode+"
    ");m.push("
    ")}if(h==1){m.push("
    "+LS.signByQQCanLogin+"
    ")}else{if(h==2){m.push("
    "+LS.signByWbCanLogin+"
    ")}else{m.push("
    "+LS.signByWXCanLogin+"
    ")}}m.push("
    ");m.push("");m.push("
    ");if(!jm("#mSignUp .loginContent").children().length){jm("#mSignUp .loginContent").append(m.join(""))}jm("#mSignUp").show();jm("#bindOtherAcct").hide();jm("#mSignUp #signUpBack").click(function(){jm("#mSignUp").hide();jm("#bindOtherAcct").show()})};Mobi.checkHasMobileOption=function(b){var c=false;if(b){for(var a=0;a0){q=jm("#memberSignupRemark").val();var v=jm("#memberSignupRemark").attr("maxlength");if(q.length>v){Mobi.ing(jm.format(LS.memberSignupRegisterRemarkMaxLength,v));Mobi.getPreviewObject("memberSignupRemark").focus();return}}u.acct=m;u.pwd=jm.md5(e);u.remark=q;var b="";var s="";var f="";var t=0;var n="";var d=0;var k="";jm("#mSignUp .userAddItem").each(function(){userAddItemID=jm(this).attr("id");f=jm(this).val();b=jm(this).attr("name");n=jm(this).attr("maxlength");u[userAddItemID]=f;if(typeof(n)!="undefined"&&n!=null&&f.length>n){Mobi.ing(jm.format(LS.memberSignupUserAddItemMaxLength,b,n));Mobi.getPreviewObject(userAddItemID).focus();t=1;return false}if(userAddItemID=="email"&&f.length>0){if(!jm.isEmail(f)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,b));Mobi.getPreviewObject(userAddItemID).focus();d=1;return false}}if(userAddItemID=="mobile"&&f.length>0){if(!jm.isNationMobile(f)){Mobi.ing(LS.mobileNumRegular);Mobi.getPreviewObject(userAddItemID).focus();d=1;return false}else{u.mobileCt=jm("#mobileCt").val()}}});if(d==1){return}if(t==1){return}if(typeof(jm("#messageAuthCode").attr("maxlength"))!="undefined"&&jm("#messageAuthCode").attr("maxlength")!=null){var c=jm("#memberSignupCaptcha").val();if(typeof(c)=="undefined"||c==null||c==""){Mobi.ing(LS.memberInputCaptcha);return false}var o=jm("#messageAuthCode").val();if(typeof(o)=="undefined"||o==null||o==""){Mobi.ing(LS.inputMobileCode);return false}u.messageAuthCode=o}var j=0;jm(".isCheckUAI").each(function(){userAddItemID=jm(this).attr("id");f=jm(this).val();b=jm(this).attr("name");if(f==null||f==""){if(jm(this).is("input")){Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty,b))}else{Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty2,b))}Mobi.getPreviewObject(userAddItemID).focus();j=1;return false}if(userAddItemID=="email"&&f.length>0){if(!jm.isEmail(f)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,b));Mobi.getPreviewObject(userAddItemID).focus();j=1;return false}}});if(j==1){return}}jm.ajax({type:"post",url:"ajax/member_h.jsp?"+r,data:"info="+jm.encodeUrl(jm.toJSON(u))+"&mid="+l+"&loginType="+h,error:function(){Mobi.ing(LS.memberSignupRegisterError)},success:function(w){var x=jm.parseJSON(w);if(x.success){if(x.fromBind){Mobi.memberActive(x.mail,x.memName)}else{if(x.active){Mobi.memberActive(u.email,u.acct)}else{document.location.reload()}}}else{if(x.msg=="该帐号已绑定到其他帐号"){Mobi.ing(LS.hasBindOtherAcct)}else{if(x.rt==-401){Mobi.ing(LS.memberSignupRegisterCaptchaNotMatch)}else{if(x.rt==-601){Mobi.ing(LS.reGetMobileCode)}else{if(x.rt==-8){Mobi.ing(LS.mobileHasSigned)}else{if(x.rt==-6){Mobi.ing(LS.memberSignupRegisterExisted)}else{if(x.rt==-4){Mobi.ing(LS.memberSignupRegisterLimit)}else{if(x.rt==-3){Mobi.ing(LS.memberDialogNotFound)}else{if(x.rt==Mobi.otherLoginErrno.acctAlreadyBind){Mobi.ing(LS.memberOtherLgnAcctAlreadyBind)}else{Mobi.ing(LS.memberSignupRegisterError)}}}}}}}}}}})};Mobi.memberOtherLoginSubmit=function(name,loginType,openId,url,avator){var cmd="cmd=otherAdd";var info={};info.headImgUrl=avator;info.acct=name;var userAddItemName="";var userAddItemId="";var userAddItemValue="";var isUserAddItemNameTooLong=0;var userAddItemMaxLength="";var isUserAddItemPass=0;var userAddItemType="";jm("#fillAcctInfo .userAddItem").each(function(){userAddItemID=jm(this).attr("id");userAddItemValue=jm(this).val();userAddItemName=jm(this).attr("name");userAddItemMaxLength=jm(this).attr("maxlength");info[userAddItemID]=userAddItemValue;if(typeof(userAddItemMaxLength)!="undefined"&&userAddItemMaxLength!=null&&userAddItemValue.length>userAddItemMaxLength){Mobi.ing(jm.format(LS.memberSignupUserAddItemMaxLength,userAddItemName,userAddItemMaxLength));Mobi.getPreviewObject(userAddItemID).focus();isUserAddItemNameTooLong=1;return false}if(userAddItemID=="email"&&userAddItemValue.length>0){if(!jm.isEmail(userAddItemValue)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,userAddItemName));Mobi.getPreviewObject(userAddItemID).focus();isUserAddItemPass=1;return false}}if(userAddItemID=="mobile"&&userAddItemValue.length>0){if(!jm.isNationMobile(userAddItemValue)){Mobi.ing(LS.mobileNumRegular);Mobi.getPreviewObject(userAddItemID).focus();isUserAddItemPass=1;return false}else{info.mobileCt=jm("#mobileCt").val()}}});if(isUserAddItemPass==1){return}if(isUserAddItemNameTooLong==1){return}if(typeof(jm("#messageAuthCode").attr("maxlength"))!="undefined"&&jm("#messageAuthCode").attr("maxlength")!=null){var memberSignupCaptcha=jm("#memberSignupCaptcha").val();if(typeof(memberSignupCaptcha)=="undefined"||memberSignupCaptcha==null||memberSignupCaptcha==""){Mobi.ing(LS.memberInputCaptcha);return false}var messageAuthCode=jm("#messageAuthCode").val();if(typeof(messageAuthCode)=="undefined"||messageAuthCode==null||messageAuthCode==""){Mobi.ing(LS.inputMobileCode);return false}info.messageAuthCode=messageAuthCode}var isCheckUAIStatus=0;jm(".isCheckUAI").each(function(){userAddItemID=jm(this).attr("id");userAddItemValue=jm(this).val();userAddItemName=jm(this).attr("name");if(userAddItemValue==null||userAddItemValue==""){if(jm(this).is("input")){Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty,userAddItemName))}else{Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty2,userAddItemName))}Mobi.getPreviewObject(userAddItemID).focus();isCheckUAIStatus=1;return false}if(userAddItemID=="email"&&userAddItemValue.length>0){if(!jm.isEmail(userAddItemValue)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,userAddItemName));Mobi.getPreviewObject(userAddItemID).focus();isCheckUAIStatus=1;return false}}});if(isCheckUAIStatus==1){return}var unionId="";if(typeof(Mobi.w_unionId)!="undefined"&&Mobi.w_unionId){unionId=Mobi.w_unionId}jm.ajax({type:"post",url:"ajax/member_h.jsp?"+cmd,data:"info="+jm.encodeUrl(jm.toJSON(info))+"&loginType="+loginType+"&openId="+encodeURIComponent(openId)+"&unionId="+encodeURIComponent(unionId),error:function(){Mobi.ing(LS.memberSignupRegisterError)},success:function(result){var data=jm.parseJSON(result);if(data.success){Mobi.mallBuyLoginCheck();if(data.rt==0){Fai.top.location.href="/login.jsp?errno=-303"}else{if(data.fromBind){Mobi.memberActive(data.mail,data.memName)}else{if(data.active){Mobi.memberActive(info.email,data.acct)}else{if(url.indexOf("javascript")==-1){Fai.top.location.href=url;return}else{var methods=url.split(";");for(var i=0;i0){p=jm("#memberSignupRemark").val();var v=jm("#memberSignupRemark").attr("maxlength");if(p.length>v){Mobi.ing(jm.format(LS.memberSignupRegisterRemarkMaxLength,v));Mobi.getPreviewObject("memberSignupRemark").focus();return}}var t={};t.acct=k;t.pwd=jm.md5(d);t.remark=p;t.signUpbyMobile=l;t.signUpbyMail=u;if(typeof(jm("#messageAuthCode").attr("maxlength"))!="undefined"&&jm("#messageAuthCode").attr("maxlength")!=null){var n=jm("#messageAuthCode").val();if(typeof(n)=="undefined"||n==null||n==""){Mobi.ing(LS.inputMobileCode);Mobi.getPreviewObject("messageAuthCode").focus();return}else{t.messageAuthCode=n}}var a="";var q="";var e="";var s=0;var m="";var j="";var c=0;jm(".userAddItem").each(function(){userAddItemID=jm(this).attr("id");e=jm(this).val();a=jm(this).attr("name");m=jm(this).attr("maxlength");t[userAddItemID]=e;if(typeof(m)!="undefined"&&m!=null&&e.length>m&&j=="input"){Mobi.ing(jm.format(LS.memberSignupUserAddItemMaxLength,a,m));Mobi.getPreviewObject(userAddItemID).focus();s=1;return false}if(userAddItemID=="email"&&e.length>0){if(!jm.isEmail(e)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,a));Mobi.getPreviewObject(userAddItemID).focus();c=1;return false}}if(userAddItemID=="mobile"&&e.length>0){if(!jm.isNationMobile(e)){Mobi.ing(LS.mobileNumRegular);Mobi.getPreviewObject(userAddItemID).focus();c=1;return false}}if(userAddItemID=="mobile"&&e.length<=0){t.mobileCt=""}});if(c==1){return}if(s==1){return}var h=0;jm(".isCheckUAI").each(function(){userAddItemID=jm(this).attr("id");e=jm(this).val();a=jm(this).attr("name");if(e==null||e==""){if(jm(this).is("input")){Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty,a))}else{Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty2,a))}Mobi.getPreviewObject(userAddItemID).focus();h=1;return false}if(userAddItemID=="email"&&e.length>0){if(!jm.isEmail(e)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,a));Mobi.getPreviewObject(userAddItemID).focus();h=1;return false}}});if(h==1){return}if(jm(".J_memberSignupCaptcha").css("display")!="none"){var f=jm("#memberSignupCaptcha").val();if(f==null||f==""||typeof(f)=="undefined"){Mobi.ing(LS.memberSignupRegisterCaptchaEmpty);Mobi.getPreviewObject("memberSignupCaptcha").focus();return}}else{if(f==null||f==""||typeof(f)=="undefined"){f=""}}var r=jm("#memberAgreePro");if(r.length>0){if(!r.prop("checked")){Mobi.ing(LS.memberAgreeProtocol);return}}Mobi.ing(LS.memberSignupRegisterIng);jm(".g_button").removeClass("sendIcon");jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=add",data:"info="+jm.encodeUrl(jm.toJSON(t))+"&validateCode="+f,error:function(){Mobi.ing(LS.memberSignupRegisterError)},success:function(w){var x=jm.parseJSON(w);if(x.success){if(x.active){Mobi.memberActive(t.email,x.acct,b,function(){})}else{if(x.rt==0){Fai.top.location.href="login.jsp?errno=-303"}setTimeout(function(){if(b){Mobi.autoLogin(x.acct,d,b)}else{Fai.top.location.href="login.jsp?errno=12"}},3000)}}else{jm(".g_button").addClass("sendIcon");jm(".loginIcon ").hide();jm("#signupCaptchaImg").attr("src","validateCode.jsp?"+Math.random()*1000);jm("#memberSignupCaptcha").val("");if(x.rt==-401){Mobi.ing(LS.memberSignupRegisterCaptchaNotMatch);if(x.needCode){jm(".J_memberSignupCaptcha").removeClass("memberSignupCaptchaHide")}}else{if(x.rt==-601){Mobi.ing(LS.reGetMobileCode)}else{if(x.rt==-8){Mobi.ing(LS.mobileHasSigned)}else{if(x.rt==-6){Mobi.ing(LS.memberSignupRegisterExisted)}else{if(x.rt==-4){Mobi.ing(LS.memberSignupRegisterLimit)}else{if(x.rt==-28){Mobi.ing(LS.memberRegisterLimit)}else{if(x.rt==-20){Mobi.ing(x.msg)}else{if(x.rt==-1001){Mobi.showPluralPopup("email",x.headImg,x.name,x.acct,d,t,b)}else{if(x.rt==-1002){Mobi.showPluralPopup("mobile",x.headImg,x.name,x.acct,d,t,b)}else{Mobi.ing(LS.memberSignupRegisterError)}}}}}}}}}if(x.hasFW){Mobi.ing(x.msg)}}}})};Mobi.showPluralPopup=function(h,f,a,m,l,d,b){var o=h=="email"?LS.emailAcct:LS.mobileNum,n=h=="email"?d.email:d.mobile,e=h=="email"?"ajax/member_h.jsp?cmd=proceedAfterMail":"ajax/member_h.jsp?cmd=proceedAfterMobile";var k=Mobi.isNull(a)||a==""||a=="null"?m:a;var j=[];j.push("
    ");j.push(" ");j.push("
    ");j.push("
    ");j.push(" "+k+"");j.push(" "+Fai.format(LS.alreadyHasAnAcct,o)+"");j.push("
    ");var p={textClass:"proceed",cancelClass:"loginInstantly",content:j.join(""),callback:function(){c()},cancelCallback:function(){Fai.top.location.href="login.jsp"}};Mobi.prompt(p);function c(){var r=[];r.push("
    ");r.push("
    ");r.push("");r.push("");r.push("
    ");r.push("
    ");r.push("
    "+Fai.format(LS.warningBeforeProceedRegistry,n)+"
    ");var q={textClass:"confirm",content:r.join(""),callback:function(){jm.ajax({type:"post",url:e,data:"info="+jm.encodeUrl(jm.toJSON(d)),error:function(){Mobi.ing(LS.memberSignupRegisterError)},success:function(s){var t=jm.parseJSON(s);if(t.success){if(t.active){Mobi.memberActive(d.email,t.acct,b,function(){})}else{if(t.rt==0){Fai.top.location.href="login.jsp?errno=-303"}setTimeout(function(){if(b){Mobi.autoLogin(m,l,b)}else{Fai.top.location.href="login.jsp?errno=12"}},3000)}}else{jm(".g_button").addClass("sendIcon");jm(".loginIcon ").hide();jm("#signupCaptchaImg").attr("src","validateCode.jsp?"+Math.random()*1000);jm("#memberSignupCaptcha").val("");if(t.rt==-401){Mobi.ing(LS.memberSignupRegisterCaptchaNotMatch);if(t.needCode){jm(".J_memberSignupCaptcha").removeClass("memberSignupCaptchaHide")}}else{if(t.rt==-601){Mobi.ing(LS.reGetMobileCode)}else{if(t.rt==-8){Mobi.ing(LS.mobileHasSigned)}else{if(t.rt==-6){Mobi.ing(LS.memberSignupRegisterExisted)}else{if(t.rt==-4){Mobi.ing(LS.memberSignupRegisterLimit)}else{if(t.rt==-28){Mobi.ing(LS.memberRegisterLimit)}else{if(t.rt==-20){Mobi.ing(t.msg)}else{if(t.rt==-1001){Mobi.showPluralPopup("email",t.headImg,t.name,t.acct,l,d,b)}else{if(t.rt==-1002){Mobi.showPluralPopup("mobile",t.headImg,t.name,t.acct,l,d,b)}else{if(t.rt==-1500){}else{Mobi.ing(LS.memberSignupRegisterError)}}}}}}}}}}if(t.hasFW){Mobi.ing(t.msg)}}}})}};Mobi.prompt(q)}};Mobi.getSignMobileCode=function(b){var a=jm("#mobile").val();var c=jm("#mobileCt").val();var d=jm("#memberSignupCaptcha").val();if(!jm.isNationMobile(a)){Mobi.ing(LS.mobileNumRegular);return}if(b){if(d==null||d==""){Mobi.ing(LS.memberSignupRegisterCaptchaEmpty);return}}info={};info.mobile=a;info.mobileCt=c;info.captcha=d;jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=getMobileCode",data:"mobile="+a+"&mobileCt="+c+"&validateCode="+d,error:function(){Mobi.ing(LS.getMobileCodeErrAf)},success:function(e){var f=jm.parseJSON(e);if(f.success){Mobi.ing(LS.sendMobileCodeSuc);Mobi.getSignMobileCodeCountDown()}else{Mobi.changeValidateCode(jm("#signupCaptchaImg"));jm("#memberSignupCaptcha").val("");if(f.rt==-401){Mobi.ing(LS.memberSignupRegisterCaptchaNotMatch)}else{if(f.rt==-2){Mobi.ing(LS.argsError)}else{if(f.rt==2){Mobi.ing(LS.memberDialogSendMobileCodeErr)}else{if(f.rt==-4||f.rt==8){Mobi.ing(LS.getMobileOneMin)}else{if(f.rt==-8){Mobi.ing(LS.getMobileHalfHour)}else{if(f.rt==3){Mobi.ing(LS.memberDialogMobileMoneyErr)}else{if(f.rt==9){Mobi.ing(LS.memberDialogSendMobileCodeLimit)}else{if(f.rt==101){Mobi.ing(LS.mobileSetErr)}else{if(f.rt==-6){Mobi.ing(LS.mobileHasSigned)}else{if(f.rt==23){Mobi.ing(LS.mobileNationTplErr)}else{if(f.rt==-1002){}else{Mobi.ing(LS.getMobileRefresh)}}}}}}}}}}}}}})};Mobi.getSignMobileCodeCountDown=function(){var d=jm("#messageAuthCodeClick");var c=d.attr("cTime");var e=60;var b="5.2rem";if(!c||c==null){c=0}else{b="5.6rem";c=parseInt(c);e=1800}c++;d.attr("cTime",c);d.attr("s_onclick",d.attr("onclick"));d.removeAttr("onclick");d.css("width",b);var a=setInterval(function(){e--;d.html(LS.reGetMsg+"("+e+")");if(e<=0){d.html(d.attr("title"));d.css("width","4.2rem");d.attr("onclick",d.attr("s_onclick"));clearInterval(a)}},1000)};Mobi.mallBuyLoginCheck=function(){var a=localStorage.getItem("mallBuyCallBack");if(!!a){localStorage.removeItem("mallBuyCallBack");a=jm.parseJSON(a);a.login=true;localStorage.setItem("mallBuyCallBack",jm.toJSON(a))}};Mobi.autoLogin=function(c,b,a){jm.ajax({type:"post",url:"ajax/login_h.jsp",data:"cmd=loginMember&acct="+jm.encodeUrl(c)+"&pwd="+jm.encodeUrl(jm.md5(b)),error:function(){Mobi.showMemberLoginMsg(-1)},success:function(d){var d=jm.parseJSON(d);if(d.success){Mobi.mallBuyLoginCheck();Fai.top.location.href=a;return}else{Fai.top.location.href="login.jsp?returnUrl="+jm.encodeUrl(a)}}})};Mobi.memberActive=function(a,c,b){jm.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=sendMemberActiveMail",data:"memName="+jm.encodeUrl(c)+"&memEmail="+a,error:function(){Mobi.ing(LS.systemError)},success:function(d){jm("#profileArea").hide();jm("#fillAcctInfo").hide();jm("#mSignUp").show();jm("#mSignUp .loginContent").hide();jm(".loginErrorLine").hide();var e=Mobi.getEmailCarriersAddress(a);jm("#checkEmail").html(jm.format(LS.memberSignupMailActivation,a));if(e!=-1){jm("#emailAddr").attr("href",e.addr);jm("#emailAddr").html(jm.format(LS.memberSignupMailActivationLink,e.name));jm("#emailAddr").show()}}})};Mobi.getEmailCarriersAddress=function(a){var c={};var b=a.split("@")[1];if(b==="qq.com"||b==="vip.qq.com"||b==="foxmail.com"){c.name="QQ";c.addr="https://w.mail.qq.com";return c}else{if(b==="163.com"){c.name="163";c.addr="http://smart.mail.163.com";return c}else{if(b==="126.com"){c.name="126";c.addr="http://smart.mail.126.com";return c}else{if(b==="sina.com"||b==="vip.sina.com"){c.name="sina";c.addr="http://mail.sina.com.cn";return c}else{return -1}}}}};Mobi.showErrorMsg=function(a){jm(".loginErrorLine").show();Mobi.ing(a)};Mobi.readBulletin=function(){var a=jm("#bulletinTitle"),b=jm("#bulletinTitle").attr("sessionMid");jm.ajax({type:"post",url:"ajax/member_h.jsp",data:"cmd=setBulletinReadTime&id="+b,error:function(){Mobi.ing(LS.systemError)},success:function(c){var c=jm.parseJSON(c);if(c.success){jm("#profile").hide();jm("#mBulletinConten").show();jm(a).removeClass("newsReminds");jm("#mBulletinConten img").each(function(){var e=jm("#mBulletinConten p").width();if(jm(this).attr("width")>=e){var d=jm(this).attr("height")/(jm(this).attr("width")/e);jm(this).css({height:d+"px",width:e+"px"})}})}else{Mobi.ing(LS.systemError)}}})};Mobi.memberAddrInfoOpera=function(b,c,w,t){var k=c,z="",m="",f=k.length,y="",s=false;var a={};site_cityUtil.initProvinces(w);jm("#editAddrInfo .g_close").click(function(){jm("#editAddrInfo").hide();jm("#addrInfoList").show()});jm("#addrInfoList .orderAddAddrInfo").click(function(){s=true;f=jm("#addrInfo .addrInfo").length;if(f<6){jm("#addrInfoList").hide();jm("#editAddrInfo").show();jm("#editAddrInfo").find(".propItemValue").each(function(){var I=jm(this).attr("proptype");if(I==9){var H=jm(this).attr("id");if(H!=undefined&&H!=""){var G=H.replace("input","")+"_endinput";jm("#"+H).val("");jm("#"+G).val("")}}jm(this).val("")});z="addAddr";y="ajax/member_h.jsp?cmd=set&id="+b}else{Mobi.ing(LS.mallAddrInfoAmountLimit,true)}});jm("#addrInfoList").delegate(".edit, .info_name","click",function(){s=false;jm("#addrInfoList").hide();jm("#editAddrInfo").show();if(jm(this).attr("class")=="edit"){m=jm(this).attr("_index")}else{m=jm(this).parent().attr("_item")}z="editAddr";y="ajax/member_h.jsp?cmd=set&id="+b;var G=k[m];jm("#editAddrInfo").find(".propItemValue").each(function(){var R=jm(this).attr("_field");var S=jm(this).attr("proptype");var T=jm(this).attr("id")||"";if(S==9){var P=G[R];if(P==undefined){P={}}var Q=P;if(Q.s==undefined){jm(this).val("")}else{jm(this).val(Q.s)}var O=T.replace("input","")+"_endinput";if(Q.e!=undefined){jm("#"+O).val(Q.e)}else{jm("#"+O).val("")}}else{jm(this).val(G[R])}});var N=G.addr_info;if(N!=null){var J=N.isCus;if(!J){var M="";var K="";var I="";var H="";if(w==2052||w==1028){M=site_cityUtil.getInfo(N.streetCode).name;K=site_cityUtil.getInfo(N.countyCode).name;I=site_cityUtil.getInfo(N.cityCode).name;H=site_cityUtil.getInfo(N.provinceCode).name}else{M=site_cityUtil.getInfoEn(N.streetCode).name;K=site_cityUtil.getInfoEn(N.countyCode).name;I=site_cityUtil.getInfoEn(N.cityCode).name;H=site_cityUtil.getInfoEn(N.provinceCode).name}if(N.provinceCode==990000){jm("#areaBoxInput").attr("isOs",1);jm("#allArea").val("os");jm("#allArea").change()}else{jm("#areaBoxInput").attr("isCn",1);jm("#allArea").val("cn");jm("#allArea").change()}jm("#areaBoxInput").attr("area1",N.provinceCode);jm("#areaBoxInput").attr("area2",N.cityCode);jm("#areaBoxInput").attr("area3",N.countyCode);jm("#areaBoxInput").attr("area4",N.streetCode);jm("#areaBox1 .group_item[pid='"+N.provinceCode+"']").click();jm("#areaBox1 .group_item[cid='"+N.cityCode+"']").click();jm("#areaBox1 .group_item[cid='"+N.countyCode+"']").click();jm("#areaBox1 .group_item[cid='"+N.streetCode+"']").click()}else{jm("#allArea").val(N.provinceCode);jm("#allArea").change();jm("#areaBox2 .group_item[cid='"+N.cityCode+"']").click();jm("#areaBox2 .group_item[cid='"+N.countyCode+"']").click()}jm("#addrInfo_street").val(N.streetAddr)}var L=G.isDefault});jm("#addrInfoList").delegate(".selectedDiv label","click",function(){z="setDefault";var I=0;if(k.length==1){return}m=jm(this).parents(".selectedArea").parent().attr("_item");var G={};G.isDefault=1;a.opera=z;a._item=m;a.addrInfo=G;c[m]["isDefault"]=G.isDefault;var H=this;jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set&id="+b,data:"info="+jm.encodeUrl(jm.toJSON(a)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(J){var K=jm.parseJSON(J);if(K.success){jm(".addrInfo").each(function(){jm(this).find(".text").text(LS.mallSetDefault);jm(this).find(".cutOut").css("display","block");k[jm(this).attr("_item")]["isDefault"]=0});jm(H).find(".text").text(LS.mallDefault);jm(H).parents(".addrInfo").find(".cutOut").css("display","none");k[m].isDefault=1}else{Mobi.ing(K.msg)}}})});jm("#g_body").append(jm("
    "));var h=jm("#temBox");var e=h.css("color");jm("head").append("");jm("#g_body").children("#temBox").remove();jm("#editAddrInfo").delegate(".orderSaveAddrInfo","click",function(){var S=true;var M=0;if(k.length==0){M=1}else{if(k[m]){M=k[m].isDefault}}var R=jm(this);var T={};var H={};var I={};var W="";var L="";var K="";var G=false;R.parent().find(".propItemValue").each(function(){W=jm(this).attr("_field");L=jm(this).val();K=jm(this).attr("_prop");propType=jm(this).attr("proptype");var ab=jm(this).attr("_required");id=jm(this).attr("id");G=(ab=="1"||ab=="true")?true:false;if(G&&(L==null||L=="")){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,K));this.focus();S=false}if(propType==8||propType==10){if(L.length>0){if(!jm.isNationMobile(L)){msg=LS.mobileNumRegular;Mobi.ing(msg);this.focus();S=false}}}if(propType==3||propType==12){if(L.length>0){if(!jm.isEmail(L)){msg=LS.mallStlSubmitInput2+jm(this).attr("_prop");Mobi.ing(msg);this.focus();S=false}}}var Z={};if(propType==9){if(L.length>0){Z.s=L;var X=id.replace("input","")+"_endinput";var aa=R.parent().find("#"+X);if(aa.length>0){var Y=aa.val();if(Y==""){msg=LS.mallStlSubmitInput2+jm(this).attr("_prop");Mobi.ing(msg);S=false}else{Z.e=Y}}}L=Z}H[W]=L});var Q=!(jm("#allArea").val()=="os"||jm("#allArea").val()=="cn");var N=jm("#areaBoxInput").attr("area4");var J=jm("#areaBoxInput").attr("area3");var P=jm("#areaBoxInput").attr("area2");var O=jm("#areaBoxInput").attr("area1");var V=jm("#addrInfo_street");G=R.parent().find("#addrInfo_street").attr("_required")=="1"?true:false;if(G){if(jm("#allArea").val()==null||jm("#allArea").val()==""){Mobi.ing("请选择地区",1);return}if((O==null||O=="")&&!Q){Mobi.ing("请选择省份",1);return}if((P==null||P=="")&&!Q){Mobi.ing("请选择城市",1);return}}T.provinceCode=O;T.cityCode=P;T.countyCode=J;T.streetCode=N;T.streetAddr=V.val();T.isCus=Q;H.addr_info=T;var U="";if(jm("#allArea").length==1){if(Fai.top._lcid==2052||Fai.top.lcid==1028){U=jm("#areaBoxInput").val().replace(/-/g,"")+jm("#addrInfo_street").val();if(T.provinceCode==990000){U=U.replace(jm("div[pid='990000']").text()+jm("div[pid='990000']").text(),jm("div[pid='990000']").text())}}else{U=jm("#areaBoxInput").val().replace(/-/g," ")+" "+jm("#addrInfo_street").val();if(T.provinceCode==990000){U=U.replace(jm("div[pid='990000']").text()+" "+jm("div[pid='990000']").text(),jm("div[pid='990000']").text())}}}H.addr=U;H.isDefault=M;a.opera=z;a._item=m;a.addrInfo=H;if(S){jm.ajax({type:"post",url:y,data:"info="+jm.encodeUrl(jm.toJSON(a)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(Y){var ab=jm.parseJSON(Y);if(ab.success){var Z=H.name||"";var X=H.mobile||"";var ad=H.addr||"";if(Z==""||X==""||ad==""){jm("#editAddrInfo").find(".propItemValue").each(function(){var ag=jm(this).attr("_field");if(ag!=null&&ag!="addrDetail"){var ah=jm(this).attr("proptype");var ai=jm(this).attr("id")||"";var ae=H[ag];if(ah!=2&&ah!=4&&ah!=7&&ah!=8){if(ah==9){if(ae==""||ae==undefined){ae={}}var af=ae;if(af.s!=undefined){ae=af.s;if(af.e!=undefined){ae+=LS.to+af.e}}else{ae=""}}if(Z==undefined||Z==""){Z=ae}else{if(X==undefined||X==""){X=ae}else{if(ad==undefined||ad==""){ad=ae}}}}}})}if(z=="editAddr"){if(M){jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).find(".cutOut").attr("display")!="block"){k[jm(this).attr("_item")]["isDefault"]=0}if(jm(this).attr("_item")==m){jm(this).find(".name").text(Z);jm(this).find(".phone").text(X);jm(this).find("#addr").text(ad);addrInfo=jm(this)}})}else{jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).attr("_item")==m){jm(this).find(".name").text(Z);jm(this).find(".phone").text(X);jm(this).find("#addr").text(ad)}})}k.splice(m,1,H);jm("#editAddrInfo").hide();jm("#addrInfoList").show()}else{if(z=="addAddr"){if(M){jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).find(".cutOut").attr("display")!="block"){k[jm(this).attr("_item")]["isDefault"]=0}})}var ac=k.length;var aa=[];aa.push("
    ");aa.push("
    ");aa.push("
    "+Z+""+X+"
    "+ad+"
    ");aa.push("
    ");aa.push("
    ");aa.push("
    ");aa.push("
    ");aa.push("
    ");aa.push("
    ");aa.push("
    编辑
    删除
    ");aa.push("
    ");aa.push("
    ");aa.push("
    ");jm("#addrInfo").append(aa.join(""));k.push(H);jm("#editAddrInfo").hide();jm("#addrInfoList").show()}}}else{Mobi.ing(ab.msg)}}})}});jm("#addrInfo").delegate(".cutOut","click",function(){var I=jm(this);m=I.parents(".selectedArea").parent().attr("_item");a.opera="delAddr";a._item=m;var G=function(K,J){jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set&id="+K,data:"info="+jm.encodeUrl(jm.toJSON(a)),error:function(){Mobi.ing(LS.systemError)},success:function(L){var N=jm.parseJSON(L);if(N.success){jm("#mobiPrompt").remove();jm("#mobiPrompt_Bg").remove();var M=0;jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).attr("_item")==J){jm(this).remove()}else{jm(this).attr("_item",M);M++}});f--;k.splice(J,1)}else{Mobi.ing(N.msg)}}})};var H={textClass:"confirm",content:"确定要删除该收货人信息吗?",callback:function(){G(b,m)}};Mobi.prompt(H)});var v=LS.mallPleaseChoose,D=[],n,E,r,B,F,q,C;var o=Mobi.initWebPage({triggerId:"areaBoxInput",panelId:"areaBox",pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#areaBoxClose"});jm("#areaBox").unbind("click").bind("click",function(H){var G=H.target.className;if(!G){return}if(jm.inArray("areaBox",G.split(" "))>=0){jm("#areaBoxClose").click();jm("#areaBox1").hide();jm("#areaBox2").hide()}});var p="";jm.each(site_cityUtil.getAreaGroupsPinYin(),function(G,H){p+="
    ";p+="
    "+H[0]+"
    ";p+="
    ";jm.each(H[1],function(J,I){if(w==2052||w==1028){p+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(I).name)+"
    "}else{p+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(I).name)+"
    "}});p+="
    ";p+="
    "});jm("#areaBox1 .pv_content").html("").append(p);jm("#allArea").change(function(){if(jm("#allArea").val()==null||jm("#allArea").val()==""||jm("#allArea").val()=="os"){jm("#areaBoxInput").parent(".edit_line").hide();jm("#areaBox1").hide();jm("#areaBox2").hide()}else{jm("#areaBoxInput").parent(".edit_line").show()}jm("#areaBoxInput").attr("isCn",0);jm("#areaBoxInput").attr("isCus",0);jm("#areaBoxInput").attr("isOs",0);jm("#areaBoxInput").attr("area1","");jm("#areaBoxInput").attr("area2","");jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");if(jm("#allArea").val()=="cn"){jm("#areaBoxInput").attr("isCn",1);jm("#areaBox1 .pv").click();jm("#areaBox1 .city_content").remove();jm("#areaBox1 .county_content").remove();jm("#areaBox1 .street_content").remove();jm("#areaBoxInput").val("")}else{if(jm("#allArea").val()=="os"){jm("#areaBoxInput").attr("isOs",1);jm("#areaBoxInput").attr("area1",990000);jm("#areaBoxInput").attr("area2",990100);jm("#areaBoxInput").val(jm("#areaBox1").find(".group_item[pid='990000']").text())}else{jm("#areaBoxInput").attr("isCus",1);jm("#areaBoxInput").attr("area1",jm("#allArea").val());jm("#areaBox2 .sec_content").html("");jm("#areaBox2 .thd_content").html("");jm("#areaBoxInput").val("")}}if(jm("#allArea").val()=="cn"||jm("#allArea").val()=="os"){jm(".J_ssq").show();jm(".J_administrativeRegion").hide()}else{var G=d(jm("#allArea").val());jm("#sec_box .sec_content").append(G);jm("#areaBoxInput").val(jm("#areaBoxInput").val()+jm("#allArea option[value='"+jm("#allArea").val()+"']").text());jm(".J_ssq").hide();jm(".J_administrativeRegion").show();if(G===null||G===undefined||G===""){jm("#areaBoxInput").parents(".edit_line").hide()}}});jm("#areaBoxInput").unbind("click").bind("click",function(){if(jm("#allArea").val()=="cn"){o();jm("#areaBox1").toggle();jm("#areaBox2").hide();jm("#areaBox1 .J_areaHead .pv").click()}else{if(jm("#allArea").val()==null||jm("#allArea").val()=="os"){}else{o();jm("#areaBox2").toggle();jm("#areaBox1").hide();jm("#areaBox2 .J_areaHead2 .sec").click()}}document.getElementById("areaBoxInput").blur()});jm("#areaBox1 .J_areaHead .pv").click(function(){jm("#province_box").show();jm("#city_box").hide();jm("#county_box").hide();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .city").click(function(){jm("#province_box").hide();jm("#city_box").show();jm("#county_box").hide();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .county").click(function(){jm("#province_box").hide();jm("#city_box").hide();jm("#county_box").show();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .street").click(function(){jm("#province_box").hide();jm("#city_box").hide();jm("#county_box").hide();jm("#street_box").show()});jm("#areaBox2 .J_areaHead2 .sec").click(function(){jm("#sec_box").show();jm("#thd_box").hide()});jm("#areaBox2 .J_areaHead2 .thd").click(function(){jm("#sec_box").hide();jm("#thd_box").show()});jm("#province_box .group_item").bind("click",function(){jm("#areaBox1 .city_content").remove();jm("#areaBox1 .county_content").remove();var G=jm(this).attr("pname");var H=jm(this).attr("pid");jm("#areaBox1 .J_areaHead .city").click();jm("#areaBoxInput").val("");jm("#areaBoxInput").val(jm("#areaBoxInput").val()+G);jm("#areaBoxInput").removeAttr("lastArea");jm("#areaBoxInput").removeAttr("lastAreaType");jm("#areaBoxInput").attr("area1",H);jm("#areaBoxInput").attr("area2","");jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");var J="";if(w==2052||w==1028){J=u(site_cityUtil.getCities(H))}else{J=u(site_cityUtil.getCitiesEn(H))}var I=jm(J).html();if(I===null||I===undefined||I===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#city_box").append(J)});jm("#city_box").delegate(".group_item","click",function(){jm("#areaBox1 .county_content").remove();var G=jm(this).attr("cname");var I=jm(this).attr("cid");jm("#areaBox1 .J_areaHead .county").click();var L=jm("#areaBoxInput").attr("lastArea");var H=jm("#areaBoxInput").attr("lastAreaType");if(H!=null&&H!=""){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-")))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+G);jm("#areaBoxInput").attr("lastArea","-"+G);jm("#areaBoxInput").attr("lastAreaType","city");jm("#areaBoxInput").attr("area2",I);jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");var K="";if(w==2052||w==1028){K=l(site_cityUtil.getCounty(I))}else{K=l(site_cityUtil.getCountyEn(I))}var J=jm(K).html();if(J===null||J===undefined||J===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#county_box").append(K)});jm("#county_box").delegate(".group_item","click",function(){jm("#areaBox1 .street_content").remove();var H=jm(this).attr("cname");var J=jm(this).attr("cid");var L=jm("#areaBoxInput").attr("lastArea");var I=jm("#areaBoxInput").attr("lastAreaType");jm("#areaBox1 .J_areaHead .street").click();if(I!=null&&(I=="street"||I=="county")){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-",jm("#areaBoxInput").val().indexOf("-")+1)))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+H);jm("#areaBoxInput").attr("lastArea","-"+H);jm("#areaBoxInput").attr("lastAreaType","county");jm("#areaBoxInput").attr("area3",J);jm("#areaBoxInput").attr("area4","");var G="";if(w==2052||w==1028){G=x(site_cityUtil.getStreet(J))}else{G=x(site_cityUtil.getStreetEn(J))}var K=jm(G).html();if(K===null||K===undefined||K===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#street_box").append(G)});jm("#street_box").delegate(".group_item","click",function(){var G=jm(this).attr("cname");var I=jm(this).attr("cid");var J=jm("#areaBoxInput").attr("lastArea");var H=jm("#areaBoxInput").attr("lastAreaType");if(H!=null&&H=="street"){jm("#areaBoxInput").val(jm("#areaBoxInput").val().replace(J,""))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+G);jm("#areaBoxInput").attr("lastArea","-"+G);jm("#areaBoxInput").attr("lastAreaType","street");jm("#areaBoxInput").attr("area4",I);jm("#areaBox1").hide();jm("#areaBoxClose").click()});jm("#sec_box").delegate(".group_item","click",function(){jm("#areaBox2 .thd_content").html("");var G=jm(this).attr("cname");var I=jm(this).attr("cid");jm("#areaBox2 .J_areaHead2 .thd").click();var K=jm("#areaBoxInput").attr("lastArea");var H=jm("#areaBoxInput").attr("lastAreaType");if(H!=null&&H!=""&&jm("#areaBoxInput").val().indexOf("-")!=-1){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-")))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+G);jm("#areaBoxInput").attr("lastArea","-"+G);jm("#areaBoxInput").attr("lastAreaType","sec");jm("#areaBoxInput").attr("area2",I);jm("#areaBoxInput").attr("area3","");var J=d(I);if(J===null||J===undefined||J===""){jm("#areaBox2").hide();jm("#areaBoxClose").click()}jm("#thd_box .thd_content").append(J)});jm("#thd_box").delegate(".group_item","click",function(){var G=jm(this).attr("cname");var I=jm(this).attr("cid");var J=jm("#areaBoxInput").attr("lastArea");var H=jm("#areaBoxInput").attr("lastAreaType");if(H!=null&&H=="thd"){jm("#areaBoxInput").val(jm("#areaBoxInput").val().replace(J,""))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+G);jm("#areaBoxInput").attr("lastArea","-"+G);jm("#areaBoxInput").attr("lastAreaType","thd");jm("#areaBoxInput").attr("area3",I);jm("#areaBox2").hide();jm("#areaBoxClose").click()});function u(H){var G="";G+="
    ";jm.each(H,function(I,J){if(w==2052||w==1028){G+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(J.id).name)+"
    "}else{G+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(J.id).name)+"
    "}});G+="
    ";return G}function l(H){var G="";G+="
    ";jm.each(H,function(I,J){if(w==2052||w==1028){G+="
    "+site_cityUtil.getInfo(J.id).name+"
    "}else{G+="
    "+site_cityUtil.getInfoEn(J.id).name+"
    "}});G+="
    ";return G}function x(H){var G="";G+="
    ";jm.each(H,function(I,J){if(w==2052||w==1028){G+="
    "+site_cityUtil.getInfo(J.id).name+"
    "}else{G+="
    "+site_cityUtil.getInfoEn(J.id).name+"
    "}});G+="
    ";return G}function j(H){var G="";var I=false;jm.each(t,function(J,K){if(I){return}if(K.id==H){G=K.name;I=true}});return G}function A(H){var G=[];jm.each(t,function(I,J){if(J.parentId==H){G.push(J)}});return G}function d(G){if(isNaN(G)){return""}var I=parseInt(G);var H="";jm.each(A(I),function(J,K){H+="
    "+K.name+"
    "});return H}};Mobi.modifyListener=function(c,b){if(Fai.top._manageMode){return}jm(".modifyArea li").click(function(){if(jm(this).attr("orderlist")==="0"){return}if(Fai.top._templateFrameId>=2000&&Fai.top._templateFrameId<3000){jm(".form .loginHeader").show();jm(".form .loginHeader .icon-gClose").off("click.gc").on("click.gc",function(){jm(".form .loginHeader").hide()})}if(jm(this).attr("orderlist")==="1"){Mobi.readBulletin();return}var e=jm(this).find(".itemName").html();if(jm(this).attr("id")==="password"){jm("#profile").hide();jm("#modifyPsw").show()}else{if(jm(this).attr("id")==="consigneeInfo"){jm("#addrInfoList").find(".title").html(e);jm("#profile").hide();jm("#addrInfoList").show()}else{if(jm(this).attr("id")==="personalInfo"){jm("#modifyPersInfo").find(".title").html(e);jm("#profile").hide();jm("#modifyPersInfo").show()}else{if(jm(this).attr("id")==="cutPrice"){jm("#modifyCutPrice").find(".title").html(e);jm("#profile").hide();jm("#modifyCutPrice").show()}else{if(jm(this).attr("id")==="integral"){jm("#modifyIntegral").find(".title").html(e);jm("#profile").hide();jm("#modifyIntegral").show()}else{if(jm(this).attr("id")==="collection"){jm("#modifyCollection").find(".title").html(e);jm("#profile").hide();jm("#modifyCollection").show()}else{if(jm(this).attr("id")==="coupon"){jm("#modifyCoupon").find(".title").html(e);jm("#profile").hide();jm("#modifyCoupon").show()}else{if(jm(this).attr("id")==="changeOtherLoginAcct"){return}else{var d=jm(this).find(".itemText").html();jm("#profile").hide();jm("#modifyProfile").show();jm("#modifyProfile").find(".title").html(e);jm("#profileValue").val(jm.decodeHtml(d));jm("#profileValue").attr("name",jm(this).attr("id"));jm("#profileValue").attr("ismust",jm(this).attr("ismust"))}}}}}}}}});var a=new Mobi.memberHeadPic(c,b);a.init()};Mobi.persInfoChangeMobileCt=function(){var b=jm("#modifyPersInfo #mobileCt").val();var a=jm("#modifyPersInfo #mobileCt").find("option[value='"+b+"']").html();jm("#modifyPersInfo .mobileCtVal").html(a.substring(a.indexOf("+")))};Mobi.profileLogout=function(a){var b=Mobi.getPreviewWindow().location.href;var d=Mobi.getUrlParam(b,"returnUrl");if(!d){d=a}var c={textClass:"confirm",content:LS.onLogout,callback:function(){Mobi.onLogout("login.jsp?returnUrl="+jm.encodeUrl(d))}};Mobi.prompt(c)};Mobi.loadPdCollectionList=function(b,a){this.pIdList=a;this.mid=b;this.panel=jm("#modifyCollection")};(function(r,m,c){var h=m.prototype,s,d,j,l=[],t=10,a,b=[];h.init=function(){d=this.pIdList,j=this.panel;s=this.mid;if(d.length==0){f();return}p();var w=d.slice(0,t);a=w.length;o(w);e()};function f(){if(d.length==0){j.find(".profileContent").html("
    "+LS.notCollect+"
    ")}}function p(){r.post("ajax/product_h.jsp",{mid:s,cmd:"updateCollections",ids:r.toJSON(d)},function(w){if(w.success){d=w.list}},"json")}function o(w){r.ajax({url:"ajax/product_h.jsp",data:{cmd:"batchGetPd",ids:r.toJSON(w)},async:false,type:"POST",dataType:"json",success:function(x){if(x.success){n(w,x.list)}}})}function u(x){var w=false,y;r.each(b,function(z,A){if(x==A.lid){w=true;y=A}});if(!w){y=k(x)}return y}function k(w){var x={lid:w};r.ajax({url:"ajax/productProp_h.jsp?cmd=list&lid="+w,async:false,type:"POST",dataType:"json",success:function(y){if(y.success){var z=false;r.each(y.list,function(A,B){if(B.fieldKey=="mallPrice"){z=true}});x.showPrice=z;b.push(x)}}});return x}function v(){var x={},w=false;x.productCollections=d.reverse()+"";r.ajax({url:"ajax/member_h.jsp",data:{cmd:"set",id:s,info:r.toJSON(x)},async:false,type:"POST",dataType:"json",success:function(y){if(y.success){w=true}else{w=false}}});return w}function n(w,x){var y=[];r.each(x,function(z,B){var A=u(B.lid);y.push("
  • ");y.push('
    ');y.push(' ');y.push(' ');y.push(" ");y.push("
    ");y.push('
    '+B.name+"
    ");if(B.mallPrice!=-1&&A.showPrice){y.push('
    ¥ '+B.mallPrice+"
    ")}y.push('
    '+LS.cancelCollect+"
    ");y.push("
  • ")});j.find(".collectionList").append(y.join(""))}function q(){j.find(".collectionList li img[_src]").each(function(){var x=r(this).attr("_src");var w=new Image();w.src=x;r(this).attr("_src","");r(this).attr("src",x)})}function e(){Mobi.onTouchAndClickEvent(".cancelCollection",function(z){var x=$(this);var y={textClass:"confirm",content:LS.sureCancelCollect,callback:function(){var B=x.attr("data-id");var C=d.indexOf(Number(B));if(C>-1){d.splice(C,1)}if(v()){a--;x.parents("li").remove()}if(j.find(".collectionList li").length<6&&d.length>a){var A=d.slice(a,a+t);a=a+A.length;if(A.length>0){o(A)}}f();r("#mobiPrompt").remove();r("#mobiPrompt_Bg").remove()}};Mobi.prompt(y)});Mobi.onTouchAndClickEvent(".pdName,.pdPrice,.pdImg",function(y){var x=r(this).parent().find("a").attr("_href");location.href=x;r.setCookie("_fromCollect",true)});r(window).on("scroll",function(){if(d.length>a){var y=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);if(r(window)[0].scrollY+r(window).height()+100>=y){var x=d.slice(a,a+t);a=a+x.length;if(x.length>0){o(x)}}}});if(r.getCookie("_openCollect")){var w=r("#collection").find(".itemName").html();r("#modifyCollection").find(".title").html(w);r("#profile").hide();r("#modifyCollection").show();r.setCookie("_openCollect","",-1)}}})(jm,Mobi.loadPdCollectionList);Mobi.loadCutPriceList=function(b){if(b<=0){location.href="login.jsp?errno=11"}jm.ajax({url:"ajax/cutPrice_h.jsp?cmd=getCutPriceByMid",data:"mid="+b,success:function(h){h=jm.parseJSON(h);var j=jm.parseJSON(h.all),f=jm.parseJSON(h.ongoing),k=jm.parseJSON(h.ended);d(j,f,k)}});var a=jm(".cutPriceListPanel");function d(h,f,k){var j="
    ";j+="
    ";j+="
    全部
    ";j+="
    进行中
    ";j+="
    已结束
    ";j+="
    ";j+="
    ";j+="
    ";a.append(j);c(h,f,k);jm("#cpAllHeader").click(function(){jm(".cpUnderline").css("left","1.55rem");jm(".cpList").hide();jm("#cpAll").show()});jm("#cpOngoingHeader").click(function(){jm(".cpUnderline").css("left","6.8rem");jm(".cpList").hide();jm("#cpOngoing").show()});jm("#cpEndedHeader").click(function(){jm(".cpUnderline").css("left","12.2rem");jm(".cpList").hide();jm("#cpEnded").show()})}function c(h,f,k){var j="
    ";j+="
    你还没有砍价记录哦~
    ";j+=" ";j+=" ";j+="
    ";a.append(j);if(h.length!=0){jm("#cpAll").empty();var j="";jm(h).each(function(){var l=e(this);j+=l});jm("#cpAll").append(j)}if(f.length!=0){jm("#cpOngoing").empty();var j="";jm(f).each(function(){var l=e(this);j+=l});jm("#cpOngoing").append(j)}if(k.length!=0){jm("#cpEnded").empty();var j="";jm(k).each(function(){var l=e(this);j+=l});jm("#cpEnded").append(j)}}function e(m){var l="
    ";if(m.status==1){l+="
    "}else{if(m.status==2){l+="
    "}}l+="
    ";l+="
    ";l+="
    "+jm.encodeHtml(m.productInfo.name)+"
    ";var n=m.cutPriceInfo.pdList;var f=0;jm(n).each(function(){if(this.i==m.pdChoice.pid){f=this.p}});var k=(f-m.currentPrice)/(f-m.cutPriceInfo.minPrice);var j=356*k;var h=j/40;l+="
    ";if(m.status==2){l+="
    ";l+="
    "}else{l+="
    ";l+="
    "}l+="
    ";l+="
    已砍至"+Fai.top.choiceCurrencyVal+m.currentPrice.toFixed(2)+"
    ";l+="
    ";l+="
    底价:
    ";l+="
    "+Fai.top.choiceCurrencyVal+m.cutPriceInfo.minPrice.toFixed(2)+"
    ";l+="
    ";l+="
    ";l+="
    ";return l}};Mobi.jumpToCutPriceDetail=function(b,d,a){var c="cpDetail.jsp?cpId="+b+"&cpDetailId="+d+"&pdId="+a+"&isInit=true";location.href=c};Mobi.loadCouponList=(function(j){function k(t,s){this.mid=t;this.flag=s}var l=k.prototype,q,d=0,o=[1,1,1],n=10,p=[[],[],[]],e=["red","orange","yellow","green","blue","pink","purple","gray"];l.init=function(){q=this;c();r()};function c(){var s=q;j.ajax({url:"ajax/mallCoupon_h.jsp?cmd=getCouponByMid",data:"mid="+s.mid,dataType:"json",success:function(t){if(t.success){if(t.receiveList){p[0]=t.receiveList}if(t.usedList){p[1]=t.usedList}if(t.expireList){p[2]=t.expireList}a()}},error:function(){}})}function a(){var v=q;var t=j(".couponListPanel");var s=[];s.push('
    ');s.push('
    '+LS.notUse+'('+p[0].length+")
    ");s.push('
    '+LS.used+'('+p[1].length+")
    ");s.push('
    '+LS.expired+'('+p[2].length+")
    ");s.push("
    ");s.push("
    ");s.push(m());s.push("
    ");t.append(s.join(""));if(v.flag){f(d)}else{h(d)}var u=jm("body").height()}function h(t){var w="fk-coupon-tab-active",s=jm(".coupon-tab");s.attr("style","");s.find("em").attr("style","");s.removeClass(w);var u=jm(".coupon-tab").eq(t),v=jm(".g_button").css("background-color");u.css({background:v,color:"#fff",borderColor:v});u.find("em").css({borderColor:v+" transparent transparent transparent"});u.addClass(w)}function f(s){var t=jm(".coupon-tab").eq(s);t.addClass("coupon-tab-selected").siblings(".coupon-tab").removeClass("coupon-tab-selected")}function b(){if(jm(".webHeaderBg").height()<=jm("body")[0].scrollTop&&(Fai.top._templateFrameId<2000||Fai.top._templateFrameId>=3000)){jm(".tabList").css({position:"fixed",width:jm(".couponListPanel").width()+"px"});jm("#showCouponList").css("margin-top","1.7rem")}else{jm(".tabList").css({position:"",width:""});jm("#showCouponList").css("margin-top","")}}function r(){var s=q;Mobi.onTouchAndClickEvent(".coupon-tab",function(){if(jm(this).index()!=d){d=jm(this).index();if(s.flag){f(d)}else{h(d)}j(".show-coupon-list").remove();j(".coupon-empty").remove();j("#showCouponList").append(m())}});document.addEventListener("touchstart",function(t){b()},false);document.addEventListener("touchmove",function(t){b()},false);document.addEventListener("touchend",function(t){b()},false);document.addEventListener("scroll",function(){b()},false);Mobi.onTouchAndClickEvent(".icon-delIcon",function(){var v=j(this).parents(".coupon-warp");var w=v.attr("data_id");var u=LS.delCouponWillUnavail;if(d!=0){u=LS.confirmDelCoupon}var t={textClass:"confirm",content:u,callback:function(){p[d].splice((o[d]-1)*n,1);j.ajax({url:"ajax/member_h.jsp?cmd=delCoupon",data:"mid="+s.mid+"&cdid="+w,dataType:"json",success:function(x){if(x.success){v.remove();j(".coupon-tab").eq(d).find(".coupon-amount").text(p[d].length)}},error:function(){}});jm("#mobiPrompt").remove();jm("#mobiPrompt_Bg").remove()}};Mobi.prompt(t)});Mobi.onTouchAndClickEvent(".toUseCoupon",function(){var t=jm(this).parents(".couponItem").attr("couponid");Fai.top.location.href="pr.jsp?couponId="+t})}function m(){var w=q,t=[],s=o[d];t=p[d];var u=[];if(t.length==0){u.push("
    ");u.push("
    ");var v="";if(d==0){v=jm.format(LS.notHasCoupon,LS.notUse)}else{if(d==1){v=jm.format(LS.notHasCoupon,LS.used)}else{if(d==2){v=jm.format(LS.notHasCoupon,LS.expired)}}}u.push("
    "+v+"
    ");u.push("
    ")}else{u.push("
    ");j.each(t,function(z,y){var x="g_bgColor";var B="";if(d!=0){x="";B="coupon-words-invalid"}var A="";if(z==0){A="padding-top:0.75rem;"}u.push("
    ");u.push("
    ");u.push("
    ");u.push("
    "+Fai.top.choiceCurrencyVal+""+y.savePrice+"
    ");u.push("
    "+jm.format(LS.fullMinCanUse,y.orderMinPrice)+"
    ");u.push("
    ");u.push("
    ");if(Fai.top._lcid==2052||Fai.top._lcid==1028){if(d==1){u.push("
    ")}else{if(d==2){u.push("
    ")}}}else{if(d==1){u.push("
    ")}else{if(d==2){u.push("
    ")}}}u.push("
    "+jm.encodeHtml(y.couponName)+"
    ");u.push("
    "+y.validity+"
    ");if(d==0){u.push("
    "+LS.toUseCoupon+"
    ")}u.push("
    ");u.push("
    ")});u.push("
    ")}return u.join("")}return k})(jm);Mobi.memberHeadPic=function(b,a){this.sessionMid=b;this.headPicJson=a};(function(o,k,f){var j=k.prototype;var t=o(".picArea .coverImg"),q=o(".picArea"),n=o("#headPic"),c,s,d,l,e,h,b,p;j.init=function(){this.initBind()};j.initBind=function(){var E=this;t=o(".picArea .coverImg"),q=o(".picArea"),n=o("#headPic");n.on({load:function(){h=o(this)[0].offsetTop;b=o(this)[0].offsetLeft;p=Math.min(o(this)[0].height,o(this)[0].width);l=h+o(this)[0].height/2-p/2;e=b+o(this)[0].width/2-p/2;n.css({top:h+"px",left:b+"px"});r()}});o("#memberHeadPic").click(function(){var F=setInterval(function(){if(o("#headPic")[0].complete){o("#profile").hide();o(".middleCenter").css("padding-bottom","0");var G=o("#editMemberHeadPic");G.css("height",o(window).height()+"px");o("#editMemberHeadPic").show();if(Mobi.deviceTypeIsMobi()){o("#coverBox").remove()}q.css("height",o(window).height()-Math.floor(o(".loginHeader").height())-Math.floor(o(".editHeadPicFooter").height())+"px");c=Number(q.height());s=Number(q.width());h=(c-n.height())/2;b=(s-n.width())/2;if(o.toJSON(E.headPicJson)=="{}"||E.headPicJson.thumbId==""){l=h;e=b;p=Number(n.width())}else{var H=E.headPicJson.imgW/n.width();l=h+E.headPicJson.top/H;e=b+E.headPicJson.left/H;p=E.headPicJson.width/H}n.css({top:h+"px",left:b+"px"});d=Math.min(n.width(),n.height());m();r();clearInterval(F)}},50)});o(".editHeadPicFooter .saveBtn").click(function(){var F=o(this).attr("mid");var G=o(this).attr("newimg");var I=o(this).attr("oldimgid");var H={};if(!G&&!I){o("#editMemberHeadPic").hide();o("#profile").show();return}E.headPicJson.width=Math.round(p);E.headPicJson.top=Math.round(l-h);E.headPicJson.left=Math.round(e-b);E.headPicJson.imgH=Math.round(n[0].height);E.headPicJson.imgW=Math.round(n[0].width);if(G!=null){$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=cimg",data:"oldImgId="+I+"&mid="+F+"&newImg="+o.encodeUrl(G),async:false,error:function(){Mobi.ing(LS.memberProfileError)},success:function(J){J=JSON.parse(J);if(J.success){E.headPicJson.thumbId=J.fileId}}})}else{E.headPicJson.thumbId=I}H.headPic=E.headPicJson;$.ajax({type:"post",async:false,url:"ajax/member_h.jsp?cmd=set",data:"id="+F+"&info="+o.encodeUrl(o.toJSON(H)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(J){var K=o.parseJSON(J);if(K.success){E.headPicJson.path=n.attr("src");Mobi.initMemberHeadPic(E.headPicJson);o("#editMemberHeadPic").hide();o("#profile").show();Mobi.ing(LS.saveMemHeadImgSuc,1)}else{Mobi.ing(LS.memberProfileError)}}})});var u,A,y,B,y,z,v,x,w;o(".picArea").on({touchstart:function(F){var H=F.touches.length;u=t[0].offsetTop;A=t[0].offsetLeft;p=t[0].width;if(H==1){F.preventDefault();var G=F.touches[0];z={x:G.pageX,y:G.pageY}}else{B=a(F).dist;y=p}},touchmove:function(G){var J=G.touches.length;d=Math.min(n.width(),n.height());if(J==1){G.preventDefault();var I=G.touches[0];v={x:I.pageX,y:I.pageY};x=v.x-z.x;w=v.y-z.y;l=u+w;e=A+x;r()}else{var H=a(G).dist,F=H/B;p=Math.round(y*F);l=u+(y-p)/2;e=A+(y-p)/2;r()}}});var C=false;o("body").on("mouseup",function(){C=false});o(".picArea").on({mousedown:function(G){u=t[0].offsetTop;A=t[0].offsetLeft;y=t[0].width;z={x:G.pageX,y:G.pageY};C=true;var F=G.target.id;if(F=="coverBox"||F=="coverImg"){D(0)}else{if(F=="dragBotCenter"||F=="dragRightCenter"||F=="dragRightBot"){D(1)}else{if(F=="dragLeftCenter"||F=="dragLeftBot"){D(2)}else{if(F=="dragTopCenter"||F=="dragRightTop"){D(3)}else{if(F=="dragLeftTop"){D(4)}}}}}},mouseup:function(){C=false}},"#coverBox,#coverImg");function D(F){document.onmousemove=function(G){if(!C){return}v={x:G.pageX,y:G.pageY};x=v.x-z.x;w=v.y-z.y;switch(F){case 0:p=y;l=u+w;e=A+x;break;case 1:p=y+Math.max(x,w);l=u;e=A;break;case 2:p=y-x;l=u;e=A+x;break;case 3:p=y+x;l=u-x;e=A;break;case 4:p=y-x;l=u+x;e=A+x;break}r()}}};function m(){o(".coverImg").css({width:p+"px",height:p+"px",top:h+"px",left:b+"px"});o(".picArea .coverRing").css({width:p-2+"px",height:p-2+"px",top:h+"px",left:b+"px"});o(".picArea .coverBox").css({width:p+"px",height:p+"px",top:h-1+"px",left:b-1+"px"});o(".picArea .cover1").css({width:"100%",height:l+"px",top:0,left:0});o(".picArea .cover2").css({width:b+"px",height:p+"px",top:h+"px",left:0});o(".picArea .cover4").css({width:s-p-b+"px",height:p+"px",top:h+"px",left:p+b+"px"});o(".picArea .cover5").css({width:"100%",height:c-p-h+"px",top:p+h+"px",left:0})}function r(){if(p<100){p=100}else{if(p>Math.min(n[0].height,n[0].width)){p=Math.min(n[0].height,n[0].width)}}if(lh+n[0].height-p){l=h+n[0].height-p}}if(eb+n[0].width-p){e=b+n[0].width-p}}if(l>=h&&l<=h+n[0].height-p&&e>=b&&e<=b+n[0].width-p){t.css({width:p+"px",height:p+"px",top:l+"px",left:e+"px"});o(".picArea .coverRing").css({width:p-2+"px",height:p-2+"px",top:l+"px",left:e+"px"});o(".picArea .coverBox").css({width:p+"px",height:p+"px",top:l-1+"px",left:e-1+"px"});o(".picArea .cover1").css({width:"100%",height:l+"px",top:0,left:0});o(".picArea .cover2").css({width:e+"px",height:p+"px",top:l+"px",left:0});o(".picArea .cover4").css({width:s-p-e+"px",height:p+"px",top:l+"px",left:p+e+"px"});o(".picArea .cover5").css({width:"100%",height:c-p-l+"px",top:p+l+"px",left:0})}}function a(B){var y=0,A=0,w=0,z=0,v=0,x=0,u={};y=B.touches[0].pageX;w=B.touches[1].pageX;A=B.touches[0].pageY-document.body.scrollTop;z=B.touches[1].pageY-document.body.scrollTop;if(!y||!w){return}if(y<=w){v=(w-y)/2+y}else{v=(y-w)/2+w}if(A<=z){x=(z-A)/2+A}else{x=(A-z)/2+z}u={dist:Math.round(Math.sqrt(Math.pow(y-w,2)+Math.pow(A-z,2))),x:Math.round(v),y:Math.round(x)};return u}})(jm,Mobi.memberHeadPic);Mobi.deviceTypeIsMobi=function(){var c=navigator.userAgent.toLowerCase();var h=c.match(/ipad/i)=="ipad";var j=c.match(/iphone os/i)=="iphone os";var f=c.match(/midp/i)=="midp";var d=c.match(/rv:1.2.3.4/i)=="rv:1.2.3.4";var e=c.match(/ucweb/i)=="ucweb";var a=c.match(/android/i)=="android";var b=c.match(/windows ce/i)=="windows ce";var k=c.match(/windows mobile/i)=="windows mobile";if(h||j||f||d||e||a||b||k){return true}else{return false}};Mobi.reloadMemberImg=function(b,f){var d=jm("#headPic"),e=jm(".picArea"),a=Number(e.height()),h=Number(e.width());if(b=="new"){var c=new Image();c.src=f.smallPath;c.onload=function(){d.attr("src",f.smallPath);imgTop=(a-d.height())/2;imgLeft=(h-d.width())/2;d.css({top:imgTop+"px",left:imgLeft+"px"});jm(".editHeadPicFooter .saveBtn").attr("newimg",jm.toJSON(f))}}};Mobi.initMemberUploadImg=function(c,d,k,l,h,j,n,b){var m=document.createElement("script");m.type="text/javascript";m.src=l;m.onload=function(){var o=document.createElement("script");if(b=="true"){o.src=n}else{o.src=h}o.type="text/javascript";f.appendChild(o);o.onload=function(){if(b=="true"){Mobi.mobiMemberUploadImgSWF("file_upload",c,d,1,j)}else{Mobi.mobiMemberUploadImgHtml("file_upload",c,d,j)}}};var f=document.documentElement||document.body;f.appendChild(m);var a=jm("#headPic").attr("_src");var e=new Image();e.src=a;jm("#headPic").attr("src",a)};Mobi.mobiMemberUploadImgSWF=function(e,c,h,b,a){var f=h.split(",");var d={file_post_name:"Filedata",upload_url:"ajax/memberHeadImgUp_h.jsp",button_placeholder_id:e,file_size_limit:c+"MB",button_image_type:3,file_queue_limit:1,button_cursor:SWFUpload.CURSOR.HAND,requeue_on_error:false,post_params:{ctrl:"Filedata",app:21,type:0,fileUploadLimit:c},file_types:f.join(";"),file_dialog_complete_handler:function(j){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(k,j,l){switch(j){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Mobi.ing(LS.mobiFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Mobi.ing(LS.mobiFormSubmitFileUploadNotAllow,true);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadOneTimeNum,"1"),true);break;default:Mobi.ing(LS.mobiFormSubmitFileUploadReSelect,true);break}},upload_success_handler:function(k,j){var l=jm.parseJSON(j);this._allSuccess=l.success;this._sysResult=l.msg;if(l.success){setTimeout(function(){Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadSucess,jm.encodeHtml(k.name)),true)},1800);Mobi.reloadMemberImg("new",l)}else{Mobi.ing(LS.mobiFormSubmitFileUploadFile+k.name+" "+l.msg)}},upload_error_handler:function(k,j,l){if(j==-280){Mobi.ing(LS.mobiFormSubmitFileUploadFileCancle,false)}else{if(j==-270){Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadFileExist,jm.encodeHtml(k.name)),true)}else{Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadSvrBusy,jm.encodeHtml(k.name)))}}},upload_complete_handler:function(j){if(j.filestatus==SWFUpload.FILE_STATUS.COMPLETE){setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(j.filestatus==SWFUpload.FILE_STATUS.ERROR){Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadSvrBusy,jm.encodeHtml(j.name)))}}},upload_start_handler:function(j){Mobi.ing(LS.mobiFormSubmitFileUploadPrepare,false)},view_progress:function(j,m,l,k){var k=Math.ceil((m/l)*100);if(isNaN(k)){return}if(k==100){Mobi.ing(LS.mobiFormSubmitFileUploadIng+k+"%",true)}else{Mobi.ing(LS.mobiFormSubmitFileUploadIng+k+"%",false)}}};swfObj=SWFUploadCreator.create(d)};Mobi.mobiMemberUploadImgHtml=function(h,d,e,f){var a=e.split(",");var c=jm("#_TOKEN").attr("value");var j={siteFree:false,updateUrlViewRes:"",auto:true,fileTypeExts:a.join(";"),multi:false,fileSizeLimit:d*1024*1024,breakPoints:true,saveInfoLocal:false,showUploadedPercent:true,removeTimeout:9999999,isDefinedButton:true,getFileSizeUrlFlag:true,post_params:{app:21,type:0,fileUploadLimit:d,isSiteForm:true},isOrnotButton:true,buttonText:"",uploader:"http://"+f+"/ajax/memberHeadImgUp_h.jsp?cmd=mobiUpload&_TOKEN="+c,onUploadStart:function(l){jm("#progressBody_ "+l.id).remove();jm("#progressWrap_"+l.id).remove()},onUploadSuccess:function(l,n){var m=jm.parseJSON(n);if(m.success){setTimeout(function(){Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadSucess,jm.encodeHtml(l.name)),true)},1800);Mobi.reloadMemberImg("new",m)}else{Mobi.ing(LS.mobiFormSubmitFileUploadFile+l.name+" "+m.msg)}},onUploadError:function(l,m){jm("#progressWrap_"+l.id).remove();Mobi.ing(jm.format(LS.mobiFormSubmitFileUploadSvrBusy,jm.encodeHtml(l.name)))},view_progress:function(l){var l=Math.ceil(l);if(isNaN(l)){return}if(l==100){Mobi.ing(LS.mobiFormSubmitFileUploadIng+l+"%",true)}else{Mobi.ing(LS.mobiFormSubmitFileUploadIng+l+"%",false)}}};upload=jm("#"+h).uploadify(j);jm("#"+h).parent(".modifyBtn").on("click",function(){$(this).find(".selectbtn").trigger("click")});var k="file_upload_pt_1";var b="select_btn_pt_1";jm("#file_upload_1-button").attr("id",k);jm("#select_btn_1").attr("id",b);if(Fai.top._manageMode){jm("#file_upload_pt_1").attr("disabled","true")}};Mobi.initMemberHeadPic=function(b){var a=jm("#memberHeadPic"),c=jm(".icon-pnameIcon");if(typeof b.path!=undefined){a.attr("src",b.path)}if(b.width!=0){var f=b.width/c.width(),e=-(b.top/f)+"px",d=-b.left/f+"px";a.css({width:b.imgW/f+"px",height:b.imgH/f+"px",marginTop:e,marginLeft:d})}};Mobi.memberProfileSubmit=function(k,a,h){var c={};if(a){if(h){var d=jm("#oldPsw").val();if(d==null||d==""){Mobi.ing(LS.memberProfileOldPwdEmpty);Mobi.getPreviewObject("oldPsw").focus();return}c.oldPwd=jm.md5(d)}var j=jm("#newPsw").val();if(j==null||j==""){Mobi.ing(LS.memberProfilePwdEmpty);Mobi.getPreviewObject("newPsw").focus();return}if(j.length<4){Mobi.ing(LS.memberProfilePwdMinLength);Mobi.getPreviewObject("newPsw").focus();return}var e=jm("#confirmPsw").val();if(j!=e){Mobi.ing(LS.memberProfilePwdNotMatch);Mobi.getPreviewObject("confirmPsw").focus();return}c.pwd=jm.md5(j)}else{var l=jm("#profileValue").attr("maxlength");var f=jm("#profileValue").attr("name");var b=jm("#profileValue").val();c[f]=b;if(b.length>l){Mobi.ing(jm.format(LS.memberProfileUserEditItemMaxLength,f,l));Mobi.getPreviewObject("profileValue").focus();return false}if(jm("#profileValue").attr("ismust")==="true"){if(b==null||b==""){if(jm(this).is("input")){Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty,jm("#modifyProfile").find(".title").html()))}else{Mobi.ing(jm.format(LS.memberSignupUserAddItemIsEmpty2,jm("#modifyProfile").find(".title").html()))}Mobi.getPreviewObject("profileValue").focus();return false}if(f==="email"&&b.length>0){if(!jm.isEmail(b)){Mobi.ing(jm.format(LS.memberProfileItemCorrect,f));Mobi.getPreviewObject("profileValue").focus();return false}}}}Mobi.ing(LS.memberProfileSubmitting,-1);jm(".g_button").removeClass("sendIcon");jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set",data:"id="+k+"&info="+jm.encodeUrl(jm.toJSON(c)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(m){var n=jm.parseJSON(m);if(n.success){Mobi.ing(LS.memberProfileOK,1);document.location.reload()}else{jm(".g_button").addClass("sendIcon");jm(".loginIcon ").hide();if(n.rt=-3){Mobi.ing(LS.memberProfileOldPwdIncorrectError)}else{Mobi.ing(LS.memberProfileError)}}}})};Mobi.getMProtocol=function(a,b){jm("#mProPage .loginHeader").show();jm("#webHeaderBox").hide();jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=getProContent",error:function(){Mobi.ing(LS.memberProfileError)},success:function(c){var d=jm.parseJSON(c);if(d.success){jm("#mProPage").find(".title").html(d.proName);jm("#mProPage").find(".set-line").html(d.msg);window.scrollTo(0,0);jm("#signupPage").hide();jm("#mProPage").show()}else{alert("服务器连接错误!")}}})};Mobi.checkMustItem=function(a){jm(a).find(".mustItem").on("keyup focusout",function(){var b=true;jm(a).find(".mustItem").each(function(){if(jm(this).val().trim()===""){b=false;return}});if(b===true){jm(".sendIcon").removeAttr("disabled")}})};Mobi.setPersonalInfo=function(c){var f={};var e="";var a="";var b="";var h=0;var d=false;jm(".infoItem").each(function(){e=jm(this).attr("name");a=jm(this).val();b=jm(this).attr("proptip");d=(jm(this).attr("class").indexOf("mustItem")<0)?false:true;if(!h&&d&&(a==null||a=="")){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,b));this.focus();h=1}if(!h&&e=="email"&&a.length>0){if(!jm.isEmail(a)){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,b));this.focus();h=1}}if(!h&&e=="mobile"&&a.length>0){if(jm(this).attr("disabled")!="disabled"){if(!jm.isNationMobile(a)){Mobi.ing(LS.mobileNumRegular);this.focus();h=1}}else{a=""}}f[e]=a;if(e=="mobile"&&a.length<=0){f.mobileCt=""}});if(jm("#modifyPersInfo .acct").attr("disabled")!=""){if(jm("#modifyPersInfo .acct").val()==""){h=1}else{f.acct=jm("#modifyPersInfo .acct").val()}}if(h===0){jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set",data:"id="+c+"&info="+jm.encodeUrl(jm.toJSON(f)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(j){var k=jm.parseJSON(j);if(k.success){Mobi.ing(LS.memberProfileOK,1);document.location.reload()}else{if(k.rt==-3){Mobi.ing(LS.memberProfileOldPwdIncorrectError)}else{if(k.rt==-6){Mobi.ing(LS.memberAcctExist)}else{if(k.rt==-8){Mobi.ing(LS.emailPlural)}else{if(k.rt==-9){Mobi.ing(LS.mobilePlural)}else{if(k.mobileErr){Mobi.ing(LS.mobileNumRegular)}else{Mobi.ing(LS.memberProfileError)}}}}}}}})}};Mobi.manageLogin=function(){var b=jm(".qqLgnPanel");var d=jm(".sinaLgnPanel");var a=jm(".wxLgnPanel");if(window.parent==window){if(Fai.top._templateFrameId==2001||Fai.top._templateFrameId==2003||Fai.top._templateFrameId==2004){if(a.css("display")=="none"){if(b.length==0&&d.length>0&&a.length==0){d.css("margin-left","4.7rem")}else{if(b.length>0&&d.length==0&&a.length==0){b.css("margin-left","4.7rem")}else{if(b.length==0&&d.length==0&&a.length>0){a.css("margin-left","4.7rem")}else{if(b.length==0&&d.length>0&&a.length>0){d.css("margin-left","4.7rem")}else{if(b.length>0&&d.length==0&&a.length>0){b.css("margin-left","4.7rem")}}}}}}else{if(b.length>0&&d.length>0&&a.length>0){b.css("margin-left","0.5rem")}else{if(b.length>0&&d.length==0&&a.length>0){b.css("margin-left","2.4rem")}else{if(b.length==0&&d.length>0&&a.length>0){d.css("margin-left","2.4rem")}else{if(b.length==0&&d.length==0&&a.length>0){a.css("margin-left","4.7rem")}}}}}}return}jm(".wxLgnPanel").show();var c=false;if(Fai.top._templateFrameId==2001||Fai.top._templateFrameId==2003||Fai.top._templateFrameId==2004){c=true}if(b.length>0&&d.length>0&&a.length>0){if(c){b.css("margin-left","0.5rem")}else{b.css("margin-left","1.8rem")}}else{if(b.length>0&&d.length==0&&a.length>0){if(c){b.css("margin-left","2.4rem")}else{b.css("margin-left","3.6rem")}}else{if(b.length==0&&d.length>0&&a.length>0){if(c){d.css("margin-left","2.4rem")}else{d.css("margin-left","3.6rem")}}else{if(b.length==0&&d.length>0&&a.length==0){if(c){d.css("margin-left","4.7rem")}else{d.css("margin-left","6rem")}}else{if(b.length>0&&d.length==0&&a.length==0){if(c){b.css("margin-left","4.7rem")}else{b.css("margin-left","6rem")}}else{if(b.length==0&&d.length==0&&a.length>0){if(c){a.css("margin-left","4.7rem")}else{a.css("margin-left","6rem")}}else{if(b.length==0&&d.length>0&&a.length==0){if(c){d.css("margin-left","4.7rem")}else{d.css("margin-left","6rem")}}else{if(b.length>0&&d.length==0&&a.length==0){if(c){b.css("margin-left","4.7rem")}else{b.css("margin-left","6rem")}}}}}}}}}if(jm(".loginContent").find(".notice").length>0){return}if(b.length>0){b.find("#qqLgn").unbind().click(function(){Mobi.ing("第三方登录需要在手机上使用。请用手机扫一扫,再尝试该功能。",true)})}if(d.length>0){d.find("#sinaLgn").unbind().click(function(){Mobi.ing("第三方登录需要在手机上使用。请用手机扫一扫,再尝试该功能。",true)})}if(a.length>0){a.find("#wxLgn").unbind().click(function(){Mobi.ing("第三方登录需要在手机上使用。请用手机扫一扫,再尝试该功能。",true)})}};Mobi.hidePlaceholder=function(){var e=document.querySelectorAll(".mustItem");var d=document.querySelectorAll(".g_input");var a=document.querySelectorAll(".g_textArea");var c="";for(var b=0;b","","","
    ","","
    ",""];h=h.join("");jm(".loginContent").html(h)}else{if(f.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{if(f.rt==1){Mobi.ing(LS.memberSignupRegisterCaptchaNotMatch)}}}}})};Mobi.memberNewFdPwdLastStep=function(b){var d=jm("#newPwInput").val();if(Mobi.isNull(d)||!d){Mobi.ing(LS.memberDialogPleaseEnterPwd);return}var a=jm("#assureNewPwInput").val();if(Mobi.isNull(a)||!a){Mobi.ing(LS.memberDialogPleaseEnterPwd2);return}if(d!==a){Mobi.ing(LS.memberDialogPwdDifToPwd2);return}if(d.length<4||d.length>20){Mobi.ing(jm.format(LS.memberDialogPwdLimit,4,20));return}var c="newPw="+jm.md5(d)+"&memId="+jm.encodeUrl(b);jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=setMemberPwdGeneral",data:c,error:function(){Mobi.ing(LS.systemError)},success:function(e){var e=jm.parseJSON(e);if(e.success){jm(".loginContent").html("");var f=['
    ','
    ','
    ','
    ','',"
    ",'',LS.memberDialogPwdforced,"","
    ",'
    ','',"
    ","
    ","
    ",];f=f.join("");jm(".loginContent").html(f)}else{if(e.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{Mobi.ing(LS.argsError,true)}}}})};Mobi.memberFdPwd=function(a,d){jm(".J_showFindPwWay").html("");var c=jm.trim(jm("#macct").val());if(c==""){Mobi.ing(LS.memberInputAcct,true);Mobi.getPreviewObject("macct").focus();return}function b(k,j,f){var h=Fai.top.jm,e;if(h.type(j)!=="array"||h.type(k)!=="string"){return""}e=j.length;while(e){e--;if(h.type(j[e])==="string"){j[e]=[f,j[e],f].join("")}}return k+"("+j.join(",")+")"}jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=getMAcctMail",data:"mAcct="+jm.encodeUrl(c),error:function(){Mobi.ing(LS.systemError,false)},success:function(e){var e=jm.parseJSON(e);if(e.success){if(!e.findPwByMobileOpen){if(e.noMail){Mobi.ing(LS.memberDialogNoEmailMsg);return}}if(!e.findPwByMailOpen){if(e.mobile==null||e.mobile=="null"||""==e.mobile){Mobi.ing(LS.memberDialogNoMobile);return}}if(e.noMail&&(e.mobile=="null"||""==e.mobile)){Mobi.ing(LS.memberDialogNoMailMobile);return}jm(".J_memberFdPwdBtn").remove();var f=[];f.push('
    ');f.push(LS.memberFdPwdWay+":");f.push("
    ");if(e.findPwByMailOpen){if(e.noMail){f.push('
    ')}else{f.push('
    ')}f.push('');f.push(LS.memberFdPwdWayByMail);f.push("");f.push('');f.push("");f.push("
    ")}if(e.findPwByMobileOpen){if(e.mobile=="null"||""==e.mobile){f.push('
    ')}else{f.push('
    ')}f.push('');f.push(LS.memberFdPwdWayByMobile);f.push("");f.push('');f.push("");f.push("
    ")}f=f.join("");jm(".J_showFindPwWay").append(f)}else{if(e.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{Mobi.ing(LS.argsError,true)}}}})};Mobi.findPwByMailShowNoMail=function(){Mobi.ing(LS.memberShowNoMail)};Mobi.findPwByMobileShowNoMb=function(){Mobi.ing(LS.memberShowNoMobile)};Mobi.findPwByMailStepTwo=function(c,b,e,a){jm("#memberFdPwdStepOne").hide();var d=['
    ','
    ','','',LS.memberDialogFwdStepOneTitle,"","
    ",'
    ',"",LS.memberDialogSendedMsg," ",a," ",LS.memberDialogViewMail,"","
    ",'
    ','
    ','','','',"
    ",'
    ','','',"
    ","
    ","
    ",];d=d.join("");jm(".middleCenter").append(d);Mobi.sendMemberEmailCodeImgFix("#memEmailCode",b);Mobi.sendMemberEmailPwdCode(c)};Mobi.findPwByMobileStepTwo=function(d,b,h,c,a){jm("#memberFdPwdStepOne").hide();jm("#memberFdPwdStepTwo").remove();var e=['
    ','
    ','','',LS.memberDialogFwdStepOneTitle,"","
    ",'
    ',"",LS.fdPwdHasSendMobileCode," ",c," ",LS.pleaseCheckMobileCode,"","
    ",'
    ','
    ','','','',"
    ",'
    ','','',"
    ","
    ","
    ",];e=e.join("");jm(".middleCenter").append(e);Mobi.sendMemberEmailCodeImgFix("#memEmailCode",b);var f=jm("#sendEmailCode");Mobi.codeTimeCountDown(f)};Mobi.sendFindPwMobileCode=function(d,b,a,e,c){jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=sendMemberPwdMobileCode",data:"memName="+jm.encodeUrl(d),error:function(){Mobi.ing(LS.systemError,false)},success:function(f){var f=jm.parseJSON(f);if(f.success){if(b){Mobi.findPwByMobileStepTwo(d,a,e,c,f.mobileCodeSign)}}else{if(f.argErr){Mobi.ing(LS.memberDialogSendMobileClose)}else{if(f.apiKeyNotFound){Mobi.ing(LS.memberDialogYunPianErr)}else{if(f.tplNotFound){Mobi.ing(LS.memberDialogMobileTplErr)}else{if(f.notFound){Mobi.ing(LS.memberDialogNotFound)}else{if(f.limitOne){Mobi.ing(LS.getMobileOneMin)}else{if(f.limitTwo){Mobi.ing(LS.getMobileHalfHour)}else{if(f.noMoney){Mobi.ing(LS.memberDialogMobileMoneyErr)}else{if(f.mobileErr){Mobi.ing(LS.memberDialogSendMobileCodeErr)}else{if(f.sendLimit){Mobi.ing(LS.memberDialogSendMobileCodeLimit)}else{if(f.mobileSysErr){Mobi.ing(LS.memberDialogSendMobileSysErr)}else{if(f.systemErr){Mobi.ing(LS.systemError)}else{if(f.tplNationErr){Mobi.ing(LS.mobileNationTplErr)}else{Mobi.ing(LS.argsError)}}}}}}}}}}}}}}})};Mobi.sendMemberEmailCodeImgFix=function(b,a){if(a==2052){jm(b).css("padding-left","3.5rem")}else{jm(b).css("padding-left","2rem")}};Mobi.sendMemberEmailPwdCode=function(a){var b=jm("#sendEmailCode");Mobi.codeTimeCountDown(b);jm.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=sendMemberPwdEmail",data:"memName="+jm.encodeUrl(a),error:function(){Mobi.ing(LS.systemError,false)},success:function(c){var c=jm.parseJSON(c);if(c.success){jm("#memMailCodeSign").val(c.emailCodeSign)}else{if(c.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{Mobi.ing(LS.argsError,true);b.val(LS.memberDialogReSendMsg)}}}})};Mobi.codeTimeCountDown=function(c){var b=60;a(c);function a(d){if(b==0){d.removeAttr("disabled");d.val(LS.memberDialogReSendMsg);return}else{d.attr("disabled",true);d.val(""+LS.memberDialogReSendMsg+"("+b+")");b--}setTimeout(function(){a(d)},1000)}};Mobi.memberFdPwdByMobileStepThree=function(b,a,f){var d=jm("#memEmailCode").val();if(!d||d.length<0){Mobi.ing(LS.inputMobileCode);return}var c=jm("#memMailCodeSign").val();var e="memMobileCode="+jm.encodeUrl(d)+"&memMobileCodeSign="+jm.encodeUrl(c)+"&memName="+jm.encodeUrl(b);jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=checkFindPwdByMobileCode",data:e,error:function(){Mobi.ing(LS.systemError,false)},success:function(h){var h=jm.parseJSON(h);if(h.success){Mobi.memberFdPwdStepThreeSd(b,a,f)}else{if(h.argErr){Mobi.ing(LS.argsError,true)}else{if(h.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{Mobi.ing(LS.reGetMobileCode,true)}}}}})};Mobi.memberFdPwdStepThree=function(d,c,f){var a=jm("#memEmailCode").val();if(!a||a.length<0){Mobi.ing(LS.memberDialogPleaseEnterCode);return}var b=jm("#memMailCodeSign").val();var e="memEmailCode="+jm.encodeUrl(a)+"&memMailCodeSign="+jm.encodeUrl(b)+"&memName="+jm.encodeUrl(d);jm.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=checkPwdEmailCode",data:e,error:function(){Mobi.ing(LS.systemError,false)},success:function(h){var h=jm.parseJSON(h);if(h.success){Mobi.memberFdPwdStepThreeSd(d,c,f)}else{Mobi.ing(LS.memberDialogCodeMailFailure,true)}}})};Mobi.memberFdPwdStepThreeSd=function(b,a,d){jm("#memberFdPwdStepTwo").hide();var c=['
    ','
    ','','',LS.memberDialogResetPwd,"","
    ",'
    ','
    ','','',"
    ",'
    ','','',"
    ",'
    ','',"
    ","
    ","
    ",];c=c.join("");jm(".middleCenter").append(c);Mobi.sendMemberEmailCodeImgFix("#memPwd",a);Mobi.sendMemberEmailCodeImgFix("#memPwd2",a)};Mobi.memberFdPwdStepLast=function(b,e){var a=jm("#memPwd").val();var d=jm("#memPwd2").val();if(!a){Mobi.ing(LS.memberDialogPleaseEnterPwd,true);return}else{if(!d){Mobi.ing(LS.memberDialogPleaseEnterPwd2,true);return}else{if(a!=d){Mobi.ing(LS.memberDialogPwdDifToPwd2,true);return}else{if(a.length<4||a.length>20){Mobi.ing(jm.format(LS.memberDialogPwdLimit,4,20));return}}}}var c="&memPwd="+jm.md5(a)+"&memName="+jm.encodeUrl(b);jm.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=setMemberPwd",data:c,error:function(){Mobi.ing(LS.systemError,false)},success:function(f){var f=jm.parseJSON(f);if(f.success){jm("#memberFdPwdStepThree").hide();var h=['
    ','
    ','
    ','
    ','',"
    ",'',LS.memberDialogPwdforced,"","
    ",'
    ','',"
    ","
    ","
    ",];h=h.join("");jm(".middleCenter").append(h)}else{if(f.notFound){Mobi.ing(LS.memberDialogNotFound,true)}else{Mobi.ing(LS.argsError,true)}}}})};Mobi.memberModuleReturnUrlInit=function(a){var b=Mobi.getPreviewWindow().location.href;var c=Mobi.getUrlParam(b,"returnUrl");if(!c){c=a}jm("#profile").find(".loginHeader .g_close").attr("href",c)};Mobi.fixMyMallOrderDiviceLine=function(){jm(".mallDiviceLine20 .mallOrderDiviceItem").css("width","16%");jm(".mallDiviceLine20 .diviceOrderNum").css("right","0.32rem")};Mobi.initModulePhotoList=function(u,e,c){if(!u||!c){return}var n=Mobi.getPreviewObject("photoListDetailShow"+u);if(n){n.parentNode.removeChild(n)}module="module"+u;var k=document.getElementById(module),d=document.getElementById("webFooterBox"),v=document.createElement("div"),o=document.createElement("div"),h=document.createElement("div"),m=document.createElement("div");m.className="photoDetailClose";v.appendChild(m);o.className="webPhotoListDetail";o.id="webPhotoListDetail"+u;for(var r=0;ry){if(f.innerHTML){this.style.bottom="0px";o.className="webPhotoListDetail photoFilter"}}else{this.style.bottom=w*0.8-y+"px";o.className="webPhotoListDetail photoFilter"}this.className="photoDetailDescription descriptionOpen";if(f.innerHTML){x.className="handleIcon handleDown"}}else{if(f.innerHTML){this.style.bottom=-(f.offsetHeight-b.offsetHeight)+"px"}this.className="photoDetailDescription descriptionClose";o.className="webPhotoListDetail";if(f.innerHTML){x.className="handleIcon handleUp"}}});jm(m).bind("click",function(){v.style.top="150%";o.className="webPhotoListDetail"})};Mobi.clickPhoto=function(a,c){var b=Mobi.getPreviewWindow;if(Fai.top.document.getElementById("mobiReviewPageFrame")){Fai.top.document.getElementById("mobiReviewPageFrame").scrolling="no"}jm(".imgDetailDiv").show();Mobi.getPhotoDetail(a,c)};Mobi.exitPhotoDetail=function(){if(Fai.top.document.getElementById("mobiReviewPageFrame")){Fai.top.document.getElementById("mobiReviewPageFrame").scrolling="yes"}jm(".imgDetailDiv").hide()};Mobi.getPhotoDetail=function(a,b){jm.ajax({type:"post",url:"ajax/photo_h.jsp",data:"cmd=get&id="+jm.encodeUrl(b)+"&groupId="+jm.encodeUrl(a),error:function(){},success:function(d){d=jm.parseJSON(d);jm(".showImg").attr("src",d.picPath);var c=parseInt(d.nextId)===-1?false:true;var e=parseInt(d.prevId)===-1?false:true;if(e){jm(".prevPhoto").show();jm(".prevPhoto").attr("onclick","Mobi.getPhotoDetail('"+d.groupId+"','"+d.prevId+"')")}else{jm(".prevPhoto").hide()}if(c){jm(".nextPhoto").show();jm(".nextPhoto").attr("onclick","Mobi.getPhotoDetail('"+d.groupId+"','"+d.nextId+"')")}else{jm(".nextPhoto").hide()}jm(".imgDesc").html(d.basic);jm(".imgName").html(d.name);jm(".imgDetailArea").html(d.detail)}})};Mobi.toNextPhoto=function(h){var b=jm(Mobi.getPreviewObject("module"+h)).find(".photoBox");var d=parseInt(jm(b).css("width"))-300;var f=parseInt(jm(b).css("left").split("px")[0]);var a=Math.abs(f/300)+2;var c=jm(b).find("li:nth-child("+a+") img").attr("lazysrc");if(c){jm(b).find("li:nth-child("+a+") img").attr("src",c)}if(f<=-d){if(!jm(b).hasClass("moving")){jm(b).addClass("moving");jm(b).css("left",(f-50)+"px");setTimeout(function(){jm(b).css("left",(f)+"px");jm(b).removeClass("moving")},600)}return}var e=f-300;jm(b).css("left",e+"px")};Mobi.toPrevPhoto=function(e){var a=jm(Mobi.getPreviewObject("module"+e)).find(".photoBox");var b=parseInt(jm(a).css("width"));var d=parseInt(jm(a).css("left").split("px")[0]);if(d==0){if(!jm(a).hasClass("moving")){jm(a).addClass("moving");jm(a).css("left",(d+50)+"px");setTimeout(function(){jm(a).css("left",(d)+"px");jm(a).removeClass("moving")},600)}return}var c=d+300;jm(a).css("left",c+"px")};Mobi.handEvent=function(b){var a=jm(Mobi.getPreviewObject("module"+b)).find(".photoModule");jm(a).bind("swipeLeft",function(){Mobi.toNextPhoto(b);return false});jm(a).bind("swipeRight",function(){Mobi.toPrevPhoto(b);return false})};Mobi.autoSetPhotoHeight=function(a){Mobi.unifiedAttrVal(jm(Mobi.getPreviewObject("module"+a)),".photoModule .photoDiv","height")};Mobi.initPhotoSwipe=function(a,d,h,e,c){var k=Mobi.getPreviewObject("imgName"+a);jm(k).html(d[0]);var j=Mobi.getJQMobi();var f=Mobi.getPreviewObject("photoSwipe"+a);if(!f){return}if(c==1){Mobi.initScaleImage(f)}else{if(c==2){Mobi.initDefScaleImage(f)}else{Mobi.noScaleImage(f)}}j("#photoSwipe"+a).swipehandle(f,{auto:h,speed:e,continuous:true,bulletsClick:true,callback:function(m){var l=b.length;while(l--){b[l].className=" "}if(!b[m]){b[m-b.length].className="on";jm(k).html(d[m-b.length])}else{b[m].className="on";jm(k).html(d[m])}}});j("#photoSwipe"+a).find(".imageDiv").show();if(!f.querySelector("#bullets"+a)){return}var b=f.querySelector("#bullets"+a).getElementsByTagName("li")};Mobi.initScaleImage=function(c){if(c){var h=c.querySelectorAll("img"),e=c.clientWidth,f=0;if(h){for(var j=0;jf){f=d}}if(e*f!=0){c.style.height=Math.floor(e*f)+"px"}if(c.className=="proImgSwipe"){var b=c.querySelector(".proDetailImg");if(b){c.style.height=b.clientHeight+"px"}}}}};Mobi.noScaleImage=function(c){if(c){var h=c.querySelectorAll("img"),e=c.clientWidth,f=0;if(h){for(var j=0;jf){f=d}}if(e*f!=0){c.style.height=Math.floor(e*f)+"px"}if(c.className=="proImgSwipe"){var b=c.querySelector(".proDetailImg");if(b){c.style.height=b.clientHeight+"px"}}}}};Mobi.initDefScaleImage=function(c){if(c){var k=c.querySelectorAll("img"),h=c.clientWidth,j=0;var a=c.querySelectorAll(".photoImageItem");var l=c.querySelectorAll(".imageMiddleSpan");if(k){for(var m=0;m
    '}},d=window.Code.PhotoSwipe,a=d.attach(b,e)};Mobi.initModulePhotoGroupManage=function(a){if(!a){return}if(!a.moduleId){return}jm("#"+a.photoParent).find(">."+a.photo).each(function(){var c=jm(this);var b=c.find("."+a.photoChild).eq(0);c.mouseover(function(){var h=c.attr("id").replace(/[^0-9]/ig,"");var j=c.attr("class");var f=c.find(".photoGroup-title").text();var d=[{operationText:"编辑图册",className:"edit",evalScript:"Mobi.logDog(100048, 0);top.Mobi.popupWindow({title:'编辑图册', frameSrcUrl:'"+a.frameSrcUrl+"&id="+h+"&_mobi=1', width:860, height:682, version: 2 })"},{operationText:"删除图册",className:"close",evalScript:"Mobi.deletePhotoGroupManage('"+h+"', '"+Fai.top.Fai.encodeHtmlJs(f)+"', '', 0)"}];var e="";if(/photoGroupStyle1/.test(j)){e=Mobi.addEditLayer(b,d,6,a)}else{e=Mobi.addEditLayer(b,d,106,a)}}).mouseleave(function(){var d=c.attr("class");if(/photoGroupStyle1/.test(d)){Mobi.removeEditLayer(b)}else{Mobi.removeEditLayer(b,null,106)}})})};Mobi.deletePhotoGroupManage=function(f,c,a,b){Mobi.removeAllEditLayer();if(Fai.top.Mobi.checkSaveBar()){return}if(c.length>15){c=c.slice(0,15)+"..."}c=jm.encodeHtml(c);var e=new Array();e.push("
    ");e.push("确定删除图册“"+c+"”?");e.push("
    ");var d=top.Fai.popupBodyWindow({title:"删除图册",content:e.join(""),width:370,height:130});top.Fai.addPopupBodyWindowCheckBox(d,{id:"checkbox",text:"同时删除图册图片",init:"checked",click:function(){}});top.Fai.addPopupBodyWindowBtn(d,{id:"save",text:"确 定",extClass:"saveButton",click:function(){var h=top.$("#popup"+d+"checkbox").attr("checked")?true:false;top.Fai.ing("正在处理中,请稍候...",false);$.ajax({type:"post",url:Mobi.genAjaxUrl("photoGroup_h.jsp"),data:"cmd=del&id="+f+"&delImgs="+h,error:function(){top.Fai.ing("系统繁忙,请稍候重试",false)},success:function(j){top.Fai.successHandle(j,"删除成功","",a,b,1);Mobi.jumpUrlMobi(Mobi.getPreviewDocument().location.href)}});top.Fai.closePopupBodyWindow(d)}});top.Fai.addPopupBodyWindowBtn(d,{id:"cancel",text:"取 消",click:"close"})};Mobi.initModulePhotoDetailSwipe=function(x,v,l,t){if(v.length<1){return}var k=[];if(l){k=document.querySelectorAll("#"+x+" .photoGroup-img")}else{k=document.querySelectorAll("#"+x+" img")}var c=[],r=0;for(var s=0;s
    '},uiDetailCallBack:function(y,C,j){var z=this;jm(y).html("");var E=v[w.currentIndex],B=E.groupId,D=E.id,A=E.name;jm(j).html(A);jm(C).addClass(f.Carousel.CssClasses.itemLoading);jm.ajax({type:"post",url:"ajax/photo_h.jsp",data:"cmd=getInfo&id="+jm.encodeUrl(D)+"&groupId="+jm.encodeUrl(B),error:function(){Mobi.ing(LS.systemError)},success:function(F){jm(y).html(F);var I=y.querySelectorAll("img");if(I.length===0){z.detailScroll&&z.detailScroll.destroy();z.detailScroll=null;z.destroyScroll=new iScroll(C);jm(C).removeClass(f.Carousel.CssClasses.itemLoading)}else{for(var G=0;G1){var y=v[j+1],z=A.target.cache.images[A.target.currentIndex+1],B;if(z){B=z.imageEl;B.src=y.picPath;p(true,B)}}})}if(navigator.userAgent.indexOf("baidubrowser")){jm("body").off("touchstart.photoSwipe").on("touchstart.photoSwipe",function(j){})}function p(y,j){if(!y){return}Mobi.recoverPhotoSwipeImgSize(j)}};Mobi.recoverPhotoSwipeImgSize=function(b){var d=jm(b),a=false,e=b.complete;if(b.style.width==="0px"){a=true;d.css("width","")}if(b.style.height==="0px"){a=true;d.css("height","")}if(!a){return}if(e){c(d)}else{d.hide();d.parent().addClass("ps-carousel-item-loading");d.one("load.adjust",function(h){var f=jm(this);f.parent().removeClass("ps-carousel-item-loading");f.show();c(f)})}function c(h){var k=document.body.clientWidth,f=document.body.clientHeight,j=h.width(),l=h.height();h.css({height:l+"px",width:j+"px",left:(k-j)/2+"px",top:(f-l)/2+"px"})}};Mobi.copyModulePhotoDetailSwipe=function(c){var d=c.substring(c.lastIndexOf("e")+1);var b=jm("#"+c).find(".J_contentPanelCopy"+d).find(".style2Img.photoListImg");var a=jm("#"+c).find("#photoSlideList"+d).find(".style2Img.photoListImg");jm(b).each(function(e,f){jm(f).on("click",function(){jm(a[e]).trigger("click")})})};Mobi.PhotoDetailSwipeForJumpCtrl=function(a){var b=[];jm.ajax({type:"get",url:"ajax/getPhotoData_h.jsp?groupId="+a+"&cmd=getPhotoData",success:function(p){var p=jm.parseJSON(p);if(p&&p.success){if(p.info!=null){b=p.info}}var l=[],e;for(var d=0,k=b.length;d
    '},uiDetailCallBack:function(r,v,q){var s=this;jm(r).html("");var x=b[n.currentIndex],u=x.groupId,w=x.id,t=x.name;jm(q).html(t);jm(v).addClass(c.Carousel.CssClasses.itemLoading);jm.ajax({type:"post",url:"ajax/photo_h.jsp",data:"cmd=getInfo&id="+jm.encodeUrl(w)+"&groupId="+jm.encodeUrl(u),error:function(){Mobi.ing(LS.systemError)},success:function(y){jm(r).html(y);var B=r.querySelectorAll("img");if(B.length===0){s.detailScroll&&s.detailScroll.destroy();s.detailScroll=null;s.destroyScroll=new iScroll(v);jm(v).removeClass(c.Carousel.CssClasses.itemLoading)}else{for(var z=0;z1){s=b[q+1];t=u.target.cache.images[u.target.currentIndex+1];if(t){r=t.imageEl;r.src=s.picPath;Mobi.recoverPhotoSwipeImgSize(r)}}})}})};Mobi.photoCrossedSlideSecSwipe=function(a,e,b){var c=Mobi.getPreviewObject(e),h=Mobi.getPreviewObject(b),f=c,k=parseInt(jm(h).width()),m=0,j=jm(".photoCrossedSlideSec",h);function d(o){var n=0;n+=parseFloat(o.width());n+=(parseFloat(o.css("padding-left"))+parseFloat(o.css("padding-right")));n+=(parseFloat(o.css("border-left-width"))+parseFloat(o.css("border-right-width")));n+=(parseFloat(o.css("margin-left"))+parseFloat(o.css("margin-right")));return n}if(j.length>0){m=d(jm(j[0]))*j.length}if(m>k){if(navigator.appVersion.match(/MSIE [\d.]+/)){if(parseInt(navigator.appVersion.match(/MSIE ([\d.]+)/)[1])===10){m=m+j.length*2}}m=m+10;jm(f).css("width",m+"px");if(jm.os.supportsTouch){var l=new iScroll(h,{scrollX:true,scrollY:false,mouseWheel:true,remarkXCoordinate:true,onBeforeScrollStart:null})}}j.show()};Mobi.initModuleMultiPhotoListItemManage=function(a){if(!a||!a.moduleId){return}var c=$("#module"+a.moduleId);c.data("options",a);var b=a.content;$.each(b.picList,function(f,j){var l=j.id,h=j.desc,e=j.ide,d=j.openLink;var k=$("#module"+a.moduleId).find(".style2Img.photoListImg.stretchImg").parent();k.mouseover(function(){var m=[{operationText:"编辑图片",className:"edit",evalScript:"top.Mobi.popupWindow({title:'编辑图片', frameSrcUrl:'mobiPhotoEdit.jsp?moduleId="+a.moduleId+"&id="+l+"&linkType="+a.linkType+"', width:580, height:420, closeFunc: closeMobiPhotoEdit, saveBeforePopup: true });"},{operationText:"删除图片",className:"close",evalScript:"Mobi.deleteMultiPhotoItem('"+l+"', "+a.moduleId+");"}];if(a.type===1){layer=Mobi.addEditLayer($(this),m,106)}else{layer=Mobi.addEditLayer($(this),m,6)}}).mouseleave(function(){if(a.type===1){Mobi.removeEditLayer($(this),null,106)}else{Mobi.removeEditLayer($(this))}})})};Mobi.initModuleMultiPhotoCarouselItemManage=function(a){if(!a||!a.moduleId){return}var c=$("#module"+a.moduleId);c.data("options",a);var b=a.content,d=b.picList;$.each(d,function(h,l){var m=l.id,j=l.desc,f=l.ide,e=l.openLink;var k=$("#module"+a.moduleId).find("img[id="+m+"]");k.each(function(n,o){$(o).mouseover(function(){var p=[{operationText:"编辑图片",className:"edit",evalScript:"top.Mobi.popupWindow({title:'编辑图片', frameSrcUrl:'mobiPhotoEdit.jsp?moduleId="+a.moduleId+"&id="+m+"&linkType="+a.linkType+"', width:580, height:420, closeFunc: closeMobiPhotoEdit, saveBeforePopup: true});"},{operationText:"删除图片",className:"close",evalScript:"Mobi.deleteMultiPhotoItem('"+m+"', "+a.moduleId+");"}];Mobi.addEditLayer($(o),p,1)}).mouseleave(function(){Mobi.removeEditLayer($(o),null,1)})})})};function closeMobiPhotoEdit(k){if(k!=null&&k!=undefined){var d=jm.parseJSON(k);var h=d.photoList,a=d.moduleId,f=$("#module"+a),j=f.data("options"),e=j.content;if(!!h){e.picList=h;var c=new Array();var b="ajax/mobimodule_h.jsp?cmd=setBack&id="+j.moduleId+"&colId="+Fai.top._colId+"&style="+j.style+"&extId="+Fai.top._extId;c.push("&content="+jm.encodeUrl(jm.toJSON(e)));Mobi.ing("正在保存...",false);jm.ajax({type:"post",url:b,data:c.join(""),error:function(){Mobi.ing("服务繁忙,请稍后重试。",true)},success:function(l){var m=jm.parseJSON(l);if(m.success){Mobi.ing("保存成功。",true);Mobi.jumpUrlMobi(Mobi.getPreviewDocument().location.href)}else{Mobi.ing(m.msg,false)}}})}else{Mobi.ing("图片信息错误。",true)}}}Mobi.deleteMultiPhotoItem=function(f,b){var a,d=$("#module"+b);options=d.data("options");content=options.content,picList=content.picList;$.each(picList,function(h,j){if(j.id==f){a=h}});if(confirm("确定删除图片?")){if(typeof a!="undefined"){picList.splice(a,1);var e=new Array();var c="ajax/mobimodule_h.jsp?cmd=setBack&id="+b+"&colId="+Fai.top._colId+"&style="+options.style+"&extId="+Fai.top._extId;e.push("&content="+jm.encodeUrl(jm.toJSON(content)));$.ajax({type:"post",url:c,data:e.join(""),error:function(){Mobi.ing("服务繁忙,请稍后重试。",true)},success:function(h){var j=jm.parseJSON(h);if(j.success){Mobi.ing("保存成功。",true);Mobi.jumpUrlMobi(Mobi.getPreviewDocument().location.href)}else{Mobi.ing(j.msg,false)}}})}}};Mobi.initPhotoDetailManage=function(c,a){var b=Mobi.getPreviewDocument().getElementById("photoGroupDetailPanel"+c);$(b).mousemove(function(){Mobi.addModuleLayer("photoGroupDetailPanel"+c,a)}).mouseleave(function(){Mobi.removeModuleLayer("photoGroupDetailPanel"+c)})};Mobi.photoGroupContentInit=function(c){var f=jm("#photoGroupDetailPanel"+c),b=f.find(".photoGroupDetail").width(),a=f.find(".photoGroupPic"),e=f.find(".icon-gClose");jm("#photoGroupPicList"+c).width(b*a.length+"px");a.width(b+"px");var d={triggerId:"newsDetailShare",pageBg:true,pageHtml:Mobi.sharePage(Fai.top._shareDataPhotoGroup),direction:"bottom",callback:function(){Mobi.initProductSwipe("shareListShowSwipe")},closeWebPage:".shareListPanelBg"};Mobi.initWebPage(d);jm(e).bind("click",function(){if(window.history.length<=1){window.location.href="index.jsp"}else{history.back();var h=setTimeout(function(){window.location.href="index.jsp";h=null},500)}return false});Mobi.scrollFadeIn("photoGroupDetailHeader"+c,"photoGroupPicPanel"+c,1)};Mobi.initPhotoGroupSwipe=function(b){var f=Mobi.getJQMobi();var c=Mobi.getPreviewObject(b),e=jm(c);if(!c){return}Mobi.initScaleImage(c);if(!c.querySelector(".bullets")){return}var a=c.querySelector(".bullets").getElementsByTagName("li"),j,e,h,d;h=parseInt(e.find(".J_maxNum").text());j=f("#"+b).swipehandle(c,{continuous:true,bulletsClick:true,callback:function(m){var l=a.length,k;while(l--){a[l].className=" "}if(!a[m]){a[m-a.length].className="on"}else{a[m].className="on"}k=(m+1)%h;if(k==0){k=h}e.find(".J_curPhotoNumber").text(k)}});if((/(iPhone|iPad|iPod|Android)/i.test(navigator.userAgent))){return}d=e.find(".J_btn");e.on("mouseover",function(){d.show()}).on("mouseleave",function(){d.hide()});e.find(".J_preBtn").on("click",function(){j.prev()});e.find(".J_nextBtn").on("click",function(){j.next()})};Mobi.getPhotoListInfo=function(c){var b=new Array();var d=$("#module"+c);var a={};if(d.data("options")){var e=d.data("options").content.picList;for(index in e){a={id:e[index].id,desc:e[index].desc,openLink:e[index].openLink,ide:e[index].ide};b.push(a)}}return b};Mobi.photoCardInit=function(t){var b=jm("#module"+t),a=b.find(".J_photoListCard"),c=a.find(".J_cardContainer"),j=a.find("li"),p=j.length,n=0,h=0,r,l,s,w,m,e,u,d,k,v;if(p>1&&p<=3){c.append(j.clone(true,true));j=a.find("li");p=j.length;for(var q=p/2;qy){var A=E/D;F.width=x/A;F.height=D}}return F}};(function(e,j,f){e.photoGroup=j.extend({},e.photoGroup,{bindInteractive:c,unBindInteractive:h});j(q);function q(){j(".formStyle34").each(function(r,s){var t=j(s);c(t)})}function h(s){var r,t;if(s.length===0){return}t=s.find(".J_photoGroupAll");if(t.hasClass("J_photoGroupAll4")){r=4}if(t.hasClass("J_photoGroupAll5")){r=5}d(r).destory(s);l(s)}function c(s){var r,t;if(s.length===0){return}t=s.find(".J_photoGroupAll");if(t.hasClass("J_photoGroupAll4")){r=4}if(t.hasClass("J_photoGroupAll5")){r=5}d(r).create(s);m(s,r)}function m(r){o(r)}function l(r){o(r,false)}function o(s,r){n(s,r);k(s,r);b(s,r);p(s,r)}function n(t,s){if(!Fai.top._manageMode){return}var r=t.find(".J_photoGroupAll");r.off("mousedown.photoGroup").off("mouseup.photoGroup");if(s===false){return}r.on("mousedown.photoGroup",function(){$("#webModuleContainer").sortable("disable")}).on("mouseup.photoGroup",function(u){$("#webModuleContainer").sortable("enable")})}function k(w,t){var s=w.find(".J_photoGroupAll"),r,x;if(!s.hasClass("J_photoGroupAll4")&&!s.hasClass("J_photoGroupAll5")){return}r=s.find(".J_photoGroup-img-mask");r.off("mousedown.photoGroupScan mouseup.photoGroupScan");r.remove();if(t===false){return}if(!Mobi.isPC()){return}x={startX:0,startY:0,endX:0,endY:0,time:0};s.find(".f-photoGroup-a").each(function(A,z){var C=j(z),B=C.find(".f-photoGroup-img"),y=(B.height()/window._htmlFontSize+"rem"),D;if(C.find(".J_photoGroup-img-mask").length===0){D=j("
    ");D.height(y);C.append(D)}});s.find(".J_photoGroup-img-mask").off("mousedown.photoGroupScan mouseup.photoGroupScan").on("mousedown.photoGroupScan",u).on("mouseup.photoGroupScan",v);function u(y){x.time=new Date();x.startX=y.pageX;x.startY=y.pageY}function v(y){var A=j(y.target),z=new Date()-x.time;x.endX=y.pageX;x.endY=y.pageY;if(z>200){return}if(x.startX!==x.endX||x.startY!==x.endY){return}A.parent().find(".f-photoGroup-img").click()}}function b(t,s){var w=a(),v;t.off(w.downLink).off(w.clickLink);if(s===false){return}v={startX:0,startY:0,endX:0,endY:0,time:null};t.on(w.downLink,".J_photoGroup-a",u).on(w.clickLink,".J_photoGroup-a",r);function u(x){var y=e.photoGroup.utils.getPosByEvent(x);v.startX=parseInt(y.pageX);v.startY=parseInt(y.pageY);v.time=new Date()}function r(x){var A=e.photoGroup.utils.getPosByEvent(x),y=new Date(),z=false;v.endX=parseInt(A.pageX);v.endY=parseInt(A.pageY);if(Math.abs(v.endX-v.startX)>1){z=true}if(Math.abs(v.endY-v.startY)>1){z=true}if(y-v.time>200||z){x.preventDefault()}}}function p(t,r){var s=e.photoGroup;if(!Fai.top._manageMode){return}if(j.isFunction(s.bindWithEditLayer)){s.bindWithEditLayer(t,r)}}function d(r){var t={4:e.photoGroup.zoomSlider,5:e.photoGroup.pokerSlider},s=function(){};if(!r){return{create:s,destory:s}}return t[r]}function a(){var r,s;r={downLink:"touchstart.ctrlLink",clickLink:"click.ctrlLink"};s={downLink:"mousedown.ctrlLink",clickLink:"click.ctrlLink"};return(Mobi.isPC()?s:r)}}(Mobi,jm));(function(a,d,b){var l={getImgByCard:j,getSliderDir:c,getPosByEvent:k,getStyleType:f,isInDom:h};a.photoGroup=d.extend({},a.photoGroup,{utils:l});function c(p,r,n,q){var o=Math.abs(p-n);var m=Math.abs(r-q);if(m===0&&m===0){return void 0}if(o>0&&m===0){return true}if(o===0&&m>0){return false}return o/m>1}function e(m){if(!m.touches&&!m.changedTouches){return{}}return(m.touches[0]||m.changedTouches[0])}function k(o){var n=o.pageX||e(o).pageX,m=o.pageY||e(o).pageY;return{pageX:n,pageY:m}}function j(m){var o=d(m),n=d(m).find(".J_photoGroup-img-mask");if(n.length>0){return n}return o.find(".J_photoGroup-img")}function f(o){var n=o.find(".J_photoGroupAll"),m;if(n.hasClass("J_photoGroupAll1")){m=1}else{if(n.hasClass("J_photoGroupAll2")){m=2}else{if(n.hasClass("J_photoGroupAll3")){m=3}else{if(n.hasClass("J_photoGroupAll4")){m=4}else{if(n.hasClass("J_photoGroupAll5")){m=5}}}}}return m}function h(q,m,r){var p=d(q)[0].getBoundingClientRect(),o=false,n=false;if(m>=p.left&&m<=p.right){o=true}if(r>=p.top&&r<=p.bottom){n=true}return o&&n}}(Mobi,jm));(function(d,j,m,h){var p=m(j),e={moveX:0,moveY:0,};j(window).load(q);d.photoGroup=j.extend({},d.photoGroup,{bindWithEditLayer:b});function q(s){if(!Fai.top._manageMode){return}j(".formStyle34").forEach(function(u,t){b(j(u))})}function b(w,t){var x=n(),v=w.find(".J_photoGroupAll5"),s=d.photoGroup.utils,u=s.getStyleType(w);w.off(x.moduleMouseLeave).off(x.moduleMouseEnter);if(t===false){return}w.on(x.moduleMouseEnter,function(y){c(w)}).on(x.moduleMouseLeave,function(y){c(w,false)});if([4,5].indexOf(u)>-1){r(w,t)}}function c(w,s){var v=w.find(".J_photoGroupAll-wrap"),u=w.find(".J_photoGroupStyle"),x=n(),t=d.photoGroup.utils;u.off(x.imgMouseLeave).off(x.imgMouseEnter);if(s===false){return}u.on(x.imgMouseEnter,function(D){var A=j(this),z=d.photoGroup.utils,B=z.getImgByCard(A),C=z.getStyleType(w),y=A.data("fk-is-enter");if(C===4&&!A.hasClass("f-active")){return}if(C===5&&A.index()!==0){return}if(y==="true"){return}p.add(B,w);A.data("fk-is-enter","true")}).on(x.imgMouseLeave,function(z){var y=j(this);$img=d.photoGroup.utils.getImgByCard(y),flag=y.data("fk-is-enter");if(flag!=="true"){return}p.remove($img,w);y.data("fk-is-enter","false")})}function r(u,s){var t=u.find(".J_photoGroupAll-wrap"),v=n();u.off(v.transBefore).off(v.transAfter);if(s===false){return}u.on(v.transBefore,function(w){k(u)}).on(v.transAfter,function(w){f(u)})}function k(v){var s=a(v),u=s.active,t=s.all;o(v,e);t.each(function(x,w){var y=d.photoGroup.utils.getImgByCard(w);p.remove(y,v)});p.ctrl(v,false)}function f(v){var s=d.photoGroup.utils,u=a(v).active,t=s.getImgByCard(u);o(v,e,false);if(!s.isInDom(u,e.moveX,e.moveY)){return}p.ctrl(v);p.add(t,v)}function a(w){var t=d.photoGroup.utils,u=t.getStyleType(w),v=w.find(".J_photoGroupStyle"),s;if(u===4){s=w.find(".f-active")}if(u===5){s=v.eq(0)}return{all:v,active:s}}function o(u,v,s){var t=u.find(".J_photoGroupAll-wrap"),w=n();t.off(w.wrapMousemove);if(s===false){return}t.on(w.wrapMousemove,function(x){v.moveX=x.clientX;v.moveY=x.clientY})}function l(t){var s=t.find(".J_photoGroup-img-mask");if(s.length>0){return s}return t.find(".J_photoGroup-img")}function n(){return{moduleMouseEnter:"mouseenter.bindEidtLayer",moduleMouseLeave:"mouseleave.bindEditLayer",imgMouseEnter:"mouseenter.eidtLayer",imgMouseLeave:"mouseleave.eidtLayer",imgDwon:"mousedown.editLayer",imgUp:"mouseup.editLayer",wrapMousemove:"mousemove.editLayer",transBefore:"transitionBefore",transAfter:"transitionAfter"}}})(Mobi,jm,function(c){var j={},h={add:l,remove:d,ctrl:a};return h;function l(n,s){var p=b(n),o=p.attr("id"),q,r;if(!Fai.top._manageMode){return}if(!c.isFunction(Mobi.addEditLayer)){return}if(e(s)===false){return}r=k(p);q=Mobi.addEditLayer(o,r,6,{extCls:"editLayer_2"});f(q,p)}function d(n,q){if(!Fai.top._manageMode){return}if(e(q)===false){return}if(!c.isFunction(Mobi.removeEditLayer)){return}var p=b(n),o=p.attr("id");if(o){Mobi.removeEditLayer(o)}}function a(p,o){var q=p.attr("id"),n=j[q];if(o===false){j[q]=false;return}if(n!==void 0){j[q]=void 0;delete j[q]}}function f(o,n){var p=n.offset(),q=o[0].getBoundingClientRect();o.css({left:p.right-q.width,top:p.bottom-q.height})}function e(n){var o=n.attr("id");return j[o]}function k(r){var n=c(r).parent().find(".J_photoGroup-img"),q=n.attr("_groupid"),w=$("#photoGroup"+q),v=w.find(".J_photoGroup-title"),x=v.text(),p="",u,s,t,o;u="Fai.top.Mobi.popupWindow({title:'编辑图册', frameSrcUrl:'"+m(q)+"', width:860, height:682, version:2});";s={operationText:"编辑图册",className:"edit_2",evalScript:u};t="Mobi.deletePhotoGroupManage('"+q+"', '"+Fai.top.Fai.encodeHtmlJs(x)+"', '', 0)";o={operationText:"删除图册",className:"close_2",evalScript:t};return[s,o]}function m(p){var n=Fai.top.location,o=n.origin,s=n.pathname,r=s.split("/"),q;r.pop();r.pop();r.push("manage_v2");r.push("photoGroupEdit.jsp");q=Fai.top._siteDomain+r.join("/")+"?fromManage=true&mobiSettingState=3&id="+p;return q}function b(n){var o=c(n);if(!o.hasClass("J_photoGroup-img")){o=o.parent().find(".J_photoGroup-img")}return o}});(function(b,e,c){var h={create:f,destory:a},l={small:"f-small",active:"f-active"},o=b.photoGroup.utils;b.photoGroup=e.extend({},b.photoGroup,{zoomSlider:h});function f(q){p(q);m(q)}function a(r){var q=r.find(".J_photoGroupAll-wrap"),s=j();q.off(s.dragStart).off(s.selectStart).off(s.dragOriginStart)}function p(u){var t=u.find(".J_photoGroupAll-wrap"),q=u.find(".J_photoGroupStyle"),r=0,s=q.eq(0);q.addClass(l.small);if(s.length>0){s.addClass(l.active)}q.each(function(x,w){var v=e(w);r+=parseFloat(v.width());r+=parseFloat(v.css("margin-left"));r+=parseFloat(v.css("margin-right"))});t.width(r+"px")}function n(s){var r=e("#g_web"),q=r.offset(),v=s.offset(),u=q.left+q.width/2,t=v.left+v.width/2,w=t-u;return w}function m(v){var t=v.find(".J_photoGroupAll-wrap"),x=j(),w=k();t.off(x.dragStart).off(x.selectStart).off(x.dragOriginStart).on(x.dragStart,r).on(x.selectStart,u).on(x.dragOriginStart,u);function u(y){y.preventDefault()}function r(y){var A=o.getPosByEvent(y),z=j();w.isStart=true;w.startX=A.pageX;w.startY=A.pageY;t.off(z.dragMove).on(z.dragMove,s).off(z.dragEnd).on(z.dragEnd,q)}function s(z){var y=o.getSliderDir(w.startX,w.startY,w.moveX,w.moveY),A;if(!w.isStart){return}A=o.getPosByEvent(z);w.moveX=A.pageX;w.moveY=A.pageY;if(!w.isMove){w.isMove=true;if(y===void 0){return}if(y===true){w.isXMove=true;Mobi.lockDocScroll()}else{Mobi.openDocScroll()}}}function q(A){var C=o.getPosByEvent(A),z=C.pageX-w.startX,B=j(),y=(w.isStart&&w.isMove&&!w.isTrans);Mobi.openDocScroll();t.off(B.dragMove).off(B.dragEnd);if(y&&w.isXMove){if(z<0){w.currIndex++}else{if(z>0){w.currIndex--}}d(t,w,v,A)}w.isXMove=w.isStart=w.isMove=void 0}}function d(q,u,A,r){var x=q.find(".J_photoGroupStyle"),z,t=j(),w=true,s=["-ms-","","moz","-webkit-"],y,v;if(u.currIndex<0){u.currIndex=0;w=false}else{if(u.currIndex>=x.length){u.currIndex=x.length-1;w=false}}y=x.eq(u.oldIndex).find(".J_photoGroup-img");if(u.oldIndex===u.currIndex){return}v=x.eq(u.currIndex);z=x.eq(u.oldIndex);z.removeClass(l.active);v.addClass(l.active);u.isTrans=true;v.off(t.transEnd).on(t.transEnd,function(C){var B=e(C.target).find(".J_photoGroup-img-mask");u.isTrans=false;v.off(t.transEnd);u.oldIndex=u.currIndex;A.trigger("transitionAfter",[C])});u.disLeft-=n(v);A.trigger("transitionBefore",[r]);e(s).each(function(C,E){var B=E+"transform",D="translate("+(u.disLeft)+"px,0)";q.css(B,D)})}function j(){var q,r;r={dragStart:"mousedown.photoStyle4",dragMove:"mousemove.photoStyle4",dragEnd:"mouseup.photoStyle4",transEnd:"transitionend.photoStyle4",selectStart:"selectstart.photoStyle4",dragOriginStart:"dragstart.photoStyle4"};q={dragStart:"touchstart.photoStyle4",dragMove:"touchmove.photoStyle4",dragEnd:"touchend.photoStyle4",transEnd:"transitionend.photoStyle4",selectStart:"selectstart.photoStyle4",dragOriginStart:"dragstart.photoStyle4"};if(Fai.top._manageMode){return r}else{if(Mobi.isPC()){return r}else{return q}}}function k(){return{currIndex:0,oldIndex:0,isStart:false,isXMove:false,isMove:false,isTrans:false,startX:0,startY:0,moveX:0,moveY:0,endX:0,endY:0,time:0,disLeft:0}}}(Mobi,jm));(function(b,e,d){var h={create:f,destory:a},m=b.photoGroup.utils;b.photoGroup=e.extend({},b.photoGroup,{pokerSlider:h});function f(o){n(o);l(o)}function a(p){var o=p.find(".J_photoGroupAll"),q=j();o.off(q.dragStart).off(q.selectStart).off(q.dragOrginStart)}function n(r){var q=r.find(".J_photoGroupAll-wrap"),p=q.find(".J_photoGroupStyle").find(".J_photoGroup-a"),o=p.height()+"px";if(p.find(".J_photoGroup-detail").length===0){q.css({height:o,transform:"translateY(0.725rem)"})}}function l(t){var q=t.find(".J_photoGroupAll"),v=j(),u=c();if(q.find(".J_photoGroupStyle").length<=1){return}q.off(v.dragStart).off(v.selectStart).off(v.dragOrginStart).on(v.dragStart,p).on(v.dragOrginStart,".J_photoGroup-a",s).on(v.selectStart,s);function s(w){w.preventDefault()}function p(w){var x=m.getPosByEvent(w);u.startX=x.pageX;u.startY=x.pageY;u.isStart=true;q.off(v.dragMove).off(v.dragEnd).on(v.dragMove,".J_photoGroupStyle",r).on(v.dragEnd,".J_photoGroupStyle",o)}function r(x){var y=m.getPosByEvent(x),w;if(!u.isStart){return}if(!u.isMove){u.isMove=true;w=m.getSliderDir(u.startX,u.startY,u.endX,u.endY);if(w===void 0){return}if(w===true){u.isXMove=true;Mobi.lockDocScroll()}else{Mobi.openDocScroll()}}}function o(z){var A=m.getPosByEvent(z),w=u.isStart,x=u.isMove,y=u.isXMove;Mobi.openDocScroll();u.endX=A.pageX;u.endY=A.pageY;q.off(v.dragMove).off(v.dragEnd);if(w&&x&&u.isXMove){k(q,t,u)}u.isStart=u.isMove=u.isXMove=void 0}}function k(t,x,q){var z=t.find(".J_photoGroupStyle"),u=z.eq(0),y=z.eq(1),v=z.eq(2),w=z.eq(3),s=j(),A=(q.endX-q.startX),o=false,p;if(q.isAnimate){return}if(A===0){return}if(A<0){o=true}p={dir:(o?"f-toLeft":"f-toRight"),toOne:"f-toOne",toTwo:"f-toTwo",toThree:"f-toThree"};if(u.length>0){q.isAnimate=true;u.on(s.transEnd,r);x.trigger("transitionBefore");u.addClass(p.dir)}if(y.length>0){y.addClass(p.toOne)}if(v.length>0){v.addClass(p.toTwo)}if(w.length>0){w.addClass(p.toThree)}function r(C){var D=j(),E=u.parent(),B=u.siblings();u.off(D.transEnd);u.parent()[0].removeChild(u[0]);B.removeClass(p.toOne).removeClass(p.toTwo).removeClass(p.toThree);u.removeClass(p.dir);E.append(u);q.isAnimate=false;x.trigger("transitionAfter")}}function j(){var p,o;p={dragStart:"mousedown.photoGroup5",dragMove:"mousemove.photoGroup5",dragEnd:"mouseup.photoGroup5",selectStart:"selectstart.photoGroup5",transEnd:"transitionend.photoGroup5",dragOrginStart:"dragstart.photoGroup5"};o={dragStart:"touchstart.photoGroup",dragMove:"touchmove.photoGroup",dragEnd:"touchend.photoGroup",selectStart:"selectstart.photoGroup5",transEnd:"transitionend.photoGroup5",dragOrginStart:"dragstart.photoGroup5"};if(Fai.top._manageMode){return p}else{if(Mobi.isPC()){return p}else{return o}}}function c(){return{startX:0,startY:0,endX:0,endY:0,isStart:false,isMove:false,isXMove:false,isAnimate:false}}}(Mobi,jm));(function(a,b,f){b(e);function e(){if(!Fai.top._manageMode){return}b(".formStyle48").each(function(h,j){b(j).on("mouseenter.bindEditLayer",function(){d(b(this))}).on("mouseleave.bindEditLayer",function(){d(b(this),false)})})}function d(j,h){var k=j.find(".f-photoGroupItem");k.off("mouseenter.editLayer mouseleave.editLayer");if(h===false){return}k.on("mouseenter.editLayer",function(){var s=b(this),u=s.find(".f-photoGroupR-title").text().trim(),m=s.attr("id"),o=m.replace("photoGroupR",""),r="Fai.top.Mobi.popupWindow({title:'编辑图册', frameSrcUrl:'"+c(o)+"', width:860, height:682, version:2});",p={operationText:"编辑图册",className:"edit_2",evalScript:r},q="Mobi.deletePhotoGroupManage('"+o+"', '"+Fai.top.Fai.encodeHtmlJs(u)+"', '', 0)",l={operationText:"删除图册",className:"close_2",evalScript:q},t=[p,l],n;n=a.addEditLayer(s,t,6);n.css({left:s.offset().right-n.width()-2,top:s.offset().bottom-n.height()-2})}).on("mouseleave.editLayer",function(){var l=b(this);a.removeEditLayer(l)})}function c(k){var h=Fai.top.location,j=h.origin,n=h.pathname,m=n.split("/"),l;m.pop();m.pop();m.push("manage_v2");m.push("photoGroupEdit.jsp");l=Fai.top._siteDomain+m.join("/")+"?fromManage=true&mobiSettingState=3&id="+k;return l}}(Mobi,jm));Mobi.initMbPdCollection=function(d,c,b,a){this.sessionMid=d;this.collectionList=c;this.pid=b;this._manageMode=a};(function(e,a,b){var f=a.prototype,c,l,h,d;f.init=function(){c=this.sessionMid,l=this.collectionList,h=this.pid,d=this._manageMode;m();j();if(e("#_TOKEN").length!=0&&!d&&e.getCookie("m_collectID")==h+""&&!e(".shareBlock .icon-collection ").hasClass("icon-collectSelect")){if(l.indexOf(h)==-1){l.push(h);e(".shareBlock .icon-collection").addClass("icon-collectSelect");k("suc")}}e.setCookie("m_collectID","",-1)};function m(){Mobi.bindTouchAndClickEvent(e(".shareBlock"),function(n){if(c==0){if(d){Mobi.ing(LS.isManageFailCollection)}else{window.location.href="login.jsp?returnUrl="+e.encodeUrl(window.location.href);e.setCookie("m_collectID",h)}}else{if(l.indexOf(h)==-1){l.push(h);e(".shareBlock .icon-collection").addClass("icon-collectSelect");k("suc")}else{if(l.indexOf(h)!=-1){l.splice(l.indexOf(h),1);e(".shareBlock .icon-collection").removeClass("icon-collectSelect");k("warn")}}}})}function j(){if(c!=0&&l.indexOf(h)!=-1){e(".shareBlock .icon-collection").addClass("icon-collectSelect")}}function k(n){var o={};o.productCollections=l+"";e.post("ajax/member_h.jsp",{cmd:"set",id:c,info:e.toJSON(o)},function(p){if(p.success){if(n=="suc"){Mobi.ing(LS.sucCollection,1)}else{Mobi.ing(LS.cancelledCollection)}}},"json")}})(jm,Mobi.initMbPdCollection);Mobi.initProductEvent=function(a){Mobi.initProductSwipe(a)};Mobi.initRepPropValueOfURL=function(){var a=new RegExp("https?|ftp|file://");jm(".paramCollection .propVal").each(function(b,d){var c=jm(this).text();if(a.test(c)){jm(this).html(c.replace(/((https?|ftp|file):\/\/[-a-zA-Z0-9+&@#\/%?=~_|!:,.;]*)/g,'$1'))}})};Mobi.initProductRestrict=function(m,j,h,e,k,c){if(!m){return}var b=k?"#productMallOptionPanel"+c:"",l=0;if(e.count!=null){l=e.count}var n=h-l;if(jm.fkEval(n)<0){n=-1}var d=1,f=-1;if(j>1&&h!=0){jm(b+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(b+" #limitAmountDiv").text("( "+LS.minAmount+" : "+j+" ; "+LS.maxAmount+" : "+n+" )");d=j;f=n}else{if(j==1&&h!=0){jm(b+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(b+" #limitAmountDiv").text("( "+LS.maxAmount+" : "+n+" )");f=n}else{if(j>1&&h==0){jm(b+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(b+" #limitAmountDiv").text("( "+LS.minAmount+" : "+j+" )");d=j}}}jm(b+" #productNum").val(d).unbind("change").change(function(){var o=a();if(of||o==f)){o=f;jm("#g_decrease").removeClass("g_opacity50");jm("#g_increase").addClass("g_opacity50")}else{if(o>9999998){o=9999999;jm("#g_decrease").removeClass("g_opacity50");jm("#g_increase").addClass("g_opacity50")}else{jm("#g_decrease, #g_increase").removeClass("g_opacity50")}}}jm(this).val(o)}).change();jm(b+" #g_decrease").click(function(){var o=a();if(of-1&&f!=-1){jm(b+" #productNum").val(f>d?f:d)}jm(b+" #productNum").change()});function a(){var o=jm(b+" #productNum").val(),p=1;if(jm.isInteger(o)){p=parseInt(o)}return p}};Mobi.initProductOptions=function(b){b=b||{};var j=b.optionsAmountList;var y=b.isRelateAmount;var d=b.realMallPrice;var v=b.limitAmount_options;var n=b.productRestrictInfo;var u=b.choiceCurrencyVal;var a=b.entry;var w=b.productId;var A=b.moduleId;var h=b.weightTypeStr;var t=b.isGroupBuy;var p=b.groupPrice;var l=b.isCutPrice;var o=b.cpMinPrice;var B=false;jm.each(j,function(E,F){if(F.t==null){B=true;return false}});if(h==null){h="kg"}var e=jm(".J-op-box"),z=jm(".mallOptionImg"),x=e.find(".J-op"),m="";if(a==1){e=jm("#productMallOptionPanel"+w+" .J-op-box");z=jm("#productMallOptionPanel"+w+" .mallOptionImg"),x=e.find(".J-op");m="#productMallOptionPanel"+w}var s=[];var k=jm("#mallPrice").html();var q=jm("#mallAmount").html();var c=jm("#mallWeight").html();if(q<=0){C(x.find("label"));x.find("label").attr("isEmptyAmount","1")}else{jm.each(j,function(E,G){if(G.oAmount<=0&&x.length<=1){var F=x.find("label[data='"+G.t2+"']");C(F);jm(F).attr("isEmptyAmount","1")}else{if(G.oAmount<=0){s.push(G.t2)}}})}jm(x).each(function(E){var F=jm(this);F.find("label").click(function(){if(jm(this).attr("isEmptyAmount")=="1"){return}var O=jm(this);if(!O.hasClass("isSelected")){if(O.parent().find(".optionSelected").length>0){O.parent().find(".optionSelected").removeClass("optionSelected isSelected")}O.addClass("optionSelected isSelected");var M=O.attr("data");F.attr("option_data",M)}else{O.parent().find(".optionSelected").removeClass("optionSelected isSelected");jm("#"+O.attr("for")).prop("checked",false);O.parents(".J-op").removeAttr("option_data");jm("#mallPrice").html(k);jm("#mallAmount").html(q);jm("#mallWeight").html(c);if(v){jm("#g_increase").removeClass("g_opacity50");jm("#limitAmountDiv").text("");jm("#limitAmountDiv").parent().css("line-height","");jm("#g_increase").unbind("click.ic2");jm("#g_decrease").unbind("click.dc2")}}if(x.length>1&&y){var ag="";var aj=0;x.each(function(al,am){if(jm(x[al]).find(".optionSelected").length<=0){ag+="x_"}else{ag+=jm(x[al]).find(".optionSelected").attr("data")+"_"}});ag=ag.substring(0,ag.length-1);jm.each(j,function(al,am){if(D(ag,am.t2)){if(am.flag!=0&&!isNaN(am.oAmount)){aj+=am.oAmount}}});jm(m+" #mallAmount").text(aj)}var T=e.find(".optionSelected");if(z.length>0){var af=O.attr("_indeptPic");if(af!=null){z.attr("src",af)}}if(x.length==T.length){var K="",Z,L,G,P,R;jm(T).each(function(al){if(B){K+=jm(this).attr("data")+"_"}else{K+=jm(this).attr("data")}});jm.each(j,function(al,an){var am=an.t2;if(an.t==K){Z=an.oPrice;L=an.oAmount;G=an.minAmount;P=an.maxAmount;R=an.w}else{if((am+"_")==K){Z=an.oPrice;L=an.oAmount;G=an.minAmount;P=an.maxAmount;R=an.w}}});if(v){jm(m+" #limitAmountDiv").text("");var H=0;var ak=n.optionsCount;if(ak!=null&&ak.d!=null){for(var ad=0;ad1&&P!=0){jm(m+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(m+" #limitAmountDiv").text("( "+LS.minAmount+" : "+G+" ; "+LS.maxAmount+" : "+N+" )");Y=G;ac=N}else{if(G==1&&P!=0){jm(m+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(m+" #limitAmountDiv").text("( "+LS.maxAmount+" : "+N+" )");ac=N}else{if(G>1&&P==0){jm(m+" #limitAmountDiv").parent().attr("style","line-height:1.5rem;");jm(m+" #limitAmountDiv").text("( "+LS.minAmount+" : "+G+" )");Y=G}}}jm(m+" #productNum").val(Y);jm(m+" #productNum").unbind("change");jm(m+" #productNum").bind("change",function(){var al=jm(m+" #productNum").val();var am=1;if(jm.isInteger(al)){am=parseInt(al)}if(amac||am==ac)){am=ac;jm(m+" #g_decrease , .g_decrease").removeClass("g_opacity50");jm(m+" #g_increase , .g_increase").addClass("g_opacity50")}else{if(am>9999998){am=9999999;jm(m+" #g_decrease , .g_decrease").removeClass("g_opacity50");jm(m+" #g_increase , .g_increase").addClass("g_opacity50")}else{jm(m+" #g_decrease , .g_decrease").removeClass("g_opacity50");jm(m+" #g_increase , .g_increase").removeClass("g_opacity50")}}}jm(m+" #productNum").val(am)});jm(m+" #productNum").change();jm(m+" #g_decrease , .g_decrease").unbind("click.dc2");jm(m+" #g_increase , .g_increase").unbind("click.ic2");jm(m+" #g_decrease , .g_decrease").bind("click.dc2",function(){var al=jm(m+" #productNum").val();var am=1;if(jm.isInteger(al)){am=parseInt(al)}if(amac-1&&ac!=-1){if(ac>Y){jm(m+" #productNum").val(ac)}else{jm(m+" #productNum").val(Y)}}jm(m+" #productNum").change()})}if(y){jm(m+" #mallAmount").text(L)}if(Z==null){Mobi.onlyChangeSalePrice(d,u,a,w)}else{Mobi.onlyChangeSalePrice(Z,u,a,w)}if(R!=null){jm(m+" #mallWeight").text(R+h)}}if(x.length!=T.length&&x.length!=1){r()}if((x.length-1)<=T.length&&x.length!=1){var X="";x.each(function(al,am){if(jm(x[al]).find(".isSelected").length<=0){X+="x_"}else{X+=jm(x[al]).find(".isSelected").attr("data")+"_"}});if(X!=""){X=X.substring(0,X.length-1)}var Q="";x.each(function(al,an){var am=jm(x[al]).find(".isSelected");if(am.length<=0){Q=jm(x[al])}});if(Q!=""){var ah=Q.find("label");ah.each(function(al,an){var am=X.replace("x",jm(ah[al]).attr("data"));if(jm.inArray(am,s)>=0){C(ah[al]);jm(ah[al]).attr("isEmptyAmount","1")}else{f(ah[al])}})}else{x.each(function(al,an){var am=jm(x[al]).find("label");am.each(function(aq,ap){if(jm(am[aq]).hasClass("isSelected")){return}var ao=X.split("_");ao[al]=jm(am[aq]).attr("data");var ar=ao.join("_");if(jm.inArray(ar,s)>=0){C(am[aq]);jm(am[aq]).attr("isEmptyAmount","1")}else{f(am[aq])}})})}}var ae=[];for(var ad=0;ad0){ae.push(S.find(".optionSelected").attr("data"))}else{break}}var ab=false;if(ae.length<=x.length&&ae.length>1){var V=ae.length;for(var ad=0;ad0){for(var q=0;q");if(f&&!F){y.find(".J_productListImgWrap").append("
    置顶
    ")}})}var q=jm("#"+C+" .productWaterFall");q.each(function(P,k){var J=jm(k);var L=J.attr("productId");var N=E[L];if(N.salePromotionOpen){var K=N.saleType;var S=N.other.ruleData.d[0].m;var O=N.other.ruleData.d;if(K==1){var Q=N.other.ruleData.s;if(Q==1){J.find(".waterFallImg").append("
    享"+S+"折
    \n")}else{J.find(".waterFallImg").append("
    直降"+S+"
    \n")}}else{if(K==2){var R=0;if(O.length>0){R=O[0].n}for(var M=0;M=I){S=O[M].m;R=O[M].n}}J.find(".waterFallImg").append("
    满"+S+"减"+R+"
    \n")}}}})};Mobi.initProductSwipe1=function(d){var c=Mobi.getJQMobi();var b=Mobi.getPreviewObject(d);var e=c("#"+d).find(".productSwipeItem");if(!b){return}c("#"+d).swipehandle(b,{auto:false,continuous:false,bulletsClick:true,callback:function(h){var f=a.length;while(f--){a[f].className=" "}if(!a[h]){a[h-a.length].className="on"}else{a[h].className="on"}setTimeout(function(){e.eq(h).find("div.style7Img").trigger("slidePic")},300)}});if(!b.querySelector(".bullets")){return}var a=b.querySelector(".bullets").getElementsByTagName("li")};Mobi.productCrossedSlide=function(a,d,f,b){var c=jm("#"+a+" .productCrossedSlide .style7Img").width();var h=_htmlFontSize;var k=(c*f)/(d*h);k=parseFloat(k.toFixed(4));var j=jm("#"+a+" .paramPadding .paramName").css("font-size");if(typeof j!="object"){var l=j.substring(0,j.indexOf("p"))/h+0.2;jm("#"+a+" .productCrossedSlide .paramPadding .paramName").css("line-height",l+"rem");l=parseFloat(l.toFixed(4))*2}else{l=0}var e="paramWrap";if(b==e){if(Mobi.getBrowserType()==Mobi.BrowserType.FIREFOX){jm("#"+a+" .productCrossedSlide .paramPadding .paramName").height(l+"rem")}else{jm("#"+a+" .productCrossedSlide .paramPadding .paramName").height(l-0.08+"rem")}}else{jm("#"+a+" .productWaterFall .paramPadding .paramName").height(l/2-0.1+"rem")}jm("#"+a+" .productCrossedSlide .style7Img").height(k+"rem")};Mobi.productCrossedSlideSec=function(a,d,f,b){var c=jm("#"+a+" .productCrossedSlideSec .style9Img").width();var h=_htmlFontSize;var k=(c*f)/(d*h);k=parseFloat(k.toFixed(4));var j=jm("#"+a+" .paramPadding .paramName").css("font-size");if(typeof j!="object"){var l=j.substring(0,j.indexOf("p"))/h+0.2;jm("#"+a+" .productCrossedSlideSec .paramPadding .paramName").css("line-height",l+"rem");l=parseFloat(l.toFixed(4))*2}else{l=0}var e="paramWrap";if(b==e){if(Mobi.getBrowserType()==Mobi.BrowserType.FIREFOX){jm("#"+a+" .productCrossedSlideSec .paramPadding .paramName").height(l+"rem")}else{jm("#"+a+" .productCrossedSlideSec .paramPadding .paramName").height(l-0.08+"rem")}}else{jm("#"+a+" .productWaterFall .paramPadding .paramName").height(l/2-0.1+"rem")}jm("#"+a+" .productCrossedSlideSec .style9Img").height(k+"rem")};Mobi.productCrossedSlideSecSwipe=function(b,I){var l=Mobi.getPreviewObject(b),p=Mobi.getPreviewObject(I),K=l,N=parseInt(jm(p).width()),k=0,D=p.querySelectorAll(".productCrossedSlideSec"),j=_htmlFontSize,y=D.length*0.5*j,G=jm(p),E=jm("#"+b),M=false,d=true,H=null,a=jm("#webModuleContainer"),f=null,o=undefined,e=0,c=0,m=null,n,w=0,F=jm("
    "),s,r,v,u;G.css("margin-top","30px");function L(O){G.off("mouseup.prod");G.off("mousemove.prod");G.off("mouseout.prod")}function A(O){E.find("div.style9Img").trigger("horizonScroll");E.append(F);s=v=O.pageX;r=u=O.pageY;G.off("mousemove.prod").on("mousemove.prod",J);G.off("mouseup.prod").on("mouseup.prod",C);G.off("mouseout.prod").on("mouseout.prod",L);O.preventDefault();O.stopPropagation()}function J(P){var O=0,R=G.width()-E.width(),Q=parseInt(E.css("left"));M=true;v=P.pageX;u=P.pageY;Q+=(v-s);if(Q>O){Q=O}if(Q0){return true}if(O===0&&P>0){return false}return O/P>1?true:false}function t(O){var P=O.touches.length>0?O.touches[0]:O.chengedTouches[0];return{pageX:P.pageX,pageY:P.pageY}}function h(O){E.find("div.style9Img").trigger("horizonScroll");var P=t(O);s=v=P.pageX;r=u=P.pageY;G.off("touchmove.prod").on("touchmove.prod",B);G.off("touchend.prod").on("touchend.prod",x);E.append(F)}function B(O){var P=t(O);v=P.pageX;u=P.pageY;if(o===undefined){if(s!==undefined&&r!==undefined){o=z(s,r,v,u);E.off("touchmove.prod")}}s=v;r=u}function x(O){F.remove();o=s=r=v=u=undefined;G.off("touchmove.prod",B);G.off("touchend.prod",x)}if(D.length>0){k=D[0].offsetWidth*D.length}k+=y;if(k>N){if(navigator.appVersion.match(/MSIE [\d.]+/)){if(parseInt(navigator.appVersion.match(/MSIE ([\d.]+)/)[1])===10){k=k+D.length*2}}k=k+10;jm(K).css("width",k+"px");var q=jm.getCookie("startX")?parseInt(jm.getCookie("startX")):0;if(Mobi.isPC()){G.css({position:"relative",height:parseInt(E.height())+"px"});E.css({position:"absolute",left:0,top:0});G.off("mousedown.prod").on("mousedown.prod",A);G.off("mousedown.prodItem").on("mousedown.prodItem",".J_prodItem",function(){m=jm(".editLayer");n=E.offset().left});G.off("click.checkMove").on("click.checkMove",function(){if(M){d=false}else{d=true}M=false});G.off("click.prodLink").on("click.prodLink",".J_prodItem-a",function(O){return d})}else{f=new iScroll(p,{x:q,scrollX:true,scrollY:false,mouseWheel:true,remarkXCoordinate:true,onBeforeScrollStart:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:function(){E.find("div.style9Img").trigger("horizonScroll")}});G.off("touchstart.prod").on("touchstart.prod",h);jm("body").off("touchmove.prod").on("touchmove.prod",function(O){if(o===false){O.preventDefault()}});F.css({width:"100%",height:"100%",position:"absolute",opacity:0,left:0,top:0,zIndex:-1});E.children().off("touchmove.banIScroll").on("touchmove.banIScroll",function(O){if(o===true){O.stopPropagation()}})}}E.find(".productCrossedSlideSec").show()};Mobi.hideProductItemContainer=function(a){jm(Mobi.getPreviewObject(a)).removeAttr("style");jm(Mobi.getPreviewObject("productSlide")).find(".productLeft").hide();jm(Mobi.getPreviewObject("productSlide")).find(".productRight").hide()};Mobi.hideParamPadding=function(b){var a=jm("#"+b+" .paramCollection").children("p").length;if(a===0){jm("#"+b+" .paramCollection").removeClass("paramPadding")}};Mobi.removeMarginBottom=function(c,b){if(b=="styleNine"){var f=jm("#"+c+" .productCrossedSlideSec")}else{if(b=="styleEight"){var f=jm("#"+c+" .productWaterFall")}else{if(b=="styleSeven"){var f=jm("#"+c+" .productCrossedSlide")}}}var a=f.eq(0).find(".paramCollection").children("p").length;var e=f.eq(0).find(".paramCollection").children(".paramName").length;if(a===1&&e===1){jm("#"+c+" .paramCollection .paramName").css("marginBottom",0)}var d=f.eq(0).find(".paramCollection").children(".paramPrice").length;if(a===2&&d===1){f.find(".paramCollection").children(".paramLine").remove()}};Mobi.productGuaranteeEventInit=function(){var a=Mobi.initWebPage({triggerId:"guaranteeContent",panelId:"productGuaranteePanel",pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#guaranteeBtn,#closeProductGuarantee"})};Mobi.isPtBtn=false;Mobi.productNewDetailIScrollObj=null;Mobi.productNewDetailEventInit=function(r){if(!r){return}var d=r.moduleId,J=r.productId,A=r.mallOptionsOpen;pageStyle=r.pageStyle,returnUrl=r.returnUrl||"",isGroupBuy=r.isGroupBuy||false,groupBuyId=r.groupBuyId||0,groupBuyDetailId=r.groupBuyDetailId||0,groupPriceStr=r.groupPriceStr||"",isCutPrice=r.isCutPrice||false,cutPriceId=r.cutPriceId||0,cutPriceDetailId=r.cutPriceDetailId||0,cpPriceStr=r.cpPriceStr||"";var H=groupBuyDetailId;Mobi.scrollFadeIn("productDetailHeader"+d,"productNewDetailSwipe"+d,pageStyle);Mobi.initAjaxTab({pid:J,moduleId:d});var B=document.getElementById("productDetailHeader"+d),e=document.getElementById("productNewDetailPanel"+d),E=e.querySelector(".productNewDetail .productInfoSize"),s=B.querySelector(".icon-gClose.proBack"),y=B.querySelector(".icon-noProduct.proShopping"),K=B.querySelector(".tabBody .userCommentInfo"),t=B.querySelector(".icon-gOther.proOther"),f=B.querySelector(".icon-share.proShare"),z=B.querySelector(".proOtherPanel"),k=e.querySelector(".J_productImmediatelyBug"),q=e.querySelector(".J_groupBuyBtn"),o=e.querySelector(".J_cpButton"),F=e.querySelector(".productMallBuy"),u=e.querySelector(".productMallShop"),C=e.querySelector("#productTabUl"),L=document.getElementById("productNewDetailSwipe"+d),D=jm("#productDetailV3_title"+d);var I=false;if(window.sessionStorage){I=Mobi.checkWindowSeStgValue(window.sessionStorage._isJumpFromMlist);try{window.sessionStorage._isJumpFromMlist=false}catch(n){}}var j=false;j=jm.getCookie("_fromCollect");jm(s).bind("click",function(){if(window.sessionStorage){if(I){if(window.sessionStorage._jumpMlistUrl.indexOf("?")<=-1){window.location.href=window.sessionStorage._jumpMlistUrl+"?commHideFlag=true"}else{if(window.sessionStorage._jumpMlistUrl.indexOf("commHideFlag")<=-1){window.location.href=window.sessionStorage._jumpMlistUrl+"&commHideFlag=true"}else{window.location.href=window.sessionStorage._jumpMlistUrl}}window.sessionStorage._backFromProDetail=true}else{if(j){jm.setCookie("_fromCollect","",-1);jm.setCookie("_openCollect",true);window.location.href=Mobi.getQueryString("returnUrl")}else{if(window.history.length<=1){window.location.href="index.jsp"}else{if(returnUrl.length>0){window.location.href=returnUrl}else{if(Fai.top._manageMode){if(sessionStorage.getItem("historyList")){jm(Fai.top.document.getElementById("returnBackButton")).click()}else{window.location.href="index.jsp"}}else{setTimeout(function(){var M=setTimeout(function(){window.location.href="index.jsp";M=null},4000)},300)}}}}}return false}else{if(window.history.length<=1){window.location.href="index.jsp"}else{window.location.href=document.referrer;setTimeout(function(){window.location.href=document.referrer;var M=setTimeout(function(){window.location.href="index.jsp";M=null},500)},300)}return false}});jm(e).bind("click",function(){if(jm(z).hasClass("proOtherPanelOpen")){jm(z).removeClass("proOtherPanelOpen")}});jm(t).bind("click",function(M){if(jm(z).hasClass("proOtherPanelOpen")){jm(z).removeClass("proOtherPanelOpen")}else{jm(z).addClass("proOtherPanelOpen")}M.stopPropagation()});if(D){document.addEventListener("touchmove",a);document.addEventListener("scroll",a);function a(){if(document.body.scrollTop>L.clientHeight||document.documentElement.scrollTop>L.clientHeight){D.show()}else{D.hide()}}}var p=jm(".productMallShop").html(),m=jm(".productMallBuyPanel").html(),h=Mobi.initWebPage({triggerId:"productInfoSize",panelId:"productMallOptionPanel",callback:b,pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#productMallOptionPanel .productDetailClose.icon-Off",closeCallBack:function(){jm(".productMallOptionPanel .productMallOptionContentPanel").removeClass("mallThemeProductContentPanel")}});function b(){if(Mobi.deviceTypeIsMobi()){Mobi.productNewDetailIScrollObj=new iScroll("mallOptionAndNumContainer",{onBeforeScrollStart:function(N){var M=N.target;while(M.nodeType!=1){M=M.parentNode}if(M.tagName!="INPUT"){N.preventDefault()}}})}if(!c){G()}return false}jm("#productInfoSize").bind("click",function(){if(p==null||p==""){return}var P=jm(".productMallBuyPanel");P.html(p);var M=Fai.top._templateFrameId;var N=jm(".productMallBuyPanel .productAddMall");var O=(M>=1015&&M<2000);if(M<2000||M>=3000){N.css("margin-left","0.45rem");if(M==1014){N.css("margin-left","0.85rem")}}if(O){N.css({"margin-left":"","margin-top":""});P.find(".mallThemeAddCartBtn").css("margin-left","")}jm(".productMallBuyPanel .productAddMall").css("color",jm(".productNewDetailPanel .productAddMall").css("color")).css("border-color",jm(".productNewDetailPanel .productAddMall").css("border-left-color"));jm(".productMallBuyPanel .productImmediatelyBug").css("background-color",jm(".productNewDetailPanel .productImmediatelyBug").css("background-color")).css("border-color",jm(".productNewDetailPanel .productImmediatelyBug").css("border-left-color"));if(!O){jm(".productMallBuyPanel div").css("margin-top","0")}jm(".productMallOptionPanel .productMallOptionContentPanel").css("overflow","hidden").addClass("mallThemeProductContentPanel");jm(".productMallBuyPanel .J_productAddMall").bind("click",function(){Mobi.mallBuy(J,0)});jm(".productMallBuyPanel .J_productImmediatelyBug").unbind("click").bind("click",function(){Mobi.mallBuy(J,1)});jm(".productMallBuyPanel .J_groupBuyBtn").unbind("click").bind("click",function(){Mobi.mallBuy(J,1,null,null,null,null,{isGroupBuy:isGroupBuy,groupBuyId:groupBuyId,groupBuyDetailId:groupBuyDetailId})});jm(".productMallBuyPanel .J_cpButton").unbind("click").bind("click",function(){Mobi.logDog(200535,0);Mobi.cutPrice(cutPriceId,J)});jm(".productMallBuyPanel .serviceBtn").off("click.pp").on("click.pp",function(){Mobi.createMallServicePanel()})});var c=false;function G(){var N=document.getElementById("productMallOptionPanel"),O=document.getElementById("g_body").clientHeight,S=N.querySelector(".productMallOptionContentPanel"),M=N.querySelector(".productMallOptionContent"),P=N.querySelector(".productMallOptionMargin"),R=N.querySelectorAll(".productMallOptionContent>div"),Q=true}var v;jm("#productNewDetailPanel"+d+" .J_productAddMall").bind("click",function(){jm(".productMallBuyPanel").html(m);v=0;Mobi.isPtBtn=false;h()});jm(".J_pdJoinGroupBuyBtn").bind("click",function(){groupBuyDetailId=jm(this).attr("_groupBuyDetailId");v=2;h();jm("#mallPrice").html(groupPriceStr);Mobi.isPtBtn=true});jm(".productMallBuyPanel").delegate(".productMallBuy","click",function(){if(v==1){Mobi.mallBuy(J,v)}else{if(v==2){Mobi.mallBuy(J,1,null,null,null,null,{isGroupBuy:isGroupBuy,groupBuyId:groupBuyId,groupBuyDetailId:groupBuyDetailId})}else{if(v==3){Mobi.cutPrice(cutPriceId,J)}else{Mobi.mallBuy(J,v)}}}});var x=jm("#mallPrice").html()||"";jm(k).bind("click",function(){jm(".productMallBuyPanel").html(m);v=1;Mobi.isPtBtn=false;h();if(isGroupBuy){jm("#mallPrice").html(x);jm(jm("#productMallOptionPanel .optionSelected")[0]).click().click()}});jm(q).bind("click",function(){if(isGroupBuy){jm("#mallPrice").html(groupPriceStr)}jm(".productMallBuyPanel").html(m);v=2;groupBuyDetailId=H;Mobi.isPtBtn=true;h()});jm(o).bind("click",function(){if(A){if(isCutPrice){jm("#mallPrice").html(cpPriceStr)}jm(".productMallBuyPanel").html(m);v=3;Mobi.isPtBtn=false;h()}else{Mobi.cutPrice(cutPriceId,J)}});if(Fai.top._templateFrameId>=2000&&Fai.top._templateFrameId<3000){var w={triggerId:"mallThemeProductDetailShare",pageBg:true,pageHtml:Mobi.sharePage(Fai.top._shareDataProdectDetail),direction:"bottom",callback:function(){Mobi.initProductSwipe("shareListShowSwipe")},closeWebPage:".shareListPanelBg"};Mobi.initWebPage(w)}else{var w={triggerId:"productDetailShare",pageBg:true,pageHtml:Mobi.sharePage(Fai.top._shareDataProdectDetail),direction:"bottom",callback:function(){Mobi.initProductSwipe("shareListShowSwipe")},closeWebPage:".shareListPanelBg"};Mobi.initWebPage(w)}var l={triggerId:"showCouponList",pageBg:true,pageHtml:Mobi.couponPage(Fai.top._couponInfo),direction:"bottom",closeWebPage:"#contentBottomPanel",callback:function(){jm("#couponListBottomPanel").bind("click mousedown touchstart",function(M){M.stopPropagation()});jm("#contentBottomPanel").show();jm(".toUseCoupon").bind("click",function(N){var M=jm(this).parents(".couponItem").attr("couponid");Fai.top.location.href="pr.jsp?couponId="+M;N.stopPropagation()})}};Mobi.initWebPage(l);Mobi.hidePlaceholder()};Mobi.runGroupBuyCountDown=function(d){var f=new Date().getTime();var c=d-f;var b=[];jm(".fk_otherGroupBuy .J_gbItem, .fk-groupBuyDetail .J_gbItem, .fk-groupBuyDetail .J_contentBox").each(function(j,q){var p=jm(q).attr("_groupCreateTime");var h=jm(q).attr("_groupEndTime");p=p.replace(/-/g,"/");h=h.replace(/-/g,"/");if(!p||!h||p=="null"){return}var k=true;if(jm(q).hasClass("J_contentBox")){k=false}var m=new Date(p);var o=new Date(h);var l=jm(q).find(".J_gbCountDown");b[j]=setInterval(function(){e(o,j,jm(q),k,c)},1000)});function e(k,o,n,m,j){var r=new Date(new Date().getTime()+j);var h=k.getTime()-r.getTime();var s=parseInt(h/1000/60/60/24,10);var p=parseInt(h/1000/60/60%24,10)+s*24;var l=parseInt(h/1000/60%60,10);var q=parseInt(h/1000%60,10);if(s>=0||p>=0||l>=0||q>=0){n.find(".J_gbCountDown").html(a(p)+":"+a(l)+":"+a(q))}if(s<=0&&p<=0&&l<=0&&q<=0){clearInterval(b[o]);b[o]=null;if(m){n.remove()}}}function a(h){if(h<0){return"00"}if(h<10){return"0"+h}return h}};Mobi.initGroupBuyDetail=function(){jm("#g_web").append("
    "+Mobi.sharePage(Fai.top._shareDataGroupBuyDetail)+"
    ");Mobi.initShare("shareLinkWeixin","","");jm("#gbSharetoFriend").click(function(){Mobi.logDog(200478,1);jm("#shareLinkWeixin").click()});jm("#gbDetailShare").click(function(){Mobi.logDog(200478,1);jm("#shareLinkWeixin").click()})};Mobi.initCutPriceDetail=function(){jm("#g_web").append("
    "+Mobi.sharePage(Fai.top._shareDataCutPriceDetail)+"
    ");Mobi.initShare("shareLinkWeixin","","");jm(".J_cpInvite").click(function(){Mobi.logDog(200535,1);jm("#shareLinkWeixin").click()})};Mobi.getQueryString=function(a){var b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)");var c=window.location.search.substr(1).match(b);if(c!=null){return unescape(c[2])}return null};Mobi.initCommentUserTab=function(c){if(c!==3){return}var b="ajax/productComment_h.jsp?cmd=submitPC&newComment=true";var a={triggerId:"userCommentId",panelId:"userCommentPanel",callback:function(){Mobi.postUserComment(b)},closeWebPage:"#userCommentPanel .userCommentGoBack"};Mobi.initWebPage(a);jm("#userCommentId").one("click",function(){jm("#loginCaptchaImg").attr({src:"validateCode.jsp?v=610"})})};Mobi.initStarList=function(a){jm(".J-star-list").eq(a).attr("_star",5);jm(".J-star-list").eq(a).html('
  • ')};Mobi.setStarSelect=function(){Mobi.onTouchAndClickEvent(".J-star-list li",function(){var f=jm(".userCommentPanel").css("background-color");if(typeof f!="string"){f="#FFF"}var c=jm(this).index();if(c>=5){return true}var e=jm(this).parent();e.attr("_star",c+1);for(var d=0;d<5;d++){var a=e.find("li").eq(d);if(d"+(c+1)+LS.score+h);e.find("li.score-tip").css({"border-color":b,color:b,display:"inline-block","max-width":"6.6rem"});e.find("li.score-tip em").css({borderColor:"transparent "+b+" transparent transparent"});e.find("li.score-tip span").css({borderColor:"transparent "+f+" transparent transparent"})})};Mobi.couponPage=function(f){if(f==null){return""}var e=[];var b="";for(i=0;i");var a="g_bgColor";var d="";var c="couponItemRightValidity";e.push("
    ");e.push("
    ");e.push("
    "+Fai.top.choiceCurrencyVal+""+f[i].savePrice+"
    ");e.push("
    满"+f[i].orderMinPrice+"可用
    ");e.push("
    ");e.push("
    ");if(f[i].isRecieve){e.push("
    "+LS.toUseCoupon+"
    ")}e.push("
    "+f[i].couponName+"
    ");e.push("
    "+f[i].validity+"
    ");e.push("
    ");e.push("")}b="";return b};Mobi.sharePage=function(n){if(!n){return}var l=jm.parseJSON(n.shareLinkList),c=n.shareUrl,e=n.browserTitle,b=window.location.href;var m="",h=[];if(Fai.top._manageMode){var a=Mobi.getPreviewDocument().URL;a=a.replace("http://"+Fai.top._userHostName,"");if(a.indexOf("_safeMode=false&")>-1){a=a.replace("_safeMode=false&","")}else{if(a.indexOf("?_safeMode=false")>-1){a=a.replace("?_safeMode=false","")}else{if(a.indexOf("&_safeMode=false")>-1){a=a.replace("&_safeMode=false","")}}}var b=Fai.top._visitorHostName+a}else{var b=window.location.href}for(var d in l){var a=l[d].url,f=l[d].icon;if(f=="baidu_tieba"&&Fai.top._isFaiHost){m+=""}else{if(f=="Weixin"){shareIcon=true;m+=""}else{if(f=="qq_share"){shareIcon=true;m+=""}else{if(f=="copy_url"){m+=""}else{m+=""}}}}if((parseInt(d)+1)%8===0){h.push("
    "+m+"
    ");m=""}}m&&h.push("
    "+m+"
    ");var k="";if(l.length<=4){k="style='height:5rem';"}var j="
    "+LS.shareIt+"
    "+h.join("")+"
    ";if(l.length>8){j+='
    '}return j};Mobi.showPbSingalInstCommImg=function(){var a=jm(".J_productCommImg").eq(0)[0].querySelectorAll("img");if(typeof(a)!="undefined"&&a!=null&&a.length>0){Mobi.bindCommImgShow(a,true,0)}};Mobi.setMemberPriceLabelColot2ThemeBackgroundColor=function(){var a=jm(".productImmediatelyBug").css("background-color");jm(".memberPrice").css("background-color",a)};Mobi.initPbCommUploadImgParam=function(c,d,k,l,e,f,o,b){_pbCommUploadImgParam={upImgMaxSize:c,imgType:d,upImgMaxNum:k,jsJquery:l,jsUpload:e,swfUpload:o,isIE:b,siteMainDomain:f};var h=document.body;if(!m(l)){var a=document.createElement("script");a.type="text/javascript";a.src=l;a.onload=function(){n()};h.appendChild(a)}else{n()}function n(){var q=e,p;if(b=="true"){q=o}if(!m(q)){p=document.createElement("script");p.src=q;p.type="text/javascript";h.appendChild(p);p.onload=function(){j()}}else{j()}}function j(){if(b=="true"){Mobi.mobiPbCommUploadImgSWF("comm-img-swfu-placeholder",c,d,k)}else{Mobi.mobiPbCommUploadImgHtml("comm-img-swfu-placeholder",c,d,f)}}function m(u){var r=document.getElementsByTagName("script"),s=false,q="";for(var t=0,p=r.length;t
    ','
    ','
    ','
    ','
    '+l.title+"
    ",'
    ','
    ','
    0%
    ',"
    ",'","
    ","
    "];jm("body").append(m.join(""))}else{if(l.status=="ing"){jm("#progressTitle"+l.id).text(l.title);jm("#progress"+l.id).css("width",Math.round(l.percent)+"%");jm("#progressNum"+l.id).html(Math.round(l.percent)+"%")}else{if(l.status=="end"){jm("#progressTitle"+l.id).text(l.title);jm("#progressBody_"+l.id).remove();jm("#progressWrap_"+l.id).remove()}else{if(l.status=="error"){jm("#progress"+l.id).addClass("progressError")}}}}}upload=jm("#"+h).uploadify(j);var k="file_upload_pt_1";var b="select_btn_pt_1";jm("#file_upload_1-button").attr("id",k);jm("#select_btn_1").attr("id",b);if(Fai.top._manageMode){jQuery("#select_btn_pt_1").attr("disabled","true");jQuery("#file_upload_pt_1").attr("disabled","true").off("click").on("click",function(l){Mobi.ing("管理状态下,不能上传图片。");return false})}};Mobi.onPbCommFileUploadEvent=function(k,f){if(k=="upload"){var c=f.id;var j=f.name;var e=f.size;var d=f.path;var l=f.pathSmall;var b=f.fileId;var a=f.width;var h=f.height;Mobi.pbCommImgTableCtrl(d,j,c,e,b)}};Mobi.pbCommImgTableCtrl=function(l,a,b,h,d){var j=$("#pt_add_img_tb").eq(0);var k=j.find(".comm-find-tb").length;var e=j.find(".comm-find-tb").eq(k-1);var c=e.attr("maxNum");if(parseInt(k-1)>=c){return}var f=[];f.push("");f.push("");f.push(" ");f.push(" ");f.push(" ");f.push("
    ");f.push(" ");f.push("
    ");f.push("
    ");f.push(" ");f.push("
    ");f.push("");e.before(f.join(""));k=j.find(".comm-find-tb").length;if(parseInt(k-1)>=c){e.css("display","none")}Mobi.showPbSingalInstCommImg()};Mobi.pbCommTableImgDelete=function(a){var d=jm("#pt_add_img_tb").eq(0);var b=d.find(".comm-find-tb").length;for(var c=0;c0){for(var A=0;A0){h(true)}else{j()}k.stopPropagation();return false});Mobi.bindTouchAndClickEvent(jm("#anonymityCommentComform"),function(k){if(Fai.top._manageMode){Mobi.ing("您目前处于网站管理状态,请先退出再登录");return}h(false);k.stopPropagation();return false})};Mobi.addTheNewComment=function(w){var d=[];var c="VIP";if(w.newsId!=null){if(w.memberId==0){c=LS.Incognito}var t=new Date(w.createTime);t=Mobi.formatDate(t);d.push("
    ");d.push("
    ");d.push("
    ["+c+"]"+w.creator+"
    ");d.push("
    "+t+"
    ");d.push("
    ");d.push("
    "+w.comment+"
    ");d.push("
    ");if(jm(".nnewsComHeader").length!=0){jm(d.join("")).insertAfter(jm(".nnewsComHeader"))}else{location.reload()}}else{if(w.memberId==0){c=LS.Incognito}else{c=w.level}var t=new Date(w.createTime);t=Mobi.formatDate(t);var n=jm("html").css("font-size");n=n.substring(0,n.length-2);var p=w.headPic;d.push("
    ");d.push("
    ");d.push('
    ");d.push("
     "+w.creator+"
    ");d.push("");d.push("
    "+t+"
    ");d.push("
    ");if("star" in w){d.push("
    ");var s=Number(w.star);for(var q=0;q<5;q++){if(q")}else{d.push("
  • ")}}d.push("
    ");if(s==1){var f=Number(jm(".fk-right-statisBox .badComm").text());jm(".fk-right-statisBox .badComm").text(f+1)}else{if(s>3){var f=Number(jm(".fk-right-statisBox .hignComm").text());jm(".fk-right-statisBox .hignComm").text(f+1)}else{var f=Number(jm(".fk-right-statisBox .middComm").text());jm(".fk-right-statisBox .middComm").text(f+1)}}var k=jm(".fk-comm-avgScore"),h=Number(k.attr("_tc"))+s,l=Number(k.attr("_ts"))+1;var u=h/l;k.text(u.toFixed(1));k.attr("_tc",h);k.attr("_ts",l)}d.push("
    "+w.comment+"
    ");if(typeof(w.commImgList)!="undefined"&&w.commImgList!="null"){var a=jm.parseJSON(w.commImgList);if(a!=null&&a.length>0){d.push("
    ");d.push("");d.push("");for(var q=0;q");d.push("
    ");d.push("");d.push("");d.push("");d.push("
    ");d.push("");d.push("
    ");d.push("")}d.push("");d.push("");d.push("
    ")}}d.push("
    ");if(jm("#tabPanel3 .msgArea")[0]!=undefined){jm(d.join("")).insertBefore(jm("#tabPanel3 .msgArea")[0]);Mobi.setNewCommImgBindShow()}else{location.reload()}}jm("#userCommentPanel .userCommentGoBack").click()};Mobi.setNewCommImgBindShow=function(){setTimeout(function(){var b=jm("#tabPanel3 .msgArea").eq(0).find(".ct-s-content-m").eq(0)[0];if(typeof(b)!="undefined"&&b!="null"){var a=b.querySelectorAll("img");if(typeof(a)!="undefined"&&a!=null&&a.length>0){Mobi.bindCommImgShow(a,false,0)}}},500)};Mobi.formatDate=function(b){var l=new Date(b);var k=b.getFullYear();var a=parseInt(b.getMonth()+1)>9?parseInt(b.getMonth()+1):("0"+parseInt(b.getMonth()+1));var j=b.getDate()>9?b.getDate():("0"+b.getDate());var e=b.getHours()>9?b.getHours():("0"+b.getHours());var f=b.getMinutes()>9?b.getMinutes():("0"+b.getMinutes());var c=b.getSeconds()>9?b.getSeconds():("0"+b.getSeconds());return k+"-"+a+"-"+j};Mobi.initAjaxTab=function(c){if(!c){return}var b=c.pid,f=c.moduleId,j=document.querySelector("#productDetailTabPanel"+f+" .tabUl"),d=document.querySelector("#productDetailTabPanel"+f+" .tabBody"),e=document.getElementById("productNewDetailPanel"+f),a=function(o){if(!o){return}var m=parseInt(o.getAttribute("data")),l=document.getElementById("tabPanel"+m),t=document.getElementById("tabLi"+m),p=e.querySelector(".tabLi.tabActive"),s=e.querySelector(".tabPanel.tabPanelAtive");if(!l){return}jm(p).removeClass("tabActive");jm(s).removeClass("tabPanelAtive");jm(t).addClass("tabActive");jm(l).addClass("tabPanelAtive");setTimeout(function(){Mobi.productTabUlScroll()},0);var k=jm("html").css("font-size");k=k.substring(0,k.length-2);if(l.innerHTML==""){var n="
    ";jm(d).append(n);var q="pid="+b+"&type="+m+"&moduleId="+f+"&rem="+k;jm.ajax({type:"post",url:"ajax/product_h.jsp?cmd=getProductDetailInfo",data:q,error:function(){Mobi.ing("error")},success:function(r){var u=jm.parseJSON(r);if(!u.html){jm("#tabPanelLoading").remove();u.html=""}if(m==3){l.innerHTML=u.html;Mobi.initCommentUserTab(3);Mobi.setCommImgBindShow()}else{if(m===1){u.html="
    "+u.html+"
    ";if(!Fai.top._productRecommentData){l.innerHTML=u.html;jm("#tabPanelLoading").remove();Mobi.switchJump();Mobi.addParentDivToTable();Mobi.initModulePhotoSwipe("productDetailTabPanel"+f);return}l.innerHTML=u.html+Fai.top._productRecommentData;Mobi.productCrossedSlideSec("mProductList"+f,1,1,"paramWrap");Mobi.productCrossedSlideSecSwipe("productSlideList"+f,"productSlide"+f);Mobi.switchJump();Mobi.addParentDivToTable();Mobi.initModulePhotoSwipe("productDetailTabPanel"+f)}else{if(m===2){l.innerHTML=u.html}}}jm("#tabPanelLoading").remove()}})}},h=function(l){var k=l.target;if(k){a(k);return false}};jm(e).css("min-height",jm(window).height()+"px");if(!j.querySelector(".tabActive")){return}jm(j).bind("click",h);a(j.querySelector(".tabActive"));Mobi.initCommentUserTab(parseInt(j.querySelector(".tabActive").getAttribute("data")))};Mobi.getCommentAjaxPagenation=function(b,d){if(!b){return}var c=jm("html").css("font-size");c=c.substring(0,c.length-2);var a="pid="+b+"&pageno="+d+"&ajaxPage="+true+"&rem="+c;jm.ajax({type:"post",url:"ajax/product_h.jsp?cmd=getProductInfoComment",data:a,error:function(){Mobi.ing("error")},success:function(e){var f=jm.parseJSON(e);if(!f.html){f.html=""}jm("#tabPanel3 .commentBoxPanel").remove();document.getElementById("tabPanel3").insertBefore(jm(f.html)[0],jm("#tabPanel3 .userComment")[0]);Mobi.setCommImgBindShow()}})};Mobi.setCommImgBindShow=function(){setTimeout(function(){var b=jm(".ct-s-content-m");if(typeof(b)!="undefined"&&b!=null){for(var c=0;c0){Mobi.bindCommImgShow(a,false,0)}}}},500)};Mobi.pbSaveBodyStyle=function(){if(typeof(g_saveBodyIdStyle)!="undefined"&&g_saveBodyIdStyle!=null){jm("#g_body").attr("style",g_saveBodyIdStyle);g_saveBodyIdStyle=null}};Mobi.pbRemoveBodyStyle=function(){g_saveBodyIdStyle=jm("#g_body").attr("style");jm("#g_body").attr("style","")};Mobi.bindCommImgShow=function(h,b,c){var l={imageScaleMethod:"fitNoUpscale",enableMouseWheel:false,resetToolbarPosition:true,loop:false,captionAndToolbarAutoHideDelay:0,showCountTextLeft:true,getImageCaption:function(m,n){var p,o;p=m+" / "+n;o=document.createElement("div");o.className="ps-comm-page";o.appendChild(document.createTextNode(p));return o},getToolbar:function(){return'
    '}},j=null,d=null,f=null,e=null,a=window.Code.PhotoSwipe;if(b==null||!b||b=="false"){var k=a.attach(h,l)}else{if(typeof(g_showCommImgInstance)!="undefined"&&g_showCommImgInstance!="null"){if(typeof(g_showCommImgInstance[c])!="undefined"&&g_showCommImgInstance[c]!="null"){a.detatch(g_showCommImgInstance[c]);g_showCommImgInstance[c]=null}else{g_showCommImgInstance[c]={}}}else{g_showCommImgInstance=[];g_showCommImgInstance[c]={}}setTimeout(function(){g_showCommImgInstance[c]=a.attach(h,l)},1000)}};Mobi.scrollFadeIn=function(k,c,o){var c=document.getElementById(c),k=document.getElementById(k),p=document.getElementById("g_body"),a=k.clientHeight,d=c&&c.clientHeight,j=false,e=false,h=jm(k).parent().hasClass("productDetail_v3");document.addEventListener("touchstart",function(q){n();b()},false);document.addEventListener("touchmove",function(q){n();b()},false);document.addEventListener("touchend",function(q){n();b()},false);document.addEventListener("touchcancel",function(q){n();b()},false);document.addEventListener("scroll",function(){n();b()},false);n();function n(){var r=m();if(o==1){return}if(rd&&e){k.style.background="rgba(255,255,255,0.99)";k.style.borderBottom="1px solid #ddd";e=false}}productTabUl=document.getElementById("productTabUl");if(productTabUl!=null&&productTabUl!=undefined){var l=productTabUl.clientHeight,f=productTabUl.offsetTop;Mobi.productTabUlScroll=b}function b(){var q=m();if(q>(f-a)&&!j){jm(productTabUl).addClass("tabUl_fix");j=true;if(h){k.style.borderBottom=""}}if((q+l)0){q=document.documentElement}return q.scrollTop}};Mobi.salePromotionDetail={salePromotionParam:"",showType:"2",styleType:"1",saleCountTimeInterval:{},showSaleTime:false,showSaleDlMore:false,saleReSalePriceHtml:""};Mobi.initSalePromotion=function(c,a,b){Mobi.salePromotionDetail.salePromotionParam=c;Mobi.salePromotionDetail.styleType=a;Mobi.salePromotionDetail.saleReSalePriceHtml=b};Mobi.oldShowSalePromotionDl=function(k,d,e){if(typeof(k)=="undefined"||k==null||k==""){return}Mobi.salePromotionDetail.salePromotionParam=k;var b=[];if(k.saleType=="1"){var h="";if(typeof(k.other.ruleData.d.length)=="undefined"){return}var f=parseFloat(k.other.ruleData.d[0].m);if(k.other.ruleData.s=="1"){if(Fai.top._lcid==2052||Fai.top._lcid==1028){h=jm.format(LS.salePromotionDisCount,f)}else{h=jm.format(LS.salePromotionDisCount,10*(10-f))}d=parseFloat(d)*f/10}else{h=jm.format(LS.salePromotionLapse,f);d=parseFloat(d)-f}if(d<0){d=0}b.push("");b.push("");b.push("");b.push("");b.push("");b.push("");b.push("");b.push("");b.push("");b.push("
    "+LS.promotionPrice+LS.colon+""+e+d.toFixed(2)+"");b.push("
    ");b.push("
    ");b.push("
    ");b.push("
    ");b.push(h);b.push("
    ");b.push("
    ")}else{if(typeof(k.other.ruleData.d.length)=="undefined"){return}var j=k.other.ruleData.d;var c=j.length;b.push("");for(var a=0;a");if(a==0){b.push("")}else{b.push("")}b.push("");b.push("");b.push("")}b.push("
    "+LS.salePromotionName+LS.colon+"");b.push("
    ");b.push(LS.salePromotionOnlyFullReduce);b.push("
    ");b.push("
    ");b.push("
    ");b.push("  "+jm.format(LS.salePromotionFullReduce,j[a].m,j[a].n));b.push("
    ");b.push("
    ")}jm(".J_showSaleDetail").html(b.join(""))};Mobi.showNewMarketPrice=function(a){if(a==true){jm(".marketPriceNew").css("display","block")}};Mobi.fixMallThemePtInfo=function(){if(Fai.top._templateFrameId>=2000||Fai.top._templateFrameId<3000){jm(".proCommProperty.productPrice").css("min-height","1.6rem")}};Mobi.showSalePromotionDl=function(m,k,c){var a="position:relative;";if(Mobi.salePromotionDetail.showSaleTime==true){a=a+"margin-top:0.4rem;"}if(Mobi.salePromotionDetail.showType!="2"){return}if(typeof(m)=="undefined"||m==null||m==""){return}var d=jm(".J_saleMallPrice").css("color");if(typeof(d)=="undefined"||d==null||d==""){d="#FC4643"}var f=[];if(m.saleType=="1"){if(c!=null&&c!=""){jm(".J_saleMallPrice").html(c)}var j="";jm(".J_salePrePrice").css("display","inline-block");var b=m.other.ruleData.d[0].m;if(m.other.ruleData.s=="1"){if(Fai.top._lcid==2052||Fai.top._lcid==1028){j=jm.format(LS.salePromotionDisCount,b)}else{j=jm.format(LS.salePromotionDisCount,10*(10-b))}}else{j=jm.format(LS.salePromotionLapse,b)}f.push("
    ");f.push("");f.push("");f.push("");f.push("");f.push("
    ");f.push(LS.salePromotionName+LS.colon);f.push("");f.push("
    ");f.push(LS.salePromotionReduce);f.push("
    ");f.push("
    ");f.push("
    ");jm(".J_saleInfoDl").html(f.join(""))}else{if(typeof(m.other.ruleData.d.length)=="undefined"){return}var l=m.other.ruleData.d;var h=l.length;var j="";if(h>1){f.push("
    ")}else{f.push("
    ")}f.push("");f.push("");f.push("");f.push("");f.push("
    ");f.push(LS.salePromotionName+LS.colon);f.push("");f.push("
    ");f.push(LS.salePromotionOnlyFullReduce);f.push("
    ");f.push("
    ");if(h==1){j=jm.format(LS.salePromotionFullReduce,l[0].m,l[0].n);f.push("  "+j)}f.push("
    ");if(h>1){f.push("
    ");for(var e=0;e
    ")}}f.push("
    ");jm(".J_saleInfoDl").html(f.join(""))}};Mobi.showSaleDlMore=function(a){if(typeof(a)=="undefined"){return}if(Mobi.salePromotionDetail.showSaleDlMore==true){Mobi.salePromotionDetail.showSaleDlMore=false;jm(".J_saleShowMoreIcon").addClass("faisco-icons-downward1");jm(".J_saleShowMoreIcon").removeClass("faisco-icons-upward1");jm(".J_saleFullProDetail").css("display","none")}else{Mobi.salePromotionDetail.showSaleDlMore=true;jm(".J_saleShowMoreIcon").addClass("faisco-icons-upward1");jm(".J_saleShowMoreIcon").removeClass("faisco-icons-downward1");jm(".J_saleFullProDetail").css("display","block")}};Mobi.setPdMallPriceHeight=function(b){var a=jm(".J_saleMallPrice").css("height");if(a.indexOf("rem")<0){if(a.indexOf("px")<0){a=parseFloat(a)/_htmlFontSize}else{a=parseFloat(a.substring(0,(a.length-2)))/_htmlFontSize}}else{a=parseFloat(a.substring(0,(a.length-3)))}a=a+(parseFloat(b)*2.3);jm(".J_salePrePrice").css("height",a+"rem");jm(".J_salePrePrice").css("line-height",a+"rem")};Mobi.showSaleTimeType=function(c,b,d,a){if(d){if(10140&&jm(".J_showCountDownClass").length==0){jm(".pd3ProductNameContent").css("padding-bottom","0.7rem")}if(b||a==1){jm(".isShowOldSaleCountDown").show();jm(".isShowNewSaleCountDown").hide();return}if(c){jm(".isShowOldSaleCountDown").hide();jm(".isShowNewSaleCountDown").show()}else{jm(".isShowOldSaleCountDown").show();jm(".isShowNewSaleCountDown").hide()}}};Mobi.showSaleTimeCountDown=function(l,d,k,n,j,b,e,m){var c="";var a=LS.salePromotionBegin;var h=LS.salePromotionEnd;var f=0;Mobi.salePromotionDetail.showType=k;Mobi.salePromotionDetail.showSaleTime=true;if(k==1){c=a;f=l}else{c=h;f=d;jm(".J_salePromotionNewMessage").html(LS.salePromotionNewEndMessage)}if((e||Fai.top._manageMode)&&m!=1){jm(".J_salePromotionDay").html(LS.salePromotionDay);jm(".J_salePromotionHour").html(LS.salePromotionHour);jm(".J_salePromotionMinute").html(LS.salePromotionMinute);jm(".J_salePromotionSecond").html(LS.salePromotionSecond)}window.onload=function(){jm(".showSaleTimeImg").css("display","block")};clearInterval(Mobi.salePromotionDetail.saleCountTimeInterval);Mobi.salePromotionDetail.saleCountTimeInterval=setInterval(function(){var s=parseInt(f/(3600*24));var o=parseInt(f/3600)-(s*24);var p=parseInt(f/60)-(s*24*60)-(o*60);var r=parseInt(f%60);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){if(o<10){o="0"+o}if(p<10){p="0"+p}if(r<10){r="0"+r}}f--;if(k==1&&(e||Fai.top._manageMode)&&m!=1){jm(".J_showCountDownClass").html("  "+jm.format(c,s,o,p,r))}if(n==1&&(!e||Fai.top._manageMode||m==1)){jm(".showSaleTimeClass").html("  "+jm.format(c,s,o,p,r))}if(n==1&&(e||Fai.top._manageMode)&&m!=1){if(s<10){s="0"+s}if(o<10){o="0"+o}if(p<10){p="0"+p}if(r<10){r="0"+r}jm(".J_salePromotionDayNum").html(s);jm(".J_salePromotionHourNum").html(o);jm(".J_salePromotionMinuteNum").html(p);jm(".J_salePromotionSecondNum").html(r)}if(f<0){if(k==1){f=d;c=h;k=2;Mobi.salePromotionDetail.showType=2;Mobi.showSalePromotionDl(Mobi.salePromotionDetail.salePromotionParam,Mobi.salePromotionDetail.styleType,Mobi.salePromotionDetail.saleReSalePriceHtml)}else{clearInterval(Mobi.salePromotionDetail.saleCountTimeInterval);Mobi.salePromotionDetail.showType=1;if(Mobi.salePromotionDetail.salePromotionParam.saleType=="1"){var q=jm(".J_salePrePrice").html();if(q!=null){jm(".J_saleMallPrice").html(q)}}jm(".J_salePromotionRemove").remove();if(j==true){jm(".productPrice").css("height","3.75rem")}else{jm(".productPrice").css("height","2.75rem")}}}},1000)};Mobi.showGbTimeCountDown=function(j,c,h,d,k){var b="";var a="距拼团活动开始仅剩:{0}天{1}小时{2}分{3}秒";var f="距拼团活动结束仅剩:{0}天{1}小时{2}分{3}秒";var e=0;if(h==1){b=a;e=j}else{b=f;e=c;jm(".J_salePromotionNewMessage").html(LS.salePromotionNewEndMessage)}if((d||Fai.top._manageMode)&&k!=1){jm(".J_salePromotionDay").html(LS.salePromotionDay);jm(".J_salePromotionHour").html(LS.salePromotionHour);jm(".J_salePromotionMinute").html(LS.salePromotionMinute);jm(".J_salePromotionSecond").html(LS.salePromotionSecond)}window.onload=function(){jm(".showSaleTimeImg").css("display","block")};clearInterval(Mobi.gbCountTimeInterval);Mobi.gbCountTimeInterval=setInterval(function(){var o=parseInt(e/(3600*24));var l=parseInt(e/3600)-(o*24);var m=parseInt(e/60)-(o*24*60)-(l*60);var n=parseInt(e%60);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){if(l<10){l="0"+l}if(m<10){m="0"+m}if(n<10){n="0"+n}}e--;if(h==1&&(d||Fai.top._manageMode)&&k!=1){jm(".J_showCountDownClass").html("  "+jm.format(b,o,l,m,n))}if(!d||Fai.top._manageMode||k==1){jm(".showSaleTimeClass").html("  "+jm.format(b,o,l,m,n))}if((d||Fai.top._manageMode)&&k!=1){if(o<10){o="0"+o}if(l<10){l="0"+l}if(m<10){m="0"+m}if(n<10){n="0"+n}jm(".J_salePromotionDayNum").html(o);jm(".J_salePromotionHourNum").html(l);jm(".J_salePromotionMinuteNum").html(m);jm(".J_salePromotionSecondNum").html(n)}if(e<0){clearInterval(Mobi.gbCountTimeInterval)}},1000)};Mobi.addProductScreenFilterModel=function(e,c){var a=e;c=jm.parseJSON(jm.decodeUrl(c));var b=Mobi.initWebPage({triggerId:"screenButton",panelId:"productScreenFilterPanel",pageBg:true,returnSeltFun:true,callback:d,direction:"right",pageHead:"筛选",closeWebPage:".screenFilterIcon"});function d(){var m=c.sortName,n=c.desc,l=c.groupId,h;if(c.keyword){h=c.keyword}else{h=""}var k=c.mid,f=c.psc;var j={};j.sortName=m;j.pdListId=a;j.desc=n;j.groupID=l;j.searchword=h;j.mid=k;urlStr="ajax/product_h.jsp?cmd=getScreenPrInfo";jm.ajax({type:"POST",url:urlStr,data:j,success:function(o){var q=jm.parseJSON(o);if(q.success){var p=jm.toJSON(q.list);Mobi.initScreenFilter(p,f,l,n,m,h)}}})}};Mobi.initScreenFilter=function(h,e,o,k,p,l){var c=jm.parseJSON(h);var j=jm.parseJSON(e);var d=LS.productScreenAll;if(j){var n=j.lid;for(var f=c.length-1;f>=0;f--){var b=c[f];if(b.lid==n){d=b.libName;break}}}var m=[];if(c.length>1){m.push("
    ");m.push("
    "+LS.productScreenSort+"
    ");m.push("
    ");m.push("
    ");m.push("
    "+d+"
    ");m.push("
    ");m.push("
    ");if(j){var n=j.lid;m.push("")}else{m.push("")}}else{if(c.length==1){m.push("")}else{m.push("")}}var q=m.join("");jm("#baseScreenFilterContenter").append(q);jm("#backContent").show();var a=[];a.push("
    ");a.push("
    "+LS.productScreenCommit+"
    ");a.push("
    ");q=a.join("");jm("#basePanel").append(q);if(c.length>1){Mobi.changeScreenFilterLib(h)}Mobi.initScreenFilterModel(h,j);Mobi.screenCommitData(h,o,k,p,l)};Mobi.setPrImageMaxHeight=function(f,b,h){var d=jm("#module"+f),b=d.find(b),c=b.find("img"),e=0,a=0;c.each(function(){a=parseInt(jm(this).height());if(a>e){e=a}});if(e!=0){if(h){b.css("height","100%")}else{b.css("height",(e/_htmlFontSize)+"rem")}}};Mobi.changeScreenFilterLib=function(a){var b=jm.parseJSON(a);jm("#libTab").bind("click",function(){jm("#screenCommit").hide();jm("#baseScreenFilterContenter").hide();var h=jm("#lidValue").val();var e=[];e.push("
    ");e.push("
    ");e.push("
    ");e.push("
    "+LS.productScreenSort+"
    ");e.push("
    ");e.push("
    ");if(h<0){e.push("
    ")}else{e.push("
    ")}e.push("
    ");e.push(""+LS.productScreenAll+"");e.push("
    ");if(h<0){e.push("
    ");e.push("
    ");e.push("
    ");e.push("
    ")}e.push("
    ");e.push("
    ");for(var d=0;d")}else{e.push("
    ")}e.push("
    ");e.push(""+jm.encodeHtml(f)+"");e.push("
    ");if(j==h){e.push("
    ");e.push("
    ");e.push("
    ");e.push("
    ")}e.push("
    ");e.push("
    ")}e.push("
    ");e.push("
    ");var c=e.join("");jm("#basePanel").append(c);jm("#backLib").on("click",function(){jm("#optionSelectorLib").remove();jm("#screenCommit").show();jm("#baseScreenFilterContenter").show()})})};Mobi.changeLibValue=function(c,b){if(c>0){for(var a=b.length-1;a>=0;a--){if(b[a].lid==c){jm(".productScreenLibName").html(b[a].libName);jm("#lidValue").val(c);break}}}else{jm(".productScreenLibName").html(LS.productScreenAll);jm("#lidValue").val(-1)}jm("#optionSelectorLib").remove();jm("#screenCommit").show();Mobi.initScreenFilterModel(jm.toJSON(b));jm("#baseScreenFilterContenter").show()};Mobi.initScreenFilterModel=function(k,c){if(jm("#productScreenFilterOptions").length>0){jm("#productScreenFilterOptions").remove()}if(jm(".noScreenProp").length>0){jm(".noScreenProp").remove()}var n=jm("#lidValue").val();if(!k){return}if(n<0){return}var b=jm.parseJSON(k);var o=[];var m;if(c){m=c.prop;n=c.lid}for(var f=0;f");for(var e=0;e");o.push("
    ");o.push(""+r[e].name+"");o.push("
    ");o.push("
    ");o.push("
    ");o.push(""+h+"");o.push("
    ");o.push("
    ");o.push("
    ")}o.push("
    ");break}}var q=o.join("");jm("#baseScreenFilterContenter").append(q);jm.each(b,function(t,u){if(u.lid==n){var l=u.propList;for(var s=0;s");k.push("
    ");k.push("
    ");k.push("
    "+d+"
    ");k.push("
    ");k.push("
    ");if(l==LS.productScreenAll){k.push("
    ")}else{k.push("
    ")}k.push("
    ");k.push(""+LS.productScreenAll+"");k.push("
    ");if(l==LS.productScreenAll){k.push("
    ");k.push("
    ");k.push("
    ");k.push("
    ")}k.push("
    ");k.push("
    ");for(var j=0;j-1&&f.indexOf("]")>-1){f=f.replace("[","");f=f.replace(",","~");f=f.replace("]","");if(j==c.length-1){f=f+"~"}}f=a+f;if(l==f){k.push("
    ")}else{k.push("
    ")}k.push("
    ");k.push(""+f+"");k.push("
    ");if(l==f){k.push("
    ");k.push("
    ");k.push("
    ");k.push("
    ")}k.push("
    ");k.push("
    ")}k.push("
    ");k.push("
    ");var h=k.join("");jm("#basePanel").append(h);jm("#back").on("click",function(){jm("#optionSelector"+e).remove();jm("#screenCommit").show();jm("#baseScreenFilterContenter").show()})})};Mobi.changePropValue=function(a,b){jm("#screenOptionContent"+b).html(jm("#option"+a).html());jm("#optionSelector"+b).remove();jm("#screenCommit").show();jm("#baseScreenFilterContenter").show()};Mobi.screenCommitData=function(c,b,f,e,a){var d=jm.parseJSON(c);jm("#screenCommit").bind("click",function(){var p,l={};if(d.length>1){jm.each(d,function(t,v){var u=jm("#productScreenLibName").html();u=jm.decodeHtml(u);if(u==v.libName){l.lid=v.lid;p=v}})}else{l.lid=d[0].lid;p=d[0]}var r="?";var k="pr.jsp";if(b){k+=r+"groupId="+b;r="&"}if(f){k+=r+"desc="+f;r="&"}if(e){k+=r+"sortName="+e;r="&"}if(a){k+=r+"searchword="+a;r="&"}if(p){var j=[];var s=p.propList;for(var n=0;n/g,">").replace(/\/gi,"\\").replace(/'/gi,"'").replace(/"/gi,'"').replace(/\/gi,"\n").replace(/&/gi,"&")):j;jm("#productMallOptionPanel_mcs_"+e+" .productMallOptionContent").append(o);a=jm(".productMallOptionPanel");var m=jm(this).attr("id")||"";var l=false;var k={};var q="";var p="";var n={};jm.each(Mobi.showProductCacheList,function(r,s){if(s.id==m){l=true;k=s.pinfo;q=s.showOptionHtml;p=s.script;n=s.otherHtml;return false}});h();jm("#productMallOptionPanel_mcs_"+e).find(".productMallOptionPanel").hide();if(l){f(k,q,p,n)}else{jm.ajax({type:"POST",url:"ajax/product_h.jsp?cmd=getProductInfoAndDom",data:{pid:m,moduleId:e,mallShoppingOptions:c},error:function(){Mobi.ing(LS.systemError)},success:function(r){var u=jm.parseJSON(r);if(u.success){var w=u.pinfo;var v=u.showOptionHtml;var t=u.script;var s=u.otherHtml;Mobi.showProductCacheList.push({id:m,pinfo:w,showOptionHtml:v,script:t,otherHtml:s});f(w,v,t,s)}}})}return false});var h=Mobi.initWebPage({triggerId:"f"+e,panelId:"productMallOptionPanel_mcs_"+e,pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#productMallOptionPanel_mcs_"+e+" .productDetailClose.icon-Off",closeCallBack:function(){jm(".productMallOptionPanel .productMallOptionContentPanel").removeClass("mallThemeProductContentPanel");jm("#productMallOptionPanel_mcs_"+e+" .productMallOptionContent .productMallOptionHead").remove();jm("#productMallOptionPanel_mcs_"+e+" .productMallOptionContent .mallOptionAndNumBox").remove();jm("#productMallOptionPanel_mcs_"+e+" .productMallOptionContent .productMallShop").remove();jm("#productMallOptionPanel_mcs_"+e+" .productMallOptionContent .separatorLine").remove()}});function f(B,n,D,s){a=jm(".productMallOptionPanel");var u=B.id;a.attr("id","productMallOptionPanel"+u);var p=s.mallAmountHtml||"";var w=s.mallWeightHtml||"";var y=s.mallPriceHtml||"";var x=B.mallPrice;var o=x.toFixed(2);var k=o;var A="";var t="";if(c){var v=o;var C=o;var r=B.optionsAmountList||{};var q=r.d||[];jm.each(q,function(I,K){var J=K;var F=J.oPrice;if(F==null||F==""){return}var H=J.flag||0;if(H==0){return}var G=F||0;v=vG?C:G;v=parseFloat(v)||0;C=parseFloat(C)||0;if(v==C){o=v.toFixed(2)}else{o=v.toFixed(2)+"~"+C.toFixed(2);A=C.toFixed(2);t=v.toFixed(2);priceScope=v+"~"+C}})}if(t!=""||A!=""){var z=parseFloat(A)*b*0.01;var E=parseFloat(t)*b*0.01;k=E+"~"+z}jm("#choiceCurrency").text(d);jm("#mallPrice").text(k);a.find(".mallOptionImg").attr("src",B.picPath);a.find(".productMallAmount").html(p);a.find(".productMallWeight").html(w);a.find(".productDetailName").html("
    "+y);a.find(".productNameWrap").text(B.name);a.find(".J-op-box").html(n);jm("#g_increase").unbind("click.ic").bind("click.ic",function(){Mobi.decrease2(u)});jm("#g_decrease").unbind("click.dc").bind("click.dc",function(){Mobi.increase2(u)});var l=document.createElement("script");l.type="text/javascript";l.innerHTML=D;l.id="opScript_"+e;document.getElementById("productMallOptionPanel_mcs_"+e).appendChild(l);jm("#opScript_"+e).remove();jm("#productMallOptionPanel_mcs_"+e+" #productBuy").unbind("click.msc").bind("click.msc",function(){Mobi.mallBuy(u,0,1,e)});jm("#productMallOptionPanel_mcs_"+e+" .J_productImmediatelyBug").unbind("click.msc").bind("click.msc",function(){Mobi.mallBuy(u,1,1,e)});jm("#productMallOptionPanel_mcs_"+e).find(".productMallOptionPanel").show();if(Fai.top._templateFrameId>=2000||Fai.top._templateFrameId<3000){jm("#mallPrice").css({height:"",lineHeight:""})}var m=document.createElement("script");m.type="text/javascript";m.innerHTML='jm(window).bind("pageshow", function(){jm("#productNum").change();});';m.id="opScript2_"+e;document.getElementById("productMallOptionPanel_mcs_"+e).appendChild(m)}};Mobi.showMallCart=function(b,c){jm("#module"+c+" .J_fk-mallCart").bind("click",function(){if(b==jm(this).attr("id")&&jm("#module"+c).length!=0){d()}return false});var a="productMallOptionPanel"+b;var d=Mobi.initWebPage({triggerId:"f",panelId:a,pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#"+a+" .productDetailClose.icon-Off",closeCallBack:function(){jm(".productMallOptionPanel .productMallOptionContentPanel").removeClass("mallThemeProductContentPanel")}});jm("#"+a+" #productBuy").bind("click",function(){Mobi.mallBuy(b,0,1,c)});jm("#"+a+" .J_productImmediatelyBug").bind("click",function(){Mobi.mallBuy(b,1,1,c)})};Mobi.showFooterBox=function(){var a=jm("#webFooterBox");a.removeClass("webDetailPage");if(Fai.top._manageMode&&Fai.top._mobiFooterClose){jm("#webFooter").hide()}};Mobi.bookingPanelClickEvent=function(a,b){jm("#"+a).on("click",function(c){if(b==1){Mobi.logDog(200332,15)}else{if(b==2){Mobi.logDog(200332,16)}else{if(b==3){Mobi.logDog(200332,17)}}}jm("#bookingPanelTriggle").data("pid",jm(this).attr("_pid")).trigger("click");c.stopPropagation();c.preventDefault()})};Mobi.bookingBoxBind=function(b){triggerId="bookingPanelTriggle";jm("#"+triggerId).click(function(){if(b){Mobi.ing(LS.bookingSubmitFullTips)}});if(b){return}if(jm("#productBookingPanel").length>0){return}var c=[];c.push("");jm(c.join("")).insertAfter("#"+triggerId);var a={triggerId:triggerId,panelId:"productBookingPanel",callback:function(){Mobi.showBookingBox()},closeWebPage:"#productBookingPanel .g_close"};Mobi.initWebPage(a)};Mobi.showBookingBox=function(){var e=[],a=0,c="",d={},b={};e.push("pid="+a);e.push("&cmd=getPanelData");e.push("&_colId="+Fai.top._colId);e.push("&_extId="+Fai.top._extId);jm.ajax({type:"post",cache:false,url:"ajax/booking_h.jsp?"+e.join(""),error:function(){Mobi.ing(LS.systemError)},success:function(h){var f=jm.parseJSON(h);if(f.success){b=f.pageData;d=b.moduleInfo;Mobi.bookingBoxInit(b,d)}else{Mobi.ing("获取数据失败",false)}}})};Mobi.bookingBoxInit=function(b,h){var f=b.bookingOpen,d=b.moduleId;jm("#module"+d).remove();var c=[];c.push("
    ");if(f){var j=h.content.st;c.push("
    ");c.push("
    \n");jm.each(b.contentList,function(k,l){if(l.hide){return true}c.push(Mobi.genBookingInputStr(l,b,h))});if(b.validation){if(j==1){c.push("
    \n");c.push("
    验证码
    \n");c.push("
    \n");c.push("
    ");c.push("
    ");c.push("");c.push("");c.push("
    ");c.push("*");c.push("
    ");c.push("
    ")}else{c.push("
    ");c.push("
    验证码
    \n");c.push("
    ");c.push("");c.push("");c.push("
    ");c.push("*");c.push("
    ");c.push("
    ")}}c.push("
    ");c.push("
    ");if(!Fai.top._manageMode){c.push("
    ")}c.push("
    \n");c.push("
    \n");c.push("
    \n")}else{var e=b.bookingClosedTip;if(Fai.top._manageMode){e+=(","+b.pleaseClick+""+b.setUp+"")}c.push("
    "+e+"
    ")}c.push("
    ");var a=c.join("");jm("#productBookingPanel").append(a);Fai.top._bookingModuleTitle=h.content.mt;jm("#productBookingPanel .pageTitle").text(Fai.top._bookingModuleTitle);if(f){Mobi.bookingSubmitPanleEventInit(b)}if(Fai.top._manageMode){Mobi.initModuleLayer(d,b.itemList,[],b.canDesign)}};Mobi.mobiBookingSubmitAdd=function(b){if(Fai.top._manageMode){alert("当前为管理状态,提交无效。");return}var a=b.moduleId,d=b.moduleInfo,n=b.contentList,h=[],o=n,c=true,l=b.Def_LIMIT_INPUT_MAXLENTH,e=b.Def_LIMIT_TEXTAREA_MAXLEN,m=b.validation,j=jm("#M"+a+"siteFormValidateCode").val(),k=[];if(o.length<1){return false}jm.each(o,function(D,B){var y=B.id,J=B.name,z=B.must,t=B.type,F={};F.id=y,F.type=t;F.must=z;if(t==0){var H=jm.trim(jm("#M"+a+"siteFormInput"+y).val());if(z&&H==""){Mobi.ing(jm.format(LS.siteFormSubmitInputIsEmpty,jm.encodeHtml(J)));c=false;return false}if(H.length>l){Mobi.ing(jm.format(LS.siteFormSubmitInputMaxLength,jm.encodeHtml(J),l));c=false;return false}F.val=H}else{if(t==1){var p=jm.trim(jm("#M"+a+"siteFormTextArea"+y).val());if(z&&p==""){Mobi.ing(jm.format(LS.siteFormSubmitInputIsEmpty,jm.encodeHtml(J)));c=false;return false}if(p.length>e){Mobi.ing(jm.format(LS.siteFormSubmitInputMaxLength,jm.encodeHtml(J),e));c=false;return false}F.val=p}else{if(t==2){var v=document.querySelectorAll("input[name='M"+a+"siteFormRadioR"+y+"']:checked");if(z&&v.length==0){Mobi.ing(jm.format(LS.siteFormSubmitCheckIsEmpty,jm.encodeHtml(J)));c=false;return false}if(v.length>0){F.val=v[0].value}else{F.val=""}}else{if(t==3){var w=document.querySelectorAll("input[name='M"+a+"siteFormCheckboxR"+y+"']:checked");if(z&&w.length==0){Mobi.ing(jm.format(LS.siteFormSubmitCheckIsEmpty,jm.encodeHtml(J)));c=false;return false}var C=[];for(var D=0;D\n"}else{if(a==c.Def_ContentList_Type_MULTI_LINE){s="\n"}else{if(a==c.Def_ContentList_Type_RADIO){s+="
    ";s+="
    ";for(var o=0;o
    \n"}s+="
    ";s+="
    "}else{if(a==c.Def_ContentList_Type_MULTIPLECHOICE){s+="
    ";s+="
    ";for(var o=0;o
    \n"}s+="
    ";s+="
    "}else{if(a==c.Def_ContentList_Type_DROPDOWN){s+=""}else{if(a==c.Def_ContentList_Type_DESC){s+="
    "+jm.encodeHtml(d)+"
    \n";s+="
    "+jm.encodeHtml(f)+"
    \n"}else{if(a==c.Def_ContentList_Type_DATE){var q=t.dateSetting;var n=(q.type==undefined?0:q.type)==1;s+="
    \n";if(n){s+="
    \n"}}else{if(a==c.Def_ContentList_Type_FILE_UPLOAD){var k=c.isIE;s+="
    \n";s+="\n";if(k){s+="\n"}else{s+="\n"}s+="
    未选择文件
    \n";s+="
    \n";s+="
    \n"}else{if(a==c.Def_ContentList_Type_PHONE){s=""}else{if(a==c.Def_ContentList_Type_MAIL){s="\n"}else{if(a==c.Def_ContentList_Type_IDENTITY){s="\n"}else{if(a==c.Def_ContentList_Type_ADDRESS){s="\n"}}}}}}}}}}}}if(showType==1){if(a!=5){m+="
    \n";m+="
    "+jm.encodeHtml(u)+"
    \n";m+="
    \n";m+="
    \n";m+="
    "+s+((l&&a!=7)?"*":"")+"
    \n";m+="
    \n"}else{m+="
    \n";m+="
    "+s+"
    \n";m+="
    \n"}}else{m+="
    \n";if(a!=5){m+="
    "+jm.encodeHtml(u)+"
    \n";m+="
    "+s+(l?"*":"")+"
    \n"}else{m+="
    "+jm.encodeHtml(d)+"
    \n";m+="
    "+jm.encodeHtml(f)+"
    \n"}m+="
    \n";m+="\n"}return m};Mobi.bookingSubmitPanleEventInit=function(a){var b=a.moduleId;jm.each(a.contentList,function(j,h){if(h.hide){return true}var p=h.id,l=h.type;if(l==a.Def_ContentList_Type_DATE){var k=h.dateSetting;var o=(k.type==undefined?0:k.type)==1;Mobi.initmobiFormTimeBtn({moduleId:b,siteFormItemId:p,minDate:new Date(),yearChangeable:true,monthChangeable:true,swipeable:true,placeholder:LS.mallPleaseChoose,dateSetting:k});jm(""+LS.to+"\n").insertAfter("#module"+b+" #siteFormItem"+p+" .fk-dateInputMaskWrap")}else{if(l==a.Def_ContentList_Type_FILE_UPLOAD){if(Fai.top._manageMode){return true}var e=a.isIE;fileSize=(h.size>a.fileSizeLimit)?a.fileSizeLimit:h.size,fileTypeList=[];if(!h.isAllFile){var m=(h.dftl||"")+(h.cftl||"");var d=m.split(" ");jm.each(d,function(s,q){if(q.length>0){var r="*."+q+";";fileTypeList.push(r)}})}if(e){Mobi.siteFormFileUpload(srcjQuery,size,id,p,b,fileTypeList,srcUpload,"选择文件")}else{if(Fai.top._cid==11496535){Mobi.siteFormFileUploadHtml(p,b,fileTypeList,a.isOverLimit,a.updateUrlViewRes,a.mobiVer,fileSize,a.srcjQuery,a.srcUploadjQuery,"www.jihosen.icoc.me",LS.mobiFormSubmitFileUploadReSelect)}else{Mobi.siteFormFileUploadHtml(p,b,fileTypeList,a.isOverLimit,a.updateUrlViewRes,a.mobiVer,fileSize,a.srcjQuery,a.srcUploadjQuery,a.siteMainDomain,LS.mobiFormSubmitFileUploadReSelect)}}}else{if(l==a.Def_ContentList_Type_ADDRESS){var n,f=a.currentLcid;if(f==2052||f==1028){n=site_cityUtil.getProvince()}else{n=site_cityUtil.getProvinceEn()}var c=new MobileSelectArea();c.init({level:h.openMunicipalCode?3:2,lcid:f,trigger:"#M"+a.moduleId+"siteFormAddressInput"+p+"",value:jm("#M"+a.moduleId+"siteFormAddressInput"+p+"").data("value"),data:n,eventName:"click",init:0})}}}});jm("#module"+b+" .siteFormSend").bind("click",function(){Mobi.mobiBookingSubmitAdd(a)})};Mobi.fixPorductDetailStyle=function(b){var c=jm("#productNewDetailPanel"+b),a=c.find(".J_pricePlaceHolder"),e=c.find(".mallThemeProductWrap"),d=e.css("display")=="none";if(a.length>0&&d){a.addClass("fk-pricePlaceHolder")}};Mobi.initOnlineServiceWidth=function(){var a=jm("body");if(a.hasClass("mobiCol20")){if(Fai.top._isMobiMallOpen){jm("#webCustomerServiceBox").css("display","none");return}else{if(Fai.top._bookingOpen){jm("#webCustomerServiceBox").css("display","none");return}}}if(a.hasClass("mobiCol21")||a.hasClass("mobiCol28")||a.hasClass("mobiCol4")){if(Fai.top._newsCommentOpen){jm("#webCustomerServiceBox").css("display","none");return}}if(Fai.top.independentSetFooterBar){jm("#webCustomerServiceBox").css("display","none")}if(Fai.top._templateFrameId>=2000&&Fai.top._templateFrameId<3000){return}var c=Mobi.getPreviewObject("customerServiceDiv");if(!c){return}var b=c.querySelectorAll(".service").length;if(b===0){jm("#webCustomerServiceBox").css("opacity",0);Fai.top._openOnlineService=false;Fai.top._onlineServiceJson.open=false}else{jm("#webCustomerServiceBox").css("opacity",1);Fai.top._openOnlineService=true;Fai.top._onlineServiceJson.open=true}Mobi.allFixWXPA(1);jm("#customerServiceDiv .service").css("width",100/b+"%");jm("#customerServiceDiv .serviceClass_1").off("click.log").on("click.log",function(){Mobi.logDog(200171,2)});jm("#customerServiceDiv .serviceClass_5").off("click.log").on("click.log",function(){Mobi.logDog(200171,1)});jm("#customerServiceDiv .serviceClass_-1").off("click.log").on("click.log",function(){Mobi.logDog(200171,3)})};Mobi.showMapService=function(c){var a=Fai.top._onlineServiceJson.map,b=a.city+a.d_address,e=c?JSON.parse(c):c;if(e){var h=e.c,f=e.a;if(h&&jm.trim(h)!=""&&f&&jm.trim(f)!=""){b=h+f}}if(b==""){b="附近"}if(!b){alert("请填写正确的地址");if(Fai.top._manageMode){Fai.top.Mobi.getPreviewWindow().Mobi.onlineServiceClickCallBack(a.type,a.typeStr)}return false}var d="//map.baidu.com/mobile/webapp/search/search/qt=s&wd="+encodeURIComponent(b)+"&c=348&searchFlag=bigBox&version=5&exptype=dep/vt=map/?fromhash=1";jm("#webMapServiceBox").addClass("showMapService");jm("#mobiSearchMapFrame").attr("src",d);jm("#mobiSearchMapFrame").off("load.map").on("load.map",function(){Mobi.mobiHideScroll()})};Mobi.closeMapService=function(){Mobi.mobiShowScroll();jm("#webMapServiceBox").removeClass("showMapService")};Mobi.unloadForATag=function(){if(!jm.os.supportsTouch){jm("#g_body").delegate("#customerServiceDiv a","click",function(j){var h=j.target||j.srcElement;var f=h.parentNode.parentNode.parentNode;var b=Fai.top._onlineServiceJson,a;if(!f){return}var d=parseInt(f.getAttribute("id").substring(11));if(parseInt(d)===2||parseInt(d)===1){if(Fai.top._manageMode){for(var c in b){if(b[c].type==d){a=b[c];break}}}if(a.baseSetting.jumpCtrl){return false}if(!!a&&parseInt(d)==2&&a.number==""){alert("请输入接受信息的电话");Fai.top.Mobi.getPreviewWindow().Mobi.onlineServiceClickCallBack(d,a.typeStr)}else{if(!!a&&d==1&&!!a.phoneInfo&&a.phoneInfo[0].number==""){alert("请输入电话号码");Fai.top.Mobi.getPreviewWindow().Mobi.onlineServiceClickCallBack(d,a.typeStr)}else{alert("该功能无法在桌面浏览器中启动")}}return false}})}};Mobi.triggerServiceNumber=function(a,b){if(jm.os.supportsTouch){if(a==1){window.location.href="tel:"+b}else{if(a==2){window.location.href="sms:"+b}}}else{alert("该功能无法在桌面浏览器中启动")}};Mobi.showPhonesBg=function(){var a=jm(".J_showMorePhone");if(a.length<1){return}a.on("click.phone",function(b){Mobi.showJumpPhone()})};Mobi.showJumpPhone=function(){var a=Fai.top._onlineServiceJson.phone.phoneInfo;if(!a){return}if(a.length>=1){Mobi.mobiHideScroll();var L=document.body.clientHeight;var C=document.body.clientWidth;var e=document.getElementById("g_web");var A=document.createElement("div");var J=document.createElement("div");var w=document.createElement("div");var d=document.createElement("div");var t=document.createElement("div");A.id="phoneDiv";J.id="fullbg";w.id="tablesDiv";d.id="scrollTable";A.className="phoneDiv";w.className="tablesDiv";J.className="phoneFullBg";d.className="scrollTable";t.id="iScrollDiv";e.appendChild(A);var F=document.getElementById("phoneDiv");F.appendChild(J);F.appendChild(w);w.appendChild(d);var z=document.getElementById("fullbg");var c=document.getElementById("tablesDiv");var s=document.getElementById("scrollTable");s.appendChild(t);var G=document.getElementById("iScrollDiv");z.style.height=L+"px";z.style.width=C+"px";z.style.position="fixed";for(var H=0;H";var y=F.getElementsByClassName("fullTableDiv")[H].getElementsByTagName("a")[0];var I=document.createElement("div");I.id="tableDiv";I.className="tableBox tableDiv";y.appendChild(I);var n=document.getElementById("tableDiv");var r=document.createElement("div");var B=document.createElement("div");var h=document.createElement("div");var p=document.createElement("div");var u=document.createElement("div");var E=document.createElement("div");r.className="phoneName tableCell";r.id="phoneName"+M;B.className="phoneNumber tableCell";B.id="phoneNumber"+M;h.className="phoneOperation tableCell";h.id="phoneOperation"+M;p.id="phoneLine";p.className="phoneLine";E.id="phoneOperImg"+M;E.className="phoneOperImg";I.appendChild(r);I.appendChild(B);I.appendChild(h);G.appendChild(p);h.appendChild(E);var l=document.getElementById("phoneName"+M);var b=document.getElementById("phoneNumber"+M);var q=document.getElementById("phoneOperation"+M);var K=document.getElementById("phoneOperImg");var o=document.createTextNode(f);l.appendChild(o);b.innerHTML=O;if(!jm.os.supportsTouch){y.onclick=function(){alert("该功能无法在桌面浏览器中启动")}}}var x=document.createElement("div");var D=document.createElement("div");x.id="pCancle";x.className="pCancle";D.id="phoneCancle";D.className="phoneCancle";c.appendChild(x);x.appendChild(D);var k=document.getElementById("phoneCancle");k.innerHTML=LS.cancel;var N=document.documentElement.clientHeight-k.offsetHeight;var v=s.offsetHeight;if(v>N){d.style.height=(document.documentElement.clientHeight-k.offsetHeight)+"px"}if(Mobi.deviceTypeIsMobi()){new iScroll("scrollTable")}setTimeout("tablesDiv.style.cssText = 'bottom: 0; ';",10);setTimeout(function(){z.style.opacity="0.3"},10);z.onclick=function(){var P=document.getElementById("phoneDiv");c.style.cssText="bottom: -100%";z.style.opacity="0";Mobi.mobiShowScroll();setTimeout(function(){P.parentNode.removeChild(P)},100)};k.onclick=function(){var P=document.getElementById("phoneDiv");c.style.cssText="bottom: -100%";z.style.opacity="0";Mobi.mobiShowScroll();setTimeout(function(){P.parentNode.removeChild(P)},100)}}};Mobi.showQqBg=function(){var a=jm(".J_showMoreQq");if(a.length<1){return}a.on("click.qq",function(b){Mobi.showMoreQQ()})};Mobi.showMoreQQ=function(){var b=Fai.top._onlineServiceJson.tcInfo||Fai.top._onlineServiceJson.qq.qqInfo,h=5;if(b.length>=1){Mobi.mobiHideScroll();var K=document.body.clientHeight;var B=document.body.clientWidth;var f=document.getElementById("g_web");var z=document.createElement("div");var J=document.createElement("div");var v=document.createElement("div");var d=document.createElement("div");z.id="qqDiv";J.id="fullbg";v.id="tablesDiv";d.id="scrollTable";z.className="qqDiv";v.className="tablesDiv";J.className="qqFullBg";d.className="scrollTable";f.appendChild(z);var E=document.getElementById("qqDiv");E.appendChild(J);E.appendChild(v);v.appendChild(d);var y=document.getElementById("fullbg");var c=document.getElementById("tablesDiv");var r=document.getElementById("scrollTable");y.style.height=K+"px";y.style.width=B+"px";y.style.position="fixed";for(var H=0;H";var x=document.getElementById("numberHref_"+h+L);var I=document.createElement("div");I.id="tableDiv";I.className="tableBox tableDiv";x.appendChild(I);var o=document.getElementById("tableDiv");var e=document.createElement("div");var A=document.createElement("div");var q=document.createElement("div");var a=document.createElement("div");var C=document.createElement("div");var G=document.createElement("div");e.className="qqName tableCell";e.id="qqName"+L;A.className="qqNumber tableCell";A.id="qqNumber"+L;q.className="qqOperation tableCell";q.id="qqOperation"+L;a.id="qqLine";a.className="qqLine";G.id="qqOperImg"+L;G.className="qqOperImg";I.appendChild(e);I.appendChild(A);I.appendChild(q);r.appendChild(a);q.appendChild(G);var s=document.getElementById("qqName"+L);var t=document.getElementById("qqNumber"+L);var F=document.getElementById("qqOperation"+L);var k=document.getElementById("qqOperImg");var p=document.createTextNode(j);s.appendChild(p);t.innerHTML=N}var w=document.createElement("div");var D=document.createElement("div");w.id="qCancle";w.className="qCancle";D.id="qqCancle";D.className="qqCancle";c.appendChild(w);w.appendChild(D);var m=document.getElementById("qqCancle");m.innerHTML=LS.cancel;var M=document.documentElement.clientHeight-m.offsetHeight;var u=r.offsetHeight;if(u>M){d.style.height=(document.documentElement.clientHeight-m.offsetHeight)+"px"}setTimeout("tablesDiv.style.cssText = 'bottom: 0; ';",10);setTimeout(function(){y.style.opacity="0.3"},10);y.onclick=function(){var O=document.getElementById("qqDiv");c.style.cssText="bottom: -100%";y.style.opacity="0";Mobi.mobiShowScroll();setTimeout(function(){O.parentNode.removeChild(O)},100)};m.onclick=function(){var O=document.getElementById("qqDiv");c.style.cssText="bottom: -100%";y.style.opacity="0";Mobi.mobiShowScroll();setTimeout(function(){O.parentNode.removeChild(O)},100)}}};Mobi.bindServiceBtnEvent=function(){var a=jm(".serviceBtn");if(a.length<1){return}a.off("click.ser").on("click.ser",function(){Mobi.createMallServicePanel()});a.on("mouseover",function(){var b=[{text:"编辑客服",display:"text",className:"edit",evalScript:"Mobi.getPreviewWindow().Mobi.setServiceTool();"}];if(Fai.top._manageMode){Mobi.addModuleLayer(jm(this).attr("id"),b,4,true)}});a.on("mouseout",function(){if(Fai.top._manageMode){Mobi.removeModuleLayer(jm(this).attr("id"))}})};Mobi.createMallServicePanel=function(){if(Fai.top._mallService==2){Mobi.mallServiceList()}else{Mobi.notMallServiceList()}};Mobi.mallServiceList=function(){var c=Fai.top._serviceList;var a=[];var p;$(c).each(function(l,r){if(r.showType==true){a.push(r)}});if(a.length==1){p=a[0];if(p.serviceType==0){window.open("http://wpa.qq.com/msgrd?v=3&uin="+p.serviceAccount+"&site=qq&menu=yes")}else{if(p.serviceType==1){Mobi.showWeChatService(p.code)}else{if(p.serviceType==2){Mobi.showBaiduBridge()}else{if(Mobi.isPC()){alert("该功能无法在桌面浏览器中启动!");return}window.location.href="tel:"+p.serviceAccount}}}return}var n="
    ",j,e,q,d="",o="",b="",h,m,f;n+=""}else{if(q.serviceType==1){n+=""}else{if(q.serviceType==2){n+=""}else{n+=""}}}}}n+="
    "+LS.cancel+"
    ";n+="
    ";jm(n).appendTo(jm("body"));jm(".serviceFullBg, .cancleSer").off("click.ser").on("click.ser",function(){$(window).off("scroll");jm(".serviceFullBg").remove();jm(".serviceSettingEntrance").remove();jm(".serviceListPanel").remove();if(Fai.top._manageMode){Mobi.removeEditLayer($(".serviceListPanel"))}});jm(".serviceListPanel .qqServiceLine").off("click.log").on("click.log",function(l){Mobi.logDog(200171,1)});jm(".serviceListPanel .baiduBridgeServiceLine").off("click.log").on("click.log",function(l){Mobi.logDog(200171,3)});jm(".serviceListPanel .phoneServiceLine").off("click.log").on("click.log",function(l){Mobi.logDog(200171,2)});if(Mobi.isPC()){jm(".phoneServiceLine").off("click.ser").on("click.ser",function(){alert("该功能无法在桌面浏览器中启动!");return})}var k=$(window).scrollTop();Mobi.banScroll(k)};Mobi.banScroll=function(a){$(window).scroll(function(){$(window).scrollTop(a)})};Mobi.notMallServiceList=function(){var p=Fai.top._onlineServiceJson.phone,m=Fai.top._onlineServiceJson.qq;var o=p&&p.phoneInfo&&p.phoneInfo.length>0,k=m&&m.qqInfo&&m.qqInfo.length>0;if(!o&&!k&&!p.open&&!m.open){return}var n="
    ",f,c,r,b="",q="",a="",e,j,d;n+="
    ";if(o&&p.open){b=p.baseSetting.classname;e=p.baseSetting.colIconCusType;j=p.baseSetting.colIconType;if(j!=2){b=p.baseSetting.classname+" icon-phoneServiceIcon"}else{d=p.baseSetting.iconFilePath;a="background-image:url("+d+");"}q=p.baseSetting.color?("background-color:"+p.baseSetting.color+";"):"";for(f=0,c=p.phoneInfo.length;f";n+="";n+="
    ";n+="
    "+r.name+"
    ";n+="
    "+r.number+"
    ";n+="
    ";n+="
    "}}b="";e=1;j=0;b="";d="";a="";q="";if(k&&m.open){b=m.baseSetting.classname;e=m.baseSetting.colIconCusType;j=m.baseSetting.colIconType;if(j!=2){b=m.baseSetting.classname+" icon-qqServiceIcon"}else{d=m.baseSetting.iconFilePath;a="background-image:url("+d+");"}q=m.baseSetting.color?("background-color:"+p.baseSetting.color+";"):"";for(f=0,c=m.qqInfo.length;f";n+="";n+="
    ";n+="
    "+r.name+"
    ";n+="
    "+r.number+"
    ";n+="
    ";n+="
    "}}n+="
    "+LS.cancel+"
    ";n+="";jm(n).appendTo(jm("body"));jm(".serviceFullBg, .cancleSer").off("click.ser").on("click.ser",function(){$(window).off("scroll");jm(".serviceFullBg").remove();jm(".serviceSettingEntrance").remove();jm(".serviceListPanel").remove();if(Fai.top._manageMode){Mobi.removeEditLayer($(".serviceListPanel"))}});if(Mobi.isPC()){jm(".phoneServiceLine").off("click.ser").on("click.ser",function(){alert("该功能无法在桌面浏览器中启动!");return})}$(".serviceListPanel").mouseover(function(){var l=[{text:"编辑客服",display:"text",className:"edit",evalScript:"Mobi.getPreviewWindow().Mobi.setServiceTool();"}];if(Fai.top._manageMode){Mobi.addModuleLayer($(this).attr("id"),l,-1,true)}});$(".serviceListPanel").mouseout(function(){if(Fai.top._manageMode){Mobi.removeModuleLayer($(this).attr("id"))}});var h=$(window).scrollTop();Mobi.banScroll(h)};Mobi.setServiceTool=function(){top.Fai.popupWindowVersionTwo.createPopupWindow({title:"设置客服",frameSrcUrl:"mobiServiceOnline.jsp",width:750,height:600,version:2,closeFunc:a});Mobi.logDog(200166,2);function a(){jm(".serviceFullBg").remove();jm(".serviceSettingEntrance").remove();jm(".serviceListPanel").remove();$(window).off("scroll")}};Mobi.unLoadForWechat=function(){var e=document.querySelector("#customerServiceDiv");if(!e){return}var b=e.querySelectorAll("a"),c=false;for(var d=0,a=b.length;d";o+="
    ";o+="
    ";o+="
    ";o+="
    ";o+="
    ";o+="
    ";o+="
    ";o+="

    微信暂不支持发送邮件功能

    ";o+="

    请到浏览器打开!

    ";o+="
    ";o+="";jm(o).appendTo(jm("body"));r=document;s=r.querySelector(".fk-unloadForWechatBg");p=s.querySelector(".fk-unloadForWechat");q=p.querySelector(".f-cross");p.querySelector(".f-tipImg").style.transform="scale("+k+", "+k+") ";q.style.transform="scale("+k+", "+k+")";p.style.top=(m.screen.availHeight-p.clientWidth)/2-60+"px";p.style.left=(m.screen.availWidth-p.clientWidth)/2+"px";q.onclick=j}else{s.style.display="block";p.style.display="block";q.onclick=j}function j(){s.style.display="none";p.style.display="none";s=null;p=null;l.ontouchmove=null;l=null;q.onclick=null;q=null}}}}};Mobi.isOpenBaiduBridge=function(){var c=Fai.top.Mobi.getPreviewWindow()._hmt;var a=false;if(typeof(c)!="undefined"){var b=c.id;if(typeof(b)!="undefined"){a=true}}return a};Mobi.showBaiduBridge=function(){if(Mobi.isOpenBaiduBridge()){Mobi.showBaiduBridgeV2()}else{if(Fai.top._manageMode){var a=[];if(Fai.top._oem){a.push("
    开启该功能需先接入百度商桥 接入教程
    ")}else{a.push("
    开启该功能需先接入百度商桥 接入教程
    ")}var b=Fai.top.Fai.popupWindow({title:"温馨提示",divContent:a,width:374,height:88});var c=function(){Fai.top.Fai.closePopupWindow(b)};Fai.top.Fai.addPopupWindowBtn(b,{id:"save",text:"知道了",extClass:"saveButton",click:c})}else{alert("未接入百度商桥")}}};Mobi.showBaiduBridgeV2=function(){jm("ins#newBridge").show();jm("ins#newBridge").find("#nbWebImLightContainer").hide();jm("ins#newBridge").find("#nb_icon_wrap").hide();jm("ins#newBridge").find("#nb_nodeboard").hide();jm("ins#newBridge").off("click","#nb_icon_wrap").on("click","#nb_icon_wrap",function(){jm("ins#newBridge").find("#nbWebImLightContainer").show()});if(jm("ins#newBridge").find("#nbWebImLightContainer").length>0){jm("ins#newBridge").find("#nb_invite_wrap").remove()}else{jm("ins#newBridge").find("#nb_invite_wrap").show()}Fai.top.Mobi.getPreviewWindow().jm("#nb_icon_wrap").click();jm("ins#newBridge").off("click","#nbwlToggle").on("click","#nbwlToggle",function(){jm("ins#newBridge").hide()});jm("ins#newBridge").off("click","#nb_nodeboard_close").on("click","#nb_nodeboard_close",function(){jm("ins#newBridge").hide()});jm("ins#newBridge").off("click","#sucess_close").on("click","#sucess_close",function(){jm("ins#newBridge").hide()})};Mobi.showWeChatService=function(c){var b;if(Fai.top._manageMode&&top.Mobi.checkSaveBar()){return false}if(Mobi.isWechat()){b=LS.weChatCodeTip}else{b=LS.scanWeChatCodeTip}var a="";a+="
    ";a+="
    ";a+="
    ";a+="
    ";a+="
    ";a+="";a+=""+b+"";a+="
    ";jm("#g_web").append(a);jm("html,body").css("overflow","hidden");jm("html,body").css("height","100%");jm("#g_web").on("touchmove",function(d){d.preventDefault()});jm("#g_web").find(".weChatCodeBg, .weChatCodeFont").click(function(){jm("#g_web").find(".weChatCodeBg").hide();jm("#g_web").find(".weChatCodePanel").hide();jm("html,body").css("overflow","");jm("#g_web").off("touchmove")})};Mobi.initLocater=function(){var b=jm("#multiLanguageCtrl ");if(!b){return false}else{var h=jm("#lanSelect .lanContainer").find("div[currentlan]"),a=h.length===1?jm(h[0]).text():jm(h[1]).text(),e=h.length===1?jm(h[0]).attr("currentlan"):jm(h[1]).attr("currentlan");h.hide();jm(b).addClass("Icon"+e);jm("#lanSelected").addClass("Icon"+e);b.find(".lanTitle").eq(0).text(a);jm("#lanSelected").find(".lanTitle").eq(0).text(a);jm(".lanItem ").click(function(j){if(jm("#lanSelect").length<1||parseInt(jm("#lanSelect").height())==0){return}j.stopPropagation();document.location.href=jm(this).attr("value")});jm(document).unbind("click").bind("click",function(k){var j=k.target||k.srcElement;if(j.id==="multiLanguageCtrl"){return}var l=jm(j);if(l.closest("#lanSelect").length==0){Mobi.closeLanSelect()}if(!(navigator.userAgent.toLowerCase().indexOf("sogoumobilebrowser")>-1)){k.stopPropagation()}});jm("#lanSelect .lanContainer").height(0);var f=Mobi.getUrlParam(Mobi.getPreviewWindow().location.href,"returnUrl");if(!f){f=Mobi.getPreviewWindow().location.pathname+Mobi.getPreviewWindow().location.search}f=jm.encodeUrl(f);var c=jm("#topBarMemberSignup").attr("href");jm("#topBarMemberSignup").attr("href",c+f);var d=jm("#topBarMemberName").attr("href");jm("#topBarMemberName").attr("href",d+f)}};Mobi.languageCtrl=function(){var b=function(d){if(parseInt(jm("#lanSelect").height())>0){Mobi.closeLanSelect()}else{if(Fai.top._manageMode){Mobi.removeAllEditLayer()}Mobi.openLanSelect()}d.stopPropagation();return false};var a=Mobi.getTransitionEndEventName(),c="";if(Fai.top._manageMode){setTimeout(function(){$(Mobi.getPreviewObject("multiLanguageCtrl")).unbind("click").bind("click",b);$(Mobi.getPreviewObject("lanSelected")).unbind("click").bind("click",b)},2000);c=Mobi.getPreviewObject("lanSelect")}else{jm("#multiLanguageCtrl").unbind("click").bind("click",b);jm("#lanSelected").unbind("click").bind("click",b);c=document.getElementById("lanSelect")}};Mobi.closeLanSelect=function(){if(jm("#lanSelect").length<1||parseInt(jm("#lanSelect").height())==0){return}if(jm("#bgm_icon").length>0&&jm("#bgm_icon").hasClass("bgm_rightUp")){jm("#bgm_icon").css("visibility","visible")}jm("#lanSelect").height(0);jm("#lanSelect").css("opacity",0.3);jm("#lanSelect .lanContainer").height(0);if(Fai.top._manageMode){jm("#lanFixed").remove()}};Mobi.openLanSelect=function(){if(jm("#lanSelect").length<1||parseInt(jm("#lanSelect").height())>0){return}if(jm("#bgm_icon").length>0&&jm("#bgm_icon").hasClass("bgm_rightUp")){jm("#bgm_icon").css("visibility","hidden")}jm("#lanSelect .lanContainer").height("");var b=parseFloat(jm("#lanSelected").height())+parseFloat(jm("#lanSelect .lanContainer").height());var a=jm(".multiLanguageCtrl ").css("margin-top");if(a.indexOf("px")>0){a=parseFloat(a.substr(0,a.length-2))}else{a=parseFloat(a)}b=b+a;jm("#lanSelect").height(b+"px");jm("#lanSelect").css("opacity",1);if(Fai.top._manageMode){jm("#webMultilingualArea").append("
    ")}};Mobi.removeLanSelectFlag=function(){jm("#lanSelect").removeClass("lanDisabled")};Mobi.addLanSelectFlag=function(){jm("#lanSelect").addClass("lanDisabled")};Mobi.initFooterLanguageEvent=function(){if(Fai.top.templateFrameId<2000||Fai.top.templateFrameId>=3000){return}var e=jm("#footer"),d=e.find(".languageVis"),a=e.find(".languageFullBg"),c=e.find(".languageListPanel");if(e.find(".langItem").length==1){e.find(".footLanguageItem").hide()}d.off("click.lang").on("click.lang",function(){a.show();c.addClass("langPanelUp")});a.off("click.lang").on("click.lang",function(){jm(this).hide();c.removeClass("langPanelUp")});var b=e.find(".langItem[currentlan='"+Fai.top._lcid+"']").text();e.find(".languageVis").eq(0).text(Fai.top._lcid==2052?"中文版":b);jm(".langItem").click(function(f){f.stopPropagation();document.location.href=jm(this).attr("value")})};Mobi.initFooterStyle=function(b){var a=jm("#footer");var e=b.rt.c,f=b.rt.s,d=a.find(".technicalSupport"),c=d.find("a"),h=d.eq(1).find(".footerSep");linkFontColor=b.gt.c,linkFontSize=b.gt.s;if(b.fb.y==0){Mobi.removeCtrlStyleCssList("fixedAreaBoxStyle","",[{cls:"#footer",key:"background"}])}else{if(b.fb.y==2){refreshFooterBg(b)}else{Mobi.setCtrlStyleCssList("fixedAreaBoxStyle","",[{cls:"#footer",key:"background",value:"none"}])}}if(b.rt.y==0){d.css({color:"#999",fontSize:"0.6rem"})}else{d.css({color:e,fontSize:f+"px"})}if(b.gt.y==0){h.css({color:"#999",fontSize:"0.6rem"});c.css({color:"#999",fontSize:"0.6rem"})}else{h.css({color:linkFontColor,fontSize:linkFontSize+"px"});c.css({color:linkFontColor,fontSize:linkFontSize+"px"})}};function refreshFooterBg(a){var c=a.fb.r;var b="";b+=a.fb.c;var e=a.fb.p;if(e){if(c!=-1){var d="";if(c==0||c==6||c==7||c==8||c==9||c==13||c==14||c==15||c==16){d="no-repeat"}if(c==1||c==11||c==12){d="repeat-x"}if(c==2||c==21||c==22){d="repeat-y"}if(c==3){d="repeat"}if(c==4||c==5){d="repeat"}var f="center";if(c==9||c==12){f="bottom"}if(c==6||c==21){f="left"}if(c==7||c==22){f="right"}if(c==4||c==5||c==8||c==11){f="top"}if(c==13){f="left top"}if(c==14){f="right top"}if(c==15){f="left bottom"}if(c==16){f="right bottom"}b+=" url("+e+") "+d+" "+f}}Mobi.setFooterBg(b,a)}Mobi.setFooterBg=function(c,b){var f=b,e="",d=false;var a=jm("#footer");if(f.fb.r==4){e="100% 100%";d=true}else{if(f.fb.r==5){e="100%";d=true}}a.css("background",c);if(d){a.css("background-size",e)}};Mobi.decrease=function(b){var a=parseInt(jm("#productNum").val());if(isNaN(a)){a=1}if(a>99999998){a=99999998}if(a<0){a=0}if(a+1>1){jm("#g_decrease").removeClass("g_opacity50")}jm("#productNum").val(a+1)};Mobi.increase=function(b){var a=parseInt(jm("#productNum").val());if(isNaN(a)){a=1}if(a<2){a=2}if((a-1)===1){jm("#g_decrease").addClass("g_opacity50")}jm("#productNum").val(a-1)};Mobi.decrease2=function(b){var a=parseInt(jm("#productMallOptionPanel"+b+" #productNum").val());if(isNaN(a)){a=1}if(a>99999998){a=99999998}if(a<0){a=0}if(a+1>1){jm("#productMallOptionPanel"+b+" #g_decrease").removeClass("g_opacity50")}jm("#productMallOptionPanel"+b+" #productNum").val(a+1)};Mobi.increase2=function(b){var a=parseInt(jm("#productMallOptionPanel"+b+" #productNum").val());if(isNaN(a)){a=1}if(a<2){a=2}if((a-1)===1){jm("#productMallOptionPanel"+b+" #g_decrease").addClass("g_opacity50")}jm("#productMallOptionPanel"+b+" #productNum").val(a-1)};Mobi.removeMallTIps=function(){jm("#mallBuyTips").remove();jm(".productDetailClose").each(function(){jm(this).click()});document.getElementById("webLoading").style.display="none"};Mobi.MallAjaxErrno={ok:0,error:1,manager:2,login:3,idNotExist:4,orderSettle:5,noMall:6,toProductDetail:7,orderNotExist:8,networkError:9,outOfMallAmount:10,mallAmountZero:11,mallOptionStop:12,OutOfAllowAmount:13,notAdded:14,payDomainError:15,couponNotFound:16,couponUnavail:17,couponOverTime:18,authMemberNotAllow:19};Mobi.returnMallErrorMsg=function(a){var b;switch(parseInt(a)){case Mobi.MallAjaxErrno.error:Mobi.ing(LS.mallAjaxErrno_error);break;case Mobi.MallAjaxErrno.manager:Mobi.showMallTips(LS.mallAjaxErrno_manager);break;case Mobi.MallAjaxErrno.login:goToMallCartUrl="login.jsp?returnUrl="+jm.encodeUrl(jm.getUrlRoot(location.href))+"&errno=11";location.href=goToMallCartUrl;break;case Mobi.MallAjaxErrno.idNotExist:Mobi.ing(LS.mallAjaxErrno_idNotExist);break;case Mobi.MallAjaxErrno.orderSettle:Mobi.ing(LS.mallAjaxErrno_orderSettle);break;case Mobi.MallAjaxErrno.noMall:Mobi.ing(LS.mallAjaxErrno_noMall);break;case Mobi.MallAjaxErrno.orderNotExist:Mobi.ing(LS.mallAjaxErrno_orderNotExist);break;case Mobi.MallAjaxErrno.networkError:Mobi.ing(LS.networkError);break;case Mobi.MallAjaxErrno.outOfMallAmount:Mobi.ing(LS.mallAmountOverFlow);break;case Mobi.MallAjaxErrno.mallAmountZero:case -11:Mobi.ing(LS.mallAmountZero);break;case Mobi.MallAjaxErrno.mallOptionStop:Mobi.ing(LS.mallOptionStop);break;case Mobi.MallAjaxErrno.OutOfAllowAmount:Mobi.ing(LS.allowAmountOverFlow);break;case Mobi.MallAjaxErrno.notAdded:Mobi.ing(LS.mallProductNotAdded);break;default:Mobi.ing(LS.systemError);location.reload()}};Mobi.initOptionsStr=function(b,a){if(typeof a!="number"){a=""}Mobi.optionsStr["oldOptionsStr"+a]=b};Mobi.optionsStr={};Mobi.mallBuying={};Mobi.mallBuy=function(u,r,b,A,a,h,d){d=d||{};var s=d.isGroupBuy||false;var p=d.groupBuyId||0;var q=d.groupBuyDetailId||0;if(typeof(Mobi.mallBuying[u])=="undefined"){Mobi.mallBuying[u]=false}var o=false;jm.each(Mobi.mallBuying,function(D,j){if(j){o=true;return false}});if(o){return}Mobi.mallBuying[u]=true;jm("#productNum").change();var t="id="+u+"&fromDetail=true",z=[],x=jm(".J-op"),n=true;if(b==1){x=jm("#productMallOptionPanel"+u+"[moduleId='"+A+"'] .J-op")}var e=false;if(!!a){t+="&optionList="+jm.encodeUrl(jm.toJSON(a))}else{jm(x).each(function(){if(e){return}var G=jm(this),D=G.attr("option_name"),F=G.attr("data"),E=G.attr("type"),j=G.attr("option_data");if(j){var H={};H.name=F;H.value=parseInt(j);if(E!=null){H.name=F.replace(/^opIndept/,"");H.type=parseInt(E)}z.push(H);e=false}else{Mobi.ing(jm.format(LS.mallCartChoiceItemError,jm.encodeHtml(D)));e=true;n=false;return false}});var B="oldOptionsStr";if(b==1){B+=u}if(Mobi.optionsStr[B]!="null"&&Mobi.optionsStr[B]){var l=Mobi.optionsStr[B].split("_"),C=[];for(var w=0;w0){t+="&optionList="+jm.encodeUrl(jm.toJSON(z))}}var c=jm("#productNum");if(jm("#productMallOptionPanel"+u+" #productNum").length!=0){c=jm("#productMallOptionPanel"+u+" #productNum")}var k=c.val(),m=1;if(jm.isInteger(k)){m=parseInt(k)}if(m<1){m=1}else{if(m>9999999){m=9999999}}c.val(m);if(!!h){m=h}t+="&amount="+m;var f="addCartItem";if(r===1){var y={pid:u,amount:m,optList:jm.toJSON(a),isGroupBuy:s};if(y.optList==null||y.optList.length==0||!y.optList||y.optList=="null"){y.optList=jm.toJSON(z)}f="addIme";t+="&codata="+jm.toJSON(y)}jm.ajax({type:"post",url:"ajax/order_h.jsp?cmd="+f,data:t,error:function(){Mobi.ing(LS.systemError);Mobi.mallBuying[u]=false},success:function(j){var G=jm.parseJSON(j);if(G.success){if(r===1){var F="";if(s){F+="&isGroupBuy="+s;F+="&groupBuyId="+p;F+="&groupBuyDetailId="+q;Mobi.logDog(200479,0)}if(window.self!=window.top&&/(iPhone|iPad|iPod|safari)/i.test(navigator.userAgent.toLowerCase())){location.href="mstl.jsp?immeData="+jm.encodeUrl(jm.toJSON(y))+F}else{location.href="mstl.jsp?imme"+F}}else{Mobi.showMallTips(LS.mallAddSuc)}Mobi.refreshMallCartNum();Mobi.mallBuying[u]=false}else{if(G.rt==Mobi.MallAjaxErrno.authMemberNotAllow){Mobi.ing(G.data+LS.authLevelBuy)}else{if(G.rt==Mobi.MallAjaxErrno.login){var D={};D.buyType=r;D.productId=u;D.entry=b;D.moduleId=A;D.option=jm.toJSON(z);D.count=m;D.options=d;localStorage.setItem("mallBuyCallBack",jm.toJSON(D));var E="login.jsp?returnUrl="+jm.encodeUrl(jm.getUrlRoot(location.href))+"&errno=11";location.href=E}else{Mobi.returnMallErrorMsg(G.rt)}}Mobi.mallBuying[u]=false}}})};Mobi.initBuyNumber=function(e,c,a,d){jm(".mall_product").eq(0).css("border-top","1px solid #fff");var b=jm(".itemLine"+e);if(c==a){b.find(".icon-minisIcon").addClass("g_opacity50")}if(c==d){b.find(".icon-plusIcon").addClass("g_opacity50")}};Mobi.ajaxChangeAmount=function(b,a,c){jm.ajax({type:"post",url:"ajax/order_h.jsp?cmd=setItem&orderId="+a,data:"itemId="+c+"&amount="+b,error:function(){Mobi.ing(LS.mallCartUpdateError)},success:function(d){var d=jm.parseJSON(d);if(d.success){Mobi.setAcSaleList(c,b);Mobi.reCtOrderMoney();return true}else{if(d.rt==-3){Mobi.ing(LS.mallCartUpdateNotFound)}else{if(d.rt==-9){Mobi.ing(LS.mallCartUpdateStatusError)}else{Mobi.ing(LS.mallCartUpdateError)}}return false}}})};Mobi.mallCartAmountChange=function(a,c,j,h,l,b,k){var m=jm(".itemLine"+a);var d=m.find(".buyNumber");var f=d.val();var e=1;if(jm.isInteger(f)){e=parseInt(f)}if(el||e==l)&&l!=0){e=l;Mobi.ing(LS.mallAmountOverFlow,true);m.find(".icon-plusIcon").addClass("g_opacity50");m.find(".icon-minisIcon").removeClass("g_opacity50")}else{if(e>b&&k){e=b;m.find(".icon-plusIcon").addClass("g_opacity50");m.find(".icon-minisIcon").removeClass("g_opacity50")}else{if(e>9999998){e=9999999}}}}if(isNaN(e)||e<=0||e>9999999){Mobi.ing(LS.mallCartAmountError);return}Mobi.ajaxChangeAmount(e,c,j);d.val(e);if(e>1){m.find(".icon-minisIcon").removeAttr("disabled")}else{m.find(".icon-minisIcon").attr("disabled","true")}};Mobi.mallCartAmountPlus=function(a,b,d,k,j,o,c,l){if(jm(a).attr("disabled")!="true"){var n=jm(".itemLine"+b);var e=n.find(".buyNumber");var h=e.val();if(jm.isInteger(h)){h=parseInt(h)+1}if(h<2){h=1}else{if((h>o||h==o)&&o!=0){h=o;n.find(".icon-plusIcon").addClass("g_opacity50 ");if(j!=o){n.find(".icon-minisIcon").removeClass("g_opacity50")}}else{if(l&&(h>c)){h=c;Mobi.ing(LS.mallAmountOverFlow,true);n.find(".icon-plusIcon").addClass("g_opacity50 ");if(j!=c){n.find(".icon-minisIcon").removeClass("g_opacity50")}}else{if(h>9999998){h=9999999}}}}if(h>j){n.find(".icon-minisIcon").removeClass("g_opacity50")}if(isNaN(h)||h<=0||h>9999999){Mobi.ing(LS.mallCartAmountError);return}Mobi.ajaxChangeAmount(h,d,k);e.val(h);var m=LS.pay;var f=Mobi.countSelectNum();if(jm(".J_select").length!=0){jm(".cartSettle").val(m+"("+f+")")}if(h>1){n.find(".icon-minisIcon").removeAttr("disabled")}else{n.find(".icon-minisIcon").attr("disabled","true")}}else{return}};Mobi.mallCartAmountMinis=function(a,b,c,j,h,l){var m=jm(".itemLine"+b);var d=m.find(".buyNumber");var f=d.val();if(jm.isInteger(f)){f=parseInt(f)-1}if(f==0){return}else{m.find(".icon-plusIcon").removeClass("g_opacity50");if(f9999998){f=9999999}}}if(f9999999){Mobi.ing(LS.mallCartAmountError);return}Mobi.ajaxChangeAmount(f,c,j);d.val(f);var k=LS.pay;var e=Mobi.countSelectNum();if(jm(".J_select").length!=0){jm(".cartSettle").val(k+"("+e+")")}if(f>1){m.find(".icon-minisIcon").removeAttr("disabled")}else{m.find(".icon-minisIcon").attr("disabled","true")}}};Mobi.acSaleProShowList={};Mobi.initAcSaleList=function(a){Mobi.acSaleProShowList=jm.parseJSON(a)};Mobi.removeAcSaleList=function(h){if(isNaN(h)){return}var a=Mobi.acSaleProShowList;if(a.length<=0){return}var b=false;for(var d=0;d=n.m){p=n.n}});b+=p}else{if(j.saleType==2&&j.other.ruleData.s=="2"){if(jm.inArray(j.id,a)<0){var e=0;a.push(f);jm(".J_select[promotionid='"+f+"']").each(function(v,y){var x=jm(this).find(".buyNumber").val()||1;var u=jm(this).find(".mall_product").attr("price")||0;var w=parseInt(x)*parseFloat(u);e+=w});var s=0;var h=0;for(var l=0;l=r){if(r>s){s=r;h=d}}}b+=h}}}}});return b};Mobi.checkSaleProVal=function(a){if(typeof(a.other)!="undefined"){if(typeof(a.other.ruleData)!="undefined"){if(typeof(a.other.ruleData.s)!="undefined"&&typeof(a.other.ruleData.d)!="undefined"){if(a.other.ruleData.d!=null&&a.other.ruleData.d.length>0){return true}}}}return false};Mobi.countFoldOfSigle=function(h,b,f){var j=0;var d=0;for(var e=0;e=c){if(c>j){j=c;d=a}}}if(d>0&&b>=j&&b>=d){f+=d}return f};Mobi.reCtOrderMoney=function(){var b=jm(".J_select .mall_product");var e=0;b.each(function(){var k=parseFloat(jm(this).attr("price"),2);var h=parseInt(jm(this).find(".buyNumber").val());if(isNaN(h)){h=0}var j=(k*h);e+=j});var f=Mobi.countItsSaveMoney();f=parseFloat(f);if(e!=0){e=e-f}var c=jm("#count");var d=c.attr("choiceCurrencyVal");var a;if(e<100000000000){a=e.toFixed(2)}else{if(e<1000000000000){a=e.toFixed(1)}else{a=e.toFixed(0)}}c.html(isNaN(a)?d+"0.00":d+a);jm(".saleSaveMoney").html(isNaN(f.toFixed(2))?d+"0.00":d+f.toFixed(2))};Mobi.mallCartItemDel=function(b,a,c){Mobi.ing(LS.mallCartUpdating);jm.ajax({type:"post",url:"ajax/order_h.jsp?cmd=delItem&orderId="+a,data:"itemIds=["+c+"]",error:function(){Mobi.ing(LS.mallCartUpdateError)},success:function(d){var d=jm.parseJSON(d);if(d.success){Mobi.ing(LS.mallCartUpdateOk,1);jm(".itemLine"+b).parent().remove();Mobi.removeAcSaleList(c);var e=jm(".mall_product");if(e.length==0){Fai.top.location.reload()}else{Mobi.reCtOrderMoney();jm(".mall_product").eq(0).css("border-top","1px solid #fff")}}else{if(d.rt==-3){Mobi.ing(LS.mallCartUpdateNotFound)}else{if(d.rt==-9){Mobi.ing(LS.mallCartUpdateStatusError)}else{Mobi.ing(LS.mallCartUpdateError)}}}var h=LS.pay;var f=Mobi.countSelectNum();jm(".cartSettle").val(h+"("+f+")");Mobi.reCtOrderMoney()}})};Mobi.selectInMallCart=function(c){var b=LS.pay;if(jm("#selectBtn"+c).hasClass("faisco-icons-right")){jm("#selectBtn"+c).removeClass().addClass("faisco-icons-shape11").addClass("g_color").css("font-size","1rem");jm("#selectBtn"+c).parent().parent().removeClass().addClass("J_noSelect");if(jm("#selectAllInMallCart").hasClass("faisco-icons-right")){jm("#selectAllInMallCart").removeClass().addClass("faisco-icons-shape11").addClass("g_color").css("font-size","1rem")}var a=Mobi.countSelectNum();if(a==0){jm(".cartSettle").val(b)}else{jm(".cartSettle").val(b+"("+a+")")}}else{jm("#selectBtn"+c).removeClass().addClass("faisco-icons-right").addClass("g_color").css("font-size","0.75rem");jm("#selectBtn"+c).parent().parent().removeClass().addClass("J_select");if(jm(".J_noSelect").length==0&&jm(".J_select").length!=0){jm("#selectAllInMallCart").removeClass().addClass("faisco-icons-right").addClass("g_color").css("font-size","0.75rem")}var a=Mobi.countSelectNum();jm(".cartSettle").val(b+"("+a+")")}Mobi.reCtOrderMoney()};Mobi.selectAllInMallCart=function(){var b=LS.pay;if(jm("#selectAllInMallCart").hasClass("faisco-icons-right")){jm("#selectAllInMallCart").removeClass().addClass("faisco-icons-shape11").addClass("g_color").css("font-size","1rem");jm("div[id^='selectBtn']").each(function(){jm(this).removeClass().addClass("faisco-icons-shape11").addClass("g_color").css("font-size","1rem");jm(this).parent().parent().removeClass().addClass("J_noSelect")});jm(".cartSettle").val(b)}else{jm("#selectAllInMallCart").removeClass().addClass("faisco-icons-right").addClass("g_color").css("font-size","0.75rem");jm("div[id^='selectBtn']").each(function(){jm(this).removeClass().addClass("faisco-icons-right").addClass("g_color").css("font-size","0.75rem");jm(this).parent().parent().removeClass().addClass("J_select")});var a=Mobi.countSelectNum();jm(".cartSettle").val(b+"("+a+")")}Mobi.reCtOrderMoney()};Mobi.countSelectNum=function(){var a=0;jm(".mallCart .J_select").each(function(){a=a+parseInt(jm(this).find(".buyNumber").val())});return a};Mobi.showMallTips=function(c){if(Fai.top._templateFrameId>=2000){Mobi.removeMallTIps();Mobi.ing(LS.addToMallCatSuccess,true)}else{document.getElementById("webLoading").style.display="block";var b=document.getElementById("webLoading");var a="
    "+c+"
    "+LS.mallContinueShopping+"
    "+LS.mallToCartCount+"
    ";b.innerHTML=a}};Mobi.initModuleMallAddrInfo=function(z,I,O,t,E){var o=LS.mallPleaseChoose,G=[],N,n,r,f,v,x,H;site_cityUtil.initProvinces(t);jm(".orderSettle").css("min-height",jm(window).height()+"px");var p=Mobi.initWebPage({triggerId:"areaBoxInput",panelId:"areaBox",pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#areaBoxClose"});jm("#areaBox").unbind("click").bind("click",function(Q){var j=Q.target.className;if(!j){return}if(jm.inArray("areaBox",j.split(" "))>=0){jm("#areaBoxClose").click();jm("#areaBox1").hide();jm("#areaBox2").hide()}});var h="";jm.each(site_cityUtil.getAreaGroupsPinYin(),function(j,Q){h+="
    ";h+="
    "+Q[0]+"
    ";h+="
    ";jm.each(Q[1],function(S,R){if(t==2052||t==1028){h+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(R).name)+"
    "}else{h+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(R).name)+"
    "}});h+="
    ";h+="
    "});jm("#areaBox1 .pv_content").html("").append(h);jm("#allArea").change(function(){if(jm("#allArea").val()==null||jm("#allArea").val()==""||jm("#allArea").val()=="os"){jm("#areaBoxInput").parent(".edit_line").hide()}else{jm("#areaBoxInput").parent(".edit_line").show()}jm("#areaBox1").hide();jm("#areaBox2").hide();jm("#areaBoxInput").attr("isCn",0);jm("#areaBoxInput").attr("isCus",0);jm("#areaBoxInput").attr("isOs",0);jm("#areaBoxInput").attr("area1","");jm("#areaBoxInput").attr("area2","");jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");if(jm("#allArea").val()=="cn"){jm("#areaBoxInput").attr("isCn",1);jm("#areaBox1 .pv").click();jm("#areaBox1 .city_content").remove();jm("#areaBox1 .county_content").remove();jm("#areaBox1 .street_content").remove();jm("#areaBox1").show();jm("#areaBoxInput").val("")}else{if(jm("#allArea").val()=="os"){jm("#areaBoxInput").attr("isOs",1);jm("#areaBoxInput").attr("area1",990000);jm("#areaBoxInput").attr("area2",990100);jm("#areaBoxInput").val(jm("#areaBox1").find(".group_item[pid='990000']").text())}else{jm("#areaBoxInput").attr("isCus",1);jm("#areaBoxInput").attr("area1",jm("#allArea").val());jm("#areaBox2 .sec_content").html("");jm("#areaBox2 .thd_content").html("");jm("#areaBox2").show();jm("#areaBoxInput").val("")}}jm("#mallShipTemplate_allArea").val(jm("#allArea").val());jm("#mallShipTemplate_allArea").change();if(jm("#allArea").val()=="cn"||jm("#allArea").val()=="os"){jm(".J_ssq").show();jm(".J_administrativeRegion").hide()}else{var j=u(jm("#allArea").val());jm("#sec_box .sec_content").append(j);jm("#areaBoxInput").val(jm("#areaBoxInput").val()+jm("#allArea option[value='"+jm("#allArea").val()+"']").text());jm(".J_ssq").hide();jm(".J_administrativeRegion").show();if(j===null||j===undefined||j===""){jm("#areaBoxInput").parents(".edit_line").hide()}}});jm("#areaBoxInput").unbind("click").bind("click",function(){if(jm("#allArea").val()=="cn"){p();jm("#areaBox1").show();jm("#areaBox2").hide();jm("#areaBox1 .J_areaHead .pv").click()}else{if(jm("#allArea").val()==null||jm("#allArea").val()=="os"){}else{p();jm("#areaBox2").show();jm("#areaBox1").hide();jm("#areaBox2 .J_areaHead2 .sec").click()}}jm("#areaBoxInput").trigger("blur")});jm("#areaBoxInput").unbind("focus").bind("focus",function(){if(jm("#allArea").val()=="cn"){p();jm("#areaBox1").show();jm("#areaBox2").hide();jm("#areaBox1 .J_areaHead .pv").click()}else{if(jm("#allArea").val()==null||jm("#allArea").val()=="os"){}else{p();jm("#areaBox2").show();jm("#areaBox1").hide();jm("#areaBox2 .J_areaHead2 .sec").click()}}jm("#areaBoxInput").trigger("blur")});jm("#areaBox1 .J_areaHead .pv").click(function(){jm("#province_box").show();jm("#city_box").hide();jm("#county_box").hide();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .city").click(function(){jm("#province_box").hide();jm("#city_box").show();jm("#county_box").hide();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .county").click(function(){jm("#province_box").hide();jm("#city_box").hide();jm("#county_box").show();jm("#street_box").hide()});jm("#areaBox1 .J_areaHead .street").click(function(){jm("#province_box").hide();jm("#city_box").hide();jm("#county_box").hide();jm("#street_box").show()});jm("#areaBox2 .J_areaHead2 .sec").click(function(){jm("#sec_box").show();jm("#thd_box").hide()});jm("#areaBox2 .J_areaHead2 .thd").click(function(){jm("#sec_box").hide();jm("#thd_box").show()});jm("#province_box .group_item").bind("click",function(){jm("#areaBox1 .city_content").remove();jm("#areaBox1 .county_content").remove();var j=jm(this).attr("pname");var Q=jm(this).attr("pid");jm("#areaBox1 .J_areaHead .city").click();jm("#areaBoxInput").val("");jm("#areaBoxInput").val(jm("#areaBoxInput").val()+j);jm("#areaBoxInput").removeAttr("lastArea");jm("#areaBoxInput").removeAttr("lastAreaType");jm("#areaBoxInput").attr("area1",Q);jm("#areaBoxInput").attr("area2","");jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");var S="";if(t==2052||t==1028){S=c(site_cityUtil.getCities(Q))}else{S=c(site_cityUtil.getCitiesEn(Q))}var R=jm(S).html();if(R===null||R===undefined||R===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#city_box").append(S);jm("#mallShipTemplate_province_box .group_item[pid='"+Q+"']").click()});jm("#city_box").delegate(".group_item","click",function(){jm("#areaBox1 .county_content").remove();var j=jm(this).attr("cname");var R=jm(this).attr("cid");jm("#areaBox1 .J_areaHead .county").click();var U=jm("#areaBoxInput").attr("lastArea");var Q=jm("#areaBoxInput").attr("lastAreaType");if(Q!=null&&Q!=""){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-")))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+j);jm("#areaBoxInput").attr("lastArea","-"+j);jm("#areaBoxInput").attr("lastAreaType","city");jm("#areaBoxInput").attr("area2",R);jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");var T="";if(t==2052||t==1028){T=s(site_cityUtil.getCounty(R))}else{T=s(site_cityUtil.getCountyEn(R))}var S=jm(T).html();if(S===null||S===undefined||S===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#county_box").append(T);jm("#mallShipTemplate_city_box .group_item[cid='"+R+"']").click()});jm("#county_box").delegate(".group_item","click",function(){jm("#areaBox1 .street_content").remove();var Q=jm(this).attr("cname");var S=jm(this).attr("cid");var U=jm("#areaBoxInput").attr("lastArea");var R=jm("#areaBoxInput").attr("lastAreaType");jm("#areaBox1 .J_areaHead .street").click();if(R!=null&&(R=="street"||R=="county")){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-",jm("#areaBoxInput").val().indexOf("-")+1)))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+Q);jm("#areaBoxInput").attr("lastArea","-"+Q);jm("#areaBoxInput").attr("lastAreaType","county");jm("#areaBoxInput").attr("area3",S);jm("#areaBoxInput").attr("area4","");var j="";if(t==2052||t==1028){j=P(site_cityUtil.getStreet(S))}else{j=P(site_cityUtil.getStreetEn(S))}var T=jm(j).html();if(T===null||T===undefined||T===""){jm("#areaBox1").hide();jm("#areaBoxClose").click()}jm("#street_box").append(j);jm("#mallShipTemplate_county_box .group_item[cid='"+S+"']").click()});jm("#street_box").delegate(".group_item","click",function(){var j=jm(this).attr("cname");var R=jm(this).attr("cid");var S=jm("#areaBoxInput").attr("lastArea");var Q=jm("#areaBoxInput").attr("lastAreaType");if(Q!=null&&Q=="street"){jm("#areaBoxInput").val(jm("#areaBoxInput").val().replace(S,""))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+j);jm("#areaBoxInput").attr("lastArea","-"+j);jm("#areaBoxInput").attr("lastAreaType","street");jm("#areaBoxInput").attr("area4",R);jm("#areaBox1").hide();jm("#areaBoxClose").click();jm("#mallShipTemplate_street_box .group_item[cid='"+R+"']").click()});jm("#sec_box").delegate(".group_item","click",function(){jm("#areaBox2 .thd_content").html("");var j=jm(this).attr("cname");var R=jm(this).attr("cid");jm("#areaBox2 .J_areaHead2 .thd").click();var T=jm("#areaBoxInput").attr("lastArea");var Q=jm("#areaBoxInput").attr("lastAreaType");if(Q!=null&&Q!=""&&jm("#areaBoxInput").val().indexOf("-")!=-1){jm("#areaBoxInput").val(jm("#areaBoxInput").val().substring(0,jm("#areaBoxInput").val().indexOf("-")))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+j);jm("#areaBoxInput").attr("lastArea","-"+j);jm("#areaBoxInput").attr("lastAreaType","sec");jm("#areaBoxInput").attr("area2",R);jm("#areaBoxInput").attr("area3","");var S=u(R);if(S===null||S===undefined||S===""){jm("#areaBox2").hide();jm("#areaBoxClose").click()}jm("#thd_box .thd_content").append(S);jm("#mallShipTemplate_sec_box .group_item[cid='"+R+"']").click()});jm("#thd_box").delegate(".group_item","click",function(){var j=jm(this).attr("cname");var R=jm(this).attr("cid");var S=jm("#areaBoxInput").attr("lastArea");var Q=jm("#areaBoxInput").attr("lastAreaType");if(Q!=null&&Q=="thd"){jm("#areaBoxInput").val(jm("#areaBoxInput").val().replace(S,""))}jm("#areaBoxInput").val(jm("#areaBoxInput").val()+"-"+j);jm("#areaBoxInput").attr("lastArea","-"+j);jm("#areaBoxInput").attr("lastAreaType","thd");jm("#areaBoxInput").attr("area3",R);jm("#areaBox2").hide();jm("#areaBoxClose").click();jm("#mallShipTemplate_thd_box .group_item[cid='"+R+"']").click()});jm("#addrInfo_street").change(function(j){jm("#edit_addrDetal").val(jm("#addrInfo_street").val())});for(var K=0;K0){if(Y.s!=undefined){ac.val(Y.s);var aa=ab.replace("input","")+"_endinput";var ad=jm(".orderSettle").find("#"+aa);if(ad.length>0){if(Y.e!=undefined){ad.val(Y.e)}else{ad.val("")}}}else{ac.val("")}}}else{jm(this).val(Y)}}if("mobile"==j){if("mobileCt" in R){if(R.mobileCt!=null&&R.mobileCt!=""){jm("#mobileCt").val(R.mobileCt)}}}})}});var C=I,B="",y="",l=true;length=C.length,isAddAddrInfoClick=false;var k={};jm("#addrInfoList .orderAddAddrInfo").click(function(){isAddAddrInfoClick=true;jm("#editAddrInfo").find(".propItemValue").each(function(){var R=jm(this).attr("proptype");if(R==9){var Q=jm(this).attr("id");if(Q!=undefined&&Q!=""){var j=Q.replace("input","")+"_endinput";jm("#"+Q).val("");jm("#"+j).val("")}}jm(this).val("")});jm("#allArea").val("");jm("#allArea").change();jm("#areaBoxInput").attr("isCn",0);jm("#areaBoxInput").attr("isCus",0);jm("#areaBoxInput").attr("isOs",0);jm("#areaBoxInput").attr("area1","");jm("#areaBoxInput").attr("area2","");jm("#areaBoxInput").attr("area3","");jm("#areaBoxInput").attr("area4","");jm("#areaBoxInput").removeAttr("lastArea");jm("#areaBoxInput").removeAttr("lastAreaType");jm("#addrInfo_street").val();B="addAddr"});jm("#addrInfo").delegate(".edit","click",function(){jm("#addrInfoList .orderAddAddrInfo").click();isAddAddrInfoClick=false;if(jm(this).attr("class")=="edit"){y=jm(this).attr("_index")}else{y=jm(this).parent().attr("_item")}B="editAddr";var j=C[y];jm("#editAddrInfo").find(".propItemValue").each(function(){var aa=jm(this).attr("_field");var ab=jm(this).attr("proptype");var ac=jm(this).attr("id")||"";if(ab==9){var Y=j[aa];if(Y==""||Y==undefined){Y={}}var Z=Y;jm(this).val(Z.s);if(Z.e!=undefined){var X=ac.replace("input","")+"_endinput";jm("#"+X).val(Z.e)}}else{jm(this).val(j[aa])}});var W=j.addr_info;if(W!=null){var S=W.isCus;if(!S){var V="";var T="";var R="";var Q="";if(t==2052||t==1028){V=site_cityUtil.getInfo(W.streetCode).name;T=site_cityUtil.getInfo(W.countyCode).name;R=site_cityUtil.getInfo(W.cityCode).name;Q=site_cityUtil.getInfo(W.provinceCode).name}else{V=site_cityUtil.getInfoEn(W.streetCode).name;T=site_cityUtil.getInfoEn(W.countyCode).name;R=site_cityUtil.getInfoEn(W.cityCode).name;Q=site_cityUtil.getInfoEn(W.provinceCode).name}if(W.provinceCode==990000){jm("#areaBoxInput").attr("isOs",1);jm("#allArea").val("os");jm("#allArea").change()}else{jm("#areaBoxInput").attr("isCn",1);jm("#allArea").val("cn");jm("#allArea").change()}jm("#areaBoxInput").attr("area1",W.provinceCode);jm("#areaBoxInput").attr("area2",W.cityCode);jm("#areaBoxInput").attr("area3",W.countyCode);jm("#areaBoxInput").attr("area4",W.streetCode);jm("#areaBox1 .group_item[pid='"+W.provinceCode+"']").click();jm("#areaBox1 .group_item[cid='"+W.cityCode+"']").click();jm("#areaBox1 .group_item[cid='"+W.countyCode+"']").click();jm("#areaBox1 .group_item[cid='"+W.streetCode+"']").click()}else{jm("#allArea").val(W.provinceCode);jm("#allArea").change();jm("#areaBox2 .group_item[cid='"+W.cityCode+"']").click();jm("#areaBox2 .group_item[cid='"+W.countyCode+"']").click()}jm("#addrInfo_street").val(W.streetAddr)}else{jm("#addrInfo_street").val(j.addr)}var U=j.isDefault});jm("#addrInfo").delegate(".selectedDiv label","click",function(){B="setDefault";var R=0;if(C.length==1){return}y=jm(this).parents(".selectedArea").parent().attr("_item");var j={};j.isDefault=1;k.opera=B;k._item=y;k.addrInfo=j;I[y]["isDefault"]=j.isDefault;var Q=this;jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set&id="+z,data:"info="+jm.encodeUrl(jm.toJSON(k)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(T){var U=jm.parseJSON(T);if(U.success){jm(".addrInfo").each(function(){jm(this).find(".text").text(LS.mallSetDefault);jm(this).find(".cutOut").css("display","block");C[jm(this).attr("_item")]["isDefault"]=0});jm(Q).find(".text").text(LS.mallDefault);jm(Q).parents(".addrInfo").find(".cutOut").css("display","none");var S=jm(Q).parents(".addrInfo");C[jm(S).attr("_item")]["isDefault"]=1}else{Mobi.ing(U.msg)}}})});jm("#g_body").append(jm("
    "));var e=jm("#temBox");var b=e.css("color");jm("head").append("");jm("#g_body").children("#temBox").remove();jm("#editCusInfo").delegate(".info_name","click",function(){jm("#editCusInfo").removeClass("webPagePanelShow")});jm("#addrInfo").delegate(".cutOut","click",function(){var R=jm(this);y=R.parents(".selectedArea").parent().attr("_item");k.opera="delAddr";k._item=y;var j=function(S,T){jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set&id="+S,data:"info="+jm.encodeUrl(jm.toJSON(k)),error:function(){Mobi.ing(LS.systemError)},success:function(U){var W=jm.parseJSON(U);if(W.success){jm("#mobiPrompt").remove();jm("#mobiPrompt_Bg").remove();var V=0;jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).attr("_item")==T){jm(this).remove()}else{jm(this).attr("_item",V);V++}});length--;C.splice(T,1)}else{Mobi.ing(W.msg)}}})};var Q={textClass:"confirm",content:"确定要删除该收货人信息吗?",callback:function(){j(z,y)}};Mobi.prompt(Q)});jm("#noAddrListInfo").click(function(){y=jm("#assignItemline").attr("_index");B="editAddr";l=false});jm(".orderSaveAddrInfo").click(function(){var ae=true;if(C.length>=6&&B=="addAddr"){Mobi.ing(LS.mallAddrInfoAmountLimit,true);ae=false;jm("#editAddrInfo .g_close").click()}var ag=0;if(C.length==0){ag=1}if(B=="editAddr"){if(C[y].isDefault==1){ag=1}}var U=jm(this);var V={};var ah={};var j={};var af="";var Q="";var ab="";var X=false;var ai={};jm(".editPanel").find(".propItemValue").each(function(){af=jm(this).attr("_field");Q=jm(this).val();ab=jm(this).attr("_prop");id=jm(this).attr("id");propType=jm(this).attr("proptype");X=jm(this).attr("_required")=="1"?true:false;if(X&&(Q==null||Q=="")){Mobi.ing(jm.format(LS.memberSignupUserAddItemCorrect,ab));this.focus();ae=false}if(propType==8||propType==10){if(Q.length>0){if(!jm.isNationMobile(Q)){msg=LS.mobileNumRegular;Mobi.ing(msg);this.focus();ae=false}}}if(propType==3||propType==12){if(Q.length>0){if(!jm.isEmail(Q)){msg=LS.mallStlSubmitInput2+jm(this).attr("_prop");Mobi.ing(msg);this.focus();ae=false}}}if(propType==9){var an="";if(Q.length>0){var al={};al.s=Q;var aj=id.replace("input","")+"_endinput";var am=jm(this).parents(".edit_line").find("#"+aj);if(am.length>0){var ak=am.val();if(ak==""){msg=LS.mallStlSubmitInput2+jm(this).attr("_prop");Mobi.ing(msg);ae=false}else{al.e=ak}}an=al}Q=an}ah[af]=Q;ai[af]=Q});var T=jm("#allArea");var Y=!(T.val()=="os"||T.val()=="cn");var ac=jm("#areaBoxInput").attr("area4");var ad=jm("#areaBoxInput").attr("area3");var R=jm("#areaBoxInput").attr("area2");var W=jm("#areaBoxInput").attr("area1");var S=jm("#addrInfo_street");X=U.parent().find("#addrInfo_street").attr("_required")=="1"?true:false;if(X){if(T.val()==null||T.val()==""){Mobi.ing("请选择地区",1);return}if((W==null||W=="")&&!Y){Mobi.ing(LS.mallStlSubmitAddrErr,1);return}if((R==null||R=="")&&!Y){Mobi.ing(LS.mallStlSubmitAddrErr,1);return}}if(isNaN(ac)){ac=-1}if(isNaN(ad)){ad=-1}if(isNaN(R)){R=-1}V.isCus=Y;V.provinceCode=W;V.cityCode=R;V.countyCode=ad;V.streetCode=ac;V.streetAddr=S.val();ah.addr_info=V;var Z="";if(T.length==1){var aa=jm("#areaBoxInput");if(Fai.top._lcid==2052||Fai.top.lcid==1028){Z=aa.val().replace(/-/g,"")+jm("#addrInfo_street").val();if(V.provinceCode==990000){Z=Z.replace(jm("div[pid='990000']").text()+jm("div[pid='990000']").text(),jm("div[pid='990000']").text())}}else{Z=aa.val().replace(/-/g," ")+" "+jm("#addrInfo_street").val();if(V.provinceCode==990000){Z=Z.replace(jm("div[pid='990000']").text()+" "+jm("div[pid='990000']").text(),jm("div[pid='990000']").text())}}}ah.addr=Z;ah.isDefault=ag;k.opera=B;k._item=y;k.addrInfo=ah;if(ae){jm.ajax({type:"post",url:"ajax/member_h.jsp?cmd=set&id="+z,data:"info="+jm.encodeUrl(jm.toJSON(k)),error:function(){Mobi.ing(LS.memberProfileError)},success:function(av){var ao=jm.parseJSON(av);if(ao.success){var ak=ah.name||"";var aq=ah.mobile||"";var ap=ah.addr||"";if(ak==""||aq==""||ap==""){jm("#editAddrInfo").find(".propItemValue").each(function(){var ay=jm(this).attr("_field");if(ay!=null&&ay!="addrDetail"){var az=jm(this).attr("proptype");var aA=jm(this).attr("id")||"";var aw=ah[ay];if(az!=2&&az!=4&&az!=7&&az!=8){if(az==9){var ax=aw;if(ax.s!=undefined){aw=ax.s;if(ax.e!=undefined){aw+=LS.to+ax.e}}else{aw=""}}if(ak==undefined||ak==""){ak=aw}else{if(aq==undefined||aq==""){aq=aw}else{if(ap==undefined||ap==""){ap=aw}}}}}})}if(B=="editAddr"){if(jm("#assignItemline").attr("_index")==y){var at=ah;jm("#info_name").text(at.name);jm("#info_phone").text(at.phone);jm("#assignItemline").attr("_index",y);if(at.addr==null){jm("#info_addr").text("")}else{jm("#info_addr").text(at.addr)}}var al;if(ag){jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).find(".cutOut").attr("display")=="block"){C[jm(this).attr("_item")]["isDefault"]=0}if(jm(this).attr("_item")==y){jm(this).find(".name").text(ak);jm(this).find(".phone").text(aq);jm(this).find("#addr").text(ap);al=jm(this)}})}else{jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).attr("_item")==y){jm(this).find(".name").text(ak);jm(this).find(".phone").text(aq);jm(this).find("#addr").text(ap);al=jm(this)}})}C.splice(y,1,ah);if(l){al.click();jm("#editAddrInfo .g_close").click()}else{jm("#editCusInfo .g_close").click();for(noShowFieldKey in ai){if(ai[noShowFieldKey]!=undefined){var aj=jm("#info_"+noShowFieldKey).attr("proptype");if(aj==9){var au=ai[noShowFieldKey]||{};var an="";if(au.s!=undefined){an=au.s;if(au.e!=undefined){an+=" "+LS.to+" "+au.e}}jm("#info_"+noShowFieldKey).text(an)}else{jm("#info_"+noShowFieldKey).text(ai[noShowFieldKey])}}}}}else{if(B=="addAddr"){if(ag){jm("#addrInfoList").find(".addrInfo").each(function(){if(jm(this).find("input").attr("checked")!="checked"){C[jm(this).attr("_item")]["isDefault"]=0}})}var ar=C.length;var am=[];am.push("
    ");am.push("
    ");am.push("
    "+ak+""+aq+"
    "+ap+"
    ");am.push("
    ");am.push("
    ");am.push("
    ");am.push("
    ");am.push("
    ");am.push("
    ");am.push("
    编辑
    删除
    ");am.push("
    ");am.push("
    ");am.push("
    ");jm("#addrInfo").append(am.join(""));C.push(ah);jm("#editAddrInfo .g_close").click();jm(".addrInfo").each(function(){if(jm(this).attr("_item")==(I.length-1)){jm(this).click()}})}}jm(".addrInfo[_item='"+y+"'] .info_name").click()}else{Mobi.ing(ao.msg)}}})}});function c(Q){var j="";j+="
    ";jm.each(Q,function(R,S){if(t==2052||t==1028){j+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(S.id).name)+"
    "}else{j+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(S.id).name)+"
    "}});j+="
    ";return j}function s(Q){var j="";j+="
    ";jm.each(Q,function(R,S){if(t==2052||t==1028){j+="
    "+site_cityUtil.getInfo(S.id).name+"
    "}else{j+="
    "+site_cityUtil.getInfoEn(S.id).name+"
    "}});j+="
    ";return j}function P(Q){var j="";j+="
    ";jm.each(Q,function(R,S){if(t==2052||t==1028){j+="
    "+site_cityUtil.getInfo(S.id).name+"
    "}else{j+="
    "+site_cityUtil.getInfoEn(S.id).name+"
    "}});j+="
    ";return j}function D(Q){var j="";var R=false;jm.each(E,function(S,T){if(R){return}if(T.id==Q){j=T.name;R=true}});return j}function A(Q){var j=[];jm.each(E,function(R,S){if(S.parentId==Q){j.push(S)}});return j}function u(j){if(isNaN(j)){return""}var R=parseInt(j);var Q="";jm.each(A(R),function(S,T){Q+="
    "+T.name+"
    "});return Q}};Mobi.initModuleMallShipTemplate=function(A,b,C,n,t,p,c){var j=C.vType||1,v=C.sco||0,f=C.openItemList;var s=LS.mallPleaseChoose,z=[],l,B,q,x,D,o,y;var h=true;site_cityUtil.initProvinces(t);var e=jm("#shipValue").attr("shiptype");jm(".modifyShipDetails .faisco-icons-shape11").each(function(F,G){if(jm(this).parent().find(".J_shipPrice").attr("shiptype")==e){jm(this).removeAttr("style").attr("style","margin-right:0.15rem;height:2.5rem;line-height:2.5rem;float:right;").removeAttr("class").attr("class","faisco-icons-right g_color J_selectShip")}});var E=Mobi.initWebPage({triggerId:"mallShipTemplate_areaBoxInput",panelId:"mallShipTemplate_areaBox",pageBg:true,returnSeltFun:true,direction:"bottom",closeWebPage:"#mallShipTemplate_areaBoxClose"});jm("#mallShipTemplate_areaBox").unbind("click").bind("click",function(G){var F=G.target.className;if(!F){return}if(jm.inArray("areaBox",F.split(" "))>=0){jm("#mallShipTemplate_areaBoxClose").click();jm("#mallShipTemplate_areaBox1").hide();jm("#mallShipTemplate_areaBox2").hide()}});var m="";jm.each(site_cityUtil.getAreaGroupsPinYin(),function(F,G){m+="
    ";m+="
    "+G[0]+"
    ";m+="
    ";jm.each(G[1],function(I,H){if(t==2052||t==1028){m+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(H).name)+"
    "}else{m+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(H).name)+"
    "}});m+="
    ";m+="
    "});jm("#mallShipTemplate_areaBox1 .pv_content").html("").append(m);jm("#mallShipTemplate_allArea").change(function(){if(jm("#mallShipTemplate_allArea").val()==null||jm("#mallShipTemplate_allArea").val()==""||jm("#mallShipTemplate_allArea").val()=="os"){jm("#mallShipTemplate_areaBoxInput").parent(".edit_line").hide();jm("#mallShipTemplate_areaBox1").hide();jm("#mallShipTemplate_areaBox2").hide()}else{jm("#mallShipTemplate_areaBoxInput").parent(".edit_line").show()}if(jm("#mallShipTemplate_allArea").val()==null||jm("#mallShipTemplate_allArea").val()==""){return}jm("#mallShipTemplate_areaBoxInput").attr("isCn",0);jm("#mallShipTemplate_areaBoxInput").attr("isCus",0);jm("#mallShipTemplate_areaBoxInput").attr("isOs",0);jm("#mallShipTemplate_areaBoxInput").attr("area1","");jm("#mallShipTemplate_areaBoxInput").attr("area2","");jm("#mallShipTemplate_areaBoxInput").attr("area3","");jm("#mallShipTemplate_areaBoxInput").attr("area4","");if(jm("#mallShipTemplate_allArea").val()=="cn"){jm("#mallShipTemplate_areaBoxInput").attr("isCn",1);jm("#mallShipTemplate_areaBox1 .pv").click();jm("#mallShipTemplate_areaBox1 .city_content").remove();jm("#mallShipTemplate_areaBox1 .county_content").remove();jm("#mallShipTemplate_areaBox1 .street_content").remove();jm("#mallShipTemplate_areaBoxInput").val("")}else{if(jm("#mallShipTemplate_allArea").val()=="os"){jm("#mallShipTemplate_areaBoxInput").attr("isOs",1);jm("#mallShipTemplate_areaBoxInput").attr("area1",990000);jm("#mallShipTemplate_areaBoxInput").attr("area2",990100);jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBox1").find(".group_item[pid='990000']").text());Mobi.mallStlCalcTotal()}else{jm("#mallShipTemplate_areaBoxInput").attr("isCus",1);jm("#mallShipTemplate_areaBoxInput").attr("area1",jm("#mallShipTemplate_allArea").val());jm("#mallShipTemplate_areaBox2 .sec_content").html("");jm("#mallShipTemplate_areaBox2 .thd_content").html("");jm("#mallShipTemplate_areaBoxInput").val("")}}if(jm("#mallShipTemplate_allArea").val()=="cn"||jm("#mallShipTemplate_allArea").val()=="os"){jm(".J_ssq").show();jm(".J_administrativeRegion").hide()}else{var F=a(jm("#mallShipTemplate_allArea").val());jm("#mallShipTemplate_sec_box .sec_content").append(F);jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+jm("#mallShipTemplate_allArea option[value='"+jm("#mallShipTemplate_allArea").val()+"']").text());jm(".J_ssq").hide();jm(".J_administrativeRegion").show();var G=jm("#mallShipTemplate_allArea").val();h=false;if(A===0&&c){Mobi.mallStlCalcTotal();return}jm.each(f,function(J,L){if(v){var K=false,I=C.scrl||[];jm.each(I,function(N,M){if(M.st===L.type){var O=false;if(h){O=jm.inArray(parseInt(G),M.arl)>-1}else{O=jm.inArray(parseInt(G),M.carl)>-1}if(O){if(M.fc===1){if(j===1){if(A>=M.d1){K=true;return false}}else{if(A<=M.d1){K=true;return false}}}if(M.fc===2){if(b>=M.d2){K=true;return false}}if(M.fc===3){if(j===1){if(A>=M.d1&&b>=M.d2){K=true;return false}}else{if(A<=M.d1&&b>=M.d2){K=true;return false}}}if(M.fc===4){if(j===1){if(A>=M.d1||b>=M.d2){K=true;return false}}else{if(A<=M.d1||b>=M.d2){K=true;return false}}}}}});if(K){var H={};H.type=L.type;H.defaultPrice=0;Mobi.changeShipTplPrice(H);return}else{Mobi.changeShipTplPrice(L)}}jm.each(L.regionList,function(T,W){var N=false;if(h){N=jm.inArray(parseInt(G),W.areaList)<0}else{N=jm.inArray(parseInt(G),W.cusAreaList)<0}if(N){Mobi.changeShipTplPrice(L);return true}var S=0,O=W.price,U=W.rha==null?1:W.rha,V=W.ria==null?1:W.ria,Q=W.rip||0;var R=A;if(U>0){S=O;R-=U}if(V>0&&R>0){var M=(R/V).toFixed(1);M=Math.ceil(M);S+=Q*M}var P={};P.type=L.type;P.defaultPrice=S;Mobi.changeShipTplPrice(P);return false})});Mobi.mallStlCalcTotal()}});jm("#mallShipTemplate_areaBoxInput").unbind("click").bind("click",function(){if(jm("#mallShipTemplate_allArea").val()=="cn"){E();jm("#mallShipTemplate_areaBox1").toggle();jm("#mallShipTemplate_areaBox2").hide();jm("#mallShipTemplate_areaBox1 .J_areaHead .pv").click()}else{if(jm("#mallShipTemplate_allArea").val()==null||jm("#mallShipTemplate_allArea").val()=="os"){}else{E();jm("#mallShipTemplate_areaBox2").toggle();jm("#mallShipTemplate_areaBox1").hide();jm("#mallShipTemplate_areaBox2 .J_areaHead2 .sec").click()}}});jm("#mallShipTemplate_areaBox1 .J_areaHead .pv").click(function(){jm("#mallShipTemplate_province_box").show();jm("#mallShipTemplate_city_box").hide();jm("#mallShipTemplate_county_box").hide();jm("#mallShipTemplate_street_box").hide()});jm("#mallShipTemplate_areaBox1 .J_areaHead .city").click(function(){jm("#mallShipTemplate_province_box").hide();jm("#mallShipTemplate_city_box").show();jm("#mallShipTemplate_county_box").hide();jm("#mallShipTemplate_street_box").hide()});jm("#mallShipTemplate_areaBox1 .J_areaHead .county").click(function(){jm("#mallShipTemplate_province_box").hide();jm("#mallShipTemplate_city_box").hide();jm("#mallShipTemplate_county_box").show();jm("#mallShipTemplate_street_box").hide()});jm("#mallShipTemplate_areaBox1 .J_areaHead .street").click(function(){jm("#mallShipTemplate_province_box").hide();jm("#mallShipTemplate_city_box").hide();jm("#mallShipTemplate_county_box").hide();jm("#mallShipTemplate_street_box").show()});jm("#mallShipTemplate_areaBox2 .J_areaHead2 .sec").click(function(){jm("#mallShipTemplate_sec_box").show();jm("#mallShipTemplate_thd_box").hide()});jm("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click(function(){jm("#mallShipTemplate_sec_box").hide();jm("#mallShipTemplate_thd_box").show()});jm("#mallShipTemplate_province_box .group_item").bind("click",function(){jm("#mallShipTemplate_areaBox1 .city_content").remove();jm("#mallShipTemplate_areaBox1 .county_content").remove();var F=jm(this).attr("pname");var G=jm(this).attr("pid");jm("#mallShipTemplate_areaBox1 .J_areaHead .city").click();jm("#mallShipTemplate_areaBoxInput").val("");jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+F);jm("#mallShipTemplate_areaBoxInput").removeAttr("lastArea");jm("#mallShipTemplate_areaBoxInput").removeAttr("lastAreaType");jm("#mallShipTemplate_areaBoxInput").attr("area1",G);jm("#mallShipTemplate_areaBoxInput").attr("area2","");jm("#mallShipTemplate_areaBoxInput").attr("area3","");jm("#mallShipTemplate_areaBoxInput").attr("area4","");var H="";if(t==2052||t==1028){H=r(site_cityUtil.getCities(G))}else{H=r(site_cityUtil.getCitiesEn(G))}jm("#mallShipTemplate_city_box").append(H);jm.each(f,function(I,J){Mobi.changeShipTplPrice(J)});Mobi.mallStlCalcTotal()});jm("#mallShipTemplate_city_box").delegate(".group_item","click",function(){Mobi.mallStlCalcTotal();if(jm("#mallShipTemplate_allArea").val()==""||jm("#mallShipTemplate_allArea").val()=="cn"||jm("#mallShipTemplate_allArea").val()=="os"){h=true}else{h=false}jm("#mallShipTemplate_areaBox1 .county_content").remove();var F=jm(this).attr("cname");var H=jm(this).attr("cid");jm("#mallShipTemplate_areaBox1 .J_areaHead .county").click();var J=jm("#mallShipTemplate_areaBoxInput").attr("lastArea");var G=jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(G!=null&&G!=""){jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val().substring(0,jm("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+"-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType","city");jm("#mallShipTemplate_areaBoxInput").attr("area2",H);jm("#mallShipTemplate_areaBoxInput").attr("area3","");jm("#mallShipTemplate_areaBoxInput").attr("area4","");var I="";if(t==2052||t==1028){I=k(site_cityUtil.getCounty(H))}else{I=k(site_cityUtil.getCountyEn(H))}jm("#mallShipTemplate_county_box").append(I);if(A===0&&c){Mobi.mallStlCalcTotal();return}jm.each(f,function(M,O){if(v){var N=false,L=C.scrl||[];jm.each(L,function(Q,P){if(P.st===O.type){var R=false;if(h){R=jm.inArray(parseInt(H),P.arl)>-1}else{R=jm.inArray(parseInt(H),P.carl)>-1}if(R){if(P.fc===1){if(j===1){if(A>=P.d1){N=true;return false}}else{if(A<=P.d1){N=true;return false}}}if(P.fc===2){if(b>=P.d2){N=true;return false}}if(P.fc===3){if(j===1){if(A>=P.d1&&b>=P.d2){N=true;return false}}else{if(A<=P.d1&&b>=P.d2){N=true;return false}}}if(P.fc===4){if(j===1){if(A>=P.d1||b>=P.d2){N=true;return false}}else{if(A<=P.d1||b>=P.d2){N=true;return false}}}}}});if(N){var K={};K.type=O.type;K.defaultPrice=0;Mobi.changeShipTplPrice(K);return}else{Mobi.changeShipTplPrice(O)}}jm.each(O.regionList,function(W,Z){var Q=false;if(h){Q=jm.inArray(parseInt(H),Z.areaList)<0}else{Q=jm.inArray(parseInt(H),Z.cusAreaList)<0}if(Q){Mobi.changeShipTplPrice(O);return true}var V=0,R=Z.price,X=Z.rha==null?1:Z.rha,Y=Z.ria==null?1:Z.ria,T=Z.rip||0;var U=A;if(X>0){V=R;U-=X}if(Y>0&&U>0){var P=(U/Y).toFixed(1);P=Math.ceil(P);V+=T*P}var S={};S.type=O.type;S.defaultPrice=V;Mobi.changeShipTplPrice(S);return false})});Mobi.mallStlCalcTotal()});jm("#mallShipTemplate_county_box").delegate(".group_item","click",function(){jm("#mallShipTemplate_areaBox1 .street_content").remove();var G=jm(this).attr("cname");var I=jm(this).attr("cid");jm("#mallShipTemplate_areaBox1 .J_areaHead .street").click();var K=jm("#mallShipTemplate_areaBoxInput").attr("lastArea");var H=jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(H!=null&&(H=="street"||H=="county")){jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val().substring(0,jm("#mallShipTemplate_areaBoxInput").val().indexOf("-",jm("#mallShipTemplate_areaBoxInput").val().indexOf("-")+1)))}jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+"-"+G);jm("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+G);jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");jm("#mallShipTemplate_areaBoxInput").attr("area3",I);jm("#mallShipTemplate_areaBoxInput").attr("area4","");var F="";if(t==2052||t==1028){F=u(site_cityUtil.getStreet(I))}else{F=u(site_cityUtil.getStreetEn(I))}var J=jm(F).html();if(J===null||J===undefined||J===""){jm("#mallShipTemplate_areaBox1").hide();jm("#mallShipTemplate_areaBoxClose").click()}jm("#mallShipTemplate_street_box").append(F);Mobi.mallStlCalcTotal()});jm("#mallShipTemplate_street_box").delegate(".group_item","click",function(){var F=jm(this).attr("cname");var H=jm(this).attr("cid");var I=jm("#mallShipTemplate_areaBoxInput").attr("lastArea");var G=jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(G!=null&&G=="street"){jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val().replace(I,""))}jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+"-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType","street");jm("#mallShipTemplate_areaBoxInput").attr("area4",H);jm("#mallShipTemplate_areaBox1").hide();jm("#mallShipTemplate_areaBoxClose").click();Mobi.mallStlCalcTotal()});jm("#mallShipTemplate_sec_box").delegate(".group_item","click",function(){if(jm("#mallShipTemplate_allArea").val()==""||jm("#mallShipTemplate_allArea").val()=="cn"||jm("#mallShipTemplate_allArea").val()=="os"){h=true}else{h=false}Mobi.mallStlCalcTotal();jm("#mallShipTemplate_areaBox2 .thd_content").html("");var F=jm(this).attr("cname");var H=jm(this).attr("cid");jm("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click();var J=jm("#mallShipTemplate_areaBoxInput").attr("lastArea");var G=jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(G!=null&&G!=""&&jm("#mallShipTemplate_areaBoxInput").val().indexOf("-")!=-1){jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val().substring(0,jm("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+"-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType","sec");jm("#mallShipTemplate_areaBoxInput").attr("area2",H);jm("#mallShipTemplate_areaBoxInput").attr("area3","");var I=a(H);jm("#mallShipTemplate_thd_box .thd_content").append(I);if(A===0&&c){Mobi.mallStlCalcTotal();return}jm.each(f,function(M,O){if(v){var N=false,L=C.scrl||[];jm.each(L,function(Q,P){if(P.st===O.type){var R=false;if(h){R=jm.inArray(parseInt(H),P.arl)>-1}else{R=jm.inArray(parseInt(H),P.carl)>-1}if(R){if(P.fc===1){if(j===1){if(A>=P.d1){N=true;return false}}else{if(A<=P.d1){N=true;return false}}}if(P.fc===2){if(b>=P.d2){N=true;return false}}if(P.fc===3){if(j===1){if(A>=P.d1&&b>=P.d2){N=true;return false}}else{if(A<=P.d1&&b>=P.d2){N=true;return false}}}if(P.fc===4){if(j===1){if(A>=P.d1||b>=P.d2){N=true;return false}}else{if(A<=P.d1||b>=P.d2){N=true;return false}}}}}});if(N){var K={};K.type=O.type;K.defaultPrice=0;Mobi.changeShipTplPrice(K);return}else{Mobi.changeShipTplPrice(O)}}jm.each(O.regionList,function(W,Z){var Q=false;if(h){Q=jm.inArray(parseInt(x),Z.areaList)<0}else{Q=jm.inArray(parseInt(H),Z.cusAreaList)<0}if(Q){Mobi.changeShipTplPrice(O);return true}var V=0,R=Z.price,X=Z.rha==null?1:Z.rha,Y=Z.ria==null?1:Z.ria,T=Z.rip||0;var U=A;if(X>0){V=R;U-=X}if(Y>0&&U>0){var P=(U/Y).toFixed(1);P=Math.ceil(P);V+=T*P}var S={};S.type=O.type;S.defaultPrice=V;Mobi.changeShipTplPrice(S);return false})});Mobi.mallStlCalcTotal()});jm("#mallShipTemplate_thd_box").delegate(".group_item","click",function(){if(jm("#mallShipTemplate_allArea").val()==""||jm("#mallShipTemplate_allArea").val()=="cn"||jm("#mallShipTemplate_allArea").val()=="os"){h=true}else{h=false}Mobi.mallStlCalcTotal();var F=jm(this).attr("cname");var H=jm(this).attr("cid");var I=jm("#mallShipTemplate_areaBoxInput").attr("lastArea");var G=jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(G!=null&&G=="thd"){jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val().replace(I,""))}jm("#mallShipTemplate_areaBoxInput").val(jm("#mallShipTemplate_areaBoxInput").val()+"-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+F);jm("#mallShipTemplate_areaBoxInput").attr("lastAreaType","thd");jm("#mallShipTemplate_areaBoxInput").attr("area3",H);jm("#mallShipTemplate_areaBox2").hide();jm("#mallShipTemplate_areaBoxClose").click();if(A===0&&c){Mobi.mallStlCalcTotal();return}jm.each(f,function(L,N){if(v){var M=false,K=C.scrl||[];jm.each(K,function(P,O){if(O.st===N.type){var Q=false;if(h){Q=jm.inArray(parseInt(H),O.arl)>-1}else{Q=jm.inArray(parseInt(H),O.carl)>-1}if(Q){if(O.fc===1){if(j===1){if(A>=O.d1){M=true;return false}}else{if(A<=O.d1){M=true;return false}}}if(O.fc===2){if(b>=O.d2){M=true;return false}}if(O.fc===3){if(j===1){if(A>=O.d1&&b>=O.d2){M=true;return false}}else{if(A<=O.d1&&b>=O.d2){M=true;return false}}}if(O.fc===4){if(j===1){if(A>=O.d1||b>=O.d2){M=true;return false}}else{if(A<=O.d1||b>=O.d2){M=true;return false}}}}}});if(M){var J={};J.type=N.type;J.defaultPrice=0;Mobi.changeShipTplPrice(J);return}else{Mobi.changeShipTplPrice(N)}}jm.each(N.regionList,function(V,Y){var P=false;if(h){P=jm.inArray(parseInt(x),Y.areaList)<0}else{P=jm.inArray(parseInt(H),Y.cusAreaList)<0}if(P){Mobi.changeShipTplPrice(N);return true}var U=0,Q=Y.price,W=Y.rha==null?1:Y.rha,X=Y.ria==null?1:Y.ria,S=Y.rip||0;var T=A;if(W>0){U=Q;T-=W}if(X>0&&T>0){var O=(T/X).toFixed(1);O=Math.ceil(O);U+=S*O}var R={};R.type=N.type;R.defaultPrice=U;Mobi.changeShipTplPrice(R);return false})});Mobi.mallStlCalcTotal()});function r(G){var F="";F+="
    ";jm.each(G,function(H,I){if(t==2052||t==1028){F+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(I.id).name)+"
    "}else{F+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(I.id).name)+"
    "}});F+="
    ";return F}function k(G){var F="";F+="
    ";jm.each(G,function(H,I){if(t==2052||t==1028){F+="
    "+site_cityUtil.getInfo(I.id).name+"
    "}else{F+="
    "+site_cityUtil.getInfoEn(I.id).name+"
    "}});F+="
    ";return F}function u(G){var F="";F+="
    ";jm.each(G,function(H,I){if(t==2052||t==1028){F+="
    "+site_cityUtil.getInfo(I.id).name+"
    "}else{F+="
    "+site_cityUtil.getInfoEn(I.id).name+"
    "}});F+="
    ";return F}function d(G){var F="";var H=false;jm.each(p,function(I,J){if(H){return}if(J.id==G){F=J.name;H=true}});return F}function w(G){var F=[];jm.each(p,function(H,I){if(I.parentId==G){F.push(I)}});return F}function a(F){if(isNaN(F)){return""}var H=parseInt(F);var G="";jm.each(w(H),function(I,J){G+="
    "+J.name+"
    "});return G}};Mobi.changeShipTplPrice=function(a){var b=jm("#shipPrice").attr("currency");if(a.defaultPrice==0){jm("#tmpType_"+a.type).text(LS.freeShipping)}else{jm("#tmpType_"+a.type).text(b+a.defaultPrice.toFixed(2))}jm("#tmpType_"+a.type).attr("value",a.defaultPrice.toFixed(2));if(jm("#shipValue").attr("shiptype")==a.type){jm("#shipPrice").attr("value",a.defaultPrice.toFixed(2));jm("#shipPrice").text(a.defaultPrice==0?LS.freeShipping:b+a.defaultPrice.toFixed(2));Mobi.mallStlCalcTotal()}};Mobi.changeShipType=function(){var a=Fai.top._choiceCurrencyVal;jm(".ShipItem").click(function(){var e=jm(this),c=parseFloat(jm("#shipPrice").attr("value")),b=parseFloat(jm("#totalValue").text()),f=parseFloat(e.find(".J_shipPrice").attr("value")),j=parseFloat(e.find(".J_shipPrice").attr("shipType")),d=e.find(".J_shipPrice").text(),h=e.find(".J_shipName").text();jm("#shipPrice").attr("value",f).text(f==0?LS.freeShipping:a+f);jm("#shipValue").attr("shiptype",j).text(h+" ");b=Mobi.calculate(Mobi.calculate(b,c,1),f,0);jm("#totalValue").text(b);jm(".modifyShipDetails .g_close").click();jm(".modifyShipDetails .J_selectShip").removeAttr("style").attr("style","font-size:1rem;height:2.5rem;line-height:2.5rem;float:right;").removeAttr("class").attr("class","faisco-icons-shape11");jm(".modifyShipDetails .faisco-icons-shape11").each(function(k,l){if(jm(this).parent().find(".J_shipPrice").attr("shiptype")==j){jm(this).removeAttr("style").attr("style","margin-right:0.15rem;height:2.5rem;line-height:2.5rem;float:right;").removeAttr("class").attr("class","faisco-icons-right g_color J_selectShip")}})})};Mobi.changeBankList=function(){jm(".bankListArea").click(function(){var c=jm(this),d=c.find(".bankItemValue").eq(2).text(),a=c.find(".bankItemValue").eq(0).text(),b=c.find(".bankItemValue").eq(1).text();jm(".orderDetail_line .bankDetailArea").find(".bankItemValue").eq(2).text(d);jm(".orderDetail_line .bankDetailArea").find(".bankItemValue").eq(0).text(a);jm(".orderDetail_line .bankDetailArea").find(".bankItemValue").eq(1).text(b);jm(".modifyBankList .g_close").click()})};Mobi.getRootFontSize=function(){var a=jm("html").css("font-size");a=a.substring(0,a.length-2);return Number(a)};Mobi.initUseCoupon=(function(j){var e=b.prototype,k,l={};function b(m){this.selectCoupon={};k=this;l.couponList=m;l.couponColorList=["red","orange","yellow","green","blue","pink","purple"],d(m);c();h()}function d(u){Mobi.defaultCouponSelect=-1;var p=parseFloat(jm("#cartTotalPrice").attr("totalPrice"));if(u!="undefined"&&u.length!=0){var n=u[0];if(n!="undefined"){Mobi.defaultCouponSelectId=n.cdId;var m=n.savePrice;var t=n.orderMinPrice;jm("#couponOffsetMoney").text(jm.format(LS.settlementCoupon,m,t));jm("#couponOffsetMoney").attr("_offsetmoney",m);Mobi.selectCoupon.saveMoney=m;Mobi.selectCoupon.id=n.cdId;Mobi.selectCoupon.orderMinPrice=n.orderMinPrice;var q=jm("#useItg");if(p-m<=0){q.val(0);jm("#itgOffsetMoney").text("0.00");jm("#canUse").text(0)}else{var o=p-m;var r=parseInt(q.attr("_needitg"));var s=parseInt(q.attr("_maxuse"));var v=Math.floor((p-m)*r);if(v0){var n=jm("#useItg"),q=parseInt(n.attr("_needitg")),s=parseInt(n.attr("_maxuse"));var o=parseFloat(jm("#cartTotalPrice").attr("totalPrice"));if(isNaN(o)){return}var u=Math.floor((o-r)*q);if(u