// JavaScript Document

/* ================================================================ 
Author : Richard Hernandez

Derived from work done by Stu Nicholls - stunicholls.com

=================================================================== */

function basicMenuStart()
{

    con = 28; /* height of li.sub */
    exp = 75; /* height of maximum sub lines * sub line height */
	$('.nojava').removeClass('nojava')
	$('#slide').css({"height": "336px"}); /*item height 28 times total items - 1 (total items = 13)*/
    //Get the number of items
    var n = $('.opened').find('.item').length + 1;
    animate (con * n,0); /* open section marked as open */
    checkState();
    $("#slide .sub").mouseover(function(){
        //if this section already open do nothing
        if(this.className.indexOf('opened') >= 0)
        {
                return;
        }
        //close any open sections and remove open marker class
        animate(con);
        $('.opened').removeClass('opened')
        //add marker class to current section
        $(this).addClass('opened');
        var n = $(this).find('.item').length + 1
        animate(con * n,500);
        
    });
	
}



function animate(sz,sp)
{
        $('.opened').animate({"height": sz + "px"}, sp);
}

function checkState()
{
        $('.active').css({"color": "#888","cursor" : "default"});
}




