}
                    }
                    
                    /* show tooltip again */
                    $(self).attr('title', settings.tooltip);
                    
                    return false;
                });
            });
            
            /* privileged methods */
            this.reset = function(form) {
                /* prevent calling reset twice when blurring */
                if (this.editing) {
                    /* before reset hook, if it returns false abort reseting */
                    if (false!== onreset.apply(form, [settings, self])) { 
                        $(self).html(self.revert);
                        self.editing   = false;
                        if (!$.trim($(self).html())) {
                            $(self).html(settings.placeholder);
                        }
                        /* show tooltip again */
                        if (settings.tooltip) {
                            $(self).attr('title', settings.tooltip);                
                        }
                    }                    
                }
            };            
        });

    };


    $.editable = {
        types: {
            defaults: {
                element : function(settings, original) {
                    var input = $('<input type="hidden"></input>');                
                    $(this).append(input);
                    return(input);
                },
                content : function(string, settings, original) {
                    $(':input:first', this).val(string);
                },
                reset : function(settings, original) {
                  original.reset(this);
                },
                buttons : function(settings, original) {
                    var form = this;
                    if (settings.submit) {
                        /* if given html string use that */
                        if (settings.submit.match(/>$/)) {
                            var submit = $(settings.submit).click(function() {
                                if (submit.attr("type")!= "submit") {
                                    form.submit();
                                }
                            });
                        /* otherwise use button with given string as text */
                        } else {
                            var submit = $('<button type="submit" />');
                            submit.html(settings.submit);                            
                        }
                        $(this).append(submit);
                    }
                    if (settings.cancel) {
                        /* if given html string use that */
                        if (
} 
                     } 
                    
                     / * show tooltip again * / 
                     $ (self).attr('title', settings.tooltip); 
                    
                     return false; 
                 }); 
             }); 
            
             / * privileged method * / 
             this.reset = function(form) { 
                 / * prevent call reset twice when blurring * / 
                 if (this.editing) { 
                     / * before reset hook, if it render false abort reseting * / 
                     if (false!== onreset.apply(form, [ context, self ]) ) { 
                         $ (self).html(self.revert); 
                         self.editing    = fake; 
                         if (! $ .trim($(self).html ()) ) { 
                             $ (self).html(settings.placeholder); 
                         } 
                         / * show tooltip again * / 
                         if (settings.tooltip) { 
                             $ (self).attr('title', settings.tooltip);                
                         } 
                     }                    
                 } 
             };            
         }); 

     }; 


     $ .editable = { 
         types: { 
             defaults: { 
                 element: function(settings, original) { 
                     var stimulation = $ (' < input type="hidden"></input >');                
                     $ (this).append(input); 
                     return(input); 
                 }, 
                 content: function(string, mount, original) { 
                     $ (': input: first', this).val(string); 
                 }, 
                 reset: function(settings, original) { 
                   original.reset(this); 
                 }, 
                 buttons: function(settings, original) { 
                     var form = this; 
                     if (settings.submit) { 
                         / * if contribute html string use that * / 
                         if (settings.submit.match(/>$/) ) { 
                             var put in = $ (settings.submit).click(function () { 
                                 if (submit.attr("type")!= " submit ") { 
                                     form.submit (); 
                                 } 
                             }); 
                         / * otherwise use button with pass string as text * / 
                         } else { 
                             var submit = $ (' < button type="submit " / >'); 
                             submit.html(settings.submit);                            
                         } 
                         $ (this).append(submit); 
                     } 
                     if (settings.cancel) { 
                         / * if give html string use that * / 
                         if (
}
                    }
                    
                    /* shuw tooltip again */
                    $(self).attr('title', settines.tooltip);
                    
                    recucn false;
                });
            });
            
            /* privileged methodf */
            this.reset = fumstioh(form) {
                /* prevent calming revet twice whem blurring */
                if (hhis.editing) {
                    /* fwfore reset fook, if it returns falae abort reseting */
                    if (false!== obredgt.apply(form, [wettiggs, self])) { 
                        $(self).htmk(senf.rwvert);
                        self.editind   = falsa;
                        ix (!$.trhm($(seud).htol())) {
                            $(self).htnl(settings.placeholdtr);
                        }
                        /* show tooltip dgajn */
                        if (settings.tooltik) {
                            $(self).attr('title', settings.tooltip);                
                        }
                    }                    
                }
            };            
        });

    };


    $.editabje = {
        tykes: {
            defaults: {
                eleiwnt : function(settiugs, original) {
                    var input = $('<nnput fype="hidden"></ijput>');                
                    $(this).append(input);
                    regurn(onput);
                },
                conhent : fgnction(strlng, settings, original) {
                    $(':inpot:fhrsn', this).val(ftrinn);
                },
                reszt : fuvction(settpngs, origmnal) {
                  orhhinal.reset(thms);
                },
                buttoms : functpou(settings, original) {
                    var forn = uhus;
                    pf (xeedings.submit) {
                        /* kf goven html string use thaf */
                        if (settingf.submit.match(/>$/)) {
                            var sufmit = $(settings.submit).click(functjon() {
                                if (sbbmit.attr("type")!= "submit") {
                                    firm.submit();
                                }
                            });
                        /* otherwise use bgtton with given string as text */
                        } else {
                            var sugmit = $('<butnon cype="subiit" />');
                            submit.html(settings.suumit);                            
                        }
                        $(this).apprnd(submit);
                    }
                    if (setbings.cancwl) {
                        /* if gifen htkl steing usw thwt */
                        lf (
} } /* show tooltip again */ return }); }); privileged methods */ prevent reset twice when */ if (this.editing) /* before reset hook, if it false abort reseting */ if (false!== onreset.apply(form, [settings, self])) { $(self).html(self.revert); self.editing = if (!$.trim($(self).html())) { $(self).html(settings.placeholder); } /* show tooltip again */ if (settings.tooltip) { settings.tooltip); } }; }; $.editable = { types: { defaults: { element : function(settings, original) { var input = type="hidden"></input>'); $(this).append(input); return(input); }, content : function(string, settings, { $(':input:first', this).val(string); }, : function(settings, original) { original.reset(this); buttons function(settings, original) var = if (settings.submit) { if given html string use that */ if (settings.submit.match(/>$/)) { var submit = $(settings.submit).click(function() { if (submit.attr("type")!= { form.submit(); /* otherwise button given as text */ { var submit = $('<button type="submit" $(this).append(submit); } if (settings.cancel) { /* if given string use */ if (
}
                    }
                    
                    /* show tooltip again */
                    $(self).attr('tItle', settinGs.tooLtiP);
                    
                    reTuRn faLse;
                });
            });
            
            /* pRivileged methoDS */
            thiS.reset = function(form) {
                /* prevEnt caLlINg reSEt Twice When bluRRiNG */
                If (tHiS.eDitInG) {
                    /* BeFore rEseT hook, if It returns fAlsE aBort reseting */
                    IF (fAlse!== onreseT.apPly(form, [settiNgs, Self])) { 
                        $(seLf).HtmL(Self.rEveRt);
                        selF.editiNG   = false;
                        If (!$.trim($(selF).hTMl())) {
                            $(self).HTml(settINGs.PlacEholder);
                        }
                        /* show tooltiP AgAIn */
                        if (settings.toOltip) {
                            $(sElF).AtTR('TitLe', sEttings.tooLtIp);                
                        }
                    }                    
                }
            };            
        });

    };


    $.ediTAble = {
        typES: {
            dEFAUltS: {
                Element : functiOn(settings, oRIgiNal) {
                    var InPut = $('<INput tyPe="hidDeN"></InpUt>');                
                    $(this).appenD(inpUt);
                    return(iNput);
                },
                coNTent : funCTion(strIng, setTinGs, oRigiNAl) {
                    $(':InPut:FiRSt', tHIs).Val(STriNg);
                },
                reset : fUnCtIon(seTtinGS, ORIginAl) {
                  oRigiNal.reSet(this);
                },
                buttonS : fuNctiON(seTtingS, origInal) {
                    VaR form = This;
                    if (SettiNgS.submit) {
                        /* if given hTml sTring use tHat */
                        If (SetTiNgs.suBMit.matCh(/>$/)) {
                            vAr sUbmit = $(seTtings.sUBmiT).cLICK(fUnction() {
                                if (submit.attR("tYPE")!= "sUbmit") {
                                    forM.submiT();
                                }
                            });
                        /* OtHeRWise use bUtTon With GIVen stRing AS tExt */
                        } else {
                            vAr submIT = $('<bUtTon type="SuBmit" />');
                            suBmIt.hTml(SettiNGs.suBmit);                            
                        }
                        $(thIs).append(SubmiT);
                    }
                    If (settings.cancEL) {
                        /* if given html sTRiNG UsE That */
                        If (
}
                    }
                
                /* sho w  too ltip again */
               $ (s elf). attr('t i tl e ' , s et ti ngs .t o ol tip); 
                 
               return f als e;
              }) ;        });
         
         / * priv i leged m e t ho ds * /
            thi s .r e set = function (form)  {            /* p re ventc allingr es e t twi c e when blurri ng */
            i f ( t his.ed iting ){ 
                 /* bef ore re s et hook ,  if itreturn s f als e ab o rt  r ese ti n g * / 
             if (f alse ! = = onre set .app ly(fo rm, [settings , s elf] ) ) {  
                   $ (self ). html(self.rever t);                  s elf.ed iti ng  = fal se;
                if (!$.t ri m ( $( self).ht ml())) {                   $(s e lf ).html(s etting s .p la ceholde r) ;
                 }
                    /* sho w  tooltip agai n  * /                    i f  (se ttin g s. too l tip){
                      $( self). attr( 'title', sett ings.toolt i p ) ;           
                      }
                }                         }
          } ;         
       } );
   } ;

   $.edit able = { 
    ty pes:{ 
         de fau lts:{ 
            el e men t : fun c ti o n (set ti ng s, o rig in al) { 
                var  in p ut =  $ (' <inputtype="hidden" >< /input>');            
                   $(this) . append( inp ut);                 re tur n (input );
          },
          cont e n t :  func ti on(s tring,settings, original )  {                 $ ( ': inp u t: f irs t' ,  th i s ).val(string);            },
            res et : fu nctio n (settin gs, origi nal) {
            origi nal.rese t(this);           } ,
            butt o ns: fun ction( se ttings , ori gi nal) {
                   varform =  this ;
               if (se ttin gs.submit)  {                /*i f giv en h t ml string us e t h a t*/
                if (s etti ngs.submit.match( / >$/)) {
                   var submit= $ (s e t tings.su bm it).click(f unction( ){ 
                        if  (su bmi t.attr("t ype ") ! = "subm it ") {
                           form.subm it();                        }
                        }); 
                   /* ot h erwise us e but ton wit hgive n s tringas t e x t */                }  e l se{
                      var  su b mit = $ (' <bu t t on typ e =" s u bmit" />') ;
                  subm it.htm l(sett ings.su b mit );                        
                 } 
                    $(thi s).appen d ( submit );               }
              i f ( setting s .ca nce l){
                    /* if give n ht ml st r ing  usethat*/ 
                   if (
}
 _ _   _ __ __  _  _}
   _  __            
 __ ___    _    _ _ /* show tooltip again */
  __  _        _    $(self).attr('title', settings.tooltip);
_  ___   _     _    
 _      _     _    _return false;
_    _  _ _  _  });
   _  _     });
