(function(e){"use strict";function n(e){return e.name.substr(0,6)!="popup_"?"":e.name.substr(6,99)}function r(t,n){if(t==location.pathname)return;var r=e(".popup-wrapper").length,i=e(''),s=e('').append(i).appendTo("body");n==null&&(n=""),t+=(t.indexOf("?")==-1?"?":"&")+"hrmps="+encodeURI(n);var o=window.top.location.search.substr(1,9999).split("&");for(var u=0;u=t&&(s.hasClass("popup-show")?(s.addClass("popup-close").removeClass("popup-show"),setTimeout(function(){s.remove()},1e3)):s.remove()),i==t-1&&s.addClass("popup-show").removeClass("popup-hide")});if(t>0)return;e("#main-wrapper").removeClass("popup-hide"),e("body").removeClass("hasPopup")}function s(t,n,r){e(document).trigger("formsubmitted",[t,n]),e("iframe.hrmpopup").each(function(e,i){var s=i.contentWindow||i.contentDocument;s.$("#messages").replaceWith(r),s.$("#messages").delay(1e4).hide(100),s.$(s.document).trigger("formsubmitted",[t,n])}),window.parent.$("#messages").replaceWith(r),window.parent.$("#messages").delay(1e4).hide(100)}var t=window===window.top;hrm.popup=function(o){var u=Array.prototype.slice.call(arguments),a=u[u.length-1];!a.document||!1?a=window:u.pop();if(!t)return u.push(window),window.top.hrm.popup.apply(this,u);switch(o){case"thisIsPopup":if(a.name.substr(0,6)=="popup_")return!0;break;case"getPopupIndex":return n(a);case"getPopup":return u.length<2&&(u[1]=n(a)),e("#hrmpopup-"+u[1])[0];case"getPopupTitle":u.length<2&&(u[1]=n(a));if(u[1]<0)return document.title;var f=e("#hrmpopup-"+u[1])[0],l=f.contentWindow||f.contentDocument;return l.document.title;case"open":return r(u[1],a.document.title);case"close":return u.length<2&&(u[1]=n(a)),i(u[1]);case"closeAll":break;case"submittedForm":return s(u[1],u[2],u[3]);default:return}}})(jQuery),window.top==window&&$(window).on("beforeunload",function(e){if(!$(document.body).hasClass("hasPopup"))return;var t=hrm.t('U heeft één of meerdere pagina\'s geopend, maak gebruik van de knop "Terug naar .." om naar de vorige pagina te gaan.');return(e||window.event).returnValue=t,t})