function replaceAll(str, find, replace) { if ( str == null || find == null || replace == null ) { return ''; } else { return str.replace(new RegExp(find, 'g'), replace); } } function cercaTutti() { var testoric = $("#fieldricercah").val(); testoric = $.trim(testoric); var chiavi = replaceAll(testoric,' ',','); chiavi = replaceAll(chiavi,'\\+',','); chiavi = replaceAll(chiavi,';',','); if ( testoric.length > 2 ) { // var lnkall = urlSito+'search/'+replaceAll(testoric,'\'','%27')+'/1/id/a'; var lnkall = urlSito+'search/'+replaceAll(chiavi,'\'','%27')+'/1/id/k'; window.location = lnkall; } } function mostraAltriBrani() { clearTimeout(timeOutCercaChiudi); $("#mostraBrani").hide("fast", function() { $( ".branonascosto" ).each(function( index ) { $(this).removeClass("branonascosto"); }); }); } function mostraAltriAlbum() { clearTimeout(timeOutCercaChiudi); $("#mostraAlbum").hide("fast", function() { $( ".albumnascosto" ).each(function( index ) { $(this).removeClass("albumnascosto"); }); }); } function mostraAltriComp() { clearTimeout(timeOutCercaChiudi); $("#mostraComp").hide("fast", function() { $( ".compnascosto" ).each(function( index ) { $(this).removeClass("compnascosto"); }); }); } function string_to_slug(str) { str = str.replace(/^\s+|\s+$/g, ''); str = str.toLowerCase(); var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; var to = "aaaaeeeeiiiioooouuuunc------"; for (var i=0, l=from.length ; i 0 ) { cisonoCat = true; contenuto += '
'; contenuto += '
'; contenuto += ''; contenuto += 'Categorie
'; contenuto += '
'; var alterna = true; $.each(jsonCat, function (i, dat) { var testoIn = ''; switch(dat.cat_tipo) { case 'mf': testoIn = 'Music For: '; break; case 'pl': testoIn = 'Places: '; break; case 'ge': testoIn = 'Genres: '; break; case 'mo': testoIn = 'Mood: '; break; case 'st': testoIn = 'Instruments: '; break; case 'tm': testoIn = 'Tempo: '; break; default: testoIn = ''; } indirizzo = urlSito+'search/'+dat.cat_chiave+'/1'; contenuto += ''; if ( alterna == true ) { sfondo = ' backOdd'; alterna = false; } else { sfondo = ' backEven'; alterna = true; } contenuto += '
'+testoIn+dat.cat_chiave+'
'; }); contenuto += '
'; } var cisonoChiavi = false; if ( jsonCh.length > 0 ) { cisonoChiavi = true; contenuto += '
'; contenuto += '
'; contenuto += 'Chiavi
'; contenuto += '
'; var alterna = true; $.each(jsonCh, function (i, dat) { indirizzo = urlSito+'search/'+dat.ch_descrizione+'/1'; contenuto += ''; if ( alterna == true ) { sfondo = ' backOdd'; alterna = false; } else { sfondo = ' backEven'; alterna = true; } contenuto += '
'+dat.ch_descrizione+'
'; }); contenuto += '
'; } var cisonoBrani = false; if ( jsonBr.length > 0 ) { cisonoBrani = true; var ind = 0; contenuto += '
'; contenuto += '
'; if ( cisonoCat || cisonoChiavi ) { icona = 'icon-arrow-down'; } else { icona = 'icon-arrow-up-line'; } contenuto += ''; var titparz = ''+jsonRic.chiave+''; contenuto += 'Titoli Brano contenenti: '+titparz+'
'; if ( cisonoCat || cisonoChiavi ) { contenuto += '