$(document).ready(function() {

	// Abrir e fechar o box de informacoes
	$('.openclose').click(function() {
		$("#sobre").slideUp("slow");
		$.cookie('txtinfo', 'fechado');
	});
	var janela = $.cookie('txtinfo');
		if (janela == 'fechado') {
			$("#sobre").hide();
			$('.openclose').click(function() {
				$("#sobre").slideDown("slow");
				$.cookie('txtinfo', 'aberto');
			});
		};
		if (janela == 'aberto') {
			$("#sobre").show();
		};

	// Home: revela data dos jogos
	$('.jogos li').hover(
		function() {
			$(this).addClass('mostradata');
			$('.mostradata .data').fadeIn("");
	},
		function() {
			$('.jogos li .data').fadeOut("");
			$(this).removeClass('mostradata');
	});


	// Comunidade: Box de informacoes
	$('.com_info').pngFix();
	$('.com_info').hover(
		function() {
			$(this).addClass('mostrabox');
			$('.mostrabox .com_box').show("fast");
	},
		function() {
			$('.mostrabox .com_box').fadeOut("slow");
			$(this).removeClass('mostrabox');
	});


	// Contato: CSS do menu drop down
	$("#txtAssunto").selectbox({debug: true});

	// Contato: Revela campo Outros
	$("#txtAssunto_input_outros").click(function() {
		$("#outrosDiv").slideDown("slow");
		$("#txtOutros").fadeIn("slow");
	});

	// Contato: Oculta campo Outros
	$("#txtAssunto_input_sugestao, #txtAssunto_input_critica, #txtAssunto_input_reclamacao").click(function() {
		$("#txtOutros").fadeOut("slow");
		$("#outrosDiv").slideUp("slow");
	});




	// PNG fix Internet Explorer 6
	$(document).pngFix();

});