right-rails 0.6.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/CHANGELOG +8 -0
  2. data/README.rdoc +71 -0
  3. data/Rakefile +144 -14
  4. data/generators/right_rails/right_rails_generator.rb +18 -21
  5. data/init.rb +11 -32
  6. data/lib/generators/right_rails/right_rails_generator.rb +27 -0
  7. data/lib/generators/right_rails/templates/iframed.html.erb +10 -0
  8. data/lib/right-rails.rb +1 -1
  9. data/lib/right_rails/config.rb +278 -0
  10. data/lib/right_rails/controller_extensions.rb +10 -5
  11. data/lib/right_rails/helpers/basic.rb +10 -66
  12. data/lib/right_rails/helpers/forms.rb +141 -139
  13. data/lib/right_rails/helpers/misc.rb +45 -67
  14. data/lib/right_rails/helpers/rails.rb +40 -105
  15. data/lib/right_rails/helpers.rb +364 -1
  16. data/lib/right_rails/java_script_generator.rb +34 -24
  17. data/lib/right_rails.rb +6 -1
  18. data/{images → public/images}/colorpicker.png +0 -0
  19. data/{images → public/images}/resizable.png +0 -0
  20. data/public/javascripts/right/autocompleter-src.js +612 -0
  21. data/public/javascripts/right/autocompleter.js +18 -0
  22. data/public/javascripts/right/calendar-src.js +1448 -0
  23. data/public/javascripts/right/calendar.js +36 -0
  24. data/public/javascripts/right/colorpicker-src.js +967 -0
  25. data/public/javascripts/right/colorpicker.js +26 -0
  26. data/{javascripts/right-dnd-src.js → public/javascripts/right/dnd-src.js} +86 -52
  27. data/public/javascripts/right/dnd.js +20 -0
  28. data/{javascripts/right-effects-src.js → public/javascripts/right/effects-src.js} +90 -45
  29. data/public/javascripts/right/effects.js +17 -0
  30. data/{javascripts/right-ui-i18n-de.js → public/javascripts/right/i18n/de.js} +7 -7
  31. data/{javascripts/right-ui-i18n-en-us.js → public/javascripts/right/i18n/en-us.js} +1 -1
  32. data/{javascripts/right-ui-i18n-es.js → public/javascripts/right/i18n/es.js} +7 -7
  33. data/{javascripts/right-ui-i18n-fr.js → public/javascripts/right/i18n/fr.js} +7 -7
  34. data/{javascripts/right-ui-i18n-hu.js → public/javascripts/right/i18n/hu.js} +7 -7
  35. data/{javascripts/right-ui-i18n-jp.js → public/javascripts/right/i18n/jp.js} +7 -7
  36. data/{javascripts/right-ui-i18n-nl.js → public/javascripts/right/i18n/nl.js} +7 -7
  37. data/{javascripts/right-ui-i18n-pt-br.js → public/javascripts/right/i18n/pt-br.js} +7 -7
  38. data/{javascripts/right-ui-i18n-ru.js → public/javascripts/right/i18n/ru.js} +7 -7
  39. data/{javascripts/right-ui-i18n-ua.js → public/javascripts/right/i18n/ua.js} +17 -12
  40. data/public/javascripts/right/in-edit-src.js +352 -0
  41. data/public/javascripts/right/in-edit.js +13 -0
  42. data/public/javascripts/right/json-src.js +160 -0
  43. data/public/javascripts/right/json.js +10 -0
  44. data/public/javascripts/right/lightbox-src.js +881 -0
  45. data/public/javascripts/right/lightbox.js +24 -0
  46. data/{javascripts/right-rails-src.js → public/javascripts/right/rails-src.js} +195 -171
  47. data/public/javascripts/right/rails.js +14 -0
  48. data/public/javascripts/right/rater-src.js +366 -0
  49. data/public/javascripts/right/rater.js +13 -0
  50. data/public/javascripts/right/resizable-src.js +420 -0
  51. data/public/javascripts/right/resizable.js +15 -0
  52. data/public/javascripts/right/selectable-src.js +687 -0
  53. data/public/javascripts/right/selectable.js +22 -0
  54. data/public/javascripts/right/slider-src.js +377 -0
  55. data/public/javascripts/right/slider.js +14 -0
  56. data/public/javascripts/right/sortable-src.js +392 -0
  57. data/public/javascripts/right/sortable.js +16 -0
  58. data/public/javascripts/right/tabs-src.js +1123 -0
  59. data/public/javascripts/right/tabs.js +29 -0
  60. data/public/javascripts/right/tooltip-src.js +307 -0
  61. data/public/javascripts/right/tooltip.js +12 -0
  62. data/public/javascripts/right/uploader-src.js +283 -0
  63. data/public/javascripts/right/uploader.js +13 -0
  64. data/{javascripts → public/javascripts}/right-olds-src.js +134 -186
  65. data/public/javascripts/right-olds.js +18 -0
  66. data/public/javascripts/right-safe-src.js +161 -0
  67. data/public/javascripts/right-safe.js +8 -0
  68. data/{javascripts → public/javascripts}/right-src.js +2558 -1750
  69. data/public/javascripts/right.js +92 -0
  70. data/spec/lib/right_rails/config_spec.rb +133 -0
  71. data/spec/lib/right_rails/controller_extensions_spec.rb +1 -1
  72. data/spec/lib/right_rails/helpers/basic_spec.rb +77 -66
  73. data/spec/lib/right_rails/helpers/forms_spec.rb +231 -33
  74. data/spec/lib/right_rails/helpers/misc_spec.rb +94 -26
  75. data/spec/lib/right_rails/helpers/rails_spec.rb +42 -7
  76. data/spec/lib/right_rails/helpers_spec.rb +125 -0
  77. data/spec/lib/right_rails/java_script_generator_spec.rb +30 -0
  78. data/spec/rcov.opts +3 -0
  79. data/spec/spec_helper.rb +12 -7
  80. metadata +70 -61
  81. data/README.textile +0 -69
  82. data/javascripts/right-autocompleter-src.js +0 -318
  83. data/javascripts/right-autocompleter.js +0 -9
  84. data/javascripts/right-behavior-src.js +0 -261
  85. data/javascripts/right-behavior.js +0 -8
  86. data/javascripts/right-calendar-src.js +0 -946
  87. data/javascripts/right-calendar.js +0 -9
  88. data/javascripts/right-colorpicker-src.js +0 -635
  89. data/javascripts/right-colorpicker.js +0 -9
  90. data/javascripts/right-dnd.js +0 -9
  91. data/javascripts/right-effects.js +0 -6
  92. data/javascripts/right-events-src.js +0 -321
  93. data/javascripts/right-events.js +0 -6
  94. data/javascripts/right-in-edit-src.js +0 -194
  95. data/javascripts/right-in-edit.js +0 -6
  96. data/javascripts/right-json-src.js +0 -141
  97. data/javascripts/right-json.js +0 -6
  98. data/javascripts/right-lightbox-src.js +0 -651
  99. data/javascripts/right-lightbox.js +0 -9
  100. data/javascripts/right-olds.js +0 -9
  101. data/javascripts/right-rails.js +0 -9
  102. data/javascripts/right-rater-src.js +0 -253
  103. data/javascripts/right-rater.js +0 -9
  104. data/javascripts/right-resizable-src.js +0 -336
  105. data/javascripts/right-resizable.js +0 -9
  106. data/javascripts/right-selectable-src.js +0 -565
  107. data/javascripts/right-selectable.js +0 -7
  108. data/javascripts/right-slider-src.js +0 -288
  109. data/javascripts/right-slider.js +0 -7
  110. data/javascripts/right-sortable-src.js +0 -225
  111. data/javascripts/right-sortable.js +0 -9
  112. data/javascripts/right-tabs-src.js +0 -937
  113. data/javascripts/right-tabs.js +0 -6
  114. data/javascripts/right-tooltips-src.js +0 -195
  115. data/javascripts/right-tooltips.js +0 -9
  116. data/javascripts/right-uploader-src.js +0 -167
  117. data/javascripts/right-uploader.js +0 -9
  118. data/javascripts/right.js +0 -7
