Event.observe(window, 'load', function() { 
	textbox_labels_add('tipfriend-email');	
}); 

function sendTipFriend(formname){
	$('tipfriend-form').fire('custom:submit');
	$('tipfriend_inputs').hide();
	$('tipfriend_loader').show();
	var formparameters = Form.serialize($(formname));
	//alert(formparameters);
	var ajaxurl = '/tipfriend';
	var myAjax = new Ajax.Request(
		ajaxurl,
		{ method: 'post', 
		  parameters: formparameters, 
		  onSuccess: handleTipFriend, 
		  onFailure: function() {alert('Refresh the Page, something happend to the server');} 
		})
}

function handleTipFriend(req) {
	$('tipfriend-email').value = '';
	$('tipfriend_loader').hide();
	$('tipfriend_inputs').show();
	growl(req.responseText);
}