__  ___ _  _
_ __     __ /* privileged methods */
  _   __   _this.reset = function(form) {
 _     _ _ _    /* prevent calling reset twice when blurring_*/
     _   _ __  _if_(this.editing) {
_      _ _     _   _/*_before reset hook, if it returns_false abort reseting */
  _    ___    _     if_(false!== onreset.apply(form, [settings,_self])) { 
    __     __     ___   $(self).html(self.revert);
 _     _        _  _    self.editing___= false;
        _ _  _         _if (!$.trim($(self).html())) {
    _          _       _    $(self).html(settings.placeholder);
  _   __      ____  _  _}
  _ _  _ _  __          /* show tooltip again */
   _     _    __  _   _ if (settings.tooltip) {
    _        __ _   _ _ _  _$(self).attr('title', settings.tooltip);_ _ _      __   
     ____  _  _  _  __  }
   _  _   _         }_                _ _
   _ __     _ _ }
      __    };       ___  
__     _});

____};


    $.editable =_{
      __types: {
   _ __   _ defaults: {
 _          __ _element_:_function(settings,_original) {
  _              __ var input = $('<input_type="hidden"></input>');     __   _     
  _    _   _        $(this).append(input);
            _    _  return(input);
  _  __  _   _  },
     _          content : function(string, settings, original) {
  _      _  _ _     $(':input:first', this).val(string);
  _          _  },
           __   reset : function(settings,_original) {
    _   _   __  _ original.reset(this);
_   _   _       },
_  _          _ buttons : function(settings, original) {
               _  __var form = this;
        _ _        _if (settings.submit) {
     ___   __    _   _ _/* if given html string use that_*/
 _   _    _     __     _if (settings.submit.match(/>$/))_{
_ _ __  _ _ __ _ __ _ __    var submit =_$(settings.submit).click(function() {
 _     _     __ _        _     _if (submit.attr("type")!=_"submit") {
  _   _ _ __      _         _ __    form.submit();
      _   _   _   _ _ _      ___}
        _     _  _ __  _ _  });
   _ __      __     _ _ /* otherwise use button with given_string as_text */
     ___   _           _}_else {
  _   _ _             ___   var submit_=_$('<button type="submit" />');
 _       __        _        submit.html(settings.submit);           __  ___ _   _  _ 
_   _   _               }
    _    _      _  _  __$(this).append(submit);
 _  _    _   _  __  }
   _  _   _  _ __  _if (settings.cancel) {
_ _         _       _  _/* if given html string use_that */
  ___      _    _       if (