$(document).ready(function(){
    
	 $("#banner").cycle({
	  fx:     'fade', 
	  timeout: 5000,
	  speed:   1000,
	  pager:  '#nav',
	  pagerEvent: 'click', 
	  pauseOnPagerHover: true      
	});
	
	
	$('.clienti img').mouseover(function() {
		var relu = $(this).attr("rel");
		$('#'+relu+'').show();
	}).mouseout(function () {
		var relu = $(this).attr("rel");
		$('#'+relu+'').hide();
	});
	
	$('.tooltip').mouseover(function() {
		$(this).show();
	}).mouseout(function () {
		$(this).hide();
	});

//	$(".galerie").fancybox({
//		'zoomSpeedIn': 300,
//		'zoomSpeedOut': 300,
//		'padding':0,
//		'overlayShow': true,
//		'overlayOpacity':6,
//		'hideOnContentClick':false
//	 		
//	}); 
	
	$("a[rel=example1]").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 + '</span>';
		}
	});
	$("a[rel=example2]").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 + '</span>';
		}
	});
	$("a[rel=example3]").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 + '</span>';
		}
	});
	$("a[rel=example4]").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 + '</span>';
		}
	});


	

});

