// JavaScript Document
 $(document).ready(function(){
        var eFidDesignWrap='<span class="ca_eFid_designWrap001"><span class="ca_eFid_designWrap002"></span></span>';
        var eFidDesignPlus='<span class="ca_eFid_designPlus-1"></span><span class="ca_eFid_designPlus-2"></span><span class="ca_eFid_designPlus-3"></span><span class="ca_eFid_designPlus-4"></span>';
        



	$('#mon_espace').append('<div class="ca_designPlus-1"/><div class="ca_designPlus-2"/><div class="ca_designPlus-3"/><div class="ca_designPlus-4"/>');

	
	
	///////////////////////// guide de avantages

$('#eFid_avantageList').height($('.eFid_avantages:first').height()+140)
    .siblings('h1').remove().end()
    .siblings('p:first').css({
    position:'absolute',
    top:'0'
    })  ;
    
     if ($.browser.msie && $.browser.version < 7){
     
		    $('#eFid_avantageList').find('li:nth-child(1) h2 ').width('15.75em')
		    .parent().siblings('li:nth-child(2)').find('h2').width('10.91em')
		    .parent().siblings('li:nth-child(3)').find('h2').width('14.41em');
		    
		    $('#eFid_avantageList li p,#eFid_avantageList li h3, h1.eFid_avantagesH1 ');
		    
		    $('.eFid_avantages').width('600');
    
      };
    
    
   

$('.eFid_avantages').css({
    position:'absolute',
    top:0,
    left:0,
    marginTop:'20px'
    })
    .parent().addClass('fLeft').end()
    .not(':first').hide().end()
    .prev('h2:first').addClass('focus').end()
    .prev('h2').each (function(){
          $(this).clone().prependTo($(this).next()).replaceWith('<h1 class="eFid_avantagesH1">'+ $(this).html() +'</h1>').end()
              .find('sup,em').hide()
          $(this).addClass('eFid_avantagesH2');
          $(this).append(eFidDesignPlus)
    
                }).click( function(){
        
        $(".eFid_avantages:visible").fadeOut("normal").prev().removeClass('focus');
        $(this).addClass('focus');   
        $(this).next().fadeIn("slow");
        $('#eFid_avantageList').height($(this).next().height()+50)//.css('background','red');
        return false;
        }).hover(function(){
   $(this).addClass("hOver");
 },function(){
   $(this).removeClass("hOver");
 });
	

$('fieldset#informations input').each(function(){ 
        
        $(this).focus(function(){
        $(this).css( 'borderColor','#333')
              });
        
        $(this).blur(function(){
        $(this).css('borderColor','#c0c0c0')
        
        });     
     });    

	
		
  $('.case p').jTruncate({  
  length: 115,  
   minTrail: 0,  
   moreText: "[...]",  
   lessText: "[-]",  
   ellipsisText: "&#160;",  
   moreAni: "fast",  
   lessAni: "normal"  
  }).end()
    
    .find('.truncate_more_link').parent().css({
    clear:'none',
    display:'inline'
    
    }).end()
    .toggle(function(){
   
       
    
   $(this).parents('.case').height('auto')
	/*   if($(this).parents('.case').hasClass('caseRow2')){
	       $('.caseRow2').vjustify()
	   
	   
	   }else{
	 
	   
	  // $('.caseRow2').vjustify()
	   };
   */
 //  $('.caseRow1').vjustify()
  // .siblings('.case:lt(2)').vjustify().css('background','red')
 },function(){
   $(this).parents('.case').height('110px')
 })
  

///////////////Dossiers du trekkeur



  	
    $('.dossiers_trekkeur')
    	.prepend('<a href="#" id="hautPage" name="hautPage"').find('#sommaire_wrap').prepend('<ul  id="sommaireUl"></ul>').end()
 		.find('h2')//.not(':first')
 			.each(function(id){
    
		    $(this).clone()
		   	 .appendTo($('ul[@id=sommaireUl]'))
		   	 .replaceWith('<li><a href="#toogleBtn-'+id+'" id="lienEvitementBtn-'+ id +'" >'+ $(this).text() +'</a></li>').end()
		     .css('position','relative')   
		     .append('<a href="#hautPage" id="toogleBtn-'+id+'" class="backTop"><span>Haut de page</span></a>')
		       
    $('#lienEvitementBtn-'+ id ) .click(function(){
  	  $('#toogleBtn-'+id).ScrollTo(800);
  	  return false;
  	  })

    });

   $('.backTop').click(function(){$('#hautPage').ScrollTo(800);return false});




$('ul.ca_dossiersTrekkeur')
.before('<ul id="ca_dossiersTrekkeurLast"></ul>').after('<p id="ca_toutVoir"><span>Voir tous <br/>les dossiers</span></p>')
.find('li:lt(5)').clone().appendTo('#ca_dossiersTrekkeurLast').end().remove().end().hide()
//


    $("#ca_toutVoir").click(function () {

    $(this).prev().slideDown('slow')
    $('span',this).fadeOut('normal');
return false()
    });   
    


////////////////

  });






eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3.G=6(e){7 l=0;7 t=0;7 w=3.c(3.H(e,\'1b\'));7 h=3.c(3.H(e,\'1h\'));7 a=e.I;7 b=e.J;1g(e.K){l+=e.L+(e.8?3.c(e.8.M):0);t+=e.N+(e.8?3.c(e.8.O):0);e=e.K}l+=e.L+(e.8?3.c(e.8.M):0);t+=e.N+(e.8?3.c(e.8.O):0);f{x:l,y:t,w:w,h:h,1d:a,1c:b}};3.1a=6(e){g(e){w=e.u;h=e.A}j{w=(d.P)?d.P:(1.4&&1.4.u)?1.4.u:1.9.I;h=(d.F)?d.F:(1.4&&1.4.A)?1.4.A:1.9.J}f{w:w,h:h}};3.Q=6(e){g(e){t=e.i;l=e.B;w=e.D;h=e.E}j{g(1.4&&1.4.i){t=1.4.i;l=1.4.B;w=1.4.D;h=1.4.E}j g(1.9){t=1.9.i;l=1.9.B;w=1.9.D;h=1.9.E}}f{t:t,l:l,w:w,h:h}};3.c=6(v){v=18(v);f 16(v)?0:v};3.15.m=6(s){o=3.17(s);f r.19(6(){q 3.R.m(r,o)})};3.R.m=6(e,o){7 z=r;z.o=o;z.e=e;z.p=3.G(e);z.s=3.Q();z.S=6(){1f(z.C);z.C=11};z.t=(q T).U();z.V=6(){7 t=(q T).U();7 p=(t-z.t)/z.o.W;g(t>=z.o.W+z.t){z.S();1e(6(){z.n(z.p.y,z.p.x)},13)}j{X=((-k.Y(p*k.Z)/2)+0.5)*(z.p.y-z.s.t)+z.s.t;10=((-k.Y(p*k.Z)/2)+0.5)*(z.p.x-z.s.l)+z.s.l;z.n(X,10)}};z.n=6(t,l){d.14(l,t)};z.C=12(6(){z.V()},13)};',62,80,'|document||jQuery|documentElement||function|var|currentStyle|body|||intval|window||return|if||scrollTop|else|Math||ScrollTo|scroll|||new|this|||clientWidth||||||clientHeight|scrollLeft|timer|scrollWidth|scrollHeight|innerHeight|getPos|css|offsetWidth|offsetHeight|offsetParent|offsetLeft|borderLeftWidth|offsetTop|borderTopWidth|innerWidth|getScroll|fx|clear|Date|getTime|step|duration|st|cos|PI|sl|null|setInterval||scrollTo|fn|isNaN|speed|parseInt|each|getClient|width|hb|wb|setTimeout|clearInterval|while|height'.split('|'),0,{}))