// JavaScript Document
$(window).load(function() {
    $('#slider').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
        slices:15,
        animSpeed:500, //Slide transition speed
        pauseTime:3000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:false, //Next & Prev
        directionNavHide:false, //Only show on hover
        controlNav:false, //1,2,3...        keyboardNav:false, //Use left & right arrows
        pauseOnHover:false, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.8 //Universal caption opacity
	});
});
$(document).ready(function(){
	$('.menuLeft ul li').click(function(){
		var child = this.childNodes[1];
		var origvisibility = $(this.childNodes[1]).css("display");
		
		$('.menuLeft ul li').each(function(){
			$(this.childNodes[1]).css("display", "none");
			$(this).css('height', 19);
		})
		
		$(this.childNodes[1]).css("display", origvisibility);
		
		if($(this.childNodes[1]).css("display") == "none")
		{
			$(this.childNodes[1]).css("display", "block");
			$(this).css('height', 21 + this.childNodes[1].children.length * 15);
		}
		else
		{
			$(this.childNodes[1]).css("display", "none");
			$(this).css('height', 19);
		}
	});
});
