
function nettoyer_marqueur(chaine) {
	chaine = chaine.replace('\n', '', 'g');
	chaine = chaine.replace("'", '_', 'g');

	chaine = chaine.replace(/ /gi, '_');
	chaine = chaine.replace(/’/gi, '_');
	chaineLength = chaine.length;
	for(var i=0; i<chaineLength; i++ ) {
		// On vérifie que chaque caractére de la chaine est un chiffre, un lettre ou un '_'
		if (!(
			(chaine.charCodeAt(i) > 47 && chaine.charCodeAt(i) < 58)
			||
			(chaine.charCodeAt(i) > 64 && chaine.charCodeAt(i) < 91)
			||
			(chaine.charCodeAt(i) > 96 && chaine.charCodeAt(i) < 123)
			||
			chaine.charCodeAt(i) == 95)
		) {
			if (chaine.charCodeAt(i) == 192
				||chaine.charCodeAt(i) == 193
				||chaine.charCodeAt(i) == 194
				||chaine.charCodeAt(i) == 195
				||chaine.charCodeAt(i) == 196
				||chaine.charCodeAt(i) == 197
				||chaine.charCodeAt(i) == 224
				||chaine.charCodeAt(i) == 225
				||chaine.charCodeAt(i) == 226
				||chaine.charCodeAt(i) == 227
				||chaine.charCodeAt(i) == 228
				||chaine.charCodeAt(i) == 229) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'a', 'g');
			}
			else if (chaine.charCodeAt(i) == 210
				||chaine.charCodeAt(i) == 211
				||chaine.charCodeAt(i) == 212
				||chaine.charCodeAt(i) == 213
				||chaine.charCodeAt(i) == 214
				||chaine.charCodeAt(i) == 215
				||chaine.charCodeAt(i) == 216
				||chaine.charCodeAt(i) == 242
				||chaine.charCodeAt(i) == 243
				||chaine.charCodeAt(i) == 244
				||chaine.charCodeAt(i) == 245
				||chaine.charCodeAt(i) == 246
				||chaine.charCodeAt(i) == 248) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'e', 'g');
			}
			else if (chaine.charCodeAt(i) == 200
				||chaine.charCodeAt(i) == 201
				||chaine.charCodeAt(i) == 202
				||chaine.charCodeAt(i) == 203
				||chaine.charCodeAt(i) == 232
				||chaine.charCodeAt(i) == 233
				||chaine.charCodeAt(i) == 234
				||chaine.charCodeAt(i) == 235) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'e', 'g');
			}
			else if (chaine.charCodeAt(i) == 199
				||chaine.charCodeAt(i) == 231) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'c', 'g');
			}
			else if (chaine.charCodeAt(i) == 204
				||chaine.charCodeAt(i) == 205
				||chaine.charCodeAt(i) == 206
				||chaine.charCodeAt(i) == 207
				||chaine.charCodeAt(i) == 236
				||chaine.charCodeAt(i) == 237
				||chaine.charCodeAt(i) == 238
				||chaine.charCodeAt(i) == 239) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'i', 'g');
			}
			else if (chaine.charCodeAt(i) == 217
				||chaine.charCodeAt(i) == 218
				||chaine.charCodeAt(i) == 219
				||chaine.charCodeAt(i) == 220
				||chaine.charCodeAt(i) == 249
				||chaine.charCodeAt(i) == 250
				||chaine.charCodeAt(i) == 251
				||chaine.charCodeAt(i) == 252) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'u', 'g');
			}
			else if (chaine.charCodeAt(i) == 255
				||chaine.charCodeAt(i) == 209
				||chaine.charCodeAt(i) == 241) {
				var re = new RegExp(chaine.charAt(i));
				chaine = chaine.replace(re, 'y', 'g');
			}
			chaine = chaine.replace(',', '', 'g');
			chaine = chaine.replace('!', '', 'g');
			chaine = chaine.replace('?', '', 'g');
			chaine = chaine.replace(';', '', 'g');
			chaine = chaine.replace('&nbsp;', '', 'g');
			chaine = chaine.replace('&nbsp', '', 'g');
		}
	}
	return chaine.toLowerCase();
}



function addToMyOseo() {
	$.ez('xajax::addtomyoseo',
				{ url:location.href, name:$('#yahoopath').text()},
				function(data){
					if (data.length>0)
						alert(data)
				});
}

$(document).ready( function () {
$("#offreopenmodule").live('click',function(){
	//alert("toto");
	openModOffres();
});
    // On cache les sous-menus :
    $(".yearConteneur").filter(function(){return $(this).parent().is('.on')?false:true;}).hide();

	$(".lienYear").filter(function(){return $(this).parent().is('.on')?false:true;}).click(function () {
	var divContent = $(this).siblings();
		if (divContent.css("display" ) == "none"){
			$(".yearConteneur").filter(':visible').filter(function(){return $(this).parent().is('.on')?false:true;}).slideUp("slow");
			divContent.slideDown("slow");
		}else{
			divContent.slideUp("slow");
		}
	});

	washEmails();
	
	//controler dewplayer
	$(".dewplayerControl").hide();
	$(".showPlayer").click(function(){
		$(".dewplayerControl").hide();
		$(this).parent().parent().find(".dewplayerControl").show();
		id = $(this).parent().parent().find(".dewplayerControl").attr('id');
		setTimeout("play(id)",200);
		return false;
	});
} );

function play(id_player) {
  var dewp = document.getElementById(id_player);
  if(dewp!=null) dewp.dewplay();
}

var ltie7 = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent);
var ltie9 = $.browser.msie && /MSIE\s(5\.5|6|7|8\.)/.test(navigator.userAgent);

