1(function($){ 2 3 $("#cookiePopup").click(function(event){ 4 $(".cookiebox-inner").show(); 5 }); 6 7 $.urlParam = function (name) { 8 var results = new RegExp('[\?&]' + name + '=([^&#]*)') 9 .exec(window.location.href); 10 11 return results[1] || 0; 12 } 13 jQuery.fn.reverse = [].reverse; 14 function getCookie(name) { 15 var value = "; " + document.cookie; 16 var parts = value.split("; " + name + "="); 17 if (parts.length == 2) return parts.pop().split(";").shift(); 18 } 19 function setcookie(cookieName,cookieValue) { 20 var today = new Date(); 21 var expire = new Date(); 22 expire.setTime(today.getTime() + 3600000*24*7); 23 document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); 24 } 25 function anim_header() { 26 $('.logo').addClass('anim_intro'); 27 $('.top_header').addClass('anim_intro'); 28 setTimeout(function(){ 29 $('.menu-menu-container').addClass('anim_intro'); 30 $('.locator, .social').addClass('anim_intro'); 31 }, 400); 32 setTimeout(function(){$('.fade').addClass('show');}, 900); 33 } 34 function stickIt() { 35 var top = $(window).scrollTop(); 36 if (top >= 30) { 37 $('.header_gironde').addClass('fixed') 38 } else { 39 $('.header_gironde').removeClass('fixed') 40 } 41 } 42 function replace_date(str) { 43 var arr = {'sep.':'Septembre','oct.':'Octobre', 'nov.':'Novembre', 'dec.':'Décembre'}; 44 var new_str = str; 45 for (var key in arr) { 46 if (!arr.hasOwnProperty(key)) { 47 continue; 48 } 49 new_str = new_str.replace(key, arr[key]); 50 } 51 return new_str; 52 } 53 54 function load_jobs(){ 55 var results =''; 56 var i = 1; 57 58 $('#retrieve_syndication tbody tr').each(function(){ 59 var modulo = i % 2 ? 'even' : 'odd'; 60 var html = '<div class="job_bloc job_'+i+' pos_'+modulo+'">'; 61 var job_title = $(this).find('.intuitionJobTd a').html(); 62 var url = $(this).find('.intuitionJobTd a').attr("href"); 63 url = url.split("intuition_id=")[1]; 64 var job_post_date = $(this).find('.intuitionDateTd').html(); 65 var contract = $(this).find('.intuitionContratTd').html(); 66 var city = $(this).find('.intuitionLocationTd').html(); 67 68 if (job_post_date != undefined) 69 var date = replace_date(job_post_date); 70 html = html + '<p class="city">'+city+'</h4>'; 71 html = html + '<h4>'+job_title+'</h4>'; 72 html = html + '<p class="date sds">Publié le '+date+'</p>'; 73 html = html + '<p class="contract">'+contract+'</p>'; 74 html = html + '<form action="./?intuition_id='+url+'"method="post">'; 75 html = html + '<input type="text" name="date" value="'+date+'">'; 76 html = html + '<input type="text" name="city" value="'+city+'">'; 77 html = html + '<input type="text" name="contract" value="'+contract+'">'; 78 html = html + '</form><a class="o-button -width -anim js-parallax green_light" target="_blank" href="#"><span class="o-button_label"><span><svg width="33px" height="15px" viewBox="0 0 33 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="white-arrow" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M0.4,7.5 L29.1221169,7.5" id="Line-2" stroke-width="2.39999986" stroke-linecap="square"></path><path d="M25.4726877,15 L24,13.5135686 L29.8911294,7.56746082 C29.9085487,7.54987897 29.9172584,7.52732832 29.9172584,7.50019111 C29.9172584,7.47305389 29.9085487,7.45050325 29.8911294,7.43253918 L24,1.48681361 L25.4726877,0 L31.3638171,5.94610778 C31.7743065,6.36042808 32,6.91196331 32,7.50019111 C32,8.08841891 31.7743065,8.63995413 31.3638171,9.05389222 L25.4726877,15 Z" id="Fill-1"></path></g></svg></span><span>Postuler en ligne</span></span><div class="o-button_line"></div><div class="o-button_line"></div></a>'; 79 html = html + '</div>'; 80 i = i + 1; 81 results = results + html; 82 }) 83 $('.show_nb').html(i - 1); 84 $('#results_html').html(results); 85 $('.job_bloc a').click(function(e){ 86 e.preventDefault(); 87 $(this).closest('.job_bloc').find("form").submit(); 88 }) 89 } 90 function anim_numbers(el) { 91 92 if($('.data_number').length) { 93 94 var nb = parseInt($(el).closest('.inner').find('.data_number').html()) 95 var space_separator_number_step = $.animateNumber.numberStepFactories.separator(' ') 96 $(el).closest('.inner').find('.number').animateNumber({ number: nb,numberStep: space_separator_number_step },2000); 97 } 98 } 99 function anim_popup() { 100 // console.log(getCookie('gh_popup')); 101 102 if($('.popup').length) { 103 setTimeout(function(){ 104 if(!getCookie('gh_popup')) 105 $('.popup').addClass('show') 106 },5000); 107 $('.popup .close').click(function(){ 108 setcookie('gh_popup', 'true'); 109 $('.popup').removeClass('show') 110 }) 111 } 112 } 113 114 function anim_map_agences() { 115 if($('.page-template-tpl-agences').length) { 116 $('.show_agencies').click(function(){ 117 $('.show_agencies button').toggleClass('active'); 118 $('.list_agences').toggleClass('active'); 119 }) 120 var window_width = jQuery( window ).width(); 121 $('#svg_agences_container g').click(function(){ 122 var map_class = $(this).attr('class'); 123 $('.list_agences li').not('#'+map_class).each(function(){ 124 $(this).removeClass('show_infos'); 125 }) 126 $('.list_agences li#'+map_class).each(function(){ 127 $(this).addClass('show_infos'); 128 }) 129 }) 130 if (window_width > 980) { 131 $('.list_agences li').hover( 132 function() { 133 $('.list_agences li').not($(this)).each(function(){ 134 $(this).addClass('hide'); 135 }) 136 var id = $(this).attr('id'); 137 $('#svg_agences_container g').not('.'+id).each(function(){ 138 $(this).addClass('hide'); 139 }) 140 }, function() { 141 $('#svg_agences_container g').each(function(){ 142 $(this).removeClass('hide'); 143 }) 144 $('.list_agences li').not($(this)).each(function(){ 145 $(this).removeClass('hide'); 146 }) 147 } 148 ); 149 $('.list_agences li').click( 150 function() { 151 $('.list_agences li').each(function(){ 152 $(this).removeClass('show_infos'); 153 }); 154 $(this).addClass('show_infos'); 155 }); 156 } 157 else { 158 $('#svg_agences_container g').click(function(){ 159 var map_class = $(this).attr('class'); 160 var content = $('.list_agences li#'+map_class+' .infos_agence').html() 161 console.log('.list_agence li#'+map_class+' .infos_agence'); 162 $('.result_map').html(content); 163 $('html, body').animate({ 164 scrollTop: $(".result_map").offset().top - 90 165 }, 500); 166 }) 167 } 168 $('.list_agences li').click( 169 function() { 170 $('.list_agences').removeClass('active'); 171 $('.list_agences li').each(function(){ 172 $(this).removeClass('hide'); 173 }); 174 $('.list_agences li').not($(this)).each(function(){ 175 $(this).addClass('hide'); 176 }) 177 var id = $(this).attr('id'); 178 $('#svg_agences_container g').each(function(){ 179 $(this).removeClass('hide'); 180 }) 181 $('#svg_agences_container g').not('.'+id).each(function(){ 182 $(this).addClass('hide'); 183 }) 184 }); 185 186 $('#svg_agences_container g').hover( 187 function() { 188 var map_class = $(this).attr('class'); 189 $('.list_agences li').not('#'+map_class).each(function(){ 190 $(this).addClass('hide'); 191 }) 192 $('.list_agences li#'+map_class).each(function(){ 193 $(this).addClass('current'); 194 }) 195 $('#svg_agences_container g').not(this).each(function(){ 196 $(this).addClass('hide'); 197 }) 198 }, function() { 199 var map_class = $(this).attr('class'); 200 $('#svg_agences_container g').each(function(){ 201 $(this).removeClass('hide'); 202 }) 203 $('.list_agences li#'+map_class).each(function(){ 204 $(this).removeClass('current'); 205 }) 206 $('.list_agences li').not('#'+map_class).each(function(){ 207 $(this).removeClass('hide'); 208 }) 209 } 210 ); 211 } 212 } 213 function call_ajax_prestataires($post_type, $find) { 214 $($find+' .loader').addClass('active'); 215 jQuery.post( 216 ajaxurl, 217 { 218 'action': 'get_prestataires', 219 'post_type': $post_type,
220 'cp': $($find+' .input_with_submit').val() 221 }, 222 function(response){ 223 224 $($find+' .loader').removeClass('active'); 225 $($find+' .presta_results').html(response); 226 } 227 ); 228 } 229 function ajax_prestataires(){ 230 $(".prestataire_input").on('keyup', function (e) { 231 if (e.keyCode == 13) { 232 call_ajax_prestataires('prestataires', '.find_presta'); 233 } 234 }); 235 $('.prestataire_input .submit').on('click', function(){ 236 call_ajax_prestataires('prestataires', '.find_presta'); 237 }); 238 $(".agency_input").on('keyup', function (e) { 239 if (e.keyCode == 13) { 240 call_ajax_prestataires('agences', '.find_agency'); 241 } 242 }); 243 $('.agency_input .submit').on('click', function(){ 244 call_ajax_prestataires('agences', '.find_agency'); 245 }); 246 } 247 248 function load_jobs_single(){ 249 var title = $('#retrieve_syndication h2').html(); 250 $('.header_intro_small h1').html(title); 251 $('.breadcrumb_last').html($('.breadcrumb_last').html()+' <b>></b> '+title); 252 var apply_link = $('.intuitionapplylink a').attr('href'); 253 $('.apply_btn').each(function(){ 254 $(this).attr("href", apply_link); 255 }) 256 } 257 $(window).on("load", function() { 258 $('html').addClass('ready'); 259 var window_width = jQuery( window ).width(); 260 if (window_width > 980) { 261 if($('#results_html').length) { 262 $('#results_html').masonry({ 263 itemSelector: '.job_bloc' 264 }); 265 } 266 if($('#tpl_actus').length) { 267 $('.grid').masonry({ 268 itemSelector: '.grid-item' 269 }); 270 } 271 if($('#tpl_parutions').length) { 272 $('.grid').masonry({ 273 itemSelector: '.grid-item' 274 }); 275 $cat = $.urlParam('cat'); 276 if($cat.length > 0) { 277 $('html, body').animate({ 278 scrollTop: $(".parution_list").offset().top - 90 279 }, 500); 280 } 281 } 282 } 283 }); 284 285 $(document).ready(function(){ 286 287 document.addEventListener( 'wpcf7mailsent', function( event ) { 288 289 var info = $('.newsletter_container .wpcf7-email').val().length > 3 ? "?type=1" : ''; 290 info = $('#wpcf7-f710-o1').length > 0 ? "?type=2" : info; 291 info = $('#wpcf7-f5580-o1').length > 0 ? "?type=3" : info; 292 293 location = '/confirmation'+info; 294 }, false ); 295 $('select').selectric(); 296 ajax_prestataires(); 297 anim_popup(); 298 anim_map_agences(); 299 autosize(document.querySelectorAll('textarea')); 300 if($('#tpl_nous_rejoindre').length) 301 load_jobs(); 302 if($('#tpl_nous_rejoindre_single').length) 303 load_jobs_single(); 304 anim_header(); 305 $('body').addClass('is-loaded'); 306 scrollIntervalID = setInterval(stickIt, 10); 307 var inview1 = inView(); 308 if($('.keywords').length) { 309 var myVivus = new Vivus('my-svg', {type: 'scenario',duration: 200,}); 310 } 311 $('.select_container .relative:after').click(function(){console.log("after")}) 312 if($('.anim-svg').length) { 313 var anim_1 = new Vivus('calque_collab', {type: 'delayed',duration: 150,}); 314 var anim_2 = new Vivus("calque_logees", {type: 'delayed',duration: 150,}); 315 var anim_3 = new Vivus("calque_territoire", {type: 'delayed',duration: 150,}); 316 } 317 inview1( document.getElementsByClassName('-anim')) 318 .on('enter', function(el){ 319 setTimeout(function(){ 320 anim_numbers(el);if(myVivus){myVivus.play();}$(el).addClass("is-inview");},300)}) 321 .on('exit', function(el) {$(el).removeClass("is-inview");}); 322 var inview3 = inView(); 323 inview3( document.getElementsByClassName('anim-svg')) 324 .on('enter', function(el) { 325 $class = $(el).find('svg').attr('id') 326 switch ($class) { 327 case "calque_collab": 328 anim_1.play(); 329 break; 330 case 'calque_territoire': 331 anim_2.play(); 332 break; 333 case "calque_logees": 334 anim_3.play(); 335 break; 336 } 337 }) 338 .on('exit', function(el) {$(el).removeClass("is-inview");}); 339 inview3.offset(200) 340 var inview2 = inView(); 341 inview2.offset(400); 342 inview2( document.getElementsByClassName('sidebar_container')) 343 .on('enter', function(el) {$('.sidebar').addClass("inview");}) 344 .on('exit', function(el) {$('.sidebar').removeClass("inview");}); 345 var inview4 = inView(); 346 inview4( document.getElementsByClassName('sidebar_container')) 347 .on('enter', function(el) {$('.goTop').addClass("inview");}) 348 .on('exit', function(el) {$('.goTop').removeClass("inview");}); 349 350 $('.submit_form').click(function(e){ 351 e.preventDefault(); 352 $(this).closest('.container').find('form').submit(); 353 }); 354 $('.submit_form_newsletter').click(function(e){
355 var valid = false; 356 e.preventDefault(); 357 jQuery("input[name='checkbox-995[]']").each(function(){ 358 if(jQuery(this).prop('checked') === true) { 359 valid = true; 360 } 361 }) 362 if(valid === true) { 363 $('.error_newsletter').html(""); 364 $(this).closest('.container').find('form').submit(); 365 } 366 else { 367 $('.error_newsletter').html("Veuillez choisir les lettres dâinformation auxquels vous voulez vous abonner.") 368 } 369 }); 370 $('.search.top_bloc').click(function(){ 371 $(this).toggleClass('active'); 372 $('.header_search').toggleClass('active'); 373 }) 374 $('.nav_mobile .menu-item-has-children').click(function(){ 375 $('.nav_mobile .menu-item-has-children').not($(this)).each(function(){ 376 $(this).removeClass('active'); 377 }) 378 $(this).toggleClass('active') 379 }) 380 $('.hamburger, .close.show_mobile').click(function(){ 381 $('.nav_mobile').toggleClass('active') 382 }) 383 $("input[name='checkbox-887[]']").change(function(){ 384 var max= 3; 385 if( $("input[name='checkbox-887[]']:checked").length == max ){ 386 $("input[name='checkbox-887[]']").attr('disabled', 'disabled'); 387 $("input[name='checkbox-887[]']:checked").removeAttr('disabled'); 388 }else{ 389 $("input[name='checkbox-887[]']").removeAttr('disabled'); 390 } 391 }); 392 393 $(document).on('click', 'a[href^="#"]', function (event) { 394 event.preventDefault(); 395 if($.attr(this, 'href').length > 2) { 396 $('html, body').animate({ 397 scrollTop: $($.attr(this, 'href')).offset().top - 90 398 }, 500); 399 } 400 401 }); 402 $(document).on('click', '.goTop', function (event) { 403 event.preventDefault(); 404 405 $('html, body').animate({ 406 scrollTop: $('html').offset().top 407 }, 500); 408 }); 409 410 var window_width = jQuery( window ).width(); 411 412 if (window_width > 980) { 413 if($('.img_left').length) { 414 $('.img_left').stick_in_parent( {recalc_every: 1,inner_scrolling: false}) 415 } 416 if($('.cta_right').length) { 417 $('.stickit').stick_in_parent( {recalc_every: 1,inner_scrolling: false,offset_top: 90}) 418 } 419 if($('.recruit').length) { 420 $('.recruit').stick_in_parent( {recalc_every: 1,inner_scrolling: false,offset_top: 90}) 421 } 422 } 423 424 $('input[name="numero-contrat"]').keydown(function(e) { 425 426 var oldvalue=$(this).val(); 427 var field=this; 428 429 430 if (e.which == 0 ) { 431 return false; 432 } 433 if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 96 && e.keyCode <= 105) || e.which == 8) { 434 } 435 else { 436 return false; 437 } 438 439 }); 440 $('.popup_box, .popup_cta').magnificPopup({ 441 type: 'inline', 442 preloader: false, 443 focus: '#username', 444 modal: true 445 }); 446 $(document).on('click', '.popup-modal-dismiss', function (e) { 447 e.preventDefault(); 448 $.magnificPopup.close(); 449 }); 450 451 452 if($('.popup-gallery').length) { 453 $('.popup-gallery').magnificPopup({ 454 delegate: 'a', 455 type: 'image', 456 tLoading: 'Chargement #%curr%...', 457 mainClass: 'mfp-img-mobile', 458 gallery: { 459 enabled: true, 460 navigateByImgClick: true, 461 tCounter: '%curr% sur %total%', 462 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 463 }, 464 image: { 465 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 466 titleSrc: function(item) { 467 } 468 } 469 }); 470 } 471 if($('.popup-gallery_2').length) { 472 $('.popup-gallery_2').magnificPopup({ 473 delegate: 'a', 474 type: 'image', 475 tLoading: 'Chargement #%curr%...', 476 mainClass: 'mfp-img-mobile', 477 gallery: { 478 enabled: true, 479 navigateByImgClick: true, 480 tCounter: '%curr% sur %total%', 481 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 482 }, 483 image: { 484 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 485 titleSrc: function(item) { 486 } 487 } 488 }); 489 } 490 491 if($('#tpl_contact').length) { 492 var url = location.href; 493 if (url.indexOf("#") != -1) { 494 $('html, body').animate({ 495 scrollTop: $(".agences_container").offset().top - 90 496 }, 500); 497 } 498 if (url.includes("?demande-de-logement")) { 499 $(window).load(function() { 500 setTimeout(function() { 501 $('.tabselected__trigger, .tabselected__inner').addClass('triggered') 502 $('[data-file="demande"]').click() 503 setTimeout(function() { 504 $('[data-file="etudiant"]').click() 505 }, 100) 506 }, 10) 507 }) 508 } 509 } 510 511 if($('.slider_container').length) { 512 513 var $slickElement = $('.slider_container'); 514 $slickElement.on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){ 515 516 517 // $elem = "#"+$(this).attr('id'); 518 // var $status = $($elem+' .pagingInfo'); 519 var $status = $(this).closest('.slider').find('.pagingInfo'); 520 521 var i = (currentSlide ? currentSlide : 0) + 1; 522 $status.html("<span class='currentSlide'>"+ i + '</span>/' + slick.slideCount); 523 }); 524 525 var args = {
526 arrows: false, 527 autoplay: true, 528 } 529 if($('.basic_controls').length) { 530 args.adaptiveHeight = true; 531 } 532 $slickElement.slick(args); 533 $('.control-next').click(function(e){ 534 e.preventDefault(); 535 $slickElement.slick('slickNext'); 536 }) 537 $('.control-prev').click(function(e){ 538 e.preventDefault(); 539 $slickElement.slick('slickPrev'); 540 }) 541 } 542 $(".breadcrumb span[rel='v:child']:first > a[rel='v:url']").click(function(e){ 543 e.preventDefault(); 544 }); 545 546 // jQuery("input[name='checkbox-995[]']").prop("checked", true); 547 $('.header_dropdown').click(function(){ 548 var parent = $(this).parent('.bloc'); 549 console.log(parent.id); 550 $('.bloc').not(parent).removeClass('active'); 551 $(this).parent('.bloc').toggleClass('active'); 552 }) 553 554 $('.contactform input, .contactform textarea').on('input', function() { 555 if($(this).val().length > 0) { 556 $(this).closest('.container').addClass('filled'); 557 } 558 else { 559 $(this).closest('.container').removeClass('filled'); 560 } 561 562 }); 563 564 var $residences_galleries = $('.residence_gallery'); 565 566 if ($residences_galleries.length) { 567 $residences_galleries.each(function() { 568 $(this).slick({ 569 dots: true, 570 infinite: false, 571 }); 572 }); 573 574 $residences_galleries.magnificPopup({ 575 delegate: 'a', 576 type: 'image', 577 gallery:{ 578 enabled:true 579 } 580 }); 581 }; 582 }); 583})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.