/* o2 tv faq javascript */



var initFaq = function() {
	$('.q').parents('.expandable-content').find('p').each(function() {
		if ($(this).hasClass('q')) {
			$(this)
				.click(function() {
					if ($(this).hasClass('shown')) {
						$(this).nextAll('p').each(function() {
							if ($(this).hasClass('q')) return false;

							$(this).slideUp('fast');
						}).end()
							.removeClass('shown');

					}
					else {
						$(this).nextAll('p').each(function() {
							if ($(this).hasClass('q')) return false;

							$(this).slideDown('fast');
						}).end()
							.addClass('shown');
					}
				})
				.css({ 'cursor': 'pointer' });
		}
		else {
			$(this).hide();
		}
	});
}



aFunctions.push(initFaq);


