text: (function(){var c,d,b,a;c=this.jQuery;b={title:"Are you sure?",body:"This action cannot be undone.",password:false,prompt:"Type <i>%s</i> to continue:",ok:"Confirm",cancel:"Cancel"};a=function(i){var g,j,l,h,f,k,e;f=c.extend({},b,window.confirm_localization);g=i.data("confirm");if(!g){return true}if(typeof g==="string"){return window.confirm(g)}k=c("<div class='reveal-modal small'>\n  <h2 class='header'></h2>\n  <p class='warning'></p>\n  <div class='footer'>\n    <a class='cancel-button secondary button radius inline'></a>\n  </div>\n</div>");k.find(".header").html(g.title||f.title);k.find(".warning").html(g.body||f.body);j=i.is("a")?i.clone():c("<a/>");j.removeAttr("class").removeAttr("data-confirm").addClass("button radius alert inline confirm").html(g.ok||f.ok);if(i.is("form")||i.is(":input")){j.on("click",function(){return i.closest("form").removeAttr("data-confirm").submit()})}k.find(".cancel-button").html(g.cancel||f.cancel).on("click",function(m){return k.foundation("reveal","close")});k.find(".footer").append(j);if((e=g.password||f.password)){h=(g.prompt||f.prompt).replace("%s",e);l="<label>"+h+"</label>\n<input class='confirm-password' type='text' />";k.find(".warning").after(c(l));k.find(".confirm-password").on("keyup",function(m){return j.toggleClass("disabled",c(this).val()!==e)});j.addClass("disabled").on("click",function(m){if(c(this).hasClass("disabled")){return false}})}k.appendTo(c("body")).foundation("reveal","open").on("closed.fndtn.reveal",function(m){return k.remove()});return false};if(c.rails){c.rails.allowAction=a}else{d=function(g){var f;f=a(c(this));if(!f){g.preventDefault();g.stopImmediatePropagation()}return f};c(document).on("click","a[data-confirm], :input[data-confirm]",d);c(document).on("submit","form[data-confirm]",d)}}).call(this);