
var indo = true;
var vindo = false;
var intervalos = 0;

$(document).ready(function(){
	/*$('#soccer_ball_container').ResetScroller({	velocity: 65, movetype: 'pingpong', direction: 'horizontal', startfrom: 'right', loop: 'infinite' });
	
	$('#soccer_ball').bind('bouncer', function(){
		$(this)
			.animate({top:0}, 500, 'linear')
			.animate({top:0}, 500, 'linear', function(){
				$('#soccer_ball').trigger('bouncer');
		});			
	}).trigger('bouncer');*/	
	
	
	$(window).bind("resize", function(){
		
		$("#nhFooter").css("width", $(window).width()+"px");
		$("#nhFooter").css("margin-left", "-"+($(window).width()/2)+"px");
		
	});
	
	
	
});


function querystringValue(name)
{
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return "";
	else
		return decodeURIComponent(results[1].replace(/\+/g, " "));
}

function openScreens(operacao){
	
	fullName2 = "div#";
	fullName2 += pnScreens[(operacao == "ahead" ? indiceEscolhido+1 : indiceEscolhido-1)];
	fullName3 = "div#"+pnScreens[indiceEscolhido];
	
	if(operacao == "ahead")
		indiceEscolhido++;
	else
		indiceEscolhido--;
	
	$(fullName3).css("display", "none");
	$(fullName2).css("display", "block");
	
	
/*	
	$(fullName3).fadeOut("fast", function(){
		$(fullName3).css("display", "none");
		//$(fullName2).fadeIn("slow");
		$(fullName2).css("display", "block");
	});	
*/	

	analisaBotoes();	
}

function analisaBotoes(){
	$("img#nhBtnAnterior").css("display", 
		((indiceEscolhido == 0) ? "none" : "block"));	
	$("img#nhBtnProximo").css("display", 
		((indiceEscolhido == pnScreens.length-1) ? "none" : "block"));
}

function overSubMenu(){
	$("#nhSubMenu").css("display", "block");
}

function outSubMenu(){
	$("#nhSubMenu").css("display", "none");
}

