
/** 
*	AJAX PAGINATION LINKER
*	----------------------
*
*	MUST BE LOADED IN A PAGE USING the 
*	CREATE_AJAX_LINKS function of the pagination class
*	(as defined in MY_pagination)
*
*	Used in the 'onclick' events of pagination links
*
*
*	params -	target 		= 	• The id of the div (or other) to fill with the paginated content (html) retrieved by the pagination link
*				getUrl 		= 	• The url of the php function to use to retrieve the paginated content (html)
*				
*								 +-----------------------------------------------------------------------------------+
*								 | Due to the pagination library requiring an update on which page has been selected |
*								 | we must reload the pagination links with this information passed to the library.  |
*								 +-----------------------------------------------------------------------------------+
*
*				pagUrl		=	• The url of the php function to use to update the pagination links
*	
*		
*/


function ajax_pagination_linker (target, getUrl, pagUrl) {
	


	//load the content that the pagination refers to
	$.get(getUrl, function (html) {
		
		$('#'+target).html(html);
		
	});
	
	//reload the pagination with the correct current page
	$.get(pagUrl, function (html) {
	
		$('#pagination-digg').html(html);
	
	});
	

	
}
