/**
 * @author Andrey Lugovtsov
 */
var taggerVideoClass = Class.create(taggerBaseClass, {
	init: function() {
		this.initTagInputBox();

		this.initObjectsAutoCompleter();
		
		this.element.observe('container:add-element', this.closeTagInputBox.bindAsEventListener(this));

		this.trigger.observe('click', this.onTriggerClick.bindAsEventListener(this));
		
		this.triggerOffset = this.trigger.cumulativeOffset();
	},
	
	/*listenAddTagEvent: function() {
		this.element.observe('container:add-element', function(e) {
			this.closeTagInputBox();
		}.bind(this));
	},*/
	
	onTriggerClick: function(e) {
		e.preventDefault();
		if (this.tagInputBox.visible()) {
			this.hideTagInputBox();
		}
		else {
			this.showTagInputBox(
				this.triggerOffset[0],
				this.triggerOffset[1] - this.tagInputBox.getHeight() - 10
			);
		}
	},
	
	showTagInputBox: function(x, y) {
		this.tagInputBox.setStyle({
			'top': y + 'px',
			'left': x + 'px'
		});
		new Effect.BlindDown(this.tagInputBox, {duration: 0.5});
	},
	
	hideTagInputBox: function() {
		new Effect.BlindUp(this.tagInputBox, {duration: 0.5});
		this.tagInputBox.blur();
	}
});

var videoTagListClass = Class.create(tagListClass, {
	init: function($super) {
		$super();
		
		/*this.tagsSquaresAreSuspended = 0;
		this.streamSquaresTarget = this.element.parentNode.parentNode;
		
		// при наведении мышки на фото нужно отобразить рамки всех существующих тэгов
		// причем при дальнейшем попадании в рамку, в ней внизу повляется содержимое (note) тэга
		this.createTagsSquares();
		
		this.element.observe('element:start-dragging', this.suspendTagsSquares.bind(this));
		this.element.observe('element:cropper-move', this.suspendTagsSquares.bind(this));
		this.element.observe('element:cropper-resize', this.suspendTagsSquares.bind(this));
		this.element.observe('element:cropper-end', this.trainTagsSquares.bind(this));*/
	}
});
