javascript mootools addEvent
===

I am looking whats wrong with my code...
Mootools core file is attached to html head and works well.

Then if I add the code `$('myElement').addEvent('click', function(){
    alert('clicked!');
});`
right below the `<div id="myElement">Click me</div>` then it works.

But if I add it to the separate javascript.js file then it does not work..

html is this:

    <!DOCTYPE html>
    <html>  
    <head>   
    <script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
    <script type="text/javascript" src="javascript.js"></script>  
    </head>
    <body>  
    <div id="myElement">Click me.</div>
    </body>  
    </html>

And javascript.js is this:

    $('myElement').addEvent('click', function(){
        alert('clicked!');
    });

All files (html, mootools-core and javascript.js are in the same directory).
Any ideas?
Thanks!
Raivis