$(function(e) {

	if (($('body.soutienpme').size()!=0)||($('body.mediateurcredit').size()!=0) && ($('body.pca').size()==0)) {
		$('.contenu_item > h4').mouseover(function(){
			$(this).css({
						textDecoration: "underline",
						color: "#EB0438",
						cursor: "pointer"
			});
		}).mouseout(function(){
			$(this).css({
						textDecoration: "none",
						color: "#7A6D69",
						cursor: "none"
			});
		});
	}
	
	adjustSelects();
	//$('.encarts_rubs .box_encart').adjustSize({periode:2});

	if (ltie7) {
		$('img[src$=png]').filter(function(){
			if ($(this).parents('#actionBlock').is('#actionBlock')) {
				return false;
			} else {
				return true;
			}
		}).ifixpng();
	}

	// on Ajuste la largeur du la balise p de ZoomSur pour faire de la place au logo
	if($('#listeSousRubriques li .vignetteZS').size() > 0){
		$('.vignetteZS').each(function(){
			var widthLi 		= parseInt($('#listeSousRubriques li').width());
			var widthVignette 	= parseInt($(this).width()) + parseInt($(this).css('margin-right').replace('px', ''));
			var widthPaddingLP 	= parseInt($('.zoomSur p').css('padding-left').replace('px', ''));
			var widthPaddingLZS = parseInt($('#listeSousRubriques .zoomSur').css('padding-left').replace('px', ''));
			var width = widthLi - widthVignette - widthPaddingLP - widthPaddingLZS;
			$(this).parent().find(' > p').css('width', width);
		});
	}


	/* MISE EN FORME TABLE */
	$('table.renderedtable tbody tr:odd').addClass('odd');
	$('table.renderedtable tbody tr:even').addClass('even');
	$('.renderedtable tr th:last').css("border-right","1px solid #999");

	/**
	 Menu Onglet Région
	*/
	if ($('#ongletReg').size() > 0){
		$('#ongletReg > li').mouseover(function(){
			 $(this).find('>a > img ').each(function(){
			 	var src = $(this).attr('src');
			 	if ($(this).attr('class')=="ongOff")
			 		$(this).attr('src',src.replace('_off','_on'));
			 });
		}).mouseout(function(){
			 $(this).find('>a > img ').each(function(){
			 	var src = $(this).attr('src');
			 	if ($(this).attr('class')=="ongOff")
			 		$(this).attr('src',src.replace('_on','_off'));
			 });
		});
	}

	/** Gestion encart depliable **/
	if($('.closedBlock').size() > 0){
		$('.closedBlock h2').click(function(){
			var elmt=$(this).parent();
			if (elmt.is('.closedBlock')){
				elmt.removeClass('closedBlock').addClass('openedBlock');
				$(this).parent().parent().find('.triangle').each(function(){
					var src = $(this).attr('src');
					$(this).attr('src',src.replace('_dyn','_dyn_bas'));
				});
			}
			else{
				elmt.removeClass('openedBlock').addClass('closedBlock');
				$(this).parent().parent().find('.triangle').each(function(){
					var src = $(this).attr('src');
					$(this).attr('src',src.replace('_dyn_bas','_dyn'));
				});
			}
		});
	}

	$("img.toZoomImage").click(function(e){

			var offset = -100;
			var header = 25;
			var hauteurFooter = 20;

			var explode_url = $(this).attr('rel').split('?');
			var url = explode_url[0];

			var explode_size_video =  explode_url[1].split("&");

			var width_video =  explode_size_video[0].split("=")[1];

			var height_video = parseInt(explode_size_video[1].split("=")[1]);





			$("body").prepend("<div id='AnimFlash' class='contentToZoom' >\n\t\t<div class='headOOTB'><a class='fermerZoom' href='#'  onclick='fermerZoom();' class='float_right' ><img width='17' height='15' onclick='fermerZoom();' title='Fermer' alt='Fermer' src='/extension/oseo/design/oseov5/images/Fenetre_Off.gif' id='closeOOTB'/></a></div><div id='player' ><img src='"+url+"'/></div>\n\t\t\n\t</div><div id='bgOOTB'></div>\n");

			var width 		= width_video;
			var height 		= height_video+header;

			var hauteurScreen=((document.documentElement.clientHeight/2)+document.documentElement.scrollTop)-(height_video/2)-header;
			var marginTop	= hauteurScreen+'px';
			var marginLeft 	= ((document.documentElement.clientWidth/2)-(width_video/2))+'px';

			$("#bgOOTB").height( document.documentElement.clientHeight+document.documentElement.scrollTop);
			$('.contentToZoom').css({
				height: height+'px',
				marginTop: marginTop,
				marginLeft: marginLeft,
				width: width+'px',
				overflow: 'none'
			}).show();

		function zoomOnResize() {
			var hauteurScreen=document.documentElement.scrollTop+document.documentElement.clientHeight;
			var hauteurBody=$('body').height();

			$("#bgOOTB").height( hauteurBody);
		}

		closeOOTB();
		zoomOnResize();

	});

	$(".videos h4").click(function(){ $(this).find("img.toZoom").click(); });


	$("img.toZoom, a.toZoom").click(function(){
		var instance = $(this);

		var offset = -100;
		var header = 25;

		var expression = /[?=]+/g;

		$('.contentToZoom').remove();

		var explode_url = $(this).attr('rel').split('?');
		var url = explode_url[0];

		var explode_size_video =  explode_url[1].split("&");

		var width_video =  explode_size_video[0].split("=")[1];

		var height_video = parseInt(explode_size_video[1].split("=")[1]);

		$iNbreChar = url.length;

		$("#footer").hide();
		function zoomOnResize() {
			var hauteurScreen=document.documentElement.scrollTop+document.documentElement.clientHeight;
			var hauteurBody=document.documentElement.scrollTop+$('body').height();
			$("#bgOOTB").height( (hauteurScreen > hauteurBody) ? hauteurScreen : hauteurBody+45);
		}


		switch (url.substring($iNbreChar - 4, $iNbreChar)){
			// player flash video flv
			case '.flv':

					$("body").prepend("<div id='AnimFlash' class='contentToZoom' >\n\t\t<div class='headOOTB'><a class='fermerZoom' href='#'  onclick='fermerZoom();' class='float_right' ><img width='17' height='15' onclick='fermerZoom();' title='Fermer' alt='Fermer' src='/extension/oseo/design/oseov5/images/Fenetre_Off.gif' id='closeOOTB'/></a></div><div id='player' >This text will be replaced</div>\n\t\t\n\t</div><div id='bgOOTB'></div>\n");
					var so = new SWFObject('/extension/oseo/design/oseov5/images/swf/player.swf','mpl',width_video,height_video,'9');
					so.addParam('allowscriptaccess','always');
					so.addParam('allowfullscreen','true');
					so.addParam('flashvars','&file='+url+'&image='+$(this).attr('preview')+'&backcolor=#67504A&frontcolor=#FFFFFF&lightcolor=#FFAD01&screencolor=#67504A&stretching=exactfit');
					so.write('player');
					var width 		= width_video;
					var height 		= height_video+header;
					var marginLeft 	= -(Math.floor(width/2));
					var marginTop	= -(Math.floor(height/2))+offset;
					$('.contentToZoom').css({
						height: height+'px',
						marginTop: marginTop,
						marginLeft: marginLeft,
						width: width+'px'
					}).show();
				/*	instance.TransferTo({
						to:'contentToZoom',
						className:'transferer3',
						duration: 400,
						complete: function() {
							$("#contentToZoom").show();
							$("#contentToZoom object").css('margin-top',($('#contentToZoom').height()-$("#contentToZoom object").height())/2-40);
						}
					});*/
				break;

			case '.swf':
					var url_param = $(this).attr('rel');
					var reg= new RegExp("[ ,;]+", "g");
					var split_url_param = url_param.split(reg);

					var url = split_url_param[2];
					var width_anim = parseInt(split_url_param[0]);
					var height_anim = parseInt(split_url_param[1]);
					//alert(url);
					$("body").prepend("<div id='AnimFlash' class='contentToZoom' >\n\t\t<div class='headOOTB'><a class='fermerZoom' href='#'  onclick='fermerZoom();' class='float_right' ><img width='17' height='15' onclick='fermerZoom();' title='Fermer' alt='Fermer' src='/extension/oseo/design/oseov5/images/Fenetre_Off.gif' id='closeOOTB'/></a></div><div id='player' >This text will be replaced</div>\n\t\t\n\t</div><div id='bgOOTB'></div>\n");

					var so = new SWFObject(url,'mpl',width_anim,height_anim,'9');

					so.addParam('allowscriptaccess','always');
					so.addParam('allowfullscreen','true');
					so.write('player');

					//alert($('#player').get(0).innerHTML);
					//document.write($('#player').get(0).innerHTML);
					var width 		= width_anim;
					var height 		= height_anim+header;
					var marginLeft 	= -(Math.floor(width/2));
					var marginTop	= -(Math.floor(height/2))+offset;
					$('.contentToZoom').css({
						height: height+'px',
						marginTop: marginTop,
						marginLeft: marginLeft,
						width: width+'px'
					}).show();
				break;
			// Image
			default :
				// On test la présence de titre pour les images
				//console.log($(this).attr('title'));
				if($(this).attr('title') != undefined){
					var hauteurFooter 	= 20;
					var footer 			= "<div class='footerImage'>"+$(this).attr('title')+"</div>";
				}
				else{
					var hauteurFooter 	= 0;
					var footer 			= '';
				}
				$("body").prepend("<img class='imgTemp' src='"+$(this).attr('rel')+"' />");
				$("body").prepend("<div class='contentToZoom' >\n\t\t<div class='headOOTB'><a class='fermerZoom' href='#'  onclick='fermerZoom();' class='float_right' ><img width='17' height='15' onclick='fermerZoom();' title='Fermer' alt='Fermer' src='/extension/oseo/design/oseov5/images/Fenetre_Off.gif' id='closeOOTB'/></a></div><img src='"+$(this).attr('rel')+"' />\n\t\t\n\t"+footer+"</div><div id='bgOOTB'></div>\n");

				$('.imgTemp').load(function(){
					var width 		= $(".imgTemp").width();
					var height 		= $(".imgTemp").height()+header+hauteurFooter;
					var marginLeft 	= -(Math.floor(width/2));
					var marginTop	= -(Math.floor(height/2))+offset;
					$(this).remove();
					$('.contentToZoom').css({
						height: height+'px',
						marginTop: marginTop,
						marginLeft: marginLeft,
						width: width+'px'
					}).show();
	/*				instance.TransferTo({
							to:'contentToZoom',
							className:'transferer3',
							duration: 400,
							complete: function() {
								$("#contentToZoom").show();
								$("#contentToZoom img").css('margin-top',($('#contentToZoom').height()-$("#contentToZoom img").height())/2-40);
							}
					});*/
				});
				break;

		}
		closeOOTB();
		zoomOnResize();

	});


	/* recallage de l'annexe pour les page satellite */
	if ($('.satellite').size()>0){
		$('#titre_satellite').find("img").each(function(){
			var hauteur = $(this).height()+"px";
			$(this).parent().parent().find("#annexes").css('margin-top',"-"+hauteur);
		});
	}

	/* recallage de l'annexe pour les page satellite */
	if ($('.satellite').size()>0){
		$('#titre_satellite').each(function(){
			var hauteur = $(this).height()+"px";
			$(this).parent().parent().find("#annexes").css('margin-top',"-"+hauteur);
		});
	}

	// MENU
	menu.init();

	// FORM FAQ
	faqFormControle.init();

	// Ajout de l'animation flash 'oseo en bref'
	if ($('#oseoEnBref').size()==0){
		$('#encart_en_bref').click(function(){
			openOOTB_OSEO_en_bref();
		});
	}

	// Menu gauche SelectBox page projet
	$('#projetMenu').change(function(){window.location=$('#projetMenu').val();});

	// Gestion FAQ //
		$("#contenu .listeFAQ > li").find( ".contenuFaq").addClass( 'contenuFaqCacher').end().find( ".titreFaq").css('cursor','pointer').hover(function(){
			$(this).css('color','#eb0438');
		},function(){
			$(this).css('color','');
		}).toggle(function() {
			$(this).addClass('open').parent().find(".contenuFaq").removeClass( 'contenuFaqCacher').slideDown();
		},function() {
			$(this).removeClass('open').parent().find(".contenuFaq").slideUp(function(){$(this).addClass( 'contenuFaqCacher').show()});
		});
	// Fin gestion FAQ //

	//////////////////////////////////////////////////////////////////////////////////
	//							 Recherche avancé temoignage						//
	//////////////////////////////////////////////////////////////////////////////////

	// Formulaire
	if ($('#recherchePE_id').size()>0){
		$('#recherchePE_id').submit(function(){
			if (	$('select#temType_id').val() != 01 &&
					(	$('#temType_id').val() == -1 &&
						$('#diffuseLe_id').val() == -1 &&
						$('#region_id').val() == -1 &&
						$('#creerLe_id').val() == -1 &&
						$('#effectif_id').val() == -1 &&
						$('#megaSect_id').val() == -1 &&
						$('#chiffreAff_id').val() == -1 &&
						$('#pourcent_CARD_id').val() == -1 &&
						$('#CAExport_id').val() == -1
					)
				) {
				alert("Veuillez choisir au moins l’un des critères suivants :\n\t- Type d'article\n\t- Diffusé depuis\n\t- Entreprise créée depuis\n\t- Méga-secteur/Secteur\n\t- Région\n\t- Effectif\n\t- Chiffre d’affaires\n\t- Part CA à l’export\n\t- Part CA en R&D");
				return false;
			}
			else{
				return true;
			}
		});

		$('#megaSect_id').change(function(){
			displaySecteur();
			/*$('#secteurAppli_id, #secteurInno_id').css('visibility', 'hidden');*/
		});

		function displayPartType(object){
			switch(object.val()) {
				case '01':
					$('label[for=creerLe_id]').hide();
					$('#creerLe_id').hide().parent('span').hide();
					$('label[for=effectif_id]').hide();
					$('#effectif_id').hide().next('br').hide();
					$('label[for=megaSect_id]').hide();
					$('#megaSect_id').hide().parent('span').hide();

					$('label[for=chiffreAff_id]').hide();
					$('#chiffreAff_id').hide().next('br').hide();
					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=CAExport_id]').hide();
					$('#CAExport_id').hide().parent('span').hide();
					$('label[for=typePart_id]').hide();
					$('#typePart_id').hide();
					//$('#not01').hide();

					break;
				case 'rtl':
					$('label[for=creerLe_id]').hide();
					$('#creerLe_id').hide().parent('span').hide();
					$('label[for=effectif_id]').hide();
					$('#effectif_id').hide().next('br').hide();
					$('label[for=megaSect_id]').hide();
					$('#megaSect_id').hide().parent('span').hide();

					$('label[for=chiffreAff_id]').hide();
					$('#chiffreAff_id').hide().next('br').hide();
					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=CAExport_id]').hide();
					$('#CAExport_id').hide().parent('span').hide();
					$('label[for=typePart_id]').hide();
					$('#typePart_id').hide();
					//$('#not01').hide();

					break;
				case 'enp':
					$('label[for=creerLe_id]').hide();
					$('#creerLe_id').hide().parent('span').hide();
					$('label[for=effectif_id]').hide();
					$('#effectif_id').hide().next('br').hide();
					$('label[for=megaSect_id]').hide();
					$('#megaSect_id').hide().parent('span').hide();

					$('label[for=chiffreAff_id]').hide();
					$('#chiffreAff_id').hide().next('br').hide();
					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=CAExport_id]').hide();
					$('#CAExport_id').hide().parent('span').hide();
					$('label[for=typePart_id]').hide();
					$('#typePart_id').hide();
					//$('#not01').hide();

					break;
				case 'moci':
					$('label[for=creerLe_id]').hide();
					$('#creerLe_id').hide().parent('span').hide();
					$('label[for=effectif_id]').hide();
					$('#effectif_id').hide().next('br').hide();
					$('label[for=megaSect_id]').hide();
					$('#megaSect_id').hide().parent('span').hide();

					$('label[for=chiffreAff_id]').hide();
					$('#chiffreAff_id').hide().next('br').hide();
					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=secteurInno_id]').hide();
					$('#secteurInno_id').hide().parent('span').hide();
					$('label[for=pourcent_CARD_id]').hide();
					$('#pourcent_CARD_id').hide().next('br').hide();

					$('label[for=CAExport_id]').hide();
					$('#CAExport_id').hide().parent('span').hide();
					$('label[for=typePart_id]').hide();
					$('#typePart_id').hide();
					//$('#not01').hide();

					break;
				case 'fi':
				//	$('#not01').show();
					$('#typePart_id').show();
					$('#typePart_id').removeAttr('disabled');
					$('#labelTypePart').show();

					$('label[for=creerLe_id]').show();
					$('#creerLe_id').show().parent('span').show();
					$('label[for=effectif_id]').show();
					$('#effectif_id').show().next('br').show();
					$('label[for=megaSect_id]').show();
					$('#megaSect_id').show().parent('span').show();

					$('label[for=chiffreAff_id]').show();
					$('#chiffreAff_id').show().next('br').show();
					$('label[for=secteurInno_id]').show();
					$('#secteurInno_id').show().parent('span').show();
					$('label[for=pourcent_CARD_id]').show();
					$('#pourcent_CARD_id').show().next('br').show();

					$('label[for=secteurInno_id]').show();
					$('#secteurInno_id').show().parent('span').show();
					$('label[for=pourcent_CARD_id]').show();

					$('label[for=CAExport_id]').show();
					$('#CAExport_id').show().parent('span').show();
		/*			$('label[for=typePart_id]').show();
					$('#typePart_id').show();*/

					break;
				default:
					$('#typePart_id').hide();
					$('#typePart_id').attr('disabled','disabled');
					$('#labelTypePart').hide();

					$('label[for=creerLe_id]').show();
					$('#creerLe_id').show().parent('span').show();
					$('label[for=effectif_id]').show();
					$('#effectif_id').show().next('br').show();
					$('label[for=megaSect_id]').show();
					$('#megaSect_id').show().parent('span').show();

					$('label[for=chiffreAff_id]').show();
					$('#chiffreAff_id').show().next('br').show();
					$('label[for=secteurInno_id]').show();
					$('#secteurInno_id').show().parent('span').show();
					$('label[for=pourcent_CARD_id]').show();
					$('#pourcent_CARD_id').show().next('br').show();

					$('label[for=secteurInno_id]').show();
					$('#secteurInno_id').show().parent('span').show();
					$('label[for=pourcent_CARD_id]').show();
					$('#pourcent_CARD_id').show().next('br').show();

					$('label[for=CAExport_id]').show();
					$('#CAExport_id').show().parent('span').show();
				/*	$('label[for=typePart_id]').show();
					$('#typePart_id').show();*/

					//$('#not01').show();
					break;

			}
		}

		// Affichage du type de partenariat si France info est selectionné
		$('select#temType_id').each( function(){
			displayPartType($(this));
		}).change( function(){
			displayPartType($(this));
		});
	}



	// Suppression du border du dernier Resultat
	$('#contenu.moteurPE').find('div.result:last').each( function(){
		$(this).css('border', 'none');
	});

	//////////////////////////////////////////////////////////////////////////////////
	//						 fin Recherche avancé temoignage						//
	//////////////////////////////////////////////////////////////////////////////////

	// Positionnement droite/gauche des li de liste Sous Rubriques.
	var adjustOptions = {
	  periode: 2,
	  margin_bottom : 25
	}

	var marginRight = '20px';
	if ($.browser.msie)  {
			var adjustOptions = {
			  periode: 2,
			  margin_bottom : 0
			}
			var marginRight = '12px';
	}
