/*! Facebox dialog module (for jQuery Dirty Forms) | v2.0.0 | github.com/snikch/jquery.dirtyforms (c) 2015 Shad Storhaug License MIT */ !function(t,e,o,i){t.DirtyForms.dialog={title:"Are you sure you want to do that?",proceedButtonClass:"",proceedButtonText:"Leave This Page",stayButtonClass:"",stayButtonText:"Stay Here",stashSelector:"#facebox .content",open:function(e,i,c){var s="

"+this.title+"

"+i+'

'+this.proceedButtonText+''+this.stayButtonText+"

";if(t.facebox(s),e.bindEnterKey=!0,e.staySelector="#facebox .dirty-stay, #facebox .close, #facebox_overlay",e.proceedSelector="#facebox .dirty-proceed",e.isDF1){var n=function(e){return function(i){("keydown"!==i.type||"keydown"===i.type&&(27==i.which||13==i.which))&&(t.DirtyForms.dialogStash||t(o).trigger("close.facebox"),e(i))}},r=t.DirtyForms.decidingCancel;t(o).bind("keydown.facebox",n(r)),t(e.staySelector).click(n(r)),t(e.proceedSelector).click(n(t.DirtyForms.decidingContinue))}},close:function(e,i){i||t(o).trigger("close.facebox")},stash:function(){var e="function"==typeof t.DirtyForms.isDeciding,o=t("#facebox"),i=o.find(".content");return i.find("datalist,select,textarea,input").not('[type="button"],[type="submit"],[type="reset"],[type="image"]').each(function(){c(t(this))}),""===t.trim(o.html())||"block"!=o.css("display")?!1:e?i.clone(!0):i.children().clone(!0)},unstash:function(e,o){t.facebox(e)},fire:function(e,o){this.title=o,this.open({isDF1:!0},e,t.DirtyForms.ignoreClass)},selector:t.DirtyForms.dialog.stashSelector,bind:function(){},refire:function(t,e){this.unstash(t,e)}};var c=function(e){e.is("select,datalist")?e.find("option").each(function(){var e=t(this);e.is(":selected")?e.attr("selected","selected"):e.removeAttr("selected")}):e.is(":checkbox,:radio")?e.is(":checked")?e.attr("checked","checked"):e.removeAttr("checked"):e.is("textarea")?e.text(e.val()):e.attr("value",e.val())}}(jQuery,window,document); //# sourceMappingURL=jquery.dirtyforms.dialogs.facebox.min.js.map