<script><br />
var tomato = $('#tomato'), bracketRight = $('.bracketRight'), bracketLeft = $('.bracketLeft'), tomatoLeft = $('.tomatoLeft'), tomatoRight = $('.tomatoRight'), tomatoLeaves = $('.tomatoLeaves'), letters = $('#ihtText path'), $btnPlay = $('#btnPlay'), $btnSlowMo = $('#btnSlowMo'), $btnReverse = $('#btnReverse'), tl;<br />
tl = new TimelineMax();<br />
tl.set([tomatoLeft], { xPercent: 23.6 });<br />
tl.set([tomatoLeaves], { xPercent: 41 });<br />
tl.set([tomato], {<br />
xPercent: 2,<br />
rotation: 13,<br />
transformOrigin: 'center center'<br />
});<br />
tl.set(tomato, { yPercent: -200 });<br />
tl.set(bracketRight, { xPercent: 200 });<br />
tl.set(bracketLeft, { xPercent: -200 });<br />
tl.to([<br />
bracketRight,<br />
bracketLeft<br />
], 0.3, {<br />
xPercent: 0,<br />
ease: Power4.easeOut<br />
}, 0.5).to(tomato, 0.5, {<br />
yPercent: 0,<br />
ease: Bounce.easeOut<br />
}).to(tomato, 0.2, {<br />
rotation: 0,<br />
xPercent: -4<br />
}).to([<br />
tomatoLeft,<br />
tomatoLeaves<br />
], 0.2, { xPercent: 0 }, 'split').to(tomato, 0.2, {<br />
rotation: 0,<br />
xPercent: 0<br />
}, 'split').to(tomatoRight, 0.2, { xPercent: 2 }, 'split').staggerFrom(letters, 0.01, { autoAlpha: 0 }, 0.03).add('end');<br />
$btnPlay.click(function () {<br />
tl.timeScale(1).seek(0);<br />
});<br />
$btnSlowMo.click(function () {<br />
tl.timeScale(0.2).seek(0.5);<br />
});<br />
$btnReverse.click(function () {<br />
tl.timeScale(1).seek('end').reverse();<br />
});<br />
//@ sourceURL=pen.js<br />
</script>