var reg=false;
var log=false;
var subm_area=false;
$(document).ready(function(){
	
	$("#login").click(function(){
		if (reg) {$("#ja-reg").slideToggle("fast"); reg=false;}
		$("#ja-login").slideToggle("fast",function(){
			if (log){log=false;}else{log=true;}
		});
		return false;
	});
	
	 $("#register").click(function(){
		if (log) {$("#ja-login").slideToggle("fast"); log=false;}
		$("#ja-reg").slideToggle("fast",function(){
			if (reg){reg=false;}else{reg=true;}
		});
		return false;
	});
	
	$("#prof").click(function(){
		$("#ja-prof").slideToggle("fast");
		return false;
	});
	
	$("#interests").click(function(){
		$("#interests_area").slideToggle("fast",function(){
			if (!subm_area) {$("#prof_subm").slideToggle('slow'); subm_area=true;}
		});
		return false;
	});
	$("#icq").click(function(){
		$("#icq_area").slideToggle("fast",function(){
			if (!subm_area) {$("#prof_subm").slideToggle('slow'); subm_area=true;}
		});
		return false;
	});
});

function view_recipe(id)
{
	jQuery.post('/update_views.php',{"id" : id});
}

function close_windows()
{
	$("#reg_okno").css('display', 'none');
}
