

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
		var url_http = ('https:' == document.location.protocol ? 'https://' : 'http://');//alex modified
		//url_http = "http://";
			$.validationEngineLanguage.allRules = 	{
				"required":{    			// Add your regex rules here, you can take telephone as an example
					"regex":"none",
					"alertText":"* This field is required.",
					"alertTextCheckbox":"* This checkbox is required."
				},
				"length":{
						"regex":"none",
						"alertText":"* Between ",
						"alertText2":" and ",
						"alertText3": " characters allowed."
				},
				"password":{
					"regex":"/^[\x21-\x7E]+$/",
					"alertText":"* Invalid password."
				},
				"confirm":{
					"regex":"none",
					"alertText":"* Your field is not matching."
				},
				"username":{
					"regex":"/^[a-zA-Z\u4E00-\u9FA5]+[a-zA-Z0-9_\u4E00-\u9FA5]+$/", 
					"alertText":"* Invalid username."
				},
				"email":{
					"regex":"none",
					"alertText":"* Invalid email address."
				},	
				"ajaxUser":{
					"file":url_http+"www.cometid.com/accounts/ajax/check",//ajax验证用户名，会post如下参数：validateError	ajaxUser；validateId	user；validateValue	cccc
					"extraData":"name=eric",
					"alertTextOk":"* This name is available.",	
					"alertTextLoad":"* Loading, please wait...",
					"alertText":"* This name is already taken."
				},	
				"ajaxEmail":{
					"file":url_http+"www.cometid.com/accounts/ajax/check",
					"alertText":"* This email already exists",
					"alertTextOk":"* This email is available",	
					"alertTextLoad":"* Loading, please wait..."					
				}	
			}
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});
