// hoverlabels.js
// --------------
// adapted from code by John Resig
$(document).ready(function() {
	$("label.hover+input")
		.wrap('<div class="hover-wrap"></div>')
		.focus(function() {
			$(this).prev().hide();
		})
		.blur(function() {
			if (!this.value) {
				$(this).prev().show();
			}
		})
		.each(function(i) {
			$(this).before($(this).parent().prev());
			// hide the label if the input field already has a value
			if (this.value) {
				$(this).prev().hide();
			}
		});
});