$(document).ready(function(){
	
	//alinha o menu de topo à direita
	$("#opcoesMenu").css("left",714 - $("#opcoesMenu .jSubMenu").width());

	
	//esconde todos os que nao tenham no primeiro nivel no link a classe open
	$("#jMenu dt a:not(.open)").parent().next().hide();
	//$("#jMenu dd:not(:first)").hide();
	
	$("#jMenu dt a").click(function(){
	
		//se tiver submenu abre	
		if($(this).attr("href") != "#"){
			return true;	
		}else{
			//verifica se já nao esta aberto
			if($(this).parent().next().css("display") == "none"){
				$("dd:visible").hide();
				$("dt a:visible").removeClass("open");
				$(this).parent().next().fadeIn("fast");
				$(this).addClass("open");
			}
			return false;
		}
	});
});

$(document).ready(function(){
	//remove o fundo azul do pngs no ie 6
	//$.ifixpng('./imagens/v2/layout/pixel.gif');
	//$('img[@src$=.png]').ifixpng(); 
	
	$(".jSubMenu")
	.superfish({
		delay		: 100,
		speed		: "normal",
		animation:   {opacity:'show',height:'show'},
		dropShadows: true
	});
	
/*	.find(">li:has(ul)")
		.mouseover(function(){
			$("ul", this).bgIframe({opacity:false});
		})
		.find("a")
			.focus(function(){
				$("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
			});*/
});
