if(!TB.Mall){TB.namespace("Mall")}
TB.Mall=function(){var A=YAHOO.util,D=YAHOO.lang,F=A.Dom,E=A.Event;var G="current";var B=null;var C=100;
function I(J){try{E.on(J,"mouseenter",function(){F.addClass(this,G)});E.on(J,"mouseleave",function(){F.removeClass(this,G)})}catch(K){}}function H(J){var K=null;var M=F.getChildren(J);
function L(O){try{if(O!=K){F.removeClass(K,G);F.addClass(O,G);K=O}}catch(P){}}try{F.addClass(M[0],G);K=M[0];Array.forEach(M,function(O){if(TB.bom.isIE){E.on(O,"mouseenter",function(){L(this)})}else{E.on(O,"mouseover",function(Q){var P=E.getRelatedTarget(Q);if(P!==this&&!F.isAncestor(this,P)){L(this)}})}})}catch(N){}}return{showSubItems:function(K){if(!K){return false}var N=F.getChildren(K);var M;function L(P,Q){M=setTimeout(function(){var R=E.getRelatedTarget(Q);if(R!==P&&!F.isAncestor(P,R)){F.addClass(P,G)}},C)}function J(Q,R){if(M){clearTimeout(M)}var P=E.getRelatedTarget(R);if(P!==Q&&!F.isAncestor(Q,P)){F.removeClass(Q,G)}}try{if(TB.bom.isIE){Array.forEach(N,function(P){E.on(P,"mouseenter",function(){M=setTimeout(function(){F.addClass(P,G)},C)});E.on(P,"mouseleave",function(){if(M){clearTimeout(M)}F.removeClass(P,G)})})}else{Array.forEach(N,function(P){E.on(P,"mouseover",function(Q){L(P,Q)});E.on(P,"mouseout",function(Q){J(P,Q)})})}}catch(O){}},toggleAllItems:function(J,Q){J=F.get(J);Q=F.get(Q);if(!J||!Q){return false}var O=J.parentNode;var P=Q.parentNode;var M,L;function K(){if(M){clearTimeout(M)}M=setTimeout(function(){F.addClass(O,"collapse-head");F.addClass(J,"extend-trigger");F.addClass(Q,"show")},C)}function N(){if(L){clearTimeout(L)}L=setTimeout(function(){F.removeClass(O,"collapse-head");F.removeClass(J,"extend-trigger");F.removeClass(Q,"show")},C)}if(TB.bom.isIE){E.on(P,"mouseenter",K);E.on(P,"mouseleave",N)}else{E.on(P,"mouseover",K);E.on(P,"mouseout",N)}},switchCurrents:function(M,K){var J=F.getElementsByClassName(M,K);try{Array.forEach(J,H)}catch(L){}},simulateSelect:function(J,Q){J=F.get(J);Q=F.get(Q);try{var R=J.getElementsByTagName("span")[0];var P=J.getElementsByTagName("ul")[0];var M=P.parentNode;M.isShow=false;var O=F.getChildren(P);if(O.length){var L=O[0];var K=L.getAttribute("value");R.innerHTML=L.innerHTML;Q.value=(K=="all")?"":K}else{return }E.on(R,"click",function(S){E.stopPropagation(S);if(B&&B!=M){F.removeClass(B,"extend");B.isShow=false}if(!M.isShow){F.addClass(M,"extend");M.isShow=true;B=M}else{F.removeClass(M,"extend");M.isShow=false}});E.on(document,"click",function(){F.removeClass(M,"extend");M.isShow=false});Array.forEach(O,function(S){if(TB.bom.isIE6){I(S)}E.on(S,"click",function(){R.innerHTML=this.innerHTML;Q.value=this.getAttribute("value");F.removeClass(M,"extend");M.isShow=false})})}catch(N){}}}}();
TB.namespace("app.Ark");ShoppingOrder=TB.app.Ark.ShoppingOrder=(function(){var C="my-order";var I="my-orderinfo";var B="login-info";var D="J_ClosePopup";var E;var F=YAHOO.lang;var A=null;var G=(function(){return{element:null,timeout:null,init:function(){this.element=$(I);$E.on(this.element,"mouseout",function(L){var K=$E.getRelatedTarget(L);if(K!==this.element&&!$D.isAncestor(this.element,K)){this.hide()}},this,true);$E.on(D,"click",function(K){this.hide()},this,true)},render:function(L){if(L.login==="true"){var K=F.substitute(J,{wariPay:L.waitBuyerPayCount,waitConfirm:L.waitBuyerConfirmCount});$(B).innerHTML=K}},show:function(){$D.setStyle(this.element,"display","block")},hide:function(K){if(this.timeout){this.timeout.cancel();this.timeout=null}$D.setStyle(this.element,"display","none")}}})();var H={};H.attachEventToOrderTrigger=function(){var J=K+"?t="+(new Date()).getTime();$E.on(E,"mouseover",function(){if(A){A.cancel()}A=F.later(100,this,function(){YAHOO.util.Get.script(J,{onSuccess:function(){if(H.__data){G.render(H.__data)}},autopurge:false});G.show()})});$E.on(E,"mouseout",function(){if(A){A.cancel()}})};H._init=function(){};$E.onAvailable(I,H._init,H,true);return H})();var TB=TB||{};
TB.arktop=new function(){function C(H){var G=document.cookie.match("(?:^|;)\\s*"+H+"=([^;]*)");
return(G&&G[1])?decodeURIComponent(G[1]):""}
var D=C("tracknick");
var F=C("sn");
var B=C("_nk_");
var A=C("cart_items")||0;
var E="ark:itemCount";
this.writeLoginStatus=function(G,M,K){


document.write(H)};this.reGetCartItemsFromShop=function(G){}};(
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																											function(){var C=YAHOO.util,A=C.Event,B=C.Dom;A.onContentReady("all-items",function(){TB.Mall.toggleAllItems("J_Toggle","J_Allitems_Content")});A.onAvailable("J_Menu",function(){TB.Mall.showSubItems(this)});A.onAvailable("J_Select_type",function(){TB.Mall.simulateSelect(this,"type")});A.onAvailable("J_Select_cat",function(){TB.Mall.simulateSelect(this,"cat")})})();
