// site_accordion_params.js
// fichier javascript avec les paramètres de l'accordeon javascript (avec interface.js)

		function getelementheight(cherche) {
			var maxh=0;
			$(cherche).each(function(i){
				var height = $(this).height()+5;
				//alert(height+'/ maxh:'+maxh);
				maxh = Math.max(height,maxh);			
			});
			//alert('maxh:'+maxh);
			return maxh;
		}

$(document).ready(
	function()
	{
        var max_h = getelementheight(".accordeon div");
		$('.accordeon').Accordion(
			{
				headerSelector	: 'h3',
				panelSelector	: 'div',
				activeClass		: 'myAccordionActive',
				hoverClass		: 'myAccordionHover',
				panelHeight		: max_h,
				speed			: 300
			}
		);
		// selectionne la dernière fenêtre
		var max_id = $('.accordeon h3').length-1;
		var thetab = $('.accordeon h3').get(max_id);
		$(thetab).click();
		$('.accordeon h3').click(function() {
					window.scrollTo(0,200);								 
		 });

	}
);

