jQuery.pedrosaCSS = function()
{
    if (screen.width > 1280) {
      /*  if (screen.height >= 800) {*/
            $('head').append('<link rel="stylesheet" href="./1280/style.css" type="text/css">');
        /*} else {
            $('head').append('<link rel="stylesheet" href="./1024/style.css" type="text/css">');        
        }*/
    } else if (screen.width >= 1024) {
         $('head').append('<link rel="stylesheet" href="./1024/style.css" type="text/css">');
    } else if (screen.width >= 800) {
        $('head').append('<link rel="stylesheet" href="./800/style.css" type="text/css">');
    } else if (screen.width >= 600) {
        $('head').append('<link rel="stylesheet" href="./600/style.css" type="text/css">');
    } else {
        $('head').append('<link rel="stylesheet" href="./310/style.css" type="text/css">');
    }
}

$.pedrosaCSS();

function lanzar(){
    $("#inicio").center();
    $("#info").center();
	$("#cuerpo").center();
	$("img.texto").center();

	$("#preload").hide();
	$("#inicio").show();
	$('#elba_web area').each(function() {
		if ( $(this).attr('alt') != '') {
		$(this).qtip(
		{
			content: $(this).attr('alt'),
            position: {
				corner: {
					tooltip: 'bottomMiddle',
					target: 'topMiddle'
				}
			},

			style: {
				//name: 'light', // cream, dark, green, light, red, blue
    			color: '#113caa',
				background: '#FFFFFF',
                width: {
                    min: 0,
                    max: 300
                },
				border: {
                    color: '#e2e2e2',
					width: 0,
					radius: 4
				},
				tip: true
			}
		});}
	});

	$("#mapa_inicio").click(function() {
	    $("#inicio").hide();
	    $("#cuerpo").show();
	});

	$("area.mapa_info").click(function() {
	    $("#inicio").hide();
	    $("#info").show();
	});

	$("area.mapa_info2").click(function() {
	    $("#cuerpo").hide();
	    $("#info").show();
	});

	$("area.mapa_inicio").click(function() {
	    $("#info").hide();
	    $("#cuerpo").show();
	});

	$("area.mapa_somos").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#somos").show();
	});

	$(".mapa_offroad").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#offroad").show();
	});

	$(".mapa_hacemos").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#hacemos").show();
	});

	$(".mapa_inquietudes").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#inquietudes").show();
	});

	$(".mapa_RSC").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#RSC").show();
	});

	$(".mapa_compartir").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#compartir").show();
	});

   	$(".mapa_biu").click(function() {
		if($(this).data("qtip")) $(this).qtip("destroy");
		$("#biu").show();
	});

	$("#somos").click(function() {
		$("#somos").hide();
	});

	$("#offroad").click(function() {
		$("#offroad").hide();
	});

	$("#hacemos").click(function() {
		$("#hacemos").hide();
	});

	$("#inquietudes").click(function() {
		$("#inquietudes").hide();
	});

	$("#RSC").click(function() {
		$("#RSC").hide();
	});

	$("#compartir").click(function() {
		$("#compartir").hide();
	});

	$("#biu").click(function() {
		$("#biu").hide();
	});
}
