(function(a){a.prettyPhoto={version:"2.5.6a"};a.fn.prettyPhoto=function(P){P=jQuery.extend({animationSpeed:"normal",opacity:0.8,showTitle:true,allowresize:true,default_width:500,default_height:350,counter_separator_label:"/",theme:"light_rounded",hideflash:false,wmode:"opaque",autoplay:true,modal:false,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> 						<div class="pp_top"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 						<div class="pp_content_container"> 							<div class="pp_left"> 							<div class="pp_right"> 								<div class="pp_content"> 									<div class="pp_loaderIcon"></div> 									<div class="pp_fade"> 										<a href="#" class="pp_expand" title="Agrandir/Réduire">Agrandir/Réduire</a> 										<div class="pp_hoverContainer"> 											<a class="pp_next" href="#">next</a> 											<a class="pp_previous" href="#">previous</a> 										</div> 							<div class="pp_margin_top"><div class="ppt"></div></div> 										<div id="pp_full_res"></div> 										<div class="pp_details clearfix"> 											<a class="pp_close" href="#" title="Fermer">Fermer</a> 											<div class="pp_nav"> 												<a href="#" class="pp_arrow_previous" title="Précédant">Précédant</a> 												<p class="currentTextHolder">0/0</p> 												<a href="#" class="pp_arrow_next" title="Suivant">Suivant</a> 											</div> 											<div class="pp_description"></div> 										</div> 									</div> 								</div> 							</div> 							</div> 						</div> 						<div class="pp_bottom"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 					</div> 					<div class="pp_overlay"></div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>'},P);if(a.browser.msie&&parseInt(a.browser.version)==6){P.theme="light_square"}if(a(".pp_overlay").size()==0){R()}var p=false;var i=5;var F=20;var G=2*i;var E=0;var w=false;var K=false;var j,t,f,e,k,B,u,n,S=a(window).height()-G-F,O=a(window).width()-G,N=0;var q,A;var g=function(){s();o();d()};var m=function(){o();d()};var M=function(T){if(t.is(":visible")){switch(T.keyCode){case 37:a.prettyPhoto.changePage("previous");break;case 39:a.prettyPhoto.changePage("next");break;case 27:if(!P.modal){p=true;a.prettyPhoto.close()}break}}};a(this).each(function(){a(this).bind("click",function(){var U=this;var X=a(this).attr("rel");var V=/\[(?:.*)\]/;var Y=V.exec(X);var T=new Array(),Z=new Array(),W=new Array();if(Y){a("a[rel*="+Y+"]").each(function(aa){if(a(this)[0]===a(U)[0]){N=aa}T.push(a(this).attr("href"));Z.push(a(this).find("img").attr("alt"));W.push(a(this).attr("title"))})}else{T=a(this).attr("href");Z=(a(this).find("img").attr("alt"))?a(this).find("img").attr("alt"):"";W=(a(this).attr("title"))?a(this).attr("title"):""}a.prettyPhoto.open(T,Z,W);return false})});a.prettyPhoto.open=function(V,U,T){p=false;o();d();if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","hidden")}if(P.hideflash){a("object,embed,iframe").css("visibility","hidden")}images=a.makeArray(V);titles=a.makeArray(U);descriptions=a.makeArray(T);image_set=(a(images).size()>0)?true:false;l(a(images).size());a(".pp_loaderIcon").show();e.show().fadeTo(P.animationSpeed,P.opacity);t.find(".currentTextHolder").text((N+1)+P.counter_separator_label+a(images).size());if(descriptions[N]){t.find(".pp_description").html(unescape(descriptions[N]))}else{t.find(".pp_description").text("")}if(titles[N]&&P.showTitle){hasTitle=true;f.html(unescape(titles[N]))}else{hasTitle=false}x();t.fadeIn(P.animationSpeed,function(){J(true)});a(window).bind("resize",g);a(window).bind("scroll",m);a(document).bind("keydown",M)};a.prettyPhoto.changePage=function(T){if(T=="previous"){N--;if(N<0){N=0;return}}else{if(a(".pp_arrow_next").is(".disabled")){return}if(N<a(images).size()-1){N++}}h(function(){if(!p){a.prettyPhoto.open(images,titles,descriptions)}},true)};a.prettyPhoto.close=function(){p=true;if(E){clearTimeout(E)}a(window).unbind("resize",g);a(window).unbind("scroll",m);a(document).unbind("keydown",M);t.find("object,embed,iframe").css("visibility","hidden");a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(P.animationSpeed);e.fadeOut(P.animationSpeed,function(){a("#pp_full_res").html("");t.attr("style","").find("div:not(.pp_hoverContainer)").attr("style","");d();if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","visible")}if(P.hideflash){a("object,embed,iframe").css("visibility","visible")}N=0;P.callback()})};function I(){o();d();a(".pp_loaderIcon").hide();if(S<=0||O<=0){return}var T=j.containerWidth;var V=(S-j.containerHeight)/2;var U=(O-T)/2;if(V<i){V=i}if(U+T>O+G){U=O+G-T}else{if(U<i){U=i}}t.find(".pp_content").animate({height:j.contentHeight},P.animationSpeed);t.animate({top:V+C(),left:U+Q(),width:j.containerWidth},P.animationSpeed,function(){t.find(".pp_hoverContainer,#fullResImage").height(j.height).width(j.width);t.find(".pp_fade").fadeIn(P.animationSpeed);if(image_set&&v(images[N])["type"]=="image"){t.find(".pp_hoverContainer").show()}else{t.find(".pp_hoverContainer").hide()}P.changepicturecallback()})}function h(U,T){t.find("#pp_full_res object,#pp_full_res embed,#pp_full_res iframe").css("visibility","hidden");t.find(".pp_fade").fadeOut(P.animationSpeed,function(){if(T&&!p){a(".pp_loaderIcon").show()}if(U){U()}})}function s(){if(E){clearTimeout(E)}if(v(images[N])["resizable"]){E=setTimeout(L,500)}}function L(){E=0;if(!w&&!p&&O>200&&S>200){t.find(".pp_fade").fadeOut(P.animationSpeed,function(){if(!p){t.fadeIn(P.animationSpeed,H)}})}}function l(T){if(N<0){N=0}else{if(N>T-1){N=T-1}}if(N==T-1){t.find("a.pp_next").css("visibility","hidden");t.find("a.pp_arrow_next").addClass("disabled").unbind("click")}else{t.find("a.pp_next").css("visibility","visible");t.find("a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("next");return false})}if(N==0){t.find("a.pp_previous").css("visibility","hidden");t.find("a.pp_arrow_previous").addClass("disabled").unbind("click")}else{t.find("a.pp_previous").css("visibility","visible");t.find("a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("previous");return false})}if(T>1){a(".pp_nav").show()}else{a(".pp_nav").hide()}}function c(W,ad,T){var U=false;z(W,ad);var ac=W;var Z=ad;if((T&&(n>O)||(u>S))&&P.allowresize&&!K){var aa=W/ad;U=true;var Y=(n-B);var V=(u-k);var ab=(O-Y)/B;var X=(S-V)/k;if(ab<X){ac*=ab;Z=ac/aa}else{Z*=X;ac=Z*aa}ac=Math.floor(ac);Z=Math.floor(Z);z(ac,Z)}return{width:Math.floor(ac),height:Math.floor(Z),containerHeight:Math.floor(u),containerWidth:Math.floor(n),contentHeight:Math.floor(k),contentWidth:Math.floor(B),resized:U}}function x(){K=false;q=(parseFloat(b("width",images[N])))?b("width",images[N]):P.default_width.toString();A=(parseFloat(b("height",images[N])))?b("height",images[N]):P.default_height.toString();if(q.indexOf("%")!=-1||A.indexOf("%")!=-1){A=parseFloat((a(window).height()*parseFloat(A)/100)-100);q=parseFloat((a(window).width()*parseFloat(q)/100)-100);K=true}}function z(X,T){X=parseFloat(X);T=parseFloat(T);var W=t.find(".pp_details");W.width(X);var V=parseFloat(W.css("marginTop"))+parseFloat(W.css("marginBottom"));W=W.clone().appendTo(a("body")).css({position:"absolute",top:-10000});V+=W.height();W.remove();var Y=t.find(".pp_margin_top");k=T+V+parseFloat(Y.css("height"));B=X;var U=t.find(".pp_top").height();u=k+U+t.find(".pp_bottom").height();n=X+2*U}function v(T){if(T==undefined){return{type:"?",resizable:false}}else{if(T.match(/youtube\.com\/watch/i)){return{type:"youtube",resizable:true}}else{if(T.match(/vimeo\.com/i)){return{type:"vimeo",resizable:true}}else{if(T.indexOf(".mov")!=-1){return{type:"quicktime",resizable:true}}else{if(T.indexOf(".swf")!=-1){return{type:"flash",resizable:true}}else{if(T.indexOf("iframe")!=-1){return{type:"iframe",resizable:true}}else{if(T.substr(0,1)=="#"){return{type:"inline",resizable:false}}else{return{type:"image",resizable:true}}}}}}}}}function d(){var U=t.height();var T=t.width();var W=(S-U)/2;var V=(O-T)/2;if(W<i){W=i}if(V+T>O+G){V=O+G-T}else{if(V<i){V=i}}t.css({top:W+C(),left:V+Q()})}function o(){S=r()-G-F;O=D()-G;e.css({width:a(document).width(),height:a(document).height()})}function D(){return y(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0)}function r(){return y(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0)}function Q(){return y(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0)}function C(){return y(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function y(U,W,T){var V=U?U:0;if(W&&(!V||(V>W))){V=W}return T&&(!V||(V>T))?T:V}function R(){a("body").append(P.markup);t=a(".pp_pic_holder");f=a(".ppt");e=a("div.pp_overlay");t.attr("class","pp_pic_holder "+P.theme);e.css({opacity:0,width:a(document).width(),height:a(document).height()}).bind("click",function(){if(!P.modal){p=true;if(E){clearTimeout(E)}if(t.is(":animated")){t.stop().fadeOut("fast",a.prettyPhoto.close)}t.fadeOut(P.animationSpeed,a.prettyPhoto.close)}});a("a.pp_close").bind("click",function(){p=true;a.prettyPhoto.close();return false});t.find(".pp_previous, .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");return false});t.find(".pp_next, .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");return false})}function H(){x();t.fadeIn(P.animationSpeed,function(){J(false)})}function J(){var V="";var Y="";var ab=v(images[N]);var W=ab.resizable;switch(ab.type){case"image":Y=new Image();nextImage=new Image();if(image_set&&N>a(images).size()){nextImage.src=images[N+1]}prevImage=new Image();if(image_set&&images[N-1]){prevImage.src=images[N-1]}t.find("#pp_full_res")[0].innerHTML=P.image_markup;t.find("#fullResImage").attr("src",images[N]);Y.onload=function(){q=Y.width;A=Y.height;j=c(Y.width,Y.height,true);I()};Y.onerror=function(){w=true;p=true;a.prettyPhoto.close()};Y.src=images[N];break;case"youtube":j=c(q,A,W);movie="http://www.youtube.com/v/"+b("v",images[N]);if(P.autoplay){movie+="&autoplay=1"}V=P.flash_markup.replace(/{width}/g,j.width).replace(/{height}/g,j.height).replace(/{wmode}/g,P.wmode).replace(/{path}/g,movie);break;case"vimeo":j=c(q,A,W);var T=images[N];movie="http://vimeo.com/moogaloop.swf?clip_id="+T.replace("http://vimeo.com/","");if(P.autoplay){movie+="&autoplay=1"}V=P.flash_markup.replace(/{width}/g,j.width).replace(/{height}/g,j.height).replace(/{wmode}/g,P.wmode).replace(/{path}/g,movie);break;case"quicktime":j=c(q,A,W);j.height+=15;j.contentHeight+=15;j.containerHeight+=15;V=P.quicktime_markup.replace(/{width}/g,j.width).replace(/{height}/g,j.height).replace(/{wmode}/g,P.wmode).replace(/{path}/g,images[N]).replace(/{autoplay}/g,P.autoplay);break;case"flash":j=c(q,A,W);var aa=images[N];aa=aa.substring(images[N].indexOf("flashvars")+10,images[N].length);var U=images[N];U=U.substring(0,U.indexOf("?"));V=P.flash_markup.replace(/{width}/g,j.width).replace(/{height}/g,j.height).replace(/{wmode}/g,P.wmode).replace(/{path}/g,U+"?"+aa);break;case"iframe":j=c(q,A,W);var X=images[N];X=X.substr(0,X.indexOf("iframe")-1);V=P.iframe_markup.replace(/{width}/g,j.width).replace(/{height}/g,j.height).replace(/{path}/g,X);break;case"inline":V=P.inline_markup.replace(/{content}/g,a(images[N]).html());var Z=a(images[N]).clone().css({width:P.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(a("body"));j=c(a(Z).width(),a(Z).height(),W);a(Z).remove();break;default:p=true;h(function(){a.prettyPhoto.close()},false);return}if(!Y){t.find("#pp_full_res")[0].innerHTML=V;I()}}};function b(e,d){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+e+"=([^&#]*)";var g=new RegExp(c);var f=g.exec(d);if(f==null){return""}else{return f[1]}}})(jQuery);
