/**
 *  Erstellt ein Tooltip für das jQuery-Objekt.
 **/
function setTooltipFor(jqueryObject, message) {
	var ttID = jqueryObject.attr('id') + "_tt";
	var jqID = '#' + ttID;
	var ttCode = '<div class="tooltip" id="' + ttID + '">' + message + "</div>";
	
	jqueryObject.after(ttCode);
	
	jqueryObject.mouseover(
		function(e) {			
			jQuery(jqID).show();
			jQuery(jqID).css('left',e.pageX + 5);
			jQuery(jqID).css('top',e.pageY + 5);
			
			jQuery(jqueryObject).bind('mousemove', 
				function(e){
					jQuery(jqID).css('left',e.pageX + 5);
					jQuery(jqID).css('top',e.pageY + 5);
				}
			);
		}
	);
	
	jqueryObject.mouseout(
		function(e) {			
			jQuery(jqID).hide();
			jQuery(jqueryObject).unbind('mousemove');
		}
	);
};

/**
 *  Zeigt beim Hover einen Pointer-Cursor an.
 **/
function setClickable(jqueryObject) {
	jQuery(jqueryObject).hover(
		function(e) {
			jQuery(this).css('cursor','pointer');
		},
		function(e) {
			jQuery(this).css('cursor','auto');
		}
	);
};
