/*! LAB.js (LABjs :: Loading And Blocking JavaScript) v2.0.3 (c) Kyle Simpson MIT License */ (function(s,i){var w=s.$LAB,l="UseLocalXHR",r="AlwaysPreserveOrder",o="AllowDuplicates",n="CacheBust",m="Debug",e="BasePath",t=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(t)[0],g=document.head||document.getElementsByTagName("head"),j=(s.opera&&Object.prototype.toString.call(s.opera)=="[object Opera]")||("MozAppearance" in document.documentElement.style),c=function(){},p=c,B=document.createElement("script"),a=typeof B.preload=="boolean",y=a||(B.readyState&&B.readyState=="uninitialized"),z=!y&&B.async===true,A=!y&&!z&&!j;if(s.console&&s.console.log){if(!s.console.error){s.console.error=s.console.log}c=function(E){s.console.log(E)};p=function(F,E){s.console.error(F,E)}}function v(E){return Object.prototype.toString.call(E)=="[object Function]"}function C(E){return Object.prototype.toString.call(E)=="[object Array]"}function h(G,F){var E=/^\w+\:\/\//;if(/^\/\/\/?/.test(G)){G=location.protocol+G}else{if(!E.test(G)&&G.charAt(0)!="/"){G=(F||"")+G}}return E.test(G)?G:((G.charAt(0)=="/"?D:t)+G)}function k(F,G){for(var E in F){if(F.hasOwnProperty(E)){G[E]=F[E]}}return G}function b(F){var G=false;for(var E=0;E0){for(var W=0;W=0;){P=E.shift();O=O[P.type].apply(null,P.args)}return O},noConflict:function(){s.$LAB=w;return I},sandbox:function(){return q()}};return I}s.$LAB=q();(function(G,E,F){if(document.readyState==null&&document[G]){document.readyState="loading";document[G](E,F=function(){document.removeEventListener(E,F,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this); /*! * Site.js * URL:http://www.faisco.com * Only for Guest mode * Sort as * Utils/ModuleFunction/Other Global InitFunction * Sort time @2011-10-22 * Partition time @2012-05-16 */ if(typeof Site=="undefined"){Site={}}Site.genAjaxUrl=function(b){var a="";if(document.location.pathname.indexOf("/manage/")>=0){a="ajax/default.htm"}else{a="ajax/"}return a+b};Site.showMenu=function(o){var s=o.id;if(Fai.isNull(s)){s=""}var q=o.host;var n=0;if(!Fai.isNull(o.mode)){n=o.mode}if(Fai.isNull(o.fixpos)){o.fixpos=true}var l=o.rulerObj;var g=o.navSysClass;if(Fai.isNull(g)){g=""}var e=0;if(!Fai.isNull(o.closeMode)){e=o.closeMode}var k=0;var r=0;if(n==1){k=q.offset().left+q.width();r=q.offset().top}else{k=q.offset().left;r=q.offset().top+q.height()}var c=$("#g_menu"+s);if(c.length!=0){if(e==0){c.attr("_mouseIn",1);return c}else{c.attr("_mouseIn",0);Site.hideMenu();return null}}$(".g_menu").each(function(){$(this).remove()});var C=o.data;if(o.data==null||o.data==""){return null}c=$("
");if(typeof o.container==="string"){var m=$("#g_menu"+s+"Container");if(m.length<1){m=$(o.container);m.attr("id","g_menu"+s+"Container")}m.appendTo($("body"));c.appendTo(m)}else{c.appendTo($("body"))}var v=$("
");v.appendTo(c);Site.addMenuItem(C,v,o);if(o.fixpos){if(r+c.height()+20>$(document).height()){r=q.offset().top-c.height()}}c.css("left",k-Fai.getCssInt(v,"border-left-width")+"px");c.css("top",r+"px");if(e==0){c.mouseleave(function(){c.attr("_mouseIn",0);setTimeout(function(){Site.hideMenu()},100)});c.mouseover(function(){c.attr("_mouseIn",1)});c.click(function(){c.attr("_mouseIn",0);Site.hideMenu()});q.mouseleave(function(){c.attr("_mouseIn",0);setTimeout(function(){Site.hideMenu()},100)});q.mouseover(function(){c.attr("_mouseIn",1)})}else{q.mousedown(function(){c.attr("_mouseIn",2)});c.bind("blur",function(){if(c.attr("_mouseIn")!=2){c.attr("_mouseIn",0);setTimeout(function(){Site.hideMenu()},100)}});c.focus()}if(typeof Site.g_bindMenuMousewheel=="undefined"){Site.g_bindMenuMousewheel=1;$("body").bind("mousewheel",function(){$("#g_menu").remove()})}c.attr("_mouseIn",1);c.slideDown(200);Site.calcMenuSize(c,o);var t=$("#g_menu"+s+">div.content>table>tbody>tr>td.center>table.item");var x=$("#g_menu"+s);var D=(x.outerWidth()-x.width())+(x.find(".content").outerWidth()-x.find(".content").width())+(x.find(".content .middle").outerWidth()-x.find(".content .middle").width())+(x.find(".content .middle .left").outerWidth()-x.find(".content%20.middle%20.right").outerWidth())+(x.find(".content .middle .center").outerWidth()-x.find(".content .middle .center").width());var a=t.first().css("clear");var b=t.first().outerWidth();var j=t.length;if(a=="none"){if(j>1&&b>0){var z=b*j;var w=document.documentElement.clientWidth;var u=x.offset().left;var i=x.offset().right;var B=x.width();var d=q.offset().left;var h=l.outerWidth();var y=l.offset().left;var p=y+h;if(d>w/2){if(zw/2){var A=p-z;x.offset({left:A-D});x.find(".content>.middle").width("100%")}if(z.middle").width("100%")}if(z>w){if(w.middle").width("100%")}else{x.offset({left:y});x.find(".content>.middle").width("100%")}}}else{if(z.middle").width("100%")}if(z.middle").width("100%")}if(z>w){if(w.middle").width("100%")}else{x.offset({left:y});x.find(".content>.middle").width("100%")}}}}}return c};Site.addMenuItem=function(y,b,n,j){if(y.length<=0){return}j=j||"outMenu";var e=["
","
","
"];var r=$(e.join(""));r.appendTo(b);r=r.parent().find(".middle .center");for(var s=0;s"+v.html+"");var o=$(l.join(""));if(h){o.addClass("itemPopup")}if(r.find(" > .subMenu").length>=1){o.insertBefore(r.find(" > .subMenu").first())}else{o.appendTo(r)}if(h){if(h.length==0){}var q=$("");q.appendTo(r);var a=q.find(" > .content");Site.addMenuItem(h,a,n,"thirdMenu");q.mouseleave(function(){$(this).attr("_mouseIn",0);setTimeout(function(){Site.hideSubMenu()},100);if(n.navBar==true&&Fai.isIE()){var B=$("#g_menu"+n.id);var D=B.find(".contentLayer1");var i=D.outerHeight(true);var C=D.outerWidth(true);var A=D.children(".middle").first().outerWidth(true);B.css({width:C+"px",height:i+"px"});D.css({width:A+"px"})}});q.mouseover(function(){$(this).attr("_mouseIn",1)});q.click(function(){$(this).attr("_mouseIn",0);Site.hideSubMenu()})}o.hover(c,m).click(k);if(n.closeMode==1){o.mousedown(u)}function u(){$(".g_menu").attr("_mouseIn",2)}function k(){$(".g_menu").attr("_mouseIn",0);setTimeout(function(){Site.hideMenu()},100)}function m(){var i=$(this);var A=null;$(this).parent().find(" > .subMenu").each(function(){if($(this).attr("itemId")==i.attr("itemId")){A=$(this)}});if(A!=null&&A.length==1){A.attr("_mouseIn",0);setTimeout(function(){Site.hideSubMenu()},100)}else{i.removeClass("itemHover");i.removeClass("itemHoverIndex"+(i.index()+1))}}function c(){var F=$(this);var P=null;$(this).parent().find(" > .subMenu").each(function(R,Q){if($(this).attr("itemId")==F.attr("itemId")){P=$(this)}});if(P!=null&&P.length==1){if(P.css("display")=="none"){if(P.attr("_hadShow")!=1){var A=F.position().left+F.width();var K=F.position().top;if(n.fixpos){var L=F.offset().top+P.height()+20-$(document).height();if(L>0){K=K-L}}P.css("left",A+"px");P.css("top",K+"px");P.slideDown(200);Site.calcMenuSize(P,n);P.attr("_hadShow",1)}else{P.slideDown(200)}}P.attr("_mouseIn",1);if(n.navBar==true&&Fai.isIE()){var i=$("#g_menu"+n.id);var D=i.find(".contentLayer1");var B=P.find(".contentLayer2");var O=D.outerHeight(true);var J=D.outerWidth(true);var I=D.children(".middle").first().outerWidth(true);var N=B.outerHeight(true);var C=B.outerWidth(true);var M=P.position().top;var E=(N+M)-O;var H=E>0?(O+E):O;var G=J+C;i.css({width:G+"px",height:H+"px"});D.css({width:I+"px"})}}else{if($(this).parents(".subMenu").length<=0){if(n.navBar==true&&Fai.isIE()){var i=$("#g_menu"+n.id);var D=i.find(".contentLayer1");var I=D.children(".middle").first().outerWidth(true);var H=D.outerHeight(true);var G=D.outerWidth(true);i.css({width:G+"px",height:H+"px"});D.css({width:I+"px"})}}}F.addClass("itemHover");F.addClass("itemHoverIndex"+(F.index()+1));$(".g_menu").attr("_mouseIn",1)}}};Site.calcMenuSize=function(a,d){a.find(" > .content").each(function(){var m=0;var l=$(" > .middle",this);if(!Fai.isNull(d.minWidth)){m=d.minWidth-Fai.getCssInt(l.find(".left").first(),"width")-Fai.getCssInt(l.find(".right").first(),"width")}var n=m;var k=l.find(" > tbody > tr > .center >.item");k.each(function(){if($(this).width()>m){n=$(this).outerWidth();m=$(this).width()}});k.width(n);k.find(" > tbody > tr > .itemCenter").each(function(){var r=$(this);var o=r.parent().find(" > .itemLeft");var p=r.parent().find(" > .itemRight");r.css("width",(m-o.outerWidth()-p.outerWidth()-r.outerWidth()+r.width())+"px");var q=r.find("a");q.css("width",(r.width()-q.outerWidth()+q.width())+"px")});$(" > .top",this).width(l.width());$(" > .bottom",this).width(l.width())});var c=Fai.top.$(".outMenuTriangle"),b=(c.outerWidth()||0),h=c.length>0,i=d.host,g=i.outerWidth(),e=Fai.top.$(".outMenuMiddle").width(),j=0;j=(Math.min(g,e)-b)/2;if(h&&b){c.css("left",j)}};Site.hideMenu=function(){if(Fai.top._uiMode){return}$(".g_menu").each(function(){var a=$(this);if(a.length!=1){return}if(a.attr("_mouseIn")==1){return}a.remove()})};Site.hideSubMenu=function(){if(Fai.top._uiMode){return}$(".g_menu .subMenu").each(function(){var a=$(this);if(a.length!=1){return}if(a.attr("_mouseIn")==1){return}a.css("display","none");a.parent().find(" >.item").each(function(){if($(this).attr("itemId")==a.attr("itemId")){$(this).removeClass("itemHover")}})})};Site.popupWindow=function(a){var b=true;if(!Fai.isNull(a.saveBeforePopup)){b=a.saveBeforePopup}if(b&&Site.checkSaveBar(a)){return}if($.isFunction(Site.removeAllEditLayer)){Site.removeAllEditLayer()}if(a.version==2){return Fai.popupWindowVersionTwo.createPopupWindow(a)}else{return Fai.popupWindow(a)}};Site.total=function(c){var h={colId:-1,pdId:-1,ndId:-1};var d=$.extend({},h,c);if(d.colId==null||d.colId==""||d.colId<0){d.colId=-1}if(d.pdId==null||d.pdId==""||d.pdId<0){d.pdId=-1}if(d.ndId==null||d.ndId==""||d.ndId<0){d.ndId=-1}var a="",b=navigator.userAgent;if(!b.match(/AppleWebKit.*Mobile.*/)&&!Fai.isIpad()){a="pc"}else{if(Fai.isIpad()){a="ipad"}else{if(Fai.isAndroid()){a="android"}else{if(Fai.isIphone()){a="iphone"}else{a="other"}}}}var e="ajax/statistics_h.jsp@cmd=visited";var g=[];g.push("&colId="+d.colId);g.push("&pdId="+d.pdId);g.push("&ndId="+d.ndId);g.push("&browserType="+Fai.getBrowserType());g.push("&screenType="+Fai.getScreenType(Fai.Screen().width,Fai.Screen().height));g.push("&sc="+d.sc);g.push("&rf="+Fai.encodeUrl(d.rf));g.push("&visitUrl="+Fai.encodeUrl(document.location.href));g.push("&visitEquipment="+a);g.push("&statId="+statId);$.ajax({url:e,type:"post",cache:false,data:g.join(""),success:function(i){}})};Site.sendBrowerInfo=function(a){var b=0;if(a){b=200104}else{b=200105}if(Fai.isChrome()){Site.logDog(b,1)}else{if(Fai.isIE11()){Site.logDog(b,2)}else{if(Fai.isMozilla()){Site.logDog(b,3)}else{if(Fai.isSafari()){Site.logDog(b,4)}else{if(Fai.isIE9()){Site.logDog(b,5)}else{if(Fai.isIE10()){Site.logDog(b,6)}else{if(Fai.isOpera()){Site.logDog(b,7)}else{if(Fai.isIE7()){Site.logDog(b,8)}else{if(Fai.isIE8()){Site.logDog(b,9)}else{if(Fai.isAppleWebKit()){Site.logDog(b,10)}else{if(Fai.isIE6()){Site.logDog(b,12)}else{Site.logDog(b,11)}}}}}}}}}}}};Site.siteStatVisitTime=function(){var a="ajax/statistics_h.jsp@cmd=visittime";var b=[];$.ajax({url:a,type:"post",cache:false,data:b.join(""),success:function(c){}})};Site.report=function(a){setTimeout(function(){if(window.performance){var d=performance.timing;var m=d.fetchStart-d.navigationStart;var h=d.redirectEnd-d.redirectStart;var j=d.domainLookupStart-d.fetchStart;var n=d.unloadEventEnd-d.unloadEventStart;var b=d.domainLookupEnd-d.domainLookupStart;var e=d.connectEnd-d.connectStart;var g=d.responseEnd-d.requestStart;var o=d.domInteractive-d.responseEnd;var p=d.domComplete-d.domInteractive;var l=d.loadEventEnd-d.loadEventStart;var i=d.loadEventEnd-d.navigationStart;var k=[];k.push("&dt="+b);k.push("&ct="+e);k.push("&rt="+g);k.push("&wt="+o);k.push("&pt="+p);k.push("&bt="+Fai.getBrowserType());var c="ajax/statistics_h.jsp@cmd=report";$.ajax({url:c,type:"post",cache:false,data:k.join(""),success:function(q){}})}},500)};Site.fileUpload2=function(c,b,d){Site.logDog(200187,1);var a=Site.fileUploadExtend(b,d);if(c){$(c).unbind("click").bind("click",function(){Site.popupWindow(Site.fileUploadExtend(b,d))})}else{Site.popupWindow(a)}};Site.fileUploadExtend=function(c,e){var d={title:"添加文件",showTitle:true,checkSaveBar:false,crossiframe:"",type:[],maxSize:1,maxUploadList:1,maxChoiceList:1,imgMode:2,imgMaxWidth:4096,imgMaxHeight:4096,netFileMode:false,popUpWinZIndex:0};if(c){$.extend(d,c)}if(d.title==="添加图片"&&d.maxSize>5){d.maxSize=5}if(Fai.top._siteVer!="undefined"&&Fai.top._siteVer==10){d.maxSize=1}var b=d.title;if(d.type.length>0&&d.showTitle){if(Fai.top._siteVer!="undefined"&&Fai.top._siteVer==10){b+=" ( 只能添加"+d.type.join(",")+", 免费版大小不超过"+d.maxSize+"MB )"}else{b+=" ( 只能添加"+d.type.join(",")+", 大小不超过"+d.maxSize+"MB )"}}else{b+=" ( 上传大小不超过"+d.maxSize+"MB )"}var a={title:b,frameSrcUrl:(top._siteDomain?top._siteDomain:"")+"/manage/fileuploadv2.jsp?settings="+Fai.encodeUrl($.toJSON(d))+"&ram="+Math.random()+"&crossiframe="+Fai.encodeUrl(d.crossiframe),width:950,height:690,saveBeforePopup:false,callArgs:"add",closeFunc:e,version:2,popUpWinClass:"fileUploadV2",popUpWinZIndex:d.popUpWinZIndex};if(c.saveBeforePopup!==undefined){a.saveBeforePopup=c.saveBeforePopup}return a};Site.initIframeLoading=function(b,d,h,g){var i=b+d;var c=Fai.top.$("#"+i).parent().width();var a=Fai.top.$("#"+i).parent().height();var e=1;$("#"+i).attr("src",h).load(function(){$("#moduleLoading"+d).hide();$("#refreshFrame"+d).hide();Fai.top.$("#"+i).parent().show();e=2});if(g){$("#moduleLoading"+d).show();Fai.top.$("#"+i).parent().hide();$("#refreshFrame"+d).hide()}else{setTimeout(function(){if(e==1){var j="
";Fai.top.$("#"+i).parent().before(j);Fai.top.$("#"+i).parent().hide()}},3000)}setTimeout(function(){if(e==1){$("#moduleLoading"+d).hide();if(g){$("#refreshFrame"+d).show()}else{var j="";Fai.top.$("#"+i).parent().before(j)}e=3}},30000)};Site.logMsg=function(c){if(!c){return}var b="";var a=c.indexOf("&");if(a>=0){b=c.slice(a,c.length-1)}$.ajax({type:"GET",url:"/ajax/log_h.jsp?cmd=log&msg="+Fai.encodeUrl(c),data:b})};Site.logDog=function(b,a){$.ajax({type:"GET",url:"/ajax/log_h.jsp?cmd=dog&dogId="+Fai.encodeUrl(b)+"&dogSrc="+Fai.encodeUrl(a)})};Site.popupBox=function(r){var g={boxId:0,title:"",htmlContent:"",width:500,height:"",boxName:"",opacity:"0.5",displayBg:true,autoClose:0,extClass:"",popupBoxZIndex:0};g=$.extend(g,r);var a=parseInt(g.boxId);if(a==0||a==null){a=parseInt(Math.random()*10000)}if(g.displayBg){Fai.bg(a,g.opacity,g.popupBoxZIndex)}var p="";if(g.height!=""){p=" min-height:"+(g.height-45)+"px;"}var e=["
",g.htmlContent,"
"];var k=Fai.top.document.documentElement.clientHeight;var d=Fai.top.$("body").scrollTop();if(d<=0){d=Fai.top.$("html").scrollTop()}if(d<=0){d=$(window).scrollTop()}var i="";var o="";var c="";if(g.boxName=="qqLogin"){i="style='padding-top:20px;'";o="style='margin-top:20px;'"}else{if(g.boxName=="addrInfo"){i="style='margin-top:21px;'";o="style='margin-top:24px;'"}else{if(g.boxName=="mallAmountZero"){i="style='height:15px;'";o="style='margin-top:10px;'"}else{if(g.boxName=="confirmReceipt"){o="style='margin-top:10px;'"}else{if(g.boxName=="mallBuy"){o="style='margin-top:10px'"}else{if(g.boxName=="memberFdPwd"){i="style='margin-top:20px;'";o="style='margin-top:20px'"}else{if(g.boxName=="bannerV2"){o="style='margin-top:18px;margin-right:18px;'"}}}}}}}if(g.popupBoxZIndex){c="z-index:"+g.popupBoxZIndex}var n=["
","
",g.title,"
","
",e.join(""),"
","","
"];n=n.join("");var m=Fai.top.$(n).appendTo("body");var l=(k-g.height)/2;if(g.height==""){l=(k-$(".popupCnBg").height())/2}$(m).css("top",l+d);var j=Fai.top.$("#popupBg"+a).outerHeight(true),h=Fai.top.$("#popupBoxContent"+a).outerHeight(true)+120,q=100-(h-j)>0?100-(h-j):0;if(j0){g=e.scrollLeft();e.scrollLeft(0);e.scrollLeft(1);if(e.scrollLeft()===1){e.scrollLeft(g);return true}e.scrollLeft(g)}}var d,b,c=$(window);if(Fai.top._manageMode){d=$("#web");b=$("#g_main")}else{d=$("#g_main");b=$("body")}if(d.length>0){return d.width()>c.width()||a(b)}return false};Site.hasYScrollBar=function(){var a=$("#web");if(Fai.top._manageMode){if($("#g_main").css("overflow-y")==="scroll"){return true}}else{if(a.length>0){if(a.height()>$(window).height()){return true}}}return false};Site.checkEnv=function(p){function a(){var n=$("#nav"),s=0,r;if(n.length<=0){return false}if(Fai.top._navStyleData.ncp.l!==0){return false}if(Fai.top._manageMode){r=$("#g_main")}else{r=$("body")}if(n.offset().left+r.scrollLeft()!==0){return false}if(Fai.top._navStyleData.ns.w!==-1){return false}if(Site.hasYScrollBar()){s=Fai.getScrollWidth()}if(n.width()<$("#webContainer").width()){return false}if(n.width()+s<$(window).width()){return false}return true}function l(s,r){var n=0;if(s<960){return}if(r.length>0){n=$("#g_main").scrollLeft()+r.offset().left+r.width();return(n-o)>(s/2)}}function d(r){var n=false;if(r.attr("_intab")>0||r.attr("_inmulmcol")>0||r.attr("_side")==1){return}if(l(i,r)){j.push(r.prop("id"))}}var c=$(window),i=c.width(),m=0,o=0,j=[],k=[],q=$("#logoImg:visible"),b=$("#corpTitle"),g=$("#nav"),h,e;if(!$.isFunction(p)){p=function(){}}if(Site.hasYScrollBar()){i=i-Fai.getScrollWidth()}e={rightOverList:k,hasXScrollBar:Site.hasXScrollBar(),viewWidth:i};if(!e.hasXScrollBar){p(e);return}if(Fai.top._manageMode){m=$("#web").width()}else{m=$("#g_main").width()}o=(m/2);Fai.top.$(".absForms >.form").each(function(r,n){d($(n))});Fai.top.$(".floatForms >.form").each(function(r,n){d($(n))});if(j.length>0){k.push("floatModule")}if(b.length>0){if(l(i,b)){k.push("title")}}if(g.length>0){if(a()){h=g.find(".navContent");if(Fai.top._navStyleData.cp.y==1||Fai.top._navStyleData.cs.w!==-1){if(h.length>0&&l(i,h)){k.push("fullmeasureNav")}}}else{if(l(i,g)){k.push("nav1")}else{g=$("#nav .navMainContent").first();if(l(i,g)){k.push("nav2")}}}}if(l(i,$("#webContainer"))){k.push("background")}if(Fai.top._useBannerVersionTwo){if(Fai.top._bannerV2Data.blw.t===2){if(l(i,$("#bannerV2"))){k.push("bannerV2")}}}else{if(Site.getWebBackgroundData().wbws===1){if(l(i,$("#fk-webBannerZone"))){k.push("banner")}}}$("#fullmeasureTopForms").find(".fullmeasureContent").each(function(r,s){var n=$(s);if(n.width()>$("#webContainer").width()&&l(i,n)){k.push("fullmeasure");return false}});if(q.length>0){if(l(i,q)){k.push("logo")}}p(e);if(Fai.top._manageMode){$.each(j,function(r,n){$("#"+n).css("border","dashed black 5px")})}};Site.checkManageEnv=function(){if(!Fai.top._manageMode){return}Site.checkEnv(function(c){var d=c.rightOverList,g=c.viewWidth,a=d.length,i="",b="",e=[],h;h={floatModule:"--网站浮动模块位置;\n",logo:"--网站LOGO的宽度或位置;\n",title:"--网站标题宽度或位置;\n",fullmeasureNav:"--通栏式导航内容区位置设置项、宽度;\n",nav1:"--导航栏宽度或位置。;\n",nav2:"--导航应用了网站宽度并且存在水平偏移。请自定义导航内容区宽度;\n",banner:"--网站横幅宽度;\n",bannerV2:"--横幅2.0宽度;\n",background:"--网站背景宽度;\n",fullmeasure:"--通栏宽度;\n"};while(a>0){a--;if(h[d[a]]){e.push(h[d[a]])}}if(e.length>0){e.unshift("窗口宽度:"+g+";\n","导致模块滚动条出现的原因:\n")}else{e.push("没有检测到横向超出的元素。")}i='[了解更多]';b='';e.push(i);e.push(b);e='
'+$.trim(e.join("
"))+"
";Site.popupWindow({title:"横向滚动条检测结果",divContent:e,closeBtnClass:"J_checkEvnCloseBtn"})})};Site.checkVisitEnv=function(){var g,d;if(Fai.top._manageMode||Fai.top._oem){return}g={get:function(i){var h=window.sessionStorage;return h?h.getItem(i):$.cookie(i)},set:function(i,j){var h=window.sessionStorage;h?h.setItem(i,j):$.cookie(i,j)}};Site.checkEnv(function(h){var m=a("fkScrollBarCheck"),n=a("fkScreenSize"),j=h.rightOverList,l={},o=location.href,i,k;if(!m.has(o)&&j.length>0){k=c(j);l[k.dogId]=k.dogSrc;m.add(o)}if(!n.has(o)){i=b(),l[i.dogId]=i.dogSrc;n.add(o)}if(i||k){e(l)}});function b(){var j=$(window).width(),k=200094,h,i;i={"1200":1,"960":2,other:3,normal:4};if(Site.hasXScrollBar()){if(j>=1200){h=i["1200"]}else{if(j>=960&&j<1200){h=i["960"]}else{h=i.other}}}else{h=i.normal}return{dogId:k,dogSrc:h}}function c(j){var l=$(window).width(),i=j.length,n=[],o,h,k,m;k={floatModule:1,nav1:2,nav2:2,background:3,banner:4,logo:6,title:7,fullmeasure:8,fullmeasureNav:9,bannerV2:10};m={"1200":200079,"960":200080};if(l>=1200){o=m["1200"]}else{if(l>=960&&l<1200){o=m["960"]}}while(i>0){i--;h=k[j[i]];if(h!==undefined){if($.inArray(h,n)===-1){n.push(h)}}}return{dogId:o,dogSrc:n}}function e(i,h){if(i!==undefined){if($.type(i)==="object"){i=$.toJSON(i);Site.logDog(i,h);return}if($.type(h)==="array"){if(!h.length){return}h=$.toJSON(h);Site.logDog(i,h);return}if(h!==undefined){Site.logDog(i,h)}}}function a(i){var h={index:i,get:function(){var j=g.get(h.index);try{j=$.parseJSON(j)}catch(k){}if($.isArray(j)){return j}return[]},add:function(k){var j=h.get();if($.inArray(k,j)===-1){j.push(k);g.set(h.index,$.toJSON(j))}},has:function(j){return $.inArray(j,h.get())>-1}};return h}};Site.closeCheckEnvWindow=function(){var a=$(".J_checkEvnCloseBtn");if(a.length>0){a.trigger("click")}};Site.initPdNavfold=function(b){var e=$("#module"+b);if(e.parent("#leftForms").length>0){var s=e.find(".g_foldContainerPanel");if(s.find(".g_foldContainerValueRight.foldChange_J").length>0){s.find(".g_foldContainerValueCenter a").css("max-width","140px")}}if(e.find(".g_vertFold").length>0){var k=e.find(".pdLevel a");if(Fai.isIE6()||Fai.isIE7()){$.each(k,function(t,u){if($(u).width()>155){$(u).width(155)}});return}var c=e.width();if(c>210){k.css("max-width",c-55+"px")}return}var m=e.find(".g_foldContainerPanel");var d=m.length;var a=0;var q=0;var l=[];var j=[];for(var h=0;h-1){var i=A.split("=")[0].replace("_li","");if(!isNaN(i)){d.find(".childrenDiv").find("[childGroupId="+i+"]").addClass("g_selected")}}})}if(e.length==4){var s=Fai.getHashParam(a,"_plc");var p=Fai.getHashParam(a,"labelId");if(s>-1){if(!isNaN(p)){d.find(".childrenDiv").find("[foldId="+p+"]").addClass("g_selected")}}else{if(!isNaN(p)){d.find(".g_foldContainerContent").find("[groupId="+p+"]").addClass("g_selected")}}}}else{if(g==9&&e.length==3){var w=e[2].split("~");if(w.length==1&&!isNaN(w[0])){d.find(".g_foldContainerContent").find("[groupId="+w[0]+"]").addClass("g_selected")}else{var b=Site.getUrlParamObj("?"+a);var o=false;if(!b){return}if(!Fai.checkBit(h,4)){$.each(b,function(i,B){if(i.indexOf("_fi")>-1){var A=i.split("=")[0].replace("_fi","");if(!isNaN(A)&&!isNaN(B)){d.find("#childrenDiv"+A+"M"+x).find("[childGroupId="+B+"]").addClass("g_selected")}}})}else{$.each(b,function(C,F){if(C.indexOf("_fi")>-1){var E=C.split("=")[0].replace("_fi","");var D=l.blob0;var A=0;for(var B=0;B0){a="fromColId="+e+"&"}var i=k[1];if(i<=0||i!=c.id){return a}a+="mid="+i+"&";if(k.length<=2){return a}if(j=="_np"&&k.length>=3){if(k.length>=4){return a+="groupId="+k[2]+"&_ngc="+k[3]}return a+="groupId="+k[2]}else{if(j=="_php"&&k.length>=3){return a+="groupId="+k[2]}else{if(j=="_pp"){switch(g){case 26:if(k.length>=4){return a+="groupId="+k[2]+"&_pgc="+k[3]}break;case 21:if(k.length>=3){return a+="_ci="+k[2]}break;case 38:if(k.length==3){var b=k[2].split("~");$.each(b,function(m,n){if(n>-1){a+="_li"+m+"="+n+"&"}});return a}else{if(k.length>=4){if(k[3]<0){return a+="labelId="+k[2]}return a+="labelId="+k[2]+"&_plc="+k[3]}}break;case 9:if(k.length==3){var h=k[2].split("~");if(h.length!=c.blob0.length){return}$.each(h,function(n,m){if(m>-1){a+="_fi"+n+"="+m+"&"}});return a}break;case 95:case 96:if(k.length==3){var l=k[2].split("~");if(l.length<1){return a}if(c.prop0==0){return a+="groupIdList="+JSON.stringify(l)}else{if(c.prop0==1){return a+="_pni="+JSON.stringify(l)}}}break;default:return a;break}}}}};Site.floatTip=function(d){var r={moduleId:"",targetId:"",tipText:"",cusClass:"",direction:3};r=$.extend(r,d);if(r.moduleId.length==0||r.targetId.length==0||r.tipText.length==0){return}$(Fai.top.document).find(".J_floatTip_"+r.moduleId).remove();var l=Fai.isIE6()||Fai.isIE7()||Fai.isIE8();var u=[];var k="floatTip_content";var s="floatTip_right";var m="floatTip_arrow";var q="floatTip_left";var p="floatTip_"+r.moduleId+"_"+r.targetId;if(l){k+=" floatTip_content_IE ";s+=" floatTip_right_IE ";m+=" floatTip_arrow_IE ";q+=" floatTip_left_IE "}u.push("
\n");u.push("
");u.push("
");u.push("
");u.push("
"+r.tipText+"
");u.push("
\n");$(Fai.top.document).find("#g_main").append(u.join(""));var b=$("#"+r.moduleId);var t=$(b).find("#"+r.targetId);var a=$("#"+p);var i=$(".floatLeftTop").offset().top;var c=(Fai.top._manageMode)?$("#g_main").scrollTop():$("body").scrollTop();if(Fai.isIE6()){c=$("#g_main").scrollTop()}if(c==0){c=$("html").scrollTop()}var e=a.height();var n=a.width()*0.7;var h=t.width()*0.8;var g=t.height();var o=t.offset().left+(h-n);var j=t.offset().top+c-i;$("#"+p).show().css({top:j+"px",left:o+"px","z-index":9031});setTimeout(function(){if(l){var v=j-e-10+(g/3);$("#"+p).animate({top:v+"px",opacity:1,filter:"alpha(opacity=100)"},300)}else{var v=j-e+(g/3);$("#"+p).css({top:v+"px",opacity:1})}},50);$(t).unbind("click").bind("click",function(){if($(this).hasClass("focusBg")){$(this).removeClass("focusBg")}$("#floatTip_"+r.moduleId+"_"+r.targetId).remove()})};Site.floatTip_clear=function(a){$(Fai.top.document).find(".J_floatTip_"+a).remove()};Site.moduleSubPanel=function(n){var e={that:null,moduleId:null,idStr:"",clsStr:"",contentStr:""};$.extend(e,n);if(e.that==null){return}var a,c=e.moduleId,d=$("#module"+c),m=k(d),o=i(d,c);o=o+" modulePattern "+d.attr("class");o=o.replace("formInZone","");var b=[""];a=$(b.join(""));a.appendTo("body");if(d.hasClass("formStyle76")){j()}else{l()}function j(){var r=d.find(".pd_mall_G_J"),p=d.find(".p_m_cotainer_J"),q;r.off("mouseleave.pr").on("mouseleave.pr",function(){q=setTimeout(function(){h(e.moduleId)},20)});a.off("mouseleave.pr").on("mouseleave.pr",function(){h(e.moduleId);if(parseInt(d.attr("_side"))===2){Site.startFlutterInterval(d)}if(parseInt(d.attr("_side"))===1){var s=d.outerWidth();d.animate({left:-s},{queue:false,duration:500})}});a.off("mouseenter.pr").on("mouseenter.pr",function(){if(q){clearTimeout(q);if(parseInt(d.attr("_side"))===2){Site.stopFlutterInterval(d)}if(parseInt(d.attr("_side"))===1){d.animate({left:0},{queue:false,duration:500})}}})}function l(){a.mouseleave(function(){a.attr("_mouseIn",0);setTimeout(g,100)});a.mouseover(function(){a.attr("_mouseIn",1)});e.that.mouseleave(function(){a.attr("_mouseIn",0);setTimeout(g,100)});e.that.mouseover(function(){a.attr("_mouseIn",1)});if(parseInt(d.attr("_side"))===2){a.mouseleave(function(){Site.startFlutterInterval(d)});a.mouseenter(function(){Site.stopFlutterInterval(d)})}}function h(r){var q=$("#module"+r).find(".p_m_cotainer_J"),p=$(".g_m_s_J");p.has(".form"+r).remove();q.removeClass("bold p_m_hover g_border");q.find(".p_m_value_J").removeClass("g_stress");q.each(function(){var s=$(this);if(s.attr("_chd")==1){s.find(".p_m_cotainerR_J").addClass("p_m_more")}})}function g(){$(".g_m_s_J").each(function(){var p=$(this);if(p.length!=1){return}if(p.attr("_mouseIn")==1){return}p.remove()})}function k(t){var r=t.attr("_intab")||0,s=t.attr("_inpack")||0,w=t.attr("_inmulmcol")||0,p=t.attr("_infullmeasure")||0,q=0,v="",u="";if(r==0&&w==0&&p==0&&s==0){u=t.parent().attr("class");u=u.replace("J_moduleZone","").replace("fk-webBannerZone","").replace("fk-moduleZone","").replace("ui-sortable","");return u}else{if(r>0){q=r}else{if(w>0){q=w}else{if(p>0){q=p}else{if(s>0){q=s}}}}v=Fai.top.$("#module"+q);return k(v)}}function i(t,q){var v=t.attr("_intab")||0,p=t.attr("_inmulmcol")||0,u=t.attr("_infullmeasure")||0,s=t.hasClass("modulePattern")||false,w="",y=t.attr("class")||"",r=/modulePattern\d+/,x="";if(s){return y.match(r)}else{if(v==0&&p==0&&u==0){return y.match(r)}else{if(v>0){x=v}else{if(p>0){x=p}else{if(u>0){x=u}}}w=Fai.top.$("#module"+x);return i(w,q)}}}return a};Site.mobiPlatform=function(b){if(!Fai.top._siteDemo||Fai.top._designAuth){return}if(typeof(Fai.top.top)!="undefined"&&typeof(Fai.top.top.$)!="undefined"){var w=Fai.top.top.$(".fk-quickViewTemplateContent");if(w.length>0&&w.is(":visible")){return}}var h=[],i=false,s="mobiPlatform",n=document.domain,q={},d={},m={w:0,h:0},t=Fai.top.$("body"),z=Fai.getScrollWidth(),k=400,o=600,c=$.cookie("mobiPlatformBg",{domain:n,path:"default.htm"})||0,A=parseInt($.cookie("mobiPlatformIconFlag",{domain:n,path:"default.htm"}))||0,x="display:none;",r="",p="",g,y,l,a,v,u;var B={refresh:false};$.extend(B,b);if(Fai.isIE){if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){i=true}}if(A>0){x="";r="display:none;";p=A==1?"mobiPlatformIcon_right":"mobiPlatformIcon_left"}q.big={};q.big.className="mobiPlatform_big";q.big.w=265;q.big.h=490;q.big.cw=295;q.big.ch=592;q.small={};q.small.className="mobiPlatform_small";q.small.w=265;q.small.h=400;q.small.cw=291;q.small.ch=483;m=Site.mobiPlatform.getWindowSize();if(m.h<=800){d=q.small}else{d=q.big}Site.mobiPlatform.nowSize=d;if(t.children("#mobiPlatform").length<1){h.push("
");h.push(" ");h.push("
");if(!i){h.push("
");h.push("
");h.push("
")}else{h.push("
");h.push(" ");h.push("
")}h.push("
");h.push(" ");h.push(" ");h.push("
");h.push("
");h.push(" ");h.push("
");Fai.top.$("body").append(h.join(""));g=t.children("#mobiPlatform");y=t.children("#mobiPlatformIcon");a=g.find(".J_closeBtn");v=g.find(".J_hoverTip");g.draggable({scroll:false,cursor:"move",distance:10,containment:"parent",cancel:".J_innerCover",start:function(C,D){g.find(".J_innerCover").show()},stop:function(C,I){g.find(".J_innerCover").hide();g.attr("moved","1");if(!c){c=1;$.cookie("mobiPlatformBg",1,{expires:365,domain:n,path:"/"})}d=Site.mobiPlatform.nowSize;m=Site.mobiPlatform.getWindowSize();var H=true,J={x:1,y:1},D=4,G=t.children(".floatLeftTop"),N=G.offset(),F=~~(G.css("top").replace("px","")),M=m.h-d.ch,E=M-(I.offset.top-(N.top-F)),L=m.w-d.cw,K=L-(I.offset.left-N.left);if(K<(L/2)){K-=z;J.x=1}else{J.x=0}if(E<(M/2)){J.y=1}else{J.y=0}if(!(KD)){H=false}if(!(ED)){H=false}if(!H){if(J.y==1){if(E<=D){g.attr("direction","4")}}else{if(E>=M){g.attr("direction","3")}}if(J.x==1){if(K<=D){if(g.attr("direction")==3){g.css({bottom:"auto",top:0})}else{if(g.attr("direction")==4){g.css({bottom:0,top:"auto"})}}g.attr("direction","2").css({right:0,left:"auto"}).animate({right:(-d.cw)+"px"},k,function(){y.removeClass("mobiPlatformIcon_left").addClass("mobiPlatformIcon_right").fadeIn();g.hide();$.cookie("mobiPlatformIconFlag",1,{expires:365,domain:n,path:"/"})})}}else{if(K>=L){if(g.attr("direction")==3){g.css({bottom:"auto",top:0})}else{if(g.attr("direction")==4){g.css({bottom:0,top:"auto"})}}g.attr("direction","1").css({right:"auto",left:0}).animate({left:(-d.cw)+"px"},k,function(){y.removeClass("mobiPlatformIcon_right").addClass("mobiPlatformIcon_left").fadeIn();g.hide();$.cookie("mobiPlatformIconFlag",2,{expires:365,domain:n,path:"/"})})}}if(g.attr("direction")==3){g.animate({bottom:"auto",top:(-d.ch)+"px"},o,function(){y.removeClass("mobiPlatformIcon_left").addClass("mobiPlatformIcon_right").fadeIn();g.hide();$.cookie("mobiPlatformIconFlag",1,{expires:365,domain:n,path:"/"})})}else{if(g.attr("direction")==4){g.animate({top:(M+d.ch)+"px",bottom:"auto"},o,function(){y.removeClass("mobiPlatformIcon_left").addClass("mobiPlatformIcon_right").fadeIn();g.hide();$.cookie("mobiPlatformIconFlag",1,{expires:365,domain:n,path:"/"})})}}}}});if(!i){var e=document.createElement("iframe"),j=g.find(".J_innerIframe");e.style.width=d.w+"px";e.style.height=d.h+"px";e.style.border="none";e.src=Fai.top._mobiAdmHost;e.id="mobiFrame";if(e.attachEvent){e.attachEvent("onload",function(){g.find(".J_loading").remove();g.removeClass("mobiPlatform-hide")})}else{e.onload=function(){g.find(".J_loading").remove();g.removeClass("mobiPlatform-hide");if(Fai.isSafari()){var C=$(document.getElementById("mobiFrame").contentWindow.document.body);C.find("#g_web").css("position","fixed");C.find("#g_web").css("height","100%")}}}j.find("iframe").remove();j.append(e);l=$(e)}else{g.removeClass("mobiPlatform-hide")}Fai.top.$(window).off("resize.mobiPlatform");Fai.top.$(window).on("resize.mobiPlatform",function(){Site.mobiPlatform({refresh:true})});a.click(function(){d=Site.mobiPlatform.nowSize;m=Site.mobiPlatform.getWindowSize();rangeHeight=m.h-d.ch;rangeWidth=m.w-d.cw;nowWidth=rangeWidth-g.offset().left;var C=0;var D=g.attr("direction");if(g.attr("moved")=="0"){if(D=="0"){C=2}else{if(D=="1"){C=3}else{if(D=="2"){C=2}}}}else{if(nowWidth<(rangeWidth/2)){C=1}else{C=3}}if(C==1){g.animate({left:(rangeWidth+d.cw)+"px",right:"auto"},o,function(){y.removeClass("mobiPlatformIcon_left").addClass("mobiPlatformIcon_right").fadeIn();g.attr("direction","5").hide()})}else{if(C==2){g.animate({left:"auto",right:(-d.cw)+"px"},o,function(){y.removeClass("mobiPlatformIcon_left").addClass("mobiPlatformIcon_right").fadeIn();g.attr("direction","5").hide()})}else{if(C==3){g.animate({left:(-d.cw)+"px",right:"auto"},o,function(){y.removeClass("mobiPlatformIcon_right").addClass("mobiPlatformIcon_left").fadeIn();g.attr("direction","1").hide()})}}}});g.hover(function(){u=Fai.top.$("#mobiPlatformBg");if(u.length<1){var C=[];C.push("
");if($.browser.msie&&$.browser.version==6){C.push("")}else{C.push("
")}g.before(C.join(""));u=Fai.top.$("#mobiPlatformBg")}u.stop(true).show().animate({opacity:0.6},500);if(!c){v.stop(true).show().animate({opacity:1})}else{v.hide()}},function(){u.stop(true).animate({opacity:0},500,function(){u.hide()});if(!c){v.stop(true).animate({opacity:0},400,function(){v.hide()})}else{v.hide()}})}else{g=t.children("#mobiPlatform");y=t.children("#mobiPlatformIcon");if(!i){l=g.find("iframe")}if(B.refresh){g.attr("class","mobiPlatform "+d.className);if(!i){l.css({width:d.w+"px",height:d.h+"px"})}}if(!B.refresh){g.show();if(g.attr("direction")==2){g.attr("moved","0").animate({right:"10px"},k,function(){y.fadeOut()})}else{if(g.attr("direction")==1){g.attr("moved","0").animate({left:"10px"},k,function(){y.fadeOut()})}else{g.attr("direction",0).attr("moved","0").css({top:"auto",left:"auto",right:(-d.cw)+"px",bottom:"10px"}).animate({right:"10px"},k,function(){y.fadeOut()})}}$.cookie("mobiPlatformIconFlag",0,{expires:365,domain:n,path:"/"})}}};(function(a){a.getWindowSize=function(){var b={w:0,h:0};if(window.innerWidth&&window.innerHeight){b.w=window.innerWidth;b.h=window.innerHeight}else{if(document.documentElement){b.w=document.documentElement.clientWidth;b.h=document.documentElement.clientHeight}else{if(document.body.clientWidth&&document.body.clientHeight){b.w=document.body.clientWidth;b.h=document.body.clientHeight}}}return b}})(Site.mobiPlatform);Site.Pagenation=(function(d){var c;function b(i,g,j){var h=d("#pagenation"+i);c=g;h.css("text-align","center");e(g,h);a(i,h,j)}function e(j,k){var m=Math.ceil(j.totalSize/j.pageSize),h=j.pageNo||1;if(k.length!=0){var g=[],l=0;g.push("
");if(h==1){g.push(""+LS.prevPager+"")}else{g.push(""+LS.prevPager+"")}g.push("
");if(h==1){g.push("
1
")}else{g.push("")}if(h-2>2){g.push("
...
");for(l=h-2;l"+l+"")}}else{for(l=2;l"+l+"")}}if(h!=1&&h!=m){g.push("
"+h+"
")}if(h+2"+l+"")}g.push("
...
")}else{for(l=h+1;l<=m-1;l++){g.push("")}}if(h==m){g.push("
"+m+"
")}else{g.push("")}g.push("
");if(h==m){g.push(""+LS.nextPager+"")}else{g.push(""+LS.nextPager+"")}g.push("
");k.html(g.join(""))}}function a(h,g,i){d("body").off("click","#pagenation"+h+" .g_border");d("body").on({hover:function(){d(this).addClass("g_hover")},mouseleave:function(){d(this).removeClass("g_hover")},click:function(){var k=g.find(".pageNo").not(":has('.g_border')").text();var j=1;if(d(this).parent().hasClass("pagePrev")){j=Number(k)-1}else{if(d(this).parent().hasClass("pageNext")){j=Number(k)+1}else{j=Number(d(this).text())}}c.pageNo=j;i(h,j);e(c,g)}},"#pagenation"+h+" .g_border")}return b})(jQuery);Site.loadCss=function(b,g,e){var c=document.createElement("link");supportOnload="onload" in c,isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536,protectNum=600000;g=typeof g=="function"?g:function(){};c.rel="stylesheet";c.type="text/css";c.href=b;if(typeof e!=="undefined"){c.id=e}document.getElementsByTagName("head")[0].appendChild(c);if(isOldWebKit||!supportOnload){setTimeout(function(){a(c,g,0)},1);return}if(supportOnload){c.onload=d;c.onerror=function(){d()}}else{c.onreadystatechange=function(){if(/loaded|complete/.test(c.readyState)){d()}}}function d(){c.onload=c.onerror=c.onreadystatechange=null;c=null;g()}function a(l,m,k){var j=l.sheet,h;k+=1;if(k>protectNum){h=true;l=null;m();return}if(isOldWebKit){if(j){h=true}}else{if(j){try{if(j.cssRules){h=true}}catch(i){if(i.name==="NS_ERROR_DOM_SECURITY_ERR"){h=true}}}}setTimeout(function(){if(h){m()}else{a(l,m,k)}},20)}};Site.checkScriptLoad=function(g){if(typeof g=="undefined"||g.length<1){return}var c=document.scripts,b=c.length-1,e="",a=false,d;for(d=b;d>=0;d--){e=c[d].getAttribute("src")||"";if(e==g){a=true;break}}return a};Site.demandLoadJs=function(b,a){if(typeof b=="undefined"||b.length<1){return}if(!Site.checkScriptLoad(b)){if(typeof a=="function"){$LAB.script(b).wait(function(){a()})}else{$LAB.script(b)}}};Site.checkCssLoad=function(c){if(typeof c=="undefined"||c.length<1){return}var g=document.styleSheets,b=g.length-1,d="",a=false,e;for(e=b;e>=0;e--){src=g[e].href||"";if(src==c){a=true;break}}return a};Site.demandLoadCss=function(a,b){if(typeof a=="undefined"||a.length<1){return}if(!Site.checkCssLoad(a)){Site.loadCss(a,b)}};Site.initContentSplitLine=function(a,c){var b=$("#module"+a),h,r;if(b.hasClass("formStyle12")||b.hasClass("formStyle13")){var q=b.hasClass("formStyle13"),l=q?".f-textListPropSep":".f-hotTextListPropSep";h=q?b.find(".productTextListTable:first"):b.find(".productHotTextListTable:first");r=q?b.find(".productTextListProp"):b.find(".productHotTextListProp");if(h.length>0){$(function(){Fai.top.Fai.setCtrlStyleCssList("stylemodule","module"+a,[{cls:".g_separator",key:"margin-top",value:"-"+parseInt(h.css("margin-top").replace("px"))/2+"px"},{cls:".g_separator",key:"margin-bottom",value:"-"+parseInt(h.css("margin-bottom").replace("px"))/2+"px"}])})}if(r.length>0){var o=r.css("background-color");if(typeof o=="string"&&o.length>0){o=o.replace(/\s/g,"");if(o!="rgba(0,0,0,0)"&&o!="transparent"){$(function(){Fai.top.Fai.setCtrlStyleCssList("stylemodule","module"+a,[{cls:l,key:"display",value:"none"}])})}}}}if(b.length<1||typeof c=="undefined"||c.y!=2){return}var g=c.w?c.w:1,n=c.c?c.c:"#000",k=Number(c.s),e=b.find(".g_separator");if(isNaN(k)||k<3||k>8||e.length<1){return}if(Fai.isIE6()||Fai.isIE7()){e.css({fontSize:0,height:0,lineHeight:0,borderColor:c.c,borderWidth:c.w+"px",borderStyle:"solid",borderLeft:"none",borderTop:"none",borderRight:"none"});return}var p="",j="",m,d;m=["─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ","-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·","-··-··-··-··-··-··-··-··-··-··","— - — - — - — - — - — - — - — - "];j=m[k-3];for(d=0;d<3;d++){j+=j}p+=j+"";e.addClass("g_foldTextLine").html(p);Site.checkSplitLineEnough(a)};Site.checkSplitLineEnough=function(h){var c=$("#module"+h),d=c.find(".g_separator");if(c.length<1||d.length<1){return}var e=d.find("span"),b=d.width(),a=e.width(),g=e[0].innerHTML;doubleText=g+g;if(a==0||b==0){e.html(doubleText+g)}else{if(a0){g=a;$elem=$("#module"+g);if($elem.attr("_modulestyle")==29){e-=$("#formTabButtonList"+g).height()}continue}else{j=true}}if(g==c&&$("#module"+c).attr("_modulestyle")==80){e=document.getElementById("module"+c).offsetTop+i}else{e+=$("#module"+c).offset().top-$("#fk-toolTopBar").height()-$("#memberBarArea").height()}$("html, body, #g_main, #web").animate({scrollTop:e},{duration:500,easing:"swing"});if(b!=""){$("#navCenter").find(".itemHover").removeClass("itemHover")}};Site.getTopWindow=function(){return(typeof Fai!="undefined"&&Fai.top)||window};Site.changeABVersion=function(){if(Site.isBUser()){$.cookie("isBUser","false")}else{$.cookie("isBUser","true")}window.location.reload()};Site.isBUser=function(){var a=false;if(Fai.top._aid%2==1){a=true}if($.cookie("isBUser")!=null){a=$.cookie("isBUser")==="true"?true:false}return a};(function(c,a,d){a.runSiteInit=function(){var l=[81,97],m=l.length,h,k,g,e;for(g=0;g0){j=b[k];g=b[k].length;for(e=0;e0){n.children().remove();n.prepend(l.newsCommentHtml)}g.find("#commentTotalSize").text(l.commentSize);var t=g.find("#prevAndNextDiv");if(t.length>0){if(l.newsNextPreHtml){t.children().remove();t.prepend(l.newsNextPreHtml)}else{t.remove()}}var p=g.find(".newsViewCount");if(p.length>0){p.text(l.newsView)}g.prepend(l.newsDetailScripts)}var h=o.productDetail;if(h){var g=Fai.top.$("#module"+h.moduleId);var x=g.find("#accumulativeComment");if(h.productCommentHtml&&x.length>0){x.children().remove();x.prepend(h.productCommentHtml)}g.find("#commentTotalSize").text(h.commentSize);var t=g.find("#prevAndNextDiv");if(h.productNextPreHtml&&t.length>0){t.children().remove();t.prepend(h.productNextPreHtml)}g.prepend(h.productDetailScripts)}var d=o.photoDetail;if(d){var g=Fai.top.$("#module"+d.moduleId);var m=g.find("#singlePhotopagenation"+d.moduleId);if(m.length>0){if(d.photoNextPreHtml){m.children().remove();m.prepend(d.photoNextPreHtml)}else{m.remove()}}}Site.fixSiteWidth(Fai.top._manageMode);Site.fixWebFooterHeight()}}})};function loadWholeModuleDom(b,c){var a=Fai.top.$("#module"+b);a.children().remove();a.prepend(c);Site.checkSideModule(a)}Site.getUrlParamObj=function(a){var d=new Object();if(a.indexOf("?")!=-1){var g=a.substr(1);strs=g.split("&");for(var c=0;c");b.push("目前你已有.com/.net/域名由于未实名认证,已被域名管理局停止访问,现在进行实名认证,可恢复访问    前往实名认证");b.push("");$.cookie("hasShowDomainAuthTips",true,{expires:90});Site.logDog(4000048,0);$("body").before(b.join(""))}}})};Site.getHtmlUrl=function(a){return Fai.top._allowedHtmlUrl&&Fai.top._openHtmlUrl?("h-"+a+".html"):(a+".jsp")};Site.accumulateWidth=function(c){var d=$("#fk-rbar-myItem-ImgShow-"+c),b=parseInt(d.find(".fk-rbar-myItem-Img").attr("width")),g=parseInt(d.find(".fk-rbar-myItem-Img").attr("height")),h=b+20,i=g+50,e=g+8,a=g+20;d.css({width:h+"px",height:i+"px",top:"-"+e+"px"});d.find(" .fk-rbar-myItem-Img").css({width:b+"px",height:g+"px"});d.find(" .fk-rbar-myItem-TextView").css({left:"10px",width:b+"px",top:a+"px"})};Site.forPayPopup=function(i,l,h,j,d){var a=arguments.callee.caller.arguments[0]||window.event,b=$(a.target);var k=a.clientX,g=a.clientY;Site.forPayPopup.timer=Site.forPayPopup.timer||null;if(j==0){clearTimeout(Site.forPayPopup.timer)}else{clearTimeout(Site.forPayPopup.timer);Site.forPayPopup.timer=setTimeout(function(){$(".features_container").remove()},300);return}function c(t,p){Site.logDog(200170,5);var s="",m="";if(l=="网站标准版"){m=p.std_lists}else{if(l=="网站专业版"){m=p.pro_lists}else{if(l=="商城基础版"){m=p.bus_lists}}}var r='
建议升级'+l+"
";var o='
特色功能:
'+p.title.text+"
";var n='
    ';for(var q=0;q"+m[q]+""}n+="
立即升级
";s=r+o+n;t.append(s)}var e={title:{text:h,cla:"bgm_color"},std_lists:["无广告","百度关键词设置","7x24小时安全监控"],pro_lists:["百度优化——推广必备","支持QQ、微信登录","文章评论、提升品牌口碑"],bus_lists:["在线商城","微信支付、积分系统","打折、满减等促销"]};var k=b.offset().left-20,g=b.offset().top+30;b.attr("title","");if(i<30&&l=="网站标准版"){c($("body"),e);$(".titleFontColor").css("color","#faae54");$(".features_title .bgm_color").css("color","#faae54")}else{if(i<40&&l=="网站专业版"){c($("body"),e);$(".titleFontColor").css("color","#f55c7d");$(".features_title .bgm_color").css("color","#f55c7d")}else{if(i<50&&l=="商城基础版"){c($("body"),e);$(".titleFontColor").css("color","#557ce1");$(".features_title .bgm_color").css("color","#557ce1")}}}$(".features_container").mouseenter(function(){clearTimeout(Site.forPayPopup.timer);$(".features_container").show();activeFlag=true}).mouseleave(function(){clearTimeout(Site.forPayPopup.timer);$(".features_container").hide();Site.forPayPopup.timer=setTimeout(function(){$(".features_container").remove()},300)});$(".features_container").css({position:"absolute",left:k+"px",top:g+"px",overflow:"hidden"})};Site.bindInTabSwitch=function(){$(".formStyle29").each(function(){var h=$(this).attr("id").replace("module","");if(Fai.top["tabModule"+h+"Switch"]){$(this).find(".formTabButton").off("mouseenter.tab").addClass("formTabButtonClick")}else{$(this).find(".formTabButton").off("mouseenter.tab").on("mouseenter.tab",function(){$(this).trigger("click")}).removeClass("formTabButtonClick")}});var b=new Array();var e=Fai.top.location.hash;var a=Fai.top.location.search;var d=0;if(a){var g=a.indexOf("pageno");var c=a.substring(g,a.length);a=a.replace(c,"");g=a.lastIndexOf("m");c=a.substring(0,g+1);d=a.replace(c,"")}$(".formTabButtonList").each(function(){$(this).find(".formTabButton").eq(0).click();$.each($(this).find(".formTabButton"),function(h,j){var l=$(j).attr("tabModuleId");if(("#module"+l)===e||$("#module"+l).find("#module"+d).length>0){b.push(parseInt(l));return false}var k=Fai.getUrlParam(Fai.top.location.href,"m"+l+"pageno");if(typeof(k)!="undefined"&&k.length>0){b.push(parseInt(l))}})});$(".formTabButtonYList").each(function(){$(this).find(".formTabButton").eq(0).click();$.each($(this).find(".formTabButton"),function(h,j){var l=$(j).attr("tabModuleId");if(("#module"+l)===e||$("#module"+l).find("#module"+d).length>0){b.push(parseInt(l));return false}var k=Fai.getUrlParam(Fai.top.location.href,"m"+l+"pageno");if(typeof(k)!="undefined"&&k.length>0){b.push(parseInt(l))}})});$.each(b,function(h,i){Site.changeLiCnt(i,false,29)})};Site.restartMarquee=function(a,c,e){var h=Fai.top.$("#module"+a),j=h.hasClass("formStyle4")||h.hasClass("formStyle5")||h.hasClass("formStyle16")||h.hasClass("formStyle77")||h.hasClass("formStyle31")||h.hasClass("formStyle42"),k=h.hasClass("formStyle2")||h.hasClass("formStyle3")||h.hasClass("formStyle8")||h.hasClass("formStyle12")||h.hasClass("formStyle30")||h.hasClass("formStyle41")||h.hasClass("formStyle74"),b=j?"photoList":"productList";var l=h.hasClass("formStyle88")||h.hasClass("formStyle89")||h.hasClass("formStyle90");if(l){b="listPhotos"}if(c){if(Fai.top[b+a]){var g=Fai.top[b+a].data;var i=Site.getModuleAttrPattern(a).photoList;var d=Site.getModuleAttrPattern(a).productList;Fai.stopInterval("marquee"+a);if(j){Site.loadPhotoMarquee(a,i.ns,g.cusPicSize,g.newMarqueeToward)}else{if(k){Site.loadProductMarquee(a,d.ns,g.cusPicSize,g.newMarqueeToward)}else{if(l){Site.loadPhotoMarquee(a,g.picScale,g.cusPicSize,g.newMarqueeToward,"listPhotos")}}}}else{new Function("Fai.top.changeMarquee"+a+"()")()}}if(e==29){$("#formTabCntId"+a).parent().find(".formTabCntId").each(function(){if($(this).attr("show")){$(this).show();if($(this).attr("styleId")==3||$(this).attr("styleId")==16||$(this).attr("styleId")==90){var m=$($(this).find(">div")[0]).attr("id").replace("module","");new Function("Fai.top.changeMarquee"+m+"()")()}}else{$(this).hide()}})}};Site.changeLiCnt=function(h,d,a){var c=$("#formTabCntId"+h).parent().find(".formTabCntId").eq(0).find(" >.form"),b=c.attr("id");if(b==("module"+h)){return}var e=$("#formTabButton"+h);e.find(".formTabLeft").addClass("formTabLeftHover").end().find(".formTabMiddle").addClass("formTabMiddleHover").end().find(".formTabRight").addClass("formTabRightHover").end().siblings().find(".formTabLeft").removeClass("formTabLeftHover").end().find(".formTabMiddle").removeClass("formTabMiddleHover").end().find(".formTabRight").removeClass("formTabRightHover").end();e.addClass("formTabButtonHover").siblings().removeClass("formTabButtonHover");$("#formTabCntId"+h).parent().find(".formTabCntId").each(function(){if($(this).attr("show")){$(this).removeAttr("show");$(this).removeClass("formTabCntIdHover")}});var g=$("#formTabCntId"+h);g.prependTo(g.parent());g.attr("show",true);g.addClass("formTabCntIdHover");Site.restartMarquee(h,d,a);Site.triggerGobalEvent("site_moduleTabSwitch",h);Site.fixModuleInTabSwitchBug(h);jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})};Site.initTabYStyle=function(d){var c=Fai.top.$("#module"+d),a=c.find(".titleTable");if(Fai.isIE6()){var e=c.find(".formMiddleCenter"+d).width(),b=a.width();c.find("#formTabContent"+d).css({width:(e-b-40)+"px","float":"left"})}};Site.fixModuleInTabSwitchBug=function(c){var b=$("#module"+c),a;if(b.hasClass("formStyle83")&&!!!b.data("fk_fixEffect")){Site.adjustPhotoCardImgSize(b);b.data("fk_fixEffect",1)}if(b.hasClass("formStyle85")&&!!!b.data("fk_fixEffect")){Site.adjustPhotoNewCardImgSize(b);b.data("fk_fixEffect",1)}if(b.hasClass("formStyle98")&&!!!b.data("fk_fixEffect")){Site.adjustPhotoMoreCardImgSize(b);b.data("fk_fixEffect",1)}if(b.hasClass("formStyle1")&&!!!b.data("fk_fixEffect")){Site.richMarquee(Fai.top["richMarqueeInTab"+c]);b.data("fk_fixEffect",1)}if(b.hasClass("formStyle7")||b.hasClass("formStyle6")){a=Fai.top["newsScrollOptions"+c];if((typeof a!="undefined")&&a.scroll){b.find(".separatorLine").css("display","")}}if((b.hasClass("formStyle2")||b.hasClass("formStyle3")||b.hasClass("formStyle4")||b.hasClass("formStyle12")||b.hasClass("formStyle30")||b.hasClass("formStyle74")||b.hasClass("formStyle41")||b.hasClass("formStyle8"))&&!!!b.data("fk_fixEffect")){if(Site.ImageEffect&&Site.ImageEffect.cashOptions&&c.toString() in Site.ImageEffect.cashOptions){jzUtils.run({name:"ImageEffect.FUNC.BASIC.Init",callMethod:true},Site.ImageEffect.cashOptions[c]);b.data("fk_fixEffect",1)}}};Site.isTabYModule=function(c){if(c.length<1){return}var b=c.hasClass("formStyle29"),a=c.hasClass("fk-formTabY");return b&&a};(function(g,a,h){var c=a.data,d=a.dom,e=a.utils,b=a.event;e.getBaseDom=function(){var j=c.moduleId,l,i,k,m;l=Fai.top.$("#module"+j);if(!l.length){return}if(l.hasClass("jz-moduleTabYPattern113")){return}i=Site.isTabYModule(l);if(!i){return}k=l.find(".formTabButtonYList");m=k.find(".formTabButton");if(!k.length||!m.length){return}return{module:l,formTabButtonYList:k,formTabButton:m}};e.getAllFormTabButtonHeight=function(){var j=d.formTabButton,i=0;j.each(function(){i+=g(this).outerHeight(true)});return i};e.checkHeightEnough=function(){var k=c.wrapperHeight,j=c.allFormTabButtonHeight,l=c.formTabButtonLength;var i=k>j;return i||l<2};e.getOnePageNumForFormTabButton=function(){var n=c.wrapperHeight,j=c.arrowHeight,i=c.formTabButtonHeight,k=c.formTabButtonHoverHeight,m,l;m=n-k-j;m=m<0?0:m;l=Math.round(m/i)+1;return l};e.getPageNum=function(){return Math.ceil(c.formTabButtonLength/c.onePageNumForFormTabButton)};b.findOrCreateArrow=function(){var m=d.formTabButtonYList,l=c.bgColor,i,k;k=m.find(".J_tabYArrow");k=k.length?k:g(j()).appendTo(m);k.css("background-color",l);k.find(".J_arrowTopBg").css("border-bottom-color",l);k.find(".J_arrowBotomBg").css("border-top-color",l);return k;function j(){var n=[];n.push("
");n.push("
");n.push("");n.push("
");n.push("");n.push("");n.push("
");n.push("
");n.push("
");return n.join("")}};b.setModuleNewHeight=function(){var i=c.onePageNumForFormTabButton,n=c.formTabButtonHeight,m=c.arrowHeight,j=c.moduleId,p=c.formTabButtonHoverHeight,l=d.formTabButtonYList,o=d.arrow;var q=(i-1)*n+p,k=q+m;o.css("top",q);Site.setModuleHeight2(j,k);return k};b.setPages=function(){var l=c.pageNum,k=c.onePageNumForFormTabButton,j=d.formTabButtonYList,n=d.formTabButton;for(var i=0;i");e.push("");e.push("");e.push("");e.push("");e.push("");e.push("");e.push("");e.push("");e.push("");$("#"+b.parentId).append(e.join(""))};Site.appendWMP=function(b){var a=new Array(),e=b.width,d=b.height,c=b.path;a.push("");a.push("");$("#"+b.parentId).append(a.join(""))};Site.vote=function(g,j,d,e){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行投票。");return}var k=$("#voteMsg"+g+j),h=parseInt($.cookie("vote"+g)),a=true;var c=new Array();k.hide();$(".voteItems"+g+j).each(function(){var m={};var l=new Array();$(this).find(".voteItemCheck").find("input:checked").each(function(){var n=$(this).val();if(!isNaN(n)){l.push(parseInt(n))}});if(l.length==0){k.show();k.text(LS.voteNotSelect);a=false;return}m.itemList=l;c.push(m)});if(!a){return}$("#vote"+g+j).attr("disabled",true);$("#vote"+g+j).faiButton("disable");$.ajax({type:"post",url:"../www.apple.com/qtactivex/qtplugin.cab/ajax/vote_h.jsp@cmd=voteitem",async:false,data:"vid="+g+"&itemlist="+Fai.encodeUrl($.toJSON(c)),error:function(){var m=Site.getDialogContent(false,Fai.format(LS.voteError));var l={htmlContent:m,width:205,height:78};Site.popupBox(l);setTimeout(function(){document.location.reload()},3000)},success:function(n){var l=jQuery.parseJSON(n);if(l.success){k.hide();var o=Site.getDialogContent(true,Fai.format(LS.voteSuccess));var m={htmlContent:o,width:205,height:78};Site.popupBox(m);setTimeout(function(){document.location.reload()},1000);$(".voteItems"+g+j).find("input:checked").each(function(){$(this).attr("checked",false)});if(d>0){if(!$.cookie("vote"+g)){var p=new Date();p.setHours(p.getHours()+d);$.cookie("vote"+g,d,{expires:p})}}else{if(d==0){$.cookie("vote"+g,null)}else{$.cookie("vote"+g,-1,{expires:30})}}}else{if(l.login){k.show();voteMsgs.text(LS.voteErrorByNotLogin)}else{k.hide();if(l.needCode){b();return}var o=Site.getDialogContent(false,l.msg);var m={htmlContent:o,width:205,height:78};Site.popupBox(m);setTimeout(function(){document.location.reload()},1000)}}setTimeout(function(){$("#vote"+g+j).removeAttr("disabled");$("#vote"+g+j).faiButton("enable")},3000)}});function b(){var l=[];l.push("
");l.push("
");l.push("
输入验证码
");l.push("
");l.push("
");l.push("
验证码:
");l.push("
");l.push("
");l.push("
");l.push("
确定
取消
");l.push("
");l.push("
");$("#g_main").after(l.join(""));var m=(Fai.top.document.documentElement.clientWidth-$(".voteCodePanel").width())/2;var n=(Fai.top.document.documentElement.clientHeight-$(".voteCodePanel").height())/2+$(window).scrollTop();$(".voteCodePanel").css({left:m,top:n});$(".voteCodePicPanel>.voteCodePic").attr("src","validateCode.jsp?"+Math.random()*1000+"&validateCodeRegType=3");$(".voteCodePanelClose, .voteCodePanelClose").unbind("click").bind("click",function(){$(".voteCodePanelBg").remove();$(".voteCodePanel").remove()});$("#needVoteCode").unbind("keyup").bind("keyup",function(){$(".voteCodePanelSubmit").css({border:"1px solid #557ce1","background-color":"#557ce1",color:"white"});if($("#needVoteCode").val()==""){$(".voteCodePanelSubmit").css({border:"1px solid #e7e7eb","background-color":"#f2f2f5",color:"#d2d2d2"})}});$(".voteCodePanelSubmit").unbind("click").bind("click",function(){var o=$("#needVoteCode").val();$.ajax({type:"post",url:"../www.apple.com/qtactivex/qtplugin.cab/ajax/vote_h.jsp@cmd=voteitem",data:"vid="+g+"&itemlist="+Fai.encodeUrl($.toJSON(c))+"&verificationCode="+Fai.encodeUrl(o),error:function(){alert("服务繁忙,请稍后再试。")},success:function(p){p=$.parseJSON(p);if(p.success){$(".voteCodePanel").remove();$(".voteItems"+g+j).find("input:checked").each(function(){$(this).attr("checked",false)});i()}else{$("#needVoteCode").css("border-color","red");$(".voteCodePanel").find(".voteCodePic").attr("src","validateCode.jsp?"+Math.random()*1000+"&validateCodeRegType=3")}}})})}function i(){var l=[];l.push("
");l.push("
");l.push(" ");l.push(" ");l.push("
");l.push("
");l.push("
");l.push("
感谢您的投票
");l.push("
");$("#g_main ").after(l.join(""));var m=(Fai.top.document.documentElement.clientWidth-$(".voteSuccessPanel").width())/2;var n=(Fai.top.document.documentElement.clientHeight-$(".voteSuccessPanel").height())/2+$(window).scrollTop();$(".voteSuccessPanel").css({left:m,top:n});$(".voteSuccessPanelClose").unbind("click").bind("click",function(){$(".voteCodePanelBg").remove();$(".voteSuccessPanel").remove()});setTimeout(function(){$(".voteCodePanelBg").remove();$(".voteSuccessPanel").remove()},2000)}};Site.initModuleVote=function(d){var e=d.id,c=d.delay,b=d.mid,a=d.isVoted;if(c==0){$.cookie("vote"+e,null)}else{if(c==-1){if($.cookie("vote"+e)){$.cookie("vote"+e,-1,{expires:30})}}else{if($.cookie("vote"+e)=="-1"){$.cookie("vote"+e,null)}}}$("#vote"+e+b).click(function(){Site.vote(e,b,c,a)})};Site.fixModuleVoteStyle=function(b,a){if($("#module"+a).width()<=400){$("#module"+a).find(".voteItems"+b+a).find(".voteItemPanel").css({width:"100%","padding-bottom":"10px"});$("#module"+a).find(".voteItems"+b+a).find(".voteItemCheck").css({padding:"10px 0 0px 5px"})}};Site.fixVoteResultImgStyle=function(c,a,d,b){if($("#module"+a).width()>400){if(d!=-1&&b=="img"){$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteVfmImg").each(function(){$(this).css("width",$("#module"+a).find(".voteResult").find(".vi-percent").width()-48)})}}if($("#module"+a).width()<=400){$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteItemImg").find("img").css({width:"30px",height:"30px"});if(d!=-1&&b=="img"){$("#module"+a).find(".voteResult").find(".vi-name").css({"text-align":"center"});$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteItemImg").css({"margin-right":"2px"});$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteVfmImg").each(function(){$(this).css("width",$("#module"+a).find(".voteResult").find(".vi-percent").width()-30);$(this).css("margin-top","4px")})}}};Site.fixModuleVoteResultStyle=function(b,a,c){if($("#module"+a).width()<=400){$("#module"+a).find(".voteResult").find(".vi-name").css({width:"30%"});$("#module"+a).find(".voteResult").find(".vi-percent").css({width:"50%"});$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteVfm").css({height:"22px"});$("#module"+a).find(".voteResult").find(".vi-count").css({width:"20%"});$("#module"+a).find(".voteResult").find(".vi-count").find(".voteItemCount").css({"padding-left":"0"})}if(c!=-1){$("#module"+a).find(".voteResult").find(".vi-percent").find(".voteVfm").find(".g_block").each(function(){$(this).addClass("g_block"+c)})}};Site.showNavSubMenu=function(c){if(Fai.top._useNavVersionTwo){if(Fai.top._navStyleV2Data.snt!=0){return}}var b=0;if(c==1){b=1}var a=Fai.top.$("#nav");if(Fai.top._useNavVersionTwo){a=Fai.top.$("#navV2")}$.each(a.find(".navcenter%20.item"),function(w,s){$(this).unbind();if(c==100){var A=$(this);var p=Fai.top._colId;var C=Fai.top._fromColId;var j=A.attr("colId");if(j==p||j==C){A.addClass("itemSelected")}A.hover(function(){$(this).addClass("itemHover")},function(){$(this).removeClass("itemHover")});if(A.find(".navSubMenu").length>=1){return}var q=A.attr("id");var m=[];try{m=Fai.fkEval(q+"SubMenu")}catch(x){return false}if(!m||m.length<1){return}var g=0;if(j==p||j==C){g=1}else{for(var w=0;w=1){A.addClass("itemPopupSelected")}}if(g==0){return}if(!m||m.length<1){return}var h=$("");var u=$("
");u.appendTo(h);u=u.find(".middle .center");for(var w=0;w"+m[w].html+"";$(l).appendTo(u);if(g==1){continue}if(g==2&&p!=m[w].colId&&C!=m[w].colId){continue}if(Fai.isNull(m[w].sub)||m[w].sub.length<1){continue}var t=m[w].sub;if(g==3){var r=false;for(var s=0;s
");k.appendTo(u);k=k.find(".middle .center");for(var s=0;s"+t[s].html+"";$(o).appendTo(k)}}h.insertAfter($(this));h.find(".item").hover(function(){$(this).addClass("itemHover");$(this).siblings(".outMenuTriangle").addClass("triangleHover")},function(){$(this).removeClass("itemHover");$(this).siblings(".outMenuTriangle").removeClass("triangleHover")})}else{var A=$(this);var p=Fai.top._colId;var C=Fai.top._fromColId;var j=A.attr("colId");var q=A.attr("id");var m=[];try{m=Fai.fkEval(q+"SubMenu")}catch(x){return false}var z=w+1;var r=false;if(p==j||C==j){r=true}else{if(m&&m.length>=1){for(var w=0;w=1){A.addClass("itemPopupSelected")}}$(this).hover(function(){var D=$(this);var I=D.attr("id");var n=[];try{n=Fai.fkEval(I+"SubMenu")}catch(G){return false}D.addClass("itemHover");D.addClass("itemHoverIndex"+z);if(n&&n.length>=1){D.addClass("itemPopupHover")}var i="";if(a.hasClass("navStyle")){var F=a.attr("class").split(" ");$.each(F,function(e,J){if(J.search(/navStyle/)!=-1){i+=J+" "}})}else{if(Fai.top._isTemplateVersion2||Fai.top._uiMode){i="navStyle "}}var E="";var H=Site.showMenu({container:E,mode:b,id:I+"SubMenu",minWidth:D.width(),host:D,clsIndex:z,data:n,fixpos:false,rulerObj:a,navSysClass:i,navBar:true});if(H!=null){H.hover(function(){D.addClass("itemHover");H.find(".outMenuTriangle").addClass("triangleHover");if(n.length>0){D.addClass("itemPopupHover")}},function(){D.removeClass("itemHover");D.removeClass("itemPopupHover");H.find(".outMenuTriangle").removeClass("triangleHover")})}},function(){$(this).removeClass("itemHover");$(this).removeClass("itemHoverIndex"+z);$(this).removeClass("itemPopupHover");if($(".navSubMenu").length==0){$(this).removeClass("itemHover")}})}})};Site.removeNavHiddenMenu=function(c){for(var b=c.length-1;b>=0;--b){if(c[b].hidden){c.splice(b,1);continue}if(c[b].sub){var a=c[b].sub;for(var d=a.length-1;d>=0;--d){if(a[d].hidden){a.splice(d,1)}}}}};Site.showNavItemContainer=function(){var b=Fai.top.$("#nav");if(Fai.top._useNavVersionTwo){b=Fai.top.$("#navV2")}var h=b.find(".navCenter"),m=b.width();if(h.length>0){h.removeAttr("style")}Site.hideNavItemContainer();var p=b.find(".itemContainer"),r=h.outerWidth(true),d=0;var l=b.find(".item"),k=b.find(".itemSep"),a=l.css("float")==="none";if(a){return}Fai.top.$.each(l,function(){d+=$(this).outerWidth(true)});Fai.top.$.each(k,function(){d+=$(this).outerWidth(true)});p.off("mouseover.navigator").on("mouseover.navigator",".item",function(){var s=0;p.children().each(function(t,u){s+=$(u).outerWidth(true)});if(s>p.width()){p.css("width",s)}});if(Fai.isIE()||Fai.isMozilla()){d+=4}var g=b.find(".itemPrev"),j=b.find(".itemNext");if(Fai.top._isTemplateVersion2){g.css("display","none");j.css("display","none")}if(Fai.isIE6()||Fai.isIE7()){m=Fai.top._navStyleData.ns.w}function o(u){if(!Fai.top._cusResponsive){p.css("width",d+"px")}if((Fai.isIE()||Fai.isMozilla())&&(d==u+4)){}else{j.css("display","block")}Fai.top._templateOtherStyleData.h=0;var t=0,s=0,y=0,x;if(k.is(":hidden")){x=0}else{x=k.width()/2}var v=h.offset().left;var w=[];l.each(function(z){w[z]=$(this).offset().left-v;s++});j.unbind("mousedown").unbind("mouseleave");g.unbind("mousedown").unbind("mouseleave");j.width(j.data("width"));j.mousedown(function(){y=w[t+1]-w[t];if(t==0){y-=x}t++;if(t==s){t=s-1}$(this).addClass("itemNextHover");p.css("left",(p.position().left-y)+"px");if(p.position().left<0){g.css("display","block")}if((Math.abs(p.position().left)+u)>=d){j.data("width",j.width());j.width(0)}}).mouseleave(function(){$(this).removeClass("itemNextHover")});g.mousedown(function(){y=w[t]-w[t-1];if(t==1){y-=x}t--;if(t<0){t=0}$(this).addClass("itemPrevHover");p.css("left",(p.position().left+y)+"px");if((Math.abs(b.find(".itemContainer").position().left)+u)=0){g.css("display","none")}}).mouseleave(function(){$(this).removeClass("itemPrevHover")});j.off("mouseover.nav").on("mouseover.nav",function(){$(this).addClass("itemNextHover")});g.off("mouseover.nav").on("mouseover.nav",function(){$(this).addClass("itemPrevHover")})}var n=false;if(Fai.top._useNavVersionTwo){var c=b.find(".navContent").width();if(d>r&&c>r){n=true}}if(d>r&&!n){o(r)}else{if(b[0].className&&b[0].className.indexOf("nav2")>-1||Fai.top._useNavVersionTwo){var i=p.css("margin-left")?p.css("margin-left").replace("px",""):0,e=d+parseInt(i),q=parseInt(e)+10;h.css("width",Math.min(m,q));if(m===Math.min(m,q)&&d>m){o(m)}if(Fai.isIE11()){h.css("height",p.outerHeight(true)+"px")}if(Fai.top._manageMode){jzUtils.run({name:"reSaveNavCenterWidth"},e)}}}if(Fai.top._useNavVersionTwo){if(top._navStyleV2Data.nct.cw!=h.width()){setTimeout(function(){top._navStyleV2Data.nct.cw=parseInt(h.width());top._navStyleV2Changed++},0)}if(Fai.top._manageMode){Site.autoNavCenterWidth()}}};Site.hideNavItemContainer=function(){$("#nav .itemContainer").removeAttr("style");$("#nav").find(".itemPrev").hide();$("#nav").find(".itemNext").hide()};Site.hideNavSubMenu=function(){Fai.top.$.each(Fai.top.$("#nav .navCenter .item"),function(a,b){$(this).unbind()})};Site.initModuleNavListGroup=function(c,b){$("#module"+c+" .g_foldValueCenter").mouseover(function(){$(this).addClass("g_hover")}).mouseleave(function(){$(this).removeClass("g_hover")});if(b){var a=$("#module"+c).find(".formMiddle"+c).find("table.g_foldContainerContent").find(".g_foldContainerContentCenter");var d=a.find(".g_foldContainerName");$.each(d,function(e,h){var g=$(h);g.css("cursor","pointer");g.click(function(){var i=$(this).next();if(i.is(":visible")){var j=$(g.find(".g_unfold")[0]);j.removeClass("g_unfold").addClass("g_fold");i.hide()}else{var j=$(g.find(".g_fold")[0]);j.removeClass("g_fold").addClass("g_unfold");i.show()}})})}};Site.initModuleNavListAcrossDisplay=function(c,d,b,e){var a=$("#module"+c);m_formMiddleWidth=a.find(".formMiddle").width(),mSOptions={moduleId:c,clsStr:"navAcrossContainer navAPanel"};a.find(".navA_C_J .navA_J").hover(function(){var o=$(this),i=o.attr("_colId"),k=d[i],j=a.attr("_side"),n=a.parent(),m=a.parent().attr("id"),l=true;mSOptions.that=o;if(Fai.isIE6()||Fai.isIE7()){l=false}else{if(j==2){l=false}else{if(j==1){l=false}else{if(m=="floatLeftTopForms"||m=="floatRightTopForms"||m=="floatLeftBottomForms"||m=="floatRightBottomForms"){l=false}else{if(a.css("position")=="absolute"&&n.hasClass("absForms")){l=false}}}}}if(k!=null&&k.length>0){var p=[],g=$("#navAcM"+c+"C"+i+"Panel");if(g.length==0){p.push("
");$.each(k,function(t,s){var w=s.allowed;var v="onclick = 'Fai.ing(LS.memberLoginNoPermission, false);'";if(!_isMemberLogin){w=true}if(w){v=" onclick = 'return true;' "}var r="";if(!!d[s.id]){r=" navA_more"}var u="";if(s.openType){u="target='_blank';"}p.push("");p.push("");p.push("")}else{p.push('"+s.name+"")}p.push("");p.push("")});p.push("
");mSOptions.idStr="navAcM"+c+"C"+i+"Panel";mSOptions.contentStr=p.join("");g=Site.moduleSubPanel(mSOptions);var q=o.offset().left,h=o.offset().top;if(!l){q+=o.outerWidth()}g.css({top:h,left:q}).show()}if(l){var q=a.offset().left+a.outerWidth();a.css("z-index",9030);g.stop(true,false).animate({left:q},500)}g.mouseleave(function(){o.removeClass("g_hover")});g.mouseover(function(){o.addClass("g_hover")});g.find(".childNavA_J").hover(function(){var t=$(this),y=t.attr("_colId"),v=d[y];mSOptions.that=t;if(v!=null&&v.length>0){var s=[],u=$("#navAcM"+c+"C"+y+"Panel");if(u.length==0){s.push("
");$.each(v,function(z,D){var C=D.allowed;var B="onclick = 'Fai.ing(LS.memberLoginNoPermission, false);'";if(!_isMemberLogin){C=true}if(C){B="onclick = 'return true;'"}var A="";if(D.openType){A="target='_blank';"}s.push("");s.push("");s.push("");s.push("")});s.push("
");mSOptions.idStr="navAcM"+c+"C"+y+"Panel";mSOptions.contentStr=s.join("");u=Site.moduleSubPanel(mSOptions);var x=t.offset().left,w=t.offset().top;if(!l){x+=t.outerWidth()}u.css({top:w,left:x}).show();if(l){var r=t.offset().left+t.outerWidth();u.css("z-index",1);u.stop(true,false).animate({left:r},500)}}u.find(".grandNavA_J").hover(function(){$(this).addClass("g_hover")},function(){$(this).removeClass("g_hover")});u.mouseleave(function(){g.attr("_mouseIn",0);o.removeClass("g_hover");t.removeClass("g_hover")});u.mouseover(function(){g.attr("_mouseIn",1);o.addClass("g_hover");t.addClass("g_hover")});t.mouseleave(function(){g.attr("_mouseIn",0)})}t.addClass("g_hover")},function(r){$(this).removeClass("g_hover")})}o.addClass("g_hover")},function(g){$(this).removeClass("g_hover")}).mouseleave(function(){a.css("z-index","")});Site.initContentSplitLine(c,e)};Site.onSiteFixTop=function(){if(Fai.top._Global._navHidden){return}var r="#nav";if(Fai.top._useNavVersionTwo){r="#navV2"}var d,s=false,c=false,l=false,C=Fai.isIE6(),B=Fai.isIE7(),t=Fai.top.$(r),E=Fai.top.$(window),y=Fai.top.$("#g_main"),j=Fai.top.$("#web"),v=Fai.top.$("body"),a=Fai.top.$(".webNavTable"),k=Fai.top.$(".webHeaderTable"),n=Fai.top.$(".webBannerTable"),q=Fai.top.$(".floatLeftTop"),e=t.parent(),w=Fai.top.$("#sitetips"),p=Fai.top.$("#webBanner"),b=Fai.top.$("#webHeader"),m=Fai.top.$("#webNav"),u,o=parseInt(t.css("top").replace("px","")),F=t.offset().top,A=w.height()||0,i=F-A,h=q.css("top").replace("px","")||0,z=Fai.top.$(window),H=z;if(C||B){c=true;H=y}if(isNaN(o)){o="auto"}else{o=o+"px"}var x;if(t.width()==j.width()){l=true;x="100%"}else{x=t.width()+"px"}var g=t.offset().left-e.offset().left;var D,G;H.on("scroll.nav",function(){var J=H.scrollTop(),I=parseInt(q.css("top").replace("px",""));h=I||0;d=Site.getNavInClientPosition(t).left;if(!s&&iE.width()){t.css("width",j.width()+"px")}if(a.find(r).length>0){u=a}else{if(k.find(r).length>0){u=k}else{if(n.find(r).length>0){u=n}}}u.css({zIndex:"30",position:"relative"});p.addClass("fix-zIndex");b.addClass("fix-zIndex");m.addClass("fix-zIndex")}s=true}if(s&&i>=J){if(C){e.append(t);t.css({position:"",width:"",left:"",top:"",zIndex:""})}else{t.removeClass("navfixtop");t.css({position:"",width:"",left:"",top:""});if(u){u.css("zIndex","")}p.removeClass("fix-zIndex");b.removeClass("fix-zIndex");m.removeClass("fix-zIndex")}s=false}});Fai.top.$(window).on("resize.nav",function(){if(C&&!l&&t.offset().top==0){t.css("left",D.offset().left+G)}else{if(t.hasClass("navfixtop")&&l){if(j.width()E.width()){setTimeout(function(){t.css("width",j.width()+"px")},0)}}}if(t.hasClass("navfixtop")&&!l){setTimeout(function(){t.css("left",e.offset().left+g)},0)}}})};Site.getNavInClientPosition=function(b){var a=b[0];if(typeof a.getBoundingClientRect!=="undefined"){return a.getBoundingClientRect()}else{var c=Fai.top._manageMode?Fai.top.$("#g_main"):Fai.top.$(window),e={left:0,right:0},d=a.offsetParent;e.left=a.offsetLeft;e.top=a.offsetTop;while(d!==null){e.left+=d.offsetLeft;e.top+=d.offsetTop;d=d.offsetParent}if(b.css("position")=="fixed"){e.top=b.css("top")}return{left:e.left-c.scrollLeft(),top:e.top-c.scrollTop()}}};Site.onNavCntPositionFixTop=function(){if(Fai.top._Global._navHidden||!Fai.top._navStyleData.no){return}if(Fai.top._manageMode){Site.onManageFixTop()}else{Site.onSiteFixTop()}};(function(){if(Fai.top!=window){return}var h=Fai.top.window.location.hash,d,g,b;var c=0;var e;var j=$("#module"+e);var a=$("#nav a");g=Fai.top._manageMode?"#g_main":Fai.top.window;$(g).bind("scroll",function(){a.each(function(){e=$(this).attr("_module");if(e!=null&&e!=undefined){j=$("#module"+e);if(j.length>0){var k=j[0].getBoundingClientRect().top;var m=$(window).height();var l=j.height();var i;if(k>=0){i=(k=(l*0.6);if(i){$(this).parents(".item").addClass("itemSelected");$(this).parents(".item").siblings().removeClass("itemSelected")}}else{k=Math.abs(k);i=(k=(l*0.6);if(i){$(this).parents(".item").addClass("itemSelected");$(this).parents(".item").siblings().removeClass("itemSelected")}}}}})});$("#g_main").bind("scroll",function(){a.each(function(){e=$(this).attr("_module");if(e!=null&&e!=undefined){j=$("#module"+e);if(j.length>0){var k=j[0].getBoundingClientRect().top;var m=$(window).height();var l=j.height();var i;if(k>=0){i=(k=(l*0.6);if(i){$(this).parents(".item").addClass("itemSelected");$(this).parents(".item").siblings().removeClass("itemSelected")}}else{k=Math.abs(k);i=(k=(l*0.6);if(i){$(this).parents(".item").addClass("itemSelected");$(this).parents(".item").siblings().removeClass("itemSelected")}}}}})})})();Site.initSubNavPack=function(c,r,p,d,h,l){var u=$("#fk-subNavPack"+c);if(u.length==0){var b=$("#navV2").offset().top,s=$("#navV2").height();subNavPackHeight="300px",subNavPackWidth="100%",subNavPackLeft="0px",webWidth=$("#web").width(),webContainerWidth=$("#webContainer").width()+4,containerLeft=(webWidth-webContainerWidth)/2-2,containerWidth=webContainerWidth;if(document.getElementById("g_main").scrollHeight>document.getElementById("g_main").clientHeight){subNavPackWidth="99%"}if(l.h){subNavPackHeight=l.h+"px"}if(!d&&l.w){subNavPackWidth=l.w+"px";if(l.l){subNavPackLeft=l.l+"px";if(l.l>containerLeft){containerLeft=0}else{containerLeft=containerLeft-l.l}}if(l.w
").appendTo("body");a()}else{return}}else{$("
").appendTo("body")}u=$("#fk-subNavPack"+c);for(var q=0;q
编辑模块
");u.find(".editSubNavPack").click(function(){if(Fai.top._subNavPackEdit==true){return}Site.logDog(200256,2);u.find(".editSubNavPack").hide();Site.inSubNavPackEdit.subNavFreePackEdit(c)});$(u).hover(function(){if(!Site.inSubNavPackEdit.subNavEditing){u.find(".editSubNavPack").show()}},function(){u.find(".editSubNavPack").hide()})}u.find(".formStyle86, .editTip").css("cursor","default")}function a(){var i=($("#fk-subNavPack"+c).height()-16)/2;$("#fk-subNavPack"+c).append("");$("#fk-subNavPack"+c).find(".toChooseTemplate").click(function(){Fai.popupWindowVersionTwo.createPopupWindow({title:"请选择素材模块进入带图样式的编辑",frameSrcUrl:"manage/subNavPackTpl.jsp?subNavColId="+c,popUpWinClass:"subNavPackTpl",width:620,height:880})})}};Site.showSubNavPack=function(){if(Fai.top._useNavVersionTwo){if(Fai.top._navStyleV2Data.snt!=2){return}}function a(c){var b=Fai.top.$("#navV2").offset().top,d=Fai.top.$("#navV2").height();$("#fk-subNavPack"+c).css("top",b+d+"px")}$.each(Fai.top.$("#navV2 .navCenter .item"),function(j,d){var o=$(this);var k=Fai.top._colId;var h=Fai.top._fromColId;var c=o.attr("colId");$(this).unbind();if(c==k||c==h){o.addClass("itemSelected")}var m=parseInt($(this).attr("id").replace("nav",""));var g=false,b=false,e,l=false;o.hover(function(){if(e){clearTimeout(e)}g=true;$(this).addClass("itemHover");a(m);if(Fai.top._navStyleV2Data.snt==2){$(".fk-subNavPack").each(function(i,n){if($(n).css("display")=="block"){l=true}});if(l){$(".fk-subNavPack").hide();Fai.top.$("#fk-subNavPack"+m).show()}else{Fai.top.$("#fk-subNavPack"+m).slideDown(200)}}},function(){g=false;$(this).removeClass("itemHover");e=setTimeout(function(){if(!b&&!Fai.top._subNavPackEdit){Fai.top.$("#fk-subNavPack"+m).slideUp(100)}},200);l=false});Fai.top.$("#fk-subNavPack"+m).hover(function(){if(e){clearTimeout(e)}b=true;a(m);if(Fai.top._navStyleV2Data.snt==2){if(!Fai.top._subNavPackEdit){Fai.top.$("#nav"+m).addClass("itemHover")}$(".fk-subNavPack").each(function(i,n){if($(n).css("display")=="block"){l=true}});if(l){$(".fk-subNavPack").hide();Fai.top.$("#fk-subNavPack"+m).show()}else{Fai.top.$("#fk-subNavPack"+m).slideDown(200)}}},function(){b=false;e=setTimeout(function(){if(!g&&!Fai.top._subNavPackEdit){Fai.top.$("#nav"+m).removeClass("itemHover");Fai.top.$("#fk-subNavPack"+m).slideUp(100)}},200);l=false})})};Site.setNavV2Wrap=function(){var b=$("#webContainer").width(),a=document.getElementById("g_main").scrollHeight;$("#navV2Wrap").css({width:b+"px",height:a+"px"})};Site.clearNavV2Wrap=function(){$("#navV2Wrap").css({width:"",height:""})};Site.initModulePhotoSwitch=function(g,M,w,m){var c=Fai.top.$("#module"+g),o=c.find(".formMiddleContent"),u=!M.picScale,y=o.width(),C=o.height(),z=M.data,d;c.data("photoSwitchData",M);c.data("photoSwitchType",w);if(m!=="carouselPhotos"){}if(w==1){var B=$("#photoSwitch"+g);B.css("margin","0 auto");var K=o.width();var h={id:g,switchType:"1",width:K,photoSwitch:B};Site.formMiddleContentWidthArray.push(h);B.imageSwitch(M);if(o.width()=0.4){B.find(".spanHiddenName").each(function(){$(this).css("width",((1-(F.width()+20)/B.width())*100)+"%")})}F.css("bottom","5px");var p=F[0].getBoundingClientRect().left;var D=B[0].getBoundingClientRect().left;F.width((F.width()+5)+"px");F.css("top","auto");if(k.find(".spanHiddenName")&&k.css("display")=="block"){k.css("height","auto");if(m=="carouselPhotos"){k.find(".spanHiddenName").each(function(){var a=$(this).text();if(a==""){$(this).css("height","30px")}});k.css({top:"auto",bottom:"0",width:B.width()+"px","margin-left":"2px","margin-bottom":"2px"});F.css("bottom","8px")}else{k.css({top:"auto",bottom:"0","padding-bottom":"15px",width:"100%"})}}if(k.find(".spanHiddenName").length==1){k.css({"padding-bottom":"0","margin-left":""})}var v=B.find(".spanHiddenName").length;for(var J=0;J1){t.css("padding-bottom","15px")}}else{var q=false;if(t.css("display")=="none"){t.addClass("spanShowName");q=true}var E=D+t[0].clientWidth+10;if(q){t.removeClass("spanShowName")}if(p-E>=5){t.css({"padding-top":"2px","padding-bottom":"0px",bottom:"0px"});if(m=="carouselPhotos"&&t.text()==""){t.css("padding-bottom","30px")}}else{if(v>1){t.css("padding-bottom","15px")}}}}else{if(v==1){k.css("padding-bottom","15px");t.css({"white-space":"nowrap",width:"99%","padding-top":"2px"})}else{if((F.width()+20)/B.width()<0.4){t.css({"white-space":"nowrap",width:"60%","padding-top":"2px"})}else{t.css({"white-space":"nowrap","padding-top":"2px"})}}}if(Fai.isIE6()){for(var O=0;Ox.width()){N.find(".imageSwitchBtn_dot").each(function(){$(this).css("marginRight",2+"px")});if(N.width()>x.width()){A=1;N.css("marginLeft","-"+N.width()/2+"px")}}if(A==0){N.css("marginLeft","-"+N.width()/2+"px");N.css("left","50%")}if(o.width()0){var a=c.data("photoSwitchData");var d=c.data("photoSwitchType");if(d==1){c.find("#photoSwitch"+b).empty()}else{if(d==2){c.find("#photoDotSwitch"+b).empty()}}if(typeof a!="undefined"){Site.initModulePhotoSwitch(b,a,d)}}};Site.loadPhotoMarquee=function(v,G,D,o,y){var e=Fai.top["Photo"+v].ieOpt,i=Fai.top["Photo"+v].tgOpt,p=Fai.top["Photo"+v].callbackArgs;var b=$("#module"+v);if(Fai.isNull(b)){return}if(y=="listPhotos"||y=="carouselPhotos"||y=="photoList"){D=1}b.find(".demo0>div").each(function(){if($(this).attr("cloneDiv")){$(this).remove()}});var x=0;var u=b.find(".photoMarqueeForm");if(!D){u.each(function(){var I=$(this).attr("faiWidth");var H=$(this).attr("faiHeight");if(Fai.isNull(H)){return}var M=$(this).find(".imgDiv");var L=M.width();var J=M.height();var K=Fai.Img.calcSize(I,H,L,J,Fai.Img.MODE_SCALE_FILL);if(K.height>x){x=K.height}})}if(e.effType>=4&&e.effType<6){Site.clearImageEffectContent_photo("module"+v,"propDiv")}var d=0;var j=0;var E=0;var h=0;var C=0;var q=0;var F=Site.getFormMiddleContentHeight(b,v);u.each(function(){var J=$(this);var S=J.attr("faiHeight");if(Fai.isNull(S)){return}var R=J.attr("faiWidth");var W=J.find(".imgDiv");var T=W.width();if(D){x=W.height()}var Q={width:T,height:x};var P=W.find(".J_photoImgPanel");var N=W.find("img");if(G==2){var O=N.attr("iWidth");var I=N.attr("iHeight");var M=O/I;var L=T/x;if(L<=M){N.css("width",M*x+"px");N.css("height",x+"px");N.css("marginTop","");N.css("marginLeft",((T-M*x)/2)+"px");P.css({width:T,height:x,position:"relative",overflow:"hidden"})}else{N.css("height",T/M+"px");N.css("width",T+"px");N.css("marginLeft","");N.css("marginTop",((x-T/M)/2)+"px");P.css({width:T,height:x,position:"relative",overflow:"hidden"})}}else{if(typeof G=="number"){G=!!!G}if(G){if(D){Q=Fai.Img.calcSize(R,S,T,x,Fai.Img.MODE_SCALE_FILL)}else{Q=Fai.Img.calcSize(R,S,T,x,Fai.Img.MODE_SCALE_DEFLATE_HEIGHT)}}if(P.length>0||W.length>0){P.css({marginLeft:"",marginTop:"",width:Q.width+"px",height:Q.height+"px",position:"relative",overflow:"hidden",margin:"0 auto"});N.css("marginLeft","").css("marginTop","")}N.css("width",Q.width+"px");N.css("height",Q.height+"px")}var K=W.width();if(Kh&&(o==0||o==1)){h=$(this).height()}if(F>h&&(o==2||o==3)){h=F}var H=J.outerWidth(true);var U=J.outerHeight(true);if(H>C){C=H}d+=H});j=d;if($(".photoMarqueeForm").length>0){Site.unifiedAttrVal(b,".photoMarqueeForm","height")}var n=b.find(".demo");var B=b.find(".demo0");E=B.outerHeight();if(h>0){n.css("height",h+"px")}if(o==0||o==1){B.css("width",d+"px");var a=n.width(),A=B.width();if(A<=a){jzUtils.run({name:"ImageEffect.FUNC.BASIC.Init",callMethod:true},{moduleId:v,imgEffOption:e,tagetOption:i,callback:Site.createImageEffectContent_photo,callbackArgs:p});return}}if(o==2||o==3){var h=n.height(),k=B.height();if(k<=h){jzUtils.run({name:"ImageEffect.FUNC.BASIC.Init",callMethod:true},{moduleId:v,imgEffOption:e,tagetOption:i,callback:Site.createImageEffectContent_photo,callbackArgs:p});return}}if(u.length==0){return}var l=u.first().outerWidth(true);if(l==0){return}var t=0,c=u.length-1;u.each(function(I,J){if(t>a){return false}var H=$(J).clone().attr("cloneDiv","true");tmpId=H.children("div.imgDiv").attr("id");H.children("div.imgDiv").attr("id",tmpId+"_clone");if(0===I&&(o==2||o==3)){$(J).css("clear","both");H.css("clear","both")}if(Fai.isIE6()||Fai.isIE7()){if(I===c){$(u[I]).after('
');H.after('
')}}B.append(H);t+=H.outerWidth(true)});var s=d+t;if(o==0||o==1){B.css("width",s+"px")}function z(){d--;n.scrollLeft(d);if(d==0){n.scrollLeft(j);d=j}}function g(){var H=n.scrollLeft();H++;n.scrollLeft(H);if(H==d){n.scrollLeft(0)}}function w(){var H=n.scrollTop();H--;n.scrollTop(H);if(H==0){n.scrollTop(E)}}function m(){var H=n.scrollTop();H++;n.scrollTop(H);if(H==E){n.scrollTop(0)}}if(o==0){n.scrollLeft(2*d);Fai.addInterval("marquee"+v,z,35)}else{if(o==1){Fai.addInterval("marquee"+v,g,35)}else{if(o==2){n.scrollTop(2*E);Fai.addInterval("marquee"+v,w,35)}else{if(o==3){Fai.addInterval("marquee"+v,m,35)}}}}n.mouseover(function(){Fai.stopInterval("marquee"+v)}).mouseleave(function(){Fai.startInterval("marquee"+v)});setTimeout(function(){Fai.startInterval("marquee"+v)},100);if(!b.data("first1")){b.data("first1",true);b.data("options",{id:v,scale:G,fixHeight:D,phoMarqueeDirection:o,flag:y})}if(b.data("first2")&&Fai.top._manageMode){var r=b.data("photoOptions");Site.initModulePhotoListItemManage(r);if(y=="listPhotos"){Site.moduleListPhotosItemManage.init(r)}}jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},{moduleId:v,imgEffOption:e,tagetOption:i,callback:Site.createImageEffectContent_photo,callbackArgs:p});Site.restartPhotoMarquee(b)};Site.restartPhotoMarquee=function(a){if(!a.data("first2")){a.data("first2",true);a.on("Fai_onModuleSizeChange",function(){var b=a.data("options");Fai.stopInterval("marquee"+b.id);Site.loadPhotoMarquee(b.id,b.scale,b.fixHeight,b.phoMarqueeDirection,b.flag)});a.on("Fai_onModuleLayoutChange",function(){var b=a.data("options");Fai.stopInterval("marquee"+b.id);Site.loadPhotoMarquee(b.id,b.scale,b.fixHeight,b.phoMarqueeDirection,b.flag)})}};Site.getFormMiddleContentHeight=function(b,a){var n=b.height(),g=b.find(".formTop").first(),e=b.find(".formBanner"+a).first(),j=b.find(".formMiddle").first(),l=b.find(".formBottom").first(),c=0;if(g.css("display")!="none"){c=g.outerHeight(true)}var k=0;if(e.css("display")!="none"){k=e.outerHeight(true)}var i=0;if(l.css("display")!="none"){i=l.outerHeight(true)}var h=n-c-k-i-Fai.getFrameHeight(j);var m=j.find(".formMiddleCenter").first();h=h-Fai.getFrameHeight(m);var d=j.find(".formMiddleContent").first();h=h-Fai.getFrameHeight(d);return h};Site.loadPhotoGallery=function(y){var N=y.id,K=y.scale,g=y.cus;var L=y.flag;var d=$("#"+N),a=d.find("div.photo-container");if(y.effType>=4&&y.effType<6){Site.clearImageEffectContent_photo(y.id,"prop-container")}if(L=="listPhotos"){g=1}if(a.length!=0){for(var ab=0;ab0||Z.length>0){if(K){T.css({marginLeft:"",marginTop:"",width:l.width+"px",height:l.height+"px",position:"relative",overflow:"hidden",margin:"0 auto"})}else{T.css({marginLeft:"",marginTop:"",width:n+"px",height:I+"px",position:"relative",overflow:"hidden",margin:"0 auto"})}m.css("marginLeft","").css("marginTop","")}if(K){m.width(l.width);m.height(l.height)}else{m.width(n);m.height(I)}}}var P=d.find(".gallery-control"),q=d.find(".gallery-control-prev"),V=d.find(".gallery-control-next"),M=q.height(),e=q.width();var S=a.first(),W=S.children("div.img-container"),D=W.outerWidth(true),u=W.outerHeight(true),B=S.children("div.prop-container"),k=0;if(B.length>0){k=B.first().outerHeight(true)*B.length}var E=u+k;a.height(E);a.width(D);a.find("div.prop-container").width(D);var A=d.find("div.photo-gallery-preview");A.height(E);var z=d.find("div.photo-gallery-inner"),p=z.outerHeight();if(paf){c=parseInt(t/af)}var H=(c*af)-h;A.width(H);var ae=a.length;var v=ae%c==0?ae/c:Math.floor(ae/c)+1;d.find("div.photo-gallery-container").width(ae*af);var o=a.length1){P.css("display","block")}}).mouseleave(function(){P.css("display","none")});q.addClass("gallery-control-prev-disabled");if(v==1){V.addClass("gallery-control-next-disabled")}q.click(function(){var x=$(this);if(x.hasClass("gallery-control-prev-disabled")){return false}var ag=x.parent(),j=ag.find("div.photo-gallery-container"),ah=ag.find(".gallery-control-next");if(ah.hasClass("gallery-control-next-disabled")){ah.removeClass("gallery-control-next-disabled")}if(j.position().left==0||j.is(":animated")){return false}var i=H+h;j.animate({left:"+="+i+"px"},function(){if(j.position().left==0){x.addClass("gallery-control-prev-disabled")}})});V.click(function(){var al=$(this);if(al.hasClass("gallery-control-next-disabled")){return false}var ag=al.parent(),i=ag.find("div.photo-gallery-container"),x=ag.find(".gallery-control-prev");if(x.hasClass("gallery-control-prev-disabled")){x.removeClass("gallery-control-prev-disabled")}var am=H+h,an=-(v-1)*(am);left_position=parseInt(i.css("left").replace("px"));if(left_position==an||i.is(":animated")){return false}if(!al.data("loading_finish")){var ak=(Math.abs(left_position)/(af*c))+1;var j=ak<=1?1*c:ak*c,ai=j+c>a.length?a.length:j+c;for(var ah=j;ah0){d.find(".photo-container").height("auto");var w=0;d.find(".photo-container").each(function(){var i=$(this).height();if(i>w){w=i}});d.find(".photo-container").each(function(){$(this).height(w)});d.find(".photo-gallery-preview").height(w);Site.unifiedAttrVal(d,".prop-wordwrap-container","height")}if(L=="listPhotos"){if(a.length!=0){for(var ab=0;ab")}}}if(q&&q.length>0){q.hover(function(){if(!$(this).hasClass("gallery-control-prev-disabled")){$(this).addClass("g_hover")}},function(){$(this).removeClass("g_hover")})}if(q&&V.length>0){V.hover(function(){if(!$(this).hasClass("gallery-control-next-disabled")){$(this).addClass("g_hover")}},function(){$(this).removeClass("g_hover")})}}};var isInShareContent=false;Site.removeModulePhotoTitle=function(a){$module=$("#module"+a);$module.find(".imgDiv").each(function(){$(this).removeAttr("title")})};Site.loadPhotoResultMarquee=function(m){var a=m.id,d=m.scale,b=$("#module"+a,Fai.top.document.body);k(b);j(b);g(b);i(b);e(b,d);function k(n){var v=n.find(".J_imgDiv"),r=n.find(".showPhotoContent"),u=n.find(".photoMarquee"),o=null,p=0;var w=v.outerWidth(true);var s=w*v.length;if(r.width()v){o-=(A-v);A=o+t*2}z.css({width:o+"px",padding:"0 "+t+"px"})}};Site.loadPhotoSmallPic=function(i){var s=i.id,H=i.scale,g=i.cus;var z=i.flag;var e=$("#"+s);e.on("Fai_onModuleSizeChange",function(){Site.smallPicPhotoModuleFix(s,z)});e.on("Fai_onModuleLayoutChange",function(){Site.smallPicPhotoModuleFix(s,z)});var G=e.find("div.photoSmallPicBox");var x=e.find(".photoSmallPicUpForms").height();var t=e.find(".photoSmallPicDownForms").height();e.find(".photoSmallPicForms").height(x+t);var F=e.find(".photoSmallPicForms").width();e.find(".photoSmallPicUpForms").width(F);e.find(".photoSmallPicUpFormsMid").width(F);e.find(".photoSmallPicDownForms").width(F);var u=e.find(".photoSmallPrePic_control").outerWidth(true);e.find(".photoSmallPicDownFormsMid").css("width",F-2*u-20+"px");var q=e.find(".photoSmallPrePicContainer");var a=e.find(".photoSmallPrePicOuter").outerWidth(true);var E=0;if(Fai.isIE6()){E=2}q.width(a*G.length+E);var k=q.width();var d=e.find(".photoSmallPicDownFormsMid").width();if(e.hasClass("formStyle93")&&k");P.find("#imgInnerNameDiv p").html(Fai.encodeHtml(al));var af=P.find("#imgInnerNameDiv");var Q=P.find(".J_carouselPhotos");if(z=="carouselPhotos"){var ac=parseInt(af.css("padding-left").replace("px",""))+parseInt(af.css("padding-right").replace("px",""));af.width(Q.width()-ac);P.find(".photoNameContainer").width(Q.width()-ac);af.css({overflow:"hidden",margin:"0 auto",bottom:"0",left:"0",right:"0"})}else{af.width(K.width());P.find(".photoNameContainer").width(K.width());var L=(P.find(".photoContainerLeft").height()-K.height())/2+K.height()-af.outerHeight(true);var ak=L%2==0?L:Math.floor(L/2)*2;af.css("top",ak+"px");var j=(P.find(".photoSmallPicUpFormsMid").width()-K.width())/2;af.css("left",j+"px").css("overflow","hidden")}if(i.isOpenImgEff){Site.bindImageEffectCusEvent_photo(P.find(".photoSmallPic_td"),i.tgOpt)}var au=P.find(".photoSmallPrePicSelected").parent().index();m.removeClass("photoBigPic-control-prev-disabled");n.removeClass("photoBigPic-control-next-disabled");v.removeClass("photoSmallPic-control-prev-disabled");w.removeClass("photoSmallPic-control-next-disabled");var ah=P.find(".photoSmallPicDownForms").find(".photoSmallPrePicContainer");var av=parseInt(ah.css("left").replace("px"));var ai=Math.abs(av)/a;var ae=ai+p-1>D-1?D-1:ai+p-1;var W=P.find(".photoSmallPicDownFormsMid").width();var ab,Y;if(au==0){m.addClass("photoBigPic-control-prev-disabled");if(av==0){v.addClass("photoSmallPic-control-prev-disabled")}}if(au==(D-1)){n.addClass("photoBigPic-control-next-disabled");ab=ai;Y=D-1;if((Y-ab+1)*a<=W&&av>=(D-p-1)*a){w.addClass("photoSmallPic-control-next-disabled")}}P.data("positionLeft",av);var ap=P.find(".photoSmallPrePicSelected").attr("phoid");P.find("div.photoContainerLeft").attr("phoid",ap).attr("photoname",al).attr("id","containerLeft_PhotosmallPic"+ap);c(P)}function h(){var N=$(this);if(N.hasClass("photoBigPic-control-prev-disabled")){return false}var J=$("#"+s);var j=J.find(".photoSmallPicDownForms .photoSmallPrePicContainer");var L=Math.ceil(J.find(".photoSmallPicDownFormsMid").width()/a);var Q=J.data("positionLeft");var M=Math.abs(Q)/a;var P=M+L-1>D-1?D-1:M+L-1;var O=J.find(".photoSmallPrePicSelected").parent();var R=O.index();if(R>=M&&R<=P){if(R==M){Q+=a}}else{Q=-(R-1)*a;j.css("left","0px")}if(j.is(":animated")){return false}$(".img_ProductPhoto_LR_Border").remove();$(".img_ProductPhoto_TB_Border").remove();$(".editLayer").remove();var K=O.prev().find("div.photoSmallPicBox");J.find("div.photoContainerLeft").attr("phoid",K.attr("phoid")).attr("photoname",K.find("img").attr("productname")).attr("id","containerLeft_PhotosmallPic"+K.attr("phoid"));j.animate({left:Q+"px"},function(){O.prev().find("div.photoSmallPicBox").click()})}function B(){var N=$(this);if(N.hasClass("photoBigPic-control-next-disabled")){return false}var J=$("#"+s);var j=J.find(".photoSmallPicDownForms .photoSmallPrePicContainer");var L=Math.ceil(J.find(".photoSmallPicDownFormsMid").width()/a);var Q=J.data("positionLeft");var M=Math.abs(Q)/a;var P=M+L-1>D-1?D-1:M+L-1;var O=J.find(".photoSmallPrePicSelected").parent();var R=O.index();if(R>=M&&R<=P){if(R==P){Q-=2*a}}else{Q=-(R-1)*a;j.css("left","0px")}if(j.is(":animated")){return false}$(".img_ProductPhoto_LR_Border").remove();$(".img_ProductPhoto_TB_Border").remove();$(".editLayer").remove();var K=O.next().find("div.photoSmallPicBox");J.find("div.photoContainerLeft").attr("phoid",K.attr("phoid")).attr("photoname",K.find("img").attr("productname")).attr("id","containerLeft_PhotosmallPic"+K.attr("phoid"));j.animate({left:Q+"px"},function(){O.next().find("div.photoSmallPicBox").click()})}function l(){var N=$(this);if(N.hasClass("photoSmallPic-control-prev-disabled")){return false}var J=N.parents(".photoSmallPicDownForms").find(".photoSmallPrePicContainer");var P=Math.floor(e.find(".photoSmallPicDownFormsMid").width()/a)+1;var M=N.parents(".photoSmallPicDownForms").find("a.g_imgNext");if(M.hasClass("photoSmallPic-control-next-disabled")){M.removeClass("photoSmallPic-control-next-disabled")}var L=parseInt(J.css("left").replace("px"));var O=Math.abs(L)/a;var K=O-P+1>0?O-P+1:0;if(K==0){N.addClass("photoSmallPic-control-prev-disabled")}var j=(O-K)*a;if(J.is(":animated")){return false}J.animate({left:"+="+j+"px"});c(e)}function o(){var U=$(this);var L=$("#"+s);if(U.hasClass("photoSmallPic-control-next-disabled")){return false}var j=U.parents(".photoSmallPicDownForms").find(".photoSmallPrePicContainer"),N=U.parents(".photoSmallPicDownForms").find("a.g_imgPrev"),M=Math.floor(L.find(".photoSmallPicDownFormsMid").width()/a)+1;if(N.hasClass("photoSmallPic-control-prev-disabled")){N.removeClass("photoSmallPic-control-prev-disabled")}var V=(M-1)*a,T=parseInt(j.css("left").replace("px"));var S=Math.abs(T)/a;var W=S+M-1>D-1?D-1:S+M-1;var R=L.find(".photoSmallPicDownFormsMid").width();if(j.is(":animated")){return false}var K;var J,P;if(W>=D-1){J=S;P=D-1;if((P-J+1)*a<=R){K=true;U.addClass("photoSmallPic-control-next-disabled")}}else{J=W;P=W+M-1}for(var O=J;O<=P;O++){var Q=$(G[O]).find("img");Site.loadPhotoSmallPicItem(Q,z)}if(!K){j.animate({left:"-="+V+"px"})}c(L)}function c(J){var j=J.find(".photoSmallPicDownForms");Site.updateThumbnailForSmallPicForms({$module:e,listCls:".photoSmallPicDownForms",itemCls:".photoSmallPrePicOuter"})}};(function(a,b,d){a.updateThumbnailForSmallPicForms=function(i){var h=i.listCls,k=i.itemCls,j=i.$module;if(j.length===0){return}var g=j.find(h),l=g.find(k);if(l.length===0){return}e(l)};function e(g){g.each(function(i,k){var h=b(k),j=h.find("img"),l=j[0].complete;if(l){c(j,h)}else{j.off("load.adjustSize").one("load.adjustSize",function(){var m=b(this);c(m,h)})}})}function c(j,n){j[0].style.width=null;j[0].style.height=null;var i=j.width()/j.height(),m=n.width(),h=n.height(),l=m/h,k,g;if(ib?g:b;var c=g>b?"width":"height";if(a>71){if(d=="carouselPhotos"){if(a>76){e.css(c,76);e.css("height",60);e.css("width",76)}}else{e.css(c,71)}}else{e.css("width",g).css("height",b)}e.show()};Site.smallPicPhotoModuleFix=function(w,s){var c=$("#"+w),z=c.find("div.photoSmallPicBox");var q=c.find(".photoSmallPicUpForms").height();var m=c.find(".photoSmallPicDownForms").height();c.find(".photoSmallPicForms").height(q+m);var y=c.find(".photoSmallPicForms").width();c.find(".photoSmallPicUpFormsMid").width(y);c.find(".photoSmallPicDownForms").width(y);c.find(".photoSmallPicUpForms").width(y);var n=c.find(".photoSmallPrePic_control").outerWidth(true);c.find(".photoSmallPicDownFormsMid").css("width",y-2*n-20+"px");var d=$(".photoSmallPicUpForms").width();var k=c.find(".photoSmallPrePicContainer");var a=$(".photoSmallPrePicOuter").outerWidth(true);var x=0;if(Fai.isIE6()){x=2}k.width(a*z.length+x);var e=k.width();var b=c.find(".photoSmallPicDownFormsMid").width();var t=c.find(".photoSmallPicUpFormsMid").outerHeight()/2-46;c.find(".photoSmallPic_control").css("top",t+"px");var v=z.length;var i=Math.floor(b/a)+1;var u=v%i==0?v/i:Math.floor(v/i)+1;if(u==1&&bk){k=o.height}})}if(j>=4&&j<6){Site.clearImageEffectContent_photo("module"+b,"parametersDiv")}var i=c.find(".nameWordWrap");if(i.length>0){var a=0;i.each(function(){var l=$(this).height();if(l>a){a=l}});i.each(function(){$(this).height(a)})}var d=0;c.find(".photoForm").each(function(){var u=$(this).attr("faiHeight");if(Fai.isNull(u)){return}var t=$(this).attr("faiWidth");var w=$(this).find(".imgDiv");var v=w.width();if(g){k=w.height()}var s={width:v,height:k};var o=w.find("img");var r=w.find(".J_photoImgPanel");if(e==2){var p=o.attr("iWidth");var l=o.attr("iHeight");var n=p/l;var m=v/k;w.css("height",k+"px");if(m<=n){o.css("width",n*k+"px");o.css("height",k+"px");o.css("marginTop","");o.css("marginLeft",((v-n*k)/2)+"px");r.css({width:v,height:k,position:"relative",overflow:"hidden"})}else{o.css("height",v/n+"px");o.css("width",v+"px");o.css("marginLeft","");o.css("marginTop",((k-v/n)/2)+"px");r.css({width:v,height:k,position:"relative",overflow:"hidden"})}}else{if(typeof e=="number"){e=!!!e}if(e){s=Fai.Img.calcSize(t,u,v,k,Fai.Img.MODE_SCALE_FILL)}if(r.length>0||w.length>0){r.css({marginLeft:"",marginTop:"",width:s.width+"px",height:s.height+"px",position:"relative",overflow:"hidden",margin:"0 auto"});o.css("marginLeft","").css("marginTop","")}o.css("width",s.width+"px");o.css("height",s.height+"px");w.css("height",k+"px")}$(this).find(".photoParameters").css("height","auto");var q=$(this).height();if(q>d){d=q}});c.find(".photoForm").css("height",d+"px");Site.switchJump()};Site.multiPhoto=function(o,n,e){var g=false;var q="leftIcon";var t="rightIcon";var s="horizontal";var b=false;var p={};p=$.extend({},p,e);if(p.leftIconID!=null){q=p.leftIconID}if(p.rightIconID!=null){t=p.rightIconID}if(p.direction!=null){s=p.direction}if(p.zoom!=null){b=p.zoom=="true"?true:false}var i=o;var u=o.width();var c=o.height();var j=i.find("> ul");var d=i.find("li");var m=i.find("li .g_border");var a=d.outerWidth(true);var h=d.outerHeight(true);var l=d.length;var r=0;if(s=="horizontal"){r=parseInt(u/a)}else{r=parseInt(c/h)}if(s=="horizontal"){if(Fai.isIE6()){a++}var k=(a)*l;j.css("width",k+"px")}else{var v=h*l;j.css("height",v+"px")}if(o.hasClass("J_imgDivsStyle5")){g=true}$("#"+q).mouseover(function(){if((l>=r)&&((Math.abs(j.position().left)+i.width())>=j.width())){$(this).addClass("g_imgPrevHover")}}).mouseout(function(){$(this).removeClass("g_imgPrevHover")}).click(function(){if(j.position().left<0||j.position().top<0){if(j.is(":animated")){return}if(s=="horizontal"){j.animate({left:(j.position().left+a)+"px"},"slow")}else{if(s=="vertical"){j.animate({top:(j.position().top+h)+"px"},"slow")}}if(Math.abs(j.position().left)<=a){$(this).addClass("g_imgPrevNotClick")}$("#"+t).removeClass("g_imgNextNotClick")}});$("#"+t).mouseover(function(){if((l>=r)&&((Math.abs(j.position().left)+i.width())<=j.width())){$(this).addClass("g_imgNextHover")}}).mouseout(function(){$(this).removeClass("g_imgNextHover")}).click(function(){if(j.is(":animated")){return}if(l>=r){if(s=="horizontal"){if((Math.abs(j.position().left)+i.width())=j.width()){$(this).addClass("g_imgNextNotClick")}$("#"+q).removeClass("g_imgPrevNotClick");j.animate({left:(j.position().left-a)+"px"},"slow")}else{$(this).removeClass("g_imgNextHover");$(this).addClass("g_imgNextNotClick")}}else{if((Math.abs(j.position().top)+i.height())");B.push("
");B.push("
");B.push("
");B.push("");y.append(B.join(""));$(A).load(function(){$(".ProductDetailloadingImg").remove();$(".multiPhotoImgLoad").fadeOut("slow",function(){$(this).remove()})});setTimeout(function(){if(!$(A).load()){var H=$("
");if(n.find(".multiPhotoImgLoad").length==0){H.appendTo(n)}}},1000);A.css("width",E.width+"px");A.css("height",E.height+"px");A.attr("src",w);n.attr("faiHref",w);if(b){n.find(".cloud-zoom").data("zoom").destroy();n.find(".cloud-zoom").CloudZoom({imageWidth:C,imageHeight:F})}}).mouseleave(function(){})};Site.createImageEffectContent_photo=function(k,m,c,q){var g=$(k).parents("."+c.targetParent);var l=$(k).find(".imageEffects");var d=$(g).attr("photoName");var n=$(g).attr("photoDisc");var j=m[Site.ImageEffect.DATA.KEY.FULL_MASK_OPEN_DISC];var o=m[Site.ImageEffect.DATA.KEY.HALF_MASK_OPEN_DISC];var p=c.nameHidden;if(p&&!j&&!o){return}h();i(m,c.nameWordWrap);function h(){var t=[];var r=m.effType;var s="";if(r==4){s="photoFullMask"}else{if(r==5){s="photoHalfMask"}}t.push("
");t.push("
");if(!p){t.push("
"+d+"
")}if(j&&n.length>0&&r==4){t.push("
"+n+"
")}if(o&&n.length>0&&r==5){t.push("
"+n+"
")}t.push("
");t.push("
");$(l).append(t.join(""))}function i(x,r){var v=$(l).find(".photoName");var A=$(l).find(".photoDisc");var B=3;if(v.length!=0&&!p){e(x,r);Site.clamp($(v)[0],{clamp:B})}if(A.length!=0&&x.effType==4&&j){b(x);Site.clamp($(A)[0],{clamp:B});setTimeout(function(){var D=$(l).height();var F=$(l).find(".props").height();if(F>D&&!p){var C=$(A).height();var E=F-D;B=(C)-E+"px";Site.clamp($(A)[0],{clamp:B})}},100)}if(x.effType==4){var t=l.parent().find(".J_photoImg");if(t.attr("picsca")==="2"){var w=t.css("margin-top");if(w.replace("px","")!=="0"){l.css("margin-top",w)}}}if(x.effType==5){var s=$(l).height()/3;var z=$(l).find(".props");var y=$(z).height()+10;var u=s;a(x);if(y>s){u=y}$(l).css("height",u).css("bottom","-"+u+"px")}}function e(v,w){var s=$(l).find(".photoName");var u="";$(s).removeAttr("style");if(v.effType==4){var t=v[Site.ImageEffect.DATA.KEY.FULL_MASK_CUS_NAME];var x=v[Site.ImageEffect.DATA.KEY.FULL_MASK_NAME_ALIG];var r=v[Site.ImageEffect.DATA.KEY.FULL_MASK_NAME_STYLE];if(t&&typeof r=="string"&&r.length>0){r=$.parseJSON(r);u+="color: "+r.fc+";";u+=(r.fb==1)?" font-weight: bold;":""}if(typeof x=="number"){u+=" text-align:"+((x==1)?"center;":(x==2)?"left;":"right;")}}if(w){if(m.effType==4){u+=" word-wrap: break-word;"}else{u+=" overflow: visible; text-overflow: clip; white-space: normal; word-wrap: break-word;"}}else{u+=" overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"}if(v.effType==5){if(m.style==88||m.style==89||m.style==90){u+=" padding-top: 2%;"}else{u+=" padding-top:2.5_25;"}}$(s).attr("style",u)}function b(x){var r=$(l).find(".photoDisc");var w="";var t=x[Site.ImageEffect.DATA.KEY.FULL_MASK_CUS_DISC];var s=x[Site.ImageEffect.DATA.KEY.FULL_MASK_DISC_STYLE];var v=x[Site.ImageEffect.DATA.KEY.FULL_MASK_DISC_ALIG];$(r).removeAttr("style");if(t&&typeof s=="string"&&s.length>0){s=$.parseJSON(s);w+=" color: "+s.fc+";"}if(typeof v=="number"){w+=" text-align:"+((v==1)?"center;":(v==2)?"left;":"right;")}if(!p){var u=(Fai.isIE6()||Fai.isIE7())?16:18;w+=" margin-top: "+u+"px;"}$(r).attr("style",w)}function a(w){var t=$(l).find(".photoDisc");var v="";var u=w[Site.ImageEffect.DATA.KEY.HALF_MASK_CUS_DISC];var x=w[Site.ImageEffect.DATA.KEY.HALF_MASK_DISC_STYLE];var s=w[Site.ImageEffect.DATA.KEY.HALF_MASK_DISC_ALIG];var r=w[Site.ImageEffect.DATA.KEY.HALF_MASK_OPEN_DISC];if(!r){return}if(u&&typeof x=="string"&&x.length>0){x=$.parseJSON(x);v+=" color: "+x.fc+";"}if(typeof s=="number"){v+=" text-align:"+((s==1)?"center;":(s==2)?"left;":"right;")}$(t).attr("style",v)}};Site.clearImageEffectContent_photo=function(b,a){$("#"+b).find("."+a).remove()};Site.bindImageEffectCusEvent_photo=function(h,c){var g=$(h).find(".imageEffects");var a=true;var e=$(h).parents("."+c.targetParent).find("a");var d=$(e).attr("href");var b=(typeof d=="undefined"||d.length==0||d.indexOf("javascirpt")>0||d.indexOf("return")>0||e.length==0)?false:true;if(!b){a=false}if(a){$(g).css("cursor","pointer")}else{$(g).css("cursor","default")}$(g).unbind("click").bind("click",function(){var m=$(this).parents("."+c.targetParent).find("a");if(Fai.isNull(m)){return}var j=$(m).attr("href");var i=$(m).attr("onclick");var k=$(m).attr("target");var l=(typeof j=="undefined"||j.length==0||j.indexOf("javascirpt")>0||j.indexOf("return")>0||e.length==0)?false:true;if(typeof i!="undefined"){$(m).click()}else{if(l){window.open(j,k)}}})};Site.formMiddleContentWidthArray=new Array();Site.loadPhotoGroup=function(h,g,e,a,b){var c=$("#module"+h);if(Fai.isNull(c)){return}var d=0;c.find(".photoForm").css("height","auto").each(function(){var k=$(this),i=k.attr("faiHeight"),j=k.attr("faiWidth");if(Fai.isNull(i)){return}var p=k.find(".imgDiv"),o=p.width(),n=p.height();k.css("width",o+"px");var m=g?Fai.Img.calcSize(j,i,o,n,Fai.Img.MODE_SCALE_FILL):{width:o,height:n};p.find("img").css({width:m.width,height:m.height});k.find(".photoParameters").css("height","auto");var l=k.height();d=l>d?l:d}).css("height",d+"px");Site.photoGroupImageEffect.bind(c)};Site.initPhotoGroupSelect=function(c,e){var a=Fai.top.location.hash;var d=e.style;if(a.length<2){return}if(Fai.getHashParam(a,"_php")&&d==27){var g=Site.decodeQsToUrl(Fai.getHashParam(a,"_php"),"_php",e);var b=Fai.getHashParam(g,"groupId");Fai.top.$("#module"+c).find("table").find("[groupid="+b+"]").addClass("g_selected")}};(function(b,e,d){e(window).load(g);b.photoGroupImageEffect=e.extend({},b.photoGroupImageEffect,{bind:h});function g(){var i=e(".formStyle27",e("#web")),j="mousemove.bindImaEff";if(i.length===0){return}i.each(function(l,m){var n=e(m),k=(n.find(".J_photoImg").length>0);if(!k){return}n.off(j).one(j,function(){h(e(this),true)})})}function h(l,j){var k=b.photoGroupImageEffect,i=l.find(".J_photoImg").length>0;if(!c(l)){return}if(!i){return}if(j){setTimeout(function(){a(k,l)})}else{a(k,l)}}function a(l,m){var j=m.find(".imgDiv"),k="mouseenter.imageEffect",i="mouseleave.imageEffect";l.init(m);j.off(k).off(i);j.on(k,function(n){l.use(m,e(this).parent())}).on(i,function(n){l.unUse(m,e(this).parent())})}function c(i){return i.hasClass("formStyle27")}}(Site,jQuery));(function(c,g,e){c.photoGroupImageEffect=g.extend({},c.photoGroupImageEffect,{use:a,unUse:d,init:j,fix:h,refresh:i});function j(l,k){b("init",arguments)}function a(l,k){b("use",arguments)}function d(l,k){b("unUse",arguments)}function h(l,k){b("fix",arguments)}function i(l,k){b("refresh",arguments)}function b(n,k){var m=c.photoGroupImageEffect.getImageEffect(k[0]),l;if(g.isPlainObject(m)){l=m[n]}if(g.isFunction(l)){l.apply(m,k)}}}(Site,jQuery));(function(c,e,d){c.photoGroupImageEffect=e.extend({},c.photoGroupImageEffect,{adjustImgEffSize:j,adjustModuleImgEffSize:a,getImageEffect:g,wrapModuleImage:b,computeWrapImageSize:h});function a(l,k){l.find(".photoForm").each(function(m,n){j(e(n))})}function j(n){var k=n.find("img"),p=n.find(".imageEffects"),q=n.find(".imgDiv"),o=1,l=k.width(),s=k.height(),m=k.position().left,r=k.position().top;l=l-o*2;s=s-o*2;p.css({left:m,top:r,width:l,height:s})}function g(n){var l=n.find(".J_photoForms").attr("_imgefftype"),o=c.photoGroupImageEffect,m=function(){},k={1:{},2:o.border,3:o.magnifier,4:o.textDescFull,5:o.textDescHalf,6:o.imgScale,7:o.bgTranslate};return k[l]}function b(l,k){l.find(".photoForm").each(function(m,n){i(e(n))})}function i(n){var q=e('
'),p=n.find(".imgDiv"),k=n.find("img"),r=(k.parent().hasClass(".J_tmpImgWrap")>1),l=k.width(),s=k.height(),m,o;if(r){return}q.css({position:"relative",width:l,height:s,display:"inline-block"});if(l===p.width()&&s===p.height()){m=true}else{m=false}o={initImgRatio:l/s,isImgFull:m};q.data("wrapData",o);k.wrap(q)}function h(q){var k=q.find("img"),t=q.find(".J_tmpImgWrap"),o=t.data("wrapData"),r=q.width(),n=q.height(),m=r/n,p=o.initImgRatio,l,s;if(o.isImgFull){l=r;s=n}else{if(p>m){l=r;s=l/p}else{s=n;l=s*p}}return{width:l,height:s}}}(Site,jQuery));(function(b,c,e){b.photoGroupImageEffect=c.extend({},b.photoGroupImageEffect,{border:{init:d,fix:a}});function d(i){var h,g;i.find(".imageEffects").remove();i.removeData("imageEffectData");i.find(".photoForm").each(function(s,o){var m=c(o),j=m.find(".photoImg"),k=j.parent(),r=(k.find(".imageEffects").length>0),n="solid #000 1px",t=0,p="absolute",u=0,l,q;if(r){return}q=c(Site.ImageEffect.DATA.imageEffectHtml);k.append(q);if(j.width()0){return}var j=g(['
','
','
','
'+(k||"")+"
","
","
"].join(""));j.css("overflow","hidden");l.append(j)}}(Site,jQuery));(function(b,e,h){b.photoGroupImageEffect=e.extend({},b.photoGroupImageEffect,{textDescHalf:{use:c,init:g,fix:a}});function g(i){i.find(".imageEffects").remove();b.ImageEffect.FUNC.BASIC.Init({moduleId:i.attr("_moduleid"),imgEffOption:{effType:5,borderType:false},tagetOption:{target:"imgDiv a"}});i.find(".imageEffects").css("zIndex",1);i.find(".J_photoForm").each(function(k,m){var j=e(m);var l=j.find(".imageEffects");var n=j.attr("_photogroupdesc");d(l);l.find(".J_desc").text(n)});a(i)}function c(m,i){var o=i.find(".imgDiv");var l=i.find(".imageEffects");var k=i.find("img");var n=k.position().left;var j=l.position().left;if(n!==j){l.css("left",0)}}function d(k,j){if(k.find(".J_mask").length>0){return}var i=e(['
','
','
','
'+(j||"")+"
","
","
"].join(""));k.append(i)}function a(i){i.find(".imgDiv").each(function(j,n){var p=e(n);var l=p.find(".imageEffects");var k=p.find("img"),m=k.width(),o=k.offset().left-p.offset().left;l.css({width:m,left:o})})}}(Site,jQuery));(function(a,c,e){a.photoGroupImageEffect=c.extend({},a.photoGroupImageEffect,{imgScale:{init:d,refresh:b}});function d(h){h.find(".imageEffects").remove();a.ImageEffect.FUNC.BASIC.Init({moduleId:h.attr("_moduleid"),imgEffOption:{effType:6,borderType:false},tagetOption:{target:"imgDiv a",picScale:2}});a.photoGroupImageEffect.wrapModuleImage(h)}function b(l,i,j){var k=j.width,h=j.height,m=a.photoGroupImageEffect.computeWrapImageSize;if(!c.isFunction(m)){return}if(!k||!h){return}l.find(".imgDiv").each(function(p,t){var u=c(t);var r=m(u);var o=u.find(".J_tmpImgWrap");var q=u.find("img");var s=r.width;var n=r.height;o.css({width:s,height:n});q.attr("_initwidth",s);q.attr("_initheight",n);q.css({width:s,height:n,margin:0})})}function g(n){var h=n.find("img"),q=n.find(".J_tmpImgWrap"),l=q.data("wrapData"),o=n.width(),k=n.height(),j=o/k,m=l.initImgRatio,i,p;if(l.isImgFull){i=o;p=k}else{if(m>j){i=o;p=i/m}else{p=k;i=p*m}}return{width:i,height:p}}}(Site,jQuery));(function(a,c,e){a.photoGroupImageEffect=c.extend({},a.photoGroupImageEffect,{bgTranslate:{init:d,refresh:b}});function d(g){g.find(".imageEffects").remove();g.find(".imgDiv").each(function(h,j){var l=c(j);var k=l.find("a");var i=k.attr("style")||{};k.data("initW",i.width);k.data("initH",i.height);k.css({width:k.width(),height:k.height()})});a.ImageEffect.FUNC.BASIC.Init({moduleId:g.attr("_moduleid"),imgEffOption:{effType:7,borderType:false},tagetOption:{target:"imgDiv a"}});a.photoGroupImageEffect.wrapModuleImage(g)}function b(k,h,i){var j=i.width,g=i.height,l=a.photoGroupImageEffect.computeWrapImageSize;if(!c.isFunction(l)){return}if(!j||!g){return}k.find(".imgDiv").each(function(o,s){var t=c(s),q=l(t),n=q.width,r=q.height,m=t.find(".J_tmpImgWrap"),p=t.find("img");m.parent().css({width:n,height:r});m.css({width:n,height:r});p.css({width:n+10,height:r})})}}(Site,jQuery));Site.initModuleWeather=function(a,b,d,c){Site.initIframeLoading(a,b,d,c)};Site.initModuleWeatherBySina=function(b,i,a,c,k){Site.logDog(200133,1);var e=(a==11?2:1),h=0,j="json",d=Fai.isIE6(),g=[];var l="../platform.sina.com.cn/weather/forecast@app_key=1315597423&city="+encodeURIComponent(i)+"&startday="+h+"&lenday="+e+"&format="+j+"&auth_type=uuid&auth_value=0123456789012345&callback=?";$(".formMiddleContent"+b).css("overflow","hidden");$(".formMiddleContent"+b).append("
");if($("#toolTips"+a).length>0){$("#toolTips"+a).remove()}$.getJSON(l,function(B){if(!B||B.status.code!=0){if(!c){return}Site.initModuleWeatherBySina(b,c,a);return}var u=$(".formMiddleContent"+b+" .weather2"),y=B.data.city[0].days.day,C=false;for(var z=0;z");g.push("
  • ");g.push(""+v+"
  • ");g.push("
  • ");if(a==1){if(d){$(".formMiddleContent"+b).css("height",27+"px")}g.push(""+o+"
  • ")}else{if(d){$(".formMiddleContent"+b).css("height",33+"px")}if(a==3||a==11){if(!A){g.push("")}}g.push("")}g.push("");g.push("
  • ");g.push("");g.push(""+t+" ~");g.push("");g.push(""+s+"");g.push("
  • ");if(a==7){g.push("
  • ");g.push(""+r+"
  • ")}g.push("")}else{if(a==11){$(".formMiddleContent"+b+" .includeWeather"+a).width(560);if(d){$(".formMiddleContent"+b).css("height",81+"px")}var D="";z==0?D="今天":D="明天";g.push("
    ");g.push("
    "+(!C?v:"")+"
    ");g.push("");g.push("
    ");g.push("
    ");g.push(""+D+" ");g.push(""+t+" ~ ");g.push(""+s+"");g.push(" ");g.push("");g.push("");g.push("
    ");g.push("
    ");if(!A){g.push(""+p+"");g.push("")}g.push(""+o+"");g.push("
    ");g.push("
    ");g.push("
    ");C=true}else{if(a==12){if(d){$(".formMiddleContent"+b).css("height",135+"px")}g.push("
    ");g.push("
    ");g.push("
    "+v+"
    ");g.push("
    ");g.push("");g.push("
    ");g.push("
    ");if(!A){g.push(""+p+"");g.push("")}g.push(""+o+"");g.push("
    ");g.push("
    ");g.push("
    ");g.push("
    ");g.push("
    温  度:
    ");g.push("
    ");g.push(""+t+"");g.push(" ~");g.push(""+s+"");g.push("");g.push("
    ");g.push("
    ");g.push("
    ");g.push("
    风  力:
    ");g.push("
    ");g.push(""+r+"
    ");g.push("
    ");g.push("
    ");g.push("
    风  向:
    ");g.push("
    ");if(x==""){g.push(""+w+"
    ")}else{g.push(""+x+"
    ")}g.push("
    ");g.push("
    ")}}}}if(g.length==0){var q="
    网络缓慢,请重新加载
    ";$(".formMiddleContent"+b+" .includeWeather"+a).append(q)}else{$(".formMiddleContent"+b+" .includeWeather"+a).append(g.join(""))}$(".formMiddleContent"+b+" .weather2Loading").remove()})};Site.initModuleWeatherByEtouch=function(e,d,c,b){Site.logDog(200133,1);var a=[];var h=Fai.isIE6();var g="//wthrcdn.etouch.cn/weather_mini?citykey="+d+"&callback=?";$(".formMiddleContent"+e).css("overflow","hidden");$(".formMiddleContent"+e).append("
    ");if($("#toolTips"+c).length>0){$("#toolTips"+c).remove()}$.getJSON(g,function(o){if(!o||o.status!=1000){if(!b){return}Site.initModuleWeatherByEtouch(e,b,c);return}var k=o.data.city;var q=o.data.wendu;var l=o.data.forecast[0].fengli;var p=o.data.forecast[0].fengxiang;var m=o.data.forecast[0].type;var i=o.data.aqi;var j="";var n="";if(i>=0&&i<=50){n="优"}else{if(i>50&&i<=100){n="良"}else{if(i>100&&i<=150){n="轻度污染"}else{if(i>150&&i<=200){n="中度污染"}else{if(i>200&&i<=300){n="重度污染"}else{if(i>300){n="严重污染"}}}}}}switch(m){case"暴雨":j="baoyu";break;case"大暴雨":j="dabaoyu";break;case"大雪":j="daxue";break;case"大雨":j="dayu";break;case"多云":j="duoyun";break;case"雷阵雨":j="leizhenyu";break;case"霾":j="mai";break;case"晴":j="qing";break;case"雾":j="wu";break;case"小雪":j="xiaoxue";break;case"小雨":j="xiaoyu";break;case"雪":j="xue";break;case"阴":j="yin";break;case"雨夹雪":j="yujiaxue";break;case"阵雨":j="zhenyu";break;case"中雪":j="zhongxue";break;case"中雨":j="zhongyu";break;case"中到大雨":j="zhongyu";break;case"小到中雨":j="xiaoyu";break;case"中到大雪":j="zhongxue";break;case"小到中雪":j="xiaoxue";break;case"大到暴雨":j="baoyu";break;default:j="kongbai"}if(c==13){if(h){$(".formMiddleContent"+e).css("height",80+"px")}a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    "+k+"
    ");a.push("
    ");a.push(""+q+"℃");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push(""+m+"");a.push("
    ");a.push("
    "+l+"
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push("");a.push("
    ");a.push("
    ")}else{if(c==14){if(h){$(".formMiddleContent"+e).css("height",80+"px")}a.push("
    ");a.push("
    ");a.push("
    ");a.push("");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    "+k+"
    ");a.push("
    ");a.push(""+q+"℃");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push(""+m+"");a.push("
    ");a.push("
    "+l+"
    ");a.push("
    ");a.push("
    ")}else{if(c==15){if(h){$(".formMiddleContent"+e).css("height",80+"px")}a.push("
    ");a.push("
    ");a.push("
    ");a.push("");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push("
    "+k+"
    ");a.push("
    ");a.push(""+m+"
    ");a.push("
    "+l+"
    ");a.push("
    ");a.push("
    ");a.push("
    ");a.push(""+q+"℃");a.push("
    ");a.push("
    ");a.push("空气质量: "+i+" "+n+"");a.push("
    ");a.push;a.push("
    ");a.push("
    ")}}}if(a.length==0){var r="
    网络缓慢,请重新加载
    ";$(".formMiddleContent"+e+" .includeWeather"+c).append(r)}else{$(".formMiddleContent"+e+" .includeWeather"+c).append(a.join(""))}$(".formMiddleContent"+e+" .weather2Loading").remove()})};Site.initWeatherOfIP=function(b,a){Site.logDog(200133,1);$.ajax({url:"//int.dpool.sina.com.cn/iplookup/iplookup.php?format=js",type:"POST",dataType:"script",success:function(c){var d=remote_ip_info.city;if(a==13||a==14||a==15){$.ajax({url:Site.genAjaxUrl("site_h.jsp"),data:"cmd=getWeatherCityCode&cityName="+Fai.encodeUrl(d),type:"post",success:function(i){var e=jQuery.parseJSON(i);if(e.success){var h=e.msg.cityCode;var g=e.msg.parentCityCode;Site.initModuleWeatherByEtouch(b,h,a,g)}}})}else{Site.initModuleWeatherBySina(b,d,a)}}})};Site.initModuleDate=function(){var a=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d,e,b;return{init:function(g,h){d=g,e=h;b=$("#module"+d+"Date");this.start()},start:function(){this.go();if(e==2||e==3||e==5||e==7||e==8){setInterval(this.go,8001)}},go:function(){var o=new Date(),n=o.getFullYear(),j=o.getMonth()+1,q=o.getDate(),p=o.getDay(),g=a[p],k=c[p],l=o.getHours()+"",i=o.getMinutes()+"",r="";if(l.length==1){l="0"+l}if(i.length==1){i="0"+i}if(e==1){r=n+"年"+j+"月"+q+"日 "+g}else{if(e==2){r=n+"年"+j+"月"+q+"日 "+l+":"+i}else{if(e==3){r=n+"年"+j+"月"+q+"日 "+g+" "+l+":"+i}else{if(e==4){r=n+"-"+j+"-"+q}else{if(e==5){r=n+"-"+j+"-"+q+" "+l+":"+i}else{if(e==6){r=j+"/"+q+"/"+n+" "+k}else{if(e==7){r=j+"/"+q+"/"+n+" "+l+":"+i}else{r=j+"/"+q+"/"+n+" "+k+" "+l+":"+i}}}}}}}b.text(r)}}}();(function(a){jQuery.fn.extend({bannerImageSwitch:function(c){if(typeof Fai=="undefined"){alert("must import fai.js");return}var b=a.extend({title:true,desc:false,btn:true,repeat:"no-repeat",position:"50% 50%",titleSize:14,titleFont:"Verdana,宋体",titleColor:"#FFF",titleTop:4,titleLeft:4,descSize:12,descFont:"Verdana,宋体",descColor:"#FFF",descTop:2,descLeft:4,btnWidth:15,btnHeight:15,btnMargin:4,btnType:1,playTime:4000,animateTime:1500,animateStyle:"o",index:0,wideScreen:false,btnFunc:function(){}},c);return a(this).each(function(){var i=a(this);var R=b.width||i.width();var ae=b.height||i.height();var aa=b.data.length;var ac=b.index;var h=R0)?true:false;var t=1000;var I=Site.getWebBackgroundData();var Y=(b.width<=i.width())?b.width:"100%";var l=d?"bannerV2":"banner";var r=false;var F=false;var W;var w;if(d){F=o.bla==0?true:false;r=(o.blw.t==1&&F)?true:false;if(o.blw.t===2){W=b.width}else{var Q=Fai.top.$("#webContainer").width();if(o.blw.t===0){if(!Fai.top._wideBanner){var O=Fai.top.$("#webBanner").width();W=O}else{W=Q}}if(o.blw.t===1){W=Q}}}else{r=I.wbs?true:false}if(r){var U=Fai.top._manageMode?Fai.getScrollWidth():0;ae=(ae>=t)?t:ae;var u,G=false;if((Fai.top.$(".g_web").width()+U)>a(window).width()){u=Fai.top.$(".g_web").width()+U}else{u=a(window).width();G=true}S=S>(u-U)?u-U:S;Y=S;h=S;if(Fai.top._wideBanner&&G){Fai.top.$("#g_main").width("auto");Fai.top.$("#web").width("auto")}}i.css("overflow","hidden");i.height(ae);var ah=a('
    ').appendTo(i).css("position","absolute").css("display","none").css("zIndex",2).css("width",a.browser.msie&&a.browser.version==6?a(i).parent().parent().width()+"px":a(i).parent().width()+"px").css("height",30+"px").css("line-height",30+"px");if(aa==0){ah.css("visibility","hidden")}if(b.showImageName){ah.css("display","block")}var X="none";if(b.data.length>1){X=b.btn?"block":"none"}if(b.btnType!=0){var ai=a('
    ').appendTo(i).css("position","absolute").css("zIndex",3).css("display",X)}a("
    ").appendTo(i);var af="";if(C){af="billboard billboard"+o.at}var q=a('
    ').appendTo(i).css("width",Y).css("position","relative").height("y,show-y".indexOf(b.animateStyle)!=-1?ae*aa:ae).css("overflow","hidden").css("margin","0 auto");if(b.wideScreen){q.css("width","100%")}var ak=0;var A="100%";if(b.btnType==0){b.animateStyle="x"}var ad=[];var al="";var B="";var j="";var k="";var J="";var s="";var ab="";if(b.btnType==0){al="arrowImg"}else{if(b.btnType==1){al="numImg"}else{al="dotImg"}}a.each(b.data,function(ao,at){var an="";var ar="";ab="";J="";s="";if(a.trim(at.edgeLeft)!=""){J="background:"+at.edgeLeft+";"}if(a.trim(at.edgeRight)!=""){s="background:"+at.edgeRight+";"}if(!at.href){an="onclick='return false;'"}if(at.onclick){an="onclick='"+at.onclick+"'"}ad=[];B="";B+="position:absolute;width:100%;";if(b.btnType==0){if(b.wideScreen||r){B+="left:"+((ao-ac)*S)+"px;"}else{B+="left:"+((ao-ac)*b.width)+"px;"}}if(C){ad.push("
    \n")}else{ad.push("
    \n")}j="";j+="width:100%;";j+="height:"+ae+"px;";j+="cursor:"+(at.href?"pointer":"default")+";";j+="background-position:"+b.position+";";j+="background-repeat:"+b.repeat+";";j+="overflow:hidden;";j+="display:block;";j+="outline:none;";j+="margin:0 auto;";j+="position:relative;";j+="z-index:1;";if(r||F){j+="background-size:cover;"}else{}if(at.width&&at.width>0){k=("\n")}else{k="";j+="background-image:url("+at.src+");"}if(b.wideScreen&&!d){ad.push("");ad.push("")}if(at.href){ad.push("\n")}else{ad.push("\n")}ad.push("
    \n");q.append(ad.join(""));if(d){Fai.top.Fai.setCtrlStyleCssList("styleWebSite","",[{cls:"#bannerV2 .fk-inBannerListZone",key:"width",value:W+"px"},{cls:"#bannerV2 .fk-inBannerListZone",key:"margin-left",value:"-"+W/2+"px"}]);var aq=Fai.top.$(".fk-inBannerListZone-tmp").find(".form");aq.each(function(au,av){if(a(this).parent().hasClass("fk-inBannerListZone-tmp")){if(a(this).attr("_banid")===at.i&&parseInt(a(this).attr("_sys"))===1){a("#fk-inBannerListZone-"+ao).append(a(this))}}});if(Fai.top._manageMode){jzUtils.run({name:"_elemZone.sortModuleZone",base:Fai.top})}Site.bannerV2.stopBannerPropagation()}if(b.btnType==1){var ap=a('').appendTo(ai).html(""+(ao+1)+"")}else{if(b.btnType==2){var ap=a('').appendTo(ai)}}if(ao==ac){ab="spanShowName"}var am=a('').appendTo(ah).css("margin-left",10+"px").text(at.name);if(b.btnType!=0){if(ao==ac){if(b.btnType==1){ap.addClass("imageSwitchBtnSel")}else{ap.addClass("imageSwitchBtnSel_dot")}}}if(b.btnType==1){ak+=Fai.getDivWidth(ap)}});if(b.btnType==0){if(aa>1){var P=a('').appendTo(i).css({position:"absolute",zIndex:3});var ag=a('').appendTo(i).css({position:"absolute",zIndex:3})}}if(b.btnType==1){ai.width(ak)}var p=i.parent();var D=p.width();if(a.browser.msie&&a.browser.version==6){D=p.parent().width()}var Z=p.height();if(D>b.width){D=b.width+(D-b.width)/2}if(D>i.width()){D=i.width()}if(Z>ae){Z=ae}if(aa>1){if(b.btnType!=0){if(Fai.top.$("#"+l).length>0){if(b.btnType==1){if(R>=i.width()){ai.css("right","40px")}else{ai.css("right","50%");ai.css("marginRight","-"+R/2+"px")}}else{if(b.btnType==2){ai.css("left","50%");ai.css("marginLeft","-"+ai.width()/2+"px")}}}else{ai.css("left",(D-ak)+"px")}}else{var E=i.width()-R;if(R<=i.width()){E=E-E*0.5}else{E=0}P.css("left",E);ag.css("right",E)}}if(b.btnType!=0){var V=ai.children("a");var H=q.find(".J_bannerItem")}else{var e=ag;var K=P}var M=ah.children("span");var v=D-ak;if(aa>1){if(b.btnType!=0){ah.css("top",(Z-ai.height()-9)+"px").css("left",0+"px")}else{ah.css("top",Z+"px").css("left",0+"px")}var L=a.browser.msie&&a.browser.version==6?parseInt(n()+30):parseInt(n()+20);if(v>L){if(b.btnType==1){ai.css("top",(Z-ai.height()-6)+"px")}else{if(b.btnType==2){ai.css("bottom","5px")}else{P.css("top","50%");P.css("marginTop","-"+P.height()/2+"px");ag.css("top","50%");ag.css("marginTop","-"+ag.height()/2+"px")}}}else{if(b.btnType==1){ai.css("top",(Z-ai.height()-30)+"px")}else{if(b.btnType==2){ai.css("bottom","5px")}else{P.css("top","50%");P.css("marginTop","-"+P.height()/2+"px");ag.css("top","50%");ag.css("marginTop","-"+ag.height()/2+"px")}}}}function n(){if(M.length>0){var an=a(M[0]).width();for(var am=1;am1){if(C){Site.bannerAnimate.init({container:Fai.top.$("#"+l+" .switchGroup_"+l+""),effectIndex:o.at,currentIndex:b.index,speed:o.a,duration:o.i,_isBannerV2:d});if(b.btnType!=0){V.click(function(an){an.stopPropagation();var am=V.index(this);Site.bannerAnimate.stop();Site.bannerAnimate.goTo(am)})}else{e.click(function(am){am.stopPropagation();Site.bannerAnimate.next()});K.click(function(am){am.stopPropagation();Site.bannerAnimate.prev()})}i.mouseover(function(){Site.bannerAnimate.stop()});i.mouseout(function(){Site.bannerAnimate.autoPlay()})}else{function g(){if(d){jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}}if(b.btnType!=0){V.click(function(an){an.stopPropagation();var am=V.index(this);if(am==ac){return}if(b.btnType==1){V.eq(ac).removeClass("imageSwitchBtnSel");V.eq(am).addClass("imageSwitchBtnSel")}else{V.eq(ac).removeClass("imageSwitchBtnSel_dot");V.eq(am).addClass("imageSwitchBtnSel_dot")}M.eq(ac).removeClass("spanShowName");M.eq(am).addClass("spanShowName");switch(b.animateStyle){case"o":H.eq(ac).fadeOut(b.animateTime,"failinear");H.eq(am).fadeIn(b.animateTime,"failinear");if(b.wideScreen){H.eq(ac).siblings().fadeOut(b.animateTime,"failinear");H.eq(am).siblings().fadeIn(b.animateTime,"failinear")}break;case"x":q.animate({marginLeft:-am*R},b.animateTime);break;case"y":q.animate({marginTop:-am*ae},b.animateTime);break;case"show":case"show-x":case"show-y":H.eq(ac).hide(b.animateTime);H.eq(am).show(b.animateTime);break;case"none":H.eq(ac).hide();H.eq(am).show();if(b.wideScreen){H.eq(ac).siblings().hide();H.eq(am).siblings().show()}break}ac=am;var ao=Fai.top.$("#bannerGetHref");if(ao){ao.css({width:b.data[am].imgWidth,left:(i.width()-b.data[am].imgWidth)/2+"px"});ao.css({height:b.data[am].imgHeight,top:(i.height()-b.data[am].imgHeight)/2+"px"})}clearInterval(w);w=setInterval(function(){Site.triggerGobalEvent("site_BannerV2Switch");g()},b.animateTime+100)});function z(){V.eq((ac+1)%aa).click()}}else{var y=ac;M.eq(y).addClass("spanShowName");function x(an){an.stopPropagation();if(Fai.top.$(".arrowImg").is(":animated")){return}M.eq(y).removeClass("spanShowName");if(y==aa-1){y=-1}M.eq(++y).addClass("spanShowName");var am=h;if(b.wideScreen){am=S}a(function(){am=Fai.top.$(".arrowImg").width();Fai.top.$(".arrowImg").css({display:"block"});Fai.top.$("#arrowImg"+y).css({left:am+"px"});Fai.top.$(".arrowImg").animate({left:"-="+am+"px"},b.animateTime,function(){Site.triggerGobalEvent("site_BannerV2Switch");g()});setTimeout(function(){Fai.top.$(".arrowImg").css({display:"none"});Fai.top.$("#arrowImg"+y).css({display:"block"})},b.animateTime+100);var ao=Fai.top.$("#bannerGetHref");if(ao){ao.css({width:b.data[y].imgWidth,left:(i.width()-b.data[y].imgWidth)/2+"px"});ao.css({height:b.data[y].imgHeight,top:(i.height()-b.data[y].imgHeight)/2+"px"})}})}e.on("click",x);e.hover(function(){e.addClass("arrow_next_hover")},function(){e.removeClass("arrow_next_hover")});function m(an){an.stopPropagation();if(Fai.top.$(".arrowImg").is(":animated")){return}M.eq(y).removeClass("spanShowName");if(y==0){y=aa}var am=h;if(b.wideScreen){am=S}a(function(){am=Fai.top.$(".arrowImg").width();M.eq(--y).addClass("spanShowName");Fai.top.$(".arrowImg").css({display:"block"});Fai.top.$("#arrowImg"+y).css({left:"-"+am+"px"});Fai.top.$(".arrowImg").animate({left:"+="+am+"px"},b.animateTime,function(){Site.triggerGobalEvent("site_BannerV2Switch");g()});setTimeout(function(){Fai.top.$(".arrowImg").css({display:"none"});Fai.top.$("#arrowImg"+y).css({display:"block"})},b.animateTime+100);var ao=Fai.top.$("#bannerGetHref");if(ao){ao.css({width:b.data[y].imgWidth,left:(i.width()-b.data[y].imgWidth)/2+"px"});ao.css({height:b.data[y].imgHeight,top:(i.height()-b.data[y].imgHeight)/2+"px"})}})}K.on("click",m);K.hover(function(){K.addClass("arrow_prev_hover")},function(){K.removeClass("arrow_prev_hover")});function N(){e.click()}}var aj="imageSwitch"+Math.random()+"banner";if(b.btnType!=0){Fai.addInterval(aj,z,parseInt(b.playTime+b.animateTime))}else{Fai.addInterval(aj,N,parseInt(b.playTime+b.animateTime))}var T=setTimeout(function(){if(b.btnType!=0){z()}else{N()}Fai.startInterval(aj)},b.playTime);if(typeof b.mouseoverId!="undefined"){a(Fai.top.$(i).find("."+b.mouseoverId)[0]).mouseover(function(){T&&clearTimeout(T);Fai.stopInterval(aj)});a(Fai.top.$(i).find("."+b.mouseoverId)[0]).mouseout(function(){T&&clearTimeout(T);Fai.startInterval(aj)})}else{i.mouseover(function(){T&&clearTimeout(T);Fai.stopInterval(aj)});i.mouseout(function(){T&&clearTimeout(T);Fai.startInterval(aj)})}}}})}})})(jQuery);Site.initBanner=function(w,e,h){if(Fai.top._uiMode){return}var p=false;var a=Fai.top.$("#webBanner");var c=Fai.top.$("#banner");var y=Site.getWebBackgroundData();var v=y.wbs?true:false;if(Fai.top._templateLayout==0||Fai.top._templateLayout==1||Fai.top._templateLayout==9||Fai.top._templateLayout==10){var q=Fai.top._manageMode?Site.getWebBackgroundData().wbh:Fai.top._webBannerHeight;if(q>-1){w.height=q;if(c.siblings(".nav,%20#navV2Wrap").length>0){var r=c.attr("normalheight");if(r==-1){r=c.css("height").replace("px","")}var t=c.siblings(".nav,%20#navV2Wrap").height()||0;if(q>-1){w.height=a.height()-t;if(a.height()<(parseInt(r)+parseInt(t))){p=true}}if(c.attr("normalheight")==-1&&p){c.css({height:w.height+"px"})}}}}if(w._open){if(e._open&&Fai.flashChecker().f){w.mouseoverId="bannerGetHref"}else{w.mouseoverId="switchGroup"}c.children().remove();c.bannerImageSwitch(w);var s=c.width();var b=c.height();var j=Fai.top._manageMode?Fai.getScrollWidth():0;var o=Fai.top.$(window).width()>Fai.top.$("#web").width()?Fai.top.$(window).width():Fai.top.$("#web").width();if(p){b=w.height}if(v){s=Fai.top.$("#webBanner").width();s=(s>o)?o-j:s;b=Fai.top.$("#webBanner").height()}var d=(Fai.top.$("#containerFormsCenter").find("div").eq(0).attr("id"));var m=Fai.top.$("#banner .switchGroup");Fai.top.$("#banner .switchGroup .J_bannerItem").each(function(B){if(!w.data[B]){return false}var A=w.data[B]?w.data[B].imgWidth:0;if(s>=A&&!v){$(this).css("width",w.data[B].imgWidth);var z=m.width()-w.data[B].imgWidth;if(Fai.isIE()){z=z+(z%2)}$(this).siblings(".J_bannerEdge").css("width",z/2)}else{$(this).css("width",s);var z=m.width()-s;if(Fai.isIE()){z=z+(z%2)}$(this).siblings(".J_bannerEdge").css("width",z/2)}if(b>=w.data[B].imgHeight&&!v){if(Site.checkBrowser()&&Fai.top._bannerData.at>0){$(this).css("height",b)}else{$(this).css("height",w.data[B].imgHeight);$(this).parent().css("paddingTop",(b-w.data[B].imgHeight)/2+"px")}$(this).siblings(".J_bannerEdge").height(w.data[B].imgHeight);$(this).siblings(".J_bannerEdge").css("top",(b-w.data[B].imgHeight)/2+"px")}else{$(this).css("height",b);$(this).siblings(".J_bannerEdge").height(b)}});c.css("background","none")}else{Site.refreshDefaultBannerEdge()}if(e._open&&Fai.flashChecker().f){if($.browser.mozilla&&$.browser.version=="49.0"){return}var i=0;var x=0;var g=Fai.top.$("#banner").width();if(g>960){g=960;i=parseInt((Fai.top.$("#webBanner").width()-960)/2)}var k=Fai.top.$("#banner").height();if(e.position==1){g=g/2}else{if(e.position==2){g=g/2;i+=g}else{if(e.position==3){i+=e.positionLeft;x=e.positionTop}}}if(typeof Fai!="undefined"&&typeof Fai.top._resRoot!="undefined"){resRoot=Fai.top._resRoot}if(typeof e.color1=="undefined"){e.color1="#000"}if(typeof e.color2=="undefined"){e.color2="#FFFFFF"}var u="text1="+Fai.encodeUrl(e.text1)+"&text2="+Fai.encodeUrl(e.text2)+"&size1="+e.size1+"&size2="+e.size2+"&color1=0x"+e.color1.substr(1,e.color1.length-1)+"&color2=0x"+e.color2.substr(1,e.color2.length-1)+"&style1="+e.style1+"&style2="+e.style2;var n=['
    ','','','','','','',"","","
    "];n=n.join("");if(h==4){var l='
    ';n=n+l}c.append(n);var b=c.height();var s=c.width();if(w.data&&w.data.length>0){Fai.top.$("#bannerGetHref").css({width:w.data[0].imgWidth,height:w.data[0].imgHeight,left:(s-w.data[0].imgWidth)/2+"px",top:(b-w.data[0].imgHeight)/2+"px"})}}if(w._open&&$(".webBanner").width()!=960){$(window).resize(function(z){if(!z.target.nodeType||z.target.nodeType==9){setTimeout(function(){Site.refreshBanner(0)},500)}})}Site.adjustBannerFlash()};Site.adjustBannerWidth=(function(){function b(){var j=Fai.top.$(window),g=Fai.top.$("#webBanner"),e=Fai.top.$("#web");webBgData=Site.getWebBackgroundData();if(g.length<1||Fai.top._useBannerVersionTwo){return}if(webBgData.wbw!=-1){var d=Fai.top._manageMode?Fai.getScrollWidth():0,i=(parseInt(g.css("borderLeftWidth").replace("px",""))+parseInt(g.css("borderRightWidth").replace("px","")))||0,h=webBgData.wbw+i,c=e.width();if(c-d0){var b=Fai.intervalFunc[0].id;if(typeof b!="undefined"&&b.substring(0,11)=="imageSwitch"){Fai.startInterval(b)}}if(Fai.top._bannerData.n&&Fai.top._bannerData.n.length>1&&Site.checkBrowser()&&Fai.top._bannerData.at>0){Site.bannerAnimate.autoPlay()}};Site.stopBannerInterval=function(){var a=0;if(Fai.intervalFunc!=undefined){a=Fai.intervalFunc.length}if(a>0){var b=Fai.intervalFunc[0].id;if(typeof b!="undefined"&&b.substring(0,11)=="imageSwitch"){Fai.stopInterval(b)}}if(Fai.top._bannerData.n&&Fai.top._bannerData.n.length>1&&Site.checkBrowser()&&Fai.top._bannerData.at>0){Site.bannerAnimate.stop()}};Site.bannerInitHref=function(){Site.stopBannerInterval();var c=false;var a=Fai.top.$("#banner");var b=-1;a.find(".spanHiddenName").each(function(d,e){if($(this).hasClass("spanShowName")){b=d;return false}});if(b==-1){return}a.find(".switchGroup").children().each(function(d,e){if(d==b&&Fai.top.$(e).find("a").eq(0).attr("href")!="javascript:;"){Fai.top.$("#bannerGetHref").css("cursor","pointer");c=true;return false}});if(c==false){Fai.top.$("#bannerGetHref").css("cursor","default")}};Site.bannerGetHref=function(){var a=Fai.top.$("#banner");var c=-1;a.find(".spanHiddenName").each(function(d,e){if($(this).hasClass("spanShowName")){c=d;return false}});if(c==-1){return}var b="";a.find(".switchGroup").children().each(function(d,g){if(d==c){var e=Fai.top.$(g).find("a").eq(0);b=e.attr("href");if(typeof b!="undefined"&&b=="javascript:;"){$(e).click()}return false}});if(typeof b!="undefined"&&b!="javascript:;"){window.open(b)}};Site.adjustBannerFlash=function(){var b=Fai.top.$("#banner");var c=Fai.top.$("#imgPageFlash");if(c.length>0){var a=b.width();var d=c.width();if(a
    ");p.push("
    ");p.push("
    ");e.append(p.join(""));if(Fai.top._templateLayout==0||Fai.top._templateLayout==1||Fai.top._templateLayout==9||Fai.top._templateLayout==10){var k=Fai.top._manageMode?Site.getWebBackgroundData().wbh:Fai.top._webBannerHeight;if(k>-1){if(e.siblings(".nav,%20#navV2Wrap").length>0){var g=e.css("height").replace("px","");var d=e.siblings(".nav,%20#navV2Wrap").height();if(a.height()<(parseInt(g)+d)){g=a.height()-d;e.css({height:g+"px"})}}}}Site.refreshDefaultBannerEdge()}else{if(Fai.top._bannerData.s==3){Fai.top.$("#banner").css("background","none");Fai.top.$("#banner").css("height",Fai.top._bannerData.f.h+"px");Fai.top.$("#banner").children().remove();var h='';Fai.top.$("#banner").append(h);Site.adjustBannerFlash()}else{if(Fai.top._bannerData.s==4){Fai.top.Site.refreshBannerImageSwitch(j)}}}if(Fai.top._bannerData.o){if($.browser.mozilla&&$.browser.version=="49.0"){return}var q=0;var n=0;var m=Fai.top.$("#banner").width();var c=Fai.top.$("#banner").height();if(m>960){m=960;q=parseInt((Fai.top.$("#webBanner").width()-960)/2)}if(Fai.top._bannerData.p==1){m=m/2}else{if(Fai.top._bannerData.p==2){m=m/2;q+=m}else{if(Fai.top._bannerData.p==3){q+=Fai.top._bannerData.pl;n=Fai.top._bannerData.pt}}}if(typeof Fai!="undefined"&&typeof Fai.top._resRoot!="undefined"){resRoot=Fai.top._resRoot}if(typeof Fai.top._bannerData.ce.c1=="undefined"){Fai.top._bannerData.ce.c1="#000"}if(typeof Fai.top._bannerData.ce.c2=="undefined"){Fai.top._bannerData.ce.c2="#FFFFFF"}var l="text1="+Fai.encodeUrl(Fai.top._bannerData.ce.t1)+"&text2="+Fai.encodeUrl(Fai.top._bannerData.ce.t2)+"&size1="+Fai.top._bannerData.ce.sz1+"&size2="+Fai.top._bannerData.ce.sz2+"&color1=0x"+Fai.top._bannerData.ce.c1.substr(1,Fai.top._bannerData.ce.c1.length-1)+"&color2=0x"+Fai.top._bannerData.ce.c2.substr(1,Fai.top._bannerData.ce.c2.length-1)+"&style1="+Fai.top._bannerData.ce.s1+"&style2="+Fai.top._bannerData.ce.s2;var i=Fai.top._resRoot+"/image/site/effects/"+Fai.top._bannerData.t+".swf?"+$.md5(l);var b=['
    ','','','','','','',"","","
    "];b=b.join("");if(Fai.top._bannerData.s==4){var o='
    ';b=b+o}Fai.top.$("#banner").append(b);if(Fai.top._bannerData.n&&Fai.top._bannerData.n.length>0){Fai.top.$("#bannerGetHref").css({width:Fai.top._bannerData.n[j].w,height:Fai.top._bannerData.n[j].h,left:(Fai.top.$("#banner").width()-Fai.top._bannerData.n[j].w)/2+"px",top:(Fai.top.$("#banner").height()-Fai.top._bannerData.n[j].h)/2+"px"})}}else{Fai.top.$("#effectShow").remove()}};Site.getWebBackgroundData=function(){return Fai.top._Global._useTemplateBackground?Fai.top._templateBackgroundData:Fai.top._customBackgroundData};Site.refreshBannerImageSwitch=function(h){var c=0;var r=0;var i=new Array();var j=new Array();var t=new Array();var l=Fai.top._bannerData.bt;var p=false;var b=Fai.top.$("#webBanner");var e=Fai.top.$("#banner");var v=Site.getWebBackgroundData();var u=v.wbs?true:false;$.each%28fai.top._bannerdata.n,function%28y,c%29{var%20a=c.el||"";var B=C.er||"";var x=parseInt(C.h);var z=parseInt(C.w);if(x>c){c=x}if(z>r){r=z}if(C.e!=0){var w=C.jUrl||"javascript:;";if(Fai.top._manageMode){if($(".panelLibItem[vid="+C.i+"]").data("JURL")!=undefined){w=$(".panelLibItem[vid="+C.i+"]").data("JURL")}if(C.urlChange==1){w=C.jUrl||"javascript:;"}}if(w.length>12&&w.substring(0,10)=="javascript"){i.push({src:C.p,href:"javascript:;",onclick:w.substring(11)+"return false;",ot:C.ot,imgWidth:z,imgHeight:x,edgeLeft:A,edgeRight:B})}else{i.push({src:C.p,href:w,ot:C.ot,imgWidth:z,imgHeight:x,edgeLeft:A,edgeRight:B})}}else{i.push({src:C.p,imgWidth:z,imgHeight:x,edgeLeft:A,edgeRight:B})}j.push(z);t.push(x)});if(Fai.top._templateLayout==0||Fai.top._templateLayout==1||Fai.top._templateLayout==9||Fai.top._templateLayout==10){var d=Fai.top._manageMode?Site.getWebBackgroundData().wbh:Fai.top._webBannerHeight;if(d>-1){c=d;if(e.siblings(".nav,%20#navV2Wrap").length>0){var q=e.attr("normalheight");if(q==-1){q=e.css("height").replace("px","")}var s=s=e.siblings(".nav,%20#navV2Wrap").height()||0;if(d>-1&&b.height()<(q+s)){p=true;c=b.height()-s}}}}c=u?e.height():c;Fai.top.$("#banner").css("background","none");Fai.top.$("#banner").children().remove();Fai.top.$("#banner").css("height",c+"px");Fai.top.$("#banner").bannerImageSwitch({data:i,index:h,width:r,height:c,from:"banner",playTime:Fai.top._bannerData.i,animateTime:Fai.top._bannerData.a,btnType:l,wideScreen:Fai.top._bannerData.ws});var a=Fai.top.$("#banner").width();var m=Fai.top.$("#banner").height();var k=Fai.top._manageMode?Fai.getScrollWidth():0;var o=Fai.top.$(window).width()>Fai.top.$("#web").width()?Fai.top.$(window).width():Fai.top.$("#web").width();if(p){m=c}if(u){a=Fai.top.$("#webBanner").width();a=(a>o)?o-k:a}var g=(Fai.top.$("#containerFormsCenter").find("div").eq(0).attr("id"));var n=Fai.top.$("#banner .switchGroup");Fai.top.$("#banner .switchGroup .J_bannerItem").each(function(x){if(a>=j[x]&&!u){$(this).css("width",j[x]);var w=n.width()-j[x];if(Fai.isIE()){w=w+(w%2)}$(this).siblings(".J_bannerEdge").css("width",(w/2)+"px")}else{$(this).css("width",a);var w=n.width()-a;if(Fai.isIE()){w=w+(w%2)}$(this).siblings(".J_bannerEdge").css("width",(w/2)+"px")}if(m>=t[x]&&!u){if(Site.checkBrowser()&&Fai.top._bannerData.at>0){$(this).css("height",m)}else{$(this).css("height",t[x]);$(this).parent().css("paddingTop",(m-t[x])/2+"px")}$(this).siblings(".J_bannerEdge").css("height",t[x]);$(this).siblings(".J_bannerEdge").css("top",(m-t[x])/2+"px")}else{$(this).css("height",m);$(this).siblings(".J_bannerEdge").css("height",m)}})};Site.refreshBannerHeight=function(){var d=Fai.top.$("#webBanner"),b=Fai.top.$("#banner"),a=b.height();var g=Fai.top._manageMode?Site.getWebBackgroundData().wbh:Fai.top._webBannerHeight;if(g>-1){a=g;if(b.siblings(".nav,%20#navV2Wrap").length>0){var e=b.attr("normalheight");if(e==-1){e=b.css("height").replace("px","")}var c=b.siblings(".nav,%20#navV2Wrap").height()||0;if(g>-1&&d.height()<(e+c)){fixHeightFlag=true;a=d.height()-c}}}Fai.top.$("#banner").css("height",a+"px")};Site.refreshDefaultBannerEdge=function(){var b=Fai.top.$("#banner");if(b.length>0){var c=b.attr("defaultwidth")||960;if(b.children(".defaultBannerEdge").length>0){var a=b.width()-c;a=(a+(a%2))/2;b.children(".defaultBannerEdge").css("width",a)}}};Site.checkBrowser=(function(){var c=["animation","MozAnimation","webkitAnimation","msAnimation","OAnimation"],e=["transform","MozTransform","webkitTransform","msTransform","OTransform"],b=["opacity","MozOpacity","webkitOpacity","msOpacity","OOpacity"],d=document.createElement("div"),a={};return function(h){if(typeof a[h]=="boolean"){return a[h]}switch(h){case"animation":props=c;break;case"transform":props=e;break;case"opacity":props=b;break;default:props=c}for(var j=0,g=props.length;j=v.length){I=0}t.goTo(I,false)};t.prev=function(){var I=b-1;if(I<0){I=v.length-1}t.goTo(I,true)};t.stop=function(){if(!z){return}z=false;clearTimeout(p)};t.goTo=function(O,N){if(isNaN(O)||O>=B||O<0||O==b){return}if(w){return}d=O;if(typeof N==="undefined"){var N=(d>b?false:true)}var P=Fai.top.$("#"+n).find(".imageSwitchBtnArea"),I=Fai.top.$("#"+n).find(".imageSwitchShowName"),K=I.children("span"),M=P.children("a"),T=v.eq(b),L=v.eq(d);if(k.bt==0){}else{if(k.bt==1){M.removeClass("imageSwitchBtnSel");M.eq(d).addClass("imageSwitchBtnSel")}else{if(k.bt==2){M.removeClass("imageSwitchBtnSel_dot");M.eq(d).addClass("imageSwitchBtnSel_dot")}}}K.removeClass("spanShowName");K.eq(d).addClass("spanShowName");L.css("display","block");if(x==11){var R=["15% 15%","85% 85%","15% 85%","85% 15%"];var J=["billboardItem_11_on_zoomOut","billboardItem_11_on_zoomIn"];var S=R[Math.floor(Math.random()*R.length)];var Q=J[Math.floor(Math.random()*J.length)];L.addClass(Q).removeClass("billboardItem_11_off");A(L,"transformOrigin",S);T.addClass("billboardItem_11_off");T.removeClass("billboardItem_11_on_zoomIn billboardItem_11_on_zoomOut billboardItem_11_start")}else{T.removeClass("billboardItem_"+x+"_on billboardItem_"+x+"_on_reverse");T.addClass("billboardItem_"+x+"_off");L.removeClass("billboardItem_"+x+"_off billboardItem_"+x+"_off_reverse");L.addClass("billboardItem_"+x+"_on");if(N){T.addClass("billboardItem_"+x+"_off_reverse");L.addClass("billboardItem_"+x+"_on_reverse")}}w=true;h=b;b=d;g(L[0],s)};function s(){if(u(this,s)){w=false;v.eq(h).css("display","none");if(z){clearTimeout(p);if(H.effectIndex==13){y()}else{p=setTimeout(function(){t.next()},H.duration)}}else{if(H.effectIndex==13){y()}}if(Fai.top._useBannerVersionTwo&&Fai.top.$(".fk-inBannerListZone").find(".form").length){Site.triggerGobalEvent("site_BannerV2Switch");jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}}}function q(){var K;for(var J=0;JI)?I:D}if(H.effectIndex==13){r.addClass("billboard"+x)}r.css("height",l+"px");for(var K=0;K"+$(this).find("span").html()+"");if(c&&$(this).attr("id")=="memberCoupon"){$(".mCenter .mCenterTitleList").hide()}else{$(".mCenter .mCenterTitleList").show()}if($(this).attr("id")=="memberBind"){Site.logDog(200199,2)}if($(this).attr("id")=="memberOrder"){var h=$(".memberOrderNewPanel .mallOrderNewList");$(".J_orderEmpty").hide();if($(".itemList .itemLine").length==0){$(".pagenation").hide()}if($(".memberOrderOldPanel .line.itemLine").length==0){$(".memberOrderOldPanel .pagenation").hide()}$(".mCenterTitle").removeClass("mCenterTitleSelected");$(".memberOrderPanel").find(".itemList .itemLine").show();if(c&&e){$(".mCenter .mCenterTitleList .mCenterTitle:first-child").addClass("mCenterTitleSelected"+a)}$(".mCenter .mCenterTitleList .mCenterTitle:first-child").addClass("mCenterTitleSelected");$(".mCenter .mCenterTitleList .mCenterTitleOrder").show();$(".mCenterTitle").on("click.mCenterTitle",function(){$(".mCenter .mCenterTitleList .mCenterTitle:first-child").css("cursor","pointer");if(c&&e){$(".mCenterTitle").removeClass("mCenterTitleSelected"+a);$(this).addClass("mCenterTitleSelected"+a)}$(".mCenterTitle").removeClass("mCenterTitleSelected");$(this).addClass("mCenterTitleSelected");if(c){$(this).css("display","table-cell")}else{$(this).css("display","inline-block")}if(h.attr("_managemode")){if($(this).hasClass("J_refundStatus")){$(".memberOrderPanel").find(".itemList .itemLine").each(function(m,n){var l=false;$(n).find(".J_refundTD").each(function(o,q){var p=parseInt($(q).attr("_rs"))||0;if(p>0&&p<35){l=true;return false}});if(l){$(this).show()}else{$(this).hide()}})}else{if($(this).hasClass("mCenterTitleOrder")){var k=$(this).text();$(".memberOrderPanel").find(".itemList .itemLine .J-status").each(function(l,m){if($(this).text()==k){$(this).parents(".itemLine").show()}else{$(this).parents(".itemLine").hide()}})}else{$(".memberOrderPanel").find(".itemList .itemLine").show()}}}if($(".itemList .itemLine").length==0){$(".pagenation").hide();$(".J_orderEmpty").show()}else{$(".J_orderEmpty").hide();$(".pagenation").show()}if(h.attr("_managemode")){if($(".itemList .itemLine:visible").length==0){$(".pagenation").hide();$(".line.g_title").hide();$(".orderEmpty").show();$(".J_orderEmpty").show()}else{$(".pagenation").show();$(".line.g_title").show();$(".J_orderEmpty").hide();$(".orderEmpty").hide()}}if(!h.attr("_managemode")){h.children().hide();if($(this).hasClass("J_allOrder")){$(".mallOrderAll").show()}else{if($(this).hasClass("J_waitSettle")){$(".mallOrderWaitSettle").show()}else{if($(this).hasClass("J_finSettle")){$(".mallOrderFinSettle").show()}else{if($(this).hasClass("J_FinPay")){$(".mallOrderFinPay").show()}else{if($(this).hasClass("J_FinShip")){$(".mallOrderFinShip").show()}else{if($(this).hasClass("J_finProcess")){$(".mallOrderFinProcess").show()}else{if($(this).hasClass("J_refundStatus")){$(".mallOrderRefund").show()}}}}}}}}});if(h.length>0&&!h.attr("_managemode")){$(".mCenterTitleSelected").click()}}else{$(".mCenterTitle").off("click.mCenterTitle");$(".mCenter .mCenterTitleList .mCenterTitle:first-child").removeClass("mCenterTitleSelected");$(".mCenter .mCenterTitleList .mCenterTitleOrder").hide()}var j=$(this).attr("id");var i=$(".mCenter .mCenterRight ."+j+"Panel");i.show();i.siblings().hide();if(c&&e){$(this).addClass("selected");$(this).find("span").addClass("g_selected"+a);$(this).siblings().removeClass("selected");$(this).siblings().find("span").removeClass("g_selected"+a)}else{$(this).addClass("selected");$(this).find("span").addClass("g_selected");$(this).siblings().removeClass("selected");$(this).siblings().find("span").removeClass("g_selected")}});var b=Fai.getUrlParam(Fai.top.location.search,"item");switch(b){case"memberOrder":$("#memberOrder")[0].click();break;case"memberIntegral":if($("#memberIntegral").length>0){$("#memberIntegral")[0].click();break}case"memberInfo":$("#addrMsg").click();break;case"memberCoupon":$("#memberCoupon").click();break;case"memberCollection":$("#memberCollection").click();break;default:$("#memberProfile")[0].click();break}Site.initContentSplitLine(d,g)};Site.memberCenterNewStyleSmallWidth=function(d,b){var a=$("#module"+d);var e=a.width();var c=true;if(a.find(".memberOrderNewPanel .J-mallOrder .itemList").hasClass("newRefundStyle")){c=false}if(b&&e<1200&&c){a.find(".J-mCenterR").css("padding-left","15px");a.find(".memberOrderNewPanel .J-mallOrder .itemList .g_title .itemOpt").css("padding-left","60px")}};Site.memberCenterCompatibility=function(b){var c=!("placeholder" in document.createElement("input"));if(c){var a=$("#module"+b).find(".itemCtrl");$.each(a,function(k,m){var n=$(m).find("span");n.css({"white-space":"nowrap"});var h=$(n).width();var l=$(n).height();var g=$(m).position().top+(Fai.isIE6()?2:0);var d=$(m).position().left;$(n).css({top:g+"px",left:d+"px","line-height":l+"px",padding:"0px 0px 0px 4px",width:h+"px"});var j=$(m).find("input").val();if(j&&j.length>0){$(n).hide()}})}};Site.memberHeadPicInit=function(b){if(typeof(headPic)!="undefined"){headPic=$.parseJSON(headPic);var a=headPic.width/100;$("#memberHeadPic").css({width:headPic.imgW/a+"px",height:headPic.imgH/a+"px",top:-(headPic.top/a)+"px",left:-headPic.left/a+"px"})}$(".memberHeadPic").on({hover:function(){$(".hoverTip").toggle()},click:function(){var c="memberheadpicedit.jsp@id="+b+"&headPic="+Fai.encodeUrl($.toJSON(headPic))+"&mCenter=1";Fai.popupWindow({title:"自定义头像",bannerDisplay:false,frameSrcUrl:c,width:650,height:650,closeFunc:function(d){if(d){newImg=d.newImg;if(d.headPic.thumbId||newImg){headPic=d.headPic;Site.showMemberHeadPic($("#memberHeadPic"),headPic,100);Site.showMemberHeadPic($("#topBarMemberPic"),headPic,30);$(".memberProfileBtn").click()}}}});$(".formDialog .formX_old").removeClass("formX_old").removeClass("formX").addClass("formXSite").css("margin-top","10px");$(".formDialog").addClass("formBox")}})};Site.img_sf=function(d){var B=document.body,C=document.getElementById("img_1"),A=document.getElementById("img_2"),y=document.getElementById("img_3"),n=document.getElementById("imgShadow3"),h=document.getElementById("imgShadow1"),b=document.getElementById("imgShadow4"),c=document.getElementById("imgShadow5"),j=document.getElementById("imgShadow2"),q={};if(d.width>350){d.style.width=350;$(".imgArea").css("width","350px")}else{if(d.height>350){d.style.height=350;$(".imgArea").css("height","350px")}}var e=d.height,t=d.width,k=Math.min(e,t),D=document.getElementById("img_dsf"),s=coverImgHeight=n.style.width==""?k:$(n).width(),a,g=$(".editPicArea");$(".imgArea").css("height",e+"px");coverImgLeft=n.style.width==""?(t-s)/2:n.offsetLeft,coverImgTop=n.style.width==""?(e-coverImgHeight)/2:n.offsetTop;u();$(".imgArea").css({top:(g.height()-e)/2+"px",left:(g.width()-t)/2-10+"px"});var m,x,p,v,l,o,z,w;var r=false;$("body").on("mouseup",function(){r=false});$(".imgArea .coverBox,#layerImg").on({mousedown:function(F){F=F?F:window.event;m=n.offsetTop;x=n.offsetLeft;p=$(n).width();l={x:F.clientX,y:F.clientY};r=true;Site.enablePopupBtn("save",true);var E=F.target.id;if(E=="dragBotCenter"||E=="dragRightCenter"||E=="dragRightBot"){i(1)}else{if(E=="dragLeftCenter"||E=="dragLeftBot"){i(2)}else{if(E=="dragTopCenter"||E=="dragRightTop"){i(3)}else{if(E=="dragLeftTop"){i(4)}else{i(0)}}}}},mouseup:function(){r=false}});function i(E){document.onmousemove=function(F){if(!r){return}F=F?F:window.event;o={x:F.clientX,y:F.clientY};z=o.x-l.x;w=o.y-l.y;switch(E){case 0:s=p;coverImgTop=m+w;coverImgLeft=x+z;break;case 1:s=p+z;coverImgTop=m;coverImgLeft=x;break;case 2:s=p-z;coverImgTop=m;coverImgLeft=x+z;break;case 3:s=p+z;coverImgTop=m-z;coverImgLeft=x;break;case 4:s=p-z;coverImgTop=m+z;coverImgLeft=x+z;break}u()}}function u(){if(s<100){s=100;coverImgHeight=100}else{if(s>Math.min(t,e)){s=Math.min(t,e);coverImgHeight=Math.min(t,e)}}if(coverImgTop<0){coverImgTop=0}else{if(coverImgTop>e-s){coverImgTop=e-s}}if(coverImgLeft<0){coverImgLeft=0}else{if(coverImgLeft>t-s){coverImgLeft=t-s}}if(coverImgTop>=0&&coverImgTop<=e-s&&coverImgLeft>=0&&coverImgLeft<=t-s){$(n).css({width:s,height:s,top:coverImgTop,left:coverImgLeft});$("#coverBox").css({width:s-2,height:s-2,top:coverImgTop,left:coverImgLeft});$(h).css({width:t,height:coverImgTop,top:0,left:0});$(j).css({width:coverImgLeft,height:s,top:coverImgTop,left:0});$(b).css({width:t-s-coverImgLeft,height:s,top:coverImgTop,left:s+coverImgLeft});$(c).css({width:t,height:e-s-coverImgTop,top:s+coverImgTop,left:0});a=[s/100,s/50,s/30];$("#img_1").css({width:t/a[0],height:e/a[0],top:-coverImgTop/a[0],left:-coverImgLeft/a[0]});$("#img_2").css({width:t/a[1],height:e/a[1],top:-coverImgTop/a[1],left:-coverImgLeft/a[1]});$("#img_3").css({width:t/a[2],height:e/a[2],top:-coverImgTop/a[2],left:-coverImgLeft/a[2]})}}};Site.showMemberHeadPic=function(d,a,b){d.attr("src",a.path);var c=a.width/b;d.css({width:a.imgW/c,height:a.imgH/c,top:-a.top/c,left:-a.left/c})};Site.memberImgFileUpload=function(a,c,e){var d=e.split(",");var b={file_post_name:"Filedata",upload_url:"ajax/memberheadimgup_h.jsp",button_placeholder_id:c,file_size_limit:a+"MB",file_queue_limit:1,button_cursor:SWFUpload.CURSOR.HAND,button_width:"80",button_height:"30",requeue_on_error:false,post_params:{ctrl:"Filedata",app:21},file_types:d.join(";"),file_dialog_complete_handler:function(g){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(h,g,i){switch(g){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Fai.ing(LS.siteFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Site.initPopupBox(LS.mobiFormSubmitFileUploadNotAllow,"alert","");break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Site.initPopupBox(jm.format(LS.mobiFormSubmitFileUploadOneTimeNum,"1"),"alert","");break;default:Site.initPopupBox(LS.mobiFormSubmitFileUploadReSelect,"alert","");break}},upload_success_handler:function(h,g){var i=jQuery.parseJSON(g);this._allSuccess=i.success;this._sysResult=i.msg;if(i.success){onFileUploadEvent("upload",i)}else{$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show();Fai.ing("文件"+h.name+","+i.msg)}},upload_error_handler:function(h,g,i){if(g==-280){Fai.ing("文件取消成功",false)}else{if(g==-270){Fai.ing("已经存在名称为"+h.name+"的文件。",true)}else{Fai.ing("服务繁忙,文件"+h.name+"上传失败,请稍候重试。")}}$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show()},upload_complete_handler:function(g){if(g.filestatus==SWFUpload.FILE_STATUS.COMPLETE&&this._allSuccess){swfObj.startUpload()}else{if(g.filestatus==SWFUpload.FILE_STATUS.ERROR){Fai.ing("服务繁忙,文件"+g.name+"上传失败,请稍候重试。");$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show()}}},upload_start_handler:function(g){Fai.enablePopupWindowBtn(0,"save",false);Fai.ing("读取文件准备上传",false)},view_progress:function(g,j,i,h){Fai.ing("正在上传"+h+"%",false);$("#imgShadow3").addClass("loading");$("#imgShadow3").children().hide()}};swfObj=SWFUploadCreator.create(b);onFileUploadEvent=function(o,k){if(o=="upload"){var l=k.name,j=k.size,i=k.path,n=k.id,g=k.width,m=k.height;smallPath=k.smallPath;newImg=k;var h=new Image();h.src=smallPath;h.onload=function(){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(l)),true);$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show();$(".formBodyContent").find(".editPicArea #memberHeadPic").attr("src",smallPath);$(".formBodyContent").find(".viewPicArea img").attr("src",smallPath);$("#imgShadow3").css("width","")};Site.enablePopupBtn("save",true)}}};Site.memberImgFileUploadH5=function(d,e,c,h,k,j,i){var b=c.split(",");var g={siteFree:j,updateUrlViewRes:k,auto:true,fileTypeExts:b.join(";"),multi:false,fileSizeLimit:d*1024*1024,fileSplitSize:20*1024*1024,breakPoints:true,saveInfoLocal:false,showUploadedPercent:false,showUploadedSize:false,removeTimeout:9999999,post_params:{app:21,type:0,fileUploadLimit:d,isSiteForm:true},isBurst:false,isDefinedButton:true,buttonText:i,uploader:"ajax/memberheadimgup_h.jsp@cmd=mobiupload&_token="+$("#_TOKEN").attr("value"),onUploadSuccess:function(l,n){var m=jQuery.parseJSON(n);if(m.success){onFileUploadEvent("upload",m);setTimeout(function(){Fai.ing("文件上传成功",true)},2000)}else{$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show();Fai.ing("文件:"+l.name+","+m.msg)}},onUploadError:function(l,m){$("#progressBody_ "+l.id).remove();$("#progressWrap_"+l.id).remove();$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show();Fai.ing("网络繁忙,文件:"+l.name+"上传失败,请稍后重试")},onSelect:function(){if(h){Fai.ing("已超过资源库容量限制,请升级网站版本。");return false}else{return true}},onUploadStart:function(l){$("#imgShadow3").addClass("loading");$("#imgShadow3").children().hide();$("#progressBody_ "+l.id).remove();$("#progressWrap_"+l.id).remove()}};var a=$("#"+e).uploadify(g);onFileUploadEvent=function(t,p){if(t=="upload"){var q=p.name,o=p.size,n=p.path,s=p.id,l=p.width,r=p.height;smallPath=p.smallPath;newImg=p;var m=new Image();m.src=smallPath;m.onload=function(){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(q)),true);$("#imgShadow3").removeClass("loading");$("#imgShadow3").children().show();$(".formBodyContent").find(".editPicArea #memberHeadPic").attr("src",smallPath);$(".formBodyContent").find(".viewPicArea img").attr("src",smallPath);$("#imgShadow3").css("width","")};Site.enablePopupBtn("save",true)}}};Site.initPopupBox=function(g,d,e){var b=["
    ",g,"
    "];b.push("
    ");if(d=="confirm"){b.push("
    ");b.push("
    确 定
    ");b.push("
    取 消
    ");b.push("
    ")}else{b.push("
    确 定
    ")}b.push("
    ");var a={};a.htmlContent=b.join("");a.width=255;a.height=122;var c=Site.popupBox(a);c.find(".popupBClose").css("margin","10px 0px auto auto");c.on("click",".confirmBtn",function(){c.find(".popupBClose").click();e()});c.on("click",".cancelBtn",function(){c.find(".popupBClose").click()})};Site.enablePopupBtn=function(c,a){var b=$("#"+c);if(a){b.removeAttr("disabled");b.removeClass("saveButton-disabled");b.faiButton("enable")}else{b.attr("disabled",true);b.faiButton("disable")}};Site.memberAddrMsgOpera=function(b,a,c,o,r,g,i,B,s,n,C,A,u){var q="-----------",y=[],k,D,m,w,F,l,x;var e=-1;var E={};$.each(n,function(G,H){if(H.parentId==null||H.parentId==""||H.parentId===0){E[H.id]=H}});if(Site.addrInfoListGlobal!=null&&Site.addrInfoListGlobal!=[]){c=Site.addrInfoListGlobal}var z={};z.addrInfoList=c;$(".addAddrMsgPanel, .edit").click(function(){var ab="",af=0,K={},ag="",ah="";e=$(this).parents(".addrMsg_default").length==0?$(this).parents(".addrMsg").attr("_item"):$(this).parents(".addrMsg_default").attr("_item");if($(this).hasClass("edit")){ah=$(this).parent().parent().attr("_item");ab="ajax/memberAdm_h.jsp?cmd=set&opera=editAddr&editItem="+ah+"&id="+b;K=c[ah];af=K.isDefault;ag="edit"}else{ab="ajax/memberAdm_h.jsp?cmd=set&opera=addAddr&id="+b;if(c.length==0){af=1}else{af=0}ag="add"}if(i){var X="
    ";X+="
    ";for(var ae=0;ae";if(I!="addr"){X+="
    "+am+"
    ";if(W){X+="
    *
    "}else{X+=""}}if(I=="addr"){var H=(r==2052||r==1028)?"中国":"China";var aa=(r==2052||r==1028)?"海外":"Oversea";X+="
    "+LS.Region+"
    ";if(W){X+="
    *
    "}else{X+=""}X+="
    ";X+="";X+="
    ";X+="
    ";X+="
    ";X+="
    "+LS.addrDetail+"
    *
    ";X+="
    ";X+="
    "}else{var ai="";var O="";if(I=="mobile"){var Z=[];Z.push("");ai=Z.join("");O="width:232px; margin-left:8px;"}if(I=="mobile"||I=="phone"){X+="
    "+ai+"
    "}else{X+="
    "+ai+"
    "}}X+="
    "}X+="
    ";X+="
    ";X+="
    "+LS.confirm+"
    ";X+="
    "+LS.cancel+"
    ";X+="
    ";var J=parseInt(Math.random()*10000);var L={boxId:J,title:u,htmlContent:X,width:942,boxName:"addrInfo"}}else{var X="
    ";X+="
    ";X+="
    ";for(var ae=0;ae";if(I!="addr"){X+="
    "+am+" :
    "}if(I=="addr"){var H=(r==2052||r==1028)?"中国":"China";var aa=(r==2052||r==1028)?"海外":"Oversea";X+="
    "+LS.Region+" :
    ";X+="
    ";if(W){X+="
    *
    "}X+="
    "+LS.ssq+" :"+LS.administrativeRegion+" :
    ";X+="
    ";X+="";X+="";if(W){X+="
    *
    "}X+="
    ";X+="
    "+LS.streetAddress+" :
    ";X+="
    ";if(W){X+="
    *
    "}X+="
    "}else{var ai="";var O="";if(I=="mobile"){var Z=[];Z.push("");ai=Z.join("");O="width:107px; margin-left:8px;"}if(I=="mobile"||I=="phone"){X+="
    "+ai+"
    "}else{X+="
    "+ai+"
    "}if(W){X+="
    *
    "}}X+="
    "}X+="
    ";X+="
    ";X+="
    "+LS.cancel+"
    ";X+="
    "+LS.confirm+"
    ";X+="
    ";var J=parseInt(Math.random()*10000);var L={boxId:J,title:u,htmlContent:X,width:410,boxName:"addrInfo"}}var V=Site.popupBox(L);if(Fai.isIE6()||Fai.isIE7()){$(".editAddrInfo").find(".addrInfoItem").attr("style","width:100%;");$(".editAddrInfo").find(".addrInfoItem").find("#addrInfoStreet").attr("style","width:100%;")}var G=($(".J-ssq").length>0);if(G){if($("#areaBoxInput").length>0){$("#areaBox1,#areaBox2").css("left",$("#areaBoxInput").position().left);$("#areaBox1,#areaBox2").css("top",$("#areaBoxInput").position().top+$("#areaBoxInput").height())}$(".J-ssq").hide()}$(document).unbind("click.forAreaBox").bind("click.forAreaBox",function(){$("#areaBox1").hide();$("#areaBox2").hide()});$("#areaBox1,#areaBox2").unbind("click.forAreaBox").bind("click.forAreaBox",function(an){U(an)});function U(an){if(an.stopPropagation){an.stopPropagation()}else{an.cancelBubble=true}}$("#allArea").change(function(){if($("#allArea").val()==null||$("#allArea").val()==""||$("#allArea").val()=="os"){if(G){$(".J-ssq").hide()}else{$("#areaBoxInput").parent(".propItemValue").hide()}}else{if(G){$(".J-ssq").show()}else{$("#areaBoxInput").parent(".propItemValue").show()}}$("#areaBox1").hide();$("#areaBox2").hide();if($("#allArea").val()==null||$("#allArea").val()==""){return}$("#areaBoxInput").attr("isCn",0);$("#areaBoxInput").attr("isCus",0);$("#areaBoxInput").attr("isOs",0);$("#areaBoxInput").attr("area1","");$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");if($("#allArea").val()=="cn"){$("#areaBoxInput").attr("isCn",1);$("#areaBox1 .pv").click();$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();$("#areaBox1").show()}else{if($("#allArea").val()=="os"){$("#areaBoxInput").attr("isOs",1);$("#areaBoxInput").attr("area1",990000);$("#areaBoxInput").attr("area2",990100)}else{$("#areaBoxInput").attr("isCus",1);$("#areaBoxInput").attr("area1",$("#allArea").val());$("#areaBox2 .sec_content").html("");$("#areaBox2 .thd_content").html("");$("#areaBox2").show()}}$("#areaBoxInput").val("");if($("#allArea").val()=="cn"||$("#allArea").val()=="os"){$("#areaBoxInput").show();$("#ssq").show();$("#administrativeRegion").hide()}else{var an=d($("#allArea").val());$("#sec_box .sec_content").append(an);$("#areaBoxInput").val($("#areaBoxInput").val()+$("#allArea option[value='"+$("#allArea").val()+"']").text());$("#ssq").hide();$("#administrativeRegion").show();if(an===null||an===undefined||an===""){$("#areaBox2").hide();$(".J-ssq").hide();if(!G){$("#areaBoxInput").hide()}}}});$("#areaBoxInput").unbind("click").bind("click",function(an){if($("#allArea").val()=="cn"){$("#areaBox1").toggle();$("#areaBox2").hide();$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()}else{if($("#allArea").val()==null||$("#allArea").val()=="os"){}else{$("#areaBox2").toggle();$("#areaBox1").hide();$("#sec_box").show();$("#thd_box").hide()}}U(an)});$(".j_areahead%20.pv").click(function(){$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()});$(".j_areahead%20.city").click(function(){$("#province_box").hide();$("#city_box").show();$("#county_box").hide();$("#street_box").hide()});$(".J_areaHead .county").click(function(){$("#province_box").hide();$("#city_box").hide();$("#street_box").hide();$("#county_box").show()});$(".J_areaHead .street").click(function(){$("#province_box").hide();$("#city_box").hide();$("#street_box").show();$("#county_box").hide()});$(".j_areahead2%20.sec").click(function(){$("#sec_box").show();$("#thd_box").hide()});$(".j_areahead2%20.thd").click(function(){$("#sec_box").hide();$("#thd_box").show()});$("#province_box .group_item").bind("click",function(){$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var an=$(this).attr("pname");var ao=$(this).attr("pid");$(".j_areahead%20.city").click();$("#areaBoxInput").val("");$("#areaBoxInput").val($("#areaBoxInput").val()+an);$("#areaBoxInput").removeAttr("lastArea");$("#areaBoxInput").removeAttr("lastAreaType");$("#areaBoxInput").attr("area1",ao);$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");var aq=p(site_cityUtil.getCities(ao));var ap=$(aq).html();if(ap===null||ap===undefined||ap===""){$("#areaBox1").hide()}$("#city_box").append(aq)});$("#city_box").delegate(".group_item","click",function(){$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var an=$(this).attr("cname");var ap=$(this).attr("cid");$(".J_areaHead .county").click();var at=$("#areaBoxInput").attr("lastArea");var ao=$("#areaBoxInput").attr("lastAreaType");if(ao!=null&&ao!=""){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+an);$("#areaBoxInput").attr("lastArea","-"+an);$("#areaBoxInput").attr("lastAreaType","city");$("#areaBoxInput").attr("area2",ap);$("#areaBoxInput").attr("area3","");var ar=j(site_cityUtil.getCounty(ap));var aq=$(ar).html();if(aq===null||aq===undefined||aq===""){$("#areaBox1").hide()}$("#county_box").append(ar)});$("#county_box").delegate(".group_item","click",function(){$("#areaBox1 .street_content").remove();var ao=$(this).attr("cname");var aq=$(this).attr("cid");$(".J_areaHead .street").click();var at=$("#areaBoxInput").attr("lastArea");var ap=$("#areaBoxInput").attr("lastAreaType");if(ap!=null&&(ap=="street"||ap=="county")){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-",$("#areaBoxInput").val().indexOf("-")+1)))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+ao);$("#areaBoxInput").attr("lastArea","-"+ao);$("#areaBoxInput").attr("lastAreaType","county");$("#areaBoxInput").attr("area3",aq);$("#areaBoxInput").attr("area4","");var an=t(site_cityUtil.getStreet(aq));var ar=$(an).html();if(ar===null||ar===undefined||ar===""){$("#areaBox1").hide()}$("#street_box").append(an)});$("#street_box").delegate(".group_item","click",function(){var an=$(this).attr("cname");var ap=$(this).attr("cid");var aq=$("#areaBoxInput").attr("lastArea");var ao=$("#areaBoxInput").attr("lastAreaType");if(ao!=null&&ao=="street"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(aq,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+an);$("#areaBoxInput").attr("lastArea","-"+an);$("#areaBoxInput").attr("lastAreaType","street");$("#areaBoxInput").attr("area4",ap);$("#areaBox1").hide()});$("#sec_box").delegate(".group_item","click",function(){$("#areaBox2 .thd_content").html("");var an=$(this).attr("cname");var ap=$(this).attr("cid");$(".j_areahead2%20.thd").click();var ar=$("#areaBoxInput").attr("lastArea");var ao=$("#areaBoxInput").attr("lastAreaType");if(ao!=null&&ao!=""&&$("#areaBoxInput").val().indexOf("-")!=-1){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+an);$("#areaBoxInput").attr("lastArea","-"+an);$("#areaBoxInput").attr("lastAreaType","sec");$("#areaBoxInput").attr("area2",ap);$("#areaBoxInput").attr("area3","");var aq=d(ap);if(aq===null||aq===undefined||aq===""){$("#areaBox2").hide()}$("#thd_box .thd_content").append(aq)});$("#thd_box").delegate(".group_item","click",function(){var an=$(this).attr("cname");var ap=$(this).attr("cid");var aq=$("#areaBoxInput").attr("lastArea");var ao=$("#areaBoxInput").attr("lastAreaType");if(ao!=null&&ao=="thd"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(aq,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+an);$("#areaBoxInput").attr("lastArea","-"+an);$("#areaBoxInput").attr("lastAreaType","thd");$("#areaBoxInput").attr("area3",ap);$("#areaBox2").hide()});if($(this).hasClass("edit")){for(var ae=0;ae0){if(!Fai.isNationMobile(ap)){Fai.ing(LS.mobileNumRegular,1);return}K.mobileCt=$(".editAddrInfo").find("#mobileCt").val()}else{K.mobileCt=""}}K[ay]=ap}}K.isDefault=af;if(ag=="add"){c.push(K)}$.ajax({type:"post",url:ab,data:"info="+Fai.encodeUrl($.toJSON(z)),success:function(aA){if(o==1){var aD=document.location.search.search(/imme/)>-1?"@imme&":"?";if(ag=="add"){document.location.href="mstl.jsp"+aD+"opera=add"}else{if(ag=="edit"){var aC=z.addrInfoList[e];var aB=$(".addrMsg_default[_item='"+e+"']").add(".addrMsg[_item='"+e+"']");aB.find(".name").text(aC.name);aB.find(".phone").text(aC.phone);aB.find(".zip").text(aC.zip);aB.find(".address").text(aC.addr);if(aC.phone==null||aC.phone==""){aB.find(".phone").text(aC.mobile)}if(aC.addr_info!=null||aC.addr_info!=""){if(!aC.addr_info.isCus){if(aC.addr_info.provinceCode==990000){$("#mallShipTemplate_allArea").val("os")}else{$("#mallShipTemplate_allArea").val("cn")}$("#mallShipTemplate_allArea").change();$("#mallShipTemplate_areaBox1 .group_item[pid='"+aC.addr_info.provinceCode+"']").click();$("#mallShipTemplate_areaBox1 .group_item[cid='"+aC.addr_info.cityCode+"']").click();$("#mallShipTemplate_areaBox1 .group_item[cid='"+aC.addr_info.countyCode+"']").click();$("#mallShipTemplate_areaBox1 .group_item[cid='"+aC.addr_info.streetCode+"']").click()}else{$("#mallShipTemplate_allArea").val(aC.addr_info.provinceCode);$("#mallShipTemplate_allArea").change();$("#mallShipTemplate_areaBox2 .group_item[cid='"+av+"']").click();$("#mallShipTemplate_areaBox2 .group_item[cid='"+aq+"']").click()}$("#streetAddress").val(aC.addr_info.streetAddr)}$(".propList .propItemValue").each(function(aE,aG){var aF=$(this).attr("_field");$(this).find("input").val(aC[aF])});$(".saveOrCancel .popupBClose").click()}else{document.location.href="mstl.jsp"+aD}}}else{document.location.href="mcenter.jsp@item=memberinfo"}},error:function(){Fai.ing(LS.systemError)}})})});$(".delete").click(function(){var G=$(this).parent().parent().attr("_item");var I=["
    ","
    ",LS.conCancelAddrInfo,"
    ","
    ","",LS.cancel,"",""+LS.confirm+"","
    ","
    "];var L=parseInt(Math.random()*10000);var H={boxId:L,title:"",htmlContent:I.join(""),width:300};var J=Site.popupBox(H);var K="ajax/memberAdm_h.jsp?cmd=set&id="+b;J.find(".J-rpt-save").on("click",function(){c.splice(G,1);$.ajax({type:"post",url:K,data:"info="+Fai.encodeUrl($.toJSON(z)),error:function(){Fai.ing(LS.systemError,false)},success:function(M){var N=$.parseJSON(M);if(N.success){if(o==1){var O=document.location.search.search(/imme/)>-1?"?imme":"";document.location.href="mstl.jsp"+O}else{document.location.href="mCenter.jsp?item=memberInfo"}}else{Fai.ing(N.msg,true)}}})})});$(".makeDefault").click(function(){var H=$(this).parent().parent().attr("_item");var G="ajax/memberAdm_h.jsp?cmd=set&id="+b;for(e in c){c[e].isDefault=0}c[H].isDefault=1;$.ajax({type:"post",url:G,data:"info="+Fai.encodeUrl($.toJSON(z)),error:function(){Fai.ing(LS.systemError,false)},success:function(I){var J=$.parseJSON(I);if(J.success){if(o==1){var K=document.location.search.search(/imme/)>-1?"?imme":"";document.location.href="mstl.jsp"+K}else{document.location.href="mCenter.jsp?item=memberInfo"}}else{Fai.ing(J.msg,true)}}})});if(Fai.isIE6()){$(".addrMsg , .addrMsg_default").hover(function(){if($(this).hasClass("isDefault")){$(this).find(".edit").attr("style","margin-left:85px;")}else{$(this).find(".edit").attr("style","margin-left:70px;")}if(i){$(this).find(".other").attr("style","top:20px;")}else{$(this).find(".other").attr("style","top:90px;")}},function(){if(i){$(this).find(".other").attr("style","top:-65px;")}else{$(this).find(".other").attr("style","top:150px;")}})}function p(H){var G="";G+="
    ";$.each(H,function(I,J){if(r==2052||r==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 j(H){var G="";G+="
    ";$.each(H,function(I,J){if(r==2052||r==1028){G+="
    "+site_cityUtil.getInfo(J.id).name+"
    "}else{G+="
    "+site_cityUtil.getInfoEn(J.id).name+"
    "}});G+="
    ";return G}function t(H){var G="";G+="
    ";$.each(H,function(I,J){if(r==2052||r==1028){G+="
    "+site_cityUtil.getInfo(J.id).name+"
    "}else{G+="
    "+site_cityUtil.getInfoEn(J.id).name+"
    "}});G+="
    ";return G}function h(H){var G="";var I=false;$.each(n,function(J,K){if(I){return}if(K.id==H){G=K.name;I=true}});return G}function v(H){var G=[];$.each(n,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="";$.each(v(I),function(J,K){H+="
    "+K.name+"
    "});return H}};Site.submitInfoWhileNoAddrMsg=function(a,m){var g={};var j=m.addrInfoList||[];var d={};var p=0;var o=false;if(j.length>0){$.each(j,function(q,r){if(r.isDefault==1){d=r;return false}p++})}var h="ajax/memberAdm_h.jsp?cmd=set&opera=editAddr&editItem="+p+"&id="+m.id;if(j.length==0){o=true;h="ajax/memberAdm_h.jsp?cmd=set&opera=addAddr&id="+m.id}for(var k=0;k0){if(!Fai.isNationMobile(e)){Fai.ing(LS.mobileNumRegular,1);return}d.mobileCt=$(".J_noAddrMsgContent").find("#mobileCt").val()}else{d.mobileCt=""}}d[n]=e}if(o){d.isDefault=1;j.push(d)}g.addrInfoList=j;$.ajax({type:"post",url:h,data:"info="+Fai.encodeUrl($.toJSON(g)),success:function(i){document.location.href="mCenter.jsp?item=memberInfo"},error:function(){Fai.ing(LS.systemError)}})};Site.memberIntegralInit=function(c,e,a){var d=false;if(c){d=true}$("#incomeTab").css({"border-top":"1px solid #eeeeee","border-right":"1px solid #eeeeee"});$("#expenseTab").css({"border-top":"1px solid #eeeeee","border-right":"1px solid #eeeeee"});$("#totalTab").css({"border-top":"1px solid #eeeeee","border-left":"1px solid #eeeeee","border-right":"1px solid #eeeeee"});$("#integralTabLine").find(".integralTab").click(function(){$("#integralTabLine").find(".g_border").removeClass("g_title"+a);$(this).addClass("g_title"+(e?a:""));b($(this).attr("id"));$("#integralTabLine").find(".g_title").removeClass("g_title");$(this).addClass("g_title")});function b(h){var g=h||"totalTab";if(g=="incomeTab"){$("#allIntegralList").hide();$("#incomeIntegralList").show();$("#expenseIntegralList").hide()}else{if(g=="expenseTab"){$("#allIntegralList").hide();$("#incomeIntegralList").hide();$("#expenseIntegralList").show()}else{$("#allIntegralList").show();$("#incomeIntegralList").hide();$("#expenseIntegralList").hide()}}}};Site.FitMemberProfilePanelImgSize=function(){if($(".memberProfilePanel").length<=0){return}var h=$(".memberProfilePanel .mBulletin_content").find("img"),g=$(".mBulletin_Area"),c=g.width(),e=g.height(),b,a,d;h.each(function(k,j){b=$(j).attr("width");a=$(j).attr("height");if(b>c){d=Fai.Img.calcSize(b,a,c,e,Fai.Img.MODE_SCALE_FILL);$(j).css({width:d.width,height:d.height});if(Fai.isIE()){$(".formStyle55 .formMiddleContent").css("overflow","hidden")}}})};Site.loadPdCollectionList=function(c,b,d,e,a){this.pIdList=b;this.mid=c;this.isNewUser=d;this.colorStyleType=e;this.colorStyle=a;this.panel=$(".memberCollectionPanel")};(function(d,o,e){var k=o.prototype,u,h,i,t,r,l,n=[],v=12,b,c=[];k.init=function(){h=this.pIdList,l=this.panel;u=this.mid;i=this.isNewUser;t=this.colorStyleType;r=this.colorStyle;s();a();var y=h.slice(0,v);b=y.length;q(y);j()};function s(){d.post("ajax/product_h.jsp",{mid:u,cmd:"updateCollections",ids:d.toJSON(h)},function(y){if(y.success){h=y.list}},"json")}function q(y){d.ajax({url:"ajax/product_h.jsp",data:{cmd:"batchGetPd",ids:d.toJSON(y)},async:false,type:"POST",dataType:"json",success:function(z){if(z.success){d(function(){p(y,z.list)})}}})}function w(z){var y=false,A;d.each(c,function(B,C){if(z==C.lid){y=true;A=C}});if(!y){A=m(z)}return A}function m(y){var z={lid:y};d.ajax({url:"ajax/productProp_h.jsp?cmd=list&lid="+y,async:false,type:"POST",dataType:"json",success:function(A){if(A.success){var B=false,C=false;d.each(A.list,function(D,E){if(E.fieldKey=="mallMarketPrice"){C=true}if(E.fieldKey=="mallPrice"){B=true}});z.showMarketPrice=C;z.showPrice=B;c.push(z)}}});return z}function x(){var z={},y=false;z.productCollections=h.reverse()+"";d.ajax({url:"ajax/member_h.jsp",data:{cmd:"set",id:u,info:d.toJSON(z)},async:false,type:"POST",dataType:"json",success:function(A){if(A.success){y=true}else{y=false}}});return y}function a(){var y=Math.ceil(h.length/v);if(l.find(".pagination").length==0){l.append('
    ")}else{d("#totalPage").text(y)}if(y>Number(d("#currentPage").text())){d("#downPage").addClass("g_border")}else{d("#downPage").removeClass("g_border")}if(d("#currentPage").text()!="1"){d("#upPage").addClass("g_border")}else{d("#upPage").removeClass("g_border")}}function p(y,z){var A=[];d.each(z,function(C,B){var D=w(B.lid);A.push("
  • ");A.push(' ");A.push('
    '+B.name+"
    ");A.push('
    ');if(B.mallPrice!=-1&&D.showPrice){A.push('
    '+Fai.top.choiceCurrencyVal+" "+B.mallPrice+"
    ")}if(B.mallMarketPrice!=-1&&D.showMarketPrice){A.push('
    '+Fai.top.choiceCurrencyVal+" "+B.mallMarketPrice+"
    ")}A.push("
    ");A.push("
  • ")});l.find(".collectionList").append(A.join(""))}function j(){l.on({hover:function(){d(this).find(".delColl").show()},mouseleave:function(){if(d(this).parents(".memberCollectionNewPanel").length==0){d(this).find(".delColl").hide()}}},".pdImg");l.on("click",".delColl",function(){var z=d(this);z.parents("a").attr("href","javascript:;");var y=z.attr("data-id");var B=h.indexOf(Number(y));if(B>-1){h.splice(B,1)}var C=["
    ","
    ",LS.sureDelCollection,"
    ","
    ","",LS.cancel,"",""+LS.confirm+"","
    ","
    "];var E=parseInt(Math.random()*10000);var A={boxId:E,title:"",htmlContent:C.join(""),width:300};var D=Site.popupBox(A);D.find(".J-rpt-save").on("click",function(){if(x()){z.parents("li").remove()}else{Fai.ing(LS.systemError);return}a();if(h.length>b){var H=h[b];b=b+1;var G=[];G.push(H);q(G)}g();if(h.length==0){l.find(".collectionList").html("
    "+LS.notCollection+"
    ");l.find(".pagination").remove()}var F=true;d(".collectionList li").each(function(){if(!d(this).is(":hidden")){F=false;return true}});if(F){d("#upPage").click()}D.find(".popupBClose").click()})});l.on("click","#downPage",function(){if(d(this).hasClass("g_border")){d("#currentPage").text(Number(d("#currentPage").text())+1);a();if(h.length>b){var y=h.slice(b,b+v);b=b+y.length;if(y.length>0){q(y)}}g()}});l.on("click","#upPage",function(){if(d(this).hasClass("g_border")){d("#currentPage").text(Number(d("#currentPage").text())-1);a();g()}})}function g(){var y=Number(d("#currentPage").text())-1;l.find(".collectionList").children().hide();var A=y*v;for(var z=A;z0){if($(this).attr("disabled")!="disabled"){if(!Fai.isNationMobile(k)){d.html(LS.mobileNumRegular);$(this).focus();r=false;return false}else{s.mobileCt=$(this).parent().find("#mobileCt").val();l=true}}else{s[userEditItemName]=""}}});if(!r){return}var c=b.find(".itemPwd");if(c.is(":visible")){if(e){var q=$("#memberProfileOldPwd").val();if(q==null||q==""){d.html(LS.memberProfileOldPwdEmpty);$("#memberProfileOldPwd").focus();return}}var g=$("#memberProfilePwd").val();if(g==null||g==""){d.html(LS.memberProfilePwdEmpty);$("#memberProfilePwd").focus();return}if(g.length<4){d.html(LS.memberProfilePwdMinLength);$("#memberProfilePwd").focus();return}var n=$("#memberProfileRepwd").val();if(g!=n){d.html(LS.memberProfilePwdNotMatch);$("#memberProfileRepwd").focus();return}s.oldPwd=$.md5(q);s.pwd=$.md5(g)}var p="";var k="";var u=0;$(".userEditItem").each(function(){userEditItemID=$(this).attr("id");k=$(this).val();userEditItemName=$(this).attr("name");userEditItemMaxLength=$(this).attr("maxlength");if(userEditItemID=="email"&&k.length>0){if(!Fai.isEmail(k)){d.html(Fai.format(LS.memberProfileItemCorrect,userEditItemName));$(this).focus();u=1;return false}}if(k.length>userEditItemMaxLength){d.html(Fai.format(LS.memberProfileUserEditItemMaxLength,userEditItemName,userEditItemMaxLength));$(this).focus();u=1;return false}});var j=b.find("#acct");if(j.attr("disabled")!=""){if(j.val()==""){i=1}else{s.acct=j.val()}}if(u==1){return}var i=0;var o=0;var a="";$(".isCheckUAI").each(function(){userEditItemID=$(this).attr("id");k=$(this).val();userEditItemName=$(this).attr("name");if(k==null||k==""){if($(this).is("input")){d.html(Fai.format(LS.memberSignupUserAddItemIsEmpty,userEditItemName))}else{d.html(Fai.format(LS.memberSignupUserAddItemIsEmpty2,userEditItemName))}$(this).focus();i=1;return false}if(userEditItemID=="email"&&k.length>0){if(!Fai.isEmail(k)){d.html(Fai.format(LS.memberProfileItemCorrect,userEditItemName));$(this).focus();o=1;return false}}});if(i==1){return}if(o==1){return}var h=b.find(".memberProfileBtn");h.attr("disabled",true);d.html(LS.memberProfileSubmitting);if(newImg&&"id" in newImg&&oldImgId!=newImg.id){$.ajax({type:"post",url:"ajax/member_h.jsp@cmd=cimg",data:"oldImgId="+oldImgId+"&mid="+t+"&newImg="+Fai.encodeUrl($.toJSON(newImg)),async:false,error:function(){Fai.ing(LS.systemError)},success:function(v){v=jQuery.parseJSON(v);if(v.success){headPic.thumbId=v.fileId}}})}s.headPic=headPic;$.ajax({type:"post",async:false,url:"ajax/member_h.jsp@cmd=set",data:"id="+t+"&info="+Fai.encodeUrl($.toJSON(s)),error:function(){h.removeAttr("disabled");d.html(LS.memberProfileError)},success:function(v){h.removeAttr("disabled");var w=jQuery.parseJSON(v);if(w.success){d.html(LS.memberProfileOK);setTimeout(function(){d.html("");d.parent().hide()},3000);if(w.changeAcct){b.find(".acctOnlyOnceTip").hide();b.find(".canReset").removeClass("canReset");b.find("#acct").attr("disabled","disabled")}b.find(".itemPwd").hide();b.find(".itemPwd input").val("");b.find(".resetPwd").html(LS.memberProfileResetPwd);if(l==true){b.find("#mobile").attr("disabled","disabled");b.find("#mobile").removeAttr("style");var x=b.find("#mobileCt").find("option:selected").text();if(x!=null&&x.indexOf("+")>=0){x=x.substring(x.indexOf("+"));b.find("#mobile").val(x+" "+b.find("#mobile").val())}b.find("#mobileCt").remove()}Site.checkMemberDataIntegrity(m)}else{if(w.rt==-3){d.html(LS.memberProfileOldPwdIncorrectError)}else{if(w.rt==-6){d.html(LS.memberSignupRegisterExisted)}else{if(w.mobileErr==true){d.html(LS.mobileNumRegular);$("#mobile").focus()}else{d.html(LS.memberProfileError)}}}}}})};Site.checkMemberDataIntegrity=function(c){var d=Fai.top.$("#module"+c);var g=0;var e=0;var a=d.find(".allTooltip").width();var b=0;d.find(".memberProNewfile .J_memberProfileItem").not(".itemPwd").each(function(h,i){e++;if(typeof $(this).find("input").val()!="undefined"&&$(this).find("input").val().length>0){g++;return true}});b=g/e;d.find(".dataIntegrity").text(Math.floor(b*100));d.find(".realTooltip").css("width",b*a)};Site.loadCouponList=(function(e){function g(n){this.mid=n}var h=g.prototype,l,b=0;pageno=[1,1,1],pageSize=9;var k=[];k[0]=new Array(),k[1]=new Array(),k[2]=new Array(),couponColorList=["red","orange","yellow","green","blue","pink","purple","gray"];h.init=function(o,n){l=this;if(_manageMode){var p={id:0,couponName:"示例优惠券",savePrice:10,orderMinPrice:10,couponLeaveAmount:999,flag:0,receiveCount:1,state:true,validity:"无时间限制",cdId:73,bg:0,status:0,redeemCode:"1111111"};k[0]=[p,p,p];e(".couponList").append(j(o,n));return}c(o,n);m(o,n)};function c(o,n){var p=l;e.ajax({url:"ajax/mallcoupon_h.jsp@cmd=getcouponbymid",data:"mid="+p.mid,dataType:"json",success:function(q){if(q.success){if(q.receiveList){k[0]=q.receiveList}if(q.usedList){k[1]=q.usedList}if(q.expireList){k[2]=q.expireList}a(o,n)}},error:function(){}})}function a(p,o){var t=l;var s=e(".couponList");var r=[];r.push('
    ');r.push('
    '+(p?LS.myCoupon:LS.notUse)+'('+k[0].length+")
    ");r.push('
    '+(p?LS.usedCoupon:LS.used)+'('+k[1].length+")
    ");r.push('
    '+(p?LS.expiredCoupon:LS.expired)+'('+k[2].length+")
    ");r.push("
    ");s.append(r.join(""));var q=e(".coupon-tab").eq(b),n=e(".g_selected").css("background-color");i(q,p,o);q.addClass("g_selected");q.find("em").css({"border-top-color":n})}function m(o,n){var p=l;e("body").on("click",".coupon-tab",function(){if(b==Number(e(this).index())){return}i(e(this),o,n)});e("body").on("click",".coupon-delete",function(){var q=e(this).parents(".coupon").attr("data_id"),x=e(this).parents(".coupon-warp");var r=LS.delCouponWillUnavail;if(b!=0){r=LS.confirmDelCoupon}var v;var s=k[b];var w=s.length;var u=["
    ","
    ",r,"
    ","
    ","",LS.cancel,"",""+LS.confirm+"","
    ","
    "];var y=parseInt(Math.random()*10000);var z={boxId:y,title:"",htmlContent:u.join(""),width:300};var t=Site.popupBox(z);t.find(".J-rpt-save").on("click",function(){for(var A=0;ApageSize){e(".couponList").append("
    ");new Site.Pagenation(b,{pageNo:1,pageSize:pageSize,totalSize:k[b].length},d)}else{e(".memberCouponPanel .pagenation").remove()}}function j(q,p){var s=l,o=[],n=pageno[b];o=k[b].slice((n-1)*pageSize,n*pageSize);var r=[];r.push("
    ");if(o.length>0){e.each(o,function(u,t){if(b!=0){t.bg=7}if(q=="new"){r.push("
    ");r.push("
    "+LS.couponNumber+":"+t.redeemCode+"
    ");r.push("
    ");r.push("
    ");r.push("
    "+Fai.top.choiceCurrencyVal+""+t.savePrice+""+LS.Event+LS.name+":"+Fai.encodeHtml(t.couponName)+"
    ");r.push("
    "+LS.useCondition+":"+LS.full+t.orderMinPrice+"
    ");r.push("
    "+LS.valiteTime+":"+t.validity+"
    ");r.push("
    ");if(b==1){if(p==2052||p==1028){r.push('
    ')}else{r.push('
    ')}}r.push("
    ");r.push("
    ")}else{r.push("
    ");r.push("
    "+LS.couponNumber+":"+t.redeemCode+"
    ");r.push("
    ");r.push("
    ");r.push("
    ");r.push("
    "+Fai.top.choiceCurrencyVal+""+t.savePrice+"
    ");r.push("
    "+LS.Event+LS.name+":"+Fai.encodeHtml(t.couponName)+"
    ");r.push("
    "+LS.useCondition+":"+LS.full+t.orderMinPrice+"
    ");r.push("
    "+LS.valiteTime+":"+t.validity+"
    ");r.push("
    ");r.push("
    ");r.push("
    ");if(b==2){r.push('
    ')}r.push("
    ");r.push("
    ")}})}else{r.push("
    ");r.push("
    ");r.push("
    ");r.push("
    ");r.push("
    ");if(b==0){r.push(" "+LS.noUseCoupon+"")}else{r.push(" "+LS.noRelatedCoupon+"")}r.push("
    ");r.push("
    ")}r.push("
    ");return r.join("")}function d(q,n,p,o){pageno[q]=n;e(".tabList").next().remove();e(".tabList").after(j(p,o))}return g})(jQuery);Site.onlyShowPhoneCode=function(a){var b=$("#"+a);if(typeof b=="undefined"||b==null){return}var c=b.val();c=c.substring(0,c.length-5);b.val(c)};Site.newOrderList=function(moduleId){var $module=$("#module"+moduleId);$module.find(".memberOrderPanel").on("click",".pageNo, .pagePrev, .pageNext",function(){var pageSize=$(this).attr("_pageSize");var pageno=$.trim($(this).text());var status=$(this).attr("_status");var colorStyleType=$(this).attr("_colorStyleType");var colorStyle=$(this).attr("_colorStyle");if($(this).hasClass("pagePrev")){pageno=$(this).attr("_prepage")}else{if($(this).hasClass("pageNext")){pageno=$(this).attr("_nextpage")}}if(!$(this).hasClass("J_pageSelect")&&pageno){var mallOrderStatusId=$module.find(".memberOrderNewPanel .mallOrderNewList > div:visible").attr("id");mallOrderStatusId=$.trim(mallOrderStatusId);Site.showLoading(mallOrderStatusId);$.ajax({url:"ajax/member_h.jsp@cmd=getneworderlisthtml",data:"moduleId="+moduleId+"&status="+status+"&pageno="+pageno+"&pageSize="+pageSize+"&colorStyleType="+colorStyleType+"&colorStyle="+colorStyle,dataType:"json",success:function(result){if(result.success){var newOrderListHtml=result.msg;if(status==2){$(".mallOrderWaitSettle").empty();$(".mallOrderWaitSettle").append(newOrderListHtml)}else{if(status==5){$(".mallOrderFinSettle").empty();$(".mallOrderFinSettle").append(newOrderListHtml)}else{if(status==10){$(".mallOrderFinPay").empty();$(".mallOrderFinPay").append(newOrderListHtml)}else{if(status==15){$(".mallOrderFinShip").empty();$(".mallOrderFinShip").append(newOrderListHtml)}else{if(status==20){$(".mallOrderFinProcess").empty();$(".mallOrderFinProcess").append(newOrderListHtml)}else{if(status==25){$(".mallOrderAll").empty();$(".mallOrderAll").append(newOrderListHtml)}else{if(status==-2){$(".mallOrderRefund").empty();$(".mallOrderRefund").append(newOrderListHtml)}else{if(status==-3){$("#mallOrderAllOld").empty();$("#mallOrderAllOld").append(newOrderListHtml)}}}}}}}}var newOrderListScript=result.scripts;eval(newOrderListScript)}else{Fai.ing(result.msg,true)}Site.closeLoading(mallOrderStatusId)},error:function(){Site.showLoadingAgain(mallOrderStatusId,pageno)}})}})};Site.showLoading=function(b){var a=['
    ','
    ','
    ',"
    ","
    "];$("#"+b).empty().append(a.join(""))};Site.showLoadingAgain=function(b,c){Site.closeLoading(b);var a=['
    ','
    加载失败,请点击重新加载
    ',"
    "];$("#"+b).empty().append(a.join(""))};Site.closeLoading=function(a){$("#"+a).find(".orderLoading").remove()};Site.reloadingClick=function(a,b){Site.showLoading(a);$("#"+a).find(".pageNo").each(function(){if($.trim($(this).text())==b){$(this).click()}})};Site.integralInitEvent=function(a){ajaxLoadIntegralList(a,"allIntegralList",-1);ajaxLoadIntegralList(a,"incomeIntegralList",0);ajaxLoadIntegralList(a,"expenseIntegralList",1)};function ajaxLoadIntegralList(d,c,a){var b=$("#module"+d).find(".memberIntegralPanel");b.find("#"+c).on("click",".pageNo, .pagePrev, .pageNext",function(){var e=$(this).attr("_pageSize"),g=$.trim($(this).text());if($(this).hasClass("pagePrev")){g=$(this).attr("_prepage")}else{if($(this).hasClass("pageNext")){g=$(this).attr("_nextpage")}}if(!$(this).hasClass("J_pageSelect")&&g){Site.showLoading(c);$.ajax({url:"ajax/member_h.jsp@cmd=getintegrallisthtml",data:"moduleId="+d+"&pageno="+g+"&pageSize="+e+"&integralType="+a,dataType:"json",type:"post",success:function(h){setTimeout(function(){if(h.success){b.find("#"+c).empty();b.find("#"+c).prepend(h.integralListHtml)}else{Fai.ing(h.msg,true)}Site.closeLoading(c)},150)}})}})}Site.memberOrderListInitEvent=function(b){var a=$("#module"+b).find(".mallOrderList");a.on("click",".pageNo, .pagePrev, .pageNext",function(){var c=$(this).attr("_pageSize"),d=$.trim($(this).text());if($(this).hasClass("pagePrev")){d=$(this).attr("_prepage")}else{if($(this).hasClass("pageNext")){d=$(this).attr("_nextpage")}}if(!$(this).hasClass("J_pageSelect")&&d){$.ajax({url:"ajax/member_h.jsp@cmd=getmemberorderlisthtml",data:"moduleId="+b+"&pageno="+d+"&pageSize="+c,dataType:"json",type:"post",success:function(e){if(e.success){a.empty();a.prepend(e.orderListHtml);Site.initModuleItemCover("#module"+b+" .itemLine",e.contentSplitLine);Site.fixSiteWidth(Fai.top._manageMode);Site.fixWebFooterHeight()}else{Fai.ing(e.msg,true)}}})}})};Site.changeBindAcct=function(a,g){Site.logDog(200199,3);var b=$("#module"+a);b.find(".memberBindMsg").show();var c=b.find(".memberBindMsg .msgText");var e="cmd=bindOtherAcct";var d={};var j=$("#bindAcct").val();var i=$("#bindPassword").val();var h=$.cookie("isOtherLogin");if(j==null||j==""){c.html(LS.memberSignupRegisterAcctEmpty);$("#bindAcct").focus();return}if(i==null||i==""){c.html(LS.memberSignupRegisterPwdEmpty);$("#bindPassword").focus();return}i=$.md5(i);d.acct=j;d.pwd=i;$.ajax({type:"post",url:"ajax/member_h.jsp?"+e,data:"info="+Fai.encodeUrl($.toJSON(d))+"&mid="+g+"&loginType="+h,error:function(){},success:function(k){var l=jQuery.parseJSON(k);if(l.success){if(l.fromBind){Site.memberInactiveDialog(l.mail,l.memName)}else{if(l.active){Site.memberActiveDialog(d.email,Fai.encodeUrl(d.acct),function(){Fai.top.location.href=url;Fai.top.event.returnValue=false})}else{document.location.reload()}}}else{if(l.msg=="该帐号已绑定到其他帐号"){c.html(LS.hasBindOtherAcct)}else{if(l.rt==-601){c.html(LS.reGetMobileCode)}else{if(l.rt==-8){c.html(LS.mobileHasSigned)}else{if(l.rt==-6){c.html(LS.memberSignupRegisterExisted)}else{if(l.rt==-4){c.html(LS.memberSignupRegisterLimit)}else{if(l.rt==-3){if(l.msg=="密码不正确"){c.html(LS.memberPwdError)}else{c.html(LS.memberDialogNotFound)}}else{if(l.rt==1){c.html(LS.memberOtherLgnAcctAlreadyBind)}else{c.html(LS.memberSignupRegisterError)}}}}}}}}}})};Site.initModuleMemberSignup=function(c,g,e,a){$("#memberSignupAcct").focus();var b=Site.getUrlParamObj(Fai.top.location.search).url||a;if(g==2){$("#module"+c).find(".formMiddle").addClass("memberSignupMiddle");var d=$("#module"+c).find("#memberSignupButton");$(d).unbind("click").bind("click",function(){if(e){Fai.ing("您目前处于网站管理状态,请先点击网站右上方的“退出”后再注册会员。")}else{Site.memberSignupSubmit(c,b,g)}});Site.memberSignupCompatibility(c)}};Site.memberSignupCompatibility=function(b){if(Fai.isIE6()){var e=$("#module"+b).find(".J_memberSignupPanel");$(e).removeAttr("style");var d=$(e).width();if(d>313||d<200){d=(d>313)?"313px":(d<200)?"200px":"auto";$(e).css("width",d)}}var c=!("placeholder" in document.createElement("input"));if(c){var a=$("#module"+b).find(".itemMiddle");$.each(a,function(l,n){var o=$(n).find("span");o.css({"white-space":"nowrap"});var j=o.width();var m=o.height();var h=$(n).position().top+(Fai.isIE6()?2:0);var g=$(n).position().left;$(o).css({top:h+"px",left:g+"px","line-height":m+"px",padding:"0px 0px 0px 4px",width:j+"px"});var k=$(n).find("input").val();if(k&&k.length>0){$(o).hide()}})}};Site.getSignMobileCode=function(d,b){var c=Site.checkGetMobileCodeParam(d,b);var a=$("#module"+d);if(d=="J_memberRegisterDialogPanel"){a=$("#J_memberRegisterDialogPanel")}if(c.checkResult==true){$.ajax({type:"post",url:"ajax/member_h.jsp@cmd=getmobilecode",data:"mobile="+c.info.mobile+"&mobileCt="+c.info.mobileCt+"&validateCode="+c.info.captcha,error:function(){Site.showSignupMsg(b,d,"",LS.getMobileCodeErrAf,true)},success:function(e){var g=jQuery.parseJSON(e);if(g.success){Site.showSignupMsg(b,d,"",LS.sendMobileCodeSuc,true);Site.getSignMobileCodeCountDown(d)}else{Site.changeCaptchaImg(a.find("#memberSignupCaptchaImg")[0]);$("#memberSignupCaptcha").val("");if(g.rt==-401){Site.showSignupMsg(b,d,"memberSignupCaptcha",LS.memberSignupRegisterCaptchaNotMatch)}else{if(g.rt==-2){Site.showSignupMsg(b,d,"",LS.argsError)}else{if(g.rt==2){Site.showSignupMsg(b,d,"mobile",LS.memberDialogSendMobileCodeErr)}else{if(g.rt==-4||g.rt==8){Site.showSignupMsg(b,d,"",LS.getMobileOneMin,true)}else{if(g.rt==-8){Site.showSignupMsg(b,d,"",LS.getMobileHalfHour,true)}else{if(g.rt==3){Site.showSignupMsg(b,d,"",LS.memberDialogMobileMoneyErr,true)}else{if(g.rt==9){Site.showSignupMsg(b,d,"",LS.memberDialogSendMobileCodeLimit,true)}else{if(g.rt==101){Site.showSignupMsg(b,d,"",LS.mobileSetErr,true)}else{if(g.rt==-6){Site.showSignupMsg(b,d,"mobile",LS.mobileHasSigned,true)}else{if(g.rt==23){Site.showSignupMsg(b,d,"",LS.mobileNationTplErr,true)}else{Site.showSignupMsg(b,d,"",LS.getMobileRefresh,true)}}}}}}}}}}}}})}};Site.getSignMobileCodeCountDown=function(d){var b=$("#module"+d);if(d=="J_memberRegisterDialogPanel"){b=$("#J_memberRegisterDialogPanel")}var e=b.find(".getMobileCdBtn");var c=e.attr("cTime");var g=60;if(!c||c==null){c=0}else{c=parseInt(c);g=1800}c++;e.attr("cTime",c);e.attr("s_onclick",e.attr("onclick"));e.removeAttr("onclick");var a=setInterval(function(){g--;e.html(LS.reGetMsg+"("+g+")");if(g<=0){e.html(e.attr("title"));e.attr("onclick",e.attr("s_onclick"));clearInterval(a)}},1000)};Site.checkGetMobileCodeParam=function(g,c){var e={checkResult:false,info:{}};var b=$("#module"+g);if(g=="J_memberRegisterDialogPanel"){b=$("#J_memberRegisterDialogPanel")}var a=b.find("#mobile").val();var d=b.find("#memberSignupCaptcha").val();if(!Fai.isNationMobile(a)){Site.showSignupMsg(c,g,"mobile",LS.mobileNumRegular);return e}if(d==null||d==""){Site.showSignupMsg(c,g,"memberSignupCaptcha",LS.memberSignupRegisterCaptchaEmpty);return e}e.checkResult=true;e.info.mobile=a;if(a&&a!=null&&$.trim(a)!=""){e.info.mobileCt=b.find("#mobileCt").val()}else{e.info.mobileCt=""}e.info.captcha=d;return e};Site.memberSignupSubmit=function(b,i,k){var a=Site.getUrlParamObj(Fai.top.location.search).url||i;if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行注册。");return}var d=$("#module"+b);var j=d.find("#memberSignupAcct").val();var g=d.find("#memberSignupPwd").val();var h=Site.checkSignupValid(b,k);if(!h.checkResult){return}var c=d.find(".memberSignupBtn");var e=d.find(".memberSignupMsg .msgText");c.attr("disabled",true);e.html(LS.memberSignupRegisterIng);$.ajax({type:"post",url:"ajax/member_h.jsp@cmd=add",data:"info="+Fai.encodeUrl($.toJSON(h.info))+"&validateCode="+h.captcha,error:function(){c.removeAttr("disabled");Site.showSignupMsg(k,b,"",LS.memberSignupRegisterError,true)},success:function(l){var m=jQuery.parseJSON(l);if(m.success){if(m.active){Site.memberActiveDialog(h.info.email,Fai.encodeUrl(h.info.acct),function(){if(a){Fai.top.location.href="login.jsp@errno=12&url="+Fai.encodeUrl(a)}else{Fai.top.location.href="login.jsp@errno=12"}Fai.top.event.returnValue=false})}else{if(a){Site.autoLogin(j,g,a)}else{Fai.top.location.href="login.jsp@errno=12"}}}else{c.removeAttr("disabled");Site.changeCaptchaImg($("#memberSignupCaptchaImg")[0]);$("#memberSignupCaptcha").val("");if(m.rt==-601){Site.showSignupMsg(k,b,"messageAuthCode",LS.reGetMobileCode)}else{if(m.rt==-401){Site.showSignupMsg(k,b,"memberSignupCaptcha",LS.memberSignupRegisterCaptchaNotMatch);if(m.needCode){$(".J_memberSignupCaptcha").removeClass("memberSignupCaptchaHide")}}else{if(m.rt==-8){Site.showSignupMsg(k,b,"mobile",LS.mobileHasSigned)}else{if(m.rt==-6){Site.showSignupMsg(k,b,"memberSignupAcct",LS.memberSignupRegisterExisted)}else{if(m.rt==-4){Site.showSignupMsg(k,b,"",LS.memberSignupRegisterLimit,true)}else{if(m.rt==-28){Site.showSignupMsg(k,b,"",LS.memberRegisterLimit,true)}else{if(m.rt==-20){Site.showSignupMsg(k,b,"",m.msg,true)}else{Site.showSignupMsg(k,b,"",LS.memberSignupRegisterError,true)}}}}}}}}}})};Site.memberSignupDialogSubmit=function(b,a,o,h,m,p,l,c,i){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行注册。");return}var e=$("#"+b);var n=e.find("#memberSignupAcct").val();var k=e.find("#memberSignupPwd").val();var j=Site.checkSignupValid(b,o);if(!j.checkResult){return}var d=e.find(".memberSignupBtn");var g=e.find(".memberSignupMsg .msgText");d.attr("disabled",true);g.html(LS.memberSignupRegisterIng);$.ajax({type:"post",url:"ajax/member_h.jsp@cmd=add",data:"info="+Fai.encodeUrl($.toJSON(j.info))+"&validateCode="+j.captcha,error:function(){d.removeAttr("disabled");Site.showSignupMsg(o,b,"",LS.memberSignupRegisterError,true)},success:function(q){var r=jQuery.parseJSON(q);if(r.success){if(r.active){Site.memberActiveDialog(j.info.email,Fai.encodeUrl(j.info.acct),function(){if(a){Fai.top.location.href="login.jsp@errno=12&url="+Fai.encodeUrl(a)}else{Fai.top.location.href="login.jsp@errno=12"}Fai.top.event.returnValue=false})}else{if(a){Site.autoLoginForDialog(n,k,a,h,b,m,p,l,c,i)}else{Fai.top.location.href="login.jsp@errno=12"}}}else{d.removeAttr("disabled");Site.changeCaptchaImg($("#memberSignupCaptchaImg")[0]);$("#memberSignupCaptcha").val("");if(r.rt==-601){Site.showSignupMsg(o,b,"messageAuthCode",LS.reGetMobileCode)}else{if(r.rt==-401){Site.showSignupMsg(o,b,"memberSignupCaptcha",LS.memberSignupRegisterCaptchaNotMatch);if(r.needCode){$(".J_memberSignupCaptcha").removeClass("memberSignupCaptchaHide")}}else{if(r.rt==-8){Site.showSignupMsg(o,b,"mobile",LS.mobileHasSigned)}else{if(r.rt==-6){Site.showSignupMsg(o,b,"memberSignupAcct",LS.memberSignupRegisterExisted)}else{if(r.rt==-4){Site.showSignupMsg(o,b,"",LS.memberSignupRegisterLimit,true)}else{if(r.rt==-28){Site.showSignupMsg(o,b,"",LS.memberRegisterLimit,true)}else{Site.showSignupMsg(o,b,"",LS.memberSignupRegisterError,true)}}}}}}}}})};Site.autoLogin=function(c,b,a){b=$.md5(b);$.ajax({type:"post",url:"ajax/login_h.jsp",data:"cmd=loginMember&acct="+Fai.encodeUrl(c)+"&pwd="+Fai.encodeUrl(b),error:function(){Fai.top.location.href="login.jsp@errno=-1&url="+Fai.encodeUrl(a)+"&acct="+Fai.encodeUrl(c)},success:function(d){var d=jQuery.parseJSON(d);if(d.success){Fai.top.location.href=a;return}else{Fai.top.location.href="login.jsp@returnurl="+Fai.encodeUrl(a)}}})};Site.autoLoginForDialog=function(j,g,a,d,c,i,k,h,b,e){g=$.md5(g);$.ajax({type:"post",url:"ajax/login_h.jsp",data:"cmd=loginMember&acct="+Fai.encodeUrl(j)+"&pwd="+Fai.encodeUrl(g),error:function(){Fai.top.location.href="login.jsp@errno=-1&url="+Fai.encodeUrl(a)+"&acct="+Fai.encodeUrl(j)},success:function(l){var l=jQuery.parseJSON(l);if(l.success){$("#_TOKEN").attr("value")||$("title").after(l._TOKEN);if(h=="addCartItem"){var m={};m.pid=d;m.mid=i;m.url=k;m.opList=b;m.count=e;m.doWhat="add";$.cookie("isNeedAddCartItem",$.toJSON(m));Fai.top.location.reload()}else{if(h=="immeBuy"){var m={};m.pid=d;m.mid=i;m.url=k;m.opList=b;m.count=e;m.doWhat="buy";$.cookie("isNeedAddCartItem",$.toJSON(m));Fai.top.location.reload()}}return}else{Fai.top.location.href="login.jsp@returnurl="+Fai.encodeUrl(a)}}})};Site.memberSignup=function(a){var b=Fai.getUrlParam(Fai.top.location.href,"url");if(a){Fai.top.location.href=Site.getHtmlUrl("signup")+"?url="+Fai.encodeUrl(a)}else{if(b){Fai.top.location.href=Site.getHtmlUrl("signup")+"?url="+Fai.encodeUrl(b)}else{Fai.top.location.href=Site.getHtmlUrl("signup")}}};Site.checkSignupValid=function(t,e){var b={checkResult:true,captcha:"",info:{}};if(t=="J_memberRegisterDialogPanel"){var a=$("#"+t)}else{var a=$("#module"+t)}a.find(".memberSignupMsg").show();var d=a.find(".memberSignupMsg .msgText");var l=$.trim($("#memberSignupAcct").val());if(l==null||l==""){Site.showSignupMsg(e,t,"memberSignupAcct",LS.memberSignupRegisterAcctEmpty);b.checkResult=false;return b}var h=$("#memberSignupPwd").val();if(h==null||h==""){Site.showSignupMsg(e,t,"memberSignupPwd",LS.memberSignupRegisterPwdEmpty);b.checkResult=false;return b}if(h.length<4){Site.showSignupMsg(e,t,"memberSignupPwd",LS.memberSignupRegisterPwdMinLength);b.checkResult=false;return b}var o=$("#memberSignupRepwd").val();if(h!=o){Site.showSignupMsg(e,t,"memberSignupRepwd",LS.memberSignupRegisterPwdNotMatch);b.checkResult=false;return b}var p="";if($("#memberSignupRemark").length>0){p=$("#memberSignupRemark").val();var u=$("#memberSignupRemark").attr("maxlength");if(p.length>u){Site.showSignupMsg(e,t,"memberSignupRemark",Fai.format(LS.memberSignupRegisterRemarkMaxLength,u));b.checkResult=false;return b}}if(typeof(a.find("#messageAuthCode").attr("maxlength"))!="undefined"&&a.find("#messageAuthCode").attr("maxlength")!=null){var n=a.find("#messageAuthCode").val();if(typeof(n)=="undefined"||n==null||n==""){Site.showSignupMsg(e,t,"messageAuthCode",LS.inputMobileCode);b.checkResult=false;return b}b.info.messageAuthCode=n}b.info.acct=l;b.info.pwd=$.md5(h);b.info.remark=p;var c="";var q="";var i="";var s=0;var m="";var g=0;var k="";$(".userAddItem").each(function(){userAddItemID=$(this).attr("id");i=$(this).val();c=$(this).attr("name");m=$(this).attr("maxlength");b.info[userAddItemID]=i;if(i.length>m){Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemMaxLength,c,m));s=1;b.checkResult=false;return b}if(userAddItemID=="phone"&&i.length>0){if(!Fai.isPhone(i)){Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemCorrect,c));g=1;b.checkResult=false;return b}}if(userAddItemID=="email"&&i.length>0){if(!Fai.isEmail(i)){Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemCorrect,c));g=1;b.checkResult=false;return b}}if(userAddItemID=="mobile"&&i.length>0){if(!Fai.isNationMobile(i)){Site.showSignupMsg(e,t,userAddItemID,LS.mobileNumRegular);g=1;b.checkResult=false;return b}else{b.info.mobileCt=$("#mobileCt").val()}}});if(g==1){b.checkResult=false;return b}if(s==1){b.checkResult=false;return b}var j=0;$(".isCheckUAI").each(function(){userAddItemID=$(this).attr("id");i=$(this).val();c=$(this).attr("name");if(i==null||i==""){if($(this).is("input")){Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemIsEmpty,c))}else{Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemIsEmpty2,c))}j=1;return false}if(userAddItemID=="email"&&i.length>0){if(!Fai.isEmail(i)){Site.showSignupMsg(e,t,userAddItemID,Fai.format(LS.memberSignupUserAddItemCorrect,c));j=1;return false}}});if(j==1){b.checkResult=false;return b}if($(".J_memberSignupCaptcha").css("display")!="none"){b.captcha=$("#memberSignupCaptcha").val();if(b.captcha==null||b.captcha==""||typeof(b.captcha)=="undefined"){Site.showSignupMsg(e,t,"memberSignupCaptcha",LS.memberSignupRegisterCaptchaEmpty);b.checkResult=false;return b}}else{if(b.captcha==null||b.captcha==""||typeof(b.captcha)=="undefined"){b.captcha=""}}var r=$("#memberAgreePro");if(r.length>0){if(!r.prop("checked")){Site.showSignupMsg(e,t,"memberAgreePro",LS.memberProtocolNotAgree,true);b.checkResult=false;return b}}b.checkResult=true;return b};Site.showSignupMsg=function(h,a,i,g,j){if(a=="J_memberRegisterDialogPanel"){Fai.ing(g);return}var b=$("#module"+a);var e=new Object();var d="";if(i.length>0){e=$(b).find("#"+i);d=$(e).prop("tagName").toLocaleLowerCase()}if(h==1){b.find(".memberSignupMsg").show();var c=b.find(".memberSignupMsg .msgText");if(d.length>0&&d=="input"){$(e).focus();c.html(g)}else{c.html(g)}return}if(j){Fai.ing(g,false);return}if(h==2){var k={moduleId:"module"+a,targetId:i,tipText:g};Site.floatTip(k);$(e).addClass("focusBg");return}};Site.initModuleMemberLogin=function(b,d,e,c,a){if(typeof a!="object"){a=new Object()}if(d==2){$("#module"+b).find(".J_loginButton").bind("click",function(){if(c){Fai.ing("您目前处于网站管理状态,请先点击网站右上方的“退出”后再登录会员。")}else{if(e){Site.memberLogin1(b,a)}else{Site.memberLogin2(b,d,a)}}})}Site.memberLoginCompatibility(b)};Site.memberLoginCompatibility=function(c){var b=$("#module"+c);if(c=="loginDialog"){b=$("#J_memberLoginDialogPanel")}if(Fai.isIE6()){var g=b.find(".J_memberLoginPanel");$(g).removeAttr("style");var e=$(g).width();if(e>260||e<180){e=(e>260)?"260px":(e<180)?"180px":"auto";$(g).css("width",e)}}var d=!("placeholder" in document.createElement("input"));if(d){var a=b.find(".J_memberLoginItem");$.each(a,function(m,o){var p=$(o).find("span");var k=$(p).width();var n=$(p).height();var j=$(o).position().top+(Fai.isIE6()?2:0);var h=$(o).position().left;if($(o).hasClass("memberCaptcha")){h+=10}else{h+=25}$(p).css({top:j+"px",left:h+"px","line-height":n+"px",padding:"0px 0px 0px 4px",width:k+"px"});var l=$(o).find("input").val();if(l.length>0){$(p).hide()}})}};Site.memberLogin=function(b){var a=Fai.top.location.href;if(a.indexOf("errno=")>-1){return}var c=Site.getHtmlUrl("login")+"?url="+Fai.encodeUrl(Fai.top.location.pathname+Fai.top.location.search);if(b!==undefined){c+="&errno="+b}Fai.top.location.href=c};Site.memberLogin1=function(b,j){Site.logDog(200061,2);if(typeof j!="object"){j=new Object()}var a=Fai.getUrlParam(Fai.top.location.href,"url");if(!a){a="index.jsp"}var c=$("#module"+b);var i=c.find(".memberAcctInput").val();var h=c.find(".memberPwdInput").val();if(i==null||i==""){Fai.top.location.href="login.jsp@errno=1&url="+Fai.encodeUrl(a);return}if(h==null||h==""){Fai.top.location.href="login.jsp@errno=2&url="+Fai.encodeUrl(a)+"&acct="+Fai.encodeUrl(i);return}h=$.md5(h);var g=c.find(".member");g.hide();var k=c.find(".memberMsg");k.html(LS.memberLogining);k.show();var e=false;var d=c.find("#autoLogin"+b);if(d&&d.attr("checked")){e=true}$.ajax({type:"post",url:"ajax/login_h.jsp",data:"cmd=loginMember&acct="+Fai.encodeUrl(i)+"&pwd="+Fai.encodeUrl(h)+"&autoLogin="+Fai.encodeUrl(e),error:function(){Fai.top.location.href="login.jsp@errno=-1&url="+Fai.encodeUrl(a)+"&acct="+Fai.encodeUrl(i)},success:function(v){var v=jQuery.parseJSON(v);if(v.success){$("#_TOKEN").attr("value")||$("title").after(v._TOKEN);if(!!j.skipUrl){a=j.skipUrl}if(j.isPhotoSlide){var m=a.split(";");for(var p=0;p','
    ','",'"];i=i.join("");var j={boxId:h,boxName:"qqLogin",title:LS.memberOtherLgnModeChoice,htmlContent:i,width:406,height:475};Site.popupBox(j)};Site.chooseBindAcct=function(){$("#bindOrLogin").hide();$("#bindAcctFirst").show()};Site.returnBindOrLogin=function(){$("#bindAcctFirst").hide();$("#bindOrLogin").show()};Site.otherLoginNow=function(o,k,a,h,e,j,n){Fai.top.$("#popupBox"+o).remove();Fai.top.$("#popupBg"+o).remove();var d="cmd=otherAdd",c=$("#oLoginTip"),b={};var m=false;if(k){for(var g=0;g','
    ','
    ','
    ','
    ',k,"
    ","
    ",'',''];$.each(g,function(q,u){if(u.otherLoginMust){var t,s="width:200px;";if(u.fieldKey=="mobile"){s="width:103px;";t=[];t.push("");t.join("")}var r=['','',"",];n.push(r.join(""))}});if(e){n.push('');n.push('");n.push('');n.push("");n.push('');n.push('");n.push('");n.push("")}var i="";if(d==1){i=LS.memberOtherLgnQQMsg}else{if(d==2){i=LS.memberOtherLgnSinaMsg}else{if(d==3||d==4){i=LS.memberOtherLgnWXMsg}}}n.push("
    ',u.name,":",t,'','*
    '+LS.memberSignup_captcha+"
    '+LS.mobileMsmCode+"
    '+LS.getMobileMsmCode+"
    ");n.push('
    ');n.push('
    ');n.push('"+LS.confirm+"");n.push("
    ");n=n.join("");var o={boxId:m,boxName:"qqLogin",title:LS.memberOtherLgnAddTitle,htmlContent:n,width:406};Site.popupBox(o);$("#openId").val(a)};Site.getOtherSignMobileCode=function(){var a=Site.checkOtherGetMobileCodeParam();if(a.checkResult==true){$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=getMobileCode",data:"mobile="+a.info.mobile+"&mobileCt="+a.info.mobileCt+"&validateCode="+a.info.captcha,error:function(){Fai.ing(LS.getMobileCodeErrAf,true)},success:function(b){var c=jQuery.parseJSON(b);if(c.success){Fai.ing(LS.sendMobileCodeSuc,true);Site.otherSignMobileCodeCountDown()}else{Site.changeCaptchaImg($("#memberSignupCaptchaImg")[0]);$("#memberSignupCaptcha").val("");if(c.rt==-401){Fai.ing(LS.memberSignupRegisterCaptchaNotMatch,true)}else{if(c.rt==-2){Fai.ing(LS.argsError,true)}else{if(c.rt==2){Fai.ing(LS.memberDialogSendMobileCodeErr,true)}else{if(c.rt==-4||c.rt==8){Fai.ing(LS.getMobileOneMin,true)}else{if(c.rt==-8){Fai.ing(LS.getMobileHalfHour,true)}else{if(c.rt==3){Fai.ing(LS.memberDialogMobileMoneyErr,true)}else{if(c.rt==9){Fai.ing(LS.memberDialogSendMobileCodeLimit,true)}else{if(c.rt==101){Fai.ing(LS.mobileSetErr,true)}else{if(c.rt==-6){Fai.ing(LS.mobileHasSigned,true)}else{if(c.rt==23){Fai.ing(LS.mobileNationTplErr,true)}else{Fai.ing(LS.getMobileRefresh,true)}}}}}}}}}}}}})}};Site.checkOtherGetMobileCodeParam=function(){var c={checkResult:false,info:{}};var a=$("#mobile").val();var b=$("#memberSignupCaptcha").val();if(!Fai.isNationMobile(a)){Fai.ing(LS.mobileNumRegular,true);return c}if(b==null||b==""){Fai.ing(LS.memberSignupRegisterCaptchaEmpty,true);return c}c.checkResult=true;c.info.mobile=a;if(a&&a!=null&&$.trim(a)!=""){c.info.mobileCt=$("#mobileCt").val()}else{c.info.mobileCt=""}c.info.captcha=b;return c};Site.otherSignMobileCodeCountDown=function(){var c=$(".getMobileCdBtn");var b=c.attr("cTime");var d=60;if(!b||b==null){b=0}else{b=parseInt(b);d=1800}b++;c.attr("cTime",b);c.attr("s_onclick",c.attr("onclick"));c.removeAttr("onclick");var a=setInterval(function(){d--;c.html(LS.reGetMsg+"("+d+")");if(d<=0){c.html(c.attr("title"));c.attr("onclick",c.attr("s_onclick"));clearInterval(a)}},1000)};Site.memberOtherLoginSubmit=function(q,c,o,p){var j="cmd=otherAdd",e=$("#oLoginTip"),g={};g.acct=c;if(o==1){g.qqOpenId=$("#openId").val();g.headImgUrl=Site.qqListener.q_avator}else{if(o==2){g.sinaOpenId=$("#openId").val();g.headImgUrl=Site.wbListener.wb_avator}else{if(o==3){g.wxOpenId=$("#openId").val();g.headImgUrl=Site.wxListener.wx_avator}else{if(o==4){g.mobiWxOpenId=Site.wxListener.w_uid;g.headImgUrl=Site.wxListener.wx_avator}}}}var l="",d="",n="",r=0,i="",m=0;$(".userAddItem").each(function(){userAddItemID=$(this).attr("id");n=$(this).val();l=$(this).attr("name");i=$(this).attr("maxlength");g[userAddItemID]=n;if(n.length>i){e.html(Fai.format(LS.memberSignupUserAddItemMaxLength,l,i));$(this).focus();r=1;return false}if(userAddItemID=="phone"&&n.length>0){if(!Fai.isPhone(n)){e.html(Fai.format(LS.memberSignupUserAddItemCorrect,l));$(this).focus();m=1;return false}}if(userAddItemID=="mobile"&&n.length>0){if(!Fai.isNationMobile(n)){e.html(LS.mobileNumRegular);m=1;return false}else{g.mobileCt=$("#mobileCt").val()}}});if(m==1){return}if(r==1){return}if(typeof($("#messageAuthCode").attr("maxlength"))!="undefined"&&$("#messageAuthCode").attr("maxlength")!=null){var k=$("#memberSignupCaptcha").val();if(typeof(k)=="undefined"||k==null||k==""){e.html(LS.memberInputCaptcha);return false}var a=$("#messageAuthCode").val();if(typeof(a)=="undefined"||a==null||a==""){e.html(LS.inputMobileCode);return false}g.messageAuthCode=a}var h=0;$("#popupBoxContent"+q+" .isCheckUAI").each(function(){userAddItemID=$(this).attr("id");n=$(this).val();l=$(this).attr("name");if(n==null||n==""){e.html(Fai.format(LS.memberSignupUserAddItemIsEmpty,l));$(this).focus();h=1;return false}if(userAddItemID=="email"&&n.length>0){if(!Fai.isEmail(n)){e.html(Fai.format(LS.memberSignupUserAddItemCorrect,l));$(this).focus();h=1;return false}}});if(h==1){return}e.html(LS.memberSignupRegisterIng);var b=Fai.getUrlParam(Fai.top.location.href,"url");if(!b){b="./index.jsp"}$.ajax({type:"post",url:"ajax/member_h.jsp?"+j,data:"info="+Fai.encodeUrl($.toJSON(g))+"&loginType="+o,error:function(){e.html(LS.memberSignupRegisterError)},success:function(G){var x=jQuery.parseJSON(G);if(x.success){$("#_TOKEN").attr("value")||$("title").after(G._TOKEN);var t=$.cookie("forThirtLoginBuy");if(typeof t!="undefined"&&t!=null&&t!=""){var F=$.parseJSON(t);if(typeof F!="undefined"&&F!=null){if(F.where=="addCartItem"){var A={};A.pid=F.pid;A.mid=F.mid;A.url=F.url;A.opList=F.opList;A.count=F.count;A.doWhat="add";$.cookie("isNeedAddCartItem",$.toJSON(A));Fai.top.location.reload()}else{if(F.where=="immeBuy"){var A={};A.pid=F.pid;A.mid=F.mid;A.url=F.url;A.opList=F.opList;A.count=F.count;A.doWhat="buy";$.cookie("isNeedAddCartItem",$.toJSON(A));Fai.top.location.reload()}}}$.cookie("forThirtLoginBuy",null);return}if(x.fromBind){Fai.top.$("#popupBg"+q).remove();Fai.top.$("#popupBox"+q).remove();Site.memberInactiveDialog(x.mail,x.memName)}else{if(x.active){Fai.top.$("#popupBg"+q).remove();Fai.top.$("#popupBox"+q).remove();Site.memberActiveDialog(g.email,Fai.encodeUrl(g.acct),function(){Fai.top.location.href=b;Fai.top.event.returnValue=false})}else{if(!!p.skipUrl){b=p.skipUrl}if(p.isPhotoSlide){var u=b.split(";");for(var y=0;y","
    ","
    ","
    ","
    ",LS.memberDialogFwdAcct,"
    ","
    ","
    ","","
    "];e=e.join("");var b={boxId:d,title:""+LS.memberDialogFwdStepOneTitle+"",htmlContent:e,width:372,height:176,boxName:"memberFdPwd"};Site.popupBox(b);setTimeout(function(){var h=Fai.top.$("#popupBox"+d);var g=h.find(".J_fidnPwFirstTitle").width();h.find(".J_titleBlueLine").css("width",(g+10)+"px")},200)};Site.memberFdPwdStepTwo=function(b){var a=$.trim($("#macct").val());if(a==""){Fai.ing(LS.memberDialogPleaseEnterAcct,true);$("#macct").focus();return}$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=getMAcctMail",data:"mAcct="+Fai.encodeUrl(a),error:function(){Fai.ing(LS.systemError,false)},success:function(r){var r=jQuery.parseJSON(r);if(r.success){if(!r.findPwByMobileOpen){if(r.noMail){var e=LS.memberDialogNoEmailMsg;Site.showModifyPwContMsg(e,b);return}}if(!r.findPwByMailOpen){if(r.mobile==null||r.mobile=="null"||""==r.mobile){var e=LS.memberDialogNoMobile;Site.showModifyPwContMsg(e,b);return}}if(r.noMail&&(r.mobile=="null"||""==r.mobile)){var e=LS.memberDialogNoMailMobile;Site.showModifyPwContMsg(e,b);return}if(r.noMail){r.findPwByMailOpen=false}if(r.mobile=="null"||""==r.mobile){r.findPwByMobileOpen=false}Fai.top.$("#popupBg"+b).remove();Fai.top.$("#popupBox"+b).remove();var l=parseInt(Math.random()*10000);var q="",h="",g="";var c="";if(Fai.isIE6()){h="position:relative;";g="top:5px;";c="height:355px"}else{h="position:absolute; top:30px;";g="top:-20px;";q="position:relative;margin-top:-20px;"}var n=["
    ","
    ","
    "];var i=[];if(r.findPwByMailOpen){if(r.noMail){i=["
    ","
    ",LS.memberShowNoMail+"
    "+LS.memberDialogConMg,"
    ","
    ","","
    "]}else{i=["
    ","
    ","
    ",LS.memberDialogFwdOneStep,"",LS.memberDialogClickHere,"",Fai.format(LS.memberDialogFwdOneStepThirdMsg,r.mail),"
    ","
    ",LS.memberDialogFwdTwoStep,"
    ","
    ",LS.memberDialogFwdThreeStep,"
    ","
    ","
    ",LS.memberDialogFwdMailCode,"
    ","
    ","
    ","
    ",LS.memberDialogFwd,"
    ","
    ",LS.memberDialogFwd2,"
    ","","","
    "]}}var k=[];if(r.findPwByMobileOpen){var p="display:block;"+c;if(r.findPwByMailOpen){p="display:none;"+c}if(r.mobile=="null"||""==r.mobile){k=["
    ","
    ",LS.memberShowNoMobile+"
    "+LS.memberDialogConMg,"
    ","
    ","","
    "]}else{var d="";if(!r.findPwByMailOpen||r.noMail){d="
    "}k=["
    ","
    ","
    ",LS.memberDialogFwdOneStep,"",LS.memberDialogClickHere,"",Fai.format(LS.memberDialogFwdByMobileOneStep,r.mobile),"
    ","
    ",LS.memberDialogFwdByMobileSendStep,"
    ","
    ",LS.memberDialogFwdThreeStep,"
    ","
    ","
    ",LS.mobileCodeTip+" :  ","
    ","
    ",d,"
    ",LS.memberDialogFwd,"
    ","
    ",LS.memberDialogFwd2,"
    ","","","
    "]}}Array.prototype.push.apply(n,i);Array.prototype.push.apply(n,k);n.push("
    ");n=n.join("");var j="";if(r.findPwByMailOpen){j=""+LS.memberDialogMailTitle+""}if(r.findPwByMobileOpen){var m="";if(r.findPwByMailOpen){m="style='margin-left:30px;'"}j=j+""+LS.memberDialogMobileTitle+""}var o={boxId:l,title:j,htmlContent:n,width:510,height:437,boxName:"memberFdPwd"};Site.popupBox(o);setTimeout(function(){Site.changeFdPwdShowTab(1,l,r.findPwByMailOpen)},200)}else{if(r.notFound){Fai.ing(LS.memberDialogNotFound,true)}else{Fai.ing(LS.argsError,true)}}}})};Site.memberFdPwdStepLast=function(b,a){if(typeof(a)!="undefined"&&a==2){Site.memberFdPwdByMobileStepLast(b)}else{Site.memberFdPwdByMailStepLast(b)}};Site.sendMemberMobileCode=function(){if($("#memSendMobilePwdCode").data("_disable")){return}var a=$("#macct2").val();if(a==""){Fai.ing(LS.memberDialogPleaseEnterAcct,true);return}$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=sendMemberPwdMobileCode",data:"memName="+Fai.encodeUrl(a),error:function(){$("#memSendMobilePwdCode").data("_disable",false);Fai.ing(LS.systemError,false)},success:function(b){$("#memSendMobilePwdCode").data("_disable",false);var b=jQuery.parseJSON(b);if(b.success){$("#memMobileCodeSign").val(b.mobileCodeSign);$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.memberDialogSendMobileCode);$("#memSendMobilePwdCode").hide();$("#menMbWaitMsg").show();$("#menMbWaitMsg").text(Fai.format(LS.memberDialogCountDown,60));$("#menMbWaitMsg").data("_time",60);Site.memberMbDisableTimeout("memSendMobilePwdCode")}else{if(b.argErr){$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.memberDialogSendMobileClose)}else{if(b.apiKeyNotFound){$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.memberDialogYunPianErr)}else{if(b.tplNotFound){$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.memberDialogMobileTplErr)}else{if(b.notFound){Fai.ing(LS.memberDialogNotFound,true)}else{if(b.limitOne){Fai.ing(LS.getMobileOneMin,true)}else{if(b.limitTwo){Fai.ing(LS.getMobileHalfHour,true)}else{if(b.noMoney){Fai.ing(LS.memberDialogMobileMoneyErr,true)}else{if(b.mobileErr){Fai.ing(LS.memberDialogSendMobileCodeErr,true)}else{if(b.sendLimit){Fai.ing(LS.memberDialogSendMobileCodeLimit,true)}else{if(b.mobileSysErr){Fai.ing(LS.memberDialogSendMobileSysErr,true)}else{if(b.tplNationErr){Fai.ing(LS.mobileNationTplErr,true)}else{if(b.systemErr){Fai.ing(LS.systemError,true)}else{Fai.ing(LS.argsError,true)}}}}}}}}}}}}}}});$("#memSendMobilePwdCode").data("_disable",true)};Site.memberFdPwdByMobileStepLast=function(g){var b=$("#macct2").val();if(b==""){Fai.ing(LS.memberDialogPleaseEnterAcct,true);return}var h;var d=$("#memMobileCode").val();var c=$("#memMobileCodeSign").val();var a=$("#memPwdMb").val();var i=$("#memPwdMb2").val();if(!c){h=LS.memberDialogSendMobileFirst}else{if(!d){h=LS.inputMobileCode}else{if(d.length!=6){h=LS.mobileNumRegular}else{if(!a){h=LS.memberDialogPleaseEnterPwd}else{if(!i){h=LS.memberDialogPleaseEnterPwd2}else{if(a!=i){h=LS.memberDialogPwdDifToPwd2}else{if(a.length<4||a.length>20){h=Fai.format(LS.memberDialogPwdLimit,4,20)}}}}}}}if(h){$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(h);return}$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.memberDialogResetting);var e="memMobileCode="+Fai.encodeUrl(d)+"&memMobileCodeSign="+Fai.encodeUrl(c)+"&memPwd="+$.md5(a)+"&memName="+Fai.encodeUrl(b);$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=setMemberPwdByMobileCode",data:e,error:function(){Fai.ing(LS.systemError,false)},success:function(j){var j=jQuery.parseJSON(j);if(j.success){Fai.top.$("#popupBg"+g).remove();Fai.top.$("#popupBox"+g).remove();var l=["
    ","
    ",LS.memberDialogReSetPwdSucess,"
    ","
    ",LS.memberDialogFwdAcct,j.macct,"
    ","",LS.login,"","
    "];l=l.join("");var k={htmlContent:l,width:372,height:176};Site.popupBox(k)}else{if(j.rt==1){$("#memMobileCodeSign").val("");$("#memPwdMbItemErrorWrap").show();$("#memPwdMbItemError").html(LS.reGetMobileCode)}else{if(j.notFound){Fai.ing(LS.memberDialogNotFound,true)}else{Fai.ing(LS.argsError,true)}}}}})};Site.sendMemberEmailPwdCode=function(){if($("#memSendMobilePwdCode").data("_disable")){return}var a=$("#macct2").val();if(a==""){Fai.ing(LS.memberDialogPleaseEnterAcct,true);return}$.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=sendMemberPwdEmail",data:"memName="+Fai.encodeUrl(a),error:function(){$("#memSendPwdCode").data("_disable",false);Fai.ing(LS.systemError,false)},success:function(b){$("#memSendPwdCode").data("_disable",false);var b=jQuery.parseJSON(b);if(b.success){$("#memMailCodeSign").val(b.emailCodeSign);$("#memPwdItemErrorWrap").show();$("#memPwdItemError").html(LS.memberDialogSendMailSucess);$("#memSendPwdCode").hide();$("#menWaitMsg").show();$("#menWaitMsg").text(Fai.format(LS.memberDialogCountDown,60));$("#menWaitMsg").data("_time",60);Site.memberDisableTimeout("memSendPwdCode",1)}else{if(b.aliasNotF){$("#memPwdItemErrorWrap").show();$("#memPwdItemError").html(LS.memberDialogAliasNotFound)}else{if(b.notFound){Fai.ing(LS.memberDialogNotFound,true)}else{if(b.smtpErr){Fai.ing(LS.smtpErr,true)}else{Fai.ing(LS.argsError,true)}}}}}});$("#memSendPwdCode").data("_disable",true)};Site.memberFdPwdByMailStepLast=function(g){var d=$("#macct2").val();if(d==""){Fai.ing(LS.memberDialogPleaseEnterAcct,true);return}var h;var b=$("#memEmailCode").val();var c=$("#memMailCodeSign").val();var a=$("#memPwd").val();var i=$("#memPwd2").val();if(!c){h=LS.memberDialogPleaseSendCode}else{if(!b){h=LS.memberDialogPleaseEnterCode}else{if(!a){h=LS.memberDialogPleaseEnterPwd}else{if(!i){h=LS.memberDialogPleaseEnterPwd2}else{if(a!=i){h=LS.memberDialogPwdDifToPwd2}else{if(a.length<4||a.length>20){h=Fai.format(LS.memberDialogPwdLimit,4,20)}}}}}}if(h){$("#memPwdItemErrorWrap").show();$("#memPwdItemError").html(h);return}$("#memPwdItemErrorWrap").show();$("#memPwdItemError").html(LS.memberDialogResetting);var e="memEmailCode="+Fai.encodeUrl(b)+"&memMailCodeSign="+Fai.encodeUrl(c)+"&memPwd="+$.md5(a)+"&memName="+Fai.encodeUrl(d);$.ajax({type:"post",url:"ajax/member_h.jsp?cmd=setMemberPwdByCode",data:e,error:function(){Fai.ing(LS.systemError,false)},success:function(j){var j=jQuery.parseJSON(j);if(j.success){Fai.top.$("#popupBg"+g).remove();Fai.top.$("#popupBox"+g).remove();var l=["
    ","
    ",LS.memberDialogReSetPwdSucess,"
    ","
    ",LS.memberDialogFwdAcct,j.macct,"
    ","",LS.login,"","
    "];l=l.join("");var k={htmlContent:l,width:372,height:176};Site.popupBox(k)}else{if(j.rt==1){$("#memMailCodeSign").val("");$("#memPwdItemErrorWrap").show();$("#memPwdItemError").html(LS.memberDialogCodeMailFailure)}else{if(j.notFound){Fai.ing(LS.memberDialogNotFound,true)}else{Fai.ing(LS.argsError,true)}}}}})};Site.memberInactiveDialog=function(a,c){var d=["
    ","
    ",LS.memberDialogAcctInactive,"
    ","
    ",Fai.format(LS.memberDialogShowLoginMail,a),"
    ","
    ",LS.memberDialogNoRevSureEmail,"
    ","
    ",LS.memberDialogPleaseConfirmYourMail,"",LS.memberDialogClickReSendMsg,"
    ","
    ","
    "];d=d.join("");var b={title:LS.memberDialogTips,htmlContent:d,width:465,height:226};Site.popupBox(b)};Site.memberActiveDialog=function(a,c,e){var d=["
    ","
    ",LS.memberDialogRegSuccess,"
    ","
    ",Fai.format(LS.memberDialogShowLoginMail,a),"
    ","
    ",LS.memberDialogNoRevSureEmail,"
    ","
    ",LS.memberDialogPleaseConfirmYourMail,"",LS.memberDialogClickReSendMsg,"
    ","
    ","
    "];d=d.join("");var b={title:LS.memberDialogActiveAcctTitle,htmlContent:d,width:465,height:226,closeFunc:e};Site.popupBox(b);$.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=sendMemberActiveMail",data:"memName="+Fai.encodeUrl(c)+"&memEmail="+a,error:function(){Fai.ing(LS.systemError,false)},success:function(g){}})};Site.memberSendActiveMail=function(b){if($("#memSendMail").data("_disable")){return}var a=$.trim($("#memEmail").val());if(!Fai.isEmail(a)){Fai.ing(LS.memberDialogPleaseSureMail,true);return}$.ajax({type:"post",url:"ajax/mail_h.jsp?cmd=sendMemberActiveMail",data:"memName="+Fai.encodeUrl(b)+"&memEmail="+a,error:function(){$("#memSendMail").data("_disable",false);Fai.ing(LS.systemError,false)},success:function(c){$("#memSendMail").data("_disable",false);var c=jQuery.parseJSON(c);if(c.success){Fai.top.$("#showOKorErrorMsg").html(LS.memberDialogOKorErrorMsg);Fai.top.$("#memSendMail").hide();Fai.top.$("#menWaitMsg").show();Fai.top.$("#menWaitMsg").text(Fai.format(LS.memberDialogAfterTimeToResend,60));Fai.top.$("#menWaitMsg").data("_time",60);Site.memberDisableTimeout("memSendMail",0)}else{if(c.AliaNotF){$("#showOKorErrorMsg").html(LS.memberDialogAliasNotFound);$("#showOKorErrorMsg").show()}}}});$("#memSendMail").data("_disable",true)};Site.memberDisableTimeout=function(d,b){var c=Fai.top.$("#menWaitMsg");var a=parseInt(c.data("_time"));if(a>0){a--;setTimeout(function(){var e=LS.memberDialogAfterTimeToResend;if(b==1){e=LS.memberDialogCountDown}c.text(Fai.format(e,a));Site.memberDisableTimeout(d,b)},1000);$("#menWaitMsg").data("_time",a)}else{Fai.top.$("#"+d).show();c.text("").hide()}};Site.memberMbDisableTimeout=function(c){var b=Fai.top.$("#menMbWaitMsg");var a=parseInt(b.data("_time"));if(a>0){a--;setTimeout(function(){var d=LS.memberDialogCountDown;b.text(Fai.format(d,a));Site.memberMbDisableTimeout(c)},1000);$("#menMbWaitMsg").data("_time",a)}else{Fai.top.$("#"+c).show();b.text("").hide()}};Site.closeFdPwdBoxById=function(a){Fai.top.$("#popupBg"+a).remove();Fai.top.$("#popupBox"+a).remove()};Site.showModifyPwContMsg=function(d,b){var c=["
    ","
    ",d,"
    ","",LS.confirm,"","
    "];c=c.join("");var a={htmlContent:c,width:378,height:120};Site.popupBox(a);Fai.top.$("#popupBg"+b).remove();Fai.top.$("#popupBox"+b).remove()};Site.changeFdPwdShowTab=function(b,c,e){if(!e){b=2}if(b==1){var d=Fai.top.$("#popupBox"+c);var a=d.find(".J_findPwByMailBox").width();d.find(".J_findPwByMailBox").css("color","#44A5FF");d.find(".J_findPwByMobileBox").css("color","");if(typeof(a)!="undefined"&&a>0){d.find(".J_btBlueLine").css({width:((a+10)+"px"),"margin-left":"26px"})}d.find(".J_fdFwdByMobileContent").css("display","none");d.find(".J_fdFwdByMailContent").css({display:"block"})}else{if(b==2){var d=Fai.top.$("#popupBox"+c);d.find(".J_findPwByMobileBox").css("color","#44A5FF");d.find(".J_findPwByMailBox").css("color","");var a=d.find(".J_findPwByMobileBox").width();var g=d.find(".J_findPwByMailBox").width();if(typeof(a)!="undefined"&&a>0){if(g<=0){g=g+26}else{g=g+56}d.find(".J_btBlueLine").css({width:((a+15)+"px"),"margin-left":(g+"px")})}d.find(".J_fdFwdByMailContent").css("display","none");d.find(".J_fdFwdByMobileContent").css({display:"block"})}}};Site.initModuleBdMap=function(b,e,a,d){var l=Fai.top.$("#mapframe"+e);var k=l.attr("width");var j=l.attr("height");var m="";l.replaceWith(m);var c=Fai.top.$("#mapframe"+e).parent().width();var n=a+c+"&ran="+Math.random();Site.initIframeLoading(b,e,n,d);$("#refreshChlid"+e).css("padding-top","40%");var h=Fai.top.$("#module"+e);var i=h.width()/2-30;var g='
    ';h.append(g)};Site.initModuleSiteSearch=function(a){var c=$("#module"+a),i=$(c.find("input.g_itext")[0]),d=$(c.find(".g_btn")[0]);i.keypress(function(l){if(l.keyCode==13&&d.length>0){d[0].click()}});var b=$("#module"+a);var g=b.find(".searchBox").attr("class");var h=b.find(".recommandKeyBox");if(g=="searchBox"){h.css("vertical-align","7px")}else{h.css("vertical-align","11px")}if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){var e=c.find(".fk-newSearchBoxContainer");if(e){var k=e.height();c.find(".fk-newSearchInput").css({"line-height":k+"px",height:k+"px"})}}var j=Fai.getHashParam(Fai.top.location.hash,"skeyword");if(j&&j!=""){c.find(".fk-newSearchInput").val(j)}};Site.searchInSite=function(d){var e=$("#module"+d),c,b,a;if(e.find(".fk-newSearchBox").length){c=e.find(".fk-newSearchInput")}else{c=e.find("input.g_itext")}b=c.val();a=c.attr("_nSL");if(c.attr("_searching")){return}if($.trim(b)==""){Fai.ing("请输入搜索内容",true);return}if(Fai.isPC()){c.attr("_searching",true)}Fai.top.location.href="sr.jsp?skeyword="+Fai.encodeUrl($.trim(b))+"&nSL="+a};Site.searchInSiteByKey=function(e,h,d){var g=$("#module"+e),c,b,a;if(g.find(".fk-newSearchBox").length){c=g.find(".fk-newSearchInput")}else{c=g.find("input.g_itext")}a=c.attr("_nSL");href="sr.jsp?skeyword="+Fai.encodeUrl($.trim(h))+"&nSL="+a;if(c.attr("_searching")){return}if(Fai.isPC()){c.attr("_searching",true)}if(Fai.top._manageMode){Site.redirectUrl(href,"_self",d,1,0)}else{Fai.top.location.href=href}};Site.searchMenu={};Site.initSearchDropMenu=function(a,j){j=$.parseJSON(j);var e=(!Fai.top._oem&&Fai.top._closePhotoDetailEditSettings)?(Fai.top._siteSeachRangeLength-3):Fai.top._siteSeachRangeLength;if(j.length>=e){return}var h=$("#module"+a),i=h.find(".fk-openSearchMenu"),b=[0,1,2,3,4,5,6,7,8],d=b,g=[{id:4,name:"site",value:LS.searchMenuSite,enable:true,nSL:[]},{id:1,name:"product",value:LS.searchMenuProduct,enable:false,nSL:[3,4,5,6,7,8]},{id:2,name:"article",value:LS.searchMenuArticle,enable:false,nSL:[0,1,2,5,6,7,8]},{id:3,name:"gallery",value:LS.searchMenuPhoto,enable:false,nSL:[0,1,2,3,4,8]}],c;if(j.length>0){$.each(j,function(k,l){var m=$.inArray(l,d);if(m>-1){d.splice(m,1)}})}$.each(d,function(k,l){if(l>=0&&l<=2){g[1].enable=true}else{if(l>=3&&l<=4){g[2].enable=true}else{if(l>=5&&l<=7){g[3].enable=true}}}});$.each(g,function(k,l){if(l.enable){c=uniqueNslArray(l.nSL.concat(j));i.find(".fk-newSearchInput").attr("_nsl",$.toJSON(c));i.find(".fk-searchMenuWord").text(l.value);i.find(".fk-newSearchSelectMenu").attr("_selectItem",l.id);return false}});Site.searchMenu["module"+a]=new NewSearchMenu(a,g,j);Site.searchMenu["module"+a].bindMenuDropEvent()};function uniqueNslArray(b){var d=[],c=0,a=b.length;for(c=0;c
    \n");return a.join("")};NewSearchMenu.prototype.getMenuPanelPosition=function(){var h=$("#module"+this.id),i=h.find(".fk-openSearchMenu"),a=i.attr("_borderwidth"),b=i.attr("_bordertype"),e,j,d,g,c,k;if(b==0){c=1}else{if(b==1){c=0}else{c=a}}if(i.length>0){k=i.attr("_type")}if(k==10){i=i.find(".fk-newSearchSelectMenu")}e=i.offset().left;j=i.offset().top;d=i.outerHeight();if(k==10){g=i.width()-c}else{g=i.find(".fk-newSearchSelectMenu").width()}if(!Fai.top._manageMode){j-=$(window).scrollTop();e-=$(window).scrollLeft()}return{left:e,top:j+d,width:(k==1||k==8||k==3||k==5||k==2||k==9||k==7)?++g:g}};NewSearchMenu.prototype.setMenuPanelPosition=function(i){var h=this.getMenuPanelPosition(),e=h.left,j=h.top,b=h.width,a=this.id,k=$("#module"+a),m=k.find(".fk-openSearchMenu"),l=k.find(".fk-newSearchSelectWrap"),n=k.find(".fk-newSearchSelectMenu"),d=i.find(".fk-newSearchSelectMenuShow"),c=l.css("border-bottom-width").replace("px",""),g=n.css("border-bottom-width").replace("px","");if(i.length){if(k.find(".fk-dynamicSearch").length){if(k.find(".fk-newSearchBox7").length){j=j-4;i.find(".fk-searchMenuKeyWord").css("padding-left","18px")}else{b=b-2;d.css({marginTop:"10px",padding:"10px 0"})}}else{if(k.find(".fk-newSearchBox2").length){j-=parseInt(m.attr("_borderWidth")||1)}else{if(k.find(".fk-newSearchBox9").length){j-=parseInt(m.attr("_borderWidth")||3)}else{if(k.find(".fk-newSearchBox8").length){j-=g}else{if(k.find(".fk-newSearchBox1").length){j-=c}}}}}if(k.parent().hasClass("leftForms")||k.parent().hasClass("rightForms")||k.parent().hasClass("middleLeftForms")||k.parent().hasClass("middleRightForms")){i.find(".fk-searchMenuKeyWord").css("padding-left","12px")}d.width(b+"px");i.css({position:"fixed",left:e,top:j,"z-index":1001})}};NewSearchMenu.prototype.foldSelectMenuPanel=function(){var l=this.id,d=$("#module"+l),p=d.find(".fk-openSearchMenu"),b=p.find(".fk-newSearchSelectMenu"),o=p.find(".fk-newSearchBoxContainer"),c=o.find(".fk-searchMenuSplitLine"),e,s,m,g,r,n=this,i,k,h,a,j,q;s=$("#J_newSearchSelectMenu"+n.id);m=b.attr("_status");g=(m=="fold")?true:false;i=p.attr("_type");k=p.attr("_styleColor");bgColor=p.attr("_bgColor");a=p.attr("_bordercolor");borderWidth=p.attr("_borderwidth");borderType=p.attr("_bordertype");borderStyle=p.attr("_borderstyle");h=b.attr("_selectItem");e=$(this.initSearchMenuDom(i));j=a?a:k,styleName=changeSearchBorderStyle(borderStyle);if(borderWidth){q=borderWidth}else{q=(i==1)?2:1}if(g){if(!s.length){if(i==2||i==7){fixSelectMenuStyle(i,g,l)}else{if(i==10){p.css("border-bottom-right-radius","0")}}$("#g_main").append(e);s=$("#J_newSearchSelectMenu"+n.id);n.setMenuPanelPosition(s);p.addClass("fk-searchShowMenu");n.bindMenuPanelSpanEvent();s.slideDown("200");b.attr("_status","unfold").data("inMenu",false).data("inPanel",false);b.find(".fk-searchMenuImgArrow").removeClass("fk-searchMenuFold").addClass("fk-searchMenuUnfold");c=d.find(".fk-searchShowMenu .fk-searchMenuSplitLine");if((i==3||i==8||i==2||i==5||i==9||i==10||i==7)&&borderType==2){c.css("border-left-style",styleName);c.css("border-left-color",j);c.css("border-left-width",q+"px")}if((i==1||i==5)&&borderType!=1){c.css("border-left-style",styleName);c.css("border-left-color",j);c.css("border-left-width",q+"px");s.find(".fk-newSearchSelectMenuShow").css("border-color",j)}s.find(".J_searchMenuItem"+h).css("color",k).addClass("J_selectThisKeyWord");s.find(".fk-newSearchSelectMenuShow").css("background-color",bgColor)}}};function changeSearchBorderStyle(b){var a="solid";if(b==2){a="dashed"}else{if(b==1){a="dotted"}}return a}NewSearchMenu.prototype.unfoldSelectMenuPanel=function(){var b=this.id,j=$("#module"+b),l=j.find(".fk-openSearchMenu"),k=l.find(".fk-newSearchSelectWrap"),d=l.find(".fk-searchMenuSplitLine"),m=l.find(".fk-newSearchSelectMenu"),h=l.find(".fk-searchBoxBtn"),e,i,c,a,g=this,n;e=$("#J_newSearchSelectMenu"+g.id);i=m.attr("_status");c=(i=="fold")?true:false;a=(m.data("inPanel")||m.data("inMenu"))?true:false;n=l.attr("_type"),borderWidth=parseInt(l.attr("_borderWidth")),borderType=parseInt(l.attr("_borderType"));if(!c&&!a){m.attr("_status","fold");m.find(".fk-searchMenuImgArrow").removeClass("fk-searchMenuUnfold").addClass("fk-searchMenuFold");e.slideUp("200",function(){e.remove();if(n==2||n==7){fixSelectMenuStyle(n,c,b)}else{if(n==10){l.css("border-bottom-right-radius","5px")}}if(n==1||n==3||n==8||n==2||n==5||n==9||n==10||n==7){d.css("border-left-color","");d.css("border-left-width","");d.css("border-left-style","")}l.removeClass("fk-searchShowMenu")})}};function fixSelectMenuStyle(d,b,h){var e=$("#module"+h),c=e.find(".fk-openSearchMenu"),a=c.find(".fk-newSearchSelect"),g=(d==2)?c:a;if(b){g.css({borderTopLeftRadius:"5px",borderBottomLeftRadius:"5px"})}else{g.css({borderTopLeftRadius:"40px",borderBottomLeftRadius:"40px"})}}NewSearchMenu.prototype.bindMenuDropEvent=function(){var d=this.id,l=$("#module"+d),n=l.find(".fk-openSearchMenu"),m=n.find(".fk-newSearchSelectWrap"),o=n.find(".fk-newSearchSelectMenu"),i=n.find(".fk-searchBoxBtn"),g,k,e,c,h=this,j=n.attr("_type"),a=parseInt(n.attr("_borderWidth")),b=parseInt(n.attr("_borderType"));o.unbind("mouseenter.foldpMenu").bind("mouseenter.foldpMenu",function(){if(Fai.isIE8()){return}g=$("#J_newSearchSelectMenu"+h.id);k=o.attr("_status");e=(k=="fold")?true:false;if(e){h.foldSelectMenuPanel()}o.data("inMenu",true)});o.unbind("mouseleave.unfoldMenu").bind("mouseleave.unfoldMenu",function(){if(Fai.isIE8()){return}setTimeout(h.unfoldSelectMenuPanel.bind(h),200);o.data("inMenu",false)});if(Fai.isIE8()){o.unbind("click.unfoldMenu").bind("click.unfoldMenu",function(){Fai.ing("下拉选择不能支持当下浏览器,请更新浏览器后再使用。",false)})}if(Fai.top._manageMode){Fai.top.$("#g_main").unbind("scroll.srcollSc").bind("scroll.srcollSc",function(p){$(".J_newSearchSelectMenu").hide()})}else{Fai.top.$(window).unbind("scroll.srcollSc").bind("scroll.srcollSc",function(p){$(".J_newSearchSelectMenu").hide()})}};NewSearchMenu.prototype.bindMenuPanelSpanEvent=function(){var o=this,m=o.id,g=$("#module"+m),p=g.find(".fk-openSearchMenu"),b=p.find(".fk-newSearchSelectMenu"),n=$("#J_newSearchSelectMenu"+m),e=n.find(".fk-searchMenuKeyWord"),i=p.attr("_type"),k=p.attr("_styleColor"),c=(i==4||i==6)?true:false,s=this.openMenuList,l=this.noSearchList,a,j,h,r=o.unfoldSelectMenuPanel,q,d;e.hover(function(){if(c){$(this).css("background-color","#f5f5f5").siblings().css("background-color","")}$(this).css("color",k)},function(){if(c){$(this).css("background-color","#fff")}if(!$(this).hasClass("J_selectThisKeyWord")){$(this).css("color","")}}).click(function(t){h=$(this);j=h.attr("_val");b.attr("_selectItem",j);e.removeClass("J_selectThisKeyWord").css("color","#7f7f7f");h.addClass("J_selectThisKeyWord").css("color",k);b.find(".fk-searchMenuWord").text(h.text());q=$.parseJSON(h.attr("_nsl"));d=$.unique(q.concat(l));p.find(".fk-newSearchInput").attr("_nsl",$.toJSON(d));$(".J_newSearchSelectMenu").hide()});n.mouseenter(function(t){b.data("inPanel",true);o.foldSelectMenuPanel()}).mouseleave(function(t){b.data("inPanel",false);setTimeout(o.unfoldSelectMenuPanel.bind(o),200)})};Site.dynamicSearchBox={};Site.initDynamicSearchBox=function(b,a){Site.fixDynamicSearchMenu(b);Site.dynamicSearchBox["module"+b]=new NewDynamicSearchBox(b,a);Site.dynamicSearchBox["module"+b].bindSearchBoxEvent()};Site.fixDynamicSearchMenu=function(i){var g=$("#module"+i),e=g.find(".fk-dynamicSearch"),a=e.find(".fk-newSearchSelect"),d=e.find(".fk-newSearchSelectMenu"),b=e.find(".fk-newSearchBoxContainer"),c,h;e.width(Site.fixCusWidthSearchBox(i,true));h=a.width();a.data("width",h).css({position:"relative",left:h+"px"})};function NewDynamicSearchBox(b,a){this.id=b;this.color=a}NewDynamicSearchBox.prototype.bindSearchBoxEvent=function(){var n=this,m=n.id,o=n.color,e=$("#module"+m),j=e.find(".fk-newSearchBox"),r=j.find(".fk-newSearchSelect"),p=j.find(".fk-searchBoxBtn"),t=j.find(".fk-newSearchSelectMenu"),l=t.find(".fk-searchMenuWord"),i=j.find(".fk-newSearchBoxContainer"),k=i.find("input"),g=e.attr("_modulestyle"),h=j.attr("_type"),u,s,d,b,a,v;d=(h==4);b=(h==6);a=(h==7);p.hover(function(){if(!p.data("unfold")){$(this).find("span").css("color",o)}},function(){if(!p.data("unfold")){$(this).find("span").css("color","#C2C2C2")}}).click(function(w){u=p.data("unfold");v=r.data("width");if(!u){q()}else{s=k.val().trim();if(s==""){c()}else{g==62?Site.searchInSite(m):Site.searchProduct(m)}}});if(Fai.top!=window){return}$(Fai.top.document.body).bind("click.hideSearchBox",function(w){if($(w.target).parents("#module"+m).length||$(w.target).parents("#J_newSearchSelectMenu"+m).length){return}u=p.data("unfold");if(u){c()}});function q(){var w,x=RgbatoRgb(j.attr("_borderColor"))||"#ddd";if(a){w={left:0,opacity:1};r.css("border-color",x);p.css("border-color",x)}else{w={left:0,opacity:1}}if(d||b){t.find(".fk-searchSelectMenuRightBorder").height(l.height());d&&p.css("border-bottom-color","");b&&p.css("border-right-color","")&&r.css("border-left-color","")}p.css("background-color","");t.css("visibility","visible");i.css("visibility","visible");r.animate(w,300,function(){$(this).css("left","0");$(this).css("opacity","1");k.focus()});if(a){p.css("border-color",x);r.css("border-color",x)}k.css("background-color","");t.css("background-color","");p.data("unfold",true).find("span").css("color",o);e.find(".J_dynamicShowTip").css("visibility","visible")}function c(){var w,x=RgbatoRgb(j.attr("_borderColor"))||"#ddd";v=r.width();k.focusout();r.animate({left:v+"px"},300,function(){$(this).css("left",v+"px");t.css("visibility","hidden");i.css("visibility","hidden");d&&p.css("border-bottom-color","#ddd");b&&p.css("border-right-color","#ddd")&&r.css("border-left-color","#ddd")});if(a){r.css("border-color","transparent");p.css("border-color","transparent")}t.css("background-color","transparent");k.css("background-color","transparent");p.css("background-color","transparent");p.data("unfold",false).find("span").css("color","#C2C2C2");e.find(".J_dynamicShowTip").css("visibility","hidden")}};Site.fixCusWidthSearchBox=function(b,l){var m=$("#module"+b),c=m.find(".formMiddleContent"),n=m.find(".J_newSearchBox"),d=n.find(".fk-newSearchSelectWrap"),r=n.find(".fk-newSearchSelect"),o=n.find(".fk-newSearchSelectMenu"),a=n.find(".fk-newSearchBoxContainer"),h=n.find(".fk-searchBoxBtn"),g=n.attr("_type"),e=n.attr("_borderwidth"),k=c.innerWidth(),p=m.outerWidth()-k,j=d.outerWidth(true),q=h.outerWidth(true),i;if(o.length){j=o.outerWidth(true)+a.outerWidth(true)+r.outerWidth(true)-r.width()}i=j+q;e=parseInt(e);if(g==1||g==3||g==8){e||(e=(g==1)?2:1);i+=e}else{if(g==2||g==5||g==9||g==10){e||(e=1);i+=e*2}else{if(g==4||g==7){e||(e=(g==7)?2:1)}else{if(g==6){e||(e=1)}}}}if(l){return i}if(kr){c.html(Fai.format(LS.msgBoardInputMaxLength,Fai.encodeHtml(s),r));$msgBoard.find("#"+q).focus();e=1;return false}if(q=="reqPhone"&&p.length&&!Fai.isPhone(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(s)));$msgBoard.find("#"+q).focus();e=1;return false}if(q=="reqEmail"&&p.length&&!Fai.isEmail(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(s)));$msgBoard.find("#"+q).focus();e=1;return false}});if(e==1){return false}if(h==null||h==""){Site.msgBoardShowMsg(LS.msgBoardInputContent);$msgBoard.find("#reqContent").focus();return}var d=10000;if(h.length>d){Site.msgBoardShowMsg(Fai.format(LS.msgBoardInputContent2,d));$msgBoard.find("#reqContent").focus();return}if(!k.hasClass("msgBoardCaptchaHide")){if(n==null||n==""){Site.msgBoardShowMsg(LS.msgBoardInputValidateCode);$msgBoard.find("#msgBoardCaptcha").focus();return}}Site.msgBoardShowMsg(LS.msgBoardDoing);var l={};$msgBoard.find("input.msg_ipt").each(function(){var q=$(this).attr("id");var p=$(this).val();l[q]=$.trim(p)});l.reqContent=h;l.memberId=(m===undefined)?0:m;$.ajax({type:"post",url:"ajax/msgBoard_h.jsp",data:"cmd=add&msgBdData="+Fai.encodeUrl($.toJSON(l))+"&validateCode="+Fai.encodeUrl(n)+"&moduleId="+Fai.encodeUrl(b),error:function(){var q=Site.getDialogContent(true,Fai.format(LS.systemError));var p={htmlContent:q,width:205,height:78};Site.popupBox(p);setTimeout(function(){Fai.top.location.reload()},3000)},success:function(p){p=jQuery.parseJSON(p);if(p.success){var r=Site.getDialogContent(true,Fai.format(LS.msgBoardSendOkAutoOpen));var q={htmlContent:r,width:205,height:78};Site.popupBox(q);setTimeout(function(){Fai.top.location.reload()},3000);$msgBoard.find('#msgAdd input[type="text"]').val("");$msgBoard.find("#reqContent").val("")}else{if(p.errno==1){Site.msgBoardShowMsg(LS.captchaError)}else{if(p.errno==2){Site.msgBoardShowMsg(LS.argsError)}else{if(p.errno==-4){Site.msgBoardShowMsg(LS.msgBoardAddCountLimit)}else{Site.msgBoardShowMsg(LS.systemError)}}}if(p.needCode){Site.msgBoardShowMsg(p.msg,b);k.removeClass("msgBoardCaptchaHide")}}Site.changeMsgBoardValidateCode()}})};Site.changeMsgBoardValidateCode=function(){$("#msgBoardCaptchaImg").attr("src","validateCode.jsp?"+Math.random()*1000)};Site.setStarSelect=function(a){_getBackgroundColor=function(c){var d="";while(c[0].tagName.toLowerCase()!="html"){d=c.css("background-color");if(d!="rgba(0, 0, 0, 0)"&&d!="transparent"){break}c=c.parent()}return d};var b="";if($(".submitStarList").length>0){b=_getBackgroundColor($(".submitStarList"))}if(!b){b="#FFF"}$("body").on({click:function(){a=$(this).index();if(a<5){var c=$(this).parent();c.attr("star",a+1);_changeSelectStar(a,c)}},hover:function(){var d=$(this).index();if(d<5){var c=$(this).parent();_changeSelectStar(d,c)}},mouseleave:function(d){if(a<5){var c=$(this).parent();_changeSelectStar(a,c)}}},".submitStarList li");if($(".statisticCommSwap").length!=0){$(".statisticBox .percent span").css({"border-color":"transparent "+b+" transparent transparent"})}_changeSelectStar=function(e,h){var j=$(".submitStarList").hasClass("fk-pdStyle5")||false;for(var g=0;g<5;g++){var c=h.find("li").eq(g);if(g"+(e+1)+LS.score+k);h.find("li:last").addClass("scoreTipHover")}if(!j){h.find("li:last em").css({"border-color":"transparent "+d+" transparent transparent"})}h.find("li:last span").css({"border-color":"transparent "+b+" transparent transparent"})}};Site.msgSubmitShowMsg=function(b,a){$("#msgSubmit"+a).find("#msgSAdd .msgSTips").show();$("#msgSubmit"+a).find("#msgSAdd .msgSTips").html(b)};Site.msgSubmitAddMsg=function(o,b,m){$msgSubmit=$("#msgSubmit"+b);var a=$.trim($msgSubmit.find("#reqName").val());var i=$msgSubmit.find("#reqPhone").val();var j=$msgSubmit.find("#reqEmail").val();var h=$msgSubmit.find("#reqContent").val();var n=$msgSubmit.find("#msgSubmitCaptcha").val();var c=$msgSubmit.find(".msgSTips").show();var k=$msgSubmit.find(".J_msgBoardCaptcha");var g=0;$msgSubmit.find("input.msgSubmit_isMust").each(function(){var q=$(this).attr("id");var r=$(this).attr("name");var p=$(this).val();if(p==""||p==null){c.html(Fai.format(LS.msgBoardInputIsEmpty,Fai.encodeHtml(r)));$msgSubmit.find("#"+q).focus();g=1;return false}if(q=="reqPhone"&&!Fai.isPhone(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(r)));$msgSubmit.find("#"+q).focus();g=1;return false}if(q=="reqEmail"&&!Fai.isEmail(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(r)));$msgSubmit.find("#"+q).focus();g=1;return false}});if(g==1){return false}var e=0;$msgSubmit.find("input.msgSubmit_ipt").each(function(){var q=$(this).attr("id");var s=$(this).attr("name");var p=$(this).val();var r=$(this).attr("maxlength");if(p.length>r){c.html(Fai.format(LS.msgBoardInputMaxLength,Fai.encodeHtml(s),r));$msgSubmit.find("#"+q).focus();e=1;return false}if(q=="reqPhone"&&p.length&&!Fai.isPhone(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(s)));$msgSubmit.find("#"+q).focus();e=1;return false}if(q=="reqEmail"&&p.length&&!Fai.isEmail(p)){c.html(Fai.format(LS.msgBoardInputCorrect,Fai.encodeHtml(s)));$msgSubmit.find("#"+q).focus();e=1;return false}});if(e==1){return false}if(h==null||h==""){Site.msgSubmitShowMsg(LS.msgBoardInputContent,b);$msgSubmit.find("#reqContent").focus();return}var d=10000;if(h.length>d){Site.msgSubmitShowMsg(Fai.format(LS.msgBoardInputContent2,d),b);$msgSubmit.find("#reqContent").focus();return}if(!k.hasClass("msgBoardCaptchaHide")){if(n==null||n==""){Site.msgSubmitShowMsg(LS.msgBoardInputValidateCode,b);$msgSubmit.find("#msgSubmitCaptcha").focus();return}}Site.msgSubmitShowMsg(LS.msgBoardDoing,b);var l={};$msgSubmit.find("input.msgSubmit_ipt").each(function(){var q=$(this).attr("id");var p=$(this).val();l[q]=$.trim(p)});l.reqContent=h;l.memberId=(m===undefined)?0:m;$.ajax({type:"post",url:"ajax/msgboard_h.jsp",data:"cmd=add&msgBdData="+Fai.encodeUrl($.toJSON(l))+"&validateCode="+Fai.encodeUrl(n)+"&vCodeId="+Fai.encodeUrl(b)+"&moduleId="+Fai.encodeUrl(b),error:function(){var q=Site.getDialogContent(true,Fai.format(LS.systemError));var p={htmlContent:q,width:205,height:78};Site.popupBox(p);setTimeout(function(){Fai.top.location.reload()},3000)},success:function(p){p=jQuery.parseJSON(p);if(p.success){var r=Site.getDialogContent(true,Fai.format(LS.msgBoardSendOkAutoOpen));var q={htmlContent:r,width:205,height:78};Site.popupBox(q);setTimeout(function(){Fai.top.location.reload()},3000);$msgSubmit.find('#msgSAdd input[type="text"]').val("");$msgSubmit.find("#reqContent").val("")}else{if(p.errno==1){Site.msgSubmitShowMsg(LS.captchaError,b)}else{if(p.errno==2){Site.msgSubmitShowMsg(LS.argsError,b)}else{if(p.errno==-4){Site.msgSubmitShowMsg(LS.msgBoardAddCountLimit,b)}else{Site.msgSubmitShowMsg(LS.systemError,b)}}}if(p.needCode){Site.msgSubmitShowMsg(p.msg,b);k.removeClass("msgBoardCaptchaHide")}}Site.changeMsgSubmitValidateCode(b)}})};Site.changeMsgSubmitValidateCode=function(a){$("#msgSubmit"+a).find("#msgSubmitCaptchaImg").attr("src","validateCode.jsp?"+Math.random()*1000+"&vCodeId="+a)};Site.fixMsgSubmitStyle=function(c){var i=parseInt(Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgPanel_N").find(".msgSubmit_overToPoint ").width());var e=parseInt(Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgPanel_N").find(".star ").width());if(isNaN(e)){e=0}var j=parseInt(Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").width());var k=parseInt(Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").find(".msgPanel_N").css("margin-right"));var d=parseInt(Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").find(".msgPanel_N").width());var h=i+194+e+k;var b;var g=194;if(Fai.top.$("#module"+c+"").width()<=400){if(Fai.top.$("#module"+c+"").width()<300){Fai.top.$("#module"+c+"").find(".msgSubmit_overToPoint").css("width","60px");Fai.top.$("#module"+c+"").find(".msgSubmit_PropBoard").css("width","56px");Fai.top.$("#module"+c+"").find(".paramResizeHandleRight").css("left","56px");Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgAddButton_N").find(".msgSubmit_overToPoint").css({width:"5px",display:"none"});k=parseInt(Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").find(".msgPanel_N").css("margin-right"))}Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").css({"margin-left":"6px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgAddText_N").css({"line-height":"70px",height:"70px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgCaptcha_N").find(".validateCode_N").css({"float":"none","margin-left":"50px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgCaptcha_N").find("#msgSubmitCaptchaImg").css({"margin-bottom":"15px","margin-top":"10px"});if(Fai.top.$("#module"+c+"").width()<300){d=j-5}else{d=j-k}g=b=d-i-e-13;Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").find(".msgPanel_N").css({width:d+"px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:b+"px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:g+"px"})}var a=Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgPanel_N").length;if(Fai.top.$("#module"+c+"").width()>400){Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgAddButton_N").find(".msgSubmit_overToPoint").css({display:"inline-block"});if(h<=j&&j<2*h){d=j-k;g=b=d-i-e-13}else{if(2*h<=j&&j<3*h){if(a==1){d=j-k;g=b=d-i-e-13}else{d=(j/2)-k;b=d-i-e-13;g=b*2+k+i+e+13}}else{if(j>=3*h){if(a==1){d=j-k;g=b=d-i-e-13}else{if(a==2){d=(j/2)-k;b=d-i-e-13;g=b*2+k+i+e+13}else{d=(j/3)-k;b=d-i-e-13;g=d*3+k*2-i-e*3}}}}}Fai.top.$("#module"+c+"").find("#msgSubmit"+c+"").find(".msgSAdd_N").find(".msgPanel_N").css({width:d+"px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:b+"px"});Fai.top.$("#module"+c+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:g+"px"});if(Fai.top.$("#module"+c+"").width()>300&&Fai.top.$("#module"+c+"").width()<650){Fai.top.$("#module"+c+"").find(".msgSAdd").find(".m_ibutton").css({"float":"left"})}}};Site.fixMsgBoardStyle=function(h){var i=parseInt(Fai.top.$("#module"+h+"").find("#msgBoard"+h+"").find(".msgSAdd_N").width());var b=parseInt(Fai.top.$("#module"+h+"").find("#msgBoard"+h+"").find(".msgSAdd_N").find(".msgPanel_N").css("margin-right"));var a=parseInt(Fai.top.$("#module"+h+"").find("#msgBoard"+h+"").find(".msgSAdd_N").find(".msgPanel_N").width());var e=a+b;var c=280+b;if(Fai.top.$("#module"+h+"").width()<=400){Fai.top.$("#module"+h+"").find("#msgBoard"+h+"").css({"margin-left":"6px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".g_itext").css({width:"106px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:"104px",height:"64px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").css({"line-height":"70px",height:"70px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgBoardPanel").find(".msgTitle_N").find(".msgUser").css({"margin-left":"35px","text-align":"center"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgBoardPanel").find(".msgContent").find(".userMsg").css({"margin-left":"16px","margin-top":"16px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgBoardPanel").find(".user_level_name").css({position:"relative"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddButton_N").find(".msgSubmit_overToPoint").css({width:"5px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgCaptcha_N").find(".validateCode_N").css({"float":"none","margin-left":"50px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgCaptcha_N").find("#msgBoardCaptchaImg").css({"margin-bottom":"15px","margin-top":"10px"});Fai.top.$("#module"+h+"").find("#pagenation"+h+"").find("div").each(function(j,k){if($(this).hasClass("pagePrev_N")||$(this).hasClass("pageNext_N")||$(this).hasClass("J_pageArrow_N")){$(this).show()}else{$(this).hide()}})}else{Fai.top.$("#module"+h+"").find("#pagenation"+h+"").find("div").each(function(j,k){$(this).show()})}var d;var g=Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").length;if(Fai.top.$("#module"+h+"").width()>400){if(e<=i&&i<2*e){Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:"244px"})}else{if(2*e<=i&&i<3*c){if(g>2){d=a+b+246;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}else{if(g==2){d=a+b+246;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}else{if(g==1){d=246;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}}}}else{if(i>3*c){if(i>=3*(b+a)){if(g>2){d=2*(a+b)+194;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"194px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}else{if(g==2){d=a+b+194;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"194px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}else{if(g==1){d=246;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}}}}else{if(g>=2){d=a+b+194;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"194px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}else{if(g==1){d=246;Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgPanel_N").find(".g_itext").css({width:"246px"});Fai.top.$("#module"+h+"").find(".msgSAdd").find(".msgAddText_N").find(".g_textarea").css({width:d+"px"})}}}}}}}};Site.jumpToPage=function(d,b,a){var c=parseInt($(Fai.top.$("#module"+d+"").find(".pagenation_N").find(".jumpPageDiv").find("#jumpPage")).val());if(isNaN(c)){c=1}if(c>b){c=parseInt(b)}if(c==0){c=1}window.location.href=""+a+"?m"+d+"pageno="+c+"#module"+d+""};Site.msgSubmitCusResize=function(b){var a="#msgSubmit"+b;Site.msgComCusResize(b,a)};Site.msgBoardCusResize=function(b){var a="#msgBoard"+b;Site.msgComCusResize(b,a)};Site.msgComCusResize=function(h,d){var c=$(d).find(".msgSAdd");var g=c.find(".msgSubmit_PropBoard");var b=g.width();g.attr("class","msgSubmit_PropBoard paramResize");c.find(".msgFlag_N").find(".msgSubmit_overToPoint").attr("class","msgSubmit_overToPoint");var a=c.find(".paramResize");a.hover(function(){a.css("cursor","auto")});i();var e=c.find(".paramResize,.u-paramResize-w,.u-paramResize-e");e.hover(function(){a.css({"border-left":"1px dashed #2b73ba","border-right":"1px dashed #2b73ba","border-top":"1px solid #2b73ba","border-bottom":"1px solid #2b73ba"})},function(){a.css("border","1px dashed transparent")});function i(){if(a.length<1){return}a.each(function(){var p=$(this),j=Fai.isIE8()?$(document):$(window),r,o,l=$(this).parent(),n,m={};if(p.hasClass("paramResize")){p.before("
    ");p.after("
    ");$(".u-paramResize-e,.u-paramResize-w").css("cursor","e-resize")}r=$(p).prev();o=$(p).next();if(!o.hasClass("u-paramResize-e")||!r.hasClass("u-paramResize-w")){return}r.off("mousedown.fi").on("mousedown.fi",s);o.off("mousedown.fi").on("mousedown.fi",s);function s(t){t=t||window.event;m.x=t.pageX;if($(this).hasClass("u-paramResize-w")){m.dir="w";m.ptb=parseInt(l.css("width"))}else{if($(this).hasClass("u-paramResize-e")){m.dir="e";m.ptb=parseInt(l.css("width"))}}n=$("#dockTip").show().css({left:"-1000px;",top:"-1000px"});j.off("mousemove.fi").on("mousemove.fi",k);j.off("mouseup.fi").on("mouseup.fi",q);t.preventDefault()}function k(w){$("body").css("cursor","e-resize");a.css({"border-left":"1px dashed #2b73ba","border-right":"1px dashed #2b73ba","border-top":"1px solid #2b73ba","border-bottom":"1px solid #2b73ba"});w=w||window.event;var x={x:w.pageX},u,A,t=1,v=200,z="",y;if(m.dir=="w"){u=m.x-x.x;A=m.ptb+u;A=A>t?A:t;A=A>v?v:A;A=Math.round(A);z="宽度:"}else{if(m.dir=="e"){u=x.x-m.x;A=m.ptb+u;A=A>t?A:t;A=A>v?v:A;A=Math.round(A);z="宽度:"}}if(d.indexOf("msgSubmit")>-1){y=280-60+A;g.parent().css({width:A+"px"});g.css({width:(A-4)+"px"});c.find(".paramResizeHandleRight").css("left",(A-4)+"px");c.find(".msgPanel_N").css({width:y+"px"});Site.fixMsgSubmitStyle(h)}else{if(d.indexOf("msgBoard")>-1){y=330-60+A;g.parent().css({width:A+"px"});g.css({width:(A-4)+"px"});c.find(".paramResizeHandleRight").css("left",(A-4)+"px");c.find(".msgPanel_N").css({width:y+"px"});Site.fixMsgBoardStyle(h)}}n.html(z+A).css({left:w.pageX-28,top:w.pageY-40});w.preventDefault()}function q(u){$("body").css("cursor","");a.css("border","1px dashed transparent");u=u||window.event;m.dir="";j.off("mousemove.fi");j.off("mouseup.fi");n.hide();var t=Site.getModuleAttr(h);t.data.changed=true;Site.styleChanged();m={};u.preventDefault()}})}};Site.desMallBuyCount=function(c){var a=$("#cartbuyCount"+c).val();var b=1;if(Fai.isInteger(a)){b=parseInt(a)}b--;if($("#limitAmountDiv").text()==""){if(b<2){b=1;$("#buyCountDes"+c).addClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}else{if(b>9999998){b=9999999;$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).addClass("disableMallJia")}else{$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}}}$("#cartbuyCount"+c).val(b)};Site.incMallBuyCount=function(c){var a=$("#cartbuyCount"+c).val();var b=0;if(Fai.isInteger(a)){b=parseInt(a)}b++;if($("#limitAmountDiv").text()==""){if(b<2){b=1;$("#buyCountDes"+c).addClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}else{if(b>9999998){b=9999999;$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).addClass("disableMallJia")}else{$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}}}$("#cartbuyCount"+c).val(b)};Site.mallBuyCountChange=function(c){if($("#limitAmountDiv").text()==""){var a=$("#cartbuyCount"+c).val();var b=1;if(Fai.isInteger(a)){b=parseInt(a)}if(b<2){b=1;$("#buyCountDes"+c).addClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}else{if(b>9999998){b=9999999;$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).addClass("disableMallJia")}else{$("#buyCountDes"+c).removeClass("disableMallJian");$("#buyCountInc"+c).removeClass("disableMallJia")}}$("#cartbuyCount"+c).val(b)}};Site.mallBuy=function(e,b,h){var d="mbuy.jsp?id="+e;if(b&&b!="undefined"){var c=$("#module"+b);var i=c.find(".optionMsg");if(Fai.isNull(c)){return}var j=true;var g=[];d+="&fromDetail=true";c.find(".optionItemWrap").each(function(){var l=$(this).parent().parent().find(".propName").text();if(l.charAt(l.length-1)==":"||l.charAt(l.length-1)==":"){l=l.substring(0,l.length-1)}if($(this).find(".optionItemHover").length==1){var m=$(this).attr("data");var k=$(this).find(".optionItemHover").attr("data");var n={};n.name=m;n.value=parseInt(k);g.push(n);i.hide()}else{i.show();if(b==="PdSlide"){var p=$(this).parent().parent().position();var o=$(".fk-slideForProduct .f-propListContent");o.scrollTop(p.top)}i.html(Fai.format(LS.mallCartChoiceItemError,Fai.encodeHtml(l)));j=false;return false}});if(!j){return false}if(g.length>0){d+="&optionList="+Fai.encodeUrl($.toJSON(g))}}if(h&&h.length>0){d+="&"+h}var a=window.open(d+"&ram="+Math.random(),"mallcart");a.focus();if(Fai.isIE()){window.event.cancelBubble=true;window.event.returnValue=false}else{event.stopPropagation();event.preventDefault()}};Site.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};Site.getDialogHtml=function(s,h){if(!Fai.isInteger(s.rt)){s.rt=1}var i=parseInt(s.rt),d=0,n=0,l="",e="about:blant;",q=LS.goToMallCartStr,a=LS.continueShopping,b=LS.resultFailMsg,o="resultFailIcon";if(!h){h="javascript:;"}var j=Site.getHtmlUrl("mcart");var r="target='_blank'";var g;switch(i){case Site.MallAjaxErrno.ok:o="suc-ico";b=LS.resultSuccessMsg;if(typeof(s.totalPrice)!="undefined"){d=s.totalPrice}if(typeof(s.totalAmount)!="undefined"){n=s.totalAmount}if(typeof(s.choiceCurrencyVal)!="undefiend"){l=s.choiceCurrencyVal}var k=l+d;g=Fai.format(LS.cartDetailInfo,n,k);break;case Site.MallAjaxErrno.error:site.gettopwindow%28%29.location.href="mcart.jsp?msg=2";return false;break;case Site.MallAjaxErrno.manager:o="resultFailIcon";b="购买失败。";var q="去购物车结算";var a="返回";g="当前为管理状态,购买失败。";s.success=true;break;case Site.MallAjaxErrno.login:return false;break;case Site.MallAjaxErrno.idNotExist:site.gettopwindow%28%29.location.href="mcart.jsp?msg=1";return false;break;case Site.MallAjaxErrno.orderSettle:site.gettopwindow%28%29.location.href="mcart.jsp";return false;break;case Site.MallAjaxErrno.noMall:site.gettopwindow%28%29.location.href="mcart.jsp";return false;break;case Site.MallAjaxErrno.toProductDetail:site.gettopwindow%28%29.location.href="pd.jsp?id="+productId+"&ram="+Math.random();return false;break;case Site.MallAjaxErrno.orderNotExist:site.gettopwindow%28%29.location.href="mcart.jsp?msg=1";return false;break;case Site.MallAjaxErrno.networkError:g=LS.networkError;break;case Site.MallAjaxErrno.outOfMallAmount:g=LS.mallAmountOverFlow;break;case Site.MallAjaxErrno.mallAmountZero:g=LS.mallAmountZero;break;case Site.MallAjaxErrno.mallOptionStop:g=LS.mallOptionStop;break;case Site.MallAjaxErrno.OutOfAllowAmount:g=LS.allowAmountOverFlow;break;case Site.MallAjaxErrno.notAdded:g=LS.mallProductNotAdded;break;case Site.MallAjaxErrno.authMemberNotAllow:g=s.data+LS.authLevelBuy;break;default:Site.getTopWindow().location.href.reload();return false}var m=[];if(s.success){m=["
    ",""+q+"","",a,"","
    "]}var c="";if(Site.getTopWindow()._lcid===1033){c="letter-spacing:0px;"}var p=["","","","","","","
    ","
    "+b+"
    ","
    "+g+"
    ",m.join(""),"
    "];if(i==Site.MallAjaxErrno.mallAmountZero||i==Site.MallAjaxErrno.OutOfAllowAmount||i==Site.MallAjaxErrno.outOfMallAmount){p[0]=""}return p.join("")};var loginDialogCache=[];loginDialogCache.html="";loginDialogCache.qqOpen=false;loginDialogCache.sinaOpen=false;loginDialogCache.wxOpen=false;loginDialogCache.newWXOpen=false;loginDialogCache.closeOldSiteWX=false;loginDialogCache.qqAppId="";loginDialogCache.sinaAppKey="";loginDialogCache.wxAppKey="";loginDialogCache.qqReUri="";loginDialogCache.sinaReUri="";loginDialogCache.wxReUri="";loginDialogCache.displayList;loginDialogCache.noRemark;loginDialogCache.REMARK_MAXLEN;loginDialogCache.extendParam;var loginDialogLock=false;Site.createLoginDialog=function(E,e,s,G,i,C){var o,x,y,D,H,B,p,b,h;var n,J,u;var q="";var m="";var d="";var I="";var l="";var v="";var k="";var z;var g;var A;var w;var t="";if(loginDialogLock){return}loginDialogLock=true;if(loginDialogCache!=null&&loginDialogCache.html!=null&&loginDialogCache.html!=""){var L=parseInt(Math.random()*10000);var r={boxId:L,boxName:"loginDialog",title:"",htmlContent:loginDialogCache.html,width:380};t=Site.popupBox(r);if(loginDialogCache.qqOpen||loginDialogCache.sinaOpen||loginDialogCache.wxOpen){var a={};a.pid=E;a.mid=e;a.url=s;a.opList=i;a.count=C;a.where=G;$.cookie("forThirtLoginBuy",$.toJSON(a))}if(loginDialogCache.qqOpen){Site.initQQLogin(loginDialogCache.qqAppId,loginDialogCache.qqReUri,loginDialogCache.displayList,loginDialogCache.noRemark,loginDialogCache.REMARK_MAXLEN,"ld_qqLogin",loginDialogCache.extendParam)}if(loginDialogCache.sinaOpen){Site.initWBLogin(loginDialogCache.sinaAppKey,loginDialogCache.sinaReUri,loginDialogCache.displayList,loginDialogCache.noRemark,loginDialogCache.REMARK_MAXLEN,"ld_wbLogin",loginDialogCache.extendParam)}if((loginDialogCache.wxOpen&&loginDialogCache.newWXOpen)||(loginDialogCache.wxOpen&&loginDialogCache.closeOldSiteWX)){Site.initNewWXLogin(loginDialogCache.displayList,loginDialogCache.noRemark,loginDialogCache.REMARK_MAXLEN,"ld_wxLogin",loginDialogCache.extendParam)}else{if(loginDialogCache.wxOpen&&!loginDialogCache.closeOldSiteWX){Site.initWXLogin(loginDialogCache.wxAppKey,loginDialogCache.wxReUri,loginDialogCache.displayList,loginDialogCache.noRemark,loginDialogCache.REMARK_MAXLEN,"ld_wxLogin",loginDialogCache.extendParam)}}c();loginDialogLock=false}else{$.ajax({type:"post",url:"ajax/site_h.jsp?cmd=getMemberLoginMsg",error:function(){Fai.ing("获取登录信息错误,请稍后再试.")},success:function(M){var M=jQuery.parseJSON(M);if(M.success){var R=M.msg;x=R.findPwdOpen;o=R.autoLogin;y=R.qqOpen;D=R.sinaOpen;H=R.wxOpen;B=R.noRemark;p=R.signUpbyMobile;b=R.proOpen;h=R.showCaptcha;closeOldSiteWX=R.closeOldSiteWX;newWXOpen=R.newWXOpen;n=R.qqReUrlId;J=R.sinaReUrlId;u=R.wxReUrlId;q=R.qqReUri;m=R.sinaReUri;d=R.wxReUri;I=R.qqAppId;l=R.sinaAppKey;v=R.wxAppKey;k=R.registerHtml;z=$.toJSON(R.displayList);g=$.toJSON(R.extendParam);A=R.REMARK_MAXLEN;w=R.ACCT_MAXLEN;loginDialogCache.qqOpen=y;loginDialogCache.sinaOpen=D;loginDialogCache.wxOpen=H;loginDialogCache.qqAppId=I;loginDialogCache.sinaAppKey=l;loginDialogCache.wxAppKey=v;loginDialogCache.qqReUri=q;loginDialogCache.sinaReUri=m;loginDialogCache.wxReUri=d;loginDialogCache.displayList=z;loginDialogCache.noRemark=B;loginDialogCache.REMARK_MAXLEN=A;loginDialogCache.extendParam=g;loginDialogCache.newWXOpen=newWXOpen;loginDialogCache.closeOldSiteWX=closeOldSiteWX;var S=[];S=j(S,o,x,"");S=F(S,y,D,H);S=K(S,p,b,h);var P=S.join("");loginDialogCache.html=P;var Q=parseInt(Math.random()*10000);var N={boxId:Q,boxName:"loginDialog",title:"",htmlContent:P,width:380};t=Site.popupBox(N);if(y||D||H){var O={};O.pid=E;O.mid=e;O.url=s;O.opList=i;O.count=C;O.where=G;$.cookie("forThirtLoginBuy",$.toJSON(O))}if(y){Site.initQQLogin(I,q,z,B,A,"ld_qqLogin",g)}if(D){Site.initWBLogin(l,m,z,B,A,"ld_wbLogin",g)}if((H&&newWXOpen)||(H&&closeOldSiteWX)){Site.initNewWXLogin(z,B,A,"ld_wxLogin",g)}else{if(H&&!closeOldSiteWX){Site.initWXLogin(v,d,z,B,A,"ld_wxLogin",g)}}c();loginDialogLock=false}}})}function j(P,N,O,M){P.push("
    \n");P.push("
    \n");P.push("\n");P.push("
    "+LS.memberReg+"
    \n");P.push("
    \n");P.push("
    \n");P.push("
    \n");P.push("
    \n");P.push("\n");P.push("
    \n");P.push("
    \n");P.push("\n");P.push("
    \n");P.push("
    \n");P.push("\n");P.push("\n");P.push("
    \n");if(N||O){P.push("
    \n");if(N){if(O){P.push("
    \n");P.push("\n")}else{P.push("
    \n");P.push("\n")}P.push("
    \n")}P.push("\n");P.push("
    \n")}P.push("
    \n");P.push("
    \n");P.push("
    \n");P.push("
    "+LS.memberLogin+"
    \n");P.push("
    \n");P.push("
    \n");P.push("
    \n");P.push("
    \n");return P}function F(P,N,M,O){if(N||M||O){P.push("
    \n");P.push("
    "+LS.loginDialogUseThird+"
    \n");P.push("
    \n");if(N){P.push("")}if(M){P.push("")}if(O){P.push("")}P.push("
    \n");P.push("
    \n")}P.push("
    \n");return P}function K(Q,N,M,O){Q.push("\n");return Q}function c(){$("#J_memberLoginDialogPanel .J_loginButton").off("click").on("click",function(){if(!_manageMode){Site.memberLogin4(E,e,s,G,i,C)}else{Fai.ing("您目前处于网站管理状态,请先点击网站右上方的“退出”后再登录会员。")}});$("#J_memberRegisterButton").off("click").on("click",function(){if(!_manageMode){Site.memberSignupDialogSubmit("J_memberRegisterDialogPanel",Fai.top.location.href,2,E,e,s,G,i,C)}else{Fai.ing("您目前处于网站管理状态,请先点击网站右上方的“退出”后再注册会员。")}});$(".loginAndRegister").find(".login").off("click").on("click",function(){$("#J_memberLoginDialogPanel").show();$("#J_memberRegisterDialogPanel").hide()});$(".loginAndRegister").find(".register").off("click").on("click",function(){$("#J_memberLoginDialogPanel").hide();$("#J_memberRegisterDialogPanel").show()});$("#J_memberRegisterDialogPanel .memberSignupContent").mCustomScrollbar({theme:"greyish-thin",scrollSpeed:10,advanced:{updateOnContentResize:true},axis:"y",callbacks:{}})}};Site.mallBuying={};Site.mallBuy2=function(e,a,q){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行购买。");return}if(typeof(Site.mallBuying[e])=="undefined"){Site.mallBuying[e]=false}var g=false;$.each(Site.mallBuying,function(j,i){if(i){g=true;return false}});if(g){return}Site.mallBuying[e]=true;var o="id="+e;if(a&&a!="undefined"){var c;if(a==="PdSlide"){c=$("#fk-productSlideContent")}else{c=$("#module"+a)}var r=c.find(".optionMsg");if(Fai.isNull(c)){Site.mallBuying[e]=false;return}var s=true;var l=[];o+="&fromDetail=true";var n=$.cookie("isNeedAddCartItem");if(typeof n=="undefined"||n==null||n==""){c.find(".optionItemWrap").each(function(){var w=$(this);if(w.find(".optionItemHover").length==1){var v=w.attr("data"),u=w.attr("type"),i=w.find(".optionItemHover").attr("data"),x={};x.name=v;x.value=parseInt(i);if(u!=null){x.type=parseInt(u)}l.push(x);r.hide()}else{var j=w.parent().parent().find(".propName").text();if(j.charAt(j.length-1)==":"||j.charAt(j.length-1)==":"){j=j.substring(0,j.length-1)}r.show();r.html(Fai.format(LS.mallCartChoiceItemError,Fai.encodeHtml(j)));if(a==="PdSlide"){var z=$(this).parent().parent().position();var y=$(".fk-slideForProduct .f-propListContent");y.scrollTop(z.top)}s=false;return false}});if(Site.optionsStr.oldOptionsStr!="null"&&Site.optionsStr.oldOptionsStr){var p=Site.optionsStr.oldOptionsStr.split("_"),d=[];for(var k=0;k0){o+="&optionList="+Fai.encodeUrl($.toJSON(l))}var b=$("#cartbuyCount"+a).val();var m=1;if(Fai.isInteger(b)){m=parseInt(b)}if(m<1){m=1}else{if(m>9999999){m=9999999}}$("#cartbuyCount"+a).val(m);o+="&amount="+m}else{var t=$.parseJSON(n);l=Fai.decodeUrl(t.opList);if(typeof l!="undefined"&&l!="[]"&&l!=""){o+="&optionList="+Fai.encodeUrl(l)}o+="&amount="+t.count;$.cookie("isNeedAddCartItem",null)}}$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=addCartItem",data:o,error:function(){var j=Site.getDialogHtml({rt:Site.MallAjaxErrno.networkError},q);var i={htmlContent:j,width:382,height:115};Site.popupBox(i);Site.mallBuying[e]=false},success:function(i){var w=$.parseJSON(i);Site.refreshTopAndRightBarMallCartNum();if(w.rt==Site.MallAjaxErrno.login){Site.createLoginDialog(e,a,q,"addCartItem",Fai.encodeUrl($.toJSON(l)),m);Site.mallBuying[e]=false;return}var x=Site.getDialogHtml(w);Site.mallBuying[e]=false;if(!x){return}var v={};var u=parseInt(w.rt);if(u==Site.MallAjaxErrno.mallAmountZero||u==Site.MallAjaxErrno.outOfMallAmount){v={htmlContent:x,width:240,height:116,boxName:"mallAmountZero"}}else{if(u==Site.MallAjaxErrno.OutOfAllowAmount){v={htmlContent:x,width:240,height:116,boxName:"allowAmountFlow"}}else{if(u==Site.MallAjaxErrno.notAdded){v={htmlContent:x,width:240,height:116,boxName:"notAdded"}}else{if(u==Site.MallAjaxErrno.authMemberNotAllow){v={htmlContent:x,width:240,height:100,boxName:"authMemberNotAllow"}}else{v={htmlContent:x,width:372,height:150,boxName:"mallBuy"}}}}}var j=Site.popupBox(v)}});if(Fai.isIE()){window.event.cancelBubble=true;window.event.returnValue=false}else{if(!Fai.isMozilla()){event.stopPropagation();event.preventDefault()}}};Site.initOptionsStr=function(a){Site.optionsStr.oldOptionsStr=a};Site.optionsStr={};Site.mallImmeBuying=false;Site.mallImmeBuy=function(g,b){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行立刻购买。");return}if(Site.mallImmeBuying){return}Site.mallImmeBuying=true;var o="id="+g;var d;if(b==="PdSlide"){d=$("#fk-productSlideContent")}else{d=$("#module"+b)}var n=$.cookie("isNeedAddCartItem");if(typeof n=="undefined"||n==null||n==""){if(b&&b!="undefined"){var q=d.find(".optionMsg");if(Fai.isNull(d)){return}var s=true;var l=[];o+="&fromDetail=true";d.find(".optionItemWrap").each(function(){var w=$(this);if(w.find(".optionItemHover").length==1){var v=w.attr("data"),u=w.attr("type"),i=w.find(".optionItemHover").attr("data"),x={};x.name=v;x.value=parseInt(i);if(u!=null){x.type=parseInt(u)}l.push(x);q.hide()}else{var j=w.parent().parent().find(".propName").text();if(j.charAt(j.length-1)==":"||j.charAt(j.length-1)==":"){j=j.substring(0,j.length-1)}q.show();q.html(Fai.format(LS.mallCartChoiceItemError,Fai.encodeHtml(j)));if(b==="PdSlide"){var z=$(this).parent().parent().position();var y=$(".fk-slideForProduct .f-propListContent");y.scrollTop(z.top)}s=false;return false}});if(Site.optionsStr.oldOptionsStr!="null"&&Site.optionsStr.oldOptionsStr){var p=Site.optionsStr.oldOptionsStr.split("_"),e=[];for(var k=0;k0){o+="&optionList="+Fai.encodeUrl($.toJSON(l))}}var r=$("#cartbuyCount"+b),c=r.val(),m=1;if(Fai.isInteger(c)){m=parseInt(c)}if(m<1){m=1}else{if(m>9999999){m=9999999}}r.val(m);var a={pid:g,amount:m,optList:$.toJSON(l)};o+="&amount="+m+"&codata="+$.toJSON(a)}else{var l=[];var t=$.parseJSON(n);l=Fai.decodeUrl(t.opList);if(b&&b!="undefined"){o+="&fromDetail=true";if(typeof l!="undefined"&&l!="[]"&&l!=""){o+="&optionList="+Fai.encodeUrl(l)}}var a={pid:t.pid,amount:t.count,optList:l};o+="&amount="+t.count+"&codata="+$.toJSON(a);$.cookie("isNeedAddCartItem",null)}$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=addIme",data:o,error:function(){Site.mallImmeBuying=false;Fai.ing(LS.networkError,true)},success:function(i){Site.mallImmeBuying=false;var j=$.parseJSON(i);if(j.rt==Site.MallAjaxErrno.login){Site.createLoginDialog(g,b,"","immeBuy",Fai.encodeUrl($.toJSON(l)),m)}else{if(j.rt==Site.MallAjaxErrno.mallAmountZero){Fai.ing(LS.mallAmountZero,true)}else{if(j.rt==Site.MallAjaxErrno.mallOptionStop){Fai.ing(LS.mallOptionStop,true)}else{if(j.rt==Site.MallAjaxErrno.outOfMallAmount){Fai.ing(LS.mallAmountOverFlow,true)}else{if(j.rt==Site.MallAjaxErrno.OutOfAllowAmount){Fai.ing(LS.allowAmountOverFlow,true)}else{if(j.rt==Site.MallAjaxErrno.notAdded){Fai.ing(LS.mallProductNotAdded,true)}else{if(j.rt==Site.MallAjaxErrno.authMemberNotAllow){Fai.ing(j.data+LS.authLevelBuy,true)}else{Fai.top.location.href=Site.getHtmlUrl("mstl")+"?imme"}}}}}}}}});if(Fai.isIE()){window.event.cancelBubble=true;window.event.returnValue=false}else{if(!Fai.isMozilla()){event.stopPropagation();event.preventDefault()}}};Site.desMallCartAmount=function(d,g,i,o,j,t,h,b){var e=Fai.top.$("#module"+d);var s=e.find(".itemLine"+g);var r=s.find(".amountEdit");var n=parseInt(r.val());var m=s.find(".J_mcart-pdSelect").prop("checked");var l=n;n--;if(n9999998){n=9999999;$("#buyCountDes"+d+"_"+g).removeClass("disableMallJian");$("#buyCountInc"+d+"_"+g).addClass("disableMallJia")}else{$("#buyCountDes"+d+"_"+g).removeClass("disableMallJian");$("#buyCountInc"+d+"_"+g).removeClass("disableMallJia")}}r.val(n);if(h!=0&&b){r.parents(".itemAmount").find(".noStockTip").html("")}if(l!=n&&m){Site.mallCartAmountChange(d,g,i,o,j,t,h,b)}else{var c=parseFloat(s.find(".amountEdit").attr("_itemprice"),2);var q=parseInt(s.find(".amountEdit").val());var k=(c*q);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){k=Fai.formatPriceEn(k)}else{k=k.toFixed(2)}s.find(".itemTotalText").text(k)}};Site.incMallCartAmount=function(d,g,i,o,j,t,h,b){var e=Fai.top.$("#module"+d);var s=e.find(".itemLine"+g);var r=s.find(".amountEdit");var n=parseInt(r.val());var l=n;var m=s.find(".J_mcart-pdSelect").prop("checked");n++;if(n<2){n=1;$("#buyCountDes"+d+"_"+g).addClass("disableMallJian");$("#buyCountInc"+d+"_"+g).removeClass("disableMallJia")}else{if((n>t||n==t)&&t!=0){n=t;$("#buyCountDes"+d+"_"+g).removeClass("disableMallJian");$("#buyCountInc"+d+"_"+g).addClass("disableMallJia")}else{if(n>9999998){n=9999999;$("#buyCountDes"+d+"_"+g).removeClass("disableMallJian");$("#buyCountInc"+d+"_"+g).addClass("disableMallJia")}else{$("#buyCountDes"+d+"_"+g).removeClass("disableMallJian");$("#buyCountInc"+d+"_"+g).removeClass("disableMallJia")}}}r.val(n);if(h!=0&&b){r.parents(".itemAmount").find(".noStockTip").html("")}if(l!=n&&m){Site.mallCartAmountChange(d,g,i,o,j,t,h,b)}else{var c=parseFloat(s.find(".amountEdit").attr("_itemprice"),2);var q=parseInt(s.find(".amountEdit").val());var k=(c*q);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){k=Fai.formatPriceEn(k)}else{k=k.toFixed(2)}s.find(".itemTotalText").text(k)}};Site.mallCartAmountChange=function(b,d,g,n,k,p,e,a){var c=Fai.top.$("#module"+b);var o=c.find(".itemLine"+d);var h=o.find(".amountEdit");var j=h.val();var i=1;var l=o.find(".J_mcart-pdSelect").prop("checked");if(Fai.isInteger(j)){i=parseInt(j)}if(ip||i==p)&&p!=0){i=p;$("#buyCountDes"+b+"_"+d).removeClass("disableMallJian");$("#buyCountInc"+b+"_"+d).addClass("disableMallJia")}else{if(i>e&&a){i=e;Fai.ing(LS.mallAmountOverFlow,true);$("#buyCountDes"+b+"_"+d).removeClass("disableMallJian");$("#buyCountInc"+b+"_"+d).addClass("disableMallJia")}else{if(i>9999998){i=9999999;$("#buyCountDes"+b+"_"+d).removeClass("disableMallJian");$("#buyCountInc"+b+"_"+d).addClass("disableMallJia")}else{$("#buyCountDes"+b+"_"+d).removeClass("disableMallJian");$("#buyCountInc"+b+"_"+d).removeClass("disableMallJia")}}}}if(i<=1){i=1;$("#buyCountDes"+b+"_"+d).addClass("disableMallJian")}if(e==0&&a){i=0;$("#buyCountInc"+b+"_"+d).addClass("disableMallJia");$("#buyCountDes"+b+"_"+d).addClass("disableMallJian")}else{h.parent().find(".noStockTip").html("")}h.val(i);var m=c.find(".cartMsg");if(isNaN(i)||i<=0||i>9999999){m.html(LS.mallCartAmountError);return}c.find(".amountEdit").attr("disabled",true);m.show();if(c.find(".mallCartNew").length>0){m.hide()}m.html(LS.mallCartUpdating);$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=setItem&orderId="+g,data:"itemId="+n+"&amount="+i,error:function(){c.find(".amountEdit").removeAttr("disabled");m.html(LS.mallCartUpdateError)},success:function(q){c.find(".amountEdit").removeAttr("disabled");var q=jQuery.parseJSON(q);if(q.success){m.html(LS.mallCartUpdateOk);Site.reCountCartMoney(c)}else{if(q.rt==-3){m.html(LS.mallCartUpdateNotFound)}else{if(q.rt==-9){m.html(LS.mallCartUpdateStatusError)}else{m.html(LS.mallCartUpdateError)}}}}})};Site.reCountCartMoney=function(d){var b=d.find(".cartTotalValue");var h=b.attr("choiceCurrencyVal");var c=b.attr("levelDiscount");var a=b.attr("levelName");var g=0;var e=0;d.find(".itemListcount").each(function(){var q=$.parseJSON($(this).attr("saleInfo"));var o=$(this).find(".itemLine");if(d.find(".J_mallCart").hasClass("mallCartNew")){o=$(this).find(".goodsInfoLine")}if(typeof(o)!="undefined"&&o!=null&&o.length>0){var v=0;if(typeof(q)!="undefined"&&q!=null&&Site.checkSaleProVal(q)){var k=$(this).attr("lineno");var r=q.other.ruleData.d;if(q.other.ruleData.s=="1"||q.other.ruleData.s=="2"){var j=0;var m=0;o.each(function(){var i=Site.getEachItemPrice(this);var w=$(this).find(".J_mcart-pdSelect").prop("checked");if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$(this).find(".itemTotalText").text(Fai.formatPriceEn(i))}else{$(this).find(".itemTotalText").text(i.toFixed(2))}if(w){m+=i}});var r=q.other.ruleData.d;var u=0;var n=0;for(var p=0;p=t){if(t>u){u=t;n=l}}}g+=m;e+=m-n;if(n>0){var s=[];s.push("
    ");s.push(h+(m-n).toFixed(2));s.push("
    ");s.push("
    ");s.push(h+m.toFixed(2));s.push("
    ");$(".J_salePrice_"+k).html(s.join(""));$(".J_salePrice_"+k).css("bottom","1px");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalss").addClass("fullReduceRed");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalss").removeClass("fullReduceGray");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalssRect").addClass("fullReduceRectRed");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalssRect").removeClass("fullReduceRectGray")}else{$(".J_salePrice_"+k).removeAttr("style");$(".J_salePrice_"+k).html(h+m.toFixed(2));$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalss").addClass("fullReduceGray");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalss").removeClass("fullReduceRed");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalssRect").addClass("fullReduceRectGray");$(".J_salePrice_"+k).parent(".showRedsalePro").find(".fullReduceCalssRect").removeClass("fullReduceRectRed")}}}else{o.each(function(){q=$.parseJSON($(this).attr("saleInfo"));var w=$(this).find(".J_mcart-pdSelect").prop("checked");var i=Site.getEachItemPrice(this);if(w){v+=i;g+=i}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$(this).find(".itemTotalText").text(Fai.formatPriceEn(i))}else{$(this).find(".itemTotalText").text(i.toFixed(2))}})}e+=v}});Site.refreshTopAndRightBarMallCartNum();if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){if(d.has("mallCartNew")){$(".J_countTotal").html(LS.goodsTotalMoney+""+h+Fai.formatPriceEn(g)+"");$(".J_countSave").html("   "+LS.offsetMoney+""+h+Fai.formatPriceEn(g-e)+"");d.find(".cartTotalValue").html(""+h+""+Fai.formatPriceEn(e))}else{$(".J_countTotal").html(LS.shoppingCartCountMoney+h+Fai.formatPriceEn(g));$(".J_countSave").html("   "+LS.shoppingCartCountReduce+h+Fai.formatPriceEn(g-e));d.find(".cartTotalValue").html(h+Fai.formatPriceEn(e))}}else{if(d.has("mallCartNew")){$(".J_countTotal").html(LS.goodsTotalMoney+""+h+g.toFixed(2)+"");$(".J_countSave").html("   "+LS.offsetMoney+""+h+(g-e).toFixed(2)+"");d.find(".cartTotalValue").html(""+h+""+e.toFixed(2))}else{$(".J_countTotal").html(LS.shoppingCartCountMoney+h+g.toFixed(2));$(".J_countSave").html("   "+LS.shoppingCartCountReduce+h+(g-e).toFixed(2));d.find(".cartTotalValue").html(h+e.toFixed(2))}}};Site.getEachItemPrice=function(d){var c=parseFloat($(d).find(".amountEdit").attr("_itemprice"),2);var b=parseInt($(d).find(".amountEdit").val());if(isNaN(b)){return parseFloat($(d).find(".itemTotalText").html())}else{return(c*b)}};Site.showSaleRedPromotion=function(e,c,a,n,l){if(typeof(e)=="undefined"||typeof(c)=="undefined"||e==null||c==null){return}if(c<0){return}var j=$(".showRedsalePro").eq(0).width();var m=$(".J_fullReduceCalss_"+c).eq(0).width();if(Site.checkSaleProVal(e)){var g=e.other.ruleData.d;if(g.length>0){var h="";var b=[];for(var d=0;d");k.push(l+Fai.formatPriceEn(a));k.push("
    ");k.push("
    ");k.push(l+Fai.formatPriceEn(n));k.push("
    ")}else{k.push("
    ");k.push(l+a.toFixed(2));k.push("
    ");k.push("
    ");k.push(l+n.toFixed(2));k.push("
    ")}$(".J_salePrice_"+c).html(k.join(""));$(".J_salePrice_"+c).css("bottom","1px");$(".J_salePrice_"+c).parent(".showRedsalePro").find(".fullReduceCalss").addClass("fullReduceRed");$(".J_salePrice_"+c).parent(".showRedsalePro").find(".fullReduceCalss").removeClass("fullReduceGray");$(".J_salePrice_"+c).parent(".showRedsalePro").find(".fullReduceCalssRect").addClass("fullReduceRectRed");$(".J_salePrice_"+c).parent(".showRedsalePro").find(".fullReduceCalssRect").removeClass("fullReduceRectGray")}};Site.showCountPrice=function(e,b,h,c,a,d){if(typeof(e)=="undefined"||typeof(b)=="undefined"||typeof(h)=="undefined"||e==null||b==null||h==null){return}var i=b-e;if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){i=Fai.formatPriceEn(i);b=Fai.formatPriceEn(b);e=Fai.formatPriceEn(e)}else{i=i.toFixed(2);b=b.toFixed(2);e=e.toFixed(2)}if(d){$(".J_countTotal").html(LS.goodsTotalMoney+""+h+b+"");$(".J_countSave").html("   "+LS.offsetMoney+""+h+i+"");var g=[];g.push("");g.push(LS.finalPayMoney);g.push("");g.push("");g.push(""+h+""+e);g.push("");$(".J_countNeedPay").html(g.join(""))}else{$(".J_countTotal").html(LS.shoppingCartCountMoney+h+b);$(".J_countSave").html("   "+LS.shoppingCartCountReduce+h+i);var g=[];g.push("");g.push(LS.shouldPayMoney);g.push("");g.push("");g.push(h+e);g.push("");$(".J_countNeedPay").html(g.join(""))}};Site.showSaleMemOrRedPrice=function(d,a,j,i,b){if(typeof(d)!="undefined"&&d!=null){if(Site.checkSaleProVal(d)){var e=d.other.ruleData.d;if(e.length>0){var g="";var c=e[0].m;if(d.other.ruleData.s=="1"){if(_lcid==2052||_lcid==1028){g=Fai.format(LS.salePromotionPdDisCount,c.toFixed(1))}else{g=Fai.format(LS.salePromotionPdDisCount,Fai.formatPriceEn(10*(10-c),1))}}else{if(d.other.ruleData.s=="2"){if(_lcid==2052||_lcid==1028){g=Fai.format(LS.salePromotionPdLapse,i+c.toFixed(2))}else{g=Fai.format(LS.salePromotionPdLapse,i+Fai.formatPriceEn(c))}}}var h=[];h.push("
    ");h.push("
    ");h.push("");h.push("");h.push("
    ");h.push(LS.salePromotionName);h.push("");h.push("
    ");h.push("
    ");h.push("
    ");h.push("
    ");h.push("
    ");h.push(LS.salePromotionActivity+Fai.encodeHtml(d.name));h.push("
    ");h.push(g);h.push("
    ");$(".J_itemPrice_"+b).filter(":not('.mallCartNew .J_itemPrice_"+b+"')").css("margin-top","-18px");$(".J_saleMemOrRedPrice_"+b).html(h.join(""))}}}else{if(a>0&&a<1){var h=[];h.push("
    ");h.push("");h.push("");h.push("");h.push("
    ");h.push(LS.memberPrice);h.push("");h.push("
    ");h.push("
    ");h.push("
    ");h.push("
    ");h.push("
    ");h.push("
    ");a=Math.round(a*100);h.push(j+Fai.format(LS.salePromotionRedVal,"*"+a+"%"));h.push("
    ");$(".J_itemPrice_"+b).filter(":not('.mallCartNew .J_itemPrice_"+b+"')").css("margin-top","-18px");$(".J_saleMemOrRedPrice_"+b).html(h.join(""))}}};Site.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};Site.showSaleMemOrRedValInIE=function(){$(".saleProSignHover").hover(function(){$(this).find(".saleMemOrRedName").css("border-bottom-width","0px");$(this).find(".saleMemOrRedVal").css({"background-color":"#ffefe9",display:"block"});$(this).find(".saleMemOrJt").addClass("saleMemOrJtUp")},function(){$(this).find(".saleMemOrRedName").css("border-bottom-width","1px");$(this).find(".saleMemOrRedVal").css({"background-color":"#ffefe9",display:"none"});$(this).find(".saleMemOrJt").removeClass("saleMemOrJtUp")})};Site.mallCartItemDel=function(i,e,a,h,d,c){var b=Fai.top.$("#module"+i);var g=b.find(".cartMsg");g.show();if(b.find(".mallCartNew").length>0){g.hide()}g.html(LS.mallCartUpdating);$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=delitem&orderid="+a,data:"itemId="+h,error:function(){g.html(LS.mallCartUpdateError)},success:function(s){var s=jQuery.parseJSON(s);if(s.success){g.html(LS.mallCartUpdateOk);var q=b.find(".itemLine"+e);var p=q.parent();var m=p.find(".itemLine");var j=m.length;var n=0;for(var l=0;l1){if(n==(j-1)){p.find(".separatorLine").eq((n-1)).remove();var k=m.eq((j-1)).find(".J_saleXuXian").attr("style");m.eq((j-2)).find(".J_saleXuXian").attr("style",k)}else{b.find(".separatorLine"+e).remove()}}q.remove();if(j==1){var o=p.attr("lineno");b.find(".J_saleRemove_"+o).remove()}setTimeout(function(){var t=b.find(".J_saleTabItem_"+c).length;if(t<=0){b.find(".J_saleTabRemove_"+c).remove()}},100);var r=b.find(".itemLine");if(r.length==0){Fai.top.location.reload()}else{Site.reCountCartMoney(b)}}else{if(s.rt==-3){g.html(LS.mallCartUpdateNotFound)}else{if(s.rt==-9){g.html(LS.mallCartUpdateStatusError)}else{g.html(LS.mallCartUpdateError)}}if(b.find(".mallCartNew").length>0){g.hide()}}}})};Site.mallSettle=function(b){var c=$(".J_mcart-pdSelect").not("input:checked");var a=$(".J_mcart-pdSelect").filter("input:checked");var e=new Array();$(c).each(function(){var g=$(this).attr("itemId");e.push(g)});$(".J_mallCart .J_Invalid").each(function(){var g=$(this).attr("itemid");e.push(g)});if(a.length>500){Fai.ing(LS.mcartTooLong)}else{if(a.length){var d=false;$(a).each(function(){var h=Number($(this).parents(".goodsInfoLine").find(".itemAmount .amountEdit").val());var i=Number($(this).attr("_realAmount"));var g=$(this).attr("_enableMallAmount");if((h>i)&&g=="true"){d=true;return false}});if(d){Fai.ing(LS.mallAmountOverFlow);return}if(b>0){Fai.top.location.href=Site.getHtmlUrl("mstl")+"?id="+b+"&unCheckedItemIds="+e}else{Fai.top.location.href=Site.getHtmlUrl("mstl")}}else{Fai.ing(LS.mallSelectSettleItem)}}};Site.mallSelectAllShop=function(h,e){var d=$("#module"+h),g=d.find("#selectAll"),i=d.find(".J_mcart-pdSelect"),b=d.find(".J_mcart-pdSelect:checked"),a=i.not("input:checked");var c=g.prop("checked");if(!e){if(c){a.click();g.prop("checked",true)}else{b.click();g.prop("checked",false)}}else{i.prop("checked",c)}Site.setCheckBoxToFalgDiv(d);Site.reCountCartMoney(d)};Site.mallSelectShop=function(d){var b=$("#module"+d),c=b.find(".J_mcart-pdSelect"),a=b.find("#selectAll");a.prop("checked",true);$.each(c,function(e,g){if(!$(g).prop("checked")){a.prop("checked",false);return false}});Site.setCheckBoxToFalgDiv(b);Site.reCountCartMoney(b)};Site.mallStlPayMode=function(b,c){var a=Fai.top.$("#module"+b);a.find("input[name=mallPay]").val(c);if(c==2){a.find(".bankList").show()}else{a.find(".bankList").hide()}if(c==3||c==4||c==5||c==6||c==7||c==8||c==9||c==10||c==11||c==12||c==13){a.find(".payOnlinePanel").show();a.find(".payOnlinePanel input[value='"+c+"']").click();if(c===8||c===11||c===13){$(a.find(".payOnlinePanel input[type='radio']")[0]).click()}}else{a.find(".payOnlinePanel").hide()}};Site.mallStlCalcTotal=function(a){var b=Fai.top.$("#module"+a);var e=parseFloat(b.find(".cartTotal").attr("pay_price"));if(isNaN(e)){return}var c=parseFloat(b.find("input[name=mallShip]:checked").attr("price"));if(isNaN(c)){c=0}if($("#mallShipTemplate_province").length>0){var j=b.find("input[name=mallShip]:checked");j.attr("provinceCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area1")));j.attr("cityCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area2")));j.attr("countyCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area3")));j.attr("streetCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area4")));j.attr("isCus",$.trim($("#mallShipTemplate_areaBoxInput").attr("isCus")))}var g=0;if($("#offsetMoney").length>0){var i=$("#offsetMoney").attr("_offsetmoney");if(!isNaN(i)){g=parseFloat(i);if((e+c)0){var i=$("#couponOffsetMoney").attr("_offsetmoney");if(!isNaN(i)){h=parseInt(i)}}if(e<(g+h)){return false}var d=parseInt(b.find("#presentItg").attr("value"));if(d>0){b.find("#presentItg").text(parseInt((e-g-h).toFixed(2)*d))}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){b.find("#shippingMoneyVal").text(Fai.formatPriceEn(c)).attr("_shipmoney",c);b.find(".mallStlTotal .totalValue").text(Fai.formatPriceEn(e+c-g-h))}else{b.find("#shippingMoneyVal").text(c.toFixed(2)).attr("_shipmoney",c);b.find(".mallStlTotal .totalValue").text((e+c-g-h).toFixed(2))}};Site.mallStlChangeBank=function(a){$("#"+a).attr("checked",true)};Site.mallNumeric=function(a){$("#module"+a+" .numeric").numeric({decimal:" ",negative:false})};Site.getBackgroundColor=function(a){var b="";while(a[0].tagName.toLowerCase()!="html"){b=a.css("background-color");if(b!="rgba(0, 0, 0, 0)"&&b!="transparent"){break}a=a.parent()}return b};Site.getMallSubmitData=function(g,w,u,e,r){var l="";g.find(".propItemValue").each(function(){var C=$(this),F=C.attr("_required")==1;if(C.hasClass("J-pccS")&&r){var H=($("#areaBoxInput").attr("isCus")==1);var z=$("#areaBoxInput").attr("area1");if(F&&(z==null||z=="")){l=LS.mallStlSubmitAddrErr;return false}var D=$("#areaBoxInput").attr("area2");if(F&&!H&&(D==null||D=="")){l=LS.mallStlSubmitAddrErr;return false}var J=$("#areaBoxInput").attr("area3"),B=$("#areaBoxInput").attr("area4"),x=$("#addrInfo_street"),K=$.trim($("#addrInfo_street").val());if(F&&K===""){l=LS.editStreetAddr;return false}var E=$("#areaBoxInput").val().replace(/-/g,"")+K;if(e!=0){var G={};G.provinceCode=z;G.cityCode=D;G.countyCode=J;G.streetCode=B;G.streetAddr=K;u.addr_info=G;u.addr=E;u.isDefault=1}w.addr=E}else{var I=C.attr("_field");var y;var A;if(I=="mobile"){y=C.find("input").val();if(y.length>0){if(!Fai.isNationMobile(y)){l=LS.mallStlSubmitInput2+C.attr("_prop");return false}else{A=C.find("select").val()}}else{A=""}}else{y=C.find("input").val()}if(F==1&&!y){l=LS.mallStlSubmitInput+C.attr("_prop");return false}if(y&&y.length>0){if(I==="email"&&!Fai.isEmail(y)){l=LS.mallStlSubmitInput2+C.attr("_prop");return false}if(I==="phone"&&!Fai.isPhone(y)){l=LS.mallStlSubmitInput2+C.attr("_prop");return false}}if(typeof I!=="undefined"){w[I]=y;if(e!=0&&r){u[I]=y;if(I=="mobile"&&y.length>0){u.mobileCt=A}}if(I=="mobile"&&y.length>0){w.mobileCt=A}}}});if(l!=""){return l}if(Site.orderMessageOpen){var q=Fai.decodeHtml($("#orderLeveaMsgIn").val());if(q.length>Site.orderMessageMaxNum){q=q.substring(0,Site.orderMessageMaxNum)}if(q!==Site.orderLeveaMsgTip){w.msg=q}else{w.msg=""}}else{w.msg=""}var c=g.find("input[name=mallShip]:checked");if($("#mallShipTemplate_province").length===1&&c.length===1){var j=parseInt(c.attr("provinceCode")),n=parseInt(c.attr("cityCode")),i=parseInt(c.attr("countyCode")),k=parseInt(c.attr("streetCode")),b=(c.attr("isCus")==1);if(!j||isNaN(j)||(!site_cityUtil.isValidProvince(j)&&!b)){l=LS.mallStlSubmitAddrErr;return l}if((!n||isNaN(n)||!site_cityUtil.isValidCity(n,j))&&!b){l=LS.mallStlSubmitAddrErr;return l}if(isNaN(j)){j=-1}if(isNaN(n)){n=-1}if(isNaN(i)){i=-1}if(isNaN(k)){k=-1}var m={type:parseInt(c.val()),templateId:parseInt(c.attr("templateId")),provinceCode:j,cityCode:n,countyCode:i,streetCode:k,isCus:b,streetAddr:$.trim($("#streetAddress").val())};if($.trim($("#streetAddress").val())==""){m.streetAddr=$.trim($("#addrInfo_street").val())}w.shipType=m}else{if(c.length===1){w.shipType=parseInt(c.val())}}var o=g.find("input[name=mallPay]:checked");if(o.length==1){w.payMode=parseInt(o.val())}var p=parseInt(o.val());var v=$("#useItg");if(v.length>0){var d=v.val();if(Fai.isInteger(d)){var h=parseInt(v.attr("_maxUse")),a=parseInt(v.attr("_currentitg")),t=v.attr("_itgname");if(d>a){l=Fai.format(LS.integral_notOverCurrent,Fai.encodeHtml(t),Fai.encodeHtml(t));return l}if(d>h){l=Fai.format(LS.integral_notOver,Fai.encodeHtml(t),h);return l}if(d<0){l=LS.integral_inputInteger;return l}w.useItg=parseInt(d)}else{if(d.length!=0){l=LS.integral_inputInteger;return l}}}if($("#presentItgShow").length>0){w.presentItg=true}if($("#couponList input:checked").length>0){var s=$("#couponList input:checked").attr("data_id");w.cdId=Number(s)}return l};Site.mallImmeSubmit=function(c,m,o,k){var j={},e={},c=Fai.top.$("#module"+c),g=c.find(".stlMsg");var d=Site.getMallSubmitData(c,j,e,m,o);if(d!=""){g.show();g.html(d);Site.scrollToDiv(c);return}var b=c.find(".mallStlOpt input");b.attr("disabled",true);g.show();g.html(LS.mallStlSubmitting);Site.scrollToDiv(c);if(m!=0&&o){var l={},h=[];h.push(e);l.addrInfoList=h;$.ajax({type:"post",url:action="ajax/memberadm_h.jsp@cmd=set&opera=addaddr&id="+m,data:"info="+Fai.encodeUrl($.toJSON(l)),success:function(p){},error:function(){}})}if(j.payMode==5){var n=j.name;var a=new RegExp("[\\u4E00-\\u9FFF]+","g");if(n){if(n.length<2){if(!a.test(n)){g.hide();Site.scrollToDiv(c);Fai.ing(LS.orderValidRecvName);b.attr("disabled",false);return}}}else{if(m!=0&&k){var i="";if(k.length<2){if(!a.test(n)){i="会员"}}j.name=i+k}else{j.name="游客"}}}$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=settle&imme",data:"data="+Fai.encodeUrl($.toJSON(j)),error:function(){b.removeAttr("disabled");g.html(LS.mallStlSubmitError)},success:function(p){b.removeAttr("disabled");var p=jQuery.parseJSON(p);if(p.success){Fai.top.location.href=Site.getHtmlUrl("mdetail")+"?id="+p.oid+"&suc=1"}else{if(p.rt==-3){g.html(LS.mallStlSubmitNotFound)}else{if(p.rt==-9){g.html(LS.mallStlSubmitStatusError)}else{if(p.rt==Site.MallAjaxErrno.outOfMallAmount){g.html(Fai.format(LS.mallAmountOverNameList,p.productsName))}else{g.html(LS.mallStlSubmitError)}}}}}})};Site.mallSubmit=function(e,a,b,r,o,q,m){if(a==0){Fai.top.location.href=Site.getHtmlUrl("mdetail");return}var l={},h={},e=Fai.top.$("#module"+e),i=e.find(".stlMsg");var g=Site.getMallSubmitData(e,l,h,o,q);if(g!=""){i.show();i.html(g);Site.scrollToDiv(e);return}var d=e.find(".mallStlOpt input");d.attr("disabled",true);i.show();i.html(LS.mallStlSubmitting);Site.scrollToDiv(e);if(o!=0&&q){var n={},j=[];j.push(h);n.addrInfoList=j;$.ajax({type:"post",url:action="ajax/memberadm_h.jsp@cmd=set&opera=addaddr&id="+o,data:"info="+Fai.encodeUrl($.toJSON(n)),success:function(s){},error:function(){}})}if(l.payMode==5){var p=l.name;var c=new RegExp("[\\u4E00-\\u9FFF]+","g");if(p){if(p.length<2){if(!c.test(p)){i.hide();Site.scrollToDiv(e);Fai.ing(LS.orderValidRecvName);d.attr("disabled",false);return}}}else{if(o!=0&&m){var k="";if(m.length<2){if(!c.test(p)){k="会员"}}l.name=k+m}else{l.name="游客"}}}$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=delitem&orderid="+a,data:"itemIds="+Fai.encodeUrl($.toJSON(b)),error:function(){d.removeAttr("disabled");i.html(LS.mallStlSubmitError)},success:function(){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=settle&orderid="+a,data:"data="+Fai.encodeUrl($.toJSON(l)),error:function(){d.removeAttr("disabled");i.html(LS.mallStlSubmitError)},success:function(s){d.removeAttr("disabled");var s=jQuery.parseJSON(s);if(s.success){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=addaftershop",data:"data="+Fai.encodeUrl($.toJSON(r)),error:function(){d.removeAttr("disabled");i.html(LS.mallStlSubmitError)},success:function(t){Fai.top.location.href=Site.getHtmlUrl("mdetail")+"?id="+a+"&suc=1"}})}else{if(s.rt==-3){i.html(LS.mallStlSubmitNotFound)}else{if(s.rt==-9){i.html(LS.mallStlSubmitStatusError)}else{if(s.rt==Site.MallAjaxErrno.outOfMallAmount){i.html(Fai.format(LS.mallAmountOverNameList,s.productsName))}else{if(s.rt==Site.MallAjaxErrno.OutOfAllowAmount){i.html(Fai.format(LS.allowAmountOverNameList,s.productsName))}else{if(s.rt==Site.MallAjaxErrno.couponOverTime){i.html(LS.couponOverTime)}else{if(s.rt==Site.MallAjaxErrno.couponUnavail){i.html(LS.couponUnavail)}else{if(s.rt==Site.MallAjaxErrno.couponNotFound){i.html(LS.couponNotFound)}else{i.html(LS.mallStlSubmitError)}}}}}}}}}})}})};Site.initModuleMallAddrInfo=function(c,b,g,v,r){var u="-----------",B=[],n,D,s,A,E,p,C;if(Site.addrInfoListGlobal!=null&&Site.addrInfoListGlobal!=[]){c=Site.addrInfoListGlobal}if(c.length==0){var o="";o+="
    ";$.each(site_cityUtil.getAreaGroupsPinYin(),function(j,F){o+="
    ";o+="
    "+F[0]+"
    ";o+="
    ";$.each(F[1],function(G,i){if(v==2052||v==1028){o+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(i).name)+"
    "}else{o+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(i).name)+"
    "}});o+="
    ";o+="
    ";o+="
    "});$("#areaBox1 .pv_content").html("").append(o);if($("#areaBox1").length>0){$("#areaBox1").css("left",$("#areaBoxInput").position().left+13)}$("#areaBoxInput").hide();var a=$(".J_isOldStyle2").length>0;if(a){$("#areaBox1").parents(".propList").css("overflow","visible")}$(document).unbind("click.forAreaBox3").bind("click.forAreaBox3",function(){$("#areaBox1").hide();$("#areaBox2").hide()});$("#areaBox1,#areaBox2").unbind("click.forAreaBox").bind("click.forAreaBox",function(i){l(i)});function l(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}$("#allArea").change(function(){if($("#allArea").val()==null||$("#allArea").val()==""||$("#allArea").val()=="os"){$("#areaBoxInput").hide()}else{$("#areaBoxInput").show()}$("#areaBox1").hide();$("#areaBox2").hide();if($("#allArea").val()==null||$("#allArea").val()==""){return}$("#areaBoxInput").attr("isCn",0);$("#areaBoxInput").attr("isCus",0);$("#areaBoxInput").attr("isOs",0);$("#areaBoxInput").attr("area1","");$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");if($("#allArea").val()=="cn"){$("#areaBoxInput").attr("isCn",1);$("#areaBox1 .pv").click();$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();$("#areaBox1").show();$("#areaBoxInput").val("")}else{if($("#allArea").val()=="os"){$("#areaBoxInput").attr("isOs",1);$("#areaBoxInput").attr("area1",990000);$("#areaBoxInput").attr("area2",990100);$("#areaBoxInput").val($("#areaBox1").find(".group_item[pid='990000']").text())}else{$("#areaBoxInput").attr("isCus",1);$("#areaBoxInput").attr("area1",$("#allArea").val());$("#areaBox2 .sec_content").html("");$("#areaBox2 .thd_content").html("");$("#areaBox2").show();$("#areaBoxInput").val("")}}$("#mallShipTemplate_allArea").val($("#allArea").val());$("#mallShipTemplate_allArea").change();if($("#allArea").val()=="cn"||$("#allArea").val()=="os"){return}var i=d($("#allArea").val());$("#sec_box .sec_content").append(i);$("#areaBoxInput").val($("#areaBoxInput").val()+$("#allArea option[value='"+$("#allArea").val()+"']").text());if(i===null||i===undefined||i===""){$("#areaBox2").hide();$(".J-ssq").hide();$("#areaBoxInput").hide()}});$("#areaBoxInput").unbind("click").bind("click",function(i){if($("#allArea").val()=="cn"){$("#areaBox1").toggle();$("#areaBox2").hide();$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()}else{if($("#allArea").val()==null||$("#allArea").val()=="os"){}else{$("#areaBox2").toggle();$("#areaBox1").hide();$("#sec_box").show();$("#thd_box").hide()}}l(i)});$("#areaBox1 .J_areaHead .pv").click(function(){$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()});$("#areaBox1 .J_areaHead .city").click(function(){$("#province_box").hide();$("#city_box").show();$("#county_box").hide();$("#street_box").hide()});$("#areaBox1 .J_areaHead .county").click(function(){$("#province_box").hide();$("#city_box").hide();$("#county_box").show();$("#street_box").hide()});$("#areaBox1 .J_areaHead .street").click(function(){$("#province_box").hide();$("#city_box").hide();$("#county_box").hide();$("#street_box").show()});$("#areaBox2 .J_areaHead2 .sec").click(function(){$("#sec_box").show();$("#thd_box").hide()});$("#areaBox2 .J_areaHead2 .thd").click(function(){$("#sec_box").hide();$("#thd_box").show()});$("#province_box .group_item").bind("click",function(){$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var i=$(this).attr("pname");var j=$(this).attr("pid");$("#areaBox1 .J_areaHead .city").click();$("#areaBoxInput").val("");$("#areaBoxInput").val($("#areaBoxInput").val()+i);$("#areaBoxInput").removeAttr("lastArea");$("#areaBoxInput").removeAttr("lastAreaType");$("#areaBoxInput").attr("area1",j);$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");$("#areaBox1 .city_content").remove();var G=t(site_cityUtil.getCities(j));var F=$(G).html();if(F===null||F===undefined||F===""){$("#areaBox1").hide()}$("#city_box").append(G);$("#mallShipTemplate_province_box .group_item[pid='"+j+"']").click()});$("#city_box").delegate(".group_item","click",function(){$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var i=$(this).attr("cname");var F=$(this).attr("cid");$("#areaBox1 .J_areaHead .county").click();var I=$("#areaBoxInput").attr("lastArea");var j=$("#areaBoxInput").attr("lastAreaType");if(j!=null&&j!=""){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+i);$("#areaBoxInput").attr("lastArea","-"+i);$("#areaBoxInput").attr("lastAreaType","city");$("#areaBoxInput").attr("area2",F);$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");$("#areaBox1 .county_content").remove();var H=m(site_cityUtil.getCounty(F));var G=$(H).html();if(G===null||G===undefined||G===""){$("#areaBox1").hide()}$("#county_box").append(H);$("#mallShipTemplate_city_box .group_item[cid='"+F+"']").click()});$("#county_box").delegate(".group_item","click",function(){$("#areaBox1 .street_content").remove();var j=$(this).attr("cname");var G=$(this).attr("cid");var I=$("#areaBoxInput").attr("lastArea");var F=$("#areaBoxInput").attr("lastAreaType");$("#areaBox1 .J_areaHead .street").click();if(F!=null&&(F=="street"||F=="county")){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-",$("#areaBoxInput").val().indexOf("-")+1)))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+j);$("#areaBoxInput").attr("lastArea","-"+j);$("#areaBoxInput").attr("lastAreaType","county");$("#areaBoxInput").attr("area3",G);$("#areaBoxInput").attr("area4","");var i=w(site_cityUtil.getStreet(G));var H=$(i).html();if(H===null||H===undefined||H===""){$("#areaBox1").hide()}$("#street_box").append(i);$("#mallShipTemplate_county_box .group_item[cid='"+G+"']").click()});$("#street_box").delegate(".group_item","click",function(){var i=$(this).attr("cname");var F=$(this).attr("cid");var G=$("#areaBoxInput").attr("lastArea");var j=$("#areaBoxInput").attr("lastAreaType");if(j!=null&&j=="street"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(G,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+i);$("#areaBoxInput").attr("lastArea","-"+i);$("#areaBoxInput").attr("lastAreaType","street");$("#areaBoxInput").attr("area4",F);$("#areaBox1").hide();$("#mallShipTemplate_street_box .group_item[cid='"+F+"']").click()});$("#sec_box").delegate(".group_item","click",function(){$("#areaBox2 .thd_content").html("");var i=$(this).attr("cname");var F=$(this).attr("cid");$(".j_areahead2%20.thd").click();var H=$("#areaBoxInput").attr("lastArea");var j=$("#areaBoxInput").attr("lastAreaType");if(j!=null&&j!=""&&$("#areaBoxInput").val().indexOf("-")!=-1){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+i);$("#areaBoxInput").attr("lastArea","-"+i);$("#areaBoxInput").attr("lastAreaType","sec");$("#areaBoxInput").attr("area2",F);$("#areaBoxInput").attr("area3","");var G=d(F);if(G===null||G===undefined||G===""){$("#areaBox2").hide()}$("#thd_box .thd_content").append(G);$("#mallShipTemplate_sec_box .group_item[cid='"+F+"']").click()});$("#thd_box").delegate(".group_item","click",function(){var i=$(this).attr("cname");var F=$(this).attr("cid");var G=$("#areaBoxInput").attr("lastArea");var j=$("#areaBoxInput").attr("lastAreaType");if(j!=null&&j=="thd"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(G,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+i);$("#areaBoxInput").attr("lastArea","-"+i);$("#areaBoxInput").attr("lastAreaType","thd");$("#areaBoxInput").attr("area3",F);$("#areaBox2").hide();$("#mallShipTemplate_thd_box .group_item[cid='"+F+"']").click()})}$(".addrMsg_default, .addrMsg").click(function(){var I=$(this).attr("_item");$(this).find(".selected").show();if($(this).parent().find(".addrMsg_default").hasClass("isDefault")){$(this).parent().find(".addrMsg_default").attr("class","addrMsg isDefault")}else{$(this).parent().find(".addrMsg_default").attr("class","addrMsg notDefault")}if($(this).hasClass("isDefault")){$(this).attr("class","addrMsg_default isDefault")}else{$(this).attr("class","addrMsg_default notDefault")}$(this).parent().find(".addrMsg_default, .addrMsg").each(function(){if($(this).attr("_item")!=I){$(this).find(".selected").hide()}});var G=c[I];if(G.addr_info!=null){var K=G.addr_info["isCus"];if(!K){var N="";var L="";var J="";var F="";if(v==2052||v==1028){N=site_cityUtil.getInfo(G.addr_info.countyCode).name;L=site_cityUtil.getInfo(G.addr_info.cityCode).name;J=site_cityUtil.getInfo(G.addr_info.provinceCode).name;F=site_cityUtil.getInfo(G.addr_info.streetCode).name}else{N=site_cityUtil.getInfoEn(G.addr_info.countyCode).name;L=site_cityUtil.getInfoEn(G.addr_info.cityCode).name;J=site_cityUtil.getInfoEn(G.addr_info.provinceCode).name;F=site_cityUtil.getInfoEn(G.addr_info.streetCode).name}if(G.addr_info.provinceCode==990000){$("#mallShipTemplate_areaBoxInput").attr("isOs",1);$("#mallShipTemplate_allArea").val("os");$("#mallShipTemplate_allArea").change()}else{$("#mallShipTemplate_areaBoxInput").attr("isCn",1);$("#mallShipTemplate_allArea").val("cn");$("#mallShipTemplate_allArea").change()}$("#mallShipTemplate_areaBoxInput").attr("area1",G.addr_info.provinceCode);$("#mallShipTemplate_areaBoxInput").attr("area2",G.addr_info.cityCode);$("#mallShipTemplate_areaBoxInput").attr("area3",G.addr_info.countyCode);$("#mallShipTemplate_areaBoxInput").attr("area4",G.addr_info.streetCode);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+N);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[pid='"+G.addr_info.provinceCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+G.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+G.addr_info.countyCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+G.addr_info.streetCode+"']").click()},0)},0)},0)},0);$("#streetAddress").val(G.addr_info.streetAddr)}else{setTimeout(function(){$("#mallShipTemplate_allArea").val(G.addr_info.provinceCode);$("#mallShipTemplate_allArea").change();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+G.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+G.addr_info.countyCode+"']").click()},0)},0)},0);$("#streetAddress").val(G.addr_info.streetAddr)}}for(var H=0;H2){$(".addrMsgList").attr("style","cursor:pointer;height:300px;width:690px;")}else{$(".addrMsgList").attr("style","cursor:pointer;height:150px;")}}function t(j){var i="";i+="
    ";$.each(j,function(F,G){if(v==2052||v==1028){i+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(G.id).name)+"
    "}else{i+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(G.id).name)+"
    "}});i+="
    ";return i}function m(j){var i="";i+="
    ";$.each(j,function(F,G){if(v==2052||v==1028){i+="
    "+site_cityUtil.getInfo(G.id).name+"
    "}else{i+="
    "+site_cityUtil.getInfoEn(G.id).name+"
    "}});i+="
    ";return i}function w(j){var i="";i+="
    ";$.each(j,function(F,G){if(v==2052||v==1028){i+="
    "+site_cityUtil.getInfo(G.id).name+"
    "}else{i+="
    "+site_cityUtil.getInfoEn(G.id).name+"
    "}});i+="
    ";return i}function k(j){var i="";var F=false;$.each(r,function(G,H){if(F){return}if(H.id==j){i=H.name;F=true}});return i}function z(j){var i=[];$.each(r,function(F,G){if(G.parentId==j){i.push(G)}});return i}function d(i){if(isNaN(i)){return""}var F=parseInt(i);var j="";$.each(z(F),function(G,H){j+="
    "+H.name+"
    "});return j}};Site.changePayModePopup=function(a,c){var e="g_stress";if($("#changePayMode").hasClass("mDetailStyleFlag")){e="mDetail_hover_color"}$("#changePayMode").hover(function(){$("#changePayMode").addClass(e)},function(){$("#changePayMode").removeClass(e)});$("#changePayMode").on("click",function(){var i=[];i.push("
    ");i.push("
    ");i.push(LS.choosePayment);i.push("
    ");if(c.length>3){i.push("
    ")}else{i.push("
    ")}$.each(c,function(j,l){var k=d(l);if(k){i.push("
    ");i.push("
    ");i.push("
    ");i.push("
    ")}});i.push("
    ");i.push("
    ");i.push("
    ");i.push(LS.goAndPay);i.push("
    ");i.push("
    ");i.push("
    ");var h={};if(c.length>3){h.height=295}else{h.height=250}h.width=500;h.htmlContent=i.join("");var g=Site.popupBox(h);g.find(".J_payMode").on("click",function(){$(".J_payModepop").find(".J_payMode").removeClass("selected");$(".J_payModepop").find(".selected1").remove();$(this).addClass("selected");$(this).append("
    ")});$("#payModeBtn").on("click",function(){var j=$(".J_payModepop").find(".selected").attr("_data");if(!j){Fai.ing(LS.selectPaymentFirst,true);return}var k={};k.payMode=j;$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setorder",data:"id="+a+"&info="+$.toJSON(k),dataType:"json",error:function(){Fai.ing(LS.mallStlSubmitError)},success:function(l){if(l.success){var m=b();if(m){var n;if(j==3){n="tenpay.jsp@orderid="+a}else{if(j==4||j==5||j==6||j==12){n="alipay.jsp@orderid="+a}else{if(j==7){n="paypal.jsp@orderid="+a}else{if(j==9){n="cbpay.jsp@orderid="+a}else{if(j==10){Site.getWxpayUrl(a);g.find(".popupBClose").click();return}else{Site.getTopWindow().location.reload();return}}}}}Site.getTopWindow().location.href=n}}else{Fai.ing(l.msg)}}})})});function d(g){if(g==2){return"bank"}else{if(g==3){return"tenpay"}else{if(g==4||g==5||g==6||g==8||g==12||g==13){return"alipay"}else{if(g==7){return"paypal"}else{if(g==9){return"pm"}else{if(g==10||g==11){return"wxpay"}}}}}}}function b(){var g=true;$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=checkorder",data:"orderId="+a,async:false,dataType:"json",error:function(){Fai.ing(LS.mallStlSubmitError)},success:function(h){if(!h.success){g=false;if(h.rt==-3){Fai.ing(LS.mallStlSubmitNotFound)}else{if(h.rt==-9){Fai.ing(LS.mallStlSubmitStatusError)}else{if(h.rt==Site.MallAjaxErrno.outOfMallAmount){Fai.ing(Fai.format(LS.mallAmountOverNameList,h.productsName))}else{if(h.rt==Site.MallAjaxErrno.OutOfAllowAmount){Fai.ing(Fai.format(LS.allowAmountOverNameList,h.productsName))}else{if(h.rt==Site.MallAjaxErrno.payDomainError){Fai.ing(LS.mallPayDomainError)}else{if(h.rt==Site.MallAjaxErrno.notAdded){Fai.ing(LS.mallProductNotAdded)}else{Fai.ing(LS.mallStlSubmitError)}}}}}}}}});return g}};Site.initPayOrder=function(a){var b=new Site.payOrder(a);b.init()};Site.payOrder=function(a){this.orderId=a};(function(g,a,c){var h=a.prototype;var b,i=g(".dtlSubmit"),d=g(".detailMsg");h.init=function(){b=this.orderId;j()};function j(){i=g(".dtlSubmit"),d=g(".detailMsg");i.on("click",function(){var k=e(b);if(k){var l=g(this).attr("_href");if(l!="WXPAY"){Site.getTopWindow().location.href=l}else{Site.getWxpayUrl(b)}}})}function e(){var k=true;g.ajax({type:"post",url:"ajax/order_h.jsp@cmd=checkorder",data:"orderId="+b,async:false,dataType:"json",error:function(){Fai.ing(LS.mallStlSubmitError)},success:function(l){if(!l.success){k=false;if(l.rt==-3){d.html(LS.mallStlSubmitNotFound)}else{if(l.rt==-9){d.html(LS.mallStlSubmitStatusError)}else{if(l.rt==Site.MallAjaxErrno.outOfMallAmount){d.html(Fai.format(LS.mallAmountOverNameList,l.productsName))}else{if(l.rt==Site.MallAjaxErrno.OutOfAllowAmount){d.html(Fai.format(LS.allowAmountOverNameList,l.productsName))}else{if(l.rt==Site.MallAjaxErrno.payDomainError){d.html(LS.mallPayDomainError)}else{if(l.rt==Site.MallAjaxErrno.notAdded){d.hide();var m=["
    ","
    ","
    "+LS.mallProductNotAdded+"
    ","
    "];tip=g(m.join(""));module.prepend(tip);tip.find(".J-close").click(function(){tip.remove()});tip.css({top:20,left:(module.width()-tip.width())/2})}else{d.html(LS.mallStlSubmitError)}}}}}}d.show()}}});return k}})(jQuery,Site.payOrder);Site.initModuleMallShipTemplate=function(C,D,d,F,p,e,b,v,s,g){var l=F.vType||1,x=F.sco||0,i=F.openItemList;var u="-----------",B=[],n,E,r,z,G,q,A;var k=true;var o="";o+="
    ";$.each(site_cityUtil.getAreaGroupsPinYin(),function(H,I){o+="
    ";o+="
    "+I[0]+"
    ";o+="
    ";$.each(I[1],function(K,J){if(v==2052||v==1028){o+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(J).name)+"
    "}else{o+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(J).name)+"
    "}});o+="
    ";o+="
    ";o+="
    "});$("#mallShipTemplate_areaBox1 .pv_content").html("").append(o);var a=$(".J_isOldStyle").length>0;if(a){$("#mallShipTemplate_allArea").parents(".shipList").css("overflow","visible")}$(document).unbind("click.forAreaBox4").bind("click.forAreaBox4",function(){$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_areaBox2").hide()});$("#mallShipTemplate_areaBox1,#mallShipTemplate_areaBox2").unbind("click.forAreaBox2").bind("click.forAreaBox2",function(H){j(H)});function j(H){if(H.stopPropagation){H.stopPropagation()}else{H.cancelBubble=true}}$("#mallShipTemplate_allArea").change(function(){if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="os"){$("#mallShipTemplate_areaBoxInput").hide();$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_areaBox2").hide()}else{$("#mallShipTemplate_areaBoxInput").show()}if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()==""){return}$("#mallShipTemplate_areaBoxInput").attr("isCn",0);$("#mallShipTemplate_areaBoxInput").attr("isCus",0);$("#mallShipTemplate_areaBoxInput").attr("isOs",0);$("#mallShipTemplate_areaBoxInput").attr("area1","");$("#mallShipTemplate_areaBoxInput").attr("area2","");$("#mallShipTemplate_areaBoxInput").attr("area3","");$("#mallShipTemplate_areaBoxInput").attr("area4","");if($("#mallShipTemplate_allArea").val()=="cn"){$("#mallShipTemplate_areaBoxInput").attr("isCn",1);$("#mallShipTemplate_areaBox1 .pv").click();$("#mallShipTemplate_areaBox1 .city_content").remove();$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();$("#mallShipTemplate_areaBoxInput").val("")}else{if($("#mallShipTemplate_allArea").val()=="os"){$("#mallShipTemplate_areaBoxInput").attr("isOs",1);$("#mallShipTemplate_areaBoxInput").attr("area1",990000);$("#mallShipTemplate_areaBoxInput").attr("area2",990100);$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBox1").find(".group_item[pid='990000']").text());Site.mallStlCalcTotal(C)}else{$("#mallShipTemplate_areaBoxInput").attr("isCus",1);$("#mallShipTemplate_areaBoxInput").attr("area1",$("#mallShipTemplate_allArea").val());$("#mallShipTemplate_areaBox2 .sec_content").html("");$("#mallShipTemplate_areaBox2 .thd_content").html("");$("#mallShipTemplate_areaBoxInput").val("")}}if($("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){return}var H=c($("#mallShipTemplate_allArea").val());$("#mallShipTemplate_sec_box .sec_content").append(H);$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+$("#mallShipTemplate_allArea option[value='"+$("#mallShipTemplate_allArea").val()+"']").text());var I=$("#mallShipTemplate_allArea").val();k=false;if(D===0&&g){Site.mallStlCalcTotal(C);return}$.each(i,function(K,M){if(x){var L=false,J=F.scrl||[];$.each(J,function(O,N){if(N.st===M.type){var P=false;if(k){P=$.inArray(parseInt(I),N.arl)>-1}else{P=$.inArray(parseInt(I),N.carl)>-1}if(P){if(N.fc===1){if(l===1){if(D>=N.d1){L=true;return false}}else{if(D<=N.d1){L=true;return false}}}if(N.fc===2){if(d>=N.d2){L=true;return false}}if(N.fc===3){if(l===1){if(D>=N.d1&&d>=N.d2){L=true;return false}}else{if(D<=N.d1&&d>=N.d2){L=true;return false}}}if(N.fc===4){if(l===1){if(D>=N.d1||d>=N.d2){L=true;return false}}else{if(D<=N.d1||d>=N.d2){L=true;return false}}}}}});if(L){$("#template_item_money"+M.type).html("").html(LS.freeShipping);$("#template_item_"+M.type).attr("price",0);return}}if(!M.regionList||M.regionList.length<=0){$("#template_item_money"+M.type).html("").html((p+M.defaultPrice.toFixed(2)));$("#template_item_"+M.type).attr("price",M.defaultPrice.toFixed(1));return true}$.each(M.regionList,function(T,W){var O=false;if(k){O=$.inArray(parseInt(I),W.areaList)<0}else{O=$.inArray(parseInt(I),W.cusAreaList)<0}if(O){$("#template_item_money"+M.type).html("").html((p+M.defaultPrice.toFixed(2)));$("#template_item_"+M.type).attr("price",M.defaultPrice.toFixed(1));return true}var S=0,P=W.price,U=W.rha==null?1:W.rha,V=W.ria==null?1:W.ria,Q=W.rip||0;var R=D;if(U>0){S=P;R-=U}if(V>0&&R>0){var N=(R/V).toFixed(1);N=Math.ceil(N);S+=Q*N}$("#template_item_money"+M.type).html("").html((p+S.toFixed(2)));$("#template_item_"+M.type).attr("price",S.toFixed(1));return false})});Site.mallStlCalcTotal(C)});$("#mallShipTemplate_areaBoxInput").unbind("click").bind("click",function(H){if($("#mallShipTemplate_allArea").val()=="cn"){$("#mallShipTemplate_areaBox1").toggle();$("#mallShipTemplate_areaBox2").hide();$("#mallShipTemplate_province_box").show();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()}else{if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()=="os"){}else{$("#mallShipTemplate_areaBox2").toggle();$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_sec_box").show();$("#mallShipTemplate_thd_box").hide()}}j(H)});$("#mallShipTemplate_areaBox1 .J_areaHead .pv").click(function(){$("#mallShipTemplate_province_box").show();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()});$("#mallShipTemplate_areaBox1 .J_areaHead .city").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").show();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()});$("#mallShipTemplate_areaBox1 .J_areaHead .county").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_street_box").hide();$("#mallShipTemplate_county_box").show()});$("#mallShipTemplate_areaBox1 .J_areaHead .street").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").show()});$("#mallShipTemplate_areaBox2 .J_areaHead2 .sec").click(function(){$("#mallShipTemplate_sec_box").show();$("#mallShipTemplate_thd_box").hide()});$("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click(function(){$("#mallShipTemplate_sec_box").hide();$("#mallShipTemplate_thd_box").show()});$("#mallShipTemplate_province_box .group_item").bind("click",function(){$("#mallShipTemplate_areaBox1 .city_content").remove();$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();var H=$(this).attr("pname");var I=$(this).attr("pid");$("#mallShipTemplate_areaBox1 .J_areaHead .city").click();$("#mallShipTemplate_areaBoxInput").val("");$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+H);$("#mallShipTemplate_areaBoxInput").removeAttr("lastArea");$("#mallShipTemplate_areaBoxInput").removeAttr("lastAreaType");$("#mallShipTemplate_areaBoxInput").attr("area1",I);$("#mallShipTemplate_areaBoxInput").attr("area2","");$("#mallShipTemplate_areaBoxInput").attr("area3","");$("#mallShipTemplate_areaBoxInput").attr("area4","");$("#mallShipTemplate_areaBox1 .city_content").remove();var J=t(site_cityUtil.getCities(I));$("#mallShipTemplate_city_box").append(J);$.each(i,function(K,L){$("#template_item_"+L.type).attr("price",L.defaultPrice.toFixed(1))});Site.mallStlCalcTotal(C)});$("#mallShipTemplate_city_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){k=true}else{k=false}$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();var H=$(this).attr("cname");var J=$(this).attr("cid");$("#mallShipTemplate_areaBox1 .J_areaHead .county").click();var L=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var I=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(I!=null&&I!=""){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","city");$("#mallShipTemplate_areaBoxInput").attr("area2",J);$("#mallShipTemplate_areaBoxInput").attr("area3","");$("#mallShipTemplate_areaBoxInput").attr("area4","");$("#mallShipTemplate_areaBox1 .county_content").remove();var K=m(site_cityUtil.getCounty(J));$("#mallShipTemplate_county_box").append(K);if(D===0&&g){Site.mallStlCalcTotal(C);return}$.each(i,function(N,P){if(x){var O=false,M=F.scrl||[];$.each(M,function(R,Q){if(Q.st===P.type){var S=false;if(k){S=$.inArray(parseInt(J),Q.arl)>-1}else{S=$.inArray(parseInt(J),Q.carl)>-1}if(S){if(Q.fc===1){if(l===1){if(D>=Q.d1){O=true;return false}}else{if(D<=Q.d1){O=true;return false}}}if(Q.fc===2){if(d>=Q.d2){O=true;return false}}if(Q.fc===3){if(l===1){if(D>=Q.d1&&d>=Q.d2){O=true;return false}}else{if(D<=Q.d1&&d>=Q.d2){O=true;return false}}}if(Q.fc===4){if(l===1){if(D>=Q.d1||d>=Q.d2){O=true;return false}}else{if(D<=Q.d1||d>=Q.d2){O=true;return false}}}}}});if(O){$("#template_item_money"+P.type).html("").html(LS.freeShipping);$("#template_item_"+P.type).attr("price",0);return}}if(!P.regionList||P.regionList.length<=0){$("#template_item_money"+P.type).html("").html((p+P.defaultPrice.toFixed(2)));$("#template_item_"+P.type).attr("price",P.defaultPrice.toFixed(1));return true}$.each(P.regionList,function(W,Z){var R=false;if(k){R=$.inArray(parseInt(J),Z.areaList)<0}else{R=$.inArray(parseInt(J),Z.cusAreaList)<0}if(R){$("#template_item_money"+P.type).html("").html((p+P.defaultPrice.toFixed(2)));$("#template_item_"+P.type).attr("price",P.defaultPrice.toFixed(1));return true}var V=0,S=Z.price,X=Z.rha==null?1:Z.rha,Y=Z.ria==null?1:Z.ria,T=Z.rip||0;var U=D;if(X>0){V=S;U-=X}if(Y>0&&U>0){var Q=(U/Y).toFixed(1);Q=Math.ceil(Q);V+=T*Q}$("#template_item_money"+P.type).html("").html((p+V.toFixed(2)));$("#template_item_"+P.type).attr("price",V.toFixed(1));return false})});Site.mallStlCalcTotal(C)});$("#mallShipTemplate_county_box").delegate(".group_item","click",function(){$("#mallShipTemplate_areaBox1 .street_content").remove();var I=$(this).attr("cname");var K=$(this).attr("cid");var M=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var J=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");$("#mallShipTemplate_areaBox1 .J_areaHead .street").click();if(J!=null&&(J=="street"||J=="county")){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-",$("#mallShipTemplate_areaBoxInput").val().indexOf("-")+1)))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+I);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+I);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");$("#mallShipTemplate_areaBoxInput").attr("area3",K);$("#mallShipTemplate_areaBoxInput").attr("area4","");var H=w(site_cityUtil.getStreet(K));var L=$(H).html();if(L===null||L===undefined||L===""){$("#mallShipTemplate_areaBox1").hide()}$("#mallShipTemplate_street_box").append(H);Site.mallStlCalcTotal(C)});$("#mallShipTemplate_street_box").delegate(".group_item","click",function(){var H=$(this).attr("cname");var J=$(this).attr("cid");var K=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var I=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(I!=null&&I=="street"){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().replace(K,""))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","street");$("#mallShipTemplate_areaBoxInput").attr("area4",J);$("#mallShipTemplate_areaBox1").hide();Site.mallStlCalcTotal(C)});$("#mallShipTemplate_sec_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){k=true}else{k=false}$("#mallShipTemplate_areaBox2 .thd_content").html("");var H=$(this).attr("cname");var J=$(this).attr("cid");$("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click();var L=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var I=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(I!=null&&I!=""&&$("#mallShipTemplate_areaBoxInput").val().indexOf("-")!=-1){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","sec");$("#mallShipTemplate_areaBoxInput").attr("area2",J);$("#mallShipTemplate_areaBoxInput").attr("area3","");var K=c(J);$("#mallShipTemplate_thd_box .thd_content").append(K);if(D===0&&g){Site.mallStlCalcTotal(C);return}$.each(i,function(N,P){if(x){var O=false,M=F.scrl||[];$.each(M,function(R,Q){if(Q.st===P.type){var S=false;if(k){S=$.inArray(parseInt(J),Q.arl)>-1}else{S=$.inArray(parseInt(J),Q.carl)>-1}if(S){if(Q.fc===1){if(l===1){if(D>=Q.d1){O=true;return false}}else{if(D<=Q.d1){O=true;return false}}}if(Q.fc===2){if(d>=Q.d2){O=true;return false}}if(Q.fc===3){if(l===1){if(D>=Q.d1&&d>=Q.d2){O=true;return false}}else{if(D<=Q.d1&&d>=Q.d2){O=true;return false}}}if(Q.fc===4){if(l===1){if(D>=Q.d1||d>=Q.d2){O=true;return false}}else{if(D<=Q.d1||d>=Q.d2){O=true;return false}}}}}});if(O){$("#template_item_money"+P.type).html("").html(LS.freeShipping);$("#template_item_"+P.type).attr("price",0);return}}if(!P.regionList||P.regionList.length<=0){$("#template_item_money"+P.type).html("").html((p+P.defaultPrice.toFixed(2)));$("#template_item_"+P.type).attr("price",P.defaultPrice.toFixed(1));return true}$.each(P.regionList,function(W,Z){var R=false;if(k){R=$.inArray(parseInt(J),Z.areaList)<0}else{R=$.inArray(parseInt(J),Z.cusAreaList)<0}if(R){$("#template_item_money"+P.type).html("").html((p+P.defaultPrice.toFixed(2)));$("#template_item_"+P.type).attr("price",P.defaultPrice.toFixed(1));return true}var V=0,S=Z.price,X=Z.rha==null?1:Z.rha,Y=Z.ria==null?1:Z.ria,T=Z.rip||0;var U=D;if(X>0){V=S;U-=X}if(Y>0&&U>0){var Q=(U/Y).toFixed(1);Q=Math.ceil(Q);V+=T*Q}$("#template_item_money"+P.type).html("").html((p+V.toFixed(2)));$("#template_item_"+P.type).attr("price",V.toFixed(1));return false})});Site.mallStlCalcTotal(C)});$("#mallShipTemplate_thd_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){k=true}else{k=false}var H=$(this).attr("cname");var J=$(this).attr("cid");var K=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var I=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(I!=null&&I=="thd"){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().replace(K,""))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+H);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","thd");$("#mallShipTemplate_areaBoxInput").attr("area3",J);$("#mallShipTemplate_areaBox2").hide();if(D===0&&g){Site.mallStlCalcTotal(C);return}$.each(i,function(M,O){if(x){var N=false,L=F.scrl||[];$.each(L,function(Q,P){if(P.st===O.type){var R=false;if(k){R=$.inArray(parseInt(J),P.arl)>-1}else{R=$.inArray(parseInt(J),P.carl)>-1}if(R){if(P.fc===1){if(l===1){if(D>=P.d1){N=true;return false}}else{if(D<=P.d1){N=true;return false}}}if(P.fc===2){if(d>=P.d2){N=true;return false}}if(P.fc===3){if(l===1){if(D>=P.d1&&d>=P.d2){N=true;return false}}else{if(D<=P.d1&&d>=P.d2){N=true;return false}}}if(P.fc===4){if(l===1){if(D>=P.d1||d>=P.d2){N=true;return false}}else{if(D<=P.d1||d>=P.d2){N=true;return false}}}}}});if(N){$("#template_item_money"+O.type).html("").html(LS.freeShipping);$("#template_item_"+O.type).attr("price",0);return}}if(!O.regionList||O.regionList.length<=0){$("#template_item_money"+O.type).html("").html((p+O.defaultPrice.toFixed(2)));$("#template_item_"+O.type).attr("price",O.defaultPrice.toFixed(1));return true}$.each(O.regionList,function(V,Y){var Q=false;if(k){Q=$.inArray(parseInt(J),Y.areaList)<0}else{Q=$.inArray(parseInt(J),Y.cusAreaList)<0}if(Q){$("#template_item_money"+O.type).html("").html((p+O.defaultPrice.toFixed(2)));$("#template_item_"+O.type).attr("price",O.defaultPrice.toFixed(1));return true}var U=0,R=Y.price,W=Y.rha==null?1:Y.rha,X=Y.ria==null?1:Y.ria,S=Y.rip||0;var T=D;if(W>0){U=R;T-=W}if(X>0&&T>0){var P=(T/X).toFixed(1);P=Math.ceil(P);U+=S*P}$("#template_item_money"+O.type).html("").html((p+U.toFixed(2)));$("#template_item_"+O.type).attr("price",U.toFixed(1));return false})});Site.mallStlCalcTotal(C)});$("#template_item_"+e.type).click();function t(I){var H="";H+="
    ";$.each(I,function(J,K){if(v==2052||v==1028){H+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(K.id).name)+"
    "}else{H+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(K.id).name)+"
    "}});H+="
    ";return H}function m(I){var H="";H+="
    ";$.each(I,function(J,K){if(v==2052||v==1028){H+="
    "+site_cityUtil.getInfo(K.id).name+"
    "}else{H+="
    "+site_cityUtil.getInfoEn(K.id).name+"
    "}});H+="
    ";return H}function w(I){var H="";H+="
    ";$.each(I,function(J,K){if(v==2052||v==1028){H+="
    "+site_cityUtil.getInfo(K.id).name+"
    "}else{H+="
    "+site_cityUtil.getInfoEn(K.id).name+"
    "}});H+="
    ";return H}function h(I){var H="";var J=false;$.each(s,function(K,L){if(J){return}if(L.id==I){H=L.name;J=true}});return H}function y(I){var H=[];$.each(s,function(J,K){if(K.parentId==I){H.push(K)}});return H}function c(H){if(isNaN(H)){return""}var J=parseInt(H);var I="";$.each(y(J),function(K,L){I+="
    "+L.name+"
    "});return I}};Site.initPresentIpt=function(){var a=$("#useItg");if(a.length>0){a.bind("blur",function(){var i=parseInt(a.attr("_needitg"));var g=parseInt(a.val());var l=a.attr("_itgname");var k=parseInt(a.attr("_maxuse"));var b=0;if(isNaN(g)){g=0}var c=$(this).attr("moduleId");var d=Fai.top.$("#module"+c);var h=parseFloat(d.find(".cartTotal").attr("pay_price"));if(isNaN(h)){return}if($("#couponList").length>0&&$("#couponList input:checkbox").is(":checked")){var j=0;if($("#couponOffsetMoney").length>0){var m=$("#couponOffsetMoney").attr("_offsetmoney");if(!isNaN(m)){j=parseInt(m);var n=Math.floor((h-j)*i);if(nk){Fai.ing(Fai.format(LS.integral_maxUse,k,Fai.encodeHtml(l)),true);a.val(k);var e=(k/i).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#offsetMoney").text(Fai.formatPriceEn(e)).attr("_offsetmoney",e)}else{$("#offsetMoney").text(e).attr("_offsetmoney",e)}Site.mallStlCalcTotal(c);return}if(g>parseInt(a.attr("_currentItg"))){Fai.ing(Fai.format(LS.integral_notOverCurrent,Fai.encodeHtml(l),Fai.encodeHtml(l)));a.focus();return}if(g<0){Fai.ing(LS.integral_inputInteger);a.focus();return}else{if(g==0){$("#integralInfo").hide()}else{$("#integralInfo").show()}}var e=(g/i).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#offsetMoney").text(Fai.formatPriceEn(e)).attr("_offsetmoney",e)}else{$("#offsetMoney").text(e).attr("_offsetmoney",e)}if($("#couponList").length>0){$("#couponList input:checkbox").each(function(){var o=parseInt($(this).attr("_minPrice"));if(h-e0){var d=$("#useItg"),g=parseInt(d.attr("_needitg")),i=parseInt(d.attr("_maxuse"));var c=Fai.top.$("#module"+a);var e=parseFloat(c.find(".cartTotal").attr("pay_price"));if(isNaN(e)){return}var l=Math.floor((e-h)*g);if(l0){$("#couponInfo").show()}else{$("#couponInfo").hide()}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#couponOffsetMoney").text(Fai.formatPriceEn(h))}else{$("#couponOffsetMoney").text(h.toFixed(2))}$("#couponOffsetMoney").attr("_offsetmoney",h);Site.mallStlCalcTotal(a)});$("#clickShowInput").click(function(){$(this).next().show();$(this).remove()})};Site.showBankList=function(b){var a=$("#"+b).attr("value");$("#mallPay").attr("value",a)};Site.initOnlineBankList=function(){$("#payOnlinePanel").insertAfter($("#onlineItem")[0])};Site.getWxpayUrl=function(b){var a=$("#wxpayBtn");if(a.attr("_sending")==="true"){Fai.ing("您的操作太频繁,请稍后再试。",true);return}a.attr("_sending","true");$.ajax({type:"post",url:"ajax/mall_h.jsp@cmd=getwxpayurl",data:"orderId="+b,error:function(){Fai.ing("系统错误。")},success:function(c){var d=$.parseJSON(c);if(d.success){Site.showWxQRCode(d.url,b)}else{Fai.ing(d.errMsg+"(请联系网站管理员)")}}})};Site.showWxQRCode=function(a,b){var i=parseInt(Math.random()*10000);var j=480;var d=800;var g=["
    ","
    ","
    ","
    微信支付
    ","","
    ","
    ","
    ","
    ","","
    ","
    ","
    ","
    ","
    ","
    完成支付5秒后没跳转,请刷新页面。
    ","
    "];Fai.top.$(g.join("")).appendTo("body");var e=Fai.top.document.documentElement.clientHeight;var h=(e-j)/2;var c=$(window).scrollTop();$("#wxPayQRCodeDisplay"+i).css("top",h+c);$("#wxpayBtn").attr("_sending","false");setInterval("Site.checkOrderStatue("+b+")",2000)};Site.closeWxQrcodeDiv=function(a){Fai.top.$("#wxpayQrCodeBox"+a).remove();Fai.top.$("#wxPayQRCodeDisplay"+a).remove();top.location.reload()};Site.checkOrderStatue=function(a){$.ajax({type:"post",url:"ajax/mall_h.jsp?cmd=checkOrderStatue",data:"orderId="+a,error:function(){Fai.ing("系统错误。")},success:function(b){var c=$.parseJSON(b);if(c.success){Fai.top.location.href=Site.getHtmlUrl("mdetail")+"?id="+a+"&suc=2"}}})};Site.mallCartInit=function(c){var b=Fai.top.$("#memberBar");if(b.length<1){return}var a=b.find("#mallCart_js");var d=b.find(".mallCartPanel");$(a).find(".mallCartItem").bind("click",function(){window.open(Site.getHtmlUrl("mcart"),"_blank")});$(d).find(".checkMallCartBtn").bind("click",function(){window.open(Site.getHtmlUrl("mcart"),"_blank")});Site.refreshTopAndRightBarMallCartNum();if(c!=13&&c!=14){$(a).bind("mouseenter",function(e){var g=b.find(".mallCartPanel");$(this).attr("_mouseIn",1);$(this).find(".mallCartItem").addClass("mallCartItem_hover");if(!$(g).is(":visible")){Site.refreshTopBarMallCart(this)}}).bind("mouseleave",function(){$(this).attr("_mouseIn",0);setTimeout(function(){var e=b.find(".mallCartPanel");var g=$(e).attr("_mouseIn");if(g!=1){$(e).hide();b.find(".mallCartItem").removeClass("mallCartItem_hover")}},50)});$(d).bind("mouseenter",function(){$(this).attr("_mouseIn",1)}).bind("mouseleave",function(){$(this).attr("_mouseIn",0);setTimeout(function(){var g=Fai.top.$("#memberBar");var e=g.find("#mallCart_js");var h=$(e).attr("_mouseIn");if(h!=1){g.find(".mallCartPanel").hide();g.find(".mallCartItem").removeClass("mallCartItem_hover")}},50)})}};Site.mobiWebInit=function(){var c=Fai.top.$("#memberBar").find("#mobiWeb_js");var b=Fai.top.$("#memberBar").find(".mobiWebPanel");var a=Fai.top.$("#memberBar").find("#mobiWebQRCode_js");$(c).bind("mouseenter",function(g){$(this).attr("_mouseIn",1);$(this).find(".mobiWebItem").addClass("mobiWebItem_hover");var d=parseInt($(c).css("margin-left"));var e=parseInt($(a).css("width"))+2;var h=$(c).position().left+d-e+$(c).width();$(b).css("left",h+"px");$(b).show()}).bind("mouseleave",function(){$(this).attr("_mouseIn",0);setTimeout(function(){var d=Fai.top.$("#memberBar").find(".mobiWebPanel");var e=$(d).attr("_mouseIn");if(e!=1){$(d).hide();Fai.top.$("#memberBar").find(".mobiWebItem").removeClass("mobiWebItem_hover")}},50)});$(b).bind("mouseenter",function(d){$(this).attr("_mouseIn",1)}).bind("mouseleave",function(){$(this).attr("_mouseIn",0);setTimeout(function(){var d=Fai.top.$("#memberBar").find("#mobiWeb_js");var e=$(d).attr("_mouseIn");if(e!=1){Fai.top.$("#memberBar").find(".mobiWebPanel").hide();Fai.top.$("#memberBar").find(".mobiWebItem").removeClass("mobiWebItem_hover")}},50)})};Site.refreshTopBarMallCart=function(a){var d=Fai.top.$("#memberBar").find("#mallCartList_js");var b=$(a).position().top+$(a).height();var c=parseInt($(a).css("margin-left"));var e=$(a).position().left+c-parseInt($(d).css("width"))-2+$(a).width();var g=Fai.top.$("#memberBar").find(".mallCartPanel");$(g).css("top",b+"px").css("left",e+"px");$(g).show().children().before("
    ");if(Fai.isIE6()){var h=$(g).height();$(g).find(".mallCartLoad").css("height",h+"px")}$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=getTopBarMallCartList",data:"",success:function(i){var j=$.parseJSON(i);var l=j.topBarProductList;if(j.success&&l.length>0){Site.refreshTopAndRightBarMallCartNum();Site.createTopBarMallCartList(l,j.orderId,j.choiceCurrencyVal)}else{var k=Fai.top.$("#memberBar").find(".mallCartPanel");Site.refreshTopAndRightBarMallCartNum();$(k).find(".mcProductList").html(LS.memberMallCartNoProduct);$(k).find(".checkMallCartBtn").removeClass("checkMallCartBtn_hasPro");$(k).find(".mall_cart_total").remove()}Fai.top.$("#memberBar").find(".mallCartPanel").find(".mallCartLoad").remove()}})};Site.createTopBarMallCartList=function(c,a,l){Fai.top.$("#memberBar").find(".mcProductList").attr("data-orderId",a).html("");var j=[];var b=0,n=0;var h=0;for(var i in c){b+=c[i].amount}for(i=0;i");k.push("
    ");k.push(Fai.format(LS.shoppingCartCalculatePro,b));k.push("
    ");k.push("
    ");if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){k.push(""+LS.shoppingCartCountMoney+""+l.toString()+Fai.formatPriceEn(n.toFixed(2))+"")}else{k.push(""+LS.shoppingCartCountMoney+""+l.toString()+n.toFixed(2)+"")}k.push("
    ");k.push("
    ");j.push("
      ");j.push("
      "+LS.memberMallCartJoin+":
      ");for(var i in c){var d=c[i];var e=d.amount;if(h==5){break}b=b-e;g(d);h++}j.push("
    • ");Fai.top.$("#memberBar").find(".checkMallCartBtn").css("margin-top","12px");j.push("
    ");Fai.top.$("#memberBar").find(".mcProductList").append(j.join(""));Fai.top.$("#memberBar").find(".mall_cart_total").remove();Fai.top.$("#memberBar").find(".mcProductList").after(k.join(""));var m=[];Fai.top.$("#memberBar").find(".mcProductList .mcPdInvalid").each(function(){m.push($(this).prop("outerHTML"));$(this).remove()});Fai.top.$("#memberBar").find(".mcProductListTip").before(m.join(""));Fai.top.$("#memberBar").find(".checkMallCartBtn").addClass("checkMallCartBtn_hasPro");function g(t){var u=d.isValid?"":" mcPdInvalid ";var q=d.inValidType;var r=[];if(d.picId!=""){r.push("
    ");r.push(""+Fai.encodeHtml(d.name)+"");r.push("
    ")}else{r.push("
    ")}var p="";if(u!=""){if(q=="notAdded"||q=="delete"){p="title='"+LS.notAdded+"'";r.push("
    "+LS.notAdded+"
    ")}else{if(q=="outOfStock"){p=" title='"+LS.invalid+"' ";r.push("
    "+LS.invalid+"
    ")}}}var o=t.amount;if(t.amount>9999){o=(o+"").substring(0,3)+"..."}j.push("
  • ");j.push(r.join(""));j.push("
    ");j.push(""+Fai.encodeHtml(d.name)+"");j.push("
    ");j.push("");j.push("
    ");var s=d.price.toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){s=Fai.formatPriceEn(d.price)}if(u){j.push(""+l.toString()+s+"")}else{j.push(""+l.toString()+s+"")}j.push("×"+o+"");j.push("
    ");j.push("
  • ")}};Site.delTopBarMallCartItem=function(a,b){$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=delItem",data:{orderId:a,itemId:b,isTopBarMallCart:true},error:function(c){var d=$.parseJSON(c);if(!d.success){Fai.ing("系统繁忙,请稍后重试。",true)}},success:function(c){var e=$.parseJSON(c);if(e.success){var d=Fai.top.$("#memberBar").find("#mallCart_js");$(d).find("[data-itemId="+b+"]").first().remove();Site.refreshTopBarMallCart(d)}else{if(e.rt==-2){Fai.ing("参数错误,请稍后重试。",true)}}}})};Site.refreshTopAndRightBarMallCartNum=function(){$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=getMallCartProductNum",data:"",success:function(a){var g=$.parseJSON(a);if(g.success){if(g.rt==1){var e=$.trim(g.productAmount);var c=Fai.top.$("#memberBar").find("#mallCart_js");if(c.length>0){e=(e>99)?"99+":e;$(c).find(".mallCart_proNum").text("("+e+")")}var h=Fai.top.$(".shoppingAmount");var b=Fai.top.$(".shoppingAmountContent");if(e>0||e=="99+"){h.css("display","block").text(e);b.css("display","block")}else{h.css("display","none").text(e);b.css("display","none")}var d=Fai.top.$("#J_WebRightBar").find("#rbar_cart");if(d.length>0){if(e=="99+"){$(d).find(".fk-rbar-cartItem-cirNum").text("...")}else{$(d).find(".fk-rbar-cartItem-cirNum").text(e)}}}}}})};Site.showContacterExtMsg=function(g){var e=$("#module"+g),h=e.find(".J-head-more"),b=e.find(".J-cont-msg-ext"),a=e.find(".fk-order-dt").width(),c=b.width(),d=a-h.position().left;h.hover(function(){b.css({top:h.position().top+h.height()+14});if(d>=c){b.css({left:h.position().left-140})}else{b.find(".cont-tri").css({left:c-50});b.css({left:h.position().left-(c-d)-10})}b.show()},function(){b.hide()})};Site.showOrderNewMoreBox=function(d){var c=$("#module"+d),e=c.find(".J_orderRecvMore"),b=c.find(".J_orderNewMoreBox"),a=c.find(".J_orderRecvMoreIcon");if(b.find("table tr").length==0){return}e.click(function(){if(b.is(":hidden")){a.removeClass("orderRecvMoreIconDown");a.addClass("orderRecvMoreIconUp")}else{a.addClass("orderRecvMoreIconDown");a.removeClass("orderRecvMoreIconUp")}b.slideToggle()})};Site.initFlowMsg=function(c,a){var b=$("#module"+c);$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=flowmsg",data:"id="+a,success:function(e){var h=$.parseJSON(e);b.find(".J-ajaxLoad").hide();if(h.msgList==null||h.msgList.length===0||!h.success){if(h.success){b.find(".J-no-msg").show()}else{Fai.ing(h.msg,true);b.find(".J-err-msg").show()}var k=b.find(".mDetail_color").css("color");b.find(".noFlowMsgTip").css("color",k)}else{var l="",i="",d=[];d.push("
      ");var g=b.find(".mDetailOld").length>0,j=0;$.each(h.msgList,function(m,n){l="";i="";if(m===j){l=" class='mDetail_color lastFlowMsgLine'";if(g){l=" class='lastFlowMsgLine g_stress'"}i=" mDetail_bg"}d.push("");d.push("");d.push(""+n.time+"");d.push(""+n.context+"");d.push("")});d.push("
    ");b.find(".J-flow-msg").append(d.join(""));if(g){var k=b.find(".lastFlowMsgLine").css("color");b.find(".lastFlowMsgLine .circlePoint").css("background-color",k)}}}})};Site.initmCenterFlowQuery=function(b){var a=$("#module"+b),c=a.find(".J-mallOrder");c.find(".J-flow").hover(function(){var m=$(this),h=m.attr("_oi"),i=m.offset().top+m.outerHeight()+8,n=m.offset().left-100,k=$("#m"+b+"-f-"+h);if(k.length>0){k.show();if(Fai.isIE6()||Fai.isIE7()){i+=10}k.css({top:i,left:n});return true}var e=m.attr("_fn"),g=m.attr("_fnu");var d=$(this).attr("_colorStyleType");var j=$(this).attr("_colorStyle");var l=["
    ","
    ","
    ","",e,"","",LS.flowBill,g,"","
    ","
     
    ","
    ",LS.flowNoMsg,"
    ","
    ","
    "];k=$(l.join(""));k.appendTo("body");$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=flowMsg",data:"id="+h,success:function(p){var r=$.parseJSON(p);k.find(".J-ajaxLoad").hide();if(r.msgList==null||r.msgList.length===0||!r.success){k.find(".J-no-msg").show()}else{var o=[];o.push("
      ");if(r.msgList.indexOf("http")<0){for(var q=0;q");o.push("
      "+s.context+"
      ");o.push("
      "+s.time+"
      ");o.push("");if(q===2){break}}o.push("
    ");k.find(".J-flow-msg").append(o.join(""))}}if(r.success){}else{Fai.ing(r.msg,true)}}})},function(){var e=$(this),d=e.attr("_oi");$("#m"+b+"-f-"+d).hide()})};Site.initOrderSuc=function(e){var d=Fai.getUrlParam(Fai.top.location.href,"suc");if(!d||d<1){return}var c=$("#module"+e);var b="";if(d==1){b=LS.orderDetailSubmitSuc}else{if(d==2){b=LS.orderDetailPaySuc}}var a=["
    ","
    ","
     
    ","
    "+b+"
    ","
    "];tip=$(a.join(""));c.prepend(tip);tip.find(".J-close").click(function(){tip.remove()});tip.css({top:20,left:(c.width()-tip.width())/2});tip.fadeOut(5000);Fai.top.window.setTimeout(function(){tip.remove()},5000)};Site.initConfirmReceipt=function(c,d){var b=$("#module"+c);var a=b.find(".memberOrderNewPanel").length>0;b.find(".J-con-rpt").click(function(){var j=$(this),g=j.parent().parent();orderId=j.attr("_oid");var h=["
    ","
    ",LS.orderConfirmMsg,"
    ","
    ","",LS.cancel,"",""+LS.orderSure+"","
    ","
    "];var l=parseInt(Math.random()*10000);var e={boxId:l,title:"",htmlContent:h.join(""),width:372,height:150,boxName:"confirmReceipt"};var i=Site.popupBox(e);var k="cmd=setStatus&id="+orderId+"&status=20";i.find(".J-rpt-save").on("click",function(){$.ajax({type:"post",url:"ajax/order_h.jsp",data:k,error:function(){Fai.ing(LS.systemError,false)},success:function(m){var n=$.parseJSON(m);if(n.success){if(d){if(a){g.find(".oOptTd").append("")}else{g.find(".itemOpt").append("");Site.initPdComment(c)}}Fai.ing(LS.orderSureMsg,true);g.find(".J-status").text(n.msg);g.find(".J-flow").remove();Fai.top.$("#popupBg"+l).remove();i.remove();j.remove()}else{Fai.ing(n.msg,true)}}})})})};Site.initConOrderCancel=function(b,c){var a=$("#module"+b);if(!c){a.find(".J-order-cancel").hover(function(){var d=$(this);d.attr("class","order-cancel-hover")},function(){var d=$(this);d.attr("class","order-cancel")})}a.find(".J-order-cancel").click(function(){var i=$(this),e=i.parent().parent();orderId=i.attr("_oid");var g=["
    ","
    ",LS.orderCancelMsg,"
    ","
    ","",LS.cancel,"",""+LS.confirm+"","
    ","
    "];var k=parseInt(Math.random()*10000);var d={boxId:k,title:"",htmlContent:g.join(""),width:360};var h=Site.popupBox(d);var j="cmd=setStatus&id="+orderId+"&status=25";h.find(".J-rpt-save").on("click",function(){$.ajax({type:"post",url:"ajax/order_h.jsp",data:j,error:function(){Fai.ing(LS.systemError,false)},success:function(l){var m=$.parseJSON(l);if(m.success){Fai.ing(LS.orderCanceled,true);setTimeout(function(){document.location.reload()},200)}else{Fai.ing(m.msg,true)}}})})})};Site.initPdComment=function(b){var a=$("#module"+b);a.find(".J-pd-ct").unbind("click").bind("click",function(){var e=$(this),c=e.attr("_oid"),d=a.find(".J-pd-panel"+c),g=d.find(".msgImgList");if(Fai.isIE6()){g.css("display","none")}if(d.is(":visible")){d.hide()}else{d.show();if(Fai.isIE6()){setTimeout(function(){g.css({display:"block"});var h=g.find("td");if(typeof(h)!="undefined"&&h!=null){g.find("td").eq(0).find("div").click()}},20)}}})};Site.commMenUpAllImgList=null;Site.setMenCommUpAllImgList=function(a){Site.commMenUpAllImgList=Fai.fkEval("("+a+")");if(Fai.isIE6()||Fai.isIE7()){$(".msgBoard_upImg_border").css({width:"50px",height:"50px"})}};Site.siteMenCommImgFileUpload2=function(b,e,h,a,d){if(!Fai.isIE()){Site.siteMenCommImgFileUpload2H5(b,e,h,a,d);return}var g=h.split(",");var c={file_post_name:"Filedata",upload_url:"ajax/commupsiteimg_h.jsp",button_placeholder_id:e,file_size_limit:b+"MB",button_image_type:3,file_queue_limit:a,button_width:"50px",button_height:"50px",button_cursor:SWFUpload.CURSOR.HAND,button_image_url:_resRoot+"/image/site/msgupimg/upload1.jpg",requeue_on_error:false,post_params:{ctrl:"Filedata",app:21,type:0,fileUploadLimit:5,isSiteForm:true},file_types:g.join(";"),file_dialog_complete_handler:function(i){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(j,i,k){switch(i){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Fai.ing(LS.siteFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Fai.ing(LS.siteFormSubmitFileUploadNotAllow,true);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Fai.ing(Fai.format(LS.siteFormSubmitFileUploadOneTimeNum,a),true);break;default:Fai.ing(LS.siteFormSubmitFileUploadReSelect,true);break}},upload_success_handler:function(j,i){var k=jQuery.parseJSON(i);this._allSuccess=k.success;this._sysResult=k.msg;if(k.success){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(j.name)),true);k.tbNum=d;onFileUploadEvent("upload",k)}else{Fai.ing(LS.siteFormSubmitFileUploadFile+j.name+" "+k.msg)}},upload_error_handler:function(j,i,k){if(i==-280){Fai.ing(LS.siteFormSubmitFileUploadFileCancle,false)}else{if(i==-270){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadFileExist,Fai.encodeHtml(j.name)),true)}else{Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(j.name)))}}},upload_complete_handler:function(j){if(j.filestatus==SWFUpload.FILE_STATUS.COMPLETE){if(a==null||typeof(a)=="undefined"){a=5}var k=$("#msgBoardAddImgTb"+d).eq(0);var i=k.find("td").length;if(i>=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var l=k.find("td").eq(k.find("td").length-1);l.css("display","none");return}if(typeof(swfObjList)=="undefined"){swfObjList={}}swfObj=swfObjList[d];setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(j.filestatus==SWFUpload.FILE_STATUS.ERROR){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(j.name)))}}},upload_start_handler:function(i){Fai.enablePopupWindowBtn(0,"save",false);Fai.ing(LS.siteFormSubmitFileUploadPrepare,false)},view_progress:function(i,l,k,j){Fai.ing(LS.siteFormSubmitFileUploadIng+j+"%",false)}};if(typeof(swfObjList)=="undefined"){swfObjList={}}swfObjList[d]=SWFUploadCreator.create(c);onFileUploadEvent=function(q,n){if(q=="upload"){var k=n.id;var p=n.name;var m=n.size;var l=n.path;var r=n.pathSmall;var j=n.fileId;var i=n.width;var o=n.height;Site.productMenCommImgTableCtrl2(l,p,k,m,a,j,n.tbNum,r)}}};Site.siteMenCommImgFileUpload2H5=function(b,e,j,a,d){$("#"+e).parent(".uploadImgDiv").css("background-image","url("+_resRoot+"/image/site/msgupimg/upload1.jpg)");var g=j.split(",");var c={siteFree:false,updateUrlViewRes:"",auto:true,fileTypeExts:g.join(";"),multi:false,fileSizeLimit:b*1024*1024,fileSplitSize:20*1024*1024,breakPoints:true,saveInfoLocal:false,showUploadedPercent:false,showUploadedSize:false,removeTimeout:9999999,post_params:{app:21,type:0,fileUploadLimit:b,isSiteForm:true},isBurst:false,isDefinedButton:true,buttonText:"",uploader:"ajax/commupsiteimg_h.jsp@cmd=mobiupload&_token="+$("#_TOKEN").attr("value"),onUploadSuccess:function(i,l){var k=jQuery.parseJSON(l);if(k.success){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(i.name)),true);k.tbNum=d;onFileUploadEvent("upload",k)}else{Fai.ing(LS.siteFormSubmitFileUploadFile+i.name+" "+k.msg)}},onUploadError:function(i,k){Fai.ing("网络繁忙,文件:"+i.name+"上传失败,请稍后重试")},onSelect:function(){if(a==null||typeof(a)=="undefined"){a=5}var k=$("#msgBoardAddImgTb"+d).eq(0);var i=k.find("td").length;if(i>=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var l=k.find("td").eq(k.find("td").length-1);l.css("display","none");return false}return true},onUploadStart:function(i){$("#progressBody_ "+i.id).remove();$("#progressWrap_"+i.id).remove()}};if(typeof(swfObjList)=="undefined"){swfObjList={}}var h=$("#"+e).uploadify(c);$("#"+e).find(".uploadify-button").css("width",50).css("height",50).css("display","inline-block");onFileUploadEvent=function(r,o){if(r=="upload"){var l=o.id;var q=o.name;var n=o.size;var m=o.path;var s=o.pathSmall;var k=o.fileId;var i=o.width;var p=o.height;Site.productMenCommImgTableCtrl2(m,q,l,n,a,k,o.tbNum,s)}}};Site.productMenCommImgTableCtrl2=function(m,a,b,h,c,d,k,l){var i=$("#pdCommTb"+k).eq(0);var j=i.find(".J_td").length-1;var e=i.find(".J_td").eq(j);e.html((j)+"/"+c);var g=[];g.push("");g.push("");g.push("");g.push("");g.push("");g.push("
    ");g.push("");g.push("
    ");g.push("");g.push("");e.before(g.join(""));if(j>=c){i.find(".J_td").eq(0).hide()}};Site.productMenCommImgDelete2=function(a,d){var e=$("#pdCommTb"+d).eq(0);var b=e.find(".J_td").length;for(var c=0;ce){Fai.ing(Fai.format(LS.commentLenTips,Fai.encodeHtml(e)),true);return}var s=$("#pdCommTb"+l);var j=[];var m=[];if(s!=null&&typeof(s)!="undefined"){var c=s.eq(0);var h=c.find("td").length;if(h>1){for(var y=0;y<(h-1);y++){var g=c.find(".J_td").eq(y).find(".pdCtIcon");if(g!=null&&typeof(g)!="undefined"&&g.length>0){var z={};var b={};var x=g.attr("_id");var B=g.attr("_name");var w=g.attr("_path");var a=g.attr("_smallpath");var q=g.attr("_file_size");var u=g.attr("_file_id");z.imgId=x;z.imgName=B;z.imgSize=q;z.tempFileId=u;j.push(z);b.path=w;b.smallPath=a;m.push(b)}}}}var A=$(".submitStarList").attr("star");if(!A){A=5}var o={oid:p,iid:r,commImgList:$.toJSON(j),comment:d,star:A};$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=addPC",data:o,error:function(){Fai.ing(LS.systemError)},success:function(M){var H=jQuery.parseJSON(M);if(H.success){Fai.ing(LS.submitSuccess,true);var L=H.imgsPathStr;t.remove();var I=v.find(".commentStarLine");var F=v.find(".commentLine");var D=v.find(".commentOptLine");I.remove();F.remove();D.css({visibility:"hidden",position:"absolute","z-index":"-1"});var C=0;if(typeof(Site.commMenUpAllImgList)!="undefined"&&Site.commMenUpAllImgList!=null){C=Site.commMenUpAllImgList.length}else{Site.commMenUpAllImgList=[]}var i=[];var J='
    ';J+='';J+='';J+='";J+="
    ';J+='
    ';J+=Fai.encodeHtml(d);J+="
    ";J+="
    ";J+="
    ";J+='
    ';J+='';J+='';J+='";J+="
    ';J+='';$.each(j,function(O,P){J+='";var N=new Object();N.data=L[O]["path"];i.push(N)});J+="
    ';J+='
    ";J+='';J+="
    ";J+="
    ";J+="
    ";J+="
    ";J+='
    ';J+='';J+="";J+="
    ";if(n){J+='
    ';for(var E=1;E<=5;E++){if(E<=A){J+='
  • '}else{J+='
  • '}}J+="
    "}J+='
    '+H.ctime+'['+LS.commentOK+"]
    ";J+="
    ";var G=new Object();G.data=i;Site.commMenUpAllImgList.push(G);v.append(J)}else{var K="";switch(H.rt){case 1:K=LS.commentError;break;case 2:K=LS.mallStlSubmitNotFound;break;case 3:K=LS.commentError;break;case 5:K=LS.paramError;break;case 6:fai.top.location.href="login.jsp@url="+Fai.encodeUrl(Fai.getUrlRoot(top.location.href))+"&errno=11";return false;break;case 7:K=LS.commentClosed;break;case 8:K=LS.commentExist;break;case 9:K=LS.commentCountLimit;break;default:K=LS.systemError;break}Fai.ing(K)}}})};Site.siteMenCommImgFileUpload=function(b,e,h,a,d){var g=h.split(",");var c={file_post_name:"Filedata",upload_url:"ajax/commupsiteimg_h.jsp",button_placeholder_id:e,file_size_limit:b+"MB",button_image_type:3,file_queue_limit:a,button_width:"50px",button_height:"50px",button_cursor:SWFUpload.CURSOR.HAND,button_image_url:_resRoot+"/image/site/msgupimg/upload1.jpg",requeue_on_error:false,post_params:{ctrl:"Filedata",app:21,type:0,fileUploadLimit:5,isSiteForm:true},file_types:g.join(";"),file_dialog_complete_handler:function(i){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(j,i,k){switch(i){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Fai.ing(LS.siteFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Fai.ing(LS.siteFormSubmitFileUploadNotAllow,true);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Fai.ing(Fai.format(LS.siteFormSubmitFileUploadOneTimeNum,a),true);break;default:Fai.ing(LS.siteFormSubmitFileUploadReSelect,true);break}},upload_success_handler:function(j,i){var k=jQuery.parseJSON(i);this._allSuccess=k.success;this._sysResult=k.msg;if(k.success){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(j.name)),true);k.tbNum=d;onFileUploadEvent("upload",k)}else{Fai.ing(LS.siteFormSubmitFileUploadFile+j.name+" "+k.msg)}},upload_error_handler:function(j,i,k){if(i==-280){Fai.ing(LS.siteFormSubmitFileUploadFileCancle,false)}else{if(i==-270){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadFileExist,Fai.encodeHtml(j.name)),true)}else{Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(j.name)))}}},upload_complete_handler:function(j){if(j.filestatus==SWFUpload.FILE_STATUS.COMPLETE){if(a==null||typeof(a)=="undefined"){a=5}var k=$("#msgBoardAddImgTb"+d).eq(0);var i=k.find("td").length;if(i>=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var l=k.find("td").eq(k.find("td").length-1);l.css("display","none");return}if(typeof(swfObjList)=="undefined"){swfObjList={}}swfObj=swfObjList[d];setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(j.filestatus==SWFUpload.FILE_STATUS.ERROR){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(j.name)))}}},upload_start_handler:function(i){Fai.ing(LS.siteFormSubmitFileUploadPrepare,false)},view_progress:function(i,l,k,j){Fai.ing(LS.siteFormSubmitFileUploadIng+j+"%",false)}};if(typeof(swfObjList)=="undefined"){swfObjList={}}swfObjList[d]=SWFUploadCreator.create(c);onFileUploadEvent=function(q,n){if(q=="upload"){var k=n.id;var p=n.name;var m=n.size;var l=n.path;var r=n.pathSmall;var j=n.fileId;var i=n.width;var o=n.height;Site.productMenCommImgTableCtrl(l,p,k,m,a,j,n.tbNum,r)}}};Site.productMenCommImgTableCtrl=function(m,a,b,h,c,d,k,l){var i=$("#msgBoardAddImgTb"+k).eq(0);var j=i.find("td").length;var e=i.find("td").eq(j-1);e.find(".msgBoard_showImgCount").html((j)+"/"+c);var g=[];if(Fai.isIE6()||Fai.isIE7()){g.push("");g.push("
    ")}else{g.push("");g.push("
    ")}g.push("");if(Fai.isIE6()||Fai.isIE7()){g.push("

    ")}else{g.push("

    ")}g.push("
    ");g.push("");e.before(g.join(""))};Site.productMenCommImgDelete=function(a,d){var e=$("#msgBoardAddImgTb"+d).eq(0);var b=e.find("td").length;for(var c=0;c");if(Fai.isIE6()||Fai.isIE7()){a.push("");a.push("
    ");a.push("
    ")}else{a.push("");a.push("
    ");a.push("
    ")}a.push("

    ");a.push("
    ");a.push("
    ");h.after(a.join(""));setTimeout(function(){$("#"+d).hover(function(){var n=$("#"+d);if(n.find("#J_showCommPicMoveSign").attr("class")==null||typeof(n.find("#J_showCommPicMoveSign").attr("class"))=="undefined"){var o=[];o.push("
    ");o.push("");o.push("");o.push("");o.push("");o.push("
    ");n.prepend(o.join(""))}},function(){var n=$("#"+d);if(Fai.isIE7()){setTimeout(function(){n.find("#J_showCommPicMoveSign").remove()},500)}else{n.find("#J_showCommPicMoveSign").remove()}})},10)};Site.showMenCommImgMove=function(i,b,h,a){if(i==null||h==null){return}var k=$("#"+i);var d=k.parentsUntil(".J_imgDiv",".J_imageTable");currentChooseTr=d.attr("chooseTr");currentChooseTd=d.attr("chooseTd");if(currentChooseTr==null||currentChooseTd==null){return}if(Site.commMenUpAllImgList==null){return}var l=0;var c;if(a){c=d.find(".J_td")}else{c=d.find("td");a=false}var g=parseInt(c.length);if(g<=1){return}if(h=="left"){if(currentChooseTd=="0"||currentChooseTd==0){l=g-1}else{l=parseInt(currentChooseTd)-1}}else{if(h=="right"){l=parseInt(currentChooseTd)+1;if(l>=Site.commMenUpAllImgList[currentChooseTr].data.length){l=0}}}c.eq(currentChooseTd).find(".show_msg_border_rect").remove();var j="
    ";c.eq(l).prepend(j);d.attr("chooseTd",l);var e=$("#"+b).find(".msg_up_show_img_set").parent();$("#"+b).find(".msg_up_show_img_set").remove();e.append("")};Site.orderPdCommentAddCom=function(o,q,k,m){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行评论。");return}var t=$(".J-ct-panel-"+o+"-"+q),A=$("#pc_"+o+"_"+q),d=$.trim(A.val()),j=A.attr("minlength");if(typeof(d)!="string"||""==d){A.focus();Fai.ing(LS.commentNotEmpty,true);return}if(d.length1){for(var w=0;w<(g-1);w++){var e=c.find("td").eq(w).find(".msgBoard_upImg_set");if(e!=null&&e!="undefined"){var x={};var b={};var v=e.attr("_id");var z=e.attr("_name");var u=e.attr("_path");var a=e.attr("_smallpath");var p=e.attr("_file_size");var s=e.attr("_file_id");x.imgId=v;x.imgName=z;x.imgSize=p;x.tempFileId=s;h.push(x);b.path=u;b.smallPath=a;l.push(b)}}}}var y=$(".submitStarList").attr("star");if(!y){y=5}var n={oid:o,iid:q,commImgList:$.toJSON(h),comment:d,star:y};$.ajax({type:"post",url:"ajax/order_h.jsp?cmd=addPC",data:n,error:function(){Fai.ing(LS.systemError)},success:function(F){var Q=jQuery.parseJSON(F);if(Q.success){Fai.ing(LS.submitSuccess,true);var P=t.find(".g_textarea").parent();var N=t.find(".ct-area3");var L=t.find(".g_ibutton").parent();var E=t.find(".ct-comm-title"),D=t.find(".submitStarList");var R=t.find(".msgBoard_submit_btn").parent();P.remove();N.css({visibility:"hidden",position:"absolute","z-index":"-1"});L.remove();E.remove();D.remove();R.remove();var O=0;if(typeof(Site.commMenUpAllImgList)!="undefined"&&Site.commMenUpAllImgList!=null){O=Site.commMenUpAllImgList.length}else{Site.commMenUpAllImgList=[]}var G=[];G.push("
    "+d+"
    ");G.push("
    ");G.push("");G.push("");var i=[];if(h!="[]"&&h.length>0&&Q.imgsPathStr!="null"&&h.length==Q.imgsPathStr.length){for(var M=0;M");G.push("
    ");G.push("

    ");G.push("
    ");G.push("");var H=new Object();H.data=J;i.push(H)}}G.push("
    ");G.push("
    ");G.push("
    ");G.push("
    ");G.push(""+Q.ctime+"");G.push(""+LS.commentOK+"");G.push("
    ");if(m){G.push("
    ");for(var M=1;M<=5;M++){if(M<=y){G.push("
  • ")}else{G.push("
  • ")}}G.push("
    ")}var I=new Object();I.data=i;Site.commMenUpAllImgList.push(I);t.append(G.join(""));if(Fai.isIE6()||Fai.isIE7()){setTimeout(function(){$(".msgBoard_upImg_border").css({width:"50px",height:"50px"})},50)}}else{var C="";switch(Q.rt){case 1:C=LS.commentError;break;case 2:C=LS.mallStlSubmitNotFound;break;case 3:C=LS.commentError;break;case 5:C=LS.paramError;break;case 6:fai.top.location.href="login.jsp?url="+Fai.encodeUrl(Fai.getUrlRoot(top.location.href))+"&errno=11";return false;break;case 7:C=LS.commentClosed;break;case 8:C=LS.commentExist;break;case 9:C=LS.commentCountLimit;break;default:C=LS.systemError;break}Fai.ing(C)}}})};Site.changeIEMsgInputWidth=function(){if(isIE=navigator.userAgent.indexOf("MSIE")!=-1){$("#orderLeveaMsgIn").css({height:"17px","line-height":"17px",width:"98%"})}};Site.orderLeveaMsgTip="";Site.orderMessageOpen=false;Site.orderMessageMaxNum=0;Site.setLisMsgInput=function(c,a,b){Site.orderMessageOpen=a;Site.orderLeveaMsgTip=c;Site.orderMessageMaxNum=b;$(function(){$("#orderLeveaMsgIn").focusin(function(){if($(this).val()===Site.orderLeveaMsgTip){$(this).val("")}$(this).css("color","#333")});$("#orderLeveaMsgIn").focusout(function(){$(this).css("color","black");if($(this).val()==""){$(this).val(Site.orderLeveaMsgTip);$(this).css("color","#b8b8b8")}})})};Site.setLisMsgInputInit=function(a){$(function(){$("#orderLeveaMsgIn").val(a);$("#orderLeveaMsgIn").css("color","#b8b8b8")})};Site.showBankLeaveMsg=function(){$(".bankLeaveMsgNew").hover(function(){var b=$(this).offset().top+23;var c=$(this).offset().left-5;var d=$(this).attr("val");var a="
    "+Fai.encodeHtml(d)+"
    ";$("body").append(a)},function(){$(".J_bankLeaveMsg").remove()})};(function(n){n.cusAreaList=[];n.isHideCN=false;n.isHideOS=false;n.initMstlDomEvent=function(A,C,L,I,F){n.cusAreaList=C;n.isHideCN=L;n.isHideOS=I;var J=A.moduleId,v=A.sessionMid,u=A.memberId,w=A.addrInfoList,E=A.orderId,y=A.unCheckeditemIdList,x=A.unCheckedItemList,G=A.isFirstTime,B=A.memberName,K=A.imme,t=A.newPropList,D=A.mobileCtNameList,z=A.operaKey,H={};H.addrInfoList=w;$(".addrListWrap").off("click.mstl").on("click.mstl",".addrMsg",function(P){var N=$(P.currentTarget),M=parseInt(N.attr("_item")),O=$(P.target||P.srcElement),M;if(O.hasClass("editAddrBtn")){h(M,v,w,u,t,D,F);b(M,w,t);P.stopPropagation();return}if(N.hasClass("j_addrMsg")&&!N.hasClass("selectedMsg")){$(".selectedMsg").removeClass("selectedMsg mstl_border");N.addClass("selectedMsg mstl_border");o(M,w);return}if(N.hasClass("addAddrMsgPanel")){h(-1,v,w,u,t,D,F);return}});$(".delAddrBtn").click(function(S){var M=$(this).parent().parent().attr("_item");var O=["
    ","
    ",LS.conCancelAddrInfo,"
    ","
    ","",LS.cancel,"",""+LS.confirm+"","
    ","
    "];var R=parseInt(Math.random()*10000);var N={boxId:R,title:"",htmlContent:O.join(""),width:300};var P=n.popupBox(N);var Q="ajax/memberAdm_h.jsp?cmd=set&id="+v;P.find(".J-rpt-save").on("click",function(){w.splice(M,1);$.ajax({type:"post",url:Q,data:"info="+Fai.encodeUrl($.toJSON(H)),error:function(){Fai.ing(LS.systemError,false)},success:function(T){var U=$.parseJSON(T);if(U.success){var V=document.location.search.search(/imme/)>-1?"?imme":"";document.location.href="mstl.jsp"+V}else{Fai.ing(U.msg,true)}}})});S.stopPropagation()});$(".setDefaultBtn").click(function(O){var N=$(this).parent().parent().attr("_item");var M="ajax/memberAdm_h.jsp?cmd=set&id="+v;for(index in w){w[index].isDefault=0}w[N].isDefault=1;$.ajax({type:"post",url:M,data:"info="+Fai.encodeUrl($.toJSON(H)),error:function(){Fai.ing(LS.systemError,false)},success:function(P){var Q=$.parseJSON(P);if(Q.success){var R=document.location.search.search(/imme/)>-1?"?imme":"";document.location.href="mstl.jsp"+R}else{Fai.ing(Q.msg,true)}}});O.stopPropagation()});$(".mallShipSelect").off("change.mstl").on("change.mstl",function(P){var N=$(this).find("option:selected"),O=$(".shippingPay"),Q=$("#shippingMoneyVal"),M=parseFloat(N.attr("price")).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){O.text(Fai.formatPriceEn(M)).attr("_shipmoney",M);Q.text(Fai.formatPriceEn(M)).attr("_shipmoney",M)}else{O.text(M).attr("_shipmoney",M);Q.text(M).attr("_shipmoney",M)}q()}).trigger("change.mstl");$(".payListWrap").off("click.mstl").on("click.mstl",".payItemBox",function(N){var M=$(N.currentTarget);if(!M.hasClass("payChecked")){$(".payChecked").removeClass("payChecked mstl_border mstl_payChecked");M.addClass("payChecked mstl_border mstl_payChecked");if(M.hasClass("payItemBox2")){$(".banksMsgWrap").addClass("banksMsgWrapShow")}else{$(".banksMsgWrap").removeClass("banksMsgWrapShow")}}});if($(".payChecked ").hasClass("payItemBox2")){$(".banksMsgWrap").addClass("banksMsgWrapShow")}$(".payItemBox1, .payItemBox2").off("mouseenter.mstl").on("mouseenter.mstl",function(){var N=$(this),M=N.find(".payMethod").attr("tips");if(!M){return}var O="
    ";O+="
    ";O+="
    ";O+="
    ";O+=M;O+="
    ";N.append(O)}).off("mouseleave.mstl").on("mouseleave.mstl",function(){var M=$(this),N=M.find(".payTipsPanel");if(N.length>0){N.remove()}});l();e();$(".mstlSublimeBtn").off("click.mstl").on("click.mstl",function(){var P=$(".J_noAddrMsgContent").length>0;var M=false;var R=$(".addrListWrap .selectedMsg").attr("_item");if(!P){if(w.length>0&&R!=null){for(var S=0;S0){o(parseInt($(".selectedMsg").attr("_item")),w)}n.placeholder($(".msgforSeller, .integralValInput"))};function b(A,u,t){var O=u[A],H=$(".addAddrPopPanel"),z=$("#addrDetail"),K=Fai.top._lcid,J,x,F,G,v=false,I;for(var M=0;M0&&O[I.fieldKey]){G.val(O[I.fieldKey]||"");if(I.fieldKey=="mobile"){$("#mobileCt").val(O.mobileCt)}}}if(!v&&$("#mallShipTemplate_province").length===1){if(K==2052||K==1028){J=$("#addrInfo_county"),x=$("#addrInfo_city"),F=$("#addrInfo_province");F.val(O.addr_info.provinceCode);F.trigger("change");x.val(O.addr_info.cityCode);x.trigger("change");J.val(O.addr_info.countyCode)}z.val(O.addr_info.streetAddr||"")}}function h(B,w,y,v,u,C,L){var O=[],F,R,I,N,U,H,P,A,E="",K=Fai.top._lcid;var Q={};Q.addrInfoList=y;var T={};$.each(n.cusAreaList,function(V,W){if(W.parentId==null||W.parentId==""||W.parentId===0){T[W.id]=W}});if(K==2052||K==1028){P=site_cityUtil.getProvince();site_cityUtil.simpleProvinceName(P)}A={};A.width=942;var S=parseInt($(".mallStlNew").attr("themecolor"));var x=isNaN(S)?"":("mstlColor"+S);A.extClass="addAddrPopPanel "+x;A.title="
    "+L+"
    ";E+="
    ";var z=false;var G={};for(var M=0;M";E+="";E+="";E+="";E+="";E+="
    ";E+="

    ";E+="

    ";z=true;continue}E+="

    ";E+="";if(G.fieldKey=="mobile"||G.fieldKey=="phone"){E+=""}else{E+=""}E+="

    "}if(!z&&$("#mallShipTemplate_province").length===1){var t=(K==2052||K==1028)?"中国":"China";var J=(K==2052||K==1028)?"海外":"Oversea";E+="
    ";E+="";E+="";E+="";E+="";E+="
    ";E+="

    ";E+="

    "}E+="

    "+LS.confirm+""+LS.cancel+"

    ";E+="
    ";A.htmlContent=E;n.popupBox(A);if($("#areaBoxInput").length>0){$("#areaBox1,#areaBox2").css("left",$("#areaBoxInput").position().left)}$("#areaBoxInput").hide();$(document).unbind("click.forAreaBox").bind("click.forAreaBox",function(){$("#areaBox1").hide();$("#areaBox2").hide()});$("#areaBox1,#areaBox2").unbind("click.forAreaBox").bind("click.forAreaBox",function(V){D(V)});function D(V){if(V.stopPropagation){V.stopPropagation()}else{V.cancelBubble=true}}$("#allArea").change(function(){if($("#allArea").val()==null||$("#allArea").val()==""||$("#allArea").val()=="os"){$("#areaBoxInput").hide()}else{$("#areaBoxInput").show()}$("#areaBox1").hide();$("#areaBox2").hide();if($("#allArea").val()==null||$("#allArea").val()==""){return}$("#areaBoxInput").attr("isCn",0);$("#areaBoxInput").attr("isCus",0);$("#areaBoxInput").attr("isOs",0);$("#areaBoxInput").attr("area1","");$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");if($("#allArea").val()=="cn"){$("#areaBoxInput").attr("isCn",1);$("#areaBox1 .pv").click();$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();$("#areaBox1").show();$("#areaBoxInput").val("")}else{if($("#allArea").val()=="os"){$("#areaBoxInput").attr("isOs",1);$("#areaBoxInput").attr("area1",990000);$("#areaBoxInput").attr("area2",990100);$("#areaBoxInput").val($("#areaBox1").find(".group_item[pid='990000']").text())}else{$("#areaBoxInput").attr("isCus",1);$("#areaBoxInput").attr("area1",$("#allArea").val());$("#areaBox2 .sec_content").html("");$("#areaBox2 .thd_content").html("");$("#areaBox2").show();$("#areaBoxInput").val("")}}if($("#allArea").val()=="cn"||$("#allArea").val()=="os"){return}var V=a($("#allArea").val());$("#sec_box .sec_content").append(V);$("#areaBoxInput").val($("#areaBoxInput").val()+$("#allArea option[value='"+$("#allArea").val()+"']").text());if(V===null||V===undefined||V===""){$("#areaBox2").hide();$(".J-ssq").hide();$("#areaBoxInput").hide()}});$("#areaBoxInput").unbind("click").bind("click",function(V){if($("#allArea").val()=="cn"){$("#areaBox1").toggle();$("#areaBox2").hide();$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()}else{if($("#allArea").val()==null||$("#allArea").val()=="os"){}else{$("#areaBox2").toggle();$("#areaBox1").hide();$("#sec_box").show();$("#thd_box").hide()}}D(V)});$("#areaBox1 .J_areaHead .pv").click(function(){$("#province_box").show();$("#city_box").hide();$("#county_box").hide();$("#street_box").hide()});$("#areaBox1 .J_areaHead .city").click(function(){$("#province_box").hide();$("#city_box").show();$("#county_box").hide();$("#street_box").hide()});$("#areaBox1 .J_areaHead .county").click(function(){$("#province_box").hide();$("#city_box").hide();$("#county_box").show();$("#street_box").hide()});$("#areaBox1 .J_areaHead .street").click(function(){$("#province_box").hide();$("#city_box").hide();$("#county_box").hide();$("#street_box").show()});$(".J_areaHead2 .sec").click(function(){$("#sec_box").show();$("#thd_box").hide()});$(".J_areaHead2 .thd").click(function(){$("#sec_box").hide();$("#thd_box").show()});$("#province_box .group_item").bind("click",function(){$("#areaBox1 .city_content").remove();$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var V=$(this).attr("pname");var W=$(this).attr("pid");$("#areaBox1 .J_areaHead .city").click();$("#areaBoxInput").val("");$("#areaBoxInput").val($("#areaBoxInput").val()+V);$("#areaBoxInput").removeAttr("lastArea");$("#areaBoxInput").removeAttr("lastAreaType");$("#areaBoxInput").attr("area1",W);$("#areaBoxInput").attr("area2","");$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");$(".city_content").remove();var Y=j(site_cityUtil.getCities(W));var X=$(Y).html();if(X===null||X===undefined||X===""){$("#areaBox1").hide()}$("#city_box").append(Y)});$("#city_box").delegate(".group_item","click",function(){$("#areaBox1 .county_content").remove();$("#areaBox1 .street_content").remove();var V=$(this).attr("cname");var X=$(this).attr("cid");$("#areaBox1 .J_areaHead .county").click();var aa=$("#areaBoxInput").attr("lastArea");var W=$("#areaBoxInput").attr("lastAreaType");if(W!=null&&W!=""){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+V);$("#areaBoxInput").attr("lastArea","-"+V);$("#areaBoxInput").attr("lastAreaType","city");$("#areaBoxInput").attr("area2",X);$("#areaBoxInput").attr("area3","");$("#areaBoxInput").attr("area4","");$(".county_content").remove();var Z=g(site_cityUtil.getCounty(X));var Y=$(Z).html();if(Y===null||Y===undefined||Y===""){$("#areaBox1").hide()}$("#county_box").append(Z)});$("#county_box").delegate(".group_item","click",function(){$("#areaBox1 .street_content").remove();var W=$(this).attr("cname");var Y=$(this).attr("cid");$(".J_areaHead .street").click();var aa=$("#areaBoxInput").attr("lastArea");var X=$("#areaBoxInput").attr("lastAreaType");if(X!=null&&(X=="street"||X=="county")){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-",$("#areaBoxInput").val().indexOf("-")+1)))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+W);$("#areaBoxInput").attr("lastArea","-"+W);$("#areaBoxInput").attr("lastAreaType","county");$("#areaBoxInput").attr("area3",Y);$("#areaBoxInput").attr("area4","");var V=k(site_cityUtil.getStreet(Y));var Z=$(V).html();if(Z===null||Z===undefined||Z===""){$("#areaBox1").hide()}$("#street_box").append(V)});$("#street_box").delegate(".group_item","click",function(){var V=$(this).attr("cname");var X=$(this).attr("cid");var Y=$("#areaBoxInput").attr("lastArea");var W=$("#areaBoxInput").attr("lastAreaType");if(W!=null&&W=="street"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(Y,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+V);$("#areaBoxInput").attr("lastArea","-"+V);$("#areaBoxInput").attr("lastAreaType","street");$("#areaBoxInput").attr("area4",X);$("#areaBox1").hide()});$("#sec_box").delegate(".group_item","click",function(){$("#areaBox2 .thd_content").html("");var V=$(this).attr("cname");var X=$(this).attr("cid");$(".J_areaHead2 .thd").click();var Z=$("#areaBoxInput").attr("lastArea");var W=$("#areaBoxInput").attr("lastAreaType");if(W!=null&&W!=""&&$("#areaBoxInput").val().indexOf("-")!=-1){$("#areaBoxInput").val($("#areaBoxInput").val().substring(0,$("#areaBoxInput").val().indexOf("-")))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+V);$("#areaBoxInput").attr("lastArea","-"+V);$("#areaBoxInput").attr("lastAreaType","sec");$("#areaBoxInput").attr("area2",X);$("#areaBoxInput").attr("area3","");var Y=a(X);if(Y===null||Y===undefined||Y===""){$("#areaBox2").hide()}$("#thd_box .thd_content").append(Y)});$("#thd_box").delegate(".group_item","click",function(){var V=$(this).attr("cname");var X=$(this).attr("cid");var Y=$("#areaBoxInput").attr("lastArea");var W=$("#areaBoxInput").attr("lastAreaType");if(W!=null&&W=="thd"){$("#areaBoxInput").val($("#areaBoxInput").val().replace(Y,""))}$("#areaBoxInput").val($("#areaBoxInput").val()+"-"+V);$("#areaBoxInput").attr("lastArea","-"+V);$("#areaBoxInput").attr("lastAreaType","thd");$("#areaBoxInput").attr("area3",X);$("#areaBox2").hide()});$(".sublimeNewAddr").off("click.mstl").on("click.mstl",function(){i(B,Q,w,v,u)});$(".cancelNewAddr").off("click.mstl").on("click.mstl",function(){$(".popupBClose").click()})}function j(u){var t="";t+="
    ";$.each(u,function(v,w){if(Fai.top._lcid==2052||Fai.top._lcid==1028){t+="
    "+site_cityUtil.simpleCityNameStr(site_cityUtil.getInfo(w.id).name)+"
    "}else{t+="
    "+site_cityUtil.simpleCityNameStrEn(site_cityUtil.getInfoEn(w.id).name)+"
    "}});t+="
    ";return t}function g(u){var t="";t+="
    ";$.each(u,function(v,w){if(Fai.top._lcid==2052||Fai.top._lcid==1028){t+="
    "+site_cityUtil.getInfo(w.id).name+"
    "}else{t+="
    "+site_cityUtil.getInfoEn(w.id).name+"
    "}});t+="
    ";return t}function k(u){var t="";t+="
    ";$.each(u,function(v,w){if(Fai.top._lcid==2052||Fai.top._lcid==1028){t+="
    "+site_cityUtil.getInfo(w.id).name+"
    "}else{t+="
    "+site_cityUtil.getInfoEn(w.id).name+"
    "}});t+="
    ";return t}function d(u){var t="";var v=false;$.each(n.cusAreaList,function(w,x){if(v){return}if(x.id==u){t=x.name;v=true}});return t}function p(u){var t=[];$.each(n.cusAreaList,function(v,w){if(w.parentId==u){t.push(w)}});return t}function a(t){if(isNaN(t)){return""}var v=parseInt(t);var u="";$.each(p(v),function(w,x){u+="
    "+x.name+"
    "});return u}function i(D,Q,w,v,t){var x=Q.addrInfoList;var E={};var z=D==-1?{}:x[D];var I=$(".addAddrPopPanel"),M=Fai.top._lcid,L,B,G,K,H,J,F=false,A=false,O,y=false,S="";for(var P=0;P0){S=H.val();if(F&&S==""){return Fai.ing(LS.addrInfoInputError+J.name,1)}if(J.fieldKey=="email"&&!Fai.isEmail(S)&&F){Fai.ing(LS.addrInfoInputError+J.name,1);return}if(J.fieldKey=="phone"&&!Fai.isPhone(S)&&F){Fai.ing(LS.addrInfoInputError+J.name,1);return}if(J.fieldKey=="mobile"){z.mobileCt=$("#mobileCt").val();if(!Fai.isNationMobile(S)&&F){return Fai.ing(LS.mobileNumRegular)}}z[J.fieldKey]=H.val()}}if(!A&&$("#mallShipTemplate_province").length===1){var u=$("#allArea").val();if(u==null||u==""){Fai.ing(LS.selectArea);return}else{if(u=="cn"||u=="os"){E.isCus=false}else{E.isCus=true}}K=$("#areaBoxInput").attr("area4");L=$("#areaBoxInput").attr("area3");B=$("#areaBoxInput").attr("area2");G=$("#areaBoxInput").attr("area1");if(G==null||G==""){Fai.ing(LS.mallStlSubmitAddrErr,1);return}if((B==null||B=="")&&!E.isCus){Fai.ing(LS.mallStlSubmitAddrErr,1);return}E.provinceCode=parseInt(G);E.cityCode=parseInt(B);E.countyCode=parseInt(L);E.streetCode=parseInt(K);O=$("#areaBoxInput").val().replace(/-/g,"");var C=$("#addrDetail");if(C.val()==""&&y){Fai.ing(LS.editStreetAddr,1);return}E.streetAddr=C.val();z.addr_info=E;z.addr=(O||"")+C.val();if(!z.addr){return Fai.ing(LS.addrInfoInputError+J.name,1)}}if(D==-1){if(v==0){z.isDefault=1}x.push(z);var N="ajax/memberAdm_h.jsp?cmd=set&opera=addAddr&id="+w}else{N="ajax/memberAdm_h.jsp?cmd=set&opera=editAddr&editItem="+D+"&id="+w;z=x[D]}if(!!v){$(".sublimeNewAddr").off("click.mstl");$.ajax({type:"post",url:N,data:"info="+Fai.encodeUrl($.toJSON(Q)),success:function(ab){var V=$.parseJSON(ab);if(V.success){var W=document.location.search.search(/imme/)>-1?"?imme&":"?";if(D==-1){document.location.href="mstl.jsp"+W+"opera=add"}else{var T=Q.addrInfoList[D];var U=$(".j_addrMsg[_item='"+D+"']");U.find(".addrName span").text(T.name);U.find(".addrPhone span").text(T.phone);U.find(".msgAddrText").text(T.addr);if(T.phone==null||T.phone==""){U.find(".addrPhone span").text(T.mobile)}if((T.addr_info!=null||T.addr_info!="")&&U.hasClass("selectedMsg")){var Y=T.addr_info.isCus;if(!Y){var aa="";var Z="";var X="";if(M==2052||M==1028){aa=site_cityUtil.getInfo(T.addr_info.countyCode).name;Z=site_cityUtil.getInfo(T.addr_info.cityCode).name;X=site_cityUtil.getInfo(T.addr_info.provinceCode).name}else{aa=site_cityUtil.getInfoEn(T.addr_info.countyCode).name;Z=site_cityUtil.getInfoEn(T.addr_info.cityCode).name;X=site_cityUtil.getInfoEn(T.addr_info.provinceCode).name}if(T.addr_info.provinceCode==990000){$("#mallShipTemplate_areaBoxInput").attr("isOs",1);$("#mallShipTemplate_allArea").val("os");$("#mallShipTemplate_allArea").change()}else{$("#mallShipTemplate_areaBoxInput").attr("isCn",1);$("#mallShipTemplate_allArea").val("cn");$("#mallShipTemplate_allArea").change()}$("#mallShipTemplate_areaBoxInput").attr("area1",T.addr_info.provinceCode);$("#mallShipTemplate_areaBoxInput").attr("area2",T.addr_info.cityCode);$("#mallShipTemplate_areaBoxInput").attr("area3",T.addr_info.countyCode);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+aa);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[pid='"+T.addr_info.provinceCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+T.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+T.addr_info.countyCode+"']").click()},0)},0)},0);$("#streetAddress").val(T.addr_info.streetAddr)}else{setTimeout(function(){$("#mallShipTemplate_allArea").val(T.addr_info.provinceCode);$("#mallShipTemplate_allArea").change();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+T.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+T.addr_info.countyCode+"']").click()},0)},0)},0);$("#streetAddress").val(T.addr_info.streetAddr)}}$(".addAddrPanelContent").parents(".formMSG").next(".popupBClose").click()}}else{Fai.ing(V.msg)}},error:function(){Fai.ing(LS.systemError)}})}else{m(Q)}}function m(v){var t=[],u=v.addrInfoList[0];t.push("
    ");t.push("
    ");t.push("
    ");t.push("
    ");t.push("
    ");t.push("
    设为默认
    ");t.push("
    ");t.push("
    "+(u.name||"")+"
    ");t.push("
    "+(u.phone||u.mobile||"")+"
    ");t.push("
    "+(u.addr||"")+"
    ");t.push("
    ");t.push("
    ");$(".addrListWrap").html("").append(t.join(""));o(0,v.addrInfoList);$(".popupBClose").click()}function l(){var t=$("#useItg");if(t.length<1){return}if(parseInt(t.attr("_currentitg"))==0){t.prop("disabled",true);return}$(".integralTitle").off("click.mstl").on("click.mstl",function(v){var u=$(this);if(u.hasClass("discountChecked")){u.removeClass("discountChecked");u.next().val("").trigger("blur").attr("disabled","true")}else{u.addClass("discountChecked");u.next().removeAttr("disabled")}});t.bind("blur",function(){var A=parseInt(t.attr("_needitg"));var y=parseInt(t.val());var D=t.attr("_itgname");var C=parseInt(t.attr("_maxuse"));var u=0;if(isNaN(y)){y=0}var v=$(this).attr("moduleId");var w=Fai.top.$("#module"+v);var z=parseFloat(w.find(".calTotalItem").attr("pay_price"));if(isNaN(z)){return}if($("#couponCheckBox").length>0&&$("#couponCheckBox").prop("checked")){var B=0;if($("#couponOffsetMoney").length>0){var E=$("#couponOffsetMoney").attr("_offsetmoney");if(!isNaN(E)){B=parseInt(E);var F=Math.floor((z-B)*A);if(FC){Fai.ing(Fai.format(LS.integral_maxUse,C,Fai.encodeHtml(D)),true);t.val(C);var x=(C/A).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#offsetMoney").text(Fai.formatPriceEn(x))}else{$("#offsetMoney").text(x)}$("#offsetMoney").attr("_offsetmoney",x);q();return}if(y>parseInt(t.attr("_currentItg"))){Fai.ing(Fai.format(LS.integral_notOverCurrent,Fai.encodeHtml(D),Fai.encodeHtml(D)));t.focus();return}if(y<0){Fai.ing(LS.integral_inputInteger);t.focus();return}var x=(y/A).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#offsetMoney").text(Fai.formatPriceEn(x))}else{$("#offsetMoney").text(x)}$("#offsetMoney").attr("_offsetmoney",x);if(y>0){$("#integralInfo").show()}else{$("#integralInfo").hide()}if($("#couponCheckBox").length>0){$(".couponShowList option").each(function(){var G=parseInt($(this).attr("_minPrice"));if(z-x0){$("#couponInfo").show()}else{$("#couponInfo").hide()}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#couponOffsetMoney").text(Fai.formatPriceEn(v)).attr("_offsetmoney",v)}else{$("#couponOffsetMoney").text(v.toFixed(2)).attr("_offsetmoney",v)}q()})}function q(){var x=parseFloat($(".calTotalItem").attr("pay_price")).toFixed(2)*100||0,u=parseFloat($("#offsetMoney").attr("_offsetmoney")).toFixed(2)*100||0,t=parseFloat($("#couponOffsetMoney").attr("_offsetmoney")).toFixed(2)*100||0,y=parseFloat($("#shippingMoneyVal").attr("_shipmoney")).toFixed(2)*100||0,w=$("#finalPay"),v=((x+y-u-t)/100).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){w.text(Fai.formatPriceEn(v))}else{w.text(v)}}function s(){var u=$(".mallShipSelect").find("option:selected");shippingMoneytext=$(".shippingPay"),culshippingMoneyVal=$("#shippingMoneyVal"),price=parseFloat(u.attr("price")).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){shippingMoneytext.text(Fai.formatPriceEn(price)).attr("_shipmoney",price);culshippingMoneyVal.text(Fai.formatPriceEn(price)).attr("_shipmoney",price)}else{shippingMoneytext.text(price).attr("_shipmoney",price);culshippingMoneyVal.text(price).attr("_shipmoney",price)}if($("#mallShipTemplate_province").length>0){var t=$(".mallShipSelect option:selected");t.attr("provinceCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area1")));t.attr("cityCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area2")));t.attr("countyCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area3")));t.attr("streetCode",$.trim($("#mallShipTemplate_areaBoxInput").attr("area4")))}q()}n.initModuleMallShipTemplateNew=function(M,N,u,P,D,v,t,H,w){var A=P.vType||1,I=P.sco||0,x=P.openItemList;var G="-----------",L=[],B,O,F,J,Q,E,K;var z=true;var C="";C+="
    ";$.each(site_cityUtil.getAreaGroupsPinYin(),function(R,S){C+="
    ";C+="
    "+S[0]+"
    ";C+="
    ";$.each(S[1],function(U,T){if(H==2052||H==1028){C+="
    "+site_cityUtil.simpleProvinceNameStr(site_cityUtil.getInfo(T).name)+"
    "}else{C+="
    "+site_cityUtil.simpleProvinceNameStrEn(site_cityUtil.getInfoEn(T).name)+"
    "}});C+="
    ";C+="
    ";C+="
    "});$("#mallShipTemplate_areaBox1 .pv_content").html("").append(C);$(document).unbind("click.forAreaBox2").bind("click.forAreaBox2",function(){$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_areaBox2").hide()});$("#mallShipTemplate_areaBox1,#mallShipTemplate_areaBox2").unbind("click.forAreaBox").bind("click.forAreaBox",function(R){y(R)});function y(R){if(R.stopPropagation){R.stopPropagation()}else{R.cancelBubble=true}}$("#mallShipTemplate_allArea").change(function(){if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="os"){$("#mallShipTemplate_areaBoxInput").hide();$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_areaBox2").hide()}else{$("#mallShipTemplate_areaBoxInput").show()}if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()==""){return}$("#mallShipTemplate_areaBoxInput").attr("isCn",0);$("#mallShipTemplate_areaBoxInput").attr("isCus",0);$("#mallShipTemplate_areaBoxInput").attr("isOs",0);$("#mallShipTemplate_areaBoxInput").attr("area1","");$("#mallShipTemplate_areaBoxInput").attr("area2","");$("#mallShipTemplate_areaBoxInput").attr("area3","");if($("#mallShipTemplate_allArea").val()=="cn"){$("#mallShipTemplate_areaBoxInput").attr("isCn",1);$("#mallShipTemplate_areaBox1 .pv").click();$("#mallShipTemplate_areaBox1 .city_content").remove();$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();$("#mallShipTemplate_areaBoxInput").val("")}else{if($("#mallShipTemplate_allArea").val()=="os"){$("#mallShipTemplate_areaBoxInput").attr("isOs",1);$("#mallShipTemplate_areaBoxInput").attr("area1",990000);$("#mallShipTemplate_areaBoxInput").attr("area2",990100);$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBox1").find(".group_item[pid='990000']").text());s()}else{$("#mallShipTemplate_areaBoxInput").attr("isCus",1);$("#mallShipTemplate_areaBoxInput").attr("area1",$("#mallShipTemplate_allArea").val());$("#mallShipTemplate_areaBox2 .sec_content").html("");$("#mallShipTemplate_areaBox2 .thd_content").html("");$("#mallShipTemplate_areaBoxInput").val("")}}if($("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){return}var R=a($("#mallShipTemplate_allArea").val());$("#mallShipTemplate_sec_box .sec_content").append(R);$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+$("#mallShipTemplate_allArea option[value='"+$("#mallShipTemplate_allArea").val()+"']").text());var S=$("#mallShipTemplate_allArea").val();z=false;if(N===0&&w){s();return}$.each(x,function(U,W){if(I){var V=false,T=P.scrl||[];$.each(T,function(Y,X){if(X.st===W.type){var Z=false;if(z){Z=$.inArray(parseInt(S),X.arl)>-1}else{Z=$.inArray(parseInt(S),X.carl)>-1}if(Z){if(X.fc===1){if(A===1){if(N>=X.d1){V=true;return false}}else{if(N<=X.d1){V=true;return false}}}if(X.fc===2){if(u>=X.d2){V=true;return false}}if(X.fc===3){if(A===1){if(N>=X.d1&&u>=X.d2){V=true;return false}}else{if(N<=X.d1&&u>=X.d2){V=true;return false}}}if(X.fc===4){if(A===1){if(N>=X.d1||u>=X.d2){V=true;return false}}else{if(N<=X.d1||u>=X.d2){V=true;return false}}}}}});if(V){$("#template_item_"+W.type).attr("price",0);return}}if(!W.regionList||W.regionList.length<=0){$("#template_item_"+W.type).attr("price",W.defaultPrice.toFixed(1));return true}$.each(W.regionList,function(ad,ag){var Y=false;if(z){Y=$.inArray(parseInt(S),ag.areaList)<0}else{Y=$.inArray(parseInt(S),ag.cusAreaList)<0}if(Y){$("#template_item_"+W.type).attr("price",W.defaultPrice.toFixed(1));return true}var ac=0,Z=ag.price,ae=ag.rha==null?1:ag.rha,af=ag.ria==null?1:ag.ria,aa=ag.rip||0;var ab=N;if(ae>0){ac=Z;ab-=ae}if(af>0&&ab>0){var X=(ab/af).toFixed(1);X=Math.ceil(X);ac+=aa*X}$("#template_item_"+W.type).attr("price",ac.toFixed(1));return false})});s()});$("#mallShipTemplate_areaBoxInput").unbind("click").bind("click",function(R){if($("#mallShipTemplate_allArea").val()=="cn"){$("#mallShipTemplate_areaBox1").toggle();$("#mallShipTemplate_areaBox2").hide();$("#mallShipTemplate_province_box").show();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()}else{if($("#mallShipTemplate_allArea").val()==null||$("#mallShipTemplate_allArea").val()=="os"){}else{$("#mallShipTemplate_areaBox2").toggle();$("#mallShipTemplate_areaBox1").hide();$("#mallShipTemplate_sec_box").show();$("#mallShipTemplate_thd_box").hide()}}y(R)});$("#mallShipTemplate_areaBox1 .J_areaHead .pv").click(function(){$("#mallShipTemplate_province_box").show();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()});$("#mallShipTemplate_areaBox1 .J_areaHead .city").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").show();$("#mallShipTemplate_county_box").hide();$("#mallShipTemplate_street_box").hide()});$("#mallShipTemplate_areaBox1 .J_areaHead .county").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_street_box").hide();$("#mallShipTemplate_county_box").show()});$("#mallShipTemplate_areaBox1 .J_areaHead .street").click(function(){$("#mallShipTemplate_province_box").hide();$("#mallShipTemplate_city_box").hide();$("#mallShipTemplate_street_box").show();$("#mallShipTemplate_county_box").hide()});$("#mallShipTemplate_areaBox2 .J_areaHead2 .sec").click(function(){$("#mallShipTemplate_sec_box").show();$("#mallShipTemplate_thd_box").hide()});$("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click(function(){$("#mallShipTemplate_sec_box").hide();$("#mallShipTemplate_thd_box").show()});$("#mallShipTemplate_province_box .group_item").bind("click",function(){$("#mallShipTemplate_areaBox1 .city_content").remove();$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();var R=$(this).attr("pname");var S=$(this).attr("pid");$("#mallShipTemplate_areaBox1 .J_areaHead .city").click();$("#mallShipTemplate_areaBoxInput").val("");$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+R);$("#mallShipTemplate_areaBoxInput").removeAttr("lastArea");$("#mallShipTemplate_areaBoxInput").removeAttr("lastAreaType");$("#mallShipTemplate_areaBoxInput").attr("area1",S);$("#mallShipTemplate_areaBoxInput").attr("area2","");$("#mallShipTemplate_areaBoxInput").attr("area3","");$("#mallShipTemplate_areaBoxInput").attr("area4","");$("#mallShipTemplate_areaBox1 .city_content").remove();var U=j(site_cityUtil.getCities(S));var T=$(U).html();if(T===null||U===undefined||U===""){$("#areaBox1").hide()}$("#mallShipTemplate_city_box").append(U);$.each(x,function(V,W){$("#template_item_"+W.type).attr("price",W.defaultPrice.toFixed(1))});s()});$("#mallShipTemplate_city_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){z=true}else{z=false}$("#mallShipTemplate_areaBox1 .county_content").remove();$("#mallShipTemplate_areaBox1 .street_content").remove();var R=$(this).attr("cname");var T=$(this).attr("cid");$("#mallShipTemplate_areaBox1 .J_areaHead .county").click();var V=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var S=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(S!=null&&S!=""){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","city");$("#mallShipTemplate_areaBoxInput").attr("area2",T);$("#mallShipTemplate_areaBoxInput").attr("area3","");$("#mallShipTemplate_areaBoxInput").attr("area4","");$("#mallShipTemplate_areaBox1 .county_content").remove();var U=g(site_cityUtil.getCounty(T));$("#mallShipTemplate_county_box").append(U);if(N===0&&w){s();return}$.each(x,function(X,Z){if(I){var Y=false,W=P.scrl||[];$.each(W,function(ab,aa){if(aa.st===Z.type){var ac=false;if(z){ac=$.inArray(parseInt(T),aa.arl)>-1}else{ac=$.inArray(parseInt(T),aa.carl)>-1}if(ac){if(aa.fc===1){if(A===1){if(N>=aa.d1){Y=true;return false}}else{if(N<=aa.d1){Y=true;return false}}}if(aa.fc===2){if(u>=aa.d2){Y=true;return false}}if(aa.fc===3){if(A===1){if(N>=aa.d1&&u>=aa.d2){Y=true;return false}}else{if(N<=aa.d1&&u>=aa.d2){Y=true;return false}}}if(aa.fc===4){if(A===1){if(N>=aa.d1||u>=aa.d2){Y=true;return false}}else{if(N<=aa.d1||u>=aa.d2){Y=true;return false}}}}}});if(Y){$("#template_item_"+Z.type).attr("price",0);return}}if(!Z.regionList||Z.regionList.length<=0){$("#template_item_"+Z.type).attr("price",Z.defaultPrice.toFixed(1));return true}$.each(Z.regionList,function(ag,aj){var ab=false;if(z){ab=$.inArray(parseInt(T),aj.areaList)<0}else{ab=$.inArray(parseInt(T),aj.cusAreaList)<0}if(ab){$("#template_item_"+Z.type).attr("price",Z.defaultPrice.toFixed(1));return true}var af=0,ac=aj.price,ah=aj.rha==null?1:aj.rha,ai=aj.ria==null?1:aj.ria,ad=aj.rip||0;var ae=N;if(ah>0){af=ac;ae-=ah}if(ai>0&&ae>0){var aa=(ae/ai).toFixed(1);aa=Math.ceil(aa);af+=ad*aa}$("#template_item_"+Z.type).attr("price",af.toFixed(1));return false})});s()});$("#mallShipTemplate_county_box").delegate(".group_item","click",function(){$("#mallShipTemplate_areaBox1 .street_content").remove();var S=$(this).attr("cname");var U=$(this).attr("cid");var W=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var T=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");$("#mallShipTemplate_areaBox1 .J_areaHead .street").click();if(T!=null&&(T=="street"||T=="county")){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-",$("#mallShipTemplate_areaBoxInput").val().indexOf("-")+1)))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+S);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+S);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");$("#mallShipTemplate_areaBoxInput").attr("area3",U);$("#mallShipTemplate_areaBoxInput").attr("area4","");var R=k(site_cityUtil.getStreet(U));var V=$(R).html();if(V===null||V===undefined||V===""){$("#mallShipTemplate_areaBox1").hide()}$("#mallShipTemplate_street_box").append(R);s()});$("#mallShipTemplate_street_box").delegate(".group_item","click",function(){var R=$(this).attr("cname");var T=$(this).attr("cid");var U=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var S=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");$("#mallShipTemplate_areaBox1 .J_areaHead .street").click();if(S!=null&&S=="street"){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().replace(U,""))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","street");$("#mallShipTemplate_areaBoxInput").attr("area4",T);$("#mallShipTemplate_areaBox1").hide();s()});$("#mallShipTemplate_sec_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){z=true}else{z=false}$("#mallShipTemplate_areaBox2 .thd_content").html("");var R=$(this).attr("cname");var T=$(this).attr("cid");$("#mallShipTemplate_areaBox2 .J_areaHead2 .thd").click();var V=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var S=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(S!=null&&S!=""&&$("#mallShipTemplate_areaBoxInput").val().indexOf("-")!=-1){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().substring(0,$("#mallShipTemplate_areaBoxInput").val().indexOf("-")))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","sec");$("#mallShipTemplate_areaBoxInput").attr("area2",T);$("#mallShipTemplate_areaBoxInput").attr("area3","");var U=a(T);$("#mallShipTemplate_thd_box .thd_content").append(U);if(N===0&&w){s();return}$.each(x,function(X,Z){if(I){var Y=false,W=P.scrl||[];$.each(W,function(ab,aa){if(aa.st===Z.type){var ac=false;if(z){ac=$.inArray(parseInt(T),aa.arl)>-1}else{ac=$.inArray(parseInt(T),aa.carl)>-1}if(ac){if(aa.fc===1){if(A===1){if(N>=aa.d1){Y=true;return false}}else{if(N<=aa.d1){Y=true;return false}}}if(aa.fc===2){if(u>=aa.d2){Y=true;return false}}if(aa.fc===3){if(A===1){if(N>=aa.d1&&u>=aa.d2){Y=true;return false}}else{if(N<=aa.d1&&u>=aa.d2){Y=true;return false}}}if(aa.fc===4){if(A===1){if(N>=aa.d1||u>=aa.d2){Y=true;return false}}else{if(N<=aa.d1||u>=aa.d2){Y=true;return false}}}}}});if(Y){$("#template_item_"+Z.type).attr("price",0);return}}if(!Z.regionList||Z.regionList.length<=0){$("#template_item_"+Z.type).attr("price",Z.defaultPrice.toFixed(1));return true}$.each(Z.regionList,function(ag,aj){var ab=false;if(z){ab=$.inArray(parseInt(T),aj.areaList)<0}else{ab=$.inArray(parseInt(T),aj.cusAreaList)<0}if(ab){$("#template_item_"+Z.type).attr("price",Z.defaultPrice.toFixed(1));return true}var af=0,ac=aj.price,ah=aj.rha==null?1:aj.rha,ai=aj.ria==null?1:aj.ria,ad=aj.rip||0;var ae=N;if(ah>0){af=ac;ae-=ah}if(ai>0&&ae>0){var aa=(ae/ai).toFixed(1);aa=Math.ceil(aa);af+=ad*aa}$("#template_item_"+Z.type).attr("price",af.toFixed(1));return false})});s()});$("#mallShipTemplate_thd_box").delegate(".group_item","click",function(){if($("#mallShipTemplate_allArea").val()==""||$("#mallShipTemplate_allArea").val()=="cn"||$("#mallShipTemplate_allArea").val()=="os"){z=true}else{z=false}var R=$(this).attr("cname");var T=$(this).attr("cid");var U=$("#mallShipTemplate_areaBoxInput").attr("lastArea");var S=$("#mallShipTemplate_areaBoxInput").attr("lastAreaType");if(S!=null&&S=="thd"){$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val().replace(U,""))}$("#mallShipTemplate_areaBoxInput").val($("#mallShipTemplate_areaBoxInput").val()+"-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+R);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","thd");$("#mallShipTemplate_areaBoxInput").attr("area3",T);$("#mallShipTemplate_areaBox2").hide();if(N===0&&w){s();return}$.each(x,function(W,Y){if(I){var X=false,V=P.scrl||[];$.each(V,function(aa,Z){if(Z.st===Y.type){var ab=false;if(z){ab=$.inArray(parseInt(T),Z.arl)>-1}else{ab=$.inArray(parseInt(T),Z.carl)>-1}if(ab){if(Z.fc===1){if(A===1){if(N>=Z.d1){X=true;return false}}else{if(N<=Z.d1){X=true;return false}}}if(Z.fc===2){if(u>=Z.d2){X=true;return false}}if(Z.fc===3){if(A===1){if(N>=Z.d1&&u>=Z.d2){X=true;return false}}else{if(N<=Z.d1&&u>=Z.d2){X=true;return false}}}if(Z.fc===4){if(A===1){if(N>=Z.d1||u>=Z.d2){X=true;return false}}else{if(N<=Z.d1||u>=Z.d2){X=true;return false}}}}}});if(X){$("#template_item_"+Y.type).attr("price",0);return}}if(!Y.regionList||Y.regionList.length<=0){$("#template_item_"+Y.type).attr("price",Y.defaultPrice.toFixed(1));return true}$.each(Y.regionList,function(af,ai){var aa=false;if(z){aa=$.inArray(parseInt(T),ai.areaList)<0}else{aa=$.inArray(parseInt(T),ai.cusAreaList)<0}if(aa){$("#template_item_"+Y.type).attr("price",Y.defaultPrice.toFixed(1));return true}var ae=0,ab=ai.price,ag=ai.rha==null?1:ai.rha,ah=ai.ria==null?1:ai.ria,ac=ai.rip||0;var ad=N;if(ag>0){ae=ab;ad-=ag}if(ah>0&&ad>0){var Z=(ad/ah).toFixed(1);Z=Math.ceil(Z);ae+=ac*Z}$("#template_item_"+Y.type).attr("price",ae.toFixed(1));return false})});s()});$("#template_item_"+v.type).click()};function o(z,A){var t=A[z]||(A[0]={}),v=Fai.top._lcid;if($("#mallShipTemplate_province").length<1){return}if(t.addr_info!=null){var x=t.addr_info["isCus"];if(!x){var y="";var w="";var u="";if(v==2052||v==1028){y=site_cityUtil.getInfo(t.addr_info.countyCode).name;w=site_cityUtil.getInfo(t.addr_info.cityCode).name;u=site_cityUtil.getInfo(t.addr_info.provinceCode).name}else{y=site_cityUtil.getInfoEn(t.addr_info.countyCode).name;w=site_cityUtil.getInfoEn(t.addr_info.cityCode).name;u=site_cityUtil.getInfoEn(t.addr_info.provinceCode).name}if(t.addr_info.provinceCode==990000){$("#mallShipTemplate_areaBoxInput").attr("isOs",1);$("#mallShipTemplate_allArea").val("os");$("#mallShipTemplate_allArea").change()}else{$("#mallShipTemplate_areaBoxInput").attr("isCn",1);$("#mallShipTemplate_allArea").val("cn");$("#mallShipTemplate_allArea").change()}$("#mallShipTemplate_areaBoxInput").attr("area1",t.addr_info.provinceCode);$("#mallShipTemplate_areaBoxInput").attr("area2",t.addr_info.cityCode);$("#mallShipTemplate_areaBoxInput").attr("area3",t.addr_info.countyCode);$("#mallShipTemplate_areaBoxInput").attr("area4",t.addr_info.streetCode);$("#mallShipTemplate_areaBoxInput").attr("lastArea","-"+y);$("#mallShipTemplate_areaBoxInput").attr("lastAreaType","county");setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[pid='"+t.addr_info.provinceCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+t.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+t.addr_info.countyCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox1 .group_item[cid='"+t.addr_info.streetCode+"']").click()},0)},0)},0)},0);$("#streetAddress").val(t.addr_info.streetAddr)}else{setTimeout(function(){$("#mallShipTemplate_allArea").val(t.addr_info["provinceCode"]);$("#mallShipTemplate_allArea").change();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+t.addr_info.cityCode+"']").click();setTimeout(function(){$("#mallShipTemplate_areaBox2 .group_item[cid='"+t.addr_info.countyCode+"']").click()},0)},0)},0);$("#streetAddress").val(t.addr_info.streetAddr)}}}function c(ai,ag,ad,J,D){var U=$(".selectedMsg"),V=parseInt(U.attr("_item")),H=ad[V]||{},y=H.addr_info,M=Fai.top._lcid,O={},L={},ac="";var E,aj,x=false;var am=$(".J_noAddrMsgContent").length>0;if(am){if(ad!=null&&ad.length>0){$.each(ad,function(an,ao){if(ao.isDefault==1){H=ao;return false}})}for(var af=0;af0){if(!Fai.isNationMobile(S)){Fai.ing(LS.mobileNumRegular,1);return}H.mobileCt=$(".J_noAddrMsgContent").find("#mobileCt").val();ai.mobileCt=H.mobileCt}else{H.mobileCt=""}}H[C]=S;ai[C]=S}}else{for(var af=0;af0){var ah=Fai.decodeHtml(X.val());var Z=parseInt(X.attr("maxlength"));if(ah.length>Z){ah=ah.substring(0,Z)}var P=X.attr("plcaeholder");if(ah!==P){ai.msg=ah}else{ai.msg=""}}else{ai.msg=""}var t=$("#useItg"),T=$("#integralCheckBox");if(T.length>0&&T.prop("checked")){var al=t.val();if(Fai.isInteger(al)){var R=parseInt(t.attr("_maxUse")),ae=parseInt(t.attr("_currentitg")),u=t.attr("_itgname");if(al>ae){ac=Fai.format(LS.integral_notOverCurrent,Fai.encodeHtml(u),Fai.encodeHtml(u));return ac}if(al>R){ac=Fai.format(LS.integral_notOver,Fai.encodeHtml(u),R);return ac}if(al<0){ac=LS.integral_inputInteger;return ac}ai.useItg=parseInt(al)}else{if(al.length!=0){ac=LS.integral_inputInteger;return ac}}}if($("#presentItgShow").length>0){ai.presentItg=true}var B=$("#couponCheckBox"),W=$(".couponShowList"),ak;if(W.length>0&&parseInt(W.val())!=-1){ak=W.find("option:selected");var z=ak.attr("data_id");ai.cdId=Number(z)}return ac}function r(x,H,A,z,w,I,B,y,K,u){if(!K&&H==0){Fai.top.location.href=n.getHtmlUrl("mdetail");return}var L={},J={},x=Fai.top.$("#module"+x),E=x.find(".stlMsg");var D=c(L,J,y,I,u);if(D!=""){E.show();E.html(D);n.scrollToDiv(x);return}var F=x.find(".mallStlOpt input");F.attr("disabled",true);E.show();E.html(LS.mallStlSubmitting);n.scrollToDiv(x);if(w!=0&&I){var t={},y=[];y.push(J);t.addrInfoList=y;$.ajax({type:"post",url:action="ajax/memberadm_h.jsp@cmd=set&opera=addaddr&id="+w,data:"info="+Fai.encodeUrl($.toJSON(t)),success:function(M){},error:function(){}})}if(L.payMode==5){var G=L.name;var C=new RegExp("[\\u4E00-\\u9FFF]+","g");if(G){if(G.length<2){if(!C.test(G)){E.hide();n.scrollToDiv(x);Fai.ing(LS.orderValidRecvName);F.attr("disabled",false);return}}}else{if(w!=0&&B){var v="";if(B.length<2){if(!C.test(G)){v="会员"}}L.name=v+B}else{L.name="游客"}}}if(K){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=settle&imme",data:"data="+Fai.encodeUrl($.toJSON(L)),error:function(){F.removeAttr("disabled");E.html(LS.mallStlSubmitError)},success:function(M){F.removeAttr("disabled");var M=jQuery.parseJSON(M);if(M.success){Fai.top.location.href=n.getHtmlUrl("mdetail")+"?id="+M.oid+"&suc=1"}else{if(M.rt==-3){E.html(LS.mallStlSubmitNotFound)}else{if(M.rt==-9){E.html(LS.mallStlSubmitStatusError)}else{if(M.rt==n.MallAjaxErrno.outOfMallAmount){E.html(Fai.format(LS.mallAmountOverNameList,M.productsName))}else{if(M.rt==n.MallAjaxErrno.notAdded){E.hide();var N=["
    ","
    ","
    "+LS.mallProductNotAdded+"
    ","
    "];tip=$(N.join(""));x.prepend(tip);tip.find(".J-close").click(function(){tip.remove()});tip.css({top:20,left:(x.width()-tip.width())/2})}else{E.html(LS.mallStlSubmitError)}}}}}}})}else{$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=delitem&orderid="+H,data:"itemIds="+Fai.encodeUrl($.toJSON(A)),error:function(){F.removeAttr("disabled");E.html(LS.mallStlSubmitError)},success:function(){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=settle&orderid="+H,data:"data="+Fai.encodeUrl($.toJSON(L)),error:function(){F.removeAttr("disabled");E.html(LS.mallStlSubmitError)},success:function(M){F.removeAttr("disabled");var M=jQuery.parseJSON(M);if(M.success){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=addaftershop",data:"data="+Fai.encodeUrl($.toJSON(z)),error:function(){F.removeAttr("disabled");E.html(LS.mallStlSubmitError)},success:function(O){Fai.top.location.href=n.getHtmlUrl("mdetail")+"?id="+H+"&suc=1"}})}else{if(M.rt==-3){E.html(LS.mallStlSubmitNotFound)}else{if(M.rt==-9){E.html(LS.mallStlSubmitStatusError)}else{if(M.rt==n.MallAjaxErrno.outOfMallAmount){E.html(Fai.format(LS.mallAmountOverNameList,M.productsName))}else{if(M.rt==n.MallAjaxErrno.OutOfAllowAmount){E.html(Fai.format(LS.allowAmountOverNameList,M.productsName))}else{if(M.rt==n.MallAjaxErrno.couponOverTime){E.html(LS.couponOverTime)}else{if(M.rt==n.MallAjaxErrno.couponUnavail){E.html(LS.couponUnavail)}else{if(M.rt==n.MallAjaxErrno.couponNotFound){E.html(LS.couponNotFound)}else{if(M.rt==n.MallAjaxErrno.notAdded){E.hide();var N=["
    ","
    ","
    "+LS.mallProductNotAdded+"
    ","
    "];tip=$(N.join(""));x.prepend(tip);tip.find(".J-close").click(function(){tip.remove()});tip.css({top:20,left:(x.width()-tip.width())/2})}else{E.html(LS.mallStlSubmitError)}}}}}}}}}}})}})}}})(Site);Site.placeholder=function(b){var a="placeholder" in document.createElement("input");if(!a){b.each(function(i,c){var g=$(this),d=g.attr("placeholder"),k=g.position(),e=g.outerHeight(true),l=g.outerWidth(true),n=g.css("padding-left"),m=g.css("padding-top"),j=$("").text(d).css({display:"inline-block",height:e,"line-height":e+"px",position:"absolute",left:k.left,top:k.top,paddingLeft:8,paddingTop:m,color:"#aaa"});j.appendTo(g.parent());g.on("focusin keyup",function(){g.val()!=""?j.hide():j.show()});j.on("click",function(){g.focus()});g.siblings(".fk_lowIEPlaceholderStyle").remove()})}};Site.mCartsaleItemCk=function(e){var input=$(e).prev();if(input.prop("checked")){input.prop("checked",false)}else{input.prop("checked",true)}eval($(e).prev().attr("onclick"))};Site.setCheckBoxToFalgDiv=function(b){if(b.find(".J_mallCart").hasClass("mallCartNew")){var a=b.find(".mCartCheckDiv");a.each(function(){var c=$(this).prev();if(c.prop("checked")){$(this).addClass("itemLabelChecked mCart_checked")}else{$(this).removeClass("itemLabelChecked mCart_checked")}})}};Site.initOrderList=function(d){var b=$("#module"+d);var a=b.find(".J_showMorePd");a.unbind("click").on("click.showOrderItem",function(){var g=$(this).attr("_oid");var e=$(this).parent().siblings("#hidePdItem"+g);if($(this).hasClass("J_showing")){e.slideUp();$(this).removeClass("J_showing").addClass("J_hidden")}else{e.slideDown();$(this).addClass("J_showing").removeClass("J_hidden")}e.css("zoom",1)});var c=b.find(".J_pdName");c.hover(function(){$(this).addClass("g_selected")},function(){$(this).removeClass("g_selected")})};Site.refundImgUpload=function(c,e){var d="_2a.jpg,_2a.jpeg,_2a.bmp,_2a.gif,_2a.png,_2a.ico".split(",");var a=5;var b={file_post_name:"Filedata",upload_url:"ajax/commupsiteimg_h.jsp",button_placeholder_id:c,file_size_limit:"5MB",button_image_type:3,file_queue_limit:a,button_width:"52px",button_height:"52px",button_cursor:SWFUpload.CURSOR.HAND,button_image_url:_resRoot+"/image/site/msgupimg/add.png",requeue_on_error:false,post_params:{ctrl:"Filedata",app:21,type:0,fileUploadLimit:5,isSiteForm:true},file_types:d.join(";"),file_dialog_complete_handler:function(g){this._allSuccess=false;this.startUpload()},file_queue_error_handler:function(h,g,i){switch(g){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:Fai.ing(LS.siteFormSubmitCheckFileSizeErr,true);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:Fai.ing(LS.siteFormSubmitFileUploadNotAllow,true);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:Fai.ing(Fai.format(LS.siteFormSubmitFileUploadOneTimeNum,a),true);break;default:Fai.ing(LS.siteFormSubmitFileUploadReSelect,true);break}},upload_success_handler:function(h,g){var i=jQuery.parseJSON(g);this._allSuccess=i.success;this._sysResult=i.msg;if(i.success){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSucess,Fai.encodeHtml(h.name)),true);onFileUploadEvent("upload",i)}else{Fai.ing(LS.siteFormSubmitFileUploadFile+h.name+" "+i.msg)}},upload_error_handler:function(h,g,i){if(g==-280){Fai.ing(LS.siteFormSubmitFileUploadFileCancle,false)}else{if(g==-270){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadFileExist,Fai.encodeHtml(h.name)),true)}else{Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(h.name)))}}},upload_complete_handler:function(h){if(h.filestatus==SWFUpload.FILE_STATUS.COMPLETE){if(a==null||typeof(a)=="undefined"){a=5}var i=$("#msgBoardAddImgTb").eq(0);var g=i.find("td").length;if(g>=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var j=i.find("td").eq(i.find("td").length-1);j.css("display","none");return}setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(h.filestatus==SWFUpload.FILE_STATUS.ERROR){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(h.name)))}}},upload_start_handler:function(g){Fai.enablePopupWindowBtn(0,"save",false);Fai.ing(LS.siteFormSubmitFileUploadPrepare,false)},view_progress:function(g,j,i,h){Fai.ing(LS.siteFormSubmitFileUploadIng+h+"%",false)}};swfObj=SWFUploadCreator.create(b);onFileUploadEvent=function(o,l){if(o=="upload"){var i=l.id;var n=l.name;var k=l.size;var j=l.path;var p=l.pathSmall;var h=l.fileId;var g=l.width;var m=l.height;if(!!e&&(typeof e==="function")){e(i,n,j,k,h,p,g,m)}}}};Site.refundinit=function(a,e,d){$(".J_refundType").click(function(){$(".J_refundType").removeClass("refundSelected");$(this).addClass("refundSelected");if($(this).attr("_type")==1){$("#refundHasRecvGood").hide();$("#refundType").removeClass("shortRefund")}else{$("#refundHasRecvGood").show();$("#refundType").addClass("shortRefund")}});$(".J_uploadIconDiv").live("mouseover mouseout",function(g){if(g.type=="mouseover"){$(this).find(".J_closeIcon").show()}else{$(this).find(".J_closeIcon").hide()}});$(".J_closeIcon").live("click",function(){$(this).parent().remove();$("#refundUpload").show();$("#picNumCount").html($(".J_uploadIconDiv").length)});$("#refundArea").bind("propertychange input",function(){var h=$("#refundArea").val();var g=h.length;if(g<=200){$("#reasonWordNum").text(g);return}$("#refundArea").val(h.substring(0,200))});$("#refundPrice").numeric({negative:false});$("#refundPrice").bind("propertychange input",function(){var g=parseFloat($(this).val()),h=parseFloat($(this).attr("_max"));if(g>h){$("#refundPrice").val(h.toFixed(2))}});Site.refundImgUpload("refundImgSWFUpload",b);function b(j,p,m,n,h,q,g,i){var k="",o="";if(g>i){o="width: 50px;"}else{o="height: 50px;"}k+="
    ";k+="";k+="
    ";k+="
    ";$("#refundUploadList").prepend(k);var l=$(".J_uploadIconDiv").length;$("#picNumCount").html(l);if(l==5){$("#refundUpload").hide()}}var c=false;$("#noRefundCommit").click(function(){if(c){return}var k=$("#refundTypeContent").find(".refundSelected");var q=0;if(k.length==1){q=parseInt(k.attr("_type"))}var m=$("#refundPrice");var n=parseFloat(m.val());if(!n){Fai.ing(LS.refundPriceErr,true);return}var h=parseFloat(m.attr("_max"));if(!h||n>h){Fai.ing(LS.refundPriceTooMuchErr,true);return}var o=$.trim($("#refundPhone").val());if(!o){Fai.ing(LS.refundNeedPhone,true);return}var i=$.trim($("#refundArea").val());if(!i){Fai.ing(LS.refundEnterReason,true);return}if(i.length>200){Fai.ing(LS.refundReasonTooLong,true);return}c=true;var l={};var g=$("#refundHasRecvGood");if(g.length==1&&g.is(":visible")){if($("#recv").attr("checked")){l.hasRecvGood=true}else{l.hasRecvGood=false}}l.refundPrice=n;l.refundType=q;l.refundPhone=o;l.refundReason=i;var j=$(".J_uploadIconDiv");if(j.length>0){var p=[];$.each(j,function(s,w){var r=$(w);var t=r.attr("_fileId");if(!t){return true}var u={};u.ii=t;var v=r.attr("_tmpFileId");if(v){u["in"]=r.attr("_fileName");u.tfi=v;u.is=r.attr("_fileSize")}p.push(u)});if(p.length>0){l.refundImgList=p}}$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setordernorefund&orderid="+a+"&itemId="+e+"&nowStatus="+d,data:"refundInfo="+Fai.encodeUrl($.toJSON(l)),error:function(){c=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(r){var r=$.parseJSON(r);if(r.success){window.location.reload()}else{Fai.ing(r.msg,true);c=false}}})});$("#sendFlowCommit").click(function(){if(c){return}var h=$.trim($("#refundFlowCom").val());if(!h){Fai.ing(LS.refundEnterFlowName,true);return}if(h.length>30){Fai.ing(LS.refundFlowNameTooLong,true);return}var j=$.trim($("#refundFlowID").val());if(!j){Fai.ing(LS.refundEnterFlowCode,true);return}if(j.length>30){Fai.ing(LS.refundFlowCodeTooLong,true);return}var g=$.trim($("#refundPhone").val());if(!g){Fai.ing(LS.refundNeedPhone,true);return}if(g.length>30){Fai.ing(LS.refundPhoneTooLong,true);return}var m=$.trim($("#refundArea").val());if(m.length>200){Fai.ing(LS.refundFlowDetailTooLong,true);return}c=true;var l={company:h,flowId:j,phone:g,refundArea:m};var k=$(".J_uploadIconDiv");if(k.length>0){var i=[];$.each(k,function(p,t){var o=$(t);var q=$(t).attr("_fileId");if(!q){return true}var r={};r.ii=q;var s=o.attr("_tmpFileId");if(s){r["in"]=o.attr("_fileName");r.tfi=s;r.is=o.attr("_fileSize")}i.push(r)});if(i.length>0){l.flowImgList=i}}$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setrefundflow&orderid="+a+"&itemId="+e+"&nowStatus="+d,data:"flowInfo="+Fai.encodeUrl($.toJSON(l)),error:function(){c=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(n){var n=$.parseJSON(n);if(n.success){window.location.reload()}else{Fai.ing(n.msg,true);c=false}}})})};Site.printRemarkRefund=function(a,d,b){$("#createRefundRemark").click(function(){var g="";g+="
    ";g+="";g+="
    ";g+="
    "+LS.refundSubmit+"
    ";var j="
    "+LS.refundWantReamrk+"
    ";var i=parseInt(Math.random()*10000);var e={boxId:i,title:j,htmlContent:g,width:580,boxName:"remarkInfo",extClass:"refundRemarkPopup"};var h=Site.popupBox(e);$("#remarkInputArea").focus()});var c=false;$("#remarkSubmit").live("click.refundRemark",function(){if(c){return}var e=$("#remarkInputArea").val();if($.trim(e).length==0){Fai.ing(LS.refundRemarkNotEmpty);return}if(e.length>200){Fai.ing(LS.refundRemarkTooLong);return}c=true;Fai.ing(LS.refundRemarkSubmiting);$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setrefundremark",data:"orderId="+a+"&speaker=1&itemId="+d+"&remark="+Fai.encodeUrl(e),error:function(){c=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(h){var h=$.parseJSON(h);if(h.success){Fai.ing(LS.refundRemarkSuccess,true);$(".refundRemarkPopup").find(".popupBClose").click();var g=$.format.date(new Date(h.remarkTime),"yyyy-MM-dd HH:mm:ss");var i="";i+="
    ";i+="
    ";i+="
    ";i+="
    "+b+"
    ";i+="
    "+g+"
    ";i+="
    ";i+="
    ";i+="";i+="";i+="";i+="";i+="
    ";i+=Fai.encodeHtml(e);i+="
    ";i+="
    ";i+="
    ";i+="
    ";$("#refundRemarkTitle").after(i)}else{Fai.ing(h.msg,true)}c=false}})})};Site.refundPanelEvent=function(a,c,b){$("#closeRefund").click(function(){var e="";e+="
    "+LS.refundCancelTip+"
    ";e+="
    "+LS.refundSure+"
    ";var h=parseInt(Math.random()*10000);var d={boxId:h,title:"",htmlContent:e,width:358,boxName:"closeRefundInfo",extClass:"closeRefundPopup"};var g=Site.popupBox(d)});$("#closeRefundBtn").live("click.closeRefund",function(){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setrefundstatus&type=del&nowstatus="+b,data:"orderId="+a+"&itemId="+c,error:function(){isSave=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(d){var d=$.parseJSON(d);if(d.success){window.location.reload()}else{Fai.ing(d.msg,true);isSave=false}}})});$("#editRefund").click(function(){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setrefundstatus&type=edit&nowstatus="+b,data:"orderId="+a+"&itemId="+c,error:function(){isSave=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(d){var d=$.parseJSON(d);if(d.success){window.location.reload()}else{Fai.ing(d.msg,true);isSave=false}}})});$("#editFlow").click(function(){$.ajax({type:"post",url:"ajax/order_h.jsp@cmd=setrefundstatus&type=editflow&nowstatus="+b,data:"orderId="+a+"&itemId="+c,error:function(){isSave=false;Fai.ing("系统繁忙,请稍后重试。")},success:function(d){var d=$.parseJSON(d);if(d.success){window.location.reload()}else{Fai.ing(d.msg,true);isSave=false}}})})};Site.remarkImgEvent=function(){$(".J_refundPic").click(function(){var c=$(this),g=c.parent();var b=g.find(".J_refundPic");var e=[],h=-1,d=c.attr("bigImg");$.each(b,function(k,l){var j=$(l).attr("bigImg");if(j){e.push(j);if(j==d){h=k}}});if(h<0){return}b.hide();g.data("imgList",e);g.data("index",h);var a="";a+="
    ";if(b.length>1){a+="
    ";a+="
    ";a+="
    ";a+="
    "}a+="";a+="
    ";a+="";a+="
    ";a+="
    ";c.parent().append(a)});$(".J_refundPicContain .J_close").live("click",function(){var a=$(this).parents(".J_refundPicContain");a.find(".picImgViewer").remove();a.find(".J_refundPic").show()});$(".J_refundPicContain .J_page").live("click",function(){var a=$(this).parents(".J_refundPicContain");var c=a.data("imgList"),d=a.data("index"),b=c.length;if(b<=1){return}if($(this).hasClass("left")){d--}else{d++}if(d<0){d=b-1}if(d>=b){d=0}a.data("index",d);a.find(".J_img").attr("src",c[d])})};Site.showTopBar=function(){if(Fai.top.$("#arrow").hasClass("g_arrow_up")){Fai.top.$("#arrow").removeClass("g_arrow_up");Fai.top.$("#topBar").hide()}else{Fai.top.$("#arrow").addClass("g_arrow_up");Fai.top.$("#topBar").show()}Site.resetGmainPos()};Site.showOrHideMailBox=function(){$.ajax({url:"../ajax/mail_h.jsp?cmd=showOrHideMailBox",data:"",success:function(a){var b=$.parseJSON(a);if(b.success){var c=['
    ','','
    ',"
    ","
    "];$(".j_beforemailbox.line").after(c.join(""));$(".j_beforemailbox.line").css("display","block")}},error:function(){Fai.ing("系统异常,请稍后重试",true)}})};Site.copyWebSite=function(){var b=Fai.top.location.href;var a=$.browser.msie;if(a){clipboardData.setData("Text",b)}else{prompt(LS.shareTips,b)}};Site.initModuleFileList=function(a,b){$("#module"+a+" .line table").mouseover(function(){$(this).addClass("g_hover")}).mouseleave(function(){$(this).removeClass("g_hover")});Site.initContentSplitLine(a,b)};Site.richMarquee=function(c){var u={direction:"up",speed:"normal",loop:"infinite",moveout:false,isScrolling:false};$.extend(u,c);if(u.speed=="normal"){$.extend(u,{speed:28})}else{if(u.speed=="slow"){$.extend(u,{speed:60})}else{$.extend(u,{speed:13})}}if(!u.id){return}if($("#module"+u.id).data("restart")){var k=u.id;Fai.top.$("#richmarqueeNewParent"+k).after($("#module"+u.id).data("content"));Fai.top.$("#richmarqueeNewParent"+k).remove()}if(!$("#module"+u.id).data("content")){var o=Fai.top.$(".formMiddleContent"+u.id).html();$("#module"+u.id).data("content",o)}if($("#module"+u.id).data("_intab")!==0){Fai.top["richMarqueeInTab"+u.id]=u}var k=u.id,s=$("#richMarquee"+k),g=s.outerHeight(true),d=s.outerWidth(true),j=(d>a())?d:a(),e=h(),j=e>j?e:j,y=u.direction,v=0,i="top",q=u.speed,w=(u.loop!="infinite"||u.loop<=0)?1:u.loop,m=u.moveout,z=u.isScrolling,x=20,t=$("
    "),n=$("
    ");function p(){Fai.stopInterval("rm"+k);if($("#richmarqueeNewParent"+k).length<1){n.appendTo(s.parent());s.appendTo(n);t.appendTo(n);if(!z&&!m){}else{$(s.html()).appendTo(t)}}else{n=$("#richmarqueeNewParent"+k);s=$("#richMarquee"+k);t=$("richMarqueeCopy"+k)}if(y=="up"){v=g;i="top"}else{if(y=="down"){v=0-g;if(z&&!m){v=0}i="top"}else{if(y=="left"){v=g;i="left"}else{v=0-j;if(z&&!m){v=0}if(z&&m){v=-j}i="left"}}}if(m){s.css(i,0)}else{s.css(i,v)}if(y=="up"||y=="down"){s.css("left",0)}if(y=="left"||y=="right"){s.css("top",0)}$("#richmarqueeNewParent"+k).mouseover(function(){Fai.stopInterval("rm"+k)}).mouseout(function(){if(w=="infinite"||w>0){Fai.startInterval("rm"+k)}});b();l(y)}function a(){var A=s.find("img");if(A.length>0){var C=A[0].width;for(var B=0;B=0;D--){A=E.eq(D).outerWidth();if(A>B){B=A}}return B}function b(){var A=s.find("img");$(A).load(function(){var B=s.height();if(g!=B){g=B;l(y)}})}function l(A){if(A=="left"||A=="right"){n.css("position","relative");n.css("width",j);t.css("top",0);if(g!=0){n.css("height",g)}if(A=="left"){t.css("margin-left",x);if(z&&!m){s.css("left",j);t.css("left",j*2)}if(z&&m){t.css("left",j)}if(!z&&!m){s.css("left",d);t.css("left",j+d)}if(!z&&m){t.css("left",j+d)}}else{t.css("left",0);s.css("margin-left",x);s.css("width",(j)+"px");if(z&&!m){s.css("padding-left",j);s.css("padding-right",j);n.scrollLeft(j*2+x)}if(z&&m){s.css("padding-left",j);n.scrollLeft(j*2)}if(!z&&!m){s.css("padding-right",j+d);s.css("padding-left",j+d);n.scrollLeft(j+d+x)}if(!z&&m){s.css("padding-right",j+d);s.css("padding-left",j+d);n.scrollLeft(j+d+x)}}}if(A=="up"||A=="down"){n.css("position","relative");if(g!=0){n.css("height",g)}n.css("width",j);t.css("left",0);t.css("height",g);s.css("width",j);if(A=="up"){t.css("top",g*2);t.css("margin-top",x);if(z&&!m){n.scrollTop(0)}if(z&&m){t.css("top",g);n.scrollTop(0)}if(!z&&!m){n.scrollTop(0)}if(!z&&m){n.scrollTop(0)}}else{s.css("height",g);t.css("top",0);s.css("margin-top",x);if(z&&!m){s.css("padding-top",g);s.css("padding-bottom",g);n.scrollTop(g*2+x)}if(z&&m){s.css("padding-top",g);n.scrollTop(g*2)}if(!z&&!m){s.css("padding-top",g*2);s.css("padding-bottom",g*2);n.scrollTop(g*2+x)}if(!z&&m){s.css("padding-top",g*2);s.css("padding-bottom",g*2);n.scrollTop(g*2+x)}}}}function r(){if(y=="left"){var A=n.scrollLeft();A++;if(z&&!m){if(A==j*2+x){n.scrollLeft(j)}else{n.scrollLeft(A)}}if(z&&m){if(A==j+x){n.scrollLeft(0)}else{n.scrollLeft(A)}}if(!z&&!m){if(A==(j+d)+x){n.scrollLeft(0)}else{n.scrollLeft(A)}}if(!z&&m){if(A==j+d+x){n.scrollLeft(0)}else{n.scrollLeft(A)}}}else{if(y=="right"){var A=n.scrollLeft();A--;if(z&&!m){if(A==0){n.scrollLeft(j+x)}else{n.scrollLeft(A)}}if(z&&m){if(A==0){n.scrollLeft(j+x)}else{n.scrollLeft(A)}}if(!z&&!m){if(A==0){n.scrollLeft(j+d+x)}else{n.scrollLeft(A)}}if(!z&&m){if(A==0){n.scrollLeft(j+d+x)}else{n.scrollLeft(A)}}}else{if(y=="up"){var A=n.scrollTop();A++;if(z&&!m){if(A==n.height()*2+x){n.scrollTop(g)}else{n.scrollTop(A)}}if(z&&m){if(A==n.height()+x){n.scrollTop(0)}else{n.scrollTop(A)}}if(!z&&!m){if(A==n.height()*2){n.scrollTop(0)}else{n.scrollTop(A)}}if(!z&&m){if(A==n.height()*2+x){n.scrollTop(0)}else{n.scrollTop(A)}}}else{var A=n.scrollTop();A--;if(z&&!m){if(A==0){n.scrollTop(g+x)}else{n.scrollTop(A)}}if(z&&m){if(A==0){n.scrollTop(g+x)}else{n.scrollTop(A)}}if(!z&&!m){if(A==0){n.scrollTop(g*2+x)}else{n.scrollTop(A)}}if(!z&&m){if(A==0){n.scrollTop(g*2+x)}else{n.scrollTop(A)}}}}}}p();Fai.stopInterval("rm"+k);Fai.addInterval("rm"+k,r,q);Fai.startInterval("rm"+k);if(!$("#module"+u.id).data("first1")){$("#module"+u.id).data("first1",true);$("#module"+u.id).data("options",u)}Site.restartRichMarquee(u)};Site.restartRichMarquee=function(a){if(!a){return}var b=$("#module"+a.id);if(!b.data("first2")){b.data("first2",true);if(a.speed==28){a.speed="normal"}else{if(a.speed==60){a.speed="slow"}else{a.speed="fast"}}b.on("Fai_onModuleSizeChange",function(){Fai.stopInterval("rm"+a.id);b.data("restart",true);Site.richMarquee(a)});b.on("Fai_onModuleLayoutChange",function(){Fai.stopInterval("rm"+a.id);b.data("restart",true);Site.richMarquee(a)})}};Site.productScroll=function(l){var g={pauseDuration:3000,showDuration:600,scrollMode:"up"};var c=$.extend({},g,l);var d=$("#module"+c.moduleId),b=d.find(".J_productTextList"),h=b.parent(),k=b.find(".productTextListTable"),i=k.outerHeight(),a="proScroll"+c.moduleId;if(k.length<2){return}b.css({position:"relative",height:b.height()+"px"});h.css({overflow:"hidden"});b.mouseover(function(){Fai.stopInterval(a)}).mouseout(function(){Fai.startInterval(a)});function j(){function m(){if(c.scrollMode=="up"){b.animate({top:"-="+i},c.showDuration,function(){var n=b.find(".productTextListTable:first");n.appendTo(b).end().hide().fadeIn(400);b.css({top:0});e()})}else{b.animate({top:"+="+i},c.showDuration,function(){var n=b.find(".productTextListTable:last");n.insertBefore(b.find(".productTextListTable:first")).end().hide().fadeIn(400);b.css({top:0});e()})}}Fai.addTimeout(a,m,c.pauseDuration);Fai.startInterval(a)}function e(){j()}j()};Site.loadProductMarquee=function(x,J,E,v){var g=Fai.top["Product"+x].ieOpt,i=Fai.top["Product"+x].tgOpt,n=Fai.top["Product"+x].paramLayoutType,q=Fai.top["Product"+x].callbackArgs;var c=Fai.top.$("#module"+x);if(Fai.isNull(c)){return}c.find(".demo0>div").each(function(){if($(this).attr("cloneDiv")){$(this).remove()}});var u=c.find(".productMarqueeForm");var y=0;if(Fai.isIE6()||Fai.isIE7()){u.each(function(){var K=$(this).find(".imgDiv").width();$(this).css({width:+K+"px"})})}if(!E&&n!=6){if(u.length>=1){var j=u.first().find(".imgDiv");var G=j.width();var z=j.height();u.each(function(){var L=$(this).attr("faiWidth");var K=$(this).attr("faiHeight");if(Fai.isNull(K)){return}var M=Fai.Img.calcSize(L,K,G,z,Fai.Img.MODE_SCALE_FILL);if(M.height>y){y=M.height}})}}if(g.effType>=4&&g.effType<6){if(n==6){Site.clearImageEffectContent_product(x,"sixth_ProductPanel")}if(n==8){Site.clearImageEffectContent_product(x,"eighth_ProductPanel")}Site.clearImageEffectContent_product(x,"propDiv")}var e=0;var h=0;var D=0;var F=0;var p=0;var I=Site.getFormMiddleContentHeight(c,x);u.each(function(){var O=$(this);var Q=c.find(".productMarqueeForms").attr("_bordertype");var P=parseInt(c.find(".productMarqueeForms").attr("_borderwidth"));var R=c.find(".productMarqueeForms").attr("_bgtype");var af=O.find("img");var ae=O.attr("faiHeight");if(Fai.isNull(ae)){return}var Y=O.attr("faiWidth");var T=O.find(".imgDiv");var ad=T.width();if(E||n==6){y=T.height()}var N={width:ad,height:y};if(J==2){var L=O.attr("faiWidthOr");var S=O.attr("faiHeightOr");var K=L/S;var ab=ad/y;if(ab<=K){af.css("width",K*y+"px");af.css("height",y+"px");af.css("marginLeft",((ad-K*y)/2)+"px");T.css("overflow","hidden")}else{af.css("height",ad/K+"px");af.css("width",ad+"px");af.css("marginTop",((y-ad/K)/2)+"px");T.css("overflow","hidden")}var M=T.width();if(M0){if(n==6){O.find(".propWordWrapDiv").width(M*0.8)}else{O.find(".propWordWrapDiv").width(M)}O.find(".propWordWrapDiv").height("auto")}else{if(O.find(".first_ProductName,.second_ProductName,.third_ProductName,.fourth_ProductName,.fifth_ProductName,.sixth_ProductName").length>0){if(n==6){O.find(".productName").width(M*0.8)}else{O.find(".productName").width(M)}O.find(".productName").height("auto")}else{var X=0;O.find(".productName > a").each(function(){if($(this).width()>X){X=$(this).width()}});if(X>M){M=X}}}var ac=O.find(".propDiv");if(n==6){ac.css("width",M*0.8+"px");O.find(".sixth_ProductName").css("width","80%")}else{ac.css("width",M+"px")}if(T.width()!=M){T.css("width",M+"px")}if(T.height()!=y){T.css("height",y+"px");if($.browser.msie&&$.browser.version==6){T.addClass("wocaie6").removeClass("wocaie6")}}if($(".propWordWrapDiv").length>0){Site.unifiedAttrVal(c,".propWordWrapDiv","height")}if(n==6){O.find(".sixth_ProductPanel").css({top:"-"+(O.find(".sixth_ProductPanel").height()-12)+"px","max-height":y/2+10})}if(O.outerHeight()>h&&(v==0||v==1)){h=O.outerHeight()}if(I>h&&(v==2||v==3)){h=I}var aa=O.outerWidth(true);var Z=O.outerHeight(true);if(aa>D){D=aa}e+=aa;var V=$(this).find(".eighth_ProductPanel");var U=V.find(".eighth_Pricepanel");var W=V.find(".fk_rightPiecePanel");if(!!V.length){if(Q==1){U.css("left","4px");W.css("right","16px")}else{if(Q==2){U.css("left",(4+P)+"px");W.css("right",(16+P)+"px");V.css("bottom",(84+P)+"px")}}}});if(u.length>=1){u.each(function(){if($(this).find(".fifth_mallBuy").length>0){var K=parseInt($(this).find(".fifth_mallBuy").width())-1;$(this).find(".fifth_mallBuy").css({"line-height":K+"px"})}})}tmpTotalWidth=e;var o=c.find(".demo");var C=c.find(".demo0");F=C.height();if(h>0){if(n==6){o.css("height",(h+50)+"px")}else{o.css("height",h+"px")}}if(v==0||v==1){C.css("width",e+"px");if(u.length==0){return}var a=o.width(),B=C.width();if(B<=a){jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},{moduleId:x,imgEffOption:g,tagetOption:i,callback:Site.createImageEffectContent_product,callbackArgs:q});return}}if(v==2||v==3){var h=o.height(),k=C.height();if(k<=h){jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},{moduleId:x,imgEffOption:g,tagetOption:i,callback:Site.createImageEffectContent_product,callbackArgs:q});return}}var m=u.first().outerWidth(true);if(m==0){return}var H=Fai.top.productMarqueelist;var t=0,d=u.length-1;u.each(function(L,N){if(t>a){return false}var K=$(N).clone().attr("cloneDiv","true"),O=K.children("div.imgDiv").attr("id");K.children("div.imgDiv").attr("id",O+"_clone");C.append(K);t+=K.outerWidth(true);if(0===L&&(v==2||v==3)){$(N).css("clear","both");K.css("clear","both")}if(Fai.isIE6()||Fai.isIE7()){if(L===d){$(u[L]).after('
    ');K.after('
    ')}}if(typeof H!="undefined"){for(var L=0;Ln){n=t.height}})}g.find(".productTileForm").each(function(){var A=$(this).attr("faiHeight");if(Fai.isNull(A)){return}var y=$(this).attr("faiWidth");var s=$(this).attr("faiWidthOr");var z=$(this).attr("faiHeightOr");var D=$(this).find(".imgDiv");var B=D.width();var C=D.height();var p=$(this).find(".eighth_ProductPanel");var x=p.find(".eighth_Pricepanel");var r=p.find(".fk_rightPiecePanel");var t=D.find("img");if(j||h==6||h==8){C=D.height()}var w={width:B,height:C};if(i==2){var q=s/z;var o=B/C;if(o<=q){t.css("width",q*C+"px");t.css("height",C+"px");t.css("marginLeft",((B-q*C)/2)+"px")}else{t.css("height",B/q+"px");t.css("width",B+"px");t.css("marginTop",((C-B/q)/2)+"px")}}else{if(typeof(i)=="number"&&i==0){w=Fai.Img.calcSize(s,z,B,C,Fai.Img.MODE_SCALE_FILL);t.css("width",w.width+"px");t.css("height",w.height+"px");D.css("height",C+"px");t.css({marginTop:"",marginLeft:""})}else{if(typeof(i)!=="number"&&i){w=Fai.Img.calcSize(s,z,B,C,Fai.Img.MODE_SCALE_FILL)}t.css("width",w.width+"px");t.css("height",w.height+"px");D.css("height",C+"px");t.css({marginTop:"",marginLeft:""})}}if(Fai.top._manageMode){t.data("realWidth",w.width);t.data("realHeight",w.height)}if(h==4||h==5||h==9){var v=$(this).find(".fifth_mallBuy");var u=v.width();v.css("line-height",u+"px");v.css("height",u+"px")}if(h==6){$(this).css({"margin-bottom":"54px",overflow:"visible"})}if(!!p.length){if(e==0){if(m==1){x.css("left","15px");r.css("right","33px");p.css("bottom","36px")}}else{if(e==1){x.css("left","14px");r.css("right","34px");p.css("bottom","36px")}else{if(e==2){$(this).width(D.outerWidth());$(this).height(D.outerHeight());if(m==1){x.css("left",(14+a)+"px");r.css("right",(36+a)+"px");p.css("bottom",(36+a)+"px")}else{x.css("left",(4+a)+"px");r.css("right",(26+a)+"px");p.css("bottom",(25+a)+"px")}}}}}if(h<6){$(this).width(D.outerWidth(true))}});if(k>=4&&k<6){Site.clearImageEffectContent_product(b,"propList");return}if(l==-1&&g.find(".productNameWordWrap").length==0){Site.unifiedAttrVal(g,".productTileForm","height")}if(g.find(".productNameWordWrap").length>0){g.find(".productNameWordWrap").attr("paramLayoutType",h);if(h==3){var d=g.find(".productNameWordWrap");var c=0;d.each(function(){var o=$(this).outerHeight();o=parseInt(o);if(o>c){c=o}});d.each(function(){$(this).css("height",c+"px")})}else{Site.unifiedAttrVal(g,".productNameWordWrap","height")}Site.unifiedAttrVal(g,".productTileForm","height")}};Site.initProductRestrict=function(a,i,g,e,c){if(i){var h=0;if(c.count!=null){h=c.count}var j=0;j=e-h;if(Fai.fkEval(j)<0){j=-1}var b=1,d=-1;if(g>1&&e!=0){$("#limitAmountDiv").text("( "+LS.minAmount+" : "+g+" ; "+LS.maxAmount+" : "+j+" )");b=g;d=j}else{if(g==1&&e!=0){$("#limitAmountDiv").text("( "+LS.maxAmount+" : "+j+" )");d=j}else{if(g>1&&e==0){$("#limitAmountDiv").text("( "+LS.minAmount+" : "+g+" )");b=g}}}$("#cartbuyCount"+a).unbind("change");$("#cartbuyCount"+a).val(b);$("#cartbuyCount"+a).change(function(){var k=$("#cartbuyCount"+a).val();var l=1;if(Fai.isInteger(k)){l=parseInt(k)}if(ld||b==d)&&d!=-1){$("#buyCountInc"+a).addClass("disableMallJia")}}else{if(d!=-1&&(l>d||l==d)){l=d;$("#buyCountInc"+a).addClass("disableMallJia");$("#buyCountDes"+a).removeClass("disableMallJian")}else{if(l>9999998){l=9999999;$("#buyCountDes"+a).removeClass("disableMallJian");$("#buyCountInc"+a).addClass("disableMallJia")}else{$("#buyCountDes"+a).removeClass("disableMallJian");$("#buyCountInc"+a).removeClass("disableMallJia")}}}$("#cartbuyCount"+a).val(l)});$("#cartbuyCount"+a).change();$("#buyCountDes"+a).click(function(){var k=$("#cartbuyCount"+a).val();var l=1;if(Fai.isInteger(k)){l=parseInt(k)}if(ld-1&&d!=-1){if(d>b){$("#cartbuyCount"+a).val(d);$("#buyCountInc"+a).addClass("disableMallJia")}else{$("#cartbuyCount"+a).val(b);$("#buyCountInc"+a).addClass("disableMallJia")}}else{$("#buyCountDes"+a).removeClass("disableMallJian")}})}};Site.wipeOffRunOne=true;Site.initProductOptions=function(n,h,s,b,p,k){var a;if(n==="PdSlide"){a=$("#fk-productSlideContent")}else{a=$("#module"+n)}if(Fai.isNull(a)){return}var q=a.find(".optionItemWrap");var o=[];var j=a.find("#realMallAmount").html();var l=a.find("#mallAmount").html();var c=a.find("#mallWeight").html();if(!s){$.each(h,function(v,w){if(typeof w.oAmount!="undefined"){delete w.oAmount}})}if(l<=0){t(q.find(".J-item"))}else{$.each(h,function(v,x){if(x.oAmount<=0&&q.length<=1){var w=q.find(".J-item[data='"+x.t2+"']");t(w)}else{if(x.oAmount<=0&&q.length>1){o.push(x.t2)}}})}q.find(".J-item").hover(function(){if($(this).attr("isEmptyAmount")=="1"){return}$(this).addClass("g_borderSelected fk-mainBorderColor fk-mainFontColor")},function(){if($(this).attr("isEmptyAmount")=="1"){return}if(!$(this).hasClass("optionItemHover")){$(this).removeClass("g_borderSelected fk-mainBorderColor fk-mainFontColor")}});q.find(".optionItem img").hover(function(){if($(this).attr("isEmptyAmount")=="1"){return}var x=$(this).parent();if(x.find("img").length===0){return false}var v=x.find(".J-img-tip");if(v.length>0){v.stop(true,true).fadeIn();return false}var w=x.find("span").text();v=["
    ","
    ",w,"
    ","
    ","
    "];v=$(v.join(""));x.append(v);v.find(".J-ico").css("left",(v.outerWidth()-11)/2);v.css("left",-((v.outerWidth()-38)/2));v.fadeIn()},function(){if($(this).attr("isEmptyAmount")=="1"){return}$(this).parent().find(".J-img-tip").fadeOut()});var e=$("#cartbuyCount"+n).val();var d=$("#imgDiv"+n);var i="
    ";q.find(".optionItem").bind("click",function(){if($(this).find(".J-item").attr("isEmptyAmount")=="1"){return}var Y=$(this),Z=Y.siblings(),P=Y.find(".J-item");var X;if(P.hasClass("J-isSelected")){P.removeClass("optionItemHover g_borderSelected fk-mainBorderColor fk-mainFontColor J-isSelected");P.parent().find(".J-img-tri").remove();a.find("#realMallAmount").html(j);a.find("#mallAmount").html(l);a.find("#mallWeight").html(c);if(p){$("#limitAmountDiv").text("");$("#buyCountInc"+n).removeClass("disableMallJia");$("#buyCountDes"+n).removeClass("disableMallJian");$("#buyCountInc"+n).unbind("click");$("#buyCountDes"+n).unbind("click")}var A=q.find(".optionItem:hidden");if(A.length>0){X="";q.each(function(ae,af){if($(q[ae]).find(".J-item.g_borderSelected").length<=0){X+="x_"}else{X+=$(q[ae]).find(".J-item.g_borderSelected").attr("data")+"_"}});X=X.substring(0,X.length-1);$.each(A,function(){var ah=false;var ag=$(this).find(".J-item").attr("data");var af=$(".optionItemWrap").index($(this).parent());var ae=X.split("_");ae[af]=ag;var ai=ae.join("_");$.each(h,function(aj,ak){if(!isNaN(ak.flag)&&ak.flag==0){return true}if(u(ai,ak.t2)){ah=true;return false}});if(ah){A.show()}})}}else{P.addClass("optionItemHover g_borderSelected fk-mainBorderColor fk-mainFontColor J-isSelected");Z.find(".J-item").removeClass("optionItemHover g_borderSelected fk-mainBorderColor fk-mainFontColor J-isSelected");Z.find(".J-img-tri").remove();if(P.hasClass("J-item-img")){Y.append(i)}}if(q.length>1&&s){var ac=0;if(typeof X=="undefined"){X="";q.each(function(ae,af){if($(q[ae]).find(".J-item.g_borderSelected").length<=0){X+="x_"}else{X+=$(q[ae]).find(".J-item.g_borderSelected").attr("data")+"_"}});X=X.substring(0,X.length-1)}$.each(h,function(ae,af){if(u(X,af.t2)){if(af.flag!=0&&!isNaN(af.oAmount)){ac+=af.oAmount}}});$("#mallAmount").text(ac)}var F=P.attr("_fk-org");if(d.length>0&&F){d.find("img").attr("src",F);var B=d.find(".cloud-zoom");if(B.length>0){d.attr("faihref",F);B.attr("href",F).data("zoom").destroy();B.CloudZoom({imageWidth:parseInt(P.attr("faiwidth")),imageHeight:parseInt(P.attr("faiheight"))})}}var H=q.length;var K=q.find(".J-item.g_borderSelected");if(H==K.length){var z="",R,C,v,E,I;$.each(K,function(ae,af){z+=$(af).attr("data")+"_"});$.each(h,function(ae,ag){var af=ag.t2;if((af+"_")==z){R=ag.oPrice;C=ag.oAmount;v=ag.minAmount;E=ag.maxAmount;I=ag.w}});if(p){$("#limitAmountDiv").text("");var w=0;var ad=k.optionsCount;if(ad!=null&&ad.d!=null){for(var V=0;V1&&E!=0){$("#limitAmountDiv").text("( "+LS.minAmount+" : "+v+" ; "+LS.maxAmount+" : "+D+" )");Q=v;U=D}else{if(v==1&&E!=0){$("#limitAmountDiv").text("( "+LS.maxAmount+" : "+D+" )");U=D}else{if(v>1&&E==0){$("#limitAmountDiv").text("( "+LS.minAmount+" : "+v+" )");Q=v}}}$("#cartbuyCount"+n).val(Q);$("#cartbuyCount"+n).unbind("change");$("#cartbuyCount"+n).bind("change");$("#cartbuyCount"+n).change(function(){var ae=$("#cartbuyCount"+n).val();var af=1;if(Fai.isInteger(ae)){af=parseInt(ae)}if(afU||Q==U)&&U!=-1){$("#buyCountInc"+n).addClass("disableMallJia")}}else{if(U!=-1&&(af>U||af==U)){af=U;$("#buyCountInc"+n).addClass("disableMallJia");$("#buyCountDes"+n).removeClass("disableMallJian")}else{if(af>9999998){af=9999999;$("#buyCountDes"+n).removeClass("disableMallJian");$("#buyCountInc"+n).addClass("disableMallJia")}else{$("#buyCountDes"+n).removeClass("disableMallJian");$("#buyCountInc"+n).removeClass("disableMallJia")}}}$("#cartbuyCount"+n).val(af)});$("#cartbuyCount"+n).change();$("#buyCountDes"+n).unbind("click");$("#buyCountInc"+n).unbind("click");$("#buyCountDes"+n).click(function(){var ae=$("#cartbuyCount"+n).val();var af=1;if(Fai.isInteger(ae)){af=parseInt(ae)}if(afU-1&&U!=-1){if(U>Q){$("#cartbuyCount"+n).val(U);$("#buyCountInc"+n).addClass("disableMallJia")}else{$("#cartbuyCount"+n).val(Q);$("#buyCountInc"+n).addClass("disableMallJia")}}else{$("#buyCountDes"+n).removeClass("disableMallJian")}})}if(s){$("#mallAmount").text(C)}if(R==null){if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#realMallAmount").text(Fai.formatPriceEn(b))}else{$("#realMallAmount").text(b)}Site.onlyChangeSalePrice(b)}else{if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#realMallAmount").text(Fai.formatPriceEn(R))}else{$("#realMallAmount").text(R)}Site.onlyChangeSalePrice(R);if(Fai.isIE10()){if(Site.wipeOffRunOne){$(".pd_J .pd_propTable .propName").each(function(ae,af){$(af).removeClass("propName");setTimeout(function(){$(af).addClass("propName")},0)})}Site.wipeOffRunOne=false}}if(I!=null){$("#mallWeight").text(I)}}if(H!=K.length&&H!=1){m()}if((H-1)<=K.length&&H!=1){var O="";$.each(q,function(ae,af){if($(q[ae]).find(".J-item.g_borderSelected").length<=0){O+="x_"}else{O+=$(q[ae]).find(".J-item.g_borderSelected").attr("data")+"_"}});if(O!=""){O=O.substring(0,O.length-1)}var G="";$.each(q,function(ae,ag){var af=$(q[ae]).find(".J-item.g_borderSelected");if(af.length<=0){G=$(q[ae])}});if(G!=""){var aa=G.find(".J-item");$.each(aa,function(ae,ag){var af=O.replace("x",$(aa[ae]).attr("data"));if($.inArray(af,o)>=0){t(aa[ae])}else{g(aa[ae])}})}else{$.each(q,function(ae,ag){var af=$(q[ae]).find(".J-item");$.each(af,function(aj,ai){if($(af[aj]).hasClass("g_borderSelected")){return}var ah=O.split("_");ah[ae]=$(af[aj]).attr("data");var ak=ah.join("_");if($.inArray(ak,o)>=0){t(af[aj])}else{g(af[aj])}})})}}var W=[],T=false;for(var V=0;V1){var M=W.length;for(var V=0;V'+LS.sucCollection+"
    "}else{if(j=="warn"){k.width=210;k.htmlContent='
    '+LS.cancelCollection+"
    "}else{if(j=="err"){k.height=90;k.width=280;k.htmlContent='
    ';k.htmlContent+=LS.isManagefailCollection+"
    "}}}var i=Site.popupBox(k),l;if(Fai.top._isTemplateVersion2){l={"margin-top":"0px",right:"9px",width:"18px",height:"18px","background-position":"-448px -187px"}}else{l={"margin-top":"9px",right:"9px",width:"12px",height:"12px","background-position":"-1665px -110px"}}i.find(".popupBClose").css(l);if(j!="err"){setTimeout(function(){i.find(".popupBClose").click()},1500)}}function c(){e("#pdCollection").on("click",function(){if(h.sessionMid==0){if(h._manageMode){d("err")}else{window.location.href="login.jsp@url="+Fai.encodeUrl(window.location.href);Fai.Cookie.set("collectId",h.pid)}}else{if(e.inArray(h.pid,h.collectionList)==-1){h.collectionList.push(h.pid);e("#pdCollection .pdCollectIcon").addClass("collectionSelect");e("#pdCollection .pdCollectIcon").addClass("faisco-icons-star3");e(".faisco-icons-star3").css({"font-size":"22px","line-height":"22px",height:"22px"});e("#pdCollection .pdCollectIcon").removeClass("faisco-icons-start2");b("suc")}else{if(e.inArray(h.pid,h.collectionList)!=-1){h.collectionList.splice(e.inArray(h.pid,h.collectionList),1);e("#pdCollection .pdCollectIcon").removeClass("collectionSelect");e("#pdCollection .pdCollectIcon").addClass("faisco-icons-start2");e("#pdCollection .pdCollectIcon").removeClass("faisco-icons-star3");b("warn")}}}})}function a(i){if(h.sessionMid!=0&&e.inArray(h.pid,h.collectionList)!=-1){e("#pdCollection .pdCollectIcon").addClass("collectionSelect");e("#pdCollection .pdCollectIcon").addClass("faisco-icons-star3");e(".faisco-icons-star3").css({"font-size":"22px","line-height":"22px",height:"22px"});e("#pdCollection .pdCollectIcon").removeClass("faisco-icons-start2")}if(!!i){return}}})(jQuery,Site.initMbPdCollection);Site.loadCollection=function(){$("#pdCollection").hover(function(){$("#pdCollection .collection").removeClass("text").addClass("productOperaTextColor").addClass("operaTextHover");$("#pdCollection .pdCollectIcon").removeClass("text").addClass("productOperaTextColor").addClass("operaTextHover")},function(){$("#pdCollection .collection").addClass("text").removeClass("productOperaTextColor").removeClass("operaTextHover");$("#pdCollection .pdCollectIcon").addClass("text").removeClass("productOperaTextColor").removeClass("operaTextHover")});$("#pdCollection .collection,#pdCollection .pdCollectIcon").hover(function(){$("#pdCollection .collection").removeClass("text").addClass("productOperaTextColor").addClass("operaTextHover");$("#pdCollection .pdCollectIcon").removeClass("text").addClass("productOperaTextColor").addClass("operaTextHover")})};Site.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};Site.loadProductDetail=function(o,r,l,j){var c=$("#module"+o),v=j==5?"vertical":"horizontal",w="leftIcon"+o,g="rightIcon"+o,i,d;if(j==5){v="vertical";w="prePdIcon"+o;g="nextPdIcon"+o}if(Fai.isNull(c)){return}var k=c.find(".imgDiv");var m=k.attr("faiWidth");var t=k.attr("faiHeight");if(Fai.isNull(t)){return}if(r==null&&l==null){var x=k.width();var q=k.height()}else{var x=r;var q=l}var b=Fai.Img.calcSize(m,t,x,q,Fai.Img.MODE_SCALE_DEFLATE_FILL);var p=b.height;var s=b.width;d=$("#imgGroup"+o);if(j==5){thumbList=d.find(".imgGroupDiv");if(r==null&&l==null){d.height(q)}if((thumbList.length*thumbList.outerHeight(true))<=q){c.find("#prePdIcon"+o).hide();c.find("#nextPdIcon"+o).hide();d.find(".J_imgDivsStyle5").css({position:"absolute",top:"-8px",left:"0",height:q+"px"})}else{d.find(".J_imgDivsStyle5").height(q-2*d.find("#nextPdIcon"+o).width())}}var y=c.find(".imgGroupDiv");y.each(function(){var D=$(this).attr("faiWidth");var E=$(this).attr("faiHeight");if(Fai.isNull(E)){return}var C=Fai.Img.calcSize(D,E,x,q,Fai.Img.MODE_SCALE_DEFLATE_FILL);if(C.height>p){p=C.height}if(C.width>s){s=C.width}var B=$(this).find("img");$(B).one("load",function(){var H=B.width();var I=B.height();D=B.attr("faiWidth");E=B.attr("faiHeight");var G=Fai.Img.MODE_SCALE_FILL;if(H==1&&I==1){var F=new Image();F.src=B.data("original");$(F).on("load",function(){H=F.width;I=F.height;C=Fai.Img.calcSize(H,I,D,E,G);B.css("width",C.width+"px");B.css("height",C.height+"px");if(B.attr("src")!=B.data("original")){B.attr("src",B.data("original"))}B.css("display","block")})}else{C=Fai.Img.calcSize(H,I,D,E,G);if(C.width==1){C.width=D}if(C.height==1){C.height=E}B.css("width",C.width+"px");B.css("height",C.height+"px");B.css("display","block")}})});var A=k.find("img");if(j!=5){A.css("width",b.width+"px");A.css("height",b.height+"px")}A.css("display","block");k.data("divWidth",x);k.data("divHeight",q);if(r!=null&&l!=null){k.css("height",l+"px");k.css("width",r+"px")}if(j==2){$(".pd_J .imgContainer_J").css("margin","0px auto");$(".pd_J .imgContainer_J").css("float","none");$(".pd_J .imgContainer_J").parent().css("width","100%")}var a=k.find(".cloud-zoom");if(a.length==1){a.attr("rel","adjustX:-4, adjustY:-4, maxWidth:"+x+", maxHeight:"+p+',position:"inside"');a.CloudZoom({imageHeight:t,imageWidth:m})}if(y.length>1){if(j!=5){i=d.width()-$("#leftIcon"+o).outerWidth(true)-$("#rightIcon"+o).outerWidth(true)}$("#imgDivs"+o).width(i);var z=(a.length==1)?"true":"false";Site.multiPhoto($("#imgDivs"+o),$("#imgDiv"+o),{leftIconID:w,rightIconID:g,zoom:z,direction:v})}var e=c.find(".pd_J").width(),h=c.find(".imgContainer_J").width(),u=c.find(".pdLayoutR_J"),n=c.find(".pdAppendLayout_J");if((e-h)<200){u.appendTo(n)}};Site.productBigPicResponsive=function(a,c,d,g,h){var b=$("#module"+a),m,j,l,k,e,i;if(d||b.length<1){return}j=b.width();if(c){k=(j-260)/2}else{k=(j+300)/3}l=Fai.Img.calcSize(g,h,k,k,Fai.Img.MODE_SCALE_FILL);m=b.find("#imgDiv"+a);m.css({width:k+"px",height:k+"px"});m.find("img").css({width:l.width+"px",height:l.height+"px"});if(c){b.find(".imgContainer_J").width(k+130)}else{b.find(".imgContainer_J").width(k)}e=b.find("#imgGroup"+a);e.height(l.height)};Site.initPdCommentSwitch=function(){var a=0;if(document.cookie.length>0){cStart=document.cookie.indexOf("tabSwitch=");if(-1!=cStart){cStart=cStart+10;cEnd=document.cookie.indexOf(";",cStart);if(-1==cEnd){cEnd=document.cookie.length}a=unescape(document.cookie.substring(cStart,cEnd))}}$(".tabSwitch").eq(a).click()};Site.pdSaleRecordPagenation=function(b,a){$("#saleRecordSwitch").on("click",function(){if($("#saleRecordPanel .tableBody").children().length==0){Site.loadSaleRecord(b,a,1)}});$("body").on({hover:function(){$(this).addClass("g_hover")},mouseleave:function(){$(this).removeClass("g_hover")},click:function(){var d=$("#saleRecordPanel .pagenation .pageNo").not(":has('.g_border')").text();var c=1;if($(this).parent().hasClass("pagePrev")){c=Number(d)-1}else{if($(this).parent().hasClass("pageNext")){c=Number(d)+1}else{c=Number($(this).text())}}Site.loadSaleRecord(b,a,c)}},"#saleRecordPanel .pagenation .g_border")};Site.loadSaleRecord=function(c,a,b){$.ajax({url:"ajax/product_h.jsp@cmd=getsalerecordlist",data:"pid="+c+"&pno="+b,type:"post",dataType:"json",success:function(e){if(e.success){$(".saleRecordBody tr").remove();var h=[];$.each(e.list,function(j,i){h.push("");h.push(""+i.createName+"");if(a){h.push(""+i.optionType+"")}h.push(""+i.amount+"");var l=new Date(i.paidTime);h.push(""+$.format.date(l,"yyyy-MM-dd")+"
    "+$.format.date(l,"HH:mm:ss")+"");h.push("")});$(".saleRecordBody .tableBody").html(h.join(""));if($(".saleRecordFooter .pagenation").length!=0){var d=[];d.push("
    ");if(b==1){d.push(""+LS.prevPager+"")}else{d.push(""+LS.prevPager+"")}d.push("
    ");if(b==1){d.push("
    1
    ")}else{d.push("")}if(b-2>2){d.push("
    ...
    ");for(var g=b-2;g"+g+"
    ")}}else{for(var g=2;g"+g+"
    ")}}if(b!=1&&b!=e.totalPage){d.push("
    "+b+"
    ")}if(b+2"+g+"
    ")}d.push("
    ...
    ")}else{for(var g=b+1;g<=e.totalPage-1;g++){d.push("")}}if(b==e.totalPage){d.push("
    "+e.totalPage+"
    ")}else{d.push("")}d.push("
    ");if(b==e.totalPage){d.push(""+LS.nextPager+"")}else{d.push(""+LS.nextPager+"")}d.push("
    ");$(".saleRecordFooter .pagenation").children().remove();$(".saleRecordFooter .pagenation").html(d.join(""))}}},error:function(){Fai.ing(LS.systemError)}})};Site.loadPdShareMore=function(){if(Fai.isIE6()||Fai.isIE7()){if(Fai.isIE6()){$(".productOpera .shareInfo").css({top:"20px",left:"0"});$(".productOpera .pdShareDiv").css({position:"relative"});$(".pdShare").css({"padding-top":"0"})}if(Fai.isIE7()){$(".productOpera .shareInfo").css({top:"26px",left:"0"});$(".productOpera .pdShareDiv").css({position:"relative"})}var c=$(".productOpera .m_shareCtrl a").length;if(c<7){if(c==0){$(".productOpera .shareInfo").width("75px");$(".productOpera .shareInfo").height("30px")}else{$(".productOpera .shareInfo").width(c*28+"px")}}else{$(".productOpera .shareInfo").width("200px")}if($(".productOpera .shareInfo").width<75){$(".productOpera .shareInfo").width("75px")}}$(".pdShareDiv .pdShare,.pdShareDiv .shareInfo ").hover(function(){$(".pdShareDiv .pdShare").children("div").removeClass("text").addClass("productOperaTextColor").addClass("operaTextHover")},function(){$(".pdShareDiv .pdShare").children("div").addClass("text").removeClass("productOperaTextColor").removeClass("operaTextHover")});$(".pdShare .share ,.pdShare .pdShareIcon").hover(function(){$(".pdShare .share").addClass("productOperaTextColor").addClass("operaTextHover");$(".pdShare .pdShareIcon").addClass("productOperaTextColor").addClass("operaTextHover")});$("body").on({hover:function(){$("#pdShare").addClass("pdShareHover");$("#pdShare").css({"z-index":"999"});$(".shareInfo_J").css({"z-index":"998"});$(".productOpera .shareInfo").show();$(".shareDown").addClass("shareUp");$(".share").addClass("operaTextHover");if(Fai.isIE6()||Fai.isIE7()){$(".productOpera").css("z-index","1000")}},mouseleave:function(){$("#pdShare").removeClass("pdShareHover");$("#pdShare").css({"z-index":""});$(".shareInfo_J").css({"z-index":""});$(".productOpera .shareInfo").hide();$(".shareDown").removeClass("shareUp");$(".share").removeClass("operaTextHover");if(Fai.isIE6()||Fai.isIE7()){$(".productOpera").css("z-index","")}}},".productOpera .pdShare,.productOpera .shareInfo");var d=$(".pd_J .pd_t_l_left_J"),b=d.find(".imgContainer_J"),a=d.find(".shareContainer_J"),e=a.find(".shareInfo_J");if(Fai.isIE6()||Fai.isIE7()){d.width(b.width())}setTimeout(function(){var h=a.height(),i=e.height(),g=e.find(".shareMore_J");if(i>h+5){$(g).click(function(){if(a.hasClass("s_expand")){a.removeClass("s_expand");g.find("div").removeClass("s_more_up")}else{a.addClass("s_expand");g.find("div").addClass("s_more_up")}})}else{g.remove()}},0)};Site.loadPdSerOnLineMore=function(){if(Fai.isIE6()||Fai.isIE7()){if(Fai.isIE6()){$(".productOpera .serOnlineInfo").css({top:"22px",left:"0"});$(".productOpera .pdSerOnlineDiv").css({position:"relative"});$(".pdSerOnline").css({"padding-top":"0"})}if(Fai.isIE7()){$(".productOpera .serOnlineInfo").css({top:"28px",left:"0"});$(".productOpera .pdSerOnlineDiv").css({position:"relative"})}}$(".pdSerOnline,.serOnlineInfo").hover(function(){$(".pdSerOnline .pdKefuIcon").addClass("productOperaTextColor").addClass("operaTextHover").removeClass("text");$(".pdSerOnline .serOnline").addClass("productOperaTextColor").addClass("operaTextHover").removeClass("text")},function(){$(".pdSerOnline .pdKefuIcon").addClass("text").removeClass("operaTextHover").removeClass("productOperaTextColor");$(".pdSerOnline .serOnline").addClass("text").removeClass("operaTextHover").removeClass("productOperaTextColor")});$(".pdSerOnline .pdKefuIcon,.pdSerOnline .serOnline").hover(function(){$(".pdSerOnline .pdKefuIcon").addClass("productOperaTextColor").addClass("operaTextHover").removeClass("text");$(".pdSerOnline .serOnline").addClass("productOperaTextColor").addClass("operaTextHover").removeClass("text")});$("body").on({hover:function(){$("#pdSerOnline").addClass("pdSerOnlineHover");$("#pdSerOnline").css({"z-index":"999"});$(".J_serOnlineInfo").css({"z-index":"998"});$(".productOpera .serOnlineInfo").show();$(".serOnlineDown").addClass("serOnlineUp");$(".pdSerOnline").addClass("operaTextHover");if(Fai.isIE6()||Fai.isIE7()){$(".productOpera").css("z-index","1000")}var d=0;var a=0;var b=0;var e=0;$(".serOnline-list:odd").each(function(g,h){d=d>$(h).width()?d:$(h).width();e++});$(".serOnline-list:even").each(function(g,h){a=a>$(h).width()?a:$(h).width();e++});var c=$("#pdSerOnline").width();b=d+a+27;if(c>b){$(".productDetail .serOnline-service").css("width",(c+5)+"px");$(".productDetail .serOnline-list:odd").css("width",(d+c-b+5)+"px");$(".productDetail .serOnline-list:even").css("width",a+"px")}else{$(".productDetail .serOnline-service").css("width",(b+5)+"px");$(".productDetail .serOnline-list:odd").css("width",d+"px");$(".productDetail .serOnline-list:even").css("width",a+"px")}if(e>1){$(".productDetail .serOnline-list:even").css("margin-right","27px")}},mouseleave:function(){$("#pdSerOnline").removeClass("pdSerOnlineHover");$("#pdSerOnline").css({"z-index":""});$(".J_serOnlineInfo").css({"z-index":""});$(".productOpera .serOnlineInfo").hide();$(".serOnlineDown").removeClass("serOnlineUp");$(".pdSerOnline").removeClass("operaTextHover");if(Fai.isIE6()||Fai.isIE7()){$(".productOpera").css("z-index","")}}},".productOpera .pdSerOnline,.productOpera .serOnlineInfo")};Site.onlineServiceNameHoverShow=function(){var a=$("
    ");$(".J_onlineServiceNameHoverShow").mouseover(function(c){var d=this;var b=$(d).offset().left+12;var g=$(d).offset().top+30;a.html($(this).attr("_title")).css({left:(b||0),top:(g||0)}).show();$("body").append(a);setTimeout(function(){a.remove()},2000)}).mouseout(function(){a.remove()})};Site.onlineServiceWaWaIsOnline=function(){$(".J_aliWaWa").each(function(){var b=this;var a=$(b).attr("account");$(b).siblings(".serOnline-img").addClass("wawaImgOnline");if(a!=null&&typeof(a)!="undefined"){$.ajax({type:"post",dataType:"jsonp",url:"../amos.alicdn.com/muliuserstatus.aw@beginnum=0&site=cnalichn&charset=utf-8&uids="+Fai.encodeUrl(a),success:function(c){if(c.data!=null){if(c.data[0]==0){$(b).addClass("serOnlineOffline");$(b).siblings(".serOnline-img").removeClass("wawaImgOnline");$(b).siblings(".serOnline-img").addClass("wawaImgOffline")}else{$(b).removeClass("serOnlineOffline")}}}})}});$(".J_taobaoWaWa ").each(function(){var b=this;var a=$(b).attr("account");$(b).siblings(".serOnline-img").addClass("wawaImgOnline");if(a!=null&&typeof(a)!="undefined"){$.ajax({type:"post",dataType:"jsonp",url:"../amos.alicdn.com/muliuserstatus.aw@beginnum=0&site=cntaobao&charset=utf-8&uids="+Fai.encodeUrl(a),success:function(c){if(c.data!=null){if(c.data[0]==0){$(b).addClass("serOnlineOffline");$(b).siblings(".serOnline-img").removeClass("wawaImgOnline");$(b).siblings(".serOnline-img").addClass("wawaImgOffline")}else{$(b).removeClass("serOnlineOffline")}}}})}})};Site.loadProductSlide=function(a){var b=$(".slide");if(Fai.isNull(b)){return}var m=b.find(".imgDiv");var j=m.attr("faiWidth");var k=m.attr("faiHeight");var h=m.width();var d=m.height();var c=b.find(".imgGroupDiv");c.each(function(){var q=$(this).width();var s=$(this).height();var n=$(this).find("img");var p=n.attr("faiWidth");var r=n.attr("faiHeight");var o=Fai.Img.calcSize(p,r,q,s,Fai.Img.MODE_SCALE_FILL);n.css("width",o.width+"px");n.css("height",o.height+"px");n.css("display","block")});var i=Fai.Img.calcSize(j,k,h,d,Fai.Img.MODE_SCALE_DEFLATE_FILL);var e=m.find("img");e.css("width",i.width+"px");e.css("height",i.height+"px");e.css("display","block");var l=m.find(".cloud-zoom");if(l.length==1){l.attr("rel","adjustX:-4, adjustY:-4, maxWidth:"+h+", maxHeight:"+d+',position:"inside"');l.CloudZoom({imageHeight:k,imageWidth:j})}if(c.length>1){var g=(l.length==1)?"true":"false";Site.multiPhoto($("#imgDivs"+a),$("#imgDiv"+a),{leftIconID:"leftIcon"+a,rightIconID:"rightIcon"+a,zoom:g})}};Site.loadProductPicList=function(g,d,c,e,a){var b=$("#module"+g);if(Fai.isNull(b)){return}b.find(".productPicListForm").each(function(){var r=$(this).parent(".productList").attr("picwidth");var s=$(this).parent(".productList").attr("picheight");var q=$(this).attr("faiHeight");if(Fai.isNull(q)){return}var p=$(this).attr("faiWidth"),l=$(this).attr("faiWidthOr"),k=$(this).attr("faiHeightOr"),t=$(this).find(".imgDiv");var j=t.find("img");var o={width:r,height:s};if(d==2){var i=l/k,h=r/s;if(h<=i){p=i*s+"px";q=s+"px";j.css("width",i*s+"px");j.css("height",s+"px");j.css("marginLeft",((r-i*s)/2)+"px");t.css("overflow","hidden");t.css("height",o.height+"px");t.css("width",o.width+"px")}else{p=r;q=r/i;j.css("height",r/i+"px");j.css("width",r+"px");j.css("marginTop",((s-r/i)/2)+"px");t.css("overflow","hidden");t.css("height",o.height+"px");t.css("width",o.width+"px")}}else{if(typeof(d)=="number"&&(d==0)){o=Fai.Img.calcSize($(this).attr("faiWidthOr"),$(this).attr("faiHeightOr"),r,s,Fai.Img.MODE_SCALE_FILL);p=o.width;q=o.height;j.css("width",o.width+"px");j.css("height",o.height+"px");t.css("height",o.height+"px");j.css({marginTop:"",marginLeft:""});t.css("height",o.height+"px");t.css("width",o.width+"px")}else{if(typeof(d)!="number"&&d){if(c){r=p;s=q}o=Fai.Img.calcSize($(this).attr("faiWidthOr"),$(this).attr("faiHeightOr"),r,s,Fai.Img.MODE_SCALE_FILL);j.css("width",o.width+"px");j.css("height",o.height+"px");t.css("height",s+"px");j.css({marginTop:"",marginLeft:""})}else{j.css("width",o.width+"px");j.css("height",o.height+"px");j.css({marginTop:"",marginLeft:""});t.css("height",s+"px");t.css("width",r+"px")}}}if(typeof(d)!="number"&&!d&&!c){t.css("height","160px");t.css("width","160px");j.css("width","160px");j.css("height","160px");j.css({marginTop:"",marginLeft:""})}if(a==4||a==5||a==9){if($(this).find(".fifth_mallBuy").length>0){var n=$(this).find(".fifth_mallBuy");var m=$(this).find(".fifth_mallBuy").width();n.css({"line-height":m+"px",height:m+"px",width:m+"px"})}}});Site.initContentSplitLine(g,e)};Site.loadProductDoublePicList=function(h,g,d,a){var c=$("#module"+h);if(Fai.isNull(c)){return}var e=0;var b=0;c.find(".doubleProduct").each(function(){$(this).find(".productDoublePicListForm").each(function(){var t=$(this).attr("faiHeight");if(Fai.isNull(t)){return}var r=$(this).attr("faiWidth"),w=$(this).find(".imgDiv"),n=w.find("img"),x=$(this).find(".propList"),l=$(this).attr("faiwidthor"),s=$(this).attr("faiheightor");n.css("width",0);n.css("height",0);var v=w.width(),u=w.height();if(d){var m=$(this).attr("newWidth");var i=$(this).attr("newHeight");if(m&&i){v=m;u=i}else{v=r;u=t}}var q={width:v,height:u};if(g==2){var k=l/s,j=v/u;if(j<=k){n.css("width",k*u+"px");n.css("height",u+"px");n.css("marginLeft",((v-k*u)/2)+"px");w.css("overflow","hidden")}else{n.css("height",v/k+"px");n.css("width",v+"px");n.css("marginTop",((u-v/k)/2)+"px");w.css("overflow","hidden")}}else{if(typeof(g)=="number"&&(g==0)){q=Fai.Img.calcSize($(this).attr("faiWidthOr"),$(this).attr("faiHeightOr"),v,u,Fai.Img.MODE_SCALE_FILL);n.css("width",q.width+"px");n.css("height",q.height+"px");w.css("height",u+"px");n.css({marginTop:"",marginLeft:""})}else{if(typeof(g)!="number"&&g){q=Fai.Img.calcSize($(this).attr("faiWidthOr"),$(this).attr("faiHeightOr"),v,u,Fai.Img.MODE_SCALE_FILL)}n.css("width",q.width+"px");n.css("height",q.height+"px");w.css("height",u+"px");n.css({marginTop:"",marginLeft:""})}}if(Number(u)>Number(b)){if(Number(u)>Number(x.height())){b=u}else{b=x.height()}e=Number(b)+20+Number($(this).css("margin-top").replace("px",""))+Number($(this).css("margin-bottom").replace("px",""));$(this).parent().css("height",(e)+"px")}if(a==4||a==5||a==9){if($(this).find(".fifth_mallBuy").length>0){var p=$(this).find(".fifth_mallBuy");var o=$(this).find(".fifth_mallBuy").width();p.css({"line-height":o+"px",width:o+"px",height:o+"px"})}}});e=0;b=0})};Site.loadProductHotTextList=function(e,d,c,a){var b=$("#module"+e);if(Fai.isNull(b)){return}b.find(".productHotTextListHot").each(function(){var o=$(this).attr("faiHeight");if(Fai.isNull(o)){return}var n=$(this).attr("faiWidth");var r=$(this).find(".imgDiv");var p=r.width();var q=r.height();var i=$(this).attr("faiwidthor");imgHeightOr=$(this).attr("faiheightor");var j=r.find("img");var m={width:p,height:q};if(d==2){var h=i/imgHeightOr,g=p/q;if(g<=h){j.css("width",h*q+"px");j.css("height",q+"px");j.css("marginLeft",((p-h*q)/2)+"px");r.css({height:q+"px",width:q+"px"});r.css("overflow","hidden")}else{j.css("height",p/h+"px");j.css("width",p+"px");j.css("marginTop",((q-p/h)/2)+"px");r.css("overflow","hidden");r.css({height:q+"px",width:q+"px"})}}else{if(d==0){m=Fai.Img.calcSize($(this).attr("faiWidthOr"),$(this).attr("faiHeightOr"),p,q,Fai.Img.MODE_SCALE_FILL);j.css("width",m.width+"px");j.css("height",m.height+"px");r.css("height",m.height+"px");j.css("marginLeft","");j.css("marginTop","")}else{j.css("width",m.width+"px");j.css("height",m.height+"px");r.css("height",m.height+"px");j.css("marginLeft","");j.css("marginTop","")}}if(a==4||a==5||a==9){if($(this).find(".fifth_mallBuy").length>0){var l=$(this).find(".fifth_mallBuy");var k=$(this).find(".fifth_mallBuy").width();l.css({"line-height":k+"px",height:k+"px",width:k+"px"})}}});b.find(".productHotTextListTable").each(function(){var l=$(this).find("tr");for(var k=0;ke){e=g}});c.each(function(){$(this).css(a,e+"px")})};Site.loadProductGallery=function(G){var H=new Date().getMilliseconds();var Z=G.id,W=G.scale,h=G.cus,A=G.paramLayoutType||"";var c=$("#module"+Z),E=c.find("div.product-container");var X=c.find(".product-gallery").attr("_bordertype");var e=parseInt(c.find(".product-gallery").attr("_borderwidth"));var ag=c.find(".product-gallery").attr("_bgtype"),af=Fai.top._manageMode?Site.getModuleAttrPattern(Z).productList.hnhc:G.heightCorrect;var p,d;if(G.effType>=4&&G.effType<6){if(A==6){Site.clearImageEffectContent_product(Z,"sixth_ProductPanel")}if(A==8){Site.clearImageEffectContent_product(Z,"eighth_ProductPanel")}Site.clearImageEffectContent_product(G.id,"prop-container")}if(E.length!=0){var am=$(E[0]).children("div.img-container"),q=am.width(),U=am.height();for(var ao=0;ao0){E.find(".fk-productName").height("auto")}if(K.length>0){if(af){$.each(K,function(j){if($(K[j]).is(":visible")){l+=$(K[j]).outerHeight(true)}})}else{$.each(K,function(j){l+=$(K[j]).outerHeight(true)})}}if(T.length>0){$.each(T,function(j){al+=$(T[j]).outerHeight(true)})}var y=z+l+al;E.height(y);E.width(M);if(A==6){E.find("div.prop-container").width(M*0.8);E.find(".sixth_ProductName").width("80%")}else{E.find("div.prop-container").width(M)}var J=c.find("div.product-gallery-preview");var a=c.find(".fk-productListForm").outerHeight()-c.find(".fk-productListForm").height();if(a>0){y+=a}J.height(y);var I=c.find("div.product-gallery-inner"),s=I.outerHeight();if(sat){b=parseInt(w/at)}var S=(b*at)-k;J.width(S);var ar=E.length;var B=ar%b==0?ar/b:Math.floor(ar/b)+1;c.find("div.product-gallery-container").width(ar*at);var r=E.lengthE.length?E.length:j+b;for(var av=j;av0){c.find(".product-container").height("auto");var C=0;var Q=0;c.find(".product-container").each(function(){var i=$(this).height();Q=$(this).outerHeight();if(i>C){C=i}});c.find(".product-container").each(function(){$(this).height(C)});c.find(".product-gallery-preview").height(C);var I=c.find("div.product-gallery-inner"),ab=c.find(".gallery-control"),t=c.find(".gallery-control-prev"),Y=t.height(),V=(I.outerHeight()/2)-(Y/2);ab.css("top",V+"px")}if(A==6){var R=0;c.find(".product-container").each(function(){var i=$(this).outerHeight();if(i>R){R=i}});if(c.find(".prop-wordwrap-container").length==0){c.find(".sixth_ProductPanel").css({bottom:"40px"})}else{c.find(".product-gallery-preview").height(R+30);c.find(".sixth_ProductPanel").css({bottom:""})}c.find(".sixth_mallBuy").parent().height("auto")}if(E.length!=0){for(var ao=0;ao0){var D=$(E[ao]).find(".fifth_mallBuy");var F=$(E[ao]).find(".fifth_mallBuy").width();D.css({"line-height":F+"px"})}}}if(c.find(".prop-wordwrap-container").length>0){Site.unifiedAttrVal(c,".prop-wordwrap-container","height")}};Site.loadProductSmallPic=function(E){var T=E.id,L=E.scale,h=E.cus,P=E.dataObjs,U=E.bigPicObjs,r=E.tmp_allow_marketprice,I=E.tmp_allow_price,p=E.tmp_allow_price_menberLevel,N=parseInt($(".productSmallPicForms").attr("_mallbuybtntype")),F=$(".productSmallPicForms").attr("_mallbuybtncolor");if(p){p="title = '"+p+"'"}var c=$("#"+T);var y=E.paramLayoutType;c.on("Fai_onModuleSizeChange",function(){Site.smallPicModuleFix(T)});c.on("Fai_onModuleLayoutChange",function(){Site.smallPicModuleFix(T)});var D=c.find("div.productSmallPicBox");var ag=c.find(".smallPicUpForms").height();var i=c.find(".smallPicDownForms").height();c.find(".productSmallPicForms").height(ag+i);var O=c.find(".productSmallPicForms").width();var b=c.find(".smallPic_control").outerWidth(true);var ad=O-b*2-c.find(".containerLeft").width();var W=ad>150?ad:150;c.find(".containerRight").width(W);c.find(".smallPicUpForms").css("width",O+"px");c.find(".smallPicDownForms").css("width",O+"px");var G=c.find(".smallPrePic_control").outerWidth(true);c.find(".smallPicDownFormsMid").css("width",O-2*G-20+"px");var n=c.find(".containerLeft").width()+c.find(".containerRight").width();c.find(".smallPicUpFormsMid").width(n);var af=c.find(".smallPrePicContainer");var Y=c.find(".smallPrePicOuter").outerWidth(true);var V=0;if(Fai.isIE6()){V=2}af.width(Y*D.length+V);var M=af.width();var aa=c.find(".smallPicUpFormsMid").outerHeight()/2-30;c.find(".smallPic_control").css("top",aa+"px");var x=c.find(".smallPicDownFormsMid").width();var ah=D.length;var t=Math.floor(x/Y)+1;var B=ah%t==0?ah/t:Math.floor(ah/t)+1;if(B==1&&x=7&&l<=13)?true:false;if(a){v+="background:none;border:1px solid "+F+";";z="style='color: "+F+";'"}else{if(!R){v+="border:none;background-color: "+F+";";z="style='color: white;'"}}if(H){Z="fk-mallBgCar";z="style='color: "+F+";"}if(g){s="faisco-icons-mallBuyCar";z="style='color: "+F+";font-size: "+ae+"px;display:table-cell;";v+="color: "+F+";";if(l==11){z+="padding-top: 3px;"}if(l==13){z+="vertical-align:bottom;"}else{z+="vertical-align:middle;"}}if(R){v+="border:none;background:none;"}if(y==2||y==3){v+="width:60%;"}z+="'";v=J?v+="'":"";var u=c.find(".smallPicDownForms .g_imgPrev"),X=c.find(".smallPicDownForms .g_imgNext"),S=c.find(".smallPicUpForms .g_control_prev"),k=c.find(".smallPicUpForms .g_control_next");u.addClass("smallPic-control-prev-disabled");if(B==1){X.addClass("smallPic-control-next-disabled")}S.addClass("bigPic-control-prev-disabled");if(ah==1){k.addClass("bigPic-control-next-disabled")}c.find(".smallPicUpForms").mouseover(function(){$(".smallPic_control").css("display","block")}).mouseleave(function(){$(".smallPic_control").css("display","none")});D.mouseover(function(){$(this).parent().addClass("smallPrePicOuterHover").addClass("g_border").addClass("g_borderHover")});D.mouseleave(function(){$(this).parent().removeClass("smallPrePicOuterHover").removeClass("g_borderHover").removeClass("g_border")});c.find(".smallPicUpFormsMid").mouseenter(function(){var j=$(this).parents(".form").attr("id");if(_manageMode==true){Site.initModuleProductSmallPicItemManage(j,E.productSelect,E.isOpenImgEff)}}).mouseleave(function(){var j=$(this).parents(".form");var ai=j.find("div.containerLeft");if(_manageMode==true){if(E.isOpenImgEff){Site.removeEditLayer(ai)}else{Site.removeEditLayer(ai,null,106)}}});u.click(ac);X.click(o);S.click(w);k.click(K);D.click(d);D.eq(0).click();A(c);function A(j){Site.updateThumbnailForSmallPicForms({$module:j,listCls:".smallPicDownForms",itemCls:".smallPrePicOuter"})}function ac(){var am=$(this);if(am.hasClass("smallPic-control-prev-disabled")){return false}var ai=am.parents(".smallPicDownForms").find(".smallPrePicContainer");var ao=Math.floor(c.find(".smallPicDownFormsMid").width()/Y)+1;var al=am.parents(".smallPicDownForms").find(".g_imgNext");if(al.hasClass("smallPic-control-next-disabled")){al.removeClass("smallPic-control-next-disabled")}var ak=parseInt(ai.css("left").replace("px"));var an=Math.abs(ak)/Y;var aj=an-ao+1>0?an-ao+1:0;if(aj==0){am.addClass("smallPic-control-prev-disabled")}var j=(an-aj)*Y;if(ai.is(":animated")){return false}ai.animate({left:"+="+j+"px"});A(c)}function o(){var au=$(this);var ak=$("#"+T);if(au.hasClass("smallPic-control-next-disabled")){return false}var j=au.parents(".smallPicDownForms").find(".smallPrePicContainer"),am=au.parents(".smallPicDownForms").find(".g_imgPrev"),al=Math.floor(ak.find(".smallPicDownFormsMid").width()/Y)+1;if(am.hasClass("smallPic-control-prev-disabled")){am.removeClass("smallPic-control-prev-disabled")}var av=(al-1)*Y,at=parseInt(j.css("left").replace("px"));var ar=Math.abs(at)/Y;var aw=ar+al-1>ah-1?ah-1:ar+al-1;var aq=ak.find(".smallPicDownFormsMid").width();if(j.is(":animated")){return false}var aj;var ai,ao;if(aw>=ah-1){ai=ar;ao=ah-1;if((ao-ai+1)*Y<=aq){aj=true;au.addClass("smallPic-control-next-disabled")}}else{ai=aw;ao=aw+al-1}for(var an=ai;an<=ao;an++){var ap=$(D[an]).find("img");Site.loadProductSmallPicItem(ap)}if(!aj){j.animate({left:"-="+av+"px"})}A(ak)}function w(){var am=$(this);if(am.hasClass("bigPic-control-prev-disabled")){return false}var ai=$("#"+T);var j=ai.find(".smallPicDownForms").find(".smallPrePicContainer");var ak=Math.floor(ai.find(".smallPicDownFormsMid").width()/Y)+1;var ap=ai.data("positionLeft");var al=Math.abs(ap)/Y;var ao=al+ak-1>ah-1?ah-1:al+ak-1;var an=ai.find(".smallPrePicSelected").parent();var aq=an.index();if(aq>=al&&aq<=ao){if(aq==al){ap+=Y}}else{ap=-(aq-1)*Y;j.css("left","0px")}if(j.is(":animated")){return false}$(".img_ProductPhoto_LR_Border").remove();$(".img_ProductPhoto_TB_Border").remove();$(".editLayer").remove();var aj=an.prev().find("div.productSmallPicBox");ai.find("div.containerLeft").attr("productId",aj.attr("proid")).attr("productName",aj.find("img").attr("productname")).attr("topClassName",aj.find("img").attr("classname")).attr("topSwitch",aj.find("img").attr("topswitch")).attr("id","containerLeft_ProdsmallPic"+aj.attr("proid"));j.animate({left:ap+"px"},function(){an.prev().find("div.productSmallPicBox").click()})}function K(){var am=$(this);if(am.hasClass("bigPic-control-next-disabled")){return false}var ai=$("#"+T);var j=$(".smallPicDownForms").find(".smallPrePicContainer");var ak=Math.floor(ai.find(".smallPicDownFormsMid").width()/Y)+1;var ap=ai.data("positionLeft");var al=Math.abs(ap)/Y;var ao=al+ak-1>ah-1?ah-1:al+ak-1;var an=ai.find(".smallPrePicSelected").parent();var aq=an.index();if(aq>=al&&aq<=ao){if(aq==ao){ap-=2*Y}}else{ap=-(aq-1)*Y;j.css("left","0px")}if(j.is(":animated")){return false}$(".img_ProductPhoto_LR_Border").remove();$(".img_ProductPhoto_TB_Border").remove();$(".editLayer").remove();var aj=an.next().find("div.productSmallPicBox");ai.find("div.containerLeft").attr("productId",aj.attr("proid")).attr("productName",aj.find("img").attr("productname")).attr("topClassName",aj.find("img").attr("classname")).attr("topSwitch",aj.find("img").attr("topswitch")).attr("id","containerLeft_ProdsmallPic"+aj.attr("proid"));j.animate({left:ap+"px"},function(){an.next().find("div.productSmallPicBox").click()})}function d(){var ay=$(this).find("img");Site.loadProductSmallPicItem($(this).parent().next().find("img"));Site.loadProductSmallPicItem(ay);var aq=$("#"+T);var al=aq.find(".smallPicUpFormsMid .containerLeft img");aq.find(".containerRight").children().remove();var aP=E.scale;var ap=$(this).parent();ap.siblings(".smallPrePicOuter").find("div.productSmallPicBox").removeClass("smallPrePicSelected");$(this).addClass("smallPrePicSelected");ap.siblings(".smallPrePicOuter").removeClass("smallPrePicOuterClick").removeClass("g_borderSelected");ap.addClass("smallPrePicOuterClick").addClass("g_borderSelected");var aI=aq.find("#bigImgDetail");aI.remove();aq.find(".smallPic_td").append(al);var a0=$(this).attr("proid");var a3=U[a0]["bigPicThumbPath"];var aw=U[a0]["bWidth"];var aA=U[a0]["bHeight"];var j=aq.find(".containerLeft").width(),an=aq.find(".containerLeft").height();if(aP==0){var ax=Fai.Img.calcSize(aw,aA,j,an,Fai.Img.MODE_SCALE_FILL);al.width(ax.width);al.height(ax.height)}else{al.css("width",j).css("height",an)}var aH=[];aH.push("
    ");aH.push("
    ");aH.push("
    ");aH.push("
    ");aH.push("
    ");aq.find(".smallPic_td").append(aH.join(""));var aX=al.attr("src");if(aX==a3){al.attr("src","")}al.attr("src",a3);al.css("margin","auto");var aD=ay.attr("alt");al.attr("alt",aD);aq.find(".containerLeft").height(aq.find(".containerLeft").height());aq.find(".containerLeft").css("overflow","hidden");var bh=$(this).find("img");var bf=bh.attr("ifcenter");var a9=bh.attr("ifshowname");var aN=bh.attr("ifwordwrap");var ar=bh.attr("ifmallbtn");var a4=bh.attr("aAttribute");var au=bh.attr("click");var aK=bh.attr("btntext");var bb=bh.attr("topswitch");if(_manageMode){if(bb=="off"&&!E.productSelect){aq.find(".J_productListTopFlag").text("置顶").addClass("f-productListTopFlag")}else{aq.find(".J_productListTopFlag").text("").removeClass("f-productListTopFlag")}}if(H){aK=" "}else{if(g){aK=""}}al.wrap("");var at="text-align:center";var ao="margin:0 auto;";if(bf=="false"){at="text-align:left";ao="margin-left:0;"}if(y==2){at="text-align:center"}if(y==3||y==4||y==5||y==9){at="text-align:left"}var a1="word-break:normal;white-space:normal;overflow:visible;text-overflow:clip";if(aN=="false"){a1="white-space:nowrap;overflow:hidden;text-overflow:ellipsis"}var aH=[];var aG=aq.find(".containerRight").width();aH.push("
    ");if(a9=="true"){if(y==2){aH.push("
    "+Fai.encodeHtml($(this).find("img").attr("productname"))+"
    ");aH.push("
    ")}else{if(y==3){aH.push("
    "+Fai.encodeHtml($(this).find("img").attr("productname"))+"
    ")}else{if(y==4||y==9){aH.push("
    "+Fai.encodeHtml($(this).find("img").attr("productname"))+"
    ")}else{if(y==5){aH.push("
    "+Fai.encodeHtml($(this).find("img").attr("productname"))+"
    ")}else{aH.push("
    "+Fai.encodeHtml($(this).find("img").attr("productname"))+"
    ")}}}}}var av=P[a0];var ba=P.lcid.lcid;var ak=P.lcid._isLogin;var a6="";var aT="";var bi=false;var aO=false;var aL="";var aj="";var aB="";for(var a8=0;a8");if(E.propNameShow||(bg==11&&a7)){aH.push(""+aC+":")}aH.push(""+a2+"");aH.push("
    ")}if((y==2||y==3)&&(bi||aO)){aH.push("
    ");if(bi){if(I){if(aB=="会员价"){aH.push(""+aB+":")}else{if(aB=="VIP"){aH.push("
    VIP
    ")}}aH.push(""+a6.slice(0,1)+"");aH.push(""+(a6.slice(1)).split(".")[0]+"."+(a6.slice(1)).split(".")[1]+"")}else{aH.push("价格:\n");aH.push(""+a6+"\n")}}if(aO){if(r){aH.push(""+aT.slice(0,1)+""+aT.slice(1)+"")}}aH.push("
    ")}if(y==4||y==9){if(e){aL="fk_fifth_mallBuy"}else{aL="fk_fourth_mallBuy"}aH.push("
    ");aH.push("
    ");if(bi&&I){aH.push("
    ");if(aB=="会员价"){aH.push(""+aB+":")}else{if(aB=="VIP"){aH.push("
    VIP
    ")}}aH.push("
    ")}aH.push("
    ");if(bi){if(I){aH.push(""+a6.slice(0,1)+"");aH.push(""+(a6.slice(1)).split(".")[0]+"."+(a6.slice(1)).split(".")[1]+"")}else{aH.push("价格:\n");aH.push(""+a6+"\n")}}if(aO){if(r){aH.push(""+aT.slice(0,1)+""+aT.slice(1)+"")}}aH.push("
    ");aH.push("
    ");if(ar=="true"){if(e){aH.push("
    ")}else{aH.push("
    ")}aH.push("\n");aH.push(""+aK+"\n");aH.push("");aH.push("
    ")}aH.push("
    ")}if(y==5){if(e||!J){aL="fk_fifth_mallBuy"}else{aL="fk_fourth_mallBuy"}aH.push("
    ");aH.push("
    ");if(bi&&I&&aB=="会员价"){aH.push("
    ");aH.push(""+aB+":
    ")}aH.push("
    ");if(bi){if(I){aH.push(""+a6.slice(0,1)+"");aH.push(""+(a6.slice(1)).split(".")[0]+"."+(a6.slice(1)).split(".")[1]+"")}else{aH.push("价格:\n");aH.push(""+a6+"\n")}}if(aO){if(r){aH.push(""+aT.slice(0,1)+""+aT.slice(1)+"")}}aH.push("
    ");aH.push("
    ");if(ar=="true"){if(e||!J){aH.push("
    ")}else{aH.push("
    ")}aH.push("\n");aH.push(""+aK+"\n");aH.push("");aH.push("
    ")}aH.push("
    ")}if(ar=="true"&&y!=4&&y!=5&&y!=9){if(y==3){aL="fk_third_mallBuy"}if(y==1){aH.push("
    ");aH.push("\n");aH.push(""+aK+"\n");aH.push("")}if(y!=2&&y!=1){aH.push("
    ");aH.push("");aH.push(""+aK+"\n");aH.push("")}aH.push("
    ")}if(ar=="true"&&y==2){if(y==2){aL="fk_second_mallBuy"}aH.push("
    ");aH.push("
    ");aH.push("");aH.push(""+aK+"\n");aH.push("");aH.push("
    ")}aH.push("
    ");aq.find(".containerRight").append(aH.join(""));var bc=aq.find(".smallPrePicSelected").parent().index();S.removeClass("bigPic-control-prev-disabled");k.removeClass("bigPic-control-next-disabled");u.removeClass("smallPic-control-prev-disabled");X.removeClass("smallPic-control-next-disabled");var aY=aq.find(".smallPicDownForms").find(".smallPrePicContainer");var be=parseInt(aY.css("left").replace("px"));var aZ=Math.abs(be)/Y;var aR=aZ+t-1>ah-1?ah-1:aZ+t-1;var aE=aq.find(".smallPicDownFormsMid").width();var aM,aF;if(bc==0){S.addClass("bigPic-control-prev-disabled");if(be==0){u.addClass("smallPic-control-prev-disabled")}}if(bc==(ah-1)){k.addClass("bigPic-control-next-disabled");aM=aZ;aF=ah-1;if((aF-aM+1)*Y<=aE&&be>=(ah-t-1)*Y){X.addClass("smallPic-control-next-disabled")}}aq.data("positionLeft",be);aq.find("div.containerLeft").attr("productId",a0).attr("productName",ay.attr("productname")).attr("topClassName",ay.attr("classname")).attr("topSwitch",ay.attr("topswitch")).attr("id","containerLeft_ProdsmallPic"+a0);if(y==5||y==4||y==9){var az=$(".fk_fifth_mallBuy");var aJ=$(".fk_fifth_mallBuy").width();az.css({"line-height":aJ+"px",height:aJ+"px"});var aV=$(".fk_paramNewStyle5");var aQ=$(".fk_mallbuy5").height();var am=$(".smallPicUpFormsMid").find(".containerRight").height();var aU=0;var aS=0;$.each(aV,function(bj){aS+=$(aV[bj]).outerHeight(true)});aU=am-aS-aQ;$(".fk_mallbuy5").css({"margin-top":aU+"px"})}A(aq)}};Site.fixProductMallPosition=function(h,e,d){var e=e||"";var d=d||"";var g=$("#module"+h).find("."+e);var c=$("#module"+h).find(".productListForms");var a=c.length?c.attr("_mallbuybtntype"):-1;var b=false;if(d==4||d==9){if(a>6){b=true}}else{if(d==5){if(a>6||a==0){b=true}}}g.each(function(){var k=$(this).height();var i=$(this).find(".propList").find(".propDiv");var l=$(this).width()/2;var j=$(this).find(".propList").find(".fifth_ProductName a").width();if(d==2||d==3||d==5||d==9||b){if($(this).find(".propList").find(".paramNewStyle").length>0){$(this).find(".propList").find(".paramNewStyle").css({"margin-top":"40px"})}if($(this).find(".imgDiv").length>0){if($(".productPicListForm").attr("faiwidth")0){$(this).find(".propList").css({"vertical-align":"middle"})}}})};Site.removeProductSmallPicMask=function(a){$("#module"+a).find(".loadingImg").remove()};Site.loadProductSmallPicItem=function(d){if(!d.attr("src")){d.attr("src",d.attr("lzurl"))}var e=parseInt(d.attr("sWidth")),b=parseInt(d.attr("sHeight"));var a=e>b?e:b;var c=e>b?"width":"height";if(a>71){d.css(c,71)}else{d.css("width",e).css("height",b)}d.show()};Site.smallPicModuleFix=function(x){var e=$("#"+x),h=e.find("div.productSmallPicBox");var o=e.find(".productSmallPicForms").width();var g=e.find(".smallPic_control").outerWidth(true);var d=o-g*2-e.find(".containerLeft").width();var b=d>150?d:150;e.find(".containerRight").width(b);e.find(".smallPicUpForms").css("width",o+"px");e.find(".smallPicDownForms").css("width",o+"px");var q=e.find(".smallPrePic_control").outerWidth(true);e.find(".smallPicDownFormsMid").css("width",o-2*q-20+"px");var u=e.find(".containerLeft").width()+e.find(".containerRight").width();$(".smallPicUpFormsMid").width(u);var m=e.find(".smallPrePicContainer");var a=$(".smallPrePicOuter").outerWidth(true);var y=0;if(Fai.isIE6()){y=2}m.width(a*h.length+y);var i=m.width();var c=e.find(".smallPicDownFormsMid").width();var v=h.length;var n=Math.floor(c/a)+1;var w=v%n==0?v/n:Math.floor(v/n)+1;if(w==1&&c=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var l=k.find("td").eq(k.find("td").length-1);l.css("display","none");return}setTimeout(function(){swfObj.startUpload()},swfObj.upload_delay)}else{if(j.filestatus==SWFUpload.FILE_STATUS.ERROR){Fai.ing(Fai.format(LS.siteFormSubmitFileUploadSvrBusy,Fai.encodeHtml(j.name)))}}},upload_start_handler:function(i){Fai.enablePopupWindowBtn(0,"save",false);Fai.ing(LS.siteFormSubmitFileUploadPrepare,false)},view_progress:function(i,l,k,j){Fai.ing(LS.siteFormSubmitFileUploadIng+j+"%",false)}};if(h){c.button_image_url=_resRoot+"/image/site/msgupimg/add.png";$(".f-upCommImgName").css("margin-top",0)}swfObj=SWFUploadCreator.create(c);onFileUploadEvent=function(q,n){if(q=="upload"){var k=n.id;var p=n.name;var m=n.size;var l=n.path;var r=n.pathSmall;var j=n.fileId;var i=n.width;var o=n.height;Site.productCommImgTableCtrl(r,p,k,m,a,j,h)}}};Site.siteCommImgFileUploadH5=function(b,d,h,a,i){var e=h.split(",");var c={siteFree:false,updateUrlViewRes:"",auto:true,fileTypeExts:e.join(";"),multi:false,fileSizeLimit:b*1024*1024,fileSplitSize:20*1024*1024,breakPoints:true,saveInfoLocal:false,showUploadedPercent:false,showUploadedSize:false,removeTimeout:9999999,post_params:{app:21,type:0,fileUploadLimit:b,isSiteForm:true},isBurst:false,isDefinedButton:true,buttonText:"",uploader:"ajax/commupsiteimg_h.jsp@cmd=mobiupload&_token="+$("#_TOKEN").attr("value"),onUploadSuccess:function(j,l){var k=jQuery.parseJSON(l);if(k.success){onFileUploadEvent("upload",k);setTimeout(function(){Fai.ing("文件上传成功",true)},2000)}else{Fai.ing("文件:"+j.name+","+k.msg)}},onUploadError:function(j,k){$("#progressBody_ "+j.id).remove();$("#progressWrap_"+j.id).remove();Fai.ing("网络繁忙,文件:"+j.name+"上传失败,请稍后重试")},onSelect:function(){if(a==null||typeof(a)=="undefined"){a=5}var k=$("#msgBoardAddImgTb").eq(0);var j=k.find("td").length;if(j>=(a+1)){Fai.ing(LS.siteFormSubmitFileUploadOfMax,true);var l=k.find("td").eq(k.find("td").length-1);l.css("display","none");return false}return true},onUploadStart:function(j){$("#progressBody_ "+j.id).remove();$("#progressWrap_"+j.id).remove()}};var g=$("#"+d).uploadify(c);if(i){$("#comm-img-swfu-placeholder .uploadify-button").css("background-image","url("+_resRoot+"/image/site/msgUpImg/add.png)")}onFileUploadEvent=function(r,o){if(r=="upload"){var l=o.id;var q=o.name;var n=o.size;var m=o.path;var s=o.pathSmall;var k=o.fileId;var j=o.width;var p=o.height;Site.productCommImgTableCtrl(s,q,l,n,a,k,i)}}};Site.commUpAllImgList=null;Site.setCommUpAllImgList=function(a){Site.commUpAllImgList=Fai.fkEval("("+a+")");if(Fai.isIE6()||Fai.isIE7()){$(".msgBoard_upImg_border").css({width:"50px",height:"50px"})}$(function(){setTimeout(function(){var c=$(".J_countRecSize");if(typeof(c)!="undefined"&&c!=null){for(var e=0;e");if(Fai.isIE6()||Fai.isIE7()){i.push("
    ")}else{i.push("
    ")}i.push("");if(Fai.isIE6()||Fai.isIE7()){i.push("

    ")}else{i.push("

    ")}i.push("
    ");i.push("");h.before(i.join(""))};Site.productCommImgDelete=function(a){var d=$("#msgBoardAddImgTb").eq(0);var b=d.find("td").length;for(var c=0;c");a.push("");if(Fai.isIE6()||Fai.isIE7()){a.push("
    ");a.push("
    ")}else{a.push("
    ");a.push("
    ")}a.push("

    ");a.push("
    ");a.push("
    ");g.after(a.join(""));if(!h){setTimeout(function(){$("#"+c).hover(function(){m()},function(){var q=$("#"+c);if(Fai.isIE7()){setTimeout(function(){q.find("#J_showCommPicMoveSign").remove()},500)}else{q.find("#J_showCommPicMoveSign").remove()}})},10)}else{g.hide();j()}function m(){var q=$("#"+c);if(q.find("#J_showCommPicMoveSign").attr("class")==null||typeof(q.find("#J_showCommPicMoveSign").attr("class"))=="undefined"){var r=[];r.push("
    ");r.push("");r.push("");r.push("");r.push("");r.push("
    ");q.prepend(r.join(""))}}function j(){var q=$("#"+c);if(q.find("#J_showCommPicMoveSign").attr("class")==null||typeof(q.find("#J_showCommPicMoveSign").attr("class"))=="undefined"){var r=[];r.push("
    ");r.push("
    ");r.push("
    ");r.push("
    ");q.prepend(r.join(""))}}};Site.showCommImgMove=function(h,a,g){if(h==null||g==null){return}var j=$("#"+h);var c=j.parent().parent().parent().parent().parent().parent().parent();currentChooseTr=c.attr("chooseTr");currentChooseTd=c.attr("chooseTd");if(currentChooseTr==null||currentChooseTd==null){return}if(Site.commUpAllImgList==null){return}var b=c.find("td");var e=parseInt(b.length);if(e<=1){return}var k=0;if(g=="left"){if(currentChooseTd=="0"||currentChooseTd==0){k=e-1}else{k=parseInt(currentChooseTd)-1}}else{if(g=="right"){k=parseInt(currentChooseTd)+1;if(k>=Site.commUpAllImgList[currentChooseTr].data.length){k=0}}}b.eq(currentChooseTd).find(".show_msg_border_rect").remove();var i="
    ";b.eq(k).prepend(i);c.attr("chooseTd",k);var d=$("#"+a).find(".msg_up_show_img_set").parent();$("#"+a).find(".msg_up_show_img_set").remove();d.append("")};Site.commShowPicClose=function(c,b,g){var a=$("#"+c),e;if(a!=null&&typeof(a)!="undefined"){a.remove()}var d=$("#"+b);if(!g){e=d.parent().parent().parent().parent().parent().parent().parent()}else{e=d.parentsUntil(".J_msgImgList").last(":table");e.show()}e.find("td").find(".show_msg_border_rect").remove()};Site.productCommentAddCom=function(m){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行评论。");return}if(_manageMode&&typeof m=="string"&&m=="5"){Fai.ing("当前为管理状态,您不能提交评论。");return}var l=$.trim($("#productCommentCreator").val());var q=$("#productCommentCreator").attr("minlength");var b=$("#productCommentInput").val();var j=$("#productCommentInput").attr("minlength");var g=$("#validateCodeInput").val();var r=$("#productCommentInput").attr("productId");var e=$("#submitTips").attr("isDefaultTips");if(typeof(e)=="string"&&e=="true"){$("#submitTips").show();return}if(typeof(l)!="string"){$("#submitTips").text(LS.creatorTips).show();return}if(typeof(b)!="string"||""==b){$("#submitTips").text(LS.commentNotEmpty).show();return}if(b.length1){for(var t=0;t<(d-1);t++){var c=a.find("td").eq(t).find(".msgBoard_upImg_set");if(c!=null&&c!="undefined"){var v={};var s=c.attr("_id");var x=c.attr("_name");var n=c.attr("_file_size");var p=c.attr("_file_id");v.imgId=s;v.imgName=x;v.imgSize=n;v.tempFileId=p;h.push(v)}}}}var w=$(".submitStarList").attr("star");if(!w){w=5}var k={validateCode:g,productId:r,creator:l,commImgList:$.toJSON(h),comment:b,star:w};var u="ajax/productcomment_h.jsp@cmd=submitpc";$("#submitTips").text(LS.siteFormSubmitIng).show();$.ajax({type:"POST",url:u,data:k,error:function(){Fai.ing(LS.systemError);$("#msgBoardCaptchaImg").click()},success:function(i){var y=jQuery.parseJSON(i);if(!y||!y.success){$("#msgBoardCaptchaImg").click()}Fai.removeBg();switch(y.msg){case 1:$("#submitTips").text(LS.captchaError).show();break;case 2:$("#submitTips").text(LS.creatorError).show();break;case 3:$("#submitTips").text(LS.commentError).show();break;case 4:Fai.top.location.reload();$("#submitTips").text(LS.submitSuccess).show();break;case 5:$("#submitTips").text(LS.paramError).show();break;case 6:$("#submitTips").html(Fai.format(LS.commentOnlyMember,''+Fai.encodeHtml(LS.login)+"")).show();break;case 7:$("#submitTips").text(LS.commentClosed).show();break;case 8:$("#submitTips").text(LS.commentSubmitError).show();break;case 9:$("#submitTips").text(LS.commentCountLimit).show();break;default:}}})};Site.showProductQRCode=function(c,a){var b=["
    ","","",LS.productORCodeMsg,"","
    "];Fai.top.$(b.join("")).appendTo("body");$("#productQrCode").mouseenter(function(d){$("#productQRCodeDisplay").css("top",$(this).offset().top+"px");$("#productQRCodeDisplay").css("left",($(this).offset().left+24)+"px");$("#productQRCodeDisplay").show()}).mouseleave(function(d){$("#productQRCodeDisplay").hide()})};Site.initRepPropValueOfURL=function(){var a=new RegExp("https?|ftp|file://");$(".pd_J .propValue").each(function(b,d){var c=$(this).text();if(a.test(c)){$(this).html(Fai.replaceContentOfURL(c))}})};Site.salePromotionDetail={salePromotionParam:"",showType:"2",styleType:"1",saleCountTimeInterval:{}};Site.initSalePromotion=function(b,a){Site.salePromotionDetail.salePromotionParam=b;Site.salePromotionDetail.styleType=a};Site.onlyChangeSalePrice=function(b){b=parseFloat(b);if(isNaN(b)){return}var c=Site.salePromotionDetail.salePromotionParam;if(typeof(c)=="undefined"||c==null||c==""){return}if(c.saleType=="1"){var a=parseFloat(c.other.ruleData.d[0].m);if(c.other.ruleData.s=="1"){b=b*(a/10)}else{b=b-a}if(b<0){b=0}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$(".J_realMallAmount").html(Fai.formatPriceEn(b))}else{$(".J_realMallAmount").html(b.toFixed(2))}}};Site.showSalePromotionDl=function(r,p){if(Site.salePromotionDetail.showType!="2"){return}if(typeof(r)=="undefined"||r==null||r==""){return}var h=$("#realMallAmount").css("color");if(typeof(h)=="undefined"||h==null||h==""){h="#FC4643"}var c=$(".J_saleFullReduce").find(".propName").attr("style")||"";var l=[];var q="f-saleValue";if(r.saleType=="1"){var o="";var g=parseFloat(r.other.ruleData.d[0].m);var b=$(".J_saleFullReduce").find(".propName").html();var n=$("#realMallAmount").html();n=n.replace(/\,/g,"");var k=n.indexOf("~");if(k>0){priceNumber=parseFloat(n.substring(0,k));if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){n=Fai.formatPriceEn(n.split("~")[0])+"~"+Fai.formatPriceEn(n.split("~")[1])}}else{priceNumber=parseFloat(n);n=parseFloat(n).toFixed(2);if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){n=Fai.formatPriceEn(n)}}if(isNaN(priceNumber)){priceNumber=0}var a=0;var m=$("#realMallAmount").attr("curval");if(r.other.ruleData.s=="1"){if(_lcid==2052||_lcid==1028){o=Fai.format(LS.salePromotionDisCount,g)}else{o=Fai.format(LS.salePromotionDisCount,Fai.formatPriceEn(10*(10-g),null,true))}a=priceNumber*(g/10)}else{if(_lcid==2052||_lcid==1028){o=Fai.format(LS.salePromotionLapse,g)}else{o=Fai.format(LS.salePromotionLapse,Fai.formatPriceEn(g,null,true))}a=priceNumber-g}if(isNaN(a)||a<0){a=0}if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){$("#realMallAmount").html(Fai.formatPriceEn(a))}else{$("#realMallAmount").html(a.toFixed(2))}$("#realMallAmount").addClass("J_realMallAmount");$("#realMallAmount").removeAttr("id");$(".J_saleFullReduce").addClass("J_salePromotionRemove");var e=[];if(p==4){$(".J_saleFullReduce").find(".propName").html(LS.promotionPrice+":");e.push("");e.push("");e.push(b);e.push("");e.push("");e.push("");e.push(m);e.push("");e.push("");e.push(n);e.push("");e.push("");e.push("")}else{$(".J_saleFullReduce").find(".propName").html(LS.promotionPrice+LS.colon);e.push("");e.push("");e.push(b);e.push("");e.push("");e.push("");e.push(m);e.push("");e.push("");e.push(n);e.push("");e.push("");e.push("")}$(".J_saleFullReduce").before(e.join(""));var d="";if((p==1||p==2||p==3)&&Fai.isIE6()){d="padding-bottom:10px; margin:0px; line-height:25px;"}l.push("");l.push("");l.push("");l.push("");l.push("
    ");l.push("
    ");l.push("
    ");l.push("
    ");l.push("
    ");l.push(o);l.push("
    ");l.push("
    ");l.push("");$(".J_realMallAmount").parent().after(l.join(""))}else{if(typeof(r.other.ruleData.d.length)=="undefined"){return}l.push("");if(p==4){l.push("");l.push(LS.salePromotionName);l.push(":")}else{l.push("");l.push(LS.salePromotionName+LS.colon);l.push("")}l.push("");if(p!=5){for(var j=0;j0){l.push("
    ")}else{l.push("
    ")}l.push("");l.push(Fai.format(LS.salePromotionOnlyFullReduce));l.push("");l.push("");if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){l.push(Fai.format(LS.salePromotionFullReduce,Fai.formatPriceEn(r.other.ruleData.d[j].m,null,true),Fai.formatPriceEn(r.other.ruleData.d[j].n,null,true)))}else{l.push(Fai.format(LS.salePromotionFullReduce,r.other.ruleData.d[j].m,r.other.ruleData.d[j].n))}l.push("");l.push("
    ")}}else{l.push("
    ");for(var j=0;j");l.push(Fai.format(LS.salePromotionOnlyFull));l.push("");l.push("");if(Fai.top._lcid!=2052&&Fai.top._lcid!=1028){l.push(Fai.format(LS.salePromotionFullReduce,Fai.formatPriceEn(r.other.ruleData.d[j].m,null,true),Fai.formatPriceEn(r.other.ruleData.d[j].n,null,true)))}else{l.push(Fai.format(LS.salePromotionFullReduce,r.other.ruleData.d[j].m,r.other.ruleData.d[j].n))}l.push("")}l.push("
    ")}l.push("");l.push("");$(".J_saleFullReduce").after(l.join(""))}};Site.changeSaleColor=function(){var a=Site.getTopWindow().$(".J_realMallAmount").css("color");if(typeof(a)=="undefined"||a==null||a==""){a=Site.getTopWindow().$("#realMallAmount").css("color");if(typeof(a)=="undefined"||a==null||a==""){a="#FC4643"}}Site.getTopWindow().$(".J_changeSaleCrBb").css("border-bottom-color",a);Site.getTopWindow().$(".J_changeSaleCrW").css("color",a);Site.getTopWindow().$(".J_changeSaleCrBd").css("background-color",a)};Site.saleCountTimeInterval={};Site.showSaleTimeCountDown=function(b,g,d,e){var i="";var c=LS.salePromotionBegin;var h=LS.salePromotionEnd;var a=0;Site.salePromotionDetail.showType=d;if(d==1){i=c;a=b}else{i=h;a=g}clearInterval(Site.salePromotionDetail.saleCountTimeInterval);Site.salePromotionDetail.saleCountTimeInterval=setInterval(function(){var r=parseInt(a/(3600*24));var p=parseInt(a/3600)-(r*24);var n=parseInt(a/60)-(r*24*60)-(p*60);var q=parseInt(a%60);if(_lcid!=2052&&_lcid!=1028){if(p<10){p="0"+p}if(n<10){n="0"+n}if(q<10){q="0"+q}}a--;var k=Fai.format(i,r,p,n,q);if(e==2||e==3){var m=k.indexOf(":");if(m<0){m=k.indexOf(":")}if(m>0){var o=k.substring(0,m+1);var l=k.substring(m+1,k.length);$(".showSaleTimeNameClass").html(o);$(".showSaleTimeClass").html(l)}else{$(".showSaleTimeClass").html(Fai.format(i,r,p,n,q))}}else{$(".showSaleTimeClass").text(k)}if(a<0){if(d==1){a=g;i=h;d=2;Site.salePromotionDetail.showType=2;Site.showSalePromotionDl(Site.salePromotionDetail.salePromotionParam,Site.salePromotionDetail.styleType)}else{clearInterval(Site.salePromotionDetail.saleCountTimeInterval);Site.salePromotionDetail.showType=1;var j=$(".J_realMallAmount").attr("style");$(".realMallAmount").removeClass("g_minor mallMarketPrice");$(".realMallAmount").addClass("g_stress mallPriceBig");$(".realMallAmount").attr("style",j);$(".J_salePromotionRemove").remove()}}},1000)};Site.initModuleProductMallGroups=function(a,d,h,e){var b=$("#module"+a),i=b.find(".pd_mall_G_J .p_m_cotainer_J");var c=false;if(typeof b.find(".pd_mall_G_J").menuAim=="function"){l()}function l(){b.find(".pd_mall_G_J").menuAim({rowSelector:" .p_m_cotainer_J",activate:k,deactivate:j,exitActRow:function(){return true}})}function k(z){var L=$(z);L.find(".p_m_cotainerR_J").removeClass("p_m_more");L.find(".p_m_value_J").addClass("g_stress");L.addClass("bold p_m_hover g_border");var D=L.attr("_id"),v=d[D];if(v==null||v.list.length===0){return true}var I=g(v);var s={that:L,moduleId:a,clsStr:"pd_m_panel "+(h===1||h===2?"pd_m_jd":"pd_m_yhd"),idStr:"group"+D+"Panel",contentStr:I.join("")};panel=Site.moduleSubPanel(s);var n=b.find(".formBanner"),O=0;if(n.length>0&&n.is(":visible")){O=n.outerHeight()}var A=b.find(".formMiddleRight").outerWidth();if(Fai.isIE8()){A=0}var p=b.find(".formMiddleCenter").width(),t=b.find(".pd_mall_G_J").width(),N=b.offset().top+O,r=b.offset().left+b.outerWidth()-((p-t)/2)-2-A;panel.css({top:N,left:r}).show();if(Fai.isIE6()){var P=panel.find(".p_m_body_J").outerWidth();panel.width(P)}var y=0,m=0,J=L.outerHeight()-L.innerHeight();m_border=parseInt((b.outerHeight()-b.innerHeight())/2);oFormMiddle=b.find(".formMiddle"),m_content_innerPaddingTopStr=oFormMiddle.find(".formMiddleContent").css("margin-top"),m_content_innerPaddingTop=parseInt(m_content_innerPaddingTopStr.replace("px",""));if(h===2){var x=20,E=L.outerHeight(),q=panel.outerHeight(),C=$(window).height(),G=L.offset().top-$(window).scrollTop(),w=C-G,H=0;if(wL.position().top){H=L.position().top}if(Eq){H=q-w}var B=oFormMiddle.height(),K=parseInt((oFormMiddle.outerHeight()-oFormMiddle.innerHeight())/2);N+=L.position().top-H+m_border+K+m_content_innerPaddingTop;panel.css({top:N});m=H+J/2;y=E>q?q-4:L.outerHeight()-J}else{var M=b.find(".formMiddleContent").offset().top-b.find(".formMiddleCenter").offset().top,F=L.position().top+L.outerHeight()+M,o=panel.outerHeight();if(o-5
    ");o.push("
    ");var n="";if(e===1){n="target='_blank'"}if(m.hasGrand){if(h===1||h===2){$.each(m.list,function(p,q){if(e!==1&&_manageMode){n="onclick=\"Site.redirectUrl('"+q._href+"', '_self', event, 1, 0);return false;\""}o.push("
    ");o.push("
    "+Fai.encodeHtml(q.name)+"
    ");o.push("
    ");$.each(q.children,function(r,s){if(e!==1&&_manageMode){n="onclick=\"Site.redirectUrl('"+s._href+"', '_self', event, 1, 0);return false;\""}o.push(""+Fai.encodeHtml(s.name)+"")});o.push("
    ");o.push("
    ");o.push("
    ")})}else{$.each(m.list,function(p,q){if(e!==1&&_manageMode){n="onclick=\"Site.redirectUrl('"+q._href+"', '_self', event, 1, 0);return false;\""}o.push("
    ");o.push("
    "+Fai.encodeHtml(q.name)+"
    ");$.each(q.children,function(r,s){if(e!==1&&_manageMode){n="onclick=\"Site.redirectUrl('"+s._href+"', '_self', event, 1, 0);return false;\""}o.push("
    "+Fai.encodeHtml(s.name)+"
    ")});o.push("
    ");if((p+1)%3==0||(p+1)==m.list.length){o.push("
    ")}})}}else{$.each(m.list,function(p,q){if(e!==1&&_manageMode){n="onclick=\"Site.redirectUrl('"+q._href+"', '_self', event, 1, 0);return false;\""}o.push(""+Fai.encodeHtml(q.name)+"")})}o.push("
    ");return o}};Site.createImageEffectContent_product=function(i,o,j,c){if(!c){return}var l={fwc:(o.wordType)?o.fullmaskWordColor:"#fff",fwr:(o.wordType)?o.fullmaskWordResize:12,fws:(o.wordType)?o.fullmaskWordStyle:"微软雅黑"};var g=$(i).find(".imageEffects");var m=$(i).attr("id");if(typeof m=="undefined"){var d=$(g).parents("."+j.targetParent).attr("productid");m=j.targetParent+d}var b=(o.effType==5)?($(i).height()*0.75)*0.5:($(g).height()*0.5);var e=$(g).width();var a="";n();k();h();function n(){var s=[];var H="";var v="";var q=false;var p=0;var E="";var z="";z+=(o.effType==5?"padding-top:2.5_25;":"");z+=(j.productTextCenter?"text-align: center;":"text-align: left;");var F="
    ";$(g).append(F);if(j.targetParent=="productMarqueeForm"){m=m.replace("_clone","")}for(var x in c){if(c[x][m]!=undefined){s=jQuery.parseJSON(c[x][m]);v=c[x]["productName"];a=c[x]["productBuyBtnText"];q=c[x]["hasDiscount"];p=c[x]["tmpPropPrice"];E=c[x]["tmpPropName"];break}}var B=$(g).find(".props .propList");if(j.productNameShow){$(B).append(""+v+"")}if(s.length>0){for(var x in s){var r=s[x];var C=r.propName;var y=r.propValue;var t=r.type||-1;var u=r.allowed;var A=false;var D="";if(t==11&&q){C=E;y=p;A=true;D=" g_stress"}if(!j.propNameShow&&!A){C=""}else{C=""+C+":"}if($(B).height()"+Fai.top._choiceCurrencyVal+y+"
    ";tempStr=C+y}else{y=""+Fai.top._choiceCurrencyVal+y+"";tempStr=C+y}}else{tempStr=C+y}$(B).append("

    "+tempStr+"

    ")}else{var G=$(B).children().last();if($(G).width()";$(g).find(".props .propBuy").append(p)}else{$(g).find(".props .propBuy").remove()}}function h(){$(g).find(".propBuy").bind("mouseenter",function(){$(this).addClass("propBuy_hover")}).bind("mouseleave",function(){$(this).removeClass("propBuy_hover")});if(Fai.isIE6()||Fai.isIE7()){$(g).find(".propBuy").bind("click",function(){var p=$(this).attr("data-click");if(p.length>0){Fai.fkEval(p)}})}}};Site.clearImageEffectContent_product=function(b,a){$("#module"+b).find("."+a).remove();if($("#module"+b).find(".mallPanel").length>0){$("#module"+b).find(".mallPanel").remove()}};Site.bindImageEffectCusEvent_product=function(c,a){var b=$(c).find(".imageEffects");$(b).css("cursor","pointer");$(b).bind("click",function(){var h=$(this).parents("."+a.targetParent).find("a");if(Fai.isNull(h)){return}var e=$(h).attr("href");var d=$(h).attr("onclick");var g=$(h).attr("target");if(typeof d!="undefined"){Fai.fkEval(d)}else{if(e.length>0){window.open(e,g)}}})};Site.initModuleProductResultPropFilter=function(d){var c=$("#module"+d),e=c.find(".fp_list_J"),g=e.find(".fp_block_J");if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){var a=e.find(".block_head_J").outerWidth();e.find(".block_body_J").width(e.width()-a)}$.each(g,function(k,l){var l=$(l),j=l.find(".block_head_J"),h=l.find(".block_body_J"),m=j.outerHeight();blockBodyH=h.outerHeight();if(blockBodyH>m+10){h.attr("_h",blockBodyH);$(l).find(".block_tail_J .more_btn_J").text(LS.productResultMore);return}$(l).find(".block_tail_J").remove()});var b=c.find(".fp_list_J .block_tail_J");b.click(function(){var k=$(this),l=k.parent(),h=l.find(".block_body_J"),i=k.find(".more_btn_J"),j=k.find(".more_down");if(j.hasClass("more_up")){l.removeAttr("style");i.text(LS.productResultMore);j.removeClass("more_up")}else{l.height(h.attr("_h"));i.text(LS.productResultColl);j.addClass("more_up")}});$("#conds_body_sel").change(function(){window.location.href=$(this).val()});if(Fai.top._manageMode){$("#pf_tips").hover(function(){var h=$(this);tipImgW=h.width(),tipTop=h.offset().top,tipLeft=h.offset().left,str="
    "+h.attr("_tipVal")+"
    ";Fai.top.$(str).appendTo("body");var i=$("#pf_tips_Msg");i.offset({top:tipTop-i.outerHeight()-10,left:tipLeft})},function(){$("#pf_tips_Msg").remove()})}};Site.productResultPropFilterSearch=function(a){$("#searchButton").click(function(){var b=$("#searchCondInput").val();b=Fai.encodeUrl($.trim(b));if(!b){Fai.top.location.href="pr.jsp?pfc="+Fai.encodeUrl($.toJSON(a))}if(a){Fai.top.location.href="pr.jsp?keywordCond="+b+"&pfc="+Fai.encodeUrl($.toJSON(a))}else{Fai.top.location.href="pr.jsp?keywordCond="+b}});$("#searchCondInput").keydown(function(b){if(b.keyCode==13){var c=$("#searchCondInput").val();c=Fai.encodeUrl($.trim(c));if(!c){Fai.top.location.href="pr.jsp?pfc="+Fai.encodeUrl($.toJSON(a))}if(a){Fai.top.location.href="pr.jsp?keywordCond="+c+"&pfc="+Fai.encodeUrl($.toJSON(a))}else{Fai.top.location.href="pr.jsp?keywordCond="+c}}})};Site.productResultPriceCondFilter=function(b){var a=false;$("#sort_priceMin").bind("focus",function(){$("#sort_priceMin").removeClass("sort_priceArea");$("#sort_priceMin").addClass("sort_priceAreaCheck g_borderSelected");$("#sort_submit").show();$("#prSort_item2").addClass("sort_select2");a=true});$("#sort_priceMax").bind("focus",function(){$("#sort_priceMax").removeClass("sort_priceArea");$("#sort_priceMax").addClass("sort_priceAreaCheck g_borderSelected");$("#sort_submit").show();$("#prSort_item2").addClass("sort_select2");a=true});$("#sort_submit").bind("click",function(){var l=$("#sort_priceMin").val();var m=$("#sort_priceMax").val();if(!(l||m)){return}var i=parseInt(l);var e=parseInt(m);if(isNaN(i)&&""!=l){$("#sort_priceMin").removeClass("sort_priceArea");$("#sort_priceMin").addClass("sort_priceAreaCheck g_borderSelected");return}if(isNaN(e)&&""!=m){$("#sort_priceMax").removeClass("sort_priceArea");$("#sort_priceMax").addClass("sort_priceAreaCheck g_borderSelected");return}if(i>e){var h=m;m=l;l=h;h=e;e=i;i=h}if(!b){b={}}if(!b.props){var d=[];b.props=d}var j=b.props;var k=false;var g="";if(l){g+=i}else{g+="0,"+e}if(l&&m){g+=","+e}g="["+g+"]";$.each(j,function(o,p){if(p.k==11){p.v=g;k=true}});if(!k){var c={};c.k=11;c.v=g;j.push(c)}Fai.top.location.href="pr.jsp?pfc="+Fai.encodeUrl($.toJSON(b))});$("#sort_priceMin").bind("blur",function(){a=false;var c=$.trim($("#sort_priceMin").val());var d=parseInt(c);if(""!=c){if(isNaN(d)){$("#sort_priceMin").val("");return}}$("#sort_priceMin").removeClass("sort_priceAreaCheck g_borderSelected");$("#sort_priceMin").addClass("sort_priceArea");setTimeout(function(){if(!a){$("#sort_submit").hide();$("#prSort_item2").removeClass("sort_select2")}},250)});$("#sort_priceMax").bind("blur",function(){a=false;var d=$.trim($("#sort_priceMax").val());var c=parseInt(d);if(""!=d){if(isNaN(c)){$("#sort_priceMax").val("");return}}$("#sort_priceMax").removeClass("sort_priceAreaCheck g_borderSelected");$("#sort_priceMax").addClass("sort_priceArea");setTimeout(function(){if(!a){$("#sort_submit").hide();$("#prSort_item2").removeClass("sort_select2")}},250)})};Site.initPdPagenation=function(a){$("#pagenation"+a).on("click.product",".pageNo",function(){var b=$(this);b.addClass("fk-select")})};Site.setProductStatify=function(a,b,l){var k=$("#module"+a),j=k.find(".J_proSatifySum"),m,g,o,e;if(j.length<1){return}var n=Fai.isIE6()||Fai.isIE7(),d="J_select",h="J_noSelect fk-noSelect";if(n){d="lt_select_more";h="lt_no_select"}m=k.find(".J_pdCommStarList");if(m.length>0){g=m.find(".J_proStar");b=Math.round(b);for(var c=0;c0){e.text(l)}};Site.initProDetailStyle=function(p,d){var g=$("#module"+p),j=g.find(".formBanner"+p),a=g.find(".J_productDetail").width(),n=g.find(".pdTableLayout").width(),e=false,u,b,h,o,s,l,c,i,k,t,q,m,r;g.removeClass("fk-proDetaliModuleStyle");j.removeClass("fk-proDetailBannerStyle");if(d==5){g.addClass("fk-proDetaliModuleStyle");j.addClass("fk-proDetailBannerStyle");if(a0){e=true}s=(a-280)/23;if(s<20){s=20}u=g.find(".J_saleFullReduce");u.find("#realMallAmount").css({"font-size":s+"px","line-height":s+"px"});u.find(".propName").css("line-height",u.find(".J_mallPrice").height()+"px");l=(a-320)/21;h.find(".J_pdDetailBorder").css("margin","0 0 0 "+(l>0?l:0)+"px");if(e){r=$("#imgDiv"+p).outerWidth(true);k=a/46;b.css("margin-right",k+"px");m=b.outerWidth(true);o.find(".imgContainer_J").css({"margin-right":k+"px",width:(m+r)});i=o.find(".J_productOpera");t=parseInt(b.outerWidth(true));i.css("left",(t>0?t:0)+"px");o.find("#prevAndNextDiv").css("margin-left",(t>0?t:0)+"px")}q=a-o.outerWidth(true);if(q<=0){q="100%"}g.find(".J_productTitle").width(q);h.find(".propValue:not('.J_mallPrice')").width(a-o.outerWidth(true)-h.find(".propName:last").outerWidth(true)-h.find(".propColon:last").outerWidth(true)-3)}}Site.switchJump()};Site.initProDetailPage=function(b,d,a){$("#singleProductpagenation"+b).find("a").hover(function(){$(this).addClass("g_hover")},function(){$(this).removeClass("g_hover")});if(!d){return}var c=false;if($("#imgGroup"+b).length>0){c=true}if(c){$("#prevAndNextDiv").addClass("fk-pd5PageStyle")}if(!a){$("#prevAndNextDiv").width($("#imgDiv"+b).width())}};(function(i,g,c){var k=false;var h={};g.initModuleMallGroup=function(l,v,t,B,z,r,o,y){var n=$("#module"+l);var u=$(".styleMall"+l);var q=n.width();var p=n.height();var x;var s=i.top._manageMode;if(i.isIE6()||i.isIE7()||i.isIE8()){if(j(o)){o=b(o);if(t==0){$(".mallGroupRight"+l).css("border","1px solid "+o);y=b(y);n.find(".mallHeadYHD").css("background-color",y)}else{if(t==1){n.find(".mallHeadJD").css("background-color",o);$(".mallGroupRight"+l).css("border","1px solid "+o);$(".styleMall"+l).find(".li-color").css({"background-color":o})}else{if(t==2){n.find(".mallHeadTM").css("background-color",o);$(".mallGroupRight"+l).css("border-color",o)}}}}if(t==1){$(".styleMall"+l).find(".li-color").css({"border-bottom":"1px solid","border-top":"1px solid","border-color":o})}}A();g.cacheModuleFunc.init("mallGroupEventBind",{moduleId:l,useColorCode:o,mallStyle:t,groupDisplay:z,liSize:r});if(z==1){if(i.top._colId==2){w()}else{m()}}else{if(z==2){if($("#module"+l+":visible").length){w()}}else{m()}}function m(){n.find(".mallHead").die("mouseenter mouseleave").live("mouseenter",function(){$(".styleMall"+l).css({width:n.width()});$(".mallGroupRight"+l).css({left:n.width(),top:0});if(i.isIE()){u.show()}else{u.stop(true,true).slideDown(800,"easeOutExpo")}$.each($(".styleMall"+l).find("li"),function(C,D){h.fixHWSecondMenuPanel(D)});d(l)}).live("mouseleave",function(){if(event.relatedTarget==null){return}var C=event.relatedTarget.className;if(C.indexOf("li-color")<0&&C.indexOf("mallLiName")<0&&C.indexOf("displayRight")<0&&C.indexOf("ui-resizable-bottomLine")<0){if(i.isIE()){u.hide()}else{u.stop(true,true).slideUp(800,"easeOutExpo")}}});u.die("mouseleave").live("mouseleave",function(E){if(E.relatedTarget==null){return}var C=E.relatedTarget.className;if(t==0){$(this).find(".li-color").find(".pdg_font_icon").removeAttr("style")}if(t==0){$(this).find(".li-color").removeClass("li-color-"+v);$(this).find(".li-color").find(".displayRight").removeClass("displayRight-hover")}else{if(t==1){$(this).find(".li-color").removeClass("JDli-hover-"+v)}else{if(t==2){u.find("ul").removeClass("li-border-"+v);$(this).find(".li-color").removeClass("TMli-hover-"+v)}}}if(i.isIE()){$(".mallGroupRight"+l+":visible").hide()}else{$(".mallGroupRight"+l).stop(true,true);var D=$(".mallGroupRight"+l+":visible").width();$(".mallGroupRight"+l+":visible").animate({width:0,opacity:0},1000,"easeOutExpo",function(){$(this).width(D);$(this).css({opacity:1,display:"none"})})}k=true;if(C.indexOf("mallHead")>=0){return}if(i.isIE()){u.hide()}else{u.stop(true,true).slideUp(800,"easeOutExpo")}})}function w(){u.show();u.mouseleave(function(D){if(t==0){$(this).find(".li-color").find(".pdg_font_icon").removeAttr("style");$(this).find(".li-color").css({"background-color":"#fff",color:"#4a4949"});$(this).find(".li-color").find(".displayRight").removeClass("displayRight-hover")}else{if(t==1){$(this).find(".li-color").css("background-color",o)}else{if(t==2){u.find("ul").css({"border-right":""});$(this).find(".li-color").removeClass("TMli-hover");$(this).find(".li-color").css({"border-color":"",color:""})}}}$(".mallGroupRight"+l).stop(true,true);var C=$(".mallGroupRight"+l+":visible").width();if(i.isIE()){$(".mallGroupRight"+l+":visible").hide()}else{$(".mallGroupRight"+l+":visible").animate({width:0,opacity:0},1000,"easeOutExpo",function(){$(this).width(C);$(this).css({opacity:1,display:"none"})})}k=true;return})}function A(){n=$("#module"+l);if(!s){n.find(".mallHead").css("cursor","pointer")}u=$(".styleMall"+l);if(u.parent().attr("id")!="g_main"){if(n.parent().hasClass("fk-webBannerZone")&&n.parent().css("display")==="none"){return}$("#g_main").append(u);u=$(".styleMall"+l)}d(l);u.css({width:n.width(),"z-index":1002});$(".formMiddleCenter"+l).css({height:"100%"});$(".formMiddleContent"+l).css({height:"100%"})}};g.mallGroupEventBind=function(u){var l=u.moduleId,n=$("#module"+l),o=n.width();useColorCode=u.useColorCode,styleMall=$(".styleMall"+l),mallStyle=u.mallStyle,groupDisplay=u.groupDisplay,liSize=u.liSize,isNeedChangeWidth=true;s(useColorCode);function s(v){q(v,mallStyle);$(".mallGroupRight"+l).css({left:o,top:0});styleMall.find(".secGroupName").die("mouseenter mouseleave").live("mouseenter",function(){$(this).css("color",v)}).live("mouseleave",function(){$(this).removeAttr("style")});styleMall.find(".thdGroupBox").die("mouseenter mouseleave").live("mouseenter",function(){$(this).css("color",v)}).live("mouseleave",function(){$(this).removeAttr("style")});n.find(".mallHead").off("click").on("click",function(){styleMall=$(".styleMall"+l);if(styleMall.parent().attr("id")!="g_main"){$("#g_main").append(styleMall);styleMall=$(".styleMall"+l)}if(styleMall.css("display")!="none"){$(".styleMall"+l+" li").eq(0).trigger("mouseleave")}styleMall.toggle();styleMall.find(".mallGroupRight").hide();styleMall.css({width:n.width(),height:"auto","z-index":1002});n.show();$(".mallGroupRight"+l).css({left:n.width(),top:0});d(l)});var w;$.each(styleMall.find("li"),function(x,y){w=styleMall.find("li:eq("+x+") .mallGroupRight");p(w,groupDisplay);m(w,groupDisplay);t(w,groupDisplay);r(y);if(!(i.isIE6()||i.isIE7())){if(mallStyle==0&&w.width()>=750){w.mCustomScrollbar({theme:"dark-3",scrollSpeed:10,scrollButtons:{enable:true},advanced:{updateOnContentResize:true},axis:"y",callbacks:{}})}else{if(mallStyle!=0){w.mCustomScrollbar({theme:"dark-3",scrollSpeed:10,scrollButtons:{enable:true},advanced:{updateOnContentResize:true},axis:"y",callbacks:{}})}}}});if(mallStyle==0){styleMall.find("li").last().css("border-bottom","0")}if(i.isIE6()||i.isIE7()){if(mallStyle==2){styleMall.find("ul").removeClass("ulMall").addClass("ulMall-ie6");styleMall.find("ul li").removeClass("li-color").addClass("li-color-ie6");styleMall.find(".mallGroupRight").css("border-left-width","1px");styleMall.find(".mallGroupRight").css("height",(styleMall.find(".mallGroupRight").height()+liSize*2)+"px")}else{if(mallStyle==1){styleMall.find("ul li").css({"margin-bottom":"-2px","margin-top":"0px"});styleMall.css("top",(parseInt(styleMall.css("top"))-1)+"px");if(i.isIE6()){styleMall.find(".mallGroupRight").css("height",(styleMall.find(".mallGroupRight").height()+liSize)+"px")}}else{if(mallStyle==0){styleMall.find(".mallGroupRight").css("height",(styleMall.find(".mallGroupRight").height()+liSize*2)+"px")}}}}}function q(w,v,x){if(typeof styleMall.find("ul").menuAim=="function"){y()}function y(){styleMall=$(".styleMall"+l);styleMall.find("ul").menuAim({rowSelector:".li-color",activate:B,enter:A,deactivate:z,exitMenu:C});function B(E){styleMall=$(".styleMall"+l);styleMall.stop(true,true);$(E).stop(true,true);temThis=E;subMallRight=$(E).children(".mallGroupRight");if(v==0){$(E).find(".displayRight").addClass("displayRight-hover");$(E).css({"background-color":w,color:"#fff"})}else{if(v==1){$(E).css("background-color",a(w,0));$(E).removeClass("bg-transtion")}else{if(v==2){styleMall.find("ul").css({"border-right":"1px solid "+w});$(E).addClass("TMli-hover");$(E).css({"border-color":w,color:w})}else{if(v==3){$(E).find(".mallGroupRight").length&&$(E).addClass("HWli-hover");$(E).find(".mallLiNameHW").css("color",w);$(E).find(".J_secondMenuHW").css("color",w)}}}}if(v==0){$(E).find(".pdg_font_icon").css("color","#fff")}if(i.isIE()){subMallRight.show()}else{$(".mallGroupRight").stop(true,true);var D=subMallRight.width();subMallRight.width(0);subMallRight.css({opacity:0,display:"block"});subMallRight.animate({width:D,opacity:"1"},800,"easeOutQuint")}k=false;if($(E).children(".mallGroupRight").length<=0&&v==2){$(".styleMall"+l).find("ul").css({"border-right":""});$(E).css("border-right-width","1px")}}function A(E){if(typeof event!="undefined"&&typeof event.target!="undefined"&&typeof event.target.className!="undefined"&&(event.target.className.indexOf("mallGroupRight"+l)>=0||event.target.className.indexOf("secGroup")>=0||event.target.className.indexOf("thdGroup")>=0)){return}styleMall=$(".styleMall"+l);styleMall.stop(true,true);temThis=E;subMallRight=$(E).children(".mallGroupRight");if(!k){return}if(v==0){$(E).find(".displayRight").addClass("displayRight-hover");$(E).css({"background-color":w,color:"#fff"})}else{if(v==1){$(E).css("background-color",a(w,0))}else{if(v==2){styleMall.find("ul").css({"border-right":"1px solid "+w});$(E).addClass("TMli-hover");$(E).css({"border-color":w,color:w})}else{if(v==3){$(E).find(".mallGroupRight").length&&$(E).addClass("HWli-hover");$(E).find(".mallLiNameHW").css("color",w);$(E).find(".J_secondMenuHW").css("color",w)}}}}if(v==0){$(E).find(".pdg_font_icon").css("color","#fff")}if(i.isIE()){subMallRight.show()}else{$(".mallGroupRight").stop(true,true);var D=subMallRight.width();subMallRight.width(0);subMallRight.animate({width:D,opacity:"show"},800,"easeOutQuint")}k=false;if($(E).children(".mallGroupRight").length<=0&&v==2){$(".styleMall"+l).find("ul").css({"border-right":""});$(E).css("border-right-width","1px")}}function z(E){styleMall=$(".styleMall"+l);subMallRight=$(E).children(".mallGroupRight");if(v==0){if(i.isIE()||j($(E).css("background-color"))){$(E).css({"background-color":"#fff",color:"#4a4949"})}else{$(E).animate({"background-color":"#fff",color:"#4a4949"},100,"linear")}$(E).find(".displayRight").removeClass("displayRight-hover")}else{if(v==1){if(i.isIE()||j($(E).css("background-color"))){$(E).css("background-color",w)}else{$(E).addClass("bg-transtion").css("background-color",w)}}else{if(v==2){styleMall.find("ul").css({"border-right":""});$(E).removeClass("TMli-hover");$(E).css({"border-color":"",color:""})}else{if(v==3){$(E).removeClass("HWli-hover");$(E).find(".mallLiNameHW").css("color","");$(E).find(".J_secondMenuHW").css("color","")}}}}if(i.isIE()){subMallRight.hide()}else{$(".mallGroupRight").stop(true,true);var D=subMallRight.width();subMallRight.animate({width:0,opacity:0},1000,"easeOutExpo",function(){$(E).children(".mallGroupRight").width(D);$(E).children(".mallGroupRight").css({opacity:1,display:"none"})})}if(v==0){$(E).find(".pdg_font_icon").removeAttr("style")}}function C(D){var E=$(D).children("li-color");styleMall=$(".styleMall"+l);if(v==0){$(E).find(".pdg_font_icon").removeAttr("style")}else{if(v==3){var F=styleMall.find(".HWli-hover");F.find(".mallLiNameHW").css("color","");F.find(".J_secondMenuHW").css("color","");F.removeClass("HWli-hover")}}}}}function m(z,y){var v=z.find(".secGroupBox");if(v.length==0){z.prev(".displayRight").hide();z.remove();return}if(mallStyle==0||mallStyle==3){return}z.show();var A=true;if(styleMall.css("display")=="none"){A=false;styleMall.show()}var x=0;var w=z.find(".thdGroup");isNeedChangeWidth=true;$.each(w,function(B,C){if(w.eq(B).html()==""||w.eq(B).html()==null){w.eq(B).hide();w.eq(B).prev(".point2").hide();return}if(w.eq(B).height()>30){isNeedChangeWidth=false}x=(x>w.eq(B).width()?x:w.eq(B).width())});$.each(w,function(B,C){w.eq(B).width(x)});if(isNeedChangeWidth){if(!i.isIE()){z.css("opacity",1)}z.width(x+232)}z.hide();if(!A){styleMall.hide()}}function t(z,y){if(mallStyle!=3){return}z.show();var A=true;if(styleMall.css("display")=="none"){A=false;styleMall.show()}var w=0;var v=z.find(".J_thirdGroupPanleHW");if(!v.length){var x=z.find(".secGroupNameHW");$.each(x,function(B,C){if($(C).width()>=140){$(C).width(140)}})}isNeedChangeWidth=true;$.each(v,function(B,C){if(v.eq(B).html()==""||v.eq(B).html()==null){v.eq(B).hide();return}if(v.eq(B).width()>=497){isNeedChangeWidth=false;w=497}else{w=(w>v.eq(B).width()?w:v.eq(B).width())}});$.each(v,function(B,C){if(v.eq(B).length){v.eq(B).width(w);v.eq(B).find(".thdGroupBox").addClass("fk-floatLeftMenuItem")}});z.hide();if(!A){styleMall.hide()}}function r(x){var A=$(x).find(".J_secondMenuHW"),v=A.length,y=$(x).parents(".styleHW").width()-($(x).innerWidth()-$(x).width()),C,B,w=0,D,z=false;if(y<0){return}if(v>0){C=A.children();B=C.length;$(".fk-menuContainerHW").width(y);if(B){$.each(C,function(E,F){F=$(F);!z&&(z=F.hasClass("fk-hiddenIconHW"));if(B==1&&z){$(F).remove();return}w+=$(F).innerWidth();if(w>y){z&&--E;A.find("span:gt("+(E-1)+")").remove();A.addClass("fk-hiddenLongWord");return}})}}}h.fixHWSecondMenuPanel=function(v){r(v)};function p(I,H){if(mallStyle!=0){return}var v=true;if(styleMall.css("display")=="none"){v=false;styleMall.css({opacity:0,display:"block"})}I.css({opacity:0,display:"block"});var D=I.find(".groupCol1").selector;var A=I.find(".groupCol2").selector;var z=I.find(".groupCol3").selector;var J=I.find(".secGroupBox");var y=false;$.each(J,function(K,L){if(y){K++}if((K+1)%3==1){if(y){K--}if($(D).height()-$(A).height()>100){J.eq(K).appendTo(A).show();y=true;return}J.eq(K).appendTo(D).show()}else{if((K+1)%3==2){if(y){K--}if($(A).height()-$(z).height()>100){J.eq(K).appendTo(z).show();y=true;return}J.eq(K).appendTo(A).show()}else{if((K+1)%3==0){if(y){K--}J.eq(K).appendTo(z).show()}}}});var F=$(D).height();var E=$(A).height();var C=$(z).height();var w=F>E?(F>C?F:C):(E>C?E:C);var x=I.height();var G=(w>x?w:x);var B=250*3;$(D).height(G);$(A).height(G);$(z).height(G);if($(D).html()==""){B-=250}if($(A).html()==""){B-=250}if($(z).html()==""){B-=250}I.width(B);if(i.isIE6()){if($(D).width()>249){$(D).width(249).css("overflow","hidden")}if($(A).width()>249){$(A).width(249).css("overflow","hidden")}if($(z).width()>249){$(z).width(249).css("overflow","hidden")}I.find(".secGroupBox").css("margin-left","15px")}if(!v){styleMall.css({opacity:1,display:"none"})}I.css({opacity:1,display:"none"})}};function d(l){setTimeout(function(){var n=$("#module"+l),p=$(".styleMall"+l),m,o,q;m=g.getModuleGMainRect(l);o=m.left;q=m.bottom;p.css({top:q,left:o})},0)}g.fixAllMallPosition=function(){i.top.$(".formStyle97").each(function(){var l=$(this).attr("_moduleid");d(l)})};function a(n,v){if(n.indexOf("#")>=0){n=e(n)}var q,p,m;var s=n.split("(")[1].split(")")[0].split(",");var x=parseInt(s[0]);var o=parseInt(s[1]);var u=parseInt(s[2]);if(x>=o){if(x>=u){q=25;if(o>=u){p=23;m=20}else{p=20;m=23}}else{q=23;if(o>=u){p=25;m=20}else{p=20;m=25}}}else{if(x>=u){q=23;if(o>=u){p=25;m=20}else{p=20;m=25}}else{q=20;if(o>=u){p=25;m=23}else{p=23;m=25}}}if(v==0){if(j(n)){var l=parseInt(s[0])-q<=0?"0":""+(parseInt(s[0])-q)+"";var t=parseInt(s[1])-p<=0?"0":""+(parseInt(s[1])-p)+"";var w=parseInt(s[2])-m<=0?"0":""+(parseInt(s[2])-m)+"";return"rgba("+l+","+t+","+w+","+s[3]+")"}else{var l=parseInt(s[0])-q<=0?"0":""+(parseInt(s[0])-q)+"";var t=parseInt(s[1])-p<=0?"0":""+(parseInt(s[1])-p)+"";var w=parseInt(s[2])-m<=0?"0":""+(parseInt(s[2])-m)+"";return"rgb("+l+","+t+","+w+")"}}else{if(j(n)){var l=parseInt(s[0])+q<=0?"0":""+(parseInt(s[0])+q)+"";var t=parseInt(s[1])+p<=0?"0":""+(parseInt(s[1])+p)+"";var w=parseInt(s[2])+m<=0?"0":""+(parseInt(s[2])+m)+"";return"rgba("+l+","+t+","+w+","+s[3]+")"}else{var l=parseInt(s[0])+q<=0?"0":""+(parseInt(s[0])+q)+"";var t=parseInt(s[1])+p<=0?"0":""+(parseInt(s[1])+p)+"";var w=parseInt(s[2])+m<=0?"0":""+(parseInt(s[2])+m)+"";return"rgb("+l+","+t+","+w+")"}}}function j(l){return(l.indexOf("#")<0&&(l.indexOf("rgba")>=0||l.indexOf("RGBA")>=0))}function b(m){if(!j(m)){return}if(m.indexOf("transparent")>=0){return"rgb(255,255,255)"}var l=m.split("(")[1].split(")")[0].split(",");return"rgb("+l[0]+","+l[1]+","+l[2]+")"}function e(n){var o=n.toLowerCase();if(o&&o.indexOf("#")>=0){if(o.length===4){var p="#";for(var m=1;m<4;m+=1){p+=o.slice(m,m+1).concat(o.slice(m,m+1))}o=p}var l=[];for(var m=1;m<7;m+=2){l.push(parseInt("0x"+o.slice(m,m+2)))}return"RGB("+l.join(",")+")"}else{return o}}})(Fai,Site,undefined);Site.newsScroll=function(m){var h={pauseDuration:2400,showDuration:600,scrollMode:"up"},c=$.extend({},h,m),a="scroll"+c.moduleId,d=$("#module"+c.moduleId),b=d.find(".newsList");b.stop(true,true);Fai.stopInterval(a);if(m.noScroll){return}var i=b.parent(),l=b.find(".line"),k=b.find(".separatorLine");var g=c.leader||0;d.on("mouseover.newsScroll",function(){b.stop();Fai.stopInterval(a);$(this).attr("scrollInterval",0)}).on("mouseout.newsScroll",function(){if($(this).attr("scrollInterval")==0){b.stop();Fai.stopInterval(a);Fai.startInterval(a);$(this).attr("scrollInterval",1)}});(l,d).on("mouseover.newsScroll",function(){b.stop();Fai.stopInterval(a);$(this).attr("scrollInterval",0)}).on("mouseout.newsScroll",function(){if($(this).attr("scrollInterval")==0){b.stop();Fai.stopInterval(a);Fai.startInterval(a);$(this).attr("scrollInterval",1)}});function j(){b.css({position:"relative"});i.css({overflow:"hidden",position:"relative"});b.height(b.height());i.height(b.height());function n(){if(c.scrollMode=="up"){var t=b.find(".line").eq(g);var p=b.find(".separatorLine").eq(g);var q=t.outerHeight();var r=p.is(":visible");var o=r?p.outerHeight(true):0;if(g==0){b.animate({top:"-="+(q+o)},c.showDuration*((q+o)/32),function(){t.appendTo(b).end().hide().fadeIn(400);p.appendTo(b).end().hide();if(r){p.fadeIn(400)}t.insertAfter(b.find(".separatorLine:last")).end().hide().fadeIn(400);p.insertAfter(b.find(".line:last")).end().hide();if(r){p.fadeIn(400)}b.css({top:0});e()})}else{t.animate({opacity:0},400).slideUp(600,function(){t.css({opacity:1}).appendTo(b).end().hide().fadeIn(400);p.appendTo(b).end().hide();if(r){p.fadeIn(400)}});e()}}else{var u=b.find(".line:last");var w=b.find(".separatorLine:last");var r=w.is(":visible");var v=u.outerHeight();var s=r?w.outerHeight(true):0;if(g==0){b.animate({top:"+="+(v+s)},c.showDuration*((v+s)/32),function(){w.insertBefore(b.find(".line").eq(g)).end().hide();if(r){w.fadeIn(400)}u.insertBefore(b.find(".separatorLine").eq(g)).end().hide().fadeIn(400);b.css({top:0});e()})}else{w.insertBefore(b.find(".line").eq(g)).end().hide();if(r){w.slideDown().css({opacity:0}).animate({opacity:1})}u.insertBefore(b.find(".separatorLine").eq(g)).end().hide().slideDown().css({opacity:0}).animate({opacity:1});e()}}}Fai.addTimeout(a,n,c.pauseDuration);Fai.startInterval(a)}function e(){j()}j()};Site.loadNewsList=function(i,h,c){var d=$("#module"+i).find(".newsList");if(d.length==0){return}var a={};d.find(".lineBody").each(function(n){var l=$(this);var o=l.find(".newsType");if(o.length!=0){var q=o.find(">a");var r=0;$.each(q,function(t,s){r+=$(s).outerWidth()+Fai.getCssInt($(s),"margin-right")});var j=r+Fai.getCssInt(o,"padding-left")+Fai.getCssInt(o,"padding-right")+5;if(typeof a.nt=="undefined"||a.nt300){j=300}a.nt=j}}var k=l.find(".newsCalendar");if(k.length!=0){var m=k.find(">a").first().outerWidth();var p=m+Fai.getCssInt(k,"padding-left")+Fai.getCssInt(k,"padding-right")+5;if(typeof a.nc=="undefined"||a.nca").width()){m.find(".newsCalendar").width(m.find(".newsCalendar>a").width())}}});d.find(".word").css({display:"block",width:"100%"});if(Fai.isIE6()&&(d.find(".wWLine").length>0)){d.find(".line").each(function(){$(this).height($(this).height())});if(d.find(".g_topFlag").length>0){d.find(".newsTitle a").each(function(){$(this).height($(this).height())})}}var b=d.find(".line").css("background-color");d.find(".line").find(".newsType, .J_newsTypePicList").find("a").hover(function(j){j.stopPropagation();$(this).parents(".line").removeClass("g_hover");$(this).addClass("g_hover");$(this).css("background",b)},function(){$(this).removeClass("g_hover");$(this).css("background","")});d.find(".line").mouseover(function(){if(!$(this).hasClass("noHover")){$(this).addClass("g_hover")}}).mouseleave(function(){if(!$(this).hasClass("noHover")){$(this).removeClass("g_hover")}});var e=!!d.hasClass("pic-mixNewsList");if(e){d.find(".mixNewsStyleTitleContainer").off("mouseover.stylePic").on("mouseover.stylePic",function(j){$(this).addClass("g_hover");fixHoverNewsListPicTitleWidth(i,$(this))}).off("mouseleave.stylePic").on("mouseleave.stylePic",function(j){$(this).removeClass("g_hover");fixHoverNewsListPicTitleWidth(i,$(this))})}d.find(".lineHeader").first().addClass("firstHeader");Site.initContentSplitLine(i,h)};function fixHoverNewsListPicTitleWidth(a,h){var e=$("#module"+a),c=e.find(".newsList");var d=h.find(".mixNewsStyleTitle");if(d.attr("mix")==1){var b=c.find("td.newsTitle").width()||0;var j=c.find(".articlePhotoBox img").width()||0;var g=h.find(".mixNewsStyleDate").width()||0;var i=parseInt(b)-parseInt(g)-parseInt(j)-40;if(Fai.isIE6()){i-=20}d.css({width:i+"px"})}}Site.loadNewsNewStyle=function(q,b,s,o,h,j,k,r,t,u,p){var d=$("#module"+q);var x=d.find(".newsList");var i=d.width();var l=Fai.top._isTemplateVersion2?"newsCircle_hover":"g_block";if(x.length==0){return}if(b||s||j||k){if(d.find("#pagenation"+q).length>0){d.find("#pagenation"+q).css({"text-align":"center"})}if(!k){var n=x.find(".J_newsListLine");if(n.hasClass("top_with_line_icon")){n.css("padding-left","0")}}if(i<=400){if(!p){if(!o){$(x.find(".newsTitle").find("a")).each(function(y,z){$(this).css({height:"auto","white-space":"normal","word-break":"normal"});if($(this).html().length>23){var A=$(this).html().substring(0,20)+"...";$(this).html(A)}if(j){$(this).parent().css({height:"auto"})}})}if(!k){x.find(".newsTitle").css({display:"inline"})}x.find(".newsTitle").find("a").css({display:"inline"})}}x.find(".newsTypePicList_four").find(".newsTypePic").mouseover(function(){$(this).css({color:"#fff",background:"#bababa","border-color":"#bababa"})}).mouseleave(function(){$(this).css({color:"#717171",background:"#fff","border-color":"#dadada"})})}if(s||j||k){x.find(".fk-newsListTitle").mouseenter(function(){if(j){$(this).parent().parent().find(".newsCircle").addClass(l)}$(this).addClass("g_stress");$(this).addClass("g_hover")}).mouseleave(function(){if(j){$(this).parent().parent().find(".newsCircle").removeClass(l)}$(this).removeClass("g_stress");$(this).removeClass("g_hover")})}else{if(b){x.find(".J_titleLine").mouseenter(function(){var z=$(this).find(".fk-newsListTitle");var y=$(this).find(".fk-newsListDate");z.addClass("g_stress");z.addClass("g_hover");y.addClass("g_stress");y.addClass("g_hover")}).mouseleave(function(){var z=$(this).find(".fk-newsListTitle");var y=$(this).find(".fk-newsListDate");z.removeClass("g_stress");z.removeClass("g_hover");y.removeClass("g_stress");y.removeClass("g_hover")})}}if(b){x.find(".newsCalendar").css({width:"23.5%"});if(i<=400){x.find(".newsTitle").css({width:"100%"});x.find(".newsCalendar").css({display:"block","text-align":"left"})}else{x.find(".newsTitle").css({width:"75%"});if(Fai.isIE6()||Fai.isIE7()){x.find(".newsTitle").css({"float":"left"});x.find(".newsCalendar").css({"float":"right"})}}}if(s){var w=x.find(".J_newsListLine").width(),v;if(!!u){if(t){x.find(".lineBody").css({width:"100%"})}else{v=x.find(".J_newsListLine .J_newsCalendar").outerWidth(true);if(Fai.top._manageMode){x.find(".lineBody").css({width:"-moz-calc(100% - "+v+"px)",width:"-webkit-calc(100% - "+v+"px)",width:"calc(100% - "+v+"px)"})}else{x.find(".lineBody").width(parseInt(w-v))}}}else{if(i<=400){if(!h){x.find(".newsCalendar").hide()}x.find(".lineBody").css({width:"100%"})}else{x.find(".newsCalendar").show();x.find(".lineBody").css({width:"84%"})}}}if(j){if(i<=400){x.find(".newsCircleOuter").css({margin:"5px 8px 0px 0"});x.find(".lineBody").css({width:"100%"});x.find(".newsTitle").parent().css({width:"80%"});x.find(".J_timeLine").css({left:"9px"});x.find(".newsCalendar").css({"margin-left":"30px"})}var g=x.height();var e=x.find(".newsCircleOuter");var a=x.find(".newsCalendar").width();if(e.length==0){return}var m=e.position().left+parseInt(e.css("margin-left").replace("px",""))+e.width()/2;if(Fai.isIE6()||Fai.isIE7()){x.find(".J_timeLine").css({height:g-20+"px",left:e.position().left+e.width()/2+parseInt(e.css("margin-left").replace("px",""))+a+"px"})}else{x.find(".J_timeLine").css({height:g-20+"px",left:m+"px"})}}if(k){if(i<=400){x.find(".line").css({"margin-left":"",width:"198px"});if(!r){x.find(".J_articlePhotoBox").find(".cutImgPanel").each(function(z,B){var A=$(this).find("img").width()/$(this).find("img").height();var y=(198/A-124)/2;$(this).parent().css({width:"198px",height:"124px"});$(this).css({height:"124px",bottom:y+"px"});$(this).find("img").css({width:"198px",height:(198/A)+"px"})});x.find(".articlePhotoBox").find("img").each(function(y,z){if($(this).attr("_defimg")){$(this).css({width:"198px",height:"124px"})}$(this).parent().css({width:"198px",height:"124px"})})}}else{var c=x.hasClass("useOldStyleForHeight");if(!c){setTimeout(function(){Site.autoFixNewsHeight(q)},0)}else{setTimeout(function(){var y=0;x.find(".J_newsListLine").each(function(z,A){if($(this).height()>y){y=$(this).height()}if(y>550){y=550}});x.find(".J_newsListLine").css({height:y+"px"})},0)}}}};Site.getNewsListStyleData=function(c){var b=Fai.top.newsListStyleData,a;if(!b){return}a=b["newsListStyle"+c]||{};return a};Site.setNewsListImgSize=function(m,q){var e=$("#module"+m),u=Site.getModuleAttrPattern(m).newsList,v=e.find("#newsList"+m),g=e.find(".J_newsListLine"),p=g.find(".J_articlePicHref"),s=e.find(".J_articlePhotoBox"),o=p.find(".J_newsListPic"),c=Site.getNewsListStyleData(m),d=u.tw||false,n=u.ps.t||false,h=c.isNewModuleStyleFour||false,j=parseFloat(c.picPaddingRight),r=parseFloat(c.picPaddingBottom),k=c.pictureDefaultHeight||107,l=c.pictureDefaultWidth||152,b=e.width(),i,t,a;if(q){i=u.ps.w;t=u.ps.h}if(o.length<1&&p.length<1){return}if(q){o.css({height:t,width:i});p.css({height:t,width:i});s.css({marginBottom:r,marginRight:j})}else{if(h){g.width(l)}p.css({height:k,width:l});s.css({marginBottom:r,marginRight:j})}if(h){if(b<=400){g.css({"margin-left":"",width:"198px",height:"auto"});if(!n){Site.setNewsListDefaultPicSize(e)}}else{g.css({"margin-left":"30px",width:i});Site.setNewsListLineMaxHeight(g,m)}}Site.resetNewScroll(m,parseInt(u.ls.t))};Site.setNewsClassifyStyle=function(d,g){var a,o,l,e,r,h,b,m,j,q,c,k,n,p,i;n=Site.getModuleAttrPattern(d);p=Fai.top.$("#module"+d);$newsModule=p.find("#newsList"+d);a=$newsModule.find(".J_lineBody");j=a.find(".J_articlePhotoBox");q=g?"newsList":"newsResult";c=".J_"+q+"Pic";k=n[q];i=parseInt(k.tw);a.each(function(s,t){_this=$(t);o=_this.find(".J_newsTypePicList");if(o.length!=0){m=o.prevAll(":not('.J_articlePhotoBox')");b=0;$.each(m,function(u,v){b+=$(v).outerHeight()});l=_this.outerWidth()-j.eq(s).outerWidth();o.css("width",l+"px");h=_this.find(c).outerHeight()-b-o.outerHeight();h=(h<0?0:h);if(i==1||i==-1||h<0){h=0}o.css("margin-top",h+"px")}})};Site.refreshNewsListStyle=function(c,b){var a;if(b){a=Site.getModuleAttrPattern(c).newsList;Site.setNewsListImgSize(c,parseInt(a.ps.t));Site.refreshNewsTimeLine(c)}Site.setNewsClassifyStyle(c,b)};Site.refreshNewsTimeLine=function(m){var e=Site.getNewsListStyleData(m),r=Site.getModuleAttrPattern(m).newsList,s,d,g,o,i,c,a,k,j,t,n,h,b,p,l,q;h=e.isNewModuleStyleOne;t=e.isNewModuleStyleTwo;n=e.isNewModuleStyleThree;b=e.isNewModuleStyleFour;q=e.smallWidthHideDate;if(!(t||n||h||b)){return}s=$("#newsList"+m);o=s.find(".J_newsCalendar");j=s.find(".J_lineBody");d=s.width();p=s.find(".J_newsTitle");if(h){o.css({width:"23.5_25"});if(d<=400){p.css({width:"100%"});o.css({display:"block"})}else{o.css({display:"inline-block"});p.css({width:"75%"})}}else{if(t){if(!q){if(d<=400){if(!e.newModuleStyleTwo_horizontal){o.hide()}j.css({width:"100%"})}else{o.show();j.css({width:"84%"})}}}else{if(n){i=s.find(".J_timeLine");g=s.find(".newsCircleOuter");if(d<=400){g.css({margin:"5px 8px 0px 0"});j.css({width:"100%"});p.parent().css({width:"80%"});i.css({left:"9px"});o.css({"margin-left":"30px"})}c=s.height();a=o.width();if(g.length==0){return}k=g.position().left+parseInt(g.css("margin-left").replace("px",""))+g.width()/2;i.css({height:c-20+"px",left:k+"px"})}}}};Site.setNewsListDefaultPicSize=function(a){$articlePhotoBox=a.find(".J_articlePhotoBox");$articlePhotoBox.find(".cutImgPanel").each(function(c,e){var d=$(this).find("img").width()/$(this).find("img").height();var b=(198/d-124)/2;$(e).parent().css({width:"198px",height:"124px"});$(e).css({height:"124px",bottom:b+"px"});$(e).find("img").css({width:"198px",height:(198/d)+"px"})});$articlePhotoBox.find("img").each(function(b,c){if($(c).attr("_defimg")){$(c).css({width:"198px",height:"124px"})}$(c).parent().css({width:"198px",height:"124px"})})};Site.resetNewScroll=function(a,i){var j=$("#module"+a),l=Site.getModuleAttrPattern(a).newsList,b="scroll"+a,c=j.find("#newsList"+a),d="down",k=c.find(".J_newsListLine"),h,g,e;c.stop(true,true);Fai.top.Fai.stopInterval("scroll"+a);k.off("mouseover.newsScroll mouseout.newsScroll");j.off("mouseover.newsScroll mouseout.newsScroll");c.css({height:"",top:"",position:""});c.parent().css({height:"",overflow:"",position:""});if(i){d=(parseInt(l.ls.d))?"up":"down";h=Site.getNewsListStyleData(a);g=h.isPictureStyle;e=g?1:0;c.height("auto");c.parent().height("auto");Fai.top.Site.newsScroll({moduleId:a,scrollMode:d,leader:e,noScroll:false})}};Site.setNewsListLineMaxHeight=function(c,d){var a=c.parent().hasClass("useOldStyleForHeight");if(!a){Site.autoFixNewsHeight(d)}else{var b=0;if(c.length<1){return}c.css("height","auto");c.each(function(e,g){$elem=$(g);if($elem.height()>b){b=$elem.height()}if(b>550){b=550}});c.css({height:b+"px"})}};Site.afterAddNews=function(a){if(typeof(a)!="undefined"){document.location.reload()}};Site.newsAddComment=function(){if(_siteDemo){Fai.ing("当前为“模板网站”,请先“复制网站”再进行评论。");return}var b=$.trim($("#commentCreator").val());var h=$("#commentCreator").attr("minlength");var g=$("#commentInput").val();var i=$("#commentInput").attr("minlength");var j=$("#validateCodeInput").val();var a=$("#commentInput").attr("newsId");var c=$("#submitTips").attr("isDefaultTips");if(typeof(c)=="string"&&c=="true"){$("#submitTips").show();return}if(typeof(b)!="string"){$("#submitTips").text(LS.creatorTips).show();return}if(typeof(g)!="string"||""==g){$("#submitTips").text(LS.commentNotEmpty).show();return}if(g.length'+Fai.encodeHtml(LS.login)+"")).show();break;case 7:$("#submitTips").text(LS.commentClosed).show();break;case 8:$("#submitTips").text(LS.commentSubmitError).show();break;case 9:$("#submitTips").text(LS.commentCountLimit).show();break;case 10:$("#submitTips").text(LS.msgBoardInputValidateCode).show();if(l.needCode){$(".J_newsCommentCaptcha").removeClass("captchaHide")}break;default:}}})};Site.showNewsQRCode=function(e,c,a){var b=a=="newsV2"?"webSiteQRCodeDisplayV2":"webSiteQRCodeDisplay";var d=["
    ","","",LS.newsQRCodeMsg,"","
    "];Fai.top.$(d.join("")).appendTo("body");$("#newsQrCode").mouseenter(function(g){if(a){$("#newsQRCodeDisplay").css("top",($(this).offset().top+$(this).height()+10)+"px");$("#newsQRCodeDisplay").css("left",($(this).offset().left-60)+"px")}else{$("#newsQRCodeDisplay").css("top",$(this).offset().top+"px");$("#newsQRCodeDisplay").css("left",($(this).offset().left+24)+"px")}if(a){$("#newsQRCodeDisplay").slideDown("fast")}else{$("#newsQRCodeDisplay").show()}}).mouseleave(function(g){if(a){$("#newsQRCodeDisplay").slideUp("fast")}else{$("#newsQRCodeDisplay").hide()}})};Site.initMixNews=function(m){var h=m.leader||0;var e=$("#module"+m.moduleId),b=e.find(".newsList"),j=b.parent();var d=b.find(".mixNewsStyleTitle");if(d.attr("mix")==1){var a=b.find("td.newsTitle").width()||0;var g=b.find(".mixNewsStyleDate").width()||0;var l=b.find(".articlePhotoBox img").width()||0;var i=parseInt(a)-parseInt(g)-parseInt(l)-40;if(Fai.isIE6()){i-=20}d.css({width:i+"px"});if(i<1){d.addClass("mixNewsStyleTitle-hide")}else{d.removeClass("mixNewsStyleTitle-hide")}}if(Fai.isIE6()&&h!=0){var k=b.find("td.newsTitle").height();b.find(".line").eq(0).css({height:k+"px"})}var c=Fai.top.$("#module"+m.moduleId);c.on("Fai_onModuleLayoutChange",function(){var q=$(this).find(".newsList");var u=q.parent();var t=q.find(".mixNewsStyleTitle");q.css({height:"auto"});u.css({height:"auto"});if(Fai.isIE6()&&h!=0){var n=q.find("td.newsTitle").height();q.find(".line").eq(0).css({height:n+"px"})}if(q.find(".mixNewsStyleTitle").attr("mix")==1){var s=q.find("td.newsTitle").width()||0;var p=q.find(".mixNewsStyleDate").width()||0;var o=q.find(".articlePhotoBox img").width()||0;var r=parseInt(s)-parseInt(p)-parseInt(o)-40;if(Fai.isIE6()){r-=20}q.find(".mixNewsStyleTitle").css({width:r+"px"});if(r<1){t.addClass("mixNewsStyleTitle-hide")}else{t.removeClass("mixNewsStyleTitle-hide")}}if(Fai.isIE6()&&h!=0){var n=q.find("td.newsTitle").height();q.find(".line").eq(0).css({height:n+"px"})}});c.find(".lineBody").each(function(r){var t=$(this);var s=t.find(".newsTypePicList");if(s.length!=0){var p=$(s).prevAll();var o=0;$.each(p,function(u,v){if(!$(v).hasClass("articlePhotoBox")){o+=$(v).outerHeight()}});var n=t.outerWidth()-t.find(".articlePhotoBox").outerWidth();$(s).css("width",n+"px");var q=t.find(".articlePhotoBox img").outerHeight()-o-$(s).outerHeight();q=(q<0?0:q);$(s).css("margin-top",q+"px")}})};Site.setNewsListStylePattern=function(c,b){var a=Fai.top.newsListStyleData;if(!a){Fai.top.newsListStyleData={}}Fai.top.newsListStyleData["newsListStyle"+c]=b};Site.setNewsModuleAttrPattern=function(d,a,c){var b=Site.getModuleAttrPattern(d);if(!!b[a]){b[a]=c}};Site.autoFixNewsHeight=function(c){var e=$("#module"+c);var b=e.find(".J_newsList");var m=b.find(".J_newsListLine");var a=b.width();var l=m.outerWidth(true);var d=parseInt(a/l);var q=0,h=[],o,n;for(var k=0,g=1,p=m.length;kq){q=n}h.push(o);if(g===d||k===p-1){$(h).each(function(){$(this).css("height",q+"px")});g=1;q=0;h=[]}else{g++}}};Site.initNewsDetailV2=function(){var e=$(".newsDetailV2").find(".middlePanel"),b=e.find(".shareInfo"),l=b.find(".shareTag"),c=b.find(".shareListPanel"),a=c.find("a").length,h=parseInt(c.width()/(33+12)),k=b.position().top,g=b.position().left-10,d,j="",i;e.css("height",e.height()+"px");if(h
    ")}else{Fai.top.$("body").find(".inputResizeLine").css({left:o,top:l,height:m})}Fai.top.$("body").find(".inputResizeLine").show();return false}else{Fai.top.$("body").find(".inputResizeLine").hide()}})}else{function g(i){return !$(i).is(d)}$($.makeArray(k).filter(g)).each(function(){var i=d.width();var p=$(this).width();if(d.hasClass("phone-resize")||d.hasClass("address-resize")){i=i*0.93}if($(this).hasClass("phone-resize")||$(this).hasClass("address-resize")){p=p*0.93}var o=$(this).offset().left+p+"px";if(Math.abs(i-p)<3){if(!Fai.top.$("body").find(".inputResizeLine").is("div")){Fai.top.$("body").append("")}else{Fai.top.$("body").find(".inputResizeLine").css({left:o,top:l,height:m})}Fai.top.$("body").find(".inputResizeLine").show();return false}else{Fai.top.$("body").find(".inputResizeLine").hide()}})}};Site.siteFormAddressInit=function(j,c,b,g,k){var h=[];var i;var d;var a;var e;if(g==2052||g==1028){i=site_cityUtil.getProvince()}else{i=site_cityUtil.getProvinceEn()}$.each(i,function(l,m){if(g==2052||g==1028){h.push("")}else{h.push("")}});$("#M"+b+"F"+c+"siteFormSelectProvince"+j+"").html("").html(""+h.join("")).change(function(l){d=$("#M"+b+"F"+c+"siteFormSelectProvince"+j+"").val();if(isNaN(d)||d<=0){$("#M"+b+"F"+c+"siteFormSelectCity"+j+"").html("").html("");$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").html("").html("")}a=[];if(g==2052||g==1028){citylist=site_cityUtil.getCities(d)}else{citylist=site_cityUtil.getCitiesEn(d)}$.each(citylist,function(m,n){a.push("")});$("#M"+b+"F"+c+"siteFormSelectCity"+j+"").removeAttr("disabled");$("#M"+b+"F"+c+"siteFormSelectCity"+j+"").html("").html(""+a.join("")).unbind().bind("change",function(m){cityId=$("#M"+b+"F"+c+"siteFormSelectCity"+j+"").val();if(isNaN(cityId)||cityId<=0){$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").html("").html("")}e=[];if(g==2052||g==1028){countylist=site_cityUtil.getCounty(cityId)}else{countylist=site_cityUtil.getCountyEn(cityId)}$.each(countylist,function(n,o){e.push("")});$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").removeAttr("disabled");$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").html("").html(""+e.join("")).unbind().bind("change",function(n){});if($("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").find("option").length<=1&&cityId!=-1){$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").hide()}else{$("#M"+b+"F"+c+"siteFormSelectCounty"+j+"").show()}})})};Site.siteFormPhoneValidate=function(d,c,a){var b=$("#M"+c+"F"+d+"siteFormPhoneInput"+a);b.blur(function(){var e=$(this).val().trim();if(!e){$(this).val("")}if(e.length<7||e.length>11){Fai.ing("请输入合法的手机号码!");$(this).val("")}});b.focus(function(){$(this).off("mousewheel.disabledScroll").on("mousewheel.disabledScroll",function(e){e.preventDefault()});$(this).off("keydown.preventDefault").on("keydown.preventDefault",function(e){if(e.keyCode==38||e.keyCode==40){e.preventDefault()}if(e.keyCode==13){$(this).trigger("blur")}})})};Site.addFlashModuleFlash=function(a){var c="Opaque";if(a.transparent!=1){c="transparent"}var b=[''];$("#flashModuleFlash"+a.moduleId).append(b.join(""))};Site.noticeMarquee=function(g,y){var x={direction:"up",speed:"normal",loop:"infinite",moveout:false,isScrolling:false};$.extend(x,g);if(x.speed=="normal"){$.extend(x,{speed:28})}else{if(x.speed=="slow"){$.extend(x,{speed:60})}else{$.extend(x,{speed:13})}}$("#noticeMarquee"+x.id).data("options",g);var n=x.id,v=$("#noticeMarquee"+n),i=v.outerHeight(true),h=v.outerWidth(true),q=v.children().width(),c=$("#noticeContainer"+n),d=c.outerWidth(),m=(q>d)?q:d;if(y!=null){var l=$("#noticeMarquee"+y).width();l=l?l:0;h=l;m=(h>d)?h:d;Fai.stopInterval("rm"+y);$("#noticeMarqueeCopy"+y).remove();$(v).appendTo($("#noticeContainer"+y));$("#noticeMarqueeNewParent"+y).remove()}var C=x.direction,A=0,k="left",s=x.speed,B=(x.loop!="infinite"||x.loop<=0)?1:x.loop,o=x.moveout,D=x.isScrolling,w=x.noticeType,z=20,u=$("
    ");var j="
    "}else{j+="'>
    "}var p=$(j);function r(){p.appendTo(v.parent());v.appendTo(p);u.appendTo(p);if(!D&&!o){}else{$(v.html()).appendTo(u)}if(C=="left"){A=i;k="left"}else{A=0-m;if(D&&!o){A=0}if(D&&o){A=-m}k="left"}if(o){v.css(k,0)}else{v.css(k,A)}if(C=="left"||C=="right"){v.css("top",0)}$("#module"+n+" .noticeContainer").mouseover(function(){Fai.stopInterval("rm"+n)}).mouseout(function(){if(B=="infinite"||B>0){Fai.startInterval("rm"+n)}});e();a(C)}function b(){var E=v.find("img");if(E.length>0){var G=E[0].width;for(var F=0;F";$(a).insertAfter(g)}$("#noticeScrollbar"+b.id).marquee({yScroll:b.direction,showSpeed:b.speed,pauseSpeed:b.stopTime,hoverChange:false});var e=$("#module"+b.id+" .formMiddleContent");e.css("overflow","hidden");e.css("width","98%");var d=$("#module"+b.id+" .formMiddleCenter");d.css("overflow","hidden")};Site.noticeUpDownSizeChange=function(d){var b=$("#noticeMarquee"+d),a=b.height(),c=b.children().children();$.each(c,function(e,g){$(g).css("top",-(a+2)+"px")});$("#noticeScrollbar"+d).removeData("_innerHeight")};Site.setSerTextOverflow=function(d){var c=$("#serOnline-container"+d);var e=c.find(".serOnline-service").children(".serOnline-list-h");var a=c.find(".serOnline-contact").children(".serOnline-list-h");var b=c.outerWidth(),g=c.outerHeight();Site.setSerListCSS(e,b);Site.setSerListCSS(a,b)};Site.setSerListCSS=function(a,d){var c,g,e,b;$.each(a,function(i,h){c=$(h).outerWidth();if(c>d-3){if(g!=null&&g
    ').insertAfter($(h).prev())}b=$(h).outerWidth();$(h).css("white-space","normal");$(h).css("word-break","break-all");e=true}g=e?b:$(h).outerWidth();e=false})};Site.initCustomIframe=function(d){var h=Fai.top.$("#iframe"+d);var b=h.attr("width");var c=h.attr("height");var a=h.attr("src");var e="";var g=$(e);h.replaceWith(g);g.attr("src",h.attr("src"))};Site.initModuleWeiboShow=function(b,e,a,d){var i=Fai.top.$("#wbShowFrame"+e);var h=i.attr("width");var g=i.attr("height");var j="";i.replaceWith(j);var c=Fai.top.$("#wbShowFrame"+e).parent().width();var k=a+c+"&ran="+Math.random();Site.initIframeLoading(b,e,k,d);$("#refreshChlid"+e).css("padding-top","40%")};Site.initLocaler=function(b,a){if(typeof Fai.top._localerJsonTmp=="undefined"){Fai.top._localerJsonTmp=b}if(a){Site.initLocalerManage(b)}else{Site.initLocalerSite()}Site.checkLocalerItemWidthForIE();Site.bindLocalerItemEvent()};Site.initLocaleStyle=function(b){var a=$("#webTop").width();if(b>a){$("#localer").css("left","auto");$("#localer").css("right",a-b-$("#localer").width()+"px")}else{$("#localer").css("left",b);$("#localer").css("right","auto")}};Site.initLocalerSite=function(){$("#localer").bind("mouseenter",function(){Site.openLocalerList()}).bind("mouseleave",function(){Site.closeLocalerList(this)})};Site.openLocalerList=function(){var b=parseInt($("#localer").attr("_moduleStyle"));if(b>=1&&b<=3){return}var a=$("#localer").find(".J_localerList").height();if(Fai.isIE()){$("#localer").find(".J_localerPanel").stop().animate({height:a},{duration:200})}else{$("#localer").find(".J_localerPanel").css("height",a+"px")}$("#localer").find(".J_localerPanel .J_localerList .first .arrow").addClass("arrow_hover")};Site.closeLocalerList=function(c){var b=parseInt($("#localer").attr("_moduleStyle"));if(b>=1&&b<=3){return}var a=$("#localer").find(".J_localerPanel .J_localerList .first").height();if(Fai.isIE()){$("#localer").find(".J_localerPanel").stop().animate({height:a},{duration:200})}else{$("#localer").find(".J_localerPanel").css("height",a+"px")}$("#localer").find(".J_localerPanel .J_localerList .first .arrow").removeClass("arrow_hover")};Site.bindLocalerItemEvent=function(){$("#localer").find(".J_localerPanel .J_localerList .localerItemContent").bind("mouseenter",function(){if($(this).hasClass("first")){return}$(this).addClass("localerItemContent_hover")}).bind("mouseleave",function(){if($(this).hasClass("first")){return}$(this).removeClass("localerItemContent_hover")})};Site.checkLocalerItemWidthForIE=function(){Fai.top.$("#localer").find(".localerItemContent").removeAttr("style");var b=parseInt(Fai.top.$("#localer").attr("_moduleStyle"));if((Fai.isIE6()||Fai.isIE7())&&(b>=4&&b<=9)){var c=Fai.top.$("#localer").find(".J_localerPanel").width();Fai.top.$("#localer").find(".localerItemContent").css("width",c+"px")}if((Fai.isIE6())&&(b>=1&&b<=3)){var a=Fai.top.$("#localer").find(".J_localerPanel").height();Fai.top.$("#localer").find(".J_localerPanel").css("line-height",a+"px")}};Site.initFloatImg=function(a){Site.hoverChangeImage()};Site.floatImgInContainerForms=function(a){if(!$("#webContainerTable").length){return false}if($("#webContainerTable").find("#module"+a).length){if(!(Site.checkNestModule($("#module"+a)).parentId>0)){return true}else{return false}}else{return false}};Site.picShape=function(a,l,m){var b=$("#module"+a),g=b.find(".floatImgWrap"),k=b.find(".floatImgWrap").find("img"),e=b.find(".floatImg_J"),j=b.find(".forMargin"),c=l.borderRadius,n=l.imgShapeType,r=b.find(".floatImg"),q=b.find(".formWrap"),p=k.height(),o=k.width(),d=0;if(m.effType){var h=m.effType,i=r.find(".imageEffects");borderWidth=parseInt(i.css("borderWidth"))}j.css({width:"initial",height:"initial"});if(p>o){d=o}else{d=p}if(n==2||n==4){b.find(".forStyle").css("borderRadius","0");r.css({"text-align":"center",overflow:"visible"});g.css({width:d+"px",height:d+"px",overflow:"hidden",display:"inline-block"});b.css({overflow:"hidden"});if(p>o){g.css("marginTop",(p-o)/2+"px");j.css("marginTop",-(p-o)/2+"px");if(h){if(h==2){i.css({height:d+"px",width:(d-2*borderWidth)+"px",marginTop:((p-o)/2-borderWidth)+"px"})}}}if(o>p){j.css("marginLeft",-(o-p)/2+"px");if(h){if(h==2){i.css({width:d+"px"});i.css("marginLeft",(o-p)/2+"px")}}}if(n==4){g.addClass("picShape");i.addClass("picShape")}else{g.removeClass("picShape");i.removeClass("picShape");b.find(".forMargin").css("borderRadius","0")}}else{if(n==1||n==3){j.css("marginLeft","0");j.css("marginTop","0");g.css("marginTop","0");k.css("marginTop","0");k.css("marginLeft","0");if(n==1){b.find(".forMargin").css("borderRadius","0")}g.removeClass("picShape");i.removeClass("picShape");g.css({width:"initial",height:"initial"});i.css({width:g.width()-2+"px",height:g.height()-2+"px",marginTop:"0",marginLeft:"0"});if(n==3){b.find(".forMargin").css({height:p+"px",width:o+"px",borderRadius:c+"px",overflow:"hidden"})}}}};Site.bindImageEffectCusEvent_floatImg=function(h,c){var g=Fai.top.$(h).find(".imageEffects"),a=true,e=Fai.top.$(h).find("a"),d=$(e).attr("href"),b=(typeof d=="undefined"||d.length==0||d.indexOf("javascirpt")>0||d.indexOf("return")>0||e.length==0)?false:true;if(!b){a=false}if(a){$(g).css("cursor","pointer")}else{$(g).css("cursor","default")}$(g).off("click.imgEft").on("click.imgEft",function(){var m=$(this).parents("."+c.targetParent).find("a");if(Fai.isNull(m)){return}var j=$(m).attr("href"),i=$(m).attr("onclick"),k=$(m).attr("target");if(typeof k=="undefined"){k="_self"}var l=(typeof j=="undefined"||j.length==0||j.indexOf("javascirpt")>0||j.indexOf("return")>0||e.length==0)?false:true;if(typeof i!="undefined"){$(m).click()}else{if(l){window.open(j,k)}}})};Site.mallCoupon=function(a){this.moduleId=a;this.module=Fai.top.$("#module"+a);this.couponList=this.module.find("#couponList"+a)};(function(c,a,b){var d=a.prototype,i={};d.init=function(l){i["moduleId"+l]=this;j(l);if(window.localStorage){var m=window.localStorage.getItem("receTime");if(m&&Fai.top._TOKEN){if(new Date().getTime()-Number(m)>120000){localStorage.removeItem("receTime");return}var k=window.localStorage.getItem("cpId");c("div.receiveCoupon[coupon_id="+k+"]").click();window.localStorage.removeItem("receTime");window.localStorage.removeItem("cpId")}}};function j(k){i["moduleId"+k].module.on("click",".receiveCoupon",function(){if(_manageMode){if(!Fai.top._couponOpen){return}var m={};m.height=75;m.width=280;m.htmlContent='
    ';m.htmlContent+="当前为管理状态,领取失败
    ";m.autoClose=2000;var l=Site.popupBox(m)}else{var n=c(this).attr("coupon_id");var o=c(this).attr("bg_id");g(n,o)}})}function g(k,l){c.ajax({url:"ajax/mallCoupon_h.jsp?cmd=receiveCoupon",data:"bgId="+l+"&cid="+k+"&t="+new Date().getTime(),dataType:"json",success:function(n){var q={};if(n.success){var p=n.coupon;q.height=229;q.width=379;var r=[];r.push('
    ');r.push('
    ');r.push(LS.CongratulatSuccess);r.push("
    ");r.push('
    ');r.push(LS.coupon+LS.name+":"+p.couponName);r.push("
    ");r.push('
    ');r.push(LS.denomination+':'+p.savePrice+"");r.push("
    ");r.push('
    ');r.push(LS.useConditionOrderOver+Fai.top.choiceCurrencyVal+p.orderMinPrice);r.push("
    ");r.push('
    ');r.push(LS.vilidaty+":"+p.validity);r.push("
    ");r.push('
    ');r.push('
    ');r.push(LS.view+LS.coupon);r.push("
    ");r.push('
    ');r.push(LS.returnPage);r.push("
    ");r.push("
    ");r.push("
    ");q.htmlContent=r.join("");q.reload=true;var m=Site.popupBox(q);h(m,n.success);e(m)}else{var o=n.rt;if(o==-23){if(window.localStorage){var s=window.localStorage.getItem("receTime");if(s){window.localStorage.removeItem("receTime");window.localStorage.removeItem("cpId")}localStorage.setItem("cpId",k);localStorage.setItem("receTime",new Date().getTime())}document.location.href="login.jsp?url="+document.location.href}else{if(o==-4){q.height=155;q.width=312;var r=[];r.push('
    ');r.push('
    ');r.push(LS.receiveFail);r.push("
    ");r.push('
    ');r.push(LS.receiveOverLimit);r.push("
    ");r.push('
    ');r.push('
    ');r.push(LS.view+LS.coupon);r.push("
    ");r.push('
    ');r.push(LS.returnPage);r.push("
    ");r.push("
    ");r.push("
    ");q.htmlContent=r.join("");var m=Site.popupBox(q);m.css("width","");m.find(".popupCnBg").css("width","");h(m);e(m)}else{q.height=110;q.width=270;var r=[];r.push('
    ');r.push('
    ');r.push(LS.receiveFail);r.push("
    ");r.push('
    ');if(n.msg=="receiveOverLimit"){r.push(LS.receiveOverLimit)}else{if(n.msg=="couponCountZero"){r.push(LS.couponCountZero)}else{if(n.msg=="couponExpired"){q.height=110;q.width=210;r.push(LS.couponExpired)}}}r.push("
    ");r.push("
    ");q.htmlContent=r.join("");var m=Site.popupBox(q);m.css("width","");m.find(".popupCnBg").css("width","")}}}},error:function(){Fai.ing(LS.systemError,true)}})}function h(l,k){l.find(".back-page").on("click",function(){l.find(".popupBClose").click();if(k){location.reload(true)}})}function e(k){k.find(".goto-coupon-btn").on("click",function(){document.location.href="mcenter.jsp@item=membercoupon"})}d.showPage=function(){return function(l,k){c.ajax({url:"ajax/mallcoupon_h.jsp@cmd=getpagedata",data:"moduleId="+l+"&pageNo="+k,dataType:"json",success:function(m){if(m.success){var n=[];c.each(m.list,function(p,o){if(o.id==0){return false}n.push("
    ");n.push("
    ");if(o.state){n.push("
    ");n.push("
    ")}else{n.push("
    ");n.push("
    ")}n.push("
    "+Fai.top.choiceCurrencyVal+""+o.savePrice+"
    ");if(o.state){n.push("
    "+LS.full+o.orderMinPrice+LS.money+"
    "+LS.canUse+"
    "+o.couponName+"
    ")}else{n.push("
    "+LS.full+o.orderMinPrice+LS.money+"
    "+LS.canUse+"
    "+o.couponName+"
    ")}var r=LS.immediatelyReceive;var q=m.bg;if(!o.state){r=LS.expired;q="gray"}else{if(o.couponLeaveAmount==0&&!o.autoInc){r=LS.receivedOver;q="gray"}else{if(o.currentMemberReceived){r=LS.alreadyReceived;q="gray"}}}n.push("
    "+r+"
    ");n.push("
    "+LS.vilidaty+":"+o.validity+"
    ");n.push("
    ");if(o.state){n.push("
    ")}else{n.push("
    ")}n.push("
    ")});i["moduleId"+l].couponList.html(n.join(""));Fai.Cookie.set("pageNo"+l,k);if(_manageMode&&Fai.top._couponOpen){Site.initModuleCouponListItemManage({couponParent:"couponList"+l,coupon:"coupon",moduleId:l})}}},error:function(){Fai.ing(LS.systemError,true)}});if(_manageMode){Site.initModuleCouponListItemManage({couponParent:"couponList"+l,coupon:"coupon",moduleId:l})}}}})(jQuery,Site.mallCoupon);Site.initMallCoupon=function(a){Fai.top.mallCoupon=Fai.top.mallCoupon||{};Fai.top.mallCoupon["couponList"+a]=new Site.mallCoupon(a);Fai.top.mallCoupon["couponList"+a].init(a)};Site.videoCompatible=function(q){var a=Fai.top.navigator.userAgent,k=/^https?.+\.(mp4)$/i,j=q.flvPagePath,d=false;if(k.test(j)){d=true}if(!(d&&/(iPhone|iPad|iPod|iOS|Android)/i.test(a))){return}var b=!!(document.createElement("video").canPlayType),l="mediaplayerObj"+q.moduleId,n="mediaplayer"+q.moduleId,i=[],h=[],m,g,c,p;if(!b&&q.mediaJsUrl.length>0){if(Fai.top.$("#jz-Html5VideoJs").length<1){var o=document.createElement("script"),e=document.head||document.body;o.id="jz-Html5VideoJs";o.type="text/javascript";o.src=q.mediaJsUrl;e.appendChild(o)}}if(q.videoType==1){l=q.moduleId;n="onLineFlv"+q.moduleId}c=Fai.top.$("#"+n);p=Fai.top.$("#"+l);i.push('id="'+l+'"');if(q.flvImgUrl.length>0){i.push('poster="'+q.flvImgUrl+'"')}i.push('width="'+q.flvWidth+'"');i.push('height="'+q.flvHeight+'"');i.push("controls");m=i.join(" ");h.push("");g=h.join("");if(p.length>0){p.remove();c.append(g)}};Site.videoNetUrlDeal=function(j){var b="";if(j){var i=$("#onLineFlv"+j);$onLineVideo=i.find("#"+j);b=$onLineVideo.attr("src");try{if(b){b=Fai.decodeHtml(b);b=b.replace(/ /gi," ").replace(/</gi,"<").replace(/>/g,">").replace(/\/gi,"\\").replace(/'/gi,"'").replace(/"/gi,'"').replace(/\/gi,"\n").replace(/&/gi,"&");var a=$(b);var d=a.get(0).tagName.toLowerCase();var l="";l=a.attr("src");var n=l.split("/");var g=n[2];if(d=="iframe"&&g.indexOf("youku.com")!=-1){l="../player.youku.com/player.php/sid/"+n[4]+"/v.swf";$onLineVideo.attr("src",l);var h=$onLineVideo.prop("outerHTML");$onLineVideo.remove();i.append(h)}else{if(l){l=Fai.decodeHtml(l);if(d=="embed"){$onLineVideo.attr("src",l);var h=$onLineVideo.prop("outerHTML");$onLineVideo.remove();i.append(h)}else{if(d=="iframe"){var c=$onLineVideo.width();var m=$onLineVideo.height();$onLineVideo.remove();i.append('')}}}}}}catch(k){}}};Site.optimizeFooterAlign=function(){var d=$("#footerNav"),b=true,h;if(d.length<1){return}var a=d.find(".J_footerItemListContainer"),i=a.children(".J_footerItemSection");if(i.length<1){return}var g=a.children(".J_footerItemSpacing_end"),l=i.first(),j=i.last(),k=j.find(".J_footerItemContainer"),c,e;if(Fai.top._designAuth){h=Site.getFooterStyleData();if(h.fa!=2){b=false}if(h.fis==2){b=false}}if(l.offset().top
    ");j.append(m);m.html(k.replace(/\s/g," "))}else{j.append(k)}}if(c=="subTitle"){if(d.find("#subTitle").length<=0){g=$("
    ");j.append(g);g.html(k.replace(/\s/g," "))}else{j.append(k)}}};(function(c,e,i,b){var d=Fai.top.$("#webContainer");var m=d.width();i.init=function(n){j(n);g(n);h(n);k()};function j(o){var w=o;var n=Fai.top.$("#webBanner");var q=Fai.top.$("#bannerV2");var r=w.widthType;var u;if(w._open){if(r===0){u=w.width}else{if(r===1){u=w.width;n.css("width","100%")}else{if(r===2){u=w.cusBannerWidth;w.width=u;n.css("width",u+"px")}}}w.mouseoverId="switchGroup";q.css("background","none");q.children().remove();q.bannerImageSwitch(w)}else{var s=w.bannerListAdapt;var t;if(r===0){u=w.defaultwidth;t=m}else{if(r===1){n.css("width","100%");t=m}else{if(r===2){u=w.cusBannerWidth;n.css("width",u);t=u}}}if(s===0){q.find(".banner").css("background-size","cover")}else{q.find(".banner").css("background-size","")}var p=[];var v=Fai.top.$(".fk-inBannerListZone-tmp").find(".form");p.push("
    ");p.push("
    ");p.push("
    ");q.prepend(p.join(""));Fai.top.Fai.setCtrlStyleCssList("styleWebSite","",[{cls:"#bannerV2 .fk-inBannerListZone",key:"width",value:t+"px"},{cls:"#bannerV2 .fk-inBannerListZone",key:"margin-left",value:"-"+t/2+"px"}]);v.each(function(x,y){var z=c(this).parent();if(z.hasClass("fk-inBannerListZone-tmp")){if(parseInt(c(this).attr("_sys"))===0){Fai.top.$("#fk-inBannerListZone").append(c(this))}}});if(Fai.top._manageMode){e.sortable();jzUtils.run({name:"_elemZone.sortModuleZone",base:Fai.top})}}}function k(){if(Fai.top._bannerV2Data.ble.t===0&&!Fai.top._bannerData.h){l()}}function l(){var o=Fai.top.$("#webBanner");var t=Fai.top.$("#bannerV2");var w=t.width();var y=t.height();var p=t.find(".J_bannerItem");var q;var s;if(!t.find(".J_specialEffects").length){q='
    ';t.append(q)}var r=t.find(".J_specialEffects");switch(Fai.top._bannerV2Data.ble.at){case 0:r.remove();break;case 1:r.find(":not(.snow-canvas)").remove();if(!r.find(".snow-canvas").length){var n='';r[0].innerHTML=n;t.find(".snow-canvas").faiSnow()}break;case 2:r.find(":not(.meteor-canvas)").remove();if(!r.find(".meteor-canvas").length){r.faiMeteor({width:w,height:y})}break;case 3:r.find(":not(.fireworks-canvas)").remove();if(!r.find(".fireworks-canvas").length){r.faiFireworks({width:w,height:y})}break;case 4:r.remove();function u(){var A=document.createElement("canvas");var B=A.getContext("webgl")||A.getContext("experimental-webgl");var z=B&&B.getExtension("OES_texture_float")&&B.getExtension("OES_texture_float_linear");return z}if(u){p.css("width",p.width());function v(){var z=Math.random()*p.outerWidth();var C=Math.random()*p.outerHeight();var A=20;var B=0.04+Math.random()*0.04;p.faiRipples("drop",z,C,A,B);s=setTimeout(function(){v()},400)}p.faiRipples({resolution:512,dropRadius:20,perturbance:0.04});clearTimeout(s);v()}break;case 5:case 6:r.remove();var p=t.find(".J_bannerItem");var x=Fai.top._bannerV2Data.ble.at===5?0:1;if(p.length){p.each(function(A,B){var z=c(this).css("background-image");var C=/^url\((['"]?)(.*)\1\)$/.exec(z);var D=c("");c(this).css("background-image","none");C=C?C[2]:"";c(this).append(D);D[0].onload=function(){D.faiRainyDay({rainyEffect:x});D[0].onload=null;if(Fai.top._bannerV2Data.s==1){p.find(".rainyday-canvas").css("z-index",-1)}else{if(Fai.top._bannerV2Data.s==0){p.find(".rainyday-canvas").css("z-index",1)}}};D[0].crossOrigin="Anonymous";D[0].src=C})}break;default:break}}function g(r){var q=r.backgroundType;var o=r.backgroundColor;var n=r.backgroundOpacity;if(q==1){var p=Fai.hexadecimalToRgb(o);if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background",""+o+" !important")}else{Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background","rgba("+p+", "+n/100+") !important")}Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBanner","background","none !important")}else{if(q==0){Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background","none !important");Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBanner","background","none !important")}}}function h(o){var n=o;var p=Fai.top._bannerV2Data.blw.t==1||(Fai.top._bannerV2Data.blw.t==0&&Fai.top._wideBanner);if(n._open&&p){c(window).resize(function(q){if(!q.target.nodeType||q.target.nodeType==9){setTimeout(function(){a(0)},500)}})}}i.refreshBanner=function(r){var n=Fai.top.$("#webBanner");var p=Fai.top.$("#bannerV2");var q=Fai.top._bannerV2Data.blw.t;var o=Fai.top._bannerV2Data.blh.t;var t;var x;var s;if(!p.length){return}if(Fai.top._bannerData.h){p.css("display","none");return}else{p.css("display","block")}if(Fai.top._bannerV2Data.s==1&&Fai.top._bannerV2Data.bl.length==0){Fai.top._bannerV2Data.s=0}if(Fai.top._bannerV2Data.s==0){if(q===0){t=parseInt(p.attr("defaultwidth"));n.css("width","");s=m}else{if(q===1){n.css("width","100%");s=m}else{if(q===2){t=Fai.top._bannerV2Data.blw.w;n.css("width",t)}}}var u=[];var v=p.find("#fk-inBannerListZone .form");v.each(function(y,z){var B=c(this).parent();if(B.hasClass("fk-inBannerListZone")){var A=B.attr("_sys");c(this).attr("_sys",A);Fai.top.$(".fk-inBannerListZone-tmp").append(c(this))}});u.push("
    ");u.push("
    ");u.push("
    ");u.push("
    ");p.removeAttr("style");p.children().remove();p.append(u.join(""));if(Fai.top._bannerV2Data.bla===0){p.find(".banner").css("background-size","cover")}else{p.find(".banner").css("background-size","")}if(o==1){x=Fai.top._bannerV2Data.blh.h;p.css("height",x);p.find(".banner").css("height",x)}var w=Fai.top.$(".fk-inBannerListZone-tmp").find(".form");w.each(function(y,z){var A=c(this).parent();if(A.hasClass("fk-inBannerListZone-tmp")){if(parseInt(c(this).attr("_sys"))===0){Fai.top.$("#fk-inBannerListZone").append(c(this))}}});if(Fai.top._manageMode){e.sortable();jzUtils.run({name:"_elemZone.sortModuleZone",base:Fai.top})}k()}else{if(Fai.top._bannerV2Data.s==1){if(q===0){n.css("width","")}else{if(q===1){n.css("width","100%")}else{if(q===2){t=Fai.top._bannerV2Data.blw.w;n.css("width",t)}}}a(r)}}jzUtils.run({name:"_elemZone.selectToolOneZone",base:Fai.top},Fai.top.$(".fk-inBannerListZone"))};function a(q){var t=0;var w=0;var u=[];var r=[];var s=[];var n=Fai.top.$("#webBanner");var p=Fai.top.$("#bannerV2");var o=Fai.top._bannerV2Data.blw.t;if(Fai.top._bannerV2Data.blh.t==1&&typeof Fai.top._bannerV2Data.blh.h!="undefined"){w=Fai.top._bannerV2Data.blh.h}else{w=parseInt(Fai.top._bannerV2Data.bl[0].h);if(w<200){w=200}else{if(w>1000){w=1000}}}var v=p.find(".fk-inBannerListZone .form");v.each(function(x,y){var B=c(this).parent();if(B.hasClass("fk-inBannerListZone")){var z=B.attr("_banid");var A=B.attr("_sys");c(this).attr("_banId",z);c(this).attr("_sys",A);Fai.top.$(".fk-inBannerListZone-tmp").append(c(this))}});c.each(Fai.top._bannerV2Data.bl,function(z,B){var y=parseInt(B.h);var A=parseInt(B.w);if(t12&&x.substring(0,10)=="javascript"){u.push({src:B.p,href:"javascript:;",onclick:x.substring(11)+"return false;",ot:B.ot,imgWidth:A,imgHeight:y,i:B.i})}else{u.push({src:B.p,href:x,ot:B.ot,imgWidth:A,imgHeight:y,i:B.i})}}else{u.push({src:B.p,imgWidth:A,imgHeight:y,i:B.i})}r.push(A);s.push(y)});if(o===2){t=Fai.top._bannerV2Data.blw.w}p.css("background","none");p.children(":not(.J_specialEffects)").remove();p.css("height",w+"px");p.bannerImageSwitch({data:u,index:q,width:t,height:w,from:"banner",playTime:Fai.top._bannerV2Data.i,animateTime:Fai.top._bannerV2Data.a,btnType:Fai.top._bannerV2Data.bt,wideScreen:true});i.adjustBannerWidth();k()}i.adjustBannerWidth=function(){var q=Fai.top.$("#bannerV2");var s=Fai.top.$("#webBanner").width();var o=q.find(".switchGroup");var p=Fai.top._manageMode?Fai.getScrollWidth():0;var r=Fai.top.$(window).width()>Fai.top.$("#web").width()?Fai.top.$(window).width():Fai.top.$("#web").width();var t=Fai.top._bannerV2Data.bla==0?true:false;var n=Fai.top._bannerV2Data.at==0?true:false;if(t&&(Fai.top._bannerV2Data.blw.t==1||(Fai.top._bannerV2Data.blw.t==0&&Fai.top._wideBanner))){s=(s>r)?r-p:s;o.find(".J_bannerItem").each(function(u){if(s>=c(this).width()){c(this).css("width",s);c(this).parent().css("width",s);if(n&&Fai.top._bannerV2Data.bt===0){c(this).parent().css("left",-s*u+"px")}}})}};i.setBannerBg=function(){var n=Fai.top._bannerV2Data.bzb.c?Fai.top._bannerV2Data.bzb.c:"#000";var p=(typeof Fai.top._bannerV2Data.bzb.o=="undefined")?100:Fai.top._bannerV2Data.bzb.o;var o=Fai.hexadecimalToRgb(n);Fai.top._bannerV2Data.bzb.c=n;Fai.top._bannerV2Data.bzb.o=p;if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background",""+n+" !important")}else{Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background","rgba("+o+", "+p/100+") !important")}Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBanner","background","none !important")};i.hideBannerBg=function(){Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBannerTable","background","none !important");Fai.top.Fai.setCtrlStyleCss("styleBannerBg","",".webBanner","background","none !important")};i.startBannerInterval=function(){var n=0;if(Fai.intervalFunc!=b){n=Fai.intervalFunc.length}if(n>0){for(var q=0;q1&&e.checkbrowser%28%29&&fai.top._bannerv2data.at>0){e.bannerAnimate.autoPlay()}};i.stopBannerInterval=function(){var n=0;if(Fai.intervalFunc!=b){n=Fai.intervalFunc.length}if(n>0){for(var q=0;q1&&e.checkbrowser%28%29&&fai.top._bannerv2data.at>0){e.bannerAnimate.stop()}};i.stopBannerPropagation=function(){var n=Fai.top.$("#bannerV2").find(".fk-inBannerListZone");n.off("click.stopFormP").on("click.stopFormP",".form",function(r){var o=c(r.target).parentsUntil("#bannerV2",".J_bannerItem");var p=o.attr("href");var q=o.attr("target");o.attr("href","javascript:void(0);").attr("target","");r.stopPropagation();setTimeout(function(){o.attr("href",p).attr("target",q)},0)})}})(jQuery,Site,Site.bannerV2||(Site.bannerV2={}));Site.initForms=function(){$(".form").each(function(){var a=$(this),b=a.attr("_moduleid")||0;if(b>0){if(a.attr("_autoHeight")!="1"){Site.setModuleHeight2(b,a.height())}else{if(a.hasClass("formStyle29")){Site.setModuleHeight2(b,a.height())}}}})};Site.setModuleHeight2=function(n,m){var b=Fai.top.$("#module"+n);b.css("height",m+"px");if(b.hasClass("formStyle80")||b.hasClass("formStyle87")){return}var h=b.find(".formTop"+n);var l=b.find(".formBanner"+n);var k=b.find(".formMiddle"+n);var s=b.find(".formBottom"+n);var a=h.is(":visible")?h.outerHeight(true):0;var g=l.is(":visible")?l.outerHeight(true):0;var t=s.is(":visible")?s.outerHeight(true):0;var o=k.find(".formMiddleCenter"+n);var p=k.find(".formMiddleContent"+n);var u=m-a-g-t-Fai.getFrameHeight(k);k.css("height",u+"px");u=u-Fai.getFrameHeight(o);u=u-Fai.getFrameHeight(p);if(!b.hasClass("formStyle81")&&!b.hasClass("formStyle82")&&!b.hasClass("formStyle85")&&!b.hasClass("formStyle98")){if(u>0){p.css("height",u+"px");p.css("overflow-y","hidden")}}if(b.hasClass("formStyle29")){var q=b.find(".titleTable"),j=b.find(".formTabButtonList");if(q.length==1){var i=q.outerHeight(true);if(b.find(".formTabDirectionY").length>0){i=j.outerHeight(true)}var c=b.find(".formTabContent"+n);var e=u-i-Fai.getCssInt(c,"border-top-width")-Fai.getCssInt(c,"border-bottom-width");if(Fai.isIE6()){e+=1}c.css("height",e+"px");var d=b.find(".formTabCntId");d.css("height",e+"px")}}else{if(b.hasClass("formStyle79")){var r=b.attr("id").replace("module","");if(!Site.floatImgInContainerForms(r)){b.find("#float_img_"+n).css("height",u+"px")}}}};Site.refreshForms=function(){Site.refreshFormIndexClass();Site.displayAddModule();Fai.top.Fai.delayLoadImg(20)};Site.displayAddModule=function(){if(!Fai.top._designAuth){return}Site.addAddModuleButton(1);Site.addAddModuleButton(2);Site.addAddModuleButton(3);Site.addAddModuleButton(4);Site.addAddModuleButton(5);Site.addAddModuleButton(6);Site.addAddModuleButton(7);Site.addAddModuleButton(8);Site.addAddModuleButton(10);Site.addAddModuleButton(11);Site.addAddModuleButton(12);Site.addAddModuleButton(13);Site.addAddModuleButton(20);Site.addAddModuleButton(22);Site.addAddModuleButton(23);Site.addAddModuleButton(24);Site.addAddModuleButton(25);Site.addAddModuleButton(26);Site.addAddModuleButton(27);Site.addAddModuleButton(28)};Site.checkModuleInZone=function(a){return a.parent().hasClass("J_moduleZone")};Site.checkModuleInSubNav=function(a){return a.parents().hasClass("J_subNavPack")};Site.checkModuleInElemZone=function(a){return a.parent().hasClass("elemZone")};Site.checkFloatModulePosition=function(b){if(!b.length){return}var h=b.parent().attr("id");var d=b.offset().top,m=b[0].getBoundingClientRect().top;moduleTop=d-Fai.top.$("body").scrollTop();var c=b.offset().left;var i=b.height();var l=moduleTop+i;var k=0;var e=Fai.top.Fai.getBrowserHeight()-k;var a=Site.getModuleStatus(b.attr("id").replace("module",""));if(h=="floatLeftBottomForms"||h=="floatRightBottomForms"){var j=Fai.top.$("#web").offset().top;if(l>e){var g=e-i;if(a!=3){b.offset({left:c,top:j+Fai.top.Fai.getBrowserHeight()/2})}}if(l(j+Fai.top.Fai.getBrowserHeight())){b.offset({top:j+Fai.top.Fai.getBrowserHeight()/2-i})}if(l
    "+n+"
    "];b.animate({left:-o},{queue:false,duration:0});b.off("mouseenter.sideModule").on("mouseenter.sideModule",Site.bindSideIn1);b.off("mouseleave.sideModule").on("mouseleave.sideModule",Site.bindSideOut1)}else{if(t=="floatRightTopForms"||t=="floatRightBottomForms"){if(Fai.top._Global._webRightBar){h=Fai.getScrollWidth()+$(".fk-rbar").width();if(b.width()>10){b.data("_selfWidth",b.width())}if(b.attr("_moduleStyle")==7){b.find(".formWrap").css({"word-break":"keep-all","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"})}d=b.data("notInitState")||d}b.offset({top:w,left:p-o-h});i=0;k=["
    "+n+"
    "];if(Fai.top._Global._webRightBar){if(!d){b.animate({left:0},{queue:false,duration:0})}if(Fai.top._manageMode&&!s){b.css("overflow","visible");b.animate({left:-h+"px",width:0},{queue:false,duration:300})}else{if(Fai.top._manageMode&&s){b.animate({left:-h+"px"},{queue:false,duration:0})}else{b.animate({left:-$(".fk-rbar").width()+"px"},{queue:false,duration:500})}}}else{b.animate({left:0},{queue:false,duration:0})}b.off("mouseenter.sideModule").on("mouseenter.sideModule",Site.bindSideIn2);b.off("mouseleave.sideModule").on("mouseleave.sideModule",Site.bindSideOut2)}else{b.attr("_side",0)}}b.css("overflow","visible")}b.append(k.join(""));b.addClass("jz-moduleSide");if(!!b.find(".formMiddle").length){b.find(".formMiddle").addClass("jz-moduleSide-content")}var m=Fai.top.$("#"+l+"SideBtn");if(m.length>0){var v=m.width();var e=m.height();var r=parseInt((y-e)/2);if(i==0){m.css({top:r,left:-v-A})}else{m.css({top:r,left:o-A})}var q=m.position().top;var z=m.position().top+e;if(c==1){if(t=="floatLeftTopForms"||t=="floatRightTopForms"){if(z<=0){m.css({top:y-e})}}else{if(t=="floatLeftBottomForms"||t=="floatRightBottomForms"){if((q-a)>=0){m.css({top:0})}}}var g=m[0].getBoundingClientRect();if(g.top>a||g.bottom<0){m.css({top:0})}}}};Site.checkFlutterModule=function(b){var a=b.attr("_side");if(a==2){Site.flutterStart(b)}};var flutterCount=1000;Site.flutterInternel=function(d){var j=d.attr("_flutterSwitch");if(j=="true"){Site.stopFlutterInterval(d)}var n=1;var b=document.body.scrollTop;var h=document.body.scrollLeft;if(Fai.isIE8()||Fai.isIE7()||Fai.isIE10()||Fai.isIE9()||Fai.isIE11()){b=document.documentElement.scrollTop}var a=$("#g_main").offset().top+b;var e=0+h;var c=document.documentElement.clientWidth-d.width()+h;var i=document.documentElement.clientHeight-d.height()+b;if(Fai.isIE6()){c=document.body.clientWidth-d.width()}var m=d.data("flutterXPos");var g=d.data("flutterYPos");d.offset({left:m,top:g});var l=d.data("flutterXPos")+n*(d.data("flutterXon")?1:-1);d.data("flutterXPos",l);if(d.data("flutterXPos")<=e){d.data("flutterXon",true);d.data("flutterXPos",e)}if(d.data("flutterXPos")>=c){d.data("flutterXon",false);d.data("flutterXPos",c)}var k=d.data("flutterYPos")+n*(d.data("flutterYon")?1:-1);d.data("flutterYPos",k);if(d.data("flutterYPos")<=a){d.data("flutterYon",true);d.data("flutterYPos",a)}if(d.data("flutterYPos")>=i){d.data("flutterYon",false);d.data("flutterYPos",i)}};Site.stopFlutterInterval=function(a){Fai.stopInterval("flutter"+a.attr("id"))};Site.startFlutterInterval=function(b){var a=b.attr("_side");if(a!=2){return}if(b.attr("_edit")=="true"){return}Site.stopFlutterInterval(b);var d=function(){var g=b.attr("_side");var h=b.attr("_flutterSwitch");if(g==2){Site.flutterInternel(b)}else{Site.stopFlutterInterval(b)}};var e=10;var c="flutter"+b.attr("id");Fai.addInterval(c,d,e);Fai.startInterval(c)};Site.flutterStart=function(b,a){b.addClass("fk-flutterForm");var h=0;var g=document.body.scrollLeft;if(Fai.isIE6()){rightBoundary=document.body.clientWidth-b.width()}else{rightBoundary=document.documentElement.clientWidth-b.width()+g}if(b.offset().left>rightBoundary){b.offset({left:rightBoundary-b.outerWidth()})}else{if(b.offset().left+b.width()<0){b.offset({left:0})}}var i=b.position().left;var c=b.position().top;var j=b.data("toFlutterFlag");var l=b.attr("_flutterSwitch");if(!j){b.data("startFlutterXPos",i);b.data("startFlutterYPos",c)}else{var k=b.data("startFlutterXPos");var d=b.data("startFlutterYPos");if(!k&&!d){b.data("startFlutterXPos",i);b.data("startFlutterYPos",c)}}var m=b.data("startFlutterParentId");if(!m){b.data("startFlutterParentId",b.parent().attr("id"))}b.data("flutterXPos",b.offset().left);b.data("flutterYPos",b.offset().top);b.data("flutterXon",true);b.data("flutterYon",true);var e=b.attr("_side");if(_manageMode==true&&e==2&&!a){b.attr("_flutterSwitch",true)}var l=b.attr("_flutterSwitch");if(l=="false"||!l){Site.startFlutterInterval(b)}b.on("mouseenter",function(){Site.stopFlutterInterval($(this))});b.on("mouseleave",function(){var n=$(this).attr("_flutterSwitch");if(n=="false"||!n){Site.startFlutterInterval($(this))}})};Site.bindSideIn1=function(b){var b=$(this);var c=b.attr("_side");var a=b.outerWidth();var d=b.parent().attr("id");if(Fai.top._manageMode){Site.disableEditLayer();if(-a==b.offset().left){jzUtils.run({name:"moduleAnimation.canRunAgain",base:Site})}b.animate({left:0},{queue:false,duration:500,complete:function(){Site.enableEditLayer();if(c==1){b.unbind("mouseenter.sideModule",Site.bindSideIn1).unbind("mouseleave.sideModule",Site.bindSideOut1).unbind("mouseenter.sideModule",Site.bindSideIn2).unbind("mouseleave.sideModule",Site.bindSideOut2)}jzUtils.run({name:"moduleAnimation.publish",base:Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Site})}})}else{if(-a==b.offset().left){jzUtils.run({name:"moduleAnimation.canRunAgain",base:Site})}b.animate({left:0},{queue:false,duration:500,complete:function(){jzUtils.run({name:"moduleAnimation.publish",base:Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Site})}})}$(b).find("img").trigger("appear")};Site.bindSideIn2=function(e){var e=$(this);var d=e.attr("_side");var h=e.outerWidth();var j=e.parent().attr("id");var n=Fai.top.Fai.getBrowserWidth();var k=0;var m=Fai.top.$("#"+e.attr("id")+"SideBtn");var l=m.width();var b=Fai.getCssInt(e,"border-left-width");var g=0;var c={left:-h};var i=0;var a=500;if(Fai.top._Global._webRightBar){g=$(".fk-rbar").width();k=Fai.getScrollWidth()+g;h=e.data("_selfWidth");if(e.attr("_moduleStyle")==7){e.find(".formWrap").css({"word-break":"keep-all","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"})}e.data("notInitState",true);c={left:-h-k,width:h};i=Fai.getScrollWidth();if(Fai.top._isTemplateVersion2&&Fai.top._manageMode){a=0}}e.find("img").trigger("appear");if(Fai.top._manageMode){Site.disableEditLayer();if(n==(e.offset().left+g+i)){jzUtils.run({name:"moduleAnimation.canRunAgain",base:Site})}e.animate(c,{queue:false,duration:a,complete:function(){Site.enableEditLayer();if(d==1){e.unbind("mouseenter.sideModule",Site.bindSideIn1).unbind("mouseleave.sideModule",Site.bindSideOut1).unbind("mouseenter.sideModule",Site.bindSideIn2).unbind("mouseleave.sideModule",Site.bindSideOut2)}jzUtils.run({name:"moduleAnimation.publish",base:Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Site})}})}else{if(n==e.offset().left){jzUtils.run({name:"moduleAnimation.canRunAgain",base:Site})}e.animate({left:-h-g},{queue:false,duration:500,complete:function(){jzUtils.run({name:"moduleAnimation.publish",base:Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Site})}})}};Site.bindSideOut1=function(b){var b=$(this);var c=b.attr("_side");var a=b.outerWidth();var d=b.parent().attr("id");b.animate({left:-a},{queue:false,duration:500})};Site.bindSideOut2=function(d){var d=$(this);var e=d.attr("_side");var b=d.outerWidth();var g=d.parent().attr("id");var a=0;var c=0;if(Fai.top._Global._webRightBar){a=Fai.getScrollWidth()+$(".fk-rbar").width();if(d.attr("_moduleStyle")==7){d.find(".formWrap").css({"word-break":"keep-all","white-space":"nowrap"})}c=$(".fk-rbar").width()}if(Fai.top._manageMode){d.animate({left:0-a},{queue:false,duration:500})}else{d.animate({left:-c},{queue:false,duration:500})}};Site.setAbsFormsHolder2=function(i){var a=0,g=0,k=0,h=Fai.top.$("#containerPlaceholder"),b=Fai.top.$("#g_main"),d=Fai.isIE6(),c=Fai.isIE7(),j=false,l,e;l=function(m){if(!Fai.top._manageMode&&!d&&!c){return m}var n=b.scrollTop();if(n<=0){return m}return m+n};Fai.top.$("#absForms >.form").each(function(){var m=$(this).offset().top+$(this).outerHeight();m=l(m);if(m>a){a=m}});Fai.top.$("#absTopForms >.form").each(function(){var m=$(this).offset().top+$(this).outerHeight();m=l(m);if(m>a){a=m}});g=Fai.top.$("#fullmeasureBottomForms").outerHeight();if(g>0){a=a-g;if(a<0){a=0}j=true}k=l(h.offset().top);if(j){if(a>k){e=a-k;if(e!==parseInt(h.height())){if(!Fai.top._manageMode&&Fai.top._colOtherStyleData.y>e){}else{h.css("height",e+"px");if(!i){Fai.top._colOtherStyleData.y=parseInt(e)}}}}else{if(a!=0&&(a-k)!==0){h.css("height","0");if(!i){Fai.top._colOtherStyleData.y=0}}else{if(Fai.top._colOtherStyleData.y>0&&ak){var e=a-k;if(e!==parseInt(h.height())){h.css("height",e+"px");Fai.top._colOtherStyleData.y=parseInt(e)}}else{if(a!=0&&(a-k)!==0){h.css("height","0px");Fai.top._colOtherStyleData.y=0}}}};Site.checkAbsModulePosition=function(c,a){var i=c.parent().attr("id");var g=c.offset().left;var d=c.offset().top;var e=c.height();var h=c.offset().top+e;if(i=="absTopForms"){var b=Fai.top.$("#web").offset().top;if(db){d=b-e;c.offset({top:d,left:g})}}else{var b=Site.getFooterBottom(true);if(d+e>b){d=b-e;c.offset({top:d,left:g})}}c.offset({top:d,left:g})}else{if(i=="absForms"){Site.setAbsFormsHolder2(a)}}}};Site.demoStyleDesignLoading=function(a,c){var b=$('
    ');b.appendTo("#"+a);$("#"+c).load(function(){$(".forWaiting").remove()})};Site._webToggleClass=function(a){if(a=="show"){$("html").removeClass("g_html").addClass("g_htmlManage");$("body").removeClass("g_body").addClass("g_bodyManage");$("#g_main").addClass("g_mainManage");$("#web").addClass("g_webManage")}};Site._demoTemplate=function(){var a=$("#siteTipsDemoTemplate");if(a.is(":visible")){document.location.reload()}else{a.show();Site._webToggleClass("show");if($("#topBarArea").length>0){$("#topBarArea").hide();$("#topBar").hide()}Site.demoStyleDesignLoading("siteTipsDemoTemplate","siteTipsDemoTemplateFrame");$("#siteTipsDemoTemplateFrame").attr("src","manage/styletemplate.jsp@demotemplate=true&ram"+Math.random());Site.resetGmainPos()}};Site.adjustFlBtnPos=function(b){var a=Fai.top.$("#module"+b);a.css({border:"10px solid transparent","margin-top":"-10px","margin-left":"-10px"});if(Fai.isIE6()){var c=a.attr("style");a.attr("style",c+"; _border-color:tomato; _filter:chroma(color=tomato)")}};Site.initFlBtnStyle=function(a){var h=a.moduleId,g=a.btnNumSystem,e=a.btnStyle,i="module"+h,b=Fai.top.$("#"+i);if(Fai.top._designAuth){Site.initManageFlBtnStyle(h,g,e)}else{var c=Fai.top.$(".mulMColContent");var d=b.find(".floatBtn")}};Site.setFlBtnParentColHide=function(){var a=Fai.top.$(".mulMColContent");if(a.length>0){a.each(function(){if($(this).find(".formStyle81").length>0){var b=$(this).attr("id");Fai.top.Fai.setCtrlStyleCss("stylemodule",b,".mulMColList","overflow","hidden")}})}};Site.initPhotoCard=function(b){var a=Fai.top.$("#module"+b);Site.resizePhotoCardHeight(a);Site.setPhotoCardHeight(a);Site.adjustPhotoCardImgSize(a);jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},Fai.top["photoCard"+b])};Site.setPhotoCardHeight=function(a){var b=a.find(".cardTd");b.each(function(){var e=$(this).height(),d=$(this).find(".photoCard"),c=d.height();if(c0){e(c)}}else{if(b==undefined){var c=Fai.top.$(".formStyle83");if(c.length>0){e(c)}}}}function e(g){c.each(function(){var i=$(this).attr("id").replace("module",""),h=$(this).find(".photoCardOuter"),j=h.attr("cusHeight");if(j){return true}Site.initPhotoCard(i);$(this).attr("_autoheight",0)})}};Site.addPhotoCardModuleHeight=function(b){var h=Fai.top.$("#module"+b),a=h.find(".photoCardOuter"),g=h.find(".photoCard"),c=h.width(),j=h.height(),i=c/960,k=a.attr("cusHeight"),e=a.height(),d=j*i;if(k){d=e}h.css("height",d+"px");Site.initPhotoCard(b);Site.scrollToModuleDiv(h);Site.getModuleAttrPattern(b).changed=true;h.attr("_autoheight",0)};Site.initPhotoNewCard=function(b){var a=Fai.top.$("#module"+b);Site.resizePhotoNewCardHeight(a);Site.setPhotoNewCardHeight(a);Site.adjustPhotoNewCardImgSize(a);jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},Fai.top["photoNewCard"+b])};Site.setPhotoNewCardHeight=function(a){var b=a.find(".cardTd");b.each(function(){var c=$(this).height(),e=$(this).find(".photoNewCard"),d=e.height();if(d0){c(e)}}else{if(b==undefined){var e=Fai.top.$(".formStyle85");if(e.length>0){c(e)}}}}function c(g){e.each(function(){var i=$(this).attr("id").replace("module",""),h=$(this).find(".photoNewCardOuter"),j=h.attr("cusHeight");if(j){return true}Site.initPhotoNewCard(i);$(this).attr("_autoheight",1)})}};Site.addPhotoNewCardModuleHeight=function(a){var d=Fai.top.$("#module"+a),i=d.find(".formBanner").height(),e=d.find(".photoNewCardOuter"),c=d.find(".photoNewCard"),m=d.width(),h=d.height(),k=m/960,l=e.attr("cusHeight"),j=e.height(),b=h*k;if(l){b=j}var g=(d.find(".newCardDrag").length)/2;d.css("height",b*g+"px");Site.initPhotoNewCard(a);Site.scrollToModuleDiv(d);Site.getModuleAttrPattern(a).changed=true;d.attr("_autoheight",0)};Site.hideDrag=function(a){$("#module"+a).find(".photoNewCardTable").find(".drag").each(function(){$(this).css("display","none")})};Site.initPhotoMoreCard=function(b,c){var a=Fai.top.$("#module"+b);Site.resizePhotoMoreCardHeight(a,c);Site.setPhotoMoreCardHeight(a);Site.adjustPhotoMoreCardImgSize(a);jzUtils.run({name:"imageeffect.func.basic.init",callMethod:true},Fai.top["photoMoreCard"+b])};Site.setPhotoMoreCardHeight=function(a){var b=a.find(".moreCardTd");b.each(function(){var g=$(this).height(),c=$(this).width(),h=$(this).find(".photoMoreCard"),i=h.height(),e=h.width(),d=parseInt(h.css("borderTopWidth").replace("px","")||0);if(i>=g){h.css("height",g-2*d+"px")}if(e>=c){h.css("width",c-2*d+"px")}if(h.attr("photoname")=="noPhoto"){h.css("border","2px dashed #d4d4d4")}})};Site.adjustPhotoMoreCardImgSize=function(a){var c=a.attr("id").replace("module",""),b=a.find(".photoMoreCard"),d=a.find(".cardDivEffect .cardImg");Site.setPhotoMoreCardHeight(a);b.each(function(){var p=$(this).find(".cardImgView"),m=$(this).find(".cardDivEffect"),n=$(this).height();if(p.length<1){return true}var l=p.width(),h=p.height(),e=$(this).width(),j,o,g=l,k=h,i=m.attr("tmpPic");imgOrProp=g/k;if(e/n<=imgOrProp){p.css("width","");p.css("height",n+"px");j=$(this).width();o=p.width();m.css("marginTop","");m.css("marginLeft",((j-o)/2)+"px")}else{p.css("height","");p.css("width",e+"px");j=$(this).height();o=p.height();m.css("marginLeft","");m.css("marginTop",((j-o)/2)+"px")}p.removeClass("cardImgViewHide")});d.load(function(){var q=$(this),n=q.parents(".cardDiv"),i=q.parents(".photoMoreCard"),o=i.height();var m=q.width(),g=q.height(),e=i.width(),l,p,k,j=m/g,h=n.attr("tmpPic");if(e/o<=j){q.css("width","");q.css("height",o+"px");l=i.width();p=q.width();k=(l-p)/2;n.css("marginTop","");n.css("marginLeft",k+"px")}else{q.css("height","");q.css("width",e+"px");l=i.height();p=q.height();k=(l-p)/2;n.css("marginLeft","");n.css("marginTop",k+"px")}})};Site.resizePhotoMoreCardHeight=function(b,d){var q=b.find(".photoMoreCardTable"),r=b.find(".formMiddleContent"),c=b.find(".photoMoreCardOuter"),e=b.find(".photoMoreCardInner"),n=q.find(".moreCardDrag"),j=b.find(".moreCardTd"),l=1,i=1,k=false,g=c.attr("cusHeight"),h=n.length,a=b.width(),o=b.height(),p=parseInt((r.css("marginTop")||"0").replace("px",""));formMiddleContentMB=parseInt((r.css("marginBottom")||"0").replace("px",""));photoMoreCardInnerMT=parseInt((e.css("marginTop")||"0").replace("px",""));photoMoreCardInnerMB=parseInt((e.css("marginBottom")||"0").replace("px",""));cellspacing=parseInt(q.attr("cellspacing"));if(g){o=c.height();p=0;formMiddleContentMB=0}var m=o-p-formMiddleContentMB-photoMoreCardInnerMT-photoMoreCardInnerMB-(2*cellspacing);if(d!=null){b.find(".moreCardDrag").each(function(t,u){var s=parseInt($(this).attr("num"));if(t==0){l=(a-((2+s)*cellspacing))/(d-((2+s)*cellspacing))}else{i=(a-((2+s)*cellspacing))/(d-((2+s)*cellspacing));return false}});k=true}j.each(function(){var u=$(this).find(".photoMoreCard"),t=parseInt($(this).attr("rowspan")),v=$(this).width(),s=Math.floor((m-(h-1)*cellspacing)/h)||"";$(this).css("padding-top",cellspacing+"px");$(this).css("padding-left",cellspacing+"px");if(k){if($(this).parents(".moreCardDrag").attr("tr")==0){$(this).css("width",v*l+"px");u.css("width",v*l+"px")}else{$(this).css("width",v*i+"px");u.css("width",v*i+"px")}}});Site.resizePhotoMoreCartShape(b)};Site.resizePhotoMoreCartShape=function(c){var r=c.find(".photoMoreCardTable"),j=c.find(".photoMoreCardOuter"),o=c.find(".moreCardDrag"),m=c.find(".moreCardTd"),b=parseInt(r.attr("cellspacing")),u=parseInt(c.find(".photoMoreCardInner").attr("cardstyle"))||0;var o=c.find(".moreCardDrag"),t=o.length,p=t/2,d=c.height()-(t+1)*b,a=d/(p),i,n,s,h,e,m;var l=0;o.each(function(w,x){var v=$(this).find(".noPhoto");var y=v.length>0;if(y){k($(this),v)}l+=$(this).find(".moreCardTd").last().height()});function k(x,v){var w=v.first().prev();if(w.length>0&&w.attr("rowspan")!="2"){x.find(".noPhoto, .noPhoto .photoMoreCard").css("height",w.height());return}if(w.length>0&&w.attr("rowspan")=="2"){x.find(".noPhoto, .noPhoto .photoMoreCard").css("height",(w.height()-u)/2);return}if(w.length==0){var y=x.prev().find(".moreCardTd").last().height();x.find(".noPhoto, .noPhoto .photoMoreCard").css("height",a-y)}}var q=[];c.find(".moreCardTd").each(function(){var v=$(this).height();if($(this).attr("rowspan")=="2"){q.push($(this))}else{$(this).css("height",Math.floor(d*v/l));$(this).find(".photoMoreCard").css("height",Math.floor(d*v/l))}});$.each(q,function(w,y){if(y.attr("rowspan")=="2"){var x=y.next().height();var v=y.parent().next().find(".moreCardTd").first().height();y.css("height",Math.floor(x+v+b));y.find(".photoMoreCard").css("height",Math.floor(x+v+b))}});g();function g(){o.each(function(){var w=$(this).find(".noPhoto");if(w.length<1){return true}var v=$(this).children(),x=v.first();if(!x.hasClass("noPhoto")&&x.attr("rowspan")!="2"){v.css("height",x.height())}})}};Site.adjustPhotoMoreCard=function(d){if(Fai.isNumber(d)){var b=Fai.top.$("#module"+d);if(b.hasClass("formStyle98")&&!b.find(".photoMoreCardOuter").attr("cusHeight")){Site.initPhotoMoreCard(d);b.attr("_autoheight",0)}}else{if(typeof d=="object"){var e=d;var c=e.find(".formStyle98");if(c.length>0){a(c)}}else{if(d==undefined){var c=Fai.top.$(".formStyle98");if(c.length>0){a(c)}}}}function a(g){c.each(function(){var i=$(this).attr("id").replace("module",""),h=$(this).find(".photoMoreCardOuter"),k=h.attr("cusHeight"),j=parseInt($(this).data("contentWidth"))||undefined;if(k){return true}Site.initPhotoMoreCard(i,j);$(this).attr("_autoheight",1)})}};Site.photoMoreCardHideDrag=function(a){$("#module"+a).find(".photoMoreCardTable").find(".drag").each(function(){$(this).css("display","none")})};Site.initPhotoMoreCardTdLength=function(d,b){var a=$("#module"+d),c=a.find(".photoMoreCardTable"),e=parseInt(c.attr("cellspacing"));a.data("photoStyleId",b);if(b==0){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",2)}})}else{if(b==1){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",2)}else{$(this).attr("num",1)}})}else{if(b==2){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",2)}else{$(this).attr("num",2)}})}else{if(b==3){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",2)}})}else{if(b==4){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",2)}})}else{if(b==5){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",2)}else{$(this).attr("num",1)}})}else{if(b==6){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",3)}else{$(this).attr("num",2)}})}else{if(b==7){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",2)}else{$(this).attr("num",1)}})}else{if(b==8){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",2)}})}else{if(b==9){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",0)}})}else{if(b==10){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",0)}else{$(this).attr("num",1)}})}else{if(b==11){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",1)}else{$(this).attr("num",1)}})}else{if(b==12){a.find(".moreCardDrag").each(function(h,j){var g=$(this).attr("num");if(g==0){$(this).attr("num",2)}else{$(this).attr("num",2)}})}}}}}}}}}}}}}};Site.firstPhotoMoreCardInit=function(b,p){var c=$("#module"+b),q=c.find(".photoMoreCardTable"),h=parseInt(q.attr("cellspacing")),o=c.width(),k=c.height(),g;c.data("photoStyleId",p);if(p==0){var g=Math.ceil(c.find(".moreCardTd").length/4),m=(o-3*h)*0.35,l=(o-3*h)*0.65,e=(o-4*h-m)*0.5,n=e,a=(k-(g+1)*h)/g,j=(a-h)/2,i=j,d=i;c.find(".moreCardTd").each(function(r,s){r=r%4;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}}}}})}else{if(p==1){var g=Math.ceil(c.find(".moreCardTd").length/4);m=(o-3*h)*0.35,l=(o-4*h-m)*0.5,e=l,n=(o-3*h)*0.65,a=(k-(g+1)*h)/g,j=(a-h)/2,i=j,d=i;c.find(".moreCardTd").each(function(r,s){r=r%4;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}}}}})}else{if(p==2){var g=Math.ceil(c.find(".moreCardTd").length/5);m=(o-4*h)*0.35,l=(o-4*h-m)*0.5,e=l,n=e,fifthWidth=n,a=(k-(g+1)*h)/g,j=(a-h)/2,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==3){var g=Math.ceil(c.find(".moreCardTd").length/5);m=(o-3*h)*0.35,l=(o-3*h)*0.65,e=m,n=(o-4*h-m)*0.5,fifthWidth=n,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==4){var g=Math.ceil(c.find(".moreCardTd").length/5);m=(o-3*h)*0.65,l=(o-3*h)*0.35,e=(o-4*h-l)*0.5,n=e,fifthWidth=l,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==5){var g=Math.ceil(c.find(".moreCardTd").length/5);n=(o-3*h)*0.65,fifthWidth=(o-3*h)*0.35,m=(o-4*h-fifthWidth)*0.5,l=m,e=(o-4*h)*0.35,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==6){var g=Math.ceil(c.find(".moreCardTd").length/7);m=(o-5*h)*0.25,l=m,e=l,n=e,fifthWidth=m*2+h,sixthWidth=n,seventhWidth=sixthWidth,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;sixthHeight=fifthHeight,seventhHeight=sixthHeight;c.find(".moreCardTd").each(function(r,s){r=r%7;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}else{if(r==5){$(this).css("width",sixthWidth+"px");$(this).css("height",sixthHeight+"px")}else{if(r==6){$(this).css("width",seventhWidth+"px");$(this).css("height",seventhHeight+"px")}}}}}}}})}else{if(p==7){var g=Math.ceil(c.find(".moreCardTd").length/5);m=(o-4*h)*0.33,l=(o-4*h)*0.34,e=m,n=(o-3*h)*0.5,fifthWidth=n,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==8){var g=Math.ceil(c.find(".moreCardTd").length/5);m=(o-3*h)*0.5,l=m,e=(o-4*h)*0.33,n=(o-4*h)*0.34,fifthWidth=e,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;c.find(".moreCardTd").each(function(r,s){r=r%5;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}}}}}})}else{if(p==9){var g=Math.ceil(c.find(".moreCardTd").length/3);m=(o-3*h)*0.5,l=m,e=(o-2*h)*1,a=((k-(g+1)*h)/g-h)/2,j=a,i=j;c.find(".moreCardTd").each(function(r,s){r=r%3;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}}}})}else{if(p==10){var g=Math.ceil(c.find(".moreCardTd").length/3);m=(o-2*h)*1,l=(o-3*h)*0.5,e=l,a=((k-(g+1)*h)/g-h)/2,j=a,i=j;c.find(".moreCardTd").each(function(r,s){r=r%3;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}}}})}else{if(p==11){var g=Math.ceil(c.find(".moreCardTd").length/4);m=(o-3*h)*0.65,l=(o-3*h)*0.35,e=l,n=m,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i;c.find(".moreCardTd").each(function(r,s){r=r%4;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}}}}})}else{if(p==12){var g=Math.ceil(c.find(".moreCardTd").length/6);m=(o-4*h)*0.43,l=(o-4*h)*0.34,e=(o-4*h)*0.23,n=e,fifthWidth=l,sixthWidth=m,a=((k-(g+1)*h)/g-h)/2,j=a,i=j,d=i,fifthHeight=d;sixthHeight=fifthHeight;c.find(".moreCardTd").each(function(r,s){r=r%6;if(r==0){$(this).css("width",m+"px");$(this).css("height",a+"px")}else{if(r==1){$(this).css("width",l+"px");$(this).css("height",j+"px")}else{if(r==2){$(this).css("width",e+"px");$(this).css("height",i+"px")}else{if(r==3){$(this).css("width",n+"px");$(this).css("height",d+"px")}else{if(r==4){$(this).css("width",fifthWidth+"px");$(this).css("height",fifthHeight+"px")}else{if(r==5){$(this).css("width",sixthWidth+"px");$(this).css("height",sixthHeight+"px")}}}}}}})}}}}}}}}}}}}}Site.adjustPhotoMoreCardImgSize(c)};Site.nophotoMoreCardInit=function(a,m){var b=$("#module"+a),n=b.find(".photoMoreCardTable"),e=parseInt(n.attr("cellspacing")),l=b.width(),g=b.height(),c;if(m==0){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=b.find(".moreCardTd").eq(d-1).width();i=b.find(".moreCardTd").eq(d-2).width()-k-e;b.find(".noPhoto").eq(0).css("width",i+"px")}else{if(j==2){k=b.find(".moreCardTd").eq(d-1).width();i=(k-e)/2;h=i;b.find(".noPhoto").eq(0).css("width",i+"px");b.find(".noPhoto").eq(1).css("width",h+"px")}else{if(j==3){k=b.find(".moreCardTd").eq(d-1).width();i=l-k-3*e;h=(l-k-4*e)/2;b.find(".noPhoto").eq(0).css("width",i+"px");b.find(".noPhoto").eq(1).css("width",h+"px");b.find(".noPhoto").eq(2).css("width",h+"px")}}}}else{if(m==1){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=b.find(".moreCardTd").eq(d-1).width();i=b.find(".moreCardTd").eq(d-2).width()+k+e;b.find(".noPhoto").eq(0).css("width",i+"px")}else{if(j==2){k=b.find(".moreCardTd").eq(d-2).width();i=l-3*e-k;h=i-b.find(".moreCardTd").eq(d-1).width()-e;b.find(".noPhoto").eq(0).css("width",h+"px");b.find(".noPhoto").eq(1).css("width",i+"px")}else{if(j==3){k=b.find(".moreCardTd").eq(d-1).width();i=l-k-3*e;h=(l-k-4*e)/2;b.find(".noPhoto").eq(0).css("width",h+"px");b.find(".noPhoto").eq(1).css("width",h+"px");b.find(".noPhoto").eq(2).css("width",i+"px")}}}}else{if(m==2){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=b.find(".moreCardTd").eq(d-4).width();i=l-b.find(".moreCardTd").eq(d-1).width()-k-4*e;b.find(".noPhoto").eq(0).css("width",i+"px")}else{if(j==2){k=b.find(".moreCardTd").eq(d-3).width();i=(l-4*e-k)/2;b.find(".noPhoto").eq(0).css("width",i+"px");b.find(".noPhoto").eq(1).css("width",i+"px")}else{if(j==3){k=b.find(".moreCardTd").eq(d-2).width();i=l-b.find(".moreCardTd").eq(d-1).width()-k-4*e;h=(l-k-4*e)/2;b.find(".noPhoto").eq(0).css("width",i+"px");b.find(".noPhoto").eq(1).css("width",h+"px");b.find(".noPhoto").eq(2).css("width",h+"px")}else{if(j==4){k=b.find(".moreCardTd").eq(d-1).width();i=(l-4*e-k)/2;b.find(".noPhoto").eq(0).css("width",i+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==3){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px")}else{if(j==4){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==4){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px")}else{if(j==4){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==5){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;i=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px")}else{if(j==4){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;i=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==6){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px")}else{if(j==4){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-b.find(".moreCardTd").eq(d-3).width()-5*e;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}else{if(j==5){k=(l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-5*e)/2;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px");b.find(".noPhoto").eq(4).css("width",i+"px")}else{if(j==6){k=(l-b.find(".moreCardTd").eq(d-1).width()-5*e)/3;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px");b.find(".noPhoto").eq(3).css("width",i+"px");b.find(".noPhoto").eq(4).css("width",i+"px");b.find(".noPhoto").eq(5).css("width",i+"px")}}}}}}}else{if(m==7){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;i=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px")}else{if(j==4){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;i=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==8){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px")}else{if(j==4){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}}}}}else{if(m==9){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-2*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;i=l-2*e;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px")}}}else{if(m==10){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}}}else{if(m==11){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=l-b.find(".moreCardTd").eq(d-1).width()-3*e;i=(l-3*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px")}}}}else{if(m==12){var k,i,h,j=b.find(".noPhoto").length,d=b.find(".noPhoto").eq(0).attr("number");if(j==1){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;b.find(".noPhoto").eq(0).css("width",k+"px")}else{if(j==2){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px")}else{if(j==3){k=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",k+"px")}else{if(j==4){k=l-b.find(".moreCardTd").eq(d-1).width()-b.find(".moreCardTd").eq(d-2).width()-4*e;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",i+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px")}else{if(j==5){k=(l-b.find(".moreCardTd").eq(d-1).width()-4*e)/2;i=(l-4*e)/3;b.find(".noPhoto").eq(0).css("width",k+"px");b.find(".noPhoto").eq(1).css("width",k+"px");b.find(".noPhoto").eq(2).css("width",i+"px");b.find(".noPhoto").eq(3).css("width",i+"px");b.find(".noPhoto").eq(4).css("width",i+"px")}}}}}}}}}}}}}}}}}}Site.adjustPhotoMoreCardImgSize(b)};Site.initSimpleTextContent=function(d,c){var b=Fai.top.$("#module"+d),a;if(c!=1){if(b.is(":visible")){b.css("height","auto");b.css("height",b.height())}else{a=b.clone();a.attr("id","").css({position:"absolute",visibility:"hidden",height:"auto"}).appendTo(Fai.top.$("body"));b.css("height",a.height());a.remove()}}};(function(i,e,g){var b={},m="fullmeasureOuterContentPage",h=false,l=false,c=false,k=false,a=0,j=0;var d=[];i(function(){var p=i(".formStyle80");setTimeout(function(){l=true;if(d.length>0||Fai.top._manageMode){i("body").off("mousemove.fmGmainMousemove").on("mousemove.fmGmainMousemove",function(q){if(Fai.top._manageMode){if(i(".popupBg").length>0){if(!k){k=true;a=0;var x=i(".formStyle80");if(x.length>0){x.each(function(y,B){var A=i(B).attr("id");if(typeof(A)!=g){i("#module"+A.replace("module","")).data("mouseenter",false)}})}}}else{k=false}}if(d.length>0){if(c){return}c=true;a=0;var v=q||window.event;var w=v.clientY;var t=false;for(var u=0;u=r&&w<=(z+r)){a=d[u];t=true;break}}if(!t){a=0}c=false}})}if(Fai.top._manageMode){i("body").off("click.fmGmainClick").on("click.fmGmainClick",function(){if(j==0){return}if(j!=a){if(i("#faiFloatPanel").css("display")!="block"){j=0}}})}},1500);if(p.length>0||Fai.top._manageMode){p.each(function(q,r){var s=i(r).attr("id");if(typeof(s)!=g){e.refFillRelativeDivHeight(s.replace("module",""),true)}});if(Fai.top._colId==8){setTimeout(function(){p.each(function(q,r){var s=i(r).attr("id");if(typeof(s)!=g){e.refFillRelativeDivHeight(s.replace("module",""),true)}})},2500)}setTimeout(function(){h=true;p.each(function(q,s){var r=i(s).attr("id");if(typeof(r)!=g){r=r.replace("module","");e.refFillRelativeDivHeight(r,true);e.dynamicSetArrowDom(r)}})},1000);i(window).resize(function(){var q=i(".formStyle80");q.each(function(r,u){var t=i(u).attr("fmslidestyle");var s=i(u).attr("id");if(typeof s!=g){s=s.replace("module","");e.buildFmSlideStyleDom(s,t)}})})}});e.fmAddModuleStopCarousel=function(r){if(typeof(r)==g){return}if(Fai.top._manageMode){var p=i("#module"+r);if(!p.hasClass("formStyle80")){var q=Site.checkNestModule(p);if(q.inFullmeasure){r=q.parentId}}}setTimeout(function(){j=r},500)};e.setFmCarouselIdList=function(s,r){var p=false;for(var q=(d.length-1);q>=0;q--){if(d[q]==s){if(r!=1){d.splice(q,1)}p=true;break}}if(!p){if(r==1){d[d.length]=s}}};function o(s,q,p,r){e.setModuleFmSlideStyleAndPage(s,q,p,r);e.clearAnimate(s);e.bindModuleEvent(s);e.refFillRelativeDivHeight(s)}e.setModuleFmSlideStyleAndPage=function(s,q,p,r){if(typeof(s)==g||typeof(q)==g||typeof(p)==g){return}i("#module"+s).attr("fmSlideStyle",q);i("#module"+s).attr("fmPage",p);i("#module"+s).attr("isCarousel",r.c);i("#module"+s).attr("displayTime",r.d);i("#module"+s).attr("carouselSpeed",r.s);e.buildFmSlideStyleDom(s,q);e.setFmCarouselIdList(s,r.c);n(s)};e.clearAnimate=function(q){if(q in b){var p=b[q];if("animateCt" in p){clearInterval(p.animateCt)}if("animateSlide" in p){clearInterval(p.animateSlide)}}};e.bindModuleEvent=function(q){var p=i("#module"+q);p.off("mouseenter.fullmeasureAnimate").on("mouseenter.fullmeasureAnimate",function(){i(this).data("mouseenter",true)});p.off("mouseleave.fullmeasureAnimate").on("mouseleave.fullmeasureAnimate",function(){i(this).data("mouseenter",false)})};e.refFillRelativeDivHeight=function(p,v){if(typeof(p)==g){return}var r=i("#module"+p);var y=0,q=0;if(r.find(".fullmeasureContent").length>0){var s=r.find(".J_fullmeasurePageShow .fullmeasureOuterContent").clone();var t=false;r.prepend("");if(typeof(s)!=g&&s!=null){s.each(function(A,B){i(B).find("input").removeAttr("name");r.find(".J_fullmeasureGetMaxHeight").html(i(B));if(r.find(".J_fullmeasureGetMaxHeight").find(".fullmeasureContent").children(".form").length<=0){var C=r.find(".J_fullmeasureGetMaxHeight").innerHeight();var z=r.find(".J_fullmeasureGetMaxHeight").height();if(z>0){t=true}if(C>q){q=C}return true}var z=r.find(".J_fullmeasureGetMaxHeight").height();if(z>y){y=z}})}r.find(".J_fullmeasureGetMaxHeight").remove();var x=r.find(".J_fullmeasurePageShow").find(".fullmeasureOuterContentBg");x.each(function(z,B){var A=i(B).css("background");if(typeof(A)!=g&&A.indexOf("url")>0){t=true;return false}});if(t==true&&r.find(".fullmeasureContent").find(".form").length<=0){y=q}s=null;if(y<=0){if(Fai.top._manageMode||t==true){y=165}}r.find(".fillContentRelative").css({height:y,position:"relative"})}if(v==true){var w=r.find(".fullmeasureOuterContentPage");for(var u=0;u0){return}if(i("#faiFloatPanel").css("display")=="block"&&r==j){return}}if(q.data("stopCarousel")==true){return}if(a==r){return}}var p=parseInt(q.attr("isCarousel"));if(isNaN(p)){p=0}var G=p;if(typeof(t)!=g){p=t}var H=parseFloat(q.attr("carouselSpeed"));if(isNaN(H)){H=1}if(p==1){if(q.data("mouseenter")==true){return}}if(q.data("animateSlide")==true){return}q.data("animateSlide",true);var w=q.find(".J_fullmeasurePageShow");if("animateSlide" in B){clearInterval(B.animateSlide)}if(w.length<=1){q.data("animateSlide",false);return}var z,E,D,s=true;if(p==1){for(var C=0;CF){s=false}if(v==true&&F==0){s=true}if(p==1){s=true}var y=q.width(),u=0,x=parseInt(y/parseInt(H*1000/40));if(G!=1){x=150}q.find(".fmSlideStyleShow").removeClass("fmSlideStyleShow");q.find(".fmSlideStyle").eq(F).addClass("fmSlideStyleShow");if(s){z.css({left:y,display:"block"})}else{z.css({left:("-"+y+"px"),display:"block"})}if("animateSlide" in B){clearInterval(B.animateSlide)}B.animateSlide=setInterval(function(){if(s){if(z.css("left").replace("px","")<=0){if("animateSlide" in B){clearInterval(B.animateSlide);jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}z.css({display:"block",left:"0"});E.css({display:"none",left:"0"});q.data("animateSlide",false);return}if(u>=y){z.css({display:"block",left:"0"});E.css({display:"none",left:"0"});if("animateSlide" in B){clearInterval(B.animateSlide);jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}q.data("animateSlide",false);return}E.css("left","-"+u+"px");z.css("left",(parseInt(y)-parseInt(u))+"px");u=u+x}else{if(z.css("left").replace("px","")>=0){if("animateSlide" in B){clearInterval(B.animateSlide);jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}z.css({display:"block",left:"0"});E.css({display:"none",left:"0"});q.data("animateSlide",false);return}if(u>=y){z.css({display:"block",left:"0"});E.css({display:"none",left:"0"});if("animateSlide" in B){clearInterval(B.animateSlide);jzUtils.run({name:"moduleAnimation.publish",base:Fai.top.Site});jzUtils.run({name:"moduleAnimation.contentAnimationPublish",base:Fai.top.Site})}q.data("animateSlide",false);return}E.css("left",u+"px");z.css("left",(parseInt("-"+y)+parseInt(u))+"px");u=u+x}},40)};function n(p){if(typeof(b[p])!=g){if("animateCt" in b[p]){clearInterval(b[p]["animateCt"])}}var q={};b[p]=q;var r=i("#module"+p);var w=r.find(".fullmeasureOuterContentPage");var v=w.eq(0);if(r.find(".fillContentRelative").length>0){var u=v.height();r.find(".formWrap").css({position:"relative"});w.css({position:"absolute"})}if(w.length<=1){if(!Fai.top._manageMode&&w.length==1){w.css({position:"static"})}return}w.each(function(A,B){var z=i(B);var C=i(B).attr("page");if(typeof(C)==g){C=1000;z.attr("1000")}});var t=parseInt(r.attr("isCarousel"));if(isNaN(t)){t=0}if(t==1){var y=parseFloat(r.attr("displayTime"));if(isNaN(y)){y=4}var s=parseFloat(r.attr("carouselSpeed"));if(isNaN(s)){s=1}var x=(s+y)*1000;q.animateCt=setInterval("Site.inFullmeasueAnimation.slide('"+p+"');",x)}}e.animateFm=function(s,q,p,r){var s=s+"";o(s,q,p,r);n(s)};e.slideArrow=function(v,t){var v=v+"";var r=i("#module"+v);var p=r.find(".J_fullmeasurePageShow");var s=p.length;if(s<=1){return}var q=0;p.each(function(w,x){if(i(x).css("display")=="block"){q=w;return false}});if(t==1){q--}else{if(t==2){q++}else{return}}if(q<-1){s=parseInt(s)-1}else{if(q>=s){s=0}else{s=q}}var u=t==2?true:false;e.slide(v,s,u,0)};e.dynamicSetArrowDom=function(t){var t=t+"";var q=i("#module"+t);var p=q.find(".fmSlideStyleArrowBase");if(p.length>0){if(p.css("display")=="none"){setTimeout(function(){var v=q.height();if(v<80){p.css({display:"none"})}else{var u=parseInt((parseInt(v)-80)/2);p.css({top:u+"px",display:"block"})}},500)}else{var s=q.height();if(s<80){p.css({display:"none"})}else{var r=parseInt((parseInt(s)-80)/2);p.css({top:r+"px",display:"block"})}}}else{if(h){if(q.find(".J_fmSlideStyle").length>0){var s=q.height();if(s<40){q.find(".J_fmSlideStyle").css("display","none")}else{q.find(".J_fmSlideStyle").css("display","block")}}}}};e.buildFmSlideStyleDom=function(s,D){var s=s+"";var t=i("#module"+s);t.find(".J_fmSlideStyle").remove();var C=t.find(".J_fullmeasurePageShow");var B=C.length;if(B<=1){return}var r=0;C.each(function(G,H){if(i(H).css("display")=="block"){r=G;return false}});var y=[];if(D==3){var z=C.find(".fullmeasureContent").width();var A=i(document.body).width();var q=0;if((A-z)>184){q=parseInt(((parseInt(A)-parseInt(z))/2-92));if(Fai.top._manageMode){q=q-10}}else{q=20}q=q+"px";var p="style='display:none;left:"+q+";'",F="style='display:none;right:"+q+";''";var x="",v="",E="";x="J_fmSlideStyle fmSlideStyleArrowBase fmSlideStyleArrowLast fmSlideStyle"+D;v="J_fmSlideStyle fmSlideStyleArrowBaseBg fmSlideStyleArrowBase fmSlideStyleArrowLast";y.push("
    ");x="J_fmSlideStyle fmSlideStyleArrowBase fmSlideStyleArrowNext fmSlideStyle"+D;v="J_fmSlideStyle fmSlideStyleArrowBaseBg fmSlideStyleArrowBase fmSlideStyleArrowNext";E="Site.inFullmeasueAnimation.slideArrow("+s+", 'next')";y.push("
    ")}else{var u="";if(!h){u="style='display:none;'"}y.push("
    ");var x="",E="";for(var w=0;w
    ")}y.push("
    ")}t.append(y.join(""));e.dynamicSetArrowDom(s)}})(jQuery,Site.inFullmeasueAnimation||(Site.inFullmeasueAnimation={}),"undefined");(function(g,b,c){var d=!!window.localStorage;var e={bit:{},tens:{},array:{}};b.setBitMemory=function(i,n){var m=e.bit[i];if(typeof m!="number"){throw new Error("参数错误!!未配置dic字典");return}var k=parseInt(m/31),l=m%31,j=h("JBM"+k);if(j==null){j=0}else{j=parseInt(j)}if(Boolean(n)){j|=(1<9||p<0){throw new Error("参数错误!!");return}var o=parseInt(j),n=h("JTM")||"",m=0;if(n==""){m=o}else{m=o-n.length}for(var k=m;k>0;k--){n+="0"}n=n.split("");n[o]=p;n=n.join("");a("JTM",n)};b.getTensMemory=function(k){var j=e.tens[k];if(typeof j!="number"){throw new Error("参数错误!!");return}var m=j,l=h("JTM")||[],i;l=l.split("");i=Number(l[m]);return isNaN(i)?c:i};b.setArrayMemory=function(k,l){var m=e.array[k];if(typeof m!="number"){throw new Error("参数错误!!");return}var i=unescape(h("JAM")||""),j=i.split(",")||[];j[m]=l;i=j.join(",");a("JAM",escape(i))};b.getArrayMemory=function(k){var l=e.array[k];if(typeof l!="number"){throw new Error("参数错误!!");return}var i=unescape(h("JAM")),j=i.split(",")||[];return j[l]||c};function a(i,j){if(d){b.getTopWindow().localStorage.setItem(i,j)}else{g.cookie(i,j,{expires:1800,path:"default.htm"})}}function h(i){if(d){return b.getTopWindow().localStorage.getItem(i)}else{return g.cookie(i,{path:"default.htm"})}}})(jQuery,Site);$.ajaxSettings.errorCall.push(function(c,a,d){var b=Site.getTopWindow()._faiAjax;if(b){b.ajax({type:"post",url:"ajax/logajaxerr_h.jsp@cmd=ajaxerr&error="+d+"&status="+a,data:"msg="+Fai.encodeHtml("ajaxUrl="+Fai.encodeUrl(c.url)+";refer="+Fai.encodeUrl(top.location.href))})}});Site.initPage=function(){var d=0,i=0;var c=setInterval(function(){$.each(Fai.top.$("body>iframe"),function(k,l){var j=$.trim($(l).attr("src"));var n=j;var m=j.indexOf("http://");if(m>=0){n=j.substring(m+7)}else{return}m=n.indexOf("/");if(m>0){n=n.substring(0,m)}m=n.indexOf(":");if(m>0){n=n.substring(0,m)}if(Fai.isIp(n)){$(l).remove();Site.logMsg("body be iframe. iframeSrc="+j+"; ")}});d++;if(d>=30){clearInterval(c)}},300);if(Fai.isIE6()){try{document.execCommand("BackgroundImageCache",false,true)}catch(h){}}Site.resetGmainPos();if(Fai.isIE7()||Fai.isIE6()){$(window).resize(function(){Site.resetGmainPos()})}Site.initForms();Site.refreshForms();if(!Fai.top._Global._footerHidden){$("#footer").show()}Site.initPageBindAmousedown();Site.setAbsFormsHolder2(true);Fai.top.setAbsFormsHolder2_interval=setInterval(function(){Site.setAbsFormsHolder2(true)},1000);Site.fixSiteWidth(Fai.top._manageMode);var g=$("#web").find("iframe");if(g.size()>0){for(var b=0;b1){break}c=j(0,g.length)}if(c===1){c=j(1,g.length)}if(c===2){c=j(2,g.length)}$("#_faiMenuBtn").remove();$("#fai_spinach").remove();if($("#fai_webVersionList")){$("#fai_webVersionList").remove()}var m="../hs.aaadns.com/image/faisco_onepice/"+g[c]+".jpg";var i="
    ";var e="";$("body").append(i).append(e);var b="";$("body").append(b);$("#J_changeTrialMallTime").mouseenter(function(){$("#fai_trialEndTime").show()}).mouseleave(function(){$("#fai_trialEndTime").hide()});$("#fai_trialEndTime").mouseenter(function(){$("#fai_trialEndTime").show();$("#fai_spinach").show()}).mouseleave(function(){$("#fai_trialEndTime").hide();$("#_faiMenuClose").hide()});if(Fai.top.toolBoxShowView){if(!Fai.top._oem){var l=[""]}else{var l=[""]}$("body").append(l.join(""));$("#J_changeWebVersion").mouseenter(function(){$("#fai_webVersionList").show()}).mouseleave(function(){$("#fai_webVersionList").hide()});$("#fai_webVersionList").mouseenter(function(){$("#fai_webVersionList").show();$("#fai_spinach").show()}).mouseleave(function(){$("#fai_webVersionList").hide();$("#_faiMenuClose").hide()})}var d=false;$("#_faiMenuBtn").mouseenter(function(n){$("#fai_spinach").show();$("#_faiMenuClose").show()}).mouseleave(function(n){window.setTimeout(function(){if(!d){$("#fai_spinach").hide()}},200);$("#_faiMenuClose").hide()});$("#fai_spinach").mouseenter(function(n){d=true}).mouseleave(function(n){d=false;$("#fai_spinach").hide()});$("#_faiMenuClose").click(function(n){$("#_faiMenuBtn").hide();$("#fai_spinach").hide()})};Site.colLayout45Width=function(){var a=Fai.top._colOtherStyleData.layout4Width;var e=Fai.top._colOtherStyleData.layout5Width;var b=$(".containerFormsCenterMiddle").width();var d=Math.floor(b*0.02);if(Fai.top._manageMode){$("#middleLeftForms").css("padding-right",d+"px");if((a+e+d)>b){$("#middleLeftForms").css("width",(b-(e+d))+"px")}}if(a>0&&e==0){var c=$("#middleLeftForms").css("padding-right").replace("px","");$("#middleLeftForms").css("width",a);$("#middleRightForms").css("width",b-c-a);Fai.top._colOtherStyleData.layout5Width=$("#middleRightForms").width()}};Site.initPage2=function(){Site.manageFaiscoAd();Fai.top.$(".absForms >.form").each(function(){Site.checkAbsModulePosition($(this),true)});Fai.top.$(".floatForms >.form").each(function(){Site.checkFloatModulePosition($(this));Site.checkSideModule($(this));Site.checkFlutterModule($(this))});if(Fai.top.$("#faiBgMusicPlayer").length>0){Site.callMusicPlayButton("bgplayerButton","faiBgMusicPlayer","bgplayerTime","bgplayerPause");var a=Fai.top.$("#faiBgMusicPlayer").attr("bgpause");if(a==="false"){$.cookie("bgplayerPause","false");$("#bgplayerButton").attr("bgMusicStatus","false")}if(a==="true"){$("#bgplayerButton").addClass("bgplayerButtonP");$("#bgplayerButton").attr("title",LS.playMusic);$("#bgplayerButton").attr("bgMusicStatus","true");$.cookie("bgplayerPause","true")}}if(!Fai.top._Global._footerHidden){if(Fai.top.$(".footerSupport").find(":visible").length==0){Fai.top.$(".footerSupport").hide()}}Site.setAbsFormsHolder2(true);$.each($("img"),function(c,b){if($.trim($(b).attr("data-original")).length>0){$(b).addClass("loadingPlaceholderBackground")}});if(Fai.isIE6()||Fai.isIE7()){$("img").lazyload({threshold:400,lazyRemoveclass:"loadingPlaceholderBackground",container:$("#g_main")})}else{$("img").lazyload({threshold:400,lazyRemoveclass:"loadingPlaceholderBackground"})}Site.bindGobalEvent("site_moduleTabSwitch",function(b,d){var c=$("#formTabCntId"+d).find("img");$.each(c,function(g,e){var h=$.trim($(e).attr("data-original"));if(h.length>0){$(e).attr("src",h).removeClass("loadingPlaceholderBackground")}})});Site.bindGobalEvent("site_BannerV2Switch",function(b){var c=$("#bannerV2").find(".fk-inBannerListZone img");$.each(c,function(e,d){var g=$.trim($(d).attr("data-original"));if(g.length>0){$(d).attr("src",g).removeClass("loadingPlaceholderBackground")}})});$(".g_ibutton").livequery(function(){$(this).faiButton()})};Site.initModuleItemHover=function(a){$(a).mouseover(function(){$(this).addClass("g_hover")}).mouseleave(function(){$(this).removeClass("g_hover")})};Site.initModuleItemCover=function(a,c,d){$(a).mouseover(function(){$(this).addClass("g_hover")}).mouseleave(function(){$(this).removeClass("g_hover")});var b=a.replace("#module","");Site.initContentSplitLine(b,d)};Site.initBackToTopTool=function(l,k,g,i,a){var d='';var h='';var m="";if(a=="small_box"||a=="null"){a="";m=$('
    ');Fai.top.Fai.setCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop",key:"display",value:"none"},{cls:".fk_siteBackToTop",key:"width",value:"41px"},{cls:".fk_siteBackToTop",key:"height",value:"38px"},{cls:".fk_siteBackToTop",key:"cursor",value:"pointer"},{cls:".fk_siteBackToTop",key:"position",value:"fixed"},{cls:".fk_siteBackToTop",key:"z-index",value:"9030"},{cls:".fk_siteBackToTop",key:"right",value:"40px"},{cls:".fk_siteBackToTop",key:"bottom",value:"50px"},{cls:".fk_siteBackToTop",key:"background",value:"url("+_resRoot+"/image/site/backtotop.png?v=201411241810) no-repeat"}])}else{m=$('
    ');Fai.top.Fai.setCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop",key:"display",value:"none"},{cls:".fk_siteBackToTop",key:"cursor",value:"pointer"},{cls:".fk_siteBackToTop",key:"position",value:"fixed"},{cls:".fk_siteBackToTop",key:"z-index",value:"9030"},{cls:".fk_siteBackToTop",key:"right",value:"40px"},{cls:".fk_siteBackToTop",key:"bottom",value:"50px"}]);getBackToTopStyleCss(a,false)}$("#g_main").before(m);if(k){$("#g_main").before(d);$("#g_main").before(h)}$(".backToTopEdit").bind("click",function(){Site.popupWindow({title:"编辑返回顶部图标",frameSrcUrl:"manage/backtotopedit.jsp@ram="+Math.random(),width:"543",height:"543",version:2,frameScrolling:"no",saveBeforePopup:false,closeFunc:Site.closeCss})});$(".backToTopClose").bind("click",function(){e.hide();$("#BackToTopborder").hide();$("#borderLayer").hide();Fai.top._advanceSettingData.backToTopOpen=false;Fai.top._Global._backToTop=false;Site.styleChanged();Site.styleSetting("open","webSettingTab",false,"advanceFuncShow");Fai.ing("您可以在网站设计-网站设置-高级设置中重新开启。",true);c.scrollTop(0)});if(k&&Site.simpleTip){Site.simpleTip($("#borderLayer .f-hide-btn"),0)}function b(){var o=$("#siteBackToTop_small_box").offset().left,n=$("#siteBackToTop_small_box").offset().top;$("#BackToTopborder-left").css({left:(o-2)+"px",top:(n-2)+"px",height:$("#siteBackToTop_small_box").height()+2+"px"});$("#BackToTopborder-top").css({left:(o-2)+"px",top:(n-2)+"px",width:$("#siteBackToTop_small_box").width()+2+"px"});$("#BackToTopborder-bottom").css({left:(o-2)+"px",top:(n+$("#siteBackToTop_small_box").height()+1)+"px",width:$("#siteBackToTop_small_box").width()+2+"px"});$("#BackToTopborder-right").css({left:(o+$("#siteBackToTop_small_box").width()+1)+"px",top:(n-2)+"px",height:$("#siteBackToTop_small_box").height()+2+"px"});$("#borderLayer").css({left:($("#siteBackToTop_small_box").offset().left+$("#siteBackToTop_small_box").width()-$("#borderLayer").outerWidth())+"px",top:(n-$("#borderLayer").outerHeight()-6)+"px"})}var e=$("#siteBackToTop_small_box");var c=Fai.top.$("#g_main");if(!l&&!Fai.isIE6()){c=$(window);e.css("right",40+"px");e.css("bottom",50+"px")}if(Fai.top._manageMode){e.css("right",40+Fai.getScrollWidth()+"px");e.css("bottom",50+"px")}if(!l&&Fai.isIE6()){e.css("bottom",50+"px")}j();c.scroll(function(){j()});e.click(function(){c.scrollTop(0)});function j(){if(!Fai.top._Global._backToTop){e.hide();return}if(c.scrollTop()>0){if(e.css("display")=="none"){if(Fai.isIE6()){e.css("position","absolute")}if(Fai.isIE8()&&Fai.top._manageMode){e.show()}else{e.slideDown("slow")}}}else{if(Fai.isIE8()&&Fai.top._manageMode){e.hide()}else{e.slideUp("slow")}}}$("#siteBackToTop_small_box").hover(function(){var o=$(this),n=o.attr("_style");o.animate({opacity:0.2},"slow",function(){$("#siteBackToTop_small_box").css("height","")});if(n!=""&&n!="small_box"){getBackToTopStyleCss(n,true)}b();$("#BackToTopborder").show();$("#borderLayer").show();o.attr("_realmousein","1")},function(){var o=$(this),n=o.attr("_style");o.animate({opacity:1},"slow",function(){$("#siteBackToTop_small_box").css("height","")});if(n!=""&&n!="small_box"){getBackToTopStyleCss(n,false)}return setTimeout(function(){o.attr("_realmousein","0");if(o.attr("_mousein")==1){$("#BackToTopborder").show();$("#borderLayer").show()}else{$("#BackToTopborder").hide();$("#borderLayer").hide()}},50)});$("#borderLayer").hover(function(){$("#BackToTopborder").show();$("#borderLayer").show();$("#siteBackToTop_small_box").attr("_mousein","1")},function(){return setTimeout(function(){$("#siteBackToTop_small_box").attr("_mousein","0");if($("#siteBackToTop_small_box").attr("_realmousein")==1){$("#BackToTopborder").show();$("#borderLayer").show()}else{$("#BackToTopborder").hide();$("#borderLayer").hide()}},50)})};function getBackToTopStyleCss(a,e){var h=a.split("_"),c=h[0],b=h[1],d=[],g="";if(e){g="_hover"}if(a!="small_box"){switch(c){case"firstStyle":d.push({cls:".fk_siteBackToTop",key:"position",value:"fixed"});d.push({cls:".fk_siteBackToTop",key:"width",value:"42px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"42px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"5px"});if(e){d.push({cls:".fk_siteBackToTop:hover",key:"background-image",value:"url("+_resRoot+"/image/backToTop/firstStyle/"+b+g+".png?v=201505251717)"})}else{d.push({cls:".fk_siteBackToTop",key:"background-image",value:"url("+_resRoot+"/image/backToTop/firstStyle/"+b+g+".png?v=201505251717)"})}break;case"secondStyle":d.push({cls:".fk_siteBackToTop",key:"position",value:"fixed"});d.push({cls:".fk_siteBackToTop",key:"width",value:"50px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"50px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"1px"});if(b=="01"||b=="05"){if(e){d.push({cls:".fk_siteBackToTop:hover",key:"background-image",value:"url("+_resRoot+"/image/backToTop/secondStyle/"+b+g+".png?v=201505261406)"})}else{d.push({cls:".fk_siteBackToTop",key:"background-image",value:"url("+_resRoot+"/image/backToTop/secondStyle/"+b+".png?v=201505251717)"})}}else{if(e){d.push({cls:".fk_siteBackToTop:hover",key:"background-image",value:"url("+_resRoot+"/image/backToTop/secondStyle/"+b+g+".png?201505251717)"})}else{d.push({cls:".fk_siteBackToTop",key:"background-image",value:"url("+_resRoot+"/image/backToTop/secondStyle/"+b+".png?v=201505251717)"})}}break;case"special":d.push({cls:".fk_siteBackToTop",key:"position",value:"fixed"});if(e){d.push({cls:".fk_siteBackToTop:hover",key:"background-image",value:"url("+_resRoot+"/image/backToTop/"+b+g+".png?v=201505251717)"})}else{d.push({cls:".fk_siteBackToTop",key:"background-image",value:"url("+_resRoot+"/image/backToTop/"+b+".png?v=201505251717)"})}break}if(c=="special"){switch(b){case"01":d.push({cls:".fk_siteBackToTop",key:"width",value:"32px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"32px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"10px 10px"});break;case"02":d.push({cls:".fk_siteBackToTop",key:"width",value:"26px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"48px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"2px 13px"});break;case"03":d.push({cls:".fk_siteBackToTop",key:"width",value:"42px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"42px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"5px"});break;case"04":d.push({cls:".fk_siteBackToTop",key:"width",value:"45px"});d.push({cls:".fk_siteBackToTop",key:"height",value:"50px"});d.push({cls:".fk_siteBackToTop",key:"margin",value:"1px 3px"});break}}}else{Fai.top.Fai.setCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop",key:"display",value:"none"},{cls:".fk_siteBackToTop",key:"width",value:"41px"},{cls:".fk_siteBackToTop",key:"height",value:"38px"},{cls:".fk_siteBackToTop",key:"cursor",value:"pointer"},{cls:".fk_siteBackToTop",key:"position",value:"fixed"},{cls:".fk_siteBackToTop",key:"z-index",value:"9030"},{cls:".fk_siteBackToTop",key:"right",value:"40px"},{cls:".fk_siteBackToTop",key:"bottom",value:"50px"},{cls:".fk_siteBackToTop",key:"background",value:"url("+_resRoot+"/image/site/backtotop.png?v=201411241810) no-repeat"},]);if(e){Fai.top.Fai.removeCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop:hover",key:"background"},])}}if(!!d.length){Fai.top.Fai.setCtrlStyleCssList("stylebacktotop","",d)}}Site.closeCss=function(){if(Fai.top._advanceSettingData.btts=="small_box"){Fai.top.$("#siteBackToTop_small_box").attr("style","display:block");Fai.top.Fai.removeCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop:hover",key:"background"},])}else{Fai.top.Fai.setCtrlStyleCssList("stylebacktotop","",[{cls:".fk_siteBackToTop",key:"cursor",value:"pointer"},{cls:".fk_siteBackToTop",key:"position",value:"fixed"},{cls:".fk_siteBackToTop",key:"z-index",value:"9030"},{cls:".fk_siteBackToTop",key:"right",value:"40px"},{cls:".fk_siteBackToTop",key:"bottom",value:"50px"},])}Fai.top.$("#siteBackToTop_small_box").attr("_style",Fai.top._advanceSettingData.btts);getBackToTopStyleCss(Fai.top._advanceSettingData.btts,false)};Site.fixSiteWidth=function(c){b(c);var a;Fai.top.$(window).off("resize.fixSiteWidth");Fai.top.$(window).on("resize.fixSiteWidth",function(){if(typeof a=="number"){return}a=setTimeout(function(){b(c);Site.fixWebFooterHeight();Site.refreshDefaultBannerEdge();Site.fixAllMallPosition();a=null},300)});function b(g){var t=Fai.top.$("#webContainer").outerWidth(true),p=t,r=t,o=document.documentElement?document.documentElement.clientWidth:document.body.clientWidth,k=document.documentElement?document.documentElement.scrollWidth:document.body.scrollWidth,l=Fai.top.$("#web"),n=Fai.top.$("#g_main"),m=0,j=960,i=(g||(Fai.isIE6()||Fai.isIE7()))?n.scrollLeft():$(document).scrollLeft(),e=l[0].getBoundingClientRect().right+i,s=0,q,h;if(g||Fai.isIE6()){o=o-Fai.getScrollWidth()}Fai.top.$(".fullmeasureForms").find(".fullmeasureContent").each(function(u,v){if($(v).is(":visible")&&p<$(v).width()){p=$(v).width()}});r=p;o=o>r?o:r;j=o>j?o:j;q=Fai.top.$("#nav");q=q.add(l.find("div.absForms").children(".form"));q=q.add(Fai.top.$("#corpTitle"));q=q.add(Fai.top.$("#logo"));s=d(q)+i;h=(s-e)*2+e;if(h>j){j=h;m=(j-n[0].scrollWidth)+i}if(g){if(!Fai.top._cusResponsive){l.css({width:j+"px"})}if(m>0){n.scrollLeft(m)}}else{if(Fai.isIE6()||Fai.isIE7()){if(!Fai.top._cusResponsive){l.css({width:j+"px"})}if(m>0){n.scrollLeft(m)}}else{if(!Fai.top._cusResponsive){n.css({width:j+"px"})}if(m>0){$(document).scrollLeft(m)}}}}function d(i){var g=i.length,e=0,h,j;while(g){g-=1;j=i.eq(g);if(j.is(":hidden")||j.css("position")=="fixed"){continue}h=j[0].getBoundingClientRect().right;if(h>e){e=h}}return e}};Site.fixWebFooterHeight=function(){var i=Fai.top.$("#web"),a=Fai.top.$("body").height(),c=Fai.top.$("#webFooterTable"),b=c.css({height:""})&&c.height(),g=i.offset().top,d=i.height();if(Fai.top._manageMode||Fai.isIE6()){var h=0;i.children().each(function(){h+=$(this).height()});if(a>(h+g)){c.css("height",(a-h+b-g)+"px")}}else{var e=d+g;if(a>e){var j=a-e;b=c.outerHeight();c.css("height",j+b+"px")}}};Site.initPageBindAmousedown=function(){function a(g){if(Fai.isIE8()&&g.button==1){return true}else{if(Fai.isIE6()&&g.button==1){return true}else{if(Fai.isIE7()&&g.button==1){return true}else{if(g.button==0){return true}}}}return false}if(!Fai.top._designAuth){return}var d=Site.getTopWindow().$(Site.getTopWindow().document).find("#g_main");var c=Site.getTopWindow().$(Site.getTopWindow().document).find("#memberBarArea");var b=/^javascript/g;d.delegate("a","click.initSaveChange",function(g){if(!a(g)){return}var e=$(this).attr("href");if(e&&e.match(b)==null&&!$(this).hasClass("stopPropagation")){var h=$(this).attr("target")||"_self";if(!Site.redirectUrl(e,h,g,0,0)){return false}}});c.delegate("a","mousedown",function(g){if(!a(g)){return}var e=$(this).attr("href");if(e&&e.match(b)==null&&!$(this).hasClass("stopPropagation")){var h=$(this).attr("target")||"_self";Site.redirectUrl(e,h,g,0,0)}return false});Site.getTopWindow().$(Site.getTopWindow().document).find("#tabs a.cancelBtn").mousedown(function(e){if(!a(e)){return}Site.redirectUrl("javascript:;","cancelBtn",e,0,1);return false});Site.getTopWindow().$(Site.getTopWindow().document).delegate("div.navSubMenu a","mousedown",function(g){if(!a(g)){return}var e=$(this).attr("href");if(e&&e.match(b)==null&&!$(this).hasClass("stopPropagation")){var h=$(this).attr("target")||"_self";Site.redirectUrl(e,h,g,1,0)}return false})};Site.refreshFooterItemSpacing=function(){var b=Fai.top.$("#footerNav");if(b.length<1){return}var k=b.find(".footerItemSpacing");var j=b.find(".footerItemSection");if(j.length<1){return}var a=9;var g=5;if(b.attr("cusHeight")=="1"){if(Fai.top._manageMode){var e=Site.getFooterStyleData()||{};Fai.top.Fai.removeCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSpacing",key:"padding-top"}]);if(b.hasClass("footerPattern1")){Fai.top.Fai.setCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height",value:e.fih+"px"},{cls:"li.footerItemSpacing",key:"height",value:(e.fih-a)+"px"},{cls:"li.footerItemSpacing",key:"padding-top",value:g+"px"}])}else{Fai.top.Fai.setCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height",value:e.fih+"px"},{cls:"li.footerItemSpacing",key:"height",value:e.fih+"px"}])}}return}Fai.top.Fai.removeCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSpacing",key:"padding-top"}]);Fai.top.Fai.setCtrlStyleCssList("tmpStylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height",value:"auto !important"},{cls:"li.footerItemSpacing",key:"height",value:"auto !important"}]);var h=j.eq(0).height();var d=0;for(var c=1;ch){h=d}}if(b.hasClass("footerPattern1")){Fai.top.Fai.setCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height",value:h+"px"},{cls:"li.footerItemSpacing",key:"height",value:(h-a)+"px"},{cls:"li.footerItemSpacing",key:"padding-top",value:g+"px"}])}else{Fai.top.Fai.setCtrlStyleCssList("stylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height",value:h+"px"},{cls:"li.footerItemSpacing",key:"height",value:h+"px"}])}Fai.top.Fai.removeCtrlStyleCssList("tmpStylefooter","webFooterTable",[{cls:"li.footerItemSection",key:"height"},{cls:"li.footerItemSpacing",key:"height"}]);Fai.top.$("#tmpStylefooter").remove()};Site.pageOnload=function(){Site.userReadyOperateSite();Site.mobiPlatform();Site.fixWebFooterHeight();if(Fai.top.$("#banner").length){Site.refreshBanner(0)}if(Fai.top.$("#bannerV2").length){Site.bannerV2.adjustBannerWidth()}Site.adjustBannerWidth();Site.addStellarEvent();Site.excuteMallBuy2();Site.checkFaiAnchor();Site.fixAllMallPosition()};Site.excuteMallBuy2=function(){var g=$.cookie("isNeedAddCartItem");if(typeof g=="undefined"||g==null||g==""){return}var e=$.parseJSON(g);var b=e.pid;var d=e.mid;var c=e.url;var a=e.doWhat;if(a=="add"){Site.mallBuy2(b,d,c)}else{if(a=="buy"){Site.mallImmeBuy(b,d)}}setTimeout(function(){$.cookie("isNeedAddCartItem",null)},1000)};Site.beforeUnloadFunc=function(){var a=Fai.top.onbeforeunload;Fai.top.onbeforeunload=function(){if(typeof a=="function"){a.apply(this,arguments)}Site.siteStatVisitTime()}};Site.bindBeforeUnloadEvent=function(b,c,a){Fai.top.$(document).ready(function(){Fai.top.$(window).bind("beforeunload",function(g){if(c){Site.bgmFlushContinue()}else{if(Fai.top.bgmCloseToOpen){Site.bgmFlushContinue()}}if(b){if(_changeStyleNum>0){return"您的网站设计正处于编辑状态,离开该页面将会失去您对网站所做的修改。"}}if(a){Site.jumpToMobiDesign(1)}});var d=Fai.top.onbeforeunload;Fai.top.onbeforeunload=function(){if(typeof d=="function"){d.apply(this,arguments)}if(b){if(_changeStyleNum>0){return"您的网站设计正处于编辑状态,离开该页面将会失去您对网站所做的修改。"}}}})};Site.closeRightClickTool=function(){$(document).bind("contextmenu copy cut",function(a){if($(a.target).is("input, textarea")){return}else{return false}});if(Fai.isIE6()||Fai.isIE7()||Fai.isIE8()){$(document).bind("selectstart",function(a){if($(a.target).is("input, textarea")){return}else{return false}})}};Site.triggerGobalEvent=function(a,b){Fai.top.$(Fai.top.document).trigger(a,b)};Site.bindGobalEvent=function(a,b){if(a=="site_articlePictureChange"&&Fai.isIE()){Fai.top.$(Fai.top.document).off(a)}Fai.top.$(Fai.top.document).on(a,b)};Site.refreshFormIndexClass=function(){Site.refreshFormIndexClass2({id:"topForms"});Site.refreshFormIndexClass2({id:"leftForms"});Site.refreshFormIndexClass2({id:"centerTopForms"});Site.refreshFormIndexClass2({id:"middleLeftForms"});Site.refreshFormIndexClass2({id:"middleRightForms"});Site.refreshFormIndexClass2({id:"centerBottomForms"});Site.refreshFormIndexClass2({id:"rightForms"});Site.refreshFormIndexClass2({id:"bottomForms"});Site.refreshFormIndexClass2({id:"fullmeasureTopForms"});Site.refreshFormIndexClass2({id:"fullmeasureBottomForms"});Site.refreshFormIndexClass2({id:"absTopForms"});Site.refreshFormIndexClass2({id:"absForms"});Site.refreshFormIndexClass2({id:"absBottomForms"});Site.refreshFormIndexClass2({id:"floatLeftTopForms"});Site.refreshFormIndexClass2({id:"floatRightTopForms"});Site.refreshFormIndexClass2({id:"floatLeftBottomForms"});Site.refreshFormIndexClass2({id:"floatRightBottomForms"});Site.refreshFormIndexClass2({id:"fk-webHeaderZone"});Site.refreshFormIndexClass2({id:"fk-webBannerZone"});Site.refreshFormIndexClass2({id:"fk-webFooterZone"});Site.refreshFormIndexClass2({_class:"fk-inBannerListZone"})};Site.refreshFormIndexClass2=function(j){var b=j.id;var e=j._class;var a=j.inFullmeasure||0;var i,d,c,h;var g;if(typeof b!="undefined"){g=Fai.top.$("#"+b).children(".form")}else{if(typeof e!="undefined"){g=Fai.top.$("."+e).children(".form")}}g.each(function(k,l){c=$(l);h=Site.checkNestModule(c);c.attr("_inmulmcol",0);c.attr("_intab",0);c.attr("_infullmeasure",0);c.attr("_inpack",0);if(h.isCol){Site.refreshFormIndexClassInCol(c)}else{if(h.isTab){Site.refreshFormIndexClassInTab(c)}else{if(h.isPack){Site.refreshFormIndexClassInPack(c)}else{if(h.isFullmeasure){Site.refreshFormIndexClassInFullmeasure(c)}}}}i=c.attr("_indexClass");d="formIndex"+(k+1);if(Fai.isNull(i)){c.addClass(d);c.attr("_indexClass",d);Fai.refreshClass(c)}else{if(i!=d){c.removeClass(i);c.addClass(d);c.attr("_indexClass",d);Fai.refreshClass(c)}}})};Site.refreshFormIndexClassInCol=function(b){var d=b.attr("id").replace("module","")||0,a,c;b.find(".mulMColList").children(".form").each(function(e,g){a=$(g);a.attr("_inmulmcol",d);a.attr("_intab",0);a.attr("_infullmeasure",0);a.attr("_inpack",0);a.removeAttr("_indexclass ");c=Site.checkNestModule(a);if(c.isTab){Site.refreshFormIndexClassInTab(a)}else{if(c.isPack){Site.refreshFormIndexClassInPack(a)}}})};Site.refreshFormIndexClassInTab=function(b){var c=b.attr("id").replace("module","")||0,a;b.find(".formTabCntId").children(".form").each(function(d,e){a=$(e);a.attr("_inmulmcol",0);a.attr("_intab",c);a.attr("_infullmeasure",0);a.attr("_inpack",0);a.removeAttr("_indexclass ");if(Site.checkNestModule(a).isPack){Site.refreshFormIndexClassInPack(a)}})};Site.refreshFormIndexClassInFullmeasure=function(c){var g=c.attr("id").replace("module","")||0,a,e,b,d;c.find(".fullmeasureContent").children(".form").each(function(h,i){b=$(i);b.attr("_inmulmcol",0);b.attr("_intab",0);b.attr("_infullmeasure",g);b.attr("_inpack",0);d=Site.checkNestModule(b);if(d.isTab){Site.refreshFormIndexClassInTab(b)}else{if(d.isCol){Site.refreshFormIndexClassInCol(b)}else{if(d.isPack){Site.refreshFormIndexClassInPack(b)}}}a=b.attr("_indexClass");e="formIndex"+(h+1);if(Fai.isNull(a)){b.addClass(e);b.attr("_indexClass",e);Fai.refreshClass(b)}else{if(a!=e){b.removeClass(a);b.addClass(e);b.attr("_indexClass",e);Fai.refreshClass(b)}}})};Site.refreshFormIndexClassInPack=function(b){var d=b.attr("id").replace("module","")||0,a,c;b.find(".J_packContent").children(".form").each(function(e,g){a=$(g);a.attr("_inmulmcol",0);a.attr("_intab",0);a.attr("_infullmeasure",0);a.attr("_inpack",d);a.removeAttr("_indexclass ");c=Site.checkNestModule(a);if(c.isTab){Site.refreshFormIndexClassInTab(a)}else{if(c.isCol){Site.refreshFormIndexClassInCol(a)}}})};Site.checkNestModule=function(b){var j={nest:false,isTab:false,isCol:false,isFullmeasure:false,isPack:false,isElemZone:false,parentId:0,inTab:false,inCol:false,inFullmeasure:false,inPack:false,inZone:false,inSubNav:false,inElemZone:false},d=parseInt(b.attr("_intab"))||0,e=parseInt(b.attr("_inmulmcol"))||0,a=parseInt(b.attr("_infullmeasure"))||0,i=parseInt(b.attr("_inpack"))||0,h=Site.checkModuleInZone(b),g=Site.checkModuleInSubNav(b),c=Site.checkModuleInElemZone(b);if(b.hasClass("formStyle35")){j.nest=true;j.isCol=true}else{if(b.hasClass("formStyle29")){j.nest=true;j.isTab=true}else{if(b.hasClass("formStyle80")){j.nest=true;j.isFullmeasure=true}else{if(b.hasClass("formStyle87")){j.nest=true;j.isPack=true}else{if(b.hasClass("elemZone")){j.isElemZone=true}}}}}if(d>0){j.parentId=d;j.inTab=true}else{if(e>0){j.parentId=e;j.inCol=true}else{if(a>0){j.parentId=a;j.inFullmeasure=true}else{if(i>0){j.parentId=i;j.inPack=true}else{if(h){j.parentId=b.parent().attr("id");j.inZone=true}else{if(g){j.parentId=b.parent().attr("id");j.inSubNav=true}}}}}}if(c){j.inElemZone=true;j.realParentId=b.parent().attr("id")}return j};Site.createMemberBar=function(e,c,h,d,a){if(Fai.top.$("#memberBarArea").length>0){return}var b=new Array();b.push("
    ");b.push("
    ");b.push("
    ");b.push("
    ");if(e||c||h){if(h){b.push(" ");b.push(" ");b.push(" ")}if(c){b.push(" ");b.push(" ");b.push(" ")}if(e){b.push(" ");b.push(" ");b.push(" ")}b.push(" "+LS.otherAccountLogin+":")}b.push(" "+LS.memberReg+"");b.push(" "+LS.memberLogin+"");b.push("
    ");b.push("
    ");b.push('
    ');if(!d){Fai.top._memberTopBar_myOrder=false}if(Fai.top._memberTopBar_addBookMark){b.push('
    ');b.push(' '+LS.favorite+"");b.push("
    ")}else{b.push('
    ');b.push(' ");b.push("
    ")}if(Fai.top._memberTopBar_addBookMark&&(Fai.top._memberTopBar_myOrder||Fai.top._memberTopBar_myProfile)){b.push('
    ')}else{b.push(' ')}if(Fai.top._memberTopBar_myProfile){b.push('
    ');b.push(' '+LS.member_center_profile+"");b.push("
    ")}else{b.push('
    ');b.push(' ");b.push("
    ")}if(Fai.top._memberTopBar_myProfile&&Fai.top._memberTopBar_myOrder){b.push('
    ')}else{b.push(' ')}if(Fai.top._memberTopBar_myOrder){b.push('
    ');b.push(' '+LS.member_center_order+"");b.push("
    ")}else{b.push('
    ');b.push(' ");b.push("
    ")}if(d){var g="";if(Fai.top._memberTopBar_mallCart){g="display:none;"}if(Fai.top._memberTopBar_addBookMark||Fai.top._memberTopBar_myOrder||Fai.top._memberTopBar_myProfile){b.push('
    ')}else{b.push(' ')}b.push('
    ');b.push('
    ');b.push('
    ');b.push('  ');b.push(' '+LS.memberMallCart+"");b.push(' (0)');b.push('  ');b.push("
    ");b.push("
    ");b.push('
    ');b.push('
    ');b.push('
    '+LS.memberMallCartNoProduct+"
    ");b.push('
    >'+LS.memberMallCartCheckBtn+"
    ");b.push("
    ");b.push("
    ");b.push("
    ")}if(Fai.top._memberTopBar_mobiWeb&&Fai.top.openMSite){if(Fai.top._memberTopBar_myOrder||Fai.top._memberTopBar_myProfile||d){b.push('
    ')}b.push('
    ');b.push('
    ');b.push('
    ');b.push('  ');b.push('  ');b.push("
    ");b.push("
    ");b.push('
    ');b.push('
    ');b.push('
    ');b.push('
    '+LS.showMobiWeb+"
    ");b.push("
    ");b.push("
    ");b.push("
    ")}else{if(Fai.top._memberTopBar_myOrder||Fai.top._memberTopBar_myProfile||d){b.push(' ')}b.push('
    ');b.push(' ");b.push(' ");b.push("
    ")}b.push("
    ");b.push("
    ");b.push("
    ");Fai.top.$("body").prepend(b.join(""));Site.resetMemberBarPos();if(d){Site.mallCartInit(Fai.top._colId)}if(Fai.top._memberTopBar_mobiWeb){Site.mobiWebInit()}};Site.resetGmainPos=function(c){var e=0;e=c||Site.getTopHeight();var b=Fai.top.$("#g_main");if(Fai.isIE6()||Fai.isIE7()){var a=Fai.top.document.documentElement.clientHeight-e;if(b.height()!=a){b.css("height",a+"px")}var d=Fai.top.document.documentElement.clientWidth;if(b.width()!=d){b.css("width",d+"px")}}if($("#topBar").css("display")==="block"){e=e-6}if($("#memberBarArea").length!==0){e=e-2}if(b.css("top")!=(e+"px")){b.css("top",e+"px")}Site.resetMemberBarPos();Fai.top.$(".floatLeftTop").css("top",e+"px");Fai.top.$(".floatRightTop").css("top",e+"px")};Site.resetMemberBarPos=function(){var b=Site.getTopHeight()-37;if($("#topBar").css("display")==="block"){b=b-6}var a=Fai.top.$("#memberBarArea");if(a.css("top")!=(b+"px")){a.css("top",b+"px")}};Site.getTopHeight=function(){if(Fai.top._Global._topBarV2){return a()}else{return b()}function b(){var i=0;var h=0;var c=0;var g=0;var j=0;var e=0;var d=0;if((Fai.top.$("#sitetips").length>0)&&(Fai.top.$("#sitetips").css("display")!="none")){j=Fai.top.$("#sitetips").outerHeight(true)}if((Fai.top.$("#arrears").length>0)&&(Fai.top.$("#arrears").css("display")!="none")){h=Fai.top.$("#arrears").outerHeight(true)}if((Fai.top.$("#topBar").length>0)&&(Fai.top.$("#topBar").css("display")!="none")){c=Fai.top.$("#topBarArea").outerHeight(true)}if((Fai.top.$("#styleDesign").length>0)&&(Fai.top.$("#styleDesign").css("display")!="none")){g=Fai.top.$("#styleDesign").outerHeight(true)}if((Fai.top.$("#siteTipsDemoTemplate").length>0)&&(Fai.top.$("#siteTipsDemoTemplate").css("display")!="none")){e=Fai.top.$("#siteTipsDemoTemplate").outerHeight(true)}if((Fai.top.$("#memberBarArea").length>0)&&(Fai.top.$("#memberBarArea").css("display")!="none")){d=Fai.top.$("#memberBarArea").outerHeight(true)}if(g>0){j=0}i=h+c+g+j+e+d;return i}function a(){var i=0,c=Fai.top.$("#sitetips"),g=Fai.top.$("#arrears"),e=Fai.top.$("#fk-toolTopBar"),d=Fai.top.$("#siteTipsDemoTemplate"),h=Fai.top.$("#memberBarArea");if(c.length>0&&c.is(":visible")){i+=c.outerHeight(true)}if(g.length>0&&g.is(":visible")){i+=g.outerHeight(true)}if(e.length>0&&e.is(":visible")){i+=e.outerHeight(true)}if(d.length>0&&d.is(":visible")){d+=d.outerHeight(true)}if(h.length>0&&h.is(":visible")){i+=h.outerHeight(true)}return i<0?0:i}};Site.scrollToDiv=function(a){if(Fai.top.$("#g_main").hasClass("g_mainManage")){Fai.top.$("#g_main").scrollTop(0);Fai.top.$("#g_main").scrollTop(a.offset().top-Fai.top.$(".g_main").offset().top-10)}else{Fai.top.$("body").scrollTop(0);Fai.top.$("body").scrollTop(a.offset().top-10)}};Site.checkSaveBar=function(a){if(Fai.top._changeStyleNum>0){Site.popupStyleChangeBodyWindow({msg:"您的网站设计已经更改,是否立即保存?",isCancelBtn:false,runCallback:false,saveBtnStr:"确定",cancelBtnStr:"取消",otherOptions:a});return true}return false};Site.logClick=function(c,b){return;var a="cmd=click&app="+c;if(typeof b!="undefined"){a+="&value="+b}$.ajax({type:"post",url:Site.genAjaxUrl("log_h.jsp"),data:a,error:function(){},success:function(){}})};Site.popupLogin=function(a,c){try{if(!Site.getTopWindow().location.href){alert('您好,目前无法打开登录框,可能是以下原因:\n1、当前网页未完全加载,请稍后重试或刷新再试。\n2、不支持"域名转发"时登录。\n3、不支持"被其他网站嵌入"时登录。');return}}catch(b){alert('您好,目前无法打开登录框,可能是以下原因:\n1、当前网页未完全加载,请稍后重试或刷新再试。\n2、不支持"域名转发"时登录。\n3、不支持"被其他网站嵌入"时登录。');return}a=a+"/loginform.jsp?cid="+c+"&f="+Fai.encodeUrl(window.location.href)+"&rqDomain="+Fai.encodeUrl(Fai.top.document.domain);Fai.popupWindow({title:"登录",frameSrcUrl:a+"&track=2&ram="+Math.random(),width:"380",height:"175",frameScrolling:"no"})};Site.getFooterBottom=function(a){if(!a){if(Fai.top.$(".footerSupport").css("display")!="none"){return Fai.top.$(".footerSupport").offset().top}else{return Fai.top.$("#webFooter").offset().top+Fai.top.$("#webFooter").height()}}else{return Fai.top.$("#webFooter").offset().top+Fai.top.$("#webFooter").height()}};Site.navAppendToParent=function(b,c){if(!c){var a=Site.getTopWindow().$("#nav");if(Fai.top._useNavVersionTwo){a=Site.getTopWindow().$("#navV2Wrap")}if(Fai.top._isThemeNavFloatRight){a.appendTo(Site.getTopWindow().$("#webNav"))}else{if(b==0){Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"));a.appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"))}else{if(b==1){Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"));a.appendTo(Site.getTopWindow().$("#webHeader .headerNav"))}else{if(b==2){Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#containerMiddleLeft"));a.appendTo(Site.getTopWindow().$("#webHeader .headerNav"))}else{if(b==3||b==5){a.appendTo(Site.getTopWindow().$("#containerMiddleLeft"));Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#containerMiddleLeft"))}else{if(b==4||b==6){Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#containerMiddleCenterTop"));a.appendTo(Site.getTopWindow().$("#containerMiddleLeft"))}else{if(b==7){Site.getTopWindow().$("#banner").prependTo(Site.getTopWindow().$("#containerFormsCenter"));a.appendTo(Site.getTopWindow().$("#webHeader .headerNav"))}else{if(b==8){Site.getTopWindow().$("#banner").prependTo(Site.getTopWindow().$("#centerTopForms"));a.appendTo(Site.getTopWindow().$("#webHeader .headerNav"))}else{if(b==9){Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"));a.appendTo(Site.getTopWindow().$("#webNav"))}else{if(b==10){a.appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"));Site.getTopWindow().$("#banner").appendTo(Site.getTopWindow().$("#webBanner .bannerCenter"))}}}}}}}}}}}};Site.initTemplateLayout=function(c,d,b){var a=Fai.top.$("#webBanner");Site.navAppendToParent(c,d);if(c==0){a.show();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}else{if(c==1){a.show();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}else{if(c==2){a.hide();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}else{if(c==3){a.hide();Site.showNavSubMenu(1);setTimeout(function(){Site.showNavItemContainer()},200);Site.hideNavItemContainer()}else{if(c==4){a.hide();Site.showNavSubMenu(1);setTimeout(function(){Site.showNavItemContainer()},200);Site.hideNavItemContainer()}else{if(c==5){a.hide();Site.showNavSubMenu(1);setTimeout(function(){Site.showNavItemContainer()},200);Site.hideNavItemContainer()}else{if(c==6){a.hide();Site.showNavSubMenu(100);setTimeout(function(){Site.showNavItemContainer()},200);Site.hideNavItemContainer()}else{if(c==7){a.hide();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}else{if(c==8){a.hide();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}else{if(c==9||c==10){a.show();Site.showNavSubMenu(0);setTimeout(function(){Site.showNavItemContainer()},200)}}}}}}}}}}if(Fai.top._manageMode){setTimeout(function(){Site.absoluteNavDraggableAndResize(c,b)},300)}};Site.checkFaiAnchor=function(){var c=window.location.hash;var b=c.substring(1).split("_");if(b[0]!="fai"){return}var d=b[1],a=b[2];if(!!d){if(typeof a=="undefined"){a="top"}Site.jumpToModulePosition(d,a)}return};Site.logout=function(a){Fai.ing("正在退出系统...",false);$.ajax({type:"post",url:"ajax/login_h.jsp@cmd=logout",error:function(){Fai.ing("系统繁忙,请稍后重试。",false)},success:function(b){Fai.successHandle(b,"","系统繁忙,请稍后重试。",a,1,1)}})};Site.manageFaiscoAd=function(){if(_manageMode){$(".siteAdvertisement_box").mouseover(function(){$(".siteAdvertisement_boxTip").css("display","block")}).mouseleave(function(){$(".siteAdvertisement_boxTip").css("display","none")})}$(".reportUrl").mouseover(function(){$(this).text("举报此网站").css("text-decoration","underline")}).mouseleave(function(){$(this).text("举报").css("text-decoration","none")});$(".closeImg").click(function(){if(_manageMode){if(Fai.isDbg()){$.cookie("faiscoAd",false,{expires:1,path:"/",domain:"aaa.cn"})}else{$.cookie("faiscoAd",false,{expires:1,path:"/",domain:"faisco.cn"})}var a=$.cookie("faiscoAdLoopCount");if(a=="1"){Site.logDog(200004,22)}else{if(a=="2"){Site.logDog(200004,23)}else{if(a=="3"){Site.logDog(200004,24)}else{if(a=="4"){Site.logDog(200004,21)}}}}}$(".siteAdvertisement_box").css("display","none")})};Site.initMulColModuleInIE=function(a){if(Fai.isIE10()){$(a).find(".mulModuleColStyleLine").css("height",$(a).height()-25+"px")}};Site.initCorpTitleJump=function(){$("#corpTitle").click(function(){var b=$(this).attr("_href");if(b==""||b==null){return false}if($(this).find(".fkEditor").attr("contenteditable")=="true"){return false}var a=parseInt($(this).attr("_linktype"));if(Fai.top._titleData!=null&&Fai.top._titleData!=""){if(Fai.top._titleData.jm.ot===1){window.open(b)}else{Fai.top.location.href=b}}else{if(a===1){window.open(b)}else{Fai.top.location.href=b}}})};Site.onTitleSiteFixTop=function(){var g,i=false,a=false,s=Fai.isIE6(),r=Fai.isIE7(),A=Fai.top.$("#corpTitle"),v=Fai.top.$(window),o=Fai.top.$("#g_main"),d=Fai.top.$("#web"),l=Fai.top.$("body"),x=Fai.top.$(".webTopTable"),h=Fai.top.$(".floatLeftTop"),e=A.parent(),n=Fai.top.$("#sitetips"),m,w=parseInt(A.css("top").replace("px","")),t=A.offset().top-o.offset().top,k=A.position().left,q=n.height()||0,c=t,b=h.css("top").replace("px","")||0,p=Fai.top.$(window),z=p;if(s||r){a=true;z=o}var y=A.offset().left-e.offset().left;var u,j;z.off("scroll.title");z.on("scroll.title",function(){var C=z.scrollTop(),B=parseInt(h.css("top").replace("px",""))-1;b=B||0;g=Site.getNavInClientPosition(A).left;if(x.find("#corpTitle").length>0){m=x;m.css({zIndex:"60",position:"relative"})}if(!i&&cC){if(s){e.append(A);A.css({position:"absolute",left:k,top:t,zIndex:""})}else{A.removeClass("titlefixtop");A.css({position:"absolute",left:k,top:t})}i=false}});Fai.top.$(window).on("resize.title",function(){if(s&&A.offset().top==0){A.css("left",u.offset().left+j)}else{if(A.hasClass("titlefixtop")){setTimeout(function(){A.css("left",e.offset().left+y)},0)}}})};Site.onLogoSiteFixTop=function(){var g,k=false,a=false,t=Fai.isIE6(),r=Fai.isIE7(),h=Fai.top.$("#logo"),x=Fai.top.$(window),o=Fai.top.$("#g_main"),e=Fai.top.$("#web"),l=Fai.top.$("body"),y=Fai.top.$(".webTopTable"),j=Fai.top.$(".floatLeftTop"),i=h.parent(),n=Fai.top.$("#sitetips"),m,w=parseInt(h.css("top").replace("px","")),z=h.offset().top-o.offset().top,s=h.position().left,q=n.height()||0,d=z,c=j.css("top").replace("px","")||0,p=Fai.top.$(window),A=p;if(t||r){a=true;A=o}var v=h.offset().left-i.offset().left;var u,b;A.off("scroll.logo");A.on("scroll.logo",function(){var C=A.scrollTop(),B=parseInt(j.css("top").replace("px",""))-1;c=B||0;g=Site.getNavInClientPosition(h).left;if(y.find("#logo").length>0){m=y;m.css({zIndex:"60",position:"relative"})}if(!k&&dC){if(t){i.append(h);h.css({position:"absolute",left:s,top:z,zIndex:""})}else{h.removeClass("logofixtop");h.css({position:"absolute",left:s,top:z})}k=false}});Fai.top.$(window).on("resize.logo",function(){if(t&&h.offset().top==0){h.css("left",u.offset().left+b)}else{if(h.hasClass("logofixtop")){setTimeout(function(){h.css("left",i.offset().left+v)},0)}}})};Site.voidFun=function(){};Site.codeInsertButtom=function(d){var b=/document.write/g;d=d.replace(b,"Site.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)};Site.computeTabsWidthHideMore=function(e){var d=Fai.top.$("#module"+e).find(".formTabButtonTopCenter");var c=parseInt(d.css("width"))+4;var b=0;var a=d.find(".formTabButton");$.each(a,function(g,j){var h=parseInt($(j).css("width"));b+=h+5});b+=40;if(b>c){d.find(".formTabButtonMore").hide()}else{d.find(".formTabButtonMore").show()}};Site.wxShareAlter=function(b,d){var e=new Array();e.push("
    ");e.push("
    ");e.push("
    ");e.push(""+LS.weChatShare+"");e.push("
    ");e.push("
    ");e.push("
    ");e.push("
    ");var c=0;if(d){var a={title:"微信分享",width:480,height:480,divContent:e.join("")};c=Site.getTopWindow().Fai.popupWindowVersionTwo.createPopupWindow(a)}else{c=Site.getTopWindow().Fai.popupWindow({width:480,height:420,frameScrolling:"no",bannerDisplay:false,bgClose:true,closeBtnClass:"wxSharehideCloseBtn",divContent:e.join("")})}if(Fai.isIE6()&&Fai.top.$("#fixSelectIframe"+c).length>0){Fai.top.$("#fixSelectIframe"+c).remove()}};Site.hoverChangeImage=function(l){var o=[],g=[];var s=false;var p=this.body?this.body:(this.editor?this.editor.body:false);if(!!l&&l.length>0){o=l.find("img[_defImg][_hovImg], img[_defFont][_hovFont], div[_defFont][_hovFont], div[_defImg][_hovImg]");g=l.find(".J_hoverImage")}else{if(p){o=$(p).find("img[_defImg][_hovImg], img[_defFont][_hovFont], div[_defFont][_hovFont], div[_defImg][_hovImg]");g=$(p).find(".J_hoverImage")}else{o=$("img[_defImg][_hovImg], img[_defFont][_hovFont], div[_defFont][_hovFont], div[_defImg][_hovImg]");g=$(".J_hoverImage")}}if(o.length==0){return}g.remove();for(var t=0;t0||p)&&$(q).is("p, span, td");if(s){if(!(q[0].nodeName.toLowerCase()==="span"&&$(q).hasClass("J_hoverImageParent"))){var a="display: inline-block; width: "+u+"px; height: "+r+"px; _display: block; _zoom: 1;";$(w).after("");q=$(w).next("span");$(q).append($(w))}}var j=$(q).find(".J_hoverImage");if(j.length==0){x+="top: 0px; left: 0px; width:"+u+"px; height:"+r+"px;";if(!!m){font_size=u>r?r:u;x+="font-size:"+font_size+"px; text-align : center; line-height:"+r+"px;";j="
    "}else{j=""+d+""}$(w).after(j)}$(w).css("opacity","")}var v=$(o).parent();$.each(v,function(z,A){var B=$(this).find("img[_defImg], div[_defFont]")[0];if(typeof($(B).attr("_hovImg"))=="undefined"&&typeof($(B).attr("_hovFont"))=="undefined"){return}if(typeof($(B).attr("_hovImg"))!="undefined"&&$(B).attr("_hovImg").length==0){return}var y=$(A).parents(".form");if(Fai.isChrome()&&!$(y).hasClass("formStyle31")){$(A).css("position","relative")}$(A).off(".hoverImage");$(A).on("mouseenter.hoverImage",function(){var C=$(this).find("img[_defImg], div[_defFont]")[0];var D=$(this).find(".J_hoverImage");var i=$(this).find(".forMargin");b(C,D);$(C).stop(false,true).animate({opacity:0},500);$(D).stop(false,true).animate({opacity:1},500)}).on("mouseleave.hoverImage",function(){var i=$(this).find("img[_defImg], div[_defFont]")[0];var C=$(this).find(".J_hoverImage");b(i,C);$(C).stop(false,true).animate({opacity:0},500);$(i).stop(false,true).animate({opacity:1},500)})});function b(B,E){var z=$(B).width();var y=$(B).height();var A=$(B).position().top;var i=$(B).position().left;var D=$(B).css("margin-left");var C=$(B).css("margin-top");if(!!D){D=parseInt(D.replace("px",""));i+=D}if(!!C){C=parseInt(C.replace("px",""));A+=C}if($(B).context.tagName=="DIV"){$(B).parent().css("display","block")}$(E).css({top:A+"px",left:i+"px",width:z+"px",height:y+"px"})}};Site.hoverStyle=function(){var l=$("a[aStyle_h]");var m=this.body?this.body:(this.editor?this.editor.body:false);var h;var d;var e;var j=true;var k;var b;if(m){l=$(m).find("a[aStyle_h]")}if(l.length==0){return}for(var g=0;g0){for(var n=0;n0){a.each(function(){if(!!$(this).attr("data-stellar-background-ratio")){b=true;return}})}if(b){if(Fai.top._manageMode){Fai.top.$("#g_main").stellar("destroy");Fai.top.$("#g_main").stellar({horizontalScrolling:false,responsive:false})}else{$(Fai.top).stellar("destroy");$(Fai.top).stellar({horizontalScrolling:false,responsive:false})}}};Site.popupPwdTips=function(b,a,c){Site.getTopWindow().$.cookie("hasLoginSite","true",{expires:1,path:"/"});Site.getTopWindow().$(".formDialog .formX").trigger("click");var d=[];d+="
    ";d+="
    请先修改您的密码
    ";d+="
    您的密码过于简单,为避免盗号造成损失,请先修改密码
    ";d+="
    ";d+=" 暂不修改";d+=" 修改密码 ";d+="
    ";d+="
    ";Fai.ing2(d,false);Site.getTopWindow().$(".msg2").css({"text-align":"left",margin:"15px",width:"auto"});Site.getTopWindow().$(".tips2").css({height:"224px",width:"440px",border:"none"});Site.getTopWindow().$("#ing2").css({width:"452px","margin-top":"105px"});Site.getTopWindow().$("#ing2").css({transition:"opacity 0s ease",position:"fixed",top:"0"});Site.getTopWindow().$("#ing2,.tips2").css({transition:"opacity ease 0s","-webkit-box-shadow":"none","box-shadow":"none","-moz-box-shadow":"none"});Site.getTopWindow().$(".msg2").css({margin:"0px",width:"auto"});Fai.bg(0,0.7);Site.getTopWindow().$("body").css("overflow","hidden");Site.getTopWindow().$("#popupBg0").click(function(){Site.tipsClose(a,c)});Site.getTopWindow().$("#ing2 .close").bind("click",function(){Site.tipsClose(a,c)})};Site.tipsClose=function(a,b){Site.getTopWindow().Fai.removeIng2();Site.getTopWindow().Fai.removeBg();Site.getTopWindow().$("body").css("overflow","scroll");$.cookie("hasLoginSite","false",{expires:1,path:"/"});window.location.href="http://"+a+"."+b+""};Site.changeAdmHref=function(a,b){window.location.href="http://"+a+"."+b+""};Site.getDialogContent=function(b,a){var d=b?"suc-ico":"resultFailIcon";var c=["","","","","","","
    ","
    "+a+"
    ","
    "];return c.join("")}; /*! * Clamp.js 0.5.1 * * Copyright 2011-2013, Joseph Schmitt http://joe.sh * Released under the WTFPL license * http://sam.zoy.org/wtfpl/ * * 第三方 多行省略代码 */ (function(a,c){function b(j,l){l=l||{};var v=this,m=window,h={clamp:l.clamp||2,useNativeClamp:typeof(l.useNativeClamp)!="undefined"?l.useNativeClamp:true,splitOnChars:l.splitOnChars||[".","-","–","—"," "],animate:l.animate||false,truncationChar:l.truncationChar||"…",truncationHTML:l.truncationHTML},t=j.style,B=j.innerHTML,x=typeof(j.style.webkitLineClamp)!="undefined",g=h.clamp,o=g.indexOf&&(g.indexOf("px")>-1||g.indexOf("em")>-1),q;if(h.truncationHTML){q=document.createElement("span");q.innerHTML=h.truncationHTML}var e=h.splitOnChars.slice(0),y=e[0],s,A;if(g=="auto"){g=k()}else{if(o){g=k(parseInt(g))}}var r;if(x&&h.useNativeClamp){t.overflow="hidden";t.textOverflow="ellipsis";t.webkitBoxOrient="vertical";t.display="-webkit-box";t.webkitLineClamp=g;if(o){t.height=h.clamp+"px"}}else{var w=z(g);if(w<=j.clientHeight){r=i(d(j),w)}}return{original:B,clamped:r};function u(C,D){if(!m.getComputedStyle){m.getComputedStyle=function(E,F){this.el=E;this.getPropertyValue=function(H){var G=/(\-([a-z]){1})/g;if(H=="float"){H="styleFloat"}if(G.test(H)){H=H.replace(G,function(){return arguments[2].toUpperCase()})}return E.currentStyle&&E.currentStyle[H]?E.currentStyle[H]:null};return this}}return m.getComputedStyle(C,null).getPropertyValue(D)}function k(C){var D=C||j.clientHeight,E=p(j);return Math.max(Math.floor(D/E),0)}function z(C){var D=p(j);return D*C}function p(D){var C=u(D,"line-height");if(C=="normal"){C=parseInt(u(D,"font-size"))*1.2}return parseInt(C)}function d(C){if(C.lastChild.children&&C.lastChild.children.length>0){return d(Array.prototype.slice.call(C.children).pop())}else{if(!C.lastChild||!C.lastChild.nodeValue||C.lastChild.nodeValue==""||C.lastChild.nodeValue==h.truncationChar){C.lastChild.parentNode.removeChild(C.lastChild);return d(j)}else{return C.lastChild}}}function i(F,E){if(!E){return}function D(){e=h.splitOnChars.slice(0);y=e[0];s=null;A=null}var C=F.nodeValue.replace(h.truncationChar,"");if(!s){if(e.length>0){y=e.shift()}else{y=""}s=C.split(y)}if(s.length>1){A=s.pop();n(F,s.join(y))}else{s=null}if(q){F.nodeValue=F.nodeValue.replace(h.truncationChar,"");j.innerHTML=F.nodeValue+" "+q.innerHTML+h.truncationChar}if(s){if(j.clientHeight<=E){if(e.length>=0&&y!=""){n(F,s.join(y)+y+A);s=null}else{return j.innerHTML}}}else{if(y==""){n(F,"");F=d(j);D()}}if(h.animate){setTimeout(function(){i(F,E)},h.animate===true?10:h.animate)}else{return i(F,E)}}function n(C,D){C.nodeValue=D+h.truncationChar}}a.clamp=b})(Site);Site.userReadyOperateSite=function(){if(Fai.top._manageMode){Site.mallCartInit(_colId);Site.mobiWebInit()}if(!Fai.top._Global._footerHidden){if(!Fai.top._oem){Site.changeTheLogoSize()}Site.refreshFooterItemSpacing()}Site.bindInTabSwitch()};(function(){if(Fai.top!=window){return}var g=Fai.top.window.location.hash,b,c,a;if(!g){return}try{b=$(g)}catch(d){return}if(b.length<1){return}c=Fai.top._manageMode?"#g_main":Fai.top.window;a=b.parents(":not(#g_main)");$(c).one("scroll",function(){a.each(function(){if($(this).css("overflow")=="hidden"){$(this).scrollTop(0);$(this).scroll(function(){if($(this).scrollTop()!=0){$(this).scrollTop(0)}})}})})})();Site.loginSiteInit=function(b,a,d,e){var c=$.cookie("hasLoginSite");if(c=="true"&&c!=null){$.cookie("hasLoginSite","false",{expires:1,path:"/"});Site.changeAdmHref(b,a)}if(d){Fai.ing(e,true)}};Site.getModuleGMainRect=function(c){var j=Fai.top.$("#module"+c),h=Fai.top.$("#g_main"),e=Fai.top.$(window),b,i,g,d,k;if(j.length<1){return}b=j[0].getBoundingClientRect();i=b.top+(a()?h.scrollTop():e.scrollTop())-h.position().top;g=b.left+(a()?h.scrollLeft():e.scrollLeft())-h.position().left;d=b.width;k=b.height;return{left:g,top:i,right:g+d,bottom:i+k,width:d,height:k};function a(){return Fai.top._manageMode}};Site.switchJump=function(){var a=$(".switchJump");$.each(a,function(c,g){if(c==="length"){return}var d=g.getAttribute("href");var b=g.getAttribute("_mu")||g.getAttribute("mJUrl");var e=g.getAttribute("_mColHide");if(b==null&&!e){return}if(d==b){g.setAttribute("href","javascript:void(0);");g.setAttribute("style","text-decoration:none;");return}})};Site.serviceLogDog=function(){var a=$(".formStyle40 .serOnline-service, .formStyle44 .serOnline-service");a.find(">div[servicetype]").off("click.log").on("click.log",function(){var b=$(this).attr("servicetype");switch(parseInt(b)){case 0:Site.logDog(200172,1);break;case 1:Site.logDog(200172,4);break;case 2:Site.logDog(200172,2);break;case 3:Site.logDog(200172,3);break}});setTimeout(function(){$("#jiaxin-mcs-fixed-btn").off("click.log").on("click.log",function(){Site.logDog(200172,7)});$("#newBridge #nb_icon_wrap").off("click.log").on("click.log",function(){Site.logDog(200172,6)})},2000)};(function(){if(Fai.top!=window){return}var a=[];window.onerror=function(c,b,d){if(typeof Site=="undefined"){alert("您的网页未加载完成,请尝试按“CTRL+功能键F5”重新加载。")}if(d<1||typeof c!="string"||c.length<1){return}var g="Error:"+c+";Line:"+d+";Url:"+b;var e="Error:"+c+"\nLine:"+d+"\nUrl:"+b+"\n";var k=function(i){return typeof i==="undefined"?"":encodeURIComponent(i)};var l=true;var j={m:c,u:b,l:d};for(var h=0;hu[0].parent().height()){h._resetContentPosition.call(this)}else{h._scrollTo.call(this,v,y[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}if(w.axis!=="y"){if(!x.overflowed[1]){h._resetContentPosition.call(this);if(w.axis==="x"){h._unbindEvents.call(this)}else{if(w.axis==="yx"&&x.overflowed[0]){h._scrollTo.call(this,v,y[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}else{if(u[1].width()>u[1].parent().width()){h._resetContentPosition.call(this)}else{h._scrollTo.call(this,v,y[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}}h._autoUpdate.call(this)}})},scrollTo:function(t,s){if(typeof t=="undefined"||t==null){return}var r=h._selector.call(this);return i(r).each(function(){var w=i(this);if(w.data(a)){var z=w.data(a),y=z.opt,x={trigger:"external",scrollInertia:y.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:false,callbacks:true,onStart:true,onUpdate:true,onComplete:true},u=i.extend(true,{},x,s),A=h._arr.call(this,t),v=u.scrollInertia<17?17:u.scrollInertia;A[0]=h._to.call(this,A[0],"y");A[1]=h._to.call(this,A[1],"x");if(u.moveDragger){A[0]*=z.scrollRatio.y;A[1]*=z.scrollRatio.x}u.dur=v;setTimeout(function(){if(A[0]!==null&&typeof A[0]!=="undefined"&&y.axis!=="x"&&z.overflowed[0]){u.dir="y";u.overwrite="all";h._scrollTo.call(this,w,A[0].toString(),u)}if(A[1]!==null&&typeof A[1]!=="undefined"&&y.axis!=="y"&&z.overflowed[1]){u.dir="x";u.overwrite="none";h._scrollTo.call(this,w,A[1].toString(),u)}},60)}})},stop:function(){var r=h._selector.call(this);return i(r).each(function(){var s=i(this);if(s.data(a)){h._stop.call(null,s)}})},disable:function(t){var s=h._selector.call(this);return i(s).each(function(){var r=i(this);if(r.data(a)){var v=r.data(a),u=v.opt;h._autoUpdate.call(this,"remove");h._unbindEvents.call(this);if(t){h._resetContentPosition.call(this)}h._scrollbarVisibility.call(this,true);r.addClass("mCS_disabled")}})},destroy:function(){var r=h._selector.call(this);return i(r).each(function(){var u=i(this);if(u.data(a)){var w=u.data(a),v=w.opt,s=i("#mCSB_"+w.idx),t=i("#mCSB_"+w.idx+"_container"),x=i(".mCSB_"+w.idx+"_scrollbar");if(v.live){c(r)}h._autoUpdate.call(this,"remove");h._unbindEvents.call(this);h._resetContentPosition.call(this);u.removeData(a);h._delete.call(null,this.mcs);x.remove();s.replaceWith(t.contents());u.removeClass(e+" _"+a+"_"+w.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},h={_selector:function(){return(typeof i(this)!=="object"||i(this).length<1)?m:this},_theme:function(u){var t=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],s=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],r=["minimal","minimal-dark"],w=["minimal","minimal-dark"],v=["minimal","minimal-dark"];u.autoDraggerLength=i.inArray(u.theme,t)>-1?false:u.autoDraggerLength;u.autoExpandScrollbar=i.inArray(u.theme,s)>-1?false:u.autoExpandScrollbar;u.scrollButtons.enable=i.inArray(u.theme,r)>-1?false:u.scrollButtons.enable;u.autoHideScrollbar=i.inArray(u.theme,w)>-1?true:u.autoHideScrollbar;u.scrollbarPosition=i.inArray(u.theme,v)>-1?"outside":u.scrollbarPosition},_findAxis:function(r){return(r==="yx"||r==="xy"||r==="auto")?"yx":(r==="x"||r==="horizontal")?"x":"y"},_findScrollButtonsType:function(r){return(r==="stepped"||r==="pixels"||r==="step"||r==="click")?"stepped":"stepless"},_pluginMarkup:function(){var A=i(this),z=A.data(a),t=z.opt,v=t.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",D=["
    ","
    "],w=t.axis==="yx"?"mCSB_vertical_horizontal":t.axis==="x"?"mCSB_horizontal":"mCSB_vertical",y=t.axis==="yx"?D[0]+D[1]:t.axis==="x"?D[1]:D[0],x=t.axis==="yx"?"
    ":"",u=t.autoHideScrollbar?" mCS-autoHide":"",r=(t.axis!=="x"&&z.langDir==="rtl")?" mCS-dir-rtl":"";if(t.setWidth){A.css("width",t.setWidth)}if(t.setHeight){A.css("height",t.setHeight)}t.setLeft=(t.axis!=="y"&&z.langDir==="rtl")?"989999px":t.setLeft;A.addClass(e+" _"+a+"_"+z.idx+u+r).wrapInner("
    ");var s=i("#mCSB_"+z.idx),B=i("#mCSB_"+z.idx+"_container");if(t.axis!=="y"&&!t.advanced.autoExpandHorizontalScroll){B.css("width",h._contentWidth(B.children()))}if(t.scrollbarPosition==="outside"){if(A.css("position")==="static"){A.css("position","relative")}A.css("overflow","visible");s.addClass("mCSB_outside").after(y)}else{s.addClass("mCSB_inside").append(y);B.wrap(x)}h._scrollButtons.call(this);var C=[i("#mCSB_"+z.idx+"_dragger_vertical"),i("#mCSB_"+z.idx+"_dragger_horizontal")];C[0].css("min-height",C[0].height());C[1].css("min-width",C[1].width())},_contentWidth:function(r){return Math.max.apply(Math,r.map(function(){return i(this).outerWidth(true)}).get())},_expandContentHorizontally:function(){var s=i(this),u=s.data(a),t=u.opt,r=i("#mCSB_"+u.idx+"_container");if(t.advanced.autoExpandHorizontalScroll&&t.axis!=="y"){r.css({position:"absolute",width:"auto"}).wrap("
    ").css({width:(Math.ceil(r[0].getBoundingClientRect().right+0.4)-Math.floor(r[0].getBoundingClientRect().left)),position:"relative"}).unwrap()}},_scrollButtons:function(){var u=i(this),w=u.data(a),v=w.opt,s=i(".mCSB_"+w.idx+"_scrollbar:first"),t=["","","",""],r=[(v.axis==="x"?t[2]:t[0]),(v.axis==="x"?t[3]:t[1]),t[2],t[3]];if(v.scrollButtons.enable){s.prepend(r[0]).append(r[1]).next(".mCSB_scrollTools").prepend(r[2]).append(r[3])}},_maxHeight:function(){var v=i(this),y=v.data(a),x=y.opt,t=i("#mCSB_"+y.idx),s=v.css("max-height"),u=s.indexOf("%")!==-1,r=v.css("box-sizing");if(s!=="none"){var w=u?v.parent().height()*parseInt(s)/100:parseInt(s);if(r==="border-box"){w-=((v.innerHeight()-v.height())+(v.outerHeight()-v.innerHeight()))}t.css("max-height",Math.round(w))}},_setDraggerLength:function(){var x=i(this),u=x.data(a),r=i("#mCSB_"+u.idx),y=i("#mCSB_"+u.idx+"_container"),A=[i("#mCSB_"+u.idx+"_dragger_vertical"),i("#mCSB_"+u.idx+"_dragger_horizontal")],v=[r.height()/y.outerHeight(false),r.width()/y.outerWidth(false)],s=[parseInt(A[0].css("min-height")),Math.round(v[0]*A[0].parent().height()),parseInt(A[1].css("min-width")),Math.round(v[1]*A[1].parent().width())],t=k&&(s[1]s.height(),r>s.width()]},_resetContentPosition:function(){var v=i(this),x=v.data(a),w=x.opt,s=i("#mCSB_"+x.idx),t=i("#mCSB_"+x.idx+"_container"),u=[i("#mCSB_"+x.idx+"_dragger_vertical"),i("#mCSB_"+x.idx+"_dragger_horizontal")];h._stop(v);if((w.axis!=="x"&&!x.overflowed[0])||(w.axis==="y"&&x.overflowed[0])){u[0].add(t).css("top",0)}if((w.axis!=="y"&&!x.overflowed[1])||(w.axis==="x"&&x.overflowed[1])){var r=dx=0;if(x.langDir==="rtl"){r=s.width()-t.outerWidth(false);dx=Math.abs(r/x.scrollRatio.x)}t.css("left",r);u[1].css("left",dx)}},_bindEvents:function(){var t=i(this),v=t.data(a),u=v.opt;if(!v.bindEvents){h._draggable.call(this);if(u.contentTouchScroll){h._contentDraggable.call(this)}if(u.mouseWheel.enable){function s(){r=setTimeout(function(){if(!i.event.special.mousewheel){s()}else{clearTimeout(r);h._mousewheel.call(t[0])}},1000)}var r;s()}h._draggerRail.call(this);h._wrapperScroll.call(this);if(u.advanced.autoScrollOnFocus){h._focus.call(this)}if(u.scrollButtons.enable){h._buttons.call(this)}if(u.keyboard.enable){h._keyboard.call(this)}v.bindEvents=true}},_unbindEvents:function(){var u=i(this),v=u.data(a),r=a+"_"+v.idx,w=".mCSB_"+v.idx+"_scrollbar",t=i("#mCSB_"+v.idx+",#mCSB_"+v.idx+"_container,#mCSB_"+v.idx+"_container_wrapper,"+w+" .mCSB_draggerContainer,#mCSB_"+v.idx+"_dragger_vertical,#mCSB_"+v.idx+"_dragger_horizontal,"+w+">a"),s=i("#mCSB_"+v.idx+"_container");if(v.bindEvents){i(o).unbind("."+r);t.each(function(){i(this).unbind("."+r)});clearTimeout(u[0]._focusTimeout);h._delete.call(null,u[0]._focusTimeout);clearTimeout(v.sequential.step);h._delete.call(null,v.sequential.step);clearTimeout(s[0].onCompleteTimeout);h._delete.call(null,s[0].onCompleteTimeout);v.bindEvents=false}},_scrollbarVisibility:function(s){var v=i(this),x=v.data(a),w=x.opt,r=i("#mCSB_"+x.idx+"_container_wrapper"),t=r.length?r:i("#mCSB_"+x.idx+"_container"),y=[i("#mCSB_"+x.idx+"_scrollbar_vertical"),i("#mCSB_"+x.idx+"_scrollbar_horizontal")],u=[y[0].find(".mCSB_dragger"),y[1].find(".mCSB_dragger")];if(w.axis!=="x"){if(x.overflowed[0]&&!s){y[0].add(u[0]).add(y[0].children("a")).css("display","block");t.removeClass("mCS_no_scrollbar_y mCS_y_hidden")}else{if(w.alwaysShowScrollbar){if(w.alwaysShowScrollbar!==2){u[0].add(y[0].children("a")).css("display","none")}t.removeClass("mCS_y_hidden")}else{y[0].css("display","none");t.addClass("mCS_y_hidden")}t.addClass("mCS_no_scrollbar_y")}}if(w.axis!=="y"){if(x.overflowed[1]&&!s){y[1].add(u[1]).add(y[1].children("a")).css("display","block");t.removeClass("mCS_no_scrollbar_x mCS_x_hidden")}else{if(w.alwaysShowScrollbar){if(w.alwaysShowScrollbar!==2){u[1].add(y[1].children("a")).css("display","none")}t.removeClass("mCS_x_hidden")}else{y[1].css("display","none");t.addClass("mCS_x_hidden")}t.addClass("mCS_no_scrollbar_x")}}if(!x.overflowed[0]&&!x.overflowed[1]){v.addClass("mCS_no_scrollbar")}else{v.removeClass("mCS_no_scrollbar")}},_coordinates:function(s){var r=s.type;switch(r){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[s.originalEvent.pageY,s.originalEvent.pageX];break;case"touchstart":case"touchmove":case"touchend":var u=s.originalEvent.touches[0]||s.originalEvent.changedTouches[0];return[u.pageY,u.pageX];break;default:return[s.pageY,s.pageX]}},_draggable:function(){var w=i(this),u=w.data(a),r=u.opt,t=a+"_"+u.idx,v=["mCSB_"+u.idx+"_dragger_vertical","mCSB_"+u.idx+"_dragger_horizontal"],x=i("#mCSB_"+u.idx+"_container"),y=i("#"+v[0]+",#"+v[1]),C,A,B;y.bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(G){G.stopImmediatePropagation();G.preventDefault();if(!h._mouseBtnLeft(G)){return}p=true;if(k){o.onselectstart=function(){return false}}z(false);h._stop(w);C=i(this);var H=C.offset(),I=h._coordinates(G)[0]-H.top,D=h._coordinates(G)[1]-H.left,F=C.height()+H.top,E=C.width()+H.left;if(I0&&D0){A=I;B=D}h._onDragClasses(C,"active",r.autoExpandScrollbar)}).bind("touchmove."+t,function(E){E.stopImmediatePropagation();E.preventDefault();var F=C.offset(),G=h._coordinates(E)[0]-F.top,D=h._coordinates(E)[1]-F.left;s(A,B,G,D)});i(o).bind("mousemove."+t+" pointermove."+t+" MSPointerMove."+t,function(E){if(C){var F=C.offset(),G=h._coordinates(E)[0]-F.top,D=h._coordinates(E)[1]-F.left;if(A===G){return}s(A,B,G,D)}}).add(y).bind("mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(D){if(C){h._onDragClasses(C,"active",r.autoExpandScrollbar);C=null}p=false;if(k){o.onselectstart=null}z(true)});function z(D){var E=x.find("iframe");if(!E.length){return}var F=!D?"none":"auto";E.css("pointer-events",F)}function s(F,G,I,D){x[0].idleTimer=r.scrollInertia<233?250:0;if(C.attr("id")===v[1]){var E="x",H=((C[0].offsetLeft-G)+D)*u.scrollRatio.x}else{var E="y",H=((C[0].offsetTop-F)+I)*u.scrollRatio.y}h._scrollTo(w,H.toString(),{dir:E,drag:true})}},_contentDraggable:function(){var A=i(this),M=A.data(a),K=M.opt,H=a+"_"+M.idx,x=i("#mCSB_"+M.idx),B=i("#mCSB_"+M.idx+"_container"),y=[i("#mCSB_"+M.idx+"_dragger_vertical"),i("#mCSB_"+M.idx+"_dragger_horizontal")],G,I,N,O,E=[],F=[],J,C,w,v,L,z,t=0,s,u=K.axis==="yx"?"none":"all";B.bind("touchstart."+H+" pointerdown."+H+" MSPointerDown."+H,function(P){if(!h._pointerTouch(P)||p){return}var Q=B.offset();G=h._coordinates(P)[0]-Q.top;I=h._coordinates(P)[1]-Q.left}).bind("touchmove."+H+" pointermove."+H+" MSPointerMove."+H,function(S){if(!h._pointerTouch(S)||p){return}S.stopImmediatePropagation();C=h._getTime();var R=x.offset(),U=h._coordinates(S)[0]-R.top,W=h._coordinates(S)[1]-R.left,T="mcsLinearOut";E.push(U);F.push(W);if(M.overflowed[0]){var Q=y[0].parent().height()-y[0].height(),V=((G-U)>0&&(U-G)>-(Q*M.scrollRatio.y))}if(M.overflowed[1]){var P=y[1].parent().width()-y[1].width(),X=((I-W)>0&&(W-I)>-(P*M.scrollRatio.x))}if(V||X){S.preventDefault()}z=K.axis==="yx"?[(G-U),(I-W)]:K.axis==="x"?[null,(I-W)]:[(G-U),null];B[0].idleTimer=250;if(M.overflowed[0]){D(z[0],t,T,"y","all",true)}if(M.overflowed[1]){D(z[1],t,T,"x",u,true)}});x.bind("touchstart."+H+" pointerdown."+H+" MSPointerDown."+H,function(P){if(!h._pointerTouch(P)||p){return}P.stopImmediatePropagation();h._stop(A);J=h._getTime();var Q=x.offset();N=h._coordinates(P)[0]-Q.top;O=h._coordinates(P)[1]-Q.left;E=[];F=[]}).bind("touchend."+H+" pointerup."+H+" MSPointerUp."+H,function(R){if(!h._pointerTouch(R)||p){return}R.stopImmediatePropagation();w=h._getTime();var P=x.offset(),V=h._coordinates(R)[0]-P.top,X=h._coordinates(R)[1]-P.left;if((w-C)>30){return}L=1000/(w-J);var S="mcsEaseOut",T=L<2.5,Y=T?[E[E.length-2],F[F.length-2]]:[0,0];v=T?[(V-Y[0]),(X-Y[1])]:[V-N,X-O];var Q=[Math.abs(v[0]),Math.abs(v[1])];L=T?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[L,L];var W=[Math.abs(B[0].offsetTop)-(v[0]*r((Q[0]/L[0]),L[0])),Math.abs(B[0].offsetLeft)-(v[1]*r((Q[1]/L[1]),L[1]))];z=K.axis==="yx"?[W[0],W[1]]:K.axis==="x"?[null,W[1]]:[W[0],null];s=[(Q[0]*4)+K.scrollInertia,(Q[1]*4)+K.scrollInertia];var U=parseInt(K.contentTouchScroll)||0;z[0]=Q[0]>U?z[0]:0;z[1]=Q[1]>U?z[1]:0;if(M.overflowed[0]){D(z[0],s[0],S,"y",u,false)}if(M.overflowed[1]){D(z[1],s[1],S,"x",u,false)}});function r(R,P){var Q=[P*1.5,P*2,P/1.5,P/2];if(R>90){return P>4?Q[0]:Q[3]}else{if(R>60){return P>3?Q[3]:Q[2]}else{if(R>30){return P>8?Q[1]:P>6?Q[0]:P>4?P:Q[2]}else{return P>8?P:Q[3]}}}}function D(R,T,U,Q,P,S){if(!R){return}h._scrollTo(A,R.toString(),{dur:T,scrollEasing:U,dir:Q,overwrite:P,drag:S})}},_mousewheel:function(){var u=i(this),w=u.data(a),v=w.opt,s=a+"_"+w.idx,r=i("#mCSB_"+w.idx),t=[i("#mCSB_"+w.idx+"_dragger_vertical"),i("#mCSB_"+w.idx+"_dragger_horizontal")];r.bind("mousewheel."+s,function(B,F){h._stop(u);if(h._disableMousewheel(u,B.target)){return}var D=v.mouseWheel.deltaFactor!=="auto"?parseInt(v.mouseWheel.deltaFactor):(k&&B.deltaFactor<100)?100:B.deltaFactor<40?40:B.deltaFactor||100;if(v.axis==="x"||v.mouseWheel.axis==="x"){var y="x",E=[Math.round(D*w.scrollRatio.x),parseInt(v.mouseWheel.scrollAmount)],A=v.mouseWheel.scrollAmount!=="auto"?E[1]:E[0]>=r.width()?r.width()*0.9:E[0],G=Math.abs(i("#mCSB_"+w.idx+"_container")[0].offsetLeft),C=t[1][0].offsetLeft,z=t[1].parent().width()-t[1].width(),x=B.deltaX||B.deltaY||F}else{var y="y",E=[Math.round(D*w.scrollRatio.y),parseInt(v.mouseWheel.scrollAmount)],A=v.mouseWheel.scrollAmount!=="auto"?E[1]:E[0]>=r.height()?r.height()*0.9:E[0],G=Math.abs(i("#mCSB_"+w.idx+"_container")[0].offsetTop),C=t[0][0].offsetTop,z=t[0].parent().height()-t[0].height(),x=B.deltaY||F}if((y==="y"&&!w.overflowed[0])||(y==="x"&&!w.overflowed[1])){return}if(v.mouseWheel.invert){x=-x}if(v.mouseWheel.normalizeDelta){x=x<0?-1:1}if((x>0&&C!==0)||(x<0&&C!==z)||v.mouseWheel.preventDefault){B.stopImmediatePropagation();B.preventDefault()}h._scrollTo(u,(G-(x*A)).toString(),{dir:y})})},_disableMousewheel:function(t,v){var r=v.nodeName.toLowerCase(),s=t.data(a).opt.mouseWheel.disableOver,u=["select","textarea"];return i.inArray(r,s)>-1&&!(i.inArray(r,u)>-1&&!i(v).is(":focus"))},_draggerRail:function(){var u=i(this),v=u.data(a),s=a+"_"+v.idx,t=i("#mCSB_"+v.idx+"_container"),w=t.parent(),r=i(".mCSB_"+v.idx+"_scrollbar .mCSB_draggerContainer");r.bind("touchstart."+s+" pointerdown."+s+" MSPointerDown."+s,function(x){p=true}).bind("touchend."+s+" pointerup."+s+" MSPointerUp."+s,function(x){p=false}).bind("click."+s,function(B){if(i(B.target).hasClass("mCSB_draggerContainer")||i(B.target).hasClass("mCSB_draggerRail")){h._stop(u);var y=i(this),A=y.find(".mCSB_dragger");if(y.parent(".mCSB_scrollTools_horizontal").length>0){if(!v.overflowed[1]){return}var x="x",z=B.pageX>A.offset().left?-1:1,C=Math.abs(t[0].offsetLeft)-(z*(w.width()*0.9))}else{if(!v.overflowed[0]){return}var x="y",z=B.pageY>A.offset().top?-1:1,C=Math.abs(t[0].offsetTop)-(z*(w.height()*0.9))}h._scrollTo(u,C.toString(),{dir:x,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var t=i(this),v=t.data(a),u=v.opt,r=a+"_"+v.idx,s=i("#mCSB_"+v.idx+"_container"),w=s.parent();s.bind("focusin."+r,function(z){var y=i(o.activeElement),A=s.find(".mCustomScrollBox").length,x=0;if(!y.is(u.advanced.autoScrollOnFocus)){return}h._stop(t);clearTimeout(t[0]._focusTimeout);t[0]._focusTimer=A?(x+17)*A:0;t[0]._focusTimeout=setTimeout(function(){var E=[y.offset().top-s.offset().top,y.offset().left-s.offset().left],D=[s[0].offsetTop,s[0].offsetLeft],B=[(D[0]+E[0]>=0&&D[0]+E[0]=0&&D[0]+E[1]a");s.bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t+" mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t+" mouseout."+t+" pointerout."+t+" MSPointerOut."+t+" click."+t,function(B){B.preventDefault();if(!h._mouseBtnLeft(B)){return}var A=i(this).attr("class");r.type=x.scrollButtons.scrollType;switch(B.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(r.type==="stepped"){return}p=true;y.tweenRunning=false;z("on",A);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(r.type==="stepped"){return}p=false;if(r.dir){z("off",A)}break;case"click":if(r.type!=="stepped"||y.tweenRunning){return}z("on",A);break}function z(C,D){r.scrollAmount=x.snapAmount||x.scrollButtons.scrollAmount;h._sequentialScroll.call(this,w,C,D)}})},_keyboard:function(){var w=i(this),v=w.data(a),s=v.opt,z=v.sequential,u=a+"_"+v.idx,t=i("#mCSB_"+v.idx),y=i("#mCSB_"+v.idx+"_container"),r=y.parent(),x="input,textarea,select,datalist,keygen,[contenteditable='true']";t.attr("tabindex","0").bind("blur."+u+" keydown."+u+" keyup."+u,function(F){switch(F.type){case"blur":if(v.tweenRunning&&z.dir){A("off",null)}break;case"keydown":case"keyup":var C=F.keyCode?F.keyCode:F.which,D="on";if((s.axis!=="x"&&(C===38||C===40))||(s.axis!=="y"&&(C===37||C===39))){if(((C===38||C===40)&&!v.overflowed[0])||((C===37||C===39)&&!v.overflowed[1])){return}if(F.type==="keyup"){D="off"}if(!i(o.activeElement).is(x)){F.preventDefault();F.stopImmediatePropagation();A(D,C)}}else{if(C===33||C===34){if(v.overflowed[0]||v.overflowed[1]){F.preventDefault();F.stopImmediatePropagation()}if(F.type==="keyup"){h._stop(w);var E=C===34?-1:1;if(s.axis==="x"||(s.axis==="yx"&&v.overflowed[1]&&!v.overflowed[0])){var B="x",G=Math.abs(y[0].offsetLeft)-(E*(r.width()*0.9))}else{var B="y",G=Math.abs(y[0].offsetTop)-(E*(r.height()*0.9))}h._scrollTo(w,G.toString(),{dir:B,scrollEasing:"mcsEaseInOut"})}}else{if(C===35||C===36){if(!i(o.activeElement).is(x)){if(v.overflowed[0]||v.overflowed[1]){F.preventDefault();F.stopImmediatePropagation()}if(F.type==="keyup"){if(s.axis==="x"||(s.axis==="yx"&&v.overflowed[1]&&!v.overflowed[0])){var B="x",G=C===35?Math.abs(r.width()-y.outerWidth(false)):0}else{var B="y",G=C===35?Math.abs(r.height()-y.outerHeight(false)):0}h._scrollTo(w,G.toString(),{dir:B,scrollEasing:"mcsEaseInOut"})}}}}}break}function A(H,I){z.type=s.keyboard.scrollType;z.scrollAmount=s.snapAmount||s.keyboard.scrollAmount;if(z.type==="stepped"&&v.tweenRunning){return}h._sequentialScroll.call(this,w,H,I)}})},_sequentialScroll:function(t,w,u){var y=t.data(a),s=y.opt,A=y.sequential,z=i("#mCSB_"+y.idx+"_container"),r=A.type==="stepped"?true:false;switch(w){case"on":A.dir=[(u==="mCSB_buttonRight"||u==="mCSB_buttonLeft"||u===39||u===37?"x":"y"),(u==="mCSB_buttonUp"||u==="mCSB_buttonLeft"||u===38||u===37?-1:1)];h._stop(t);if(h._isNumeric(u)&&A.type==="stepped"){return}v(r);break;case"off":x();if(r||(y.tweenRunning&&A.dir)){v(true)}break}function v(B){var H=A.type!=="stepped",L=!B?1000/60:H?s.scrollInertia/1.5:s.scrollInertia,D=!B?2.5:H?7.5:40,K=[Math.abs(z[0].offsetTop),Math.abs(z[0].offsetLeft)],G=[y.scrollRatio.y>10?10:y.scrollratio.y,y.scrollratio.x>10?10:y.scrollRatio.x],E=A.dir[0]==="x"?K[1]+(A.dir[1]*(G[1]*D)):K[0]+(A.dir[1]*(G[0]*D)),J=A.dir[0]==="x"?K[1]+(A.dir[1]*parseInt(A.scrollAmount)):K[0]+(A.dir[1]*parseInt(A.scrollAmount)),I=A.scrollAmount!=="auto"?J:E,F=!B?"mcsLinear":H?"mcsLinearOut":"mcsEaseInOut",C=!B?false:true;if(B&&L<17){I=A.dir[0]==="x"?K[1]:K[0]}h._scrollTo(t,I.toString(),{dir:A.dir[0],scrollEasing:F,dur:L,onComplete:C});if(B){A.dir=false;return}clearTimeout(A.step);A.step=setTimeout(function(){v()},L)}function x(){clearTimeout(A.step);h._stop(t)}},_arr:function(t){var s=i(this).data(a).opt,r=[];if(typeof t==="function"){t=t()}if(!(t instanceof Array)){r[0]=t.y?t.y:t.x||s.axis==="x"?null:t;r[1]=t.x?t.x:t.y||s.axis==="y"?null:t}else{r=t.length>1?[t[0],t[1]]:s.axis==="x"?[null,t[0]]:[t[0],null]}if(typeof r[0]==="function"){r[0]=r[0]()}if(typeof r[1]==="function"){r[1]=r[1]()}return r},_to:function(w,x){if(w==null||typeof w=="undefined"){return}var D=i(this),C=D.data(a),v=C.opt,E=i("#mCSB_"+C.idx+"_container"),s=E.parent(),G=typeof w;if(!x){x=v.axis==="x"?"x":"y"}var r=x==="x"?E.outerWidth(false):E.outerHeight(false),y=x==="x"?E.offset().left:E.offset().top,F=x==="x"?E[0].offsetLeft:E[0].offsetTop,A=x==="x"?"left":"top";switch(G){case"function":return w();break;case"object":if(w.nodeType){var B=x==="x"?i(w).offset().left:i(w).offset().top}else{if(w.jquery){if(!w.length){return}var B=x==="x"?w.offset().left:w.offset().top}}return B-y;break;case"string":case"number":if(h._isNumeric.call(null,w)){return Math.abs(w)}else{if(w.indexOf("%")!==-1){return Math.abs(r*parseInt(w)/100)}else{if(w.indexOf("-=")!==-1){return Math.abs(F-parseInt(w.split("-=")[1]))}else{if(w.indexOf("+=")!==-1){var u=(F+parseInt(w.split("+=")[1]));return u>=0?0:Math.abs(u)}else{if(w.indexOf("px")!==-1&&h._isNumeric.call(null,w.split("px")[0])){return Math.abs(w.split("px")[0])}else{if(w==="top"||w==="left"){return 0}else{if(w==="bottom"){return Math.abs(s.height()-E.outerHeight(false))}else{if(w==="right"){return Math.abs(s.width()-E.outerWidth(false))}else{if(w==="first"||w==="last"){var z=E.find(":"+w),B=x==="x"?i(z).offset().left:i(z).offset().top;return B-y}else{if(i(w).length){var B=x==="x"?i(w).offset().left:i(w).offset().top;return B-y}else{E.css(A,w);b.update.call(null,D[0]);return}}}}}}}}}}break}},_autoUpdate:function(s){var v=i(this),H=v.data(a),B=H.opt,x=i("#mCSB_"+H.idx+"_container");if(s){clearTimeout(x[0].autoUpdate);h._delete.call(null,x[0].autoUpdate);return}var u=x.parent(),r=[i("#mCSB_"+H.idx+"_scrollbar_vertical"),i("#mCSB_"+H.idx+"_scrollbar_horizontal")],F=function(){return[r[0].is(":visible")?r[0].outerHeight(true):0,r[1].is(":visible")?r[1].outerWidth(true):0]},G=A(),z,w=[x.outerHeight(false),x.outerWidth(false),u.height(),u.width(),F()[0],F()[1]],J,D=I(),y;E();function E(){clearTimeout(x[0].autoUpdate);x[0].autoUpdate=setTimeout(function(){if(B.advanced.updateOnSelectorChange){z=A();if(z!==G){t();G=z;return}}if(B.advanced.updateOnContentResize){J=[x.outerHeight(false),x.outerWidth(false),u.height(),u.width(),F()[0],F()[1]];if(J[0]!==w[0]||J[1]!==w[1]||J[2]!==w[2]||J[3]!==w[3]||J[4]!==w[4]||J[5]!==w[5]){t();w=J}}if(B.advanced.updateOnImageLoad){y=I();if(y!==D){x.find("img").each(function(){C(this.src)});D=y}}if(B.advanced.updateOnSelectorChange||B.advanced.updateOnContentResize||B.advanced.updateOnImageLoad){E()}},60)}function I(){var K=0;if(B.advanced.updateOnImageLoad){K=x.find("img").length}return K}function C(N){var K=new Image();function M(O,P){return function(){return P.apply(O,arguments)}}function L(){this.onload=null;t()}K.onload=M(K,L);K.src=N}function A(){if(B.advanced.updateOnSelectorChange===true){B.advanced.updateOnSelectorChange="*"}var K=0,L=x.find(B.advanced.updateOnSelectorChange);if(B.advanced.updateOnSelectorChange&&L.length>0){L.each(function(){K+=i(this).height()+i(this).width()})}return K}function t(){clearTimeout(x[0].autoUpdate);b.update.call(null,v[0])}},_snapAmount:function(t,r,s){return(Math.round(t/r)*r-s)},_stop:function(r){var t=r.data(a),s=i("#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal");s.each(function(){h._stopTween.call(this)})},_scrollTo:function(s,u,w){var K=s.data(a),G=K.opt,F={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:false,dur:G.scrollInertia,overwrite:"all",callbacks:true,onStart:true,onUpdate:true,onComplete:true},w=i.extend(F,w),I=[w.dur,(w.drag?0:w.dur)],x=i("#mCSB_"+K.idx),D=i("#mCSB_"+K.idx+"_container"),M=G.callbacks.onTotalScrollOffset?h._arr.call(s,G.callbacks.onTotalScrollOffset):[0,0],r=G.callbacks.onTotalScrollBackOffset?h._arr.call(s,G.callbacks.onTotalScrollBackOffset):[0,0];K.trigger=w.trigger;if(G.snapAmount){u=h._snapAmount(u,G.snapAmount,G.snapOffset)}switch(w.dir){case"x":var z=i("#mCSB_"+K.idx+"_dragger_horizontal"),B="left",E=D[0].offsetLeft,J=[x.width()-D.outerWidth(false),z.parent().width()-z.width()],t=[u,(u/K.scrollRatio.x)],N=M[1],L=r[1],C=N>0?N/K.scrollRatio.x:0,y=L>0?L/K.scrollRatio.x:0;break;case"y":var z=i("#mCSB_"+K.idx+"_dragger_vertical"),B="top",E=D[0].offsetTop,J=[x.height()-D.outerHeight(false),z.parent().height()-z.height()],t=[u,(u/K.scrollRatio.y)],N=M[0],L=r[0],C=N>0?N/K.scrollRatio.y:0,y=L>0?L/K.scrollRatio.y:0;break}if(t[1]<0){t=[0,0]}else{if(t[1]>=J[1]){t=[J[0],J[1]]}else{t[0]=-t[0]}}clearTimeout(D[0].onCompleteTimeout);if(!K.tweenRunning&&((E===0&&t[0]>=0)||(E===J[0]&&t[0]<=J[0]))){return}h._tweenTo.call(null,z[0],B,Math.round(t[1]),I[1],w.scrollEasing);h._tweenTo.call(null,D[0],B,Math.round(t[0]),I[0],w.scrollEasing,w.overwrite,{onStart:function(){if(w.callbacks&&w.onStart&&!K.tweenRunning){if(v("onScrollStart")){H();G.callbacks.onScrollStart.call(s[0])}K.tweenRunning=true;h._onDragClasses(z);K.cbOffsets=A()}},onUpdate:function(){if(w.callbacks&&w.onUpdate){if(v("whileScrolling")){H();G.callbacks.whileScrolling.call(s[0])}}},onComplete:function(){if(w.callbacks&&w.onComplete){if(G.axis==="yx"){clearTimeout(D[0].onCompleteTimeout)}var O=D[0].idleTimer||0;D[0].onCompleteTimeout=setTimeout(function(){if(v("onScroll")){H();G.callbacks.onScroll.call(s[0])}if(v("onTotalScroll")&&t[1]>=J[1]-C&&K.cbOffsets[0]){H();G.callbacks.onTotalScroll.call(s[0])}if(v("onTotalScrollBack")&&t[1]<=y&&K.cbOffsets[1]){H();G.callbacks.onTotalScrollBack.call(s[0])}K.tweenRunning=false;D[0].idleTimer=0;h._onDragClasses(z,"hide")},O)}}});function v(O){return K&&G.callbacks[O]&&typeof G.callbacks[O]==="function"}function A(){return[G.callbacks.alwaysTriggerOffsets||E>=J[0]+N,G.callbacks.alwaysTriggerOffsets||E<=-L]}function H(){var Q=[D[0].offsetTop,D[0].offsetLeft],R=[z[0].offsetTop,z[0].offsetLeft],O=[D.outerHeight(false),D.outerWidth(false)],P=[x.height(),x.width()];s[0].mcs={content:D,top:Q[0],left:Q[1],draggerTop:R[0],draggerLeft:R[1],topPct:Math.round((100*Math.abs(Q[0]))/(Math.abs(O[0])-P[0])),leftPct:Math.round((100*Math.abs(Q[1]))/(Math.abs(O[1])-P[1])),direction:w.dir}}},_tweenTo:function(t,w,u,s,C,v,L){var L=L||{},I=L.onStart||function(){},D=L.onUpdate||function(){},J=L.onComplete||function(){},B=h._getTime(),z,x=0,F=t.offsetTop,G=t.style;if(w==="left"){F=t.offsetLeft}var A=u-F;t._mcsstop=0;if(v!=="none"){E()}r();function K(){if(t._mcsstop){return}if(!x){I.call()}x=h._getTime()-B;H();if(x>=t._mcstime){t._mcstime=(x>t._mcstime)?x+z-(x-t._mcstime):x+z-1;if(t._mcstime0){t._mcscurrVal=y(t._mcstime,F,A,s,C);G[w]=Math.round(t._mcscurrVal)+"px"}else{G[w]=u+"px"}D.call()}function r(){z=1000/60;t._mcstime=x+z;_request=(!n.requestAnimationFrame)?function(M){H();return setTimeout(M,0.01)}:n.requestAnimationFrame;t._mcsid=_request(K)}function E(){if(t._mcsid==null){return}if(!n.requestAnimationFrame){clearTimeout(t._mcsid)}else{n.cancelAnimationFrame(t._mcsid)}t._mcsid=null}function y(O,N,S,R,P){switch(P){case"linear":case"mcsLinear":return S*O/R+N;break;case"mcsLinearOut":O/=R;O--;return S*Math.sqrt(1-O*O)+N;break;case"easeInOutSmooth":O/=R/2;if(O<1){return S/2*O*O+N}O--;return -S/2*(O*(O-2)-1)+N;break;case"easeInOutStrong":O/=R/2;if(O<1){return S/2*Math.pow(2,10*(O-1))+N}O--;return S/2*(-Math.pow(2,-10*O)+2)+N;break;case"easeInOut":case"mcsEaseInOut":O/=R/2;if(O<1){return S/2*O*O*O+N}O-=2;return S/2*(O*O*O+2)+N;break;case"easeOutSmooth":O/=R;O--;return -S*(O*O*O*O-1)+N;break;case"easeOutStrong":return S*(-Math.pow(2,-10*O/R)+1)+N;break;case"easeOut":case"mcsEaseOut":default:var Q=(O/=R)*O,M=Q*O;return N+S*(0.499999999999997*M*Q+-2.5*Q*Q+5.5*M+-6.5*Q+4*O)}}},_getTime:function(){if(n.performance&&n.performance.now){return n.performance.now()}else{if(n.performance&&n.performance.webkitNow){return n.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}},_stopTween:function(){var r=this;if(r._mcsid==null){return}if(!n.requestAnimationFrame){clearTimeout(r._mcsid)}else{n.cancelAnimationFrame(r._mcsid)}r._mcsid=null;r._mcsstop=1},_delete:function(s){try{delete s}catch(r){s=null}},_mouseBtnLeft:function(r){return !(r.which&&r.which!==1)},_pointerTouch:function(s){var r=s.originalEvent.pointerType;return !(r&&r!=="touch"&&r!==2)},_isNumeric:function(r){return !isNaN(parseFloat(r))&&isFinite(r)}};var j=("https:"==o.location.protocol)?"https:":"http:";i.fn[e]=function(r){if(b[r]){return b[r].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof r==="object"||!r){return b.init.apply(this,arguments)}else{i.error("Method "+r+" does not exist")}}};i[e]=function(r){if(b[r]){return b[r].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof r==="object"||!r){return b.init.apply(this,arguments)}else{i.error("Method "+r+" does not exist")}}};i[e].defaults=g;n[e]=true;i(n).load(function(){i(m)[e]()})})(jQuery,window,document);