$(document).ready(function()
{
	initQuestions();
});

var currentShownAnswer = null;
function initQuestions()
{
	var questions = $('div.faq-bottom-content div.questions div.question');
		questions.bind('click', showQuestion);
		questions.bind('click', function()
		{
			questions.removeClass('question-selected');
			$(this).addClass('question-selected');
		});
		questions.hover(
			function()
			{
				$(this).addClass('question-hover');
			},
			function()
			{
				$(this).removeClass('question-hover');
			}
		);
}

function showQuestion()
{
	var question = $(this);
	var questionId = $.trim(question.find('.question-id').text());
	
	if (currentShownAnswer != null)
	{
		currentShownAnswer.slideUp('slow', function()
		{
			currentShownAnswer = $('#faq-answer-' + questionId).slideDown('slow');
		});
	}
	else
	{
		currentShownAnswer = $('#faq-answer-' + questionId).show();
		$('#faq-answer-' + questionId).parents('.faq-top-content').slideDown('slow');
	}
}

sIFR.replace(FSAlbert,
{
	selector: '.lightblue .faq-bottom-content .questions-headline',
	wmode: 'transparent',
	fitExactly: true,
	css: [
		'.sIFR-root{ font-size: 18px; color: #64cef3; font-weight: bold; leading: 1}'
	]
});		

sIFR.replace(FSAlbert,
{
	selector: '.purple .faq-bottom-content .questions-headline',
	wmode: 'transparent',
	fitExactly: true,
	css: [
		'.sIFR-root{ font-size: 18px; color: #9ca1e4; font-weight: bold; leading: 1}'
	]
});		

sIFR.replace(FSAlbert,
{
	selector: '.blue .faq-bottom-content .questions-headline',
	wmode: 'transparent',
	fitExactly: true,
	css: [
		'.sIFR-root{ font-size: 18px; color: #1780a6; font-weight: bold; leading: 1}'
	]
});

sIFR.replace(FSAlbert,
{
	selector: '.green .faq-bottom-content .questions-headline',
	wmode: 'transparent',
	fitExactly: true,
	css: [
		'.sIFR-root{ font-size: 18px; color: #83d386; font-weight: bold; leading: 1}'
	]
});
sIFR.replace(FSAlbert,
{
	selector: '.orange .faq-bottom-content .questions-headline',
	wmode: 'transparent',
	fitExactly: true,
	css: [
		'.sIFR-root{ font-size: 18px; color: #ff9f6d; font-weight: bold; leading: 1}'
	]
});

		

