	
	
	
<script type="text/javascript">
	var isMethodology = true;

	var qtipApis = {};
  	var all_active_ids = {};
  	var ids_to_remove = {};
	var ids_to_idx = {};
  	var append_alphabetically = true;
	var all_data = [];
	var filtered_data = [];
	var clusterize;
	var getting_sec_data = false;
	var searching = false;
	var stateUrl = "https://www.verba-alpina.gwi.uni-muenchen.de/it?rest_route=%2Fwp%2Fv2%2Fpages%2F21&state=§§§";
	var clear_titles = [];
	var zoomWarning = "Sembra che le impostazioni dello zoom nel Suo browser siano diverse da 100%. Questo potrebbe non far funzionare correttamente la pagina web. Si prega di cliccare ctrl + 0 (Windows) oppure cmd + 0 (Mac) per ripristinare lo zoom e di ricaricare la pagina."
	var loadingCounter = 0;
	var saved_left = null;
	var prevent_tour_click = false;
	var blockimages = false;
	
	var urlParams = new URLSearchParams(window.location.search);
	
	jQuery(document).ready(function () {

		jQuery('.lmu_signum_bg').hide();

		var translations_help = {};

		translations_help['back'] = "Indietro";
		translations_help['next'] = "Proseguire";
		translations_help['end_tour'] = "Concludere il tour";
		translations_help['step_1'] = "Questo campo permette la ricerca completa in tutti gli articoli. La voce deve contenere almeno tre lettere. Dopo una ricerca effettuata i risultati vengono evidenziati in colore. La ricerca può essere avviata con il tasto invio oppure...";
		translations_help['step_2'] = "...cliccando sulla lente d'ingrandimento.";
		translations_help['step_3'] = "Questo campo filtra l‘elenco degli articoli sia in base alle parole chiave presenti nel titolo degli articoli, sia in base alla tipologia delle parole chiave (concetto, tipo morfo-lessicale, tipo di base).";
		translations_help['step_4'] = "L'alfabeto posto a sinistra permette di saltare a tutti gli articoli che iniziano con la rispettiva lettera scelta, a meno che gli articoli non siano stati nascosti da un precedente filtro del titolo.";
		translations_help['step_5'] = "Tramite le barre laterali, è possibile aprire articoli specifici con un clic. Cliccando su un articolo lo si apre, cliccando nuovamente sul titolo lo si chiude. Il menu può essere chiuso con un clic sulla freccia. Sui dispositivi mobili ciò avviene cliccando sull'area oscurata sopra il menu.";
		translations_help['step_6'] = "Questi pulsanti permettono di visualizzare l'articolo sulla mappa interattiva, di citarlo (solo nelle versioni di citazione stabili e se l'articolo contiene testo), di scaricarlo (solo nella versione stabile di citazione) e di visualizzarlo come collegamento permanente o di chiuderlo. Se ci sono immagini per l'articolo, possono essere richiamate utilizzando l'icona dell'immagine.";
		translations_help['step_7'] = "Se il testo di un articolo è più lungo del testo visibile, l'articolo completo può essere visualizzato cliccando su questo pulsante.";
		translations_help['step_8'] = "Questo pulsante permette di accedere ai dati riferiti a un articolo.";
		translations_help['step_9'] = "Per visualizzare i dati, le rispettive categorie devono essere espanse attraverso un clic.";
		translations_help['step_10'] = "Un clic su una voce mostra le informazioni dettagliate disponibili.";
		translations_help['step_11'] = "Questo pulsante permette di tornare alla parte anteriore dell‘articolo e di chiudere tutte le tabelle aperte.";
		translations_help['step_12'] = "Questo pulsante crea un collegamento permanente e permette così di salvare, condividere e richiamare la visualizzazione attuale della pagina web.";

		translations_help['METHODOLOGIE'] = "Metodologia";

		addCopyButtonSupport();
		addScrollShift();
		addSideBarCollapse();
		
		 	

			translations_help['step_3'] = "Questo campo filtra l‘elenco degli articoli in base al termine di ricerca inserito.";
			translations_help['step_6'] = "Con questi pulsanti, l'articolo può essere visualizzato come collegamento permanente, modificato (funzionalità interna) o richiuso.";
			var tour = addHelpTourMeth(translations_help);

		
		
		jQuery('#lextitelinput').val('');

		jQuery('.lexstartcontent').fadeIn('fast',function(){
			addPopups(jQuery(this));
		});

		jQuery('#page').addClass('lex');
		jQuery('body').addClass('lex');

		if(isMethodology)jQuery('body').addClass('meth');


		jQuery('.lexsearch button').first().on('click',function(){
			var val = jQuery('.lexsearch input').val();
			lexMainSearch(val);
		})


		jQuery('.lexmenubtn').on('click',function(){
			clickLexSearchMenu();
		})

		jQuery('.mobile_sidebar_bg').on('click',function(){
			clickLexSearchMenu();
		})

		jQuery('.lexsearch input').val('');
		jQuery('.lexsearch input').attr("placeholder", getPlaceHolderText());

		jQuery(window).on('resize',function(){
			resizeBehavior()
		}) // resize
		
		let singleId = false;
		if (window.location.hash){
			singleId = window.location.hash.substring(1);

			if (urlParams.get('letter') && !isNaN(singleId)){
				singleId = "M" + singleId;
			}
		}
		else {
			const sid = urlParams.get('single');
			
			if (sid){
				singleId = sid;
			}
		}
		
		if (singleId && singleId.substring(0, 1) == "A"){
			urlParams.set("list", "municipalities");
		}
		else if (singleId && isMethodology && !singleId.startsWith("M")){
			singleId = false;
		}
		else if (singleId && !isMethodology && singleId.startsWith("M")){
			singleId = false;
		}

		tagSet = false;
		if (isMethodology && !singleId && urlParams.get('tag')){
			tagSet = urlParams.get('tag');
		}

		getAllArticles(function() {
			let stateId = urlParams.get("state");

			if (stateId){
				jQuery.post(ajax_object.ajaxurl, {
					"action": "va",
					"namespace": "lex_alp",
					"query": "load_state",
					"id" : stateId
				}, function (response){
					if (response == "INVALID_STATE"){
						alert("Invalid state id: " + stateId);
						return;
					}
					
					let stateData = JSON.parse(response);
					let tdb = stateData["version"];
					
					if(tdb == ajax_object["next_version"]){ //Future version
						tdb = "xxx";
					}
					
					if(tdb != ajax_object["db"]){
						reloadPageWithParam(["db", "state"], [tdb, stateId]);
					}
					else {
						openSavedArticles(stateData);
					}
				});
			}
			else if (tagSet){
				let tids = [];
				jQuery("#lextitellist li").each(function (){
					let tags = (jQuery(this).data("tags") + "").split(",");
					if (tags.includes(tagSet)){
						tids.push(jQuery(this).attr("id"));
					}
				});

				for (let i = 0; i < tids.length; i++){
					all_active_ids[tids[i]] = true;
				}
				addArticlesByIds(tids, null, false, null);
				
				updateVisibleItems();
				jQuery('.lexstartcontent').fadeOut('fast');
			}

		 addABCScrolling(removeDiacriticsPlusSpecial);	

		});

		jQuery(window).on("hashchange", function (){
			let id = window.location.hash.substring(1);
			if (jQuery('.lexstartcontent').length > 0){
				jQuery('.lexstartcontent').fadeOut('fast');
			}
			localLink(id);
		});

		if (singleId){
			singleId = singleId.replaceAll(" ", "+");
			if (ID_MAPPING[singleId]){
				singleId = ID_MAPPING[singleId]; // L1 -> L1+5
			}
			
			all_active_ids[singleId] = true;
			addArticlesByIds([singleId], null, true, null);
			
			jQuery('.lexstartcontent').fadeOut('fast');
		}

		if((getZoomValues().actualZoom > 1.01 || getZoomValues().actualZoom < 1.0 ) && window.innerWidth>1100){  //temp fix didnt work for small screens after brwoser update
			//showBrowserZoomWarning(zoomWarning)
		}

	centerLexLogo(true);

	setTimeout(function() {
		centerLexLogo(true);
	}, 1000);

	}); //ready


