/* common.js */

$(document).ready(function() {
	$(".smallBox, .bigBox").hover(
		function() {
			$(this).addClass("active");
		},
		function() {
			$(this).removeClass("active");
		}
	);
	$(".formErrorMsg, .formHelpMsg").Tooltip({showURL: false});
	$("input:text,input:password").hint();
	$(".grayBox").corner("5px");
});

function TextareaMaxLength(sender, max, counter)
{
	if(parseInt($(''+sender).val().length) > max) 
		$(sender).val($(''+sender).val().substring(0, max));
	else
		$(''+counter).text((max-parseInt($(''+sender).val().length)).toString());
}