    //offuscatore [v0.2]
    function offusca_ind(uno) {
      var domain = "umbrella"+"."+"it";
      document.write("<a href=" + "ma" + "il" + "to:" + uno + "@" + domain +" class=\"link\" >" + uno + "@" + domain + "</a>");
    }
    
  
  var myLb = function() {
      // variabili private
      var $BOX, IMAGES, nACT;
      // funzioni private
      function crea_html() {
        var html = ($('#oscura').length) ? '': '<div id="oscura"></div>';
        html += '<div id="lb">';
        html +=   '<div id="lb_img_box">';
        html +=     '<img id="lb_image" src="" alt="" />';
        html +=     '<a id="lb_next" href="#" title="'+_t.succ+'">&nbsp;<b></b></a>';
        html +=     '<a id="lb_prev" href="#" title="'+_t.prec+'">&nbsp;<b></b></a>';
        html +=   '</div>';
        html +=   '<div id="lb_body">';
        html +=     '<p id="lb_title"></p>';
        html +=     '<p id="lb_specs"></p>';
        html +=   '</div>';
        html +=   '<div id="lb_bottom">';
        html +=     '<a href="#" class="single">'+_t.dwn_img+'</a>';
        html += _t.allegati;
        html +=     '<a href="#" id="lb_close">close</a>';
        html +=   '</div>';
        html += '</div>';
        $('body').append(html);
        // carico la prima foto
        carica();
        // bind degli elementi
        bind_el();
      };
      function carica() {
        var act = IMAGES[nACT]; // elemento <a> del dom
        var $img = $('img', act); // elemento img
        var id = $img.attr('src').match(/\d{1,}.(jpg|png|jpeg)/)[0] // id dell'immagine + estensione
        // mostro l'immagine "media"
        $('#lb_image').attr('src', _t.ps+'media/formato2/um_'+id);
        // imposto il link per scaricare l'immagine
        id = id.replace(/\.(jpg|png|jpeg)/,''); // rimuovo l'estensione
        $('#lb_bottom .single').attr('href',_t.ps+'web/download.php?valo='+_t.lingua+'_'+id);
        // imposto la dida
        $('#lb_title').html($img.attr('alt'));
        $('#lb_specs').html(act.rel);
        
        // nascondo i pulsanti
        (nACT == 0) ? $('#lb_prev').hide() : $('#lb_prev').show();
        (nACT == IMAGES.length-1) ? $('#lb_next').hide() : $('#lb_next').show();
      };
      
      function chiudi() {
        $('#oscura').remove();
        $('#lb').remove();
        return false;
      };
      
      function bind_el() {
        $('#oscura, #lb_close').click(chiudi);
        $('#lb_next').click(img_succ);
        $('#lb_prev').click(img_prec);
      };
      
      function img_prec() {
        nACT--;
        carica();
        return false;
      };
      function img_succ() {
        nACT++;
        carica();
        return false;
      };
      
      // funzioni pubbliche
      function init(start_idx) {
        $BOX = $('#modulo_immagini');
        IMAGES = $('.img a', $BOX);
        nACT = start_idx;
        crea_html();
      };
      
      return {
        init : init
      }
      
    }();
    
    
    
    function pagination() {
      var passed = 0;
      page[0] = new Array(); // inizializzo il primo array
      
      for (var i=0; i<n_img; i++) {
        if ((passed == show_limit-1 && n_img-i > 1 && n_pages!=0)
            || (passed == show_limit )) {
          passed = 0;
          n_pages++; // aggiungo una pagina
          page[n_pages] = new Array();
        }
        page[n_pages][passed] = i;
        passed++;
      }
    }
    
    
    
    
    var myLbVideo = function() {
      // variabili private
      var VIDEOS, nACT;
      // funzioni private
      function crea_html() {
        var html = ($('#oscura').length) ? '' : '<div id="oscura"></div>';
        html += '<div id="lbv">';
        html +=   '<h1 id="lbv_headling"></h1>';
        html +=   '<div id="lbv_img_box" style="padding: 24px 25px; height:auto">';
        html +=   '</div>';
        html +=   '<div id="lbv_body">';
        html +=     '<p id="lbv_title"></p>';
        html +=     '<div id="lbv_specs"></div>';
        html +=   '</div>';
        html +=   '<div id="lbv_bottom">';
        html +=     '<a href="#" id="lbv_close">close</a>';
        html +=   '</div>';
        html += '</div>';
        $('body').append(html);
        // carico la prima foto
        carica();
        // bind degli elementi
        bind_el();
      };
      function carica() {
        // aggiungo l'html del video nel box
        $('#lbv_img_box').html(VIDEOS[nACT].video);
        // imposto la dida
        $('#lbv_title').html(VIDEOS[nACT].dida);
      };
      function chiudi() {
        $('#oscura').remove();
        $('#lbv').remove();
        return false;
      };
      function bind_el() {
        $('#oscura, #lbv_close').click(chiudi);
      };
      
      // funzioni pubbliche
      function init(start_idx) {
        VIDEOS = vids;
        nACT = start_idx;
        crea_html();
      };
      
      function cambia() {
        var n = $(this).attr('rel');
        nACT = n;
        carica();
        return false;
      };
      
      return {
        init : init,
        cambia : cambia
      }
      
    }();
