// Update the flash panorama
function Updater(url) {
	swfobject.embedSWF('/Newsletter/virtuel/flash/Onp-Panoramique.swf',
										 'flashcontent',
										 '100%',
										 '100%',
										 '9.0.0',
										 '/Newsletter/virtuel/flash/expressInstall.swf', 
										 {xml_file: '/Newsletter/virtuel/Garnier/xml/' + url},
										 {wmode: 'transparent', scale: 'noscale', allowScriptAccess: 'sameDomain', allowFullScreen: 'true'}
										);
} 	
 
//Functions called from the diaporama xml hotspot
function xml1() {
	Updater('GarnierFace.xml');
}  
function xml2() {
	Updater('GEscalier.xml');
}  
function xml3() {
	Updater('AFoyer.xml');
}
function xml4() {
	Updater('Foyer.xml');
}
function xml5() {
	Updater('RLune.xml');
}
function xml6() {
	Updater('RotondeSoleil.xml');
}
function xml7() {
	Updater('RotondeGlacier.xml');
}	
function xml8() {
	Updater('SalleGarnier.xml');
}
function xml9() {
	Updater('BPythie.xml');
}
function xml10() {
	Updater('RotondeAbonnes.xml');
}
function xml11() {
	Updater('Lib2.xml');
}

// On Document ready
$(document).ready(function(){
		//Start the default panorama
		xml1();
		//Add Actions on the carousel
		$('.visiteliste li').click(function () {
			$('.visiteliste li.actif').removeClass("actif");
			$(this).addClass("actif");
			target = $('a', this).attr("href").substring(1) + '.xml';
			Updater(target);
		});
		//Setup the carrousel
		jQuery(document).ready(function() { jQuery('.mycarousel').jcarousel(); }); 
});

