  /**
	* Get string of the content in text content of the highest level tags of content, limited to maximum maxChars characters and separated by separator
	*
	* @content original content, format should be a collection of tags
	* @maxChars max number of characters of return string
	* @separator separator to put between words; defaults to ' ' (not yet)
	* @endPad string to append to the end of the result if it gets cropped; defaults to ' ...' (not yet)
	*
	* @return String of the content in text content of the highest level tags of content, limited to maximum maxChars characters and separated by separator
	*/
	function restrictChars(content, maxChars, separator, endPad) 
	{
		var mCont = '';
		var mContAr;
		var res = ''
		var stop = false;
		
		$(content).each(function() 
		{
			mCont += ' ' + $(this).text();
		});
		
		mCont = mCont.substring(1);
		
		if (mCont.length <= maxChars) 
		{
			return mCont;
		}				
			
		mContAr = mCont.split(' ');								
		
		if (mContAr[0].length <= maxChars)
		{
			res = mContAr[0];
		}
		
		for (i = 1; i < mContAr.length && !stop; i++)
		{
			if (res.length + mContAr[i].length + separator.length <= maxChars) 
			{
				res += separator + mContAr[i];
			}
			else 
			{
				stop = true;
			}
		}
		
		/*
		if ($(content).eq(0).text().length <= maxChars) {
			res = $(content).eq(0).text();
		}				
		
		for (i = 1; i < $(content).length; i++) {				
			if (res.length + $(content).eq(i).text().length + separator.length <= maxChars) {
				res += separator + $(content).eq(i).text();
			}				
		}
		*/
		
		//alert("'" + res + "' (" + res.length + ")");
		
		return res + endPad;
	}
