$(document).ready(function(){
	
	$(".topnav li")
	.mouseover(function(){
		if($(this).is(".active")){
			$("li.active").stop().animate({
				width: "220px"
			}, 500)
		} else {
			$("li.active").stop().animate({
				width: "120px"
			}, 500)
		}
		$(this).stop().animate({
			width: "220px"
		}, 500)
		
		
	})
	.mouseout(function() {
		$(this).stop().animate({
			width: "119px"
		}, 500)
		$("li.active").stop().animate({
			width: "220px"
		}, 500)
	});
	
	$("#search").hide();
	$("#cats").hide();
	

  $(".hidden,.visible").click(function(event){  
    if ($(this).hasClass('hidden')){
      $(this).removeClass('hidden')
      $(this).addClass('visible');
    } else {
      $(this).removeClass('visible')
      $(this).addClass('hidden');
    }
    $(this).parent().next().slideToggle();
    
    return false;
  });

	$("#accordion dd:not(:first)").hide();
	$("#accordion dt").click(function(){
		$("#accordion dd:visible").slideUp("slow");
		$(this).next().slideDown("slow");
		return false;
	});

	$("#section-menu dd:not(:first)").hide();
	$("#section-menu dt").click(function(){
		$("#section-menu dd:visible").slideUp("slow");
		$(this).next().slideDown("slow");
		return false;
	});


});   
