$(document).ready(
		  		function() {
		  		
		  		
		  		$('input').keydown(function(event) {
				  if (event.keyCode == '13') {
				     $('#loginForm').submit();
				   }
				});
		  		

		  		
        		$('.singleColumn').hover(
        			function() { 
						$('.sub', this).fadeIn("fast");
            			var x = $('.sub', this).width();
            			var y = $(this).width();
            			var wx = -(x/2 - y/2);
            			$('.sub', this).css('left', wx);
    				},
    				function() { 
    					$('.sub', this).fadeOut("fast");
            		}
            	);
            	
            	$('.butt').mousedown(
	                function() { 
	                	$(this).addClass("active");
	                 	}
	                );
	                
	            $('.butt').mouseup(
	                function() { 
	                	$(this).removeClass("active");
	                 	}
	                );

				$('#login').mousedown(
	                function() { 
	                	$('#loginForm').submit();
	                 	}
	                );

				$('#password-clear').show();
					$('#password-password').hide();
				 
					$('#password-clear').focus(function() {
						$('#password-clear').hide();
						$('#password-password').show();
						$('#password-password').focus();
					});
					$('#password-password').blur(function() {
						if($('#password-password').val() == '') {
							$('#password-clear').show();
							$('#password-password').hide();
						}
					});
				 
					$('.default-value').each(function() {
						var default_value = this.value;
						$(this).focus(function() {
							if(this.value == default_value) {
								this.value = '';
							}
						});
						$(this).blur(function() {
							if(this.value == '') {
								this.value = default_value;
							}
						});
					});

    		});

