jQuery.fn.movableLabel = function () {
	return this.each( function (index) {
		if ( this.htmlFor ) {
			var label = jQuery ( this );
			var input = jQuery ( '#' + this.htmlFor);

			if ( !input ) {
				return false;
			}

			label.hide ();

			var inputPosition = input.position();

			var positionX = inputPosition.left;
			var positionY = inputPosition.top;

			label.css({
				'position': 'absolute',
				'left':     positionX + 'px',
				'top':      positionY + 'px',
				'cursor':  'text'
			});
			input.focus(function(){
				label.hide();
			});

			input.blur(function(){
				if ( this.value == '')
					label.show();
			});

			label.click(function() {
				label.hide();
			});

			if ( input.val() == '')
				label.show();

		}
	} );
}
