$(document).ready(function() {
                $(document).bind('keydown', 'left',function (evt){
                    $('div.nav span.left').css('color','black');
                    goPrev();
                    return false; 
                });
                $(document).bind('keyup', 'left',function (evt){
                    $('div.nav span.left').attr('style','');
                    return false; 
                });
                $(document).bind('keydown', 'right',function (evt){
                    $('div.nav span.right').css('color','black');
                    goNext();
                    return false; 
                });
            
                $(document).bind('keyup', 'right',function (evt){
                    $('div.nav span.right').attr('style','');
                    return false; 
                });
                $(document).bind('keydown', 'up',function (evt){
                    $('div.nav span.up').css('color','black');
                    getUp();
                    return false; 
                });
                $(document).bind('keyup', 'up',function (evt){
                    $('div.nav span.up').attr('style','');
                    return false; 
                });
                $(document).bind('keydown', 'down',function (evt){
                    getDown();
                    $('div.nav span.down').css('color','black');
                    return false; 
                });
                $(document).bind('keyup', 'down',function (evt){
                    $('div.nav span.down').attr('style','');
                    return false; 
                });
                 $(document).bind('keydown', 'return',function (evt){
                    getDown();
                    $('div.nav span.down').css('color','black');
                    return false; 
                });
                $(document).bind('keyup', 'return',function (evt){
                    $('div.nav span.down').attr('style','');
                    return false; 
                });
                $('p.root:first a').addClass('current_nav');
                //$('a.current_nav').addClass('hover');
                $('table img').hover(
                    function(e){
                        e.stopPropagation();
                        hoverizePicture($(this));
                    },
                    function(e){
                        
                    }
                );
                $('#imgT').live('mouseleave',function(e){
                    
                    $('#imgT').hide();
                });
                $('#imgT').live('keyLeave',function(e){
                    
                    $('#imgT').hide();
                });
                $('img').live("keyEnter", function(e){
                    //e.stopPropagation();
                    hoverizePicture($(this));
                });
                $('p.root a').live("keyEnter", function(e){
                    //e.stopPropagation();
                     setColor($(this).closest('p'));
                });
                $('p.root, p.child, p.projets').live('click',function(e){
                    $('#imgT').trigger('keyLeave');
                })
                
                
           });

