// GENERAL

$(document).ready( function () {     
	// On cache les sous-menus     
	// sauf celui qui porte la classe "open_at_load" :     
	$(".navigation ul.subMenu:not('.open_at_load')").hide();     
	// On sélectionne tous les items de liste portant la classe "toggleSubMenu"      
	// et on remplace l'élément span qu'ils contiennent par un lien :     
	$(".navigation li.toggleSubMenu span").each( function () {         
	// On stocke le contenu du span :         
	var TexteSpan = $(this).text();         
	$(this).replaceWith('<a href="" title="Afficher le sous-menu">' + TexteSpan + '<\/a>') ;     } ) ;      
	// On modifie l'évènement "click" sur les liens dans les items de liste     
	// qui portent la classe "toggleSubMenu" :     
	$(".navigation li.toggleSubMenu > a").click( function () {         
	// Si le sous-menu était déjà ouvert, on le referme :         
	if ($(this).next("ul.subMenu:visible").length != 0) {             
		$(this).next("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } );         
	}         
		// Si le sous-menu est caché, on ferme les autres et on l'affiche :         
	else {             
		$(".navigation ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") });             
		$(this).next("ul.subMenu").slideDown("normal", function () { $(this).parent().addClass("open") } );         
	}         
	// On empêche le navigateur de suivre le lien :         
	return false;     
	});  
} ) ;

$(document).ready(function(){
	/*====================== Exemple 2 ======================*/
	$("#parent2").wslide({
		width: 300,
		height: 200,
		pos: 1,
		horiz: true,
		duration: 2000,
		effect: 'easeOutElastic'
	});
});

 function my_kwicks(){
    $('.kwicks').kwicks({
		duration: 300,   
        max: 170,  
        spacing:  0  
    });
}  

 $(document).ready(function(){					
	my_kwicks();
});

function affiche_flash(url,width,height,html_alternatif,transparent,parametres)
{ 
   	var Navigateur = navigator.appName;
	if(Navigateur == "Microsoft Internet Explorer"){
		
	document.write('<object type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"')
	document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">');
	document.write('<param name="movie" value="' + url + '" />');
	//document.write('<param name="flashvars" value="'+  parametres +'" />');
	
		if(transparent==1)
		{
		document.write('<param name="wmode" value="transparent" />');
		}
	document.write(html_alternatif);
	document.write('</object>');
	
	}  
	else
	{
	document.write('<object type="application/x-shockwave-flash" data="' + url  +'" width="' + width + '" height="' + height + '">');
		if(transparent==1)
			{
			document.write('<param name="wmode" value="transparent" />');
			}
	
	document.write(html_alternatif);
	document.write('</object>');
	}
}
