            // This is a demo that shows 
            // a) how to have pagination for the same content multiple times
            // b) two independent pagination elements
            
            // The elements that will be displayed are in a hidden DIV and are
            // cloned for display. The elements are static, there are no Ajax 
            // calls involved.
            // The elements for the second example are not cloned. Instead, the
            // elements are hidden and the current element is shown.
        
            /**
             * Callback function that displays the content.
             *
             * Gets called every time the user clicks on a pagination link.
             *
             * @param {int} page_index New Page index
             * @param {jQuery} jq the container with the pagination links as a jQuery object
             */
            function searchPageselectCallback(page_index, jq){
               // var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
               var new_content = '';
               var nbImg = parseInt($('#configModerationNbImg').attr('value'));
               
               //alert(page_index*nbImg + nbImg);
               
                for (i = page_index*nbImg; i < page_index*nbImg + nbImg; i++) 
                {
                	 if ($('#resultat_recherche .usericon:eq('+i+')').html())
                	 	new_content += $('#resultat_recherche .usericon:eq('+i+')').html();
                }
                //alert(new_content);
                $('.result').empty().append(new_content);
                return false;
            }
           
            /** 
             * Initialisation function for pagination
             */
            function initPagination() {
                // count entries inside the hidden content
                var num_entries = $('#resultat_recherche .usericon').length;
                var nbImg = parseInt($('#configModerationNbImg').attr('value'));
                
                // Create content inside pagination element
                $("#pagination").pagination(num_entries, {
                    callback: searchPageselectCallback,
                    items_per_page: nbImg, // nb d'images par page (dynamique & en conf)
                    prev_text: "<<",
                    next_text: ">>"
                });

             }
            
            // When document is ready, initialize pagination
            $(document).ready(function(){               	  
              //var content = $('.usericon .icon_img:eq(2)').attr('src');
              //alert(content);
              initPagination();
            });
