// SimpleFAQ.js
(function(jQuery) {
	jQuery.fn.customFadeIn = function(speed, callback) {
		jQuery(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	jQuery.fn.customFadeOut = function(speed, callback) {
		jQuery(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
				jQuery(this).prev().removeClass('expanded')
                jQuery(this).prev().addClass('contracted') 
		});
	};
})(jQuery);




jQuery(document).ready(function() {
  // set all <dt> elements CSS classes to contracted for icon
   // and hide their corresponding <dd> element
  jQuery('#FAQ-Accordion h3').addClass('contracted');
  jQuery('#FAQ-Accordion h3').next().hide();
  // set <dt> toggle function to expand/contract the following <dd> element
   // and toggle the contracted CSS class to switch the icon
  jQuery('#FAQ-Accordion h3').toggle(function() {
    jQuery(this).removeClass('contracted');
	jQuery(this).addClass('expanded');
    jQuery(this).next().customFadeIn('fast')}, function() {
    jQuery(this).next().customFadeOut('fast',function() {
    });
  });

});

	

