(function () { function q(a) { for (var f, d = 0; d < l.length; d++) l[d].min <= a && l[d].max > a && (f = l[d]); return f ? f.terms[f.terms.length - 1] : !1 } function k(a) { void 0 === window.jQuery.ui || "1.12.1" !== window.jQuery.ui.version ? p("https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js", a) : a() } function p(a, f) { var d = document.createElement("script"); d.setAttribute("type", "text/javascript"); d.setAttribute("src", a); d.readyState ? d.onreadystatechange = function () { "complete" != this.readyState && "loaded" != this.readyState || f() } : d.onload = f; (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(d) } function y() { g(document).ready(function (a) { a(document).ajaxStart(function () { a(document.body).css({ cursor: "wait" }) }); a(document).ajaxComplete(function () { a(document.body).css({ cursor: "default" }) }); window.Bid = function (a, d, c) { return this.time = 200, this.bumpCount = 0, this.callEvery = !1, "function" == typeof a ? this.callback = a : "number" == typeof d && (this.time = d), "number" == typeof c && (this.callEvery = c), this }; window.Bid.prototype = { bump: function (a, d) { var c = this; return this.bumpCount++, this.callEvery && 0 == this.bumpCount % this.callEvery && this.finish(a), this._stopTimeout(), this.timeout = setTimeout(function () { c.finish(a) }, d || this.time), this }, stop: function () { return clearTimeout(this.timeout), this }, finish: function (a) { return "function" != typeof this.callback ? !1 : (this._stopTimeout(), this.callback.call(a, a), this) }, _stopTimeout: function () { return clearTimeout(this.timeout), this } }; g.getScript("https://services.direct-krediet.be/Widget/regula-1.3.4.min.js", function () { function f(a) { a += "="; for (var d = decodeURIComponent(document.cookie).split(";"), e = 0; e < d.length; e++) { for (var c = d[e]; " " == c.charAt(0) ;) c = c.substring(1); if (0 == c.indexOf(a)) return c.substring(a.length, c.length) } return "" } function d(a, d, c) { var e = new Date; e.setDate(e.getDate() + c); c = "expires=" + e.toUTCString(); document.cookie = a + "=" + d + ";" + c + ";path=/" } function l(a) { var d = [], c = a.split("?")[1]; if (void 0 != c) for (var c = c.split("&"), e = 0; e < c.length; e++) a = c[e].split("="), d.push(a[1]), d[a[0]] = a[1]; return d } a("", { rel: "stylesheet", type: "text/css", href: "//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css" }).appendTo("head"); var g = f("UID"), k = f("CID"), p = f("AID"); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/getCalculatorWidget", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: "nl-BE", sUID: g, sCID: k, sAID: p, sWebsite: "direct-krediet", sTheme: "default", dBE: "5000", iLO: "36", sDO: "W", sTY: "", sLE: "", sVO: "" }), success: function (e) { if ("OK" == e.Result) { var f = function (b) { b = l(b); var c = a("#hdnCulture").val(), e = a("#hdnUID").val(), t = a("#hdnCID").val(), u = a("#hdnAID").val(); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/getApplicationScreen", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: c, sUID: e, sCID: t, sAID: u, sStep: b.step, sBckDir: b.bckdir }), success: function (b) { "OK" == b.Result ? (d("UID", b.UID, 365), d("CID", b.CID, 365), d("AID", b.AID, 365), a("#dkWidget-container-results").html(b.HTML), a('[data-toggle="tooltip"]').tooltip(), b = a(".dynf[data-constraints]").toArray(), regula.bind({ elements: b })) : a("#dkWidget-container-results").html(b.message) }, error: function (a, b, d) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + b + ": " + d) } }) }, g = function (b, d, c) { "undefined" === typeof c && (c = null); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/processApplicationField", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: a("#hdnCulture").val(), sUID: a("#hdnUID").val(), sCID: a("#hdnCID").val(), sAID: a("#hdnAID").val(), sStep: a("#hdnStep").val(), sFieldId: b, sFieldValue: d, sOptionId: c }), success: function (b) { for (var d = 0; d < b.RowsToRemoveList.length; d++) a("#nvFieldRow" + b.RowsToRemoveList[d]).remove(), a("#nvTitleRow" + b.RowsToRemoveList[d]).remove(); a("#nvFieldRow" + b.AppendRowsAfterId).after(b.RowsToAddHTML); a('[data-toggle="tooltip"]').tooltip(); b = a(".dynf[data-constraints]").toArray(); regula.bind({ elements: b }) }, error: function (a, b, d) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + b + ": " + d) } }) }, k = function (b, d, c) { a("html, body").animate({ scrollTop: a(b).offset().top - c }, 800, function () { d && (window.location.hash = b) }) }, n = function (b) { var c = a("#hdnCulture").val(), e = a("#hdnUID").val(), f = a("#hdnCID").val(), u = a("#hdnAID").val(), v = a("#txtBedrag").val(), g = a("#txtLooptijd").val(), l = a("#cboDoel option:selected").val(), k = "", n = "", p = ""; a("#pnlVoertuig").is(":visible") && (k = a("#cboVoertuigType option:selected").val(), n = a("#cboVoertuigLeeftijd option:selected").val(), p = a("#cboVoertuigVoorschot option:selected").val()); a("#pnlWoning").is(":visible") && (k = a("#cboWoningType option:selected").val()); a("#pnlZakelijk").is(":visible") && (k = a("#cboZakelijkType option:selected").val()); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/getCalculationResults", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: c, sUID: e, sCID: f, sAID: u, dBE: v, iLO: g, sDO: l, sTY: k, sLE: n, sVO: p }), success: function (c) { if ("OK" == c.Result) { d("UID", c.UID, 365); d("CID", c.CID, 365); d("AID", c.AID, 365); a("#hdnUID").val(c.UID); a("#hdnCID").val(c.CID); a("#hdnAID").val(c.AID); e = c.UID; f = c.CID; u = c.AID; var w = "", r = 0, t = 0, q = 0; var m = "
"; if (0 < c.Results.length) { m += ""; for (var h = 0; h < c.Results.length; h++) { if (c.Results[h].dME < r || 0 == r) w = c.Results[h].sBA, r = c.Results[h].dME, t = c.Results[h].dIP, q = c.Results[h].dIB; m += ""; m += ""; m += ""; m += ""; m += ""; m += ""; m += "" } m += "
BankAflossingIntrest (%)Intrest (€) 
" + c.Results[h].oBank.sBankName + "€ " + parseFloat(Math.round(100 * c.Results[h].dME) / 100).toFixed(2).toLocaleString() + "" + c.Results[h].dIP.toFixed(2).toLocaleString() + "%€ " + parseFloat(Math.round(100 * c.Results[h].dIB) / 100).toFixed(2).toLocaleString() + "Inschrijven
Opgelet, geld lenen kost ook geld
"; a("#dkWidget-container-results").html(m); a("#btnStartApplication").show(); a("#btnShowResults").show(); a("#btnContactUs").hide(); a("#btnStartApplication").attr("href", "?cid=" + f + "&be=" + v + "&lo=" + g + "&do=" + l + "&ty=" + k + "&le=" + n + "&vo=" + p + "&ba=" + w + "&ip=" + t + "&ib=" + q + "&me=" + r); a("#ltMensualiteit").html("€ " + parseFloat(Math.round(100 * r) / 100).toFixed(2).toLocaleString()); a("#ltIntrestP").text(t.toFixed(2).toLocaleString() + "%"); a("#ltIntrestB").html("€ " + parseFloat(Math.round(100 * q) / 100).toFixed(2).toLocaleString()); a("#pnlResults").show() } else a("#btnStartApplication").hide(), a("#btnShowResults").hide(), a("#btnContactUs").show(), a("#ltMensualiteit").html("NA"), a("#ltIntrestP").text("NA"), a("#ltIntrestB").html("NA"), a("#pnlResults").hide() } else m = "401 Unauthorized", a("#dkWidget-container-results").html(m); "function" === typeof b && b() }, error: function (a, b, c) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + b + ": " + c) } }) }; d("UID", e.UID, 365); d("CID", e.CID, 365); d("AID", e.AID, 365); if (a("#dkWidget-container-results").length) a("#dkWidget-container-calculator").html(e.HTMLforCalculatorContainer), a("#dkWidget-container-results").html(e.HTMLforResultContainer); else { var p = "
" + e.HTMLforResultContainer + "
"; a("#dkWidget-container-calculator").html(e.HTMLforCalculatorContainer + p) } a('[data-toggle="tooltip"]').tooltip(); regula.bind(); var x = new Bid(function () { n() }, 1E3); a("#sldrBedrag").slider({ min: 250, max: 25E3, step: 500, range: "min", value: a("#txtBedrag").val(), slide: function (b, d) { var e = d.value; a("#txtBedrag").val(e); e = q(e); "" == c || c > e ? (a("#txtLooptijd").val(e), a("#sldrLooptijd").slider("option", "max", e), a("#sldrLooptijd").slider("option", "value", e)) : a("#sldrLooptijd").slider("option", "max", e) }, stop: function (a, c) { n() } }); a("#sldrLooptijd").slider({ min: 6, max: q(a("#txtBedrag").val()), step: 6, range: "min", value: a("#txtLooptijd").val(), slide: function (b, d) { a("#txtLooptijd").val(d.value); c = d.value }, stop: function (a, c) { n() } }); a("#txtBedrag").keyup(function () { var b = a(this).val(); 250 > b && (b = 250); a("#sldrBedrag").slider("value", b); b = q(b); "" == c || c > b ? (c = b, a("#txtLooptijd").val(b), a("#sldrLooptijd").slider("option", "max", b), a("#sldrLooptijd").slider("option", "value", b)) : a("#sldrLooptijd").slider("option", "max", b); x.bump() }); a("#txtLooptijd").keyup(function () { c = a(this).val(); 6 > c && (c = 6); var b = a("#txtBedrag").val(), b = q(b); c > b ? (c = b, a("#txtLooptijd").val(b), a("#sldrLooptijd").slider("option", "max", b), a("#sldrLooptijd").slider("option", "value", b)) : a("#sldrLooptijd").slider("value", c); x.bump() }); a("#cboDoel").change(function () { switch (a("#cboDoel option:selected").val()) { case "V": a("#pnlVoertuig").slideDown(); a("#pnlWoning, #pnlZakelijk").slideUp(); break; case "W": a("#pnlWoning").slideDown(); a("#pnlVoertuig, #pnlZakelijk").slideUp(); break; case "Z": a("#pnlZakelijk").slideDown(); a("#pnlVoertuig, #pnlWoning").slideUp(); break; default: a("#pnlVoertuig, #pnlWoning, #pnlZakelijk").slideUp() } n() }); a("#dkWidget-container-calculator").on("change", ".ChangeForcesCalc", function (a) { n() }); n(); a("#btnShowResults").click(function (a) { a.preventDefault(); n(function () { k("#tblResults", !1, 50) }) }); a(document).on("click", "a.btnStartApplication", function (b) { b.preventDefault(); b = l(a(this).attr("href")); var c = a("#hdnCulture").val(), e = a("#hdnUID").val(), f = a("#hdnCID").val(), g = a("#hdnAID").val(); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/getNewApplication", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: c, sUID: e, sCID: f, sAID: g, dBE: b.be, iLO: b.lo, sDO: b["do"], sTY: b.ty, sLE: b.le, sVO: b.vo, sBA: b.ba, dME: b.me, dIP: b.ip, dIB: b.ib }), success: function (b) { "OK" == b.Result ? (d("UID", b.UID, 365), d("CID", b.CID, 365), d("AID", b.AID, 365), a("#dkWidget-container-results").html(b.HTML), a('[data-toggle="tooltip"]').tooltip(), b = a(".dynf[data-constraints]").toArray(), regula.bind({ elements: b }), k("#dkWidget-container-results", !1, 100)) : a("#dkWidget-container-results").html(b.message) }, error: function (a, b, c) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + b + ": " + c) } }) }); a("#dkWidget-container-results").on("change", ".dynf", function (b) { a(".inputError").removeClass("inputError"); a(".has-error").removeClass("has-error"); "FIELDSET" != this.nodeName ? g(this.id, this.value) : 0 < a(this).find("input[type='radio']:checked").length ? (b = a(this).find("input[type='radio']:checked").val(), g(this.id, b)) : g(this.name, this.value, this.value) }); a("#dkWidget-container-results").on("click", "a.btnPrevAppScreen", function (b) { b.preventDefault(); f(a(this).attr("href")) }); a("#dkWidget-container-results").on("click", "a.btnNextAppScreen", function (b) { b.preventDefault(); a(".inputError").removeClass("inputError"); a(".has-error").removeClass("has-error"); b = a(".dynf[data-constraints]").toArray(); b = regula.validate({ elements: b }); for (var c = 0; c < b.length; c++) for (var d = b[c], e = 0; e < d.failingElements.length; e++) { var g = d.failingElements[e]; a("#" + g.id).addClass("inputError"); a("#" + g.id).closest("div.form-group").addClass("has-error") } b = 0 === b.length ? !0 : !1; b ? f(a(this).attr("href")) : alert("ongeldige of onvolledige invoer, corrigeer AUB de aangeduide velden.") }); a("#dkWidget-container-results").on("click", "a.btnSendApplication", function (b) { b.preventDefault(); b = l(a(this).attr("href")); var c = a("#hdnCulture").val(), e = a("#hdnUID").val(), f = a("#hdnCID").val(), g = a("#hdnAID").val(); a.ajax({ type: "POST", url: "https://services.direct-krediet.be/api/v1/sendApplication", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", data: JSON.stringify({ sCulture: c, sUID: e, sCID: f, sAID: g, sStep: b.step }), success: function (b) { "OK" == b.Result ? (b.ResetUID && (d("UID", "", -1), a("#hdnUID").val("")), b.ResetCID && (d("CID", "", -1), a("#hdnCID").val("")), b.ResetAID && (d("AID", "", -1), a("#hdnAID").val("")), a("#dkWidget-container-results").html(b.HTML)) : a("#dkWidget-container-results").html(b.message) }, error: function (a, b, c) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + b + ": " + c) } }) }) } else a("#dkWidget-container-results").html(e.message) }, error: function (a, c, d) { 500 == a.status ? alert("Internal error: " + a.responseText) : alert(a.status + ": " + a.responseText + ": " + c + ": " + d) } }) }) }) } var g, c = "", l = [{ min: 37001, max: 500001, terms: [18, 24, 30, 36, 42, 48, 60, 84, 120, 240] }, { min: 20001, max: 37001, terms: [18, 24, 30, 36, 42, 48, 60, 84, 120] }, { min: 15001, max: 20001, terms: [18, 24, 30, 36, 42, 48, 60, 84] }, { min: 10001, max: 15001, terms: [18, 24, 30, 36, 42, 48, 60] }, { min: 7501, max: 10001, terms: [18, 24, 30, 36, 42, 48] }, { min: 5601, max: 7501, terms: [18, 24, 30, 36, 42] }, { min: 3701, max: 5601, terms: [18, 24, 30, 36] }, { min: 2501, max: 3701, terms: [18, 24, 30] }, { min: 501, max: 2501, terms: [18, 24] }, { min: 1, max: 501, terms: [18] }]; (function (a) { void 0 === window.jQuery || "3.2.1" !== window.jQuery.fn.jquery ? p("https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js", function () { k(a) }) : k(a) })(function () { g = window.jQuery; g.ui = window.jQuery.ui; y() }) })();