//	if (($('body.soutienpme').size()==0)&&($('body.mediateurcredit').size()==0) && ($('body.pca').size()==0)) $("#listeSousRubriques > li").not(".a_la_une").filter(":odd").css('marginRight','0').end().filter(":even").css('marginRight',marginRight).end().not('.orga').adjustSize(adjustOptions);

	// On vide les champs des formulaires au premier click
	$("#bourseTransmissionLogin input[type=text]").one("click", function(){this.value = ''; });
	$("#bourseTransmissionLogin input[type=password]").one("click", function(){this.value = ''; });
	$("#newsletterEmail").one("click", function(){this.value = ''; });
	$("#email").one("click", function(){this.value = ''; });
	$("#recherche_pe").one("click", function(){this.value = ''; });
	$("#rechercheAvanceeInput").one("click", function(){this.value = ''; });
	$("#recherche").one("click", function(){this.value = ''; });
	$("#sup_email").one("click", function(){this.value = ''; });

	// Controle formulaire contact
	$("#ContactForm").find("p[input#email]").after('<p>\n<label for="verif2_mail">Confirmez votre E-mail<span class="champObligatoire">*</span></label>\n<input id="verif2_mail" type="text" class="text"/>\n</p>').end().submit(function() {
		return verifForm();
	});

	// Gestion select Access Clients
	$("#accesClientsSelect").change(function(){
		if (this.selectedIndex > 0) window.open(this.options[this.selectedIndex].value,'accesclients'+this.selectedIndex);
	});


	// Contrôles du formulaire d'enregistrement de compte
	var CheckedForm=$("#registerForm, #userEditForm");
	$("#user_account_username", CheckedForm).parent().hide();
	if (CheckedForm.size() != 0) {
		CheckedForm.submit(function() {
			var errors='';
			var UserNameValue        = $("#user_account_username",     CheckedForm).val();
			var UserPassValue        = $("#user_account_pass",         CheckedForm).val();
			var UserPassConfirmValue = $("#user_account_pass_confirm", CheckedForm).val();
			var UserMailValue        = $("#user_account_mail",         CheckedForm).val();
			var RegionValue          = $("#region",                    CheckedForm).val();
			var SecteurActiviteValue = $("#sect_acti",                 CheckedForm).val();
			var DefinitionValue       = $("#definition",               CheckedForm).val();

			// On remplit le user name avec l'adresse email.
			//if (UserNameValue=='') errors = errors+"Le nom d'usager doit être renseigné.\n\n";
			if (UserNameValue=='') $("#user_account_username", CheckedForm).val(UserMailValue);
			if (UserMailValue == '') errors = errors+"	Vous devez indiquer un courriel.\n\n";
			if (UserPassValue=='') errors = errors+"	Le mot de passe doit être renseigné.\n\n";
			if (UserPassConfirmValue=='') errors = errors+"	Le mot de passe doit être confirmé.\n\n";
			if (UserPassValue != '' && UserPassConfirmValue!='' && UserPassValue != UserPassConfirmValue) errors = errors+"	Le mot de passe doit être identique dans le champ mot de passe et dans le champ de confirmation.\n\n";
			if (UserMailValue != '' && !isEmail(UserMailValue)) errors = errors+"	Le courriel indiqué est mal écrit.\n\n";
			if (RegionValue == '' || RegionValue == '0') errors = errors+"	La région n'est pas renseignée.\n\n";
			if (SecteurActiviteValue == '') errors = errors+"	Le secteur d'activité n'est pas renseigné.\n\n";
			if (DefinitionValue == '') errors = errors+"	Vous n'avez pas indiqué qui vous êtes.\n\n";

			if (errors) {
				alert("\nIl y a des erreurs dans le formulaire !\n\n\n"+errors);
				return false;
			}
			return true;
		});
	}

	$('#CancelButtonId').click(function() {
		location.href="/";
	});




	// Formulaire Informations investisseur
	var InfosInvestisseurForm=$("#InfosInvestisseurForm");
	InfosInvestisseurForm.submit(function(){
		var errors='';
		var societeValue    = $("#societe",    InfosInvestisseurForm).val();
		var addressValue    = $("#address",    InfosInvestisseurForm).val();
		var cpValue         = $("#cp",         InfosInvestisseurForm).val();
		var cityValue       = $("#city",       InfosInvestisseurForm).val();
		var telValue        = $("#tel",        InfosInvestisseurForm).val();
		var nb_investValue  = $("#nb_invest",  InfosInvestisseurForm).val();
		var invest_minValue = $("#invest_min", InfosInvestisseurForm).val();
		var invest_maxValue = $("#invest_max", InfosInvestisseurForm).val();

		if (societeValue=='') errors = errors+"	Vous devez indiquer le nom de votre société\n\n";
		if (addressValue=='') errors = errors+"	Vous devez indiquer l'adresse de votre société\n\n";
		if (cpValue=='') errors = errors+"	Vous devez indiquer le code postal de votre société\n\n";
		if (cityValue=='') errors = errors+"	Vous devez indiquer la ville où est située votre société\n\n";
		if (telValue=='') errors = errors+"	Vous devez indiquer le numéro de téléphone de votre société\n\n";
		if (nb_investValue=='') errors = errors+"	Vous devez indiquer le nombre de nouveaux investissements que vous comptez faire\n\n";
		if (invest_minValue=='') errors = errors+"	Vous devez indiquer un inverstissement minimal\n\n";
		if (invest_minValue!='' && isNaN(invest_minValue)) errors = errors+"	L'investissement minimum doit être un chiffre entier\n\n";
		if (invest_maxValue=='') errors = errors+"	Vous devez indiquer un inverstissement maximal\n\n";
		if (invest_maxValue!='' && isNaN(invest_maxValue)) errors = errors+"	L'investissement maximum doit être un chiffre entier\n\n";

		var selects         = $("select",      InfosInvestisseurForm);
		var selectsLength   = selects.size();
		var oneSelect       = 0;
		var i               = 0;

		while (i<selectsLength && oneSelect==0) {
			select = selects.get(i);
			if (select.options.selectedIndex > -1) oneSelect = 1
			i++;
		}

		if (oneSelect == 0) errors = errors+"	Vous devez choisir au moins un domaine d'investissement\n\n";

		if (errors) {
			alert("\nIl y a des erreurs dans le formulaire !\n\n\n"+errors);
			return false;
		}
		return true;

	});

	// Formulaires Agents de veille
	var formAgentsDeVeille=$("#formAgentsDeVeille");
	if (formAgentsDeVeille.size() != 0) {
		var formAgentsDeVeilleInputs = $("table input[type=text]", formAgentsDeVeille);
		var formAgentsDeVeilleSelects = $("table select", formAgentsDeVeille);
		var formAgentsDeVeilleEmailSelects = $("p select", formAgentsDeVeille);
		var hasSubscribed = $("#check_veille", formAgentsDeVeille);
		if (!hasSubscribed.get(0).checked) {
			formAgentsDeVeilleInputs.attr(  "disabled", "disabled" );
			formAgentsDeVeilleSelects.attr( "disabled", "disabled" );
			formAgentsDeVeilleEmailSelects.attr( "disabled", "disabled" );
		} else {
			formAgentsDeVeilleInputs.each(function(){
				if ($(this).val()=='')
					$(this).parents("tr").find("select").attr( "disabled", "disabled" );
			});
		}
		hasSubscribed.click(function(){
			if (!hasSubscribed.get(0).checked) {
				formAgentsDeVeilleInputs.attr(  "disabled", "disabled" );
				formAgentsDeVeilleSelects.attr( "disabled", "disabled" );
				formAgentsDeVeilleEmailSelects.attr( "disabled", "disabled" );
			} else {
				formAgentsDeVeilleInputs.removeAttr( "disabled" ).each(function(){
					if (this.value!='') $(this).parents("tr").find("select").removeAttr( "disabled" );
				});
				formAgentsDeVeilleEmailSelects.removeAttr( "disabled" );
			}
		});
		formAgentsDeVeilleInputs.change(function(){
			if ($(this).val()!='')
				$(this).parents("tr").find("select").removeAttr( "disabled" );
			else
				$(this).parents("tr").find("select").attr( "disabled", "disabled" );
		});
	}

	// Gestion du roll Over du logoutLink
	$('#logoutLink img').hover(function(){
		$(this).attr('src','/design/oseo/images/deconnection_on.png');
	},function(){
		$(this).attr('src','/design/oseo/images/deconnection.png');
	});


	// Correction des bugs d'IE 6
	if (ltie7) {

		$("img.toZoom").click(function(){
			$("select").hide();
		});

		var encartDivCss = {
			background: "#fff",
			borderLeft: "1px solid #bababa",
			borderRight: "1px solid #bababa",
			marginTop: "3px",
			padding: "0 8px"
		}
		if (($('body.soutienpme').size()==0)&&($('body.mediateurcredit').size()==0) && ($('body.pca').size()==0)) {
			$(".encart > div").not('#encartVideoConteneur').filter(function(){return $(this).parent().is('#moteurAffiner')?false:true;}).css(encartDivCss);
			$("#encart_region.encart > div, #encart_actu.encart > div, #archive.encart > div, #evenement.encart > div").css({borderColor: '#8D7D74', marginTop: '6px'});
			$('#moteurAffiner > div').css({padding: "0 8px"})
		}

		$("#pageRecherche").find("#contenu h1 + .blocResultats h2").css('borderTop','none');

		// Pas de bordure sur le premier li du footer.
		$("#footer_menu li:first-child").css({border: 'none', paddingLeft: '1.5em', position: 'relative'});

		$("#leSaviezVous ul li:first-child").css({borderTop: 'none'});

		// Encart gris sur les over des li (ie6 ne gère que les a:hover)
		$("#listeSousRubriques > li").not(".nos_coordonnee, .a_la_une")
		.mouseover(function(e){
			$(this)
				.css("background", "#F8F7F7 url(/extension/oseo/design/oseov5/images/moteur/listeSousBas.png) no-repeat scroll 0 100%")
				.css("color", "#EB0438")
				.find('.zoomSur')
					.css("backgroundColor", "#fcfcfc")
			;
		})
		.mouseout(function(e){
			$(this)
				.css("background", "")
				.css("color", "")
				.find('.zoomSur')
					.css("backgroundColor", "")
			;
		});

		$('#archive ul:first-child li:first-child').css({border: 'none'});
		$('#ongletReg li:first-child .contenu').css({borderLeft: 'none'});

		$('#encart_image .contentBlock img').iunfixpng();
		$('#encart_image .contentBlock img').css({margin: 0}).css({margin: '0 auto 33px'}); // forcer le reflow de l'élément
		$('.contenu_item_pair > div').css({background: '#F8F7F7 url(/extension/oseo/design/oseov5/images/moteur/searchResultsHaut.png) no-repeat'});
		$('.encartOrga > div').css({marginTop: '3px', padding: '3px 10px 1px'});

		$('#etapesListe .etape:first-child').css({background: 'url(/extension/oseo/design/oseov5/images/moteur/searchResultsHaut.png) no-repeat', paddingTop: '5px'});

	}
	// Correction des bugs d'IE tout court
	if (ltie9) {
		// Rendre clicables les images qui sont dans des 'a > h2 > img'. Non, ce n'est pas propre
		$("#listeSousRubriques > li > a > h2 > img").css('cursor','pointer').click(function(){
			window.location=$(this).parents("a").attr("href");
		});

		// Gestion de l'encart vidéo
		var encartVideo = $('#encartVideoConteneur').css({width: '250px'});
		var encartVideoH2 = encartVideo.find('h2').css({float: 'left'});
		var encartVideoTexteConteneur = $('#encartVideoTexteConteneur').css({float: 'right'});
		encartVideoH2.css({paddingTop: (encartVideoTexteConteneur.height()-25)+'px'});

	}

	/* gere les mailtos */
	if (!$.browser.safari)
	{
		$('#outils a[href^=mailto]').each(function(){
			var tabs=this.getAttribute('href').split("=");
			var sujet=tabs[1].split("&")[0];
			var body=tabs[2];
			this.setAttribute('href',"mailto:?subject="+escape(sujet)+"&body="+escape(body));
		});
	}

	/* Form contact deuxieme version */
	$('#topContact li').find('ul').hide().end().find('input').click(
		function(){
			$(this).parent('li').siblings('li').find('>ul').hide( ).end( ).removeClass('hover' ).find('>input' ).attr('checked', '').end( ).end().end().attr('checked', 'checked');
			if ($(this).parent('li').find('>ul').size() == 0) {
				$('#contact_feedback_form').appendTo($(this).parent('li')).css("display","block");
				$("#client,#innovation,#creation,#web,#financement").hide();
				var ar=0;
				var akio="";
				var typeForm="";

				if ($(this).attr('rel'))
				{
					var rels=$(this).attr('rel').split(',');
					for(var i=0;i<rels.length;i++)
					{
						if (rels[i]=="ar")
						{
							ar=1;
						}
						else if(rels[i].indexOf("akio_")==0)
						{
							var tmp=rels[i].split('_');
							akio=tmp[1];
						}
						else
						{
							typeForm=rels[i];
							$('#'+typeForm).slideDown(function(){
								$('#contact_feed_form_form').css({position: 'relative'} ).find('fieldset:last' ).css({borderBottom: 'none'});
							});
						}
					}
				}
				$(this).parent('li').addClass('hover');

				return;

				$('#ar').val(ar);
				$('#contact_feedback_form_akio').val(akio);
				$('#contact_feedback_form_type').val(typeForm);
				$('#contact_feedback_form_rubrique').val($(this).val());
			}
			else
			{
					$(this).parent('li').addClass('hover');
					$(this).parent('li').find('>ul').slideDown().find('>li').removeClass('hover').find('>input').attr('checked','');
					// Cache les enfants des enfants
					$(this).parent('li').find('>ul > li > ul').each(function(){
						$(this).hide();
					});

					$('#contact_feedback_form:visible').hide();
					$(this).parent('li').focus();
			}

			// Supprime l'affichage des frères (li) sauf pour le premier niveau
			if ($(this).parent('li').parent('ul').attr('id') != "topContact"){
				$(this).parent('li').siblings('li').hide();
			}
			$(this).parent('li').find(' > ul > li').show();
		}
	);

	$('#contact_feed_form_form').submit(
		function() {
			if ($("#contact_feedback_form_recipient_type").size()>0)
				$("#contact_feedback_form_recipient_type").val($('#topContact input[name=rub1]:checked').attr('rel'));
		try {
			var type=document.getElementById('contact_feedback_form_type').value;
			/* Standard */
			var courriel=document.getElementById('contact_feedback_form_email').value;
			var courriel_confirm=document.getElementById('contact_feedback_form_email_confirm').value;
			var cp=document.getElementById('contact_feedback_form_cp').value;
			var objet=document.getElementById('contact_feedback_form_objet').value;
			var message=document.getElementById('contact_feedback_form_message').value;

			/* Client */
			var client_ref_oseo=document.getElementById('contact_feedback_form_client_ref_oseo').value;
			var client_siren=document.getElementById('contact_feedback_form_client_siren').value;

			/* Financement */
			var financement_siren=document.getElementById('contact_feedback_form_fin_siren').value;
			var financement_besoin_global=document.getElementById('contact_feedback_form_fin_besoin_eleve').value;
			var financement_apport=document.getElementById('contact_feedback_form_fin_apport').value;

			/* Web */
			var web_url=document.getElementById('contact_feedback_form_web_url_site').value;

			if (courriel.length<=0) { alert("Vous devez renseigner votre courriel."); return false; }
			if (!isEmail(courriel)) { alert("Le courriel saisi n'est pas syntaxiquement correct."); return false; }
			if (courriel!=courriel_confirm) { alert("Les deux courriels saisis ne correspondent pas."); return false; }
			if (cp.length<=0) { alert("Vous devez renseigner votre code postal."); return false; }


			switch(type)
			{
				case "client":
					if (client_ref_oseo.length<=0) { alert("Vous devez renseigner votre référence OSEO."); return false; }
					if ((client_siren.length<9)||(client_siren.search(/^([0-9])*$/i)==-1)) { alert("Vous devez renseigner un numéro de SIREN valide."); return false; }
				break;
				case "creation":
				break;
				case "innovation":
				break;
				case "financement":
					if ((financement_siren.length<9)||(financement_siren.search(/^([0-9])*$/i)==-1)) { alert("Vous devez renseigner un numéro de SIREN valide."); return false; }
					if (financement_besoin_global.length<=0) { alert("Vous devez renseigner votre besoin global."); return false; }
					if (financement_apport.length<=0) { alert("Vous devez renseigner votre apport."); return false; }

					if (financement_besoin_global.search(/^([0-9])*$/i)==-1) { alert("Vous devez renseigner un besoin global valide."); return false; }
					if (financement_apport.search(/^([0-9])*$/i)==-1) { alert("Vous devez renseigner un apport valide."); return false; }

				break;
				case "web":
					if (web_url.length<=0) { alert("Vous devez renseigner l'url du site."); return false; }
				break;
			}

			if (objet.length<=0) { alert("Vous devez renseigner l'objet de votre demande."); return false; }
			var checkNumber=($('#ar').val()>0)?75:10;
			if (message.length<=(checkNumber-1)) { alert("Le message que vous allez envoyer doit contenir au minimum "+checkNumber+" caractères. ("+(checkNumber-message.length)+" restants)"); return false; }

		}catch(e) { alert(e); return false;}
			return true;
		}
	);
	
