 			@mask.style.opacity = 0 if @mask
 
 			@config['onClose'].call(@) if isFunction(@config['onClose'])
-
+			_fireEvent.call(self, 'close') if self.listeners and self.listeners['close']
 			if @node
 				if not @config['out']
 					@config['out'] =

				@config['out'].fn = ()->
					self.node.classList.add('hidden');
					self.config['afterClose'].call(self) if isFunction(self.config['afterClose'])
					self.isOperating = false
					doc.body.removeChild(self.node) if self.node
					doc.body.removeChild(self.mask) if self.mask
					# 销毁对象实例, 防止多次创建弹框消耗内存
					self = null

				animate.call(@node,@config['out']);
			@

#公开到全局
window.tan = (config)->

		@id = 'tan' + now()
		@isOperating = false

	version:'0.1.0'

	# 原型显示方法
	# 参数类型:boolean
