Modified class for additional functionality

Hi Jake,

It seems I was using an old version of your JSAnimation, so I didn't have some of your final adjustments. I can try to add the changes to your newer version and do a new pull request (as i should have done from the beginning), though you might be able to merge them without confilcts. 

The changes I made were:  frame number box addition in animation windows, new function to generate general filenames, frame directory control, animation speed control, frame width control and option for additional html code in the preamble.

I don't know if all these changes are relevant, but they were very useful to have in order to implement it into Clawpack (also I like the new framebox). I made all the changes carefully to maintain ipython notebook compatibility.  

Let me know what you think,
Mauricio