added an javascripts file and applied it to layout.
filled the self script with examples.