/*
 * Placeholder
 * Author: Lukas Pesl
 * Version: 0.1
 * 
 */   

(function($){
	$.fn.extend({ 
		placeholder: function(options) {

			var defaults = {
			};

			var options = $.extend(defaults, options);
		
  		return this.each(function() {
				var obj = $(this);
				var inputs = $('input[placeholder!=""], textarea[placeholder!=""]', obj);

				inputs.each(function() {
          if ($(this).val() == '') $(this).val($(this).attr('placeholder'));   
				});
				inputs.focus(function() {
          if ($(this).val() == $(this).attr('placeholder')) $(this).val('');   
				});
				inputs.blur(function() {
          if ($(this).val() == '') $(this).val($(this).attr('placeholder'));   
				});
				
  		});
  	}
	});
})(jQuery);



