function menu_verti() {/** collapsor (1.1) // 2009.02.27 // <http://plugins.jquery.com/project/collapsor>* * REQUIRES jQuery 1.2.3+ <http://jquery.com/>* * Copyright (c) 2008 TrafficBroker <http://www.trafficbroker.co.uk>* Licensed under GPL and MIT licenses* * collapsor opens and closes sublevel elements, like a collapsable menu** We need to select the clickable elements that trigger the opening action of the sublevels: $('#menu ul li a').collapsor();* The sublevel element must be in the same level than the triggers** Sample Configuration:* $('ul a').collapsor();* * Config Options:* openClass: Class added to the element when is open // Default: 'open'* sublevelElement: Element that must open or close // Default: 'ul'* closeOthers: Close other elements when opening // Default: false* speed: Speed for the opening animation // Default: 500* easing: Easing for the opening animation. Other than 'swing' or 'linear' must be provided by plugin // Default: 'swing'* * We can override the defaults with:* $.fn.collapsor.defaults.speed = 1000;* * @param  settings  An object with configuration options* @author    Jesus Carrera <jesus.carrera@trafficbroker.co.uk>*/(function($) {$.fn.collapsor = function(settings) {	// override default settings	settings = $.extend({}, $.fn.collapsor.defaults, settings);	var triggers = this;	// for each element	return this.each(function() {	  if ($(this).find('+ ' + settings.sublevelElement).length ) {      $(this).addClass(settings.activeClass);    }		// occult the collapsing elements		$(this).find('+ ' + settings.sublevelElement).hide();		//show the opened		if($(this).hasClass(settings.openClass)){			$(this).find('+ ' + settings.sublevelElement).show();		}		// event handling	  $(this).click(function() {			// if the new active have sublevels			if ($(this).next().is(settings.sublevelElement)){				// blur and add the open class to the clicked				$(this).blur().toggleClass(settings.openClass);				// close others				if (settings.closeOthers == true) {				  				  $(this).parent().parent().children().find('.'+settings.openClass).not(this).removeClass(settings.openClass).next().animate({height:'toggle', opacity:'toggle'}, settings.speed, settings.easing);				}				// toggle the clicked				$(this).next().animate({height:'toggle', opacity:'toggle'}, settings.speed, settings.easing);				return false;			}	   });	});};// default settings$.fn.collapsor.defaults = {	openClass:'open',	activeClass: 'afficherSousMenu',	sublevelElement: 'ul',	closeOthers: true,	speed: 500,	easing: 'swing'};})(jQuery);$("a", ".interne ul#navigation").collapsor();  $("span", "#listeBib").collapsor();  }function changepass()	{	$('#passuser').show();	$('#passuserfalse').remove();	$('#passuser').focus();	}	$(document).ready(function(){	if($("ul#navigation").length!=0)		{		menu_verti("a","ul#navigation");		}	if($(".interne h2").length!=0)		{		$(".interne h2").each(function(){			contenuHtml = $(this).html();			contenuHtmlBis = "<span class=\"bgG\">&nbsp;</span><span class=\"bgD\">"+contenuHtml+"</span>";			$(this).html(contenuHtmlBis);			});		}  /*if($('#tabsOnglet').length!=0)	{	$('#tabsOnglet').tabs();	}*/if($('.interne .centre h2').length!=0)	{	//$('.interne .centre h2').prepend('>> ');	}if((".afficherReponse").length!=0)	{	$("li.afficherReponse:not(.activeqa)").children(".reponse").hide();	$("li.afficherReponse span").click(function() { 		if($(this).parent().hasClass("activeqa")) {			$(this).next("div").slideUp("slow",function() {				$(this).parent().removeClass("activeqa");			});		} else {			$(this).next("div").slideDown("slow",function() {				$(this).parent().addClass("activeqa");			});		  }		return false;	    });	}	if((".accordeon").length!=0)	{	$(".accordeon:not(.activeqa)").children(".texte_accordeon").hide();	$(".accordeon>p").click(function() { 		if($(this).parent().hasClass("activeqa")) {			$(this).next("div").slideUp("slow",function() {				$(this).parent().removeClass("activeqa");			});		} else {			$(this).next("div").slideDown("slow",function() {				$(this).parent().addClass("activeqa");			});		  }		  return false;	    });	}if($(".premierBlock").length!=0 || $('.deuxiemeBlock').length!=0 || $('.troixiemeBlock').length!=0)	{	$(".premierBlock").addClass('cptBlock');	$(".deuxiemeBlock").addClass('cptBlock');	$(".troixiemeBlock").addClass('cptBlock');			if($(".cptBlock").length!=0)		{		var cpt=1;		for(j=0;j<$(".cptBlock").length;j++)			{			if(cpt%2!=1)				{				$(".cptBlock").eq(j).after("<div class=\"clearLeft\"></div>");				}			cpt++;			}		}		var maxi=0;	var hauteur1 = $('.premierBlock').height();	var hauteur2 = $('.deuxiemeBlock').height();	var hauteur3 = $('.troixiemeBlock').height();	if(hauteur1>hauteur2)		{		maxi=hauteur1;		}	else		{		maxi=hauteur2;		}	if(maxi<hauteur3)		{		maxi=hauteur3;		}		if(maxi!=0)		{		maxi = maxi - 23;		$('.premierBlock .bgBase .bgCentre').css('height',maxi+'px');		$('.deuxiemeBlock .bgBase .bgCentre').css('height',maxi+'px');		$('.troixiemeBlock .bgBase .bgCentre').css('height',maxi+'px');		}	}	/*if($(".premierBlock").length!=0 || $('.deuxiemeBlock').length!=0 || $('.troixiemeBlock').length!=0)		{		var variable1 = 0;		var variable2 = 0;		var hauteur = 0;		if($(".cptBlock_1").length!=0)			{			tempVar = $(".cptBlock_1").position();			variable1 = tempVar.top;			}		if($("#cptPosition_2").length!=0)			{			tempVar2 = $("#cptPosition_2").position();			variable2 = tempVar2.top;			}		hauteur = variable2 - variable1;		alert(hauteur);		}*/	if($(".centre .legende").length!=0)	{	$(".centre .legende").each(function(){		var altImage = $(this).attr("alt");		var srcImage = $(this).attr("src");		var classImage = $(this).attr("class");		var lageurImage = $(this).width();		$(this).after("<span style=\"width:"+lageurImage+"px;display: block;\" class=\""+classImage+"\"><img src=\""+srcImage+"\" alt=\""+altImage+"\" /><br /><span class=\"texteLegende\">"+ altImage +"</span></span>");		$(this).hide();		});	}	if($('.blockGris').length!=0)	{	$(".blockGris").each(function(){		contenuHtml = $(this).html();		contenuHtmlBis = "<div class=\"bgBase\"><div class=\"bgCentre\">"+contenuHtml+"</div></div>";		$(this).html(contenuHtmlBis);	});	}if($("a.grande_image").length!=0)	{	$("a.grande_image").colorbox();	}if($("a[rel='reportage_photo']").length!=0)	{	$("a[rel='reportage_photo']").colorbox();	}	if($("#menu").length!=0)	{	$("#menu ol li > a").hover(function(){		$(this).next("ul.surMenu").show();		if($(this).hasClass("hoverParent"))			{			$(this).removeClass("hoverParent");			$(this).addClass("temps");			}		},		function(){			$(this).next("ul.surMenu").hide();			if($(this).hasClass("temps"))				{				$(this).addClass("hoverParent");				$(this).removeClass("temps");				}		});	$("#menu ol li > ul").hover(function(){			$(this).parent().addClass("sousMenuOuvert");			$(this).parent().addClass("tempsHover");			$(this).show();		},		function(){			$(this).parent().removeClass("sousMenuOuvert");			$(this).parent().removeClass("tempsHover");			$(this).hide();		});	}});
