/*
 *Arquivo para execução dos scripts
*/

$(document).ready(function(){
	
	$('#mainBanner').css("visibility","visible");
	/*Configura o Label dos Forms*/

	$('input, textarea').focus(function(){
		defaultVal = $(this).attr('value');
		value = $(this).val();
 		if((value=='') || (value==defaultVal) && value != 'enviar'){
 			$(this).val('');
		}
 	}).blur(function(){
		if($(this).val()==''){
		  $(this).val(defaultVal);
		}
	});

	$('.senha').focus(function(){
		$(this).hide();
		$(this).next().show();
	});

	$('.itemFilhoTitle').click(function(){
		$(this).siblings().slideToggle('fast');
	});

	$('#slider1').anythingSlider({
		width          : 622,
		height         : 188,
		startStopped   : false,
		toggleControls : false,
		theme          : 'metallic',
		animationTime  : 900,
		delay          : 5000,
		easing         : 'easeInOutExpo'
	});

	//TWITTER
	if ( $("#tweet-container").length ) {
		
		getTwitters('tweet-container', { 
		  id: 'classicseguros', 
		  clearContents: true, 
		  count: 4, 
		  withFriends: true,
		  ignoreReplies: false,
		  template: '<span class="prefix"><img height="16" width="16" src="%user_profile_image_url%" /> <a href="http://twitter.com/%user_screen_name%">%user_name%</a> disse: </span> <span class="status">"%text%"</span> <span class="time"><a href="http://twitter.com/%user_screen_name%/statuses/%id%">%time%</a></span>'
	  });
	}

});


/*Execute Cufon*/
Cufon.set('fontFamily', 'PetitaMedium').replace('#mainMenu, #footer, .coluna h3, #chamada h2, #miolo h1, #parceiros, #titleEtica, #cidadaTilteInt' );
Cufon.set('fontFamily', 'PetitaBold').replace('#footer strong');
Cufon.set('fontFamily', 'Segoe Print').replace('.coluna h3 strong, .esqueci_link, .fontSegoe');
Cufon.set('fontFamily', 'PetitaLight').replace('#barraTopo, #tituloYoutube');


function changeImg(id)
{
	if(document.getElementById('content' + id).style.display == 'none' || document.getElementById('content' + id).style.display == '')
	{
		document.getElementById('img' + id).src = 'images/menos.png';
	}
	else
	{
	    document.getElementById('img' + id).src = 'images/mais.png';
	}
}
