(function($){$(function(){$('#navigation > li > ul').hide();$('#navigation > li').each(function(){$(this).removeClass('span-6').addClass('span-4');var title=$('h2:first',this);var href=$('a:first',this).clone();href.text(title.text()).wrapInner('<span></span>');title.html(href);}).filter(':first').addClass('prepend-6').end().filter(':last').removeClass('span-4').addClass('span-6').end().find('h2 > a').bind('mouseenter',function(){$(this).parents('li.column').find('> ul').slideDown('fast');}).end().bind('mouseleave',function(){$('> ul',this).slideUp();});$('#navigation').appendTo('#welcome-bar');var reg=new RegExp('\.[a-z\-]+\.[a-z]{2,4}$','g');var host=reg.exec(window.location.host);$('#content-wrapper a').each(function(){if(!new RegExp(host+'/','gi').test(this.href)){$(this).addClass('external').attr('rel','external').bind('click',function(){window.open(this.href,'_blank');return false;});}}).filter('a[href^=#]').each(function(){var $targetId=$(this.hash);var $target=$targetId.length?$targetId:false;if($target){var targetOffset=$target.offset().top;$(this).click(function(){$('html, body').animate({scrollTop:targetOffset},400);window.location.href=this.hash;return false;});}});if(typeof $.fn.lightBox=='function'){$('#content a[rel*=gallery]').lightBox({imageLoading:'/img/js/images/lightbox-ico-loading.gif',imageBtnClose:'/img/js/images/lightbox-btn-close.gif',imageBtnPrev:'/img/js/images/lightbox-btn-prev.gif',imageBtnNext:'/img/js/images/lightbox-btn-next.gif',imageBlank:'/img/js/images/lightbox-blank.gif',txtOf:'sur'});}if(typeof $.fn.ifixpng=='function'){$.ifixpng('/img/js/images/pixel.gif');$('#site-logo img, #content img[src$=.png], #extra-content img').ifixpng();}});})(jQuery);function Verif(f,cc,message){var blank_fld=0;var r=new RegExp("[,;]+","gi");var champs=cc.split(r);var l=champs.length;for(i=0;i<l;i++){blank_fld=check_fld(blank_fld,f,champs[i]);}if(blank_fld>0){var error_msg="Le formulaire n'a pas été correctement rempli. Il manque <strong>"+blank_fld+" champ"+(blank_fld==1?'':'s')+"</strong> à compléter avant de pouvoir procéder à l'étape suivante.";if(!$('p.form-message-status',f).length){$(f).prepend('<p class="form-message-status error"></p>');}$message=$('p.form-message-status',f);$message.html(error_msg);$('html, body').animate({scrollTop:$message.offset().top});return false;}else{$('p.form-message-status',f).remove();var msg;var choix=true;switch(message){default:case 0:msg="";break;case'veda:note':msg="Vous allez valider votre note, pensez que c'est le jeu qui est noté, pas le test.\n\nCliquez sur 'Annuler' pour annuler sinon validez sur 'OK'.";break;case'veda:test':msg="Vous allez soumettre ce test.\nIl sera lu par l'équipe avant d'être validé et publié sur le site. S'il ne respecte pas les règles énoncées en début de page, il sera tout simplement refusé.\nCliquez sur 'OK' pour continuer sinon annulez.";break;}if(message){choix=confirm(msg);}if(choix){$('ul.submit > li.submit input',f).attr('disabled',true).value("Action en cours, merci de patienter");return true;}else{return false;}}function check_fld(compteur,f,champ){var field=f.elements[champ];if(!$.trim($(field).val())){compteur++;$(field).addClass('form-missing');}else{$(field).removeClass('form-missing');}return compteur;}}