var iemobile=/IEMobile/i.test(navigator.userAgent),mobIE=0,tablet=false,tabLandscape=false,ua=window.navigator.userAgent,uaLower=navigator.userAgent.toLowerCase(),msie=ua.indexOf("MSIE "),newMsie=ua.indexOf("Trident"),IeVersion=parseInt(ua.substring(msie+5,ua.indexOf(".",msie))),safariWindows=uaLower.indexOf("safari/")!==-1&&uaLower.indexOf("windows")!==-1&&uaLower.indexOf("chrom")===-1;function playVideo(wpName){var language=$("body").attr("class").substring(0,2).toUpperCase(),host=window.location.hostname,urlSite,secure=host.search("secure"),urlS7="https://vp-eu.scene7.com/is/content/vpeu/";if(secure>=0){urlSite="https://static."+host.substring(10)}else{urlSite="http://static."+host.substring(3)}urlVideo=urlS7+"00_"+language+"_registration_video"+wpName+"_01";$("#jquery_jplayer_1").jPlayer({ready:function(){$(this).jPlayer("setMedia",{m4v:urlVideo})},size:{width:"660px",height:"371px",cssClass:"jp-video-371p"},supplied:"m4v",swfPath:urlSite+"/vp5/_web/site/vp/_common/media/Jplayer.swf",cssSelectorAncestor:"#jp_container_1",preload:"none",solution:"html, flash"})}function playVideoMob(){var language=$("body").attr("class").substring(0,2).toUpperCase(),host=window.location.hostname,urlSite,secure=host.search("secure"),urlS7="https://vp-eu.scene7.com/is/content/vpeu/",poster="https://vp-eu.scene7.com/is/image/vpeu/00_INT_registration_poster1_01";if(secure>=0){urlSite="https://static."+host.substring(10)}else{urlSite="http://static."+host.substring(3)}urlVideo=urlS7+"00_"+language+"_registration_video1_01";$("#jquery_jplayer_2").jPlayer({ready:function(){$(this).jPlayer("setMedia",{m4v:urlVideo,poster:poster})},size:{width:"253px",height:"117px",cssClass:"jp-video-142p"},supplied:"m4v",swfPath:urlSite+"/vp5/_web/site/vp/_common/media/Jplayer.swf",cssSelectorAncestor:"#jp_container_2",preload:"none",solution:"html, flash"})}function stopVideoMob(){$("#jquery_jplayer_2").jPlayer("destroy")}function InitPlayVideo(){$(".registration .wpLine a,.aboutUs .wpLine a, .register .wp01,.subscribe .wp01, .operation .wp01, .regTemplate .wp01").click(function(e){e.preventDefault();$("#wrapper").before('
');$("#stopGrey").before($(".wpVideo"));$(".wpVideo").fadeIn();$("#stopGrey").css("opacity",0).fadeTo(300,.5);var $this=$(this).attr("class").substring(3,4);playVideo($this)});if($(".popUp").length>0){var urlWpName=$(".wpVideo").attr("class").substring(11,16);playVideo(urlWpName)}$(".jp-toggles .jp-full-screen").on("click",function(){var t=Math.round($(document).width()-210),IElt10=$.browser.msie&&$.browser.version<=9;$(".jp-progress").css("width",t);$(".closeVideo").css("display","none");if(IElt10){$(".jp-progress").css("width","1010px")}});$(".jp-toggles .jp-restore-screen").on("click",function(){$(".jp-progress").css("width","");$(".closeVideo").css("display","block");$("div.jp-video-play").css("height","100%")});$(document).keyup(function(e){if(e.keyCode===27){$(".jp-restore-screen").trigger("click");$(".jp-progress").css("width","");$(".closeVideo").css("display","block");$("object").css("width","660px")}});$(".closeVideo a").click(function(e){closePopIn();e.preventDefault()})}$(document).ready(function(){$(".modalDeregistered .closeModalDeregistered").click(function(e){e.preventDefault();$("#stopGrey, .modalDeregistered").hide()});InitPlayVideo();playVideoMob();$(".regFooterMore").toggle(function(e){e.preventDefault();$(this).parent().find(".regMoreInfo").fadeIn();$(this).css("background-position","0 -22px")},function(){$(this).parent().find(".regMoreInfo").fadeOut();$(this).css("background-position","0 0")});if($(".infoMail").text().length==0)$(".infoMail").css("display","none");var minHeight=window.innerHeight;$("#container").css("min-height",minHeight);$("body").on("click",".wpLineMob .wp01",function(e){$("#jquery_jplayer_2").jPlayer("play");e.preventDefault()});$(".civilityRadio").click(function(e){var disableCard=$(this).parent();if(disableCard.attr("class")!="disabled"){$(".civilityRadio").removeClass("active");$(".civilityRadio input").prop("checked",false);$(this).addClass("active");$(this).find("input").prop("checked",true)}});$(".infoPicto").hover(function(){$(this).siblings(".blocInfoMsg").show();$(this).addClass("hoverPicto")},function(){$(".infoLabel .blocInfoMsg .infoBlocMsg").mouseleave(function(e){$(".infoLabel .blocInfoMsg").hide();$(this).parent().siblings(".infoPicto").removeClass("hoverPicto")})});if(IeVersion!=7&&IeVersion!=8){var element=$(".regTemplate .obj_form select, .new_registration .obj_form select, .operation2 .obj_form select, .operation .obj_form select, .chooseLanguage select, .rowCities select");element.each(function(){$(this).selectize()})}$(".selectize-input input").prop("type","button");if(msie&&IeVersion<10){$(".obj_form").addClass("ieForm")}if($(".showCookiesBanner").length>0){$(".signIn .cookiesBanner, .signUp .cookiesBanner").css("width","100%");$(window).on("resize",function(){$(".signUp .cookiesBanner").css("width","100%")})}});