BUG: Fix a few bugs with animations

The animation cycle would break with some sample identifiers that included
bad characters that could confuse jQuery, this has been corrected by adding
single quotes in the query string.

One-sample-trajectories were failing and breaking the animation cycle, this has
been corrected for those trajectories to be ignored.