$(document).ready(function() {
//Accordion
   	//Set default open/close settings
	$('.accordion div').hide(); //Hide/close all containers
	$('.accordion h3').css('cursor','pointer'); //Change the cursor
	
	//On Click
	$('.accordion h3').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.accordion h3').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container		
		}
		return false; //Prevent the browser jump to the link anchor
	});
	
});

//menu
$(function(){

    $("ul#listMenuRoot li").hover(function(){
        $(this).addClass("hover");
        $('ul:first',this).css('top', '0px');
    
    }, function(){
        $(this).removeClass("hover");
        $('ul:first',this).css('top', '-999em');
    });
    
    $("ul#listMenuRoot li ul li:has(ul)").find("a:first").append(" &raquo; ");

});
