var i = 1;
window.addEvent('domready', function() {
	strHref = window.location.href;
	
	if (strHref.indexOf('procedimiento-monitorio') != -1){
		$j("li#procedimientoMonitorio").addClass("activa");
		
	}else if (strHref.indexOf('procedimiento-ordinario') != -1){
		$j("li#procedimientoOrdinario").addClass("activa");
		
	
	}else if (strHref.indexOf('procedimiento-cambiario') != -1){
		$j("li#procedimientoCambiario").addClass("activa");
		
	}
		
	$j('.toggle').each(function(el){
		
		var toggle = $j(this).attr("id");
		var contNav = $j('.sub').attr("id");
		var activa = false;
		
		var mySlide = new Fx.Slide('contSubMenuNav' + i, {
			duration: 750,
			mode: 'vertical',
			onComplete : function() {
			}
		});
		
		$j(this).next().children().children().children().each(function(){
			if($j(this).attr("class") == "activa"){
				activa = true;
			}
		});
		
		if(!activa){
			mySlide.hide();
		}
		
		$(toggle).addEvent('click', function(e){
			e = new Event(e);
			mySlide.toggle();
			e.stop();
		});
		i++;
	});

});
	
	
		
