// JavaScript Document

function funciones(){

	$('#slideshow').cycle({
		prev:   '#prev',
		next:   '#next, #slideshow',
		speed: 500,
		timeout: 0,
		fit: 1,
		/*timeout: 3000,
		pause: 1,*/
		before: onBefore
		});
		
	/*$('#textoCycle').cycle({
		speed: 400,
    	fx:    'scrollRight',
    	pager:  '#nav',
    	delay: -1000
		});*/
    
    function onBefore() {
        $('#title').html(this.alt);
    	};
    	
    function imgOver() {
    	$(".over").hide();
    	
    	$('.cromo-obra a')
		.mouseover(function(){
			//$(this).siblings("img.over").stop().fadeTo({duration:300}, 1.0);
			$(this).siblings("img.over").stop().show();
		})
		.mouseout(function(){
			//$(this).siblings("img.over").stop().fadeTo({duration:300}, 0.0);
			$(this).siblings("img.over").stop().hide();
		})

        $('#title').html(this.alt);
    	};
	
	
	}
	
$(document).ready(function(){
	funciones();
	$("#contenido").hide();
	//$(".over").fadeTo(0, 0.0);
	$(".over").hide();
	$('.cromo-obra a img.over')
		.mouseover(function(){
			//$(this).stop().fadeTo({duration:150}, 1.0);
			$('.pie-obra').html("&nbsp;");
			$(this).show();
		})
		.mouseout(function(){
			//$(this).stop().fadeTo({duration:150}, 0.0);
			//$(this).hide();
		})
	
	$('.cromo-obra img')
		.mouseover(function(){
			$(this).siblings(".over").show();
			$(this).siblings(".over").css("display", "block");
			$('.pie-obra').html(this.alt);
		})
		.mouseout(function(){
			$(".over").hide();
			$('.pie-obra').html("&nbsp;");
		})
	
	// faders	
	$("#contenido").fadeIn(450);
	
});