var faq = Class.create(
{
	initialize: function(obj)
	{
		var classRoot = this;
		this.obj = obj;
		
		allQuestion = $$('.'+classRoot.obj.question);
		allAnswer = $$('.'+classRoot.obj.answer);
		
		allQuestion.each(function(elm,i){
			
			
				
			$(elm).observe('click', function() {
				
				allAnswer.each(function(elm,x){
					if(allAnswer[x].getStyle('display') == 'block'){
						allAnswer[x].hide();
					}
				});
				
				allAnswer[i].show();
				
			});
		})
		
	}
	

});

Event.observe(window, 'load', function()
{
	var newFaq = new faq(
	{
		question: 'question',
		answer: 'answer'
	});
	
});
