window.onload = function() {
	var scroll = new Fx.Scroll('faqAnswer');
	scroll.now = 0;
	$A($S('ul#monetaryTriggers li a')).each(function(el) {
		el.href = "";
		el.onclick = function() {
			var multiplier = setupScroll(el);
			scroll.custom(scroll.now, multiplier*200);
			return false;
		}.bind(this);
	}, this);
	$A($S('ul#rentalTriggers li a')).each(function(el) {
		el.href = "";
		el.onclick = function() {
			var multiplier = setupScroll(el);
			scroll.custom(scroll.now, multiplier*200);
			return false;
		}.bind(this);
	}, this);
	$A($S('ul#miscTriggers li a')).each(function(el) {
		el.href = "";
		el.onclick = function() {
			var multiplier = setupScroll(el);
			scroll.custom(scroll.now, multiplier*200);
			return false;
		}.bind(this);
	}, this);
}

var setupScroll = function(el) {
	el.blur();
	$A($S('ul#monetaryTriggers li a')).each(function(el) {
		el.removeClass('active');
	});
	$A($S('ul#rentalTriggers li a')).each(function(el) {
		el.removeClass('active');
	});
	$A($S('ul#miscTriggers li a')).each(function(el) {
		el.removeClass('active');
	});
	el.addClass('active');
	return el.id.split('faq')[1]-1;
}