

/***************************************************
				 ANCHOR SCROLL JAVASCRIPT
***************************************************/
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

/**
 * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/11/2009
 * @author Ariel Flesler
 * @version 1.2.7
 **/
;(function($){
		   var l=location.href.replace(/#.*/,'');
		   var g=$.localScroll=function(a){$('body').localScroll(a)};
		   // modif PB offset:{top:-144 } sauf si ipas iphone etc..
		   
		   if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod' )
		   	{
				 g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};
			} else {
				 g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true,offset:{top:-144 }};
			}
			
			// fin modif
		  
		   g.hash=function(a){
			   if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;
			   if(a.reset){var e=a.duration;delete a.duration;																																																																						   				$(a.target).scrollTo(0,a);																																																									   				a.duration=e}i(0,location,a)
			   }
			   };
			   
			   $.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);

/***************************************************
		ADDITIONAL CODE FOR ANCHOR SCROLL
***************************************************/
  jQuery(document).ready(function($){ 
    $.localScroll( ); 
	 
  }); 
  
  
  
  



/***************************************************
		  			SLIDING BOXES
***************************************************/
			jQuery(document).ready(function($){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Vertical Sliding
				$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:450});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:450});
				});
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.slideup').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:450});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:450});
				});				
				//Horizontal Sliding right
				$('.boxgrid.slideright').hover(function(){
				
			

					$(".cover", this).stop().animate({left:'292px'},{queue:false,duration:450});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:450});
			
					
			 
				});
				//Horizontal Sliding left
				$('.boxgrid.slideleft').hover(function(){
					$(".cover", this).stop().animate({left:'-325px'},{queue:false,duration:450});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:450});
				});				
				//Diagnal Sliding
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:450});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:450});
				});
				//Partial Sliding (Only show some of background)
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'100px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
			});




