(function ($) {
    $.fn.validationEngine = function (a) {
        if ($.validationEngineLanguage) {
            allRules = $.validationEngineLanguage.allRules
        } else {
            $.validationEngine.debug("Validation engine rules are not loaded check your external file")
        }
        a = jQuery.extend({
            allrules: allRules,
            validationEventTriggers: "focusout",
            inlineValidation: true,
            returnIsValid: false,
            liveEvent: true,
            unbindEngine: true,
            containerOverflow: false,
            containerOverflowDOM: "",
            ajaxSubmit: false,
            scroll: true,
            promptPosition: "topRight",
            success: false,
            beforeSuccess: function () {},
            failure: function () {}
        }, a);
        $.validationEngine.settings = a;
        $.validationEngine.ajaxValidArray = new Array;
        if (a.inlineValidation == true) {
            if (!a.returnIsValid) {
                allowReturnIsvalid = false;
                if (a.liveEvent) {
                    $(this).find("[class*=validate][type!=checkbox]").live(a.validationEventTriggers, function (a) {
                        b(this)
                    });
                    $(this).find("[class*=validate][type=checkbox]").live("click", function (a) {
                        b(this)
                    })
                } else {
                    $(this).find("[class*=validate]").not("[type=checkbox]").bind(a.validationEventTriggers, function (a) {
                        b(this)
                    });
                    $(this).find("[class*=validate][type=checkbox]").bind("click", function (a) {
                        b(this)
                    })
                }
                firstvalid = false
            }
            function b(b) {
                $.validationEngine.settings = a;
                if ($.validationEngine.intercept == false || !$.validationEngine.intercept) {
                    $.validationEngine.onSubmitValid = false;
                    $.validationEngine.loadValidation(b)
                } else {
                    $.validationEngine.intercept = false
                }
            }
        }
        if (a.returnIsValid) {
            if ($.validationEngine.submitValidation(this, a)) {
                return false
            } else {
                return true
            }
        }
        $(this).bind("submit", function (b) {
            $.validationEngine.onSubmitValid = true;
            $.validationEngine.settings = a;
            if ($.validationEngine.submitValidation(this, a) == false) {
                if ($.validationEngine.submitForm(this, a) == true) return false
            } else {
                a.failure && a.failure();
                return false
            }
        });
        $(".formError").live("click", function () {
            $(this).fadeOut(150, function () {
                $(this).remove()
            })
        })
    };
    $.validationEngine = {
        defaultSetting: function (a) {
            if ($.validationEngineLanguage) {
                allRules = $.validationEngineLanguage.allRules
            } else {
                $.validationEngine.debug("Validation engine rules are not loaded check your external file")
            }
            settings = {
                allrules: allRules,
                validationEventTriggers: "blur",
                inlineValidation: true,
                containerOverflow: false,
                containerOverflowDOM: "",
                returnIsValid: false,
                scroll: true,
                unbindEngine: true,
                ajaxSubmit: false,
                promptPosition: "topRight",
                success: false,
                failure: function () {}
            };
            $.validationEngine.settings = settings
        },
        loadValidation: function (a) {
            if (!$.validationEngine.settings) $.validationEngine.defaultSetting();
            rulesParsing = $(a).attr("class");
            rulesRegExp = /\[(.*)\]/;
            getRules = rulesRegExp.exec(rulesParsing);
            if (getRules == null) return false;
            str = getRules[1];
            pattern = /\[|,|\]/;
            result = str.split(pattern);
            var b = $.validationEngine.validateCall(a, result);
            return b
        },
        validateCall: function (caller, rules) {
            function _minCheckbox(caller, rules, position) {
                nbCheck = eval(rules[position + 1]);
                groupname = $(caller).attr("name");
                groupSize = $("input[name='" + groupname + "']:checked").size();
                if (groupSize < nbCheck) {
                    $.validationEngine.isError = true;
                    $.validationEngine.showTriangle = false;
                    promptText += $.validationEngine.settings.allrules["minCheckbox"].alertText + " " + nbCheck + " " + $.validationEngine.settings.allrules["minCheckbox"].alertText2 + "<br />"
                }
            }
            function _maxCheckbox(caller, rules, position) {
                nbCheck = eval(rules[position + 1]);
                groupname = $(caller).attr("name");
                groupSize = $("input[name='" + groupname + "']:checked").size();
                if (groupSize > nbCheck) {
                    $.validationEngine.showTriangle = false;
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules["maxCheckbox"].alertText + "<br />"
                }
            }
            function _length(caller, rules, position) {
                startLength = eval(rules[position + 1]);
                endLength = eval(rules[position + 2]);
                feildLength = $(caller).attr("value").length;
                if (feildLength < startLength || feildLength > endLength) {
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules["length"].alertText + startLength + $.validationEngine.settings.allrules["length"].alertText2 + endLength + $.validationEngine.settings.allrules["length"].alertText3 + "<br />"
                }
            }
            function _confirm(a, b, c) {
                confirmField = b[c + 1];
                if ($(a).attr("value") != $("#" + confirmField).attr("value")) {
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules["confirm"].alertText + "<br />"
                }
            }
			            function _spamCheck(a, b, c) {
                spamCheckField = b[c + 1];
                if ($(a).attr("value") != $("#" + spamCheckField).attr("value")) {
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules["spamCheck"].alertText + "<br />"
                }
            }
            function _ajax(caller, rules, position) {
                customAjaxRule = rules[position + 1];
                postfile = $.validationEngine.settings.allrules[customAjaxRule].file;
                fieldValue = $(caller).val();
                ajaxCaller = caller;
                fieldId = $(caller).attr("id");
                ajaxValidate = true;
                ajaxisError = $.validationEngine.isError;
                if ($.validationEngine.settings.allrules[customAjaxRule].extraData) {
                    extraData = $.validationEngine.settings.allrules[customAjaxRule].extraData
                } else {
                    extraData = ""
                }
                if (!ajaxisError) {
                    $.ajax({
                        type: "POST",
                        url: postfile,
                        async: true,
                        data: "validateValue=" + fieldValue + "&validateId=" + fieldId + "&validateError=" + customAjaxRule + "&extraData=" + extraData,
                        beforeSend: function () {
                            if ($.validationEngine.settings.allrules[customAjaxRule].alertTextLoad) {
                                if (!$("div." + fieldId + "formError")[0]) {
                                    return $.validationEngine.buildPrompt(ajaxCaller, $.validationEngine.settings.allrules[customAjaxRule].alertTextLoad, "load")
                                } else {
                                    $.validationEngine.updatePromptText(ajaxCaller, $.validationEngine.settings.allrules[customAjaxRule].alertTextLoad, "load")
                                }
                            }
                        },
                        error: function (a, b) {
                            $.validationEngine.debug("error in the ajax: " + a.status + " " + b)
                        },
                        success: function (data) {
                            function _checkInArray(a) {
                                for (x = 0; x < ajaxErrorLength; x++) {
                                    if ($.validationEngine.ajaxValidArray[x][0] == fieldId) {
                                        $.validationEngine.ajaxValidArray[x][1] = a;
                                        existInarray = true
                                    }
                                }
                            }
                            data = eval("(" + data + ")");
                            ajaxisError = data.jsonValidateReturn[2];
                            customAjaxRule = data.jsonValidateReturn[1];
                            ajaxCaller = $("#" + data.jsonValidateReturn[0])[0];
                            fieldId = ajaxCaller;
                            ajaxErrorLength = $.validationEngine.ajaxValidArray.length;
                            existInarray = false;
                            if (ajaxisError == "false") {
                                _checkInArray(false);
                                if (!existInarray) {
                                    $.validationEngine.ajaxValidArray[ajaxErrorLength] = new Array(2);
                                    $.validationEngine.ajaxValidArray[ajaxErrorLength][0] = fieldId;
                                    $.validationEngine.ajaxValidArray[ajaxErrorLength][1] = false;
                                    existInarray = false
                                }
                                $.validationEngine.ajaxValid = false;
                                promptText += $.validationEngine.settings.allrules[customAjaxRule].alertText + "<br />";
                                $.validationEngine.updatePromptText(ajaxCaller, promptText, "", true)
                            } else {
                                _checkInArray(true);
                                $.validationEngine.ajaxValid = true;
                                if (!customAjaxRule) {
                                    $.validationEngine.debug("wrong ajax response, are you on a server or in xampp? if not delete de ajax[ajaxUser] validating rule from your form ")
                                }
                                if ($.validationEngine.settings.allrules[customAjaxRule].alertTextOk) {
                                    $.validationEngine.updatePromptText(ajaxCaller, $.validationEngine.settings.allrules[customAjaxRule].alertTextOk, "pass", true)
                                } else {
                                    ajaxValidate = false;
                                    $.validationEngine.closePrompt(ajaxCaller)
                                }
                            }
                        }
                    })
                }
            }
            function _funcCall(a, b, c) {
                customRule = b[c + 1];
                funce = $.validationEngine.settings.allrules[customRule].nname;
                var d = window[funce];
                if (typeof d === "function") {
                    var e = d();
                    if (!e) {
                        $.validationEngine.isError = true
                    }
                    promptText += $.validationEngine.settings.allrules[customRule].alertText + "<br />"
                }
            }
            function _exemptString(a, b, c) {
                customString = b[c + 1];
                if (customString == $(a).attr("value")) {
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules["required"].alertText + "<br />"
                }
            }
            function _customRegex(caller, rules, position) {
                customRule = rules[position + 1];
                pattern = eval($.validationEngine.settings.allrules[customRule].regex);
                if (!pattern.test($(caller).attr("value"))) {
                    $.validationEngine.isError = true;
                    promptText += $.validationEngine.settings.allrules[customRule].alertText + "<br />"
                }
            }
            function _required(a, b) {
                callerType = $(a).attr("type");
                if (callerType == "text" || callerType == "password" || callerType == "textarea") {
                    if (!$(a).val()) {
                        $.validationEngine.isError = true;
                        promptText += $.validationEngine.settings.allrules[b[i]].alertText + "<br />"
                    }
                }
                if (callerType == "radio" || callerType == "checkbox") {
                    callerName = $(a).attr("name");
                    if ($("input[name='" + callerName + "']:checked").size() == 0) {
                        $.validationEngine.isError = true;
                        if ($("input[name='" + callerName + "']").size() == 1) {
                            promptText += $.validationEngine.settings.allrules[b[i]].alertTextCheckboxe + "<br />"
                        } else {
                            promptText += $.validationEngine.settings.allrules[b[i]].alertTextCheckboxMultiple + "<br />"
                        }
                    }
                }
                if (callerType == "select-one") {
                    if (!$(a).val()) {
                        $.validationEngine.isError = true;
                        promptText += $.validationEngine.settings.allrules[b[i]].alertText + "<br />"
                    }
                }
                if (callerType == "select-multiple") {
                    if (!$(a).find("option:selected").val()) {
                        $.validationEngine.isError = true;
                        promptText += $.validationEngine.settings.allrules[b[i]].alertText + "<br />"
                    }
                }
            }
            function radioHack() {
                if ($("input[name='" + callerName + "']").size() > 1 && (callerType == "radio" || callerType == "checkbox")) {
                    caller = $("input[name='" + callerName + "'][type!=hidden]:first");
                    $.validationEngine.showTriangle = false
                }
            }
            var promptText = "";
            if (!$(caller).attr("id")) $.validationEngine.debug("This field have no ID attribut( name & class displayed): " + $(caller).attr("name") + " " + $(caller).attr("class"));
            caller = caller;
            ajaxValidate = false;
            var callerName = $(caller).attr("name");
            $.validationEngine.isError = false;
            $.validationEngine.showTriangle = true;
            callerType = $(caller).attr("type");
            for (i = 0; i < rules.length; i++) {
                switch (rules[i]) {
                case "optional":
                    if (!$(caller).val()) {
                        $.validationEngine.closePrompt(caller);
                        return $.validationEngine.isError
                    }
                    break;
                case "required":
                    _required(caller, rules);
                    break;
                case "custom":
                    _customRegex(caller, rules, i);
                    break;
                case "exemptString":
                    _exemptString(caller, rules, i);
                    break;
                case "ajax":
                    if (!$.validationEngine.onSubmitValid) _ajax(caller, rules, i);
                    break;
                case "length":
                    _length(caller, rules, i);
                    break;
                case "maxCheckbox":
                    _maxCheckbox(caller, rules, i);
                    groupname = $(caller).attr("name");
                    caller = $("input[name='" + groupname + "']");
                    break;
                case "minCheckbox":
                    _minCheckbox(caller, rules, i);
                    groupname = $(caller).attr("name");
                    caller = $("input[name='" + groupname + "']");
                    break;
                case "confirm":
                    _confirm(caller, rules, i);
                    break;
					case "spamCheck":
                    _spamCheck(caller, rules, i);
                    break;
                case "funcCall":
                    _funcCall(caller, rules, i);
                    break;
                default:
                }
            }
            radioHack();
            if ($.validationEngine.isError == true) {
                var linkTofieldText = "." + $.validationEngine.linkTofield(caller);
                if (linkTofieldText != ".") {
                    if (!$(linkTofieldText)[0]) {
                        $.validationEngine.buildPrompt(caller, promptText, "error")
                    } else {
                        $.validationEngine.updatePromptText(caller, promptText)
                    }
                } else {
                    $.validationEngine.updatePromptText(caller, promptText)
                }
            } else {
                $.validationEngine.closePrompt(caller)
            }
            return $.validationEngine.isError ? $.validationEngine.isError : false
        },
        submitForm: function (caller) {
            if ($.validationEngine.settings.ajaxSubmit) {
                if ($.validationEngine.settings.ajaxSubmitExtraData) {
                    extraData = $.validationEngine.settings.ajaxSubmitExtraData
                } else {
                    extraData = ""
                }
                $.ajax({
                    type: "POST",
                    url: $.validationEngine.settings.ajaxSubmitFile,
                    async: true,
                    data: $(caller).serialize() + "&" + extraData,
                    error: function (a, b) {
                        $.validationEngine.debug("error in the ajax: " + a.status + " " + b)
                    },
                    success: function (data) {
                        if (data == "true") {
                            $(caller).css("opacity", 1);
                            $(caller).animate({
                                opacity: 0,
                                height: 0
                            }, function () {
                                $(caller).css("display", "none");
                                $(caller).before("<div class='ajaxSubmit'>" + $.validationEngine.settings.ajaxSubmitMessage + "</div>");
                                $.validationEngine.closePrompt(".formError", true);
                                $(".ajaxSubmit").show("slow");
                                if ($.validationEngine.settings.success) {
                                    $.validationEngine.settings.success && $.validationEngine.settings.success();
                                    return false
                                }
                            })
                        } else {
                            data = eval("(" + data + ")");
                            if (!data.jsonValidateReturn) {
                                $.validationEngine.debug("you are not going into the success fonction and jsonValidateReturn return nothing")
                            }
                            errorNumber = data.jsonValidateReturn.length;
                            for (index = 0; index < errorNumber; index++) {
                                fieldId = data.jsonValidateReturn[index][0];
                                promptError = data.jsonValidateReturn[index][1];
                                type = data.jsonValidateReturn[index][2];
                                $.validationEngine.buildPrompt(fieldId, promptError, type)
                            }
                        }
                    }
                });
                return true
            }
            if (!$.validationEngine.settings.beforeSuccess()) {
                if ($.validationEngine.settings.success) {
                    if ($.validationEngine.settings.unbindEngine) {
                        $(caller).unbind("submit")
                    }
                    $.validationEngine.settings.success && $.validationEngine.settings.success();
                    return true
                }
            } else {
                return true
            }
            return false
        },
        buildPrompt: function (a, b, c, d) {
            if (!$.validationEngine.settings) {
                $.validationEngine.defaultSetting()
            }
            deleteItself = "." + $(a).attr("id") + "formError";
            if ($(deleteItself)[0]) {
                $(deleteItself).stop();
                $(deleteItself).remove()
            }
            var e = document.createElement("div");
            var f = document.createElement("div");
            linkTofield = $.validationEngine.linkTofield(a);
            $(e).addClass("formError");
            if (c == "pass") $(e).addClass("greenPopup");
            if (c == "load") $(e).addClass("blackPopup");
            if (d) $(e).addClass("ajaxed");
            $(e).addClass(linkTofield);
            $(f).addClass("formErrorcontent");
            if ($.validationEngine.settings.containerOverflow) {
                $(a).before(e)
            } else {
                $("body").append(e)
            }
            $(e).append(f);
            if ($.validationEngine.showTriangle != false) {
                var g = document.createElement("div");
                $(g).addClass("formErrorArrow");
                $(e).append(g);
                if ($.validationEngine.settings.promptPosition == "bottomLeft" || $.validationEngine.settings.promptPosition == "bottomRight") {
                    $(g).addClass("formErrorArrowBottom");
                    $(g).html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>')
                }
                if ($.validationEngine.settings.promptPosition == "topLeft" || $.validationEngine.settings.promptPosition == "topRight") {
                    $(e).append(g);
                    $(g).html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>')
                }
            }
            $(f).html(b);
            var h = $.validationEngine.calculatePosition(a, b, c, d, e);
            h.callerTopPosition += "px";
            h.callerleftPosition += "px";
            h.marginTopSize += "px";
            $(e).css({
                top: h.callerTopPosition,
                left: h.callerleftPosition,
                marginTop: h.marginTopSize,
                opacity: 0
            });
            return $(e).animate({
                opacity: .87
            }, function () {
                return true
            })
        },
        updatePromptText: function (a, b, c, d) {
            linkTofield = $.validationEngine.linkTofield(a);
            var e = "." + linkTofield;
            if (c == "pass") {
                $(e).addClass("greenPopup")
            } else {
                $(e).removeClass("greenPopup")
            }
            if (c == "load") {
                $(e).addClass("blackPopup")
            } else {
                $(e).removeClass("blackPopup")
            }
            if (d) {
                $(e).addClass("ajaxed")
            } else {
                $(e).removeClass("ajaxed")
            }
            $(e).find(".formErrorcontent").html(b);
            var f = $.validationEngine.calculatePosition(a, b, c, d, e);
            f.callerTopPosition += "px";
            f.callerleftPosition += "px";
            f.marginTopSize += "px";
            $(e).animate({
                top: f.callerTopPosition,
                marginTop: f.marginTopSize
            })
        },
        calculatePosition: function (a, b, c, d, e) {
            if ($.validationEngine.settings.containerOverflow) {
                callerTopPosition = 0;
                callerleftPosition = 0;
                callerWidth = $(a).width();
                inputHeight = $(e).height();
                var f = "-" + inputHeight
            } else {
                callerTopPosition = $(a).offset().top;
                callerleftPosition = $(a).offset().left;
                callerWidth = $(a).width();
                inputHeight = $(e).height();
                var f = 0
            }
            if ($.validationEngine.settings.promptPosition == "topRight") {
                if ($.validationEngine.settings.containerOverflow) {
                    callerleftPosition += callerWidth - 30
                } else {
                    callerleftPosition += callerWidth - 30;
                    callerTopPosition += -inputHeight
                }
            }
            if ($.validationEngine.settings.promptPosition == "topLeft") {
                callerTopPosition += -inputHeight - 10
            }
            if ($.validationEngine.settings.promptPosition == "centerRight") {
                callerleftPosition += callerWidth + 13
            }
            if ($.validationEngine.settings.promptPosition == "bottomLeft") {
                callerHeight = $(a).height();
                callerTopPosition = callerTopPosition + callerHeight + 15
            }
            if ($.validationEngine.settings.promptPosition == "bottomRight") {
                callerHeight = $(a).height();
                callerleftPosition += callerWidth - 30;
                callerTopPosition += callerHeight + 5
            }
            return {
                callerTopPosition: callerTopPosition,
                callerleftPosition: callerleftPosition,
                marginTopSize: f
            }
        },
        linkTofield: function (a) {
            var b = $(a).attr("id") + "formError";
            b = b.replace(/\[/g, "");
            b = b.replace(/\]/g, "");
            return b
        },
        closePrompt: function (a, b) {
            if (!$.validationEngine.settings) {
                $.validationEngine.defaultSetting()
            }
            if (b) {
                $(a).fadeTo("fast", 0, function () {
                    $(a).remove()
                });
                return false
            }
            if (typeof ajaxValidate == "undefined") {
                ajaxValidate = false
            }
            if (!ajaxValidate) {
                linkTofield = $.validationEngine.linkTofield(a);
                closingPrompt = "." + linkTofield;
                $(closingPrompt).fadeTo("fast", 0, function () {
                    $(closingPrompt).remove()
                })
            }
        },
        debug: function (a) {
            if (!$("#debugMode")[0]) {
                $("body").append("<div id='debugMode'><div class='debugError'><strong>This is a debug mode, you got a problem with your form, it will try to help you, refresh when you think you nailed down the problem</strong></div></div>")
            }
            $(".debugError").append("<div class='debugerror'>" + a + "</div>")
        },
        submitValidation: function (a) {
            var b = false;
            $.validationEngine.ajaxValid = true;

            var c = $(a).find("[class*=validate]").size();
            $(a).find("[class*=validate]").each(function () {
                linkTofield = $.validationEngine.linkTofield(this);
                if (!$("." + linkTofield).hasClass("ajaxed")) {
                    var a = $.validationEngine.loadValidation(this);
                    return a ? b = true : ""
                }
            });
            ajaxErrorLength = $.validationEngine.ajaxValidArray.length;
            for (x = 0; x < ajaxErrorLength; x++) {
                if ($.validationEngine.ajaxValidArray[x][1] == false) $.validationEngine.ajaxValid = false
            }
            if (b || !$.validationEngine.ajaxValid) {
                if ($.validationEngine.settings.scroll) {
                    if (!$.validationEngine.settings.containerOverflow) {
                        var d = $(".formError:not('.greenPopup'):first").offset().top;
                        $(".formError:not('.greenPopup')").each(function () {
                            testDestination = $(this).offset().top;
                            if (d > testDestination) d = $(this).offset().top
                        });
                        $("html:not(:animated),body:not(:animated)").animate({
                            scrollTop: d
                        }, 1100)
                    } else {
                        var d = $(".formError:not('.greenPopup'):first").offset().top;
                        var e = $($.validationEngine.settings.containerOverflowDOM).scrollTop();
                        var f = -parseInt($($.validationEngine.settings.containerOverflowDOM).offset().top);
                        var d = e + d + f - 5;
                        var g = $.validationEngine.settings.containerOverflowDOM + ":not(:animated)";
                        $(g).animate({
                            scrollTop: d
                        }, 1100)
                    }
                }
                return true
            } else {
                return false
            }
        }
    }
})(jQuery);
(function (a) {
    a.fn.validationEngineLanguage = function () {};
    a.validationEngineLanguage = {
        newLang: function () {
            a.validationEngineLanguage.allRules = {
					"required":{    			// Add your regex rules here, you can take telephone as an example
						"regex":"none",
						"alertText":"* This field is required",
						"alertTextCheckboxMultiple":"* Please select an option",
						"alertTextCheckboxe":"* This checkbox is required"},
              "length":{
						"regex":"none",
						"alertText":"*Between ",
						"alertText2":" and ",
						"alertText3": " characters allowed"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* Checks allowed Exceeded"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* Please select ",
						"alertText2":" options"},	
					"confirm":{
						"regex":"none",
						"alertText":"* Your field is not matching"},
						
                "spamCheck": {
                    "regex": "/^[0-9\-\(\)\ ]+$/",
                    "alertText": "* The number does not match the image. <br> Click <u>here</u> to close this box!"
                },
               "telephone":{
						"regex":"/^[0-9\-\(\)\ ]+$/",
						"alertText":"* Invalid phone number"},	
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
						"alertText":"* Invalid email address"},	
					"date":{
                         "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                         "alertText":"* Invalid date, must be in YYYY-MM-DD format"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* Numbers only"},	
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* No special caracters allowed"},		
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* Letters only"},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"* You must have a firstname and a lastname"}	
            }
        }
    }
})(jQuery);
$(document).ready(function () {
    $.validationEngineLanguage.newLang()
})
