$(document).ready(function(){

	// Si l'option Accessibilité est active, on sélectionne la vitesse de marche lente
	$('#MIPAccess').bind('click', function(){
		if($(this).attr("checked"))
		{
			$('#selectWalkSpeed').attr("disabled","disabled");
			$('#walkSpeedSlow').attr("selected","selected");
		}
		else
		{
			$('#selectWalkSpeed').removeAttr("disabled");
			$('#walkSpeedNormal').attr("selected","selected");
		}
	});

	$('.LogoWaitRunning').bind('click',function(){
		LogoWaitRunning();
	});

	$("a.toggle").click(function () {
		$(".intermediate").toggle("slow");
		return false;
	});

	$(".stop a.toggle").click(function () {
		$(".stop form").addClass("show");
		return false;
	});
	$(".to a.toggle").click(function () {
		$(".to form").addClass("show");
		return false;
	});

	$("a.toggle-modify").click(function () {
		$(".modify-search").toggle("slow");
		return false;
	});

	/* Carto FDR */
	/*
	$(".toggle-view a").click(function () {
		$("#itineraire-map").toggle("slow");
		return false;
	});

	$(".iti-action-map a").click(function () {
		$(".iti-marche-map").toggle("slow");
		return false;
	});
	*/
	// $("#search-form p.action a").fancybox();

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
 		var ieversion=new Number(RegExp.$1)
 		if (ieversion>=8)
		{
			$('.accordion h3').toggle(
				function() {
 					$(this).next().show();
 				},
 				function() {
 					$(this).next().hide();
 				});

 			$('.accordion h4').toggle(
				function() {
 					$(this).next().show();
 				},
 				function() {
 					$(this).next().hide();
 				});
		}
		else
		{
			$('.accordion h3').click(function() {
 			$(this).next().slideToggle('slow');
 			return false;});

			$('.accordion h4').click(function() {
 			$(this).next().slideToggle('slow');
 			return false;});
		}
	}
	else
	{
		$('.accordion h3').click(function() {
 		$(this).next().slideToggle('slow');
 		return false;});

		$('.accordion h4').click(function() {
 		$(this).next().slideToggle('slow');
 		return false;});
	}

});

