$(document).ready(function(){
	p1 = $('#specific-text p:first');
	p2 = $('#specific-text p:eq(1)');
	restrict_to_lines(p1, 2);
	restrict_to_lines(p2, 2);
});

function restrict_to_lines(el, l){
	code = el.html();
	h = el.height();
	line_height = parseInt(el.css('line-height'));
	
	if (code){
		code = code.substr(0, code.length-5) + "&hellip;";
		el.html(code);
		while (h>(line_height*l)+parseInt(el.css('padding-bottom'))+parseInt(el.css('padding-top')) && code){
			code = code.substr(0, code.length-9) + "&hellip;";
			el.html(code);
			h = el.height();
		}
	}

}
