//MENU SCRIPT
function centermenu(){
	jQuery("#navigation ul li").mouseover(function() {
		var the_width = jQuery(this).find("a").width();
		var child_width = jQuery(this).find("ul").width();
		var width = parseInt((child_width - the_width)/2);
		
		var the_paddingLeft = jQuery(this).find("a").css('padding-left');
		var the_paddingLeft = parseInt(the_paddingLeft.replace('px',''));
		
		jQuery(this).find("ul").css('left', -width + the_paddingLeft);
//	alert('a=>' + the_width + ', ul=> '+ child_width + ', (child_width - the_width)/2 =>'+ (child_width - the_width)/2 +', width=> ' + width + ', -width + the_paddingLeft' + (-width + the_paddingLeft))
	//	url = ($(this).find("#Buscador").val().replace(' ','+')); 
	});
}
jQuery(document).ready(function(){
	centermenu();
});

function mainmenu(){
jQuery(" #navigation ul ul ").css({display: "none"}); // Opera Fix
jQuery(" #navigation li").hover(function(){
	jQuery('ul li:first-child', this).before(
		'<li class="arrow">arrow</li>'
	);
	jQuery('ul li.arrow', this).css('border-bottom', '0');
		jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).stop('true', 'true').slideDown(200);
		},function(){
		jQuery(this).find('ul:first').slideUp("fast");
		});
}

 jQuery(document).ready(function(){
	mainmenu();
});
