/**
 * JavaScript utilities for implementation of the global site menu.
 *
 * @package    ajemian
 * @subpackage javascript
 * @author     David Daniell / Tinynumbers <info@tinynumbers.com>
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */

var menuNormalBgColor = "#fff";
var menuNormalFgColor = "#177899";
var menuHiliteBgColor = "#e2bfd1";
var menuHiliteFgColor = "#000";

$(function(){

    $("ul.menu li").hover(function(){
        $(this).children("a,span.hover-menu").animate({
            backgroundColor: menuHiliteBgColor,
            color: menuHiliteFgColor
        }, "fast" );
        $('ul:first', this).fadeIn("fast");
        $(this).next('ul').fadeIn("fast");
    }, function() {
        $(this).children("a,span.hover-menu").animate({
            backgroundColor: menuNormalBgColor,
            color: menuNormalFgColor
        }, "slow" );
        $('ul:first', this).fadeOut("fast");
        $(this).next('ul').fadeOut("fast");
    });

    $("ul.menu li ul li:has(ul)").find("a:first").append(" &raquo; ");
});

