$(document).ready(function(){

//carousel
	jQuery(".jCarouselLite").jCarouselLite({
		btnNext: "a.proximo",
		btnPrev: "a.anterior",
		visible: 3,
		circular:false,
		speed: 500
	});
	jQuery("a.anterior").addClass("disabled"); 
	jQuery('.item_carousel').click(function(){ 
		jQuery('.item_carousel').removeClass("item_carousel_ativo");
		jQuery('#'+this.id).addClass("item_carousel_ativo"); 
	});

//

// ad
	$tabs = jQuery("#tab > ul")
//	.tabs({ fx: [null, { width: 'show' }] })
//	.tabs({ fx: { opacity: 'toggle', duration: 'fast' } })
//	.tabs({ fx: { width: 'toggle',  opacity: 'toggle',  duration: 'fast' } })
	.tabs({ fx: { opacity: 'toggle',  duration: 'fast' } })	
  
	//.tabs("rotate", 5000)
	.parent()
	//.mouseover(function (){jQuery(this).find("> ul").tabs("rotate", null)})
	//.mouseout(function (){jQuery(this).find("> ul").tabs("rotate", 5000)});
	var a;
	var b;
	var c;
	var clear1;
	var clear2;
	var clear3;
	
	aba1 = function() {
		$('.aba1').click();
		//a = setTimeout(aba2,20000);
	}
	
	aba2 = function() {
		$('.aba2').click();
		b = setTimeout(aba3,5000);
	}
	
	aba3 = function() {
		$('.aba3').click();
		c = setTimeout(aba1,5000);
	}
	
	aba1();
	
		$('.aba1').click(function() {
			//clear1 = setTimeout(aba2,20000);
			clearTimeout(a);
			clearTimeout(b);
			clearTimeout(c);
			clearTimeout(clear2);
			clearTimeout(clear3);
		});	
		
		$('.aba2').click(function() {
			clear2 = setTimeout(aba3,5000);
			clearTimeout(a);
			clearTimeout(b);
			clearTimeout(c);
			clearTimeout(clear1);
			clearTimeout(clear3);
		});	
		
		$('.aba3').click(function() {
			clear3 = setTimeout(aba1,5000);
			clearTimeout(a);
			clearTimeout(b);
			clearTimeout(c);
			clearTimeout(clear1);
			clearTimeout(clear2);
		});	
	
});