$.fn.zafirtoltip = function(options){
	var defaults = {
		speed: 200,
		delay: 300
	};
	var options = $.extend(defaults, options);
	getTip = function() {
		var ztip = 
			"<div class='tip'>" +
				"<div class='tipSredina'>"	+
				"</div>" +
				"<div class='tipDno'></div>" +
			"</div>";
		return ztip;
	}
	$("body").prepend(getTip());
	$(this).each(function(){
		var $this = $(this);
		var tip = $('.tip');
		var tipInner = $('.tip .tipSredina');
		var tTitle = (this.title);
		this.title = "";
		var offset = $(this).offset();
		var tLeft = offset.left;
		var tTop = offset.top;
		var tWidth = $this.width();
		var tHeight = $this.height();
		$this.hover(
			function() {
				tipInner.html(tTitle);
				setTip(tTop, tLeft);
				setTimer();
			}, 
			function() {
				stopTimer();
				tip.hide();
			}
		);		   
		setTimer = function() {
			$this.showTipTimer = setInterval("showTip()", defaults.delay);
	}
		stopTimer = function() {
			clearInterval($this.showTipTimer);
	}
		
		setTip = function(top, left){
			var topOffset = tip.height();
			var xTip = (left-30)+"px";
			var yTip = (top-topOffset-60)+"px";
			tip.css({'top' : yTip, 'left' : xTip});
}
		
		showTip = function(){
			stopTimer();
			tip.animate({"top": "+=20px", "opacity": "toggle"}, defaults.speed);
		}
	});
};