+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop="",this.isshown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.defaults={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isshown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.event("show.bs.modal",{relatedtarget:b});this.$element.trigger(d),this.isshown||d.isdefaultprevented()||(this.isshown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasclass("fade");c.$element.parent().length||c.$element.appendto(document.body),c.$element.show().scrolltop(0),d&&c.$element[0].offsetwidth,c.$element.addclass("in").attr("aria-hidden",!1),c.enforcefocus();var e=a.event("shown.bs.modal",{relatedtarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulatetransitionend(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventdefault(),b=a.event("hide.bs.modal"),this.$element.trigger(b),this.isshown&&!b.isdefaultprevented()&&(this.isshown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeclass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasclass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hidemodal,this)).emulatetransitionend(300):this.hidemodal())},b.prototype.enforcefocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isshown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isshown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hidemodal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removebackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removebackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasclass("fade")?"fade":"";if(this.isshown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('