$(document).ready(function(){


	/*$.localScroll.defaults.axis = 'xy';*/
	$.localScroll();
	
	/** par defaut */
	
	$('a.fancybox').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>';
		}
	});
	
	
	/** video youtube **/
	$(".youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 560,
			'height'		: 340,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
				 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

		return false;
	});

	/** video incorporée **/
	$("a.videoInside").fancybox();
	

});