/*	try{
		deploieForm();
	}catch(e){};
*/
	// Formulaire partenariat Web

	$('#partenariat_web_subscribe').submit(function(){
		try{
		//	if ($('#id_nom').val().length<=0) { alert("Vous devez saisier votre nom."); return false; }
		//	if ($('#id_prenom').val().length<=0) { alert("Vous devez saisier votre prénom."); return false; }
			if ($('#id_siteweb').val().length<=0) { alert("Vous devez saisir l'addresse de votre site web."); return false; }
			if ($('#id_courriel').val().length<=0) { alert("Vous devez saisir votre courriel."); return false; }
			if ($('#id_courrielc').val().length<=0) { alert("Vous devez confirmer votre courriel."); return false; }
			if ( $('#id_courriel').val()!=$('#id_courrielc').val() ) {
				alert("Les deux courriels ne correspondent pas."); return false;
			}
		}catch(e){alert(e);return false};
		return true;
	});

/*		// Resize frames
	$("#frame_monoseo").load(function(){
//	$("iframe").each().load(function() {
//console.log(this.contentWindow.document.scrollHeight);
//console.log($(this).height());
//		$(this).css('height', this.contentWindow.document.body.scrollHeight);
//		$(this).css('height', this.contentWindow.document.body.style.height);
//		$(this).css('height', 350);
	});
*/

	temoignageBFM.init();

});

