/*
	Main
	15/08/2007 por Rafael Gomes Alcantara
	Email: rafael.gomes@ithink.com.br
	iThink Professional Services
	www.ithink.com.br
*/

jQuery.noConflict();
var $j = jQuery;

var windowHeight = 0;
var windowWidth = 0;

$j(document).ready(function(){
	 //Pop Concurso 

	 $j(".btnConcurso").css("cursor", "pointer");
	 $j(".btnConcurso").click(function(){
	 	window.scrollTo(0,0);
	 	var pop = $j("#"+$j(this).data().pop);
		var popBox = pop.find(".popBox");
	 	$j("html").css("overflow", "hidden");
		$j("html").css("overflow-y", "hidden");
		pop.show();
		windowHeight = pop.find(".fundoPreto").height();
		windowWidth = pop.find(".fundoPreto").width();
		//
		popBox.css("top", (windowHeight/2)-(popBox.height()/2) );
		popBox.css("left", (windowWidth/2)-(popBox.width()/2) );
	 });	 
	 $j(".btnFecharPop").css("cursor", "pointer");
	 $j(".btnFecharPop").click(function(){
	 	$j("html").css("overflow", "auto");
		$j("html").css("overflow-y", "scroll");
		$j(this).parent().parent().parent().hide();
	 });

	// Funções de show hide
	
	//
	
	
	$(".box-projetos a,.box-modal a.btn-fechar").each(function() { 
		$(this).attr('href','javascript:void(0);')

	 });
	$(".box-projetos a.mais-detalhes").click(function () {
		$(this).hide()
		$(this).parent().parent().children(".conteudo").slideDown()
		$(".box-projetos a.fechar").show()								
    });
	$(".box-projetos .conteudo a.fechar").click(function () {
		$(this).hide();
		$(this).parent().parent().children("p").children("a.mais-detalhes").show();
		$(this).parent().parent().children(".conteudo").slideUp();
    });
	$(".box-projetos input.btn-votar").click(function () {
		$('body').children().children(".box-modal.confirma").show();
	});
	$(".box-modal a.btn-fechar,.box-modal input.btn-fechar").click(function () {
		$(this).parent().hide();
	});
	
	
	
	
});

function ajaxTeste () {
$.ajax({
  url: "test.html",
  cache: false,
  success: function(html){
    $("#results").append(html);
  }
});
	
}




	
