
		$(document).ready(function(){
			$('#loginform').bind('submit', function() {
				$(this).ajaxSubmit({
					dataType: 'json',
					beforeSubmit: function(){
						$('#data').hide()
						$('#loading').show()
					},
					success: function(text){
						if(text.suc == '1'){
							var href = location.href=location.href.split(/\?|#/)[0];   
							location.href = '/admin'
						}else {
							$('#loading').hide()
							$('#data').empty().append('Логин или пароль не правильный!').show();
						}
					}
				});
				return false; // <-- important!
			});
		});
