1$( document ).ready(function() { 2 3 // GLOBAL VARIABLES 4 var url = window.location.href; 5 var hash = window.location.hash; 6 7 var lastSegment = url.split("/").pop(); 8 9 var windowHeight = window.innerHeight; 10 var windowWith = window.innerWidth; 11 var headerHeight = $('.navbar').innerHeight(); 12 13 var footerHeight = $('.footer').innerHeight(); 14 if (footerHeight == 0) { footerHeight = 95; } 15 16 var websiteHeight = windowHeight - headerHeight; 17 var divHeight = websiteHeight - footerHeight; 18 var iframeHeight = windowHeight - headerHeight; 19 20 // LOADING 21 setTimeout(function(){ 22 23 $('#loading').hide(); 24 $('.navbar').css('display','initial'); 25 $('#website').css('display','initial'); 26 27 adaptSize(); 28 29 }, 1500); 30 31 // RESIZE EVENT 32 window.addEventListener('resize', function () { 33 34 windowHeight = window.innerHeight; 35 windowWith = window.innerWidth; 36 headerHeight = $('.navbar').innerHeight(); 37 footerHeight = $('.footer').innerHeight(); 38 websiteHeight = windowHeight - headerHeight; 39 divHeight = websiteHeight - footerHeight; 40 iframeHeight = windowHeight - headerHeight; 41 42 adaptSize(); 43 }); 44 45 // COUNTDOWN 46 const second = 1000, 47 minute = second * 60, 48 hour = minute * 60, 49 day = hour * 24, 50 countDown = new Date(2022, 11, 20, 17, 59, 59).getTime(); 51 52 if (url.indexOf('billetterie') !== -1) { 53 54 x = setInterval(function() { 55 const now = new Date().getTime(), 56 distance = countDown - now; 57 58 document.getElementById("days").innerText = ('0' + Math.floor(distance / (day))).slice(-2), 59 document.getElementById("hours").innerText = ('0' + Math.floor((distance % (day)) / (hour))).slice(-2), 60 document.getElementById("minutes").innerText = ('0' + Math.floor((distance % (hour)) / (minute))).slice(-2), 61 document.getElementById("seconds").innerText = ('0' + Math.floor((distance % (minute)) / second)).slice(-2); 62 63 if (distance < 0) { 64 $("#countdown").hide(); 65 $("#container-iframe").show(); 66 $("#container-global").removeClass("container-billetterie"); 67 $("#container-global").removeClass('margin-top-90'); 68 $('body').css('overflow','auto'); 69 clearInterval(x); 70 } 71 72 }, 0) 73 } 74 75 // SCROLL EVENT 76 var ScrollTop = parseInt($(window).scrollTop()); 77 $(window).scroll(function(){ 78 ScrollTop = parseInt($(window).scrollTop()); 79 }); 80 81 82 // HACK IFRAME IOS 83 if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { 84 $('#container-iframe').css('overflow','scroll'); 85 $('#container-iframe iframe').css('width', width_iframe); 86 } 87 88 // FORMS 89 $('#form-contact').submit(function( event ) { 90 var name = $('#identite').val(); 91 var email = $('#email').val(); 92 var message = $('#message').val(); 93 94 if(name.trim()=='' || email.trim()=='' || message.trim()=='') 95 { 96 swal("Attention", "Vous devez remplir tous les champs du formulaire", "error"); 97 event.preventDefault(); 98 } 99 else{ 100 $('#form-contact').attr('action','form/contact.php'); 101 $('#form-contact').submit(); 102 } 103 }); 104 105 setTimeout(function(){ $('.callback-form').hide(); }, 15000); 106 107 // PARTNERS 108 $('.item-partenaire').hover(function() { 109 $(this).addClass('pulse animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'); 110 }, function() { 111 $(this).removeClass('pulse').removeClass('animated'); 112 }); 113 114 $('ul.nav li.dropdown').hover(function() { 115 $(this).find('.dropdown-menu').fadeIn(500); 116 }, function() { 117 $(this).find('.dropdown-menu').fadeOut(500); 118 }); 119 120 // PROGRAMMATION 121 $('.item-artiste').addClass('zoomIn animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 122 $(this).removeClass('zoomIn').removeClass('animated'); 123 }); 124 125 $('.ch-item').on('click',function(){ 126 if(!($(this).hasClass("active"))) 127 { 128 $(this).addClass('active'); 129 } 130 else 131 { 132 $(this).removeClass('active'); 133 } 134 }); 135 136 // FILTERS 137 $('.item-choice-programmation').on('click',function(){ 138 139 $('.item-choice-programmation').removeClass('active-choice-prog'); 140 $(this).addClass('active-choice-prog'); 141 142 var id = $(this).attr('id'); 143 $('.item-artiste').hide(); 144 145 if(id == 'choice-prog-all') 146 { 147 $('.item-artiste').show().addClass('zoomIn animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 148 $(this).removeClass('zoomIn').removeClass('animated'); 149 }); 150 } 151 else if(id == 'choice-prog-day-1') 152 { 153 $('.choice-prog-day-1').show().addClass('zoomIn animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 154 $(this).removeClass('zoomIn').removeClass('animated'); 155 }); 156 } 157 else if(id == 'choice-prog-day-2') 158 { 159 $('.choice-prog-day-2').show().addClass('zoomIn animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 160 $(this).removeClass('zoomIn').removeClass('animated'); 161 }); 162 } 163 else if(id == 'choice-prog-day-3') 164 { 165 $('.choice-prog-day-3').show().addClass('zoomIn animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ 166 $(this).removeClass('zoomIn').removeClass('animated'); 167 }); 168 } 169 }); 170 171 // SPECIAL LINK REDIRECT 172 $('#destination-rennes').on('click',function(){ 173 swal({ 174 title: "", 175 text: "Voulez vous ouvrir le site www.tourisme-rennes.com ?", 176 type: "warning", 177 showCancelButton: true, 178 confirmButtonText: "Oui", 179 cancelButtonText: "Non", 180 closeOnConfirm: false 181 }, 182 function(){ 183 window.open('https://www.tourisme-rennes.com/fr/reserver-en-ligne/billetterie/made-festival/', '_blank'); 184 }); 185 }); 186 187 // ADAPTATION OF SIZE 188 function adaptSize() { 189 190 if (url.indexOf('accueil') !== -1) { 191 $('body').css('overflow','hidden'); 192 $('.col-left').addClass('align-content-end'); 193 $('.col-right').addClass('align-content-start'); 194 $('#website').css('height', websiteHeight); 195 $('.home-container').css('height', divHeight); 196 $('.img-home').css('max-height', divHeight - 20); 197 } 198 199 else if (url.indexOf('billetterie') !== -1) { 200 201 if (windowWith > 991) { 202 $('body').css('overflow','hidden'); 203 $('#countdown').css('height', divHeight); 204 $('#container-iframe').css('height', divHeight); 205 $('#container-iframe iframe').css('height', divHeight); 206 $('#container-iframe iframe').css('width', windowWith); 207 $('#container-iframe iframe').css('max-width', windowWith); 208 } 209 else { 210 $('body').css('overflow','auto'); 211 $('#countdown').css('height', iframeHeight); 212 $('#container-iframe').css('height', iframeHeight); 213 $('#container-iframe iframe').css('height',iframeHeight); 214 $('#container-iframe iframe').css('width', windowWith); 215 $('#container-iframe iframe').css('max-width', windowWith); 216 } 217 } 218 219 else if (url.indexOf('carte') !== -1) { 220 221 if (windowWith > 991) { 222 $('body').css('overflow','hidden'); 223 $('#container-map').css('height', divHeight); 224 $('#container-map iframe').css('height', divHeight); 225 $('#container-map iframe').css('width', windowWith); 226 $('#container-map iframe').css('max-width', windowWith); 227 } 228 else { 229 $('body').css('overflow','auto'); 230 $('#container-map').css('height', iframeHeight); 231 $('#container-map iframe').css('height',iframeHeight); 232 $('#container-map iframe').css('width', windowWith); 233 $('#container-map iframe').css('max-width', windowWith); 234 } 235 } 236 237 238 else if (url.indexOf('devenir-benevole') !== -1) { 239 240 if (windowWith > 991) { 241 $('body').css('overflow','hidden'); 242 $('#section-benevole').css('height', divHeight); 243 } 244 else { 245 $('body').css('overflow','auto'); 246 $('#section-benevole').css('height', iframeHeight); 247 } 248 } 249 250 else if (url.indexOf('404') !== -1) { 251 252 if (windowWith > 991) { 253 $('body').css('overflow','hidden'); 254 $('#section-404').css('height', divHeight); 255 } 256 else { 257 $('body').css('overflow','auto'); 258 $('#section-404').css('height', iframeHeight); 259 } 260 } 261 262 else { 263 $('body').css('overflow','auto'); 264 } 265 266 if(hash == "#timetable") { 267 document.getElementById('timetable').scrollIntoView(); 268 } else if(hash == "#partenaires") { 269 document.getElementById('partenaires').scrollIntoView(); 270 } 271 } 272 273});
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.