/*
 * FAQ - jQuery onReady event
 */
         $(document).ready(function() { 
			//jQuery code for this page
			// close the offDiv content sections
			//(doing this with js instead of css means if no js, content is all visible)
			$('.offDiv > .show-hide').hide();
			// show the correct buttons for each div
			// they are hidden with css for no-js users
			$('.offDiv > .showLink').show();
			$('.onDiv > .hideLink').show();
			$('a.showAll').show();
			$('a.hideAll').show();

			// showLink shows the content
			$('a.showLink').click(function(){
				$(this).siblings('.show-hide').slideToggle('slow');
				$(this).parents('.offDiv').removeClass().addClass('onDiv');
				$('a.hideAll').show();
				$(this).hide();
				$(this).siblings('.hideLink').show();
				return false;
			});
			// hideLink hides the content
			$('a.hideLink').click(function(){
				$(this).siblings('.show-hide').slideToggle('slow');
				$(this).parents('.onDiv').removeClass().addClass('offDiv');
				$('a.showAll').show();
				$(this).hide();
				$(this).siblings('.showLink').show();
				return false;
			});
			// show all link
			$('a.showAll').click(function(){
				$('.show-hide').slideDown('slow');
				$('.offDiv').removeClass().addClass('onDiv');
				$('a.hideAll').show();
				$('a.hideLink').show();
				$('a.showLink').hide();
				$(this).hide();
				return false;
			});
			// hide all link
			$('a.hideAll').click(function(){
				$('.show-hide').slideUp('slow');
				$('.onDiv').removeClass().addClass('offDiv');
				$('a.showLink').show();
				$('a.hideLink').hide();
				$(this).hide();
				$('a.showAll').show();
				return false;
			});
			 // title is clickable, and toggles the content
			$(".faqTitle").click( function() { 
				$(this).next("div").slideToggle('slow');
				$(this).parent("div").toggleClass('offDiv');
				$(this).parent("div").toggleClass('onDiv');
				$(this).siblings("a").toggle();
			 } );
			
			$('.offDiv >.faqTitle').click(function(){
				$('a.hideAll').show();
			});
			$('.onDiv >.faqTitle').click(function(){
				$('a.showAll').show();
			}); 
			
		//End Ready			
        }); 