var pjQ = pjQ || {}, ContactForm_1; (function () { "use strict"; var loadRemote = function(url, type, callback) { var _element, _type, _attr, scr, s, element; switch (type) { case 'css': _element = "link"; _type = "text/css"; _attr = "href"; break; case 'js': _element = "script"; _type = "text/javascript"; _attr = "src"; break; } scr = document.getElementsByTagName(_element); s = scr[scr.length - 1]; element = document.createElement(_element); element.type = _type; if (type == "css") { element.rel = "stylesheet"; } if (element.readyState) { element.onreadystatechange = function () { if (element.readyState == "loaded" || element.readyState == "complete") { element.onreadystatechange = null; callback(); } }; } else { element.onload = function () { callback(); }; } element[_attr] = url; s.parentNode.insertBefore(element, s.nextSibling); }, loadScript = function (url, callback) { loadRemote(url, "js", callback); }, loadCss = function (url, callback) { loadRemote(url, "css", callback); }; var CFObj = { server: "http://komako.net.nz/contact/", folder: "http://komako.net.nz/contact/", fid: 1, form: "pjCF_form_1", week_start: 1, jq_date_format: "dd-mm-yy", date_format: "d-m-Y", confirm_option: "message", thankyou_page: "http://", confirm_message: "Thank you! We have received your message and will get back to you as soon as possible.", banned_words: "", error_message: {"redirect":"You will be redirected in few seconds...","url":"Link or url is not allowed in form fields.","word":"Message blocked due to banned words used."}, is_reject: false, field_rules:{ pjCF_field_1: {required: true}, pjCF_field_2: {required: true, email: true}, pjCF_field_3: {required: false}, pjCF_field_4: {required: false}, pjCF_field_5: {required: false}, captcha: {required: true, remote: "/contact/index.php?controller=pjFront&action=pjActionCheckCaptcha"}}, field_messages:{ pjCF_field_1: {required: "This field is required."}, pjCF_field_2: {required: "This field is required.", email: ""}, pjCF_field_3: {required: "This field is required."}, pjCF_field_4: {required: "This field is required."}, pjCF_field_5: {required: "This field is required."}, captcha: {required: "This field is required.", remote: "Sorry, incorrect. Please refresh and try again."}} }; loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery.js", function () { loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery.validate.min.js", function () { loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery.additional-methods.min.js", function () { loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery.bootstrap.min.js", function () { loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery-ui-1.9.2.custom.min.js", function () { loadScript("http://komako.net.nz/contact/core/libs/pjQ/pjQuery.form.min.js", function () { loadScript("http://komako.net.nz/contact/app/web/js/pjLoad.js", function () { ContactForm_1 = new ContactForm(CFObj); }); }); }); }); }); }); }); })();