this.tip = function($){
	$("li.tip div.inner").addClass('pointercursor');
	$("li.tip div.inner").click(function(e){
		var offset = $(this).offset();
		
		// Warum dieses?
		//
		// if (offset.left < 680 || offset.left > 686) return false;
		//
		// Hab's erstmal erhöht, damit Safari und Chrome nicht rumspinnen, wobei hier 696 ausreichend wäre
		// ABER: Safari unter Mac spinnt noch mehr rum, weshalb 730 nötig ist
		
		//if (offset.left < 680 || offset.left > 730) return false;
		this.t = $(this).children("div.moreinfo").get(0).innerHTML;
		$("body").append("<div id='tip'>"+ this.t +"</div>");
		$("#tip")
			.css("top",(offset.top+45) + "px")
			.css("left",(offset.left) + "px")
			.css("width",($(this).width()) + "px")
			.slideDown("fast")
			.mouseleave(function(){
				$(this).slideUp("fast")
			});
    },
	function(){
		$("#tip").remove();
    });

	$("li.tip div.inner").mouseleave(function(e){
		var offset = $(this).offset();
		if (e.pageX < offset.left || e.pageX > offset.left + $(this).width() || e.pageY < offset.top) {
			$("#tip").slideUp("fast");
		}
	});
};

// starting the script on page load
jQuery(document).ready(function($){	
	if ($("li.tip div.inner")) {
		tip($);
	}
});
