(function(a){
a.fn.example=function(e,c){
var d=a.isFunction(e);
var b=a.extend({},c,{example:e});
return this.each(function(){
var f=a(this);
if(a.metadata){
var g=a.extend({},a.fn.example.defaults,f.metadata(),b);
}else{
var g=a.extend({},a.fn.example.defaults,b);
}
if(!a.fn.example.boundClassNames[g.className]){
a(window).unload(function(){
a("."+g.className).val("");
});
a("form").submit(function(){
a(this).find("."+g.className).val("");
});
a.fn.example.boundClassNames[g.className]=true;
}
if(a.browser.msie&&!f.attr("defaultValue")&&(d||f.val()==g.example)){
f.val("");
}
if(f.val()==""&&this!=document.activeElement){
f.addClass(g.className);
f.val(d?g.example.call(this):g.example);
}
f.focus(function(){
if(a(this).is("."+g.className)){
a(this).val("");
a(this).removeClass(g.className);
}
});
f.change(function(){
if(a(this).is("."+g.className)){
a(this).removeClass(g.className);
}
});
f.blur(function(){
if(a(this).val()==""){
a(this).addClass(g.className);
a(this).val(d?g.example.call(this):g.example);
}
});
});
};
a.fn.example.defaults={className:"example"};
a.fn.example.boundClassNames=[];
})(jQuery);


