/*!
 * HTML5 Placeholder jQuery Plugin v1.5
 * @link http://github.com/mathiasbynens/Placeholder-jQuery-Plugin
 * @author Mathias Bynens <http://mathiasbynens.be/>
 */
(function(d){if('placeholder' in document.createElement('input')){d.fn.placeholder=function(){return this};return}function a(f){var h=d('<div>').append(f.clone()).html().replace(/<(\w+)\s+(.*)>/,'$2'),e,g={};while((e=h.match(/\s*([\w\-]+)=("[^"]*"|'[^']*'|\w+)/))){g[e[1]]=e[2].replace(/^(["'])(.*?)\1$/,'$2');h=h.replace(e[0],'')}return g}function b(){var e=d(this);if(e.val()===e.attr('placeholder')&&e.hasClass('placeholder')){if(e.data('placeholder-password')){e.next().show().focus().end().remove()}else{e.val('').removeClass('placeholder')}}}function c(g){var i,f=d(this);if(f.val()===''||f.val()===f.attr('placeholder')){if(f.is(':password')){try{i=f.clone().attr({type:'text'})}catch(h){i=d('<input>',d.extend(a(f),{type:'text'}))}i.data('placeholder-password',true).bind('focus.placeholder',b);f.hide().before(i);f=i}f.addClass('placeholder').val(f.attr('placeholder'))}else{f.removeClass('placeholder')}}d(function(){d('form').bind('submit.placeholder',function(){d('.placeholder',this).val('')})});d(window).bind('unload.placeholder',function(){d('.placeholder').val('')});d.fn.placeholder=function(){return this.filter(':input[placeholder]').bind({'focus.placeholder':b,'blur.placeholder':c}).trigger('blur.placeholder').end()}})(jQuery);
