inputHelperIn = function(obj,text){
	if (obj.value == text){
	    $(obj).val('');
	}
}
inputHelperOut = function(obj,text){
	if (obj.value == '' || obj.value == text){
	    $(obj).val(text);
	}
}
inputHelperCreate = function(obj,text){
	$(obj).bind('focus',function(){
			inputHelperIn(this,text);
		}).bind('blur',function(){
			inputHelperOut (this,text);
		});
	inputHelperOut(obj,text);
}
$(document).ready(function(){
    inputHelperCreate($('#search input:text'),'поиск по сайту');
    inputHelperCreate($('#login_head'),'логин');
    inputHelperCreate($('#pass_head'),'ngimmer');
    inputHelperCreate($('#domen'),'имя домена');
    inputHelperCreate($('#domen_sidebar'),'имя домена');
	$('#login').css('visibility','hidden');
	$('.headlink:lt(1)').toggle(function(){
		$('#login').css('visibility','visible')
	},
		function(){
		$('#login').css('visibility','hidden');
	});
	$('#sall').click(function(){
		if ($('#sall').attr('checked')){
			$('input:checkbox').not('input:disabled').attr('checked','checked');
		}
		else {
			$('#sall').attr('checked','checked');
			$('input:checkbox').not('input:disabled').removeAttr('checked');
		};
	});
});