

$(document).ready(function () {
    $("ul.menu_body li:even").addClass("alt");

    //$("#")

   // $('#submenu_1').css({"top": ($('#menu_1').position().top + 83) + 'px'});
   // $('#submenu_2').css({"top": ($('#menu_2').position().top + 83) + 'px'});


    $('#menu_1').click(function () 
        {
            $('#submenu_1').slideToggle('fast');
            $('#submenu_2').slideUp('fast');
            
        });
        
    $('#menu_2').click(function () 
        {
            $('#submenu_1').slideUp('fast');
            $('#submenu_2').slideToggle('fast');
        });

    $('#menu_1').mouseleave( function () 
    {
        wdt_start();
    });

    $('#menu_1').mouseenter( function () 
    {
        wdt_clear();
    });

    $('#menu_2').mouseleave( function () 
    {
        wdt_start();
    });

    $('#menu_2').mouseenter( function () 
    {
        wdt_clear();
    });


   $('div.menu_head_off')
	    .css( {backgroundPosition: "0 -60px"} )
	    .mouseover(function(){
		    $(this).stop().animate(
			    {backgroundPosition:"(0 0px)"}, 
			    {duration:200})
		    })
	    .mouseout(function(){
		    $(this).stop().animate(
			    {backgroundPosition:"(0 -60px)"}, 
			    {duration:150})
		    })

     $('ul.menu_body li')
	    .mouseover(function(){
		    $(this).stop().animate(
			    {backgroundColor:"#db4e1b"}, 
			    {duration:200})
		    })
	    .mouseout(function(){
		    $(this).stop().animate(
			    {backgroundColor:"#810E17"}, 
			    {duration:150})
		    })  

     $('ul.menu_body li.alt')
	    .mouseover(function(){
		    $(this).stop().animate(
			    {backgroundColor:"#db4e1b"}, 
			    {duration:200})
		    })
	    .mouseout(function(){
		    $(this).stop().animate(
			    {backgroundColor:"#700C13"}, 
			    {duration:150})
		    })  

		$( "#accordion" ).accordion({
			autoHeight: false,
			navigation: true
		});
		
});

var wdt;

function wdt_start()
{
    clearTimeout(wdt);
    wdt = setTimeout('wdt_reset()', 500);
}

function wdt_clear()
{
    clearTimeout(wdt);
}

function wdt_reset()
{
    $('#submenu_1').slideUp('fast');
    $('#submenu_2').slideUp('fast');
}



