// general TAF
UB.TAF.General = new Class({
	Extends: UB.TAF,
	
	h: null,
	fx: null,
	
	initialize: function (options) {
		// genral taf els
		var triggerEl = $(document.body).getElement('.tipAFriend');
		var containerEl = $('tipAFriendHolder');
		var containedEl = $('tipAFriendForm');
		var tafEl = $('taf');
	
		// opts
		options.formType = 'general';
		
		// construct parent
		this.parent(tafEl, options);
		
		// prepare show/hide fx
		this.h = tafEl.getSize().y;
		this.fx =  new Fx.Morph(containedEl, {
			duration: 'short',
			transition: Fx.Transitions.Sine.easeOut
		});
		
		// add trigger
		this.setTrigger(triggerEl);
	},
	
	show: function () {
		this.resetFormSate(this.options.resetOnShow);
		this.fx.start({'height': this.h});
		this.isShown = true;
		return true;
	},
	
	hide: function () {
		this.fx.start({'height': 0});
		this.isShown = false;
		return true;
	}
});

