/**
 * Отвечает за приглашение пользователей в чат
 */
var chatStartConversationEventsObserver = Class.create({
	initialize: function(observer) {
		this.startChatButton = $('chat-start-conversation'); 
		this.chatNameElement = $('chat-start-conversation-data');
		
		this.observer = observer;
		this.init();
	},

	init: function() {
		if (this.startChatButton) {
			this.startChatButton.observe('click', function(e) {
				e.preventDefault();
				this.observer.fire('chatList.activateChatWindow', this.chatNameElement.getValue());
			}.bind(this));
		}
	}
});
