/*file: js/faqs.js, too small for adequate compression*/
$(document).ready(function() {
	$('#answerswitchactivity').hide();
	$('.question').click(function() {
		var faq_id = escape($(this).attr('rel'));
		$('#questions > p').each(function() {
			$(this).css('background-color', '#ffffff');
			$(this).css('border', 'none');
			$(this).css('padding-left', '0');
		});
		$(this).parent('p').css('background-color', '#eeb9d7');
		$(this).parent('p').css('border', 'solid 1px #000000');
		if($.browser.safari) {
			$(this).parent('p').css('-webkit-border-radius', '5px');
			$(this).parent('p').css('background-color', 'rgba(238,185,215,0.7)');
		} else if($.browser.mozilla) {
			$(this).parent('p').css('-moz-border-radius', '5px');
			$(this).parent('p').css('opacity', '0.7');
		}
		$(this).parent('p').css('padding-left', '3px');
		
		$('#answerswitchactivity').fadeIn('normal', function() {
			$.ajax({
				beforeSend:	function(req) {},
				complete:	function(req, msg) {},
				error:		function(req, status, err) {},
				success:	function(data, status) {$('#rightcolumn').empty().html(data); $('#answerswitchactivity').fadeOut('normal');},
				url:		'/faqs/view/' + faq_id
			});
		});
		return false;
	});
});

