Accordion trigger function when previous panel has completed collapse

Accordion trigger function when previous panel has completed collapse

Hey all,
I'm struggling with the jQuery accordion in a project I'm currently working on. 

I have image carousels embedded within each panel in multiple accordion instances. I only want to have one carousel active at a time obviously so I have chosen to activate the carousel inside a panel using beforeActivate which works correctly but I also need to deactivate the carousel when another panel is clicked and the collapse animation has completed. 

Can someone please advise me on how I may accomplish this.

Thanks for your help.