conf = function (str){ return confirm('Realmente deseas :\n'+str);}

$(document).ready(function(){

/********* INICIO DOCUMENT READY *********/	
	
	/* Filtros */
	$("#numResultados").change( 
	    function() {		    	 
 			$("#frmfiltro").submit();        				
	    	}
	);	
	
	/* Buscar en la web*/
	$("#srcButton").click( 
		    function() {		    	 
	 			$("#searchFrm").submit();        				
		    	}
		);	
	
	$(".faq li").toggle( 
		    function() {$(this).addClass("active")},
		    function() {$(this).removeClass("active");} 
		);   
	
    /* Mostrar div de recordatorio de contraseña */
    $("a.link_forgot").toggle(
    	function(){$("#forgot").fadeIn(1000);},
    	function(){
    		$("#forgot").fadeOut(1000);
    		$("p.ok").hide();
    		$('#email').removeAttr("disabled");
    		$('#b_forgot').removeAttr("disabled");
    		$('#email').val('')}
    	)
	
	/* Recordar contraseña */
	$(function(){
	    var url=$("#located_url").val();
		$("#b_forgot").click(function(){
				$.post(url,{email: $("#email").val()}, function(j){
				// Ejecuta el php, pero no hace nada mas
				})		
				$('#email').attr("disabled", true);
				$('#b_forgot').attr("disabled", true);
				$("p.ok").fadeIn(1000);
		})
	})
	
	$("#fondoNostrum").hover(
		      function () {
				imageUrl = $("#url").val()+ 'fondoNostrum2.gif';
		        $(this).attr({ src: imageUrl});
		      }, 
		      function () {
		    	imageUrl = $("#url").val()+ 'fondoNostrum.gif';
		    	$(this).attr({ src: imageUrl});
		      }
		    );	

	$("#cartas").hover(
		      function () {
				imageUrl = $("#url").val()+ 'cartas2.gif';
		        $(this).attr({ src: imageUrl});
		      }, 
		      function () {
		    	imageUrl = $("#url").val()+ 'cartas.gif';
		    	$(this).attr({ src: imageUrl});
		      }
		    );
	
	$("#nostrumbanner").hover(
		      function () {
				imageUrl = $("#url").val()+ 'nostrumbanner2.gif';
		        $(this).attr({ src: imageUrl});
		      }, 
		      function () {
		    	imageUrl = $("#url").val()+ 'nostrumbanner.gif';
		    	$(this).attr({ src: imageUrl});
		      }
		    );	   	

	$("#btn_entrar").hover(
		      function () {
				imageUrl = $("#url").val()+ 'boton-entrar-roll.png';
		        $(this).attr({ src: imageUrl});
		      }, 
		      function () {
		    	imageUrl = $("#url").val()+ 'boton-entrar.png';
		    	$(this).attr({ src: imageUrl});
		      }
		    );	  	
	/********* FIN DOCUMENT READY *********/
});  
	
	
	           