function addABCScrolling(characterFunction){

    var data = (filtered_data.length>0) ? filtered_data : all_data;

	var list = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] 	
   
   	if(jQuery('.lex_abc').children().length==0){
		    list.map(o => {
		    	jQuery('.lex_abc').append('<div>'+o+'<hr class="lexlisthr"></hr></div>');
		    })
		    jQuery('.lexlisthr').last().remove()

		    clear_titles.map((el,i) => {
		    	var regres = /title=\"(.*?)\">/gi.exec(el);
		    	var titel;
		    	if(regres)
		    		 title = characterFunction(regres[1]);
		    	else title = characterFunction(jQuery(el).attr('title'));
		    	clear_titles[i] = title;
		   })
    }

    var letterToIndices = {}

    jQuery('.lex_abc div').removeClass('active');

    data.map((el,i) => {
    	var regres = /(id="(.*?)(\"))/g.exec(el);
    	var id; 
    	if(regres) id = regres[2];
    	else id = jQuery(el).attr('id');
    	var idx = ids_to_idx[id];
    	var title = clear_titles[idx];
		if (title){
			var first_letter = title.charAt(0).toUpperCase();
			if(letterToIndices[first_letter]==undefined && list.indexOf(first_letter)!=-1){
				letterToIndices[first_letter] = i;
				jQuery('.lex_abc div:contains("'+first_letter+'")').addClass('active');
			}
		}
    })



    letterToIndices['A'] = 0;

    jQuery('.lex_abc > div.active').off().on('click touchstart',function(){


    	 var row_height = jQuery('#lextitellist li').first().outerHeight();
    	 var letterscrollpos = letterToIndices[jQuery(this).text()]

    	 var scrolltop =  (letterscrollpos>0) ? (letterscrollpos*row_height)+row_height : 0
	     if(isMethodology) scrolltop-=row_height;
    	 if(letterscrollpos!=undefined) jQuery("#scrollArea").animate({ scrollTop: parseInt(scrolltop)}, 100);
    })

}


function openSavedArticles(stateData){

	var articles = stateData["articles"];
	jQuery('.lexstartcontent').fadeOut('fast');

	var openArticles = articles.map(o => o["id"]);

	var highlight = (stateData.highlighted!="") ? stateData.highlighted : false

	if(highlight) {
		searching = true;
		jQuery('.lexsearch input').val(highlight);
	}

	for (let i = 0; i < openArticles.length; i++){
		all_active_ids[openArticles[i]] = true;
	}
	addArticlesByIds(openArticles, null, true, highlight, function(){

				articles.map((current_art)=>{
					article_id = current_art.id;
					let selector = '#detailview_' + article_id.replace(/\+/g, '\\+');
			
					if(current_art.backOpen){
					    jQuery(selector).find('.flipbutton').click()	
					    
					    for(var key in current_art['openSubs']){
					    	var index = parseInt(current_art['openSubs'][key]["index"]);
					        var idx = index+1;
			    		    var subcont = jQuery(selector).find('.sub_head:nth-child('+idx+') .sub_head_content');
			    		    subcont.click()

			    		    if(current_art['openSubs'][key]["secTables"]){

				    		    current_art['openSubs'][key]["secTables"].map(subtable_idx => {
				    		    	 var tr = subcont.parent().find('.backtable tbody tr:not(.second_row):nth-child('+subtable_idx+')')
				    		    	 openSecTable(tr, jQuery(selector),true)
				    		    })

			    		    }

					    }

					}

					else if (current_art.frontOpen){
						jQuery(selector).find('.lex_read_more').click()	
					}

				})

			updateVisibleItems();
			jQuery('.entry-content.lex').animate({ scrollTop: (stateData.scroll_pos)}, 'slow');
			// jQuery('.entry-content.lex').scrollTop(stateData.scroll_pos);
	});

}


function addScrollShift(){

setTimeout(function() {

    var top = parseInt(jQuery('.lex_header').css('top').split('px')[0]);
    var margin_top = parseInt(jQuery('.entry-content.lex').css('margin-top').split('px')[0]);
    var padding_top = parseInt(jQuery('#scrollLex').css('padding-top').split('px')[0]); 
 	var prevScroll = 0;

 	addScrollShiftListener(margin_top, margin_top, padding_top, prevScroll);

 }, 10); // needed for correct css values


}

function addSideBarCollapse(){


	jQuery('.lex_slide_collapse').on('click',function(){
			if(window.innerWidth>=768){
				centerLexLogo(false)
				jQuery('.lexlogowrapper').addClass('shift');
				jQuery('.lex_header').addClass('shift');
				jQuery('body').addClass('sidebarCollapse');
				jQuery('.lex_slide_uncollapse').fadeIn();
				jQuery('.lexsidebar').css('left','-'+(jQuery('.lexsidebar').outerWidth()+5)+'px');
			}
	})

	jQuery('.lex_slide_uncollapse').on('click',function(){
		if(window.innerWidth>=768){
				centerLexLogo(true)
			    jQuery('.lexlogowrapper').removeClass('shift');
			    jQuery('.lex_header').removeClass('shift');
				jQuery('body').removeClass('sidebarCollapse');
				jQuery('.lex_slide_uncollapse').fadeOut();
				jQuery('.lexsidebar').css('left','0px');
			}
	})

	jQuery('.lex_scrollup').on('click',function(){
		jQuery("html, body").animate({ scrollTop: "0" });
	})

	jQuery('.lex_close_all').on('click',function(){
		completeReset(true, true);
		jQuery(this).fadeOut();
		jQuery("html, body").animate({ scrollTop: "0" });
	})
}


function centerLexLogo(withSideBar){
	var headerwidth = jQuery('.lex_header_inner').innerWidth();
	var innerheaderwidth = jQuery('.lexlogowrapper').innerWidth();
	var left = headerwidth/2 - innerheaderwidth/2;
	var add = 16;
	var left_articles = jQuery('.lex_articles').offset().left;

	if(!withSideBar || window.innerWidth<=768){
		jQuery('.lexlogowrapper').css('left',(left)+"px");
		var head_width = jQuery('.lexhead').innerWidth();
		var left = innerheaderwidth/2 - head_width/2;
		jQuery('.lexhead').css('left', (left-5) + "px");
		saved_left = left_articles;
	}
	else {
		if(!saved_left)jQuery('.lexlogowrapper').css('left',(left_articles)+"px");
		else jQuery('.lexlogowrapper').css('left',(saved_left)+"px");
		jQuery('.lexhead').css('left', "0px");
	}

}

