/*
	Necessidades no Desenvolvimento - Lista de funções para melhor desempenho
	
	Autor: Felipe Volpatto
	E-mail: felipevolpatto@gmail.com
	
	Copyright 2010

*/

jQuery(document).ready(function()
{	
	jQuery.noConflict()
	
	Shadowbox.init();

	jQuery('input, select, textarea').not('#file-original').each(function()
	{
		jQuery(this).focus(function()
		{
			jQuery(this).fadeTo("slow", 0.7);
			jQuery(this).css('background-color','#FAFAFA');
			
		});
		
		jQuery(this).blur(function()
		{
			jQuery(this).fadeTo("slow", 1);
			jQuery(this).css('background-color','#FFF');
		});
	});
	
	var altura = jQuery("#global").height();
	
	function fadeIcon(id)
	{
		var a = jQuery(id);
		
		a.hover(function()
		{
			a.fadeTo("fast", 0.70);
		});
		
		a.mouseout(function()
		{
			a.fadeTo("faast", 1);
		});		
	};
	
	function ajustarAltura(ajustada, referencia)
	{
		var conteudo = jQuery(ajustada);
		var referencia = jQuery(referencia).height();
		
		var altura = 700 + referencia +"px";
		conteudo.css("height", altura);
	}
	
	//ajustarAltura("#conteudo", "#imagens");
	
	fadeIcon("#chat");
	fadeIcon("#dicas");
	fadeIcon("#mont_academia");
	
});
