Adding Custom JQuery Menu Fresh Slide Out

In addition to @Wyck’s answer, since you asked if you are doing anything wrong, I’d suggest that it is usually more correct to register and enqueue your scripts as you’ve already done with some scripts in my_custom_function, than it is to write scripts directly into the header.

That is, put this code:

    $(function() {
        $('#menu > li').hover(
            function () {
                var $this = $(this);
                $('a',$this).stop(true,true).animate({
                        'bottom':'-15px'
                    }, 300);
                $('i',$this).stop(true,true).animate({
                        'top':'-10px'
                    }, 400);
            },
            function () {
                var $this = $(this);
                $('a',$this).stop(true,true).animate({
                        'bottom':'-95px'
                    }, 300);
                $('i',$this).stop(true,true).animate({
                        'top':'50px'
                    }, 400);
            }
        );
    });

…in a .js file and enqueue it like you did with the flex-script.

If you register and enqueue correctly you can save yourself some effort. For example:

function my_custom_function() {
        wp_enqueue_script( 'jquery' );

        wp_enqueue_style( 'style', get_template_directory_uri() . '/javascript/css/style.css' );

        wp_enqueue_script( 'flex-script', get_template_directory_uri() .  '/javascript/jquery-1.4.2.min.js', array( 'jquery' ), false, true );
}
add_action( 'wp_enqueue_scripts', 'my_custom_function' );

You don’t need that wp_enqueue_script( 'jquery' );. jQuery is listed as a dependency of your flex-script. It will load automatically. You can do the same with your flex-script and your additional code.

function my_custom_function() {

        wp_enqueue_style( 'style', get_template_directory_uri() . '/javascript/css/style.css' );

        wp_register_script( 'flex-script', get_template_directory_uri() .  '/javascript/flex-script-name.js', array( 'jquery' ), false, true );

        wp_register_script( 'my-flex-code', get_template_directory_uri() .  '/javascript/my-flex-code-name.js', array( 'flex-script' ), false, true );

        wp_enqueue_script('my-flex-code');
}
add_action( 'wp_enqueue_scripts', 'my_custom_function' );

That last line — wp_enqueue_script('my-flex-code'); — should enqueue all of the dependent scripts.

I noticed that you registered flex-script as an old version of jQuery– /javascript/jquery-1.4.2.min.js. I assume that is a mistake. you should not be using old jQuery, much less loading the Core jQuery and also another jQuery. That is bound to cause trouble.

As far as including id="menu", I am not sure where your Javascript needs that ID to be but I am fairly sure that Wyck is on the right track.

The following should do what you want:

wp_nav_menu(
  array(
    'container_class' => 'container',
    'menu_id' => 'menu'
  )
);

That should, and does, generate what should do what you want if and only if your description of what you need is correct:

<div class="container">
        <ul id="menu" class="menu">