(function(b){b(window).on("load",function(g){g=b("form#ajaxSubmit");(0<g.length?g:b("form:first")).formMan2()});b.fn.sort=function(){return this.pushStack(b.makeArray([].sort.apply(this,arguments)))};b.fn.formMan2=function(g){var c={sFMsgCls:"errmsg",sMsgSaved:"\u767b\u9332\u3057\u307e\u3057\u305f\u3002",sKeepCls:"unreplaceable",onRowPlace:null};b.extend(c,b.hybs.defaults,g||{});return this.each(function(){var h=this;var k={};k[c.sAjxSbmtKey]="true";var e={};e.data=k;e.beforeSubmit=function(d,a,f){return c.beforeSubmit?
c.beforeSubmit(d,a,f):!0};e.success=function(d,a,f){a=b("form").data(b.hybs.defaults.sHybsCmd).cmd;0<=d.indexOf("row_error")?(b(h).removeData(b.hybs.defaults.sHybsCmd),isClicked=!1,a=/(?:<\/table>)*[\S\s]*(\[\d+ - \d+\]\/\[\d+\])[\S\s]*(<table[^>]*?>[\S\s]+?row_error[\S\s]*<\/table>)/m.exec(d),b.hybs.ogAlert(a?a[1]+a[2]:d)):0<=b.inArray(a,[c.sCmdInsert,c.sCmdCopy,c.sCmdModify,c.sCmdDelete,c.sCmdEntry,c.sCmdUndo])&&a==c.sCmdEntry&&(a=/<div id="?noTransitionUrl"?>(.*)<\/div>[\s\S]*<div id="?noTransitionTarget"?>(.*)<\/div>/mi.exec(d))&&
(d=a[1].replace(/&amp;/g,"&"),a=a[2],f=(f="null"!=a?eval("top."+a):window)?f:eval("top.CONTENTS."+a),f.location.href=d)};e.error=function(d,a,f){b.hybs.ogLog(a+"\n"+d.responseText);b.hybs.ogAlert(a+"<br/>"+d.responseText)};e.complete=function(d,a){};e.cmds=e.cmds||[c.sCmdEntry];b(h).ajaxHybsForm(e)})}})(jQuery);
