/*-----------------------------------------------------------------------------------*/
/*	Slides Navigation Effect
/*-----------------------------------------------------------------------------------*/
// slide in home	
	
	if (jQuery().slides) {
		
		jQuery("#slider").hover( function() {
			jQuery('.slides-nav').fadeIn(400);
		}, function () {
			jQuery('.slides-nav').fadeOut(400);
		});
		
	}
	

		$(function(){
			$('#slider').slides({
				preload: true,
				preloadImage: 'images/loading.gif',
				play: 5000,
				pause: 1000,
				hoverPause: true,
				effect: 'fade',
				fadeSpeed: 800,
				play: 10000,
				crossfade: true,
				generatePagination: false,
				animationStart: function(current){
					$('.caption').animate({
						bottom:-120
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.caption').animate({
						bottom:40
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.caption').animate({
						bottom:40
					},200);
				}
			});
		});
		
		

// dissolvenza

$(document).ready(function(){
	
$("a").contents("img").hover(function() {
		$(this).stop().animate({"opacity": "1"}, 350);
		},function() {
		$(this).stop().animate({"opacity": "0.6"}, 350);
	});
});




// Tabs in home
$(function() {
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul.tabs").tabs("div.panes > div");
});


// popup in home
$(document).ready(function() {
    $('#popup').show("slow");
    $('#popup #close a').click(function(){
        $('#popup').slideUp("slow");
        return false;
    });
});
