1jQuery(document).ready(function ($) { 2 //Menu Hamburger 3 jQuery('#hamburger').on('click', function () { 4 if (jQuery(this).hasClass('opened')) { 5 jQuery(this).removeClass('opened'); 6 jQuery('#menu-top').fadeOut(); 7 } else { 8 jQuery(this).addClass('opened'); 9 jQuery('body').css('overflow','hidden'); 10 jQuery('#menu-top').fadeIn().css('display','flex'); 11 } 12 }); 13 jQuery('#chiudi-menu').on('click', function () { 14 jQuery('#hamburger').removeClass('opened'); 15 jQuery('#menu-top').fadeOut(); 16 jQuery('body').css('overflow-y','scroll'); 17 }); 18 19 // Header 20 { 21 function gestisciSocialMobile() { 22 let screenSize = jQuery(window).width(); 23 let targetMenuMobile = jQuery('.menu-top-mobile-contenitore .menu-top-mobile'); 24 let sorgenteSocial = jQuery('.header-contenitore .header .header-destra .social-contenitore'); 25 26 if (screenSize <= 959) { 27 // Controlliamo se esiste già una copia nel menu mobile per non duplicarla 28 if (targetMenuMobile.find('.social-contenitore').length === 0) { 29 30 // .clone(true) è il segreto: crea una COPIA (true mantiene i click/eventi) 31 // Invece di spostare l'originale, ne incolliamo un clone 32 sorgenteSocial.clone(true).appendTo(targetMenuMobile); 33 } 34 } else { 35 // Se lo schermo torna grande, rimuoviamo SOLO la copia dal menu mobile 36 // L'originale nell'header non viene mai toccato 37 targetMenuMobile.find('.social-contenitore').remove(); 38 } 39 } 40 41 // Eseguiamo la funzione subito al caricamento 42 gestisciSocialMobile(); 43 44 // Eseguiamo la funzione ogni volta che la finestra viene ridimensionata 45 jQuery(window).on('resize', function () { 46 gestisciSocialMobile(); 47 }); 48 } 49 50 // Pagina Opera 51 52 jQuery('#Opera').val(jQuery('body.audizioni-concorsi .contenuti-contenitore .contenuti .articolo.audizioni .titolo h2').text().trim()); 53 54 jQuery('body.area-scuole .contenuti-contenitore .brani-contenitore > .titolo').on('click', function () { 55 jQuery(this).siblings('.brani').toggle(); 56 57 if(jQuery(this).siblings().is(':hidden')) { 58 jQuery('body.area-scuole .contenuti-contenitore .brani-contenitore .titolo h2 i').removeClass().addClass('fa-light fa-arrow-right'); 59 } else { 60 jQuery('body.area-scuole .contenuti-contenitore .brani-contenitore .titolo h2 i').removeClass().addClass('fa-light fa-arrow-down'); 61 } 62 }); 63 64 jQuery('body.area-scuole .contenuti-contenitore .videolezioni-contenitore >.titolo').on('click', function () { 65 jQuery(this).siblings('.videolezioni').toggle(); 66 67 if(jQuery(this).siblings().is(':hidden')) { 68 jQuery('body.area-scuole .contenuti-contenitore .videolezioni-contenitore > .titolo h2 i').removeClass().addClass('fa-light fa-arrow-right'); 69 } else { 70 jQuery('body.area-scuole .contenuti-contenitore .videolezioni-contenitore > .titolo h2 i').removeClass().addClass('fa-light fa-arrow-down'); 71 } 72 }); 73 74 jQuery('body.area-scuole .contenuti-contenitore .brani-contenitore .brani .brano-contenitore .brano .titolo').on('click', function () { 75 // Apro al click i vari link 76 if(jQuery(this).parent().hasClass('aperto')) { 77 // Chiudo 78 jQuery(this).siblings('.link').hide().parent().removeClass('aperto').addClass('chiuso'); 79 jQuery(this).children().children().removeClass().addClass('fa-solid fa-plus'); 80 } else { 81 // Controllo se le altri sono aperti 82 let brano = jQuery('body.area-scuole .contenuti-contenitore .brani-contenitore .brani .brano-contenitore .brano'); 83 84 brano.each(function () { 85 if(jQuery(this).hasClass('aperto')) { 86 jQuery(this).children('.titolo').children('h4').
86children().removeClass().addClass('fa-solid fa-plus'); 87 jQuery(this).removeClass('aperto').find('.link').hide(); 88 } 89 }); 90 91 // Apro 92 jQuery(this).children().children().removeClass().addClass('fa-solid fa-minus'); 93 jQuery(this).siblings('.link').show().parent().removeClass('chiuso').addClass('aperto'); 94 } 95 }); 96 97 jQuery('.studio-offline-nuova-versione .elemento .titolo').on('click', function () { 98 99 // Identifico il contenitore padre (.elemento) 100 let elemento = jQuery(this).parent(); 101 102 if (elemento.hasClass('active')) { 103 // SE à GIà APERTO -> CHIUDO 104 105 // Rimuovo la classe active (così la freccia ruota via CSS) 106 elemento.removeClass('active'); 107 // Nascondo il contenuto con animazione 108 jQuery(this).next('.contenuto').slideUp(); 109 110 } else { 111 // SE à CHIUSO -> APRO 112 113 // 1. Chiudo tutti gli altri eventualmente aperti 114 jQuery('.studio-offline-nuova-versione .elemento').each(function () { 115 if (jQuery(this).hasClass('active')) { 116 jQuery(this).removeClass('active'); 117 jQuery(this).find('.contenuto').slideUp(); 118 } 119 }); 120 121 // 2. Apro quello corrente 122 elemento.addClass('active'); 123 jQuery(this).next('.contenuto').slideDown(); 124 } 125 }); 126 127 //Gestione video APP su Vimeo 128 jQuery('body.area-scuole').on('click', ".contenuti-contenitore .brani-contenitore .brani .brano-contenitore .brano .link a.video, .contenuti-contenitore .brani-contenitore .brani .brano-contenitore .brano .link a.video-lis-intro, .contenuti-contenitore .brani-contenitore .brani .brano-contenitore .brano .link a.video-lis", function (e) { 129 e.preventDefault(); 130 131 //Recupera l'id del video 132 vUrl = jQuery(this).prop('href'); 133 console.log(vUrl); 134 videoWidth = jQuery('body.area-scuole .contenuti-contenitore').width(); 135 videoHeight = videoWidth * 360 / 640; 136 137 jQuery('#vimeo-embed') 138 .attr('data-vimeo-url', vUrl) 139 .attr('data-vimeo-autoplay', 'true') 140 .attr('data-vimeo-width', videoWidth) 141 .attr('data-vimeo-height', videoHeight) 142 .promise().done(function () { 143 console.log(jQuery('#vimeo-embed').data()); 144 let player = new Vimeo.Player('vimeo-embed'); 145 146 //Attiva il full screen 147 player.requestFullscreen(); 148 149 //Controlla l'uscita dal full screen e chiude il popup 150 player.on('fullscreenchange', function (vimeoVideo) { 151 if (!vimeoVideo.fullscreen) { 152 jQuery('#vimeo-embed') 153 .removeAttr('data-vimeo-url') 154 .removeAttr('data-vimeo-autoplay') 155 .removeAttr('data-vimeo-width') 156 .removeAttr('data-vimeo-height') 157 .removeAttr('data-vimeo-initialized') 158 .empty(); 159 160 player.destroy(); 161 } 162 }); 163 164 player.setVolume(0.3); 165 166 player.on('play', function () { 167 console.log('played the video!'); 168 }); 169 }); 170 171 }); 172 173 jQuery('body.formazione-insegnanti-opera').on('click', ".item-page.formazione-insegnanti-opera p a", function (e) { 174 e.preventDefault(); 175 176 //Recupera l'id del video 177 vUrl = jQuery(this).prop('href'); 178 console.log(vUrl); 179 videoWidth = jQuery('body.formazione-insegnanti-opera .contenuti-contenitore').width(); 180 videoHeight = videoWidth * 360 / 640; 181 182 jQuery('#vimeo-embed') 183 .attr('data-vimeo-url', vUrl) 184 .attr('data-vimeo-autoplay', 'true') 185 .attr('data-vimeo-width', videoWidth) 186 .attr('data-vimeo-height', videoHeight) 187 .promise().done(function () { 188 console.log(jQuery('#vimeo-embed').data()); 189 let player = new Vimeo.Player('vimeo-embed'); 190 191 //Attiva il full screen 192 player.requestFullscreen(); 193 194 //Controlla l'uscita dal full screen e chiude il popup 195 player.on('fullscreenchange', function (vimeoVideo) { 196 if (!vimeoVideo.fullscreen) { 197 jQuery('#vimeo-embed') 198 .removeAttr('data-vimeo-url') 199 .removeAttr('data-vimeo-autoplay') 200 .removeAttr('data-vimeo-width') 201 .removeAttr('data-vimeo-height') 202 .removeAttr('data-vimeo-initialized') 203 .html(' '); 204 205 player.destroy(); 206 } 207 }); 208 209 player.setVolume(0.3); 210 211 player.on('play', function () { 212 console.log('played the video!'); 213 }); 214 }); 215 216 });
217 218 if (jQuery('.dicono-di-noi-contenitore .dicono-di-noi .articoli').length > 0) { 219 var sliderDicono = tns({ 220 "container": ".dicono-di-noi-contenitore .dicono-di-noi .articoli", 221 222 "nav": false, 223 "slideBy": "page", 224 "mouseDrag": true, 225 "autoplayButtonOutput": false, 226 "swipeAngle": false, 227 "speed": 500, 228 "autoplayHoverPause": true, 229 "controls": true, 230 "responsive": { 231 0: { 232 items: 1, 233 }, 234 900: { 235 items: 1 236 }, 237 1200: { 238 items: 1 239 } 240 }, 241 }); 242 }; 243 244 /* TINY SLIDER MENU-COSA-FACCIAMO */ 245 if (jQuery('.testata-slider-contenitore .testata-slider-informazioni .articoli').length > 0) { 246 var sliderInformazioni = tns({ 247 "container": ".testata-slider-contenitore .testata-slider-informazioni .articoli", 248 "mode": "gallery", 249 "animateIn": "fadeInUp", 250 "animateOut": "fadeOutUp", 251 "nav": false, 252 "slideBy": "page", 253 "mouseDrag": true, 254 "autoplayButtonOutput": false, 255 "swipeAngle": false, 256 "speed": 0, 257 "autoplayHoverPause": true, 258 "controls": false, 259 "responsive": { 260 0: { 261 items: 1, 262 }, 263 900: { 264 items: 1 265 }, 266 1200: { 267 items: 1 268 } 269 }, 270 }); 271 }; 272 273 274 275 if (jQuery('.testata-slider-contenitore .testata-slider-immagini .articoli').length > 0) { 276 var sliderImmagini = tns({ 277 "container": ".testata-slider-contenitore .testata-slider-immagini .articoli", 278 "nav": true, 279 "slideBy": "page", 280 "mouseDrag": true, 281 "swipeAngle": false, 282 "speed": 400, 283 "autoplayHoverPause": true, 284 "controls": true, 285 "autoplay": false, 286 "responsive": { 287 0: { 288 items: 1, 289 }, 290 900: { 291 items: 1 292 }, 293 1200: { 294 items: 1 295 } 296 }, 297 }); 298 let info = sliderImmagini.getInfo(); 299 sliderImmagini.events.on('indexChanged', function (info) { 300 let indexCurrent = info.displayIndex - 1; 301 jQuery('#displayindex').text(info.displayIndex); 302 sliderInformazioni.goTo(indexCurrent); 303 }); 304 jQuery('#slidecount').text(info.slideCount); 305 }; 306 307 308 if (jQuery('.gallery-contenitore .gallery ul').length > 0) { 309 let sliderPhotogallery = tns({ 310 "container": ".gallery-contenitore .gallery ul", 311 "nav": false, 312 "slideBy": "1", 313 "loop": true, 314 "mouseDrag": true, 315 "autoplay" : true, 316 "autoplayButtonOutput": false, 317 "swipeAngle": false, 318 "speed": 800, 319 "autoplayTimeout": 2000, 320 "gutter": 10, 321 "autoplayHoverPause": true, 322 "controls": false, 323 "responsive": { 324 0: { 325 items: 2, 326 }, 327 900: { 328 items: 3 329 }, 330 1200: { 331 items: 4.5 332 } 333 }, 334 }); 335 }; 336 337 if (jQuery('.slider-contenitore .slider .articoli').length > 0) { 338 let sliderPhotogallery = tns({ 339 "container": ".slider-contenitore .slider .articoli", 340 "nav": false, 341 "slideBy": "1", 342 "loop": true, 343 "mouseDrag": true, 344 "autoplay" : true, 345 "autoplayButtonOutput": false, 346 "swipeAngle": false, 347 "speed": 1500, 348 "autoplayTimeout": 5000, 349 "animateDelay": 3000, 350 "gutter": 10, 351 "nav": true, 352 "autoplayHoverPause": true, 353 "controls": false, 354 "responsive": { 355 0: { 356 items: 1, 357 }, 358 900: { 359 items: 1 360 }, 361 1200: { 362 items: 1 363 } 364 }, 365 }); 366 }; 367 368 // SLIDER STRUMENTISTI DINAMICO 369 if(jQuery('.i-nostri-strumentisti-contenitore .i-nostri-strumentisti .articoli').length > 0) { 370 let sliderStrumentisti = tns({ 371 "container": ".i-nostri-strumentisti-contenitore .i-nostri-strumentisti .articoli", 372 "nav": false, 373 "slideBy": "1", 374 "loop": true, 375 "mouseDrag": true, 376 "autoplay" : false, 377 "autoplayButtonOutput": false, 378 "swipeAngle": false, 379 "speed": 800, 380 "autoplayTimeout": 2000, 381 "gutter": 10, 382 "autoplayHoverPause": true, 383 "controls": false, 384 "responsive": { 385 0: { 386 items: 2.5, 387 }, 388 900: { 389 items: 3.5 390 }, 391 1200: { 392 items: 4.5 393 }, 394 }, 395 }); 396 } 397 // AUDIZIONI E CONCORSI INPUT
398 let ciButton = jQuery('#CIButton'); 399 ciButton.on('click', function () { 400 jQuery('#CI').click(); 401 jQuery('#CI').on('change', function () { 402 let document = jQuery('#CI')[0].files[0].name; 403 jQuery('#CIButton').siblings('.formDescription') 404 .empty() 405 .append(`<i class="fa-solid fa-check"></i> Hai caricato con successo: <span>${document}</span>`); 406 }); 407 }); 408 let photoButton = jQuery('#FotoButton'); 409 photoButton.on('click', function () { 410 jQuery('#Foto').click(); 411 jQuery('#Foto').on('change', function () { 412 let document = jQuery('#Foto')[0].files[0].name; 413 jQuery('#FotoButton').siblings('.formDescription') 414 .empty() 415 .append(`<i class="fa-solid fa-check"></i> Hai caricato con successo: <span>${document}</span>`); 416 }); 417 }); 418 let cvButton = jQuery('#CVButton'); 419 cvButton.on('click', function () { 420 jQuery('#CV').click(); 421 jQuery('#CV').on('change', function () { 422 let document = jQuery('#CV')[0].files[0].name; 423 jQuery('#CVButton').siblings('.formDescription') 424 .empty() 425 .append(`<i class="fa-solid fa-check"></i> Hai caricato con successo: <span>${document}</span>`); 426 }); 427 }); 428 429 let bonificoButton = jQuery('#DistintaButton'); 430 bonificoButton.on('click', function () { 431 jQuery('#Bonifico').click(); 432 jQuery('#Bonifico').on('change', function () { 433 let document = jQuery('#Bonifico')[0].files[0].name; 434 jQuery('#DistintaButton').siblings('.formDescription') 435 .empty() 436 .append(`<i class="fa-solid fa-check"></i> Hai caricato con successo: <span>${document}</span>`); 437 }); 438 }); 439 440 // AUDIZIONI E CONCORSI 441 jQuery('.dialoghi-sinfonici-introduzione-contenitore .dialoghi-sinfonici-introduzione .articoli .articolo .leggi-tutto').on('click', function () { 442 jQuery(this).hide(); 443 jQuery('#leggi-tutto-audizioni').slideDown(); 444 }); 445 // BOTTONE CANDIDATI 446 if(jQuery('body.audizioni-concorsi .contenuti-contenitore .contenuti').length > 0) { 447 let offsetCandidati = jQuery('body.audizioni-concorsi .contenuti-contenitore .contenuti').offset().top; 448 jQuery(window).scroll(function () { 449 if (jQuery(window).scrollTop() > offsetCandidati) { 450 jQuery('#candidati').show().css('display', 'flex'); 451 } 452 }); 453 } 454 455 456 // AUDIZIONI E CONCORSI FORM CANDIDATURA BONIFICO 457 let bonificoStatus = jQuery('#campo-17'); 458 if (bonificoStatus.length > 0) { 459 console.log(bonificoStatus.text()) 460 if (bonificoStatus.text() === 'bonifico-no') { 461 jQuery('#DistintaButton').remove(); 462 jQuery('#rsform-block-bonifico').remove(); 463 } else { 464 jQuery('#Bonifico').attr({ 465 'data-rsfp-required' : true, 466 'aria-required' : true 467 468 }) 469 } 470 } 471 472 473 // VIMEO GALLERY 474 jQuery('.videogallery-pagina-contenitore .videogallery-pagina .articoli .articolo').click(function () { 475 let vimeoId = jQuery(this).children('img').attr('vimeo'); 476 477 //Fix per vecchi video (senza parametro h= nell'id) 478 if(!vimeoId.includes('?h=')){ 479 vimeoId += '?h=ee7de02e58'; 480 } 481 482 let iframeVimeo = jQuery(this).append(`<iframe id="iframe-created" src="https://player.vimeo.com/video/${vimeoId}&badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;">`) 483 let vimeoPlayer = new Vimeo.Player(iframeVimeo); 484 vimeoPlayer.requestFullscreen(); 485 document.addEventListener("fullscreenchange", function(event) { 486 if (!document.fullscreenElement) { 487 jQuery('#iframe-created').remove(); 488 } 489 }); 490 });
491 492 493 494 495 // DIALOGHI SINFONICI 496 //Prossimi appuntamenti 497 jQuery('body.dialoghi-sinfonici').on('click', '.dialoghi-sinfonici-spettacoli-contenitore .spettacoli-in-evidenza .blocco .titolo-blocco', function(){ 498 let elenco = jQuery(this).parent('.blocco').find('.articoli'); 499 if(elenco.hasClass('opened')){ 500 elenco 501 .removeClass('opened').slideUp(); 502 }else{ 503 504 let displayType = 'grid'; 505 if(jQuery(window).width() < 768){ 506 displayType = 'flex'; 507 } 508 509 elenco 510 .addClass('opened').slideDown().css('display', displayType); 511 } 512 }); 513 //Archivio 514 jQuery('body.dialoghi-sinfonici').on('click', '.dialoghi-sinfonici-spettacoli-contenitore .spettacoli-passati h2', function(){ 515 let elenco = jQuery(this); 516 if(elenco.hasClass('opened')){ 517 elenco 518 .removeClass('opened') 519 .next('.articoli').slideUp(); 520 }else{ 521 522 let displayType = 'grid'; 523 if(jQuery(window).width() < 768){ 524 displayType = 'flex'; 525 } 526 527 elenco 528 .addClass('opened') 529 .next('.articoli').slideDown().css('display', displayType); 530 } 531 }); 532 533 // AUDIZIONI E CONCORSI 534 jQuery('body.audizioni-concorsi').on('click', '.audizioni-e-concorsi-contenitore .archivio-bandi h2', function(){ 535 let elenco = jQuery(this); 536 if(elenco.hasClass('opened')){ 537 elenco 538 .removeClass('opened') 539 .next('.articoli').slideUp(); 540 }else{ 541 542 elenco 543 .addClass('opened') 544 .next('.articoli').slideDown().css('display', 'flex'); 545 } 546 }); 547 548 549 550 551 552 jQuery('body.spettacoli .contenuti-contenitore .contenuti .item-page .com-content-article__body') 553 .prepend(jQuery('body.spettacoli .contenuti-contenitore .contenuti .item-page ul.fields-container')); 554 555 let pulsanteAcquisto = jQuery('body.spettacoli .contenuti-contenitore .contenuti .item-page .fields-container li.link-di-acquisto .field-value'); 556 pulsanteAcquisto.html(`<a href="${pulsanteAcquisto.text()}" class="acquista-interno" target="blank">ACQUISTA</a>`) 557});
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.