$(document).ready(function() {
	
	// ----- on load activation
	// tools tips 
	
		
		//    $("#a1").tooltip({ effect: 'slide'});  

	// gallery
	
	//$('#div_accordions .images .div_content').css('display','block');
	//$('#div_accordions .images .section').addClass("active");
	//$('#div_accordions .images .plus').toggle();

	var myGalleryUrl = $('iframe').attr('src'); 
	$('iframe').attr( 'src', '' );
	
	$("#div_accordions .iframe").toggle(
	function(){ 
	//alert(myGalleryUrl);	
	
		$(this).next().toggle(); 			
	    $(this).children('.plus').toggle(); 
		$(this).children('.moins').toggle(); 
		$(this).toggleClass("active");	
		$('iframe').attr( 'src', myGalleryUrl );
		
		   return false;
			  },
			  
			  function(){
			  	$(this).next().toggle();
			  	$(this).children('.plus').toggle();
			  	$(this).children('.moins').toggle();
			  	$('iframe').attr('src', '');
			  	return false;
			  }	
	   
	);	
		
	// ----- on clic 
	
	$("#div_accordions .section").click(function(){ 	// element clicable
	    $(this).next().toggle(); 				// affiche/masque element DOM suivant
	    $(this).children('.plus').toggle(); 
		$(this).children('.moins').toggle(); 
		$(this).toggleClass("active");		// change la classe
	    return false;
	});
	
	
	// ----- on rollover
	$("#div_accordions .section").hover(function(){ 
			$(this).addClass("hover");	
			},function(){
			$(this).removeClass("hover");// element clicable
	});
	
	// ----- links navigation gallery
	$("#div_gallery a").click(function(){
		$("#div_gallery a").removeClass("active");
		$(this).toggleClass("active");		
	});
	
	// load with ajax .... useless in this case (sic)
	$(".a_gallery").click(function(){ 
		var myurl = $(this).attr('href') +' .picturecontainer';
		$('#div_gallery_content').load(myurl);
		 return false;
	});
	$(".point a").tooltip({
			relative:'true',
			effect: 'fade',
			position: 'bottom right'
	}); 
		
	
});
