function Abrir_ventana(pagina) {
	var opciones="toolbar=no, resizable=no, width=747, height=543, top=100, left=250";
	window.open (pagina,"",opciones);
}

var $j = jQuery.noConflict();

$j(document).ready(function() {

	$j('#primary-nav li:last-child').addClass('last');
	$j('#primary-nav li:first-child').addClass('first');

	$j('#secondary-nav li:first-child').addClass('first');

	$j('#logo_IGM').mouseenter(function() {
		$j(this).attr("src", "uploads/igm/logo_IGM-gris.gif");
	}).mouseleave(function() {
		$j(this).attr("src", "uploads/igm/logo_IGM.gif");
	});

	$j('#photos').galleryView({
			panel_width: 453,
			panel_height: 300,
			frame_width: 108,
			frame_height: 208,
			frame_color: '#cc0',
			filmstrip_size: 100,
			overlay_height: 37,
			overlay_font_size: '14px',
			transition_speed: 1000,
			transition_interval: 5000,
			overlay_opacity: 0.2,
			overlay_color: '#333',
			background_color: '#fff',
			overlay_text_color: '#fff',
			caption_text_color: '#fff',
			border: '0px solid red',
    		nav_theme: 'dark',
    		easing: 'easeInOutBack',
    		filmstrip_position: 'top',
    		overlay_position: 'bottom',
			show_captions: false,
			fade_panels: true,
			pause_on_hover: true
	});

	$j('#photos-peq').galleryView({
            panel_width: 453,
            panel_height: 450,
            frame_width: 108,
            frame_height: 108,
            frame_color: '#cc0',
            filmstrip_size: 100,
            overlay_height: 37,
            overlay_font_size: '14px',
            transition_speed: 1000,
            transition_interval: 5000,
            overlay_opacity: 0.2,
            overlay_color: '#333',
            background_color: '#fff',
            overlay_text_color: '#fff',
            caption_text_color: '#fff',
            border: '0px solid red',
            nav_theme: 'dark',
            easing: 'easeInOutBack',
            filmstrip_position: 'top',
            overlay_position: 'bottom',
            show_captions: false,
            fade_panels: true,
            pause_on_hover: true
    });

	$j('#services-menu').after('<div class="clear"></div>');
	$j('#service-menu-optional').after('<div class="clear"></div>');

	$j('#content h1').prepend('<img src="uploads/igm/pixel_rojo.gif" width="15" height="15" class="square" />');
	$j('#content-1column h1').prepend('<img src="uploads/igm/pixel_rojo.gif" width="15" height="15" class="square" />');

	$j('#content').children().not("h1").wrapAll('<div class="wrapper-text-content"></div>');
	$j('#content-1column').not('.services-home').children().not("h1").wrapAll('<div class="wrapper-text-content-1column"></div>');

	$j("input[name='conocido_en']").change(function() {
		if ($j("input[name='conocido_en']:checked").val() == 'Otros') {
			$j("input[name='otros_indicar']").removeAttr("disabled");
		} else {
			$j("input[name='otros_indicar']").attr("value", '');
			$j("input[name='otros_indicar']").attr("disabled", "disabled");
		}
	});

	$j('.noticias-volver a').addClass('enlace-rojo').prepend('&lt;&lt; ');
	$j('.noticias-imprimir a').addClass('btn_informacion_imprimir texto-ico').wrapInner('<span></span>');

	$j('.galeria-imagen a').attr("rel", 'lightview[myset]');
});
