/*
 * easyStTip - jQuery Plugin
 * 
 * Copyright (c) 2010 Joachim Dörr
 *
 * Version: 1.0.2
 * Requires: jQuery v1.3+
 *
 */

(function($){ 
	
	$.fn.easysttips = function (options) {

		var _easysttip = $('.easysttip');
		var _easysttipinner = $('.easysttip .easytext');
		
		$(this).hover(function() {

			var _this = $(this);
			var _title = _this.find('span:eq(0)');
			
			if(_this.parent().next().hasClass('title-date')) {
				var _text = _this.parent().next('.title-date:eq(0)');
				var _content = _title.html() + _text.html();
			} else {
				var _content = _title.html();
			}
			
			_easysttipinner.html(_content);
			
			_easysttip.css('position', 'absolute').css('z-index', '1000').show();
			
			
			$(this).mouseenter(function(e) {
				_easysttip.css({top: e.pageY+20});
			}).mousemove(function(e){
				_easysttip.css({top: e.pageY+20, left: e.pageX - (_easysttip.width()/2)});
			});

			
		}, function() {
			
			_easysttip.hide();
			
		});
		
	}

	
})(jQuery);
