$(document).ready(function() {

	/*
	$("#paginaExterior a").enlacesExternos({ //mediante selector indicamos a que enlaces queremos aplicar el plugin
		mostrarIcono: true, //mostrar icono si/no (true/false)
		modoImagen: true, //mostrar icono mediante etiqueta "img" tras el enlace (true) o mostrarla mediante bacground del enlace (false)
		rutaIcono: "/img/icons/icon_external.gif", //ruta al icono que se va a utilizar
		mostrarTitle: true, //modificar title del enlace si/no (true/false)
		title: "Este enlace se abrir� en una ventana nueva", //texto que llevar� el title nuevo, o, en caso de existir, texto que se a�adir�
		abrirVentana: true //abrir enlace en ventana nueva si/no (true/false)
	});
	
	$('.galeriaImagenes').slider({
		anchoSlider: 600,
		usarFlechas: false,
		usarPaginador: true,
		autoSlide: true,
		pausarAutoSlide: true,
		tiempoAutoSlide: 7000,
		tiempoAutoSlideLargo: 30000
	});
	*/
	
	$("#pagina a, #pie a").enlacesExternos({
        mostrarIcono: false,
        modoImagen: false,
        rutaIcono: "/img/icons/icon_external.gif",
        mostrarTitle: true,				
        title: "Este enlace se abrirá en una ventana nueva",
        abrirVentana: true
    });

    $('a.thickbox').colorbox({
        maxWidth: "90%",
        maxHeight: "90%",
        current: "{current} de {total}",
        previous: "anterior",
        next: "siguiente",
        close: "Cerrar"
    });
	
	$('.divFlash').each(function(){
		var flashvars = {};
		if( $(this).hasClass('flashOpaco') ) {
			var params = { wmode: "opaque"};
		} else if( $(this).hasClass('flashWindow') ) {
			var params = { wmode: "window"};
		} else {
			var params = { wmode: "transparent"};
		}
		$(this).flash({
			swf: $(this).attr("title"),
			height: parseInt($(this).css("height")),
			width: parseInt($(this).css("width")),
			expressInstaller: '/js/swfobject/expressInstall.swf',
			params: params,
			flashvars: flashvars
		});
		$(this).removeAttr("title");
	});
	
    //funcion que detecta la versión del navegador. -1 para los navegadores distintos de IE, y las versiones para los navegadores de Microsoft
	function vIE(){return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;}
	ver = vIE();
	//alert(ver);
	if(ver <= 6 && ver >=1){
		//PNG fix para IE6
		DD_belatedPNG.fix('.png');
	}
	
	$("#pie a.politicaPrivacidad").colorbox({
		width:"50%",
		height:"70%",
		iframe:true,
		close: "Cerrar"
	});
	$("#pie a.politicaAccesibilidad").colorbox({
		width:"50%",
		height:"70%",
		iframe:true,
		close: "Cerrar"
	});

});