if(typeof NM=="undefined")NM={};(function(a){NM=a.extend(NM,{namespace:function(){var c=arguments,d=null,e,f,b;for(e=0;e<c.length;e++){b=c[e].split(".");d=NM;for(f=b[0]=="NM"?1:0;f<b.length;f++){d[b[f]]=d[b[f]]||{};d=d[b[f]]}}return d}})})(jQuery);
(function(a){a.func={isStrictMode:function(){return document.compatMode!="BackCompat"},pageWidth:function(){return this.isStrictMode()?Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth):Math.max(document.body.scrollWidth,document.body.clientWidth)},pageHeight:function(){return this.isStrictMode()?Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight):Math.max(document.body.scrollHeight,document.body.clientHeight)},winWidth:function(){return this.isStrictMode()?
document.documentElement.clientWidth:document.body.clientWidth},winHeight:function(){return this.isStrictMode()?document.documentElement.clientHeight:document.body.clientHeight},isBlank:function(c){return/^\s*$/.test(c)},isEmail:function(c){return/^[A-Z_a-z0-9-\.]+@([A-Z_a-z0-9-]+\.)+[a-z0-9A-Z]{2,4}$/.test(c)},isNumber:function(c){return/^\d+$/.test(c)},isString:function(c){return typeof c=="string"},isMobile:function(c){return/^((\(\d{2,3}\))|(\d{3}\-))?((1[345]\d{9})|(18\d{9}))$/.test(c)},isZip:function(c){return/^[1-9]\d{5}$/.test(c)},
strLen:function(c){function d(f){return/[\u4E00-\uFA29]|[\uE7C7-\uE7F3]/.test(f)}var e=0;for(i=0;i<c.length;i++)e+=d(c.charAt(i))==true?2:1;return e}}})(jQuery);
(function(a){function c(e,f){function b(){setTimeout(function(){a(g).hide();a(g).height(a.func.pageHeight());a(g).width(a.func.pageWidth());a(g).show()},0)}e=e||0.3;f=f||2E3;var g=a("<div>");d=g;a(g).css({position:"absolute",top:0,left:0,opacity:e,background:"#000","z-index":f}).html('<iframe width="100%" height="100%" frameBorder="0" style="position:absolute;top:0;left:0;z-index:1;"></iframe><div style="position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000000;z-index:2;"></div>');b();
a(window).bind("resize",function(){if(d&&a(d).css("display")!="none")try{b()}catch(h){}});a("body").prepend(d)}var d=null;a.DOM={disable:function(e){d||c();e&&a(document.body).css("overflow","hidden")},enable:function(){if(d){d.remove();a(document.body).css("overflow","");d=null}}}})(jQuery);
(function(a){var c=1E4,d=[];a.dialog=function(b){this.options=a.extend({left:null,top:null,offsetX:0,offsetY:0,width:400,height:"auto",lock:false,overlay:false,closeButton:false,HTML:"",useIframeInIE6:true,clickClose:true,fade:true,scrollCenter:false,onHide:function(){}},b);d.push(this);var g=this;this.container=a("<div>");this.frame=a("<div>");this.frame.append(this.container);a(document.body).prepend(this.frame);a(this.frame).css({position:"absolute",top:-9999,left:-9999,"z-index":c++,width:this.options.width,
height:this.options.height});if(a.browser.msie&&this.options.useIframeInIE6){b=a("<iframe></iframe>").attr("frameborder",0).attr("scrolling","no").css({position:"absolute",top:0,left:0,"z-index":-1,border:0,opacity:0,width:"100%",height:"100%"});this.frame.append(b);this._iframe=b}this.options.HTML!=""?a(this.container).append(this.options.HTML):a(this.container).append(this.buildDOM);this.dialogContainer=a("#ui_dialog_container").removeAttr("id");this.header=a("#ui_dialog_header").removeAttr("id");
this.body=a("#ui_dialog_body").removeAttr("id");this.footer=a("#ui_dialog_footer").removeAttr("id");this.closeButton=a("#ui_dialog_close").removeAttr("id");this.header.hide=function(){a(this).hide();return g};this.footer.hide=function(){a(this).hide();return g};this.options.closeButton?a(this.closeButton).click(function(){g.hide()}):a(this.closeButton).hide();this._hotKeyEvent=function(h){h=h||window.event;code=h.keyCode;code=="27"&&g.hide()};a(document).bind("keyup",g._hotKeyEvent);this._clickClose=
function(h){h.button!=2&&g.hide()};this._scrollCenter=function(){setTimeout(function(){g.refresh()},100)}};a.dialog.prototype={header:null,body:null,footer:null,_iframe:null,_buttons:[],buildDOM:function(){return'<table id="ui_dialog_container" style="width: 100%; height: 100%;" class="pop_dialog_table"><tbody><tr><td class="pop_tl"></td><td class="pop_tc"></td><td class="pop_tr"></td></tr><tr><td class="pop_content" colspan="3"><div class="dialog_header"><div id="ui_dialog_header" class="dialog_title"></div><a id="ui_dialog_close" class="dialog_close" href="javascript:;" >\u5173\u95ed</a></div><div id="ui_dialog_body" class="dialog_body"></div><div id="ui_dialog_footer" class="dialog_footer"></div></td></tr><tr><td class="pop_bl"></td><td class="pop_bc"></td><td class="pop_br"></td></tr></tbody></table>'},
setOffsetX:function(b){a(this.frame).css("left",parseInt(a(this.frame).css("left"))+b)},setOffsetY:function(b){a(this.frame).css("top",parseInt(a(this.frame).css("top"))+b)},setWidth:function(b){a(this.frame).css("width",b);this.show();return this},setHeight:function(b){a(this.frame).css("height",b);this.show();return this},resizeTo:function(b,g){this.setWidth(b);this.setHeight(g);return this},addStyle:function(b){a(this.dialogContainer).addClass(b);return this},show:function(){var b=this;a(this.frame).hide();
var g,h;g=this.options.left||Math.max(parseInt((a.func.winWidth()-a(this.frame).width())/2),0)+a(document).scrollLeft();h=this.options.top||Math.max(parseInt((a.func.winHeight()-a(this.frame).height())/2),0)+a(document).scrollTop();g+=this.options.offsetX;h+=this.options.offsetY;this.moveTo(g,h);this.options.overlay&&a.DOM.disable();this.options.lock&&a.DOM.disable(true);this.options.fade&&!a.browser.msie?setTimeout(function(){a(b.frame).fadeIn(500)},0):setTimeout(function(){a(b.frame).show()},0);
if(this.options.clickClose){a(document).bind("click",b._clickClose);a(this.frame).click(function(j){j.stopPropagation()})}this.options.scrollCenter&&a(window).bind("scroll",b._scrollCenter);a(window).resize(function(){b.refresh()});return this},hide:function(){var b=this;if(this.options.fade&&!a.browser.msie)a(this.frame).fadeOut(function(){a(b.frame).css({left:-9999,top:-9999});a.DOM.enable()});else{a(this.frame).hide();a.DOM.enable()}a(document).unbind("click",b._clickClose);a(window).unbind("scroll",
b._scrollCenter);this.options.onHide();return this},remove:function(){a(document).unbind("keyup",this._addHotKey);a(this.frame).remove();a.DOM.enable();a(document).unbind("click",this._clickClose);return this},moveTo:function(b,g){a.func.isNumber(b)&&a(this.frame).css("left",b);a.func.isNumber(g)&&a(this.frame).css("top",g);return this},refresh:function(){var b,g;b=this.options.left||Math.max(parseInt((a.func.winWidth()-a(this.frame).width())/2),0)+a(document).scrollLeft();g=this.options.top||Math.max(parseInt((a.func.winHeight()-
a(this.frame).height())/2),0)+a(document).scrollTop();b+=this.options.offsetX;g+=this.options.offsetY;this.moveTo(b,g)},setX:function(b){moveTo(b);return this},setY:function(b){moveTo(null,b);return this},setIndex:function(b){a(this.frame).css("z-index",b);return this},setHeader:function(b){this.header.append(b);return this},setBody:function(b){this.body.append(b);return this},setFooter:function(b){this.footer.append(b);return this},addButton:function(b){var g=a("<input>").attr("type","button").attr("class",
"input-btn").addClass(b.className).val(b.text).click(function(){b.onclick()});this.footer.append(g);this._buttons.push(g);return this},getButton:function(b){for(var g=this._buttons,h=g.length-1;h>=0;h--)if(a(g[h]).val()==b)return g[h];return null},delButton:function(b){a(this.getButton(b)).remove();return this}};var e=null;a.alert=function(b){e&&e.remove();var g={};g=a.func.isString(b)?a.extend(g,{message:b}):a.extend(g,b);g=a.extend(g,{fade:false,clickClose:false});var h=(new a.dialog(g)).setHeader(g.title?
g.title:"\u63d0\u793a").setBody(g.message).addButton({text:g.yes?g.yes:"\u786e\u5b9a",onclick:function(){g.callback&&g.callback();h.hide()},className:"btn-b-s-2"}).show();setTimeout(function(){h.getButton("\u786e\u5b9a").focus()},0);return e=h};var f=null;a.confirm=function(b,g){f&&f.remove();var h={};h=a.func.isString(b)?a.extend(h,{message:b,callback:g}):a.extend(h,b);h=a.extend(h,{fade:false,clickClose:false});var j=(new a.dialog(h)).setHeader(h.title?h.title:"\u63d0\u793a").setBody(h.message).addButton({text:h.yes?
h.yes:"\u786e\u5b9a",onclick:function(){if(h.callback)if(h.callback(true))return;j.hide()},className:"btn-b-s-2"}).addButton({text:h.no?h.no:"\u53d6\u6d88",onclick:function(){h.callback&&h.callback(false);j.hide()},className:"btn-g-s-2"}).show();setTimeout(function(){j.getButton(h.yes?h.yes:"\u786e\u5b9a").focus()},0);return f=j}})(jQuery);
function connectToRR(a){var c="";if(typeof a!="undefined")c="?origURL="+encodeURIComponent(a);else if($("#buydata4reg")[0])c="?buydata="+buyDate2Str($("#dealBuyForm").serializeArray())+"&origURL="+$("#origURLLogin").val();else if($.trim(window.location.search)!="")c=window.location.search;setTimeout(function(){$.getScript("http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp",function(){XN_RequireFeatures(["Connect"],function(){XN.Main.init("ca682808888647fbb86f1bf4b1331b9d","/xd_receiver.html");
XN.Connect.requireSession(function(){setTimeout(function(){window.location.href="/user/renren"+c},10)})})})},50)}
function connectToSina(a){var c="";if(typeof a!="undefined")c="?origURL="+encodeURIComponent(a);else if($("#buydata4reg")[0])c="?buydata="+buyDate2Str($("#dealBuyForm").serializeArray())+"&origURL="+$("#origURLLogin").val();else if($.trim(window.location.search)!="")c=window.location.search;var d=null;if(!d){d=(new $.dialog({closeButton:true,width:500,height:420,HTML:'<div id="ui_dialog_container"><div id="ui_dialog_header"></div><div id="ui_dialog_body"></div><div id="ui_dialog_footer"></div></div>',overlay:true,
clickClose:false})).setBody('<div class="sina-pop"><iframe id="sinaFrame" name="sinaFrame" frameborder="0" scrolling="no" style="height:420px; width:500px;" src="/sinaconnect'+c+'" ></iframe><a href="javascript:;" class="close" id="sinaPopClose">\u5173\u95ed</a></div>');d.header.hide()}d.show();$("#sinaPopClose").click(function(){d.hide()});return false}
function connectTo360(a){var c="";if(typeof a!="undefined")c="?origURL="+encodeURIComponent(a);else if($("#buydata4reg")[0])c="?buydata="+buyDate2Str($("#dealBuyForm").serializeArray())+"&origURL="+$("#origURLLogin").val();else if($.trim(window.location.search)!="")c=window.location.search;var d=null;if(!d){d=(new $.dialog({closeButton:true,width:500,height:420,HTML:'<div id="ui_dialog_container"><div id="ui_dialog_header"></div><div id="ui_dialog_body"></div><div id="ui_dialog_footer"></div></div>',
overlay:true,clickClose:false})).setBody('<div class="sina-pop"><iframe id="sinaFrame" name="sinaFrame" frameborder="0" scrolling="no" style="height:460px; width:500px;background:#FFF;" src="/360connect'+c+'" ></iframe><a href="javascript:;" class="close" id="popClose" style="color:#FFF;">\u5173\u95ed</a></div>');d.header.hide()}d.show();$("#popClose").click(function(){d.hide()});return false}
function follow139(){setTimeout(function(){$.getScript("http://auth.139.com/connect/featureloader.php",function(){var a=setInterval(function(){if(MI&&MI.init){clearInterval(a);MI.init("9998a1b5f11eff0f24c249b9c1308070","http://www.nuomi.com/139proxy.htm");MI.Connect.requireSession(function(c){c.status==MI.ConnectState.connected&&$.post("/user/follow139",{u:c.userid,t:c.token},function(d){d.code==0&&$.alert({title:"<h3>\u7cef\u7c73\u63d0\u793a</h3>",message:'<p style="text-align:center; font-size:14px;"><span style="background:url(http://static.nuomi.com/img/icon/smile.png?v=20100629) no-repeat left center; display:inline-block; padding:25px 0 25px 35px; ">\u5173\u6ce8\u6210\u529f!</span></p>',
overlay:true,closeButton:true})},"json")},function(){})}},500)})},0)}
jQuery(function(){var a=null;window.showPopLogin=function(){if($("#loginForm")[0]&&!$("#loginRegDiv")[0])$("#emailLogin").focus();else{if(a)a.show();else{a=(new $.dialog({overlay:true,closeButton:true})).setHeader('<div class="login-title"><h3>\u767b\u5f55</h3><span>\u6216\u8005<a href="/reg">\u6ce8\u518c</a></span></div>').setBody('<div class="pop-login">\t<div class="login-form">\t\t<form id="loginFormPop" action="/login" method="post" name="login">\t\t\t<div class="field email">\t\t\t\t<label for="emailLoginPop">Email\uff1a</label>\t\t\t\t<div class="input-area">\t\t\t\t\t<p><input type="text" class="input-txt" id="emailLoginPop" name="email" tabindex="1" /></p>\t\t\t\t\t<p class="tip"></p>\t\t\t\t</div>\t\t\t\t<span class="msg" id="msgEmailLoginPop"></span>\t\t\t</div>\t\t\t<div class="field pass">\t\t\t\t<label for="passwordLoginPop">\u5bc6\u7801\uff1a</label>\t\t\t\t<div class="input-area">\t\t\t\t\t<p><input type="password" class="input-txt" id="passwordLoginPop" name="password" tabindex="2" /></p>\t\t\t\t\t<p class="tip"></p>\t\t\t\t</div>\t\t\t\t<span class="msg" id="msgPassLoginPop"></span>\t\t\t</div>\t\t\t<div class="field remember">\t\t\t\t<label for="remember"><input type="checkbox" name="remember" id="remember"  tabindex="3" />\u4e0b\u6b21\u81ea\u52a8\u767b\u5f55</label>\t\t\t\t<p><a href="/user/passwordRetrieve" tabindex="6">\u627e\u56de\u5bc6\u7801</a></p>\t\t\t</div>\t\t\t<div class="login-btn">\t\t\t\t<input type="hidden" value="'+window.location.pathname+
window.location.search+'" name="origURL" />\t\t\t\t<input type="submit" class="input-btn" value="\u767b\u5f55"  tabindex="4" />\t\t\t</div>\t\t</form>\t</div>\t<div style="padding:10px 10px 0 10px; border-top:1px solid #DEDEDE;"><p style="padding-left:80px;">\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5408\u4f5c\u7f51\u7ad9\u5e10\u53f7\u767b\u5f55\u7cef\u7c73</p></div>\t<div class="connect2rr"><a href="javascript:;" id="connectRR"><img src="http://static.nuomi.com/img/button/connect-rr.png"  tabindex="5" /></a>&nbsp;&nbsp;<a href="javascript:;" id="connectSina"><img src="http://static.nuomi.com/img/button/connect-sina.png"  tabindex="6" /></a>&nbsp;&nbsp;<a href="javascript:;" id="connect360"><img src="http://static.nuomi.com/img/button/connect-360.png"  tabindex="6" /></a></div></div>').setFooter("").show();
$("#connectRR").click(function(){connectToRR();a.hide()});$("#connectSina").click(function(){connectToSina();a.hide()});$("#connect360").click(function(){connectTo360();a.hide()})}$("#emailLoginPop").bind("blur",function(){});$("#passwordLoginPop").bind("blur",function(){});$("#loginFormPop").bind("submit",function(){});$("#loginFormPop .input-txt").each(function(){$(this).bind("focus",function(){$(this).addClass("focus")});$(this).bind("blur",function(){$(this).removeClass("focus")})});$("#emailLoginPop").focus()}};
$("#showPopLoginLink")[0]&&$("#showPopLoginLink").click(function(c){c.stopPropagation()})});function CountDown(a){if(a.startTime==null)throw"args:startTime is null";if(a.endTime==null)throw"args:endTime is null";this.startTime=a.startTime.constructor==Date?a.startTime.getTime():a.startTime;this.endTime=a.endTime.constructor==Date?a.endTime.getTime():a.endTime;this.callback=a.callback||new Function;this.startCount()}
CountDown.prototype={startCount:function(){var a=this.startTime,c=this.endTime,d=this.callback,e=setInterval(function(){a+=1E3;if(a>c)clearInterval(e);else{var f=(c-a)/1E3,b=parseInt(f/3600/24),g=parseInt((f-b*24*3600)/3600),h=parseInt((f-b*24*3600-g*3600)/60);f=parseInt(f-b*24*3600-g*3600-h*60);d(b,g,h,f)}},1E3)}};
jQuery(function(){$(".countdown").each(function(){if($(this).attr("endtime")){var a=this,c="";new CountDown({startTime:$(this).attr("starttime")*1,endTime:$(this).attr("endtime")*1,callback:function(d,e,f,b){c="<span>"+(d!=0?"<em>"+d+"</em>\u5929":"")+"<em>"+(e<10?"0"+e:e)+"</em>\u65f6<em>"+(f<10?"0"+f:f)+"</em>\u5206<em>"+(b<10?"0"+b:b)+"</em>\u79d2</span>";$(a).html(c);d==0&&e==0&&f==0&&b==0&&window.location.reload()}})}})});jQuery(function(){$(".selector").mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")})});
jQuery(function(){$(".self-table")[0]&&$(".self-table tr").each(function(){$(this).mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")})})});jQuery(function(){$(".feed-btn")[0]&&$(".feed-btn").each(function(){$(this).mouseover(function(){$(this).addClass("feed-hover")}).click(function(){$(this).addClass("feed-activity")}).mouseout(function(){$(this).removeClass("feed-hover").removeClass("feed-activity")})})});
function copyCode(a){var c=$("#"+a).val();copy2Clipboard(c)!=false?$.alert('<p style="algin:center; padding:25px 0;">\u590d\u5236\u6210\u529f !</p>'):alert("\u60a8\u4f7f\u7528\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6b64\u590d\u5236\u529f\u80fd\uff0c\u8bf7\u4f7f\u7528Ctrl+C\u6216\u9f20\u6807\u53f3\u952e\u3002");$("#"+a).focus().select()}copy2Clipboard=function(a){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",a);return true}else return false};
jQuery.fn.extend({blink:function(a,c,d,e){d=d?d:(c=c?c:200);for(var f=0;f<(a?a:1);f++)this.addClass(e).fadeOut(c).fadeIn(d,function(){$(this).removeClass(e)})}});

jQuery(function(){$.emailSubscriber=function(a,c){this.form=$("#"+a);this.defaultValue=c||"\u8f93\u5165Email\u5730\u5740";this.errorMsg={emailBlank:"\u8bf7\u8f93\u5165\u60a8\u7684Email\u5730\u5740\u3002",emailError:"\u9519\u8bef\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u54e6\uff01",cityBlank:"\u8bf7\u586b\u5199\u60a8\u7684\u57ce\u5e02"};this.ipt=$("#"+a+' input[name="email"]');this.emailAddress={"163.com":"163","126.com":"163","gmail.com":"gmail","qq.com":"qq","vip.qq.com":"qq","foxmail.com":"qq",
"live.com":"live","live.cn":"live","hotmail.com":"live","yahoo.com.cn":"yahoo","yahoo.cn":"yahoo","sina.com":"sina","vip.sina.com":"sina","sohu.com":"sohu","139.com":"139"};this.init()};$.emailSubscriber.prototype={init:function(){var a=this;this.setDefaultValue();this.form.submit(function(){a.post();return false})},setDefaultValue:function(){var a=this;this.ipt.val(this.defaultValue);this.ipt.focus(function(){if($(this).val()==a.defaultValue){$(this).val("");$(this).css("color","#333").css("font-weight",
"bold")}}).blur(function(){if($(this).val()==""){$(this).val(a.defaultValue);$(this).css("color","").css("font-weight","")}})},post:function(){var a=this;if(this.check()){var c=this.emailAddress[this.ipt.val().split("@")[1]],d=this.form.serialize();$.post("/subscribe/add",d,function(e){e.code==0?$.alert({title:"\u8ba2\u9605\u6210\u529f",message:'<div class="subs-alert">\t<div class="subs-succ"><h3>\u90ae\u4ef6\u8ba2\u9605\u6210\u529f\uff01</h3><p>\u6bcf\u5929\u7684\u56e2\u8d2d\u5c06\u53ca\u65f6\u53d1\u5230\u4f60\u90ae\u7bb1</p></div>\t<div class="subs-tip">\t\t<p>\u4f60\u53ef\u80fd\u6536\u4e0d\u5230\u8ba2\u9605\u90ae\u4ef6...</p>\t\t<p>\u8bf7\u5c06info@nuomi.com \u52a0\u5165\u90ae\u7bb1\u767d\u540d\u5355</p>\t\t<p><strong><a href="/help/email/'+
(c?c:"other")+'" target="_blank">\u7acb\u5373\u8fdb\u884c\u8bbe\u7f6e&raquo;</a></strong></p>\t</div></div>',overlay:true,closeButton:true,onHide:function(){a.ipt.focus()}}).footer.empty():$.alert({title:"<h3>\u7cef\u7c73\u63d0\u793a</h3>",message:'<p style="text-align:center; font-size:14px;"><span style="background:url(http://static.nuomi.com/img/icon/smile.png?v=20100629) no-repeat left center; display:inline-block; padding:25px 0 25px 35px; ">'+e.msg+"</span></p>",overlay:true,closeButton:true,
onHide:function(){a.ipt.focus()}})},"json")}},check:function(){var a=this;if($.func.isBlank(a.ipt.val())||a.ipt.val()==a.defaultValue){$.alert({title:"<h3>\u7cef\u7c73\u63d0\u793a</h3>",message:'<p style="text-align:center; font-size:14px;"><span style="background:url(http://static.nuomi.com/img/icon/smile.png?v=20100629) no-repeat left center; display:inline-block; padding:25px 0 25px 35px; ">'+a.errorMsg.emailBlank+"</span></p>",overlay:true,closeButton:true,onHide:function(){a.ipt.focus()}});return false}else if($.func.isEmail(a.ipt.val()))if($("#city:visible")[0]&&
$.trim($("#city:visible").val())==""){$.alert({title:"<h3>\u7cef\u7c73\u63d0\u793a</h3>",message:'<p style="text-align:center; font-size:14px;"><span style="background:url(http://static.nuomi.com/img/icon/smile.png?v=20100629) no-repeat left center; display:inline-block; padding:25px 0 25px 35px; ">'+a.errorMsg.cityBlank+"</span></p>",overlay:true,closeButton:true,onHide:function(){a.ipt.focus()}});return false}else return true;else{$.alert({title:"<h3>\u7cef\u7c73\u63d0\u793a</h3>",message:'<p style="text-align:center; font-size:14px;"><span style="background:url(http://static.nuomi.com/img/icon/fail.png?v=20100629) no-repeat left center; display:inline-block; padding:25px 0 25px 35px; ">'+
a.errorMsg.emailError+"</span></p>",overlay:true,closeButton:true,onHide:function(){a.ipt.focus()}});return false}}}});
jQuery.cookie=function(a,c,d){if(typeof c!="undefined"){d=d||{};if(c===null){c="";d.expires=-1}var e="";if(d.expires&&(typeof d.expires=="number"||d.expires.toUTCString)){if(typeof d.expires=="number"){e=new Date;e.setTime(e.getTime()+d.expires*24*60*60*1E3)}else e=d.expires;e="; expires="+e.toUTCString()}var f=d.path?"; path="+d.path:"",b=d.domain?"; domain="+d.domain:"";d=d.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(c),e,f,b,d].join("")}else{c=null;if(document.cookie&&document.cookie!=
""){d=document.cookie.split(";");for(e=0;e<d.length;e++){f=jQuery.trim(d[e]);if(f.substring(0,a.length+1)==a+"="){c=decodeURIComponent(f.substring(a.length+1));break}}}return c}};
function openChat(a,c){if(c=="online")window.open(a,"chatWindow","width=500,height=520,toolbar=no,scrollbars=no,menubar=no,location=no,left="+Math.max((screen.width-500)/2,0)+",top="+Math.max((screen.height-600)/2,0));else window.location.href.indexOf("gossip")>=0?$.confirm({title:"\u5ba2\u670d\u5f53\u524d\u79bb\u7ebf",message:'<p style="text-align:center; padding:30px 0; font-size:14px;">\u975e\u5728\u7ebf\u5ba2\u670d\u5de5\u4f5c\u65f6\u95f4\uff0c\u5982\u6709\u95ee\u9898\u8bf7\u7ed9\u6211\u4eec\u7559\u8a00\uff0c\u6211\u4eec\u4f1a\u5c3d\u5feb\u56de\u590d\u3002</p>',width:440,
overlay:true,callback:function(d){if(d){window.location.hash="ask";$("#ask").show();$("#ask textarea").focus()}}}).getButton("\u53d6\u6d88").remove():$.confirm({title:"\u5f53\u524d\u5ba2\u670d\u4e0d\u5728\u7ebf",message:'<p style="text-align:center; padding:30px 0; font-size:14px;">\u975e\u5728\u7ebf\u5ba2\u670d\u5de5\u4f5c\u65f6\u95f4\uff0c\u5982\u6709\u95ee\u9898\u8bf7\u7ed9\u6211\u4eec\u7559\u8a00\uff0c\u6211\u4eec\u4f1a\u5c3d\u5feb\u56de\u590d\u3002</p>',width:440,overlay:true,callback:function(){}}).getButton("\u53d6\u6d88").remove()}
function showMsg(a){$.alert({message:'<p style="padding:20px 0; text-align:center; font-size:14px;">'+a+"</p>",overlay:true,closeButton:true})}
function sendToPhone(a){var c=a.sendNum.value;if($.func.isBlank(c)){showMsg("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01");return false}if(c.length!=11){showMsg("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01");return false}a=$(a).serialize();$.get("/user/certificateToSMS",a,function(d){if(d.code==0)showMsg("\u53d1\u9001\u6210\u529f");else if(d.code==1)showMsg("\u53d1\u9001\u77ed\u4fe1\u51fa\u4e86\u70b9\u5c0f\u6545\u969c\uff0c\u7a0d\u540e\u518d\u8bd5\u8bd5\u5427\uff01");else d.code==
2&&showMsg("\u6bcf\u5f20\u7cef\u7c73\u5238\u6bcf\u5929\u53ea\u80fd\u53d1\u4e09\u6b21\u54e6")},"json")}jQuery(function(){$.browser.msie&&$("label").click(function(){if(!($(this).children(":radio")[0]&&$(this).children(":radio")[0].disabled==true))if($(this).children(":radio")[0])$(this).children(":radio").attr("checked",true).blur();else $(this).attr("for")&&$(":radio#"+$(this).attr("for")).attr("checked",true).blur()})});
function buyDate2Str(a){var c=[];$.each(a,function(d,e){c.push('"'+e.name+'":"'+e.value+'"')});return c="{"+c.join(",")+"}"}function selectInput(a){$("#"+a).focus(function(){$(this).select()}).mousedown(function(c){c.preventDefault();$(this).select()})}jQuery(function(){setTimeout(function(){$(".error_msg,.success_msg").hide()},5E3)});
jQuery(function(){function a(){$("#want h3").addClass("activity");$("#wantWrap").slideDown(function(){d.val(f)})}if($("#want")[0]){var c=$("#curNum"),d=$("#wantForm textarea"),e=0,f="\u5728\u8fd9\u91cc\u5199\u4e0b\u4f60\u60f3\u56e2\u7684\u4e1c\u897f\u5427";$("#want h3").bind("click",a);c.text(e=$.trim(d.val()).length);d.keyup(function(){c.text(e=$.trim(d.val()).length);if(e>=140){d.val(d.val().substring(0,140)).attr("scrollTop",1E3);c.text(e=140).addClass("error")}else c.removeClass("error")}).focus(function(){$(this).addClass("focus");
$(this).val()==f&&$(this).val("")}).blur(function(){$(this).removeClass("focus");$(this).val()==""&&$(this).val(f)});a();$("#wantForm").submit(function(){e<=140&&e>0&&d.val()!=f&&$.post("/user/want",$("#wantForm").serialize(),function(b){if(b.code==0){$("#want h3").unbind("click",a);$("#wantWrap").hide();$("#want h3").removeClass("activity").addClass("success").text("\u53d1\u9001\u6210\u529f\uff01")}else alert(b.msg)},"json");return false})}});
jQuery(function(){if(!(typeof isStating=="undefined"||!isStating))if($("#hd .header")[0]){var a=$("#hd .header").eq(0).offset().left;$(window).resize(function(){a=$("#hd .header").eq(0).offset().left});$(document).mousedown(function(c){var d={};d.r=encodeURIComponent(window.location.href);c=c||window.event;var e,f,b=c.target||c.srcElement;if(b&&3==b.nodeType)b=b.parentNode;if(b&&b.tagName){f=b.tagName.toLowerCase();if(f=="img")e=b.src;else if(f=="a")e=b.href;if(e)d.u=encodeURIComponent(e);if(f)d.t=
f;d.x=c.pageX-a;d.y=c.pageY;(new Image).src="http://click.nuomi.com/tj?"+$.param(d)+"&s="+Math.random()}})}});
function downBySms(a){var c="/youhui/sendsms",d="";$.post("/youhui/getsmscontent","id="+a,function(e){function f(){var b=$("#phoneNum").val();/^\s*$/.test(b)||!/^((\(\d{2,3}\))|(\d{3}\-))?((1[345]\d{9})|(18\d{9}))$/.test(b)?$("#pMsg").text("\u8bf7\u586b\u5199\u6b63\u786e\u7684\u624b\u673a\u53f7"):$.post(c,"id="+a+"&sendNum="+b,function(g){if(g.code==0){var h=$.alert({title:"\u77ed\u4fe1\u4f18\u60e0\u5238\u4e0b\u8f7d",message:'<div class="send-success"><h3>\u77ed\u4fe1\u5df2\u6210\u529f\u53d1\u9001\u81f3<storng class="cp">'+
b+'</strong></h3><p class="tip">\u7cfb\u7edf\u7e41\u5fd9\u65f6\u4f1a\u67093-5\u5206\u949f\u7684\u53d1\u9001\u5ef6\u8fdf\uff0c\u8bf7\u4e0d\u8981\u5728\u77ed\u65f6\u95f4\u5185\u91cd\u590d\u4e0b\u8f7d\u3002</p></div>',width:460,overlay:true,closeButton:true,scrollCenter:true}).delButton("\u786e\u5b9a").addButton({text:"\u5b8c \u6210",onclick:function(){h.hide()},className:"btn-b-s-2"});h.footer.css("text-align","center")}else g.code==2&&$("#pMsg").text("\u624b\u673a\u53f7\u4e0d\u5408\u6cd5\u6216\u8005\u8d85\u51fa\u6bcf\u5929\u6bcf\u4e2a\u4f18\u60e0\u5238\u53ea\u80fd\u4e24\u6b21\u7684\u9891\u7387")},
"json")}if(e.login==0)window.location.href="/login?origURL="+encodeURIComponent(window.location.pathname+window.location.search+"#vid"+a);else{d=e.content;isConnectUser=e.connect;$.alert({title:"\u77ed\u4fe1\u4f18\u60e0\u5238\u4e0b\u8f7d",message:'<div class="pop-sms">\t<p class="lgd">\u4f60\u5c06\u4f1a\u6536\u5230\u5982\u4e0b\u77ed\u4fe1\uff1a</p>\t<p class="sms-content">'+d+'\t</p>\t<div class="sendform">\t\t<div class="phone">\t\t\t<p class="l">\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u7801\uff1a</p>\t\t\t<p class="ipt">\t\t\t\t<input type="text" class="input-txt" id="phoneNum" value="'+
e.mobile+'" /> <span class="message" id="pMsg"></span>\t\t\t</p>\t\t\t<p class="tip">\u6bcf\u5929\u53ef\u514d\u8d39\u4e0b\u8f7d<strong class="cp"> 5 </strong> \u6761\u77ed\u4fe1\u4f18\u60e0\u5238</p>\t\t</div>\t</div></div>',width:460,overlay:true,closeButton:true,scrollCenter:true}).delButton("\u786e\u5b9a").addButton({text:"\u53d1\u9001",onclick:function(){f()},className:"send-sms"});$("#phoneNum").keydown(function(b){$("#pMsg").text("");b.keyCode==13&&f()})}},"json")}
jQuery(function(){window.location.hash!=""&&window.location.hash.indexOf("vid")>0&&downBySms(parseInt(window.location.hash.replace("#vid","")))});
jQuery(function(){function a(c){function d(l){$("#btn-bm-sendvalid").click(function(){n=$("#dial-mobile-number").val();$.post(url.sendvalid,{mobile:n},function(k){k=eval(k);if(k.code==0){p();l()}else q(k.msg)},"json")})}function e(l){r.body.empty().append(l)}function f(){$("#btn-bm-checkvalid").click(function(){var l=$("#dial-validation-number").val();$.post(url.checkvalid,{mobile:n,validCode:l},function(k){k=eval(k);if(k.code==0){e(message.success);p();h();$("#refillAnker").get(0)&&$("#refillAnker").remove();
j&&typeof j=="function"&&j({mobile:n,dial:r});NM.bindMobileResult=true}else q(k.msg)},"json")})}function b(){e(message.input);$(".long-area").val(n);d(function(){e(message.validate);g();f()})}function g(){var l=10;q('\u5982\u679c\u60a8\u6ca1\u6709\u6536\u5230\u9a8c\u8bc1\u7801\uff0c\u53ef\u5728 <span id="refillTimer" style="color:#ccc;">'+l+"</span> \u79d2\u540e\u7533\u8bf7\u91cd\u65b0\u53d1\u9001");NM.reBindMobileTimer=setInterval(function(){if(l==1){clearInterval(NM.reBindMobileTimer);intv=null;
p();if(!$(".dial-bm-success").get(0)&&!$(".dial-bm-input").get(0)){$(".dial-bm-tips").before('<div id="refillAnker" style="text-align:center"><a id="refillMobile" href="#">'+txt.label.refill+"</a></div>");$("#refillMobile").click(function(){b();$(this).remove()})}}$("#refillTimer").html(--l)},1E3)}function h(){NM.bindSuccessCloseTimer=setTimeout(function(){$(".dial-bm-success").get(0)&&$(".dialog_close").click()},3E3)}var j=c.bindSuccessCB,o=c.autoFill,m=c.customInitial;txt={title:"\u7ed1\u5b9a\u624b\u673a\u53f7\u7801",
btn:{input:"\u53d1\u9001\u9a8c\u8bc1\u7801",validate:"\u9a8c\u8bc1\u6821\u9a8c\u7801"},label:{input:"\u624b\u673a\u53f7\u7801",validate:"\u8f93\u5165\u9a8c\u8bc1\u7801",success1:"\u606d\u559c\u60a8\uff01\u624b\u673a\u5df2\u7ed1\u5b9a\u6210\u529f\uff01",success2:"\u66f4\u5b89\u5168\u7684\u4eab\u53d7\u7cef\u7c73\u7cbe\u54c1\u56e2\u8d2d",refill:"\u91cd\u65b0\u586b\u5199\u624b\u673a\u53f7\uff0c\u6216\u91cd\u65b0\u9001\u9a8c\u8bc1\u7801"}};url={sendvalid:"http://www.nuomi.com/user/setting/sendvalid",checkvalid:"http://www.nuomi.com/user/setting/checkvalid"};
message={input:'<div class="dial-bm-head dial-bm-input"></div><div class="dial-bm-content"><label for="dial-mobile-number">'+txt.label.input+'</label><input class="long-area" id="dial-mobile-number" type="text"><button id="btn-bm-sendvalid">'+txt.btn.input+"</button></div>",validate:'<div class="dial-bm-head dial-bm-validate"></div><div class="dial-bm-content"><label for="dial-validation-number">'+txt.label.validate+'</label><input class="short-area" id="dial-validation-number" type="text"><button id="btn-bm-checkvalid">'+
txt.btn.validate+"</button></div>",success:'<div class="dial-bm-content"><div class="dial-bm-success"><span style="font-weight:bold;font-size:14px;">'+txt.label.success1+'</span><br/><span style="font-size:12px;">'+txt.label.success2+"</span></div></div>",ft:'<div class="dial-bm-tips"></div><div class="dial-bm-ft"><div class="ft-content"><div style="font-size:12px;font-weight:bold;margin-bottom:5px;">\u4e3a\u4ec0\u4e48\u8981\u7ed1\u5b9a\u60a8\u7684\u624b\u673a\u5462\uff1f</div>1.\u624b\u673a\u627e\u56de\u5bc6\u7801\uff08\u9057\u5fd8\u5bc6\u7801\u7684\u65f6\u5019\u901a\u8fc7\u624b\u673a\u8f7b\u6613\u627e\u56de\uff09<br/>2.\u7ed1\u5b9a\u624b\u673a\u540e\uff0c\u53ef\u4ee5\u8d2d\u4e70\u7279\u6b8a\u5546\u54c1<br/>3.\u4fbf\u4e8e\u6211\u4eec\u4e3a\u60a8\u63d0\u4f9b\u66f4\u597d\u7684\u670d\u52a1<br/></div></div>'};
var r=null;NM.reBindMobileTimer=null;NM.bindSuccessCloseTimer=null;var n="",q=function(l){var k=$(".dial-bm-tips");k.empty();k.css("visibility","visible").html(l)},p=function(){$(".dial-bm-tips").empty().css("visibility","hidden")};(function(){r=(new $.alert({title:txt.title,clickClose:true,overlay:true,closeButton:true,onHide:function(){clearInterval(NM.reBindMobileTimer);clearTimeout(NM.bindSuccessCloseTimer)}})).setBody(message.input).setFooter(message.ft).delButton("\u786e\u5b9a");o&&typeof o==
"function"&&o();m&&typeof m=="function"&&m()})();d(function(){e(message.validate);g();f()})}window.NM.bindMobile=a;$("a.bind-mobile").click(function(){var c=this;a({bindSuccessCB:function(d){if($("#phone")){var e=$("#phone").parent().parent().next().next().children("a");e.html()!="\u4fee\u6539\u7ed1\u5b9a\u53f7\u7801"&&e.html("\u4fee\u6539\u7ed1\u5b9a\u53f7\u7801").css("fontWeight","normal");$("#phone").replaceWith('<div class="binded-phone">'+d.mobile+"</div>");$(".binded-phone").parent().parent().width(120)}$(".binded-phone")&&
$(".binded-phone").html(d.mobile)},autoFill:function(){$("#dial-mobile-number").get(0)&&$("#dial-mobile-number").val($("#phone").val());$(".binded-phone").get(0)&&$("#dial-mobile-number").val($(".binded-phone").html())},customInitial:function(){$(".dialog_title").html($(c).html())}})})});
jQuery(function(){function a(e,f){$.alert({title:"\u52a8\u6001\u7801\u9a8c\u8bc1",message:'<p style="padding-top:10px; text-align:center;">\u9a8c\u8bc1\u77ed\u4fe1\u4f1a\u53d1\u9001\u5230\u60a8\u8d2d\u4e70\u65f6\u586b\u5199\u7684\u624b\u673a\u53f7\u7801:'+f+'</p><p style="text-align:center; padding:10px 0;"><input class="input-btn" id="getCodeBtn" style="padding:0 10px;" type="button" value="\u53d1\u9001\u9a8c\u8bc1\u77ed\u4fe1" /></p><p style="text-align:center;"><input type="text" style="width:60px;" class="input-txt" id="validCode" /> <input type="button" id="validCodeBtn" class="input-btn btn-b-s-2" value="\u9a8c\u8bc1" /></p><p id="showError" style="display:none; text-align:center; padding-top:10px; color:red;"></p>',
closeButton:true,overlay:true}).delButton("\u786e\u5b9a");$("#getCodeBtn").click(function(){var b=this;$.get(c,"couponId="+e,function(g){if(g.code==0){$(b).attr("disabled",true);$(b).css("cursor","default").blur();new CountDown({startTime:0,endTime:6E4,callback:function(h,j,o,m){$(b).val(m+"\u79d2\u540e\u91cd\u65b0\u53d1\u9001");if(h==0&&j==0&&o==0&&m==0){$(me).attr("disabled",false);$(b).html("\u53d1\u9001\u9a8c\u8bc1\u77ed\u4fe1");$(me).css("cursor","pointer")}}})}else $("#showError").text(g.msg).show()},
"json")});$("#validCodeBtn").click(function(){if($("#validCode").val()==""){$("#validCode").focus();$("#showError").text("\u8bf7\u586b\u5199\u9a8c\u8bc1\u7801").show()}else $.get(d,"couponId="+e+"&code="+$("#validCode").val(),function(b){if(b.code==0)window.location.href="/order/refund/"+e;else $("#showError").text(b.msg).show()},"json")})}var c="/order/refund/sendcode",d="/order/refund/validcode";NM.expireRefund=function(e){$.get("/order/refund/expire","couponId="+e,function(f){if(f.code==0){var b=
" \u5b8c\u7f8e\u6d88\u8d39\u4f53\u9a8c\u627f\u8bfa\uff0c\u8fc7\u671f\u672a\u6d88\u8d39\u7684\u7cef\u7c73\u5238\uff0c\u4e00\u952e\u9000\u6b3e\u3002\u6211\u5df2\u7ecf\u9000\u4e86\uffe5"+f.money+"\uff0c\u4f60\u8fd8\u6709\u8fc7\u671f\u672a\u4f7f\u7528\u7684\u5417\uff1f";f='<p style="font-size:14px; padding:5px 0;">'+f.msg+'</p><p style="padding:5px 0;">\u590d\u5236\u4e0b\u9762\u7684\u94fe\u63a5\uff0c\u628a\u8fd9\u4e2a\u597d\u6d88\u606f\u5206\u4eab\u7ed9\u597d\u53cb\u5427</p><p><textarea style="width:370px;" readonly="readonly" onfocus="$(this).select();">'+
b+'</textarea></p><p class="share">\u5206\u4eab\u5230\uff1a<a href="http://share.renren.com/share/buttonshare/post/4001?url='+encodeURIComponent("http://www.nuomi.com/about/promise")+"&title="+encodeURIComponent("\u5b8c\u7f8e\u6d88\u8d39\u4f53\u9a8c\u627f\u8bfa - \u7cef\u7c73\u7f51")+"&content="+encodeURIComponent(b)+"&pic="+encodeURIComponent("http://static.nuomi.com/img/ads/xiaobao.png")+'" class="renren" target="_blank">\u4eba\u4eba</a>&nbsp;&nbsp;<a href="http://www.douban.com/recommend/?url='+
encodeURIComponent("http://www.nuomi.com/about/promise")+"&title="+encodeURIComponent("\u5b8c\u7f8e\u6d88\u8d39\u4f53\u9a8c\u627f\u8bfa - \u7cef\u7c73\u7f51")+"&content="+encodeURIComponent(b)+'" class="douban" target="_blank">\u8c46\u74e3</a>&nbsp;&nbsp;<a href="http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(b)+"&url="+encodeURIComponent("http://www.nuomi.com/about/promise")+'&source=bookmark" class="sina" target="_blank">\u5fae\u535a</a></p>';$.alert({title:"\u5df2\u8fc7\u671f\u7cef\u7c73\u5238\u9000\u6b3e\u6210\u529f",
message:f,overlay:true,closeButton:true})}else $.alert({title:"\u63d0\u9192",message:f.msg,overlay:true,closeButton:true})},"json")};NM.refundValid=function(e){$.get("/order/refund/needvalid","couponId="+e,function(f){f.code==1?a(e,f.mobile):$.alert({title:"\u63d0\u9192",message:f.msg,overlay:true,closeButton:true})},"json")}});

