$(document).ready(function() {
	
	//$('#mycarousel').jcarousel();

	//When page loads...
	$(".tab_content2").hide(); //Hide all content
	$("ul.tabs2 li:first").addClass("active").show(); //Activate first tab
	$(".tab_content2:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs2 li").click(function() {

		$("ul.tabs2 li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content2").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
	


$('a.fechar').click(function() {
	//$('.tab_content2').hide;
	$("ul.tabs2 li").removeClass("active");
    $('.tab_content2').fadeOut();
	$('.tabs2').fadeOut();
    return false;

  });
	


/*HOVER NOTICIAS HOME*/


	//When page loads...
	$(".tab_content3").hide(); //Hide all content
	$("ul.tabs3 li:first").addClass("active2").show(); //Activate first tab
	$(".tab_content3:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs3 li").hover(function() {

		$("ul.tabs3 li").removeClass("active2"); //Remove any "active" class
		$(this).addClass("active2"); //Add "active" class to selected tab
		$(".tab_content3").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		
		$(activeTab).show();
		return false;
	});



  $('#example1').bxCarousel({
		display_num: 4,
		move: 2,
		prev_image: 'img/bt_prev.png',
		next_image: 'img/bt_next.png',
		//prev_text: 'prev',
		//next_text: 'next',
		margin: 1
	});

/*FUNC SHOW HIDE*/



$('a.fecharNot').click(function() {	
	$(".funNoti").hide();
    return false;

});

$('a.fecharEnquete').click(function() {	
	$(".funcEnquete").hide();
    return false;

});



$('a.fecharTv').click(function() {	
	$(".funcTv").hide();
		$('#example1').hide();
$('.bx_wrap').hide();
    return false;

});

$(".funNoti").show();
$(".funcEnquete").hide();
$(".funcTv").hide();
$('#example1').hide();
$('.bx_wrap').hide();


$('a.btNoticias').click(function() {	
	$(".funNoti").show();
	$(".funcEnquete").hide();
	$(".funcTv").hide();
		$('#example1').hide();
$('.bx_wrap').hide();
    //return false;

});
$('a.btEnquete').click(function() {	
	$(".funNoti").hide();
	$(".funcEnquete").show();
	$(".funcTv").hide();
	$('#example1').hide();
$('.bx_wrap').hide();
    //return false;

});
$('a.btFitTv').click(function() {	
	$(".funNoti").hide();
	$(".funcEnquete").hide();
	$(".funcTv").show();
$('#example1').show();
$('.bx_wrap').show();
    //return false;

});





});




