!function(a){'use strict';var b=function(a,b){this.init('tooltip_legacy',a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!='manual'&&(e=this.options.trigger=='hover'?'mouseenter':'focus',f=this.options.trigger=='hover'?'mouseleave':'blur',this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:'manual',selector:''}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=='number'&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type.replace('_legacy',''));!c.options.delay||!c.options.delay.show?c.show():(c.hoverState='in',setTimeout(function(){c.hoverState=='in'&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type.replace('_legacy',''));!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState='out',setTimeout(function(){c.hoverState=='out'&&c.hide()},c.options.delay.hide))},show:function(){var b,c,d,e,f,g,h;if(this.hasContent()&&this.enabled){b=this.tip(),this.setContent(),this.options.animation&&b.addClass('fade'),g=typeof this.options.placement=='function'?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,c=/in/.test(g),a('.gaf-container.tooltip-wraper').remove(),b.css({top:0,left:0,display:'block'});var i=jq('
');i.append(b).appendTo(c?this.$element:document.body),d=this.getPosition(c),e=b[0].offsetWidth,f=b[0].offsetHeight;switch(c?g.split(' ')[1]:g){case'bottom':h={top:d.top+d.height,left:d.left+d.width/2-e/2};break;case'top':h={top:d.top-f,left:d.left+d.width/2-e/2};break;case'left':h={top:d.top+d.height/2-f/2,left:d.left-e};break;case'right':h={top:d.top+d.height/2-f/2,left:d.left+d.width}}b.css(h).addClass(g).addClass('in')}},setContent:function(){var a=this.tip();a.find('.tooltip-inner').html(this.getTitle()),a.removeClass('fade in top bottom left right')},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass('in'),a.support.transition&&this.$tip.hasClass('fade')?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr('title')||typeof a.attr('data-original-title')!='string')&&a.attr('data-original-title',a.attr('title')||'').removeAttr('title')},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr('data-original-title')||(typeof c.title=='function'?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,''),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass('in')?'hide':'show']()}},a.fn.tooltip_legacy=function(c){return this.each(function(){var d=a(this),e=d.data('tooltip'),f=typeof c=='object'&&c;e||d.data('tooltip',e=new b(this,f)),typeof c=='string'&&e[c]()})},a.fn.tooltip_legacy.Constructor=b,a.fn.tooltip_legacy.defaults={animation:!0,delay:0,selector:!1,placement:'top',trigger:'hover',title:'',template:'