
	
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 10,
        wrap: 'last',
		scroll:1,
		animation:"slow",
		buttonNextHTML:"",
		buttonPrevHTML:"",
        initCallback: mycarousel_initCallback
    });
	

	$('#pane2').jScrollPane({showArrows:true});
	$('#pane3').jScrollPane({showArrows:true});
	
	$('#infosWrapper').html(getXMLInformation());
	//$('#infosWrapper').jScrollPane({showArrows:true});





$("#layer_image").change(function() {

	switch ($(this).val())

	{
		
	
		
		case 'transfert_audio':
						$("#infoGenerale").hide("fast");
						$(".transfert_audio").show("slow");

					if ($(".transfert_video").display!="none") {
						$(".transfert_video").hide("fast");
					}
					 if ($(".montage_video").display!="none") {
						$(".montage_video").hide("fast");
					}
					 if ($(".numerisation_diapos").display!="none") {
						$(".numerisation_diapos").hide("fast");
					}

		break;
		
		case 'transfert_video':
						$("#infoGenerale").hide("fast");
						$(".transfert_video").show("slow");
					
				if ($(".transfert_audio").display!="none") {
						$(".transfert_audio").hide("fast");
					}
					if ($(".montage_video").display!="none") {
						$(".montage_video").hide("fast");
					}
					if ($(".numerisation_diapos").display!="none") {
						$(".numerisation_diapos").hide("fast");
					}					

		break;
		
		case 'montage_video':
						$("#infoGenerale").hide("fast");
						$(".montage_video").show("slow");
					
					if ($(".transfert_audio").display!="none") {
						$(".transfert_audio").hide("fast");
					}
					if ($(".transfert_video").display!="none") {
						$(".transfert_video").hide("fast");
					}
					if ($(".numerisation_diapos").display!="none") {
						$(".numerisation_diapos").hide("fast");
					}					

		break;
		
		case 'numerisation_de_diapositives':
						$("#infoGenerale").hide("fast");
						$(".numerisation_diapos").show("slow");
			
					if ($(".transfert_audio").display!="none") {
						$(".transfert_audio").hide("fast");
					}
					if ($(".montage_video").display!="none") {
						$(".montage_video").hide("fast");
					}
					if ($(".transfert_video").display!="none") {
						$(".transfert_video").hide("fast");
					}			

		break;
	}

});








});


function getXMLInformation() {
	 			var infoToScreen = "";

$.get ("temoignages.xml",function(xmlProduit) {
								$('temoignage',xmlProduit).each(function(i) {		
											
							  
									lieu 				= $(this).find("lieu").text();
									dateTemoignage 		= $(this).find("dateTemoignage").text();
									nomClient 			= $(this).find("nomClient").text();
									resumeTemoignage	=$(this).find("resumeTemoignage").text();
							
									infoToScreen +='<p><span style="color:#fff;font-size:14px;">'+lieu+'</span> / ';
									infoToScreen +='<span style="color:#fff;font-size:12px;font-style:normal;font-weight:bold;"> '+nomClient+"</span> - ";
									infoToScreen +='<span style="color:#fff;font-size:12px;font-style:italic;font-weight:normal;">'+dateTemoignage+"</span><br /><br />";
									infoToScreen +='<span style="color:#fff;font-size:12px">'+resumeTemoignage+'</span><br /><br /><hr size="1" width="80%"></p>';
							});
										
																	
							$('#infosWrapper').html(infoToScreen);
					});
													  
    
}
