/**
 * JS
 * @author Darío Ruellan <druellan@ecimtech.com>
 * @copyright ecimTech 2008
 */

$(function()
{
	// Animamos lo que corresponda
	$("#nav a, .animate").hover(
	function()
	{
		$(this).stop(true).animate( {opacity: '0.5'}, "fast" );
	},
	function()
	{
	 	$(this).stop(true).animate( {opacity: '1'}, "slow" );
	});

	//Quickmessage
	
	$("#quickmessage input").focus(function()
	{
		if ( !$(this).hasClass("cleaned") )
		{
			$(this).val("");
			$(this).addClass("cleaned");
		}
	});
	
	$("#quickmessage").submit(function()
	{
		$('#quickmessage .msgarea').html("enviando...");
		$("#quickmessage button").attr("disabled", "true");
		$.post('_ajax/quickmessage.php', $(this).serialize(), function(data)
		{
			$('#quickmessage .msgarea').html("").html(data);
			$("#quickmessage button").removeAttr('disabled');
		});
		return false;

	});


});

