(function(A){A.fn.jFlow=function(J){var B=A.extend({},A.fn.jFlow.defaults,J);var I=B.controller;var G=B.selectedWrapper;var H=0;var D=A(I).length;var C=function(L,K){if(0==K){A(".jTabPrev").addClass("hidden")}else{A(".jTabPrev").removeClass("hidden")}if(D-1==K){A(".jTabNext").val("提交")}else{A(".jTabNext").val("下一步")}A(I).eq(L).removeClass(G);A(I).eq(K).addClass(G);A(B.tabs+">:nth-child("+(L+1)+")").hide();A(B.tabs+">:nth-child("+(K+1)+")").show()};A(this).find(I).each(function(K){A(this).click(function(){C(H,K);H=K})});A(I).eq(H).addClass(G);A(B.prev).click(function(){if(H>0){var K=H-1}else{var K=D-1}A.scrollTo(A("#myController"),400,{onAfter:function(){C(H,K);H=K}})});var F=valid2=valid3=valid4=false;var E=function(K){switch(K){case 0:break;case 1:break;case 2:break;case 3:}};A(B.next).click(function(){if(-1==A("#accountType").val()){A.scrollTo(A("#myController"),400,{onAfter:function(){alert("请在右上角选择会员类型")}});return }if(H<D-1){var K=H+1;A.scrollTo(A("#myController"),400,{onAfter:function(){C(H,K);H=K}})}else{var M=A(this);M.attr("disabled","disabled");var L=A("#tabFormSubmit").serialize();A.post("/register.php",L,function(N){M.removeAttr("disabled");if(-1==N||""==N){alert("注册失败,请稍等几秒钟再次提交.")}else{if(1==A("#accountType").val()){window.location.href="/"+A("#user").val()}else{alert("注册成功,现返回首页");window.location.href="index.php"}}})}})}})(jQuery);
