//DETECTION NAVEGADOR
nav_detection=navigator.userAgent.search(/MSIE 6/)
if(nav_detection>0)var IE6=true
else var IE6=false

if (IE6) var ext="gif";
else	var ext="png";

//Adaptamos la web a la pantalla al inicio
$(document).ready(function() {
	resizePage();

	$('.nob').click(function() {
	  $('.n2').fadeToggle();
	});
	
	$("#menu li div").hover(
	  function () {
		$(this).addClass("fblanco");
	  },
	  function () {
		$(this).removeClass("fblanco");
	  }
	);
	
	$("#menu li a").hover(
	   function () {
		$(this).addClass("fblanco");
	  },
	  function () {
		$(this).removeClass("fblanco");
	  }
	);
});

//Adaptamos la web a la pantalla al hacer un resize
$(window).resize(function() {
  resizePage();
});

function resizePage() {
	var w=$(window).width()-$("#menu").width();
	var h=$(window).height()-$("#pie").height();

	$("#menu").css("height",h);
	$("#contenido").css("height",h);
	$("#contenido").css("width",w);
	
	$(".logohome").css("width",w);
	var toplogo=(h/2)-187;
	$(".logohome").css("top",toplogo+"px");
}

function goTo(url) {
	document.location.href=url;	
}
