$(document).ready(function() {
//Texto Search	
$('.screen-reader-text').css('display' , 'none');
jQuery("#s").each(function(e) {
	jQuery(this).attr("value", jQuery(this).prev("label").text());
	jQuery(this).focus(function() {
		if( jQuery(this).prev("label").text() == jQuery(this).attr("value") ) {
			jQuery(this).attr("value", "");
		}
	});
	jQuery(this).blur(function() {
		if( jQuery(this).attr("value") == "" )
			jQuery(this).attr("value", jQuery(this).prev("label").text());
	});
});


// Abre links com rel="external" em uma nova aba
$('a[rel=external]').attr('target','_blank');

//Lightbox
$("a[rel=lightbox]").fancybox({
	'speedIn'		:	600, 
	'speedOut'		:	200
});

//slider trabalhos recentes
$("#slider").easySlider({
	auto: true, 
	continuous: true,
	pause: 10000,
	speed: 800
});

//Accordion
$('.detalhes_vagas').click(function(){
	$(this).parent().find('div.accordion').slideToggle("slow");
	$(this).parent().find('.detalhes_vagas').toggleClass('menos');
});

// Twitter
$("#twitter").getTwitter({
	userName: "@commquest_",
	numTweets: 5,
	loaderText: "Carregando tweets...",
	slideIn: true,
	showHeading: false,
	headingText: "Últimos Tweets",
	showProfileLink: false
});

// tabs socios
  $('.aba').css('display', 'none')
    

  $('li', $('#nav')).click(function() {
    
	var i = $('li', $('#nav')).index(this) + 1;
      
	  $(this).parents('#container_abas')
	  .children('.aba:visible').hide();
      
	  $('#aba' + i).show();
      
	  $(this).parents('#nav').find('li').removeClass('corrente');
      
	  $(this).addClass('corrente');
  })

});
