$(document).ready(function(){
	
	//lightbox	
	$("a[rel^='lightbox']").prettyPhoto(); 

	//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);

	//hover en links left
	$("#left ul#links li img").hover(function() {
		$(this).animate({opacity: "1"}, "fast");
	}, function() {
		$(this).animate({opacity: "0.6"}, "fast");
	});
	$("#left ul#links li img").css({opacity: "0.6"}, 1);

	
	//hover en sponsors
	$(".sponsorThumb").hover(function() {
		$(this).animate({opacity: "1"}, "fast");
	}, function() {
		$(this).animate({opacity: "0.6"}, "fast");
	});
	$(".sponsorThumb").css({opacity: "0.6"}, 1);

	//hover en footer
	$("#footer img").hover(function() {
		$(this).animate({opacity: "1"}, "fast");
	}, function() {
		$(this).animate({opacity: "0.6"}, "fast");
	});
	$("#footer img").css({opacity: "0.6"}, 1);





	//animación en menu
	$('ul#menu 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#menu ul').hide();

	
});