var Tooltips = new Class({
	
	initialize : function(cl, tip, target) {
		this.setHideEvents('mouseout');
		this.setShowEvents('mouseover');
		this.setSelectorclass(cl, tip, target);		
	},
	
	setSelectorclass : function(cl, tip, target) {
		this.cl = '.' + cl;
		
		if($chk(tip)) {
			this.tip = tip;	
		} else {
			this.tip = 'bottomMiddle';
		}
		
		if($chk(target)) {
			this.target = target;	
		} else {
			this.target = 'topMiddle';
		}	
		
	},
	
	setHideEvents : function(e) {
		this.hideevents = e;
	},
	
	setShowEvents : function(e) {
		this.showevents = e;
	},
	
	addEvents : function() {
		
		oTooltips.selectorclass = this.cl;
		
		(function($) {
			$(function(){
				
				$(oTooltips.selectorclass).qtip({
					content: this.alt,
					show: { 
						delay : 0,
						length : 10,
						when : { event : oTooltips.showevents }
					},
					hide: { 
						delay : 0,
						length : 250,
						when : { event : oTooltips.hideevents }
					},
					style: {
						background: '#456FB6',
						color: '#fff',
						textAlign: 'left',
						fontFamily: "'lucida grande', helvetica, tahoma, verdana, arial, sans-serif;",
						fontSize: '11px',
						padding: '2px',
						paddingLeft: '4px',
						paddingRight: '4px',
						paddingBottom: '4px',
						border: {
							width : 1,
							radius : 3,
							color : '#456FB6'
						},
						tip : oTooltips.tip
					},
					position: {
						corner : {
							target: oTooltips.target,
							tooltip: oTooltips.tip
						}
					}
				});
			});
		})(jQuery);
		
	}
	
});