function addScrollShiftListener(margin_top, margin_top,padding_top, prevScroll){

		jQuery(document).on("scroll", function() {

			   var scrollTop = Math.round(jQuery(document).scrollTop())
				 var scrollAdd = 90;
			     if(window.innerWidth<=1340) scrollAdd = 70;
			     if(window.innerWidth<=768 && window.innerWidth>721) scrollAdd = 85;
			     if(window.innerWidth<721) scrollAdd = 65;

			     if(scrollTop>75) {
		     		jQuery('img.lexlogo').addClass('fadeOut')
		     		jQuery('.lexlogo_text').addClass('fadeOut')
			     	jQuery('.lex_header').css('transform','translateY(-'+scrollAdd+'px)')
			     }
			     else{
		     	 	jQuery('.lex_header').css('transform','translateY(0px)')
				 	jQuery('img.lexlogo').removeClass('fadeOut')
			 		jQuery('.lexlogo_text').removeClass('fadeOut')
			     }


			     if(scrollTop > 100){
			     	jQuery('.lex_scrollup').fadeIn();
			     	jQuery('.lex_close_all').fadeIn();
			     }
			     else{
			     	jQuery('.lex_scrollup').fadeOut();
		     		jQuery('.lex_close_all').fadeOut();
			     }
		          	
    });
}


function saveCurrentState(){

	const scrollPos = jQuery('.entry-content.lex').scrollTop()
	const highlightString = jQuery('.lexsearch input').val()

	const openArticles = []
	jQuery(jQuery('.lex_article').get().reverse()).each((i,el) => {

		var obj = {"id": jQuery(el).attr("id").split('detailview_')[1]};
		if(jQuery(el).hasClass('flipped')){
			obj['backOpen'] = true
			const open_subs = []
			jQuery(el).find('.sub_head.open').each((i,el) => {

				var open_sec_tables = []
				jQuery(el).find('tr.second_row').each((i,el) => {
					    open_sec_tables.push(jQuery(el).index())
				})
				open_subs.push({"index": i, "secTables": open_sec_tables});
			})

			obj['openSubs'] = open_subs;
		}

	    else if (jQuery(el).hasClass('open'))obj['frontOpen'] = true
	    
		openArticles.push(obj)

	})
			
	return {articles:openArticles,scrollPos: scrollPos, highlightString: highlightString }
}

function produceLexURL (callback){

	if(prevent_tour_click){ 
		return;
	}


	let data = saveCurrentState();

	jQuery.post(ajax_object.ajaxurl, {
		"action": "va",
		"namespace": "lex_alp",
		"query": "save_state",
		"type": isMethodology? "M": "L",
		"version_number": ajax_object.db === "xxx"? ajax_object.next_version: ajax_object.db,
		"data": data
	}, function (response){
		callback(stateUrl.replace("§§§", response));
	});
}


function resizeBehavior(){

	centerLexLogo(true);
	setTimeout(function() {
		centerLexLogo(true);
	}, 1000);

	setTimeout(function() {
		centerLexLogo(true);
	}, 5000);

	if(window.innerWidth >= 768){
		saved_left = null;
		jQuery('.lexsidebar').show();
		jQuery('.lexsidebar').css('top','');
		jQuery('.mobile_sidebar_bg').hide();

	jQuery('.lex_article.show.open').each(function(){

			var f_cont = jQuery(this).find('.f_content');
			var el_cont = f_cont[0];
			var front  = jQuery(this).find('.front');
			readMoreFunction(jQuery(this), el_cont, front);		

	})

	jQuery('.lex_article.flipped').each(function(){
	closeAllBack(jQuery(this),false);
	})

	}	

	if(jQuery('body').hasClass('sidebarCollapse')){
		jQuery('.lex_slide_uncollapse').click();
	}


	jQuery('.lex_article:not(.overflow)').css('height','initial')
	.find('.front').css('height','initial')
	.css('max-height','209px')
	.find('.front').css('max-height','209px')


	jQuery('.lex_article:not(.overflow)').each(function(){
	var el = jQuery(this).find('.front')[0];
	var total_height = (el.offsetHeight > 88) ? el.offsetHeight : 88;
		if(!jQuery(this).hasClass('flipped'))jQuery(this).height(total_height).attr('back_height','');
		jQuery(this).attr('original_height', total_height);
			jQuery(this).flip({axis: 'x', trigger: 'manual',speed:450});
			jQuery(this).find('.front').css('height','100%')	
	})


	if(clusterize)clusterize.refresh(true);

}

	

function localLink (id){

	let posPlus = id.indexOf("+");
	if (posPlus != -1){
		var firstId = id.substring(0, posPlus);
	}
	else {
		var firstId = id;
	}
	
	let callback = function (){
		let j = jQuery(".lex_article_" + firstId); //Has the class for every single id
		if (j.hasClass("open")){
			scrollToEntry(firstId);
		}
		else {
			var el_cont = j.find('.f_content')[0];
			var front  = j.find('.front');
			readMoreFunction(j, el_cont, front, function (){
				scrollToEntry(firstId);
			});
		}
	}
	
	if (ID_MAPPING[firstId]){
		var fullId = ID_MAPPING[firstId]; // L1 -> L1+5
	}
	else {
		fullId = firstId;
	}
	
	if (!all_active_ids[fullId]){
		all_active_ids[fullId] = true;
		addArticlesByIds([fullId], getPrevId(fullId), true, null, callback);
	}
	else {
		callback();
	}
}

function scrollToEntry (id){
	let j = jQuery(".lex_article_" + id);

	if(j.length>0){
		window.scrollTo({top: j.offset().top - jQuery(".lex_header_inner").height(), behavior: 'smooth'});
	}
}


function slideMobileMenuDown(){
		jQuery('.mobile_sidebar_bg').fadeOut();
		jQuery('.lexsidebar.in').removeClass('in');
		jQuery('.lexsidebar').css('top','100%');
}

function addPopups (div){

	addBiblioQTips(div);
	addCitations("Copiare");
	
// 	div.find(".lex_quote").each(function (){
// 		jQuery(this).qtip({
// 			"show" : "click",
// 			"hide" : "unfocus",
// 			"content" : {
// 				"text" : "<div>" + jQuery(this).data("quote").replace(/(http[^ ]*)/, "<a href='$1'>$1</a>")
// 				+ "</div><br /><input class='copyButton' style='display: block; margin: auto;' type='button' data-content='" 
//				+ jQuery(this).data("quote") + "' value='Copiare' />"
//  			},
//  			"position" : {
//  				"my": "top right",  
//  				"at": "bottom left"
//  			}
// 		});
// 	});
}

function removePopus (div){
	div.find(".bibl, .vaabr, .sabr").qtip("destroy");
	div.find(".lex_quote").qtip("destroy");	
}

