$.fn.switooltip = function(options){


		/* Setup the options for the tooltip that can be 
		   accessed from outside the plugin              */
		var defaults = {
			triggerPrefix : 'trigger',
			tipPrefix : 'tooltip'
		};

		var options = $.extend(defaults, options);

		/* Give each item with the class associated with `
		   the plugin the ability to call the tooltip    */
		$(this).each(function(){
			var o = options;
			var $this = $(this);
			var tipID = '#' + o.tipPrefix + $(this).attr("id").replace(o.triggerPrefix,'');
			$this.attr({"tipid":tipID});
			$(tipID).css({'position':'absolute', 'display':'none', 'z-index':'1002'});

			/*var offset = $(this).offset();
			var tLeft = offset.left;
			var tTop = offset.top;
			var tWidth = $this.width();
			var tHeight = $this.height();*/
	
		/* Mouse over and out functions*/
		$this.hover(
			function() {
				var offset = $this.offset();
				tipID = $this.attr("tipid");
				setTip(tipID, offset.top, offset.left);
				$(tipID).show();
			}, 
			function() {
				$($this.attr("tipid")).hide();
			}
		);

	
		/* Position the tooltip relative to the class 
		   associated with the tooltip                */
		setTip = function(tipID, top, left){
			var topOffset = $(tipID).height();
			var xTip = (left-30)+"px";
			var yTip = (top-topOffset-20)+"px";
			$(tipID).css({'top' : yTip, 'left' : xTip});
		}

	});
};


