Layers transition correctly

This time it handles scrolling. No need for scroll top.


![layers-with-scroll](https://cloud.githubusercontent.com/assets/814861/5318024/588c795a-7c94-11e4-955d-e726e5096061.gif)

Can these vars be put in the declaration above?