// JavaScript Document

$(document).ready(function(){
	function showheight(ele,h){
		$("#display").text("height for "+ele+" = "+h);
	}
	function showbazar(){
		$("#display").text($bazar);
		}
	
	function hideundermenu(ele,time){
		ele.css(
			{'background-position' : '-300px top'}
		);
	}
    //Lorsque la souris survole un lien
    $(".smenu").mouseover(function(){
		
		$bazar=$(this).height()-24;
		$(this).css({'background-position' : 'right top'});
        $(this).stop().animate(
            {top: '-'+$bazar+'px'},
            {queue: false,
            duration: 200,
            easing: 'easeOutSine'
        })
    });
    //Lorsque la souris quitte le lien
    $(".smenu").mouseout(function(){
		
	    $(this).stop().animate(
            {top: '0px'},
            200,
            'easeOutSine',
			function(){hideundermenu($(this))}
        )
    });
	 $(".smenu").click(function(){
		
	    $(this).stop().animate(
            {top: '0px'},
            200,
            'easeOutSine',
			function(){hideundermenu($(this))}
        )
    });
});
