/**
 * Auslagerung des JavaScript für die Formattierung der Telefonnummer bei der
 * Eingabe
 * 
 * @autho Nejat Philip Eryigit, ready-4-it.de <info@ready-4-it.de>
 * @version 1.0 09/2009
 * @param class
 *            fr_telno über inputfeld FR
 * @return string formattiert
 */

function initInputMask () {
	$('input:text').setMask();
}

(function($) {
	// call setMask function on the document.ready event
	initInputMask();
	$.mask.masks.fr_telno = {
		mask : "9 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99",
		selectCharsOnFocus : false
	};

	$(".fr_telno").livequery('click', function () {
		var positionx = $(this).caret().start;
		initInputMask();
		$(this).caret(positionx, positionx);
	});

})(jQuery);

