$(function(){

	$('table.portfolio', '#mainContent').paginate({
		items:'tr',
		nbElemsPerPage: 1,
		nbPagesMax:false,
		classSelected:'selected',
		classPaginate :'paginate',
		bShowBefore:false,
		bShowAfter:false,
		paginateBox:$('.paginateBox'),
		classNumber:'Number',
		classNext:'Next',
		classPrev:'Prev',
		classFirst:'First',
		classLast:'Last',
		strNext: ' > ',
		strPrev:' < ',
		strFirst:'<< ',
		strLast:' >>'
	});	
	
	nextPrev();
	$('a','.paginateBox').bind('click', function(){
		nextPrev();
	});
	
	
	/*$("a.fancyzoom2","#mainContent").click(function(){
		$(this).parents("td").find("a.fancyzoom").trigger('click');
		//console.log($(this).parents("td").prev().find("a.fancyzoom").html());
		return false;
	});*/
	
});

function nextPrev(){

	$('div.paginateBox:first').css({
		position:"absolute",
		top:"290px",
		left:"260px"
	})
	.find(".Number, .Next, .Last, .First").css({display:"none"});
	
	$('div.paginateBox:first')
	.find(".Prev").html("").css({
		display:"block",
		width:"25px",
		height:"35px"
	});
	
	$('div.paginateBox:last').css({
		position:"absolute",
		top:"275px",
		left:"700px"
	})
	.find(".Number, .First, .Prev, .Last").css({display:"none"});
	
	$('div.paginateBox:last')
	.find(".Next").html("").css({
		display:"block",
		width:"25px",
		height:"35px"
	});
	
}
