$(document).ready(function(){

	// The relative URL of the submit.php script.
	// You will probably have to change	it.
	//var submitURL = 'submit.php';

	// Caching the feedback object:	
	var feedback = $('#chat_container');

	$('#chat_window_header').click(function(){

		// We are storing the values of the animated
		// properties in a separate object:
				
		var anim	= {		
			mb : 0,			// Margin Bottom
			pt : 0			// Padding Top
		};
		
		var el = $(this).find('.arrow');
		if(el.hasClass('down')){
			anim = {
				mb : -173,
				pt : 10
			};
		}
		
		feedback.stop().animate({marginBottom: anim.mb});
		feedback.find('.test').stop().animate({paddingTop:anim.pt},function(){
			el.toggleClass('down up');
		});
	});
	
});
