function Feedback() {
	this.div_id = null;
	this.host = '';
	this.ref_url = '';
	this.refferer = '';
}


Feedback.prototype = {


	sendFeedback : function ()
	{
		var text = $("#feedback_area").val();
		if (text == '')
		{
			alert('Вы не ввели сообщение');
			return false;
		}

		var email = $("#feedback_email").val();
		if (email != '')
		{
			text = 'E-mail: ' + email + "\n" + text;
		}

		$.post(
			'/feedback',
			{
				text:		text,
				email:		'',
				host:		this.host,
				refferer:	this.refferer,
				ref_url:	this.ref_url
			},
			function(data, status)
			{
				if (status == 'success') {
					alert('Спасибо!');
					$('#send-error').hide();
				}
			}
		);
	}
}

