var alias = 'vap'; var sv_form = 'sv_form'; var url = window.location.pathname;var myPageName = url.substring(url.lastIndexOf('/') + 1); document.title = 'Voyages à prix fous'; if(myPageName.indexOf('dynpkg') > -1){ var linkInputVerif = 'input-verif-dynpkg.cgi'; var linkResults = 'results-dynpkg.cgi'; } //Results presentation if(myPageName.indexOf('results') > -1 || myPageName.indexOf('verif') > -1 || myPageName.indexOf('calendrier') > -1 || myPageName.indexOf('dynpkg') > -1 || myPageName.indexOf('booking') > -1 || myPageName.indexOf('resultadv') > -1 || myPageName.indexOf('query-hotel') > -1){ var fileref=document.createElement("script") fileref.setAttribute("type", "text/javascript") fileref.setAttribute("id", "general-js") fileref.setAttribute("src", "https://www.voyagesaprixfous.ca/wp-content/themes/definition/includes/js/third-party.js?ver=5.7.2") document.getElementsByTagName("head")[0].appendChild(fileref) var fileref2=document.createElement("script") fileref2.setAttribute("type", "text/javascript") fileref2.setAttribute("id", "general-js") fileref2.setAttribute("src", "https://www.voyagesaprixfous.ca/wp-content/themes/definition/includes/js/general.js?ver=5.7.2") document.getElementsByTagName("head")[0].appendChild(fileref2) //Haut + tabs document.write(''); document.write(''); } document.write('
'); window.onload=function(){ if($(".etape:first").html() != null){ var lng = $(".etape:first").html().indexOf("tape") > -1 ? 'fr' : 'en'; if(lng == 'en'){ $("#vapftabs ul li:first").find("a").text("Results"); $("#vapftabs ul li:eq(1)").find("a").text("Modify Search"); } }else{ var lng = 'fr'; } $("#sv_main").attr('src', 'https://www.voyagesaprixfous.ca/'+sv_form+'/sv2.php?v=3&lng='+lng); //Tab res./search $("#vapftabs").tabs({ active: 0 }); if(myPageName.indexOf('booking') > -1){ $(".ui-tabs-nav").hide(); $("form[style*='750px']").width("96%").css('border','none'); } $("#vapftabs").show(); if(myPageName.indexOf('resultspackage') == -1){ var pNum = myPageName.indexOf('input-verifforf') > -1 ? 1 : 0; $("#vapftabs-1 form:eq(1)").addClass("msh").css('border','none 0px'); if(myPageName.indexOf('calendrier-lowest-price') > -1){ $("img[src*='bouton_1']").parent().hide(); $("hr:first").css('border-color','white'); }else{ $("#vapftabs-1 div:eq(0)").addClass("msh").css('border','none 0px').find("div").css('border','none 0px').find("span").addClass("msh"); } //Détail forfait ou détail assurance if($("#vapftabs-1 p:eq("+pNum+")").find("img").length > 0){ $("#vapftabs-1 p:eq("+pNum+")").css({ float: 'left', marginTop: '-4px', marginLeft: '-40px', }); }else{ $("p[style*='-46px']").css('float','none').css('margin-left','0px'); } //Image stars et promo dans description $("#vapftabs-1 p:eq("+pNum+") img").each(function(){ if( this.parentNode.tagName != 'A' ){ //star $(this).css({ width:'20px', height:'18px', margin:'2px 0px' }); }else{ //promo $(this).css({ /*width:'40%', height:'40%',*/ margin:'2px 5px' }); } }); $("#vapftabs-1 p:eq("+pNum+") a:eq(0)").append("
            "); //promo 1 $("#vapftabs-1 span[style*='40%']").css("width", "38%"); //Détail vol $("select[name*='state_insu']").parent().css('text-align','left'); $("select[name*='sorted_by']").css('margin-left','8px').prev().css('display','inline').css('margin-left','0px'); $(".txtPaging").each(function(){ $(this).html($(this).html().replace('
','')); $(this).html($(this).html().replace('            ','')); }); $("p a.txtPaging").parent().addClass('volPager'); }else{ $(".showRefineText a").click(function(){ $(".refine_textbox_starting_from").each(function(){ $(this).appendTo($(this).prev()); }); $(".showRefineText a").unbind('click'); }); $("div[style*='750px']").width("96%"); } $("body").addClass("home blog custom-background header-image header-full-width content-sidebar metro-pro-blue metro-pro-home"); $(".msh:first").width('1090px').css('background-color', '#ffffff'); $(".msh[style*='750']").width("100%"); $(".etapewhite").parent().addClass("etapeWrapper"); setTimeout('$("td.prix").parent().parent().addClass("tblPrix");',1000); //dynamique if(myPageName.indexOf('dynpkg') > -1){ $("#vapftabs-1").removeClass('ui-tabs-hide'); $("#vapftabs-2").addClass('ui-tabs-hide'); $("table[width*='740']").css("float", "none"); if($(".FlightLeft").length > 0){ $("#vapftabs-1 form:first").hide(); $("div[style*='750px']").width("100%"); } } }; if(getParameterByName("layout") == "short"){ setTimeout("bestprice_layout();", 500); setTimeout("bestprice_layout();", 2500); setTimeout("bestprice_layout();", 5000); setTimeout("bestprice_layout();", 10000); var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", "https://www.voyagesoft.net/"+alias+"/bestprice.css") document.getElementsByTagName("head")[0].appendChild(fileref) } }else{ //Standard presentation document.write('
'); } function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } function bestprice_layout(){ if(getParameterByName("layout") == "short"){ $(".wrap, .nav-primary, .ui-tabs-nav, iframe, #pik, center, hr").hide(); $(".site-container, .ui-tabs.ui-tabs-panel, .ui-tabs, #vapftabs-1").css("margin", "0").css("padding", "0"); $("table:eq(1)").css("width", "100%"); $("table:eq(1) tr:eq(0) td:eq(0)").text("Départ:"); $("table:eq(1) tr:gt(0)").each(function(){ $(this).find("td").each(function(){ $(this).find("a").attr("target", "_top"); var a = $(this).find("a").text().split(" "); if(a.length == 3){ $(this).find("a").text(a[0] + " " + a[1].substring(0,3) + " " + a[2]) } }); }); $("table:eq(1) tr td:nth-child(2)").addClass('trbestprice2_0'); $("table:eq(1) tr td:nth-child(3)").addClass('trbestprice2_5'); $("table:eq(1) tr td:nth-child(4)").addClass('trbestprice3_0'); $("table:eq(1) tr td:nth-child(5)").addClass('trbestprice3_5'); $("body").css("background", "#fff"); $(".ui-widget-content").css("border", "none"); $("#contenu").css("margin-top", "-25px"); $("table:eq(1) tr:eq(0) td").css("color", "#087899"); $("table:eq(1) td").css("padding", "4px 1px"); $("#vapftabs").css("width", "100%"); $(".etapeWrapper").hide(); $("#loading").hide(); } }