(function($){
	var input = document.createElement("input");
	
	if (('placeholder' in input) == false) {
		$(function(){	
			$('input[placeholder]')
				.wrap("<span class='placeholder_holder'></span>")
				.each(function(){
					$(this).parent().append('<span class="placeholder">' +
						$(this).attr('placeholder') + '</span>');

				}).focus(function(){
					$('.placeholder', $(this).parent()).hide();
				}).blur(function(){
					if ($(this).val() == '') {
						$('.placeholder', $(this).parent()).show();
					}
				});
			$('.placeholder_holder .placeholder').click(function(){
						$(this).parent().find('input[placeholder]').focus();
					});
		});
	}
})(jQuery);

/*
 * style:
	.placeholder_holder {position: relative; display: inline-block;}
	.placeholder_holder .placeholder {position: absolute; z-index: 2; top: 0; left: 0; margin: 5px 0 0 5px;}
 */
