Am a newbie with jquery implementations I currently want to implement an overlay and a dialog the same way its used for this sites login can anybody help me implement this stuff

maybe this help, this is my login script using jquery

<?php session_start();	


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link type="text/css" href="jquery/css/south-street/jquery-ui-1.8.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="jquery/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript">
	$(function() {
		username = $("#username"),
		password = $("#password"),
		allFields = $([]).add(username).add(password),

		// Dialog			
			autoOpen: true,
			width: 330,
			height: 170,
			hide: 'explode',
			buttons: {
				"Login": function() { 
					var f1 = document.getElementById('username').value.replace(/^\s+|\s+$/g, '');
					var f2 = document.getElementById('password').value.replace(/^\s+|\s+$/g, '');
					if(f1 == '') username.addClass('ui-state-error');
					else if(f2 == '') password.addClass('ui-state-error');
					else document.location.href='login.process.php?username=' + f1 + '&password=' + f2;
			close: function() {


<style type="text/css">
	/*demo page css*/
	body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}


	<!-- ui-dialog -->
	<div id="login" title="User Authentication">
		<form style="padding:0px; margin:0px;">	
		<table style="width:100%">
				<td>Username</td><td><input type="text" name="username" id="username" class="text ui-widget-content ui-corner-all" style="padding:5px;" /></td>
                <td rowspan="2" style="vertical-align:top; text-align:right;" ><img src="images/user_info_64.png" /></td>
				<td>Password</td><td><input type="password" name="password" id="password" class="text ui-widget-content ui-corner-all" style="padding:5px;" /></td>