function clickListItem(_this){
 	 var id = jQuery(_this).attr('id');

	if (ids_to_remove[id] == true) 
		return;

	if (jQuery(_this).hasClass('active')){
		closeArticle(jQuery('#detailview_'+id.replace(/\+/g, '\\+')),id);
		jQuery(_this).removeClass('active');	
	}
	else {
		if(!jQuery('.lex_main_load_cover').is(":visible")){
			jQuery('.lex_main_load_cover').css("display", "flex").hide().fadeIn('fast');
		}
		
		jQuery(_this).addClass('active');
		var prev_id = getPrevId(id);
		if (all_active_ids[id] == null){
			all_active_ids[id] = true;
			addArticlesByIds([id], prev_id, true, null, function (){
				scrollToEntry(id);
			});
		}
	}
	if (jQuery('.lexstartcontent').length > 0){
		jQuery('.lexstartcontent').fadeOut('fast');
	}
	
	if (jQuery('.lex_articles .no_results').length > 0){
		jQuery('.lex_articles .no_results').remove();	  
	}
}



function getPrevId(id){
	var own_idx = ids_to_idx[id];
	var res = null;
    var mindist = Number.POSITIVE_INFINITY;
	for(var key in all_active_ids){
		var other_idx =  ids_to_idx[key];
		if(other_idx<own_idx){
		  var dist = own_idx-other_idx;
		  if(dist<mindist){
			res = key;
			mindist = dist;
		}
	}	
 }
return res;
}

function getAllArticles(callback){

	 var query = "get_all_articles";
	 if(urlParams.get("list") == "municipalities")query="get_all_municipalities";
	 if(isMethodology)query="get_all_methodology";

	  var data = {
            "action" : "va",
            "namespace" : "lex_alp",
            "query" : query,
			"db" : ajax_object.db
    };

    jQuery.post(ajax_object.ajaxurl, data, function (response){
    	var res = JSON.parse(response);

    	for(var i=0; i<res.length;i++){

    		var article = res[i];
    		var type = article['Id'].substring(0, 1);
		    if(isMethodology)type="A";	
    		var row = '<li id="'+article["Id"]+'"' + (article["Tags"]? ' data-tags="' + article["Tags"] + '"': '') + '><span class="list_marker type_'+type+'"></span><span class="title-string">'+article["Title_Html"]+'</span></li>';
    		clear_titles.push(article["Title_Html"])
    		all_data.push(row);
    		ids_to_idx[article['Id']] = i;

    	}


      clusterize = new Clusterize({
		  rows: all_data,
		  scrollId: 'scrollArea',
		  contentId: 'lextitellist',
		  no_data_text: 'Nessun risultato...', 
		   callbacks: {
		    clusterChanged: function() {
		    		updateVisibleItems();
		    	}
  			}
		});

	 jQuery('#lextitellist').on('mouseup', 'li', function() {
  	 		 clickListItem(this);
	 });

   	  jQuery('.lexsearch input').attr("placeholder", getPlaceHolderText());

   	  jQuery('.lex_load_cover').fadeOut();


   	  	var main_search_input = jQuery('.lexsearch input');

   	  	main_search_input.on('keyup', function () {

   	  		if(event.key == "Enter"){
   	  			var val = jQuery('.lexsearch input').val();
				lexMainSearch(val);
   	  		}

		if(main_search_input.val().length==0 && event.key!=="Enter"){
					completeReset(true, true);
		 	}
		});


   	 	var input = jQuery('.lexsidebar').find('.search').find('input');


		var doneTypingInterval = 250;
		var typingTimer;        

		input.on('keyup', function () {
		  jQuery('.lex_load_cover').fadeIn();
		  clearTimeout(typingTimer);
		  typingTimer = setTimeout(doneTyping, doneTypingInterval);
		});


		input.on('keydown', function () {
		  clearTimeout(typingTimer);
		});

		function doneTyping () {

		 if(input.val().length>0){
		 	getFilterResults(input.val());
		 	addABCScrolling(removeDiacriticsPlusSpecial)
		 }
		 else {
	 		filtered_data = [];
		 	clusterize.update(all_data);
		 	addABCScrolling(removeDiacriticsPlusSpecial)

		 }
    	 jQuery('.lex_load_cover').fadeOut();
		}

		callback()
    }) // post


}


function getFilterResults(filter){

	  var query = "get_filter_results";
	  if(urlParams.get("list") == "municipalities") query = "filter_municipalities_results";
      if(isMethodology) query = "filter_methodology_results";

	  var data = {
            "action" : "va",
            "namespace" : "lex_alp",
            "search_val": removeDiacritics(filter),
            "query" : query,
			"db" : ajax_object.db
    };

    jQuery.post(ajax_object.ajaxurl, data, function (response)
    {
    	var res = JSON.parse(response);
    	filtered_data = [];
  	

    	for(var i=res.length-1; i>=0;i--){

    		var id = res[i];

		  	var idx = ids_to_idx[id];
		
		  	var article = all_data[idx];
    		filtered_data.push(article);

    	}
  	    clusterize.update(filtered_data);
  	    addABCScrolling(removeDiacriticsPlusSpecial)
    })
}


function completeReset(show, resetSidebar){


		loadingCounter =0;
		filtered_data = [];
		if(clusterize)clusterize.update(all_data);
		addABCScrolling(removeDiacriticsPlusSpecial);
		jQuery('.lex_article').remove();
		jQuery('.no_results').remove();
		all_active_ids = {};
		jQuery('#lextitelinput').val('');
		if(show){
			jQuery('.lexstartcontent').fadeIn('fast');
			jQuery('.lexsearch input').val('');
			jQuery('.lexsearch input').attr("placeholder", getPlaceHolderText());
		}
		updateVisibleItems();

		if(resetSidebar){

			if(window.innerWidth<=768){
				jQuery('.lexsidebar').removeClass('in').css('top','100%');
			}

			jQuery('.lexsidebar #scrollArea').scrollTop(0);
			if(jQuery('.lexsidebar').css('left')!="0px"){
				jQuery('.lex_slide_uncollapse').click();
			}

		}
		
		jQuery('.lex_article').each(function(){
			removePopus(jQuery(this));
		})
}


function updateVisibleItems(){
		for(key in all_active_ids){
			let selector = "#" + key.replace(/\+/g, '\\+')
			if(!(jQuery(selector).hasClass('active'))){
				jQuery(selector).addClass('active');
			}
		}

		if(Object.keys(all_active_ids).length==0){
			jQuery('.lexlist li.active').removeClass('active');
		}
}


