jQuery(function() {
	/* inicio campo email en la newsletter */ 
	var valorCampoNewsletter = $("#campo-email-newsletter").val();
	
	$("#campo-email-newsletter").click(function(){
		if( $(this).val() == valorCampoNewsletter){
			$(this).val("");
		}
	});
		
	$("#campo-email-newsletter").blur(function(){
		if( $(this).val() == ""){
			$(this).val(valorCampoNewsletter);
		}
	});
	/* fin campo email en la newsletter */ 	
	
	/* inicio bloque de APLICACIONES */ 	
	initAplicaciones();
	
	$(".aplicaciones DIV .titulo").click(function(){
		var topo = $(this).children("span");
		topo.toggleClass("desplegado");
		
		var bloque = $(this).next();
		toogleContenidoAplicacion(bloque);
	});
	/* fin bloque de APLICACIONES */ 		
	

	
});

function initAplicaciones(){
	$(".aplicaciones DIV .contenido-aplicacion").each(function(){
		$(this).hide();															   
	});
}

function toogleContenidoAplicacion(bloque){
	if($(bloque).is(':visible')){
		$(bloque.slideUp('fast'))
	}
	else{
		$(bloque.slideDown('slow'))
	}
}