var __hasProp=Object.prototype.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},__bind=function(a,b){return function(){return a.apply(b,arguments)}};define(["backbone"],function(a){var b,c;return c={right:function(a,b){var c,d,e,f;return f=b.outerHeight(),d=a.offset(),c=a.outerHeight(),e=a.outerWidth(),b.animate({top:d.top-(f-c)/2,left:d.left+e+5},300,"easeOutQuint")},left:function(a,b){var c,d,e,f;return e=b.outerHeight(),f=b.outerWidth(),d=a.offset(),c=a.outerHeight(),b.animate({top:d.top-(e-c)/2,left:d.left-f-5},300,"easeOutQuint")},above:function(a,b){var c,d,e,f;return e=b.outerHeight(),f=b.outerWidth(),c=a.offset(),d=a.outerWidth(),b.animate({top:c.top-e-5,left:c.left-(f-d)/2},300,"easeOutQuint")},below:function(a,b){var c,d,e,f;return f=b.outerWidth(),d=a.offset(),c=a.outerHeight(),e=a.outerWidth(),b.animate({top:d.top+c+5,left:d.left-(f-e)/2},300,"easeOutQuint")}},b=function(){function b(){b.__super__.constructor.apply(this,arguments)}return __extends(b,a.View),b.prototype.location="right",b.prototype.events={mouseenter:"mouseenter",mouseleave:"mouseleave"},b.prototype.elements={".title":"title",".content":"content"},b.prototype.update=function(a){},b.prototype.show=function(a,b){return b==null&&(b=this.location),this.clear(),this.delay(__bind(function(){return this.update(a),this.el.removeClass("right left above below").addClass(b),c[b](a.el,this.el),this.el.fadeIn("fast")},this),300)},b.prototype.hide=function(a){a==null&&(a=!1),this.clear();if(a)return this.el.hide();if(!this.entered)return this.delay(__bind(function(){return this.el.hide()},this),100)},b.prototype.mouseenter=function(){return this.entered=!0,this.clear()},b.prototype.mouseleave=function(){return this.entered=!1,this.hide()},b.prototype.delay=function(a,b){return this._hoverTimer=setTimeout(a,b)},b.prototype.clear=function(){return clearTimeout(this._hoverTimer),this.el.clearQueue()},b}(),{Popover:b}})