$(function(){
	
	var flg = 0;
	
	$("#listBtn").click(function(){
		if(flg==0){
			flg = 1;
			$("#listBox").stop().fadeTo("slow",1);
			$("#listBtn").addClass("live");
		}else{
			flg = 0;
			$("#listBox").stop().fadeOut("slow",0);
			$("#listBtn").removeClass("live");
		}
		return false;
	});
	
	function pageselectCallback(page_index, jq){
		var new_content = $('#hiddenresult div.page:eq('+page_index+')').clone();
		$('#res').empty().append(new_content);
		return false;
	}
	
	function initPagination() {
		var num_entries = $('#hiddenresult div.page').length;
		// Create pagination element
		$("#Pagination").pagination(num_entries, {
			num_edge_entries: 2,
			num_display_entries: 8,
			callback: pageselectCallback,
			items_per_page:1
		});
	}
	
	$(function(){
		initPagination();
	});
	
	
	

});// JavaScript Document