function openOOTB_OSEO_en_bref() {
	$("#logo a").focus();
	$('#footer').hide();
	$("select").hide();
	var oseoEnBRef = $('#oseoEnBref');
	if (!oseoEnBRef.size()) {
		$("#conteneur").prepend('<div id="oseoEnBref"><object width="800" height="600" type="application/x-shockwave-flash" data="/extension/oseo/design/oseov5/images/swf/Court_oseo_bref_v6.swf"><param name="movie" value="/extension/oseo/design/oseov5/images/swf/Court_oseo_bref_v6.swf"/><param name="quality" value="high"/><param name="scale" value="exactfit"/><param name="salign" value="t"/><param name="wmode"   value="transparent"/></object></div>');
		oseoEnBRef = $('#oseoEnBref');
	}
	oseoEnBRef.show();
}

var washEmails = function() {
	$('a[href^=mailto]').each(function(e) {
        $(this).attr('href',$(this).attr('href').replace('_SPAMOSEO_', '@'));
        var text = $(this).text().replace('_SPAMOSEO_', '@');
        $(this).text(text);
    });
};


function closeOOTB(){
	$("#closeOOTB").mouseover(function(e){
		var src = $(this).attr('src');
		$(this).attr('src',src.replace('_Off','_On'));
	}).mouseout(function(e){
		var src = $(this).attr('src');
		$(this).attr('src',src.replace('_On','_Off'));
	});
}

function RollCadre(){
	$("#listeSousRubriques > li").mouseover(function(e){
		$(this).find('>img').each(function(){
			$(this).attr('src',$(this).attr('src').replace('_Off','_On'));
		});
	}).mouseout(function(e){
		$(this).find('>img').each(function(){
			$(this).attr('src',$(this).attr('src').replace('_On','_Off'));
		});
	});
}

function fermerZoom(){
	$(".contentToZoom").remove();
	$("#bgOOTB").remove();
	$("select").show();
	$("#footer").show();
	return false;
}
/* Correction ANNEXE ici pour etre appellé aussi en ajax */
function corrigeBlocAnnexe() {
	/* recallage de l'annexe pour les page satellite */
	if ($('.satellite').size()>0){
		$('#titre_satellite').find("img").each(function(){
			var hauteur = $(this).height()+"px";
			$(this).parent().parent().find("#annexes").css('margin-top',"-"+hauteur);f
		});
	}
	// On retire la bordure haute de deux encarts qui se suivent.
	$("#annexes .encart").each(function() {
		if ($(this).next().is(".encart")) $(this).css('marginBottom','0');
	});

	// Code temporaire pour palier à l'oubli de l'image de fin de cadre.
	$("#annexes .encart > div").not('#encartVideoTexteConteneur').each(function(){
		if (!$(this).find(".bloc_image_bas").length) {
			$(this).append('<img class="bloc_image_bas" alt="" src="/extension/oseo/design/oseov5/images/encarts/encart_gris_bottom.png"width="250" height="6" />');
			//if (window.console) console.error("image bloc_image_bas ajouté dans l'encart");
		}
	});

	if (ltie7) {
		$("#annexes .encart > div").not('#encartVideoTexteConteneur').css({
			background: "url(/extension/oseo/design/oseov5/images/encart_centre.gif) repeat-y",
			marginTop: "3px",
			padding: "1px 5px 0 20px",
			zoom: "1"
		});
		if (($('body.soutienpme').size()==0)&&($('body.mediateurcredit').size()==0)) $("#annexes .encart + .encart").css('background','none');
	}
}


///////////////////////////////////////
///    		InitSelects_sites		///
///////////////////////////////////////
function adjustSelects() {
	if ($('.adjustSelect').size() > 0){
		if ($.browser.msie) {
			$('.adjustSelect').each(function(){
				$(this).css('width', '');
				$(this).css('position','absolute');
				$(this).css('z-index','100');
				var passe=0;
			}).mouseover(function(){
					$(this).css('width','auto');
					$(this).css('z-index','1000');
				passe=0;
			}).click(function(){
				if (passe == 1) {
					$(this).css('width', 'auto');
					$(this).css('z-index','1000');
					passe = 0;
				}
				passe=1;
			}).blur(function(){
				$(this).css('width', '');
				$(this).css('z-index','100');
				passe=0;

			}).mouseout(function(){
				if (passe==0){
					$(this).css('width', '');
					$(this).css('z-index','100');
				}
			});
		}
	}
}

///////////////////////////////////////////////////////////////////////////////
///			Affichage dynamique des secteur en fonction des megaSecteur		///
///////////////////////////////////////////////////////////////////////////////
function displaySecteur(){
	var SecteursInno 	= new Array();
	var SecteursAppli 	= new Array();

	SecteursInno[0]		= new Array();
	SecteursInno[0][3] 	= "ARTS GRAPHIQUES";
	SecteursInno[0][12] = "EMBALLAGE-CONDITIONNEMENT";
	SecteursInno[0][30] = "TEXTILE-HABILLEMENT-CUIR-CHAUSSURE";
	SecteursInno[0][25] = "PRODUIT GRAND PUBLIC";

	SecteursInno[1]		= new Array();
	SecteursInno[1][17]	= "MANUTENTION";
	SecteursInno[1][11]	= "ELECTROTECHNIQUE";
	SecteursInno[1][14]	= "ENVIRONNEMENT";
	SecteursInno[1][19]	= "MESURE-CONTRÔLE";
	SecteursInno[1][26]	= "SECURITE";
	SecteursInno[1][31]	= "THERMIQUE";
	SecteursInno[1][32]	= "TRANSPORT";

	SecteursInno[2]		= new Array();
	SecteursInno[2][34]	= "VERRE";
	SecteursInno[2][18]	= "MATERIAUX DE CONSTRUCTION";
	SecteursInno[2][33]	= "TRAVAUX PUBLICS";
	SecteursInno[2][24]	= "PLASTIQUES-CAOUTCHOUCS";
	SecteursInno[2][21]	= "PARACHIMIE";
	SecteursInno[2][20]	= "METALLURGIE-TRAVAIL DES METAUX";
	SecteursInno[2][8]	= "CHIMIE";
	SecteursInno[2][7]	= "CERAMIQUE";
	SecteursInno[2][6]	= "BOIS-PAPIER";
	SecteursInno[2][4]	= "BATIMENT";
	SecteursInno[2][13]	= "ENERGIE";
	SecteursInno[2][16]	= "INDUSTRIE MECANIQUE/PROCESSUS INDUSTRIEL";

	SecteursInno[3]		= new Array();
	SecteursInno[3][1]	= "AGRICULTURE";
	SecteursInno[3][5]	= "BIOMEDICAL";
	SecteursInno[3][2]	= "AGROALIMENTAIRE";
	SecteursInno[3][23]	= "PHARMACIE-BIOINDUSTRIE";
	SecteursInno[3][22]	= "PECHE-AQUACULTURE";
	SecteursInno[3][9]	= "COSMETOLOGIE";

	SecteursInno[4]		= new Array();
	SecteursInno[4][10]	= "ELECTRONIQUE";
	SecteursInno[4][0]	= "ACTIVITES LOGICIELLES";
	SecteursInno[4][27]	= "TELECOMMUNICATIONS";
	SecteursInno[4][15]	= "EQUIPEMENT INFORMATIQUE";
	SecteursInno[4][29]	= "TERTIAIRE PROFESSIONNEL";
	SecteursInno[4][28]	= "TERTIAIRE GRAND PUBLIC";

	SecteursAppli[0]	= new Array();
	SecteursAppli[0][4]	= "GENIE ALIMENTAIRE";
	SecteursAppli[0][6]= "GENIE ELECTRIQUE";
	SecteursAppli[0][8]	= "GENIE CIVIL";
	SecteursAppli[0][7]	= "GENIE CHIMIQUE";
	SecteursAppli[0][27]= "PROCEDES PHYSIQUES";
	SecteursAppli[0][3]	= "ENERGETIQUE";
	SecteursAppli[0][28]= "PROCEDES PHARMACEUTIQUES";

	SecteursAppli[1]	= new Array();
	SecteursAppli[1][12]= "INGENIERIE";

	SecteursAppli[2]	= new Array();
	SecteursAppli[2][29]= "TRANSPORT DU SIGNAL/COMMUNICATION ELECTRONIQUE";
	SecteursAppli[2][20]= "MICROELECTRONIQUE";
	SecteursAppli[2][25]= "PHYSIQUE DU SIGNAL";
	SecteursAppli[2][24]= "OPTIQUE";
	SecteursAppli[2][2]	= "ELECTRONIQUE DU SIGNAL";

	SecteursAppli[3]	= new Array();
	SecteursAppli[3][5]	= "GENIE BILOLOGIQUE";
	SecteursAppli[3][10]= "GENIE GENETIQUE";
	SecteursAppli[3][6]	= "GENIE CELLULAIRE ET MOLECULAIRE";
	SecteursAppli[3][11]= "GENIE IMMUNOLOGIQUE";

	SecteursAppli[4]	= new Array();
	SecteursAppli[4][14]= "MACHINES/EQUIPEMENTS";
	SecteursAppli[4][19]= "MECANIQUE PHYSIQUE";
	SecteursAppli[4][17]= "MECANIQUE DE PRECISION";
	SecteursAppli[4][18]= "MECANIQUE GENERALE";

	SecteursAppli[5]	= new Array();
	SecteursAppli[5][25]= "MULTIMEDIA";
	SecteursAppli[5][0]	= "APPLICATION LOGICIELLES";
	SecteursAppli[5][15]= "LOGICIELS DE BASE";

	SecteursAppli[6]	= new Array();
	SecteursAppli[6][22]= "MISE EN ŒUVRE MATERIAUX NON METALLIQUES";
	SecteursAppli[6][17]= "MATERIAUX METALLIQUES";
	SecteursAppli[6][21]= "MISE EN ŒUVRE MATERIAUX METALLIQUES";
	SecteursAppli[6][16]= "MATERIAUX NON METALLIQUES";

	SecteursAppli[7]	= new Array();
	SecteursAppli[7][28]= "TECHNOLOGIES DE MESURE";
	SecteursAppli[7][1]	= "AUTOMATIQUE/TRANSITIQUE/OPTIMISATION";

	$('#secteurAppli_id, #secteurInno_id').empty();
	$('#labelSecteurInno').css('visibility', 'visible');
	// Inno
	if($('#megaSect_id').val().indexOf('inno_', 0) == 0){
		var key = parseInt($('#megaSect_id').val().replace('inno_', ''))-1;
		var aSecteurInno = SecteursInno[key];
		var arrTri = tri(aSecteurInno);
		for(var i=0; i < arrTri.length; i++){
			$('#secteurInno_id').append("<option value='"+arrTri[i]+"'>"+aSecteurInno[arrTri[i]]+"</option>");
		}
	/*	$.each(SecteursInno[key], function(index,value){
			if(value)	$('#secteurInno_id').append("<option value='"+index+"'>"+value+"</option>");
		});*/
		$('#secteurInno_id').prepend('<option value="-1" selected="selected">Tous</option>');
		$('#secteurInno_id').css('visibility', 'visible').show();
		$('#secteurAppli_id').hide().css('visibility', 'hidden');
	}
	else if($('#megaSect_id').val().indexOf('appli_', 0) == 0){
		var key = parseInt($('#megaSect_id').val().replace('appli_', ''))-1;
		var aSecteurAppli = SecteursAppli[key];
		var arrTri = tri(aSecteurAppli);
		for(var i=0; i < arrTri.length; i++){
			$('#secteurAppli_id').append("<option value='"+arrTri[i]+"'>"+aSecteurAppli[arrTri[i]]+"</option>");
		}
	/*	$.each(SecteursAppli[key], function(index,value){
			if(value)	$('#secteurAppli_id').append("<option value='"+index+"'>"+value+"</option>");
		});*/
		$('#secteurAppli_id').prepend('<option value="-1" selected="selected">Tous</option>');
		$('#secteurAppli_id').show().css('visibility', 'visible');
		$('#secteurInno_id').hide().css('visibility', 'hidden');
	}
	else {
		$('#secteurAppli_id, #secteurInno_id').hide().css('visibility', 'hidden').empty();
		$('#labelSecteurInno').css('visibility', 'hidden');
	}
}

