$(function() {
	//ask question
	$("#askQ,#askQart,#askQintext,#askQintext2,#askQinQA").click(function(){
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#aqform").fadeIn(800);
	});
	
	//suggest artcile
	$("#sugA,#sugAintext,#sugAart").click(function(){
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#saform").fadeIn(800);
	});
	
	//upload pic
	$("#uplPic,#uplPicart,#uplPicintext,#uplPicinGal").click(function(){
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#picupload").fadeIn(800);
	});

	//send email
	$(".sendE").click(function(){
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#emailF").fadeIn(800);
	});

	//register
	$("#regU,#regUtop,#regUintext,#regUart,#registerUp,#regInRec").click(function(){
		$(".topform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#login").fadeOut(1000);
		$("#signup").fadeIn(800);
	});
	
	//login
	$("#logIn,#logInTop,#logInart,#loginUp").click(function(){
		$(".topform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#signup").fadeOut(1000);
		$("#login").fadeIn(800);
	});
	
	//hiding all forms 
	//start 
	$("#closeF,#closeF2,#closeF4,#closeF5,#closeF3,#closeF6,#closeF7,#closeF8,#closeF9").click(function(){
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$(".inpic").fadeOut(1000);
	});
	
	
	$(".verClick").click(function(){
		var code = $("#code").val();
		var username = $("#username").val();
		var email = $("#email").val();
		$.get(ajaxFolder + "vercode.php", {code : code, username : username, email : email},
		function(data){
			$("#verMessage").html(data);											   
		}
		);
		
	});
	$("#resend,#resenD").click(function()
	{
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#resendForm").fadeIn(800);
	});
	$("#verify").click(function()
	{
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#verbox").fadeIn(800);
	});
	$(".resendCode").click(function()
	{
		var resend = 'yes';
		var login = $("#Relogin").val();
		var email = $("#Reemail").val();
		$.get(ajaxFolder + "vercode.php", {resend : resend, username : login, email : email},
		function(data){
			$("#sentMessage").html(data);											   
		});
	});
	$("#pwforgot").click(function()
	{
		$(".topform").fadeOut(1000);
		$(".smallform").fadeOut(1000);
		$(".printform").fadeOut(1000);
		$("#passrecover").fadeIn(800);
	});
	$(".retrieve").click(function()
	{
		var email = $("#pwemail").val();
		$.get(ajaxFolder + "retrieve.php", {email : email},
		function(data){
			$("#retrMessage").html(data); 
		});
	});
	$("#bookmark").click(function()
	{
		$(".bookmark").toggle("slow");
	});
	
	
	//end
});

