$(document).ready(function(){
	$('#postForm').hide();
	
	$('#toggleForm').click(function(){
		$('#postForm').show("fast");
	});
	

	console.log($("#password").val());
	console.log($("#message").val());

	$("#post").click(function(){
		$.ajax({
			type: "POST",
			url: "assets/twitter/postToTwitter.php",
			data: {
				password: $("#password").val(),
				message: $("#message").val()
			},
			success: function(msg){ 
				if(msg=="success"){
					$("#password").val('');
					$('#postForm').hide("fast");				
				}else{
					alert(msg);
				}
			}
		});
	});
 });