Chained queue functions with jQuery Deferred object