function addArticlesByIds(ids, prev_id, append_alphabetically, highlight, callback){

	loadingCounter++;

    var data = {
            "action" : "va",
            "namespace" : "lex_alp",
            "query" : "get_text_content",
            "type" : isMethodology? 'M': 'L',
            "id" : ids,
			"db" : ajax_object.db
    };

	jQuery.post(ajax_object.ajaxurl, data, function (response){	
		if  (response.startsWith("ERROR:")){
			alert(response.substring(6));
			return;
		}

		var articles_to_append = jQuery(response);

		jQuery(articles_to_append).each(function(){

			var that = jQuery(this);
			var id = that.attr('id').split('_')[1];
			if(!append_alphabetically){
				jQuery('.lex_articles').append(that);
			}
			else {
				if (jQuery('.lex_article').length == 0 && all_active_ids[id] == true){
					jQuery('.lex_articles').append(that);
				}
				else if (all_active_ids[id] == true && jQuery("#detailview_"+id).length == 0){
					if (prev_id){
						var prev_element = jQuery("#detailview_"+prev_id.replace(/\+/g, '\\+'));
						if (prev_element.length>0){
							prev_element.after(that);
						}
						else {
							jQuery('.lex_articles').append(that);
						}
					}	
					else {
						jQuery('.lex_articles').prepend(jQuery(this));
					}
				}
			}
			generateFinalLexArticles(that)
		}); // each article
				
		loadingCounter--;
		
		if (loadingCounter == 0){
			jQuery('.lex_main_load_cover').fadeOut('fast');
		}
	
	 	if(searching){
			finalizeSearch(highlight);
		}

		if (callback){
			callback();
		}

	}); // ajax


};


function generateFinalLexArticles(that){


					var el = that[0];
    	 			var f_cont = that.find('.f_content');
    	 			var el_cont = f_cont[0];
    	 			var front  = that.find('.front');
    	
	
		  	 		var total_height = (el.offsetHeight > 88) ? el.offsetHeight : 88;

        	 		that.height(total_height);
        	 		front.height(total_height);

        	 		that.attr('original_height',total_height);
        	 		that.css('max-height','initial');

            	 	if (total_height < el_cont.scrollHeight) {

            	 		var readmore = jQuery('<div class="lex_read_more extend"><span class="extend">Leggere di più...</span></div>');
            	 		
            	 		that.find('.f_content').append(readmore);

            	 		that.addClass('overflow');
	
            	 		that.css('max-height','initial');
            	 		front.css('max-height','initial');
				
							readmore.on('click',function(){
								readMoreFunction(that, el_cont, front);						
							})



					} 

					that.find('.back').show();	
				  	that.flip({axis: 'x', trigger: 'manual',speed:450});	
              
	

					  that.find('.lex_close').on('click',function(){
		  				 var id = that.attr('id').split('_')[1];

		  					if(!prevent_tour_click)closeArticle(that,id);

  				   	 	 // jQuery('.lexsearch input').attr("placeholder", getPlaceHolderText());			
					  });	


					  that.find('.lex_image_btn').on('click',function(){
					  	 if(blockimages) return;
					  	 blockimages = true;
		  				 var id = that.attr('id').split('_')[1];
							   getConceptImages(id,function(data){
							   		 createLexImageModal(data,id);
							   		  
							   });
					  });	


					  that.find('.flipbutton').off().on('click',function(){

					  	if(that.hasClass('autoclick') || prevent_tour_click) return;
											  	 			  	
				  		if(that.find('.open').length>0 || that.hasClass('open')){ //something is open => no flip first close stuff


		  			  	  if(that.hasClass('flipped')){
		  			  	  	 	closeAllBack(that,true);
		  			  	  }
		  			  	  else{

					  		 readMoreFunction(that, el_cont, front,function(){
					  		 	that.find('.flipbutton').click();
					  		 });

					  		 }	
					  	}

					  	else{


						setTimeout(function(){
							that.flip('toggle');
						},150)

			  	 	  	 that.toggleClass('flipped');
					  	 that.addClass('toggle_scale');
					  	 jQuery(this).hide();

					  	 setTimeout(function() {that.removeClass('toggle_scale')}, 200);

						  that.one('flip:done',function(){

						  		setTimeout(function() {
						  			that.find('.flipbutton').fadeIn();	
								  	  if(that.hasClass('flipped')){
										  	 	that.find('.flipbutton').find('.text').text('Indietro');
										  	 	that.find('.flipbutton').find('i').removeClass('fa-database').addClass('fa-angle-left');
										}

									  	 else{
								  	 		that.find('.flipbutton').find('.text').text('Dati'); 
								  	 		that.find('.flipbutton').find('i').removeClass('fa-angle-left').addClass('fa-database');		
									  	 }
						  		}, 150);
						  });


					  	  if(that.hasClass('flipped')){


							  	 	that.attr('back_height',that.find('.b_content').height()+20);
							  	 	that.height(parseInt(that.attr('back_height')));

							  	 

								  	 	that.find('.sub_head').off().on('click',function(e){

								  	 		if(prevent_tour_click) return;

								  	 		var clicked_item = jQuery(this);

								  	 				if(jQuery(this).hasClass('sliding') || !jQuery(e.target).hasClass('sub_head_content')) return;
								  	 				
								  	 				clicked_item.toggleClass('open');
								  	 				clicked_item.addClass('sliding');

								  	 				if(jQuery(this).hasClass('open')){	

								  	 					if(clicked_item.find('.hiddenbackcontent').find('table').length==0){

																slideSubHeadDown(that, clicked_item, null);

								  	 					}

						  	 							else{

								  	 							clicked_item.find('i').removeClass('fa-angle-right').addClass('fa-angle-down');
						  	 									clicked_item.find('.hiddenbackcontent').slideDown(function(){
					  	 										clicked_item.addClass('open');	
																clicked_item.removeClass('sliding');
																clicked_item.find('.back').addClass('table_open');
																});

								  	 					}

								  	

										  	 		}

								  	 				else{
									  	 				
										  	 			openForSlideDown(that, clicked_item);
								  	 				    
										  	 		}

									  	 			if(that.find('.open').length==1){

															that.css('height','100%');
															setTimeout(function() {	that.find('.back').css('overflow','auto').css('max-height','initial');}, 10);

													}

										  	 
								  	 
								  	 		
								  	 	});

							}

						  	 else{
						  	 	that.height(parseInt(that.attr('original_height')));  	 	
						  	 }

						}// if not open 	 

					  });
					
		
			that.addClass('show');

			addPopups(that);

}


function openForSlideDown(that, clicked_item){
	clicked_item.find('i').removeClass('fa-angle-down').addClass('fa-angle-right');
			clicked_item.addClass('sliding');

				clicked_item.find('.hiddenbackcontent').slideUp(function(){
				clicked_item.removeClass('sliding');
				clicked_item.find('.second_row').remove();
				clicked_item.find('.backtable tr').removeClass('active');
				that.find('.back').removeClass('table_open');
				clicked_item.removeClass('open');

					if(that.find('.open').length==0){											
		  		setTimeout(function() { that.find('.back').css('overflow','hidden').css('max-height','209px');}, 10);	
				  that.height(parseInt(that.attr('back_height')));
									  	 			 
			  	}
	  	
			  	 	clicked_item.find('.hiddenbackcontent').empty();
			 });
	}


function slideSubHeadDown(that, clicked_item, callback){
		var id = that.attr('id').split('_')[1];
		var index = clicked_item.index();
		var selftype = id.charAt(0)
		var othertype = getOtherTypeByOwn(selftype,index);

		clicked_item.find('i').removeClass('fa-angle-right').addClass('fa-circle-notch fa-spin');

		getBackTable(id,selftype,othertype, function(html){

			clicked_item.find('.hiddenbackcontent').append(jQuery(html))
			addTableSorter(clicked_item.find('.hiddenbackcontent table'),that)

			clicked_item.find('.hiddenbackcontent').slideDown(function(){
			clicked_item.removeClass('sliding');
			that.find('.back').addClass('table_open');
			if(callback)callback();
			});
			clicked_item.find('i').removeClass('fa-circle-notch fa-spin').addClass('fa-angle-down');
		
		});

 						
		
	if(that.find('.open').length==1){

 		that.css('height','100%');
 		setTimeout(function() {	that.find('.back').css('overflow','auto').css('max-height','initial');}, 10);
	
	}

}


