// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
Ajax.Responders.register({
  onCreate: function(){
    $('north').down('#pulse').show();
  }, 
  onComplete: function(){
    $('north').down('#pulse').hide();
  }
});

function formSubmit(button) {
	//$(button).disabled = true; <- this won't ever submit in safari.
	//$(button).value = "Processing...";
	//button.form.submit(); <- this breaks our ajax submission
	
	//this is a bit abrasive, but it is the only solid thing i can find that works.
	$(button).hide();
	if($('loading_scripts') != null ) { 
		$('loading_scripts').show();
	}
}