function makeSublist(parent, child, isSubselectOptional, childVal) {
	$("body").append("<select style='display:none' id='"+parent+child+"'></select>");
	$('#'+parent+child).html($("#"+child+" option"));
	
		var parentValue = $('#'+parent).attr('value');
		$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());
	
	childVal = (typeof childVal == "undefined")? "" : childVal ;
	$("#"+child+' option[value="'+ childVal +'"]').attr('selected','selected');
	
	$('#'+parent).change( 
		function() {
			var parentValue = $('#'+parent).attr('value');
			$('#'+child).html($("#"+parent+child+" .sub_"+parentValue).clone());
			if(isSubselectOptional) {
				$('#'+child).prepend("<option value=''>--selecciona--</option>");
				$("#"+child+' option[value=""]').attr('selected','selected');
			}
			$('#'+child).trigger("change");
			$('#'+child).focus();
		}
	);
}

$().ready(function(){

/*	$('#nav ul li').each(function(){
		var texto = $(this).html();
		var inserta = '<span class="hover">' + texto + '</span>'
		$(this).append(inserta);
	});
	
	//$('#nav ul li').append('<span class="hover">ACEITE PARA MOTOR</span>');
	
	$('#nav ul li .hover').hover(
		function(){ 
			//$(this).stop(true).addClass('hover', 500);
			$(this).stop().animate({
				opacity: 1
			});
		},
   	function(){ 
			//$(this).stop(true).removeClass('hover', 500);
			$(this).stop().animate({
				opacity: 0
			});
		}
	);*/
	
	$("#nav li").click(function(){
		window.location = $(this).find("a").attr('href');
	});
		
});
