(function ($) {
	var onDocReady = function () {
		$('#access #searchform-top input').bind('focus blur', function (e) {
			var $this = $(this), 
				type = e.type, 
				defaultValue = 'Поиск…';
			switch (type) {
				case 'blur':
					if (($.trim($this.val())).length == 0 || $this.val() == defaultValue) {
						$this.addClass('default').val(defaultValue);
					}
					break;
				case 'focus':
					if ($this.is('.default')) {
						$this.removeClass('default').val('');
					}
					break;
			}
		}).trigger('blur').parents('form').bind('submit', function () {
			var i = $(this).find('input');
			if (i.val() == 'Поиск…') {
				alert('Введите, пожалуйста, строку поиска!');
				i.focus();
				return false;
			}
		});
	};
	$(document).bind('ready', onDocReady);
})(jQuery);