(function($){$(document).scroll(function(){if($('#popin-cookie').length>0&&$('#popin-cookie').is(':visible'))$('#popin-cookie').fadeOut(300);});$(window).resize(function() {if($('body').hasClass('itemid-101')){if($('.video-search-home').length>0){var top_pos=($('.video-search-home video').height()-$('.video-search-home').height())/2;$('.video-search-home video').css('top','-'+top_pos+"px");}}}) $(document).ready(function(){if($('body').hasClass('itemid-101')&&$('.video-search-home').length>0){$(window).resize();if($('.video-search-home .cartouche-texte').length){var marginTop=parseInt($('.video-search-home .cartouche-texte').outerHeight()/2);$('.video-search-home .cartouche-texte').css('margin-top',marginTop);$('.video-search-home .cartouche-texte').css($('.video-search-home .cartouche-texte').attr('data-position'),-$('.video-search-home .cartouche-texte').outerWidth()).show();if($('.video-search-home .cartouche-texte').attr('data-position')=="left")$('.video-search-home .cartouche-texte').delay(400).animate({left:0},400,"easeOutCubic",function(){});else $('.video-search-home .cartouche-texte').delay(400).animate({right:0},400,"easeOutCubic",function(){});}} var slider1=$('.slider-top').bxSlider({'auto':true,'pause':6000,useCSS:true,speed:1500,loop:true,touchEnabled:false,nextText:'',prevText:''}).hide();$('.slider2').bxSlider({minSlides:4,maxSlides:4,'auto':false,useCSS:false,speed:500,pager:false,touchEnabled:false,infiniteLoop:false,nextText:'',prevText:''});var slider3=$('.slider-fp').bxSlider({minSlides:1,maxSlides:10,moveSlides:1,slideWidth:735,loop:true,'pause':6000,useCSS:false,touchEnabled:false,speed:1000,nextText:'',prevText:''});$('.top-left .btn-carte').click(function(){var id=$('.slider-fp li[data-role=carte]').eq(0).index();slider3.stopAuto();slider3.goToSlide(slider3.getSlideCount()-1);});if($('.slider-top').length>0)setTimeout(function(){$('.slider-top').fadeIn(600);slider1.reloadSlider();},500);$('#header-nav ul.nav-versions .hidden').parent('span').parent('li').remove();var navVersions=$('#header-nav ul.nav-versions>li').detach();if(!$('body').hasClass('site-cgos')) $('#header-nav ul.nav-versions').append('');else $('#header-nav ul.nav-versions').append('');navVersions.eq(0).appendTo('#header-nav .nav-versions-col1');navVersions.eq(1).appendTo('#header-nav .nav-versions-col2');navVersions.eq(2).appendTo('#header-nav .nav-versions-col3');if(!$('body').hasClass('site-cgos'))navVersions.eq(3).appendTo('#header-nav .nav-versions-col4');navVersions.each(function(id,ele){var title=$(ele).find('>span:eq(0)>a');var text=title.text().replace(/(.\s)+(.*)/,"$1 $2");text+=''+title.attr('title')+'';$(title).html(text);});$('#header-nav ul.nav-pills li.item-108,#header-nav ul.nav-versions').mouseenter(function(){$('#header-nav ul.nav-versions').stop(true,false).animate({'top':$('header').height()},600,'easeOutExpo');}).mouseleave(function(){$('#header-nav ul.nav-versions').stop(true,false).animate({'top':'-1000px'},600,'easeInExpo');});$('#header-nav ul.nav-pills li.item-109,#header-nav ul.category-module').mouseenter(function(){$('#header-nav ul.category-module').stop(true,false).animate({'top':$('header').height()},600,'easeOutExpo');}).mouseleave(function(){$('#header-nav ul.category-module').stop(true,false).animate({'top':'-1000px'},600,'easeInExpo');});$('#header-nav ul.nav-pills li.item-109 a').attr('href','#');$('#header-nav ul.nav-pills li.item-394,#header-nav ul.date-module').mouseenter(function(){$('#header-nav ul.date-module').css({'width':parseInt($('#header-nav ul.nav-pills li.item-394 span').outerWidth()),'left':parseInt($('#header-nav ul.nav-pills li.item-394').offset().left)});$('#header-nav ul.date-module').stop(true,false).animate({'top':$('header').height()},600,'easeOutExpo');}).mouseleave(function(){$('#header-nav ul.date-module').stop(true,false).animate({'top':'-1000px'},600,'easeInExpo');});$('#header-nav ul.nav-pills').append('
  • DOMAINE DE COMBELLES VACANCES
  • ') $('#slider-versions>ul li').click(function(){sliderVersionsClick($(this).index());});sliderVersionsClick(0);if($('#footer ul.nav.menu a.banniere_sl').length){$('#header-nav ul.nav-versions').append('
  • ');$('#footer ul.nav.menu a.banniere_sl').clone().appendTo($('#header-nav ul.nav-versions li.banniere_sl'));$('#footer ul.nav.menu a.banniere_sl').parents().closest('li').remove();var title_btn_ban=$('#header-nav ul.nav-versions a.banniere_sl').attr('title');$('#header-nav ul.nav-versions a.banniere_sl').removeAttr('title');$('#header-nav ul.nav-versions a.banniere_sl').find('span').text(title_btn_ban);var img_sl=new Image();img_sl.src=$('#header-nav ul.nav-versions a.banniere_sl>img').attr("src");img_sl.onload=function(){$('#header-nav ul.nav-versions').css('min-height',img_sl.naturalHeight+'px');};} $('.tab-btns>li').click(function(event){selectTab($(this).index());}).eq(0).click();$('.btn-share').click(function(){$('.social_links').stop(true).slideToggle(300);});$('aside .mod-avis a.voir_avis').click(function() {$('.tab-btns li.tab_avis').trigger('click');$('html, body').animate({scrollTop:$('#tab-top').offset().top-80},300);return false;});$('aside a.voir_dates').click(function() {$('.tab-btns li.tab_dates').trigger('click');$('html, body').animate({scrollTop:$('#tab-top').offset().top-80},300);return false;});function distance(lat1,lon1,lat2,lon2){var p=0.017453292519943295;var c=Math.cos;var a=0.5-c((lat2-lat1)*p)/2+ c(lat1*p)*c(lat2*p)*(1-c((lon2-lon1)*p))/2;return 12742*Math.asin(Math.sqrt(a));} var maxLocation=40;$('#infosTarifs #location_result, #infosTarifs #lst_autocar li').hide();$('#infosTarifs #more-location').click(function(){maxLocation+=3;if(maxLocation>$("#infosTarifs #lst_autocar li").length)$('#infosTarifs #more-location').hide();for(var i=0;ili').click(function(event){selectTarifsList($(this).index());}).eq(0).click();if($('#infosTarifsDepart').length>0)$('#infosTarifsResult').hide();$('#tab5>h2').click(function(event){$('#tab5-inner').slideToggle();$(this).toggleClass('active');});$('.top-right-bottom .btn-depart-vel,.top-right-bottom .btn-depart,.tabs .btn-preinscription').click(function(event){$('.tab-btns>li').eq($('.tab-btns>li').length-2).click();$('#tab5-inner').slideDown();$(this).addClass('active');$('html, body').animate({scrollTop:$($('#tab-top')).offset().top-80},300);return false;});$('#btn-tarif').click(function(event){if($('#infosTarifsDepart input[type=checkbox]:checked').length==0){$('#infosTarifsDepart>.error').show();}else{$('#infosTarifsDepart>.error').hide();$('#infosTarifsResult').slideDown();$('html, body').animate({scrollTop:$($('#infosTarifsResult')).offset().top-100},300);} return false;});$('.mod-avis>.btn').click(function(event){$('.tab-btns>li').eq($('.tab-btns>li').length-1).click();$(this).addClass('active');$('html, body').animate({scrollTop:$($('#tab6 form')).offset().top-100},300);return false;});$('.articleSTD blockquote h2').prepend('');if($('#infosTarifsDepart').length>0)$('.infosTarifsList tr.tarif').hide();$('#infosTarifsDepart input[type=checkbox]').change(function(event){var checkbox=$(this);$('.infosTarifsList tr.tarif').each(function(index,element){if($(this).data('lieu')==checkbox.attr('value')&&$(this).data('transport')==checkbox.data('transport')){if(checkbox.attr('checked')){$(this).addClass('active').show();}else{$(this).removeClass('active').hide();}}});$('#infosTarifsDates>li').show().addClass('result');$('.infosTarifsList').each(function(id,element){if($('tr.tarif.active',this).length==0){$('#infosTarifsDates>li').eq(id).hide().removeClass('result');}});$('#infosTarifsDates>li.result').eq(0).click();});$('.infosTarifsList a.spanInscription').click(function(){$(this).parents('.tarif').toggleClass('open');if($(this).parents('.tarif').hasClass('open'))$(this).parents('.tarif').find('.blocs').slideDown(300);else $(this).parents('.tarif').find('.blocs').slideUp(300);return false;});$('.infosTarifsList .vel .reservation a').click(function(){$(this).parent().find('form').submit();return false;});var refLogicarDispo=new Array();$('#infosTarifsResult input[name="refLogicar[]"]').each(function() {if($.inArray($(this).val(),refLogicarDispo)==-1){refLogicarDispo.push($(this).val());}});if(refLogicarDispo.length){var refs=$.extend({},refLogicarDispo);url_ajax="/ws/fp.php?op=update_stock";$.ajax({type:"POST",url:url_ajax,data:{refLogicar:refs},success:function(response){for(i=0;i").addClass("arrow").addClass(feedback.vertical).addClass(feedback.horizontal).appendTo(this);}}});} if($.isFunction($.fn.fancybox)){$(".fancybox").fancybox();} $('.goTo').click(function(e){$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top},500);e.preventDefault();});$('body.form .btn-big.btn-icon').click(function(){if($(this).hasClass('next')){if($('body').hasClass('sur-mesure')){$('body.form article .inner>form').submit();}else{var next_etape=$('.etape.actif').index();$('.etape.actif label.error').removeClass('error');$('.etape.actif').removeClass('actif');$('.etape:eq('+next_etape+')').addClass('actif');$('html, body').animate({scrollTop:0},500);}} else if($(this).hasClass('prev')){var prev_etape=$('.etape.actif').index()-2;$('.etape.actif').removeClass('actif');$('.etape:eq('+prev_etape+')').addClass('actif');$('html, body').animate({scrollTop:0},500);} else if($(this).hasClass('submit')){$(this).addClass('fin');}});if(!$('body').hasClass('quel-voyageur-etes-vous'))$(document).tooltip();$('body.form select[name="idDemande"]').change(function(){if($(this).val()=="form.demande.presse")$('body.form div.publication').show();else $('body.form div.publication').hide();switch($(this).val()){case"form.demande.voyage":$('.ele33.agences').show();break;default:$('.ele33.agences').hide();break;}}) $('body.form.sur-mesure input[name="destination"]').on('input',function(){if($(this).val()!=""){$('body.form.sur-mesure input[name="conseil"]').attr('checked',false);}else{$('body.form.sur-mesure input[name="conseil"]').attr('checked',true);}});$('body.form.sur-mesure input[name="conseil"]').click(function(){if($(this).attr('checked')){$('body.form.sur-mesure input[name="destination"]').val('');$('body.form.sur-mesure input[name="destination"]').removeAttr('required').removeAttr('aria-required');$(this).parent().removeClass('error');}else{$('body.form.sur-mesure input[name="destination"]').attr('required',true).attr('aria-required',true);}});$('.date_depart input[type="text"]').on('focus',function(){var parentQuestion=$(this).parent().parent().find('.question');$(parentQuestion).find('input').attr('checked',true);$(parentQuestion).parent().parent().find('.col').not($(parentQuestion).parent()).find('input').val('')});$('textarea[name="itineraireActivite"]').keyup(function(){if(this.value.length<=$(this).attr('data-max')){$('span[data-for="countItineraireActivite"]').fadeIn(200);$('span[data-for="countItineraireActivite"]').html(this.value.length+'/'+$(this).attr('data-max'));}else{$('span[data-for="countItineraireActivite"]').fadeOut(200);}});$('.brochures .checkbox_decouverte').click(function(){if($(this).attr('checked')=='checked'){$('.brochures .versions input[type="radio"]:eq(0)').attr('checked',true);} else{$('.brochures .versions input[type="radio"]').attr('checked',false);}}) if($.validator){$.validator.methods.date=function(value,element){var dateRegex=/^(0?[1-9]\/|[12]\d\/|3[01]\/){2}(19|20)\d\d$/;return this.optional(element)||dateRegex.test(value);};} $('body.form article span.btn-icon.submit').click(function(){$('body.form article .inner>form').submit();});$('input[name="lstNewsLetter[generale]"]').click(function() {if($(this).is(':checked'))$('body.form .versions input[type="checkbox"]').prop('checked',true);else $('body.form .versions input[type="checkbox"]').prop('checked',false);});$('body.form select[name="contact[origineClient]"]').change(function(){if($(this).val()=="form.origineclient.autre")$('body.form .precision_origineClient').show();else $('body.form .precision_origineClient').hide();}) $('body.version-ce select[name="region"]').change(function(){$('article.conseiller.'+$(this).val()).show();$('article.conseiller:not(.'+$(this).val()+')').hide();});$('body.version-ce select[name="region"]').change();$('.mod-fp-slider .fp-lst-subHeader a').click(function(){sliderMiniFPClick($(this).parents('.mod-fp-slider'),$(this).index());});$('.mod-fp-slider').each(function(index,element){if($('.fp-lst',this).length<2){$('.fp-lst-subHeader',this).hide();$('.fp-lst',this).show();}else sliderMiniFPClick(this,0);});$('#form-search-date span').click(function(){$('#form-search-date ul').toggleClass('open');});$('#form-search-date ul li').click(function(){$('#form-search-date span').text($(this).text());$('#form-search-date input').val($(this).data("value"));$('#form-search-date ul').removeClass('open');$('#form-search-text input').val('').prop('disabled',true);$('#form-search').submit();});$('#form-search-text .btn').click(function(){$('#form-search-date input').val('').prop('disabled',true);});$('#form-search-date .btn').click(function(event){$('#form-search-text input').val('').prop('disabled',true);$('#form-search-date ul').toggleClass('open');event.stopPropagation();return false;});$('.item-182,a.back').click(function(){if(!$('body').hasClass('itemid-101')){$('#form-search').css({'position':'relative','left':'auto'});$('#form-search').slideDown(300,function(){});$('html, body').animate({scrollTop:$($('#form-search')).offset().top-$('#header').height()},300);}else{$('html, body').animate({scrollTop:$($('#form-search')).offset().top-$('#header').height()},300);}});$('#form-search>a').click(function(){$(this).fadeOut(300);$('#form-search .advance').slideDown(300);});if($('body.itemid-101,body.view-featured').length==0){$('#form-search').hide();} $('#form-search .advance').hide();$('#form-search').hide();$('body.itemid-101 #form-search').show();$("#search").autocomplete({source:availableDestinations,select:function(event,ui){$("#search_label").val($(ui)[0].item.label);},minLength:1});$("#form-search>.btn").click(function(){url_ajax="/ws/fp.php?op=remove_session";$.ajax({type:"POST",url:url_ajax,success:function(response){$("#form-search").submit();},dataType:'json'});return false;});$('.agencies-content select[name=department]').change(function(){var dept=$('option:selected',this).val();var agencies=$('.agencies-content .agency');agencies.fadeOut();if(dept!=''){agencies.each(function(){if($('.department',this).html()==dept)$(this).stop(true,false).fadeIn();});}else agencies.stop(true,false).fadeIn();}).change();$('.agencies-content select[name=department] option').each(function(id,ele){if($(".col.agency .department:contains('"+$(ele).val()+"')").length<1)$(ele).remove();});$('#form-avis button').click(function(){$('#form-avis .return').html('');$('#form-avis label').removeClass('error');if($('#form-avis input[name=nom]').val()==''){$('#form-avis .return').append('Nom manquant
    ');$('#form-avis label[for=nom]').addClass('error');} if($('#form-avis input[name=prenom]').val()==''){$('#form-avis .return').append('Prénom manquant
    ');$('#form-avis label[for=prenom]').addClass('error');} if($('#form-avis input[name=email]').val()==''){$('#form-avis .return').append('Email manquant
    ');$('#form-avis label[for=email]').addClass('error');} if($('#form-avis .return').html()==''){var jqxhr=$.post(baseURL+"ws/avis.php",$("#form-avis").serialize(),function(data){window.location=baseURL+"confirmation-temoignage";}).fail(function(data){$('#form-avis .return').html(data);});} return false;});$('.top-left .labels span').mouseenter(function(){if($('.top-right .tooltip-label').length>0)$('.top-right .tooltip-label').show('slide',{direction:'left'},300);});$('.top-left .labels span').mouseleave(function(){if($('.top-right .tooltip-label').length>0)$('.top-right .tooltip-label').hide('slide',{direction:'left'},300);});if($('body.form.jeu-concours').length>0){} if($('body.jeu-concours.home').length>0||$('body.jeu-concours.liste').length>0){$('.photo .details a').click(function(){if($(this).attr('data-photo')){$('.popin-vote input[name="photo"]').val($(this).attr('data-photo'));$('.mybg').fadeIn(400);} return false;});if($('.popin a.close').length>0){$('.popin a.close').click(function(){$('.mybg').fadeOut(400);return false;});}} if($('body.jeu-concours.liste.view-article').length>0){$('.vote a').click(function(){if($(this).attr('data-photo')){$('.popin-vote input[name="photo"]').val($(this).attr('data-photo'));$('.mybg').fadeIn(400);} return false;});if($('.popin a.close').length>0){$('.popin a.close').click(function(){$('.mybg').fadeOut(400);return false;});}} if($('body.jeu-concours.liste').length>0){var hash=window.location.hash;var numPage=parseInt(hash.substring(5))-1;if(!numPage)numPage=0;$('select[name="tri"]').on('change',function(){var $wrapper=$('.photos');switch($(this).val()){case"date":$wrapper.find('.photo').sort(function(a,b){return+parseInt(b.getAttribute('data-date'))- +parseInt(a.getAttribute('data-date'));}).appendTo($wrapper);break;case"vote":$wrapper.find('.photo').sort(function(a,b){return+parseInt(b.getAttribute('data-vote'))- +parseInt(a.getAttribute('data-vote'));}).appendTo($wrapper);break;} url_ajax="/ws/jeuConcours.php?op=ordre&ordre="+$(this).val();$.ajax({type:"GET",url:url_ajax,success:function(response){},dataType:'json'});goToPage(numPage);});var stays=$('.photos .photo');var show_per_page=15;var current_page=0;function previous(){new_page=parseInt(current_page)-1;if($('.active_page').parents('li').prev().find('.page-link').length) goToPage(new_page);} function next(){new_page=parseInt(current_page)+1;if($('.active_page').parents('li').next().find('.page-link').length) goToPage(new_page);} function goToPage(page_num){start_from=page_num*show_per_page;end_on=start_from+show_per_page;$('.photo').hide();for(i=start_from;i1){var navigation_html='
  • première page
  • ';var current_link=0;while(number_of_pages>current_link){navigation_html+='
  • '+(current_link+1)+'
  • ';current_link++;} navigation_html+='
  • dernière page
  • ';$('.pagination').html(navigation_html).find('li').show();;$('.pagination .page-link:first').addClass('active_page');$('.pagination a.page').click(function(){goToPage($(this).attr('data-page'));}) $('.pagination a.previous_link').click(function(){previous();}) $('.pagination a.next_link').click(function(){next();})}else{$(stays).not('.excluded').stop(true,true).fadeIn();$('.pagination li').hide();}} if(!$('body').hasClass('view-article')){updatePagination();goToPage(numPage);}} $('.multi-choices a.decocher_version').click(function(){if($(this).attr('data-action')=="decocher"){$(this).attr('data-action','cocher');$(this).text('Sélectionner toutes les versions');$('.part.filter.multi-choices input[type="checkbox"]').prop('checked',false);}else{$(this).attr('data-action','decocher');$(this).text('Décocher les versions sélectionnées');$('.part.filter.multi-choices .check-choice:not(.disabled) input[type="checkbox"]').prop('checked',true);} updateStays();return false;});if($('#popin-nl').length){$('#popin-nl').fadeIn(300,function(){$('#popin-nl .content-popin').fadeIn(400);});$('#popin-nl').click(function(event){if(!$(event.target).is('a')){$('#popin-nl a.close').trigger('click')}}) $('#popin-nl a.close').click(function(){$('#popin-nl').fadeOut(400,function(){$(this).remove();}) return false;}) $('#popin-nl a.hide_popin').click(function(){$('#popin-nl a.close').trigger('click');var date=new Date();createCookie("hide-popin",date.getTime(),365);return false;});}});function sliderMiniFPClick(slider,id){$('.fp-lst-subHeader a',slider).removeClass('active').eq(id).addClass('active');$('.fp-lst',slider).hide().eq(id).show();} function sliderVersionsClick(id){$('#slider-versions>ul li').removeClass('active').eq(id).addClass('active');$('#slider-versions article').hide().eq(id).show();} function selectTab(id){$('.tab-btns>li').removeClass('active').eq(id).addClass('active');$('.tabs .tab').hide().eq(id).show();} function selectTarifsList(id){$('#infosTarifsDates>li').removeClass('active').eq(id).addClass('active');$('.infosTarifsList').hide().eq(id).show();$('.confereTarifsList').hide().eq(id).show();} function compare(a,b){if(a.distb.dist) return 1;return 0;} function setToggleListCurrentContent(content){$(content).parents('.toggle-list').find('li.item.current .content').slideToggle(300,'linear');$(content).find('.content').slideToggle(300,'linear');$(content).parents('.toggle-list').find('li.item').removeClass('current');$(content).addClass('current');} if($('#form-fp-filter').length>0){$('.stays-list article.stay a').click(function() {url_ajax="/ws/fp.php?op=save_session";var ele=$(this);$.ajax({type:"POST",url:url_ajax,data:{typeVersion:$('input[name="typeVersion"]').val(),formfilter:$('#form-fp-filter').serialize(),formsort:$('.form-fp-sort').serialize(),},success:function(response){location.href=$(ele).attr('href');},dataType:'json'});return false;}) var stays=$('.stays-list .stay');var show_per_page=8;var current_page=0;function previous(){new_page=parseInt(current_page)-1;if($('.active_page').parents('li').prev().find('.page-link').length) goToPage(new_page);} function next(){new_page=parseInt(current_page)+1;if($('.active_page').parents('li').next().find('.page-link').length) goToPage(new_page);} function goToPage(page_num){start_from=page_num*show_per_page;end_on=start_from+show_per_page;$(stays).not('.excluded').hide().slice(start_from,end_on).fadeIn();$('.page-link').removeClass('active_page').filter('[data-page='+page_num+']').addClass('active_page');current_page=page_num;if(!$('header.main-content-header').hasClass('page-filtre'))$('html, body').animate({scrollTop:130},300);else $('html, body').animate({scrollTop:$('.form-fp-sort').offset().top-$('#header').height()},300);} function updatePagination(){var number_of_items=$(stays).not('.excluded').size();var number_of_pages=Math.ceil(number_of_items/show_per_page);var location_href=$(location).attr('href').replace($(location).attr('hash'),"");if(location_href.indexOf('#')!=-1)location_href=location_href.substring(0,location_href.indexOf('#'));$('.filters header.part h2 span').html('('+number_of_items+')');for(var i=1;i<7;i++){if(i!=3){var count=$('.stays-list .version-'+i).not('.excluded').size();$('.check-choice.version input[name="version'+i+'"]').parent().find('.count').html(count==0?'':count);}} if(number_of_items==0)$('.noresults').show();else $('.noresults').hide();if(number_of_pages>1){var navigation_html='
  • première page
  • ';var current_link=0;while(number_of_pages>current_link){navigation_html+='
  • '+(current_link+1)+'
  • ';current_link++;} navigation_html+='
  • dernière page
  • ';$('.pagination').html(navigation_html).find('li').show();;$('.pagination .page-link:first').addClass('active_page');$('.pagination a.page').click(function(){goToPage($(this).attr('data-page'));}) $('.pagination a.previous_link').click(function(){previous();}) $('.pagination a.next_link').click(function(){next();}) $(stays).not('.excluded').stop(true,true).hide().slice(0,show_per_page).fadeIn();}else{$(stays).not('.excluded').stop(true,true).fadeIn();$('.pagination li').hide();} $('input[type=checkbox]',multichoices_filters).each(function(){if($(this).attr('rel')=='labels'&&$('.stays-list .stay[data-labels*='+$(this).val()+']').not('.excluded').length==0){$(this).parent('.check-choice').hide();if($(this).is(':checked')){$(this).attr('checked',false);updateStays();}}else if($(this).attr('rel')!='type-voyage'){$(this).parent('.check-choice').show();}});} var filters=$('.filters .filter');var select_filters=$(filters).filter('select');var multichoices_filters=$(filters).filter('.multi-choices');var options_dict={"continent":$(""),"pays":$(""),"region":$("")};function sortFilters(){$.each(options_dict,function(type,select){var options=$(select).find('option');options.sort(function(a,b){if(a.value==''||a.valueb.value) return 1;else return 0});$(select).html(options);});} function parseOptions(elements,parent,parent_attributes){$.each(elements,function(key,val){var attributes=[];var dataContinent="non";if(parent_attributes)$.each(parent_attributes,function(){if(this.name=='data-continent'){dataContinent=this.value;}});if(typeof(options_dict[val.type])!='undefined'&&val.type!='regionmonde'&&val.nom!=''&&((val.type=='continent'&&!$("option[value='"+val.nom+"']",options_dict[val.type]).length)||(val.type=='pays'&&!$("option[value='"+val.nom.replace(/'/g,"\\'")+"'][data-continent='"+parent.nom+"']",options_dict[val.type]).length)||(val.type=='region'&&!$("option[value='"+val.nom.replace(/'/g,"\\'")+"'][data-continent='"+dataContinent+"'][data-pays='"+parent.nom+"']",options_dict[val.type]).length))){var option=$('