| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  | /* =========================================================== | 
					
						
							| 
									
										
										
										
											2012-12-23 08:10:06 +08:00
										 |  |  |  * bootstrap-tooltip.js v2.3.0 | 
					
						
							| 
									
										
										
										
											2012-01-25 03:08:03 +08:00
										 |  |  |  * http://twitter.github.com/bootstrap/javascript.html#tooltips
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |  * Inspired by the original jQuery.tipsy by Jason Frame | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |  * =========================================================== | 
					
						
							| 
									
										
										
										
											2012-01-15 15:28:48 +08:00
										 |  |  |  * Copyright 2012 Twitter, Inc. | 
					
						
							| 
									
										
										
										
											2011-09-11 13:24:31 +08:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
					
						
							|  |  |  |  * you may not use this file except in compliance with the License. | 
					
						
							|  |  |  |  * You may obtain a copy of the License at | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  |  * distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  |  * See the License for the specific language governing permissions and | 
					
						
							|  |  |  |  * limitations under the License. | 
					
						
							|  |  |  |  * ========================================================== */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-25 09:59:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  | !function ($) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   "use strict"; // jshint ;_;
 | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-21 10:19:50 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |  /* TOOLTIP PUBLIC CLASS DEFINITION | 
					
						
							|  |  |  |   * =============================== */ | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   var Tooltip = function (element, options) { | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |     this.init('tooltip', element, options) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |   Tooltip.prototype = { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |     constructor: Tooltip | 
					
						
							| 
									
										
										
										
											2011-12-01 14:42:22 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , init: function (type, element, options) { | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       var eventIn | 
					
						
							|  |  |  |         , eventOut | 
					
						
							| 
									
										
										
										
											2012-12-23 05:24:37 +08:00
										 |  |  |         , triggers | 
					
						
							|  |  |  |         , trigger | 
					
						
							|  |  |  |         , i | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |       this.type = type | 
					
						
							|  |  |  |       this.$element = $(element) | 
					
						
							|  |  |  |       this.options = this.getOptions(options) | 
					
						
							|  |  |  |       this.enabled = true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-23 05:24:37 +08:00
										 |  |  |       triggers = this.options.trigger.split(' ') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       for (i = triggers.length; i--;) { | 
					
						
							|  |  |  |         trigger = triggers[i] | 
					
						
							|  |  |  |         if (trigger == 'click') { | 
					
						
							|  |  |  |           this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) | 
					
						
							|  |  |  |         } else if (trigger != 'manual') { | 
					
						
							|  |  |  |           eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' | 
					
						
							|  |  |  |           eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' | 
					
						
							|  |  |  |           this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) | 
					
						
							|  |  |  |           this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this.options.selector ? | 
					
						
							|  |  |  |         (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : | 
					
						
							|  |  |  |         this.fixTitle() | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , getOptions: function (options) { | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (options.delay && typeof options.delay == 'number') { | 
					
						
							|  |  |  |         options.delay = { | 
					
						
							|  |  |  |           show: options.delay | 
					
						
							|  |  |  |         , hide: options.delay | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       return options | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , enter: function (e) { | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       var self = $(e.currentTarget)[this.type](this._options).data(this.type) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 14:10:03 +08:00
										 |  |  |       if (!self.options.delay || !self.options.delay.show) return self.show() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       clearTimeout(this.timeout) | 
					
						
							|  |  |  |       self.hoverState = 'in' | 
					
						
							|  |  |  |       this.timeout = setTimeout(function() { | 
					
						
							|  |  |  |         if (self.hoverState == 'in') self.show() | 
					
						
							|  |  |  |       }, self.options.delay.show) | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , leave: function (e) { | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       var self = $(e.currentTarget)[this.type](this._options).data(this.type) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-14 20:03:36 +08:00
										 |  |  |       if (this.timeout) clearTimeout(this.timeout) | 
					
						
							| 
									
										
										
										
											2012-04-15 14:10:03 +08:00
										 |  |  |       if (!self.options.delay || !self.options.delay.hide) return self.hide() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       self.hoverState = 'out' | 
					
						
							|  |  |  |       this.timeout = setTimeout(function() { | 
					
						
							|  |  |  |         if (self.hoverState == 'out') self.hide() | 
					
						
							|  |  |  |       }, self.options.delay.hide) | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   , show: function () { | 
					
						
							|  |  |  |       var $tip | 
					
						
							|  |  |  |         , pos | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |         , actualWidth | 
					
						
							|  |  |  |         , actualHeight | 
					
						
							|  |  |  |         , placement | 
					
						
							|  |  |  |         , tp | 
					
						
							| 
									
										
										
										
											2012-12-23 14:17:41 +08:00
										 |  |  |         , e = $.Event('show') | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-21 10:19:50 +08:00
										 |  |  |       if (this.hasContent() && this.enabled) { | 
					
						
							| 
									
										
										
										
											2012-12-23 14:17:41 +08:00
										 |  |  |         this.$element.trigger(e) | 
					
						
							| 
									
										
										
										
											2012-12-14 15:35:11 +08:00
										 |  |  |         if (e.isDefaultPrevented()) return | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |         $tip = this.tip() | 
					
						
							| 
									
										
										
										
											2011-08-28 08:22:49 +08:00
										 |  |  |         this.setContent() | 
					
						
							| 
									
										
										
										
											2011-08-28 09:03:01 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-22 05:29:12 +08:00
										 |  |  |         if (this.options.animation) { | 
					
						
							| 
									
										
										
										
											2011-08-28 09:03:01 +08:00
										 |  |  |           $tip.addClass('fade') | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-23 11:10:32 +08:00
										 |  |  |         placement = typeof this.options.placement == 'function' ? | 
					
						
							| 
									
										
										
										
											2012-01-14 05:33:05 +08:00
										 |  |  |           this.options.placement.call(this, $tip[0], this.$element[0]) : | 
					
						
							| 
									
										
										
										
											2011-12-23 11:10:32 +08:00
										 |  |  |           this.options.placement | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |         $tip | 
					
						
							| 
									
										
										
										
											2012-10-02 23:26:55 +08:00
										 |  |  |           .detach() | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |           .css({ top: 0, left: 0, display: 'block' }) | 
					
						
							| 
									
										
										
										
											2012-12-23 17:18:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-25 07:07:41 +08:00
										 |  |  |         this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-20 13:36:50 +08:00
										 |  |  |         pos = this.getPosition() | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         actualWidth = $tip[0].offsetWidth | 
					
						
							|  |  |  |         actualHeight = $tip[0].offsetHeight | 
					
						
							| 
									
										
										
										
											2011-11-21 10:19:50 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-20 13:36:50 +08:00
										 |  |  |         switch (placement) { | 
					
						
							| 
									
										
										
										
											2011-12-23 11:10:32 +08:00
										 |  |  |           case 'bottom': | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |             tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |             break | 
					
						
							| 
									
										
										
										
											2011-12-23 11:10:32 +08:00
										 |  |  |           case 'top': | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |             tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |             break | 
					
						
							|  |  |  |           case 'left': | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |             tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |             break | 
					
						
							|  |  |  |           case 'right': | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |             tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |             break | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $tip | 
					
						
							| 
									
										
										
										
											2012-09-25 14:28:38 +08:00
										 |  |  |           .offset(tp) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |           .addClass(placement) | 
					
						
							| 
									
										
										
										
											2011-08-28 09:03:01 +08:00
										 |  |  |           .addClass('in') | 
					
						
							| 
									
										
										
										
											2012-12-14 15:35:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         this.$element.trigger('shown') | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-28 08:22:49 +08:00
										 |  |  |   , setContent: function () { | 
					
						
							|  |  |  |       var $tip = this.tip() | 
					
						
							| 
									
										
										
										
											2012-04-05 05:58:04 +08:00
										 |  |  |         , title = this.getTitle() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-03 08:55:10 +08:00
										 |  |  |       $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) | 
					
						
							| 
									
										
										
										
											2012-01-06 18:16:29 +08:00
										 |  |  |       $tip.removeClass('fade in top bottom left right') | 
					
						
							| 
									
										
										
										
											2011-08-28 08:22:49 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , hide: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       var that = this | 
					
						
							|  |  |  |         , $tip = this.tip() | 
					
						
							| 
									
										
										
										
											2012-12-23 14:17:41 +08:00
										 |  |  |         , e = $.Event('hide') | 
					
						
							| 
									
										
										
										
											2012-12-14 15:35:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-23 14:17:41 +08:00
										 |  |  |       this.$element.trigger(e) | 
					
						
							| 
									
										
										
										
											2012-12-14 15:35:11 +08:00
										 |  |  |       if (e.isDefaultPrevented()) return | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-28 09:03:01 +08:00
										 |  |  |       $tip.removeClass('in') | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-25 15:06:16 +08:00
										 |  |  |       function removeWithAnimation() { | 
					
						
							|  |  |  |         var timeout = setTimeout(function () { | 
					
						
							| 
									
										
										
										
											2012-10-02 23:26:55 +08:00
										 |  |  |           $tip.off($.support.transition.end).detach() | 
					
						
							| 
									
										
										
										
											2011-12-25 15:06:16 +08:00
										 |  |  |         }, 500) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $tip.one($.support.transition.end, function () { | 
					
						
							|  |  |  |           clearTimeout(timeout) | 
					
						
							| 
									
										
										
										
											2012-10-02 23:26:55 +08:00
										 |  |  |           $tip.detach() | 
					
						
							| 
									
										
										
										
											2011-12-25 15:06:16 +08:00
										 |  |  |         }) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-28 09:03:01 +08:00
										 |  |  |       $.support.transition && this.$tip.hasClass('fade') ? | 
					
						
							| 
									
										
										
										
											2011-12-25 15:06:16 +08:00
										 |  |  |         removeWithAnimation() : | 
					
						
							| 
									
										
										
										
											2012-10-02 23:26:55 +08:00
										 |  |  |         $tip.detach() | 
					
						
							| 
									
										
										
										
											2012-07-23 09:28:39 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-14 15:35:11 +08:00
										 |  |  |       this.$element.trigger('hidden') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-07-23 05:19:11 +08:00
										 |  |  |       return this | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , fixTitle: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       var $e = this.$element | 
					
						
							|  |  |  |       if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { | 
					
						
							|  |  |  |         $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-21 10:19:50 +08:00
										 |  |  |   , hasContent: function () { | 
					
						
							|  |  |  |       return this.getTitle() | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-20 13:36:50 +08:00
										 |  |  |   , getPosition: function () { | 
					
						
							|  |  |  |       var el = this.$element[0] | 
					
						
							| 
									
										
										
										
											2013-01-30 02:50:13 +08:00
										 |  |  |       return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { | 
					
						
							| 
									
										
										
										
											2012-12-20 13:36:50 +08:00
										 |  |  |         width: el.offsetWidth | 
					
						
							|  |  |  |       , height: el.offsetHeight | 
					
						
							|  |  |  |       }, this.$element.offset()) | 
					
						
							| 
									
										
										
										
											2011-12-25 14:56:01 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , getTitle: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       var title | 
					
						
							|  |  |  |         , $e = this.$element | 
					
						
							|  |  |  |         , o = this.options | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       title = $e.attr('data-original-title') | 
					
						
							|  |  |  |         || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       return title | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , tip: function () { | 
					
						
							| 
									
										
										
										
											2011-12-21 11:37:41 +08:00
										 |  |  |       return this.$tip = this.$tip || $(this.options.template) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , validate: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       if (!this.$element[0].parentNode) { | 
					
						
							|  |  |  |         this.hide() | 
					
						
							|  |  |  |         this.$element = null | 
					
						
							|  |  |  |         this.options = null | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , enable: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       this.enabled = true | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , disable: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       this.enabled = false | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , toggleEnabled: function () { | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |       this.enabled = !this.enabled | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-10-15 21:17:59 +08:00
										 |  |  |   , toggle: function (e) { | 
					
						
							| 
									
										
										
										
											2012-12-20 17:34:28 +08:00
										 |  |  |       var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this | 
					
						
							|  |  |  |       self.tip().hasClass('in') ? self.hide() : self.show() | 
					
						
							| 
									
										
										
										
											2011-11-21 10:19:50 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-19 10:25:54 +08:00
										 |  |  |   , destroy: function () { | 
					
						
							| 
									
										
										
										
											2012-07-23 05:36:23 +08:00
										 |  |  |       this.hide().$element.off('.' + this.type).removeData(this.type) | 
					
						
							| 
									
										
										
										
											2012-06-19 10:25:54 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |  /* TOOLTIP PLUGIN DEFINITION | 
					
						
							|  |  |  |   * ========================= */ | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-08 06:06:01 +08:00
										 |  |  |   var old = $.fn.tooltip | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |   $.fn.tooltip = function ( option ) { | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |     return this.each(function () { | 
					
						
							|  |  |  |       var $this = $(this) | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |         , data = $this.data('tooltip') | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |         , options = typeof option == 'object' && option | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |       if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |       if (typeof option == 'string') data[option]() | 
					
						
							|  |  |  |     }) | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |   $.fn.tooltip.Constructor = Tooltip | 
					
						
							| 
									
										
										
										
											2011-08-28 08:22:49 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-12 13:42:55 +08:00
										 |  |  |   $.fn.tooltip.defaults = { | 
					
						
							| 
									
										
										
										
											2011-12-22 05:29:12 +08:00
										 |  |  |     animation: true | 
					
						
							| 
									
										
										
										
											2011-12-23 11:10:32 +08:00
										 |  |  |   , placement: 'top' | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , selector: false | 
					
						
							|  |  |  |   , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' | 
					
						
							| 
									
										
										
										
											2012-12-23 05:24:37 +08:00
										 |  |  |   , trigger: 'hover focus' | 
					
						
							| 
									
										
										
										
											2011-12-21 10:02:47 +08:00
										 |  |  |   , title: '' | 
					
						
							| 
									
										
										
										
											2012-04-15 07:29:53 +08:00
										 |  |  |   , delay: 0 | 
					
						
							| 
									
										
										
										
											2012-09-25 14:15:36 +08:00
										 |  |  |   , html: false | 
					
						
							| 
									
										
										
										
											2012-12-25 07:59:37 +08:00
										 |  |  |   , container: false | 
					
						
							| 
									
										
										
										
											2011-08-28 04:03:06 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-08 06:06:01 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |  /* TOOLTIP NO CONFLICT | 
					
						
							|  |  |  |   * =================== */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   $.fn.tooltip.noConflict = function () { | 
					
						
							|  |  |  |     $.fn.tooltip = old | 
					
						
							|  |  |  |     return this | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-20 17:34:28 +08:00
										 |  |  | }(window.jQuery); |