small JavaScript snippet to enable jQuery UI tabs to save its order and last clicked item