function checkURL(url) {
    var regURLrf = /^(?:(?:https?|ftp|telnet):\/\/(?:[а-я0-9_-]{1,32}(?::[а-я0-9_-]{1,32})?@)?)?(?:(?:[а-я0-9-]{1,128}\.)+(?:рф)|(?! 0)(?:(?! 0[^.]|255)[ 0-9]{1,3}\.){3}(?! 0|255)[ 0-9]{1,3})(?:\/[a-zа-я0-9.,_@%&?+=\~\/-]*)?(?:#[^ \'\"&<>]*)?$/i;
    var regURL = /^(?:(?:https?|ftp|telnet):\/\/(?:[a-z0-9_-]{1,32}(?::[a-z0-9_-]{1,32})?@)?)?(?:(?:[a-z0-9-]{1,128}\.)+(?:com|net|org|mil|edu|arpa|ru|gov|biz|info|aero|inc|name|[a-z]{2})|(?! 0)(?:(?! 0[^.]|255)[ 0-9]{1,3}\.){3}(?! 0|255)[ 0-9]{1,3})(?:\/[a-zа-я0-9.,_@%&?+=\~\/-]*)?(?:#[^ \'\"&<>]*)?$/i;
    return regURLrf.test(url)||regURL.test(url);
}

$(document).ready(function() {
	$("a.fancy").fancybox();
	$('textarea').autoResize({});
	
	$(':text.prompt').each(function(){
		text = $(this).attr('rel');
		value = $(this).val();
		if (value == '') $(this).val(text);
	});
	
	$(':text.prompt').blur(function(){
		text = $(this).attr('rel');
		value = $(this).val();
		if (value == '') $(this).val(text);
	});
	
	$(':text.prompt').focus(function(){
		text = $(this).attr('rel');
		value = $(this).val();
		if (value == text) $(this).val('');
	});
});
