function escondePop(elemento){
	jQuery(".pop").hide();
}

function mostraPop(elemento){
	escondePop();
	elemento.next(".pop").show();		
}

jQuery(document).ready(function() {

	jQuery("#menu li").hover(function() {	
		jQuery('a:first',this).addClass("active");
		jQuery('.submenu',this).show();		
	}, function() {	
		jQuery('a:first',this).removeClass("active");
		jQuery('.submenu',this).hide();
		
	});
	
	jQuery("#conteudo a[name]").html("&nbsp;").addClass("ancora");
	
	// Pop-rss
	
	jQuery(".rss").click(function() {
		jQuery("#pop").fadeIn("slow");
	});
		
		jQuery("a.close").click(function() {
			jQuery("#pop").fadeOut("slow");
		});

	jQuery(".search input")
	.val("Busca")
	.click(function() {
		if (
			jQuery(this).val() == "Busca") {
			jQuery(this).val("");
		}
	});
	
	jQuery(".search input")
	.val("Busca")
	.blur(function() {
		jQuery(this).val("Busca");        
    });
	
	jQuery(".ver").click(function(e) {
		mostraPop(jQuery(this));
		return false;
	});
	
	jQuery(".pop").hover(function() {	
		jQuery(this).show();
	}, function() {	
		jQuery(this).hide();
	});
	
	jQuery(".tip")
	.click(function(e) {
		jQuery("#box-acesso, #box-homes").hide();
		return false;
	});
	
	
	// Pop-rss	
	jQuery(".btn_rss").click(function(e) {
		jQuery("#pop").fadeIn("slow");
		if (jQuery(this).parent().attr("class") != "rss")  {
			e.preventDefault();
		}
	});
	
	jQuery("#pop a.close").click(function(e) {
		jQuery("#pop").fadeOut("slow");
		e.preventDefault();
	});


});
