var GE_faqs = new function () {
	
	this.request_hash = location.search.toQueryParams();
	this.q = this.request_hash["q"];

	//initialize the FAQ on the contact page
	this.initFAQ = function (el) {
		var question = $(el);
		question.onclick = function () {
			this.toggleClassName('question2');
			this.next().toggle();
		}.bind(question);
		if(this.q != null) {
			this.faqOpen($(this.q));
		}
	}
	
	this.faqOpen = function (el) {
		$(el).next().show();
		$(el).addClassName('question2');
	}
	
	this.faqClose = function (el) {
		$(el).next().hide();
		$(el).removeClassName('question2');
	}
}

//apply the dropdown ability to all the questions in the FAQ
GE_Main.mapCSSToFn('question',
	function(el) {
		GE_faqs.initFAQ(el);
	}
);

//hide all the FAQ answers by default
GE_Main.mapCSSToFn('answer',
	function(el) {
		$(el).hide();
	}
);
