	function pageselectCallback(page_index, jq){
		var num_entries = $('#hiddenresult div.result').length;
		var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
		$('#Searchresult').empty().append(new_content);
		$("#central .paginacio .bot-esquerra").after(' <span class="info">'+(page_index+1)+'/'+num_entries+'</span> ');
		return false;
	}

	function initPagination() {
		var num_entries = $('#hiddenresult div.result').length;
		// Create pagination element
		$("#central .paginacio").pagination(num_entries, {
				num_edge_entries: 0,
				num_display_entries: 0,
				callback: pageselectCallback,
				items_per_page:1,
				next_text:">",
				prev_text:"<",
		});
	}
                    
	// Load HTML snippet with AJAX and insert it into the Hiddenresult element
	// When the HTML has loaded, call initPagination to paginate the elements        
	$(document).ready(function(){      
			initPagination();
	});
