if(!window.OR){alert("\u521d\u59cb\u5316js\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u52a0\u8f7d")}OR.DM=OR.DM||{};OR.DM.L={ERROR:"\u7f51\u7edc\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u2026",LOADING:"\u6b63\u5728\u83b7\u53d6\u6570\u636e\uff0c\u8bf7\u7a0d\u5019\u2026",POSTDATA:"\u6b63\u5728\u63d0\u4ea4\u6570\u636e\uff0c\u8bf7\u7a0d\u5019\u2026"};OR.DM.initTld=function(){$("#more-suffix").click(function(){$("#more-suffix-box").toggle();this.innerHTML=$("#more-suffix-box").is(":visible")?"\u6536\u8d77\u66f4\u591a\u540e\u7f00":"\u67e5\u770b\u66f4\u591a\u540e\u7f00"});$("button[_suffix]").click(function(){suffixes=$(this).attr("_suffix");OR.DM.clickSuffix($(this).parents("form"),suffixes)});var b=$("div.tabs");var a=$("a",b);a.click(function(){var e=this,d=$(this).parents("li:eq(0)");$("li",b).removeClass("current");d.addClass("current");$("div.tab_box > form").hide();$("#form-"+this.name).show()});$("#more-suffix-box .suffixes_table").mouseover(function(){$(this).addClass("over")}).mouseout(function(){$(this).removeClass("over")});$("form[name=register]").submit(function(){if(!$(this).find(":checkbox:checked").size()){return OR.Common.showMessage("\u8bf7\u9009\u62e9\u8981\u6ce8\u518c\u7684\u57df\u540d",false)}});OR.DM.initCheck();$('form :checkbox[name="suffix[]"]').click(function(){$(this).parent().toggleClass("b",this.checked)}).filter(":checked").parent().addClass("b");$("#ip-form .hint,#pc-form .hint").keyHint("gray",function(d){if(false===$.keyHint.callback.call(this,d)){return false}d=$(d);OR.Common.ajax({type:"GET",url:d.attr("action"),data:d.serializeArray(),dataType:"html",beforeSend:function(){d.disabled()},success:function(e){d.enabled().find("p:last").show().html(e)}});return false});function c(){var e=$("#roller");var d=setInterval(function(){e.animate({marginTop:"-110px"},500,"linear",function(){var g=e.find("a:eq(0)");var f=e.find("a:last-child");f.after(g[0]);e.css("margin-top",0)})},3000)}c()};OR.DM.initFree=function(a){$("#buy-form").submit(function(){var b=$(this);if(!b.find(":radio:checked").size()){OR.Common.showMessage("\u8bf7\u9009\u62e9\u8981\u6ce8\u518c\u7684\u57df\u540d",false);return false}});OR.DM.initCheck();$('form :checkbox[name="suffix[]"]').click(function(){$(this).parent().toggleClass("b",this.checked)}).filter(":checked").parent().addClass("b")};OR.DM.initApply=function(a){$("#form-apply").submit(function(){var b=$(this);OR.Common.ajax({type:b.attr("method"),url:b.attr("action"),dataType:"json",data:b.serializeArray(),beforeSend:function(){b.disabled();OR.Common.showMessage(OR.DM.L.POSTDATA,true)},complete:function(){b.enabled()},success:function(c){OR.Common.showMessage(c.message,c.success);if(c.success){window.location=a.console+"/domain/free/"}}});return false})};OR.DM.initWhois=function(){$("form :input[name=domain]").keyHint()};OR.DM.initPrice=function(){var b=$("div.tabs_blue");var a=$("a",b);a.click(function(){var d=this,c=$(this).parents("li:eq(0)");$("li",b).removeClass("current");c.addClass("current");$("div.table_list_wrap").hide();$("#content-"+this.name).show()})};OR.DM.clickSuffix=function(b,a){$(b).find(':checkbox[name="suffix[]"]:checked').attr("checked",false).parent().removeClass("b");if(a){$.each(a.split("|"),function(){$(b).find(':checkbox[value="'+this+'"]').attr("checked",true).parent().addClass("b")});$(b).find("[name=domain]").focus()}};OR.DM.initCheck=function(){$("form :input[name=domain].hint").keyHint(null,function(a){if(false===$.keyHint.callback.call(this,a)){return false}if(!$(a).find(":checkbox:checked").size()){OR.Common.showMessage("\u8bf7\u9009\u62e9\u8981\u67e5\u8be2\u7684\u540e\u7f00",false);return false}$("form [type=submit]").attr("disabled",true);OR.Common.showMessage("\u6b63\u5728\u67e5\u8be2\u4e2d\uff0c\u8bf7\u7a0d\u5019...",true,0);OR.Common.unload=function(){$("form [type=submit]").removeAttr("disabled");OR.Common.showMessage()}})};

