PageSourceSearch

https://www.unibo.it/portal_javascripts/Sunburst%20Theme/resourceg…achekey-1f37065ba47ed82465460d9ccbe1e544.js

js unibo.it collected 2026-09-24 08:04:39 UTC 97,149 bytes, 840 lines download raw bytes

1
2/* Merged Plone Javascript file
3 * This file is dynamically assembled from separate parts.
4 * Some of these parts have 3rd party licenses or copyright information attached
5 * Such information is valid for that section,
6 * not for the entire composite file
7 * originating files are separated by - filename.js -
8 */
9
10/* - ++resource++gareappalto.js - */
11// https://www.unibo.it/portal_javascripts/++resource++gareappalto.js?original=1
12$(document).ready(function(){if($('.portaltype-garaappalto').length>0){$(".list-box ul").each(function(){var more=$('.more',$(this));var more_a=$('.more a',$(this));var lis=$('li',$(this)).slice(0,-1);if(more.length>0&&more_a.length>0){if(lis.length>3){lis.slice(3).hide();more_a.click(function(event){event.preventDefault();var parent=$(this).parents(".list-box ul");var my_lis=$('li',parent);var li_more=my_lis.last()
13if(li_more.hasClass('open')){more_a.html('Altri avvisi')} else{more_a.html('Meno avvisi')}
14li_more.toggleClass("open");my_lis.slice(3,-1).slideToggle()})}
15else{more.hide()}}})}});
16
17/* - ++resource++unibo.delegazioni/delegazioni.js - */
18// https://www.unibo.it/portal_javascripts/++resource++unibo.delegazioni/delegazioni.js?original=1
19(function($){$(document).ready(function(){if($('body.portaltype-delegazione').length>0&&$().select2){$("#form-widgets-stati").select2();$(window).bind('addz3cformsubobject', function(evt,response){$("#form-widgets-stati").select2()})}})})(jQuery);
20
21/* - ++resource++unibo.behaviors.static/unibo.behaviors.js - */
22// https://www.unibo.it/portal_javascripts/++resource++unibo.behaviors.static/unibo.behaviors.js?original=1
23(function($){"use strict";if((typeof window.behaviors)==='undefined'){window.behaviors={}}
24if(typeof NodeList!=="undefined"&&NodeList.prototype&&!NodeList.prototype.forEach){NodeList.prototype.forEach=Array.prototype.forEach}
25var behaviors=window.behaviors;behaviors.showHideFieldBoxNewsletter=function(select,parent){if(select.val()=="1"){parent.children("div[id^='formfield-form-widgets-IBoxWithLinkAndNewsletter'][id$='title']").hide();parent.children("div[id^='formfield-form-widgets-IBoxWithLinkAndNewsletter'][id$='description']").hide();parent.children("div[id^='formfield-form-widgets-IBoxWithLinkAndNewsletter'][id$='reference']").hide();parent.children("div[id^='formfield-form-widgets-IBoxWithLinkAndNewsletter'][id$='image']").hide()}else{parent.children("div[id^='formfield-form-widgets-IBoxWithLinkAndNewsletter']").show()}};$(document).ready(function(){var homepageedit=$('body.template-edit.portaltype-homepage')
26var tipologia="select[id^='form-widgets-IBoxWithLinkAndNewsletter-boxwithlinkandnewsletter-'][id $='-widgets-tipologia']";if(homepageedit.on!=undefined){homepageedit.on("change",tipologia, function(){behaviors.showHideFieldBoxNewsletter($(this),$(this).parent().parent())})}else{homepageedit.delegate(tipologia,"change", function(){behaviors.showHideFieldBoxNewsletter($(this),$(this).parent().parent())})}
27homepageedit.find(tipologia).each(function(){behaviors.showHideFieldBoxNewsletter($(this),$(this).parent().parent())});$(window).bind('addz3cformsubobject', function(){homepageedit.find(tipologia).each(function(){behaviors.showHideFieldBoxNewsletter($(this),$(this).parent().parent())})});var prevText='Previous',nextText='Next';if($('html').attr('lang')=='it'){prevText='Precedente';nextText='Successiva'}
28$('.flexslider-sommario').flexslider({animation:"slide",animationLoop:false,controlNav:false,slideshow:false,directionNav:true,prevText:prevText,nextText:nextText});$('.box-newsletter a#subscribe').prepOverlay({subtype:'ajax',filter:'#content>*',formselector:'form'});$('.box-newsletter form').submit(function(e){
29function isEmail(strEmail){var validRegExp=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return(strEmail.search(validRegExp)!==-1)}
30e.preventDefault();e.stopImmediatePropagation();var form=$(this),email=$('input[name=email]',form).val();if(!isEmail(email)){if($('html').attr('lang')=='en'){alert('Enter a valid email address')}
31else{alert('Inserire un indirizzo email valido')}}
32else if(!$('input#confirm',form).attr('checked')){if($('html').attr('lang')=='en'){alert('Accept the terms and conditions')}
33else{alert('Accettare i termini e le condizioni')}}
34else{$.ajax({type:"POST",url:form.data('ajaxaction'),data:form.serialize(),success: function(data,status,xhr){if(status==='success')
35form.replaceWith('<'+'div class="message">'+data.message+'<'+'/div>')},error: function(xhr,status,error){form.replaceWith('<'+'div class="message">'+status+'<'+'/div>')},dataType:'json'})}});$('label.tab').click(function(){var link=$('.label-toggler'),text=$('.label-toggler span');text.text($(this).text());link.toggleClass('close');if(link.is(':visible')){$('.label-containter').attr('style','display:none;')}});$('.button-tabs').each(function(){const KEYCODE={LEFT:37,RIGHT:39};const toolbar=this;toolbar.addEventListener('keydown',onKeyDown);toolbar.addEventListener('click',onClick);
36function onKeyDown(event){switch(event.keyCode){case KEYCODE.RIGHT:event.preventDefault();
36focusNextItem();break;case KEYCODE.LEFT:event.preventDefault();focusPreviousItem();break}}
37function onClick(event){if(event.target.tagName==='BUTTON'&&event.target.classList.contains('tab')){activate(event.target)}}
38function focusNextItem(){const item=document.activeElement;if(item.nextElementSibling){activate(item.nextElementSibling)}}
39function focusPreviousItem(){const item=document.activeElement;if(item.previousElementSibling){activate(item.previousElementSibling)}}
40function activate(item){toolbar.querySelectorAll('button.tab').forEach(
41function(btn){btn.tabIndex=-1;btn.setAttribute('aria-selected','false')});toolbar.querySelectorAll('.panel').forEach(
42function(panel){panel.setAttribute('hidden','hidden')});item.tabIndex=0;item.setAttribute('aria-selected','true');item.focus();document.getElementById(item.attributes['rel'].value).removeAttribute('hidden')}
43toolbar.querySelectorAll('button.tab').forEach(
44function(btn,idx){if(idx===0){btn.tabIndex=0;btn.setAttribute('aria-selected','true')}
45else{btn.tabIndex=-1;btn.setAttribute('aria-selected','false')}});toolbar.querySelectorAll('.panel').forEach(
46function(panel,idx){if(idx===0){panel.removeAttribute('hidden','hidden')}
47else{panel.setAttribute('hidden','hidden')}})});if($("#u-formcontatti").length>0){setFormStay("unibo-contatti-form");$("#contattaci").click(function(e){e.preventDefault();var id=$(this).attr('aria-controls'),expanded=$(this).attr('aria-expanded');$('#'+id).attr('aria-hidden',(expanded=="true"));$(this).attr('aria-expanded',(expanded=="false"))});$('#contattaci-form form').submit(function(e){
48function isEmail(strEmail){var validRegExp=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return(strEmail.search(validRegExp)!==-1)}
49e.preventDefault();e.stopImmediatePropagation();var form=$(this);var email=$('input[name=email]',form).val();var tema=$('select[name=tema]',form).val();var messaggio=$('input[name=messaggio]',form).val();if(email==""||tema==""||messaggio==""){if($('html').attr('lang')=='en'){alert("Missing required fields")}
50else{alert("Campi obbligatori mancanti")}}
51else if(!isEmail(email)){if($('html').attr('lang')=='en'){alert('Enter a valid email address')}
52else{alert('Inserire un indirizzo email valido')}}
53else if(!$('input#confirm',form).attr('checked')){if($('html').attr('lang')=='en'){alert('Accept the terms and conditions')}
54else{alert('Accettare i termini e le condizioni')}}
55else{retrieveFormStay("unibo-contatti-form","form-stay");$.ajax({type:"POST",url:form.data('ajaxaction'),data:form.serialize(),success: function(data,status,xhr){if(status==='success')
56form.replaceWith('<'+'div class="message">'+data.message+'<'+'/div>')},error: function(xhr,status,error){form.replaceWith('<'+'div class="message">'+status+'<'+'/div>')},dataType:'json'})}})}
57if($("#u-feedback").length>0){setFormStay("unibo-feedback-form");$("#btn-valuta-pagina").click(function(e){e.preventDefault();var $ctx=$(this).parents('#u-feedback');$("#feedback-choice",$ctx).hide();$("#segnala-problema",$ctx).hide();$("#valuta-pagina",$ctx).show()});$("#btn-segnala-problema").click(function(e){e.preventDefault();var $ctx=$(this).parents('#u-feedback');$("#feedback-choice",$ctx).hide();$("#valuta-pagina",$ctx).hide();$("#segnala-problema",$ctx).show()});$('#valuta-pagina form, #segnala-problema form').submit(function(e){e.preventDefault();e.stopImmediatePropagation();var form=$(this);if($(this).attr('id')=="form-valuta-pagina"){var info_chiare=$('input[name=info-chiare]:checked',form).val();var info_facile=$('input[name=info-facile]:checked',form).val();if(!info_chiare||!info_facile){if($('html').attr('lang')=='en'){alert("You didn't rate")}
58else{alert("Non hai valutato")}
59return}}
60if($(this).attr('id')=="form-segnala-problema"){var cosa_cercavi=$('textarea[name=cosa-cercavi]',form).val();var cosa_segnali=$('textarea[name=cosa-segnali]',form).val();if(!cosa_cercavi||!cosa_segnali){if($('html').attr('lang')=='en'){alert("Missing required fields")}
61else{alert("Campi obbligatori mancanti")}
62return}}
63retrieveFormStay("unibo-feedback-form","form-stay");$.ajax({type:"POST",url:form.data('ajaxaction'),data:form.serialize(),success: function(data,status,xhr){if(status==='success'){form.remove();$("#valuta-pagina").hide();$("#segnala-problema").hide();$("#thankyou-container").show();$("#thankyou-message").html(data.message)}},error: function(xhr,status,error){form.replaceWith('<'+'div class="message">'+status+'<'+'/div>')},dataType:'json'})})}})}(jQuery));
64function isScriptLoaded(src){var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){if(scripts[i].src===src){return true}}
65return false}
66function setFormStay(name){var visit={};visit['time']=Date.now();localStorage.setItem(name,window.btoa(JSON.stringify(visit)))}
67function retrieveFormStay(name,field){var strg=localStorage.getItem(name);if(strg!=null){var visit=JSON.parse(atob(strg));if(Object.hasOwn(visit,'time')){const millis=Date.now()-visit['time'];$('[name="'+field+'"]').val(millis)} else{localStorage.removeItem(name)}}}
68
69
70/* - ++resource++normateneo.js - */
71// https://www.unibo.it/portal_javascripts/++resource++normateneo.js?original=1
72$(document).ready(function(){if($('.portaltype-norma').length>0){var targetFieldId="#formfield-form-widgets-target";var allTargetsId="select-all-targets";var all_targets_cb='<span style="margin:display:block;margin:0.2em;"><input id="'+allTargetsId+'" type="checkbox"/><label for="'+allTargetsId+'"><span class="label"><strong>Tutti</strong></span></label></span>';$(all_targets_cb).insertBefore(targetFieldId+" span.option:first");
72$("#"+allTargetsId).attr('checked',$(targetFieldId+" .option input:checkbox").filter(':not(:checked)').length===0);$("#"+allTargetsId).click(function(){$("#formfield-form-widgets-target input:checkbox").attr('checked',this.checked)});$(targetFieldId+" .option input:checkbox").click(function(){$("#"+allTargetsId).attr('checked',$(targetFieldId+" .option input:checkbox").filter(':not(:checked)').length===0)});var categoryFieldId="#formfield-form-widgets-categoria";var allCategoriesId="select-all-categories"
73var all_categories_cb='<span style="margin:display:block;margin:0.2em;"><input id="'+allCategoriesId+'" type="checkbox"/><label for="'+allCategoriesId+'"><span class="label"><strong>Tutte</strong></span></label></span>';$(all_categories_cb).insertBefore(categoryFieldId+" span.option:first");$("#"+allCategoriesId).attr('checked',$(categoryFieldId+" .option input:checkbox").filter(':not(:checked)').length===0);$("#"+allCategoriesId).click(function(){$(categoryFieldId+" input:checkbox").attr('checked',this.checked)});$(categoryFieldId+" .option input:checkbox").click(function(){$("#"+allCategoriesId).attr('checked',$(categoryFieldId+" .option input:checkbox").filter(':not(:checked)').length===0)})}});
74
75/* - ++resource++unibo.contents/unibo.contents.js - */
76// https://www.unibo.it/portal_javascripts/++resource++unibo.contents/unibo.contents.js?original=1
77function onYouTubeIframeAPIReady(){var players={};$("iframe[id^='youtube-']").each(function(){var id=$(this).attr('id');new YT.Player(id,{playerVars:{'controls':0},events:{'onReady': function(event){$('body.portaltype-homepage div.slide-wrapper a.remotemedia').click(function(e){e.preventDefault();var id_iframe=$(this).find("iframe").attr('id');$("div.video-preview").hide();$("div.centre-vid").show();if(event.target.getIframe().id==id_iframe)
78event.target.playVideo()});$('#u-topic-intro:has(iframe#'+event.target.getIframe().id+') a.hptemavideo').click(function(e){e.preventDefault();$("div.video-preview").hide();$("div.centre-vid").show();event.target.playVideo()});$('div.summaryblocksvideo:has(iframe#'+event.target.getIframe().id+')').click(function(e){e.preventDefault();$(this).find("div.video-preview").hide();$(this).find("div.centre-vid").show();event.target.playVideo()})},'onStateChange': function(event){if(event.data==YT.PlayerState.PLAYING){if($('body.portaltype-homepage').length>0){$('.flex-pause').click();$('.flexslider').data('flexslider').manualPause=true;$(".flex-active-slide .text-wrapper").hide();$("div.controlsContainer").hide();$("div.video-preview").hide();$("div.centre-vid").show()}
79if($('body.portaltype-homepagetema').length>0){$('div.topic-image div.text-wrapper').hide();$("div.video-preview").hide();$("div.centre-vid").show()}
80if($('body.portaltype-summaryblocks').length>0){$('#'+id).parent().next('.text-wrapper').hide();$($(this),"div.controlsContainer").hide();$($(this),"div.video-preview").hide();$($(this),"div.centre-vid").show()}}
81if(event.data==YT.PlayerState.ENDED){if($('body.portaltype-homepage').length>0){$('.flexslider').data('flexslider').manualPause=false;$(".flex-active-slide .text-wrapper").show();$("div.controlsContainer").show();$("div.video-preview").show();$("div.centre-vid").hide();event.target.pauseVideo()}
82if($('body.portaltype-homepagetema').length>0){$('div.topic-image div.text-wrapper').show()
83$("div.video-preview").show();$("div.centre-vid").hide()}
84if($('body.portaltype-summaryblocks').length>0){$('#'+id).parent().next('.text-wrapper').show();$($(this),"div.controlsContainer").show();$($(this),"div.video-preview").show();$($(this),"div.centre-vid").hide();event.target.pauseVideo()}}
85if(event.data==YT.PlayerState.PAUSED){if($('body.portaltype-homepage, body.portaltype-summaryblocks').length>0){$("div.controlsContainer").show()}}}}})})}(function($){"use strict";if((typeof window.unibocontents)==='undefined'){window.unibocontents={}}
86var unibocontents=window.unibocontents;unibocontents.aprichiudi_html_generator=function(container){var parent_container=$('<div class="aprichiudi">'),idx=0;while(container.children('h3.aprichiudititle').size()>
860){var element_container=$('<dl>'),stop=false,elements=container.children('h3.aprichiudititle'),length=elements.length;elements.each(function(index,element){idx+=1;element_container.append($('<dt />').append($('<button aria-expanded="false" class="plus title" />').text($(this).text()).attr('aria-controls','faq_'+idx)));var element_text=$('<dd class="text-open" style="display:none">').attr('id','faq_'+idx);$(this).nextUntil('h3.aprichiudititle').each(function(){if($(this).is('h2')){stop=true;element_container.append(element_text);parent_container.append(element_container);var elementi_successivi_h2=$(this).nextUntil('h3.aprichiudititle');parent_container.append($(this));parent_container.append(elementi_successivi_h2);return false}else{element_text.append($(this))}});$(this).remove();if(stop)
87return false;if(index===(length-1)){var pclose=element_text.find('p.block'),pclose_clone=pclose.clone(),text_after=pclose.nextAll(),text_after_clone=text_after.clone();pclose.remove();text_after.remove()}
88element_container.append(element_text);if(pclose_clone!=undefined)
89element_container.append(pclose_clone);element_container.append(text_after_clone)});if(!stop)
90parent_container.append(element_container)}
91container.append(parent_container);var ac=$('div.aprichiudi');var prev=ac.prev();$('.title',container).click(function(e){e.preventDefault();$(this).parent().next('dd').toggle();$(this).toggleClass('minus');$(this).toggleClass('plus');$(this).attr('aria-expanded',$(this).hasClass('minus'))});$('h3.button-outbox').replaceWith(
92function(){return $('<div class="box-button-outbox" />').append($('<div class="button-outbox" />').append($(this).contents()))})}
93unibocontents.hideportalmessage=function(){$('dl.portalMessage').click(function(el){if(!$(this).hasClass('form'))
94$(this).hide()})}
95unibocontents.openclose=function(button_selector,item_selector){$("body").on("click",button_selector, function(event){event.preventDefault();var aria_exp=$(this).attr("aria-expanded");if(item_selector){$(button_selector).each(function(){var target_el=uniboportale.get_target($(this),$(this).data("target"));$(this).attr("aria-expanded","false");target_el.attr("aria-hidden","true")})}
96var target_el=uniboportale.get_target($(this),$(this).data("target"));if(aria_exp=="true"){target_el.slideUp("slow", function(){$(this).removeAttr("style")});$(this).attr("aria-expanded","false");target_el.attr("aria-hidden","true")}else{target_el.slideDown('slow');$(this).attr("aria-expanded","true");target_el.attr("aria-hidden","false")}})}
97$(document).ready(function(){if($('body.portaltype-contenutoaprichiudi').length>0){unibocontents.aprichiudi_html_generator($('.description-text,.description-box'))}
98if($('body.portaltype-homepage').length>0){$('#u-slider .overlay-image').appendTo('div#content')}
99if($("iframe[id^='youtube-']").length>0){var tag=document.createElement('script');tag.src="//www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}
100$('body.portaltype-homepage div.slide-wrapper a.remotemedia, div.summaryblocksvideo').click(function(e){var $ctx=$(this).parent();if($("div.summaryblocksvideo").length){$ctx=$(this).parents("div.media-wrapper")}
101if($('div.cc-youtube',$ctx).length>0){e.preventDefault();$("div.video-preview",$ctx).hide();$("div.centre-vid",$ctx).show()}else{$("div.video-preview",$ctx).hide();$("div.centre-vid",$ctx).show()}});$('#u-topic-intro a.hptemavideo').click(function(e){var $ctx=$(this).parents('.topic-image');if($('div.cc-youtube',$ctx).length>0){e.preventDefault();$("div.video-preview",$ctx).hide();$("div.centre-vid",$ctx).show()}});if($("body.portaltype-aggregatorecontatti").length){unibocontents.openclose('.accordion-title',false)}})})(jQuery);
102
103/* - ++resource++unibo.postlaurea/unibo.postlaurea.js - */
104// https://www.unibo.it/portal_javascripts/++resource++unibo.postlaurea/unibo.postlaurea.js?original=1
105(function($){
106function togglePopup(button,popup,toggle){if(toggle==undefined){toggle=(button.attr("aria-expanded")=="true")?'close':'open'}
107if(toggle=='close'){button.attr("aria-expanded","false");popup.attr("aria-hidden","true").slideUp("slow")}
108else{button.attr("aria-expanded","true");popup.attr("aria-hidden","false").slideDown('slow')}
109return toggle}
110var defaults={itemsSelector:'.card-list .item',totalSelector:'.header-dropdown-list .result .number',groupBy:[]};$.fn.megafilter=function(usersettings){var settings={};$.extend(settings,defaults,usersettings);return this.each(function(){var ctx=$(this),filtered_by={},order_by='name',facets={};var hideElements=function(){var state={},hash='#/filters?',totals={'__all__':0};for(var key in filtered_by){hash=hash+key+"="+encodeURI(filtered_by[key]+"&");state[key]=encodeURI(filtered_by[key])}
111facets={};$(settings.itemsSelector,ctx).each(function(){var $item=$(this),bitset={},visible=true;for(var key in filtered_by){if(filtered_by[key]){var filtered=true,values=($.isArray(filtered_by[key]))?filtered_by[key]:(filtered_by[key]||'').split(',');if(key=='search'){var words=($('[data-filter="'+key+'"]',$item).data('filter-id')||'').replace(/[\-\']+/, ' ').toLowerCase().split(' ');filtered=false;$(values).each(function(idx,val){if(val){var searchfor=val.split(/\s+/),found=false;searchfor.forEach(function(s){s=s.toLowerCase();
111if(s&&!filtered){words.forEach(function(w){found=found||(/^[0-9]+$/.test(w) && w == s) || (!/^[0-9]+$/.test(w)&&w.indexOf(s)==0)});filtered=!found}})}})}
112else{$(values).each(function(idx,val){if($('[data-filter="'+key+'"][data-filter-id="'+val+'"]',$item).length>0){filtered=false}})}
113bitset[key]=!filtered;visible=visible&&!filtered}}
114if(visible){$('.item[data-id='+$item.data('id')+']').show();settings.filter_id_list.forEach(function(key){$('[data-filter="'+key+'"]',$item).each(function(){var $filter=$(this),filter_id=$filter.attr('data-filter-id');if(!facets[key]){facets[key]={}}
115if(!facets[key][filter_id]){facets[key][filter_id]={'count':0,'label':$filter.data('filterLabel')}}
116facets[key][filter_id].count+=1})});totals.__all__+=1;settings.groupBy.forEach(function(key){val=$item.data(key);if(val){if(!$.isArray(val)){val=[val]}
117val.forEach(function(v){totals[v]=(totals[v]||0)+1})}})}
118else{$('.item[data-id='+$item.data('id')+']').hide();for(var key in filtered_by){if(filtered_by[key]){$('[data-filter="'+key+'"]',$item).each(function(){var $filter=$(this),filter_id=$filter.attr('data-filter-id');if(!facets[key]){facets[key]={}}
119if(!facets[key][filter_id]){facets[key][filter_id]={'count':0,'label':$filter.data('filterLabel')}}
120if(Object.keys(bitset).reduce(function(v,k){return v&&(k==key||bitset[k])},true)){facets[key][filter_id].count+=1}})}}}});$(settings.totalSelector).text(totals.__all__);settings.groupBy.forEach(function(key){$('.dropdown-list.order-by-'+key+' h2',ctx).each(function(){$h2=$(this),$panel=$h2.next(),val=$h2.attr('id').replace(/^tab-/,'');if(totals[val]){$h2.show();$h2.find('.number').text(totals[val])}
121else{$h2.attr("aria-expanded","false").hide();$panel.attr("aria-hidden","true").hide()}})});$('.button-popup',ctx).each(function(){var filter_id=$(this).data('filter');if(filter_id in filtered_by){$(this).addClass('checked')}
122else{$(this).removeClass('checked')}});return{url:hash,state:state}};var populateSingleFilter=function(filter_id){$('#'+filter_id+' input').attr('disabled','disabled').attr('checked',null).each(function(){$(this).next().find('.number').text('')});for(value_id in facets[filter_id]){var
123checkbox=$('#'+filter_id+' input[value="'+value_id+'"]'),label=checkbox.next(),checked=(filtered_by[filter_id]&&filtered_by[filter_id].indexOf(value_id)>=0),disabled=(facets[filter_id][value_id].count==0),count=(facets[filter_id][value_id].count>0)?" ("+facets[filter_id][value_id].count+")":'';checkbox.attr('checked',checked?'checked':null);checkbox.attr('disabled',disabled?'disabled':null);label.find('.number').text(count)}};var hideEmptyFilter=function(){settings.filter_id_list.forEach(function(filter_id){var inputs=$('#'+filter_id+' input');disabled=$('#'+filter_id+' input[disabled]')
124if(inputs.length==disabled.length){$('#'+filter_id).parents('.item').hide()}});var button=$('.filter-button.button-popup'),button_parent=button.parent(),inputs=button_parent.find('input[type=checkbox]'),disabled=button_parent.find('input[disabled]');if(inputs.length==disabled.length){$('.filter-button.button-popup').hide()}
125var filter_mobile_button=$('.filter-button.button-popup:visible'),filter_popup=$('.filter-popup div.item:visible');if(filter_popup.length==0&&filter_mobile_button.length==0){$('#filter-list').hide()}}
126var populateFilter=function(){settings.filter_id_list.forEach(function(filter_id){populateSingleFilter(filter_id)});if(filtered_by['search']){$("input[name='search']").val(filtered_by['search'].join(' '))}
127var results_for=$('#selected-filter-container',ctx);results_for.empty();$('.filter-popup input[type:checkbox]:checked',ctx).each(function(){var checkbox_id=$(this).attr('id'),label=$(this).data('label'),filter_id=$(this).attr('name'),selected_filter=$('<a href="" title="Elimina filtro" class="active-filter"></a>').data('filter',filter_id).data('checkbox-id',checkbox_id).text(label).append('<i class="fa fa-times" aria-hidden="true"></i>');results_for.append(selected_filter)});$(".filter-container-popup input[type='text']",ctx).each(function(){var checkbox_id=$(this).attr('id'),label=$(this).val(),filter_id=$(this).attr('name'),selected_filter=(label)?$('<a href="" title="Elimina filtro" class="active-filter"></a>').data('filter',filter_id).data('checkbox-id',checkbox_id).text(label).append('<i class="fa fa-times" aria-hidden="true"></i>'):'';results_for.append(selected_filter)});if(results_for.children().length>0){$('.label-results,.remove-all',ctx).show()} else{$('.label-results,.remove-all',ctx).hide()}};var updateResults=function(apply_button){var filter_id=apply_button.data('filter'),val=$("input[name='"+filter_id+"'][type='checkbox']:checked,input[name='"+filter_id+"'][type='text").toArray().reduce(function(a,i){return a.concat([i.value])},[]),toggledropdown_button=apply_button.parents('.item').find('.button-popup');if(val.length>0){filtered_by[filter_id]=val;toggledropdown_button.addClass('checked')} else{delete filtered_by[filter_id];toggledropdown_button.removeClass('checked')}};var dropdownOpenClose=function(button){var popup=button.next(".popup-wrapper");togglePopup(button,popup)};var closePopup=function(popup){var button=popup.prev();togglePopup(button,popup,'close')};var checkNoResults=function(){var items=$('.card-list div.item:visible'),group_elements=$('.dropdown-list:visible');if(items.length==0&&group_elements.length==0){$('#noresults').show();$('.responsive-select.order-by').hide()}else{$('#noresults').hide();$('.responsive-select.order-by').show()}}
128var initializeDropDownlist=function(key){$(settings.itemsSelector,ctx).each(function(){var $item=$(this),val=$item.data(key);if(val){if(!$.isArray(val)){val=[val]}
129val.forEach(function(v){$item.clone().appendTo('.dropdown-list.order-by-'+key+' #panel-'+v+' .card-list',ctx)})}});$('.dropdown-list.order-by-'+key+' h2',ctx).each(function(){$h2=$(this),$panel=$h2.next();if($('.item',$panel).length==0){$h2.hide();$panel.hide()}})};var showHidePanels=function(){$('.card-list.order-by-name',ctx).toggle(order_by==='name');settings.groupBy.forEach(function(key){$('.dropdown-list.order-by-'+key,ctx).toggle(order_by===key)})}
130var initialize=function(){filter_url=window.location.hash.split("#/filters?");if(filter_url.length>1&&filter_url[1]){filter_url=filter_url[1];parameters=filter_url.split("&");for(var i=0;i<parameters.length;i++){var item=parameters[i];key_value=item.split("=");if(key_value.length>1){var key=key_value[0],value=decodeURI(key_value[1]);if(key==='orderby'){order_by=value}
131else{filtered_by[key]=value.split(',')}}}}
132showHidePanels();settings.groupBy.forEach(function(key){initializeDropDownlist(key
132)});hideElements();populateFilter();hideEmptyFilter();checkNoResults()};ctx.on("click",".button-popup", function(e){e.preventDefault();dropdownOpenClose($(this))});ctx.on("click",".close-button", function(e){e.preventDefault();var $button=$('.filter-button.button-popup'),$popup=$(".filter-popup.popup-wrapper");togglePopup($button,$popup,'close')})
133ctx.on("click",".back-button", function(e){e.preventDefault();$(this).closest(".popup-wrapper").css("display","none").attr("aria-hidden","true").siblings(".button-popup").attr("aria-pressed","false").attr("aria-expanded","false")});ctx.click(function(e){var $filter=$(e.target).closest('.filter-popup .item');$('.filter-popup .item',ctx).each(function(){var $button=$('.button-popup',this),$popup=$(".popup-wrapper",this);if(!$filter.is($(this))){togglePopup($button,$popup,'close')}})});$(".filter-container-popup input[type='text']").on('keyup', function(e){if(e.key==='Enter'||e.keyCode===13){$(this).next('button.apply-filter').click()}});ctx.on("click","a.active-filter", function(e){e.preventDefault();var checkbox_id=$(this).data('checkbox-id'),filter_id=$(this).data('filter');$('#'+checkbox_id+"[type='checkbox']",ctx).removeAttr('checked').change();$('#'+checkbox_id+"[type='text']",ctx).val('').change();$('button.apply-filter[data-filter="'+filter_id+'"]').click()});$("button.apply-filter",ctx).click(function(e){e.preventDefault();updateResults($(this));data=hideElements();history.pushState(data.state,'',data.url);populateFilter();closePopup($(this).parents('div.popup-wrapper'));checkNoResults()});$('#filter-list .fancy-checkbox input',ctx).change(function(){if(this.checked){filtered_by[this.name]=this.value}
134else{delete filtered_by[this.name]}
135data=hideElements();history.pushState(data.state,'',data.url);populateFilter()});ctx.on("click",".remove-all", function(e){e.preventDefault();$('#filter-list .fancy-checkbox input',ctx).attr('checked',null);$("input[name='search']").val('');filtered_by={};data=hideElements();history.pushState(data.state,'',data.url);populateFilter();checkNoResults()});$(".dropdown-list h2 button",ctx).click(function(e){var $button=$(this),$popup=$button.parent().next(".items-container");e.preventDefault();togglePopup($button,$popup)});$('.order-by li a',ctx).click(function(e){e.preventDefault();$('.order-by li strong',ctx).hide();$('.order-by li a',ctx).show();$(this).hide();$(this).next().show();order_by=$(this).data('orderby');showHidePanels();checkNoResults();togglePopup($('.fake-label.button-popup',ctx),$('.fake-select.popup-wrapper',ctx));$('.fake-label span',ctx).text($(this).text())});window.onpopstate=function(event){if(event.state){filtered_by=event.state;hideElements();populateFilter()}
136else{initialize()}};initialize();history.pushState(filtered_by,'');return ctx})};$(document).ready(function(){$("#postlaurea_results").megafilter({itemsSelector:'.card-list.order-by-name .item',groupBy:['department'],filter_id_list:["livello","area","campus","lingua","internazionale"]});$("#postlaurea_caf_results").megafilter({itemsSelector:'.card-list.order-by-name .item',groupBy:['department'],filter_id_list:["tipologia","area","campus"]});$("#postlaurea_summer_results").megafilter({itemsSelector:'.card-list.order-by-name .item',filter_id_list:["lingua","area","cfu","unaeuropa"]})})})(jQuery);
137
138/* - ++resource++plone.formwidget.recaptcha/recaptcha_ajax.js - */
139/* Copyright (C) 2007 reCAPTCHA. Please contact us if you are thinking of modifying & hosting this file. */
140
141var RecaptchaTemplates = {VertHtml:'<table id="recaptcha_table" class="recaptchatable" >\n<tr>\n<td colspan="6" class=\'recaptcha_r1_c1\'></td>\n</tr>\n<tr>\n<td class=\'recaptcha_r2_c1\'></td>\n<td colspan="4" class=\'recaptcha_image_cell\'><div id="recaptcha_image"></div></td>\n<td class=\'recaptcha_r2_c2\'></td>\n</tr>\n<tr>\n<td rowspan="6" class=\'recaptcha_r3_c1\'></td>\n<td colspan="4" class=\'recaptcha_r3_c2\'></td>\n<td rowspan="6" class=\'recaptcha_r3_c3\'></td>\n</tr>\n<tr>\n<td rowspan="3" class=\'recaptcha_r4_c1\' height="49">\n<div class="recaptcha_input_area">\n<label for="recaptcha_response_field" class="recaptcha_input_area_text"><span id="recaptcha_instructions_image" class="recaptcha_only_if_image recaptcha_only_if_no_incorrect_sol"></span><span id="recaptcha_instructions_audio" class="recaptcha_only_if_no_incorrect_sol recaptcha_only_if_audio"></span><span id="recaptcha_instructions_error" class="recaptcha_only_if_incorrect_sol"></span></label><br/>\n<input name="recaptcha_response_field" id="recaptcha_response_field" type="text" />\n</div>\n</td>\n<td rowspan="4" class=\'recaptcha_r4_c2\'></td>\n<td><a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="17" /></a></td>\n<td rowspan="4" class=\'recaptcha_r4_c4\'></td>\n</tr>\n<tr>\n<td>
141<a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="16" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="16" alt=""/></a></td>\n</tr>\n<tr>\n<td><a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a></td>\n</tr>\n<tr>\n<td class=\'recaptcha_r7_c1\'></td>\n<td class=\'recaptcha_r8_c1\'></td>\n</tr>\n</table>\n',VertCss:'.recaptchatable td img {\n/* see http://developer.mozilla.org/en/docs/Images%2C_Tables%2C_and_Mysterious_Gaps */\ndisplay: block;\n}\n.recaptchatable .recaptcha_r1_c1 { background: url(IMGROOT/sprite.png) -0px -63px no-repeat; width: 318px; height: 9px; }\n.recaptchatable .recaptcha_r2_c1 { background: url(IMGROOT/sprite.png) -18px -0px no-repeat; width: 9px; height: 57px; }\n.recaptchatable .recaptcha_r2_c2 { background: url(IMGROOT/sprite.png) -27px -0px no-repeat; width: 9px; height: 57px; }\n.recaptchatable .recaptcha_r3_c1 { background: url(IMGROOT/sprite.png) -0px -0px no-repeat; width: 9px; height: 63px; }\n.recaptchatable .recaptcha_r3_c2 { background: url(IMGROOT/sprite.png) -18px -57px no-repeat; width: 300px; height: 6px; }\n.recaptchatable .recaptcha_r3_c3 { background: url(IMGROOT/sprite.png) -9px -0px no-repeat; width: 9px; height: 63px; }\n.recaptchatable .recaptcha_r4_c1 { background: url(IMGROOT/sprite.png) -43px -0px no-repeat; width: 171px; height: 49px; }\n.recaptchatable .recaptcha_r4_c2 { background: url(IMGROOT/sprite.png) -36px -0px no-repeat; width: 7px; height: 57px; }\n.recaptchatable .recaptcha_r4_c4 { background: url(IMGROOT/sprite.png) -214px -0px no-repeat; width: 97px; height: 57px; }\n.recaptchatable .recaptcha_r7_c1 { background: url(IMGROOT/sprite.png) -43px -49px no-repeat; width: 171px; height: 8px; }\n.recaptchatable .recaptcha_r8_c1 { background: url(IMGROOT/sprite.png) -43px -49px no-repeat; width: 25px; height: 8px; }\n.recaptchatable .recaptcha_image_cell center img { height:57px;}\n.recaptchatable .recaptcha_image_cell center { height:57px;}\n.recaptchatable .recaptcha_image_cell {\nbackground-color:white; height:57px;\n}\n/* some people break their style sheet, we need to clean up after them */\n#recaptcha_area, #recaptcha_table {\nwidth: 318px !important;\n}\n.recaptchatable, #recaptcha_area tr, #recaptcha_area td, #recaptcha_area th {\nmargin:0px !important;\nborder:0px !important;\npadding:0px !important;\nborder-collapse: collapse !important;\nvertical-align: middle !important;\n}\n.recaptchatable * {\nmargin:0px;\npadding:0px;\nborder:0px;\nfont-family:helvetica,sans-serif;\nfont-size:8pt;\ncolor:black;\nposition:static;\ntop:auto;\nleft:auto;\nright:auto;\nbottom:auto;\ntext-align:left !important;\n}\n.recaptchatable #recaptcha_image {\nmargin:auto;\n}\n.recaptchatable img {\nborder:0px !important;\nmargin:0px !important;\npadding:0px !important;\n}\n.recaptchatable a, .recaptchatable a:hover {\n-moz-outline:none;\nborder:0px !important;\npadding:0px !important;\ntext-decoration:none;\ncolor:blue;\nbackground:none !important;\nfont-weight: normal;\n}\n.recaptcha_input_area {\nposition:relative !important;\nwidth:146px !important;\nheight:45px !important;\nmargin-left:20px !important;\nmargin-right:5px !important;\nmargin-top:4px !important;\nbackground:none !important;\n}\n.recaptchatable label.recaptcha_input_area_text {\nmargin:0px !important;  \npadding:0px !important;\nposition:static !important;\ntop:auto !important;\nleft:auto !important;\nright:auto !important;\nbottom:auto !important;\nbackground:none !important;\nheight:auto !important;\nwidth:auto !important;\n}\n.recaptcha_theme_red label.recaptcha_input_area_text,\n.recaptcha_theme_white label.recaptcha_input_area_text {\ncolor:black !important;\n}\n.recaptcha_theme_blackglass label.recaptcha_input_area_text {\ncolor:white !important;\n}\n.recaptchatable #recaptcha_response_field  {\nwidth:145px !important;\nposition:absolute !important;\nbottom:7px !important;\npadding:0px !important;\nmargin:0px !important;\nfont-size:10pt;\n}\n.recaptcha_theme_blackglass #recaptcha_response_field,\n.recaptcha_theme_white #re
141captcha_response_field {\nborder: 1px solid gray;\n}\n.recaptcha_theme_red #recaptcha_response_field {\nborder:1px solid #cca940;\n}\n.recaptcha_audio_cant_hear_link {\nfont-size:7pt;\ncolor:black;\n}\n.recaptchatable {\nline-height:1em;\n}\n#recaptcha_instructions_error {\ncolor:red !important;\n}\n',CleanHtml:'<table id="recaptcha_table" class="recaptchatable">\n<tr height="73">\n<td class=\'recaptcha_image_cell\' width="302"><center><div id="recaptcha_image"></div></center></td>\n<td style="padding: 10px 7px 7px 7px;">\n<a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="18" alt="" /></a>\n<a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="15" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="15" alt=""/></a>\n<a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a>\n</td>\n<td style="padding: 18px 7px 18px 7px;">\n<img id=\'recaptcha_logo\' alt="" width="71" height="36" />\n</td>\n</tr>\n<tr>\n<td style="padding-left: 7px;">\n<div class="recaptcha_input_area" style="padding-top: 2px; padding-bottom: 7px;">\n<input style="border: 1px solid #3c3c3c; width: 302px;" name="recaptcha_response_field" id="recaptcha_response_field" type="text" />\n</div>\n</td>\n<td></td>\n<td style="padding: 4px 7px 12px 7px;">\n<img id="recaptcha_tagline" width="71" height="17" />\n</td>\n</tr>\n</table>\n',CleanCss : '.recaptchatable td img {\ndisplay: block;\n}\n.recaptchatable .recaptcha_image_cell center img { height:57px;}\n.recaptchatable .recaptcha_image_cell center { height:57px;}\n.recaptchatable .recaptcha_image_cell {\nbackground-color:white; height:57px; \npadding: 7px !important;\n}\n.recaptchatable, #recaptcha_area tr, #recaptcha_area td, #recaptcha_area th {\nmargin:0px !important;\nborder:0px !important;\nborder-collapse: collapse !important;\nvertical-align: middle !important;\n}\n.recaptchatable * {\nmargin:0px;\npadding:0px;\nborder:0px;\ncolor:black;\nposition:static;\ntop:auto;\nleft:auto;\nright:auto;\nbottom:auto;\ntext-align:left !important;\n}\n.recaptchatable #recaptcha_image {\nmargin:auto;\nborder: 1px solid #dfdfdf !important;\n}\n.recaptchatable a img {\nborder:0px;\n}\n.recaptchatable a, .recaptchatable a:hover {\n-moz-outline:none;\nborder:0px !important;\npadding:0px !important;\ntext-decoration:none;\ncolor:blue;\nbackground:none !important;\nfont-weight: normal;\n}\n.recaptcha_input_area {\nposition:relative !important;\nbackground:none !important;\n}\n.recaptchatable label.recaptcha_input_area_text {\nborder:1px solid #dfdfdf !important;\nmargin:0px !important;  \npadding:0px !important;\nposition:static !important;\ntop:auto !important;\nleft:auto !important;\nright:auto !important;\nbottom:auto !important;\n}\n.recaptcha_theme_red label.recaptcha_input_area_text,\n.recaptcha_theme_white label.recaptcha_input_area_text {\ncolor:black !important;\n}\n.recaptcha_theme_blackglass label.recaptcha_input_area_text {\ncolor:white !important;\n}\n.recaptchatable #recaptcha_response_field  {\nfont-size:11pt;\n}\n.recaptcha_theme_blackglass #recaptcha_response_field,\n.recaptcha_theme_white #recaptcha_response_field {\nborder: 1px solid gray;\n}\n.recaptcha_theme_red #recaptcha_response_field {\nborder:1px solid #cca940;\n}\n.recaptcha_audio_cant_hear_link {\nfont-size:7pt;\ncolor:black;\n}\n.recaptchatable {\nline-height:1em;\nborder: 1px solid #dfdfdf !important;\n}\n.recaptcha_error_text {\ncolor:red;\n}\n'};
142var RecaptchaStr_en = {
143visual_challenge : "Get a visual challenge",
144audio_challenge : "Get an audio challenge",
145refresh_btn : "Get a new challenge",
146instructions_visual : "Type the two words:",
147instructions_audio : "Type what you hear:",
148help_btn : "Help",
149play_again : "Play sound again",
150cant_hear_this : "Download sound as MP3",
151incorrect_try_again : "Incorrect. Try again."
152};
153var RecaptchaStr_de = {
154visual_challenge : "Visuelle Aufgabe generieren",
155audio_challenge : "Audio-Aufgabe generieren",
156refresh_btn : "Neue Aufgabe generieren",
157instructions_visual : "Gib die 2 W\u00f6rter ein:",
158instructions_audio : "Gib die 8 Ziffern ein:",
159help_btn : "Hilfe",
160incorrect_try_again: "Falsch. Nochmals versuchen!"
161};
162var RecaptchaStr_es = {
163visual_challenge : "Obt\u00e9n un reto visual",
164audio_challenge : "Obt\u00e9n un reto audible",
165refresh_btn : "Obt\u00e9n un nuevo reto",
166instructions_visual : "Escribe las 2 palabras:",
167instructions_audio : "Escribe los 8 n\u00fameros:",
168help_btn : "Ayuda",
169incorrect_try_again: "Incorrecto. Otro intento."
170};
171var RecaptchaStr_fr = {
172visual_challenge : "D\u00e9fi visuel",
173audio_challenge : "D\u00e9fi audio",
174refresh_btn : "Nouveau d\u00e9fi",
175instructions_visual : "Entrez les deux mots:",
176instructions_audio : "Entrez les huit chiffres:",
177help_btn : "Aide",
178incorrect_try_again: "Incorrect."
179};
180var RecaptchaStr_nl = {
181visual_challenge : "Test me via een afbeelding",
182audio_challenge : "Test me via een geluidsfragment",
183refresh_btn : "Nieuwe uitdaging",
184instructions_visual : "Type de twee woorden:",
185instructions_audio : "Type de acht cijfers:",
186help_btn : "Help",
187incorrect_try_again: "Foute invoer."
188};
189var RecaptchaStr_pt = {
190visual_challenge : "Obter um desafio visual",
191audio_challenge : "Obter um desafio sonoro",
192refresh_btn : "Obter um novo desafio",
193instructions_visual : "Escreva as 2 palavras:",
194instructions_audio : "Escreva os 8 numeros:",
195help_btn : "Ajuda",
196incorrect_try_again: "Incorrecto. Tenta outra vez."
197};
198var RecaptchaStr_ru = {
199visual_challenge : "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",
200audio_challenge : "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u0432\u0443\u043a\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",
201refresh_btn : "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",
202instructions_visual : "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430:",
203instructions_audio : "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u043e\u0441\u0435\u043c\u044c \u0447\u0438\u0441\u0435\u043b:",
204help_btn : "\u041f\u043e\u043c\u043e\u0449\u044c",
205incorrect_try_again: "\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e."
206};
207var RecaptchaStr_tr = {
208visual_challenge : "G\u00f6rsel deneme",
209audio_challenge : "\u0130\u015Fitsel deneme",
210refresh_btn : "Yeni deneme",
211instructions_visual : "\u0130ki kelimeyi yaz\u0131n:",
212instructions_audio : "Sekiz numaray\u0131 yaz\u0131n:",
213help_btn : "Yard\u0131m (\u0130ngilizce)",
214incorrect_try_again: "Yanl\u0131\u015f. Bir daha deneyin."
215};
216var RecaptchaLangMap = {
217en: RecaptchaStr_en,
218de: RecaptchaStr_de,
219es: RecaptchaStr_es,
220fr: RecaptchaStr_fr,
221nl: RecaptchaStr_nl,
222pt: RecaptchaStr_pt,
223ru: RecaptchaStr_ru,
224tr: RecaptchaStr_tr
225};
226var RecaptchaStr = RecaptchaStr_en;
227var RecaptchaOptions;
228var RecaptchaDefaultOptions = {
229tabindex: 0,
230theme: 'red',
231callback: null,
232lang: 'en',
233custom_theme_widget : null,
234custom_translations : null
235};
236var Recaptcha = {
237widget: null,
238timer_id: -1,
239style_set: false,
240theme: null,
241type: 'image',
242ajax_verify_cb : null,
243$: function(id) {
244if (typeof(id) == "string") {
245return document.getElementById(id);
246}
247else {
248return id;
249}
250},
251create: function(public_key, element, options) {
252Recaptcha.destroy();
253if (element) {
254Recaptcha.widget = Recaptcha.$(element);
255}
256Recaptcha._init_options(options);
257Recaptcha._call_challenge(public_key);
258},
259destroy: function() {
260var challengefield = Recaptcha.$('recaptcha_challenge_field');
261if (challengefield) {
262challengefield.parentNode.removeChild(challengefield);
263}
264if (Recaptcha.timer_id != -1) {
265clearInterval(Recaptcha.timer_id);
266}
267Recaptcha.timer_id = -1;
268var imagearea = Recaptcha.$('recaptcha_image');
269if (imagearea) {
270imagearea.innerHTML = "";
271}
272// don't clear the area if it's custom, the caller might want to
273// reuse the dom elements.
274if (Recaptcha.widget) {
275if (Recaptcha.theme != "custom") {
276Recaptcha.widget.innerHTML = "";
277} else {
278Recaptcha.widget.style.display = "none";
279}
280Recaptcha.widget = null;
281}
282},
283focus_response_field: function() {
284var $ = Recaptcha.$;
285var field = $('recaptcha_response_field');
286field.focus();
287},
288get_challenge: function() {
289if (typeof(RecaptchaState) == "undefined") {
290return null;
291}
292return RecaptchaState.challenge;
293},
294get_response: function() {
295var $ = Recaptcha.$;
296var field = $('recaptcha_response_field');
297if (!field) {
298return null;
299}
300return field.value;
301},
302ajax_verify: function(callback) {
303Recaptcha.ajax_verify_cb = callback;
304var scriptURL = Recaptcha._get_api_server() + "/ajaxverify" +
305"?c=" + encodeURIComponent(Recaptcha.get_challenge()) +
306"&response=" + encodeURIComponent(Recaptcha.get_response());
307Recaptcha._add_script(scriptURL);
308},
309_ajax_verify_callback : function(data) {
310Recaptcha.ajax_verify_cb(data);
311},
312_get_api_server : function() {
313var protocol = window.location.protocol;
314var server;
315if (typeof(_RecaptchaOverrideApiServer) != "undefined") {
316server = _RecaptchaOverrideApiServer;
317} else if (protocol == 'https:') {
318server = "api-secure.recaptcha.net";
319} else {
320server = "api.recaptcha.net";
321}
322return protocol + "//" + server;
323},
324_call_challenge: function(public_key) {
325var scriptURL = Recaptcha._get_api_server() + "/challenge?k=" + public_key + "&ajax=1&cachestop=" + Math.random();
326if (typeof(RecaptchaOptions.extra_challenge_params) != "undefined") {
327scriptURL += "&" + RecaptchaOptions.extra_challenge_params;
328}
329Recaptcha._add_script(scriptURL);
330},
331_add_script: function(scriptURL) {
332var scriptTag = document.createElement("script");
333scriptTag.type = "text/javascript";
334scriptTag.src = scriptURL;
335Recaptcha._get_script_area().appendChild(scriptTag);
336},
337_get_script_area: function() {
338var parentElement = document.getElementsByTagName("head");
339if (!parentElement || parentElement.length < 1) {
340parentElement = document.body;
341}
342else {
343parentElement = parentElement[0];
344}
345return parentElement;
346},
347_hash_merge : function(hashes) {
348var r = {};
349for (var h in hashes) {
350for (var k in hashes[h]) {
351r[k] = hashes[h][k]
352}
353}
354return r;
355},
356_init_options: function(opts) {
357RecaptchaOptions = Recaptcha._hash_merge([RecaptchaDefaultOptions, opts || {}]);
358},
359challenge_callback: function() {
360var element = Recaptcha.widget;
361Recaptcha._reset_timer ();
362RecaptchaStr = Recaptcha._hash_merge([
363RecaptchaStr_en,
364RecaptchaLangMap[RecaptchaOptions.lang] || {},
365RecaptchaOptions.custom_translations || {}]);
366/* Try to avoid back/forward cache problems */
367// firefox
368if (window.addEventListener) {
369window.addEventListener('unload', function(e){ Recaptcha.destroy(); }, false );
370}
371// IE
372if (Recaptcha._is_ie() && window.attachEvent) {
373window.attachEvent('onbeforeunload', function () {
374// I think this may be causing some errors -- it seems
375// that sometimes IE isn't submitting the form fully
376// This may be breaking the back button functionality
377// :-(
378//Recaptcha.destroy();
379});
380}
381// safari
382if (navigator.userAgent.indexOf("KHTML") > 0) {
383var iframe = document.createElement('iframe');
384iframe.src = "about:blank";
385iframe.style.height = "0px";
386iframe.style.width = "0px";
387iframe.style.visibility = "hidden";
388iframe.style.border = "none";
389var textNode = document.createTextNode("This frame prevents back/forward cache problems in Safari.");
390iframe.appendChild(textNode);
391document.body.appendChild(iframe);
392}
393Recaptcha._finish_widget();
394},
395_add_css : function(css) {
396var styleTag = document.createElement("style");
397styleTag.type = "text/css";
398if (styleTag.styleSheet) { // IE only
399if (navigator.appVersion.indexOf("MSIE 5") != -1) { // IE 5 crashes if we add a style tag to the DOM
400document.write("<style type='text/css'>" + css + "</style>");
401}
402else {
403styleTag.styleSheet.cssText = css;
404}
405} else if (navigator.appVersion.indexOf("MSIE 5") != -1) {
406document.write("<style type='text/css'>" + css + "</style>");
407}
408else {
409var textNode = document.createTextNode(css);
410styleTag.appendChild(textNode);
411}
412Recaptcha._get_script_area().appendChild(styleTag);
413},
414_set_style: function(css) {
415// We only allow the style to be set once, because IE behaves
416// poorly otherwise.  Same goes for Recaptcha.theme.
417if (Recaptcha.style_set) {
418return;
419}
420Recaptcha.style_set = true;
421Recaptcha._add_css(css + "\n\n" +
422".recaptcha_is_showing_audio .recaptcha_only_if_image," +
423".recaptcha_isnot_showing_audio .recaptcha_only_if_audio," +
424".recaptcha_had_incorrect_sol .recaptcha_only_if_no_incorrect_sol," +
425".recaptcha_nothad_incorrect_sol .recaptcha_only_if_incorrect_sol" +
426"{display:none !important}");
427},
428_init_builtin_theme : function() {
429var $ = Recaptcha.$;
430var $_ = RecaptchaStr;
431var $ST = RecaptchaState;
432var css, html, imgfmt;
433var server_no_slash = $ST.server;
434if (server_no_slash[server_no_slash.length - 1] == "/")
435server_no_slash = server_no_slash.substring (0, server_no_slash.length - 1);
436var IMGROOT = server_no_slash + "/img/" + Recaptcha.theme;
437if (Recaptcha.theme == 'clean') {
438css = RecaptchaTemplates.CleanCss;
439html = RecaptchaTemplates.CleanHtml;
440imgfmt = 'png';
441}
442else {
443css = RecaptchaTemplates.VertCss;
444html = RecaptchaTemplates.VertHtml;
445imgfmt = 'gif';
446}
447css = css.replace (/IMGROOT/g, IMGROOT);
448Recaptcha._set_style(css);
449Recaptcha.widget.innerHTML = "<div id='recaptcha_area'>" + html + "</div>";
450$('recaptcha_reload').src = IMGROOT + "/refresh." + imgfmt;
451$('recaptcha_switch_audio').src = IMGROOT + "/audio." + imgfmt;
452$('recaptcha_switch_img').src = IMGROOT + "/text." + imgfmt;
453$('recaptcha_whatsthis').src = IMGROOT + "/help." + imgfmt;
454if (Recaptcha.theme == 'clean') {
455$('recaptcha_logo').src = IMGROOT + "/logo." + imgfmt;
456$('recaptcha_tagline').src = IMGROOT + "/tagline." + imgfmt;
457}
458$('recaptcha_reload').alt = $_.refresh_btn;
459$('recaptcha_switch_audio').alt = $_.audio_challenge;
460$('recaptcha_switch_img').alt = $_.visual_challenge;
461$('recaptcha_whatsthis').alt = $_.help_btn;
462$('recaptcha_reload_btn').href = "javascript:Recaptcha.reload ();";
463$('recaptcha_reload_btn').title = $_.refresh_btn;
464$('recaptcha_switch_audio_btn').href = "javascript:Recaptcha.switch_type('audio');";
465$('recaptcha_switch_audio_btn').title = $_.audio_challenge;
466$('recaptcha_switch_img_btn').href = "javascript:Recaptcha.switch_type('image');";
467$('recaptcha_switch_img_btn').title = $_.visual_challenge;
468$('recaptcha_whatsthis_btn').href = Recaptcha._get_help_link();
469$('recaptcha_whatsthis_btn').target = "_blank";
470$('recaptcha_whatsthis_btn').title = $_.help_btn;
471$('recaptcha_whatsthis_btn').onclick = function () {
472Recaptcha.showhelp();
473return false;
474};
475$('recaptcha_table').className = "recaptchatable " + "recaptcha_theme_" + Recaptcha.theme;
476if ($("recaptcha_instructions_image")) {
477$("recaptcha_instructions_image").appendChild(document.createTextNode($_.instructions_visual));
478}
479if ($("recaptcha_instructions_audio")) {
480$("recaptcha_instructions_audio").appendChild(document.createTextNode($_.instructions_audio));
481}
482if ($("recaptcha_instructions_error")) {
483$("recaptcha_instructions_error").appendChild(document.createTextNode($_.incorrect_try_again));
484}
485},
486_finish_widget: function() {
487var $ = Recaptcha.$;
488var $_ = RecaptchaStr;
489var $ST = RecaptchaState;
490var $OPT = RecaptchaOptions;
491var theme = $OPT.theme;
492switch (theme) {
493case 'red': case 'white': case 'blackglass': case 'clean': case 'custom':
494break;
495default:
496theme = 'red';
497break;
498}
499if (!Recaptcha.theme) {
500Recaptcha.theme = theme;
501}
502if (Recaptcha.theme != "custom") {
503Recaptcha._init_builtin_theme();
504} else {
505// get the rules for audio/visual error/no error
506Recaptcha._set_style("");
507}
508var challengeFieldHolder = document.createElement("span");
509challengeFieldHolder.id = "recaptcha_challenge_field_holder";
510challengeFieldHolder.style.display = "none";
511$('recaptcha_response_field').parentNode.insertBefore(challengeFieldHolder, $('recaptcha_response_field'));
512$('recaptcha_response_field').setAttribute("autocomplete", "off");
513$('recaptcha_image').style.width = '300px';
514$('recaptcha_image').style.height = '57px';
515Recaptcha.should_focus = false;
516Recaptcha._set_challenge($ST.challenge, 'image');
517if ($OPT.tabindex) {
518$('recaptcha_response_field').tabIndex = $OPT.tabindex;
519if (Recaptcha.theme != "custom") {
520$('recaptcha_whatsthis_btn').tabIndex = $OPT.tabindex;
521$('recaptcha_switch_img_btn').tabIndex = $OPT.tabindex;
522$('recaptcha_switch_audio_btn').tabIndex = $OPT.tabindex;
523$('recaptcha_reload_btn').tabIndex = $OPT.tabindex;
524}
525}
526if (Recaptcha.widget) {
527Recaptcha.widget.style.display = '';
528}
529if ($OPT.callback) {
530$OPT.callback();
531}
532},
533switch_type : function (new_type) {
534var $C = Recaptcha;
535$C.type = new_type;
536$C.reload ($C.type == 'audio' ? 'a' : 'v');
537},
538reload: function (reason) {
539var $C = Recaptcha;
540var $ = $C.$;
541var $ST = RecaptchaState;
542if (typeof(reason) == "undefined")
543reason = 'r';
544var scriptURL = $ST.server + "reload?c=" + $ST.challenge + "&k=" + $ST.site + "&reason=" + reason + "&type=" + $C.type + "&lang=" + RecaptchaOptions.lang;
545if (typeof(RecaptchaOptions.extra_challenge_params) != "undefined") {
546scriptURL += "&" + RecaptchaOptions.extra_challenge_params;
547}
548if ($C.type == 'audio') {
549if (RecaptchaOptions.audio_beta_12_08) {
550scriptURL += "&audio_beta_12_08=1";
551} else {
552scriptURL += "&new_audio_default=1";
553}
554}
555$C.should_focus = reason != 't';
556$C._add_script(scriptURL);
557},
558finish_reload: function(new_challenge, type) {
559RecaptchaState.is_incorrect = false;
560Recaptcha._set_challenge(new_challenge, type);
561},
562_set_challenge: function (new_challenge, type)
563{
564var $C = Recaptcha;
565var $ST = RecaptchaState;
566var $ = $C.$;
567$ST.challenge = new_challenge;
568// this should really be the case already...
569$C.type = type;
570// using innerHTML prevents back/forward from caching this
571$('recaptcha_challenge_field_holder').innerHTML = "<input type='hidden' name='recaptcha_challenge_field' id='recaptcha_challenge_field' value='" + $ST.challenge + "'/>";
572if (type == 'audio') {
573$("recaptcha_image").innerHTML = Recaptcha.getAudioCaptchaHtml();
574} else if (type == 'image') {
575var imageurl = $ST.server + 'image?c=' + $ST.challenge;
576// display:block due to http://developer.mozilla.org/en/docs/Images%2C_Tables%2C_and_Mysterious_Gap
577// use innerHTML to avoid triggering a firefox dom preference
578$('recaptcha_image').innerHTML = "<img style='display:block;' height='57' width='300' src='" + imageurl + "'/>";
579}
580Recaptcha._css_toggle("recaptcha_had_incorrect_sol", "recaptcha_nothad_incorrect_sol", $ST.is_incorrect);
581Recaptcha._css_toggle("recaptcha_is_showing_audio", "recaptcha_isnot_showing_audio", type == 'audio');
582$C._clear_input ();
583if ($C.should_focus) {
584$C.focus_response_field();
585}
586$C._reset_timer ();
587},
588_reset_timer : function () {
589var $ST = RecaptchaState;
590clearInterval(Recaptcha.timer_id);
591Recaptcha.timer_id = setInterval ("Recaptcha.reload('t');", ($ST.timeout - 60*5) * 1000);
592},
593showhelp : function () {
594window.open(Recaptcha._get_help_link(),"recaptcha_popup","width=460,height=570,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes");
595},
596_clear_input : function () {
597var resp=Recaptcha.$('recaptcha_response_field');
598resp.value = "";
599},
600_displayerror : function(msg) {
601var $=Recaptcha.$;
602$('recaptcha_image').innerHTML = '';
603$('recaptcha_image').appendChild (document.createTextNode(msg));
604},
605reloaderror : function (msg) {
606Recaptcha._displayerror(msg);
607},
608_is_ie : function () { return (navigator.userAgent.indexOf("MSIE") > 0) && !window.opera; },
609_css_toggle : function (classT, classF, isset) {
610// try to do these CSS toggles just on the recaptcha widget. But,
611// if that wasn't passed in, go for the document body.
612var element = Recaptcha.widget;
613if (!element)
614element = document.body;
615var classname = element.className;
616classname = classname.replace(
617new RegExp("(^|\\s+)"+ classT + "(\\s+|$)"), ' ');
618classname = classname.replace(
619new RegExp("(^|\\s+)"+ classF + "(\\s+|$)"), ' ');
620classname += " " + (isset ? classT : classF);
621element.className = classname;
622},
623_get_help_link : function () {
624var lang = RecaptchaOptions.lang;
625return 'http://recaptcha.net/popuphelp/' + (lang == 'en' ? "" : (lang + ".html"));
626},
627playAgain : function () {
628var $ = Recaptcha.$;
629$("recaptcha_image").innerHTML = Recaptcha.getAudioCaptchaHtml();
630},
631getAudioCaptchaHtml : function () {
632var $C = Recaptcha;
633var $ST = RecaptchaState;
634var $ = Recaptcha.$;
635var httpwavurl = $ST.server + "image?c=" + $ST.challenge;
636if (httpwavurl.indexOf("https://") == 0) {
637httpwavurl = "http://" + httpwavurl.substring(8);
638}
639var swfUrl = $ST.server + "/img/audiocaptcha.swf?v2";
640var embedCode;
641if ($C._is_ie()) {
642embedCode = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="audiocaptcha" width="0" height="0" codebase="https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="' + swfUrl + '" /><param name="quality" value="high" /><param name="bgcolor" value="#869ca7" /><param name="allowScriptAccess" value="always" /></object><br/>';
643} else {
644embedCode = '<embed src="' + swfUrl + '" quality="high" bgcolor="#869ca7" width="0" height="0" name="audiocaptcha" align="middle" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed> ';
645}
646var cantHearCode = (Recaptcha.checkFlashVer() ? '<br/><a class="recaptcha_audio_cant_hear_link" href="#" onclick="Recaptcha.playAgain(); return false;">' + RecaptchaStr.play_again + '</a>' : '') +
647'<br/><a class="recaptcha_audio_cant_hear_link" target="_blank" href="' + httpwavurl + '">' + RecaptchaStr.cant_hear_this + '</a>';
648return embedCode + cantHearCode;
649},
650gethttpwavurl : function () {
651var $ST = RecaptchaState;
652if (Recaptcha.type == 'audio') {
653var httpwavurl = $ST.server + "image?c=" + $ST.challenge;
654if (httpwavurl.indexOf("https://") == 0) {
655httpwavurl = "http://" + httpwavurl.substring(8);
656}
657return httpwavurl;
658}
659return "";
660},
661checkFlashVer : function () {
662var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
663var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
664var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
665var flashVer = -1;
666if (navigator.plugins != null && navigator.plugins.length > 0) {
667if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
668var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
669var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
670var descArray = flashDescription.split(" ");
671var tempArrayMajor = descArray[2].split(".");
672flashVer = tempArrayMajor[0];
673}
674} else if ( isIE && isWin && !isOpera ) {
675try {
676// version will be set for 7.X or greater players
677var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
678var flashVerStr = axo.GetVariable("$version");
679flashVer = flashVerStr.split(" ")[1].split(",")[0];
680} catch (e) {
681}
682}
683return flashVer >= 9;
684},
685getlang : function() {
686return RecaptchaOptions.lang;
687}
688};
689
690
691/* - kss-bbb.js - */
692// https://www.unibo.it/portal_javascripts/kss-bbb.js?original=1
693(function($){$(function(){if(typeof($('body').attr('data-portal-url'))!=='undefined'&&typeof($('body').attr('data-base-url'))!=='undefined'){return}
694$('body').attr('data-portal-url',portal_url);$('body').attr('data-base-url',base_url)});
695function refreshPortlet(hash,_options){var options={data:{},success: function(){},error: function(){},ajaxOptions:{}};$.extend(options,_options);options.data.portlethash=hash;ajaxOptions=options.ajaxOptions;ajaxOptions.url=$('body').attr('data-base-url')+'/@@render-portlet';ajaxOptions.success=function(data){var container=$('[data-portlethash="'+hash+'"]');var portlet=$(data);container.html(portlet);options.success(data,portlet)}
696ajaxOptions.error=function(){options.error()}
697ajaxOptions.data=options.data;$.ajax(ajaxOptions)}
698function applyPortletTimeout(portlet){var timeout=portlet.data('timeout');if(timeout==undefined){timeout=30}else{timeout=parseInt(timeout)}
699timeout=timeout * 1000;setTimeout($.proxy(function(){refreshPortlet(this.parents('.portletWrapper').data('portlethash'),{success: function(data,portlet){apply_timeout(portlet)}})},portlet),timeout)}
700$(document).ready(function(){var spinner=$('<div id="ajax-spinner"><img src="'+portal_url+'/spinner.gif" alt=""/></div>');spinner.appendTo('body').hide();$(document).ajaxStart(function(){spinner.show()});$(document).ajaxStop(function(){spinner.hide()});$('body').delegate('#calendar-next,#calendar-previous','click', function(e){e.preventDefault();var el=$(this);var container=el.parents('.portletWrapper');refreshPortlet(container.data('portlethash'),{data:{month:el.data('month'),year:el.data('year')}});return false});$('.kssPortletRefresh,.refreshPortlet').each(function(){applyPortletTimeout($(this))});$('.portlet-deferred').each(function(){refreshPortlet($(this).parents('.portletWrapper').data('portlethash'))});
701function updateSharing(data){var sharing=data.body;var messages=$(data.messages).filter(function(){return this.tagName=='DL'});$('.portalMessage').remove();$('#user-group-sharing').replaceWith(sharing);$('#content').prepend(messages)}
702var search_timeout=null;$('#content-core').delegate('#sharing-user-group-search','input', function(){var text=$(this);if(search_timeout!=null){clearTimeout(search_timeout)}
703if(text.val().length>3){search_timeout=setTimeout($.proxy(function(){$('#sharing-search-button').trigger('click')},text),300)}});$('#content-core').delegate('#sharing-search-button','click', function(){$.ajax({url:$('body').attr('data-base-url')+'/@@updateSharingInfo',data:{search_term:$('#sharing-user-group-search').val(),'form.button.Search':'Search'},type:'GET',dataType:'json',success:updateSharing});return false});$('#content-core').delegate('#sharing-save-button','click', function(){var btn=$(this);var form=btn.parents('form');var data=form.serializeArray();data.push({name:'form.button.Save',value:'Save'});$.ajax({url:$('body').attr('data-base-url')+'/@@updateSharingInfo',data:data,type:'POST',dataType:'json',success:updateSharing});return false})})})(jQuery);
704
705/* - ++resource++plone.app.event/event.js - */
706// https://www.unibo.it/portal_javascripts/++resource++plone.app.event/event.js?original=1
707if(typeof(plone)==='undefined'){var plone={}}(function($,plone){plone.paevent=plone.paevent||{};plone.paevent.end_start_delta=1;plone.paevent.start_date=function(){return a_or_b($('#formfield-form-widgets-IEventBasic-start'),$('#archetypes-fieldname-startDate'))};plone.paevent.end_date=function(){return a_or_b($('#formfield-form-widgets-IEventBasic-end'),$('#archetypes-fieldname-endDate'))};
708function initDelta(e){var start_datetime=getDateTime(plone.paevent.start_date());var end_datetime=getDateTime(plone.paevent.end_date());plone.paevent.end_start_delta=(end_datetime-start_datetime)/ 1000 / 3600;if(plone.paevent.end_start_delta<1){plone.paevent.end_start_delta=1}}
709function getDateTime(datetimewidget){var fields=['year','month','day','hour','minute'];var parts={};$.each(fields, function(idx,fld){parts[fld]=parseInt($("[name$='-"+fld+"']",datetimewidget).val(),10)});var date=new Date(parts.year,parts.month-1,parts.day,parts.hour,parts.minute);return date}
710function setDateTime(datetimewidget,new_date){$("[name$='-year']",datetimewidget).val(new_date.getYear());$("[name$='-month']",datetimewidget).val(new_date.getMonth());$("[name$='-day']",datetimewidget).val(new_date.getDate());$("[name$='-hour']",datetimewidget).val(new_date.getHours());$("[name$='-minute']",datetimewidget).val(new_date.getMinutes())}
711function updateEndDate(){var start_date=getDateTime(plone.paevent.start_date());var new_end_date=start_date;new_end_date.setHours(new_end_date.getHours()+plone.paevent.end_start_delta);setDateTime(plone.paevent.end_date(),new_end_date);$("input[name$='-calendar']",plone.paevent.end_date()).data('dateinput').setValue(new_end_date)}
712function validateEndDate(){var start_datetime=getDateTime(plone.paevent.start_date());var end_datetime=getDateTime(plone.paevent.end_date());if(end_datetime<start_datetime){plone.paevent.end_date().addClass("error")} else{plone.paevent.end_date().removeClass("error")}}
713function show_hide_widget(widget,hide,fade){if(hide===true){if(fade===true){widget.fadeOut()}
714else{widget.hide()}} else{if(fade===true){widget.fadeIn()}
715else{widget.show()}}}
716function a_or_b(a,b){var ret;if(a.length>0){ret=a} else{ret=b}
717return ret}
718function event_listing_calendar_init(cal){if($().dateinput&&cal.length>0){var get_req_param=function(name){if(name===(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)){return decodeURIComponent(name[1])}};var val=get_req_param('date');if(val===undefined){val=new Date()} else{val=new Date(val)}
719cal.dateinput({selectors:true,trigger:true,format:'yyyy-mm-dd',yearRange:[-10,10],firstDay:1,value:val,change: function(){var value=this.getValue("yyyy-mm-dd");window.location.href='event_listing?mode=day&date='+value}}).unbind('change').bind('onShow', function(event){var trigger_offset=$(this).next().offset();$(this).data('dateinput').getCalendar().offset({top:trigger_offset.top+20,left:trigger_offset.left})})}}
720$(function(){var jq_whole_day=a_or_b($('#formfield-form-widgets-IEventBasic-whole_day input'),$('form[name="edit_form"] input#wholeDay'));var jq_datetime=a_or_b($('#form-widgets-IEventBasic-start-timecomponents, #form-widgets-IEventBasic-end-timecomponents'),$('#archetypes-fieldname-startDate .datetimewidget-time, #archetypes-fieldname-endDate .datetimewidget-time'));if(jq_whole_day.length>0){jq_whole_day.bind('change', function(e){show_hide_widget(jq_datetime,e.target.checked,true)});show_hide_widget(jq_datetime,jq_whole_day.get(0).checked,false)}
721var jq_open_end=a_or_b($('#formfield-form-widgets-IEventBasic-open_end input'),$('form[name="edit_form"] input#openEnd'));var jq_end=plone.paevent.end_date();if(jq_open_end.length>0){jq_open_end.bind('change', function(e){show_hide_widget(jq_end,e.target.checked,true)});show_hide_widget(jq_end,jq_open_end.get(0).checked,false)}
722var jq_start=plone.paevent.start_date();$("select",jq_start).on("change",updateEndDate);$("input[name$='-calendar']",jq_start).on("onHide",updateEndDate);$("select",jq_end).on("change", function(){initDelta();validateEndDate()});$("input[name$='-calendar']",jq_end).on("onHide", function(){initDelta();validateEndDate()});event_listing_calendar_init($("#event_listing_calendar"))})}(jQuery,plone));
723
724/* - ++resource++plone.app.event.portlet_calendar.js - */
725// https://www.unibo.it/portal_javascripts/++resource++plone.app.event.portlet_calendar.js?original=1
726(function($){
727function load_portlet_calendar(event,elem){event.preventDefault();var pw=elem.closest('.portletWrapper');var elem_data=elem.data();var portlethash=pw.attr('id');portlethash=portlethash.substring(15,portlethash.length);url=portal_url+'/@@render-portlet?portlethash='+portlethash+'&year='+elem_data.year+'&month='+elem_data.month;$.ajax({url:url,success: function(data){pw.html(data);
727rebind_portlet_calendar()}})}
728function rebind_portlet_calendar(){$('.portletCalendar a.calendarNext').click(function(event){load_portlet_calendar(event,$(this))});$('.portletCalendar a.calendarPrevious').click(function(event){load_portlet_calendar(event,$(this))});$('.portletCalendar dd a[title]').tooltip({offset:[-10,0],tipClass:'pae_calendar_tooltip'})}
729$(document).ready(function(){rebind_portlet_calendar()})}(jQuery));
730
731/* - ++resource++unibo.portale.static/unibo.portale.js - */
732// https://www.unibo.it/portal_javascripts/++resource++unibo.portale.static/unibo.portale.js?original=1
733(function($){"use strict";if((typeof window.uniboportale)==='undefined'){window.uniboportale={}}
734var uniboportale=window.uniboportale;uniboportale.get_target=function(element,target){if(target.includes('#')){return $(target)}else{return element.parent().find($(target))}}
735uniboportale.openclose=function(button_selector,accordion){$("body").on("click",button_selector, function(event){event.preventDefault();var aria_exp=$(this).attr("aria-expanded");if(accordion){$(button_selector).each(function(){var target_el=uniboportale.get_target($(this),$(this).data("target"));$(this).attr("aria-expanded","false");target_el.attr("aria-hidden","true")})}
736var target_el=uniboportale.get_target($(this),$(this).data("target"));if(aria_exp=="true"){target_el.slideUp("slow", function(){$(this).removeAttr("style")});$(this).attr("aria-expanded","false");target_el.attr("aria-hidden","true")}else{target_el.slideDown('slow');$(this).attr("aria-expanded","true");target_el.attr("aria-hidden","false")}})}
737uniboportale.sezioniinternefilter=function(){var hash=$(location).attr('hash'),buttons=$(".filter-buttons button");if(hash&&hash.includes("select_")){var selected_id=hash.split("select_")[1],selected_button=$(".filter-buttons button[data-target='#"+selected_id+"']"),selected_panel=$('#'+selected_id);if(selected_button.length){selected_button.addClass("selected");$("div.filter-grid").hide();selected_panel.show()}}
738buttons.click(function(){var target=$(this).data("target");if($(this).hasClass("selected")){$(this).removeClass("selected");$(target).hide();if($(".filter-buttons button.selected").length==0){$("div.filter-grid").show()}}else{if($(".filter-buttons button.selected").length==0){$("div.filter-grid").hide()}
739$(this).addClass("selected");$(target).show()}})}
740uniboportale.initvideosingle=function(video,play,pause,video_preview,videoparent){var text=$(videoparent).next(".text-wrapper");play.click(function(e){e.preventDefault();video.get(0).play();$(this).addClass("hidden");pause.removeClass("hidden");if(video_preview.length){video_preview.addClass("hidden");video.addClass("visible")}
741if(text.length){text.hide()}})
742pause.click(function(e){e.preventDefault();video.get(0).pause();$(this).addClass("hidden");play.removeClass("hidden");if(video_preview.length){video_preview.addClass("hidden");video.addClass("visible")}
743if(text.length){text.show()}})}
744uniboportale.initvideomany=function(videoparent){$(videoparent).each(function(){var video=$(this).find("video.video-real"),play=$(this).find("button.play"),pause=$(this).find("button.pause"),video_preview=$(this).find("video.video-preview");uniboportale.initvideosingle(video,play,pause,video_preview,$(this))})}
745uniboportale.scrolloptions=function(){var scrollTrigger=300,backToTop=function(){var scrollTop=$(window).scrollTop();if(scrollTop>scrollTrigger){$('.back-to-top').addClass('show');$('.header').addClass('fixed')} else{$('.back-to-top').removeClass('show');$('.header').removeClass('fixed')}},isHeighterEnought=function(){var win=$(window);var viewport={top:win.scrollTop(),left:win.scrollLeft()};viewport.right=viewport.left+win.width();viewport.bottom=viewport.top+win.height();var bodyHeight=$(document).height();return((viewport.bottom+80)<bodyHeight)};$(window).on('scroll', function(){if(isHeighterEnought()){backToTop()}});$('.back-to-top').on('click', function(e){e.preventDefault();$('html,body').animate({scrollTop:0},700)})}
746uniboportale.scrolltoanchor=function(name){var aTag=$("a[name='"+name+"']");$('html,body').animate({scrollTop:aTag.offset().top},'slow')}
747uniboportale.initScrollbarWidthEvent=function(){const scrollbarEvent=ne
747w Event("scrollbar-width");let currentWidth=window.innerWidth-document.documentElement.clientWidth;const observer=new ResizeObserver(()=>{const newWidth=window.innerWidth-document.documentElement.clientWidth;if(newWidth!==currentWidth){scrollbarEvent.detail={previous:currentWidth,current:newWidth,};currentWidth=newWidth;window.dispatchEvent(scrollbarEvent)}});observer.observe(document.documentElement);return observer}
748uniboportale.updateCssVariable=function(width){document.documentElement.style.setProperty("--scrollbar-width",width+"px")};uniboportale.accessibilityTabs=function(){$('.tabs-container').each(function(){const KEYCODE={LEFT:37,RIGHT:39,TAB:9,};const toolbar=this;toolbar.addEventListener('keydown',onKeyDown);toolbar.addEventListener('click',onClick);
749function onKeyDown(event){switch(event.keyCode){case KEYCODE.TAB:if($("button.tab[aria-selected='true']").length==0){event.preventDefault();activate($("button.tab").first().get(0))}
750break;case KEYCODE.RIGHT:event.preventDefault();focusNextItem();break;case KEYCODE.LEFT:event.preventDefault();focusPreviousItem();break}}
751function onClick(event){if(event.target.tagName==='BUTTON'&&event.target.classList.contains('tab')){activate(event.target)}}
752function focusNextItem(){const item=document.activeElement;if(item.nextElementSibling){activate(item.nextElementSibling)}}
753function focusPreviousItem(){const item=document.activeElement;if(item.previousElementSibling){activate(item.previousElementSibling)}}
754function activate(item){$('button.tab').each(function(){$(this).attr('tabindex','-1');$(this).attr('aria-selected','false')})
755$('.default-tab-panel').each(function(){$(this).attr('aria-hidden','true')})
756item.tabIndex=0;item.setAttribute('aria-selected','true');item.focus();document.getElementById(item.attributes['aria-controls'].value).setAttribute('aria-hidden','false')}})}
757$(document).ready(function(){uniboportale.openclose('#main-menu .menu-button',true);uniboportale.openclose('.menu-button.mobile',false);if($("body.portaltype-listacorsi").length==0){if($("div.tooltip").length)
758uniboportale.openclose('div.tooltip button.button-popup',false)}
759if($("body.portaltype-sezioniinterne").length){uniboportale.openclose('.accordion-title',false);uniboportale.sezioniinternefilter()}
760if($(".video-wrapper").length){uniboportale.initvideomany(".video-wrapper")}
761if($("#video-hero").length){uniboportale.initvideosingle($("#video-hero"),$("#video-hero-controls button.play"),$("#video-hero-controls button.pause"))}
762if($(".scroll-down").length){$(".scroll-down a").click(function(){uniboportale.scrolltoanchor('scroll-down')})}
763$('.highlighted').inviewport({threshold:1,className:'letsmoveit'})
764if($("#form-widgets-copyright:visible").length>0){$(".site-it.template-add.portaltype-image #formfield-form-widgets-image .formHelp,.site-it.template-edit.portaltype-image #formfield-form-widgets-image .formHelp").text("È consigliato inserire immagini con altezza minima di 768 pixel.");$(".site-en.template-add.portaltype-image #formfield-form-widgets-image .formHelp,.site-en.template-edit.portaltype-image #formfield-form-widgets-image .formHelp").text("It is recommended to upload images with a minimum height of 768 pixels")}
765if($('.back-to-top').length){uniboportale.scrolloptions()}
766$('a[id^=plone-contentmenu-actions-edit-secondlevel]').prepOverlay({subtype:'ajax',formselector:'form[action="*@@edit-secondlevel"]',config:{onLoad: function(){if($.fn.AutomaticSummary){$(this.getOverlay).AutomaticSummary()}}}});$("body.portaltype-gallery").on("click","#gallery-info .info", function(evt){evt.preventDefault();$(this).toggleClass("is-closed");$(this).find("i.fa").toggleClass("fa-angle-up").toggleClass("fa-angle-down")});if($('#ambitidipartimenti').length){$(".button-popup").click(function(event){event.preventDefault();if($(this).attr("aria-expanded")=="true"){$(this).attr("aria-expanded","false");$(this).next(".popup-wrapper").attr("aria-hidden","true");$(this).next(".popup-wrapper").css("display","none")}else{$(this).attr("aria-expanded","true");$(this).next(".popup-wrapper").attr("aria-hidden","false");$(this).next(".popup-wrapper").css("display","block")}});$(".filter-container-popup .close-button").click(function(event){event.preventDefault();$(this).parents(".popup-wrapper").css("display","none").attr("aria-hidden","true");$(".filter-container-popup .button-popup").attr("aria-pressed","fal
766se").attr("aria-expanded","false")});$(".filter-container-popup .back-button").click(function(event){event.preventDefault();$(this).closest(".popup-wrapper").css("display","none").attr("aria-hidden","true").siblings(".button-popup").attr("aria-pressed","false").attr("aria-expanded","false")});$(".dropdown-list h2 button").click(function(event){event.preventDefault();if($(this).attr("aria-expanded")==="true"){$(this).attr("aria-expanded","false");$(this).parent().next(".items-container").attr("aria-hidden","true");$(this).parent().next(".items-container").css("display","none")}else{$(this).attr("aria-expanded","true");$(this).parent().next(".items-container").attr("aria-hidden","false");$(this).parent().next(".items-container").css("display","block")}});$(".card-list .button-popup").click(function(event){event.preventDefault();if($(this).attr("aria-expanded")=="true"){$(this).parent().addClass("is-opened")}else{$(this).parent().removeClass("is-opened")}})}
767uniboportale.initScrollbarWidthEvent();const initialWidth=window.innerWidth-document.documentElement.clientWidth;uniboportale.updateCssVariable(initialWidth);window.addEventListener("scrollbar-width",(e)=>{uniboportale.updateCssVariable(e.detail.current)});if($('.tabs-container').length){uniboportale.accessibilityTabs()}})})(jQuery);
768
769/* - ++resource++unibo.api.scripts/3rdparty/picturefill.min.js - */
770// https://www.unibo.it/portal_javascripts/++resource++unibo.api.scripts/3rdparty/picturefill.min.js?original=1
771!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||"	"===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();
vendor: 6,669 bytes, line 771
771if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")}
771,j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
772
773/* - ++resource++collective.oembed.js - */
774// https://www.unibo.it/portal_javascripts/++resource++collective.oembed.js?original=1
775(function($){$.fn.oembed=function(url,options,embedAction){settings=$.extend(true,$.fn.oembed.defaults,options);initializeProviders();var div=document.createElement('div'),ref=document.getElementsByTagName('base')[0]||document.getElementsByTagName('script')[0];div.className='fit-vids-style';div.innerHTML='&shy;<style>\.fluid-width-video-wrapper{\
776width:100%;\
777position:relative;\
778padding:0;\} \.fluid-width-video-wrapper iframe,\.fluid-width-video-wrapper object,\.fluid-width-video-wrapper embed{\
779position:absolute;\
780top:0;\
781left:0;\
782width:100%;\
783height:100%;\} \</style>';ref.parentNode.insertBefore(div,ref);return this.each(function(){var container=$(this),resourceURL=(url!==null)?url:container.attr("href"),provider;if(embedAction){settings.onEmbed=embedAction} else{settings.onEmbed=function(oembedData){$.fn.oembed.insertCode(this,settings.embedMethod,oembedData)}}
784if(resourceURL!==null){provider=$.fn.oembed.getOEmbedProvider(resourceURL);if(provider!==null){provider.params=getNormalizedParams(settings[provider.name])||{};provider.maxWidth=settings.maxWidth;provider.maxHeight=settings.maxHeight;embedCode(container,resourceURL,provider)} else{settings.onProviderNotFound.call(container,resourceURL)}}
785return container})};var settings,activeProviders=[];$.fn.oembed.defaults={maxWidth:null,maxHeight:null,embedMethod:"replace",defaultOEmbedProvider:"plone",allowedProviders:null,disallowedProviders:null,customProviders:null,defaultProvider:null,greedy:true,onProviderNotFound: function(){},beforeEmbed: function(){},afterEmbed: function(){},onEmbed: function(){},onError: function(){},ajaxOptions:{}};
786function getRequestUrl(container,externalUrl,provider){var url=provider.apiendpoint,qs="";var i;if(url.indexOf("?")<=0)
787url=url+"?";else
788url=url+"&";if(provider.maxWidth!==null&&provider.params.maxwidth===null)
789provider.params.maxwidth=provider.maxWidth;if(provider.maxHeight!==null&&provider.params.maxheight===null)
790provider.params.maxheight=provider.maxHeight;for(i in provider.params){if(provider.params[i]!==null)
791qs+="&"+encodeURIComponent(i)+"="+provider.params[i]}
792url+="format=json&url="+encodeURIComponent(externalUrl)+qs ;if(container[0].getAttribute("data-maxwidth")!==null)
793url+="&maxwidth="+container[0].getAttribute("data-maxwidth");if(container[0].getAttribute("data-maxheight")!==null)
794url+="&maxheight="+container[0].getAttribute("data-height");return url}
795function embedCode(container,externalUrl,embedProvider){var requestUrl=getRequestUrl(container,externalUrl,embedProvider);var ajaxopts=$.extend({url:requestUrl,type:'get',dataType:'json',success: function(data){var oembedData=$.extend({},data);switch(oembedData.type){case "photo":console.log("photo");oembedData.code=$.fn.oembed.getPhotoCode(externalUrl,oembedData);break;case "video":oembedData.code=$.fn.oembed.getVideoCode(externalUrl,oembedData);break;case "rich":oembedData.code=$.fn.oembed.getRichCode(externalUrl,oembedData);break;default:oembedData.code=$.fn.oembed.getGenericCode(externalUrl,oembedData);break}
796settings.beforeEmbed.call(container,oembedData);settings.onEmbed.call(container,oembedData);settings.afterEmbed.call(container,oembedData)},error: function(xhr,ajaxOptions,thrownError){console.log(xhr.responseText);console.log(thrownError)}},settings.ajaxOptions||{});$.ajax(ajaxopts)}
797function initializeProviders(){activeProviders=[];var defaultProvider,restrictedProviders=[],i,provider;if(!isNullOrEmpty(settings.allowedProviders)){for(i=0;i<$.fn.oembed.providers.length;i++){if($.inArray($.fn.oembed.providers[i].name,settings.allowedProviders)>=0)
798activeProviders.push($.fn.oembed.providers[i])}
799settings.greedy=false} else{activeProviders=$.fn.oembed.providers}
800if(!isNullOrEmpty(settings.disallowedProviders)){for(i=0;i<activeProviders.length;i++){if($.inArray(activeProviders[i].name,settings.disallowedProviders)<0)
801restrictedProviders.push(activeProviders[i])}
802activeProviders=restrictedProviders;settings.greedy=false}
803if(!isNullOrEmpty(settings.customProviders)){$.each(settings.customProviders, function(n,customProvider){if(customProvider instanceof $.fn.oembed.OEmbedProvider){activeProviders.push(provider)} else{provider=new $.fn.oembed.OEmbedProvider();if(provider.fromJSON(customProvider))
804activeProviders.push(provider)}})}
805defaultProvider=getDefaultOEmbedProvider(settings.defaultOEmbedProvider);if(settings.greedy===true){activeProviders.push(defaultProvider)}
806for(i=0;i<activeProviders.length;i++){if(activeProviders[i].apiendpoint===null)
807activeProviders[i].apiendpoint=defaultProvider.apiendpoint}}
808function getDefaultOEmbedProvider(defaultOEmbedProvider){var url="http://oohembed.com/oohembed/";if(defaultOEmbedProvider=="embed.ly")
809url="http://api.embed.ly/v1/api/oembed?";if(defaultOEmbedProvider=="plone")
810url=portal_url+'/@@proxy-oembed-provider';return new $.fn.oembed.OEmbedProvider(defaultOEmbedProvider,null,null,url,"callback")}
811function getNormalizedParams(params){if(params===null)
812return null;var key,normalizedParams={};for(key in params){if(key!==null)
813normalizedParams[key.toLowerCase()]=params[key]}
814return normalizedParams}
815function isNullOrEmpty(object){if(typeof object=="undefined")
816return true;if(object===null)
817return true;if($.isArray(object)&&object.length===0)
818return true;return false}
819$.fn.oembed.insertCode=function(container,embedMethod,oembedData){var html=$(oembedData.code);if(oembedData===null)
820return;switch(embedMethod){case "auto":if(container.attr("href")!==null){$.fn.oembed.insertCode(container,"append",oembedData)}
821else{$.fn.oembed.insertCode(container,"replace",oembedData)}
822break;case "replace":if(html.is("a")&&html.length==1){break}
823if(container.hasClass("oembed-responsive")){if(html.is("iframe")||html.is("object")||html.is("embed")){var width=parseInt(html.attr("width"),null),height=parseInt(html.attr("height"),null);var ratio=height/width;container.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top',(ratio * 100)+"%");html.removeAttr('height').removeAttr('width');oembedData.code=html[0].outerHTML}
824if(oembedData.type=="photo"){html.find('img').css('max-width',"100%");oembedData.code=html[0].outerHTML}}
825container.replaceWith(oembedData.code);break;case "fill":container.html(oembedData.code);break;case "append":var oembedContainer=container.next();if(oembedContainer===null||!oembedContainer.hasClass("oembed-container")){oembedContainer=container.after('<div class="oembed-container"></div>').next(".oembed-container");if(oembedData!==null&&oembedData.provider_name!==null)
826oembedContainer.toggleClass("oembed-container-"+oembedData.provider_name)}
827oembedContainer.html(oembedData.code);break}};$.fn.oembed.getPhotoCode=function(url,oembedData){var code,alt=oembedData.title?oembedData.title:'';alt+=oembedData.author_name?' - '+oembedData.author_name:'';alt+=oembedData.provider_name?' - '+oembedData.provider_name:'';code='<div><a href="'+url+'" target=\'_blank\'><img src="'+oembedData.url+'" alt="'+alt+'"/></a></div>';if(oembedData.html)
828code+="<div>"+oembedData.html+"</div>";return code};$.fn.oembed.getVideoCode=function(url,oembedData){var code=oembedData.html;return code};$.fn.oembed.getRichCode=function(url,oembedData){var code=oembedData.html;return code};$.fn.oembed.getGenericCode=function(url,oembedData){var title=(oembedData.title!==null)?oembedData.title:url,code='<a href="'+url+'">'+title+'</a>';if(oembedData.html)
829code+="<div>"+oembedData.html+"</div>";return code};$.fn.oembed.isProviderAvailable=function(url){var provider=getOEmbedProvider(url);return(provider!==null)};$.fn.oembed.getOEmbedProvider=function(url){for(var i=0;i<activeProviders.length;i++){if(activeProviders[i].matches(url))
830return activeProviders[i]}
831return null};$.fn.oembed.OEmbedProvider=function(name,type,urlschemesarray,apiendpoint,callbackparameter){this.name=name;this.type=type;this.urlschemes=getUrlSchemes(urlschemesarray);this.apiendpoint=apiendpoint;this.callbackparameter=callbackparameter;this.maxWidth=500;this.maxHeight=400;var i,property,regExp;this.matches=function(externalUrl){if(typeof externalUrl==='undefined'){return false}
832for(i=0;i<this.urlschemes.length;i++){regExp=new RegExp(this.urlschemes[i],"i");if(externalUrl.match(regExp)!==null)
833return true}
834return false};this.fromJSON=function(json){for(var property in json){if(property!="urlschemes")
835this[property]=json[property];else
836this[property]=getUrlSchemes(json[property])}
837return true};
838function getUrlSchemes(urls){if(isNullOrEmpty(urls))
839return ["."];if($.isArray(urls))
840return urls;return urls.split(";")}};$.fn.oembed.providers=[]})(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.