fixing accordion-generation JS
throwing some JS tests around the accordion template