$(function(){
	// Constants
	var userLoginDefaultUsername = 'Username';
	var userLoginDefaultPassword = 'Password';

	// Behaviours
	$('#template-login-username').focus(function() {
		if ($(this)[0].value == userLoginDefaultUsername) {
			$(this)[0].value = '';
		}
	});

	$('#template-login-username').blur(function() {
		if ($(this)[0].value == '') {
			$(this)[0].value = userLoginDefaultUsername;
		}
	});

	$('#template-login-password').focus(function() {
		if ($(this)[0].value == userLoginDefaultPassword) {
			$(this)[0].value = '';
		}
	});

	// Initialisation
	if ($('#template-login-username').length) {
		$('#template-login-username')[0].value = userLoginDefaultUsername;
	}
	if ($('#template-login-password').length) {
		$('#template-login-password')[0].value = userLoginDefaultPassword;
	}
});