cur_faq = 0;
faq_animation_speed = 500;
loading=0;

function toggle_faq(f)
{
	if(cur_faq != 0)
	{
		if(f==cur_faq){
			$('#faqd_'+f).show(faq_animation_speed);
			$('#faq_'+f).hide(faq_animation_speed);
			cur_faq = f;
		}else{
		$('#faqd_'+cur_faq).show(faq_animation_speed);
		$('#faq_'+cur_faq).hide(faq_animation_speed);
		$('#faqd_'+f).hide(faq_animation_speed);
		$('#faq_'+f).show(faq_animation_speed);
		cur_faq = f;
		}
	}else{
			$('#faqd_'+f).hide(faq_animation_speed);
			$('#faq_'+f).show(faq_animation_speed);
			cur_faq = f;
	}
	
}

function getfaq(page){
	$.post('/base/faq/get', {'page':page}, function (data){
		$('#faq_content').html(data);
		cur_faq = 0;
	})
}

function get_content(url)
{
	if(loading == 1) return false;
	loading = 1;
	$("#content").fadeOut(200, function(){
		$("#loading").fadeIn(200, function(){
			$.post(url, {'ahah':1},function(data){
				$("#content").html(data);
				$("#loading").fadeOut(200, function(){
					$("#content").fadeIn(200, function(){ loading=0; return false; });
				});
				
			});
		});
		
	});
}