$(document).ready(function(){
		$('#menu').menuBHSITE();				   
			
});

jQuery.fn.menuBHSITE = function(){

$zPadrao = 99999;
$cDiv = 0;
				
$c = $(this).css('margin','0').css('padding','0').children();
				
$zPadrao = $zPadrao + $c.length;
$dV = $(document).width();
				
$c.each(function(){
											  
$(this).css('list-style','none').css('margin','0').addClass("menu_topic");
$(this).children().eq(0).addClass("menu_item");												  
											  
$son = $(this).children().eq(0);
$son.css("z-index",$zPadrao--);
											  
$w = $son.width()+6;
	
$tW = this.clientWidth;
											  
if($w > $tW){
$w = $tW;
}
											  
											  
											
												
$divC = $("<div></div>").css({
"width":$w,
"height":3,
"position":"absolute",
"top":49,
"left":"0",
"background-color":"white",
"display":"none",
"z-index":$zPadrao+2,
"overflow":"hidden"
}).html("&nbsp;").attr("id","divLinha"+$cDiv).appendTo(this);


$oL = $(this).offset();
$oL = $oL.left;
											  
$dW = $son.width();
											  
if(($oL+$dW) > $dV){
$son.css("left",$(this).width()+19-$dW);
}
	
$(this).hover(
function(){
$(this).children().eq(0).css('display','block');
$(this).children().eq(1).css('display','block');
$(this).css('border','1px solid black');
},
function(){
$(this).children().eq(0).css('display','none');
$(this).children().eq(1).css('display','none');
$(this).css('border','1px solid white');																
});

$cDiv++;

});

};