function createLexImageModal(urls, id){

var i = urls.length;
while (i--) {
   	var format = urls[i].split('.').pop();
    if (format=="mp4") { 
         urls.splice(i, 1);
    } 
}

var carousel_cover = jQuery('<div class="carousel-cover"></div>');
var lexclone = jQuery('.lex_load_cover .spinnerarea').clone();
carousel_cover.append(lexclone);
jQuery('#lexImageModal .modal-body').append(carousel_cover);

var titel = 'Concetto'+': '+id;
jQuery('#lexImageModal .modal-title').text(titel);


if(urls.length==1){
	jQuery('#lexImageModal .carousel-indicators').hide();
	jQuery('#lexImageModal .cc_control').hide();
}

var count = 0;

jQuery('#lexImageModal').modal();

	jQuery('#lexImageModal').on('shown.bs.modal',function(){

			for(var i=0; i<urls.length;i++){
				var url = urls[i];
				var fakeImage = jQuery('<img src="'+url+'"/>');
				
				fakeImage.on('load',function(){
				
					if(count==urls.length-1){
						for(var j=0; j<urls.length;j++){
								var image_div = jQuery('<div class="carousel-item"><div class="lex_carousel_img" style="background-image:url('+urls[j]+')"></div></div>');
								
								jQuery('#lexImageModal .carousel-inner').append(image_div);
								var indicator = jQuery('<li data-target="#carouselExampleIndicators" data-slide-to="'+j+'"></li>');
								jQuery('.carousel-indicators').append(indicator);
								if(j==0){
									image_div.addClass('active');
									indicator.addClass('active');
								}

								if(j==urls.length-1){
								
									var carousel = jQuery('#lexImageModal .carousel').carousel()
									
									carousel_cover.fadeOut(function(){

										setTimeout(function(){
								 		   carousel.carousel('next');
									 	},1000); // initiate first slide
										blockimages = false;
									});
							
									
								}
						}
					}

					count++;
				});
			}


 	});


	jQuery('#lexImageModal').on('hidden.bs.modal',function(){

			jQuery('#lexImageModal .carousel').carousel('dispose');

			jQuery('#lexImageModal .carousel-inner').empty();
			jQuery('#lexImageModal .carousel-indicators').empty();
			jQuery('#lexImageModal .carousel-cover').remove();
			jQuery('#lexImageModal .carousel-indicators').show();
			jQuery('#lexImageModal .cc_control').show();
			blockimages = false;
	});



}


function getOtherTypeByOwn(owntype,index){

	if(owntype=="C" && index == 0){
		return "L"
	}
	else if (owntype=="C" && index == 1){
	  return "B"
	}
	else if (owntype=="L" && index == 0){
	  return "C"
	}
	else if (owntype=="L" && index == 1){
	  return "A"
	}
	else if (owntype=="B" && index == 0){
	  return "L"
	}
	else if (owntype=="B" && index == 1){
	  return "A"
	}
	else if (owntype=="B" && index == 2){
	  return "C"
	}
	else if (owntype=="A" && index == 0){
	  return "L"
	}
		else if (owntype=="A" && index == 1){
	  return "B"
	}
		else if (owntype=="A" && index == 2){
	  return "C"
	}
}


function addTableSorter(in_table,that){

	in_table.bind("sortStart",function(e, table) {
	
	   jQuery(table).find('tr').removeClass('active').off();
	   jQuery(table).find('.second_row').remove();

	})
	.bind("sortEnd",function(e, table) {
		 	openSecData(jQuery(table),that);
	}).bind("tablesorter-initialized",function(e, table) {

			openSecData(jQuery(table),that);
		});
	
    in_table.tablesorter({theme: 'dark'}); 
}

function closeAllBack(that,flip){

		var num_open_items = that.find('.open').length;
		var count = 0;
			that.find('.open').removeClass('open').find('.hiddenbackcontent').slideUp(function(){
			that.find('.back').removeClass('table_open');
			that.removeClass('sliding');
			count++;
			that.find('.second_row').remove();
			that.find('.backtable tr').removeClass('active');
			that.find('.back').css('overflow','hidden').css('max-height','209px');
			that.height(parseInt(that.attr('back_height')));
				if(count==num_open_items && flip){
					performAutoClick(that);
				}
			});
		that.find('.sub_head_content').find('i').removeClass('fa-angle-down').addClass('fa-angle-right');

}

function performAutoClick(that){
	that.addClass('autoclick');
    setTimeout(function() {that.removeClass('autoclick');that.find('.flipbutton').click();},700);
}

function finalizeSearch(highlight){

		jQuery('.lexstartcontent').hide();
		jQuery('.lexsearch button').removeClass('no_hover');
		jQuery('.lexsearch button i').first().removeClass('fa-circle-notch fa-spin lex-search-spinner').addClass('fa-search');
   		updateVisibleItems();
	    if(highlight)highlightSearchResults(highlight);	
   		searching = false;
}


function lexMainSearch(val){

if(searching) return;


	if(val.length<3){
		if(val.length>0){
				jQuery('.lexsearch input').val('').addClass('red').attr("placeholder",'Bitte mehr als 2 Buchstaben eingeben.');
				setTimeout(function() {
						jQuery('.lexsearch input').removeClass('red').attr("placeholder",getPlaceHolderText());
				}, 750);
		}
	}

		else{

			completeReset(false, true);

			searching = true;

				jQuery('.lexsearch button').addClass('no_hover');
				jQuery('.lexsearch button i').first().removeClass('fa-search').addClass('fa-circle-notch fa-spin lex-search-spinner');

					var query = "get_search_results";
					if(urlParams.get("list") == "municipalities")query="get_search_results_mun";
					if(isMethodology)query="get_search_results_meth";


				    var data = {
			            "action" : "va",
			            "namespace" : "lex_alp",
			            "query" : query,
			            "search_val" : removeDiacritics(val),
						"db" : ajax_object.db
			    		};
			       

			    jQuery.post(ajax_object.ajaxurl, data, function (response){

			    	var res = JSON.parse(response);
			   		var list = [];
			   		for(var i=0; i<res.length;i++){
			   			var id = res[i];
			   			list.push(id);
			   			all_active_ids[id] = true;
			   		}

			    if (list.length > 0){
					addArticlesByIds(list,null,false,val);	
				}
			    else {
			    	finalizeSearch(null);
			    	completeReset(false, true);
			    	jQuery('.lexstartcontent').hide();
			    	if(jQuery('.lex_articles .no_results').length==0){
			    		jQuery('.lex_articles').append('<div class="no_results">Nessun risultato...</div>') 
			    		setTimeout(function() {completeReset(true, true)}, 1000);
			    	}
			    };
			


			    });


    }



}

function highlightSearchResults(val){

jQuery(".lex_article").mark(val, {
    "element": "span",
    "className": "highlight",
	"synonyms": {"ss": "ß"}
});

}

