﻿/* é */ $(document).ready(function(){});$(window).load(function(){handleFlashEmbeds();handleBasicBehaviours();emailBuilder();handleIE6()});function handleFlashEmbeds(){$(".flashCtnt").each(function(){var b=$(".flashUrl span",this).html(),a=$(".flashUrl span",this).attr("class");$("*",this).remove();a=a.split("%%");$(this).media({src:b,width:a[0],height:a[1],bgColor:"",params:{wmode:"transparent"},attrs:{wmode:"transparent"}},{update:false})})}function handleBasicBehaviours(){$("a.popUp").unbind("click").click(function(){var d=$(this).attr("href"),f=$(this).attr("rel").split("%%"),e=f[0]!=""?f[0].replace(/%/g,"_"):"",c=typeof(f[1])!="undefined"&&typeof(f[2])!="undefined"?"width="+f[1]+",height="+f[2]:"",a=typeof(f[3])!="undefined"?f[3]:"",b=c?(a?c+","+a:c):(a?a:"");window.open(d,e,b);return false});$("a.closeLnk").unbind("click").click(function(){window.close();return false});$("a.confirm").unbind("click").click(function(){var a=$(this).attr("rel")!=""?$(this).attr("rel"):"Etes-vous sûr de vouloir effectuer cette action ?";if(confirm(a)){location.href=$(this).attr("href")}return false})}function autoEraseInput(b,a){$(b).blur();$(b).focus(function(){$(this).val(($(this).val()==a?"":$(this).val())).blur(function(){$(this).val(($(this).val()==""?a:$(this).val()))})})}function autosize(){$("textarea.autosize").each(function(){var a=$(this).parents("#messForm").length>0?"":"Donner son avis";if($(this).val()!=a){$(this).addClass("focus");if($("#autoSize").length==0){$(this).after('<pre id="autoSize" />')}var b=$(this).val().replace(/\n/g,"<br />").replace(/(\s) /g,"$1&nbsp;");$("#autoSize").empty().html(b+"<br /> &nbsp; ");$(this).css({width:$("#autoSize").width(),height:$("#autoSize").height()})}$(this).focus(function(){$(this).addClass("focus");if($("#autoSize").length==0){$(this).after('<pre id="autoSize" />')}$(this).val(($(this).val()==a?"":$(this).val()));$(this).keyup(function(){var c=$(this).val().replace(/\n/g,"<br />").replace(/(\s) /g,"$1&nbsp;");$("#autoSize").empty().html(c+"<br /> &nbsp; ");$(this).css({width:$("#autoSize").width(),height:$("#autoSize").height()})})}).blur(function(){$(this).removeClass("focus").val(($(this).val()==""?a:$(this).val()))})})}function splitLst(g,a,e,f){var c="";for(var d=1;d<=f;d++){a=d==f?a+" last":a;c+='<ul id="'+g+d+'" class="'+a+'"></ul>'}$(c).insertAfter("#"+g+"0");var b=Math.ceil($("#"+g+"0 li."+e).length/f)-1;$("#"+g+"0 li."+e).clone().appendTo("#"+g+"1");for(d=1;d<f;d++){$("#"+g+d+" li."+e+":gt("+b+")").clone().appendTo("#"+g+(d+1));$("#"+g+d+" li."+e+":gt("+b+")").remove()}$("#"+g+"0").remove()}function getQueryStringValues(e,d){d=(d||window.location.toString());var a,b={},c=new RegExp("(\\?|&amp;|&)("+e.join("|")+")(=([^&#]*))?(?=(&amp;|&|#|$))","g");while(a=c.exec(d)){b[a[2]]=a[4]||""}return b}function emailBuilder(){var b=/^http:\/\/www\.([^\/]+)\/(.*?)(\.(html|htm|php|asp))?$/,a=false,c=function(){a=true;$("a.courriel").each(function(){if(b.test($(this).html())){$(this).html($(this).html().replace(b,"$2@$1"))}else{if($("span.accessibility",this).html()!=null){if($("span.accessibility",this).html().match(b)){$("span.accessibility",this).html($("span.accessibility",this).html().replace(b,"$2@$1"))}}}})};if(!a){$(document).mousemove(c).keypress(c)}$("a.courriel").click(function(){if(!a){return false}if(b.test(this.href)){this.href=this.href.replace(b,"mailto:$2@$1")}});$("a.courrielSubject").click(function(){if(!a){return false}if(b.test(this.href)){var d=$(this).attr("rel");this.href=this.href.replace(b,"mailto:$2@$1?Subject="+d)}});return false}var trads={fr:{fermer:"Fermer",confirm:"Etes-vous sûr de vouloir effectuer cette action ?"},en:{fermer:"Close",confirm:"Are you sure to execute this action?"}};function handleIE6(){var a="closed";if($.cookie("ie6AlertMsg")!="off"){$(".ie6 #ie6").each(function(){var b=this;$(b).hover(function(){$(this).toggleClass("hover")},function(){$(this).toggleClass("hover")});$("<span />").attr("class","close").text(trads[$("html").attr("lang")]["fermer"]).click(function(){$(b).addClass(a);$.cookie("ie6AlertMsg","off")}).appendTo(".ctnt",b)})}else{$(".ie6 #ie6").addClass(a)}};
