/*--------------------------------------------

	added by Eric Ritchey for 
	FAQ Page Development 11/18/2008

--------------------------------------------*/

$(document).ready(function() {

	// --- for bucket hover color
	$('.bucket').hover (
		function () {
			$(this).addClass("hover");
			return false;
		},
		function () {
			$(this).removeClass("hover");
			return false;
		}
	);
	
	// --- for question hover
	$('.questions li h3').hover ( 
	// $('li h3').hover ( // if we wanted to experiment with a collapsible left nave use this
		function () {
			$(this).css({textDecoration:'none',color:'#3889A9'});
			return false;
		},
		function () {
			$(this).css({textDecoration:'none',color:'#6b6b6b'});
			return false;
		}
	);
	
	// --- show individual questions
	$('.questions li h3').toggle(
	// $(' li h3').toggle( // if we wanted to experiment with a collapsible left nave use this
		function(){
			$(this).siblings().show();
			$(this).addClass('close');
			return false;
		},
		function(){
			$(this).siblings().hide();
			$(this).removeClass('close');
			return false;
		}
	)
	
	// --- show all questions in section
	$('.questions h2').toggle (
		function () {
			$(this).addClass('close');
			
			var nextElement = $($(this).next()[0]).children();
			
			for(i=0;i<nextElement.length;i++) {
				$(nextElement[i]).children('div').slideDown('slow');
			}

			return false;
		},
		function () {
			$(this).removeClass('close');

			var nextElement = $($(this).next()[0]).children();
			
			for(i=0;i<nextElement.length;i++) {
				$(nextElement[i]).children('div').slideUp('fast');
			}
			return false;
		}
	);
});
