(function($){$(document).ready(function(){$("#backgroundimage").append('<a href="" class="fleches" id="fleche_gauche"></a>','<a href="" class="fleches" id="fleche_droite"></a>');if($("#bottomFixed .menu li#current").attr('id')!="current"){$("#bottomFixed .menu li:first").attr('id','current').addClass('active')}var i="#wrapper_menu .moduletable_menu li.team li";var j=$("a",i).length-1;var k=0;var l=false;var m=false;$('a',i).each(function(a){$(this).click(function(){if(!l){if($(this).parent().attr('id')!="current"){l=true;gotoItem($(this).parent())}}return false})});$("#fleche_gauche").click(function(){if(!l){l=true;m=true;$(i).each(function(a){if($(this).attr('id')=="current"){k=a-1;if(a<=0){k=j}}});gotoItem($("li:eq("+k+")",$(i).parent()))}return false});$("#fleche_droite").click(function(){if(!l){l=true;m=true;$(i).each(function(a){if($(this).attr('id')=="current"){k=a+1;if(a>=j){k=0}}});gotoItem($("li:eq("+k+")",$(i).parent()))}return false});$("#bottomFixed .moduletable a[class!=moduletitle]").each(function(a){$(this).click(function(){if(!l){if($("li:eq("+a+")",$(i).parent()).attr('id')!='current'){l=true;m=true;gotoItem($("li:eq("+a+")",$(i).parent()))}}return false})});function gotoItem(g){var h="#wrapper_menu .moduletable_menu li.team li";$('#loading').css('display','block');$("li#current",$(h).parent()).removeClass('active').removeAttr('id');g.attr('id','current').addClass('active');$('#page_equipe .content_equipe').slideUp('slow');$.ajax({url:$('a',g).attr('href')+'?tmpl=backgroundimage',success:function(c){var d=$('img',$(c)[($(c).length-1)]).attr('src');var e=$('#supersize img').attr('style');var f=new Image();$(f).load(function(){$('#supersize img').before('<img src="'+d+'" style="'+e+'" alt="" />');$('#supersize img:eq(0)').css('opacity',1);$('#supersize img:eq(1)').fadeOut(500,function(){$(this).css({'opacity':1});$(this).remove()});var b=$;b.ajax({url:$('a',g).attr('href')+'?tmpl=content',success:function(a){$('#page_equipe').html(a+'<div class="clr"></div>')},complete:function(){$('#loading').css('display','none');setTimeout(function(){l=false;m=false;clickNomTitre()},500)}})}).attr('src',d)}})}function clickNomTitre(){$('#page_equipe h2, #page_equipe h3').click(function(){if(!m){m=true;var a=$('#supersize img').css('opacity');if(a==1){$('.cv').html('&ndash;');$('#supersize img').fadeTo(500,0.3,function(){$('#page_equipe .content_equipe').slideToggle('slow',function(){m=false})})}else{$('.cv').html('+');$('#page_equipe .content_equipe').slideToggle('slow',function(){$('#supersize img').fadeTo(500,1,function(){m=false})})}}})}clickNomTitre()})})(jQuery);
