/* ================================================================
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
=================================================================== */

$(document).ready(function(){
        
	
	// When a link is clicked
    $("a.tab").click(function () {	
			
	// switch all tabs off
	$(".active").removeClass("active");
			
	// switch this tab on
	$(this).addClass("active");
			
	// slide all content up
	$(".content").slideUp();
			
	// slide this content up
	var content_show = $(this).attr("alt");
	$("#"+content_show).slideDown();
		  
    });
	
	
    if($("#nav")) {
	$("#nav dd").hide();
	$("#nav dt b").click(function() {
	    if(this.className.indexOf("clicked") != -1) {
		$(this).parent().next().slideUp(200);
		$(this).removeClass("clicked");
	    }
	    else {
		$("#nav dt b").removeClass();
		$(this).addClass("clicked");
		$("#nav dd:visible").slideUp(200);
		$(this).parent().next().slideDown(500);
	    }
	    return false;
	});
    }

    //To switch directions up/down and left/right just place a "-" in front of the top/left attribute

    //Full Caption Sliding (Hidden to Visible)
    $('.boxgrid.captionfull').hover(function(){
	$(".cover", this).stop().animate({
	    top:'13px'
	},{
	    queue:false,
	    duration:160
	});
    }, function() {
	$(".cover", this).stop().animate({
	    top:'90px'
	},{
	    queue:false,
	    duration:160
	});
    });

    

    $('.slideshow').cycle({
	fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });

    $("div .foto_eventos a").fancybox({
	'overlayShow'                       : false,
	'zoomSpeedIn'			: 600,
	'zoomSpeedOut'			: 500,
	'easingIn'				: 'easeOutBack',
	'easingOut'				: 'easeInBack'
    });


    $(".fade").fadeTo("slow", 0.8);

    $("div .foto_eventos").hover(function(){
	$(".fade", this).fadeTo("slow", 1.0); // This sets the opacity to 100% on hover
    },function(){
	$(".fade", this).fadeTo("slow", 0.8); // This sets the opacity back to 60% on mouseout
    });
    
    $("div .enquete a").fancybox({
	'overlayShow'                       : false,
	'zoomSpeedIn'			: 600,
	'zoomSpeedOut'			: 500,
	'easingIn'				: 'easeOutBack',
	'easingOut'				: 'easeInBack'
    });
    
    	
    
});

$(function() {

$('.canto1').corner();
    
$('.menu').corner();

});


function apaga_texto($id){
    document.getElementById($id).value='';
}
