	function pageselectCallback(page_index, jq){
		var new_content = jQuery('#hiddenresult div.result:eq('+page_index+')').clone();
		jQuery('#Searchresult').empty().append(new_content);
		return false;
	}
   
	function initPagination() {
		// count entries inside the hidden content
		var num_entries = jQuery('#hiddenresult div.result').length;
		// Create content inside pagination element
		jQuery("#Pagination").pagination(num_entries, {
			callback: pageselectCallback,
			load_first_page: true,
			prev_text:'<<',
			next_text:'>>',	
			num_edge_entries:1,
			items_per_page:1 // Show only one item per page
		});
	 }
		
	jQuery(document).ready(function(){ // Script del Navegador
		initPagination();
		jQuery("ul.subnavegador").hide();		
		
		jQuery("a.desplegable").each(function() {
			
			if(this.href == document.location.href){
				jQuery(this).parent().find("ul.subnavegador").slideDown('fast'); 					
			}
			
		});

		jQuery("a.hija").each(function() {			
							
			if(this.href == document.location.href){
				//jQuery(this).parent(2).find("ul.subnavegador").slideDown('fast'); 					
				jQuery(this).parents('ul.subnavegador').slideDown('fast');
				jQuery(this).addClass("catseleccionada");
			}
			
		});
				
		/*jQuery("a.desplegable").toggle(
			function() { 
				jQuery(this).parent().find("ul.subnavegador").slideDown('fast'); 
				document.location.href = this.href;
			},
			function() { 
				jQuery(this).parent().find("ul.subnavegador").slideUp('fast'); 
			}				
		);*/	
	});
