var $jscomp = {
scope: {},
findInternal: function(b, a, c) {
b instanceof String && (b = String(b));
for (var d = b.length, e = 0; e < d; e++) {
var f = b[e];
if (a.call(c, f, e, b)) return {
i: e,
v: f
}
}
return {
i: -1,
v: void 0
}
}
};
$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function(b, a, c) {
if (c.get || c.set) throw new TypeError("ES3 does not support getters and setters.");
b != Array.prototype && b != Object.prototype && (b[a] = c.value)
};
$jscomp.getGlobal = function(b) {
return "undefined" != typeof window && window === b ? b : "undefined" != typeof global ? global : b
};
$jscomp.global = $jscomp.getGlobal(this);
$jscomp.polyfill = function(b, a, c, d) {
if (a) {
c = $jscomp.global;
b = b.split(".");
for (d = 0; d < b.length - 1; d++) {
var e = b[d];
e in c || (c[e] = {});
c = c[e]
}
b = b[b.length - 1];
d = c[b];
a = a(d);
a != d && null != a && $jscomp.defineProperty(c, b, {
configurable: !0,
writable: !0,
value: a
})
}
};
$jscomp.polyfill("Array.prototype.find", function(b) {
return b ? b : function(a, c) {
return $jscomp.findInternal(this, a, c).v
}
}, "es6-impl", "es3");
(function() {
var b = {
init: function(a) {
this.config = a;
this.hasFocus = !0;
this.teller = 0;
this.useJSON = !1;
return this
},
general: {
onFocusHandler: function() {
15 < Math.abs(new Date - window.lastAjax) / 1E3 && o.generalAjax()
},
currencyFormat: function(a) {
var c = 0 > a ? "-" : "",
d = parseInt(a = Math.abs(+a || 0).toFixed(2)) + "",
b = 3 < (b = d.length) ? b % 3 : 0;
return c + (b ? d.substr(0, b) + "." : "") + d.substr(b).replace(/(d{3})(?=d)/g, "$1.") + ("," + Math.abs(a - d).toFixed(2).slice(2))
},
addCommas: function(a) {
x = (a + "").split(".");
x1 = x[0];
x2 = 1 < x.length ? "." +
x[1] : "";
for (a = /(d+)(d{3})/; a.test(x1);) x1 = x1.replace(a, "$1.$2");
return x1 + x2
},
fileUploadOnChange: function(a, c) {
var d = a.name,
b = a.size,
b = 1048576 < b ? Math.round(a.size / 1048576) + " MB" : 1024 < b ? Math.round(a.size / 1024) + " KB" : a.size + " B";
25 < d.length && (d = d.substr(0, 22) + "...");
$(c).html(d + " (" + b + ")")
}
},
support: {
sendFeedback: function(a, c) {
0 == c ? ($(".ratefaq-form").slideDown(), $(".fa-thumbs-o-down").css("color", "#ed7e00"), $(".fa-thumbs-o-up").css("color", "#a9aaab").removeClass("active")) : 1 == c ? ($(".ratefaq-form").slideUp(),
o.helpers.ajax("sendFeedback", {
id: a,
rating: c
}).done(function(a) {
o.helpers.setMessageBar("Hartelijk dank voor je feedback!", "success");
$(".fa-thumbs-o-up").css("color", "#85c200").addClass("active");
$(".fa-thumbs-o-down").css("color", "#a9aaab").removeClass("active")
})) : -1 == c && o.helpers.ajax("sendFeedback", {
id: a,
rating: c,
comment: $("#ratefaq-textarea").val()
}).done(function(a) {
o.helpers.setMessageBar("Hartelijk dank voor je feedback!", "success");
$(".ratefaq-form").slideUp();
$(".fa-thumbs-o-down").css("color",
"#ed7e00").addClass("active");
$(".fa-thumbs-o-up").css("color", "#a9aaab").removeClass("active")
})
},
searchFaq: function(a) {
"" == a ? ($("#zoekvak_faq").slideDown(), $("#zoekvak_resultaten").hide(), $("#zoekvak_resultaten").html(<div class="load"></div>)) : ($("#zoekvak_resultaten").show(), $("#zoekvak_faq").slideUp(), o.helpers.ajax("zoekfaq", {
q: a
}, "html").done(function(a) {
$("#zoekvak_resultaten").html(a)
}))
}
},
products: {
showHideDomainConnectEditor: function() {
"undefined" !== $("#koppelwijze") && ($("#nameservers").hide(),
$("#dnsbeheer").hide(), $("#doorsturen").hide(), $("#webhost").hide(), $("#" + $("#koppelwijze").val()).show())
},
showHideDNSPriority: function() {
"undefined" !== $("#type") && ("MX" == $("#type").val() ? $("#priority-c").show() : $("#priority-c").hide())
},
showHideBusiness: function() {
"undefined" !== $("#contacttype") && (1 == $("#contacttype").val() ? $("#zakelijk-particulier").show() : $("#zakelijk-particulier").hide())
},
showDomainAuthKey: function(a) {
$("#DomainAuthKey").html("Bezig met ophalen...");
o.helpers.ajax("showDomainAuthKey", {
domain: a
}).done(function(a) {
a.error ? "notyours" == a.error ? o.helpers.setMessageBar("Deze domeinnaam is niet van jou, je kunt er dus -helaas- ook geen verhuiscode van opvragen.") : "notavailable" == a.error && o.helpers.setMessageBar("De verhuiscode van deze domeinnaam kan niet worden opgevraagd, waarschijnlijk is er geen verhuiscode nodig voor een verhuizing.") : $("#DomainAuthKey").html(a.authKey)
})
},
domainAvailability: function(a) {
$("#invalid-domain").show();
$("#valid-domain").hide();
$("#domain-err-msg").html(<img src="/static/img/loading.gif" />);
$("#domainholder").slideDown();
o.helpers.ajax("checkDomainAvailability", {
domain: a
}).done(function(a) {
a.error ? ($("#domain-name").html(""), $("#domain-availability").html(""), "notforsale" == a.error ? $("#domain-err-msg").html("Deze extensie verkopen we helaas niet. Neem contact met ons op als je m toch wil hebben.") : $("#domain-err-msg").html("Je hebt een ongeldige domeinnaam ingevoerd."), $("#invalid-domain").show(), $("#valid-domain").hide()) : ($("#domain-name").html(a.domain), $("#domain-availability").html(1 ==
a.available ? "Beschikbaar" : Bezet <span class="red">*</span>), 1 == a.available ? $("#domain-note").hide() : $("#domain-note").show(), "__" != a.image ? $("#domain-img").html(<img src="/static/img/domainflags/ + a.image + .png" />) : $("#domain-img").html(" "), $("#domain-price").html("<strong>€ " + a.price + "</strong>"), $("#domain-order-url").attr("href", a.orderURL), $("#invalid-domain").hide(), $("#valid-domain").show());
$("#domainholder").slideDown()
})
}
},
generalAjax: function(a, c) {
window.lastAjax = new Date;
"undefined" !== typeof a && null !== a && (o.options = a);
"undefined" === typeof o.options && (o.options = {
qidcheck: 0,
lu: 0
});
"undefined" === typeof o.options.qidcheck && (o.options.qidcheck = 0);
"undefined" === typeof o.options.lu && (o.options.lu = 0);
o.helpers.ajax("", o.options).done(function(a) {
if (a.error) o.helpers.setMessageBar(a.error);
else {
currTitle = $(document).find("title").text();
origTitle = "(" == currTitle.charAt(0) ? currTitle.substring(currTitle.indexOf(")") + 2) : currTitle;
document.title = 0 < a.unreadPms ? "(" + a.unreadPms + ") " +
origTitle : origTitle;
if ("undefined" !== typeof a.alerts && 0 < a.alerts.alerts.length) {
var b;
for (b = 0; b < a.alerts.alerts.length; ++b) o.helpers.userAlert(a.alerts.alerts[b].message, a.alerts.alerts[b].title, a.alerts.alerts[b].id, a.alerts.alerts[b].link, a.alerts.alerts[b].sendNotification);
!1 !== a.alerts.qidcheck && (o.options.qidcheck = a.alerts.qidcheck)
}
if (0 < a.hidealerts.alerts.length)
for (b = 0; b < a.hidealerts.alerts.length; ++b) o.helpers.closeAlert("#jGrowl-" + a.hidealerts.alerts[b].id);
"forum_topic" == a.page && o.forum.parseUpdateTopic(a);
!0 === c && ("undefined" !== typeof a.newRequestInterval ? setTimeout(function() {
o.generalAjax(null, !0)
}, 1E3 * a.newRequestInterval) : setTimeout(function() {
o.generalAjax(null, !0)
}, 3E3));
"undefined" !== typeof a.lu && (o.options.lu = a.lu)
}
})
},
forum: {
updateCharCount: function(a) {
$("#aantalletters").html(o.general.addCommas(a));
5E4 < a ? $("#aantalletters").css("color", "#c00") : 5E4 == a ? $("#aantalletters").html(<img src="https://one2xs.com/img/smilies/pompom.gif" />) : $("#aantalletters").css("color", "#999")
},
showHidePoll: function() {
"undefined" !==
$("#poll") && (1 == $("#poll").is(":checked") ? $("#pollform").slideDown() : $("#pollform").slideUp())
},
addSmiley: function(a) {
0 == document.getElementById("postarea").selectionEnd && (document.getElementById("postarea").selectionStart = $("#postarea").val().length, document.getElementById("postarea").selectionEnd = $("#postarea").val().length);
var c = $("#postarea").val().substring(0, document.getElementById("postarea").selectionStart),
c = c + ($("#postarea").val().substring(document.getElementById("postarea").selectionStart,
document.getElementById("postarea").selectionEnd) + " " + a),
c = c + $("#postarea").val().substring(document.getElementById("postarea").selectionEnd, $("#postarea").val().length);
$("#postarea").val(c);
$("#postarea").focus()
},
addTag: function(a) {
0 == document.getElementById("postarea").selectionEnd && (document.getElementById("postarea").selectionStart = $("#postarea").val().length, document.getElementById("postarea").selectionEnd = $("#postarea").val().length);
var c = $("#postarea").val().substring(0, document.getElementById("postarea").selectionStart) +
"[" + a + "]",
c = c + ($("#postarea").val().substring(document.getElementById("postarea").selectionStart, document.getElementById("postarea").selectionEnd) + "[/" + a + "]"),
c = c + $("#postarea").val().substring(document.getElementById("postarea").selectionEnd, $("#postarea").val().length);
$("#postarea").val(c);
$("#postarea").focus()
},
dayDate: function() {
var a = new Date,
c = "zo ma di wo do vr za".split(" ")[a.getDay()],
b = a.getDate(),
e = "jan feb mrt apr mei jun jul aug sep okt nov dec".split(" ")[a.getMonth()],
f = a.getFullYear(),
g = a.getHours(),
h = a.getMinutes(),
a = a.getSeconds();
10 > g && (g = "0" + g);
10 > h && (h = "0" + h);
10 > a && (a = "0" + a);
var k = 6 > g ? "Goedenacht" : 12 > g ? "Goedemorgen" : 18 > g ? "Goedemiddag" : "Goedenavond";
6 > g && 13 == h && 37 == a ? $("#forum_datum").html(k + "! Het is " + c + " " + b + " " + e + " " + f + ", 13:37 w00t!") : $("#forum_datum").html(k + "! Het is " + c + " " + b + " " + e + " " + f + ", " + g + ":" + h + ":" + a + ".");
setTimeout(o.forum.dayDate, 1E3)
},
signaturesToBottom: function() {
$(".postcontainer").each(function(a) {
postId = $(this).attr("data-internalid");
leftHeight = $(this).find(".postinfo").height() +
20;
rightHeight = $("#forumpost-" + postId + "-parsed").height();
signHeight = $(this).find(".signature").height();
extraRightHeight = leftHeight - signHeight - rightHeight - 59;
0 < extraRightHeight && $("#forumpost-" + postId + "-parsed").css("min-height", extraRightHeight + rightHeight)
})
},
previewPost: function(a) {
o.helpers.ajax("forum/previewMsg", {
msg: a
}).done(function(a) {
$("#preview").html(a.parsed);
$("#preview").slideDown()
})
},
sendPost: function(a, c) {
o.forum.busySending || 0 != $("#submit").prop("disabled") || (o.forum.busySending = !0, $("#submit").prop("disabled", !0), $("#submit").addClass("button-grey"), $("#submit").removeClass("button"), $("#loader-container").css("display", "block"), o.helpers.ajax("forum/postMsg", {
tid: a,
msg: c,
captcha: $("#g-recaptcha-response").val()
}).done(function(c) {
$("#preview").html("");
$("#preview").slideUp();
o.forum.busySending = !1;
c.error ? o.helpers.setMessageBar(c.error) : ($("#recaptcha-container").slideUp(), $("#recaptcha-container").html(""), $("#postarea").val(""), $("#aantalletters").html("0"), $("#aantalletters").css("color",
"#999"), update = o.forum.updateTopic(), null == o.options.lapo && (window.location = c.postUrl), 1 == c.autoclose && ($("#topic-reply").slideUp(), $("#autoclose").slideDown()), localStorage.removeItem("topicreply-" + a + "topicreplytopicreply-" + a));
$("#submit").addClass("button");
$("#submit").removeClass("button-grey");
$("#submit").prop("disabled", !1);
$("#loader-container").css("display", "none")
}))
},
cancelEdit: function(a) {
currentText = $("#forum-edit-post-" + postId).val();
originalText = $("#forumpost-" + postId + "-orig").html();
if (currentText == originalText || confirm("Weet je zeker dat je de wijziging wilt annuleren?")) $("#forumpost-" + postId + "-parsed").html($("#forumpost-" + postId + "-parsed-backup").html());
else return !1
},
editPost: function(a) {
$("#forumpost-" + a).attr("data-inedit", 1);
origPost = $("#forumpost-" + a + "-orig").html();
origTitle = $("#forumpost-" + a + "-title").text();
editHtml = <form action="https://www.one2xs.com/forum/post/ + a + /bewerk/" method="post">;
1 == $("#forumpost-" + a).attr("data-startpost") && (editHtml += Topictitel: <input type="text" id="forum-edit-post- +
a + -title" value="" /><br />);
editHtml += <textarea name="message" class="forum-edit-post" id="forum-edit-post- + a + " style="height: 1px;"> + origPost + "</textarea><br />";
editHtml += <input type="button" onclick="o.forum.editPostProcess( + a + ", $(#forum-edit-post-" + a + ").val(), $(#forum-edit-post-" + a + -title).val());" class="button" accesskey="s" value="Verzend" /> ;
editHtml += <input type="button" name="cancel" class="button-darkgrey" value="Annuleren" onclick="o.forum.cancelEdit( + a + );" /> ;
editHtml += <input type="submit" name="edit-expand" class="button-darkgrey" value="Bewerk uitgebreid" />;
editHtml += "</form>";
$("#forumpost-" + a + "-parsed").html(editHtml);
$("#forum-edit-post-" + a + "-title").val(origTitle);
textareaSize = $("#forum-edit-post-" + a)[0].scrollHeight;
150 > textareaSize && (textareaSize = 150);
800 < textareaSize && (textareaSize = 800);
$("#forum-edit-post-" + a).animate({
height: textareaSize
})
},
editPostProcess: function(a, c, b) {
o.forum.busySending || ($("#forumpost-" + a).attr("data-inedit", 0), o.forum.busySending = !0, o.helpers.ajax("forum/editMsg", {
pid: a,
msg: c,
title: b
}).done(function(c) {
o.forum.busySending = !1;
c.error ? o.helpers.setMessageBar(c.error) : ($("#forumpost-" + postId).attr("data-inedit", 0), $("#forumpost-" + a + "-orig").attr("data-md5", ""), $("#forumpost-" + a + "-parsed").html("<em>Wordt geüpdate...</em>"), o.forum.updateTopic(), o.helpers.setMessageBar("Het bericht is bewerkt.", "success"))
}))
},
reportPost: function(a) {
html = "<h1>Bericht melden</h1>";
html += "<p>Als je denkt dat een bericht ongepast is, kun je dat melden. Geef s.v.p. aan waarom je meent dat dit bericht onder onze aandacht zou moeten komen.</p>";
html += <form><textarea class="forum-report-post" id="forum-report-post- + a + " rows="5" style="width: 500px;"></textarea><br />;
html += <input type="button" name="cancel" class="button-grey" value="Annuleren" onclick="o.helpers.closeOverlay();" /> ;
html += <input type="button" onclick="o.forum.reportPostProcess( + a + ", $(#forum-report-post-" + a + ).val());" class="button" accesskey="s" value="Verzend" />;
html += "</form>";
setTimeout(function() {
$("#forum-report-post-" + a).focus()
}, 0);
o.helpers.showOverlay(html)
},
reportPostProcess: function(a, c) {
o.forum.busySending || (o.forum.busySending = !0, o.helpers.ajax("forum/reportMsg", {
pid: a,
msg: c
}).done(function(a) {
o.forum.busySending = !1;
a.error ? o.helpers.setMessageBar(a.error) : (o.helpers.closeOverlay(), o.helpers.setMessageBar("Je melding is ontvangen. We kunnen niet altijd direct actie ondernemen, maar we gaan er zo spoedig mogelijk naar kijken. Thanks!", "success"))
}))
},
editReport: function(a, c, b) {
o.helpers.ajax("forum/editReport", {
rid: a,
status: c
}).done(function(a) {
a.error ?
o.helpers.setMessageBar(a.error) : (o.helpers.setMessageBar("De report is gewijzigd.", "success"), "undefined" !== typeof b && o.forum.updatePost(b))
})
},
toggleQuote: function(a) {
$("#holder-" + a).html($("#" + a).html());
$("#" + a).remove();
$("#holder-" + a).show()
},
quotePost: function(a) {
postContent = $("#forumpost-" + a + "-orig").text();
username = $("#forumpost-" + a).attr("data-username");
message = [QUOTE]" + postContent + "[/quote]nn";
$("#postarea").val($("#postarea").val() + message);
$("#postarea").focus();
$("html, body").animate({
scrollTop: $("#postarea").offset().top
})
},
parseUpdateTopic: function(a) {
if ("undefined" !== typeof a.newPostHtml) {
$("#posts").append(a.newPostHtml);
o.options.lapo = a.newLapo;
var c;
for (c = 0; c < a.newIds.length; ++c) $("#forumpost-" + a.newIds[c]).slideDown().css("background-color", "#fff")
}
if (0 < a.deleted.length)
for (c = 0; c < a.deleted.length; ++c) $("#forumpost-" + a.deleted[c]).slideUp();
"undefined" !== typeof a.updateTitle && ($("#forumpost-" + a.updateTitle.startpostId + "-title").html(a.updateTitle.newTitleSafe),
$("#topictitle").html(a.updateTitle.newTitleSafe), $("title").html("Forum - " + a.updateTitle.newTitleSafe + " › one2xs.com"));
if (0 < a.updatePostcount.length)
for (c = 0; c < a.updatePostcount.length; ++c) $(".postcount-" + a.updatePostcount[c].username).each(function(b) {
$(this).html() != a.updatePostcount[c].newPostcount && ($(this).html(a.updatePostcount[c].newPostcount), $(this).effect("highlight", {
color: "#fff7e8"
}, 2E3))
});
1 == a.locked ? $("#topic-reply").slideUp() : $("#topic-reply").slideDown();
if (0 < a.edits.length)
for (c =
0; c < a.edits.length; ++c) $("#forumpost-" + a.edits[c].id + "-orig").attr("data-md5") != a.edits[c].md5 && (1 == $("#forumpost-" + a.edits[c].id).attr("data-inedit") ? o.helpers.setMessageBar("Er werd een forumbericht gewijzigd terwijl je die aan het bewerken was. Vernieuw de pagina om de wijziging weer te geven.") : $("#forumpost-" + a.edits[c].id).html(a.edits[c].html), $("#forumpost-" + a.edits[c].id).effect("highlight", {
color: "#fff7e8"
}, 2E3));
"undefined" !== typeof a.newLu && (o.options.lu = a.newLu);
o.forum.signaturesToBottom()
},
updateTopic: function() {
o.generalAjax()
},
updatePost: function(a) {
o.helpers.ajax("forum/updatePost", {
pid: a
}).done(function(c) {
1 == $("#forumpost-" + a).attr("data-inedit") ? o.helpers.setMessageBar("Er werd een forumbericht gewijzigd terwijl je die aan het bewerken was. Vernieuw de pagina om de wijziging weer te geven.") : $("#forumpost-" + a).html(c.html);
$("#forumpost-" + a).effect("highlight", {
color: "#fff7e8"
}, 2E3);
o.forum.signaturesToBottom()
});
return !0
}
},
messages: {
bulkActionMessages: function() {
var a = $("#action").val(),
c = $("input.item:checkbox:checked").map(function() {
return this.id
}).get().join(),
b = "";
switch (a) {
case "delete":
b = "wil verwijderen";
break;
case "read":
b = "als gelezen wil markeren";
break;
case "unread":
b = "als ongelezen wil markeren"
}
"none" != a && confirm("Weet je zeker dat je de geselecteerde berichten " + b + "?") && o.helpers.ajax("messages/updateMsg", {
action: a,
ids: c
}).done(function(a) {
"undefined" === typeof a.error && window.location.reload(!0)
});
$("#action").val("none");
return !0
}
},
shoppingCart: {
showHideInvoiceFields: function() {
"undefined" !==
$("#wantInvoice") && ($("#wantInvoice").is(":checked") ? $("#invoiceFields").show() : $("#invoiceFields").hide())
},
synchronizeTOS: function(a) {
$([name="TOS"]).prop("checked", a.is(":checked"))
},
updateShowPrice: function(a) {
basisprijs = parseFloat($("#pro_" + a + "_basisprijs").html());
extraprijs = parseFloat($("#pro_" + a + "_extraprijs").html());
formaat = o.general.currencyFormat(basisprijs + extraprijs);
$("#pro_" + a + "_prijs").html(formaat);
o.shoppingCart.updateSubTotal()
},
domainLinkUpdate: function(a, c) {
$("#" + a + "-nameservers").hide();
$("#" + a + "-webhost").hide();
$("#" + a + "-doorsturen").hide();
$("#" + a + "-" + c).show()
},
updateSubTotal: function() {
var a = 0;
$("span").each(function(c, b) {
var d = $("span").eq(c).attr("id");
if ("undefined" !== typeof d && d) {
var e = $(this).text(),
f = d.indexOf("_basisprijs"),
d = d.indexOf("_extraprijs");
if (-1 != f || -1 != d) a += parseFloat(e)
}
});
$("#subtotaal").html(a);
$("#subtotaal_format").html(o.general.currencyFormat(a));
var c = $("#korting_bedrag").html(),
a = a - parseFloat(c),
c = parseFloat($("#korting_percentage").html()),
c = parseFloat(1 -
c / 100),
a = a * c;
$("#subtotaal").html(a);
o.shoppingCart.useBalance();
var c = $("#balance_noformat").html(),
a = a - parseFloat(c),
c = $("form input[type=radio]:checked").val(),
b = calculateTransactionFee(c, a);
$("#paymentMethod").html($("#paymentMethod-" + c).html());
0 == a && (b = 0);
0 == b ? $("#transactiekosten_format").html("Gratis!") : $("#transactiekosten_format").html("€ " + o.general.currencyFormat(b));
$("#transactiekosten").html(b);
a += b;
$("#totaal").html(a);
$("#totaal_format").html(o.general.currencyFormat(a))
},
checkCoupon: function(a) {
$("#kortingscodeoutput").html("Controleren...");
o.helpers.ajax("checkcoupon", {
c: a
}).done(function(c) {
8 == c.status ? ($("#kortingscodeoutput").html(JSON.stringify(c)), "amou" == c.discount_type ? ($("#korting_bedrag").html(c.discount_amou), $("#korting_percentage").html(0), $("#korting_weergave").html("€ " + o.general.currencyFormat(parseInt(100 * c.discount_amou) / 100))) : "perc" == c.discount_type && ($("#korting_bedrag").html(0), $("#korting_percentage").html(c.discount_amou), $("#korting_weergave").html(o.general.currencyFormat(parseInt(100 * c.discount_amou) /
100) + " %")), $("#kortingscodeoutput").html(<br /><br /><div class="notification success text"><div class="text"> + c.discount_disp + "</div></div>"), $("#kortingscode").attr("disabled", !0), $("#kortingscodesubmit").attr("disabled", !0), $("#kortingscode_hidden").val(a), $("#kortingtr").slideDown(), o.shoppingCart.updateSubTotal()) : $("#kortingscodeoutput").html(<br /><br /><div class="notification error"><div class="text"> + c.discount_disp + "</div></div>")
})
},
useBalance: function() {
amount = $("#balance").html();
if (1 == $("#usebalance").is(":checked")) {
subtotaal = $("#subtotaal").html();
console.log("min van " + parseInt(100 * subtotaal) + " en " + parseInt(100 * amount));
var a = [parseInt(100 * subtotaal), parseInt(100 * amount)],
a = Math.min.apply(Math, a);
$("#balance_weergave").html("- € " + o.general.currencyFormat(a / 100));
$("#balance_noformat").html(a / 100);
$("#balancetr").slideDown()
} else $("#balancetr").slideUp(), $("#balance_weergave").html("€ " + o.general.currencyFormat(0)), $("#balance_noformat").html(0)
},
removeFromCart: function(a) {
o.helpers.ajax("removeFromCart", {
id: a
});
$("#prod_" + a + "_tabel").slideUp("slow");
$("#prod_" + a + "_tabel").remove();
this.updateSubTotal();
0 == $(".productorder").length && ($("#notification-empty").slideDown(), $("[name=submit]").removeClass("button"), $("[name=submit]").addClass("button-grey"), $("[name=submit]").prop("disabled", !0))
}
},
customers: {
scorePassword: function(a) {
var c = 0;
if (!a) return c;
for (var b = {}, e = 0; e < a.length; e++) b[a[e]] = (b[a[e]] || 0) + 1, c += 5 / b[a[e]];
a = {
digits: /d/.test(a),
lower: /[a-z]/.test(a),
upper: /[A-Z]/.test(a),
nonWords: /W/.test(a)
};
variationCount = 0;
for (var f in a) variationCount += 1 == a[f] ? 1 : 0;
c += 10 * (variationCount - 1);
c = parseInt(c);
100 < c && (c = 100);
$("#passwordstrength-score").width(2.7 * c)
},
checkUsername: function(a) {
o.helpers.ajax("checkUsername", {
username: a.val()
}).done(function(c) {
1 == c.valid ? $(a).removeClass("error").removeClass("valid").delay(250).queue(function() {
$(this).addClass("valid").dequeue()
}) : $(a).removeClass("valid").removeClass("error").delay(250).queue(function() {
$(this).addClass("error").dequeue()
})
})
},
createUser: function() {
var a =
$("#userCreateUsername").val(),
c = $("#userCreateEmail").val();
confirm("Weet je zeker dat je een nieuw account wil aanmaken met e-mailadres " + c + "?") && o.helpers.ajax("createUser", {
email: c,
username: a
}).done(function(a) {
"undefined" !== typeof a.colorField ? "email" == a.colorField ? $("#userCreateEmail").removeClass("error").removeClass("valid").addClass("error").dequeue() : $("#userCreateUsername").removeClass("error").removeClass("valid").addClass("error").dequeue() : location.reload(!0)
})
},
verifyLogin: function(a,
c, b) {
o.helpers.ajax("checkLogin", {
username: a,
password: c,
twofactor: b
}).done(function(b) {
1 == b.redirect ? location.reload(!0) : 1 == b.asktwofactor ? (html = "<h1>Two-factor authenticatie</h1>", html += "<p>Om in te kunnen loggen is er een authenticatiecode vereist. Deze kun je vinden in de app Google Authenticator.<br />Vul hieronder de code in:</p>", "undefined" !== typeof b.message && "" != b.message && (html += <p style="color: #c00;">Fout: + b.message + "</p>"), html += "<form onsubmit="o.customers.verifyLogin(" + a + ", " +
c + , $(#twofactor).val()); return false;"><br /><input type="number" id="twofactor" /><br /><br />, html += <input type="submit" class="button" accesskey="s" value="Log in" placeholder="123456" />, html += "</form>", setTimeout(function() {
$("#twofactor").focus()
}, 0), o.helpers.showOverlay(html)) : ($("#username").parent().removeClass("error"), $("#password").parent().removeClass("error"), 1 == b.usernameHighlight && $("#username").parent().addClass("error").stop().effect("shake", {
distance: 10
}), 1 == b.passwordHighlight &&
$("#password").parent().addClass("error").stop().effect("shake", {
distance: 10
}), o.helpers.setMessageBar(b.message, 5))
})
}
},
helpers: {
userAlert: function(a, c, b, e, f) {
c = "undefined" !== typeof c ? c : "Systeembericht";
jGrowlid = "undefined" === typeof b ? b : "jGrowl-" + b;
new_msg = "undefined" !== typeof e ? a + <br />» <a href=" + e + ">klik om te openen</a> : a;
$.jGrowl(new_msg, {
header: c,
sticky: !0,
position: "bottom-right",
closerTemplate: "Sluiten!",
id: jGrowlid,
close: function() {
"undefined" !== typeof b && o.helpers.ajax("deleteAlert", {
aid: b
})
}
});
1 == f && 1 == window.desktop_notifications && ("granted" !== Notification.permission ? Notification.requestPermission() : (a = new Notification($("<textarea />").html(c).text(), {
icon: "https://one2xs.com/img/favicon_large.png",
body: $("<textarea />").html(a).text()
}), "undefined" !== typeof e && (a.onclick = function() {
window.open(e)
})))
},
closeAlert: function(a) {
$(a).animate({
opacity: "hide"
}, "normal", "swing", function() {
$(this).remove()
})
},
setMessageBar: function(a, b, d) {
"undefined" === typeof d && (d = 9);
"undefined" ===
typeof b && (b = "error");
$("#messagebar").attr("class", b);
0 < d ? ($("#messagebar .text").html(a + (<span id="msgBarCountdown"> + d + "</span>)"), $("#messagebar").slideDown(), setTimeout(function() {
o.helpers.msgBarCountdown()
}, 1E3)) : ($("#messagebar .text").html(a), $("#messagebar").slideDown())
},
ajax: function(a, b, d) {
a = $.ajax({
url: window.siteurl + "live",
type: "POST",
dataType: "undefined" !== typeof d ? d : "json",
data: {
a: a,
clientHash: window.clientHash,
fields: b
}
});
a.done(function(a) {
"undefined" !== typeof a.error && o.helpers.setMessageBar(a.error)
});
return a
},
closeOverlay: function(a) {
void 0 !== a ? setTimeout(o.helpers.closeOverlay, 1E3 * a) : ($("#overlay #content").html(""), $("#overlay").css("display", "none"))
},
showOverlay: function(a) {
$("#overlay #content").html(a);
$("#overlay").css("display", "block")
},
msgBarCountdown: function() {
var a = parseInt($("#msgBarCountdown").html()) - 1;
0 > a && (a = 0);
$("#msgBarCountdown").html(a);
0 == a && $("#messagebar").slideUp();
0 < a && setTimeout(function() {
b.helpers.msgBarCountdown()
}, 1E3)
}
}
};
window.o = b
})();
(function(b, a) {
window.o = a.init({})
})(jQuery, o);
o.forum.originalwidth = [];
o.forum.originalheight = [];
(function(b) {
b.fn.konami = function(a, c) {
void 0 == c && (c = "38,38,40,40,37,39,37,39,66,65");
return this.each(function() {
var d = [];
b(this).keydown(function(e) {
10 < d.push(e.keyCode) && d.shift();
d.toString() == c && (b(this).unbind("keydown", arguments.callee), a(e))
})
})
}
})(jQuery);
$(window).konami(function() {
$("body").toggleClass("paasei")
});
$("#checkAll").click(function() {
$("input:checkbox").not(this).prop("checked", this.checked)
});
$.fn.setCursorPosition = function(b) {
return 0 == this.length ? this : $(this).setSelection(b, b)
};
$.fn.setSelection = function(b, a) {
if (0 == this.length) return this;
input = this[0];
if (input.createTextRange) {
var c = input.createTextRange();
c.collapse(!0);
c.moveEnd("character", a);
c.moveStart("character", b);
c.select()
} else input.setSelectionRange && (input.focus(), input.setSelectionRange(b, a));
return this
};
$.fn.focusEnd = function() {
this.setCursorPosition(5E5 < this.val().length ? this.val().length : 5E5)
};
window.onfocus = onFocus;
window.onblur = onBlur;
function onBlur() {
o.hasFocus = !1
}
function onFocus() {
o.hasFocus = !0;
o.general.onFocusHandler()
}
function setSelectionRange(b, a, c) {
b.setSelectionRange ? (b.focus(), b.setSelectionRange(a, c)) : b.createTextRange && (b = b.createTextRange(), b.collapse(!0), b.moveEnd("character", c), b.moveStart("character", a), b.select())
}
$(document).ready(function() {
o.forum.dayDate();
1 == window.desktop_notifications && Notification && "granted" !== Notification.permission && Notification.requestPermission();
$(document).on("click", ".edit-post", function(b) {
b.preventDefault();
postId = $(this).closest(".postcontainer").attr("data-internalid");
o.forum.editPost(postId);
return !1
});
$(document).on("click", ".report-post", function(b) {
b.preventDefault();
postId = $(this).closest(".postcontainer").attr("data-internalid");
o.forum.reportPost(postId);
return !1
});
$(document).on("click", ".close-button", function(b) {
b.preventDefault();
o.helpers.closeOverlay();
return !1
});
$(document).on("click", ".quote-post", function(b) {
b.preventDefault();
postId = $(this).closest(".postcontainer").attr("data-internalid");
o.forum.quotePost(postId);
return !1
});
o.forum.signaturesToBottom();
$("#checkAll").click(function() {
$("input:checkbox").not(this).prop("checked", this.checked)
});
$(function() {
$(a[href*="#"]:not([href="#"])).click(function() {
if (location.pathname.replace(/^//, "") ==
this.pathname.replace(/^//, "") && location.hostname == this.hostname) {
var b = $(this.hash),
b = b.length ? b : $("[name=" + this.hash.slice(1) + "]");
if (b.length) return $("html, body").animate({
scrollTop: b.offset().top
}, 1E3), !1
}
})
});
$("#closeButton").click(function() {
$("#messagebar").slideUp();
clearTimeout(window.errorTimeout);
$("#messagebar .span").html("Er is een onbekende fout opgetreden.")
});
$("input[type=file]").change(function() {
var b = $(this).val();
b.search("fakepath") && (b = b.split(""), b = b[b.length - 1]);
$(this).parent().find("input[type=text]").val(b);
$(this).parent().find("input[type=button]").val("Bestand gekozen")
});
(function(b) {
"function" === typeof define && define.amd ? define(["../datepicker"], b) : b(jQuery.datepicker)
})(function(b) {
b.regional.nl = {
closeText: "Sluiten",
prevText: "u2190",
nextText: "u2192",
currentText: "Vandaag",
monthNames: "januari februari maart april mei juni juli augustus september oktober november december".split(" "),
monthNamesShort: "jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),
dayNames: "zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),
dayNamesShort: "zon maa din woe don vri zat".split(" "),
dayNamesMin: "zo ma di wo do vr za".split(" "),
weekHeader: "Wk",
dateFormat: "dd-mm-yy",
firstDay: 1,
isRTL: !1,
showMonthAfterYear: !1,
yearSuffix: ""
};
b.setDefaults(b.regional.nl);
return b.regional.nl
});
$(".dot-container .dot").click(function() {
clearInterval(window.interval);
_this = this;
slideNumber = $("#" + $(this).data("targetslide")).index() + 1;
toScroll = 827 * (slideNumber - 1);
$(".slider-container").stop().animate({
scrollLeft: toScroll
}, 800, function() {
$("#" + $(_this).data("targetslide")).addClass("active", {
duration: 500
})
});
$(".slide").removeClass("active");
$(".dot-container .dot").removeClass("activedot");
$(this).addClass("activedot");
$(".count span").text(slideNumber);
window.interval = setInterval(function() {
$("#next-slide").click()
}, 1E4)
});
$("#next-slide").click(function() {
var b = $(".dot-container .activedot").next(".dot");
0 == b.length && (b = $(".dot-container .dot").first());
b.trigger("click")
});
$("#previous-slide").click(function() {
var b = $(".dot-container .activedot").prev(".dot");
0 == b.length && (b = $(".dot-container .dot").last());
b.trigger("click")
});
console.log( .d8888b.n d88P Y88bn 888n .d88b. 88888b. .d88b. .d88P 888 888 .d8888bnd88""88b 888 "88b d8P Y8b .od888P" `Y8bd8P 88Kn888 888 888 888 88888888 d88P" X88K "Y8888b.nY88..88P 888 888 Y8b. 888" .d8""8b. X88n "Y88P" 888 888 "Y8888 888888888 888 888 88888Pn=======================================================n);
$("input[type=date],input.datepicker").datepicker({
changeMonth: !0,
changeYear: !0,
showButtonPanel: !0,
minDate: "-100Y",
maxDate: 0,
yearRange: "-100:+0"
}, $.datepicker.regional.nl)
});