/**
 * Tri par ordre alphabetique
 * retourne un tableau de correspondance
 */
function tri(arr){
	var aRef 	= new Array();
	var aRes 	= new Array();
	var aTrie 	= new Array();
	for(var j=0; j < arr.length; j++){
		aRef[j] = arr[j];
		aTrie[j] = arr[j];
	}
	aTrie.sort();
	for(var j=0; j < aRef.length; j++){
		if (aTrie[j] != undefined){
			for(var i=0; i < aRef.length; i++){
				if (aTrie[j] == aRef[i]){
					aRes.push(i);
					break;
				}
			}
		}
	}
	return aRes;
}

function closeDiv() {
	$("#oseoEnBref").hide();
	$("#footer").show();
	$("select").show();
}

function verifForm()
{
	var mail1=document.getElementById("email");
	var mail2=document.getElementById("verif2_mail");
	var cp=document.getElementById("cp");
	var objet=document.getElementById("objet");
	var texte=document.getElementById("texte");
	var errors ='';

	if (mail1.value.length<=0) errors=errors+"	Merci de saisir un e-mail.\n\n";
	if (mail2.value.length<=0) errors=errors+"	Merci de confirmer votre e-mail.\n\n";
	if (mail2.value.length > 0 && mail1.value != mail2.value ) errors=errors+"	Attention, les deux e-mails ne correspondent pas.\n\n";
	if (cp.value.length<=0) errors=errors+"	Merci de saisir un code postal.\n\n";
	if (cp.value.length>0 && cp.value.length != 5) errors=errors+"	Merci de saisir un code postal à 5 chiffres.\n\n";

	var exp=new RegExp("^([0-9]*)(.{0,1})([0-9]*)$");
	if (cp.value.length=5 && !exp.test(cp.value)) errors=errors+"	Attention, Le code postal doit être en chiffres.\n\n";
	if (objet.value.length<=0) errors=errors+"	Merci de saisir un sujet.\n\n";
	if (texte.value.length<=0) errors=errors+"	Merci de saisir un message.\n\n";
	if(errors!='') {
		errors="Il y a des erreurs dans le formulaire !\n\n\n"+errors;
		alert(errors);
		return false;
	}
	else return true;
}

// Nouvelle fonction jquery de retaillage de blocks
$.fn.adjustSize=function(options) {
	var settings = {
		periode: 2,
		margin_bottom: 0
	};
	if(options) {
		jQuery.extend(settings, options);
	} else options = settings;
	var maxHeightArray = new Array();
	var totalSize = $(this).size();
	var nbPeriodes = Math.ceil(totalSize/options.periode);
	var index = 0;
	$(this).each(function(){
		var blockId = Math.floor(index/options.periode);
		if (!maxHeightArray[blockId]) maxHeightArray[blockId]=0;

		var _h=parseInt($(this).height()+options.margin_bottom);
		//if ($(this).height() > maxHeightArray[blockId])  maxHeightArray[blockId] = $(this).height();
		if ( _h > maxHeightArray[blockId])  maxHeightArray[blockId] = _h;
		//this.offsetHeight
		index++;
	});
	var index = 0;
	$(this).each(function(){
		var blockId = Math.floor(index/options.periode);
		$(this).height(maxHeightArray[blockId]+'px');
		index++;
	});
	return this;
};


// Target est un sélecteur jQuery qui permet d'indiquer quel est l'élement (image ou input) qui doit changer.
// Sa valeur par défaut est '?myself', ce qui indique que l'objet est sa propre cible.
$.fn.switchImage=function(eventTargetSelector, changeTargetSelector, options) {
	var eventTargetSelector, changeTargetSelector, eventTarget, changeTarget;
	if (!eventTargetSelector) eventTargetSelector = '?myself';
	if (!changeTargetSelector) changeTargetSelector = '?myself';
	var settings = {
		stringDefault: '_off',
		stringHover: '_on'
	};
	if (options) {
		jQuery.extend(settings, options);
	}
	if (eventTargetSelector == '?myself') eventTarget=$(this);
	else eventTarget = $(this).find(eventTargetSelector);
	if (changeTargetSelector == '?myself') changeTarget=$(this);
	else changeTarget = $(this).find(changeTargetSelector);
	eventTarget.filter(function(index){
		return (changeTarget.is("input[type=image][src]") || changeTarget.is("img[src]"));
	}).hover(
		function(e){
			switchToHover(changeTarget);
		}, function(e){
			switchToDefault(changeTarget);
		}
	).focus(function(e){
		switchToHover(changeTarget);
	}).blur(function(e){
		switchToDefault(changeTarget);
	});

	function switchToHover(e) {
		var src = e.attr('src');
		var srcPathSplit = src.split('/');
		var fileName=srcPathSplit.pop();
		var filePath=srcPathSplit.join('/');
		if (fileName.indexOf(settings.stringDefault) != -1) {
			e.attr('src', filePath+'/'+fileName.replace(settings.stringDefault, settings.stringHover));
		}
	}

	function switchToDefault(e) {
		var src = e.attr('src');
		var srcPathSplit = src.split('/');
		var fileName=srcPathSplit.pop();
		var filePath=srcPathSplit.join('/');
		if (fileName.indexOf(settings.stringHover) != -1) {
			e.attr('src', filePath+'/'+fileName.replace(settings.stringHover, settings.stringDefault));
		}
	}

	return this;
}


/***********************/
/***** TAG XITI ********/
/***********************/
function trim(string)
{
	if (string)
	{
		if (string.length>0)
			return string.replace(/(^\s*)|(\s*$)/g,'');
		else
			return "";
	}
	else return "";
}
function initXitiLink(s2)
{
	var as=document.getElementsByTagName('a');
	for(var i=0,taille=as.length;i<taille;i++)
	{
		var a=as[i];
		if (!a.getAttribute("onclick"))
		{
			a.onclick=function() {
				var type="",href="";
				href=this.getAttribute("href");

				//Verification pour savoir si c'est un fichier
				var indicePt=href.lastIndexOf(".");
				var exts=href.substr(indicePt+1,href.length);
				if (
						(exts=="pdf") ||
						(exts=="doc") ||
						(exts=="ppt") ||
						(exts=="rtf") ||
						(exts=="xls") ||
						(exts=="pps") ||
						(exts=="zip") ||
						(exts=="PDF") ||
						(exts=="DOC") ||
						(exts=="PPT") ||
						(exts=="RTF") ||
						(exts=="XLS") ||
						(exts=="ZIP") ||
						(exts=="PPS")
					)
					type="T";

				else
				{
					// si ca commence par HTTP
					if (href.search(/^http/i)!=-1)
					{
						var tab=href.split('/');
						if ( (tab[2].search(/oseo4.novactive.com/i)!=-1)||(tab[2].search(/www.oseo.fr/i)!=-1)||(tab[2].search(/www4.oseo.fr/i)!=-1))
							type="N";
						else
							type="S";
					}else
						type="N";
				}
				var nom=trim(this.getAttribute('title'))
				if ((nom.length<=0)&&(this.firstChild.nodeType==3))
					nom=trim(this.firstChild.nodeValue);
				if (nom.length<=0)
				{
					//verification img
					var imgs=this.getElementsByTagName('img');
					if (imgs.length>0)
					{
						var img=imgs[0];
						var alt=trim(img.getAttribute('alt'));
						var title=trim(img.getAttribute('title'));
						if (alt.length>0)
							nom=alt;
						else
						{
							if (title.length>0)
								nom=title;
							else
								nom="Img: http://www.oseo.fr"+img.getAttribute("src");
						}
					}else
						nom="Dest: "+href;
				}
				if (type=="S")
				{
					xt_med('C',s2,nom,type);
					//alert('C'+"s2="+s2+"nom="+nom+"type="+type);
				}
				if (type=="T")
				{
					var tab=href.split('/');
					//nom=tab[(tab.length-1)];
					xt_med('C',s2,nom,type);
					//alert('C'+"s2="+s2+"nom="+nom+"type="+type);
				}
			}
		}
	}
}

