//Hide pagination
function xTimeAgo(unixDate, now){ 

	var periods 	= new Array(storeText[0][0],storeText[0][1],storeText[0][2],storeText[0][3],storeText[0][4],storeText[0][5],storeText[0][6],storeText[0][7]);
	var lengths 	= new Array("60","60","24","7","4.35","12","10");
	
	if(now >= unixDate) { var difference  = now - unixDate; } else {	}
	for(var j = 0; difference >= lengths[j] && j < lengths.length-1; j++) { difference /= lengths[j]; }
	difference		= Math.round(difference);
	
	if(difference > 1 && storeText[1][4] == "en") { periods[j] += "s"; }
	
	if(j == 0){
		$('#time'+unixDate).html(storeText[1][3]);
	} else {
		$('#time'+unixDate).html(difference+' '+periods[j]+' '+storeText[1][2]);	
	}

}
