!function(t){MaterioUser=function(){function e(){a&&r()}function r(){t(".get-link a").bind("click",function(e){e.preventDefault();var r=t(this),a=r.attr("href").match("/?destination=([^,]+)/");return i(a),!1})}function i(){t.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/register",function(e){var r,i,a,n=t("
").addClass("modal-content").append(e.block);t("input.form-text",n).each(function(){r=t(this).attr("id"),i=t("label[for="+r+"]").hide().text(),a=t(this).parent().find(".description").hide().text(),t(this).attr("placeholder",i).attr("title",a)}),t("body").append(t("
").addClass("modal-wrapper").append(n)),t.event.trigger("ajax-register-block-loaded"),t("#user-register-form #edit-submit--2").click(function(e){return e.preventDefault(),t.ajax({type:"POST",dataType:"json",url:Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/register/submit",data:t("#user-register-form",n).serialize(),success:function(){},error:function(){}}),!1})})}var a=t("body").is(".page-node-11187")||t("body").is(".page-node-11186");e()},t(document).ready(function(){new MaterioUser})}(jQuery);