function isEmail(eml) {
	a = eml.search(/^[-a-z0-9_]+([-._]+[-a-z0-9_]+)*@[a-z0-9]([.-]?[a-z0-9])*\.[a-z]{2,4}$/i);
	if(a!=-1)
		return true
	else
		return false
}

/**
 *	 Stop
 */

function cancelBubble(netEvent)
{
    if (document.all)
    {
        window.event.cancelBubble = true;
    }
    else
    {
        netEvent.cancelBubble = true;
    }
}


function getEvtTarget(e) {
		var targ;
		e= e||window.event;
		if (e.target) targ = e.target;
		else if (e.srcElement) targ = e.srcElement;
		if (targ.nodeType == 3) /* defeat Safari bug */ targ = targ.parentNode;
		return targ;
}


/** Plugins COOKIE **/
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        var path = options.path ? '; path=' + options.path : '';
        var domain = options.domain ? '; domain=' + options.domain : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

var menu = function(){
	var Items, Links;
	var ItemVisibleClass = 'ssMenuVisible';

	function _init(){
		Items = $('#menu > li');
		Links = $('a',Items);
		Items.each(function(){$(this).not('.on').switchImage('', '> a > img')} ).hover(function(){ show($(this))},function(){ hide($(this))});
		Links.focus(function(){show($(this))}).blur(function(){hide($(this))});

		Items.each(function(){$(this).find('li:last').css({border: 'none'})});

		// Gestion menu : si un seul li dans le sous menu, on lui applique la classe 'on'
		$("#menu ul").each(function(){
			var liArray = $(this).find(">li");
			if(liArray.size()==1) liArray.filter(".no_redirect_children").addClass("on");
		});
	}

	function getItem(elmt) {
		if(!elmt.parent().is('#menu')) return elmt.parents('li').filter(function(){return $(this).parent().is('#menu')});
		else return elmt;
	}

	function show(elmt){
		elmt = getItem(elmt);
		elmt.addClass(ItemVisibleClass);

	}

	function hide(elmt){
		elmt = getItem(elmt);
		elmt.removeClass(ItemVisibleClass);

	}

	return {init:_init}
}();

var faqFormControle = function(){

	function _init(){

		if($('#form_faq').size() > 0){
			$('#form_faq').submit(function(){
				var message = '';
				if($('#lastname').val() == ''){ message += "Veuillez saisir votre nom\n";}
				if($('#name').val() == '') 		message += "Veuillez saisir votre prénom\n";
				if($('#country').val() == 0)	message += "Veuillez sélectionner votre région\n";
				if($('#email').val() == '')		message += "Veuillez saisir votre courriel\n";
				else if(!isEmail($('#email').val() )) message += "Le format du courriel n'est pas valide\n";
				if($('#question').val() == '') 	message += "Veuillez saisir votre question\n";

				if(message != ''){
					alert(message);
					return false;
				}
			});

		}


	}
	return {init:_init}
}();

var temoignageBFM = function() {
	function _init() {
		contentReformat.init();
		menu.init();
		carrousel.init();
	}
	
	var contentReformat = function() {
		function _init() {
			addBlocVideo();
			addRetoursVideo();
			prefetchImageMenuPointer();
			
			if (ltie7) {
				$('#temoignageBFM > div').css({
					backgroundColor: '#f8f7f7',
					padding: 0
				});
			}
			
			$('#temoignageBFMContenu #tBFMVideo iframe').width(550);
			$('#temoignageBFMContenu #tBFMVideo iframe').height(309);
			
		}
		
		function addBlocVideo() {
			$('#temoignageBFMContenu').prepend('<div id="tBFMVideo" class="BFMCElmtContenu"></div>');
			var videoConteneur = $('#tBFMVideo');
			var video = $('#tBFMSavoirPlus .video_wmaker:first');
			var video_tv = $('#tBFMSavoirPlus .oseo_tv:first');
			videoConteneur.append(video);
			videoConteneur.append(video_tv);
		}
		
		function addRetoursVideo() {
			$('#tBFMIdentite, #tBFMSavoirPlus, #tBFMSoutien').prepend('<p class="tBFMRetourVideo"><a href="#tBFMVideo">Retour à la vidéo</a></p>');
		}
		
		function prefetchImageMenuPointer() {
			var img = document.createElement('img');
			img.scr = "/extension/oseo/design/oseov5/images/temoignageBFM/menu_pointer.png";
		}
		
		return {init:_init}
	}();
	
	var menu = function() {
		var menuItem, menuLinks;
		var contenus, contenuVisible, contenuDefault;
		function _init(){
			menuItem = $('.tBFMMenuItem');
			menuLinks = $('>a', menuItem).add('.tBFMRetourVideo > a');
			contenus = $('.BFMCElmtContenu');
			contenuDefault = $('#tBFMVideo')
			contenuVisible = contenuDefault;
			
			contenus.not('#tBFMVideo').hide();
			
			changeImageOnHover();
			handleClicksOnMenuLinks();
			reactToHashOnStartup();
			
			function changeImageOnHover() {
				menuItem.each(function(){
					var elmt = $(this);
					var link = elmt.find('>a');
					var img = link.find('>img');
					$(this).hover(function(){
						if(!elmt.is('.tBFMMenuItemOn')) {
							replaceImg(img, 1);
						}
					}, function(){
						if(!elmt.is('.tBFMMenuItemOn')) {
							replaceImg(img, 0);
						}
					});
				});
			}
			
			function handleClicksOnMenuLinks() {
				menuLinks.click(function(clickEvent) {
					clickEvent.preventDefault();
					var elmt = $(this);
					var parent = elmt.parent();
					var img = elmt.find('>img');
					var aim = getClickAim();
					
					updateLocationHash();
					
					if (parent.is('.tBFMRetourVideo')) {
						updateLocationHash('tBFMVideo');
						show(contenuDefault);
						turnOff();
						return;
					}
					
					if (parent.is('.tBFMMenuItemOn')) {
						updateLocationHash('tBFMVideo');
						show(contenuDefault);
						turnOff();
					} else {
						show(aim);
						turnOn();
					}
					
					function getClickAim() {
						var link = elmt.attr('href');
						var hash = link.split('#')[1];
						return $('#'+hash);
					}
					
					function updateLocationHash(hash) {
						if (!hash) {
							var link = elmt.attr('href');
							var hash = link.split('#')[1];
						}
						window.location.hash = '#' + hash;
					}
					
					function turnOn() {
						turnOff();
						parent.addClass('tBFMMenuItemOn');
						parent.append('<img src="/extension/oseo/design/oseov5/images/temoignageBFM/menu_pointer.png" width="16" height="34" alt="" class="menuPointer" />');
						replaceImg(img, 1);
					}
					
					function turnOff() {
						menuItem.find('.menuPointer').remove();
						menuItem.removeClass('tBFMMenuItemOn');
						menuLinks.find('img').each(function(){
							var img = $(this);
							replaceImg(img, 0);
						});
					}
					
					function show(elmt) {
						if (elmt.get() == contenuVisible.get()) {
							return;
						}
						
						elmt.fadeIn();
						contenuVisible.fadeOut();
						contenuVisible = elmt;
					}
				});
			}
			
			function replaceImg(img, onOff) {
				if (ltie7) {
					img.iunfixpng();
				}
			
				if (!img || !img.is('img')) {
					return;
				}
				
				var imgSrc = img.attr('src');
				
				if (onOff) {
					img.attr('src', imgSrc.replace('_off', '_on'));
				} else {
					img.attr('src', imgSrc.replace('_on', '_off'));
				}
				
				if (ltie7) {
					img.ifixpng();
				}
			}
			
			function reactToHashOnStartup(){
				var hash = window.location.hash;
				
				if (!hash) {
					return;
				}
				
				var relatedLink = menuLinks.filter(function(){
					var elmt = $(this);
					
					if (elmt.attr('href').indexOf(hash) != -1) {
						return true;
					} else {
						return false;
					}
					
				}).filter(':first');
				relatedLink.click();
			}
		}
		
		return {init:_init}
	}();
	
	var carrousel = function() {
		var liste, items, currentElement, startPos;
		function _init(){
			liste = $('#temoignageDerniers ul');
			items = $('.temoignageBFMItem');
			currentElement = $('.temoignageBFMItemCurrent');
			startPos = 1;
			if (currentElement.size()) {
				startPos = currentElement.index()+1;
			}
			liste.jcarousel({
				scroll: 1, 
				start: startPos
			});
			
			adjustHeight();

		}
		
		function adjustHeight() {
			var height = 100;
			items.each(function(){
				elmt = $(this);
				var elmtHeight = elmt.height();
				if (elmtHeight > height) {
					height = elmtHeight;
				}
			});
			
			if (height > 100) {
				$('.jcarousel-clip-horizontal').height(height+'px');
			}
			
		}
	
		return {init:_init}
	}()
	
	return {init:_init}
}();

var player = null;
function playerReady(thePlayer) {

	if($('.tagXiti').length){
		player = document.getElementById(thePlayer.id);
		addListeners(player);
	}
}

function addListeners(player) {

	if (player)
		player.addModelListener("STATE", "stateListener");
  else
		setTimeout("addListeners()",100);
}

function stateListener(obj) {

	var ParamsXiti = $("#"+obj.id).attr('rel');
	var xitiS2 = $("#"+obj.id).attr('dir');

	if(obj.newstate == "PLAYING")
	{
		//xt_med('C',xitiS2,ParamsXiti,'A');
		return  xt_click(obj, 'C', xitiS2, ParamsXiti, 'A');
	}
}


/*
 * jQuery ifixpng plugin
 * (previously known as pngfix)
 * Version 2.1  (23/04/2008)
 * @requires jQuery v1.1.3 or above
 *
 * Examples at: http://jquery.khurshid.com
 * Copyright (c) 2007 Kush M.
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */

 /**
  *
  * @example
  *
  * optional if location of pixel.gif if different to default which is images/pixel.gif
  * $.ifixpng('media/pixel.gif');
  *
  * $('img[src$=.png], #panel').ifixpng();
  *
  * @apply hack to all png images and #panel which icluded png img in its css
  *
  * @name ifixpng
  * @type jQuery
  * @cat Plugins/Image
  * @return jQuery
  * @author jQuery Community
  */

