!function(){"use strict";var e=jQuery(document);e.on("contentloaded",function(e){var t=jQuery(e.target),n=t.find(".field.client-type input"),a=t.find("fieldset.client");if(n.length&&a.length){var i=function(){var e=n.filter(":checked").val();e&&(a.removeClass("selected"),a.filter('[data-type="'+e+'"]').addClass("selected"))};n.on("change",function(){i()}),i()}}),e.on("contentloaded",function(e){var t=jQuery(e.target),n=t.find(".field.foreign-national input"),a=t.find(".field.person-id"),i=t.find(".field.birth-date");n.length&&(n.on("change",function(e){var t=this.checked;a.toggleClass("selected",!t),i.toggleClass("selected",t)}),n.trigger("change"))})}(),function(){"use strict";jQuery(document).on("contentloaded",function(e){var t=jQuery(e.target);t.find(".field[data-trigger]").each(function(e,n){var a=jQuery(n),i=a.attr("data-trigger"),r=a.find("input"),d=t.find("[data-trigger-name="+i+"]");if(r.length&&d.length){var c=function(){d.removeClass("selected");var e=r.filter(":checked").val()||0;d.filter('[data-trigger-value="'+e+'"]').addClass("selected")};r.on("change",c),c()}})})}(),function(){"use strict";jQuery(document).on("contentloaded",function(e){var t=jQuery(e.target),n=t.find(".js-optional-radio");if(n.length){var a=function(){n.removeClass("selected"),n.prop("checked",!1)};n.on("click",function(e){var t=jQuery(e.currentTarget),n=t.hasClass("selected");a(),n||(t.prop("checked",!0),t.addClass("selected"))})}})}();