/*
* jQuery emptyonclick plugin
*
* Created by Rene Kreupl
*
* Version: 1.2
*/

jQuery.fn.extend({
    emptyonclick: function(options) {
        return this.each(function() {
            new jQuery.EmptyOnClick(this, options);
        });
    }
});

jQuery.EmptyOnClick = function(element, options) {
    var defaultValue = $(element).val();
    
    $(element).bind("focus", function(e) {
      if(defaultValue == $(this).val()) {
        $(this).val('');
      }
    });
    $(element).bind("blur", function(e) {
        if(!$(this).val()) {
            $(this).val(defaultValue);
        }
    });
};
