$(document).ready(function () {
	// colores al 20%
	//$("#menuVertical .colormenu li:nth-child(1):first").css("background-color","#e3e6e4");
	//$("#menuVertical .colormenu li:nth-child(2):first").css("background-color","#f1eecf");
	//$("#menuVertical .colormenu li:nth-child(3):first").css("background-color","#ecebeb");
	//$("#menuVertical .colormenu li:nth-child(4):first").css("background-color","#efedf6");
	//$("#menuVertical .colormenu li:nth-child(5):first").css("background-color","#ffefe0");
	//$("#menuVertical .colormenu li:nth-child(6):first").css("background-color","#f3eee5");
	//$("#menuVertical .colormenu li:nth-child(7):first").css("background-color","#ede5e1");
	//$("#menuVertical .colormenu li:nth-child(8):first").css("background-color","#fce5e5");
	//$("#menuVertical .colormenu li:nth-child(9):first").css("background-color","#e9e3f0");
	$("#menuVertical .colormenu li").css("background-color","#eee");

	// colores al 100%
	$("#menuVertical .colormenu li.activo:nth-child(1)").css("background-color","#748077");
	$("#menuVertical .colormenu li.activo:nth-child(2)").css("background-color","#b8a80d");
	$("#menuVertical .colormenu li.activo:nth-child(3)").css("background-color","#899dd0");
	$("#menuVertical .colormenu li.activo:nth-child(4)").css("background-color","#a09d9b");
	$("#menuVertical .colormenu li.activo:nth-child(5)").css("background-color","#c1a87f");
	$("#menuVertical .colormenu li.activo:nth-child(6)").css("background-color","#fdaf64");
	$("#menuVertical .colormenu li.activo:nth-child(7)").css("background-color","#a88375");
	//$("#menuVertical .colormenu li:nth-child(8):first li.activo").css("background-color","#ea667b");
	//$("#menuVertical .colormenu li:nth-child(9):first li.activo").css("background-color","#9270ab");
	//$("#menuVertical .colormenu li.desplegado:nth-child(1):first:not(.desplegado .activo), #menuVertical .colormenu li.activo:nth-child(1):first:not(.desplegado .activo)").css("background-color","#748077");
	//$("#menuVertical .colormenu li.desplegado:nth-child(2):first:not(.desplegado .activo), #menuVertical .colormenu li.activo:nth-child(2):first:not(.desplegado .activo)").css("background-color","#b8a80d");
//	$("#menuVertical .colormenu li.desplegado:nth-child(3):first:not(.desplegado .activo), #menuVertical .colormenu li.activo:nth-child(3):first:not(.desplegado .activo)").css("background-color","#899dd0");
	//$("#menuVertical .colormenu li.activo:nth-child(4):first:not(.desplegado .activo)").css("background-color","#a09d9b");
//	$("#menuVertical .colormenu li.desplegado:nth-child(6):first, #menuVertical .colormenu li.activo:nth-child(6):first:not(.desplegado .activo)").css("background-color","#fdaf64");
//	$("#menuVertical .colormenu li.activo:nth-child(5):first:not(.desplegado .activo)").css("background-color","#c1a87f");
	//$("#menuVertical .colormenu li.desplegado:nth-child(7):first, #menuVertical .colormenu li.activo:nth-child(7):first:not(.desplegado .activo)").css("background-color","#a88375");
	//$("#menuVertical .colormenu li.desplegado:nth-child(8):first, #menuVertical .colormenu li.activo:nth-child(8):first:not(.desplegado .activo)").css("background-color","#ea667b");
	//$("#menuVertical .colormenu li.desplegado:nth-child(9):first, #menuVertical .colormenu li.activo:nth-child(9):first:not(.desplegado .activo)").css("background-color","#9270ab");
	
	
	$("#menuVertical .colormenu li:nth-child(1):first:not(.activo)").hover(
		function () {$(this).css("background-color","#748077");}, 
		function () {
			//$(this).css("background-color","#e3e6e4");
			$(this).css("background-color","#eee");});
	$("#menuVertical .colormenu li:nth-child(2):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#b8a80d");
		}, 
		function () {
			//$(this).css("background-color","#f1eecf");
			$(this).css("background-color","#eee");
		}
	);
	$("#menuVertical .colormenu li:nth-child(3):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#899dd0");
		}, 
		function () {
			//$(this).css("background-color","#efedf6");
			$(this).css("background-color","#eee");
		}
	);
	$("#menuVertical .colormenu li:nth-child(4):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#a09d9b");
		}, 
		function () {
			//$(this).css("background-color","#ecebeb");
			$(this).css("background-color","#eee");
		}
	);
	$("#menuVertical .colormenu li:nth-child(5):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#c1a87f");
		}, 
		function () {
			//$(this).css("background-color","#f3eee5");
			$(this).css("background-color","#eee");
		}
	);
	$("#menuVertical .colormenu li:nth-child(6):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#fdaf64");
		}, 
		function () {
			//$(this).css("background-color","#ffefe0");
			$(this).css("background-color","#eee");
		}
	);
		$("#menuVertical .colormenu li:nth-child(7):first:not(.activo)").hover(
		function () {
			$(this).css("background-color","#a88375");
		}, 
		function () {
			//$(this).css("background-color","#ede5e1");
			$(this).css("background-color","#eee");
		}
	);
	
