/* 
	All Source Code Copyright 2010, Vrasa
	http://vrasa.com/
	
	If you like what you see, and want to use
	some of this code please email us here: 
	hello [at] vrasa.com and we can discuss 
	pricing and availability.

	Date: Mon July 05 20:36:24 2010 -0600
*/

jQuery(document).ready(function(){
	
	jQuery('#want').submit(function(){
	
		var action = jQuery(this).attr('action');
				
		jQuery("#message").slideUp(300,function(){
			jQuery('#message').hide();
 			jQuery('#submit').attr('disabled','disabled');
			
			jQuery.post(action, { 
				age: jQuery('#age').val(),
				location: jQuery('#location').val(),
				sex: jQuery('#sex').val(),
				thecomments: jQuery('#thecomments').val()
			},
			
				function(data){
					document.getElementById('message').innerHTML = data;
					jQuery('#message').slideDown(300,"easeOutQuart");
					jQuery('#want #submit').attr('disabled',''); 
					if(data.match('win') != null) jQuery('#extra').slideUp(300,"easeOutQuart");
				}
			);
		
		});
		
		return false; 
	
	});
	
});
