packages/accordion/src/js/module.js
function toggleClasses( element, state, openingClass, closingClass ) {

		if( state === 'opening' || state === 'open' ) {
			var oldClass = openingClass || 'au-accordion--closed';
			var newClass = closingClass || 'au-accordion--open';
		}
		else {
			var oldClass = closingClass || 'au-accordion--open';
			var newClass = openingClass || 'au-accordion--closed';
		}

		removeClass( element, oldClass );
		addClass( element, newClass );
	}
function toggleClasses( element, state, openingClass, closingClass ) {

		if( state === 'opening' || state === 'open' ) {
			var oldClass = openingClass || 'au-accordion--closed';
			var newClass = closingClass || 'au-accordion--open';
		}
		else {
			var oldClass = closingClass || 'au-accordion--open';
			var newClass = openingClass || 'au-accordion--closed';
		}

		removeClass( element, oldClass );
		addClass( element, newClass );
	}
function toggleClasses ( element , state , openingClass , closingClass ) { if ( state === 'opening' || state === 'open' ) { var oldClass = openingClass || 'au-accordion--closed' ; var newClass = closingClass || 'au-accordion--open' ; } else { var oldClass = closingClass || 'au-accordion--open' ; var newClass = openingClass || 'au-accordion--closed' ; } removeClass ( element , oldClass ) ; addClass ( element , newClass ) ; }
PRIVATE
IE8 compatible function for replacing classes on a DOM node

@param  {object} element      - The DOM element we want to toggle classes on
@param  {object} target       - The DOM element we want to toggle classes on
@param  {object} state        - The current state of the animation on the element
@param  {string} openingClass - The firstClass you want to toggle on the DOM node
@param  {string} closingClass - The secondClass you want to toggle on the DOM node
PRIVATE IE8 compatible function for replacing classes on a DOM node