/**
 * jQuery HTML 5 Placeholder Plugin
 * Copyright 2010, Martin Hipp, http://martinhipp.com
 * Released under the MIT and GPL licenses.
 */
(function($) {
    $.fn.placeholder = function() {
        if (!('placeholder' in document.createElement('input'))) {
            this.each(function() {
                var placeholder = $(this).attr('placeholder');
                
                $(this).css({color: '#999999'});
                
                $(this).val(placeholder).focus(function() {
                	$(this).css({color: '#333333'});
                
                    if ($(this).val() == placeholder) {
                        $(this).val('');
                    }
                }).blur(function() {
                	$(this).css({color: '#999999'});
                
                    if ($(this).val() == '') {
                        $(this).val(placeholder);
                    }
                });
            });
        }
    }
})(jQuery);
