(function($){
		  
	$.fn.sbbox = function(options) {
	
		/* ==== params ====
			yourClassName = the class name of the box
			postionVertical = top or bottom
			postionHorizontal = left or right
			posXoffset = the postion X offset from horizontal postion
			posYoffset = the postion Y offset from vertical postion
		*/
			
		var defaults = {
			yourClassName: ".sbDiv",
			alignVertical: "top",
			alignHorizontal: "right",
			posXoffset: 0,
			posYoffset: 0
		};
		
		var options = $.extend(defaults, options);
		
		function tipBoxShow(e, obj, posX, posY, alignV, alignH){	
			if(alignV == "top"){
				obj.css({"top":posY});
			}
			else if(alignV == "bottom"){
				obj.css({"bottom":posY});
			}
			if(alignH == "left"){
				obj.css({"left":posX});
			}
			else if(alignH == "right"){
				obj.css({"right":posX});
			}
			obj.show();
		}
		
		function tipBoxHide(obj){
			obj.hide();
		}
		
		return this.each(function() {
		
			$(this).css({'cursor' : 'pointer', 'position' : 'relative'});

			var tipBox = $(this).children(options.yourClassName);
			tipBox.css({'position' : 'absolute', 'z-index' : '99999'});
						
			var objPosX = options.posXoffset;
			var objPosY = options.posYoffset;
			var objAlignVert = options.alignVertical;
			var objAlignHor = options.alignHorizontal;
			
			$(this).mousemove(function(e){
				tipBoxShow(e, tipBox, objPosX, objPosY, objAlignVert, objAlignHor);	
			});
			
			$(this).click(function(){
				tipBoxHide(tipBox);
			});
			
			tipBox.mouseout(function(){
				tipBoxHide(tipBox);
			});
			
			tipBox.click(function(){
				tipBoxHide(tipBox);
			});
		
		});
	
	};
	
})(jQuery);
