jQuery(document).ready(function() {
	
	//home colonne même taille
	jQuery("#equalheight").equalheight();
	
	// liens d'evitement
	jQuery("div.accessibilite").addClass('accessibilite_off');
	jQuery("div.accessibilite a").focus(function(){
		jQuery(this).parent().parent().parent().removeClass('accessibilite_off');
	});

	jQuery("div.accessibilite a").blur(function(){
		jQuery(this).parent().parent().parent().addClass('accessibilite_off');
	});

	

	jQuery("a.new_window, a.popup, a.spip_out, a.spip_in, a.file").click(function() {
		
		c = jQuery(this).attr('class');
		
		if (c == 'spip_in')
		{
			t = jQuery(this).attr('type'); //seulement les documents dans le corps du texte
			if (t)
			{
				window.open(jQuery(this).attr('href'));	
			}
			else
				return true;
		}
		else
		{
			window.open(jQuery(this).attr('href'));
		}
		return false;
	});
	
	//blocs en savoir plus
	jQuery('h3.blocs_titre').each(function(){
        
        	jQuery(this).bind('click', function(){
            
            	if (jQuery(this).hasClass('on')) jQuery(this).removeClass('on');
           	 else jQuery(this).addClass('on');
            
           	 return false;
            
        	});
   	 });

});

function show_popup(url, width, height)
{
	x = ( screen.width - width ) / 2;
	y = ( screen.height - height ) / 2;

	var ref = window.open(url, '', 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,menuBar=0,width='+width+',height='+height+',screenX='+x+',left='+y+',screenY='+y+',top='+y);
	ref.focus();
	return false;
}


