jQuery = jQuery.noConflict();

function linksheader_action(){
        jQuery('div#alert_contact').animate({
            "margin-top":"0px"
        });
        jQuery('div#alert_contact').hover(function(){
           jQuery(this).find('span').show();
        },function(){
           jQuery(this).find('span').hide();
        });
        jQuery('div#alert_contact').click(function(){
                window.location.href="http://www.nanane.fr/contact/";
            });
        jQuery('a#alert_rss').animate({
            "margin-top":"0px"
        });
        jQuery('a#alert_rss').hover(function(){
           jQuery(this).find('span').show();
        },function(){
           jQuery(this).find('span').hide();
        });
}

function left_navigation_action(){
    jQuery('div.menu_piece').hover(function(){
	jQuery(this).stop(true);
        jQuery(this).animate({
            "margin-left":"0px"
        });
    },function(){
	jQuery(this).stop(true);
        jQuery(this).animate({
            "margin-left":"-149px"
        });
    });
}
function sidebar_action(){
    jQuery('div#main_sidebar').live('click',function(){
        jQuery('div#main_sidebar').die('click');
        jQuery(this).css({
            "cursor":"auto"
        });
        jQuery(this).animate({
            "margin-left" : "674px"
        });
    });
}
function corners_action(){
    jQuery('div#twitter_bird a span').corner('4px');
    jQuery('span.sous_menu').corner('keep 9px');
    jQuery('span.header_info').corner('4px bottom');
}
function kill_span_bird(){
    jQuery('div#twitter_bird').find('a').each(function(){
        jQuery(this).hide();
    });
}
function run_span_bird(){
    jQuery('div#twitter_bird').find('a').each(function(){
        jQuery(this).show();
        jQuery(this).hover(function(){
            jQuery(this).find('span').show();
        },function(){
            jQuery(this).find('span').hide();
        });
    });
}
function bird_action(){
    jQuery('div#twitter_bird').live('mouseenter',function(){
        jQuery(this).css({
            "background-position" : "0px -147px",
            "height" : "92px",
            "top"    :   "142px",
            "cursor" : "pointer"
        });
    });
    jQuery('div#twitter_bird').live('mouseleave',function(){
        kill_span_bird()
        jQuery(this).css({
            "background-position" : "0px -254px",
            "height" : "92px",
            "top"    :   "142px",
            "cursor" : "auto"
        });
    });
    jQuery('div#twitter_bird').live('click',function(){
        jQuery(this).css({
            "background-position" : "0px 0px",
            "height" : "134px",
            "top"    :   "101px",
            "cursor" : "auto"
        });
        run_span_bird();
    });
}

jQuery(function(){
    corners_action();
    bird_action();
    left_navigation_action();
    sidebar_action();
    setTimeout('linksheader_action()',2000);
});

