$(document).ready(function() {

	// antispam
	setTimeout(
		function() {
			$("#age").val('7777');
		},
		2000
	)
});


$(window).load( function() {

	//rss tooltips
	var zindex = 1;

	$(".rss_icon").each(function () {
		var timer;

		var icon	= $(this);
		var pos		= icon.position();
		var tip		= icon.prev();

		icon.mouseenter(function() {
			if (timer) clearTimeout(timer);

		    tip.stop(true, true);

            if (tip.is(':visible')) return;

		    tip
				.css({
				    'opacity'   : 0,
					'top'   	: pos.top	- 70,
					'left'		: pos.left	- 50,
					'display'	: 'block',
					'z-index'   : zindex++
				})
				.animate({
				    'opacity'   : 1,
					'top'   	: pos.top	- 80
				});
		});

		tip.mouseenter(function() {
			if (timer) clearTimeout(timer);
		});

		$(icon).add(tip).mouseleave(function() {
		    if (timer) clearTimeout(timer);

            timer = setTimeout(function () {
                timer = null;
                tip
					.stop()
					.animate({
			        	top		: '-=10px',
			        	opacity	: 0
			        }, 250, function() {
			            tip.hide().css('opacity', 1);
			        });

            }, 500);
        });
    });
});