/*!
 * HTML5 Placeholder jQuery Plugin v1.2
 * @link http://github.com/mathiasbynens/Placeholder-jQuery-Plugin
 * @author Mathias Bynens <http://mathiasbynens.be/>
 */
(function(a){a.fn.placeholder=function(){
    if(this[0]&&'placeholder' in document.createElement('input')){
      return this
    }
      
    function b(c){
      if(c.val()===''||c.val()===c.attr('placeholder')){
	c.addClass('placeholder').val(c.attr('placeholder'))
      }else{
	c.removeClass('placeholder')
      }
    }
    
    a('form:has([placeholder])').submit(
      function(){
	a('.placeholder',this).val('')
      });
    
    a(window).unload(
      function(){
	a('.placeholder').val('')
      });
    
      return this.each(
	function(){var c=a(this);
          if(c.is(':password')||!c.is(':input')){
	    return
	  }
	  
	  b(c);
	  
	  c.focus(
	    function(){
	      if(c.val()===c.attr('placeholder')){
		c.val('').removeClass('placeholder')
	      }
	    }).blur(function(){ b(c) })
	})
      }

})(jQuery);
