function num_jour(){f=new Date;var a=new Date(f.getFullYear(),f.getMonth(),f.getDate()),b=new Date(f.getFullYear(),0,1);var c=Math.round((a-b)/864e5);return c}function get_from_url(a){infos=location.href.substring(location.href.indexOf("?")+1,location.href.length)+"&";infos=infos.substring(0,infos.indexOf("#"))+"&";valeur="";a=a+"=";taille=a.length;if(infos.indexOf(a)!=-1)valeur=infos.substring(infos.indexOf(a)+taille,infos.length).substring(0,infos.substring(infos.indexOf(a)+taille,infos.length).indexOf("&"));return valeur}function decrypt(a){a=a.replace(new RegExp("ø","g"),"http://");a=a.replace(new RegExp("£","g"),"www.");a=a.replace(new RegExp(">","g"),"/");a=a.replace(new RegExp("µ","g"),"a");a=a.replace(new RegExp("~","g"),"e");a=a.replace(new RegExp("--","g"),"");return a}hs.graphicsDir="/js/highslide/graphics/";hs.outlineType="rounded-white";hs.captionEval="this.thumb.alt";hs.showCredits=false;hs.dimmingOpacity=.2;hs.registerOverlay({thumbnailId:null,overlayId:"controlbar",position:"top right",hideOnMouseOut:true});hs.lang={loadingText:"Chargement ...",loadingTitle:"Cliquer pour annuler",focusTitle:"Cliquer pour amener devant",fullExpandTitle:"Agrandir à la taille d'origine (touche f du clavier)",restoreTitle:"Cliquer pour fermer. Maintenir le clic pour déplacer. Utiliser les flèches du clavier pour aller à la photo suivante ou précédente."};$(function(){function j(){if(d==false&&e==false){g=1+g;g=g>=h?0:g;tmp_lien=$("#actu_top ul li.li_"+g+" .top_lien");f=tmp_lien.parent().attr("class");tmp_lien.parent().parent().find("a").css("background-color","transparent");tmp_lien.parent().parent().find(".top_resume").fadeOut();tmp_lien.css("background-color","#CFE0E6");tmp_lien.parent().find(".top_resume").fadeIn()}else{d=false}setTimeout(j,5e3)}function i(){if($(this).parent().attr("class")!=f){$(this).parent().parent().find("a").css("background-color","transparent");$(this).parent().parent().find(".top_resume").fadeOut();$(this).css("background-color","#CFE0E6");$(this).parent().find(".top_resume").fadeIn();f=$(this).parent().attr("class");g=parseInt(f.substring(3,4));e=true}}function c(c,d){a=c;b=d;$("#liste_festival .bloc_festival").each(function(){festival_mois=$(this).find(".date").attr("rel");festival_pays=$(this).find(".pays").attr("rel");if((festival_mois.indexOf(a)>=0||a=="tous")&&(festival_pays==b||b=="tous")){$(this).show()}else{$(this).hide()}})}$(".mail_admin").each(function(){$(this).html('<a href="mailto:admin@go-festival.com">'+$(this).html()+"</a>")});$(".a").hover(function(){url=decrypt($(this).attr("rel"));$(this).before('<a href="'+url+'" class="'+$(this).attr("class").replace("a ","")+'">'+$(this).html()+"</a>");$(this).remove()});$("body").append('<div id="controlbar" class="highslide-overlay controlbar"><a href="#" class="previous" onclick="return hs.previous(this)" title="Précédent (touche gauche du clavier)"></a><a href="#" class="next" onclick="return hs.next(this)" title="Suivant (touche droite du clavier)"></a><a href="#" class="highslide-move" onclick="return false" title="Maintenir le clic pour déplacer l&#39;image"></a><a href="#" class="close" onclick="return hs.close(this)" title="Fermer"></a></div>');$("#commentaire_ajax").bind("submit",function(){if($("#req_username").val()!=""&&$("#req_message").val()!=""&&$("#req_web_site").val()==""){$(this).ajaxSubmit({target:"#ajax_new_message"})}else{$("#ajax_new_message").html('<strong style="color:#DB0000">Erreur lors de la validation.</strong><br />Merci de vérifier votre message.')}$("#ajax_new_message").css("display","block");return false});var a="tous";var b="tous";$("#find_mois").change(function(){c($(this).val(),b)});$("#find_pays").change(function(){c(a,$(this).val())});$("#find_classement").click(function(){if($(this).attr("rel")=="date"){f_lst2_str_tmp=$("#liste_festival1").html();$("#liste_festival1").html($("#liste_festival2").html());$("#liste_festival2").html(f_lst2_str_tmp);$(this).attr("rel","titre");$(this).html("Classer par titre")}else{f_lst2_str_tmp=$("#liste_festival1").html();$("#liste_festival1").html($("#liste_festival2").html());$("#liste_festival2").html(f_lst2_str_tmp);$(this).attr("rel","date");$(this).html("Classer par date")}});$("#find_affiche").click(function(){if($("#liste_festival img").css("display")=="block"){$("#find_affiche").html("Voir les affiches");$("#liste_festival img").css("display","none");$("#liste_festival .bloc_festival").css("float","none");$("#liste_festival .bloc_festival").css("height","auto");$("#liste_festival .bloc_festival").css("width","auto");$("#liste_festival .bloc_festival").css("text-align","left");$("#liste_festival .bloc_festival").css("padding","2px");$("#liste_festival .date_pays").css("float","right")}else{$("#find_affiche").html("Cacher les affiches");$("#liste_festival img").css("display","block");$("#liste_festival .bloc_festival").css("float","left");$("#liste_festival .bloc_festival").css("height","204px");$("#liste_festival .bloc_festival").css("width","184px");$("#liste_festival .bloc_festival").css("text-align","center");$("#liste_festival .bloc_festival").css("padding","4px");$("#liste_festival .date_pays").css("float","none")}});var d=true;var e=false;var f="li_0";var g=0;var h=$("#actu_top ul li").length;$("#actu_top li .top_resume").click(function(){location.href=$(this).parent().find("a").attr("href")}).css("cursor","pointer");$("#actu_top li").parent().find(".top_resume").hide();$("#actu_top li.li_0 .top_resume").show();$("#actu_top li .top_lien").hover(i,function(){e=false});j();$("#actu_top li .top_titre").each(function(){h_total=$(this).height();h_ligne=$(this).css("line-height").substr(0,2);if(h_total>h_ligne){$(this).parent().css("height","56px");$(this).parent().css("padding-top","4px")}});$("#nb_jour_restant").each(function(){aTmp=$(this).attr("rel").split("-");var a=new Date(aTmp[0],aTmp[1]-1,aTmp[2]);var b=new Date(aTmp[0],0,1);var c=Math.round((a-b)/864e5);var d=num_jour();var e=c-d>0?c-d:0;$(this).html("Débute dans <strong><span>"+e+"</span> jour"+(e>1?"s":"")+"</strong>")})})
