function f_apiCountUp(){var e=$('a[href^="{countup:"]');e.each(function(){if(f_isElementInViewport($(this))){var e=$(this).attr("href"),t=e.split("}")[0].split(":"),n=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]),s=$("",{html:0});$(this).replaceWith(s);setTimeout(function(){$({countNum:s.text()}).animate({countNum:n},{duration:r,easing:"linear",step:function(){s.text(Math.floor(this.countNum).toLocaleString());},complete:function(){s.text(this.countNum.toLocaleString());}});},i)}});}function f_apiProgress(){var e=$('a[href^="{progress:"]');e.each(function(){if(f_isElementInViewport($(this))){var e=$(this).attr("href"),t=e.split("}")[0].split(":"),n=t[1],r=parseInt(t[2]),i=getComputedStyle(this.parentNode,null)["color"],s="rgba(",o="rgba(",u="";if(i.startsWith("rgba")){u=i.replace("rgba(","rgb(").replace(i.substring(i.lastIndexOf(","),i.length),"")+")"}else if(i.startsWith("rgb")){u=i}else if(i.startsWith("#")){u=hexToRgb(i)}else{u="rgb(0, 0, 0)"}u=u.slice(0,-1).split("(")[1];s+=u+", 0.8)";o+=u+", 0.2)";var a=_STDO.create("div",{"class":"ed-progress-bar"});if(n!=""){a._el_appnd(_STDO.create("div",{html:""+n+""+r.toString()+"%"}))}var f=_STDO.create("div",{style:"background-color:"+s});var l=_STDO.create("div",{style:"background-color:"+o})._el_appnd(f);a._el_appnd(l);$(this).replaceWith(a);setTimeout(function(){f.style.width=r+"%";},1e3)}});}function hexToRgb(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,r){return t+t+n+n+r+r;});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null;}function f_apiRatingLoader(){var e="commentGetRating";var t=$('a[href^="{rating:"]');t.each(function(){var t=$(this);var n=t.attr("href").split(":")[1].replace(/\}$/,"");var r={id:n};$.post({api:e,data:r,dataType:"json",noLoading:true}).done(function(e){t.replaceWith(e);});});}function f_apiTooltip(){var e=$('a[href^="{tooltip:"]');e.each(function(){var e=$(this).attr("href"),t=e.split("}")[0].split(":"),n=$(this).html();placement=t[1],title=t[2];$(this).replaceWith($("",{"class":"sogtt",html:n,title:title,placement:placement}));});$("span.sogtt").each(function(){$(this).tooltip({placement:function(){return this.$element.attr("placement");},container:"body"}).data("bs.tooltip").tip().addClass("sogtt-tip");});}function f_calcFotoblok(){var e=_STDO.get(".fotoblokContainer[data-calc-height=true]");_STDO.loop(e,function(e,t){var n=t.getBoundingClientRect();t.style.height=n.width/2+"px";});}function f_calcImage(e,t){var n=JSON.parse(t._attr_get("data-clip"));if(n&&Object.keys(n).length>0){var r=t.offsetWidth;var i=r/n.width;var s=n.x*i;var o=n.y*i;var u=n.height*i+o;var a=+t._attr_get("data-width")*i;var f=+t._attr_get("data-height")*i;t.style.position="relative";t.style.height=u-o+"px";e.style.position="absolute";e.style.top=-o+"px";e.style.left=-s+"px";e.style.width=a+"px";e.style.height=f+"px";e.style.transformOrigin=s+r/2+"px "+(o+(u-o)/2+"px")}}function f_calcImages(){var e=_STDO.get(".fotoFadeIn[data-clip]");_STDO.loop(e,function(e,t){f_calcImage(_STDO.get("img",t)[0],t);});}function f_checkForms(e){var t=e.attr("data-invalid-check")==="1";var n=e.find(".requiredField:not([data-mailCheck])");var r=true;var i=e.find(".requiredField[data-mailCheck=first]");var s=e.find(".requiredField[data-mailCheck=second]");var o=i.val();var u=s.val();if(i.length>0){if(o.toLowerCase()!==u.toLowerCase()||o.toLowerCase()==""||u.toLowerCase()==""){i.removeClass("greenBorder").addClass("redBorder");s.removeClass("greenBorder").addClass("redBorder");r=false}else{i.removeClass("redBorder").addClass("greenBorder");s.removeClass("redBorder").addClass("greenBorder");r=true}}e.find(".form-control").removeClass("redBorder greenBorder");if(t){e.find(".invalid-message").remove()}$(n).each(function(e,n){var i=this;var s=i.value?i.value.trim():i.value;var o=s=="";var u=i._attr_get("data-type");var a={zip:/^[0-9]{4,}[\s]?[a-z]*$/i,mail:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/};if(a.hasOwnProperty(u)){var f=a[u].test(i.value);if(o||!f){i._clss_remove("greenBorder")._clss_add("redBorder");if(t){i.parentNode._el_appnd(_STDO.create("span",{"class":"invalid-message",html:_STDO.lng.get("invalid-message-"+(o?"empty":u),true)}))}r=r?false:r}else{i._clss_remove("redBorder")._clss_add("greenBorder")}}else if(u=="checkbox_radio"){var l=_STDO.get("input",i);var c=false;_STDO.loop(l,function(e,t){if(t.checked){c=true;return false}});if(c){i._clss_remove("redBorder")._clss_add("greenBorder")}else{i._clss_remove("greenBorder")._clss_add("redBorder");if(t){i.parentNode._el_appnd(_STDO.create("span",{"class":"invalid-message",html:_STDO.lng.get("invalid-message-empty",true)}))}r=r?false:r}}else if(u=="selectbox"){var h=i.options[i.selectedIndex];if(h.value=="~selectFalse~"){i._clss_remove("greenBorder")._clss_add("redBorder");if(t){i.parentNode._el_appnd(_STDO.create("span",{"class":"invalid-message",html:_STDO.lng.get("invalid-message-empty",true)}))}r=r?false:r}else{i._clss_remove("redBorder")._clss_add("greenBorder")}}else if(u=="file"){var n=i.files;var p=_STDO.get(".form-control",i.closest(".file_input"))[0];if(n.length===0){p._clss_remove("greenBorder")._clss_add("redBorder");if(t){p.parentNode._el_appnd(_STDO.create("span",{"class":"invalid-message",html:_STDO.lng.get("invalid-message-empty",true)}))}r=r?false:r}else{p._clss_remove("redBorder")._clss_add("greenBorder")}}else{if(o||s<"0"){i._clss_remove("greenBorder")._clss_add("redBorder");if(t){i.parentNode._el_appnd(_STDO.create("span",{"class":"invalid-message",html:_STDO.lng.get("invalid-message-empty",true)}))}r=r?false:r}else{i._clss_remove("redBorder")._clss_add("greenBorder")}}});return r;}function f_commentSubmit(e){var t="commentSubmit";var n=e.attr("data-obj_id");var r=e.find("div[data-to]").attr("data-to");var i=e.find(".comment-rating").attr("value");var s=e.serializeArray();if(r!="")s.push({name:"to",value:r});else s.push({name:"comment_rating",value:i});s.push({name:"obj_id",value:n});$.post({api:t,data:s,dataType:"json",noLoading:true}).done(function(t){e[0].reset();e.find("[name=comment_email]").removeClass("requiredField");e.find(".greenBorder").removeClass("greenBorder");e.find(".redBorder").removeClass("redBorder");e.find(".on").removeClass("on");if(r!=""){e.find("div[data-to]").html("").attr("data-to","");if($('.comment-control[data-id="'+r+'"]').parent().nextAll(".reply").last().length>0)$('.comment-control[data-id="'+r+'"]').parent().nextAll(".reply").last().after(t.comment);else $('.comment-control[data-id="'+r+'"]').parent().after(t.comment)}else{e.closest("[object-parent]").find(".comments-container").prepend(t.comment)}e.find(".disabled").removeClass("disabled").removeAttr("disabled");$(document).trigger("comment_submitted",[s]);});}function f_cookies(){var e={create:function(){_STDO.ajx("cookieGet",false,function(t){if(t){var n=_STDO.create("div",{id:"cookies","class":"cookies"});var r=_STDO.create("div",{"class":"cookies-message"});r._el_appnd(_STDO.create("strong",{html:"Deze website gebruikt cookies"}));r._el_appnd(_STDO.create("p",{html:t.ckie_message}));$decline=_STDO.create("button",{"class":"sitebtn decline",html:"Afwijzen"});$accept=_STDO.create("button",{"class":"sitebtn accept",html:t.ckie_button});r._el_appnd(_STDO.create("div")._el_appnd($decline)._el_appnd($accept));n._el_appnd(r);document.body._el_appnd(n);n._el_fade("in",200);$decline.addEventListener("click",function(){n._el_fade("out",200,function(){_STDO.remove(n);});e.decline();});$accept.addEventListener("click",function(){n._el_fade("out",200,function(){_STDO.remove(n);});if(typeof gtag==="function"){gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted"})}e.set("ckie-acc","true");})}},true);},set:function(e,t){_STDO.cookie.set(e,t,90);},decline:function(){sessionStorage.setItem("ckie-acc","false");},get:function(e){return _STDO.cookie.get(e);},remove:function(e){_STDO.cookie.remove(e);}};var t=e.get("ckie-acc");var n=sessionStorage.getItem("ckie-acc")==="false";if(t&&t==="true"){_STDO.ajx("cookieGet",false,function(t){if(t){e.remove("ckie-acc");if(typeof gtag==="function"){gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted"})}e.set("ckie-acc","true")}},true)}else if(!t&&!n){e.create()}}function f_datePicker(e,t){e=e||".datumpicker";t=t||{};var n=$(e);var r=$.extend({},{dateFormat:"dd-mm-yy",defaultDate:null,yearRange:"c-100:c+100",showMonthAfterYear:true,changeMonth:true,changeYear:true,showOtherMonths:true,showWeek:true,showButtonPanel:false,currentText:_STDO.lng.get("Vandaag",true),closeText:_STDO.lng.get("Gereed",true),minDate:null,maxDate:null,weekHeader:""},t);n.datepicker(r);n.datepicker("show");}function f_fadeImageInViewport(){if($(".fotoFadeIn>img:not(.viewport)").length>0){$(".fotoFadeIn>img:not(.viewport)").each(function(){if(this.complete&&f_isElementInViewport($(this))){$(this).f_fadeIn()}})}}function f_formSubmit(e){var t="formSubmit";var n=e.closest("[obj-id]").attr("obj-id");var r=e.attr("data-objc_id");var i=e.find(".sitebtn[type=submit]");var s=e.serializeArray();var o=0;_STDO.loop(s,function(e,t){if(t.name.indexOf("|")>-1&&t.value.length>0)o++;});if(o===0)return false;i.addClass("disabled").attr("disabled",true);var u=new FormData(e[0]);u.set("obj_id",n);u.set("objc_id",r);var a=function(){$.post({api:t,data:u,processData:false,contentType:false,noLoading:true}).done(function(t){var n=e.closest("form");var r=n.height()+"px";var i=$("
",{"class":"formComplete",height:r,width:"100%"}).append($("",{"class":"",html:'