@@ -1,6 +0,0 @@
1
- /**
2
- * Unified tabs engine for RightJS (http://rightjs.org/ui/tabs)
3
- *
4
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
5
- */
6
- if (!RightJS) throw "Gimme RightJS";eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("19 41=130 172(Observer,{extend:{EVENTS:$w('51 hide 166 load 91 121 add 58 move'),Options:{145:'',14Element:64,111:'both',134:400,2241:95,22174:400,142:64,29:[],closable:95,loop:95,loopPause:148,url:95,132:95,Xhr:64,68:64},rescan:16(s){($(s)||107).select('*.13-14').each(16(e){if(!e._14)130 41(e)})}},48:16(e,o){11.17=$(e);11.$super(o||eval('('+11.17.get('data-14-24')+')'));11.17._14=11.init()},destroy:16(){delete(11.17._14)},51:16(t){18 11.100(t,'51')},91:16(t){18 11.100(t,'91')},121:16(t){18 11.100(t,'121')},100:16(t,m){if(isArray(t))t.each(11[m],11);85 if(t=isNumber(t)?11.14[t]:t)t[m]();18 11},init:16(){11.32=11.17.167=='DL';11.42=11.17.119('13-14-57');11.isSimple=!11.32&&!11.42;11.find41();11.17.39('13-14');if(11.isSimple)11.17.39('13-14-54');18 11.91(11.24.29)},find41:16(){11.14171=11.32?11.17:$(11.24.14Element)||11.17.43('.13-14-104')||11.17.43('UL').39('13-14-104');11.14=11.14171.subNodes(11.32?'dt':64).map(16(n){18 130 41.158(n,11)},11)},find175:16(t){19 a=11.24.145+t.id,p;if(11.32){19 n=t.17.next();p=(n&&n.167=='DD')?n:$E('DD').59To(t.17,'after')}85 p=$(a)||$E(11.17.167=='UL'?'LI':'DIV').59To(11.17);18 p.set('id',a)}});41.158=130 172({extend:{autoId:0},48:16(e,c){11.17=e.39('13-14-36');11.21=c;11.17.161(11.166.62(11)).129('s90Event');11.findLink();11.26=130 41.175(c.find175(11),11);if(c.24.closable)11.link.59($E('67',{'63':'13-14-36-close-icon','html':'&times;'}).161(11.58.62(11)).129('s90Event'))},166:16(e){e.s90();18 11.81('166').51()},51:16(){if(11.52()){19 p=11.21.14.43('25');if(p)p.81('hide');11.17.radio172('13-14-25');11.21.22To158(11);11.26.51();11.81('51')}18 11},91:16(){11.17.39('13-14-29');18 11.81('91')},121:16(){11.17.58172('13-14-29');18 11.81('121')},29:16(){18!11.52()},52:16(){18!11.17.119('13-14-29')},25:16(){18 11.17.119('13-14-25')},58:16(a){if(a)a.s90();if(11.25()){19 e=11.21.14.49('52');19 s=e[e.70(11)+1]||e[e.70(11)-1];if(s)s.51()}11.21.14.splice(11.21.14.70(11),1);11.17.58();11.26.58();18 11},46:16(){18 11.17.86+11.17.112('38Right').162()},81:16(e){11.21.81(e,11);18 11},findLink:16(){11.link=11.17.43('a');11.id=11.link.href.135('#')[1]||(11.21.24.145+(41.158.autoId++))}});41.175=130 172(Observer,{48:16(e,t){11.36=t;11.id=e.id;11.17=e.39('13-14-26')},51:16(){18 11.120(16(){11.36.21.14.each(16(t){19 e=t.26.17;e[e==11.17?'39':'58172']('13-14-26-25')},11)})},122:16(c){if(11.36.25())11.120(16(){11.17.122(c||'')});85 11.17.122(c||'');18 11},58:16(){11.17.58();18 11},lock:16(){11.17.59(11.53(),'90')},120:16(c){19 a=11.36.21;if(a.82)18 11.120.62(11,c).155(98);19 o=a.24;19 i=a.17.43('.13-14-26-25');19 t=11.17;19 k=i!=t;19 l=11.17.43('67.13-14-26-53');if(t.75.119('13-14-102'))t.59To(i.75);if(o.111&&self.Fx&&i&&(k||l)){a.82=148;19 u=16(){a.82=95};19 e=(o.111=='both'&&l)?'133':o.111;19 d=o.134;d=Fx.174s[d]||d;19 r=e=='fade'?0:e=='133'?d:d/2;19 f=d-r;if(e!='133')t.setStyle({31:0});19 j=(a.32&&k)?0:i.80;c.call(11);19 n=t.80;19 g=64;if(e!='fade'&&j!=n){a.17.92.27=a.17.80+'px';g=$E('67',{'63':'13-14-102','92':'27: '+j+'px'});if(a.32&&k){i.39('13-14-26-25');19 h=$E('67',{'63':'13-14-102'});h.92.27=i.80+'px';19 p=16(){h.153(i.58172('13-14-26-25'))};i.wrap(h);g.92.27='141'}t.wrap(g);a.17.92.27='auto'}85{rezise_113=0;d=f}19 b=0;19 s=16(){if(g){if(e=='both'&&!b)18 b++;g.153(t)}u()};if(h)h.160({27:'141'},{113:r,146:p});if(g)g.160({27:n+'px'},{113:r,146:s});if(e!='133')t.160.62(t,{31:1},{113:f,146:s}).155(r);if(!g&&e=='133')s()}85 c.call(11);18 11},53:16(){if(!11._53){19 l=$E('67',{'63':'13-14-26-53'});19 s=$E('67',{'63':'13-14-26-53-128'}).59To(l);19 d='1234'.135('').map(16(a){18 $E('67',{'63':a==1?'glow':64}).59To(s)});(16(){s.59(d.last(),'90');d.unshift(d.pop())}).periodical(400);11._53=l}18 11._53}});41.87((16(){19 d=41.96.init;18{next:16(){18 11.pick158(+1)},prev:16(){18 11.pick158(-1)},22Left:16(){18 11[11.42?'prev':'125'](+0.6)},22Right:16(){18 11[11.42?'next':'125'](-0.6)},init:16(){d.call(11);if(11.22able=(11.24.2241||11.42))11.140();18 11},140:16(){if(11.17.43('.13-14-22er')){11.76=11.17.43('.13-14-22-35');11.72=11.17.43('.13-14-22-13')}85{11.76=$E('67',{'63':'13-14-22-35','html':'&laquo;'});11.72=$E('67',{'63':'13-14-22-13','html':'&raquo;'});11.17.59($E('67',{'63':'13-14-22er'}).59([11.76,11.72,$E('67',{'63':'13-14-22-body'}).59(11.14171)]),'90')}11.76.129(11.22Left.62(11));11.72.129(11.22Right.62(11))},pick158:16(p){19 c=11.14.43('25');if(c&&c.52()){19 e=11.14.49('52');19 t=e[e.70(c)+p];if(t)t.51()}},22To158:16(t){if(11.22able){19 b=0;for(19 i=0;i<11.14.94;i++){b+=11.14[i].46();if(11.14[i]==t)break}19 a=11.14171.75.86;19 s=(11.42?(a/2+t.46()/2):a)-b;if(!11.42){19 c=11.14171.112('35').162()||0;if(s>=c&&s<(c+a-t.46()))s=c;85 if(c>-b&&c<=(t.46()-b))s=t.46()-b}11.22To(s)}},125:16(s){19 c=11.14171.112('35').162()||0;19 a=11.14171.75.86;11.22To(c+a*s)},22To:16(s){19 c=11.14171.112('35').162()||0;19 a=11.14171.75.86;19 o=0;for(19 i=0;i<11.14.94;i++)o+=11.14[i].46();if(s<(a-o))s=a-o;if(s>0)s=0;19 b={35:s+'px'};if(11.24.22174&&self.Fx&&c!=s)11.14171.160(b,{113:11.24.22174});85 11.14171.setStyle(b);11.106(o,a,s)},106:16(o,a,s){19 h=115=95;if(11.42){19 e=11.14.49('52');19 c=e.43('25');if(c){19 i=e.70(c);h=i>0;115=i<e.94-1}}85{h=s!=0;115=s>(a-o)}11.76[h?'58172':'39']('13-14-22-29');11.72[115?'58172':'39']('13-14-22-29')}}})());41.87((16(){19 d=41.96.48;19 g=16(){18 self.68?(68.get('13-14-indexes')||'').135(','):[]};19 s=16(o,a,t){if(self.68){19 i=g();i=i.without.138(i,a.map('id'));i.push(t.id);68.set('13-14-indexes',i.uniq().join(','),o)}};18{48:16(){d.138(11,84);11.159();if(11.24.68)11.onShow(s.curry(11.24.68,11.14))},159:16(){19 c;if(11.24.142!==64)c=11.24.142;85{19 e=11.14.49('52');c=e[11.urlIndex()]||e[11.151()]||e.43('25')||e[0]}if(c)c.51()},urlIndex:16(){19 b=-1,a=107.location.href.135('#')[1];if(a)for(19 i=0;i<11.14.94;i++)if(11.14[i].id==a){b=i;break}18 b},151:16(){19 a=-1;if(11.24.68){19 b=g();for(19 i=0;i<11.14.94;i++)if(b.87(11.14[i].id)){a=i;break}}18 a}}})());41.87({add:16(a,c,o){19 o=o||{};19 e=$E(11.32?'dt':'li').59($E('a',{html:a,href:o.url||'#'+(o.id||'')})).59To(11.14171);19 t=130 41.158(e,11);t.26.17.122(c||'');11.14.push(t);if(defined(o.37))11.move(t,o.37);18 11.81('add',t)},move:16(t,p){19 t=11.14[t]||t;if(11.14[p]&&11.14[p]!==t){11.14[p].17.59(t.17,(p==11.14.94-1)?'after':'before');if(11.32)t.17.59(t.26.17,'after');11.14.splice(11.14.70(t),1);11.14.splice(p,0,t);11.81('move',t,p)}18 11},58:16(t){18 11.100(t,'58')}});41.158.87((16(){19 c=41.158.96.51;18{51:16(){if(11.dogPiling(84))18 11;19 a=c.138(11,84);19 u=11.link.href;19 o=11.21.24;if(u.87s('#'))u=o.url?o.url.153('%{id}',u.135('#')[1]):64;if(u&&!11.154&&!(o.132||11.132)){11.26.lock();try{11.154=130 Xhr(u,Object.merge({method:'get'},o.Xhr)).onComplete(16(r){if(11.21.82)18 84.callee.62(11,r).155(98);11.26.122(r.131);11.154=64;if(o.132)11.132=148;11.81('load')}.62(11)).send()}catch(e){if(!Browser.OLD)throw(e)}}18 a},dogPiling:16(b){if(11.21.82){if(11.21.103)11.21.103.cancel();11.21.103=(16(a){11.51.138(11,a)}).62(11,b).155(98);18 148}18 11.21.103=64}}})());41.87((16(){19 o=41.96.48;18{48:16(){o.138(11,84);if(11.24.loop)11.137()},137:16(d){if(!d&&!11.24.loop)18 11;if(11.24.loopPause){11._s90173=11._s90173||11.s90173.62(11,148);11.74=11.74||11.137.62(11,d);11.105().on({mouseover:11._s90173,mouseout:11.74})}if(11.114)11.114.s90();11.114=16(){19 e=11.14.49('52');19 c=11.14.43('25');19 n=e[e.70(c)+1];11.51(n||e.43())}.62(11).periodical(11.24.loop||d);18 11},s90173:16(e,p){if(11.114){11.114.s90();11.114=64}if(!p&&11.74)11.105()},105:16(){18 11.17.s90Observing('mouseover',11._s90173).s90Observing('mouseout',11.74)}}})());107.onReady(16(){41.rescan()});107.write(\"<92 type=\\\"131/css\\\">.13-14,.13-14-104,.13-14-36,.13-14-26,.13-14-22-35,.13-14-22-13,.13-14-22-body,.13-14-26-53,.13-14-102{38:0;56:0;28:83;20:83;104-92:83;69:136;46:auto;27:auto}.13-14{20-47:101 116 #127}.13-14-102{144:hidden}.13-14-36,.13-14-36 a{69:136;float:35}.13-14-36 a{37:79;124:152;131-decoration:83;20:101 116 #127;28:#DDD;55:#444;-108-20-30:.3em;-61-20-30:.3em}.13-14-36 a:89{20-55:#127;28:#EEE}.13-14-36.13-14-25 a{font-weight:bold;55:#000;28:#FFF}.13-14-36 a 156{20:83;31:.6;49:118(31=60)}.13-14-36 a:89 156,.13-14-36.13-14-25 a 156{31:1;49:118(31=98)}.13-14-29 a,.13-14-29 a:89{28:#EEE;20-55:#DDD;55:#AAA;124:default}.13-14-29 a 156,.13-14-29 a:89 156{31:.5;49:118(31=50)}.13-14-36-close-icon{69:in149-136;*69:in149;*zoom:1;38-13:-0.5em;38-35:0.5em;124:152;31:0.5;49:118(31=50)}.13-14-36-close-icon:89{31:1;49:118(31=98);55:#B00;131-shadow:#888 .15em .15em .109}.13-14-26{69:83;37:79;min-27:4em;56:.5em 0}.13-14-26-25{69:136}.13-14-26-53{37:147;90:141;35:141;31:0.5;49:118(31=50);28:#127;46:98%;27:98%;131-align:center;149-27:98%}.13-14-26-53-128{37:147;35:44%;90:44%}.13-14-26-53-128 67{float:35;28:#777;46:.5em;27:110;38-13:.110;-108-20-30:.110;-61-20-30:.110}.13-14-26-53-128 67.glow{28:#444;27:1.109;38-90:-0.110}.13-14-22er{56:0 1.4em;37:79;38-47:.5em}.13-14-22-35,.13-14-22-13{46:1.110;131-align:center;28:#EEE;55:#666;124:152;20:101 116 #127;-108-20-30:.109;-61-20-30:.109;37:147;90:141;35:141;z-index:98}67.13-14-22-35:89,67.13-14-22-13:89{55:#000;28:#DDD;20-55:#AAA}.13-14-22-13{35:auto;13:141}.13-14 .13-14-22er .13-14-22-29,.13-14 .13-14-22er .13-14-22-29:89{124:default;28:#DDD;20-55:#DDD;55:#AAA}.13-14-22-body{46:98%;144:hidden;37:79;z-index:50}.13-14-22er .13-14-104{37:79;46:999em;38:0}.13-14-54 .13-14-104{27:109;56:0 110;20-47:101 116 #127}.13-14-54 .13-14-36{38-90:-101;38-13:101}.13-14-54 .13-14-36 a{149-27:1.8em;38-90:.109;56:0 110;20-47:83;-108-20-30-4735:0;-108-20-30-4713:0;-61-20-47-35-30:0;-61-20-47-13-30:0}.13-14-54 .13-14-36.13-14-25 a{149-27:109;38-90:101}.13-14-54 .13-14-22er{20-47:101 116 #127}.13-14-54 .13-14-22-35,.13-14-54 .13-14-22-13{149-27:1.8em;90:.109;-108-20-30-4735:0;-108-20-30-4713:0;-61-20-47-35-30:0;-61-20-47-13-30:0}.13-14-54 .13-14-22-body{37:79;90:101}.13-14-54 .13-14-104{56:0}.13-14-57 .13-14-104,.13-14-57 .13-14-36 a,.13-14-57 .13-14-22er .13-14-22-35,.13-14-57 .13-14-22er .13-14-22-13{27:6em;149-27:6em}.13-14-57 .13-14-36{38-13:2px}.13-14-57 .13-14-36 a 156{20:101 116 #127;38:.4em;56:0}dl.13-14{144:83;20:83}dt.13-14-36,dt.13-14-36 a{69:136;float:83}dt.13-14-36 a{56:.109 110}dl.13-14 dt.13-14-25 a{28:#EEE;-108-20-30-4735:0;-108-20-30-4713:0;-61-20-47-35-30:0;-61-20-47-13-30:0}</92>\");",",,,,,,,,,,,this,,right,tabs,,function,element,return,var,border,controller,scroll,,options,current,panel,height,background,disabled,radius,opacity,isHarmonica,tabsList,,left,tab,position,margin,addClass,,Tabs,isCarousel,first,,scroller,width,bottom,initialize,filter,,show,enabled,locker,simple,color,padding,carousel,remove,insert,,webkit,bind,class,null,removeClass,,div,Cookie,display,indexOf,,nextButton,,_startLoop,parentNode,prevButton,,insertTo,relative,offsetHeight,fire,__working,none,arguments,else,offsetWidth,include,,hover,top,disable,style,scrollDuration,length,false,prototype,_stopLoop,100,,callTab,1px,resizer,__timeout,list,forgetHovers,checkScrollButtons,document,moz,2em,1em,resizeFx,getStyle,duration,timer,has_next,solid,bottomright,alpha,hasClass,resizing,enable,update,,cursor,justScroll,bottomleft,CCC,spinner,onClick,new,text,cache,slide,resizeDuration,split,block,startLoop,apply,stopObserving,buildScroller,0px,selected,scrollTo,overflow,idPrefix,onFinish,absolute,true,line,tabsElement,cookieIndex,pointer,replace,request,delay,img,scrollToTab,Tab,findCurrent,morph,onMousedown,toInt,pickTab,scrollRight,_locker,click,tagName,scrollLeft,scrollTabs,scrollable,List,Class,Loop,Duration,Panel".split(",")));
@@ -1,195 +0,0 @@
1
- /**
2
- * The native tooltips feature for RightJS
3
- *
4
- * See http://rightjs.org/ui/tooltips for more details
5
- *
6
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
7
- */
8
- if (!RightJS) throw "Gimme RightJS!";
9
- /**
10
- * The native tooltips feature for RithJS
11
- *
12
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
13
- */
14
- var Tooltip = new Class({
15
- include: Options,
16
-
17
- extend: {
18
- Options: {
19
- cssRule: '[rel=tooltip]', // a css-marker of an element with a tooltip
20
-
21
- fxName: 'fade', // the appearance effect name
22
- fxDuration: 400, // the appearance effect duration
23
- delay: 400, // the appearance delay
24
-
25
- move: true, // if it should be moved with the mouse
26
-
27
- idSuffix: '-tooltip' // ID prefix for tooltips with ID
28
- },
29
-
30
- current: null, // currently active tooltip reference
31
- instances: [], // keeps the list of instances
32
-
33
- // tries to find a tip closest to the event
34
- find: function(event) {
35
- var target = event.target, targets = [target].concat(target.parents()),
36
- targets = targets.slice(0, targets.length - 2),
37
- element = targets.first(function(node) {
38
- return node._tooltip || node.match(Tooltip.Options.cssRule);
39
- });
40
-
41
- if (element) {
42
- var uid = $uid(element);
43
- return Tooltip.instances[uid] = Tooltip.instances[uid] || new Tooltip(element);
44
- }
45
- },
46
-
47
- // DEPRECATED a dummy method for the old API backward compatibility
48
- rescan: function(scope) { }
49
- },
50
-
51
- /**
52
- * Constructor
53
- *
54
- * @param Element associated element
55
- * @param Object options
56
- */
57
- initialize: function(element, options) {
58
- this.associate = element = $(element);
59
- this.element = $E('div', {
60
- 'class': 'right-tooltip',
61
- 'html': '<div class="right-tooltip-arrow"></div>'+
62
- '<div class="right-tooltip-container">'+
63
- (element.get('title') || element.get('alt'))+
64
- '</div>'
65
- }).insertTo(document.body);
66
-
67
- this.setOptions(options || eval('('+element.get('data-tooltips-options')+')'));
68
-
69
- element.set({ title: '', alt: ''});
70
-
71
- if (element.id)
72
- this.element.id = element.id + this.options.idSuffix;
73
-
74
- // prevents the false hidding when the mouse gets over the tooltip
75
- this.element
76
- .onMouseout('stopEvent')
77
- .onMouseover(function(event) {
78
- event.stop();
79
- this.cancelTimer();
80
- }.bind(this));
81
- },
82
-
83
- /**
84
- * Hides the tooltip
85
- *
86
- * @return Tooltip this
87
- */
88
- hide: function() {
89
- this.cancelTimer();
90
-
91
- this.timer = (function() {
92
- this.element.hide(this.options.fxName, {
93
- duration: this.options.fxDuration,
94
- onFinish: function() {
95
- if (Tooltip.current === this)
96
- Tooltip.current = null;
97
- }.bind(this)
98
- });
99
- }).bind(this).delay(100);
100
-
101
- return this;
102
- },
103
-
104
- /**
105
- * Shows the tooltip with a dealy
106
- *
107
- * @param Boolean if true will show tooltip immediately
108
- * @return Tooltip this
109
- */
110
- show: function(immediately) {
111
- // hidding all the others
112
- Tooltip.instances.each(function(tip) {
113
- if (tip && tip !== this) tip.hide();
114
- }, this);
115
-
116
- // show the tooltip with a delay
117
- this.timer = (function() {
118
- this.element.stop().show(this.options.fxName, {duration: this.options.fxDuration});
119
-
120
- Tooltip.current = this;
121
- }).bind(this).delay(this.options.delay);
122
-
123
- return Tooltip.current = this;
124
- },
125
-
126
- /**
127
- * Moves the tooltip where the event happened
128
- *
129
- * @return Tooltip this
130
- */
131
- moveTo: function(event) {
132
- this.element.style.left = event.pageX + 'px';
133
- this.element.style.top = event.pageY + 'px';
134
-
135
- return this;
136
- },
137
-
138
- // protected
139
-
140
- // cancels a show timeout
141
- cancelTimer: function() {
142
- if (this.timer) {
143
- this.timer.cancel();
144
- this.timer = null;
145
- }
146
- }
147
- });
148
-
149
- /**
150
- * The post load tooltips initialization script
151
- *
152
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
153
- */
154
- document.on({
155
- /**
156
- * Watches all the mouse-over events and reacts if one of the targets
157
- * matches a tooltip
158
- *
159
- * @param Event event
160
- */
161
- mouseover: function(event) {
162
- var prev_tip = Tooltip.current, this_tip = Tooltip.find(event);
163
-
164
- if (this_tip) {
165
- if (prev_tip && prev_tip !== this_tip) prev_tip.hide();
166
- if (this_tip.element.hidden()) this_tip.show();
167
-
168
- this_tip.moveTo(event);
169
- }
170
- },
171
-
172
- /**
173
- * Catches the mouseout events and hides tooltips when needed
174
- *
175
- * @param Event event
176
- */
177
- mouseout: function(event) {
178
- var curr_tip = Tooltip.current, this_tip = Tooltip.find(event);
179
-
180
- if (curr_tip && (!this_tip || this_tip === curr_tip))
181
- curr_tip.hide();
182
- },
183
-
184
- /**
185
- * Moves tooltips when active
186
- *
187
- * @param Event event
188
- */
189
- mousemove: function(event) {
190
- var tip = Tooltip.current;
191
- if (tip && tip.options.move) {
192
- tip.moveTo(event);
193
- }
194
- }
195
- });document.write("<style type=\"text/css\">div.right-tooltip{display:none;position:absolute;z-index:999999;font-size:90%;margin-top:16pt;margin-left:5pt;color:#FFF;text-shadow:0 0 .2em #000;border:.3em solid rgba(255,255,255,0.2);background-color:rgba(25,25,25,0.92);*background-color:#000;*border:.3em solid #444;background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(transparent),to(#000));border-radius:.4em;-moz-border-radius:.4em;-webkit-border-radius:.4em;box-shadow:0 0 .4em #555;-moz-box-shadow:0 0 .4em #555;-webkit-box-shadow:0 0 .4em #555}div.right-tooltip-container{margin:.4em .6em}</style>");
@@ -1,9 +0,0 @@
1
- /**
2
- * The native tooltips feature for RightJS
3
- *
4
- * See http://rightjs.org/ui/tooltips for more details
5
- *
6
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
7
- */
8
- if (!RightJS) throw "Gimme RightJS!";
9
- eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("32 11=68 Class({include:34,extend:{34:{48:'[rel=15]',37:'fade',21:65,31:65,61:true,47:'-15'},13:51,17:[],49:8(a){32 t=a.tar58,b=[t].concat(t.parents()),b=b.slice(0,b.length-2),e=b.first(8(n){20 n._15||n.match(11.34.48)});if(e){32 u=$uid(e);20 11.17[u]=11.17[u]||68 11(e)}},rescan:8(s){}},initialize:8(a,o){7.associate=a=$(a);7.12=$E('26',{'46':'24-15','html':'<26 46=\"24-15-arrow\"></26>'+'<26 46=\"24-15-41\">'+(a.58('54')||a.58('67'))+'</26>'}).insertTo(29.body);7.set34(o||eval('('+a.58('data-15s-14')+')'));a.set({54:'',67:''});if(a.id)7.12.id=a.id+7.14.47;7.12.onMouseout('62Event').onMouseover(8(e){e.62();7.18()}.42(7))},30:8(){7.18();7.23=(8(){7.12.30(7.14.37,{43:7.14.21,onFinish:8(){if(11.13===7)11.13=51}.42(7)})}).42(7).31(71);20 7},50:8(i){11.17.each(8(t){if(t&&t!==7)t.30()},7);7.23=(8(){7.12.62().50(7.14.37,{43:7.14.21});11.13=7}).42(7).31(7.14.31);20 11.13=7},38:8(e){7.12.33.63=e.pageX+'px';7.12.33.66=e.pageY+'px';20 7},18:8(){if(7.23){7.23.cancel();7.23=51}}});29.on({mouseover:8(e){32 p=11.13,t=11.49(e);if(t){if(p&&p!==t)p.30();if(t.12.hidden())t.50();t.38(e)}},mouseout:8(e){32 c=11.13,t=11.49(e);if(c&&(!t||t===c))c.30()},mouse61:8(e){32 t=11.13;if(t&&t.14.61)t.38(e)}});29.write(\"<33 type=\\\"60/css\\\">26.24-15{display:none;position:absolute;z-index:999999;font-size:90%;36-66:16pt;36-63:5pt;45:#FFF;60-28:0 0 .2em #53;19:.69 59 64(57,57,57,0.2);22-45:64(25,25,25,0.92);*22-45:#53;*19:.69 59 #444;22-image:-39-gradient(linear,0% 0%,0% 71%,from(transparent),to(#53));19-35:.27;-70-19-35:.27;-39-19-35:.27;56-28:0 0 .27 #52;-70-56-28:0 0 .27 #52;-39-56-28:0 0 .27 #52}26.24-15-41{36:.27 .6em}</33>\");",",,,,,,,this,function,,,Tooltip,element,current,options,tooltip,,instances,cancelTimer,border,return,fxDuration,background,timer,right,,div,4em,shadow,document,hide,delay,var,style,Options,radius,margin,fxName,moveTo,webkit,,container,bind,duration,,color,class,idSuffix,cssRule,find,show,null,555,000,title,,box,255,get,solid,text,move,stop,left,rgba,400,top,alt,new,3em,moz,100".split(",")));
@@ -1,167 +0,0 @@
1
- /**
2
- * Form uploading progress bar feature
3
- * http://rightjs.org/ui/uploader
4
- *
5
- * Copyright (C) 2010 Nikolay V. Nemshilov
6
- */
7
- if (!RightJS || !Form) throw "Gimme RightJS with Form";
8
-
9
- /**
10
- * The uploading progress feature
11
- *
12
- * Copyright (C) 2010 Nikolay V. Nemshilov
13
- */
14
- var Uploader = new Class(Observer, {
15
- extend: {
16
- EVENTS: $w('start update finish error'),
17
-
18
- Options: {
19
- url: '/progress',
20
- param: 'X-Progress-ID',
21
-
22
- timeout: 1000,
23
- round: 0,
24
- fxDuration: 400,
25
-
26
- formCssRule: '.with-progress'
27
- }
28
- },
29
-
30
- /**
31
- * Basic constructor
32
- *
33
- * @param mixed a form reference
34
- * @param Object options
35
- */
36
- initialize: function(form, options) {
37
- this.form = $(form);
38
-
39
- this.$super(options || eval('('+this.form.get('data-uploader-options')+')'));
40
-
41
- this.element = this.find_or_build();
42
-
43
- this.bar = this.element.first('.bar');
44
- this.num = this.element.first('.num');
45
-
46
- this.form._uploader = this;
47
- },
48
-
49
- /**
50
- * Starts the uploading monitoring
51
- *
52
- * @return Uploader this
53
- */
54
- start: function() {
55
- var data = {state: 'starting'};
56
- return this.paint(data).prepare().request().fire('start', data);
57
- },
58
-
59
- // protected
60
-
61
- // updates uploading bar progress
62
- update: function(data) {
63
- this.paint(data).fire('update', data);
64
-
65
- switch (data.state) {
66
- case 'starting':
67
- case 'uploading':
68
- this.request.bind(this).delay(this.options.timeout);
69
- break;
70
- case 'done':
71
- this.fire('finish', data);
72
- break;
73
- case 'error':
74
- this.fire('error', data);
75
- break;
76
- }
77
-
78
- return this;
79
- },
80
-
81
- // changes the actual element styles
82
- paint: function(data) {
83
- var percent = (this.percent || 0)/100;
84
-
85
- switch (data.state) {
86
- case 'starting': percent = 0; break;
87
- case 'done': percent = 1; break;
88
- case 'uploading': percent = data.received / (data.size||1); break;
89
- }
90
-
91
- this.percent = (percent * 100).round(this.options.round);
92
-
93
- if (this.percent == 0 || !self.Fx || !this.options.fxDuration) {
94
- this.bar.style.width = this.percent + '%';
95
- this.num.innerHTML = this.percent + '%';
96
- } else {
97
- this.bar.morph({width: this.percent + '%'}, {duration: this.options.fxDuration});
98
- (function() {
99
- this.num.innerHTML = this.percent + '%';
100
- }).bind(this).delay(this.options.fxDuration / 2);
101
- }
102
-
103
- // marking the failed uploads
104
- this.element[data.state == 'error' ? 'addClass' : 'removeClass']('right-progress-bar-failed');
105
-
106
- return this;
107
- },
108
-
109
- // sends a request to the server
110
- request: function() {
111
- Xhr.load(this.options.url + "?" + this.options.param + "=" + this.uid, {
112
- evalJSON: false,
113
- onSuccess: function(xhr) {
114
- this.update(eval('('+xhr.text+')'));
115
- }.bind(this)
116
- });
117
-
118
- return this;
119
- },
120
-
121
- // prepares the form to carry the x-progress-id param
122
- prepare: function() {
123
- this.uid = "";
124
- for (i = 0; i < 32; i++) { this.uid += Math.random(0, 15).toString(16); }
125
-
126
- var param = this.options.param;
127
- var url = this.form.action.replace(new RegExp('(\\?|&)'+RegExp.escape(param) + '=[^&]*', 'i'), '');
128
- this.form.action = (url.includes('?') ? '&' : '?') + param + '=' + this.uid;
129
-
130
- this.element.show();
131
-
132
- return this;
133
- },
134
-
135
- // finds or builds the progress-bar element
136
- find_or_build: function() {
137
- var element = this.form.first('div.right-progress-bar') || $E('div').insertTo(this.form);
138
-
139
- if (element.innerHTML.blank())
140
- element.innerHTML = '<div class="bar"></div><div class="num"></div>';
141
-
142
- return element.addClass('right-progress-bar');
143
- }
144
-
145
- });
146
-
147
- /**
148
- * The Form unit `send` method overloading
149
- * so that we could catch up the moment when it sent
150
- *
151
- * Copyright (C) 2010 Nikolay V. Nemshilov
152
- */
153
- Form.include((function(old_method) {
154
- return {
155
- send: function() {
156
- // initializing the uploading handler if it supposed to be there
157
- if (this.match(Uploader.Options.formCssRule)) {
158
- if (!this._uploader)
159
- new Uploader(this);
160
-
161
- this._uploader.start();
162
- }
163
-
164
- return old_method.apply(this, arguments);
165
- }
166
- }
167
- })(Form.Methods.send));document.write("<style type=\"text/css\">div.right-progress-bar,div.right-progress-bar*{margin:0;padding:0;border:none;background:none}div.right-progress-bar{position:relative;height:1.4em;line-height:1.4em;width:20em;border:1px solid #999;display:none}div.right-progress-bar,div.right-progress-bar div.bar{-moz-border-radius:0.25em;-webkit-border-radius:0.25em}div.right-progress-bar div.bar{position:absolute;left:0;top:0;width:0%;height:100%;background:#CCC;z-index:1}div.right-progress-bar div.num{position:absolute;width:100%;height:100%;z-index:2;text-align:center}div.right-progress-bar-failed{border-color:red;color:red;background:pink}</style>");
@@ -1,9 +0,0 @@
1
- /**
2
- * Form uploading progress bar feature
3
- * http://rightjs.org/ui/uploader
4
- *
5
- * Copyright (C) 2010 Nikolay V. Nemshilov
6
- */
7
- if (!RightJS || !Form) throw "Gimme RightJS with Form";
8
-
9
- eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("41 36=75 84(Observer,{extend:{EVENTS:$w('42 34 64 44'),57:{82:'/8',53:'X-Progress-ID',58:470,55:0,21:400,278685:'.with-8'}},initialize:11(f,o){7.27=$(f);7.$super(o||80('('+7.27.get('data-uploader-13')+')'));7.23=7.33();7.12=7.23.56('.12');7.39=7.23.56('.39');7.27.31=7},42:11(){41 d={43:'37'};18 7.52(d).60().45().49('42',d)},34:11(d){7.52(d).49('34',d);68(d.43){28 '37':28 '48':7.45.62(7).73(7.13.58);24;28 '77':7.49('64',d);24;28 '44':7.49('44',d);24}18 7},52:11(d){41 p=(7.19||0)/47;68(d.43){28 '37':p=0;24;28 '77':p=1;24;28 '48':p=d.received/(d.size||1);24}7.19=(p*47).55(7.13.55);if(7.19==0||!self.Fx||!7.13.21){7.12.51.30=7.19+'%';7.39.22=7.19+'%'}else{7.12.morph({30:7.19+'%'},{duration:7.13.21});(11(){7.39.22=7.19+'%'}).62(7).73(7.13.21/2)}7.23[d.43=='44'?'54':'remove84']('17-8-12-65');18 7},45:11(){Xhr.load(7.13.82+\"?\"+7.13.53+\"=\"+7.59,{80JSON:false,onSuccess:11(x){7.34(80('('+x.61+')'))}.62(7)});18 7},60:11(){7.59=\"\";for(i=0;i<32;i++)7.59+=Math.random(0,15).toString(16);41 p=7.13.53;41 u=7.27.66.replace(75 69('(\\\\?|&)'+69.escape(p)+'=[^&]*','i'),'');7.27.66=(u.includes('?')?'&':'?')+p+'='+7.59;7.23.show();18 7},33:11(){41 e=7.27.56('14.17-8-12')||$E('14').insertTo(7.27);if(e.22.blank())e.22='<14 71=\"12\"></14><14 71=\"39\"></14>';18 e.54('17-8-12')}});76.include((11(o){18{79:11(){if(7.match(36.57.278685)){if(!7.31)75 36(7);7.31.42()}18 o.apply(7,arguments)}}})(76.Methods.79));document.write(\"<51 type=\\\"61/css\\\">14.17-8-12,14.17-8-12*{margin:0;padding:0;26:63;29:63}14.17-8-12{38:relative;35:1.81;line-35:1.81;30:20em;26:1px solid #999;display:63}14.17-8-12,14.17-8-12 14.12{-moz-26-67:0.78;-webkit-26-67:0.78}14.17-8-12 14.12{38:50;left:0;top:0;30:0%;35:47%;29:#CCC;z-74:1}14.17-8-12 14.39{38:50;30:47%;35:47%;z-74:2;61-align:center}14.17-8-12-65{26-72:83;72:83;29:pink}</51>\");",",,,,,,,this,progress,,,function,bar,options,div,,,right,return,percent,,fxDuration,innerHTML,element,break,,border,form,case,background,width,_uploader,,find_or_build,update,height,Uploader,starting,position,num,,var,start,state,error,request,formCssRule,100,uploading,fire,absolute,style,paint,param,addClass,round,first,Options,timeout,uid,prepare,text,bind,none,finish,failed,action,radius,switch,RegExp,,class,color,delay,index,new,Form,done,25em,send,eval,4em,url,red,Class,Rule,Css".split(",")));
data/javascripts/right.js DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * RightJS, http://rightjs.org
3
- * Released under the MIT license
4
- *
5
- * Copyright (C) 2008-2010 Nikolay Nemshilov
6
- */
7
- RightJS={version:"1.5.6",modules:["core","dom","form","cookie","xhr","fx"]};function $ext(d,s,a){var s=s||{},k;for(k in s)if(a!==true||typeof(d[k])==='undefined')d[k]=s[k];return d};function $try(){for(var i=0;i<arguments.length;i++)try{return arguments[i]()}catch(e){}};function $eval(t){if(!isString(t)||t.blank())return;if(window.execScript)window.execScript(t);else $E('script',{type:'text/javascript',text:t}).insertTo(document.body)}function $break(){throw new Break()};function $alias(o,n){for(var a in n)o[a]=o[n[a]];return o};function defined(v){return typeof(v)!=='undefined'};function isFunction(v){return typeof(v)==='function'};function isString(v){return typeof(v)==='string'};function isNumber(v){return typeof(v)==='number'};function isElement(v){return v&&v.tagName};function isNode(v){return v&&v.nodeType};function $E(t,o){return new Element(t,o)};function $(e){return typeof(e)==='string'?document.getElementById(e):e};function $$(c){return $A(document.querySelectorAll(c))};function $w(s){return s.trim().split(/\s+/)};(function(){var t=Object.prototype.toString,s=Array.prototype.slice,U=1;isHash=function(v){return t.call(v)==='[object Object]'};if(isHash(document.documentElement))isHash=function(v){return t.call(v)==='[object Object]'&&v!==null&&typeof(v)!=='undefined'&&typeof(v.hasOwnProperty)!=='undefined'};isArray=function(v){return t.call(v)==='[object Array]'};$A=function(b){try{return s.call(b)}catch(e){for(var a=[],i=0,l=b.length;i<l;i++)a[i]=b[i];return a}};$uid=function(i){return i.uid||(i.uid=U++)};for(var i=0,n=[Array,Function,Number,String,Date,RegExp];i<n.length;i++)n[i].include=function(m,d){$ext(this.prototype,m,d);return this}})();$ext(Object,{keys:function(o){var a=[],k;for(k in o)a.push(k);return a},values:function(o){var v=[],k;for(k in o)v.push(o[k]);return v},empty:function(o){for(var k in o)break;return!k},without:function(){var f=$A(arguments),o=f.shift(),c={},k;for(k in o)if(!f.includes(k))c[k]=o[k];return c},only:function(){var f=$A(arguments),o=f.shift(),c={},i=0,l=f.length;for(;i<l;i++)if(defined(o[f[i]]))c[f[i]]=o[f[i]];return c},merge:function(){var o={},i=0,l=arguments.length;for(;i<l;i++)if(isHash(arguments[i]))$ext(o,arguments[i]);return o},toQueryString:function(o){var t=[],k;for(k in o)t.push(k+'='+encodeURIComponent(o[k]));return t.join('&')}},true);$ext(Math,{random:function(a,m){var r=this._random();if(arguments.length==0)return r;if(arguments.length==1)var m=a,a=0;return Math.floor(r*(m-a+1)+a)},_random:Math.random});(function(A){var q=A.forEach||function(c,s){for(var i=0,l=this.length;i<l;i++)c.call(s,this[i],i,this)};var m=A.filter||function(c,s){for(var r=[],i=0,j=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))r[j++]=this[i];return r};var w=A.map||function(c,s){for(var r=[],i=0,l=this.length;i<l;i++)r[i]=c.call(s,this[i],i,this);return r};var y=A.some||function(c,s){for(var i=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))return true;return false};var k=A.every||function(c,s){for(var i=0,l=this.length;i<l;i++)if(!c.call(s,this[i],i,this))return false;return true};function n(c,s){for(var i=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))return this[i];return this._$u};function u(c,s){for(var i=this.length-1;i>-1;i--)if(c.call(s,this[i],i,this))return this[i];return this._$u};function t(a,b){var d=a[0],a=A.slice.call(a,1),s=b;if(isString(d)){var c=d;if(b.length&&isFunction(b[0][c]))d=function(o){return o[c].apply(o,a)};else d=function(o){return o[c]}}else s=a[0];return[d,s]};function h(f,s,a){try{return f.apply(s,t(a,s))}catch(e){if(!(e instanceof Break))throw(e)}};function g(a){return!!a};Array.include({indexOf:A.indexOf||function(v,f){for(var i=(f<0)?Math.max(0,this.length+f):f||0,l=this.length;i<l;i++)if(this[i]===v)return i;return-1},lastIndexOf:A.lastIndexOf||function(v){for(var i=this.length-1;i>-1;i--)if(this[i]===v)return i;return-1},first:function(){return arguments.length?h(n,this,arguments):this[0]},last:function(){return arguments.length?h(u,this,arguments):this[this.length-1]},random:function(){return this.length?this[Math.random(this.length-1)]:null},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return!this.length},clone:function(){return this.slice(0)},each:function(){h(q,this,arguments);return this},forEach:q,map:function(){return h(w,this,arguments)},filter:function(){return h(m,this,arguments)},some:function(v){return h(y,this,v?arguments:[g])},every:function(v){return h(k,this,v?arguments:[g])},walk:function(){this.map.apply(this,arguments).forEach(function(v,a){this[a]=v},this);return this},merge:function(){for(var c=this.clone(),a,i=0,j,l=arguments.length;i<l;i++){a=arguments[i];if(isArray(a)){for(j=0;j<a.length;j++)if(c.indexOf(a[j])==-1)c.push(a[j])}else if(c.indexOf(a)==-1)c.push(a)}return c},flatten:function(){var c=[];this.forEach(function(v){if(isArray(v))c=c.concat(v.flatten());else c.push(v)});return c},compact:function(){return this.without(null,this._$u)},uniq:function(){return[].merge(this)},includes:function(){for(var i=0,l=arguments.length;i<l;i++)if(this.indexOf(arguments[i])==-1)return false;return true},without:function(){var f=$A(arguments);return this.filter(function(v){return!f.includes(v)})},shuffle:function(){var s=this.clone(),j,x,i=s.length;for(;i;j=Math.random(i-1),x=s[--i],s[i]=s[j],s[j]=x);return s},sortBy:function(){var p=t(arguments,this);return this.map(function(b,a){return{item:b,value:p[0].call(p[1],b,a,this)}}).sort(function(c,d){return c.value>d.value?1:c.value<d.value?-1:0}).map('item')}});$alias(A,{include:'includes',all:'every',any:'some'})})(Array.prototype);String.include({empty:function(){return this==''},blank:function(){return/^\s*$/.test(this)},trim:String.prototype.trim||function(){var a=this.replace(/^\s\s*/,''),i=a.length;while(/\s/.test(a.charAt(--i)));return a.slice(0,i+1)},stripTags:function(){return this.replace(/<\/?[^>]+>/ig,'')},stripScripts:function(o){var a='',t=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/img,function(m,s){a+=s+"\n";return ''});if(o===true)$eval(a);else if(isFunction(o))o(a,t);return t},extractScripts:function(){var s='';this.stripScripts(function(a){s=a});return s},evalScripts:function(){this.stripScripts(true);return this},camelize:function(){var p=this.match(/^(\-|_)+?/g)||'';return p+this.substr(p.length,this.length).replace(/(\-|_)+?(\D)/g,function(m){return m.replace(/\-|_/,'').toUpperCase()})},underscored:function(){return this.replace(/([a-z0-9])([A-Z]+)/g,function(m,f,s){return f+"_"+(s.length>1?s:s.toLowerCase())}).replace(/\-/g,'_')},capitalize:function(){return this.replace(/(^|\s|\-|_)[a-z\u00e0-\u00fe\u0430-\u045f]/g,function(m){return m.toUpperCase()})},includes:function(s){return this.indexOf(s)!=-1},startsWith:function(a,i){var s=this.substr(0,a.length);return i?s.toLowerCase()===a.toLowerCase():s===a},endsWith:function(s,i){var e=this.substring(this.length-s.length);return i?e.toLowerCase()===s.toLowerCase():e===s},toInt:function(b){return parseInt(this,b||10)},toFloat:function(s){return parseFloat(s?this:this.replace(',','.').replace(/(\d)-(\d)/g,'$1.$2'))}});$alias(String.prototype,{include:'includes'});Function.include({bind:function(){var a=$A(arguments),s=a.shift(),f=this;return function(){return f.apply(s,(a.length||arguments.length)?a.concat($A(arguments)):a)}},bindAsEventListener:function(){var a=$A(arguments),s=a.shift(),f=this;return function(e){return f.apply(s,[e||window.event].concat(a).concat($A(arguments)))}},curry:function(){return this.bind.apply(this,[this].concat($A(arguments)))},rcurry:function(){var c=$A(arguments),f=this;return function(){return f.apply(f,$A(arguments).concat(c))}},delay:function(){var a=$A(arguments),t=a.shift(),b=new Number(window.setTimeout(this.bind.apply(this,[this].concat(a)),t));b.cancel=function(){window.clearTimeout(this)};return b},periodical:function(){var a=$A(arguments),t=a.shift(),b=new Number(window.setInterval(this.bind.apply(this,[this].concat(a)),t));b.stop=function(){window.clearInterval(this)};return b},chain:function(){var a=$A(arguments),f=a.shift(),c=this;return function(){var r=c.apply(c,arguments);f.apply(f,a);return r}}});Number.include({times:function(c,s){for(var i=0;i<this;i++)c.call(s,i);return this},upto:function(n,c,s){for(var i=this+0;i<=n;i++)c.call(s,i);return this},downto:function(n,c,s){for(var i=this+0;i>=n;i--)c.call(s,i);return this},abs:function(){return Math.abs(this)},round:function(b){if(b){var b=Math.pow(10,b);return Math.round(this*b)/b}else return Math.round(this)},ceil:function(){return Math.ceil(this)},floor:function(){return Math.floor(this)}});RegExp.escape=function(s){return(''+s).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1')};var Class=function(){var a=$A(arguments),b=a.pop()||{},p=a.pop();function k(){return this.initialize?this.initialize.apply(this,arguments):this};if(!a.length&&!isHash(b)){p=b;b={}}$ext(k,Class.Methods).inherit(p);$w('extend include').each(function(n){if(b[n]){var m=b[n];k[n].apply(k,isArray(m)?m:[m]);delete(b[n])}});return k.include(b)};Class.findSet=function(o,p){var u=p.toUpperCase(),b=p.capitalize(),c=[o,o.constructor].concat(o.constructor.ancestors),h=c.first(function(a){return a&&(a[u]||a[b])});return h?h[u]||h[b]:null};Class.Methods=(function(){var f=$w('selfExtended self_extended selfIncluded self_included'),g=f.concat($w('prototype parent extend include')),i=f.concat(['constructor']);function e(m,w){return Object.without.apply(Object,[m].concat(w=='e'?g:i))};return{inherit:function(p){if(p&&p.prototype){var s=function(){};s.prototype=p.prototype;this.prototype=new s;this.parent=p}this.ancestors=[];while(p){this.ancestors.push(p);p=p.parent}return this.prototype.constructor=this},extend:function(){$A(arguments).filter(isHash).each(function(m){var c=m.selfExtended||m.self_extended;$ext(this,e(m,'e'));if(c)c.call(m,this)},this);return this},include:function(){var d=this.ancestors.map('prototype'),b;$A(arguments).filter(isHash).each(function(a){var c=a.selfIncluded||a.self_included;a=e(a,'i');for(var k in a){b=d.first(function(p){return isFunction(p[k])});this.prototype[k]=!b?a[k]:(function(n,m,s){return function(){this.$super=s;return m.apply(this,arguments)}})(k,a[k],b[k])}if(c)c.call(a,this)},this);return this}}})();Options={setOptions:function(o){var o=this.options=Object.merge(Class.findSet(this,'options'),o),m,k;if(isFunction(this.on))for(k in o)if(m=k.match(/on([A-Z][A-Za-z]+)/)){this.on(m[1].toLowerCase(),o[k]);delete(o[k])}return this},cutOptions:function(a){var a=$A(a);this.setOptions(isHash(a.last())?a.pop():{});return a}};Observer=new Class({include:Options,initialize:function(o){this.setOptions(o);Observer.createShortcuts(this,Class.findSet(this,'events'))},on:function(){var a=$A(arguments),e=a.shift();if(isString(e)){if(!defined(this.$listeners))this.$listeners=[];var c=a.shift(),n;switch(typeof(c)){case "string":n=c;c=this[c];case "function":var h={};h.e=e;h.f=c;h.a=a;h.r=n;this.$listeners.push(h);break;default:if(isArray(c))for(var i=0;i<c.length;i++)this.on.apply(this,[e].concat(isArray(c[i])?c[i]:[c[i]]).concat(a))}}else for(var n in e)this.on.apply(this,[n].concat(isArray(e[n])?e[n]:[e[n]]).concat(a));return this},observes:function(e,c){if(!isString(e)){c=e;e=null}if(isString(c))c=this[c];return(this.$listeners||[]).some(function(a){return(e&&c)?a.e===e&&a.f===c:e?a.e===e:a.f===c})},stopObserving:function(e,c){if(isHash(e))for(var k in e)this.stopObserving(k,e[k]);else{if(!isString(e)){c=e;e=null}if(isString(c))c=this[c];this.$listeners=(this.$listeners||[]).filter(function(a){return(e&&c)?(a.e!==e||a.f!==c):(e?a.e!==e:a.f!==c)},this)}return this},listeners:function(e){return(this.$listeners||[]).filter(function(a){return!e||a.e===e}).map(function(a){return a.f}).uniq()},fire:function(){var b=$A(arguments),e=b.shift();(this.$listeners||[]).each(function(a){if(a.e===e)a.f.apply(this,a.a.concat(b))},this);return this},extend:{create:function(o,e){$ext(o,Object.without(this.prototype,'initialize','setOptions'),true);return this.createShortcuts(o,e||Class.findSet(o,'events'))},createShortcuts:function(o,a){(a||[]).each(function(n){var m='on'+n.replace(/:/g,'_').camelize().capitalize();if(!defined(o[m]))o[m]=function(){return this.on.apply(this,[n].concat($A(arguments)))}});return o}}});$alias(Observer.prototype,{observe:'on'});Break=new Class(Error,{message:"Manual iterator break"});Browser=(function(a){return{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:a.indexOf('AppleWebKit/')>-1,Gecko:a.indexOf('Gecko')>-1&&a.indexOf('KHTML')<0,MobileSafari:!!a.match(/Apple.*Mobile.*Safari/),Konqueror:a.indexOf('Konqueror')>-1,OLD:!!(window.attachEvent&&!window.opera)&&!document.querySelector}})(navigator.userAgent);Event=new Class(window.Event,{extend:{ext:function(e,b){if(!e.stop)$ext(e,this.Methods,true);if(!e.target&&e.srcElement){e.which=e.button==2?3:e.button==4?2:1;var s=window.scrolls();e.pageX=e.clientX+s.x;e.pageY=e.clientY+s.y;e.target=$(e.srcElement)||b;e.relatedTarget=e.target===e.fromElement?$(e.toElement):e.target;e.currentTarget=b;e.eventPhase=3}if(e.target&&e.target.nodeType==3)e.target=e.target.parentNode;return e},cleanName:function(n){n=n.toLowerCase();n=n.substr(0,2)==='on'?n.slice(2):n;n=n==='rightclick'?'contextmenu':n;return n},realName:function(n){if(Browser.Gecko&&n==='mousewheel')n='DOMMouseScroll';if(Browser.Konqueror&&n==='contextmenu')n='rightclick';return n},Methods:{}},initialize:function(n,o){return new Event.Custom(Event.cleanName(n),o)}});Event.include=function(m){$ext(this.Methods,m);try{$ext(Event.parent.prototype,m,true)}catch(e){}};Event.include({stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},stop:function(){this.stopPropagation();this.preventDefault();return this},position:function(){return{x:this.pageX,y:this.pageY}}});Event.Custom=function(n,o){this.type=n;this.stop=function(){};$ext(this,o||{})};Event.extend({delegate:function(o){return function(e){var t=e.target,b,a,c;for(b in o)if($(this).select(b).include(t)){a=o[b];a=isArray(a)?a:[a];c=a[0];a=a.slice(1);if(isString(c))t[c].apply(t,a);else c.apply(t,[e].concat(a))}}},behave:function(d,o){var h={},k={},b=$A(arguments).slice(1),i='focus',c='blur',j=[i,c];if(isString(o)){k[b.shift()]=b;o=k}for(var g in o){var k={};k[d]=o[g];if(Browser.IE){if(g==i)g=i+'in';if(g==c)g=i+'out'}h[g]=Event.delegate(k);if(j.include(g)&&!Browser.IE){document.addEventListener(g,h[g],true);(document.$listeners=document.$listeners||[]).push({e:g,f:h[g],a:[]})}else document.on(g,h[g])}return h}});String.include({on:function(){Event.behave.apply(Event,[''+this].concat($A(arguments)));return this}});$alias(String.prototype,{behave:'on'});Element=(function(a){var b={id:['id',0],html:['innerHTML',0],'class':['className',0],style:['setStyle',1],observe:['on',1],on:['on',1]};function n(t,o){var e=document.createElement(t);if(o)for(var k in o){if(b[k]){if(b[k][1])e[b[k][0]](o[k]);else e[b[k][0]]=o[k]}else e.set(k,o[k])}return e};if(Browser.IE)n=eval('['+n.toString().replace(/(\((\w+),\s*(\w+)\)\s*\{)/,'$1if($2==="input"&&$3)$2="<input name="+$3.name+" type="+$3.type+($3.checked?" checked":"")+"/>";')+']')[0];if(a){$ext(n,a);n.parent=a}return n})(window.Element);$ext(Element,{include:function(m,d){$ext(this.Methods,m,d);try{$ext((window.HTMLElement||this.parent).prototype,m,d)}catch(e){}return this},Methods:{}});Element.include({parent:function(c){return c?this.parents(c)[0]:$(this.parentNode)},parents:function(c){return this.rCollect('parentNode',c)},subNodes:function(c){return this.select(c).filter(function(e){return e.parentNode===this},this)},siblings:function(c){return this.prevSiblings(c).reverse().concat(this.nextSiblings(c))},nextSiblings:function(c){return this.rCollect('nextSibling',c)},prevSiblings:function(c){return this.rCollect('previousSibling',c)},next:function(c){return this.nextSiblings(c)[0]},prev:function(c){return this.prevSiblings(c)[0]},remove:function(){if(this.parentNode)this.parentNode.removeChild(this);return this},insert:function(c,p){if(isHash(c))for(var p in c)this.insert(c[p],p);else{var s,i=Element.insertions;p=isString(p)?p.toLowerCase():'bottom';if(isString(c)||isNumber(c))c=(''+c).stripScripts(function(a){s=a});i[p](this,c.tagName?c:i.createFragment.call((p==='bottom'||p==='top'||!this.parentNode)?this:this.parentNode,c));if(s)$eval(s)}return this},insertTo:function(e,p){$(e).insert(this,p);return this},replace:function(c){return this.insert(c,'instead')},update:function(c){if((isString(c)||isNumber(c))&&!Element.insertions.wraps[this.tagName]){var s;this.innerHTML=(''+c).stripScripts(function(a){s=a});if(s)$eval(s)}else this.clean().insert(c);return this},wrap:function(e){if(this.parentNode){this.parentNode.replaceChild(e,this);e.appendChild(this)}return this},clean:function(){while(this.firstChild)this.removeChild(this.firstChild);return this},empty:function(){return this.innerHTML.blank()},rCollect:function(a,c){var n=this,r=[];while((n=n[a]))if(n.tagName&&(!c||$(n).match(c)))r.push(n);return r}});Element.insertions={bottom:function(t,c){t.appendChild(c)},top:function(t,c){t.firstChild?t.insertBefore(c,t.firstChild):t.appendChild(c)},after:function(t,c){var p=t.parentNode,s=t.nextSibling;if(p)s?p.insertBefore(c,s):p.appendChild(c)},before:function(t,c){if(t.parentNode)t.parentNode.insertBefore(c,t)},instead:function(t,c){if(t.parentNode)t.parentNode.replaceChild(c,t)},createFragment:function(c){var f;if(isString(c)){var t=document.createElement('div'),w=Element.insertions.wraps[this.tagName]||['','',0],d=w[2];t.innerHTML=w[0]+c+w[1];while(d>0){t=t.firstChild;d--}f=arguments.callee.call(this,t.childNodes)}else{f=document.createDocumentFragment();if(isNode(c))f.appendChild(c);else if(c&&c.length)for(var i=0,l=c.length;i<l;i++)f.appendChild(c[c.length==l?i:0])}return f},wraps:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};$alias(Element.insertions.wraps,{THEAD:'TBODY',TFOOT:'TBODY',TH:'TD'});Element.include({setStyle:function(h,v){var k,c,s={};if(v){s[h]=v;h=s}else if(isString(h)){h.split(';').each(function(o){var e=o.split(':').map('trim');if(e[0]&&e[1])s[e[0]]=e[1]});h=s}for(k in h){c=k.indexOf('-')!=-1?k.camelize():k;if(k==='opacity'){if(Browser.IE)this.style.filter='alpha(opacity='+h[k]*100+')';else this.style.opacity=h[k]}else if(k==='float')c=Browser.IE?'styleFloat':'cssFloat';this.style[c]=h[k]}return this},getStyle:function(k){return this._getStyle(this.style,k)||this._getStyle(this.computedStyles(),k)},computedStyles:function(){return this.currentStyle||this.runtimeStyle||this.ownerDocument.defaultView.getComputedStyle(this,null)||{}},_getStyle:function(s,k){var v,k=k.camelize();switch(k){case 'opacity':v=!Browser.IE?s[k]:((/opacity=(\d+)/i.exec(s.filter||'')||['','100'])[1].toInt()/100)+'';break;case 'float':k=Browser.IE?'styleFloat':'cssFloat';default:v=s[k];if(Browser.Opera&&/color/i.test(k)&&v)v=v.replace(/"/g,'')}return v?v:null},hasClass:function(n){return(' '+this.className+' ').indexOf(' '+n+' ')!=-1},setClass:function(c){this.className=c;return this},addClass:function(n){var t=' '+this.className+' ';if(t.indexOf(' '+n+' ')==-1)this.className+=(t===' '?'':' ')+n;return this},removeClass:function(n){this.className=(' '+this.className+' ').replace(' '+n+' ',' ').trim();return this},toggleClass:function(n){return this[this.hasClass(n)?'removeClass':'addClass'](n)},radioClass:function(n){this.siblings().each('removeClass',n);return this.addClass(n)}});Element.include({set:function(h,a){if(typeof(h)==='string'){var v={};v[h]=a;h=v}for(var k in h){if(typeof(this[k])==='undefined')this.setAttribute(k,''+h[k]);this[k]=h[k]}return this},get:function(n){var v=this[n]||this.getAttribute(n);return v===''?null:v},has:function(n){return this.get(n)!==null},erase:function(n){this.removeAttribute(n);return this},hidden:function(){return this.getStyle('display')=='none'},visible:function(){return!this.hidden()},hide:function(e,o){this._$pd=this.getStyle('display');this.style.display='none';return this},show:function(e,o){if(this.getStyle('display')=='none'){var v=this.tagName=='DIV'?'block':'inline';this.style.display=this._$pd=='none'?v:this._$pd||v}return this},toggle:function(e,o){return this[this.hidden()?'show':'hide'](e,o)},radio:function(e,o){this.siblings().each('hide',e,o);return this.show()}});Element.include({sizes:function(){return{x:this.offsetWidth,y:this.offsetHeight}},position:function(){var r=this.getBoundingClientRect(),d=this.ownerDocument.documentElement,s=window.scrolls();return{x:r.left+s.x-d.clientLeft,y:r.top+s.y-d.clientTop}},scrolls:function(){return{x:this.scrollLeft,y:this.scrollTop}},dimensions:function(){var a=this.sizes();var s=this.scrolls();var p=this.position();return{top:p.y,left:p.x,width:a.x,height:a.y,scrollLeft:s.x,scrollTop:s.y}},setWidth:function(w){var s=this.style,p='offsetWidth';s.width=w+'px';s.width=(2*w-this[p])+'px';return this},setHeight:function(h){var s=this.style,p='offsetHeight';s.height=h+'px';s.height=(2*h-this[p])+'px';return this},resize:function(w,h){if(isHash(w)){h=w.y;w=w.x}return this.setWidth(w).setHeight(h)},moveTo:function(l,t){if(isHash(l)){t=l.y;l=l.x}return this.setStyle({left:l+'px',top:t+'px'})},scrollTo:function(l,t){if(isHash(l)){t=l.y;l=l.x}this.scrollLeft=l;this.scrollTop=t;return this},scrollThere:function(o){window.scrollTo(this,o);return this}});Element.include((function(){var o=Observer.create({},$w('click rightclick contextmenu mousedown mouseup mouseover mouseout mousemove keypress keydown keyup'));function h(n,r,t){o[n]=eval('['+o[n].toString().replace(r,t)+']')[0]};h('on',/(\$listeners\.push\((\w+?)\);)/,'$1$2.e=Event.cleanName($2.e);$2.n=Event.realName($2.e);$2.w=function(){var a=$A(arguments),e=($2.r&&$2.r!=="stopEvent")?a.shift():Event.ext(a[0],this);return $2.f.apply(this,a.concat($2.a))};'+(window.attachEvent?'$2.w=$2.w.bind(this);this.attachEvent("on"+$2.n,$2.w);':'this.addEventListener($2.n,$2.w,false);'));o.observe=o.on;h('stopObserving',/(function\s*\((\w+)\)\s*\{\s*)(return\s*)([^}]+)/m,'$1var r=$4;if(!r)'+(window.attachEvent?'this.detachEvent("on"+$2.n,$2.w);':'this.removeEventListener($2.n,$2.w,false);')+'$3 r');h('fire',/(\w+)\.f\.apply.*?\.concat\((\w+)\)\)/,'$1.f.apply(this,(($1.r&&$1.r!=="stopEvent")?[]:[new Event($1.e,$2.shift())]).concat($1.a).concat($2))');o.stopEvent=function(a){a.stop()};$ext(window,o);$ext(document,o);Observer.createShortcuts(window,$w('blur focus scroll'));return o})());Element.include((function(){function s(c,t){return c?c.replace(/(^|,)/g,'$1'+t+' '):'*'};return{first:function(c){return this.querySelector(s(c,this.tagName))},select:function(c){return $A(this.querySelectorAll(s(c,this.tagName)))},match:function(c){var r,p=this.tagName==='HTML'?this.ownerDocument:this.parents().last();r=$(p||$E('p').insert(this)).select(c).include(this);if(!p)this.remove();return r}}})());$ext(document,{first:function(c){return this.querySelector(c)},select:function(c){return $A(this.querySelectorAll(c))}});$ext(window,(function(){var n=window.scrollTo;return{sizes:function(){var d=document.documentElement;return this.innerWidth?{x:this.innerWidth,y:this.innerHeight}:{x:d.clientWidth,y:d.clientHeight}},scrolls:function(){var b=this.document.body,d=this.document.documentElement,o='pageXOffset',a='pageYOffset',s='scrollLeft',c='scrollTop';return(this[o]||this[a])?{x:this[o],y:this[a]}:(b[s]||b[c])?{x:b[s],y:b[c]}:{x:d[s],y:d[c]}},scrollTo:function(l,t,f){var a=l,b=t;if(isElement(l)||(isString(l)&&$(l)))l=$(l).position();if(isHash(l)){b=l.y;a=l.x}if(isHash(f=f||t)&&window.Fx)new Fx.Scroll(this,f).start({x:a,y:b});else n(a,b);return this}}})());[window,document].each(function(o){Observer.createShortcuts(o,['ready']);var r=o.fire.bind(o,'ready');if(typeof(document.readyState)!=='undefined')(function(){['loaded','complete'].includes(document.readyState)?r():arguments.callee.delay(50)})();else document.addEventListener('DOMContentLoaded',r,false)});function Form(o){var o=o||{},r=o.remote,f=new Element('form',Object.without(o,'remote'));if(r)f.remotize();return f};$ext(Form,{ext:function(e){return $ext(e,this.Methods)},Methods:{},include:function(m,d){$ext(Form.Methods,m,d);try{$ext(HTMLFormElement.prototype,m,d)}catch(e){}}});Form.include({getElements:function(){return $A(this.elements).map($)},inputs:function(){return this.getElements().filter(function(i){return!['submit','button','reset','image',null].includes(i.type)})},focus:function(){var f=this.inputs().first(function(i){return i.type!='hidden'});if(f)f.focus();return this.fire('focus')},blur:function(){this.getElements().each('blur');return this.fire('blur')},disable:function(){this.getElements().each('disable');return this.fire('disable')},enable:function(){this.getElements().each('enable');return this.fire('enable')},values:function(){var v={};this.inputs().each(function(i){if(!i.disabled&&i.name&&(!['checkbox','radio'].includes(i.type)||i.checked))v[i.name]=i.getValue()});return v},serialize:function(){return Object.toQueryString(this.values())}});Form.include(Observer.createShortcuts({},$w('submit reset focus')),true);(function(){try{var i=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement]}catch(e){var i=[]}Form.Element={ext:function(e){e._blur=e.blur;e._focus=e.focus;e._select=e.select;return $ext(e,this.Methods)},Methods:{},include:function(m,d){$ext(this.Methods,m,d);i.each(function(k){$ext(k.prototype,m,d)})}};i.each(function(k){$alias(k.prototype,{_blur:'blur',_focus:'focus',_select:'select'})})})();Form.Element.include({getValue:function(){if(this.type=='select-multiple')return $A(this.getElementsByTagName('option')).map(function(o){return o.selected?o.value:null}).compact();else return this.value},setValue:function(v){if(this.type=='select-multiple'){v=$A(isArray(v)?v:[v]).map(String);$A(this.getElementsByTagName('option')).each(function(o){o.selected=v.includes(o.value)})}else this.value=v;return this},disable:function(){this.disabled=true;this.fire('disable');return this},enable:function(){this.disabled=false;this.fire('enable');return this},focus:function(){Browser.OLD?this._focus():this._focus.call(this);this.focused=true;this.fire('focus');return this},select:function(){this.focus();Browser.OLD?this._select():this._select.call(this);return this},blur:function(){Browser.OLD?this._blur():this._blur.call(this);this.focused=false;this.fire('blur');return this}});Form.Element.include(Observer.createShortcuts({},$w('disable enable focus blur change')),true);Cookie=new Class({include:Options,extend:{set:function(n,v,o){return new this(n,o).set(v)},get:function(n){return new this(n).get()},remove:function(n){return new this(n).remove()},enabled:function(){document.cookie="__t=1";return document.cookie.indexOf("__t=1")!=-1},Options:{secure:false,document:document}},initialize:function(n,o){this.name=n;this.setOptions(o)},set:function(v){var v=encodeURIComponent(v),o=this.options;if(o.domain)v+='; domain='+o.domain;if(o.path)v+='; path='+o.path;if(o.duration){var d=new Date();d.setTime(d.getTime()+o.duration*24*60*60*1000);v+='; expires='+d.toGMTString()}if(o.secure)v+='; secure';o.document.cookie=this.name+'='+v;return this},get:function(){var v=this.options.document.cookie.match('(?:^|;)\\s*'+RegExp.escape(this.name)+'=([^;]*)');return(v)?decodeURIComponent(v[1]):null},remove:function(){this.options.duration=-1;return this.set('')}});Xhr=new Class(Observer,{extend:{EVENTS:$w('success failure complete request cancel create'),Options:{headers:{'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript,text/html,application/xml,text/xml,*/*'},method:'post',encoding:'utf-8',async:true,evalScripts:false,evalResponse:false,evalJSON:true,secureJSON:true,urlEncoded:true,spinner:null,spinnerFx:'fade',params:null,iframed:false},load:function(u,o){return new this(u,Object.merge({method:'get'},o)).send()}},initialize:function(u,o){this.initCallbacks();this.url=u;this.$super(o);for(var k in Xhr.Options)this[k]=this.options[k];this.initSpinner()},setHeader:function(n,v){this.headers[n]=v;return this},getHeader:function(n){try{return this.xhr.getResponseHeader(n)}catch(e){}},successful:function(){return(this.status>=200)&&(this.status<300)},send:function(p){var a={},u=this.url,m=this.method.toLowerCase(),k;if(m=='put'||m=='delete'){a['_method']=m;m='post'}var d=this.prepareData(this.params,this.prepareParams(p),a);if(this.urlEncoded&&m=='post'&&!this.headers['Content-type'])this.setHeader('Content-type','application/x-www-form-urlencoded;charset='+this.encoding);if(m=='get'){if(d)u+=(u.includes('?')?'&':'?')+d;d=null}this.xhr=this.createXhr();this.fire('create');this.xhr.open(m,u,this.async);this.xhr.onreadystatechange=this.stateChanged.bind(this);for(k in this.headers)this.xhr.setRequestHeader(k,this.headers[k]);this.xhr.send(d);this.fire('request');if(!this.async)this.stateChanged();return this},update:function(e,p){return this.onSuccess(function(a){e.update(a.text)}).send(p)},cancel:function(){if(!this.xhr||this.xhr.canceled)return this;this.xhr.abort();this.xhr.onreadystatechange=function(){};this.xhr.canceled=true;return this.fire('cancel')},fire:function(n){return this.$super(n,this,this.xhr)},createXhr:function(){if(this.form&&this.form.getElements().map('type').includes('file'))return new Xhr.IFramed(this.form);else try{return new XMLHttpRequest()}catch(e){return new ActiveXObject('MSXML2.XMLHTTP')}},prepareParams:function(p){if(p&&p.tagName=='FORM'){this.form=p;p=p.values()}return p},prepareData:function(){return $A(arguments).map(function(p){if(!isString(p))p=Object.toQueryString(p);return p.blank()?null:p}).compact().join('&')},stateChanged:function(){if(this.xhr.readyState!=4||this.xhr.canceled)return;try{this.status=this.xhr.status}catch(e){this.status=0}this.text=this.responseText=this.xhr.responseText;this.xml=this.responseXML=this.xhr.responseXML;this.fire('complete').fire(this.successful()?'success':'failure')},tryScripts:function(r){if(this.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))$eval(this.text);else if((/json/).test(this.getHeader('Content-type'))&&this.evalJSON)this.json=this.responseJSON=this.sanitizedJSON();else if(this.evalScripts)this.text.evalScripts()},sanitizedJSON:function(){try{return JSON.parse(this.text)}catch(e){if(window.JSON||!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(this.text.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,''))){if(this.secureJSON)throw "JSON parse error: "+this.text;else return null}}return eval("("+this.text+")")},initCallbacks:function(){this.on({success:'tryScripts',create:'showSpinner',complete:'hideSpinner',cancel:'hideSpinner'});Xhr.EVENTS.each(function(n){this.on(n,function(){Xhr.fire(n,this,this.xhr)})},this)},initSpinner:function(){if(this.spinner)this.spinner=$(this.spinner);if(Xhr.Options.spinner&&this.spinner===$(Xhr.Options.spinner))this.spinner=null},showSpinner:function(){if(this.spinner)this.spinner.show(this.spinnerFx,{duration:100})},hideSpinner:function(){if(this.spinner)this.spinner.hide(this.spinnerFx,{duration:100})}});Observer.create(Xhr);$ext(Xhr,{counter:0,showSpinner:function(){if(this.Options.spinner)$(this.Options.spinner).show(this.Options.spinnerFx,{duration:100})},hideSpinner:function(){if(this.Options.spinner)$(this.Options.spinner).hide(this.Options.spinnerFx,{duration:100})}});Xhr.onCreate(function(){this.counter++;this.showSpinner()}).onComplete(function(){this.counter--;if(this.counter<1)this.hideSpinner()}).onCancel(function(){this.counter--;if(this.counter<1)this.hideSpinner()});Form.include({send:function(o){o=o||{};o['method']=o['method']||this.method||'post';new Xhr(this.get('action')||document.location.href,o).onRequest(this.disable.bind(this)).onComplete(this.enable.bind(this)).send(this);return this},remotize:function(o){this.onsubmit=function(){this.send.bind(this,Object.merge({spinner:this.first('.spinner')},o)).delay(20);return false};this.remote=true;return this},unremotize:function(){this.onsubmit=function(){};this.remote=false;return this}});Element.include({load:function(u,o){new Xhr(u,Object.merge({method:'get'},o)).update(this);return this}});Xhr.IFramed=new Class({initialize:function(f){this.form=f;var i='xhr_frame_'+Math.random().toString().split('.').last();$E('div').insertTo(document.body).update('<iframe name="'+i+'" id="'+i+'" width="0" height="0" frameborder="0" src="about:blank"></iframe>');this.iframe=$(i);this.iframe.on('load',this.onLoad.bind(this))},send:function(){var o=this.form.onsubmit,a=this.form.target;this.form.onsubmit=function(){};this.form.target=this.iframe.id;this.form.submit();this.form.onsubmit=o;this.form.target=a},onLoad:function(){this.status=200;this.readyState=4;try{this.responseText=window[this.iframe.id].document.documentElement.innerHTML}catch(e){}this.onreadystatechange()},open:function(){},abort:function(){},setRequestHeader:function(){},onreadystatechange:function(){}});Fx=new Class(Observer,{extend:{EVENTS:$w('start finish cancel'),Durations:{'short':200,'normal':400,'long':800},Options:{fps:Browser.IE?40:60,duration:'normal',transition:'Sin',queue:true},Transitions:{Sin:function(a){return-(Math.cos(Math.PI*a)-1)/2},Cos:function(a){return Math.asin((a-0.5)*2)/Math.PI+0.5},Exp:function(a){return Math.pow(2,8*(a-1))},Log:function(a){return 1-Math.pow(2,-8*a)},Lin:function(a){return a}},ch:[],cr:[]},initialize:function(e,o){this.$super(o);if(this.element=e=$(e)){var u=$uid(e);this.ch=(Fx.ch[u]=Fx.ch[u]||[]);this.cr=(Fx.cr[u]=Fx.cr[u]||[])}},start:function(){if(this.queue(arguments))return this;this.prepare.apply(this,arguments);var o=this.options,d=Fx.Durations[o.duration]||o.duration;this.transition=Fx.Transitions[o.transition]||o.transition;this.steps=(d/1000*this.options.fps).ceil();this.number=1;if(this.cr)this.cr.push(this);return this.fire('start',this).startTimer()},finish:function(){return this.stopTimer().unreg().fire('finish').next()},cancel:function(){this.ch.clean();return this.stopTimer().unreg().fire('cancel')},pause:function(){return this.stopTimer()},resume:function(){return this.startTimer()},prepare:function(v){},render:function(d){},step:function(t){if(t.number>t.steps)t.finish();else{if(!t.w){t.w=true;t.render(t.transition(t.number/t.steps));t.w=false}t.number++}},startTimer:function(){this.timer=this.step.periodical((1000/this.options.fps).round(),this);return this},stopTimer:function(){if(this.timer)this.timer.stop();return this},queue:function(a){var c=this.ch,q=this.options.queue;if(!c||this.$ch)return this.$ch=false;if(q)c.push([a,this]);return q&&c[0][1]!==this},next:function(){var c=this.ch,n=c.shift(),n=c[0];if(n){n[1].$ch=true;n[1].start.apply(n[1],n[0])}return this},unreg:function(){var c=this.cr;if(c)c.splice(c.indexOf(this),1);return this}});String.COLORS={maroon:'#800000',red:'#ff0000',orange:'#ffA500',yellow:'#ffff00',olive:'#808000',purple:'#800080',fuchsia:'#ff00ff',white:'#ffffff',lime:'#00ff00',green:'#008000',navy:'#000080',blue:'#0000ff',aqua:'#00ffff',teal:'#008080',black:'#000000',silver:'#c0c0c0',gray:'#808080',brown:'#a52a2a'};String.include({toHex:function(){var m=/^#(\w)(\w)(\w)$/.exec(this);if(m)m="#"+m[1]+m[1]+m[2]+m[2]+m[3]+m[3];else if(m=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(this))m="#"+m.slice(1).map(function(b){b=(b-0).toString(16);return b.length==1?'0'+b:b}).join('');else m=String.COLORS[this]||this;return m},toRgb:function(a){var m=/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/i.exec(this.toHex()||'');if(m){m=m.slice(1).map('toInt',16);m=a?m:'rgb('+m+')'}return m}});Fx.Morph=new Class(Fx,(function(){var C='Color',S='Style',W='Width',B='background',o='border',P='Position',h=B+C,t=$w('Top Left Right Bottom');function p(a,k,v){for(var i=0;i<v.length;i++)a.push(k+v[i])};function q(e,a){for(var i=0;i<4;i++){var f=t[i],c=o+f+S,d=o+f+W,b=o+f+C;if(e[c]!=a[c]){var s=this.element.style;if(e[c]=='none')s[d]='0px';s[c]=a[c];if(this._transp(e[b]))s[b]=this.element.getStyle(C)}}};function u(b){var a={},r=/[\d\.\-]+/g,m,k,v,i;for(k in b){m=b[k].match(r);v=m.map('toFloat');v.t=b[k].split(r);v.r=v.t[0]==='rgb(';if(v.t.length==1)v.t.unshift('');for(i=0;i<v.length;i++)v.t.splice(i*2+1,0,v[i]);a[k]=v}return a};return{prepare:function(s){var k=this._styleKeys(s),b=this._cloneStyle(this.element,k),a=this._endStyle(s,k);this._cleanStyles(b,a);this.before=u(b);this.after=u(a)},render:function(d){var b,a,v,s=this.element.style,k,i;for(k in this.after){b=this.before[k];a=this.after[k];for(i=0;i<a.length;i++){v=b[i]+(a[i]-b[i])*d;if(a.r)v=Math.round(v);a.t[i*2+1]=v}s[k]=a.t.join('')}},_endStyle:function(s,k){var d=$(this.element.cloneNode(true)).setStyle('position:absolute;z-index:-1;visibility:hidden').insertTo(this.element,'before').setWidth(this.element.sizes().x).setStyle(s),a=this._cloneStyle(d,k);d.remove();return a},_cloneStyle:function(e,k){for(var i=0,l=k.length,s=e.computedStyles(),c={};i<l;i++)c[k[i]]=s[k[i]];return c},_styleKeys:function(s){var a=[],b=[S,C,W],k,i,j;for(k in s){if(k.startsWith(o))for(i=0;i<b.length;i++)for(j=0;j<t.length;j++)a.push(o+t[j]+b[i]);else if(k=='margin'||k=='padding')p(a,k,t);else if(k.startsWith(B))p(a,B,[C,P,P+'X',P+'Y']);else if(k=='opacity'&&Browser.IE)a.push('filter');else a.push(k)}return a},_cleanStyles:function(b,a){var r=[],k;for(k in a)if((k=='width'||k=='height')&&b[k]=='auto')b[k]=this.element['offset'+k.capitalize()]+'px';if(a.filter&&!b.filter)b.filter='alpha(opacity=100)';q.call(this,b,a);for(k in a){if(a[k]!==b[k]&&!r.includes(k)&&/color/i.test(k)){if(Browser.Opera){a[k]=a[k].replace(/"/g,'');b[k]=b[k].replace(/"/g,'')}if(!this._transp(a[k]))a[k]=a[k].toRgb();if(!this._transp(b[k]))b[k]=b[k].toRgb();if(!a[k]||!b[k])a[k]=b[k]=''}if(/\d/.test(a[k])&&!/\d/.test(b[k]))b[k]=a[k].replace(/[\d\.\-]+/g,'0');if(a[k]===b[k]||r.includes(k)||!/\d/.test(b[k])||!/\d/.test(a[k])){delete(a[k]);delete(b[k])}}},_getBGColor:function(e){return[e].concat(e.parents()).map(function(n){var b=n.getStyle(h);return(b&&!this._transp(b))?b:null},this).compact().first()||'#FFF'},_transp:function(c){return c==='transparent'||c==='rgba(0, 0, 0, 0)'}}})());Fx.Highlight=new Class(Fx.Morph,{extend:{Options:Object.merge(Fx.Options,{color:'#FF8',transition:'Exp'})},prepare:function(s,e){var a=e||this.element.getStyle('backgroundColor');if(this._transp(a)){this.onFinish(function(){this.element.style.backgroundColor='transparent'});a=this._getBGColor(this.element)}this.element.style.backgroundColor=(s||this.options.color);return this.$super({backgroundColor:a})}});Fx.Twin=new Class(Fx.Morph,{finish:function(){if(this.how=='out')this.element.hide();return this.$super()},setHow:function(h){this.how=h||'toggle';if(this.how=='toggle')this.how=this.element.visible()?'out':'in'}});Fx.Slide=new Class(Fx.Twin,{extend:{Options:Object.merge(Fx.Options,{direction:'top'})},prepare:function(h){this.setHow(h);var e=this.element;e.show();this.sizes=e.sizes();this.styles={};$w('overflow height width marginTop marginLeft').each(function(k){this.styles[k]=e.style[k]},this);e.style.overflow='hidden';this.onFinish('_getBack').onCancel('_getBack');return this.$super(this._getStyle(this.options.direction))},_getBack:function(){this.element.setStyle(this.styles)},_getStyle:function(d){var f={},s=this.sizes,m='marginLeft',a='marginTop',b=this.styles[m].toFloat()||0,c=this.styles[a].toFloat()||0;if(this.how=='out'){f[['top','bottom'].includes(d)?'height':'width']='0px';if(d=='right')f[m]=b+s.x+'px';else if(d=='bottom')f[a]=c+s.y+'px'}else if(this.how=='in'){var e=this.element.style;if(['top','bottom'].includes(d)){f.height=s.y+'px';e.height='0px'}else{f.width=s.x+'px';e.width='0px'}if(d=='right'){f[m]=b+'px';e[m]=b+s.x+'px'}else if(d=='bottom'){f[a]=c+'px';e[a]=c+s.y+'px'}}return f}});Fx.Fade=new Class(Fx.Twin,{prepare:function(h){this.setHow(h);if(this.how=='in')this.element.setStyle({opacity:0}).show();return this.$super({opacity:isNumber(h)?h:this.how=='in'?1:0})}});Fx.Scroll=new Class(Fx,{initialize:function(e,o){this.$super(e.prompt?e.document[Browser.WebKit?'body':'documentElement']:e,o)},prepare:function(v){this.before={};this.after=v;if(defined(v.x))this.before.x=this.element.scrollLeft;if(defined(v.y))this.before.y=this.element.scrollTop},render:function(d){var b=this.before,k;for(k in b)this.element['scroll'+(k=='x'?'Left':'Top')]=b[k]+(this.after[k]-b[k])*d}});Element.include((function(m){var b=m.hide,d=m.show,c=m.scrollTo;return{stop:function(){(Fx.cr[$uid(this)]||[]).each('cancel');return this},hide:function(f,o){return f?this.fx(f,['out',o]):b.call(this)},show:function(f,o){return f?this.fx(f,['in',o]):d.call(this)},morph:function(s,o){return this.fx('morph',[s,o||{}])},highlight:function(){return this.fx('highlight',arguments)},fade:function(){return this.fx('fade',arguments)},slide:function(){return this.fx('slide',arguments)},scroll:function(v,o){return this.fx('scroll',[v,o||{}])},scrollTo:function(v,o){return isHash(o)?this.scroll(v,o):c.apply(this,arguments)},fx:function(n,a){var a=$A(a).compact(),o=isHash(a.last())?a.pop():{},f=new Fx[n.capitalize()](this,o);f.start.apply(f,a);return this}}})(Element.Methods));if(!document.querySelector)(function(){var r=/(^|\/)(right)([^\/]+)$/,c=$A(document.getElementsByTagName('script')).map('src').compact().first('match',r);if(c)document.write('<scr'+'ipt src="'+c.replace(r,'$1$2-olds$3')+'"></scr'+'ipt>')})();