$(document).ready(function(){
	$(".btn-slide").mouseover(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
});

$(document).ready(function() {
  //Get all the LI from the #tabMenu UL
  $('#showTab > li').click(function(){
    //remove the selected class from all LI
    $('#showTab > li').removeClass('selected');
    //Reassign the LI
    $(this).addClass('selected');
    //Hide all the DIV in .boxBody
    $('.content div').slideUp('1500');
    //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
    $('.content div:eq(' + $('#showTab > li').index(this) + ')').slideDown('1500');
  }).mouseover(function() {
    //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest
    $(this).addClass('mouseover');
    $(this).removeClass('mouseout');
  }).mouseout(function() {
    //Add and remove class
    $(this).addClass('mouseout');
    $(this).removeClass('mouseover');
  });
  //Mouseover with animate Effect for Category menu list
  $('.content #category li').mouseover(function() {
    //Change background color and animate the padding
    $(this).css('backgroundColor','#888');
    $(this).children().animate({paddingLeft:"20px"}, {queue:false, duration:300});
  }).mouseout(function() {
    //Change background color and animate the padding
    $(this).css('backgroundColor','');
    $(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300});
  });
});

//部分函数开始
function g(o) {
	return document.getElementById (o);
}
function Nav(m,items,t,n){
//参数：菜单ID、项目ID、总数量(含0)、当前数
	g(m+n).className = "sele";
	g(items+n).style.display="block";
	for(i=0;i<=t;i++){
		if (i!=n){
			g(items+i).style.display="none";
			g(m+i).className = "";
		}
	}
}
function cm(n) {
	for(var i=1;i<=5;i++) {
		if (g('menu_'+i)) 
		{
		g('menu_'+i).className='menu_index';
		g('cont_'+i).style.display='none';
		}
	}
	var e=g('menu_'+n);
	e.className='currentmenu';
	g('cont_'+n).style.display='';
	
}
function cm2(n2) {
	for(var i=1;i<=3;i++) {
		if (g('menu2_'+i)) 
		{
		g('menu2_'+i).className='menu2_index';
		g('cont2_'+i).style.display='none';
		}
	}
	var e=g('menu2_'+n2);
	e.className='currentmenu2';
	g('cont2_'+n2).style.display='';
	
}

