$(function(){
		/*
		* menu
		*/
		window.api = $(".tabs-1-trigger").switchable(".tabs-1-panel", {
			triggers: "li.s",
			initIndex: null,
			api: true
		});
		$(".tabs-1-trigger > li.s, .tabs-1-panel").bind({
			"mouseenter": function() {
				clearTimeout(timer);
			},
			"mouseleave": function() {
				timer = setTimeout(function() {
					// 鼠标移出后返回默认激活项
					var index = api.getCfg().initIndex;
					api.move(index);
				}, 100);
			}
		});//end
		
		/*
		 轮播
		*/
		$("#slide-trigger").switchable("#slide-panel > div > a", {
			effect: "scroll",
			speed: .4,
			vertical: true
		}).autoplay(5).carousel();//end
		
		/*
		 滚动
		*/
		$("#scrollable-2-trigger").switchable("#scrollable-2-panel > ul > li", {
			effect: "scroll",
			steps: 2,
			visible: 2
		}).carousel();
		// 一个按钮控制Scrollable
		var api2 = $("#scrollable-2-trigger").switchable();
		$(".prev").click(function(){
			api2.prev();
			return false;
		});
		$(".next").click(function(){
			api2.next();
			return false;
		});
		
	});
	/*
	左侧菜单收缩展开效果
	
	$(document).ready(function(){
	   $(".sidebar h3").toggle(function(){
		 $(this).next(".c").animate({height: 'toggle', opacity: 'toggle'}, "slow");
		$(this).next(".c").prev().find('span').text('+');
	   },function(){
			 $(this).next(".c").animate({height: 'toggle', opacity: 'toggle'}, "slow");
			 $(this).next(".c").prev().find('span').text('-');
	   });
	});*/
