This tutorial will show you how to insert already created JavaScript effects in your layouts. I'm not going to teach you how to write the JavaScript code because purpose of this tutorial is Cotonti-JavaScript connection and not learning the basics of JavaScript.
If you want to learn how to write JavaScript code from scratch, I suggest you visit W3 Schools and read their JavaScript tutorials. Also you should learn how to work with JavaScript frameworks/libraries such as jQuery and mootools.
...