$(function()
{
	$('.inform').css({ opacity: 0 });
	//$('.submenu').css({ opacity: 0});
	$('.scroll-pane').css({ opacity: 0});
});
$(document).ready(function (){
							
	
	

	
	//Animación
	$('.inform').animate({ opacity: 0.5 }, 1000 , function (){});
	$('.inform').animate({ opacity: 1 }, 900 , function (){});
	$('.scroll-pane').animate({ opacity: 1 }, 900 , function (){});
	
	//$('.submenu').animate({ opacity: 1 }, 500 , function (){});
	//Ajustes lavaLamp
	$(function() {
            $("#1").lavaLamp({
                fx: "linear",
                speed: 300,
                click: function(event, menuItem) {
                    //return false;
                }
            });
        });
	
	//Ajustes Slider
	$(document).ready(function() {
		$('.slideshow').cycle({
			fx: 'fade'
		});
	});
	
	
		//Ajustes Slider
	$(document).ready(function() {
		$('.slideshow_idiomas').cycle({
			fx: 'fade'
		});
	});
	
	
	
	//Ajustes Fancybox
	
	$("a.popIMG").fancybox({
				'overlayShow'	: false,
				'width'				: '75%',
				'height'			: '75%',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'titlePosition' 	: 'over'
	});
	
	$(".comunPop").fancybox({
				'width'				: 600,
				'height'			: 300,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
	$(".youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'title'			: this.title,
			'width'		: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
});
	
});


$(function()
{
	$('.scroll-pane').jScrollPane({showArrows: true});
});


$(document).ready(function() {

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

		});

