$(document).ready(function() {
	$(".input").focus (function() {
		$(this).addClass('foco');
	});
	$(".input").blur (function() {
		$(this).removeClass('foco');
	});
	
	$("#texto_busqueda").focus (function(){
		$(this).attr("value", "");
	});
	
	$("#texto_busqueda").blur (function(){
		if ($(this).attr("value") == "")
			$(this).attr("value", "Texto a buscar");
	});
	
	$('#id_zona_busqueda').change(function(){
		$obj = $('#form_busqueda_avanzada');
		
		$obj.attr('action', $obj.attr('action') + '/listado/' + $(this).attr('value'));
	});
	
	/* Menú */
	carpeta_botones = 'img/web/menu_izq/';
	ext_normal = '';
	ext_activo = '_on';
	
	$('.boton_menu').mouseover(function(){
		id_boton = $(this).attr('id');
		boton_sobre = base_url + carpeta_botones + id_boton + ext_activo + '.jpg';

		$(this).attr('src', boton_sobre);
	});
	
	$('.boton_menu').mouseout(function(){
		id_boton = $(this).attr('id');
		boton_sobre = base_url + carpeta_botones + id_boton + ext_normal + '.jpg';
		
		$(this).attr('src', boton_sobre);
	});
});
