// JavaScript Yalos.it - edit: Tonidigrigio.it - 2011

//PNG FIX
$(document).pngFix(); 

$(document).ready(function() {
 	
	//ANYTHING SLIDER
	$('#slider').anythingSlider({
		startStopped    : false, // If autoPlay is on, this can force it to start stopped
		width           : 720,   // Override the default CSS width
		theme           : 'metallic',
		autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
		resumeDelay     : 5000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
		onSlideComplete : function(slider) {}
	});

	//FANCYBOX CTRL
	$("a[rel=gallery]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">' + (title.length ? '' + title : '') + '</span>';
		}
	});
	
	//FANCYBOX CTRL
	$("#open").fancybox({
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$("#disegno").fancybox({
		'titleShow'     : false
	});
	
	$('.slideshow').cycle({
        fx:      'fade',
        prev:    '#prev',
        next:    '#next'
    });

});

