Moved rotate to a function
Merge branch 'rotateJquery' of https://github.com/deini/thumbs into test