').hide(), t("body").prepend(this.$modalOverlay), this.opts.blur && (this.blurredElements = t("body").children("div, section, header, article, pre, aside, table").not(".modal, .modal-box, #modal-overlay"), this.blurredElements.addClass("modal-blur"))
},
show: function() {
this.setCallback("loading", this.$modal), this.bodyOveflow = t(document.body).css("overflow"), t(document.body).css("overflow", "hidden"), this.isMobile() ? this.showOnMobile() : this.showOnDesktop(), this.$modalOverlay.show(), this.$modalBox.show(), this.setButtonsWidth(), this.isMobile() || (setTimeout(t.proxy(this.showOnDesktop, this), 0), t(window).on("resize.tools.modal", t.proxy(this.resize, this))), this.setCallback("opened", this.$modal), t(document).off("focusin.modal")
},
showOnDesktop: function() {
var e = this.$modal.outerHeight(),
o = t(window).height(),
i = t(window).width();
return this.opts.width > i ? void this.$modal.css({
width: "96%",
marginTop: o / 2 - e / 2 + "px"
}) : void(e > o ? this.$modal.css({
width: this.opts.width + "px",
marginTop: "20px"
}) : this.$modal.css({
width: this.opts.width + "px",
marginTop: o / 2 - e / 2 + "px"
}))
},
showOnMobile: function() {
this.$modal.css({
width: "96%",
marginTop: "2%"
})
},
resize: function() {
this.isMobile() ? this.showOnMobile() : this.showOnDesktop()
},
setTitle: function() {
this.$modalHeader.html(this.opts.title)
},
setContent: function() {
"object" == typeof this.opts.content || 0 === this.opts.content.search("#") ? (this.type = "html", this.$modalBody.html(t(this.opts.content).html()), this.show()) : t.ajax({
url: this.opts.content,
cache: !1,
success: t.proxy(function(t) {
this.$modalBody.html(t), this.show()
}, this)
})
},
setDraggable: function() {
"undefined" != typeof t.fn.draggable && (this.$modal.draggable({
handle: this.$modalHeader
}), this.$modalHeader.css("cursor", "move"))
},
createCancelButton: function(e) {
"undefined" == typeof e && (e = "Cancel");
var o = t("