/*

 * Document of functions for all the site

 * http://henriquearaujo.com.br

 *

 * All site under Creative Commons (cc) by-nc-sa 3.0 license 2010-2011  Henrique Araujo

 * http://creativecommons.org/licenses/by-nc-sa/3.0/br/

 */

        

                    

$(document).ready(function() {

	

	/*

	Rolagens

	*/

	

	$('#bt-play').click(function() {

		var elementClicked = $(this).attr("href");

		var destination = $(elementClicked).offset().top;

		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-1}, 400 );

		return false;

	});

	

	

	$('.bt-topo').click(function() {

		var elementClicked = $(this).attr("href");

		var destination = $(elementClicked).offset().top;

		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-1}, 400 );

		return false;

	});

	

	

	$('#bt-sobre').click(function() {

		var elementClicked = $(this).attr("href");

		var destination = $(elementClicked).offset().top;

		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-1}, 400 );

		return false;

	});

	

	

	$('#bt-portfolio').click(function() {

		var elementClicked = $(this).attr("href");

		var destination = $(elementClicked).offset().top;

		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-1}, 400 );

		return false;

	});

	

	$('#bt-novidades').click(function() {

		var elementClicked = $(this).attr("href");

		var destination = $(elementClicked).offset().top;

		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-1}, 400 );

		return false;

	});

	

	

	/*

	balão para topo

	*/

	

	

	$('#bt-topo1').mouseover(function() {

		$('.containerBalao70px_1_1').fadeIn("fast");

		$('.containerBalao70px_1_2').fadeIn("fast");

		$('.containerBalao70px_1_2').css('top', '90px');

		$('.containerBalao70px_1_2').css('left', '40px');

		return true;

	});

	

	$('#bt-topo1').mouseout(function() {

		$('.containerBalao70px_1_1').fadeOut("slow");

		$('.containerBalao70px_1_2').fadeOut("fast");

		return true;

	});

	

	

	$('#bt-topo2').mouseover(function() {

		$('.containerBalao70px_2_1').fadeIn("fast");

		$('.containerBalao70px_2_2').fadeIn("fast");

		$('.containerBalao70px_2_2').css('top', '90px');

		$('.containerBalao70px_2_2').css('left', '40px');

		return true;

	});

	

	$('#bt-topo2').mouseout(function() {

		$('.containerBalao70px_2_1').fadeOut("slow");

		$('.containerBalao70px_2_2').fadeOut("fast");

		return true;

	});

	

	

	

	/*

	balões das redes sociais

	*/

	

	

	$('#bt-twitter').mouseover(function() {
		$('.containerTwitter_1').fadeIn("fast");
		$('.containerTwitter_2').fadeIn("fast");
		$('.containerTwitter_2').css('top', '1px');
		$('.containerTwitter_2').css('left', '4px');

		return true;

	});

	

	$('#bt-twitter').mouseout(function() {
		$('.containerTwitter_1').fadeOut("slow");
		$('.containerTwitter_2').fadeOut("fast");
		return true;
	});

	

	$('#bt-linkedin').mouseover(function() {
		$('.containerLinkedin_1').fadeIn("fast");
		$('.containerLinkedin_2').fadeIn("fast");
		$('.containerLinkedin_2').css('top', '1px');
		$('.containerLinkedin_2').css('left', '65px');
		return true;

	});

	

	$('#bt-linkedin').mouseout(function() {
		$('.containerLinkedin_1').fadeOut("slow");
		$('.containerLinkedin_2').fadeOut("fast");
		return true;
	});

	

	$('#bt-facebook').mouseover(function() {
		$('.containerFacebook_1').fadeIn("fast");
		$('.containerFacebook_2').fadeIn("fast");
		$('.containerFacebook_2').css('top', '1px');
		$('.containerFacebook_2').css('left', '125px');
		return true;
	});

	

	$('#bt-facebook').mouseout(function() {
		$('.containerFacebook_1').fadeOut("slow");
		$('.containerFacebook_2').fadeOut("fast");

		return true;

	});

	
	

	/* detalhes do portfolio */

	

	$('#item-cep').mouseover(function() {
		$('#detalhe-cep').fadeIn("fast");
		return false;
	});

	

	$('#item-cep').mouseleave(function() {
		$('#detalhe-cep').fadeOut("slow");
		return false;
	});

	


	

	$('#item-roteirocerto').mouseover(function() {
		$('#detalhe-roteirocerto').fadeIn("fast");
		return false;
	});

	

	$('#item-roteirocerto').mouseleave(function() {
		$('#detalhe-roteirocerto').fadeOut("slow");
		return false;
	});

	

	

	

	$('#item-compralegal').mouseover(function() {
		$('#detalhe-compralegal').fadeIn("fast");
		return false;
	});

	

	$('#item-compralegal').mouseleave(function() {
		$('#detalhe-compralegal').fadeOut("slow");
		return false;
	});

	

	

	

	$('#item-cep').mouseover(function() {
		$('#detalhe-cep').fadeIn("fast");
		return false;
	});

	

	$('#item-cep').mouseleave(function() {
		$('#detalhe-cep').fadeOut("slow");
		return false;
	});

	

	

	

	

	$('#item-brasilid').mouseover(function() {
		$('#detalhe-brasilid').fadeIn("fast");
		return false;
	});

	

	$('#item-brasilid').mouseleave(function() {
		$('#detalhe-brasilid').fadeOut("slow");
		return false;
	});

	

	

	

	$('#item-secat').mouseover(function() {
		$('#detalhe-secat').fadeIn("fast");
		return false;
	});

	

	$('#item-secat').mouseleave(function() {
		$('#detalhe-secat').fadeOut("slow");
		return false;
	});

	

	$('#item-neprom').mouseover(function() {
		$('#detalhe-neprom').fadeIn("fast");
		return false;
	});

	

	$('#item-neprom').mouseleave(function() {
		$('#detalhe-neprom').fadeOut("slow");
		return false;
	});

	
	
	/* Diálogos */

	
	$('#bt-en').click(function() {
		$('.containerBalaoDialogo1').fadeIn("fast");
		$('.containerBalaoDialogo2').fadeIn("fast");
		$('.balaoDialogo').css('padding-top', '120px');
		$(".balaoDialogo").text("Don't worry! The english version is coming as soon as possible!");
		return true;
	});

	

	$('#bt-en').mouseleave(function() {
		$('.containerBalaoDialogo1').fadeOut("slow");
		$('.containerBalaoDialogo2').fadeOut("slow");
		$(".balaoDialogo").text("");
		return true;
	});

	
	/*
	topo - ver e-mail
	*/
	
	$('#veremail').click(function() {
		$('#veremail').hide();
		$('#email').fadeIn("slow");
	});

});

 

 

/* tornando a fonte Aharoni sutil */

Cufon.replace('section#cabeca section#intro section#texto .fonte76px, section#cabeca section#intro  section#texto .fonte50px, section#cabeca section#intro  section#texto .fonte40px, section#cabeca section#intro  section#texto .fonte30px, section#noticias ul li div.data, section#portfolio ul li details h1.titulo-detalhes', { fontFamily: 'Aharoni' });



/*tornando somente a fonte do Menu pois o IE não enxerga a fonte Aharoni */

if (navigator.appName == "Microsoft Internet Explorer" || navigator.appName == "Netscape") {

Cufon.replace('section#cabeca section#intro  nav#menu ol li', { fontFamily: 'Aharoni' });

}



Cufon.replace('section#cabeca section#intro  section#texto section#boasvindas, section#portfolio ul li details p, footer', { fontFamily: 'Georgia' });



	
