Extend slide.js; consolidate animation code