var setTabIndex = function(){
		$(".CurrentSlide").removeClass("CurrentSlide");
		$(".NavButtons").eq(parseInt($(".slide").tabSwitch('index'))).addClass("CurrentSlide");
}
var startAutoSwitch = function(){
	//Let the tab auto toggle
	$(".slide").tabSwitch('toggleAuto',{interval: 3500},function(){
		//Change the index number everytime it step
		setTabIndex();
	});
}
$(function(){
	$(".slide").tabSwitch('create',{type:"toggle", height: 263, width: 640});
	startAutoSwitch();
});

