;(function(){var n,t;String.prototype.trim=function(){var n=this,i,t;n=n.replace(/^\s\s*/,""),i=/\s/,t=n.length;while(i.test(n.charAt(--t)));return n.slice(0,t+1)},n=window.Letao||{},n={_INSTALL:function(){window.Letao=n},Base:{},DAO:{},Business:{},UI:{},Page:{}},t=null,t=function(i){var u,r;return typeof t.__list=="undefined"&&(u=function(){var n=[];this.get=function(){return n},this.set=function(t){return n=t,this},this.remove=function(t){return n.splice(t,1),this}},u.prototype.add=function(n){return this.get().push(n),this},u.prototype.clear=function(){return this.set([]),this},t.__list=u),typeof t.__constructor=="undefined"&&(r=function(n){var u,r,i;this._bindObject=n,this._focusObject=null,this._focusData=null,this._firstData=null,this._lastData=null,this._mouseBind=!1,this._keyBind=!1,this.uuid=null,this.lock={ajax:!1,input:!1},this.timer={ajax:null,input:null},this.memorize={on:!1,content:{},indexer:[],maxcount:100},this.list=new t.__list,this.dom={outer:{obj:null,lable:"ul",css:{position:"absolute",border:"1px solid #aaa","border-top":"0","background-color":"#fff"}},inner:{lable:"li",css:{"font-weight":"700","line-height":"24px",height:"24px","font-size":"14px",padding:"0 6px","border-bottom":"0","background-color":"#fff",position:"relative",cursor:"default"},focus:{"background-color":"#e2eaff"},blur:{"background-color":"#fff"}},em:{lable:"em",css:{"font-size":"14px",color:"#333","line-height":"24px",cursor:"default"}},count:{lable:"i",css:{"font-size":"10px",color:"#999",position:"absolute",right:"8px",top:"10px"}}},this.config={listStruct:{keyword:"Keyword",searchCount:"SearchCount",resultCount:"ResultCount"}},u="",this.getInput=function(){return u},this.setInput=function(n){return u=n,this},r=null,this.getHTML=function(){return r},this.setHTML=function(n){return r=n,this},this._focusEvent=null,i="",this.getUserInput=function(){return i},this.setUserInput=function(n){return i=n,this}},r.prototype._focus=function(n){return this._focusObject=n.css(this.dom.inner.focus),this},r.prototype._blur=function(n){return n?(n.css(this.dom.inner.blur),this):this},r.prototype._focusUserInput=function(){this._focusObject=null,this._focusData=this.getUserInput(),this._bindObject.val(this._focusData).focus(),this.setInput(this._focusData)},r.prototype._focusBatch=function(n){this._focus(n),this._focusData=this._focusObject.data("FOCUSDATA"),this._bindObject.val(this._focusData).focus(),this.setInput(this._focusData)},r.prototype._clear=function(){this._focusObject=null,this._focusData=null,this._firstData=null,this._lastData=null},r.prototype._makeLable=function(n){var u=n.lable,i=n.css,r="",t;for(t in i)r+=t+":"+i[t]+";";return{start:"<"+u+' style="'+r+'">',end:"</"+u+">"}},r.prototype.makeUUID=function(){return this.uuid="autocomp"+ +new Date},r.prototype.makeItem=function(n,t,i){var h,a,b,w;if(typeof i=="function")return i.call(this,n,t);var v=this.dom.inner,d=v.lable,k=v.css,f=this.dom.em,e=this.dom.count,tt=this.getInput();typeof t=="undefined"&&(t=this.config.listStruct);var c,o,s,r=null,g=null,u=null,p=null;t!=null?(c=t.keyword||null,o=t.searchCount||null,s=t.resultCount||null,r=c&&n.hasOwnProperty(c)?n[c]:null,g=o&&n.hasOwnProperty(o)?n[o]:null,u=s&&n.hasOwnProperty(s)?n[s]:null):r=n.toString(),p=r,typeof f.string=="undefined"&&(f.string=this._makeLable(f));var l="^(\\s*",nt=tt,y=nt.replace(/\s/g,"");for(h=0,a=y.length;h<a;h++)l+=y.charAt(h)+"\\s*";return l+=")",b=new RegExp(l,"i"),r=r.replace(b,f.string.start+"$1"+f.string.end),u!=null?(typeof e.string=="undefined"&&(e.string=this._makeLable(e)),u=e.string.start+u+e.string.end):u="",w=r+u,$("<"+d+">").html(w).css(k).data("FOCUSDATA",p)},r.prototype.makeOuter=function(){var i=this.dom.outer,u=i.lable,f=i.css,e=this.uuid,n=this._bindObject,t=$("<"+u+">").attr("id",e).css(f),r=Math.floor(+new Date/1e3);return $("body").append(t.css({"z-index":r,width:n.outerWidth()-2+"px",left:n.offset().left+"px",top:n.offset().top+n.outerHeight()+"px"})),t.length==1&&(this.dom.outer.obj=t),$(window).resize(function(){t.css({left:n.offset().left+"px",top:n.offset().top+n.outerHeight()+"px"})}),t},r.prototype.makeStrong=function(){this._focusObject.html()},r.prototype.makeList=function(){var o,u,n;this._clear();var t=this.list.get(),s=null,r=this.dom.outer.obj;r==null&&(o=this.uuid,this.uuid==null&&(o=this.makeUUID()),r=this.makeOuter(),this.bindMouse(),this.bindKey()),r.html("");if(t==null)return this.hideOuter(),this;u=t.length;if(u==0)return this.hideOuter(),this;this.showOuter();for(var i=0,e=!1,f=null;i<u;i++){f=this.makeItem(t[i]);if(f==null)continue;n=this.makeItem(t[i]),e||(this._firstData=n,e=!0),r.append(n)}return n!=null&&(this._lastData=n),this},r.prototype.hideOuter=function(){var n=this.dom.outer.obj;n!=null&&n.length==1&&n.hide()},r.prototype.showOuter=function(){var n=this.dom.outer.obj;n!=null&&n.length==1&&n.show()},r.prototype.ajax=function(n){var t=this.getInput(),i;if($.trim(t)==""){this.list.clear(),this.makeList();return}if(typeof n=="undefined"||n){this.memorize.on=!0,i=this.memorize.content;if(typeof i[t]!="undefined"){this.list.set(i[t]),this.makeList();return}}$.LT_AJAX("get_auto_complete",t,this.ajaxHandler(t),"user_search",this)},r.prototype.ajaxHandler=function(t){return t?function(i){var s,u,h,e,f,r,o;if(!n.Base.CheckType.IsArray(i)){this.list.clear(),this.makeList();return}s=i[0],this.list.clear();if(s=="SUCCESS")for(u=1,h=i.length;u<h;u++)this.list.add({Keyword:i[u]});this.memorize.on&&(e=t,this.memorize.content[e]=this.list.get(),f=this.memorize.maxcount,f>0&&(r=this.memorize.indexer,r.push(e),r.length>f&&(o=r.shift(),delete this.memorize.content[o]))),this.makeList();return}:null},r.prototype.callback=function(t){var o,r,s,f,u,i,e;if(!n.Base.CheckType.IsArray(t)){this.list.clear(),this.makeList();return}o=t[0],this.list.clear();if(o=="SUCCESS")for(r=1,s=t.length;r<s;r++)this.list.add({Keyword:t[r]});this.memorize.on&&(f=this.getInput(),this.memorize.content[f]=this.list.get(),u=this.memorize.maxcount,u>0&&(i=this.memorize.indexer,i.push(f),i.length>u&&(e=i.shift(),delete this.memorize.content[e]))),this.makeList();return},r.prototype.listener=function(n,t,i){var r=this,f=typeof t=="number"?t:25,e=typeof i=="function"?i:function(){var t=r.getInput(),n=r._bindObject.val();t!=n&&(clearTimeout(r.timer.input),r.setInput(n),r.setUserInput(n),r.timer.input=null,r.timer.input=setTimeout(function(){r.ajax()},180))},u=null;return n.focus(function(){u=setInterval(e,f)}).blur(function(){clearInterval(u),u=null}),$(document).bind("click",function(n){var n=n||window.event,f=r.dom.inner,u=f.lable.toLowerCase(),e=r.dom.em.lable,t=n.target||n.srcElement,i=t.tagName.toLowerCase()||t.nodeName.toLowerCase();i!=u&&i!=e&&r.hideOuter()}),this},r.prototype.run=function(){return this._bindObject==null?this:this.listener(this._bindObject)},r.prototype.bindMouse=function(){var t=this.dom.outer.obj;if(t==null||this._mouseBind)return;var n=this,i=this.dom.inner,u=i.lable.toLowerCase(),f=i.focus,e=i.blur,r=this.dom.em.lable;t.mouseover(function(t){var e=t||window.event,f=e.target||e.srcElement,o=f.tagName.toLowerCase()||f.nodeName.toLowerCase(),i=$(f);if(o!=u)if(o==r)i=i.parent();else return!1;return i==n._focusObject?!1:(n._blur(n._focusObject),n._focus(i),!1)}),t.mouseout(function(){n._blur(n._focusObject)}),t.click(function(t){var f=t||window.event,i=f.target||f.srcElement;tagname=i.tagName.toLowerCase()||i.nodeName.toLowerCase(),$tar=$(i);if(tagname!=u)if(tagname==r)$tar=$tar.parent();else return!1;return n._focusData=$tar.data("FOCUSDATA"),n._bindObject.val(n._focusData).focus(),n._focusEvent&&n._focusEvent.call(n),!1}),this._mouseBind=!0},r.prototype.bindKey=function(){if(this._keyBind)return;var n=this;$(document).bind("keydown",function(t){var e=n.list.get(),f,u,i,r;if(e==null||e.length==0)return;f=t||window.event,u=f.keyCode||f.charCode;if(u=="40"){if((n._focusObject==null||n._focusObject.length==0)&&n._firstData!=null){n._focusBatch(n._firstData);return}n._blur(n._focusObject),i=n._focusObject.next();if(i.length==0){n._focusUserInput();return}n._focusBatch(i);return}if(u=="38"){if((n._focusObject==null||n._focusObject.length==0)&&n._lastData!=null){n._focusBatch(n._lastData);return}n._blur(n._focusObject),r=n._focusObject.prev();if(r.length==0){n._focusUserInput();return}n._focusBatch(r);return}return}),this._keyBind=!0},r.prototype.bindFocusEvent=function(n){this._focusEvent=n},t.__constructor=r),new t.__constructor(i)},n.Base={Verify:{TestRegExp:function(n,t){return n=new RegExp(n),n.test(t)},IsEmpty:function(n){return typeof n!="string"?!1:n.trim()!=""?!1:!0},IsNumber:function(n){return typeof n=="undefined"?!1:isNaN(n.toString())?!1:!0},IsLetter:function(n){if(typeof n=="undefined")return!1;var t=/^[A-Za-z]+$/;return this.TestRegExp(t,n)},IsLowerCase:function(n){if(typeof n=="undefined")return!1;var t=/^[a-z]+$/;return this.TestRegExp(t,n)},IsUpperCase:function(n){if(typeof n=="undefined")return!1;var t=/^[A-Z]+$/;return this.TestRegExp(t,n)},IsChar:function(n){if(typeof n=="undefined")return!1;var t=/^\w+$/;return this.TestRegExp(t,n)},IsCharUnderline:function(n){if(typeof n=="undefined")return!1;var t=/^(\w*)(\_+)(\w*)$/;return this.TestRegExp(t,n)},IsTelephone:function(n){if(typeof n=="undefined")return!1;var t=/^(\((\d{2,5})\)|\d{2,5})?(\s*)(-?)(\s*)(\d{5,9})$/;return this.TestRegExp(t,n)},IsPhone:function(n){if(typeof n=="undefined")return!1;var t=/^(\+86)?1[3,5,8](\d{9})$/;return this.TestRegExp(t,n)},IsIdentityCode:function(n){if(typeof n=="undefined")return!1;var t=/^[1-9](\d{5})(([1-9]\d)|([1,2](\d{3})))(0[1-9]|1[0,2])(0[1-9]|[1,2]\d|3[0,1])(\d{3})([0-9Xx]+)$/;return this.TestRegExp(t,n)},IsEmail:function(n,t){var i;return typeof limitsite=="undefined"||typeof t!="string"?(i=/^(\w+)@((([A-Za-z0-9]+)\.)+)[A-Za-z]{2,4}$/g,this.TestRegExp(i,n)):(i=new RegExp("^(\\w+)@"+limitsite+"$","g"),this.TestRegExp(i,n))}},CheckType:{IsArray:function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&typeof n.splice=="function"}},Event:function(){function t(t){n.pageX=t.clientX+$(window).scrollLeft(),n.pageY=t.clientY+$(window).scrollTop()}var n={pageX:0,pageY:0,Set:function(){var n=arguments,t;if(n.length==0)return n=null,this;if(n.length==1&&typeof n[0]=="object"){for(t in n[0])this[t]=n[0][t];return n=null,this}if(n.length==2)return opt[n[0]]=n[1],n=null,this}};return function(i){return typeof i!="undefined"&&(i=i||event,t(i)),n}}()},n.DAO={ShoppingCart:{GetProduct:function(n){$.LT_AJAX("get_trolley_product",null,n,"user_trolley")},SetProduct:function(n,t,i,r,u,f,e,o){typeof r=="function"&&(o=r,r=null),$.LT_AJAX("set_trolley_product",[n,t,i,r||null,u||null,f||0,e||0],o,"user_trolley")},RemoveProduct:function(n,t,i,r,u,f,e){typeof i=="function"&&(e=i,i=null),$.LT_AJAX("remove_trolley_product",[n,t,i||null,r||null,u||0,f||0],e,"user_trolley")},ClearProduct:function(n){$.LT_AJAX("clear_trolley_product",null,n,"user_trolley")}}},n.Business={ClickStat:function(n){if(!n)return!1;n.bind("click",function(){_lt_click_stat($(this).attr("lt_stat_id"))})},WebToolkit:{AddFavorite:function(n,t){if(typeof n!="string"||typeof t!="string")return!1;try{if(window.sidebar)window.sidebar.addPanel(n,t,"");else if(document.all)window.external.AddFavorite(t,n);else if(window.opera&&window.print)return!0}catch(i){alert("\u60a8\u7684\u6d4f\u89c8\u5668\u76f8\u5173\u6587\u4ef6\u5df2\u7f3a\u5931\u6216\u635f\u574f,\u8bf7\u6309Ctrl+D\u5c06\u4e50\u6dd8\u7f51\u5740\u6dfb\u52a0\u5230\u60a8\u7684\u6536\u85cf\u5939/\u4e66\u7b7e\u4e2d")}}},XHR:{CheckResult:function(t){var i="";return n.Base.CheckType.IsArray(t)?i=t[0].toString():"ERROR"}},ShoppingCart:function(){function r(n){i=!0,typeof n!="undefined"&&n||(e=null)}function u(){i=!1}function h(n,t){return n+="",t+="",n.length!=9||t.length!=3?!1:!0}function f(i){u();if(n.Business.XHR.CheckResult(i)!="SUCCESS")return s="",n.Business.XHR.CheckResult(i)=="ALERT"&&(s=i[1]),!1;n.Business.ShoppingCart.Set(i[1]);if(i.length==6){var h=i[2],c=i[3],e=i[4],r=i[5],f=n.Business.ShoppingCart.SerializePromotionData(h,c,e,r);n.Business.ShoppingCart.SetPromotionData(f)}else o=null;t!=null&&t.call(window,i[1]),t=null}var e=null,o=null,s="",i=!1,t=null;return{Get:function(u){if(i)return!1;r(),typeof u=="function"&&(t=null,t=u),n.DAO.ShoppingCart.GetProduct(f)},Set:function(n){if(i)return!1;r(),this.SetData(n),u()},Add:function(e,o,s,c,l,a,v,y){if(i)return!1;r();if(!h(e,o))return u(),!1;typeof y=="function"&&(t=null,t=y),n.DAO.ShoppingCart.SetProduct(e,o,s,c,l,a,v,f)},Substract:function(n,t,i,r,u,f,e,o){return this.Add(n,t,i,r,u,f,e,o)},Remove:function(e,o,s,c,l,a,v){if(i)return!1;r();if(!h(e,o))return u(),!1;typeof v=="function"&&(t=null,t=v),n.DAO.ShoppingCart.RemoveProduct(e,o,s,c,l,a,f)},GetData:function(){return e},SetData:function(n){e=n},GetAlert:function(){return s},SetPromotionData:function(n){o=n},SerializePromotionData:function(n,t,i,r){return{PromotionName:n,PromotionPrice:t,PromotionLink:i,PromotionType:r}},GetPromotionData:function(){return o},Clear:function(u){if(i)return!1;r(),typeof u=="function"&&(t=null,t=u),n.DAO.ShoppingCart.ClearProduct(f)}}}()},n.UI={MousePosition:function(n){n=n||window.event;var i=n.pageX||n.clientX+document.body.scrollLeft,t=n.pageY||n.clientY+document.body.scrollTop;return{positionX:i,positionY:t}},GetArea:function(n){if(n.selector=="document")return{height:$(document).height(),width:$(document).width()};if(n.css("overflow")!="hidden")return{height:n.height(),width:n.width()};var t=n.clone();return t.css({display:"block",position:"absolute",overflow:"visible"}),{height:t.height(),width:t.width()}},ModeWindow:function(){function i(){function h(n){var t=n.ID,i;return t?$("#"+t).length>0?$("#"+t):(i=n.Parent==null||$(n.Parent).length==0?$("body"):$(n.Parent),i.append($("<div>").attr("id",n.ID).css(n.CSS)),$("#"+t)):null}function f(n,t,i){return i=typeof i=="boolean"?i:!1,n.isSet=n.obj.html()==""?!1:!0,n&&n.isSet&&!i?n:(i&&(n.obj.html(""),n.obj.css(t.CSS)),n.obj.append($("<div>").attr("id","w_uuid_"+t.ID).css(t.TitleCSS).html(t.Title)),n.obj.append($("<div>").attr("id","content_uuid_"+t.ID).css(t.ContentCSS).html(t.Content)),n.obj.append($("<div>").css(t.StatusbarCSS).html(t.Statusbar)),n.isSet=!0,n.ID=t.ID,n.UUID="w_uuid_"+t.ID,n.Option=t,n.Backover=c(n),n.Frameover=l(n),n.CloseIcon=r(n),n.Drag=s(n),n.IsShow=!1,n)}function r(n){var t,r,i;if(n.Option.CloseIcon==null)return;return t=n.Option.CloseIcon,t.ImageSrc==null?void 0:(r=t.ImageSrc=="default"?"http://i.ltimg.cn/letaozu/images/letaozuUI/close.gif":t.ImageSrc,i="5px",$("#"+n.UUID).append($("<div>").attr("id",n.UUID+"_closeicon").css({width:t.Width+"px",height:t.Height+"px",position:"absolute",right:i,top:i,cursor:"pointer",background:"url("+r+") no-repeat 0 0"}).hover(function(){$(this).css({"background-position":"right 0"})},function(){$(this).css({"background-position":"0 0"})}).bind("click",function(){u(n,undefined,t.func)})),$("#"+n.UUID+"_closeicon"))}function c(n){if(n.Option.Backover==!1)return null;if($("#MW_BACKOVER").length==0){$("body").append($("<div>").attr("id","MW_BACKOVER").css({"background-color":"#ddd",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",display:"none",opacity:.3}));var i=!!window.ActiveXObject,t=i&&!window.XMLHttpRequest;t&&$("#MW_BACKOVER").css({position:"absolute"})}return{obj:$("#MW_BACKOVER"),Show:function(){var i=parseInt(+new Date/1e3),t=$(window).width()>$(document).width()?$(window).width():$(document).width(),n=$(window).height()>$(document).height()?$(window).height():$(document).height();$("#MW_BACKOVER").css({width:t+"px",height:n+"px","z-index":i,display:"block"})},Hide:function(){$("#MW_BACKOVER").hide()}}}function l(n){return n.Option.Frameover==!1?null:($("#MW_FRAMEOVER").length==0&&$("body").append($("<div>").attr("id","MW_FRAMEOVER").css({"background-color":"#fff",position:"absolute",display:"none",top:"0",left:"0",overflow:"hidden"}).html('<iframe border="0" style="border:0;margin:0;padding:0"></iframe>')),{obj:$("#MW_FRAMEOVER"),Show:function(){var f=1,t=n.obj,e=t.outerWidth(),u=t.outerHeight(),i=t.offset().top,r=t.offset().left;$("#MW_FRAMEOVER").css({width:e+"px",height:u+"px","z-index":f,top:i+"px",left:r+"px",display:"block"})},Hide:function(){$("#MW_FRAMEOVER").hide()}})}function e(n,t,i,r){var u=$.extend({},o,t),f,l;n.Backover!=null&&n.Backover.obj.css("display")=="none"&&n.Backover.Show();var s="auto",e="auto",c="auto",h="auto";if(u.reshow)return u.showType=="fade"?n.obj.fadeIn("slow"):n.obj.show(),n;f=n.obj;switch(u.position){case"center":s=$(window).height()/2-f.height()/2+$(document).scrollTop()+u.relativeTop,e=$(document).width()/2-f.width()/2+$(document).scrollLeft()+u.relativeLeft;break;case"abscenter":s=$(document).height()/2-f.height()/2+$(document).scrollTop()+u.relativeTop,e=$(document).width()/2-f.width()/2+$(document).scrollLeft()+u.relativeLeft;break;case"left-top-corner":s=0,e=0;break;case"left-bottom-corner":e=0,h=0;break;case"right-top-corner":c=0,s=0;break;case"right-bottom-corner":c=0,h=0;break;case"bindto":u.bindObject.length!=0?(s=u.bindObject.offset().top+u.relativeTop,e=u.bindObject.offset().left+u.relativeLeft):(s=$(window).height()/2-f.height()/2+$(document).scrollTop()+u.relativeTop,e=$(document).width()/2-f.width()/2+$(document).scrollLeft()+u.relativeLeft);break;default:s=$(window).height()/2-f.height()/2+$(document).scrollTop()+u.relativeTop,e=$(document).width()/2-f.width()/2+$(document).scrollLeft()+u.relativeLeft}return l=parseInt(+new Date/1e3+1),f.css({top:s=="auto"?s:s+"px",left:e=="auto"?e:e+"px",right:c=="auto"?c:c+"px",bottom:h=="auto"?h:h+"px","z-index":l}),u.showType=="fade"?f.fadeIn("slow",r):f.show(r),n.Frameover!=null&&n.Frameover.obj.css("display")=="none"&&n.Frameover.Show(),n.IsShow=!0,n}function u(n,t,r){n.obj.hide(0,r),n.Frameover!=null&&n.Frameover.Hide(),n.IsShow=!1;if(i.length>0){for(var u=0;u<i.length;u++)if(n!=i[u]&&i[u].IsShow&&i[u].Backover!=null)return n;(typeof t=="undefined"||t&&typeof t=="boolean"&&t==!1)&&n.Backover!=null&&n.Backover.Hide()}return n}function s(t){if(!t.Option.Drag)return!1;var u=$("#"+t.UUID),r=window._IS_WINDOW_MOVING||!1,i=t.Option.Parent==null||$(t.Option.Parent).length==0?$("body"):$(t.Option.Parent);return t.obj.bind("mousedown",function(){var i=parseInt(+new Date/1e3)+1,t=$(this).position().left+"px",n=$(this).position().top+"px";$(this).css({"z-index":i,left:t,top:n,right:"auto",bottom:"auto"})}),u.bind("mousedown",function(u){if(r)return!1;r=!0;var o=n.UI.MousePosition(u),s=o.positionX,h=o.positionY,f=t.obj.position().top,e=t.obj.position().left,c=parseInt(+new Date/1e3);t.obj.css({opacity:.5}),$(document).mousemove(function(u){var l,a;if(!r)return!1;window.getSelection?window.getSelection().removeAllRanges():document.selection.empty();var y=n.UI.MousePosition(u),w=y.positionX,b=y.positionY,v=w-s,p=b-h,o=f+p<=i.offset().top&&!t.Option.ContainOut?i.offset().top:f+p,c=e+v<=i.offset().left&&!t.Option.ContainOut?i.offset().left:e+v;return t.Option.ContainOut||(t.Option.Parent==null||$(t.Option.Parent).length==0?(l=$(window).width()>$(document).width()?$(window).width():$(document).width(),a=$(window).height()>$(document).height()?$(window).height():$(document).height()):(l=i.outerWidth(),a=i.outerHeight()),o=o>=a-t.obj.outerHeight()+i.offset().top?a-t.obj.outerHeight()+i.offset().top:o,c=c>=l-t.obj.outerWidth()+i.offset().left?l-t.obj.outerWidth()+i.offset().left:c),t.obj.css({left:c+"px",top:o+"px"}),!1}),$(document).mouseup(function(){return r=!1,t.obj.css({opacity:1}),$(this).unbind("mousemove").unbind("mouseup"),!1})}),t}var t={ID:null,Title:"ModeWindow - MacroX",Content:"Text in content",Statusbar:null,Parent:null,CloseIcon:{ImageSrc:"default",Width:12,Height:12,func:null},Backover:!0,Frameover:!1,Drag:!1,ContainOut:!1,CSS:{border:"1px solid #ddd",display:"none",padding:"1px",position:"absolute","background-color":"#fff"},TitleCSS:{"text-indent":"20px","font-size":"14px",color:"#fff","background-color":"#aaa","line-height":"22px",height:"22px",position:"relative"},ContentCSS:{padding:"16px 20px","line-height":"18px"},StatusbarCSS:{}},o={reshow:!1,showType:"fade",position:"center",relativeTop:0,relativeLeft:0,bindObject:null},i=[];return function(n){var o=null,s=$.extend({},t,n),c;s.CSS=$.extend({},t.CSS,n.CSS),s.TitleCSS=$.extend({},t.TitleCSS,n.TitleCSS),s.ContentCSS=$.extend({},t.ContentCSS,n.ContentCSS),s.CloseIcon=$.extend({},t.CloseIcon,n.CloseIcon),c=null,o=h(s);if(!o){throw new Error("Error : [Letao.UI.ModeWindow] Option.ID is undefined");return!1}o={obj:o,isSet:!1},o=f(o,s,!1);if(!o.isSet){throw new Error("Error : [Letao.UI.ModeWindow] Window Object is unconstructed");return!1}return i.push(o),{GetObject:function(){return o},Show:function(n,t){typeof t!="function"&&(t=null),o=e(o,n,c,t),c==null&&(c=n)},Close:function(n,t){typeof t!="function"&&(t=null),o=u(o,n,t)},Reload:function(n,i){var r=$.extend({},t,n);r.CSS=$.extend({},t.CSS,n.CSS),r.TitleCSS=$.extend({},t.TitleCSS,n.TitleCSS),r.ContentCSS=$.extend({},t.ContentCSS,n.ContentCSS),o=f(o,r,!0),o=this.Show(i)},SetContent:function(n){var t="content_uuid_"+o.ID;$("#"+t).length==1&&$("#"+t).html(n)},SetTitle:function(n){var t="w_uuid_"+o.ID;$("#"+t).length==1&&($("#"+t).html(n),r(o))}}}}var t=null;return function(n){return t==null&&(t=i()),t(n)}}(),YellowFade:function(){function i(n,t){var i=parseInt(+new Date/1e3)+10;switch(t){case"up":return{from:{left:n().pageX+16,top:n().pageY+30,display:"block","z-index":i},to:{top:n().pageY+10,opacity:.8}};case"left":return{from:{left:n().pageX+100,top:n().pageY+10,display:"block","z-index":i},to:{left:n().pageX+20,opacity:.8}}}return null}function r(n,t){switch(t){case"up":return{top:n.pageY-50,opacity:0};case"right":return{left:n.pageX+120,opacity:0}}return{top:n.pageY-50,opacity:0}}var t=null,u={object:null,_createYellowFadeObject:function(){var n=$("<span>").css({border:"1px solid #FFE591",background:"url(http://i.ltimg.cn/letaozu/images/letaozuUI/ajax-loader-smallsnake.gif) no-repeat scroll 8px center #FFFAEA",position:"absolute",padding:"4px 16px 4px 30px",opacity:0,"z-index":9999});return $("body").append(n),this.object=n,n}},f={object:null,_createYellowFadeObject:function(){var n=$("<span>").css({border:"1px solid #FFE591",position:"absolute","background-color":"#FFFAEA",padding:"4px 16px",opacity:0,"z-index":9999});return $("body").append(n),this.object=n,n}};return{Show:function(r,e,o,s){var h,s,c;e=e||n.Base.Event,h=typeof o=="undefined"||o?u:f,s=typeof s=="undefined"?"up":s,t=h.object==null?h._createYellowFadeObject():h.object,t.stop(!0,!0),c=i(e,s),t.html(r).css(c.from).animate(c.to,500)},Hide:function(i){var i=typeof i=="undefined"?"up":i,f=n.Base.Event(),u=r(f,i);t.animate(u,500,function(){$(this).hide()})}}}(),ShoppingCart:{Data:null,SerializationData:function(n,t){var r={totalCount:0,totalPrice:0},s={Rows:[]},o=n.Rows,a,l,i="",e,f,h,u,c;if(o.Count==0)i+='<div style="height:20px;line-height:20px;font-size:14px;color:#ccc;text-align:center;padding:20px 0"><img src="http://i.ltimg.cn/letaozu/images/ui/cart.gif" alt="" />&nbsp;&nbsp;\u60a8\u7684\u8d2d\u7269\u8f66\u4e2d\u8fd8\u6ca1\u6709\u4efb\u4f55\u5546\u54c1\uff01</div>';else{for(i+='<table id="shopping_trolley_innertable"><thead><tr><td class="prod_image"></td><td class="prod_name"></td><td class="prod_count"></td></tr></thead>',u=0;u<o.Count;u++)o[u].HasStock==!0&&r.totalCount==0&&(i+="<tbody>"),i+=this.BuildProduct(o[u],r,s);r.totalCount>0&&(i+="</tbody>"),i+="<tfoot>",r.totalCount>0&&(i+='<tr><td colspan="3" class="prodtotal" style="height:18px;line-height:18px;padding-top:18px"><input type="hidden" id="hid_prod_count" value="'+r.totalCount+'" />\u6570\u91cf\u603b\u8ba1\uff1a'+r.totalCount+"\u4ef6&nbsp;&nbsp;&nbsp;\u91d1\u989d\u603b\u8ba1\uff1a<strong>"+r.totalPrice+"\u5143</strong>",e=r.totalPrice,t!=null&&(i+='</td></tr><tr><td class="prodtotal" colspan="3">\u6ee1\u7acb\u51cf\uff1a<strong style="color:#008CD6;margin-right:2px">-'+t.PromotionPrice+"\u5143</strong>",f=t.PromotionName,f.length>25&&(f=f.slice(0,25)+"..."),i+=t.PromotionLink==""?"("+f+")":'<a href="'+t.PromotionLink+'" target="_blank" style="color:#999" title="'+t.PromotionName+'">('+f+")</a>",i+="</td></tr>",e=e-t.PromotionPrice),i+='<tr><td colspan="3" style="text-align:right">\u5e94\u652f\u4ed8\u91d1\u989d:<i class="ltbigprice">'+e+'\u5143</i></td></tr><tr><td colspan="3" class="prodtotal" style="padding-bottom:12px"><a class="btn_clear" href="javascript:void(0);" onclick="javascript:if(!confirm(\'\u60a8\u786e\u5b9a\u8981\u6e05\u7a7a\u8d2d\u7269\u8f66\u5417\uff1f\'))return false;Letao.UI.ShoppingCart.ClearCart().SetCartInner(function(){Letao.UI.ShoppingCart.SetCartCount(\'fnMyShopcart1\',\'\u8d2d\u7269\u8f66\',\'\u4ef6\',\'#f00\',true);});">\u6e05\u7a7a\u8d2d\u7269\u8f66</a><a href="/letaozu/pay/usercart.aspx" target="_blank"><img src="http://i.ltimg.cn/letaozu/images/ui/sc_buy4.gif" class="btn_toorder" alt="" /></a></td></tr>');if(s.Rows.length!=0)for(h=s.Rows,i+='<tr><td colspan="3" style="text-align:left;color:#999;border-bottom:1px solid #eee;padding:10px 0 5px">\u4ee5\u4e0b\u5546\u54c1\u5df2\u552e\u7f44\uff0c\u6682\u65e0\u6cd5\u8d2d\u4e70</td></tr>',u=0;u<h.length;u++)i+=this.BuildProduct(h[u],r);i+="</tfoot></table>"}return c={Count:r.totalCount,Price:r.totalPrice,HTML:i}},BuildProduct:function(n,t,i){var a,g,d,tt,l,f,c,p,nt,u=null,h=null,e=0,v=0,r="",o=n.HasStock,s,w=!1,y,k,b;if(!o&&typeof i!="undefined")return i.Rows.push(n),"";a=n.ProductID.toString().substring(0,9),g=n.ProductName.toString(),d=n.Image.toString(),tt=n.ProductSize.toString(),l=n.ProductID.toString().substring(9,12),f=Math.floor(n.ProductNum),c=parseFloat(n.letao_price_discount),p=n.StaticURL.toString(),nt=parseFloat(n.letao_vprice),u=n.ParentID.toString(),e=Math.floor(n.SaleType),v=Math.floor(n.PromoID),s=n.SubProduct,s!=null&&s.Rows.length>0&&(w=!0),u!=null&&u.length==12?(h=u.substring(9,12),u=u.substring(0,9)):h=null,r+='<tr><td class="prod_image"><a href="'+p+'" target="_blank"><img src="'+d+'" alt="" /></a></td><td class="prod_name',o||(r+=" nostock"),r+='"><a href="'+p+'" target="_blank">'+g+"</a></td>",r+=o&&e!=6?'<td><span class="tly_prodadd" onclick="javascript:Letao.UI.ShoppingCart.AddProduct(\''+a+"','"+l+"',1,'"+u+"','"+h+"',"+e+","+v+").SetCartInner(function(){Letao.UI.ShoppingCart.SetCartCount('fnMyShopcart1','\u8d2d\u7269\u8f66','\u4ef6','#f00',true);},this);\" onmouseover=\"javascript:$(this).addClass('tly_prodadd_hover');\"onmouseout=\"javascript:$(this).removeClass('tly_prodadd_hover');\" title=\"\u5546\u54c1\u6570\u91cf+1\"></span><span class=\"tly_prodnum\">"+f+"</span><span class=\"tly_prodsubstract\" onclick=\"javascript:if($(this).prev('.tly_prodnum').html()=='1'){if(!confirm('\u60a8\u786e\u5b9a\u8981\u5c06\u8be5\u4ef6\u5546\u54c1\u4ece\u8d2d\u7269\u8f66\u4e2d\u5220\u9664\u5417\uff1f'))return false;};Letao.UI.ShoppingCart.SubstractProduct('"+a+"','"+l+"',-1,'"+u+"','"+h+"',"+e+","+v+").SetCartInner(function(){Letao.UI.ShoppingCart.SetCartCount('fnMyShopcart1','\u8d2d\u7269\u8f66','\u4ef6','#f00',true);});\" onmouseover=\"javascript:$(this).addClass('tly_prodsubstract_hover');\"onmouseout=\"javascript:$(this).removeClass('tly_prodsubstract_hover');\" title=\""+(f==1?"\u5220\u9664\u6b64\u5546\u54c1":"\u5546\u54c1\u6570\u91cf-1")+'"></span>':'<td style="text-align:right;color:#999">\u6570\u91cf\uff1a'+f+"\u4ef6",r+='</td></tr><tr class="prod_price"><td style="vertical-align:top;text-align:left">',e==6&&(c>0?r+='<span class="giftflag">\u642d\u914d</span>':c==0&&(r+='<span class="giftflag">\u8d60\u54c1</span>')),r+='</td><td style="text-align:left">\u4e13\u67dc\u4ef7\uff1a'+nt+"\u5143&nbsp;&nbsp;&nbsp;&nbsp;\u4e50\u6dd8\u4ef7\uff1a<i>"+c+'\u5143</i></td><td style="text-align:right">[',r+=o?'<a href="javascript:void(0);" onclick="javascript:Letao.UI.ShoppingCart.MoveToCollect($(this),\''+a+"','"+l+"')\">\u79fb\u5165\u6536\u85cf\u5939</a>":'<a href="javascript:void(0);" onclick="javascript:Letao.UI.ShoppingCart.RemoveProduct(\''+a+"','"+l+"','"+u+"','"+h+"',"+e+","+v+").SetCartInner(function(){Letao.UI.ShoppingCart.SetCartCount('fnMyShopcart1','\u8d2d\u7269\u8f66','\u4ef6','#f00',true);});\">\u79fb\u9664</a>",r+="]</td></tr>",o&&(t.totalCount+=f,t.totalPrice+=c*f);if(w)for(y=0,k=s.Rows.length;y<k;y++)b=s.Rows[y],r+=arguments.callee(b,t,i);return r},GetCart:function(t){return this.Data=null,n.Business.ShoppingCart.Get(t),this},AddProduct:function(t,i,r,u,f,e,o,s){return this.Data=null,n.Business.ShoppingCart.Add(t,i,r,u,f,e,o,s),this},SubstractProduct:function(t,i,r,u,f,e,o,s){return this.Data=null,n.Business.ShoppingCart.Substract(t,i,r,u,f,e,o,s),this},RemoveProduct:function(t,i,r,u,f,e,o){return this.Data=null,n.Business.ShoppingCart.Remove(t,i,r,u,f,e,o),this},ClearCart:function(t){return this.Data=null,n.Business.ShoppingCart.Clear(t),this},CartObject:null,ShoppingCartModeWindow:function(t){var i=n.UI.ModeWindow({ID:"letaoShoppingCart",Title:"\u6211\u7684\u8d2d\u7269\u8f66",Content:t,CSS:{width:"402px",border:"2px solid #ff7a33"},TitleCSS:{"background-color":"#E8F4FD",color:"#333","font-weight":"700"},ContentCSS:{width:"380px",padding:"5px 10px 15px"},CloseIcon:{ImageSrc:"http://i.ltimg.cn/letaozu/images/shopcart/closebtn.gif",Width:12,Height:12},Backover:!1,Drag:!0});return this.CartObject==null&&(this.CartObject=i),i},MoveToCollect:function(t,i){$.LT_AJAX("add_user_collection",i,function(i){i&&i[0]=="SUCCESS"?(n.Base.Event().Set({pageX:t.offset().left-70,pageY:t.offset().top-10}),n.UI.YellowFade.Show("\u6536\u85cf\u5546\u54c1\u6210\u529f\uff01",n.Base.Event,!0,"left"),setTimeout(function(){n.UI.YellowFade.Hide("right")},1600)):i=="ERROR:\u7528\u6237\u672a\u767b\u5f55"?(n.Base.Event().Set({pageX:t.offset().left-90,pageY:t.offset().top-10}),n.UI.YellowFade.Show("\u8bf7\u60a8\u767b\u5f55\u540e\u518d\u6536\u85cf\u5546\u54c1\uff01",n.Base.Event,!0,"left"),setTimeout(function(){n.UI.YellowFade.Hide("right")},1600)):alert(i)},"user_collect")},Show:function(t,i){var r=this.Data,f,e,u;r==null?(r=n.Business.ShoppingCart.GetData(),f='<div style="padding:30px;background:url(http://i.ltimg.cn/letaozu/images/load/ajax-loader.gif) no-repeat center center"></div>',n.UI.ShoppingCart.ShoppingCartModeWindow(f).Show(t),r==null&&(e=500,u=setInterval(function(){if(!e--){clearInterval(u);return}r=n.Business.ShoppingCart.GetData();if(r!=null){clearInterval(u);var t=n.Business.ShoppingCart.GetPromotionData();r=n.UI.ShoppingCart.Data=n.UI.ShoppingCart.SerializationData(r,t),n.UI.ShoppingCart.CartObject.SetContent(r.HTML),typeof i=="function"&&i(),r=null}},13))):(t.reshow=!0,n.UI.ShoppingCart.ShoppingCartModeWindow(r).Show(t),typeof i=="function"&&i(),r=null)},SetCartInner:function(t,i){var r=this.Data,f,u;r==null&&(r=n.Business.ShoppingCart.GetData(),r==null&&(f=20,u=setInterval(function(){var o,e,s;if(!f--){clearInterval(u),o=n.Business.ShoppingCart.GetAlert();if(o!="")if(typeof i=="undefined")alert(o);else{e=$(i);if(typeof e.offset=="undefined"||typeof e.offset!="function"){alert(o);return}n.Base.Event().Set({pageX:e.offset().left-170,pageY:e.offset().top-15}),n.UI.YellowFade.Show(o,n.Base.Event,!0,"left"),setTimeout(function(){n.UI.YellowFade.Hide("right")},1600)}return}r=n.Business.ShoppingCart.GetData(),r!=null&&(clearInterval(u),s=n.Business.ShoppingCart.GetPromotionData(),r=n.UI.ShoppingCart.Data=n.UI.ShoppingCart.SerializationData(r,s),n.UI.ShoppingCart.CartObject.SetContent(r.HTML),typeof t=="function"&&t(),r=null)},13)))},SetCartCount:function(t,i,r,u,f){var e=n.UI.ShoppingCart;e.Data!=null&&typeof e.Data.Count!="undefined"&&$("#"+t).length==1&&(typeof u!="undefined"&&(i+="<i>",r="</i>"+r),typeof f=="boolean"&&f&&(i+="",r=""+r),$("#"+t).html(i+e.Data.Count+r),e.CartObject!=null&&e.CartObject.SetContent(e.Data.HTML))},GetCartCount:function(){if(n.UI.ShoppingCart.Data==null)return 0;var t=n.UI.ShoppingCart.Data.Count;return typeof t=="undefined"||t==null?0:t}},LazyLoad:{_initial:null,TYPE:{Image:"Image",Function:"Function"},LOADANIMATION:{FADEIN:"fadeIn"},fnConfig:function(){var n={},r=function(t,i){return n[t]=i,this},i=function(t){return typeof n[t]=="undefined"?null:n[t]},t=function(t){return typeof n[t]=="undefined"?!1:(delete n[t],!0)};return{add:r,get:i,remove:t}}(),init:function(){var t={obj:null,length:0},s=function(){return $("*[lazyload]")},p=function(){return $("img[lazyload]")},a=function(t){return n.UI.LazyLoad.fnConfig.get(t)},l=function(n,i){var f={},e,r;return n.each(function(n){e=$(this),r=o($(this).attr("lazyload")),f[n]={entity:$(this),type:r.type,lazyload:r.lazyload},t.length++}),typeof i=="boolean"&&i&&u(f),f},u=function(n){t.obj=n},h=function(n,i,r){t.obj==null&&(t.obj={}),handler=+new Date/1e3,t.obj[handler]={entity:n,type:i,lazyload:r},t.length++;return},y=function(){return{left:document.documentElement.scrollLeft||document.body.scrollLeft,top:document.documentElement.scrollTop||document.body.scrollTop,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}},v=function(n){return{left:$(n).offset().left,top:$(n).offset().top,width:$(n).outerWidth(),height:$(n).outerHeight()}},o=function(t){var u=t.indexOf(":"),f=n.UI.LazyLoad.TYPE,i,r;return u<=0?{type:f.Image,lazyload:t}:(i=t.slice(0,u++),r=typeof f[i]!="undefined"?t.slice(u):t,i=r==t?"Image":i,{type:i,lazyload:r})},e=function(){var e=null,u=null,s=null,o=null,l=n.UI.LazyLoad.TYPE,a=y(),h;for(i in t.obj){e=t.obj[i],u=e.entity;if(u.length==0)continue;h=v(u);if(f(h,a)&&typeof t.obj[i]!="undefined"){s=e.type,o=e.lazyload;if(s==l.Image){r(u,o),delete t.obj[i],t.length--;continue}if(s==l.Function){c(u,o),delete t.obj[i],t.length--;continue}}}},r=function(n,t){typeof r.applying=="undefined"&&(r.applying=function(n,i){var r=n.attr("tagName")||n.prop("tagName");r.toLowerCase()=="img"?n.css("display","none").attr("src",i).show().removeAttr("lazyload"):n.css("background","url("+t+") no-repeat 0 0").fadeIn(800).removeAttr("lazyload");return});var i=new Image;i.src=t,i.complete?(r.applying(n,i.src),i=null):i.onload=function(){r.applying(n,i.src),i=null}},c=function(n,t){typeof t!="function"&&(t=a(t));if(!t)return;t.apply(n)},f=function(n,t){var f=n.left+n.width/2,e=t.left+t.width/2,o=n.top+n.height/2,i=t.top+t.height/2,r=(n.width+t.width)/2,u=(n.height+t.height)/2;return Math.abs(f-e)<=r&&Math.abs(o-i)<=u};return{getLazyObj:s,addLazyObj:h,initLazyObj:l,setLazyObj:u,isInter:f,each:e,loadImage:r}},Run:function(n,t){this._initial==null&&(this._initial=this.init());var i=this._initial;return(typeof n=="undefined"||n==null||typeof n.length!="number"||typeof n.size!="function"||typeof n.each!="function")&&i.initLazyObj(i.getLazyObj(),!0),t=t||$(window),t.scroll(function(){i.each()}),t.resize(function(){i.each()}),i.each(),this},Add:function(n,t,i,r){this._initial==null&&(this._initial=this.init());var u=this._initial;return u.addLazyObj(n,t,i),t==this.TYPE.Function&&this.fnConfig.add(i,r),u.each(),this}},SetClipboard:{copy:function(n){var i,t,u;if(window.clipboardData)return alert("\u590d\u5236\u6210\u529f\uff01"),window.clipboardData.setData("Text",n);if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(e){alert("\u88ab\u6d4f\u89c8\u5668\u62d2\u7edd\uff01\n\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165'about:config'\u5e76\u56de\u8f66\n\u7136\u540e\u5c06 'signed.applets.codebase_principal_support'\u8bbe\u7f6e\u4e3a'true'")}i=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!i)return;t=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!t)return;t.addDataFlavor("text/unicode");var f={},o={},f=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString),r=n;f.data=r,t.setTransferData("text/unicode",f,r.length*2),u=Components.interfaces.nsIClipboard;if(!i)return!1;i.setData(t,null,u.kGlobalClipboard)}return alert("\u590d\u5236\u6210\u529f\uff01"),!1},bindEvent:function(t,i){if(t.length==0||i.length==0)return!1;t.bind("click",function(){var t=i.val();n.UI.SetClipboard.copy(t)})}}},n.Page.HeaderFooter={BindShoppingCart:function(t,i){i=i||{},$("#"+t).bind("click",function(){i.bindObject=$(this),n.UI.ShoppingCart.GetCart().Show(i)})},BindGoToPay:function(t,i,r){$("#"+t).bind("click",function(){n.UI.ShoppingCart.GetCart(function(t){var u=t.Rows.length;u==0?(r.bindObject=$("#"+i),n.UI.ShoppingCart.GetCart().Show(r)):window.location.href="/letaozu/pay/usercart.aspx"})})},SmallMenu:function(){function i(n,t,i,r){var e,s;if($("#"+n).length!=0)return $("#"+n);$("body").append($("<div>").attr("id",n).css({position:"absolute","background-color":"#fff",padding:"6px",border:"1px solid #ddd",left:t.offset().left-7+"px",top:t.offset().top-6+"px",display:"none","z-index":"3"})),typeof r.width!="undefined"?$("#"+n).css("width",r.width):$("#"+n).css("width",t.outerWidth()+"px"),t.clone().appendTo("<h6>").appendTo($("#"+n));var o=null,f="",u=[];for(f='<div style="padding:0">',e=0;e<i.length;e++){o=i[e];if(typeof o=="string")f+='<p style="margin:2px 0 0 0;border-top:1px solid #eee;height:2px; overflow:hidden"></p>';else{for(s in o)u.push(o[s]);f+='<p><a href="'+u[0]+'" title="'+u[1]+'" target="'+u[2]+'" style="line-height:20px;padding:0;text-decoration:none">'+u[3]+"</a></p>",u.length=0}}return f+="</div>",$("#"+n).append(f),$("#"+n)}function t(n){n.css("display","block")}function n(n){n.css("display","none")}return function(r,u,f,e){u.hover(function(){var o=i(r,u,f,e);t(o),o.hover(function(){},function(){n(o)})},function(){})}}(),AutoComplete:t,SearchBar:function(){function t(t){n.Base.Event().Set({pageX:$("#ltsearch").offset().left-14,pageY:$("#ltsearch").offset().top-8});if(typeof t!="string")return!1;t=t.trim();if(t==""||t=="\u8bf7\u60a8\u8f93\u5165\u60f3\u8981\u641c\u7d22\u7684\u5173\u952e\u8bcd")return n.UI.YellowFade.Show("\u8bf7\u60a8\u8f93\u5165\u60f3\u8981\u641c\u7d22\u7684\u5173\u952e\u8bcd",n.Base.Event,!1,"left"),setTimeout(function(){n.UI.YellowFade.Hide("up")},1200),!1;t=t.replace("'"," "),t=t.replace('"'," "),t=t.replace("script"," "),t=t.replace("?"," "),t=t.replace("?"," "),t=t.replace("/"," "),t=t.replace("\\"," "),t=t.replace("<","&lt;"),t=t.replace(">","&gt;"),t=encodeURIComponent(t),window.location.href="/s~"+t+i()}function i(){var n=new Date,u=n.getUTCFullYear()+"",f=n.getUTCMonth()+1<10?"0"+(n.getUTCMonth()+1):n.getUTCMonth()+1+"",e=n.getUTCDate()<10?"0"+n.getUTCDate():n.getUTCDate()+"",t=n.getUTCHours()<10?"0"+n.getUTCHours():n.getUTCHours()+"",i=n.getUTCMinutes()<10?"0"+n.getUTCMinutes():n.getUTCMinutes()+"";return"?ts="+u+f+e+t+i}return function(n,i,r,u){return r=r||"\u8bf7\u60a8\u8f93\u5165\u60f3\u8981\u641c\u7d22\u7684\u5173\u952e\u8bcd",typeof u=="string"&&u.trim()!=""?n.val(u).addClass("usersearch"):n.val(r),n.focus(function(){$(this).css({color:"#000"}),$(this).val()==r&&$(this).val("").addClass("usersearch")}),n.blur(function(){$(this).css({color:"#aaa"}),$(this).val()==""&&$(this).val(r).removeClass("usersearch")}),n.keypress(function(n){return n=n||event,n.keyCode==13?(t($(this).val()),!1):void 0}),i.bind("click",function(){t(n.val())}),{SearchKeyword:t}}}(),AddFavorite:function(t){t.bind("click",function(){n.Business.WebToolkit.AddFavorite("\u4e70\u978b\u5b50\uff0c\u4e0a\u4e50\u6dd8","http://www.letao.com/")})},BindNavLink:function(t){var v=this.BindNavLink.SubMenuData||{},h={},s=null;t.hover(function(){var i=$(this),t,n,r;c(),f(),t=i.children("a"),t.attr("class")!="nc"&&(s={mainObj:t,prevObj:t.prev("b"),nextObj:t.next("b"),outerObj:i.prev("li")},y(s)),n=i.attr("submenuid"),typeof n!="undefined"&&(r=h[n]||a(n,v[n]),e().SetContent(r),p(i))},function(){r=setTimeout(function(){f()},200)});var y=function(n){n.mainObj.addClass("nd"),n.prevObj.addClass("nl"),n.nextObj.addClass("nr"),n.outerObj.addClass("nobg")},w=function(n){if(n==null)return;n.mainObj.removeClass("nd"),n.prevObj.removeClass("nl"),n.nextObj.removeClass("nr"),n.outerObj.removeClass("nobg")},o=this.BindNavLink,u="LetaoTopBar_SubBar_List",r=null,e=function(){return typeof o._SubBar=="undefined"&&(o._SubBar=n.UI.ModeWindow({ID:u,Title:"",Content:"",CSS:{width:"568px",border:"2px solid #1c92d2",padding:0,"border-top":"0 none"},TitleCSS:{height:"0",display:"none"},ContentCSS:{width:"568px",padding:0},CloseIcon:{ImageSrc:null},Drag:!1,Backover:!1}),$("#"+u).hover(function(){c()},function(){f()})),o._SubBar},p=function(n){e().Show({position:"bindto",relativeTop:33,relativeLeft:-1,showType:"show",bindObject:n})},c=function(){window.clearTimeout(r),r=null},f=function(){$("#"+u).length==1&&e().Close(),w(s)},a=function(n,t){var e,u,f,r,o,v,s,y,c,a;if(typeof t=="undefined"||t==null)return"";r='<div id="SubBar_head">';if(Object.prototype.toString.apply(t.head)==="[object Array]"&&t.head.length>0){for(r+="<ul>",u=0;u<Math.min(t.head.length,8);u++)e="lt_submenu"+n+"_pic_"+u,o=t.head[u],u<7?(r+="<li>",r+=i(e,o[0],o[1],l(o[2],o[1]))):(r+='<li class="noborder">',r+=i(e,o[0],o[1],"\u66f4\u591a>>")),r+="</li>";r+="</ul>"}r+='</div><div id="SubBar_body">';if(Object.prototype.toString.apply(t.body)==="[object Array]"&&t.body.length>0)for(u=0;u<t.body.length;u++){for(v=t.body[u],s=v[0],r+=s[1].indexOf("big-")<0?"<dl>":'<dl class="big">',e="lt_submenu_"+n+"_list_"+u,r+="<dt>",r+=i(e,s[0],s[1].replace("big-",""),s[1].replace("big-","")),r+="</dt>",f=1;f<v.length;f++)y=v[f],r+="<dd>",r+=i(e+"_"+(f-1),y[0],y[1],y[1]),r+="</dd>";r+="</dl>"}r+='</div><div id="SubBar_foot">';if(Object.prototype.toString.apply(t.foot)==="[object Array]"&&t.foot.length>0)for(u=0;u<t.foot.length;u++){c=t.foot[u];if(c.length==0)break;if(u==0)e="lt_submenu_"+n+"_new_",r+="<dl><dt>\u65b0\u54c1\uff1a</dt>";else if(u==1)e="lt_submenu_"+n+"_specials_",r+="<dl><dt>\u7279\u4ef7\uff1a</dt>";else break;for(f=0;f<c.length;f++)a=c[f],r+="<dd>",r+=i(e+f,a[0],a[1],a[1]),r+="</dd>";r+="</dl>"}return r+="</div>",h[n]=r,r},i=function(n,t,i,r){return'<a lt_stat_id="'+n+'" href="'+t+'" title="'+i+'" target="_blank">'+r+"</a>"},l=function(n,t){var r="http://i.ltimg.cn";return'<img src="'+r+n+'" alt="'+t+'" />'}},CoupanAlert:function(){if(n.UI.ModeWindow){var i='<p style="padding:24px 12px 0;line-height:20px;letter-spacing:0.1em;position:relative">\u606d\u559c\uff01\u60a8\u83b7\u5f97<i class="red">1\u5143</i>\u8d2d\u4e70<i class="red">50\u5143</i>\u4e50\u6dd8\u4f18\u60e0\u5238\u7279\u6743&nbsp;&nbsp;<a href="/shoe-letao-999888888" target="_blank" onclick="$(\'#letaoNewComerCoupanAlert\').hide();">\u7acb\u5373\u53bb\u62a2\uff01</a><span onclick="$(\'#letaoNewComerCoupanAlert\').hide();$.LT_AJAX(\'give_up_get_coupan\',null,function(){},\'user_coupan\');" style="display:block;position:absolute;top:12px;right:8px;width:8px;height:7px;background:url(http://i.ltimg.cn/letaozu/images/ui/yellowalert_close.gif) no-repeat 0 0;cursor:pointer"></span></p>',t=n.UI.ModeWindow({ID:"letaoNewComerCoupanAlert",Title:"",Content:i,CSS:{border:"0",width:"199px",background:"transparent"},TitleCSS:{display:"none"},ContentCSS:{background:"url(http://i.ltimg.cn/letaozu/images/ui/yellowalert.gif) no-repeat 0 0",width:"199px",height:"84px",padding:"0"},CloseIcon:!1,Backover:!1,Drag:!1});t.Show({position:"bindto",relativeTop:15,relativeLeft:-80,bindObject:$("#lnkRegist")})}},BindLogo:function(n){var t=this;typeof t.BindLogo.isRun=="undefined"&&(t.BindLogo.isRun=!0),n.hover(function(){t.BindLogo.isRun&&n.css("background-position","right 0")},function(){t.BindLogo.isRun&&n.css("background-position","-1000px -1000px")})},Share:function(){var n=function(){this.url="",this.image="http://i.ltimg.cn/letaozu/images/3rd/share_8365.gif",this.title="",this.content="",this.source="",this.addon="?source="};return n.prototype.Encode=function(){this.url.indexOf("?")<0||(this.addon="&source=");var r=encodeURIComponent(this.url),u=encodeURIComponent(this.image),f=encodeURIComponent(this.title),n=encodeURIComponent(this.content),t=encodeURIComponent(this.source),i=encodeURIComponent(this.addon);return{url:r,image:u,title:f,content:n,source:t,addon:i}},n.prototype.To=function(n,t){var r;t=t||this.source;var f=this,i=this.Encode(),u=t==""?i.url:i.url+i.addon+t;if(n=="tsina"){window.open("http://v.t.sina.com.cn/share/share.php?url="+u+"&appkey=2674876054&title="+i.content+"&pic="+i.image,"_blank","width=615,height=800");return}if(n=="renren"){r=this.content.replace("@\u4e50\u6dd8\u7f51\u4e0a\u978b\u57ce","@\u4e50\u6dd8"),r=encodeURIComponent(r),window.open("http://www.connect.renren.com/share/sharer?url="+u+"&title="+r,"_blank","_blank","width=615,height=505");return}if(n=="kaixin"){window.open("http://www.kaixin001.com/repaste/share.php?rtitle="+i.content+"&rcontent="+i.content+"&rurl="+u);return}if(n=="tqq"){window.open("http://v.t.qq.com/share/share.php?source=a207af85abfc489a835c773edc260832&site=http://www.letao.com&title="+i.content+"&pic="+i.image+"&url="+u,"_blank","width=600,height:500");return}if(n=="tsohu"){r=this.content.replace("@\u4e50\u6dd8\u7f51\u4e0a\u978b\u57ce","@\u4e50\u6dd8\u978b\u57ce"),r=encodeURIComponent(r),window.open("http://t.sohu.com/third/post.jsp?url="+u+"&title="+r+"&content=utf-8&pic="+i.image,"_blank","width=615,height=505");return}if(n=="qzone"){window.open("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+u+"&title="+i.content+"&desc="+i.content+"&pics="+i.image,"_blank","width=615,height=505");return}if(n=="qpengyou"){window.open("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+u+"&to=pengyou&title="+i.content+"&desc="+i.content+"&pics="+i.image,"_blank","width=615,height=505");return}},function(){return new n}}()},n._INSTALL()})(),$(function(){var n,t;try{document.execCommand("BackgroundImageCache",!1,!0)}catch(e){}Letao.Page.HeaderFooter.BindLogo($("#ltlogo")),Letao.Page.HeaderFooter.BindNavLink($("#lttopbar li")),Letao.Page.HeaderFooter.BindShoppingCart("fnMyShopcart1",{position:"bindto",relativeTop:30,relativeLeft:-260,bindObject:null}),Letao.Page.HeaderFooter.BindGoToPay("fnMyGotoPay","fnMyShopcart1",{position:"bindto",relativeTop:30,relativeLeft:-260,bindObject:null});var r=typeof _DEFAULT_SEARCH_KEYWORD=="undefined"?"":_DEFAULT_SEARCH_KEYWORD,u=typeof _USER_SEARCH_KEYWORD=="undefined"?"":_USER_SEARCH_KEYWORD,f=Letao.Page.HeaderFooter.SearchBar($("#iptSearch"),$("#btnSearch"),r,u),i=Letao.Page.HeaderFooter.AutoComplete($("#iptSearch"));i.bindFocusEvent(function(){var n=this._focusData;f.SearchKeyword(n)}),i.run(),Letao.UI.LazyLoad.Run(),n=[],n.push("line"),n.push({href:"/letaozu/MyLetao/OrderList.aspx",title:"\u6211\u7684\u8ba2\u5355",target:"_self",text:"\u6211\u7684\u8ba2\u5355"}),n.push({href:"/letaozu/MyLetao/CommentList.aspx",title:"\u6211\u7684\u8bc4\u4ef7",target:"_self",text:"\u6211\u7684\u8bc4\u4ef7"}),n.push({href:"/letaozu/MyLetao/MyComment.aspx",title:"\u6211\u7684\u54a8\u8be2",target:"_self",text:"\u6211\u7684\u54a8\u8be2"}),n.push("line"),n.push({href:"/letaozu/MyLetao/MyCollection.aspx",title:"\u6211\u7684\u6536\u85cf",target:"_self",text:"\u6211\u7684\u6536\u85cf"}),n.push({href:"/letaozu/MyLetao/MyCoupan.aspx",title:"\u6211\u7684\u4f18\u60e0\u5238",target:"_self",text:"\u6211\u7684\u4f18\u60e0\u5238"}),n.push("line"),n.push({href:"/letaozu/MyLetao/MyAddress.aspx",title:"\u6536\u8d27\u5730\u5740",target:"_self",text:"\u6536\u8d27\u5730\u5740"}),n.push({href:"/letaozu/MyLetao/ChangePwd.aspx",title:"\u4fee\u6539\u5bc6\u7801",target:"_self",text:"\u4fee\u6539\u5bc6\u7801"}),Letao.Page.HeaderFooter.SmallMenu("MyLetao_Menu_DDL",$("#fnMyLetao"),n,{width:"60px"}),t=[],t.push("line"),t.push({herf:"/letaozu/help/helpindex.aspx",title:"\u5e2e\u52a9\u4e2d\u5fc3",target:"_blank",text:"\u5e2e\u52a9\u4e2d\u5fc3"}),t.push({herf:"/letaozu/help/help.aspx?id=1010#3",title:"\u7559\u8a00\u54a8\u8be2",target:"_blank",text:"\u7559\u8a00\u54a8\u8be2"}),t.push("line"),t.push({herf:"/letaozu/help/help.aspx?id=1018",title:"\u552e\u540e\u670d\u52a1",target:"_blank",text:"\u552e\u540e\u670d\u52a1"}),Letao.Page.HeaderFooter.SmallMenu("Help_Menu_DDL",$("#fnHelper"),t,{width:"60px"}),Letao.Page.HeaderFooter.AddFavorite($("#collectletao"))});
