$(document).ready(function(){$("#cpanel_st #keywords_singular").autocomplete("/keywords/autoComplete",{minChars:2,delay:4,width:230,resultsId:"keys_wrapper",multiple:true,multipleSeparator:" ",cacheLength:20,matchSubset:true,selectFirst:true,matchCase:false,mustMatch:false,autoFill:true,matchContains:false,max:9,scroll:false,extraParams:{limit:9,timestamp:null}});$("#cpanel_st").validate({errorClass:"invalid",errorPlacement:function(error_msg,el){$(el).parent().find("div").html(error_msg.text())},highlight:function(el,errorClass){$(el).parent().addClass(errorClass)},unhighlight:function(el,errorClass){$(el).parent().removeClass(errorClass)},submitHandler:function(){var fForm=new Array(7);fForm[0]="cpanel_st";fForm[1]="/keywords/cpanelKeyword";fForm[2]="post";fForm[3]="step1";fForm[4]="#st_resp";fForm[5]="#st_resp";fForm[6]="json";var fRow=new Array(3);fRow[0]=0;fRow[1]="#data";fRow[2]="valid";var fAnim=new Array(2);fAnim[0]="keywordSuccess";fAnim[1]=500;setupAjaxForm(fForm,fRow,fAnim);return false},rules:{"keywords[singular]":{required:true,maxlength:50,minlength:3,remote:{url:"/keywords/validateKeyword",type:"post"}}},messages:{"keywords[singular]":{required:"Required field",maxlength:"Maximum length: 50",minlength:"Minimum length: 3",remote:"Not allowed character"}}})});