On a call to show() or hide() the animation always plays twice for me. It is much easier to understand here.
A second related problem is that the animation for hide will play even if the object is already hidden (choose the first option from the drop-down and then choose the second option).
I think the problem is that you’ve got that setup script inside the dialog
<div>. Move that code down to the script at the bottom of the page and it should work better.There’s still the problem that it calls “hide” unnecessarily when the target box is already hidden, but that should be pretty easy to fix.