function modalShow (dialog) {
		height = $('#link-location').height();
		$('#modalContainer').height(height+30);
}
$(document).ready(function(){ 	
	var htmlStr = $("#dynamo ul").html();
	$("#dynamo").html('');
    $("#dynamo_ul").html(htmlStr);
	$('.link-multimag').click(function(){
		$('#link-location').modal({onShow: modalShow});
		return false;
	});
	$('ul.sousmenu').hide(); 
	$('.open').next().show();
	$("#contenu_left a[@href^='http:\/\/']").attr("target","_blank");
	$('a[@rel*=lightbox]').lightBox({
		imageBlank : '/css/images/blank.gif',
		imageLoading: '/css/images/loading.gif',
		imageBtnClose: '/css/images/close.gif',
		imageBtnPrev: '/css/images/prev.gif',
		imageBtnNext: '/css/images/next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Image',
		txtOf: '/'
		
	});
	$('a.avecsousmenu').mouseover(function () {
		if ($(this).next().is(":hidden")) {				 
			$('.open').next().slideUp('1000');
			$(this).addClass('open');
			$(this).next().slideDown();
		}
	});
	$('a.avecsousmenu-clic').click(function () {
		if ($(this).next().is(":hidden")) {
			$(this).next().slideDown();
		}
		return false;
	});
	
	/*
	$('#accueil-fade').innerfade({
		animationtype: 'fade',
		speed: 'slow', 
		timeout: 4000,
		type: 'sequence',
		containerheight: 'auto'
	});
	*/

	$('#accueil-fade').animatedinnerfade({
		speed: 1000,
		timeout: 4000,
		type: 'sequence',
		containerheight: 'auto',
		containerwidth: 'auto',
		animationSpeed: 0,
		animationtype: 'fade',
		bgFrame: 'none',
		controlBox: 'none',
		displayTitle: 'none',
		controlBox: 'none'
	});
	
	
	$('#news-fade').animatedinnerfade({
		speed: 1000,
		timeout: 5000,
		type: 'sequence',
		containerheight: '150px',
		containerwidth: 'auto',
		animationSpeed: 0,
		animationtype: 'fade',
		bgFrame: 'none',
		controlBox: 'none',
		displayTitle: 'none',
		controlBox: 'show',
		controlButtonsPath: '/images/site',
		controlBoxClass: 'mycontrolboxclass'
	});
	
	
	$('.block-link').css('cursor','pointer').click(function(){
		document.location.href  = $(this).find('a:last')[0].href;
	});
});