function closeArticle(that,id){
	 delete all_active_ids[id];
	 ids_to_remove[id] = true;
		  				 
	 that.removeClass('show');
	 setTimeout(function() {
	 	that.remove();
 	  	 if(Object.keys(all_active_ids).length==0)jQuery('.lexstartcontent').fadeIn('fast');  
 	  	  delete ids_to_remove[id];
	 }, 500); 
	 jQuery("#" + id.replace(/\+/g, '\\+')).removeClass('active');
	 removePopus(that);
}



function openSecData(table,that){
var highlighted = false;

	table.find('tr').off().on('click',function(){
		if(prevent_tour_click) return;
		var row = jQuery(this)
		if(!highlighted){
				openSecTable(row,that,false);
	 	}
	})

	//do not open tr if text is highlighted
	table.find('tr').mouseup(function(){
	var highlightedText = "";
	if (window.getSelection) {
		highlightedText = window.getSelection().toString();
	} 
	else if (document.selection && document.selection.type != "Control") {
		highlightedText = document.selection.createRange().text;
	}
	if(highlightedText != "")
		highlighted = true;
		setTimeout(function() {
			highlighted = false;
		}, 100);
	});

}



function openSecTable(tr,detailview,bypass){

		if(getting_sec_data && !bypass) return;

		var main_id_comb = detailview.attr('id').split('_')[1];
		var main_type = main_id_comb.substring(0, 1);
		var main_id = main_id_comb.substr(1);

		var id = tr.attr('id');
		
		if(!id){
			id = null;
		}
		else {
			id = id.substring(1);
		}

		var type = tr.parent().parent().attr('type');
		
		if(!tr.next().hasClass('second_row')){
			var row = tr;

			if(type){
	
			tr.append('<div class="secRowLoading"><i class="fas fa-circle-notch fa-spin"></i></div>');
			tr.find('.secRowLoading').css('height',(tr.height()-1)+"px");

			getSecondaryData(id, type, row, main_type, main_id,function(){
				tr.find('.secRowLoading').remove()
			});
			tr.addClass('active');

			}

		}
		else{
			var qtip_key = type + id + "_" + main_type + main_id;

			for(var i = 0; i < qtipApis[qtip_key].length; i++){
				if(qtipApis[qtip_key][i])
					qtipApis[qtip_key][i]["destroy"](true);
			}

			delete qtipApis[qtip_key];
			
			tr.next().remove();
			tr.removeClass('active');
		}

}

function readMoreFunction(that, el_cont, front, callback){

if(prevent_tour_click) return;

that.toggleClass('open');

		if(that.hasClass('open')){
			 that.animate({height:el_cont.scrollHeight+15},0);
			 //use jQuery animate to fix scrollbar-bug
		}
		else {
		   that.animate({height:parseInt(that.attr('original_height'))},0);
		    //use jQuery animate to fix scrollbar-bug
			 that.find('.lex_read_more').height(50).removeClass('no_grad');
			 
		};

		var transition_event = whichTransitionEvent();

		that.one(transition_event, function () {

		    if(that.hasClass('open')){that.find('.lex_read_more').addClass('no_grad');
		     that.find('.lex_read_more').height(10).find('span').text('Leggere di meno...');
			}
			else {

					that.find('.lex_read_more').find('span').text('Leggere di più...');
				}
			if(callback) callback();	
		});
}


function getConceptImages(id,callback){

	var data = {
	    "action" : "va",
	    "namespace" : "lex_alp",
	    "query" : "get_concept_images",
	    "id" : id
	};

	jQuery.post(ajax_object.ajaxurl, data, function (response){
		var image_urls = JSON.parse(response);
		callback(image_urls);
	})

}


function getSecondaryData(id, type, row, main_type, main_id, callback){


getting_sec_data = true;

var data = {
    "action" : "va",
    "namespace" : "lex_alp",
    "query" : "get_secondary_data",
    "id" : id,
    "parent_type": main_type,
    "parent_id" : main_id,
    "type" : type,
	"db" : ajax_object.db
};


jQuery.post(ajax_object.ajaxurl, data, function (response){

	var arr = JSON.parse(response);
	var res = arr[0];
	var extra = arr[1];

	var table = jQuery('<tr class="second_row"><td colspan="'+row.children().length+'"><table class="second_table"><thead><tr></tr></thead><tbody></tbody></table></td></tr>');

	for(var key in res[0]){
		table.find('thead > tr').append(jQuery('<th>'+key+'</th>'));
	}

	for(var key in res){

			var item = res[key];
			var tr = jQuery('<tr></tr>');

		for(var sub in item){
			var val = item[sub];
			tr.append(jQuery('<td>'+val+'</td>'));
		}
		table.find('tbody').append(tr);
	}

	table.find("table").after(extra);

	 row.after(table);

	 var apis = addBibLikeQTips(table, ["bibl", "stimulus", "informant"], ["blue", "blue", "blue"], ["", "sti", "inf"]);
	 qtipApis[type + id + "_" + main_type + main_id] = apis;

	 table.find('.second_table').tablesorter({theme: 'dark'});   

	 getting_sec_data = false;
	 callback();
	 
});


};

function getBackTable(id, selftype, othertype, callback){


var data = {
    "action" : "va",
    "namespace" : "lex_alp",
    "query" : "get_back_table",
    "id" : id,
    "selftype": selftype,
    "othertype" : othertype,
};


jQuery.post(ajax_object.ajaxurl, data, function (response){

	var res = JSON.parse(response);
	callback(res)
})


}

function getPlaceHolderText(){

		var res;

        //municipalities
	   if (urlParams.get("list")=="municipalities") {
		    res= 'Cerca in *NUMBER* articoli...';	
		    var string = res.split(" ");
		    string[1] = all_data.length;
		    string[2] = 'Comuni';

		    res = string[0]+" "+string[1]+" "+string[2]+"...";
	    }

    	else{

	    var placeholder = 'Cerca in *NUMBER* articoli...';
	    res = placeholder.replace('*NUMBER*', all_data.length);

	    }

		return res;
}
		

function clickLexSearchMenu(){

		if(jQuery('.lexsidebar').hasClass('in')){
			setTimeout(function() {
				jQuery('.lexsidebar').css('top','100%');
			}, 10);
			jQuery('.lexsidebar').removeClass('in');
			jQuery('.mobile_sidebar_bg').fadeOut();
			jQuery('html').removeClass('no_overflow');
			
		}
		else{
			jQuery('.mobile_sidebar_bg').fadeIn();
			jQuery('.lexsidebar').show();
			setTimeout(function() {
				jQuery('.lexsidebar').css('top','185px');
			}, 10);
			jQuery('.lexsidebar').addClass('in');
			jQuery('html').addClass('no_overflow')
			jQuery('.lexsidebar').focus()
		}
}


	</script>
	
	<div id="lexImageModal" class="modal fade top_menu_modal" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-md" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Bilder</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">


			<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel" data-interval="2500" data-pause="false" data-wrap="true">
			  <ol class="carousel-indicators">
			  </ol>
			  <div class="carousel-inner">

			  </div>
			  <a class="carousel-control-prev cc_control" href="#carouselExampleIndicators" role="button" data-slide="prev">
			    <span class="carousel-control-prev-icon" aria-hidden="true"><i class="fas fa-chevron-left"></i></span>
			    <span class="sr-only">Previous</span>
			  </a>
			  <a class="carousel-control-next cc_control" style="right:0px;" href="#carouselExampleIndicators" role="button" data-slide="next">
			    <span class="carousel-control-next-icon" aria-hidden="true"><i class="fas fa-chevron-right"></i></span>
			    <span class="sr-only">Next</span>
			  </a>
			</div>


      </div>
    </div>
  </div>
