$(document).ready(function(){
	
	//Cufon
//	Cufon.replace('#nav li', { hover: 'true' });
//	Cufon.replace('h1, h2, h3', { hover: 'true' });
		
	//lightbox	
//	$("a[rel=lightbox]").prettyPhoto();
//	$("a[rel^='lightbox']").prettyPhoto();// {theme:'light_rounded'} );

	
	//animación en menu
	$('ul#menul li > ul').each(function(i) {
		var parent_li = $(this).parent('li');

		// Temporarily remove the list from the
        // parent list item, wrap the remaining
        // text in an anchor, then reattach it.
        var sub_ul = $(this).remove();
        parent_li.wrapInner('<a/>').find('a').click(function() {
            // Make the anchor toggle the leaf display.
			sub_ul.slideToggle();
		});
        parent_li.append(sub_ul);
    });
    $('ul#menul ul').hide();


	//hover en idiomas
	$("#idiomas a img[class!=sel]").hover(function() {
		$(this).animate({opacity: "1"}, "fast");
	}, function() {
		$(this).animate({opacity: "0.5"}, "fast");
	});
	$("#idiomas a img[class!=sel]").css({opacity: '0.5'}, 1);
	$("#idiomas .off").css({opacity: '0.5'}, 1);
	
	
	//hover en galerías
	$(".fotoThumb").hover(function() {
		$(this).animate({opacity: "1"}, "fast");
	}, function() {
		$(this).animate({opacity: "0.6"}, "fast");
	});
 	$(".fotoThumb").css({opacity: '0.6'}, 1);

	var nav_alert = {
		es : 'Utilizas una versión obsoleta de Internet Explorer.\nPara una mejor experiencia visualizando nuestra página web, te recomendamos que descargues e instales la última versión del mismo, o bien de otros navegadores como Firefox o Safari.',
		en : 'You\'re using an obsolete Internet Explorer version.\nFor a better navigation experience, we recommend you to download and install the newest version of IE, Firefox or Safari.',
		ca : 'Utilitzes una versió obsoleta d\'Internet Explorer.\nPer a una millor experiència visualitzant la nostra pàgina web, et recomanem que descarreguis i instal·lis l\'última versió del mateix, o bé d\'altres navegadors com Firefox o Safari.'
	}

	if($.browser.msie && ($.browser.version.substr(0,1) < 8) ){
		alert( nav_alert.es );
		window.open('http://www.browserchoice.eu');
	}
});