// estilos submenu y subsubmenu
//$("#menuVertical .colormenu li:nth-child(6):first li").css("background-color","#f3eee5");	
//$("#menuVertical .colormenu li.desplegado:nth-child(6):first li li").css("background-color","#ffffff");
//$("#menuVertical .colormenu li.desplegado:nth-child(6):first li.desplegado, #menuVertical .colormenu li.desplegado:nth-child(6):first li.activo").css("background-color","#e0d3bf");	
//$("#menuVertical .colormenu li.desplegado:nth-child(6):first li li.desplegado, #menuVertical .colormenu li.desplegado:nth-child(6):first li li.activo").css("background-color","#f3eee5");

$("#contratosecreto").click (function() {$('#contrato_secreto').css("display","block");});
$("#contratosecreto2").click (function() {$('#contrato_secreto').css("display","none");
	$('#persona_fisica').css("display","none");
	$('#persona_juridica').css("display","none");
	
	$('input[name=pj_nombre_apellidos]').val('');
	$('input[name=pj_dni]').val('');
	$('input[name=pj_cargo]').val('');
	$('input[name=pj_empresa]').val('');
	$('input[name=pj_cif]').val('');
	$('input[name=pj_direccion]').val('');
	$('input[name=pj_codigo_postal]').val('');
	$('input[name=pj_pais]').val('');
	$('input[name=pj_provincia]').val('');
	$('input[name=pj_titulo_invencion]').val('');	
	$("input[name='pf_nombre_apellidos']").val('');
	$("input[name='pf_dni']").val('');
	$("input[name='pf_direccion']").val('');
	$("input[name='pf_codigo_postal']").val('');
	$("input[name='pf_pais']").val('');
	$("input[name='pf_provincia']").val('');
	$("input[name='pf_titulo_invencion']").val('');
 });

$("#personafisica").click (function() {$('#persona_fisica').css("display","block");
										$("#personajuridica2").attr('checked', true);
										$('#persona_juridica').css("display","none");
	
	$('input[name=pj_nombre_apellidos]').val('');
	$('input[name=pj_dni]').val('');
	$('input[name=pj_cargo]').val('');
	$('input[name=pj_empresa]').val('');
	$('input[name=pj_cif]').val('');
	$('input[name=pj_direccion]').val('');
	$('input[name=pj_codigo_postal]').val('');
	$('input[name=pj_pais]').val('');
	$('input[name=pj_provincia]').val('');
	$('input[name=pj_titulo_invencion]').val('');
																
																
																});
$("#personafisica2").click (function() {$('#persona_fisica').css("display","none");
	$("input[name='pf_nombre_apellidos']").val('');
	$("input[name='pf_dni']").val('');
	$("input[name='pf_direccion']").val('');
	$("input[name='pf_codigo_postal']").val('');
	$("input[name='pf_pais']").val('');
	$("input[name='pf_provincia']").val('');
	$("input[name='pf_titulo_invencion']").val('');});
$("#personajuridica").click (function() {$('#persona_juridica').css("display","block");
											$("#personafisica2").attr('checked', true);	
											$('#persona_fisica').css("display","none");
											$("input[name='pf_nombre_apellidos']").val('');
	$("input[name='pf_dni']").val('');
	$("input[name='pf_direccion']").val('');
	$("input[name='pf_codigo_postal']").val('');
	$("input[name='pf_pais']").val('');
	$("input[name='pf_provincia']").val('');
	$("input[name='pf_titulo_invencion']").val('');
																	
																	});
$("#personajuridica2").click (function() {$('#persona_juridica').css("display","none");
	
	$('input[name=pj_nombre_apellidos]').val('');
	$('input[name=pj_dni]').val('');
	$('input[name=pj_cargo]').val('');
	$('input[name=pj_empresa]').val('');
	$('input[name=pj_cif]').val('');
	$('input[name=pj_direccion]').val('');
	$('input[name=pj_codigo_postal]').val('');
	$('input[name=pj_pais]').val('');
	$('input[name=pj_provincia]').val('');
	$('input[name=pj_titulo_invencion]').val('');						 
});

if ($("#contratosecreto").attr('checked')) { $('#contrato_secreto').css("display","block");}
if ($("#personafisica").attr('checked')) {$('#persona_fisica').css("display","block");}
if ($("#personajuridica").attr('checked')) {$('#persona_juridica').css("display","block");}
if ($("#contratosecreto2").attr('checked')) { $('#contrato_secreto').css("display","none");}
if ($("#personafisica2").attr('checked')) {$('#persona_fisica').css("display","none");}
if ($("#personajuridica2").attr('checked')) {$('#persona_juridica').css("display","none");}
});
