!function(t){var o=function(o,e){this.options=e,this.$body=t(document.body),this.$element=t(o).delegate('[data-dismiss="modal-popup"]',"click.dismiss.modal-popup",t.proxy(this.hide,this)),this.$dialog=this.$element.find(".modal-dialog"),this.options.remote&&this.$element.find(".popover-content").load(this.options.remote),this.$parent=e.$parent};o.prototype=t.extend({},t.fn.modal.Constructor.prototype,{constructor:o,getPosition:function(){var o=this.$parent,e="body"===this.options.modalPosition?o.offset():o.position();return t.extend({},e,{width:o[0].offsetWidth,height:o[0].offsetHeight})},show:function(){var o=this.$element;o.css({top:0,left:0,display:"block","z-index":1050});var e,i="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,s=this.getPosition(),a=o[0].offsetWidth,n=o[0].offsetHeight;switch(i){case"bottom":e={top:s.top+s.height,left:s.left+s.width/2-a/2};break;case"top":e={top:s.top-n,left:s.left+s.width/2-a/2};break;case"left":e={top:s.top+s.height/2-n/2,left:s.left-a};break;case"right":e={top:s.top+s.height/2-n/2,left:s.left+s.width}}o.css(e).addClass(i).addClass("in"),t.fn.modal.Constructor.prototype.show.call(this,arguments)},backdrop:function(o){var e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=t.support.transition&&e;this.$backdrop=t('