/*
+-----------------------------------------------------------------------+
| Copyright (c) 2006-2007 Mika Tuupola, Dylan Verheul                   |
| All rights reserved.                                                  |  
|                                                                       |
| Redistribution and use in source and binary forms, with or without    |
| modification, are permitted provided that the following conditions    |
| are met:                                                              |
|                                                                       | 
| o Redistributions of source code must retain the above copyright      |
|   notice, this list of conditions and the following disclaimer.       |
| o Redistributions in binary form must reproduce the above copyright   |
|   notice, this list of conditions and the following disclaimer in the |
|   documentation and/or other materials provided with the distribution.|
|                                                                       |
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |
| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |
|                                                                       |
+-----------------------------------------------------------------------+
*/

/* $Id: jquery.jeditable.js 192 2007-08-13 15:02:22Z tuupola $ */

/**
  * jQuery inplace editor plugin (version 1.4.x)
  *
  * Based on editable by Dylan Verheul <dylan@dyve.net>
  * http://www.dyve.net/jquery/?editable
  *
  * @name  jEditable
  * @type  jQuery
  * @param String  target             POST URL or function name to send edited content
  * @param Hash    options            additional options 
  * @param String  options[name]      POST parameter name of edited content
  * @param String  options[id]        POST parameter name of edited div id
  * @param Hash    options[submitdata] Extra parameters to send when submitting edited content.
  * @param String  options[type]      text, textarea or select
  * @param Integer options[rows]      number of rows if using textarea
  * @param Integer options[cols]      number of columns if using textarea
  * @param Mixed   options[height]    'auto' or height in pixels
  * @param Mixed   options[width]     'auto' or width in pixels 
  * @param String  options[loadurl]   URL to fetch external content before editing
  * @param String  options[loadtype]  Request type for load url. Should be GET or POST.
  * @param String  options[loadtext]  Text to display while loading external content.
  * @param Hash    options[loaddata]  Extra parameters to pass when fetching content before editing.
  * @param String  options[data]      Or content given as paramameter.
  * @param String  options[indicator] indicator html to show when saving
  * @param String  options[tooltip]   optional tooltip text via title attribute
  * @param String  options[event]     jQuery event such as 'click' of 'dblclick'
  * @param String  options[onblur]    'cancel', 'submit' or 'ignore'
  * @param String  options[submit]    submit button value, empty means no button
  * @param String  options[cancel]    cancel button value, empty means no button
  * @param String  options[cssclass]  CSS class to apply to input form. 'inherit' to copy from parent.
  * @param String  options[style]     Style to apply to input form 'inherit' to copy from parent.
  * @param String  options[select]    true or false, when true text is highlighted
  *             
  */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.1V.c=5(E,14,I){4(8.1U===0){s(8)}6 1={E:E,x:\'1T\',F:\'F\',j:\'15\',n:\'Q\',o:\'Q\',1j:\'16\',Z:\'v\',P:\'1e\',1c:\'1S...\',p:{},k:{}};4(14){2.J(1,14)}6 10=2.c.d[1.j].10||5(){};6 b=2.c.d[1.j].b||5(){};6 H=2.c.d[1.j].H||2.c.d[\'M\'].H;6 l=2.c.d[1.j].l||2.c.d[\'M\'].l;6 u=2.c.d[1.j].u||2.c.d[\'M\'].u;I=I||5(){};2(8).h(\'1R\',1.1Q);2(8)[1.1j](5(e){6 3=8;4(3.B){s}1.n=(\'Q\'==1.n)?2(3).n():1.n;1.o=(\'Q\'==1.o)?2(3).o():1.o;3.B=R;3.C=2(3).V();3.D=\'\';6 f=1P.1O(\'1N\');4(1.12){4(\'1i\'==1.12){2(f).h(\'13\',2(3).h(\'13\'))}a{2(f).h(\'13\',1.12)}}4(1.G){4(\'1i\'==1.G){2(f).h(\'G\',2(3).h(\'G\'));2(f).1h(\'1g\',2(3).1h(\'1g\'))}a{2(f).h(\'G\',1.G)}}6 i=u.9(f,[1,3]);4(1.1f){1.O=1.1f;1.P=\'1e\'}a 4(1.1d){1.O=1.1d;1.P=\'1M\'}4(1.O){6 t=1a(5(){i.1b=R;l.9(f,[1.1c,1,3])},1L);6 p={};p[1.F]=3.F;4(2.X(1.p)){2.J(p,1.p.9(3,[3.C,1]))}a{2.J(p,1.p)}2.1K({j:1.P,1J:1.O,11:p,1I:5(w){1H.19(t);l.9(f,[w,1,3]);i.1b=A}})}a 4(1.11){l.9(f,[1.11,1,3])}a{l.9(f,[3.C,1,3])}i.x=1.x;H.9(f,[1,3]);3.1G(f);4(1.r){i.r()}10.9(f,[1,3]);2(":7:1F:1E:17",f).1D();2(i).1C(5(e){4(e.1B==1A){e.18();W()}});6 t;4(\'v\'==1.Z){2(i).Y(5(e){t=1a(W,1z)})}a 4(\'b\'==1.Z){2(i).Y(5(e){2(f).b()})}a{2(i).Y(5(e){})}2(f).b(5(e){4(t){19(t)}e.18();b.9(f,[1,3]);4(2.X(1.E)){6 N=1.E.9(3,[2(i).z(),1]);3.D=N;3.B=A;I.9(3,[3.D,1])}a{6 k={};k[i.x]=2(i).z();k[1.F]=3.F;4(2.X(1.k)){2.J(k,1.k.9(3,[3.C,1]))}a{2.J(k,1.k)}2(3).V(1.1y);2.1x(1.E,k,5(N){3.D=N;3.B=A;I.9(3,[3.D,1])})}s A});5 W(){3.D=3.C;3.B=A}});s(8)};2.c={d:{M:{u:5(1,g){6 7=2(\'<7 j="1w">\');2(8).q(7);s(7)},l:5(w,1,g){2(\':7:17\',8).z(w)},H:5(1,g){4(1.b){6 b=2(\'<7 j="b">\');b.z(1.b);2(8).q(b)}4(1.v){6 v=2(\'<7 j="1v">\');v.z(1.v);2(8).q(v);2(v).16(5(){2(g).V(g.C);g.B=A})}}},15:{u:5(1,g){6 7=2(\'<7>\');7.n(1.n);7.o(1.o);7.h(\'1u\',\'1t\');2(8).q(7);s(7)}},m:{u:5(1,g){6 m=2(\'<m>\');4(1.U){m.h(\'U\',1.U)}a{m.o(1.o)}4(1.T){m.h(\'T\',1.T)}a{m.n(1.n)}2(8).q(m);s(m)}},r:{u:5(1,g){6 r=2(\'<r>\');2(8).q(r);s(r)},l:5(w,1,g){4(1s==w.1r){1q("6 L = "+w);1p(6 y 1o L){4(\'S\'==y){1n}6 K=$(\'<K>\').z(y).q(L[y]);4(y==L[\'S\']){1m.1l(y);K[0].S=R}2("r",8).q(K)}}}}},1k:5(x,7){2.c.d[x]=7}};',62,120,'|settings|jQuery|self|if|function|var|input|this|apply|else|submit|editable|types|||original|attr||type|submitdata|content|textarea|width|height|loaddata|append|select|return||element|cancel|string|name|key|val|false|editing|revert|innerHTML|target|id|style|buttons|callback|extend|option|json|defaults|str|loadurl|loadtype|auto|true|selected|cols|rows|html|reset|isFunction|blur|onblur|plugin|data|cssclass|class|options|text|click|first|preventDefault|clearTimeout|setTimeout|disabled|loadtext|postload|GET|getload|display|css|inherit|event|addInputType|log|console|continue|in|for|eval|constructor|String|off|autocomplete|button|hidden|post|indicator|500|27|keyCode|keydown|focus|enabled|visible|appendChild|window|success|url|ajax|100|POST|form|createElement|document|tooltip|title|Loading|value|length|fn'.split('|'),0,{}))

