(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: "WE", 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 += "
Bank
Aflossing
Intrest (%)
Intrest (€)
";
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 += "