var timeout_ids = {};
function fade_popup(id_i){
	$('#'+id_i).fadeTo("slow", 0, function(){
   		$('#'+id_i).hide();
	});
	timeout_ids[id_i] = null;
}
function fade_popup_timeout(id_t){
	timeout_ids[id_t] = setTimeout("fade_popup('"+id_t+"')",1000);
}
$(document).ready(function(){
	$(".fade_popup").mouseover( function () {
		var rez;
		rez = this.id.split('_');
		if(timeout_ids["information_" + rez[1]] && timeout_ids["information_" + rez[1]]!= null){
			clearTimeout(timeout_ids["information_" + rez[1]]);
		}
		$("#information_" + rez[1]).show();
		$("#information_" + rez[1]).fadeTo("slow", 0.7);
	});	
	$(".fade_popup").mouseout( function () {	
		var rez;
		rez = this.id.split('_');
		id_i="information_" + rez[1];
		fade_popup_timeout(id_i);
	});	
	$(".popup_item").mouseover( function () {
		if(timeout_ids[this.id] && timeout_ids[this.id]!= null){
			clearTimeout(timeout_ids[this.id]);
		}
		$("#" + this.id).show();
	});
	$(".popup_item").mouseout( function () {
		fade_popup_timeout(this.id);
	});	
	
});			
