	$(document).ready(function() {

		/*$('#dock').Fisheye({
			maxWidth: 80,
			items: 'a',
			itemsText: 'span',
			container: '.dock-container',
			itemWidth: 40,
			proximity: 60,
			alignment: 'right',
			valign: 'bottom',
			halign: 'left'
		}) ;*/
				
		// Boite bleue
		$("a.thickbox").colorbox({transition:"elastic", width:550});
		
		if ( !(jQuery.browser.msie )) { // take away IE6
			$("a.colorBox").colorbox({transition:"elastic", iframe: true,width:730, height: 650});
			
		}else{
			$("a.colorBox").colorbox({transition:"elastic", iframe: true,width:730, height: 700});
		}
		
		$(".blocBleu").corner("10px");
		
		// Cufon, pour les typos
		
		Cufon.replace('#altContent h3.titreColBlanche, #homepage #altContent h4');
		Cufon.replace('#editContent h2, #editContent .titre h3');
		
		// Boites arrondies
		
		$('.box-arts').prepend('<div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div>');
		$('.box-concerts').prepend('<div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div>');
		$('.box-enfance').prepend('<div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div>');
		
		$('#animationDiaporama').cycle({
			fx:    'fade', 
			speed:  1000,
			timeout: 5000
			
		});
		
		//Gestion Portfolio
		var opts = { align: 'bottom' , size: 40, labels: 'tc'};
		$('.dock-container').jqDock(opts);
		

	});
	
	$(window).unload( function () {
		if ($('#monfilm').length) getTimeCode("monfilm");
	});
	
	function lieux(){
		$("#navIt3 a").click();
	}

	function specHide(type){
		if(type != ''){
			$(".box-arts").addClass("hidden");
			$(".box-concerts").addClass("hidden");
			$(".box-enfance").addClass("hidden");
			$(".box-"+type).removeClass("hidden");
			$(".triBack").attr("selected","");
			$("#"+type).attr("selected","selected");
			
		}else{
			$(".box-arts").removeClass("hidden");
			$(".box-concerts").removeClass("hidden");
			$(".box-enfance").removeClass("hidden");
		}
		//
		//if(type != ''){
		//	$(".box-arts .horaires").hide();
		//	$(".box-arts .description").hide();
		//	$(".box-concerts .horaires").hide();
		//	$(".box-concerts .description").hide();
		//	$(".box-enfance .horaires").hide();
		//	$(".box-enfance .description").hide();
		//	$(".box-"+type+" .horaires").show();
		//	$(".box-"+type+" .description").show();
		//	$(".triBack").attr("selected","");
		//	$("#"+type).attr("selected","selected");
		//	
		//}else{
		//	$(".box-arts .horaires").show();
		//	$(".box-concerts .horaires").show();
		//	$(".box-concerts .description").show();
		//	$(".box-enfance .horaires").show();
		//	$(".box-enfance .description").show();
		//}
		
	}
	
	// Ouverture de fenetre dimensionnee et centree
	function Fenetre(URL,nom,largeur,hauteur) {
		var largeurEcran = screen.availWidth;
		var hauteurEcran = screen.availHeight;
		var xbase = (largeurEcran-largeur)/2; 
		var ybase = (hauteurEcran-hauteur)/3; 
		var optionFenetre = ', top=0,left=0, status=1, directories=0, toolbar=0, location=0, menubar=0, scrollbars=1, resizable=1';
		var tailleFenetre = ('width='+largeur+',height='+hauteur + optionFenetre);
		var fenetre = window.open(URL,nom,tailleFenetre);
		fenetre.moveTo(xbase,ybase);
		//return false;
	}
	
	// Appel a la fonction de Feulash
	function getTimeCode(movieID) {
		if (navigator.appName.indexOf("Microsoft") != -1) {
				window[movieID].repere();
		   }
		   else {
			   document[movieID].repere();
		   }
	}