</div><div class="lex_header"><div class="lex_header_inner"><div class="lexlogowrapper"><div class="lexlogo lexhead no_svg"><div class="lexlogo_text" style="position: relative;">Metodologia</div></div>
			<div class="lexsearch">
			<div>
			<input></input>
			<button class="actionbtn"><i class="fas fa-search" aria-hidden="true"></i></button>
			<div class="lexsep" style="display:none;"></div>
			<button class="actionbtn lexmenubtn"><i class="fas fa-bars" aria-hidden="true"></i></button>
            <!--<button class="actionbtn" id="lex_sql_query" style="color: #444444">SQL Query</button>-->
			</div>
			</div></div></div></div><div  id="scrollLex" class="entry-content lex"><div class="lexcontent"><div class="lex_articles" id="scrollLexContent"><div class="lexstartcontent"><div class="entry-content methodology-text glossary">L'autocomprensione scientifica del progetto è articolata nei contributi alla metodologia. Viene presentata la comprensione dei concetti di base della <b>linguistica</b> e <b>della tecnologia dell'informazione</b>, vengono determinate le <b>aree funzionali</b> del portale, o meglio dell'ambiente di ricerca virtuale, e vengono commentati i punti salienti del <b>contesto extralinguistico</b>. L'interfaccia utente è stata integrata con un discorso analitico che mira alla massima trasparenza dell'intera impresa; con questa concezione VerbaAlpina si differenzia dalla maggior parte degli altri progetti nel campo dell'informatica umanistica. Le procedure sviluppate per la geolinguistica virtuale non  sono solo evidenti nella funzionalità del sito web, ma trovano anche una collocazione esplicita e diretta nella ricerca corrente, senza prendere le deviazioni indirette attraverso altri canali di pubblicazione (che, per inciso, sono utilizzati anche sotto forma di <a href="https://www.verba-alpina.gwi.uni-muenchen.de/it/?page_id=45&amp;db=232">Pubblicazioni</a> esterne). Il sito web è disponibile in diverse lingue. Tuttavia, la maggior parte dei contributi testuali è stata originariamente formulata in tedesco e poi tradotta nelle altre lingue disponibili. In caso di dubbio, è quindi necessario fare riferimento alla versione tedesca.<br>
Le funzionalità della pagina corrispondono a quelle del <strong>Lexikon Alpinum</strong>: la ricerca centrale a tutto testo funziona sui testi di tutte le voci, mentre la barra laterale, che è ordinata alfabeticamente, può essere utilizzata per filtrare o cercare rapidamente i titoli. <br><br>(<span class="vaabr" data-vaabr="auctDOT"><span class="vaabr" data-vaabr="auctDOT">auct.</span></span> David Englmeier | Thomas Krefeld – <span class="vaabr" data-vaabr="tradDOT"><span class="vaabr" data-vaabr="tradDOT">trad.</span></span> Pia Dexheimer)<br><div id="ABR_auctDOT" style="display: none;">autore</div><div id="ABR_tradDOT" style="display: none;">traduttore</div></div><div id="ABR_auctDOT" style="display: none;">autore</div><div id="ABR_tradDOT" style="display: none;">traduttore</div></div></div></div>
	    <div class="lex_main_load_cover"><div class="spinnerarea">
		  <div class="sk-fading-circle">
		  <div class="sk-circle1 sk-circle"></div>
		  <div class="sk-circle2 sk-circle"></div>
		  <div class="sk-circle3 sk-circle"></div>
		  <div class="sk-circle4 sk-circle"></div>
		  <div class="sk-circle5 sk-circle"></div>
		  <div class="sk-circle6 sk-circle"></div>
		  <div class="sk-circle7 sk-circle"></div>
		  <div class="sk-circle8 sk-circle"></div>
		  <div class="sk-circle9 sk-circle"></div>
		  <div class="sk-circle10 sk-circle"></div>
		  <div class="sk-circle11 sk-circle"></div>
		  <div class="sk-circle12 sk-circle"></div>
		</div>
		</div>
		</div></div><div class="lex_slide_uncollapse"> <i class="fas fa-chevron-right"></i></div><div class="lex_scrollup"> <i class="fas fa-chevron-up"></i></div><div class="lex_close_all"> <i class="fas fa-times"></i></div><div class="mobile_sidebar_bg"></div><div class="lexsidebar"><div class="abc_wrap"><div class="lex_abc"></div></div><div class="search"><i class="fas fa-search" aria-hidden="true"></i><input id="lextitelinput" type="text" class="form-control input-md" placeholder="Filtrare gli articoli..."> </div><div class="lex_slide_collapse"> <i class="fas fa-chevron-left"></i></div><div id="scrollArea"><div class="lex_load_cover"><div class="spinnerarea">
	  <div class="sk-fading-circle">
	  <div class="sk-circle1 sk-circle"></div>
	  <div class="sk-circle2 sk-circle"></div>
	  <div class="sk-circle3 sk-circle"></div>
	  <div class="sk-circle4 sk-circle"></div>
	  <div class="sk-circle5 sk-circle"></div>
	  <div class="sk-circle6 sk-circle"></div>
	  <div class="sk-circle7 sk-circle"></div>
	  <div class="sk-circle8 sk-circle"></div>
	  <div class="sk-circle9 sk-circle"></div>
	  <div class="sk-circle10 sk-circle"></div>
	  <div class="sk-circle11 sk-circle"></div>
	  <div class="sk-circle12 sk-circle"></div>
	</div>
	</div>
	</div><ul id="lextitellist" class="lexlist"></ul></div></div>				<script type="text/javascript">
					jQuery(document).ready(function() {
						addBiblioQTips(jQuery(".entry-content"));
					});
				</script> 
							<script type="text/javascript">
					jQuery(document).ready(function() {
						addBiblioQTips(jQuery(".entry-content"));
					});
				</script> 
			{"id":21,"date":"2015-03-03T15:29:08","date_gmt":"2015-03-03T13:29:08","guid":{"rendered":"http:\/\/www.valpinadev.gwi.uni-muenchen.de\/it\/?page_id=21"},"modified":"2022-07-07T14:20:15","modified_gmt":"2022-07-07T12:20:15","slug":"metodologia","status":"publish","type":"page","link":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/?page_id=21&db=232","title":{"rendered":"Metodologia"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":3,"comment_status":"open","ping_status":"open","template":"template_empty_wide.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-21","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/pages\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":4,"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/pages\/21\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=\/wp\/v2\/pages\/21\/revisions\/557"}],"wp:attachment":[{"href":"https:\/\/www.verba-alpina.gwi.uni-muenchen.de\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}