/***************************************************
		  		GEGENE FONCTION
***************************************************/

	
				
	
jQuery(document).ready(function($){

// les liens caché

 
$("#partenaires").fadeOut(100);

$("#voirpartenaire").click(function() {
								 
     $("#partenaires").fadeIn(100);

      });
 

//global var pour url news
var Gurlnews="";								

// remet header pour IPAD
if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod' )
{
 
	$("#header").css("width", "1100px");
 
} 
	
				 
				 
				 function transition_news() {
					 
				//ipad les mouvements sont  limité au div de fond
				if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod' )
				{	
				$('.section-news-contenu').hide();
			   $('.section-news-detail').show();
				
			//	alert("fin");
			
		
				
				} else {
				
				$('.section-news-contenu').animate({height:'0px'},{queue:false,duration:450,complete:function(){$('.section-news-contenu').hide();}});
			   $('.section-news-detail').show();
				
				
				}
				
				 }
 
	
			   // ferme les 6 vignettes news et affiche le detail
				
				$('.preview.news').click(function(){
			//	 alert(this.id);
				
				
				if ( Gurlnews =="" ) {
					Gurlnews=$('#iframe-news').attr('src');
					
					}
				
				//alert(Gurlnews);
				//change le source de l'iframe
			 if ( ! ($('#iframe-news').attr('src')   == this.id )) {
			 $('#iframe-news').attr('src', this.id);
			 }
				if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod' )
				{
				$('.section-news').stop().animate({height:'833px'},{queue:false,duration:450});
				} else {
				$('.section-news').stop().animate({height:'833px'},{queue:false,duration:200});	
				}

/* a remettre pour eviter flash blanc
				 $('#iframe-news').load(function (){
    						transition_news();
				 });
				 */
	
				transition_news();
				//$('.section-news').stop().animate({height:'833px'},{queue:false,duration:450,complete:function(){fin()}});
		 
				});
			

	
				// bouton close fenetre detail news
	
				$('.btn-news-close').click(function(){
					//	alert("Be PaTient !!!!! h:"+ $('.section-news').height());	
						//ipad les mouvements sont  limité au div de fond
				if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
				{	
					$('.section-news').animate({height:'638px'},{queue:false,duration:450});
					 $('.section-news-detail').hide();
					 $('.section-news-contenu').show();
				} else {
						$('.section-news').animate({height:'638px'},{queue:false,duration:450});
					 $('.section-news-detail').hide();
					  $('.section-news-contenu').animate({height:'484px'},{queue:false,duration:400});
				 $('.section-news-contenu').show();
					
				}
				
					$('#iframe-news').attr('src', Gurlnews);
				
				});
				
//*********************************			
// menu vertical project
//*********************************



if($('#menu-projects').length) { //tester le presence du div
	//init de la taille reele de #image_scroller_about .container
var totalContentVerti=0;
$('#menu-projects li').each(function () {
		totalContentVerti+=$(this).innerHeight();
		 
	
	});

//alert(totalContentVerti);

	
	padding=0;
	menuHeight=$('#menu-projects').height();
	$("img").size(); 
var offsetDiv=$('#menu-projects').offset().top;

if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
				{	
	
// gestion IPAD
	
	$('#menu-projects').touchwipe({
			
		
	 	
		wipeUp: function(e) {
 
		
			var thePosA=Math.min(offsetDiv-$('#menu-projects').position().top+190,totalContentVerti-menuHeight+20);
	
	 	 if (thePosA<totalContentVerti-menuHeight+20) {
  $('#menu-projects').stop().animate({top: -thePosA,avoidTransforms:true}, 450,'easeOutCirc');
 		 } else {
		  $('#menu-projects').stop().animate({top: -thePosA,avoidTransforms:true}, 450,'easeOutCirc', function() {$('#menu-projects').animate({top:-thePosA+20,avoidTransforms:true}, 450,'easeOutCirc')});		 
		 }
		 
		 
	 
 		},
 		
		wipeDown: function(e) {
			
		 
				thePosA= Math.min($('#menu-projects').position().top-offsetDiv+490,20)
			
			 
			
			 if (thePosA<20) {
  $('#menu-projects').stop().animate({top: thePosA,avoidTransforms:true}, 450,'easeOutCirc');
 		 } else {
		  $('#menu-projects').stop().animate({top: thePosA,avoidTransforms:true}, 450,'easeOutCirc', function() {$('#menu-projects').animate({top:-thePosA+20,avoidTransforms:true}, 450,'easeOutCirc')});		 
		 }
 
	 
 		},
	min_move_x: 40,
    min_move_y: 40,
	preventDefaultEvents: true
	});
	
	
				} else {
// gestion souris
	//alert( offsetDiv);
	$('#menu-projects').mousemove(function(e){
										 
		 
			 
			 var mouseCoords=(e.pageY  -offsetDiv);
			
		//  console.log("valeur offsetdic  "+offsetDiv+" "+e.pageY+ "delta: (=0?)"+mouseCoords);
			var mousePercentY=mouseCoords/menuHeight
			var destY=-(((totalContentVerti-(menuHeight))-menuHeight)*(mousePercentY) );
			var thePosA=mouseCoords-destY;
			var thePosB=destY-mouseCoords;
			var animSpeed=600; //ease amount
			var easeType='easeOutCirc';
			
			//console.log(thePosA )
			
			if(mouseCoords==destY){
				 $('#menu-projects').stop();
			}
			else if(mouseCoords>destY){
				  $('#menu-projects').stop().animate({top: -thePosA}, animSpeed,easeType);
			
			}
			 
		 
	});

}
//le hover sur li

 $('.liverti').hover(
		 function () {
			  
		 	$(this).css('color','#222222');
		 },
		 function () {
			if   (! $(this).hasClass('selected')) {
		 		$(this).css('color','#c0bfbf');
			}
			
		 }
	);
 
 //le click sur li
	
	
	
 $('.liverti').click(
		 function () {
			 $('.liverti').css('color','#c0bfbf');
			  $('.liverti').removeClass('selected');
			 $(this).css('color','#000000');
		 	$(this).addClass('selected');
		
		//ecrit le nom + loader et puis ajax
		 
		 texte="<div class='section-projects-contenu-sousheader-loader'></div>";
		document.getElementById("projectssousheader").innerHTML="<ul>"+$(this).text()+texte+"</ul>"
		//alert("faire du ajax"+$(this).attr('alt'))
		$.ajax({
		url:"ajax.php?cat="+$(this).attr('alt'),
		processData:true, //résultat sous forme d'objet
		dataType:"html", //type html
						success:function(data){
							 
						document.getElementById("projectssousheader").innerHTML="<ul>"+data+"</ul>";
						laurl= $(data).filter('li').attr('alt');
						$('#iframe-projects').attr('src', laurl);
						}
		});
		 }
	);
 
} //fin tester le presence du div

 
 //*********************************			
// fin menu vertical projexts
//*********************************


 //*********************************			
//   menu header projects
//*********************************
$('.menuprojheader').click(
		 function () {

			var animSpeed=300; //ease amount
			var easeType='easeOutCirc';
			 
 

	$('#menu-projects').stop().animate({top: 0}, animSpeed,easeType);
 
			 
			// alert(totalContentVerti);
			 $('.menuprojheader').css('color','#000000');
			  $('.menuprojheaderi').removeClass('selected');
			 $(this).css('color','#d50c38');
		 	$(this).addClass('selected');
			filtre=$(this).attr('alt');
			if (filtre=='tous') {
				$('.liverti').show();
			} else {
			$('.liverti').hide();
			 
			 
			$("#menu-projects").find("li").each(function(i) {
            if($(this).attr("class").indexOf(filtre)>=0)  {														 
			$(this).show();
			}
			  });										   
			}

		 
		 

			
			//recalcula la hauteur menu
			
			totalContentVerti=0;
			$('#menu-projects li:visible').each(function () {
					totalContentVerti+=$(this).innerHeight();
			});

		//alert(totalContentVerti);
		
		 }
	);
 
 
 
 //*********************************			
// fin menu header projects
//*********************************



 //*********************************			
//   menu sous header projects
//*********************************
$('.sousprojects').live("click", // important car on modifie le contenu en live 
		 function () {
			// alert($(this).attr('alt'))
			 
			 $('.sousprojects').css('color','#000000');
			  $('.sousprojects').removeClass('selected');
			 $(this).css('color','#d50c38');
		 	$(this).addClass('selected');
				
			laurl=$(this).attr('alt');
			//alert(laurl);
			$('#iframe-projects').attr('src', laurl);
		 }
);

 //*********************************			
//   fin menu sous header projects
//*********************************

 //*********************************	
 //lighbox me sur toutes les img rel "lme"
//*********************************


$("a[rel*=lme]").click(function(e) {
	// alert($(this).attr('href'));
		laurl=$(this).attr('href');
		$('#refimazoom').attr('src',laurl);
		 
		
		  $("#zoom_ima_proj").lightbox_me({
				centered: true 
			});
		 e.preventDefault();
		// alert("fin  "); 
 
});



// la fonction pour le zoom depuis une iframe
$(document).bind('F_zoom_ima', function(e) {
 
 $("#zoom_ima_proj").lightbox_me({
        centered: true 
	});
    e.preventDefault();
//alert("fin function parent"); 
});


//*********************************	
// commentaires
//*********************************	

// affichage commentaire

$('a[rel*=active_comment]').click(function(e) {
			 e.preventDefault();
			lah=$("#"+$(this).parent().attr('rel')).height();
		//	alert("cli co"+lah);
			var animSpeed=3000; //ease amount
			var easeType='easeOutCirc';
			elem="#"+$(this).parent().attr('rel')
			if ( $("#"+$(this).parent().attr('rel')).is(":visible")) {
				$("#"+$(this).parent().attr('rel')).stop().animate({height: 0}, 300, 'easeOutCirc',
																   function() {
																		$(elem).hide();
																		$(elem).height(lah);
																	 });
				
				
			}else {
			 $("#"+$(this).parent().attr('rel')).stop().animate({height: 0},  0);
			
			//alert($("#"+$(this).parent().attr('rel')).height());
			$("#"+$(this).parent().attr('rel')).show();
			 $("#"+$(this).parent().attr('rel')).stop().animate({height: lah}, 300, 'easeOutCirc');
			}
});

 

 

// initialise

$('.commentform').each(function(){
		$(this).after('<div class="message_comment" id="message_'+ $(this).attr('alt')+'" ></div>');
		    
});

// erreur AJAX
$(document).ajaxError(function(e, xhr, settings, exception) {
//alert('error in: ' + settings.url + ' \\n'+'error:\\n' + exception);
});


 $('.commentform').live('submit', function(e) {

form=$(this);
err= $("#message_"+ $(this).attr('alt')) 
err.empty();;
 
     e.preventDefault();
	 
	 		 
		    // if not logged in, validate name and email
		    if(form.find('#author').val() == '') {
			err.html('<span class="error">Erreur&nbsp;: veuillez renseigner les champs obligatoires vides (nom, e-mail).</span>');
			return false;
		    }
		    if(form.find('#email').val() == '') {
			err.html('<span class="error">Erreur&nbsp;: veuillez renseigner les champs obligatoires vides (nom, e-mail).</span>');
			return false;
		    }
		    var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		    if(!filter.test(form.find('#email').val())) {
			err.html('<span class="error">Erreur&nbsp;: veuillez saisir une adresse de messagerie valide.</span>');
			
		} // end if

		if(form.find('#comment').val() == '') {
		    err.html('<span class="error">Erreur&nbsp;: veuillez saisir un commentaire.</span>');
		    return false;
		}
//alert($(this).find('#comment_post_ID').val());
$.ajax({
	   	type:"POST", 
	 	url:"wp-comments-post.php",
			 data: "comment_post_ID="+$(this).find('#comment_post_ID').val()+
		"&author="+$(this).find('#author').val()+
		"&email="+$(this).find('#email').val()+
		"&url="+$(this).find('#url').val()+
		"&comment="+$(this).find('#comment').val(),
	processData:true, //résultat sous forme d'objet
	dataType:"html", //type html,

 		
			
		   complete:function(jqXHR, textStatus) {
			   if (textStatus !== 'success') {
			   err.html('<span class="error">'+textStatus+' lors de l\'envoi du commentaire </span>');
			   }
		   },
			 
			success:function(data){
							 
						    err.html('<span class="validation">Commentaire en attente de validation</span>');
						}

	        }); // end ajaxSubmit()

	 
	    }); // end form.submit()



//*********************************	
// Lightbox_me pour la video
//*********************************	



$('body').append(
                '<!-- Zoom image de projet  --> '
                +'<div id="zoom_ima_projvideo" class="simple_overlay_video"></div>'
                );


// recherche d'abord tout les a href  avec une image  & avec src  .mov

kmov=0
$("a:has(img)").each(function(e) {


hr=$(this).attr('href');
 
//if (/.mov/i.test(hr)) {
	if (hr.indexOf('.mov')>0) {
	kmov++
	$(this).addClass("videolightbox" )
	$(this).wrap('<div align="center" >');
	  $(this).find('img').wrap('<div>')
	
	$(this).append('<div class="videoplayrel"   id="videoplayrel'+kmov+'">play</div>');
	$(this).find('img').attr('rel','videoplayrel'+kmov);
	$(this).find('img').load(function() {
	// ajoute le play au dessus
	// ajoute le play au dessus
	//console.log($(this).height());
	h=-1*($(this).height())/2-65;
	w=($(this).width())/2-65;

	uid=('#'+$(this).attr('rel'));
	 
	//$('#videoplayrel'+k).css("top",h+"px");
	$(uid).css("marginTop",h+"px");
	$(uid).css("marginBottom",(-h-130)+"px");
	 
	//$(uid).css("marginLeft",w+"px");
	});
}
});


// recherche ensuite  tout les .mov  sans la classe  

$("a").each(function(e) {
 
hr=$(this).attr('href');
flmo=false
if (/.mov/i.test(hr)) {
flmo=(hr.indexOf('.mov')>0);	
}
if ( flmo && ! $(this).hasClass("videolightbox")) {
 
$(this).addClass("videolightbox" )
 $(this).addClass("videoplay" )
 $(this).wrap('<div align="center" >');
}
}); 
 
$("a[class*=videolightbox]").click(function(e) {
	//
	srv= $(this).attr('href');
	
		 
		
		  $("#zoom_ima_projvideo").lightbox_me({
				centered: true,
				onLoad: function() {
				
                  $("#zoom_ima_projvideo").html(
				    '<!-- Begin VideoJS -->'
				  + '<div class="video-js-box">'
				  + '	<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->'
				  + '	<video id="example_video_1" class="video-js" width="640" height="480" controls="controls" preload="auto" >'
				  + '	  <source src="'+srv+'" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\' />'
				  + '	   <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class !!. -->'
				  + '	  <object id="flash_fallback_1" class="vjs-flash-fallback" width="640" height="480" type="application/x-shockwave-flash" 						data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">'
				  + '	 <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />'
				  + '		<param name="allowfullscreen" value="true" />'
				  + '		<param name="flashvars" value=\'config={"clip":{"url": "'+srv+'","autoPlay":false,"autoBuffering":true}}\' />'
				  + '	   <!-- Image Fallback. Typically the same as the poster image. -->'
				  + '	   <!-- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"	  title="No video playback capabilities." />-->'
				  + '	  </object>'
				  + '	</video>'
				  + '	 </div>'
                  + '  <!-- End VideoJS -->'
				  + '  <a id="close_x" class="close sprited" href="#"></a>'
				  ) 
				  var myPlayer;
					setTimeout(function(){
				   var myPlayer = VideoJS.setup("example_video_1", {
       			 // Same options
			
      				});
				   }, 250);
				   },
				   onClose: function() {
				   //alert("close");
                    $("#zoom_ima_projvideo").html("");
				   }
			});
		 e.preventDefault();
		// alert("fin  "); 
 
});


//*********************************	
// map contact
//*********************************	

 $(".contactmap").click(function(e) {
  e.preventDefault();
if  ( $('#iframe-contact').attr('src').indexOf('white-page.php') ){
	
   $('#iframe-contact').attr('src',$('#iframe-contact').attr('src').replace('white-page.php','carte-contact.htm'));
}
  if ( $('.section-contact').height() < 200 ) {
  $('.section-contact').stop().animate({height: 495}, 1000, 'easeOutCirc');
  } else {
	   $('.section-contact').stop().animate({height: 145}, 600, 'easeOutCirc'); 
  }
 

});



//*********************************	
// lightbox me pour html ne marche pas sur différent domaine a creuser 
// gerer une iframe pour deroulement etc ...
//*********************************	


ajax_lightbox = function(selector, wrapper) {
  if (wrapper == null) {
    wrapper = 'lightbox_me';
	// wrapper = 'zoom_ima_projvideo';  pour ma fenetre 
  }
 $(selector).click(function(e) {
    var lightbox;
     lightbox = '<div id="' + wrapper + '"></div>';
	
	 
    if ($('#' + wrapper).length === 0) {
      $('body').append(lightbox);
    }
    $.get($(selector).attr('href'), function(data) {
      var html;
      html = data + '<a id="close_lightbox_me" class="close" href="#">close</a>';
      $('#close_lightbox_me').click(function(ev) {
        ev.preventDefault();
        ev.trigger('close');
      });
      $('#' + wrapper).html(html).lightbox_me();
    });
    e.preventDefault();
  });
};

    // Use with
ajax_lightbox("a[rel='ajax']");

}); //fin jquery gegene
