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();	}/** * jQuery.fullBg * Version 1.0 * Copyright (c) 2010 c.bavota - http://bavotasan.com * Dual licensed under MIT and GPL. * Date: 02/23/2010**/(function($) {  $.fn.fullBg = function(){    var bgImg = $(this);		     function resizeImg() {      var imgwidth = bgImg.width();      var imgheight = bgImg.height();       var winwidth = $(window).width();      var winheight = $(window).height();       var widthratio = winwidth / imgwidth;      var heightratio = winheight / imgheight;       var widthdiff = heightratio * imgwidth;      var heightdiff = widthratio * imgheight;       if(heightdiff>winheight) {        bgImg.css({          width: winwidth+'px',          height: heightdiff+'px'        });      } else {        bgImg.css({          width: widthdiff+'px',          height: winheight+'px'        });		      }    }     resizeImg();    $(window).resize(function() {      resizeImg();    });   };})(jQuery)	$(document).ready(function(){		$("#ongletEvent").tabs({        fx: {             opacity: 'toggle'         }    });			$(window).load(function() {		$("#bgVoeux").fullBg();	});		if (jQuery.browser.safari && document.readyState != "complete"){	    //console.info('ready...');	    setTimeout( arguments.callee, 100 );	    return;	  } 		//animation des pubicites	if($('ul#pubZone_1').length!=0)		{		$('ul#pubZone_1').animatedinnerfade({			timeout: 5000,			type: 'sequence',			animationSpeed: 5000,			animationtype: 'fade',			controlBox: 'none',			displayTitle: 'none'		});	}		if($('ul#pubZone_2').length!=0)		{		$('ul#pubZone_2').animatedinnerfade({			timeout: 5000,			type: 'sequence',			animationSpeed: 5000,			animationtype: 'fade',			controlBox: 'none',			displayTitle: 'none'		});	}		if($('ul#pubZone_3').length!=0)		{		$('ul#pubZone_3').animatedinnerfade({			timeout: 5000,			type: 'sequence',			animationSpeed: 5000,			animationtype: 'fade',			controlBox: 'none',			displayTitle: 'none'		});	}		if($('ul#pubZone_4').length!=0)		{		$('ul#pubZone_4').animatedinnerfade({			timeout: 5000,			type: 'sequence',			animationSpeed: 5000,			animationtype: 'fade',			controlBox: 'none',			displayTitle: 'none'		});	}		if($('ul#pubZone_5').length!=0)		{		$('ul#pubZone_5').animatedinnerfade({			timeout: 5000,			type: 'sequence',			animationSpeed: 5000,			animationtype: 'fade',			controlBox: 'none',			displayTitle: 'none'		});	}		if($("ul#navigation").length!=0)		{		menu_verti("a","ul#navigation");		}    /*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 ;		$('.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).children("img").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();	}$("a.colorbox").colorbox();$("a[target='clickNflip']").click(function(){	urlPage=$(this).attr('href')	//window.open(url,'clickNflip');	clickNflipWindow = window.open(urlPage,'clickNflip','fullscreen,toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0,  left=0, top=0');	clickNflipWindow.focus();	return false;	});$("a.sommaireCripp").hover(function(){	titleRub = $(this).children().attr('alt');	$("#titreSommaireCripp").html(titleRub);});$("a.sommaireCripp").mouseout(function(){	$("#titreSommaireCripp").html('');});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();		});	}/*if($.browser.msie && $.browser.version=="6.0")	{	}else	{	if($(".scrollVerticale").length!=0)		{		$(".scrollVerticale").jCarouselLite({				vertical: true,				hoverPause:true,				visible: 4,				auto:3500,				speed:500			});		}	}*//*Rewrite #anchor links for pages with BASE HREF*/var anchors = document.getElementsByTagName("a");var basehref = document.getElementsByTagName("base")[0].href;var url = window.location.href;if(url.indexOf("#") > 0) url = url.substr(0, url.indexOf("#")); //strip hashif(basehref) { for(var i = 0; i < anchors.length; i++) {  var anchor = anchors[i];  poundPos = anchor.href.indexOf("/#");  if (poundPos > 0) {   anchor.href = url + anchor.href.substr(poundPos + 1);  } }}//onglet événementif($("#ongletEvent").length!=0)	{	$(".tabContent").each(function(i){        this.id = "#" + this.id;		});	$(".tabContent").not(":first").hide();	$("#ongletEvent a").click(function() {        var idTabTmp = $(this).attr("href");		var TabIdTab = idTabTmp.split("#");        $(".tabContent").hide();        $("div[id='#" + TabIdTab[1] + "']").fadeIn();        return false;		});    	}});
