1;(function ($, window, document, undefined) { 2 3 $(window).load(function() { 4 // Start lazy loading 5 $('img.lazy').unveil(0, function() { 6 $(this).load(function() { 7 this.style.opacity = 1; 8 }); 9 }); 10 }); 11 12 $(document).ready(function() { 13 GMR_GEOLOCATION_SEARCH_CLOSE = '<i class="fa fa-times"></i>'; 14 GMR_GEOLOCATION_SEARCH_PRINT = '<i class="fa fa-print"></i>'; 15 16 // Responsive + Secondary navigations behavior 17 /* $('.site-navigation .menu-item-has-children, .secondary .menu-item-has-children').each(function() { 18 var $li = $(this); 19 var $toggler = $('<i class="toggler"></i>'); 20 21 if ($li.hasClass('current-menu-ancestor')) { 22 $li.addClass('menu-item-open'); 23 } 24 25 $toggler.prependTo($li); 26 $toggler.click(function(){ 27 $li.toggleClass('menu-item-open'); 28 }); 29 });*/ 30 31 /** 32 * Summary 33 */ 34 $('.entry-content').has('.entry-summary').each(function() { 35 content = $(this); 36 summary = content.children('.entry-summary'); 37 summary_list = summary.children('.entry-summary-list'); 38 39 subtitles = content.children('h2'); 40 console.log(subtitles.length); 41 if(subtitles.length > 1) { 42 subtitles.each(function(index, element) { 43 var anchor = 'h2-' + index; 44 45 $(this).attr('id', anchor).addClass('h2-summaryed'); 46 summary_list.append($('<li><a href="#' + anchor + '">' + $(this).text() + '</a></li>')); 47 48 /* add backToTop link 49 if(0 < index) { 50 $(this).append($('<i class="backToTop fa fa-arrow-circle-up"></i>')); 51 }*/ 52 }); 53 54 subtitles.show(); 55 } 56 /* 57 $('.backToTop').click(function() { 58 $('html, body').animate({ scrollTop: 0 }, 'slow'); 59 });*/ 60 }); 61 62 63 64 // Comment form behavior 65 $('.comment-form').each(function() { 66 $hidden_fields = $('<div class="hidden-fields" />').hide(); 67 $hidden_fields.append($(this).children(':not(.comment-area)')); 68 $hidden_fields.appendTo($(this)); 69 70 $('#comment').focus(function() { 71 $hidden_fields.delay(500).slideDown(200); 72 }); 73 }); 74 75 // Generic carousels 76 $('.owl-carousel').each(function(index, element) { 77 $(element).owlCarousel($(element).data('options') || {}); 78 }); 79 80 // Partners carousel 81 $('.carousel-partners').owlCarousel({ 82 loop:true, 83 responsiveClass:true, 84 margin:10, 85 nav:false, 86 dots:false, 87 autoplay:true, 88 autoplayTimeout:2000, 89 autoplayHoverPause:true, 90 autoplaySpeed:1000, 91 lazyLoad:true, 92 responsive:{ 93 0:{ 94 items:1, 95 }, 96 360:{ 97 items:2, 98 }, 99 768:{ 100 items:3 101 }, 102 992:{ 103 items:4, 104 }, 105 1200:{ 106 items:6, 107 } 108 } 109 }); 110 111 // Button scroll to the top 112 $('.go-top').click(function() { 113 $('html, body').animate({ scrollTop: 0 }, 'slow'); 114 }); 115 116 // Galleries 117 $('.members-list, .album-list').mixItUp(); 118 $('.members-list-filter').change(function() { 119 var filter = new Array(); 120 121 $('.members-list-filter').each(function() { 122 var value = $(this).val(); 123 if(value != 'all') { 124 filter.push(value); 125 } 126 }); 127 128 if(filter.length == 0) { 129 filter.push('all'); 130 } 131 132 $('.members-list').mixItUp('filter', filter.join('')); 133 }); 134 135 /** 136 * Icons 137 */ 138 SVGInjector($('img.icon')); 139 140 /** 141 * Images galleries 142 */ 143 $('.album-gallery').justifiedGallery({ 144 cssAnimation: true, 145 captions: false, 146 rel: 'lightbox', 147 sizeRangeSuffixes: { 148 'lt100':'', 149 'lt240':'', 150 'lt320':'', 151 'lt500':'', 152 'lt640':'', 153 'lt1024':''} 154 }); 155 156 157 $('a[rel^="lightbox"]').addClass('lightbox').each(function() { 158 var $floatingLeft = $(this).has('img.alignleft'); 159 var $floatingRight = $(this).has('img.alignright'); 160 161 if($floatingLeft.length > 0) { 162 $floatingLeft.wrap('<div class="alignleft" />'); 163 } 164 165 if($floatingRight.length > 0) { 166 $floatingRight.wrap('<div class="alignright" />'); 167 } 168 169 $(this).children('img').removeClass('alignleft alignright'); 170 }); 171 $('a:not(.gallery-item)[href$=".png"], a:not(.gallery-item)[href$=".jpg"], a:not(.gallery-item)[href$=".jpeg"], a:not(.gallery-item)[href$=".gif"]').simpleLightbox({ 172 close: true, 173 showCounter: false, 174 widthRatio: 1, 175 heightRatio: 1, 176 captionsData: 'alt' 177 }); 178 179 180 $('.album-gallery').lightGallery({ 181 download: false, 182 selector: '.gallery-item', 183 }); 184 185 /** 186 * Share behavior 187 */ 188 $.Share(); 189 190 191 192 $('.btn-menu-responsive').bind("click touchstart",function(){ 193 $('html, body').scrollTop(0); 194 }); 195 196 /** 197 * Slidebars 198 * 199 */ 200 $.slidebars({ 201 scrollLock: true, 202 }); 203 204 $('.sb-slidebar .menu-item-has-children').each(function(index, element) {
205 $('<span class="sub-menu-toggle"><i class="fa fa-plus" /></span>').click(function() { 206 $(element).toggleClass('sub-menu-open').children('.sub-menu').slideToggle(); 207 $(element).children('.sub-menu-toggle').children('.fa').toggleClass('fa-minus'); 208 }).prependTo(element); 209 if ($(this).hasClass('current-menu-ancestor')){ 210 $(element).toggleClass('sub-menu-open').children('.sub-menu').slideToggle(); 211 $(element).children('.sub-menu-toggle').children('.fa').toggleClass('fa-minus'); 212 } 213 $(element).filter('.current-menu-ancestor').addClass('sub-menu-open'); 214 }); 215 216 217 /** 218 * Auto-tracking NinjaForms 219 */ 220 $('.ninja-forms-form').on('submitResponse', function(e, response) { 221 var ga = window.ga || function() { console.log('[Nematis] ga is not defined !'); }; 222 223 if (response.errors == false) { 224 ga('send', 'event', 'Formulaire', response.form_settings.form_title); 225 } 226 }); 227 }); 228})(jQuery, window, document);
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.