// JavaScript Document
// RollOver Bouton
$(document).ready(function(){

	$("#galerie li").each(function(){
		var link = $(this).children("a");
		var photo = $(link).children("img");
		var photosrc = $(photo).attr("src");

		// add mouseover
		$(link).mouseover(function(){
			var on = photosrc.replace(/.jpg$/gi,"_hover.jpg");
			$(photo).attr("src",on);
		});

		// add mouse out
		$(link).mouseout(function(){
			$(photo).attr("src",photosrc);
		});
	});


	//GalerieBox FANCYBOX
	$("a[rel=galerie]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	
	
	
	

// fancy box SWF

$("a[rel=FancySWF]").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: 'none',
			'href'          : this.href,
			'width'			: 950,
			'height'		: 680,
			'type'			: 'swf',
          	'swf'           : {
            	'wmode':'transparent',
           		'allowfullscreen':'true'
            	}
		});
	return false;
});			
$("a[rel=FancyHTML]").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'href'          : this.href,
			'type'			: 'iframe',
			'overlayColor'  : '#000',
			'width'			: 950,
			'height'		: 680
		});
	return false;
});			
	
	
	
	
});








