$(function() {

	

	// LINKS EXTERNOS
	$("a[rel=external]").attr('target','_blank');
	$("a[rel=external nofollow]").attr('target','_blank');
	$("a[rel=nofollow external]").attr('target','_blank');
	$("input[type=submit]").css("cursor","pointer");
	$("input[type=button]").css("cursor","pointer");
	
	
	
	$('.vid > div').bind("click",function(){
		
		var elem = $(this);
		
		// data('flipped') is a flag we set when we flip the element:
		
		if(elem.data('flipped'))
		{
			// If the element has already been flipped, use the revertFlip method
			// defined by the plug-in to revert to the default state automatically:
			
			elem.revertFlip();
			
			// Unsetting the flag:
			elem.data('flipped',false)
		}
		else
		{
			// Using the flip method defined by the plugin:
			
			elem.flip({
				direction:'lr',
				speed: 350,
				color: '#222',
				onBefore: function(){
					// Insert the contents of the .sponsorData div (hidden from view with display:none)
					// into the clicked .sponsorFlip div before the flipping animation starts:
					
					elem.html(elem.siblings('.desc-video').html());
				}
			});
			
			// Setting the flag:
			elem.data('flipped',true);
		}
	});
	
	
	var slider = $('.hold-slider-diretores').bxSlider({
            controls: false,
            displaySlideQty: 3,
            moveSlideQty: 3 
        });
            
        $('.seta-esq').click(function() {
            slider.goToPreviousSlide();
            return false;
        });
        
        $('.seta-dir').click(function() {
            slider.goToNextSlide();
            return false;
        });
        

	
});