(function($) {

	/**
	 * helper variables and function
	 */
	$.ifixpng = function(customPixel) {
		$.ifixpng.pixel = customPixel;
	};

	$.ifixpng.getPixel = function() {
		return $.ifixpng.pixel || '/extension/oseo/design/oseov5/images/pixel.gif';
	};

	var hack = {
		ltie7  : $.browser.msie && $.browser.version < 7,
		filter : function(src) {
			return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";
		}
	};

	/**
	 * Applies ie png hack to selected dom elements
	 *
	 * $('img[src$=.png]').ifixpng();
	 * @desc apply hack to all images with png extensions
	 *
	 * $('#panel, img[src$=.png]').ifixpng();
	 * @desc apply hack to element #panel and all images with png extensions
	 *
	 * @name ifixpng
	 */

	$.fn.ifixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			// in case rewriting urls
			var base = $('base').attr('href');
			if (base) {
				// remove anything after the last '/'
				base = base.replace(/\/[^\/]+$/,'/');
			}
			if ($$.is('img') || $$.is('input')) { // hack image tags present in dom
				if ($$.attr('src')) {
					if ($$.attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
						var oH = $$.attr('height') ? $$.attr('height') : $$.height();
						var oW = $$.attr('width') ? $$.attr('width') : $$.width();
						// use source tag value if set
						var source = (base && $$.attr('src').search(/^(\/|http:)/i)) ? base + $$.attr('src') : $$.attr('src');
						// apply filter
						$$.css({filter:hack.filter(source), width:$$.width(), height:$$.height()})
						  .attr({src:$.ifixpng.getPixel()})
						  .positionFix();
						// rétablir les dimensions originales de l'image.
						$$.height(oH);
						$$.width(oW);
					}
				}
			} else { // hack png css properties present inside css
				var image = $$.css('backgroundImage');
				if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
					image = RegExp.$1;
					image = (base && image.substring(0,1)!='/') ? base + image : image;
					$$.css({backgroundImage:'none', filter:hack.filter(image)})
					  .children().children().positionFix();
				}
			}
		});
	} : function() { return this; };

	/**
	 * Removes any png hack that may have been applied previously
	 *
	 * $('img[src$=.png]').iunfixpng();
	 * @desc revert hack on all images with png extensions
	 *
	 * $('#panel, img[src$=.png]').iunfixpng();
	 * @desc revert hack on element #panel and all images with png extensions
	 *
	 * @name iunfixpng
	 */

	$.fn.iunfixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			var src = $$.css('filter');
			if (src.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // get img source from filter
				src = RegExp.$1;
				if ($$.is('img') || $$.is('input')) {
					$$.attr({src:src}).css({filter:''});
				} else {
					$$.css({filter:'', background:'url('+src+')'});
				}
			}
		});
	} : function() { return this; };

	/**
	 * positions selected item relatively
	 */

	$.fn.positionFix = function() {
		return this.each(function() {
			var $$ = $(this);
			var position = $$.css('position');
			if (position != 'absolute' && position != 'relative') {
				$$.css({position:'relative'});
			}
		});
	};

})(jQuery);

/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function(i){var q={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null, itemFallbackDimension:null},r=false;i(window).bind("load.jcarousel",function(){r=true});i.jcarousel=function(a,c){this.options=i.extend({},q,c||{});this.autoStopped=this.locked=false;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===undefined)this.options.rtl=(i(a).attr("dir")||i("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?this.options.rtl? "right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){i(a).removeClass(d[f]);b=d[f];break}if(a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"){this.list=i(a);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container"))this.container=this.container.wrap("<div></div>");this.container=this.container.parent()}else if(!this.container.hasClass("jcarousel-container"))this.container= this.list.wrap("<div></div>").parent()}else{this.container=i(a);this.list=this.container.find("ul,ol").eq(0)}b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("<div></div>").parent();this.buttonNext=i(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext= this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className("jcarousel-next"));this.buttonPrev=i(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className("jcarousel-prev"));this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden", position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;b=this.list.children("li");var e=this;if(b.size()>0){var g=0,k=this.options.offset;b.each(function(){e.format(this,k++);g+=e.dimension(this, j)});this.list.css(this.wh,g+100+"px");if(!c||c.size===undefined)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.reload()};this.options.initCallback!==null&&this.options.initCallback(this,"init");if(!r&&i.browser.safari){this.buttons(false,false);i(window).bind("load.jcarousel",function(){e.setup()})}else this.setup()}; var h=i.jcarousel;h.fn=h.prototype={jcarousel:"0.2.7"};h.fn.extend=h.extend=i.extend;h.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;this.animating=false;this.tail=this.timer=null;this.inTail=false;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(a,false);i(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}}, reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0; this.list.children("li").each(function(f){b+=a.dimension(this,c);if(f+1<a.first)d=b});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(a){if(a!==undefined){this.options.size=a;this.locked||this.buttons()}return this.options.size},has:function(a,c){if(c===undefined||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b= a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return false}return true},get:function(a){return i(".jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,f=i(c);if(b.length===0){var j,e=h.intval(a);for(b=this.create(a);;){j=this.get(--e);if(e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}}else d=this.dimension(b);if(f.get(0).nodeName.toUpperCase()=="LI"){b.replaceWith(f);b=f}else b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")), a);f=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;d=this.dimension(b,f)-d;a>0&&a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,h.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(!(!c.length||a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,h.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,h.intval(this.list.css(this.wh))- b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(true):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!(this.locked|| this.animating||!this.tail)){this.pauseAuto();var c=h.intval(this.list.css(this.lt));c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){if(!(this.locked||this.animating)){this.pauseAuto();this.animate(this.pos(a),c)}},pos:function(a,c){var b=h.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;if(this.options.wrap!="circular")a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a;for(var d= this.first>a,f=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(f):this.get(this.last),e=d?f:f-1,g=null,k=0,l=false,m=0;d?--e>=a:++e<a;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g=this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(l)k+= m;if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<=this.options.size)))b=d?b+m:b-m}f=this.clipping();var p=[],o=0,n=0;j=this.get(a-1);for(e=a;++o;){g=this.get(e);l=!g.length;if(g.length===0){g=this.create(e).addClass(this.className("jcarousel-item-placeholder"));j.length===0?this.list.prepend(g):j[d?"before":"after"](g);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)){j=this.get(this.index(e));if(j.length)g= this.add(e,j.clone(true))}}j=g;m=this.dimension(g);if(m===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");if(this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size)p.push(g);else if(l)k+=m;n+=m;if(n>=f)break;e++}for(g=0;g<p.length;g++)p[g].remove();if(k>0){this.list.css(this.wh,this.dimension(this.list)+k+"px");if(d){b-=k;this.list.css(this.lt,h.intval(this.list.css(this.lt))-k+"px")}}k=a+o-1;if(this.options.wrap!="circular"&& this.options.size&&k>this.options.size)k=this.options.size;if(e>k){o=0;e=k;for(n=0;++o;){g=this.get(e--);if(!g.length)break;n+=this.dimension(g);if(n>=f)break}}e=k-o+1;if(this.options.wrap!="circular"&&e<1)e=1;if(this.inTail&&d){b+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&k==this.options.size&&k-o+1>=1){d=h.margin(this.get(k),!this.options.vertical?"marginRight":"marginBottom");if(n-d>f)this.tail=n-f-d}if(c&&a===this.options.size&&this.tail){b-=this.tail;this.inTail= true}for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=k;return b},animate:function(a,c){if(!(this.locked||this.animating)){this.animating=true;var b=this,d=function(){b.animating=false;a===0&&b.list.css(b.lt,0);if(!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail))b.startAuto();b.buttons();b.notify("onAfterAnimation"); if(b.options.wrap=="circular"&&b.options.size!==null)for(var f=b.prevFirst;f<=b.prevLast;f++)if(f!==null&&!(f>=b.first&&f<=b.last)&&(f<1||f>b.options.size))b.remove(f)};this.notify("onBeforeAnimation");if(!this.options.animation||c===false){this.list.css(this.lt,a+"px");d()}else this.list.animate(!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){if(a!==undefined)this.options.auto=a;if(this.options.auto===0)return this.stopAuto(); if(this.timer===null){this.autoStopped=false;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null}},buttons:function(a,c){if(a==null){a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap== "first")&&this.options.size!==null&&this.last>=this.options.size)a=this.tail!==null&&!this.inTail}if(c==null){c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1)c=this.tail!==null&&this.inTail}var b=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);a&&this.buttonNext.bind(this.options.buttonNextEvent+ ".jcarousel",this.funcNext);this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?false:true);this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)}else this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+ ".jcarousel",this.funcPrev);c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?false:true);this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)}else this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b, null,c);this.buttonNextState=a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",a,c,this.first);this.callback("itemFirstOutCallback",a,c,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",a,c,this.last);this.callback("itemLastOutCallback",a,c,this.prevLast)}this.callback("itemVisibleInCallback", a,c,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var g=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(i.isFunction(g)){var k=this;if(d===undefined)g(k,b,c);else if(f===undefined)this.get(d).each(function(){g(k,this,d,b,c)});else{a=function(m){k.get(m).each(function(){g(k, this,m,b,c)})};for(var l=d;l<=f;l++)l!==null&&!(l>=j&&l<=e)&&a(l)}}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){a=i(a);for(var b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical? "-horizontal":"-vertical")},dimension:function(a,c){var b=a.jquery!==undefined?a[0]:a,d=!this.options.vertical?(b.offsetWidth||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginLeft")+h.margin(b,"marginRight"):(b.offsetHeight||h.intval(this.options.itemFallbackDimension))+h.margin(b,"marginTop")+h.margin(b,"marginBottom");if(c==null||d==c)return d;d=!this.options.vertical?c-h.margin(b,"marginLeft")-h.margin(b,"marginRight"):c-h.margin(b,"marginTop")-h.margin(b,"marginBottom");i(b).css(this.wh, d+"px");return this.dimension(b)},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-h.intval(this.clip.css("borderLeftWidth"))-h.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-h.intval(this.clip.css("borderTopWidth"))-h.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});h.extend({defaults:function(a){return i.extend(q,a||{})},margin:function(a,c){if(!a)return 0; var b=a.jquery!==undefined?a[0]:a;if(c=="marginRight"&&i.browser.safari){var d={display:"block","float":"none",width:"auto"},f,j;i.swap(b,d,function(){f=b.offsetWidth});d.marginRight=0;i.swap(b,d,function(){j=b.offsetWidth});return j-f}return h.intval(i.css(b,c))},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a}});i.fn.jcarousel=function(a){if(typeof a=="string"){var c=i(this).data("jcarousel"),b=Array.prototype.slice.call(arguments,1);return c[a].apply(c,b)}else return this.each(function(){i(this).data("jcarousel", new h(this,a))})}})(jQuery);
