// calcul du nombre de caractères restant
jQuery(function()
{	
	jQuery('input.counterTitle').maxlength({slider: true,maxCharacters:100});
    jQuery('textarea.counterDesc').maxlength({slider: true,maxCharacters:250});

   //$("a[rel^='prettyPhoto']").prettyPhoto();
   //ou parametre
   jQuery("a[rel^='prettyEdit']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});
	jQuery("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});
	jQuery("a[rel^='prettyProto']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyActu']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettySecteurs']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyAgenda']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyGGMap']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyGallery']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyPresse']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyMap']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyContact']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyContactGen']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyGeneral']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyCompte']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyCommission']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyBureau']").prettyPhoto({opacity: 0.35});
	jQuery("a[rel^='prettyConseil']").prettyPhoto({opacity: 0.35});
	
	jQuery(".clicker").click(function()
	{
		if (jQuery(".toggle:first").is(":hidden"))	{ jQuery(".toggle").slideDown("slow"); }
		else										{ jQuery(".toggle").slideUp("slow"); }
	});
	jQuery(".sitemap").click(function()
	{
		if (jQuery(".toggleSitemap:first").is(":hidden"))	{ jQuery(".toggleSitemap").slideDown("slow"); }
		else												{ jQuery(".toggleSitemap").slideUp("slow"); }
	});
	
});


function visibilite(thingId)
{
	var targetElement;
	targetElement = document.getElementById(thingId) ;
	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "block" ;
	}
	else
	{
		targetElement.style.display = "none" ;
	}
}
function del(location) 
{
	if (confirm('ATTENTION, toute suppression est definitive, proceder ?')) 
	{
		document.location.replace(location);
	}
}