/**
 * @author westalls
 */

 $(document).ready(function () {
	 $('.body-text .accordian-header-1').each(function(index) {
	 	$(this).next('p').remove();
		
	 	$(this).click(function() {
			resetAccordians()
			$(this).next().slideToggle('slow');
			$(this).next().addClass('accordian-body-active')
			return false;
		}).next('.accordian-body').hide();

	 });
	 
	 $('.body-text .accordian-header-2').each(function(index) {
	 	$(this).next('p').remove();
	 	$(this).click(function() {
			resetAccordians()
			$(this).next().slideToggle('slow');
			$(this).next().addClass('accordian-body-active')
			return false;
		}).next('.accordian-body').hide();

	 });
	 
	 $('<div class="accordian-read-more"><a href="javascript:void(0);">Read More</a><span>&nbsp;</span></div>').appendTo('.accordian-header-1');
 	 $('<span>&nbsp;</span>').appendTo('.accordian-header-2 h2');
 });

 function resetAccordians(){
 	 $('.accordian-body-active').each(function(index) {
	 	$(this).slideToggle('slow');
		$(this).removeClass('accordian-body-active');
	 });
 }

