kirgudu_base 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (871) hide show
  1. checksums.yaml +6 -14
  2. data/Rakefile +1 -1
  3. data/app/assets/images/kirgudu_base/404-fry.png +0 -0
  4. data/app/assets/images/kirgudu_base/{ajax-loader.gif → admin/default/ajax-loader.gif} +0 -0
  5. data/app/assets/images/kirgudu_base/{alpha.png → admin/default/alpha.png} +0 -0
  6. data/app/assets/images/kirgudu_base/{alpha2.png → admin/default/alpha2.png} +0 -0
  7. data/app/assets/images/kirgudu_base/{arrow.png → admin/default/arrow.png} +0 -0
  8. data/app/assets/images/kirgudu_base/{company_pxg.png → admin/default/company_pxg.png} +0 -0
  9. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/back_disabled.png +0 -0
  10. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/back_enabled.png +0 -0
  11. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/back_enabled_hover.png +0 -0
  12. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/forward_disabled.png +0 -0
  13. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/forward_enabled.png +0 -0
  14. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/forward_enabled_hover.png +0 -0
  15. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/sort_asc.png +0 -0
  16. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/sort_asc_disabled.png +0 -0
  17. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/sort_both.png +0 -0
  18. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/sort_desc.png +0 -0
  19. data/app/assets/images/kirgudu_base/{datatables → admin/default/datatables}/sort_desc_disabled.png +0 -0
  20. data/app/assets/images/kirgudu_base/{favicon.png → admin/default/favicon.png} +0 -0
  21. data/app/assets/images/kirgudu_base/{general → admin/default/general}/clock.png +0 -0
  22. data/app/assets/images/kirgudu_base/{general → admin/default/general}/clock2.png +0 -0
  23. data/app/assets/images/kirgudu_base/{general → admin/default/general}/coffee.png +0 -0
  24. data/app/assets/images/kirgudu_base/{general → admin/default/general}/coffee2.png +0 -0
  25. data/app/assets/images/kirgudu_base/{general → admin/default/general}/flipchart.png +0 -0
  26. data/app/assets/images/kirgudu_base/{general → admin/default/general}/flipchart2.png +0 -0
  27. data/app/assets/images/kirgudu_base/{general → admin/default/general}/sun.png +0 -0
  28. data/app/assets/images/kirgudu_base/{general → admin/default/general}/sun2.png +0 -0
  29. data/app/assets/images/kirgudu_base/{glyphicons-halflings-white.png → admin/default/glyphicons-halflings-white.png} +0 -0
  30. data/app/assets/images/kirgudu_base/{glyphicons-halflings.png → admin/default/glyphicons-halflings.png} +0 -0
  31. data/app/assets/images/kirgudu_base/{gradient1.png → admin/default/gradient1.png} +0 -0
  32. data/app/assets/images/kirgudu_base/{hue2.png → admin/default/hue2.png} +0 -0
  33. data/app/assets/images/kirgudu_base/{icons-sa7c41345d9.png → admin/default/icons-sa7c41345d9.png} +0 -0
  34. data/app/assets/images/kirgudu_base/{login-corner.png → admin/default/login-corner.png} +0 -0
  35. data/app/assets/images/kirgudu_base/{login-corner2.png → admin/default/login-corner2.png} +0 -0
  36. data/app/assets/images/kirgudu_base/admin/default/logo.png +0 -0
  37. data/app/assets/images/kirgudu_base/{maps → admin/default/maps}/m1.png +0 -0
  38. data/app/assets/images/kirgudu_base/{maps → admin/default/maps}/m2.png +0 -0
  39. data/app/assets/images/kirgudu_base/{maps → admin/default/maps}/m3.png +0 -0
  40. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/calendar.png +0 -0
  41. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/dashboard.png +0 -0
  42. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/forms.png +0 -0
  43. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/gallery.png +0 -0
  44. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/grid.png +0 -0
  45. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/maps.png +0 -0
  46. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/others.png +0 -0
  47. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/statistics.png +0 -0
  48. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/tables.png +0 -0
  49. data/app/assets/images/kirgudu_base/{menu_icons → admin/default/menu_icons}/widgets.png +0 -0
  50. data/app/assets/images/kirgudu_base/{menu_top → admin/default/menu_top}/profile-avatar.png +0 -0
  51. data/app/assets/images/kirgudu_base/{menu_top → admin/default/menu_top}/profile-messages.png +0 -0
  52. data/app/assets/images/kirgudu_base/{message_avatar1.png → admin/default/message_avatar1.png} +0 -0
  53. data/app/assets/images/kirgudu_base/{message_avatar2.png → admin/default/message_avatar2.png} +0 -0
  54. data/app/assets/images/kirgudu_base/{message_avatar3.png → admin/default/message_avatar3.png} +0 -0
  55. data/app/assets/images/kirgudu_base/{message_avatar4.png → admin/default/message_avatar4.png} +0 -0
  56. data/app/assets/images/kirgudu_base/{message_avatar5.png → admin/default/message_avatar5.png} +0 -0
  57. data/app/assets/images/kirgudu_base/{message_avatar6.png → admin/default/message_avatar6.png} +0 -0
  58. data/app/assets/images/kirgudu_base/{message_avatar7.png → admin/default/message_avatar7.png} +0 -0
  59. data/app/assets/images/kirgudu_base/{patterns → admin/default/patterns}/bg_dark.png +0 -0
  60. data/app/assets/images/kirgudu_base/{patterns → admin/default/patterns}/bg_dark2.png +0 -0
  61. data/app/assets/images/kirgudu_base/{patterns → admin/default/patterns}/bg_dark3.png +0 -0
  62. data/app/assets/images/kirgudu_base/{patterns → admin/default/patterns}/whitey.png +0 -0
  63. data/app/assets/images/kirgudu_base/{sample_avatar_big.jpg → admin/default/sample_avatar_big.jpg} +0 -0
  64. data/app/assets/images/kirgudu_base/{saturation2.png → admin/default/saturation2.png} +0 -0
  65. data/app/assets/images/kirgudu_base/{search.png → admin/default/search.png} +0 -0
  66. data/app/assets/images/kirgudu_base/{toggle.png → admin/default/toggle.png} +0 -0
  67. data/app/assets/images/kirgudu_base/{ui-bg_fine-grain_10_e7e7e7_60x60.png → admin/default/ui-bg_fine-grain_10_e7e7e7_60x60.png} +0 -0
  68. data/app/assets/images/kirgudu_base/{ui-bg_flat_0_aaaaaa_40x100.png → admin/default/ui-bg_flat_0_aaaaaa_40x100.png} +0 -0
  69. data/app/assets/images/kirgudu_base/{ui-bg_flat_0_ef4622_40x100.png → admin/default/ui-bg_flat_0_ef4622_40x100.png} +0 -0
  70. data/app/assets/images/kirgudu_base/{ui-bg_glass_65_ffffff_1x400.png → admin/default/ui-bg_glass_65_ffffff_1x400.png} +0 -0
  71. data/app/assets/images/kirgudu_base/{ui-bg_highlight-hard_100_e1e1e1_1x100.png → admin/default/ui-bg_highlight-hard_100_e1e1e1_1x100.png} +0 -0
  72. data/app/assets/images/kirgudu_base/{ui-bg_highlight-hard_100_eeeeee_1x100.png → admin/default/ui-bg_highlight-hard_100_eeeeee_1x100.png} +0 -0
  73. data/app/assets/images/kirgudu_base/{ui-bg_highlight-hard_75_dddddd_1x100.png → admin/default/ui-bg_highlight-hard_75_dddddd_1x100.png} +0 -0
  74. data/app/assets/images/kirgudu_base/{ui-bg_inset-soft_95_fef1ec_1x100.png → admin/default/ui-bg_inset-soft_95_fef1ec_1x100.png} +0 -0
  75. data/app/assets/images/kirgudu_base/{ui-icons_454545_256x240.png → admin/default/ui-icons_454545_256x240.png} +0 -0
  76. data/app/assets/images/kirgudu_base/{ui-icons_525d66_256x240.png → admin/default/ui-icons_525d66_256x240.png} +0 -0
  77. data/app/assets/images/kirgudu_base/{ui-icons_cd0a0a_256x240.png → admin/default/ui-icons_cd0a0a_256x240.png} +0 -0
  78. data/app/assets/images/kirgudu_base/{ui-icons_ffffff_256x240.png → admin/default/ui-icons_ffffff_256x240.png} +0 -0
  79. data/app/assets/images/kirgudu_base/admin/good/404.png +0 -0
  80. data/app/assets/images/kirgudu_base/admin/good/500x600.gif +0 -0
  81. data/app/assets/images/kirgudu_base/admin/good/PhotoShare(1).png +0 -0
  82. data/app/assets/images/kirgudu_base/admin/good/PhotoShare(2).png +0 -0
  83. data/app/assets/images/kirgudu_base/admin/good/PhotoShare(3).png +0 -0
  84. data/app/assets/images/kirgudu_base/admin/good/ajax-loader.gif +0 -0
  85. data/app/assets/images/kirgudu_base/admin/good/arrow.png +0 -0
  86. data/app/assets/images/kirgudu_base/admin/good/asd.png +0 -0
  87. data/app/assets/images/kirgudu_base/admin/good/avatar-1.png +0 -0
  88. data/app/assets/images/kirgudu_base/admin/good/avatar-2.png +0 -0
  89. data/app/assets/images/kirgudu_base/admin/good/avatar-4.png +0 -0
  90. data/app/assets/images/kirgudu_base/admin/good/avatar-8.png +0 -0
  91. data/app/assets/images/kirgudu_base/admin/good/banner.jpg +0 -0
  92. data/app/assets/images/kirgudu_base/admin/good/bg-texture.jpg +0 -0
  93. data/app/assets/images/kirgudu_base/admin/good/bg.jpg +0 -0
  94. data/app/assets/images/kirgudu_base/admin/good/bg1.jpg +0 -0
  95. data/app/assets/images/kirgudu_base/admin/good/blue-btn.jpg +0 -0
  96. data/app/assets/images/kirgudu_base/admin/good/body-bg.jpg +0 -0
  97. data/app/assets/images/kirgudu_base/admin/good/brown-btn.jpg +0 -0
  98. data/app/assets/images/kirgudu_base/admin/good/btn-10.jpg +0 -0
  99. data/app/assets/images/kirgudu_base/admin/good/btn-11.jpg +0 -0
  100. data/app/assets/images/kirgudu_base/admin/good/btn-12.jpg +0 -0
  101. data/app/assets/images/kirgudu_base/admin/good/btn-13.jpg +0 -0
  102. data/app/assets/images/kirgudu_base/admin/good/btn-14.jpg +0 -0
  103. data/app/assets/images/kirgudu_base/admin/good/btn-15.jpg +0 -0
  104. data/app/assets/images/kirgudu_base/admin/good/btn-16.jpg +0 -0
  105. data/app/assets/images/kirgudu_base/admin/good/btn-17.jpg +0 -0
  106. data/app/assets/images/kirgudu_base/admin/good/btn-18.jpg +0 -0
  107. data/app/assets/images/kirgudu_base/admin/good/btn-19.jpg +0 -0
  108. data/app/assets/images/kirgudu_base/admin/good/btn-20.jpg +0 -0
  109. data/app/assets/images/kirgudu_base/admin/good/btn-21.jpg +0 -0
  110. data/app/assets/images/kirgudu_base/admin/good/btn-22.jpg +0 -0
  111. data/app/assets/images/kirgudu_base/admin/good/btn-23.jpg +0 -0
  112. data/app/assets/images/kirgudu_base/admin/good/btn-24.jpg +0 -0
  113. data/app/assets/images/kirgudu_base/admin/good/btn-25.jpg +0 -0
  114. data/app/assets/images/kirgudu_base/admin/good/btn-26.jpg +0 -0
  115. data/app/assets/images/kirgudu_base/admin/good/btn-27.jpg +0 -0
  116. data/app/assets/images/kirgudu_base/admin/good/btn-28.jpg +0 -0
  117. data/app/assets/images/kirgudu_base/admin/good/btn-29.jpg +0 -0
  118. data/app/assets/images/kirgudu_base/admin/good/btn-30.jpg +0 -0
  119. data/app/assets/images/kirgudu_base/admin/good/btn-31.jpg +0 -0
  120. data/app/assets/images/kirgudu_base/admin/good/btn-32.jpg +0 -0
  121. data/app/assets/images/kirgudu_base/admin/good/btn-33.jpg +0 -0
  122. data/app/assets/images/kirgudu_base/admin/good/btn-34.jpg +0 -0
  123. data/app/assets/images/kirgudu_base/admin/good/btn-35.jpg +0 -0
  124. data/app/assets/images/kirgudu_base/admin/good/btn-36.jpg +0 -0
  125. data/app/assets/images/kirgudu_base/admin/good/btn-37.jpg +0 -0
  126. data/app/assets/images/kirgudu_base/admin/good/btn-38.jpg +0 -0
  127. data/app/assets/images/kirgudu_base/admin/good/btn-39.jpg +0 -0
  128. data/app/assets/images/kirgudu_base/admin/good/btn-40.jpg +0 -0
  129. data/app/assets/images/kirgudu_base/admin/good/btn-41.jpg +0 -0
  130. data/app/assets/images/kirgudu_base/admin/good/btn-42.jpg +0 -0
  131. data/app/assets/images/kirgudu_base/admin/good/btn-43.jpg +0 -0
  132. data/app/assets/images/kirgudu_base/admin/good/btn-44.jpg +0 -0
  133. data/app/assets/images/kirgudu_base/admin/good/btn-45.jpg +0 -0
  134. data/app/assets/images/kirgudu_base/admin/good/btn-46.jpg +0 -0
  135. data/app/assets/images/kirgudu_base/admin/good/btn-47.jpg +0 -0
  136. data/app/assets/images/kirgudu_base/admin/good/btn-48.jpg +0 -0
  137. data/app/assets/images/kirgudu_base/admin/good/btn-49.jpg +0 -0
  138. data/app/assets/images/kirgudu_base/admin/good/btn-50.jpg +0 -0
  139. data/app/assets/images/kirgudu_base/admin/good/btn-51.jpg +0 -0
  140. data/app/assets/images/kirgudu_base/admin/good/btn-52.jpg +0 -0
  141. data/app/assets/images/kirgudu_base/admin/good/btn-53.jpg +0 -0
  142. data/app/assets/images/kirgudu_base/admin/good/btn-54.jpg +0 -0
  143. data/app/assets/images/kirgudu_base/admin/good/btn-55.jpg +0 -0
  144. data/app/assets/images/kirgudu_base/admin/good/btn-56.jpg +0 -0
  145. data/app/assets/images/kirgudu_base/admin/good/btn-57.jpg +0 -0
  146. data/app/assets/images/kirgudu_base/admin/good/btn-58.jpg +0 -0
  147. data/app/assets/images/kirgudu_base/admin/good/btn-59.jpg +0 -0
  148. data/app/assets/images/kirgudu_base/admin/good/btn-60.jpg +0 -0
  149. data/app/assets/images/kirgudu_base/admin/good/btn-61.jpg +0 -0
  150. data/app/assets/images/kirgudu_base/admin/good/btn-62.jpg +0 -0
  151. data/app/assets/images/kirgudu_base/admin/good/btn-63.jpg +0 -0
  152. data/app/assets/images/kirgudu_base/admin/good/btn-8.jpg +0 -0
  153. data/app/assets/images/kirgudu_base/admin/good/btn-9.jpg +0 -0
  154. data/app/assets/images/kirgudu_base/admin/good/cal.gif +0 -0
  155. data/app/assets/images/kirgudu_base/admin/good/chat-user1.jpg +0 -0
  156. data/app/assets/images/kirgudu_base/admin/good/chrome-icon.png +0 -0
  157. data/app/assets/images/kirgudu_base/admin/good/clockface.gif +0 -0
  158. data/app/assets/images/kirgudu_base/admin/good/clockface.png +0 -0
  159. data/app/assets/images/kirgudu_base/admin/good/cyan-btn.jpg +0 -0
  160. data/app/assets/images/kirgudu_base/admin/good/dark-theme-thumb.jpg +0 -0
  161. data/app/assets/images/kirgudu_base/admin/good/dark_leather.png +0 -0
  162. data/app/assets/images/kirgudu_base/admin/good/darkdenim3.png +0 -0
  163. data/app/assets/images/kirgudu_base/admin/good/email-thumb.png +0 -0
  164. data/app/assets/images/kirgudu_base/admin/good/error.gif +0 -0
  165. data/app/assets/images/kirgudu_base/admin/good/fb.jpg +0 -0
  166. data/app/assets/images/kirgudu_base/admin/good/firefox-icon.png +0 -0
  167. data/app/assets/images/kirgudu_base/admin/good/globe.png +0 -0
  168. data/app/assets/images/kirgudu_base/admin/good/gray-btn.jpg +0 -0
  169. data/app/assets/images/kirgudu_base/admin/good/gray-gradient.jpg +0 -0
  170. data/app/assets/images/kirgudu_base/admin/good/green-btn.jpg +0 -0
  171. data/app/assets/images/kirgudu_base/admin/good/group.png +0 -0
  172. data/app/assets/images/kirgudu_base/admin/good/header-bg.jpg +0 -0
  173. data/app/assets/images/kirgudu_base/admin/good/hosting pic.png +0 -0
  174. data/app/assets/images/kirgudu_base/admin/good/hourhand.png +0 -0
  175. data/app/assets/images/kirgudu_base/admin/good/ie-icon.png +0 -0
  176. data/app/assets/images/kirgudu_base/admin/good/img/arrows-active.png +0 -0
  177. data/app/assets/images/kirgudu_base/admin/good/img/arrows-normal.png +0 -0
  178. data/app/assets/images/kirgudu_base/admin/good/img/crop.gif +0 -0
  179. data/app/assets/images/kirgudu_base/admin/good/img/dialogs.png +0 -0
  180. data/app/assets/images/kirgudu_base/admin/good/img/icons-big.png +0 -0
  181. data/app/assets/images/kirgudu_base/admin/good/img/icons-small.png +0 -0
  182. data/app/assets/images/kirgudu_base/admin/good/img/logo.png +0 -0
  183. data/app/assets/images/kirgudu_base/admin/good/img/progress.gif +0 -0
  184. data/app/assets/images/kirgudu_base/admin/good/img/quicklook-bg.png +0 -0
  185. data/app/assets/images/kirgudu_base/admin/good/img/quicklook-icons.png +0 -0
  186. data/app/assets/images/kirgudu_base/admin/good/img/resize.png +0 -0
  187. data/app/assets/images/kirgudu_base/admin/good/img/spinner-mini.gif +0 -0
  188. data/app/assets/images/kirgudu_base/admin/good/img/toolbar.png +0 -0
  189. data/app/assets/images/kirgudu_base/admin/good/light-theme-thumb.jpg +0 -0
  190. data/app/assets/images/kirgudu_base/admin/good/loader.gif +0 -0
  191. data/app/assets/images/kirgudu_base/admin/good/logo.png +0 -0
  192. data/app/assets/images/kirgudu_base/admin/good/logo2.png +0 -0
  193. data/app/assets/images/kirgudu_base/admin/good/loud.png +0 -0
  194. data/app/assets/images/kirgudu_base/admin/good/minhand.png +0 -0
  195. data/app/assets/images/kirgudu_base/admin/good/next_mon.gif +0 -0
  196. data/app/assets/images/kirgudu_base/admin/good/next_year.gif +0 -0
  197. data/app/assets/images/kirgudu_base/admin/good/no_cal.gif +0 -0
  198. data/app/assets/images/kirgudu_base/admin/good/opera-icon.png +0 -0
  199. data/app/assets/images/kirgudu_base/admin/good/pattern.jpg +0 -0
  200. data/app/assets/images/kirgudu_base/admin/good/pattern1.jpg +0 -0
  201. data/app/assets/images/kirgudu_base/admin/good/pattern1.png +0 -0
  202. data/app/assets/images/kirgudu_base/admin/good/pattern10.jpg +0 -0
  203. data/app/assets/images/kirgudu_base/admin/good/pattern11.png +0 -0
  204. data/app/assets/images/kirgudu_base/admin/good/pattern12.jpg +0 -0
  205. data/app/assets/images/kirgudu_base/admin/good/pattern13.jpg +0 -0
  206. data/app/assets/images/kirgudu_base/admin/good/pattern14.png +0 -0
  207. data/app/assets/images/kirgudu_base/admin/good/pattern15.jpg +0 -0
  208. data/app/assets/images/kirgudu_base/admin/good/pattern16.png +0 -0
  209. data/app/assets/images/kirgudu_base/admin/good/pattern17.png +0 -0
  210. data/app/assets/images/kirgudu_base/admin/good/pattern18.gif +0 -0
  211. data/app/assets/images/kirgudu_base/admin/good/pattern19.jpg +0 -0
  212. data/app/assets/images/kirgudu_base/admin/good/pattern2.jpg +0 -0
  213. data/app/assets/images/kirgudu_base/admin/good/pattern20.jpg +0 -0
  214. data/app/assets/images/kirgudu_base/admin/good/pattern21.jpg +0 -0
  215. data/app/assets/images/kirgudu_base/admin/good/pattern22.jpg +0 -0
  216. data/app/assets/images/kirgudu_base/admin/good/pattern23.jpg +0 -0
  217. data/app/assets/images/kirgudu_base/admin/good/pattern24.jpg +0 -0
  218. data/app/assets/images/kirgudu_base/admin/good/pattern25.jpg +0 -0
  219. data/app/assets/images/kirgudu_base/admin/good/pattern26.jpg +0 -0
  220. data/app/assets/images/kirgudu_base/admin/good/pattern27.jpg +0 -0
  221. data/app/assets/images/kirgudu_base/admin/good/pattern28.gif +0 -0
  222. data/app/assets/images/kirgudu_base/admin/good/pattern29.gif +0 -0
  223. data/app/assets/images/kirgudu_base/admin/good/pattern3.jpg +0 -0
  224. data/app/assets/images/kirgudu_base/admin/good/pattern30.jpg +0 -0
  225. data/app/assets/images/kirgudu_base/admin/good/pattern31.png +0 -0
  226. data/app/assets/images/kirgudu_base/admin/good/pattern32.png +0 -0
  227. data/app/assets/images/kirgudu_base/admin/good/pattern33.jpg +0 -0
  228. data/app/assets/images/kirgudu_base/admin/good/pattern34.png +0 -0
  229. data/app/assets/images/kirgudu_base/admin/good/pattern4.jpg +0 -0
  230. data/app/assets/images/kirgudu_base/admin/good/pattern5.jpg +0 -0
  231. data/app/assets/images/kirgudu_base/admin/good/pattern6.jpg +0 -0
  232. data/app/assets/images/kirgudu_base/admin/good/pattern7.jpg +0 -0
  233. data/app/assets/images/kirgudu_base/admin/good/pattern8.jpg +0 -0
  234. data/app/assets/images/kirgudu_base/admin/good/pattern9.jpg +0 -0
  235. data/app/assets/images/kirgudu_base/admin/good/pattern9.png +0 -0
  236. data/app/assets/images/kirgudu_base/admin/good/photo-profile.jpg +0 -0
  237. data/app/assets/images/kirgudu_base/admin/good/prev_mon.gif +0 -0
  238. data/app/assets/images/kirgudu_base/admin/good/prev_year.gif +0 -0
  239. data/app/assets/images/kirgudu_base/admin/good/price-gray.jpg +0 -0
  240. data/app/assets/images/kirgudu_base/admin/good/price-red.jpg +0 -0
  241. data/app/assets/images/kirgudu_base/admin/good/product1.jpg +0 -0
  242. data/app/assets/images/kirgudu_base/admin/good/product2.jpg +0 -0
  243. data/app/assets/images/kirgudu_base/admin/good/product3.jpg +0 -0
  244. data/app/assets/images/kirgudu_base/admin/good/product4.jpg +0 -0
  245. data/app/assets/images/kirgudu_base/admin/good/product5.jpg +0 -0
  246. data/app/assets/images/kirgudu_base/admin/good/purple-btn.jpg +0 -0
  247. data/app/assets/images/kirgudu_base/admin/good/red-btn.jpg +0 -0
  248. data/app/assets/images/kirgudu_base/admin/good/rocket.png +0 -0
  249. data/app/assets/images/kirgudu_base/admin/good/rss.jpg +0 -0
  250. data/app/assets/images/kirgudu_base/admin/good/safari-icon.png +0 -0
  251. data/app/assets/images/kirgudu_base/admin/good/screen1.png +0 -0
  252. data/app/assets/images/kirgudu_base/admin/good/screen2.png +0 -0
  253. data/app/assets/images/kirgudu_base/admin/good/screen3.png +0 -0
  254. data/app/assets/images/kirgudu_base/admin/good/screen4.png +0 -0
  255. data/app/assets/images/kirgudu_base/admin/good/screen5.png +0 -0
  256. data/app/assets/images/kirgudu_base/admin/good/search-bg.png +0 -0
  257. data/app/assets/images/kirgudu_base/admin/good/search-icon.png +0 -0
  258. data/app/assets/images/kirgudu_base/admin/good/sechand.png +0 -0
  259. data/app/assets/images/kirgudu_base/admin/good/section-pattern-bg.jpg +0 -0
  260. data/app/assets/images/kirgudu_base/admin/good/signup1.jpg +0 -0
  261. data/app/assets/images/kirgudu_base/admin/good/signup2.jpg +0 -0
  262. data/app/assets/images/kirgudu_base/admin/good/slider-img-1.jpg +0 -0
  263. data/app/assets/images/kirgudu_base/admin/good/slider-img-2.jpg +0 -0
  264. data/app/assets/images/kirgudu_base/admin/good/slider-img-3.jpg +0 -0
  265. data/app/assets/images/kirgudu_base/admin/good/sprite-skin-flat.png +0 -0
  266. data/app/assets/images/kirgudu_base/admin/good/sprite-skin-nice.png +0 -0
  267. data/app/assets/images/kirgudu_base/admin/good/sprite-skin-simple.png +0 -0
  268. data/app/assets/images/kirgudu_base/admin/good/success.gif +0 -0
  269. data/app/assets/images/kirgudu_base/admin/good/tag-arrow.png +0 -0
  270. data/app/assets/images/kirgudu_base/admin/good/tag-arrow2.png +0 -0
  271. data/app/assets/images/kirgudu_base/admin/good/thumb.png +0 -0
  272. data/app/assets/images/kirgudu_base/admin/good/thumb1.jpg +0 -0
  273. data/app/assets/images/kirgudu_base/admin/good/thumb2.jpg +0 -0
  274. data/app/assets/images/kirgudu_base/admin/good/thumb3.jpg +0 -0
  275. data/app/assets/images/kirgudu_base/admin/good/thumb4.jpg +0 -0
  276. data/app/assets/images/kirgudu_base/admin/good/toggle.png +0 -0
  277. data/app/assets/images/kirgudu_base/admin/good/triangles.png +0 -0
  278. data/app/assets/images/kirgudu_base/admin/good/twitter.jpg +0 -0
  279. data/app/assets/images/kirgudu_base/admin/good/typing-loading.gif +0 -0
  280. data/app/assets/images/kirgudu_base/admin/good/usd.png +0 -0
  281. data/app/assets/images/kirgudu_base/admin/good/user (2).jpg +0 -0
  282. data/app/assets/images/kirgudu_base/admin/good/user-log-in.png +0 -0
  283. data/app/assets/images/kirgudu_base/admin/good/user.jpg +0 -0
  284. data/app/assets/images/kirgudu_base/admin/good/user.png +0 -0
  285. data/app/assets/images/kirgudu_base/admin/good/user2.jpg +0 -0
  286. data/app/assets/images/kirgudu_base/admin/good/user3.jpg +0 -0
  287. data/app/assets/images/kirgudu_base/admin/good/user4.jpg +0 -0
  288. data/app/assets/images/kirgudu_base/admin/good/world-map.png +0 -0
  289. data/app/assets/images/kirgudu_base/chosen-sprite.png +0 -0
  290. data/app/assets/images/kirgudu_base/jquery-file-upload/error.png +0 -0
  291. data/app/assets/images/kirgudu_base/jquery-file-upload/loading.gif +0 -0
  292. data/app/assets/images/kirgudu_base/jquery-file-upload/play-pause.png +0 -0
  293. data/app/assets/images/kirgudu_base/jquery-file-upload/progressbar.gif +0 -0
  294. data/app/assets/images/kirgudu_base/jquery-file-upload/video-play.png +0 -0
  295. data/app/assets/images/kirgudu_base/web/banner.jpg +0 -0
  296. data/app/assets/images/kirgudu_base/web/black.png +0 -0
  297. data/app/assets/images/kirgudu_base/web/body.png +0 -0
  298. data/app/assets/images/kirgudu_base/web/col_img1.jpg +0 -0
  299. data/app/assets/images/kirgudu_base/web/col_img2.jpg +0 -0
  300. data/app/assets/images/kirgudu_base/web/coll_campaign.png +0 -0
  301. data/app/assets/images/kirgudu_base/web/coll_list_head.png +0 -0
  302. data/app/assets/images/kirgudu_base/web/coll_new.png +0 -0
  303. data/app/assets/images/kirgudu_base/web/coll_no_img.png +0 -0
  304. data/app/assets/images/kirgudu_base/web/coll_podr.png +0 -0
  305. data/app/assets/images/kirgudu_base/web/factory.jpg +0 -0
  306. data/app/assets/images/kirgudu_base/web/fancybox/blank.gif +0 -0
  307. data/app/assets/images/kirgudu_base/web/fancybox/fancybox_buttons.png +0 -0
  308. data/app/assets/images/kirgudu_base/web/fancybox/fancybox_loading.gif +0 -0
  309. data/app/assets/images/kirgudu_base/web/fancybox/fancybox_overlay.png +0 -0
  310. data/app/assets/images/kirgudu_base/web/fancybox/fancybox_sprite.png +0 -0
  311. data/app/assets/images/kirgudu_base/web/fancybox/fancybox_sprite1.png +0 -0
  312. data/app/assets/images/kirgudu_base/web/flag1.jpg +0 -0
  313. data/app/assets/images/kirgudu_base/web/flag2.jpg +0 -0
  314. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadpro-cond.css +8 -0
  315. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadpro-cond.eot +0 -0
  316. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadpro-cond.svg +7555 -0
  317. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadpro-cond.ttf +0 -0
  318. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadpro-cond.woff +0 -0
  319. data/app/assets/images/kirgudu_base/web/fonts/MyriadPro-Cond/myriadprocond.eot +0 -0
  320. data/app/assets/images/kirgudu_base/web/fonts/myriad_pro/myriadpro-regular.css +8 -0
  321. data/app/assets/images/kirgudu_base/web/fonts/myriad_pro/myriadpro-regular.eot +0 -0
  322. data/app/assets/images/kirgudu_base/web/fonts/myriad_pro/myriadpro-regular.svg +7887 -0
  323. data/app/assets/images/kirgudu_base/web/fonts/myriad_pro/myriadpro-regular.ttf +0 -0
  324. data/app/assets/images/kirgudu_base/web/fonts/myriad_pro/myriadpro-regular.woff +0 -0
  325. data/app/assets/images/kirgudu_base/web/green.png +0 -0
  326. data/app/assets/images/kirgudu_base/web/grey.png +0 -0
  327. data/app/assets/images/kirgudu_base/web/header_black.png +0 -0
  328. data/app/assets/images/kirgudu_base/web/kolonna.png +0 -0
  329. data/app/assets/images/kirgudu_base/web/li_1.png +0 -0
  330. data/app/assets/images/kirgudu_base/web/li_2.png +0 -0
  331. data/app/assets/images/kirgudu_base/web/li_3.png +0 -0
  332. data/app/assets/images/kirgudu_base/web/li_4.png +0 -0
  333. data/app/assets/images/kirgudu_base/web/li_5.png +0 -0
  334. data/app/assets/images/kirgudu_base/web/logo.png +0 -0
  335. data/app/assets/images/kirgudu_base/web/map.png +0 -0
  336. data/app/assets/images/kirgudu_base/web/map_2.png +0 -0
  337. data/app/assets/images/kirgudu_base/web/nav_active.png +0 -0
  338. data/app/assets/images/kirgudu_base/web/nognicy.png +0 -0
  339. data/app/assets/images/kirgudu_base/web/orange.png +0 -0
  340. data/app/assets/images/kirgudu_base/web/pagination.png +0 -0
  341. data/app/assets/images/kirgudu_base/web/pdf.png +0 -0
  342. data/app/assets/images/kirgudu_base/web/plit_1.jpg +0 -0
  343. data/app/assets/images/kirgudu_base/web/plit_2.jpg +0 -0
  344. data/app/assets/images/kirgudu_base/web/plit_3.jpg +0 -0
  345. data/app/assets/images/kirgudu_base/web/plit_4.jpg +0 -0
  346. data/app/assets/images/kirgudu_base/web/post_img.jpg +0 -0
  347. data/app/assets/images/kirgudu_base/web/red_line.png +0 -0
  348. data/app/assets/images/kirgudu_base/web/shadow_bottom.png +0 -0
  349. data/app/assets/images/kirgudu_base/web/shadow_top.png +0 -0
  350. data/app/assets/images/kirgudu_base/web/show-room.php +71 -0
  351. data/app/assets/images/kirgudu_base/web/slider.png +0 -0
  352. data/app/assets/images/kirgudu_base/web/slider_bg.png +0 -0
  353. data/app/assets/images/kirgudu_base/web/slider_but.png +0 -0
  354. data/app/assets/images/kirgudu_base/web/sprite_index.png +0 -0
  355. data/app/assets/images/kirgudu_base/web/sprite_vert.png +0 -0
  356. data/app/assets/images/kirgudu_base/web/top_nav.png +0 -0
  357. data/app/assets/images/kirgudu_base/web/transperent_bg.png +0 -0
  358. data/app/assets/images/kirgudu_base/web/transperent_bg1.png +0 -0
  359. data/app/assets/images/kirgudu_base/web/up_down.png +0 -0
  360. data/app/assets/images/kirgudu_base/web/yellow.png +0 -0
  361. data/app/assets/javascripts/kirgudu_base/avgrund.js +0 -0
  362. data/app/assets/javascripts/kirgudu_base/bootstrap-3.0.0.js +1999 -0
  363. data/app/assets/javascripts/kirgudu_base/bootstrap-alert.js +0 -0
  364. data/app/assets/javascripts/kirgudu_base/bootstrap-button.js +6 -6
  365. data/app/assets/javascripts/kirgudu_base/bootstrap-carousel.js +0 -0
  366. data/app/assets/javascripts/kirgudu_base/bootstrap-collapse.js +0 -0
  367. data/app/assets/javascripts/kirgudu_base/bootstrap-colorpicker.js +0 -0
  368. data/app/assets/javascripts/kirgudu_base/bootstrap-datepicker.js +0 -0
  369. data/app/assets/javascripts/kirgudu_base/bootstrap-dropdown.js +0 -0
  370. data/app/assets/javascripts/kirgudu_base/bootstrap-modal.js +0 -0
  371. data/app/assets/javascripts/kirgudu_base/bootstrap-popover.js +0 -0
  372. data/app/assets/javascripts/kirgudu_base/bootstrap-scrollspy.js +0 -0
  373. data/app/assets/javascripts/kirgudu_base/bootstrap-tab.js +0 -0
  374. data/app/assets/javascripts/kirgudu_base/bootstrap-tooltip.js +0 -0
  375. data/app/assets/javascripts/kirgudu_base/bootstrap-transition.js +0 -0
  376. data/app/assets/javascripts/kirgudu_base/bootstrap-typeahead.js +0 -0
  377. data/app/assets/javascripts/kirgudu_base/bootstrap-wysihtml5.js +0 -0
  378. data/app/assets/javascripts/kirgudu_base/character-limit.js +0 -0
  379. data/app/assets/javascripts/kirgudu_base/chart-line-and-graph.js +112 -0
  380. data/app/assets/javascripts/kirgudu_base/clock.js +42 -0
  381. data/app/assets/javascripts/kirgudu_base/d3.v2.js +7026 -0
  382. data/app/assets/javascripts/kirgudu_base/date-picker-unused.js +539 -0
  383. data/app/assets/javascripts/kirgudu_base/dynamicEvents.js +354 -0
  384. data/app/assets/javascripts/kirgudu_base/elfinder.min.js +25 -0
  385. data/app/assets/javascripts/kirgudu_base/excanvas.compiled.js +0 -0
  386. data/app/assets/javascripts/kirgudu_base/fileinput.jquery.js +0 -0
  387. data/app/assets/javascripts/kirgudu_base/flot-chart-header.js +1 -0
  388. data/app/assets/javascripts/kirgudu_base/flot-jquery-header.js +36 -0
  389. data/app/assets/javascripts/kirgudu_base/fullcalendar.js +0 -0
  390. data/app/assets/javascripts/kirgudu_base/fullcalendar.min.js +7 -0
  391. data/app/assets/javascripts/kirgudu_base/gmap3.min.js +0 -0
  392. data/app/assets/javascripts/kirgudu_base/header-line-chart.js +138 -0
  393. data/app/assets/javascripts/kirgudu_base/html5lightbox.js +58 -0
  394. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.LANG.js +348 -0
  395. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.ar.js +290 -0
  396. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.bg.js +310 -0
  397. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.ca.js +310 -0
  398. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.cs.js +285 -0
  399. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.de.js +280 -0
  400. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.es.js +291 -0
  401. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.fr.js +298 -0
  402. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.hu.js +280 -0
  403. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.jp.js +316 -0
  404. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.nl.js +342 -0
  405. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.no.js +280 -0
  406. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.pl.js +309 -0
  407. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.pt_BR.js +280 -0
  408. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.ru.js +344 -0
  409. data/app/assets/javascripts/kirgudu_base/i18n/elfinder.zh_CN.js +280 -0
  410. data/app/assets/javascripts/kirgudu_base/intro.js +733 -0
  411. data/app/assets/javascripts/kirgudu_base/ion.rangeSlider.min.js +22 -0
  412. data/app/assets/javascripts/kirgudu_base/jnavigate.jquery.min.js +0 -0
  413. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/bootstrap-3.0.3.min.js +7 -0
  414. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/canvas-to-blob.min.js +1 -0
  415. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/javascript-templates.min.js +1 -0
  416. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.blueimp-gallery.min.js +1 -0
  417. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-angular.js +429 -0
  418. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-audio.js +106 -0
  419. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-image.js +309 -0
  420. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-jquery-ui.js +152 -0
  421. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-process.js +172 -0
  422. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-ui.js +699 -0
  423. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-validate.js +119 -0
  424. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload-video.js +106 -0
  425. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.fileupload.js +1426 -0
  426. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.iframe-transport.js +214 -0
  427. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.postmessage-transport.js +117 -0
  428. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.ui.widget.js +530 -0
  429. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/jquery.xdr-transport.js +86 -0
  430. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/load-image.min.js +1 -0
  431. data/app/assets/javascripts/kirgudu_base/jquery-file-upload/main.js +75 -0
  432. data/app/assets/javascripts/kirgudu_base/jquery-ui.js +15040 -0
  433. data/app/assets/javascripts/kirgudu_base/jquery.autocompleteWithId.js +286 -0
  434. data/app/assets/javascripts/kirgudu_base/jquery.bookblock.js +0 -0
  435. data/app/assets/javascripts/kirgudu_base/jquery.colorbox.js +1086 -0
  436. data/app/assets/javascripts/kirgudu_base/jquery.dataTables.js +0 -0
  437. data/app/assets/javascripts/kirgudu_base/jquery.easing.min.js +44 -0
  438. data/app/assets/javascripts/kirgudu_base/jquery.easypiechart.min.js +187 -0
  439. data/app/assets/javascripts/kirgudu_base/jquery.fancybox-buttons.js +4 -3
  440. data/app/assets/javascripts/kirgudu_base/jquery.fancybox-media.js +14 -11
  441. data/app/assets/javascripts/kirgudu_base/jquery.fancybox.js +84 -49
  442. data/app/assets/javascripts/kirgudu_base/jquery.fancybox.pack.js +45 -0
  443. data/app/assets/javascripts/kirgudu_base/jquery.flot.crosshair.js +0 -0
  444. data/app/assets/javascripts/kirgudu_base/jquery.flot.js +0 -0
  445. data/app/assets/javascripts/kirgudu_base/jquery.flot.min.js +6 -0
  446. data/app/assets/javascripts/kirgudu_base/jquery.flot.pie.js +0 -0
  447. data/app/assets/javascripts/kirgudu_base/jquery.flot.resize.js +0 -0
  448. data/app/assets/javascripts/kirgudu_base/jquery.flot.spider.js +0 -0
  449. data/app/assets/javascripts/kirgudu_base/jquery.flot.stack.js +0 -0
  450. data/app/assets/javascripts/kirgudu_base/jquery.jigowatt.js +38 -0
  451. data/app/assets/javascripts/kirgudu_base/jquery.js +8829 -2
  452. data/app/assets/javascripts/kirgudu_base/jquery.json.min.js +23 -0
  453. data/app/assets/javascripts/kirgudu_base/jquery.mCustomScrollbar.concat.min.js +4 -0
  454. data/app/assets/javascripts/kirgudu_base/jquery.maskedinput-1.3.js +0 -0
  455. data/app/assets/javascripts/kirgudu_base/jquery.mousewheel-3.0.6.pack.js +13 -0
  456. data/app/assets/javascripts/kirgudu_base/jquery.nicescroll.min.js +111 -0
  457. data/app/assets/javascripts/kirgudu_base/jquery.nivo.slider.pack.js +10 -0
  458. data/app/assets/javascripts/kirgudu_base/jquery.peity.min.js +0 -0
  459. data/app/assets/javascripts/kirgudu_base/jquery.simplePagination-Unused.js +268 -0
  460. data/app/assets/javascripts/kirgudu_base/jquery.simplemodal-1.4.4.js +0 -0
  461. data/app/assets/javascripts/kirgudu_base/jquery.smartWizard.js +480 -0
  462. data/app/assets/javascripts/kirgudu_base/jquery.sparkline.min.js +5 -5
  463. data/app/assets/javascripts/kirgudu_base/jquery.switchButton.js +306 -0
  464. data/app/assets/javascripts/kirgudu_base/jquery.tagsinput.js +1 -1
  465. data/app/assets/javascripts/kirgudu_base/jquery.tools.min.js +0 -0
  466. data/app/assets/javascripts/kirgudu_base/jquery.touchdown.js +0 -0
  467. data/app/assets/javascripts/kirgudu_base/jquery.uniform.min.js +0 -0
  468. data/app/assets/javascripts/kirgudu_base/jquery.uploadify.js +986 -0
  469. data/app/assets/javascripts/kirgudu_base/jquery.validate.min.js +0 -0
  470. data/app/assets/javascripts/kirgudu_base/jquerypp.custom.js +0 -0
  471. data/app/assets/javascripts/kirgudu_base/justgage.1.0.1.min.js +0 -0
  472. data/app/assets/javascripts/kirgudu_base/live-chart-custom.js +285 -0
  473. data/app/assets/javascripts/kirgudu_base/live-chart-custom2.js +285 -0
  474. data/app/assets/javascripts/kirgudu_base/live-updating.js +71 -0
  475. data/app/assets/javascripts/kirgudu_base/main.js +166 -145
  476. data/app/assets/javascripts/kirgudu_base/modernizr.custom.32549.js +0 -0
  477. data/app/assets/javascripts/kirgudu_base/movie_data.js +2347 -0
  478. data/app/assets/javascripts/kirgudu_base/nav.js +1 -0
  479. data/app/assets/javascripts/kirgudu_base/raphael.2.1.0.min.js +0 -0
  480. data/app/assets/javascripts/kirgudu_base/rickshaw.js +3387 -0
  481. data/app/assets/javascripts/kirgudu_base/script.js +657 -0
  482. data/app/assets/javascripts/kirgudu_base/scripts.js +1 -3
  483. data/app/assets/javascripts/kirgudu_base/scripts_nrg.js +1387 -0
  484. data/app/assets/javascripts/kirgudu_base/side-navigation-tag.js +41 -0
  485. data/app/assets/javascripts/kirgudu_base/stream.js +55 -0
  486. data/app/assets/javascripts/kirgudu_base/stream_table.js +519 -0
  487. data/app/assets/javascripts/kirgudu_base/streaming-mustache.js +610 -0
  488. data/app/assets/javascripts/kirgudu_base/swfobject.js +0 -0
  489. data/app/assets/javascripts/kirgudu_base/tcal.js +349 -0
  490. data/app/assets/javascripts/kirgudu_base/textarea-autogrow.js +0 -0
  491. data/app/assets/javascripts/kirgudu_base/tiny_mce.js +0 -0
  492. data/app/assets/javascripts/kirgudu_base/uploadify.swf +0 -0
  493. data/app/assets/javascripts/kirgudu_base/wysihtml5-0.3.0.min.js +0 -0
  494. data/app/assets/stylesheets/kirgudu_base/{chosen.css → admin/default/chosen.css} +0 -0
  495. data/app/assets/stylesheets/kirgudu_base/admin/default/fonts/fontawesome-webfont.eot +0 -0
  496. data/app/assets/stylesheets/kirgudu_base/admin/default/fonts/fontawesome-webfont.svg +255 -0
  497. data/app/assets/stylesheets/kirgudu_base/admin/default/fonts/fontawesome-webfont.ttf +0 -0
  498. data/app/assets/stylesheets/kirgudu_base/admin/default/fonts/fontawesome-webfont.woff +0 -0
  499. data/app/assets/stylesheets/kirgudu_base/admin/default/fonts/fontawesome-webfont_2d2816fe.eot +0 -0
  500. data/app/assets/stylesheets/kirgudu_base/{fullcalendar.css → admin/default/fullcalendar.css} +0 -0
  501. data/app/assets/stylesheets/kirgudu_base/{info-message.css → admin/default/info-message.css} +0 -0
  502. data/app/assets/stylesheets/kirgudu_base/{jquery-ui-1.8.23.custom.css → admin/default/jquery-ui-1.8.23.custom.css} +17 -17
  503. data/app/assets/stylesheets/kirgudu_base/{jquery.fancybox-buttons.css → admin/default/jquery.fancybox-buttons.css} +0 -0
  504. data/app/assets/stylesheets/kirgudu_base/{jquery.fancybox-thumbs.css → admin/default/jquery.fancybox-thumbs.css} +0 -0
  505. data/app/assets/stylesheets/kirgudu_base/{jquery.fancybox.css → admin/default/jquery.fancybox.css} +0 -0
  506. data/app/assets/stylesheets/kirgudu_base/{jquery.tagsinput.css → admin/default/jquery.tagsinput.css} +0 -0
  507. data/app/assets/stylesheets/kirgudu_base/admin/default/original.css +11274 -0
  508. data/app/assets/stylesheets/kirgudu_base/{popbox.css → admin/default/popbox.css} +0 -0
  509. data/app/assets/stylesheets/kirgudu_base/{responsive.css → admin/default/responsive.css} +1 -1
  510. data/app/assets/stylesheets/kirgudu_base/admin/default/twitter/bootstrap.css +5671 -0
  511. data/app/assets/stylesheets/kirgudu_base/{uploadify.css → admin/default/uploadify.css} +0 -0
  512. data/app/assets/stylesheets/kirgudu_base/admin/good/bootstrap.css +6815 -0
  513. data/app/assets/stylesheets/kirgudu_base/admin/good/chosen.css +397 -0
  514. data/app/assets/stylesheets/kirgudu_base/admin/good/elfinder-theme.css +49 -0
  515. data/app/assets/stylesheets/kirgudu_base/admin/good/elfinder.min.css +1913 -0
  516. data/app/assets/stylesheets/kirgudu_base/admin/good/font-awesome-ie7.css +1203 -0
  517. data/app/assets/stylesheets/kirgudu_base/admin/good/font-awesome-ie7.min.css +384 -0
  518. data/app/assets/stylesheets/kirgudu_base/admin/good/font-awesome.css +1895 -0
  519. data/app/assets/stylesheets/kirgudu_base/admin/good/font-awesome.min.css +403 -0
  520. data/app/assets/stylesheets/kirgudu_base/admin/good/fonts/FontAwesome.otf +0 -0
  521. data/app/assets/stylesheets/kirgudu_base/admin/good/fonts/fontawesome-webfont.eot +0 -0
  522. data/app/assets/stylesheets/kirgudu_base/admin/good/fonts/fontawesome-webfont.svg +399 -0
  523. data/app/assets/stylesheets/kirgudu_base/admin/good/fonts/fontawesome-webfont.ttf +0 -0
  524. data/app/assets/stylesheets/kirgudu_base/admin/good/fonts/fontawesome-webfont.woff +0 -0
  525. data/app/assets/stylesheets/kirgudu_base/admin/good/fullcalendar.css +610 -0
  526. data/app/assets/stylesheets/kirgudu_base/admin/good/fullcalendar.print.css +32 -0
  527. data/app/assets/stylesheets/kirgudu_base/admin/good/ion.rangeSlider.css +114 -0
  528. data/app/assets/stylesheets/kirgudu_base/admin/good/ion.rangeSlider.skinFlat.css +119 -0
  529. data/app/assets/stylesheets/kirgudu_base/admin/good/ion.rangeSlider.skinNice.css +82 -0
  530. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/blueimp-gallery.min.css +361 -0
  531. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/bootstrap.min.css +6569 -0
  532. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/demo-ie8.css +21 -0
  533. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/demo.css +67 -0
  534. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/fonts/glyphicons-halflings-regular.eot +0 -0
  535. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/fonts/glyphicons-halflings-regular.svg +229 -0
  536. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/fonts/glyphicons-halflings-regular.ttf +0 -0
  537. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/fonts/glyphicons-halflings-regular.woff +0 -0
  538. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/jquery.fileupload-noscript.css +22 -0
  539. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/jquery.fileupload-ui-noscript.css +17 -0
  540. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/jquery.fileupload-ui.css +57 -0
  541. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/jquery.fileupload.css +36 -0
  542. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-file-upload/style.css +15 -0
  543. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery-ui.css +1564 -0
  544. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery.fancybox-buttons.css +96 -0
  545. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery.fancybox-thumbs.css +54 -0
  546. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery.fancybox.css +249 -0
  547. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery.mCustomScrollbar.css +468 -0
  548. data/app/assets/stylesheets/kirgudu_base/admin/good/jquery.switchButton.css +44 -0
  549. data/app/assets/stylesheets/kirgudu_base/admin/good/mCSB_buttons.png +0 -0
  550. data/app/assets/stylesheets/kirgudu_base/admin/good/purple.css +142 -0
  551. data/app/assets/stylesheets/kirgudu_base/admin/good/range-slider.normalize.min.css +50 -0
  552. data/app/assets/stylesheets/kirgudu_base/admin/good/responsive.css +500 -0
  553. data/app/assets/stylesheets/kirgudu_base/admin/good/style.css +9427 -0
  554. data/app/assets/stylesheets/kirgudu_base/admin/good/uploadify.css +92 -0
  555. data/app/controllers/kirgudu_base/admin_controller.rb +44 -46
  556. data/app/controllers/kirgudu_base/application_controller.rb +296 -143
  557. data/app/controllers/kirgudu_base/authentications_controller.rb +157 -0
  558. data/app/controllers/kirgudu_base/cabinet_controller.rb +3 -9
  559. data/app/controllers/kirgudu_base/facade_controller.rb +1 -34
  560. data/app/helpers/kirgudu_base/application_helper.rb +441 -453
  561. data/app/helpers/kirgudu_base/common_helper.rb +54 -0
  562. data/app/helpers/kirgudu_base/controllers/basic_actions.rb +333 -504
  563. data/app/helpers/kirgudu_base/controllers/basic_actions_with_parent.rb +464 -0
  564. data/app/helpers/kirgudu_base/controllers/basic_actions_with_subordinates.rb +67 -0
  565. data/app/helpers/kirgudu_base/controllers/dynamic_pages.rb +49 -19
  566. data/app/helpers/kirgudu_base/controllers/dynamic_transactions.rb +17 -0
  567. data/app/helpers/kirgudu_base/controllers/obligatory_filters.rb +9 -19
  568. data/app/helpers/kirgudu_base/form_builder.rb +400 -342
  569. data/app/helpers/kirgudu_base/gui_helper.rb +346 -144
  570. data/app/helpers/kirgudu_base/models/basic_properties.rb +144 -0
  571. data/app/helpers/kirgudu_base/models/cloneable_elements.rb +41 -0
  572. data/app/helpers/kirgudu_base/models/fixable_elements.rb +52 -0
  573. data/app/helpers/kirgudu_base/models/mergeable_elements.rb +89 -0
  574. data/app/helpers/kirgudu_base/models/scopes.rb +9 -7
  575. data/app/models/kirgudu_base/base_model.rb +57 -146
  576. data/app/models/kirgudu_base/common.rb +7 -0
  577. data/app/models/kirgudu_base/common/portal.rb +49 -0
  578. data/app/models/kirgudu_base/common/portal_user.rb +58 -0
  579. data/app/models/kirgudu_base/dynamic_filters/obligatory_filter.rb +24 -0
  580. data/app/models/kirgudu_base/dynamic_filters/obligatory_filter_builder.rb +47 -0
  581. data/app/models/kirgudu_base/dynamic_pages/builder.rb +81 -0
  582. data/app/models/kirgudu_base/dynamic_pages/controller_link.rb +37 -0
  583. data/app/models/kirgudu_base/dynamic_pages/controller_link_builder.rb +44 -0
  584. data/app/models/kirgudu_base/dynamic_pages/controller_link_id.rb +35 -0
  585. data/app/models/kirgudu_base/dynamic_pages/controller_link_id_builder.rb +38 -0
  586. data/app/models/kirgudu_base/dynamic_pages/data_source.rb +47 -97
  587. data/app/models/kirgudu_base/dynamic_pages/data_source_builder.rb +63 -65
  588. data/app/models/kirgudu_base/dynamic_pages/element.rb +57 -0
  589. data/app/models/kirgudu_base/dynamic_pages/entry.rb +38 -0
  590. data/app/models/kirgudu_base/dynamic_pages/entry_builder.rb +48 -0
  591. data/app/models/kirgudu_base/dynamic_pages/entry_properties_block_builder.rb +22 -0
  592. data/app/models/kirgudu_base/dynamic_pages/entry_property.rb +35 -0
  593. data/app/models/kirgudu_base/dynamic_pages/entry_property_builder.rb +44 -0
  594. data/app/models/kirgudu_base/dynamic_pages/enums.rb +73 -0
  595. data/app/models/kirgudu_base/dynamic_pages/event.rb +31 -0
  596. data/app/models/kirgudu_base/dynamic_pages/event_action.rb +55 -0
  597. data/app/models/kirgudu_base/dynamic_pages/event_action_builder.rb +55 -0
  598. data/app/models/kirgudu_base/dynamic_pages/event_action_constraint.rb +32 -0
  599. data/app/models/kirgudu_base/dynamic_pages/event_action_constraint_builder.rb +39 -0
  600. data/app/models/kirgudu_base/dynamic_pages/event_builder.rb +40 -0
  601. data/app/models/kirgudu_base/dynamic_pages/event_if_block_builder.rb +37 -0
  602. data/app/models/kirgudu_base/dynamic_pages/filter.rb +36 -0
  603. data/app/models/kirgudu_base/dynamic_pages/filter_builder.rb +37 -0
  604. data/app/models/kirgudu_base/dynamic_pages/form.rb +28 -89
  605. data/app/models/kirgudu_base/dynamic_pages/form_builder.rb +63 -83
  606. data/app/models/kirgudu_base/dynamic_pages/form_elements_block_builder.rb +31 -0
  607. data/app/models/kirgudu_base/dynamic_pages/form_properties_block_builder.rb +24 -0
  608. data/app/models/kirgudu_base/dynamic_pages/form_properties_named_set.rb +23 -0
  609. data/app/models/kirgudu_base/dynamic_pages/form_properties_named_set_builder.rb +22 -0
  610. data/app/models/kirgudu_base/dynamic_pages/form_property.rb +53 -0
  611. data/app/models/kirgudu_base/dynamic_pages/form_property_builder.rb +49 -0
  612. data/app/models/kirgudu_base/dynamic_pages/form_tab.rb +20 -0
  613. data/app/models/kirgudu_base/dynamic_pages/form_tab_builder.rb +26 -0
  614. data/app/models/kirgudu_base/dynamic_pages/group.rb +25 -0
  615. data/app/models/kirgudu_base/dynamic_pages/group_builder.rb +35 -0
  616. data/app/models/kirgudu_base/dynamic_pages/list.rb +42 -0
  617. data/app/models/kirgudu_base/dynamic_pages/list_builder.rb +88 -0
  618. data/app/models/kirgudu_base/dynamic_pages/list_cell.rb +32 -0
  619. data/app/models/kirgudu_base/dynamic_pages/list_cell_builder.rb +44 -0
  620. data/app/models/kirgudu_base/dynamic_pages/list_cells_block_builder.rb +20 -0
  621. data/app/models/kirgudu_base/dynamic_pages/list_filters_block_builder.rb +20 -0
  622. data/app/models/kirgudu_base/dynamic_pages/list_properties_block_builder.rb +20 -0
  623. data/app/models/kirgudu_base/dynamic_pages/list_property.rb +32 -0
  624. data/app/models/kirgudu_base/dynamic_pages/list_property_builder.rb +39 -0
  625. data/app/models/kirgudu_base/dynamic_pages/menu.rb +37 -0
  626. data/app/models/kirgudu_base/dynamic_pages/menu_builder.rb +41 -0
  627. data/app/models/kirgudu_base/dynamic_pages/menu_item.rb +60 -0
  628. data/app/models/kirgudu_base/dynamic_pages/menu_item_builder.rb +51 -0
  629. data/app/models/kirgudu_base/dynamic_pages/menu_items_block_builder.rb +20 -0
  630. data/app/models/kirgudu_base/dynamic_pages/page.rb +27 -44
  631. data/app/models/kirgudu_base/dynamic_pages/page_builder.rb +50 -48
  632. data/app/models/kirgudu_base/dynamic_pages/page_element.rb +56 -0
  633. data/app/models/kirgudu_base/dynamic_pages/page_element_builder.rb +44 -0
  634. data/app/models/kirgudu_base/dynamic_pages/page_elements_block_builder.rb +72 -0
  635. data/app/models/kirgudu_base/dynamic_pages/page_tab.rb +30 -0
  636. data/app/models/kirgudu_base/dynamic_pages/page_tab_builder.rb +64 -0
  637. data/app/models/kirgudu_base/dynamic_pages/parent_element.rb +32 -0
  638. data/app/models/kirgudu_base/dynamic_pages/parent_element_builder.rb +41 -0
  639. data/app/models/kirgudu_base/dynamic_pages/property.rb +33 -169
  640. data/app/models/kirgudu_base/dynamic_pages/property_builder.rb +68 -123
  641. data/app/models/kirgudu_base/dynamic_pages/property_events_block_builder.rb +32 -0
  642. data/app/models/kirgudu_base/dynamic_pages/widget.rb +12 -0
  643. data/app/models/kirgudu_base/dynamic_pages/widget_builder.rb +21 -0
  644. data/app/models/kirgudu_base/dynamic_transactions/enums.rb +13 -0
  645. data/app/models/kirgudu_base/dynamic_transactions/transaction_injection.rb +25 -0
  646. data/app/models/kirgudu_base/dynamic_transactions/transaction_injection_builder.rb +42 -0
  647. data/app/models/kirgudu_base/security.rb +8 -0
  648. data/app/models/kirgudu_base/security/authentication.rb +18 -0
  649. data/app/models/kirgudu_base/security/authentication_config.rb +80 -0
  650. data/app/models/kirgudu_base/security/authentication_config_builder.rb +91 -0
  651. data/app/models/kirgudu_base/security/user.rb +83 -0
  652. data/app/models/kirgudu_base/sticky_notification.rb +15 -0
  653. data/app/models/kirgudu_base/template.rb +1 -1
  654. data/app/models/kirgudu_base/template_element.rb +1 -1
  655. data/app/views/admin_templates/default/admin/dashboard/index.html.erb +2 -0
  656. data/app/views/admin_templates/default/admin/dashboard/modules.html.erb +2 -0
  657. data/app/views/admin_templates/default/admin/dashboard/stats.html.erb +2 -0
  658. data/app/views/admin_templates/default/admin/layouts/application.html.erb +1308 -0
  659. data/app/views/admin_templates/default/admin/shared/_attach_file_uploader.html.erb +47 -0
  660. data/app/views/admin_templates/default/admin/shared/manage_images/managing_items_index.html.erb +35 -0
  661. data/app/views/admin_templates/default/admin/shared/manage_images/managing_items_manage.html.erb +70 -0
  662. data/app/views/admin_templates/default/admin/shared/manage_images/managing_items_sort_index.html.erb +29 -0
  663. data/app/views/admin_templates/default/admin/shared/manage_images/managing_upload_images.html.erb +0 -0
  664. data/app/views/admin_templates/default/admin/shared/manage_items/managing_items_index.html.erb +43 -0
  665. data/app/views/admin_templates/default/admin/shared/manage_items/managing_items_manage.html.erb +62 -0
  666. data/app/views/admin_templates/default/admin/shared/manage_items/managing_items_sort_index.html.erb +29 -0
  667. data/app/views/admin_templates/default/admin/system/settings/groups/edit.html.erb +40 -0
  668. data/app/views/admin_templates/default/admin/system/settings/groups/index.html.erb +91 -0
  669. data/app/views/admin_templates/default/admin/system/settings/groups/new.html.erb +36 -0
  670. data/app/views/admin_templates/default/admin/system/settings/groups/show.html.erb +44 -0
  671. data/app/views/admin_templates/default/admin/system/settings/options/edit.html.erb +68 -0
  672. data/app/views/admin_templates/default/admin/system/settings/options/index.html.erb +106 -0
  673. data/app/views/admin_templates/default/admin/system/settings/options/new.html.erb +66 -0
  674. data/app/views/admin_templates/default/admin/system/settings/options/show.html.erb +83 -0
  675. data/app/views/admin_templates/default/admin/system/settings/values/edit.html.erb +44 -0
  676. data/app/views/admin_templates/default/admin/system/settings/values/index.html.erb +42 -0
  677. data/app/views/admin_templates/default/admin/system/settings/values/new.html.erb +36 -0
  678. data/app/views/admin_templates/default/admin/system/settings/values/show.html.erb +38 -0
  679. data/app/views/{layouts/kirgudu_base → admin_templates/erp/admin/layouts}/application.html.erb +1 -1
  680. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_body_javascripts_files.html.erb +1 -1
  681. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_body_javascripts_scripts.html.erb +8 -8
  682. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_breadcrumbs.html.erb +0 -0
  683. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_head_javascripts.html.erb +0 -0
  684. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_head_stylesheets.html.erb +0 -0
  685. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_index_page_filter.html.erb +0 -0
  686. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_left_menu_standard_actions.html.erb +2 -2
  687. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_services_top_line.html.erb +0 -0
  688. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/_top_nav_bar.html.erb +4 -4
  689. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/entry_edit_form_renderer.html.erb +2 -2
  690. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/entry_index_renderer.html.erb +3 -3
  691. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/entry_new_form_renderer.html.erb +2 -2
  692. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/entry_not_found_renderer.html.erb +0 -0
  693. data/app/views/{shared/kirgudu_base → admin_templates/erp/admin/shared}/entry_show_renderer.html.erb +0 -0
  694. data/app/views/admin_templates/erp/admin/shared/manage_images/managing_items_index.html.erb +34 -0
  695. data/app/views/admin_templates/erp/admin/shared/manage_images/managing_items_manage.html.erb +72 -0
  696. data/app/views/admin_templates/erp/admin/shared/manage_images/managing_items_sort_index.html.erb +33 -0
  697. data/app/views/admin_templates/erp/admin/shared/manage_items/managing_items_index.html.erb +42 -0
  698. data/app/views/admin_templates/erp/admin/shared/manage_items/managing_items_manage.html.erb +66 -0
  699. data/app/views/admin_templates/erp/admin/shared/manage_items/managing_items_sort_index.html.erb +33 -0
  700. data/app/views/admin_templates/good/admin/common/files/upload.html.erb +203 -0
  701. data/app/views/admin_templates/good/admin/common/images/mass_upload.html.erb +9 -0
  702. data/app/views/admin_templates/good/admin/dashboard/index.html.erb +568 -0
  703. data/app/views/admin_templates/good/admin/layouts/OLD_application.html.erb +518 -0
  704. data/app/views/admin_templates/good/admin/layouts/application.html.erb +1301 -0
  705. data/app/views/admin_templates/good/admin/shared/404.html.erb +29 -0
  706. data/app/views/admin_templates/good/admin/shared/_breadcrumbs.html.erb +26 -0
  707. data/app/views/admin_templates/good/admin/shared/_chat.html.erb +49 -0
  708. data/app/views/admin_templates/good/admin/shared/_left_menu.html.erb +137 -0
  709. data/app/views/admin_templates/good/admin/shared/_left_menu_emails.html.erb +20 -0
  710. data/app/views/admin_templates/good/admin/shared/_left_menu_social_stats.html.erb +20 -0
  711. data/app/views/admin_templates/good/admin/shared/_left_menu_tags.html.erb +3 -0
  712. data/app/views/admin_templates/good/admin/shared/_sticky_notification.html.erb +11 -0
  713. data/app/views/admin_templates/good/admin/shared/entry_not_found.html.erb +1 -0
  714. data/app/views/admin_templates/good/admin/shared/renderer_delete.html.erb +0 -0
  715. data/app/views/admin_templates/good/admin/shared/renderer_edit.html.erb +98 -0
  716. data/app/views/admin_templates/good/admin/shared/renderer_entries_list.html.erb +157 -0
  717. data/app/views/admin_templates/good/admin/shared/renderer_entries_list_with_parent.html.erb +149 -0
  718. data/app/views/admin_templates/good/admin/shared/renderer_new.html.erb +69 -0
  719. data/app/views/admin_templates/good/admin/shared/renderer_show.html.erb +155 -0
  720. data/app/views/admin_templates/good/kirgudu_base/authentications/login.html.erb +94 -0
  721. data/app/views/admin_templates/good/kirgudu_base/authentications/register.html.erb +75 -0
  722. data/app/views/admin_templates/good/kirgudu_base/old/login_page.html.erb +253 -0
  723. data/app/views/admin_templates/good/kirgudu_base/old/restore.html.erb +0 -0
  724. data/app/views/admin_templates/good/kirgudu_base/old/show.html.erb +39 -0
  725. data/app/views/admin_templates/good/zapanel/404.html +386 -0
  726. data/app/views/admin_templates/good/zapanel/billing.html +550 -0
  727. data/app/views/admin_templates/good/zapanel/blank-page.html +343 -0
  728. data/app/views/admin_templates/good/zapanel/buttons.html +1018 -0
  729. data/app/views/admin_templates/good/zapanel/calendars.html +451 -0
  730. data/app/views/admin_templates/good/zapanel/cart.html +522 -0
  731. data/app/views/admin_templates/good/zapanel/charts.html +611 -0
  732. data/app/views/admin_templates/good/zapanel/collapse.html +555 -0
  733. data/app/views/admin_templates/good/zapanel/contact.php +102 -0
  734. data/app/views/admin_templates/good/zapanel/dashboard.html +985 -0
  735. data/app/views/admin_templates/good/zapanel/dashboard2.html +1091 -0
  736. data/app/views/admin_templates/good/zapanel/dashboard3.html +1079 -0
  737. data/app/views/admin_templates/good/zapanel/data/movies.json +1 -0
  738. data/app/views/admin_templates/good/zapanel/faq.html +435 -0
  739. data/app/views/admin_templates/good/zapanel/file-manager.html +358 -0
  740. data/app/views/admin_templates/good/zapanel/files/New Adobe Photoshop Image 12.psd b/data/app/views/admin_templates/good/zapanel/files/New Adobe Photoshop Image → 12.psd +0 -0
  741. data/app/views/admin_templates/good/zapanel/files/index.php +0 -0
  742. data/app/views/admin_templates/good/zapanel/font-awesome/less/bootstrap.less +84 -0
  743. data/app/views/admin_templates/good/zapanel/font-awesome/less/core.less +129 -0
  744. data/app/views/admin_templates/good/zapanel/font-awesome/less/extras.less +93 -0
  745. data/app/views/admin_templates/good/zapanel/font-awesome/less/font-awesome-ie7.less +1953 -0
  746. data/app/views/admin_templates/good/zapanel/font-awesome/less/font-awesome.less +33 -0
  747. data/app/views/admin_templates/good/zapanel/font-awesome/less/icons.less +381 -0
  748. data/app/views/admin_templates/good/zapanel/font-awesome/less/mixins.less +48 -0
  749. data/app/views/admin_templates/good/zapanel/font-awesome/less/path.less +14 -0
  750. data/app/views/admin_templates/good/zapanel/font-awesome/less/variables.less +735 -0
  751. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_bootstrap.scss +84 -0
  752. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_core.scss +129 -0
  753. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_extras.scss +93 -0
  754. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_icons.scss +381 -0
  755. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_mixins.scss +48 -0
  756. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_path.scss +14 -0
  757. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_variables.scss +734 -0
  758. data/app/views/admin_templates/good/zapanel/font-awesome/scss/font-awesome-ie7.scss +1953 -0
  759. data/app/views/admin_templates/good/zapanel/font-awesome/scss/font-awesome.scss +33 -0
  760. data/app/views/admin_templates/good/zapanel/form.html +790 -0
  761. data/app/views/admin_templates/good/zapanel/gallery.html +392 -0
  762. data/app/views/admin_templates/good/zapanel/grids.html +574 -0
  763. data/app/views/admin_templates/good/zapanel/hosting-dashboard.html +448 -0
  764. data/app/views/admin_templates/good/zapanel/icon.html +722 -0
  765. data/app/views/admin_templates/good/zapanel/inbox.html +375 -0
  766. data/app/views/admin_templates/good/zapanel/index.html +48 -0
  767. data/app/views/admin_templates/good/zapanel/invoice.html +423 -0
  768. data/app/views/admin_templates/good/zapanel/js/proxy/elFinderSupportVer1.js +338 -0
  769. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-close.png +0 -0
  770. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-next.png +0 -0
  771. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-prev.png +0 -0
  772. data/app/views/admin_templates/good/zapanel/notification.html +400 -0
  773. data/app/views/admin_templates/good/zapanel/order-recieved.html +348 -0
  774. data/app/views/admin_templates/good/zapanel/php/MySQLStorage.sql +23 -0
  775. data/app/views/admin_templates/good/zapanel/php/connector.php +44 -0
  776. data/app/views/admin_templates/good/zapanel/php/elFinder.class.php +1103 -0
  777. data/app/views/admin_templates/good/zapanel/php/elFinderConnector.class.php +133 -0
  778. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeDriver.class.php +3370 -0
  779. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeLocalFileSystem.class.php +835 -0
  780. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeMySQL.class.php +896 -0
  781. data/app/views/admin_templates/good/zapanel/php/mime.types +512 -0
  782. data/app/views/admin_templates/good/zapanel/price-table.html +400 -0
  783. data/app/views/admin_templates/good/zapanel/profile.html +387 -0
  784. data/app/views/admin_templates/good/zapanel/progressbar.html +555 -0
  785. data/app/views/admin_templates/good/zapanel/range-slider.html +440 -0
  786. data/app/views/admin_templates/good/zapanel/ribbon-grids.html +491 -0
  787. data/app/views/admin_templates/good/zapanel/sale-purchase-dashboard.html +803 -0
  788. data/app/views/admin_templates/good/zapanel/search.html +370 -0
  789. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-close.png +0 -0
  790. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-loading.gif +0 -0
  791. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-next.png +0 -0
  792. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-pause.png +0 -0
  793. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-play.png +0 -0
  794. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-playvideo.png +0 -0
  795. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-prev.png +0 -0
  796. data/app/views/admin_templates/good/zapanel/slider.html +453 -0
  797. data/app/views/admin_templates/good/zapanel/tables.html +470 -0
  798. data/app/views/admin_templates/good/zapanel/typography.html +746 -0
  799. data/app/views/admin_templates/good_flexy/admin/common/files/upload.html.erb +203 -0
  800. data/app/views/admin_templates/good_flexy/admin/common/images/mass_upload.html.erb +9 -0
  801. data/app/views/admin_templates/good_flexy/admin/dashboard/index.html.erb +568 -0
  802. data/app/views/admin_templates/good_flexy/admin/layouts/OLD_application.html.erb +518 -0
  803. data/app/views/admin_templates/good_flexy/admin/layouts/application.html.erb +1296 -0
  804. data/app/views/admin_templates/good_flexy/admin/shared/404.html.erb +29 -0
  805. data/app/views/admin_templates/good_flexy/admin/shared/_breadcrumbs.html.erb +26 -0
  806. data/app/views/admin_templates/good_flexy/admin/shared/_chat.html.erb +49 -0
  807. data/app/views/admin_templates/good_flexy/admin/shared/_left_menu.html.erb +137 -0
  808. data/app/views/admin_templates/good_flexy/admin/shared/_left_menu_emails.html.erb +20 -0
  809. data/app/views/admin_templates/good_flexy/admin/shared/_left_menu_social_stats.html.erb +20 -0
  810. data/app/views/admin_templates/good_flexy/admin/shared/_left_menu_tags.html.erb +3 -0
  811. data/app/views/admin_templates/good_flexy/admin/shared/_sticky_notification.html.erb +11 -0
  812. data/app/views/admin_templates/good_flexy/admin/shared/entry_not_found.html.erb +1 -0
  813. data/app/views/admin_templates/good_flexy/admin/shared/renderer_delete.html.erb +0 -0
  814. data/app/views/admin_templates/good_flexy/admin/shared/renderer_entries_list.html.erb +157 -0
  815. data/app/views/admin_templates/good_flexy/admin/shared/renderer_entries_list_with_parent.html.erb +149 -0
  816. data/app/views/admin_templates/good_flexy/admin/shared/renderer_form_edit.html.erb +98 -0
  817. data/app/views/admin_templates/good_flexy/admin/shared/renderer_form_new.html.erb +69 -0
  818. data/app/views/admin_templates/good_flexy/admin/shared/renderer_page_elements.html.erb +11 -0
  819. data/app/views/admin_templates/good_flexy/admin/shared/renderer_show.html.erb +134 -0
  820. data/app/views/security/authentications/login_page.html.erb +253 -0
  821. data/app/views/security/authentications/restore.html.erb +0 -0
  822. data/app/views/security/authentications/show.html.erb +35 -0
  823. data/config/routes.rb +33 -1
  824. data/db/migrate/20130913084129_create_kirgudu_base_security_users.rb +56 -0
  825. data/db/migrate/20131114161828_create_kirgudu_base_templates.rb +28 -13
  826. data/db/migrate/20131114165013_create_kirgudu_base_template_elements.rb +29 -14
  827. data/db/migrate/20140208133148_create_kirgudu_base_common_portals.rb +37 -0
  828. data/db/migrate/20140208134642_create_kirgudu_base_common_portal_users.rb +23 -0
  829. data/lib/kirgudu_base.rb +6 -0
  830. data/lib/kirgudu_base/engine.rb +3 -3
  831. data/test/fixtures/kirgudu_base/common/portal_users.yml +15 -0
  832. data/test/models/kirgudu_base/common/portal_user_test.rb +9 -0
  833. metadata +845 -163
  834. data/app/assets/images/kirgudu_base/Documents.gif +0 -0
  835. data/app/assets/images/kirgudu_base/Meetings.gif +0 -0
  836. data/app/assets/images/kirgudu_base/Repair.gif +0 -0
  837. data/app/assets/images/kirgudu_base/box.gif +0 -0
  838. data/app/assets/images/kirgudu_base/ico_16_4_d.gif +0 -0
  839. data/app/assets/images/kirgudu_base/ico_18_1010.gif +0 -0
  840. data/app/assets/images/kirgudu_base/ico_18_112.gif +0 -0
  841. data/app/assets/images/kirgudu_base/ico_18_2020.gif +0 -0
  842. data/app/assets/images/kirgudu_base/icon-contacts.gif +0 -0
  843. data/app/assets/images/kirgudu_base/icon-employees.gif +0 -0
  844. data/app/assets/images/kirgudu_base/icon-list.gif +0 -0
  845. data/app/assets/images/kirgudu_base/icon-orders-green.gif +0 -0
  846. data/app/assets/images/kirgudu_base/icon-orders.gif +0 -0
  847. data/app/assets/images/kirgudu_base/icon-tenders.gif +0 -0
  848. data/app/assets/images/kirgudu_base/logo.png +0 -0
  849. data/app/assets/images/kirgudu_base/meeting-schedule.gif +0 -0
  850. data/app/assets/images/kirgudu_base/news-icon-16.gif +0 -0
  851. data/app/assets/images/kirgudu_base/operator-def.png +0 -0
  852. data/app/assets/images/kirgudu_base/people-16-16-256.gif +0 -0
  853. data/app/assets/images/kirgudu_base/sales_24x24 (1).gif +0 -0
  854. data/app/assets/javascripts/kirgudu_base/web/inputPlaceholder.js +0 -82
  855. data/app/assets/javascripts/kirgudu_base/web/js.js +0 -91
  856. data/app/assets/javascripts/kirgudu_base/web/navigate.js +0 -20
  857. data/app/assets/javascripts/kirgudu_base/web/watch.js +0 -1706
  858. data/app/assets/stylesheets/kirgudu_base/bootstrap.css +0 -4551
  859. data/app/assets/stylesheets/kirgudu_base/jdpicker.css +0 -200
  860. data/app/assets/stylesheets/kirgudu_base/main.css +0 -1368
  861. data/app/assets/stylesheets/kirgudu_base/menu.css +0 -159
  862. data/app/assets/stylesheets/kirgudu_base/switcher.css +0 -80
  863. data/app/helpers/kirgudu_base/controllers/transaction_wrapper.rb +0 -138
  864. data/app/helpers/kirgudu_base/models/filters.rb +0 -32
  865. data/app/helpers/kirgudu_base/models/form_properties.rb +0 -108
  866. data/app/helpers/kirgudu_base/models/form_property.rb +0 -335
  867. data/app/models/kirgudu_base/dynamic_pages/action_for.rb +0 -78
  868. data/app/models/kirgudu_base/dynamic_pages/action_for_builder.rb +0 -46
  869. data/app/models/kirgudu_base/dynamic_pages/on_change.rb +0 -40
  870. data/app/models/kirgudu_base/dynamic_pages/on_change_builder.rb +0 -38
  871. data/lib/kirgudu_base/version.rb +0 -4
@@ -1,5 +1,5 @@
1
- /* jquery.sparkline 2.1 - http://omnipotent.net/jquery.sparkline/
2
- ** Licensed under the New BSD License - see above site for details */
3
-
4
- (function(a){typeof define=="function"&&define.amd?define(["jquery"],a):a(jQuery)})(function(a){"use strict";var b={},c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I=0;c=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:undefined,normalRangeMax:undefined,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:undefined,chartRangeMax:undefined,chartRangeMinX:undefined,chartRangeMaxX:undefined,tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:undefined,nullColor:undefined,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:!1,colorMap:undefined,tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:undefined,thresholdValue:0,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:!1,tooltipFormat:new e("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:undefined,tooltipFormat:new e("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new e('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:undefined,targetColor:"#4a2",chartRangeMax:undefined,chartRangeMin:undefined,tooltipFormat:new e("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},B='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',d=function(){var b,c;return b=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(b.prototype=a.extend(new arguments[0],arguments[arguments.length-1]),b._super=arguments[0].prototype):b.prototype=arguments[arguments.length-1],arguments.length>2&&(c=Array.prototype.slice.call(arguments,1,-1),c.unshift(b.prototype),a.extend.apply(a,c))):b.prototype=arguments[0],b.prototype.cls=b,b},a.SPFormatClass=e=d({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(a,b){this.format=a,this.fclass=b},render:function(a,b,c){var d=this,e=a,f,g,h,i,j;return this.format.replace(this.fre,function(){var a;return g=arguments[1],h=arguments[3],f=d.precre.exec(g),f?(j=f[2],g=f[1]):j=!1,i=e[g],i===undefined?"":h&&b&&b[h]?(a=b[h],a.get?b[h].get(i)||i:b[h][i]||i):(k(i)&&(c.get("numberFormatter")?i=c.get("numberFormatter")(i):i=p(i,j,c.get("numberDigitGroupCount"),c.get("numberDigitGroupSep"),c.get("numberDecimalMark"))),i)})}}),a.spformat=function(a,b){return new e(a,b)},f=function(a,b,c){return a<b?b:a>c?c:a},g=function(a,b){var c;return b===2?(c=Math.floor(a.length/2),a.length%2?a[c]:(a[c-1]+a[c])/2):a.length%2?(c=(a.length*b+b)/4,c%1?(a[Math.floor(c)]+a[Math.floor(c)-1])/2:a[c-1]):(c=(a.length*b+2)/4,c%1?(a[Math.floor(c)]+a[Math.floor(c)-1])/2:a[c-1])},h=function(a){var b;switch(a){case"undefined":a=undefined;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},i=function(a){var b,c=[];for(b=a.length;b--;)c[b]=h(a[b]);return c},j=function(a,b){var c,d,e=[];for(c=0,d=a.length;c<d;c++)a[c]!==b&&e.push(a[c]);return e},k=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},p=function(b,c,d,e,f){var g,h;b=(c===!1?parseFloat(b).toString():b.toFixed(c)).split(""),g=(g=a.inArray(".",b))<0?b.length:g,g<b.length&&(b[g]=f);for(h=g-d;h>0;h-=d)b.splice(h,0,e);return b.join("")},l=function(a,b,c){var d;for(d=b.length;d--;){if(c&&b[d]===null)continue;if(b[d]!==a)return!1}return!0},m=function(a){var b=0,c;for(c=a.length;c--;)b+=typeof a[c]=="number"?a[c]:0;return b},o=function(b){return a.isArray(b)?b:[b]},n=function(a){var b;document.createStyleSheet?document.createStyleSheet().cssText=a:(b=document.createElement("style"),b.type="text/css",document.getElementsByTagName("head")[0].appendChild(b),b[typeof document.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=a)},a.fn.simpledraw=function(b,c,d,e){var f,g;if(d&&(f=this.data("_jqs_vcanvas")))return f;b===undefined&&(b=a(this).innerWidth()),c===undefined&&(c=a(this).innerHeight());if(a.browser.hasCanvas)f=new F(b,c,this,e);else{if(!a.browser.msie)return!1;f=new G(b,c,this)}return g=a(this).data("_jqs_mhandler"),g&&g.registerCanvas(f),f},a.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},a.RangeMapClass=q=d({init:function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&typeof b=="string"&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=c[0].length===0?-Infinity:parseFloat(c[0]),c[1]=c[1].length===0?Infinity:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},get:function(a){var b=this.rangelist,c,d,e;if((e=this.map[a])!==undefined)return e;if(b)for(c=b.length;c--;){d=b[c];if(d[0]<=a&&d[1]>=a)return d[2]}return undefined}}),a.range_map=function(a){return new q(a)},r=d({init:function(b,c){var d=a(b);this.$el=d,this.options=c,this.currentPageX=0,this.currentPageY=0,this.el=b,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!c.get("disableTooltips"),this.highlightEnabled=!c.get("disableHighlight")},registerSparkline:function(a){this.splist.push(a),this.over&&this.updateDisplay()},registerCanvas:function(b){var c=a(b.canvas);this.canvas=b,this.$canvas=c,c.mouseenter(a.proxy(this.mouseenter,this)),c.mouseleave(a.proxy(this.mouseleave,this)),c.click(a.proxy(this.mouseclick,this))},reset:function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=undefined)},mouseclick:function(b){var c=a.Event("sparklineClick");c.originalEvent=b,c.sparklines=this.splist,this.$el.trigger(c)},mouseenter:function(b){a(document.body).unbind("mousemove.jqs"),a(document.body).bind("mousemove.jqs",a.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new s(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},mouseleave:function(){a(document.body).unbind("mousemove.jqs");var b=this.splist,c=b.length,d=!1,e,f;this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null);for(f=0;f<c;f++)e=b[f],e.clearRegionHighlight()&&(d=!0);d&&this.canvas.render()},mousemove:function(a){this.currentPageX=a.pageX,this.currentPageY=a.pageY,this.currentEl=a.target,this.tooltip&&this.tooltip.updatePosition(a.pageX,a.pageY),this.updateDisplay()},updateDisplay:function(){var b=this.splist,c=b.length,d=!1,e=this.$canvas.offset(),f=this.currentPageX-e.left,g=this.currentPageY-e.top,h,i,j,k,l;if(!this.over)return;for(j=0;j<c;j++)i=b[j],k=i.setRegionHighlight(this.currentEl,f,g),k&&(d=!0);if(d){l=a.Event("sparklineRegionChange"),l.sparklines=this.splist,this.$el.trigger(l);if(this.tooltip){h="";for(j=0;j<c;j++)i=b[j],h+=i.getCurrentRegionTooltip();this.tooltip.setContent(h)}this.disableHighlight||this.canvas.render()}k===null&&this.mouseleave()}}),s=d({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(b){var c=b.get("tooltipClassname","jqstooltip"),d=this.sizeStyle,e;this.container=b.get("tooltipContainer")||document.body,this.tooltipOffsetX=b.get("tooltipOffsetX",10),this.tooltipOffsetY=b.get("tooltipOffsetY",12),a("#jqssizetip").remove(),a("#jqstooltip").remove(),this.sizetip=a("<div/>",{id:"jqssizetip",style:d,"class":c}),this.tooltip=a("<div/>",{id:"jqstooltip","class":c}).appendTo(this.container),e=this.tooltip.offset(),this.offsetLeft=e.left,this.offsetTop=e.top,this.hidden=!0,a(window).unbind("resize.jqs scroll.jqs"),a(window).bind("resize.jqs scroll.jqs",a.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=a(window).scrollTop(),this.scrollLeft=a(window).scrollLeft(),this.scrollRight=this.scrollLeft+a(window).width(),this.updatePosition()},getSize:function(a){this.sizetip.html(a).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(a){if(!a){this.tooltip.css("visibility","hidden"),this.hidden=!0;return}this.getSize(a),this.tooltip.html(a).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(a,b){if(a===undefined){if(this.mousex===undefined)return;a=this.mousex-this.offsetLeft,b=this.mousey-this.offsetTop}else this.mousex=a-=this.offsetLeft,this.mousey=b-=this.offsetTop;if(!this.height||!this.width||this.hidden)return;b-=this.height+this.tooltipOffsetY,a+=this.tooltipOffsetX,b<this.scrollTop&&(b=this.scrollTop),a<this.scrollLeft?a=this.scrollLeft:a+this.width>this.scrollRight&&(a=this.scrollRight-this.width),this.tooltip.css({left:a,top:b})},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=undefined,a(window).unbind("resize.jqs scroll.jqs")}}),C=function(){n(B)},a(C),H=[],a.fn.sparkline=function(b,c){return this.each(function(){var d=new a.fn.sparkline.options(this,c),e=a(this),f,g;f=function(){var c,f,g,h,i,j,k;if(b==="html"||b===undefined){k=this.getAttribute(d.get("tagValuesAttribute"));if(k===undefined||k===null)k=e.html();c=k.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")}else c=b;f=d.get("width")==="auto"?c.length*d.get("defaultPixelsPerValue"):d.get("width");if(d.get("height")==="auto"){if(!d.get("composite")||!a.data(this,"_jqs_vcanvas"))h=document.createElement("span"),h.innerHTML="a",e.html(h),g=a(h).innerHeight()||a(h).height(),a(h).remove(),h=null}else g=d.get("height");d.get("disableInteraction")?i=!1:(i=a.data(this,"_jqs_mhandler"),i?d.get("composite")||i.reset():(i=new r(this,d),a.data(this,"_jqs_mhandler",i)));if(d.get("composite")&&!a.data(this,"_jqs_vcanvas")){a.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),a.data(this,"_jqs_errnotify",!0));return}j=new(a.fn.sparkline[d.get("type")])(this,c,d,f,g),j.render(),i&&i.registerSparkline(j)};if(a(this).html()&&!d.get("disableHiddenCheck")&&a(this).is(":hidden")||a.fn.jquery<"1.3.0"&&a(this).parents().is(":hidden")||!a(this).parents("body").length){if(!d.get("composite")&&a.data(this,"_jqs_pending"))for(g=H.length;g;g--)H[g-1][0]==this&&H.splice(g-1,1);H.push([this,f]),a.data(this,"_jqs_pending",!0)}else f.call(this)})},a.fn.sparkline.defaults=c(),a.sparkline_display_visible=function(){var b,c,d,e=[];for(c=0,d=H.length;c<d;c++)b=H[c][0],a(b).is(":visible")&&!a(b).parents().is(":hidden")?(H[c][1].call(b),a.data(H[c][0],"_jqs_pending",!1),e.push(c)):!a(b).closest("html").length&&!a.data(b,"_jqs_pending")&&(a.data(H[c][0],"_jqs_pending",!1),e.push(c));for(c=e.length;c;c--)H.splice(e[c-1],1)},a.fn.sparkline.options=d({init:function(c,d){var e,f,g,h;this.userOptions=d=d||{},this.tag=c,this.tagValCache={},f=a.fn.sparkline.defaults,g=f.common,this.tagOptionsPrefix=d.enableTagOptions&&(d.tagOptionsPrefix||g.tagOptionsPrefix),h=this.getTagSetting("type"),h===b?e=f[d.type||g.type]:e=f[h],this.mergedOptions=a.extend({},g,e,d)},getTagSetting:function(a){var c=this.tagOptionsPrefix,d,e,f,g;if(c===!1||c===undefined)return b;if(this.tagValCache.hasOwnProperty(a))d=this.tagValCache.key;else{d=this.tag.getAttribute(c+a);if(d===undefined||d===null)d=b;else if(d.substr(0,1)==="["){d=d.substr(1,d.length-2).split(",");for(e=d.length;e--;)d[e]=h(d[e].replace(/(^\s*)|(\s*$)/g,""))}else if(d.substr(0,1)==="{"){f=d.substr(1,d.length-2).split(","),d={};for(e=f.length;e--;)g=f[e].split(":",2),d[g[0].replace(/(^\s*)|(\s*$)/g,"")]=h(g[1].replace(/(^\s*)|(\s*$)/g,""))}else d=h(d);this.tagValCache.key=d}return d},get:function(a,c){var d=this.getTagSetting(a),e;return d!==b?d:(e=this.mergedOptions[a])===undefined?c:e}}),a.fn.sparkline._base=d({disabled:!1,init:function(b,c,d,e,f){this.el=b,this.$el=a(b),this.values=c,this.options=d,this.width=e,this.height=f,this.currentRegion=undefined},initTarget:function(){var a=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),a))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(a,b){},setRegionHighlight:function(a,b,c){var d=this.currentRegion,e=!this.options.get("disableHighlight"),f;return b>this.canvasWidth||c>this.canvasHeight||b<0||c<0?null:(f=this.getRegion(a,b,c),d!==f?(d!==undefined&&e&&this.removeHighlight(),this.currentRegion=f,f!==undefined&&e&&this.renderHighlight(),!0):!1)},clearRegionHighlight:function(){return this.currentRegion!==undefined?(this.removeHighlight(),this.currentRegion=undefined,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(a){},getCurrentRegionTooltip:function(){var b=this.options,c="",d=[],f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(this.currentRegion===undefined)return"";f=this.getCurrentRegionFields(),p=b.get("tooltipFormatter");if(p)return p(this,b,f);b.get("tooltipChartTitle")&&(c+='<div class="jqs jqstitle">'+b.get("tooltipChartTitle")+"</div>\n"),g=this.options.get("tooltipFormat");if(!g)return"";a.isArray(g)||(g=[g]),a.isArray(f)||(f=[f]),l=this.options.get("tooltipFormatFieldlist"),m=this.options.get("tooltipFormatFieldlistKey");if(l&&m){n=[];for(k=f.length;k--;)o=f[k][m],(s=a.inArray(o,l))!=-1&&(n[s]=f[k]);f=n}h=g.length,r=f.length;for(k=0;k<h;k++){q=g[k],typeof q=="string"&&(q=new e(q)),i=q.fclass||"jqsfield";for(s=0;s<r;s++)if(!f[s].isNull||!b.get("tooltipSkipNull"))a.extend(f[s],{prefix:b.get("tooltipPrefix"),suffix:b.get("tooltipSuffix")}),j=q.render(f[s],b.get("tooltipValueLookups"),b),d.push('<div class="'+i+'">'+j+"</div>")}return d.length?c+d.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(a,b){var c=b.get("highlightColor"),d=b.get("highlightLighten"),e,g,h,i;if(c)return c;if(d){e=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(a);if(e){h=[],g=a.length===4?16:1;for(i=0;i<3;i++)h[i]=f(Math.round(parseInt(e[i+1],16)*g*d),0,255);return"rgb("+h.join(",")+")"}}return a}}),t={changeHighlight:function(b){var c=this.currentRegion,d=this.target,e=this.regionShapes[c],f;e&&(f=this.renderRegion(c,b),a.isArray(f)||a.isArray(e)?(d.replaceWithShapes(e,f),this.regionShapes[c]=a.map(f,function(a){return a.id})):(d.replaceWithShape(e,f),this.regionShapes[c]=f.id))},render:function(){var b=this.values,c=this.target,d=this.regionShapes,e,f,g,h;if(!this.cls._super.render.call(this))return;for(g=b.length;g--;){e=this.renderRegion(g);if(e)if(a.isArray(e)){f=[];for(h=e.length;h--;)e[h].append(),f.push(e[h].id);d[g]=f}else e.append(),d[g]=e.id;else d[g]=null}c.render()}},a.fn.sparkline.line=u=d(a.fn.sparkline._base,{type:"line",init:function(a,b,c,d,e){u._super.init.call(this,a,b,c,d,e),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(a,b,c){var d,e=this.regionMap;for(d=e.length;d--;)if(e[d]!==null&&b>=e[d][0]&&b<=e[d][1])return e[d][2];return undefined},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.yvalues[a]===null,x:this.xvalues[a],y:this.yvalues[a],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:a}},renderHighlight:function(){var a=this.currentRegion,b=this.target,c=this.vertices[a],d=this.options,e=d.get("spotRadius"),f=d.get("highlightSpotColor"),g=d.get("highlightLineColor"),h,i;if(!c)return;e&&f&&(h=b.drawCircle(c[0],c[1],e,undefined,f),this.highlightSpotId=h.id,b.insertAfterShape(this.lastShapeId,h)),g&&(i=b.drawLine(c[0],this.canvasTop,c[0],this.canvasTop+this.canvasHeight,g),this.highlightLineId=i.id,b.insertAfterShape(this.lastShapeId,i))},removeHighlight:function(){var a=this.target;this.highlightSpotId&&(a.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(a.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var a=this.values,b=a.length,c=this.xvalues,d=this.yvalues,e=this.yminmax,f,g,h,i,j;for(f=0;f<b;f++)g=a[f],h=typeof a[f]=="string",i=typeof a[f]=="object"&&a[f]instanceof Array,j=h&&a[f].split(":"),h&&j.length===2?(c.push(Number(j[0])),d.push(Number(j[1])),e.push(Number(j[1]))):i?(c.push(g[0]),d.push(g[1]),e.push(g[1])):(c.push(f),a[f]===null||a[f]==="null"?d.push(null):(d.push(Number(g)),e.push(Number(g))));this.options.get("xvalues")&&(c=this.options.get("xvalues")),this.maxy=this.maxyorg=Math.max.apply(Math,e),this.miny=this.minyorg=Math.min.apply(Math,e),this.maxx=Math.max.apply(Math,c),this.minx=Math.min.apply(Math,c),this.xvalues=c,this.yvalues=d,this.yminmax=e},processRangeOptions:function(){var a=this.options,b=a.get("normalRangeMin"),c=a.get("normalRangeMax");b!==undefined&&(b<this.miny&&(this.miny=b),c>this.maxy&&(this.maxy=c)),a.get("chartRangeMin")!==undefined&&(a.get("chartRangeClip")||a.get("chartRangeMin")<this.miny)&&(this.miny=a.get("chartRangeMin")),a.get("chartRangeMax")!==undefined&&(a.get("chartRangeClip")||a.get("chartRangeMax")>this.maxy)&&(this.maxy=a.get("chartRangeMax")),a.get("chartRangeMinX")!==undefined&&(a.get("chartRangeClipX")||a.get("chartRangeMinX")<this.minx)&&(this.minx=a.get("chartRangeMinX")),a.get("chartRangeMaxX")!==undefined&&(a.get("chartRangeClipX")||a.get("chartRangeMaxX")>this.maxx)&&(this.maxx=a.get("chartRangeMaxX"))},drawNormalRange:function(a,b,c,d,e){var f=this.options.get("normalRangeMin"),g=this.options.get("normalRangeMax"),h=b+Math.round(c-c*((g-this.miny)/e)),i=Math.round(c*(g-f)/e);this.target.drawRect(a,h,d,i,undefined,this.options.get("normalRangeColor")).append()},render:function(){var b=this.options,c=this.target,d=this.canvasWidth,e=this.canvasHeight,f=this.vertices,g=b.get("spotRadius"),h=this.regionMap,i,j,k,l,m,n,o,p,r,s,t,v,w,x,y,z,A,B,C,D,E,F,G,H,I;if(!u._super.render.call(this))return;this.scanValues(),this.processRangeOptions(),G=this.xvalues,H=this.yvalues;if(!this.yminmax.length||this.yvalues.length<2)return;l=m=0,i=this.maxx-this.minx===0?1:this.maxx-this.minx,j=this.maxy-this.miny===0?1:this.maxy-this.miny,k=this.yvalues.length-1,g&&(d<g*4||e<g*4)&&(g=0);if(g){E=b.get("highlightSpotColor")&&!b.get("disableInteraction");if(E||b.get("minSpotColor")||b.get("spotColor")&&H[k]===this.miny)e-=Math.ceil(g);if(E||b.get("maxSpotColor")||b.get("spotColor")&&H[k]===this.maxy)e-=Math.ceil(g),l+=Math.ceil(g);if(E||(b.get("minSpotColor")||b.get("maxSpotColor"))&&(H[0]===this.miny||H[0]===this.maxy))m+=Math.ceil(g),d-=Math.ceil(g);if(E||b.get("spotColor")||b.get("minSpotColor")||b.get("maxSpotColor")&&(H[k]===this.miny||H[k]===this.maxy))d-=Math.ceil(g)}e--,b.get("normalRangeMin")!==undefined&&!b.get("drawNormalOnTop")&&this.drawNormalRange(m,l,e,d,j),o=[],p=[o],x=y=null,z=H.length;for(I=0;I<z;I++)r=G[I],t=G[I+1],s=H[I],v=m+Math.round((r-this.minx)*(d/i)),w=I<z-1?m+Math.round((t-this.minx)*(d/i)):d,y=v+(w-v)/2,h[I]=[x||0,y,I],x=y,s===null?I&&(H[I-1]!==null&&(o=[],p.push(o)),f.push(null)):(s<this.miny&&(s=this.miny),s>this.maxy&&(s=this.maxy),o.length||o.push([v,l+e]),n=[v,l+Math.round(e-e*((s-this.miny)/j))],o.push(n),f.push(n));A=[],B=[],C=p.length;for(I=0;I<C;I++)o=p[I],o.length&&(b.get("fillColor")&&(o.push([o[o.length-1][0],l+e]),B.push(o.slice(0)),o.pop()),o.length>2&&(o[0]=[o[0][0],o[1][1]]),A.push(o));C=B.length;for(I=0;I<C;I++)c.drawShape(B[I],b.get("fillColor"),b.get("fillColor")).append();b.get("normalRangeMin")!==undefined&&b.get("drawNormalOnTop")&&this.drawNormalRange(m,l,e,d,j),C=A.length;for(I=0;I<C;I++)c.drawShape(A[I],b.get("lineColor"),undefined,b.get("lineWidth")).append();if(g&&b.get("valueSpots")){D=b.get("valueSpots"),D.get===undefined&&(D=new q(D));for(I=0;I<z;I++)F=D.get(H[I]),F&&c.drawCircle(m+Math.round((G[I]-this.minx)*(d/i)),l+Math.round(e-e*((H[I]-this.miny)/j)),g,undefined,F).append()}g&&b.get("spotColor")&&c.drawCircle(m+Math.round((G[G.length-1]-this.minx)*(d/i)),l+Math.round(e-e*((H[k]-this.miny)/j)),g,undefined,b.get("spotColor")).append(),this.maxy!==this.minyorg&&(g&&b.get("minSpotColor")&&(r=G[a.inArray(this.minyorg,H)],c.drawCircle(m+Math.round((r-this.minx)*(d/i)),l+Math.round(e-e*((this.minyorg-this.miny)/j)),g,undefined,b.get("minSpotColor")).append()),g&&b.get("maxSpotColor")&&(r=G[a.inArray(this.maxyorg,H)],c.drawCircle(m+Math.round((r-this.minx)*(d/i)),l+Math.round(e-e*((this.maxyorg-this.miny)/j)),g,undefined,b.get("maxSpotColor")).append())),this.lastShapeId=c.getLastShapeId(),this.canvasTop=l,c.render()}}),a.fn.sparkline.bar=v=d(a.fn.sparkline._base,t,{type:"bar",init:function(b,c,d,e,g){var k=parseInt(d.get("barWidth"),10),l=parseInt(d.get("barSpacing"),10),m=d.get("chartRangeMin"),n=d.get("chartRangeMax"),o=d.get("chartRangeClip"),p=Infinity,r=-Infinity,s,t,u,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P;v._super.init.call(this,b,c,d,e,g);for(y=0,z=c.length;y<z;y++){M=c[y],s=typeof M=="string"&&M.indexOf(":")>-1;if(s||a.isArray(M))H=!0,s&&(M=c[y]=i(M.split(":"))),M=j(M,null),t=Math.min.apply(Math,M),u=Math.max.apply(Math,M),t<p&&(p=t),u>r&&(r=u)}this.stacked=H,this.regionShapes={},this.barWidth=k,this.barSpacing=l,this.totalBarWidth=k+l,this.width=e=c.length*k+(c.length-1)*l,this.initTarget(),o&&(F=m===undefined?-Infinity:m,G=n===undefined?Infinity:n),x=[],w=H?[]:x;var Q=[],R=[];for(y=0,z=c.length;y<z;y++)if(H){I=c[y],c[y]=L=[],Q[y]=0,w[y]=R[y]=0;for(J=0,K=I.length;J<K;J++)M=L[J]=o?f(I[J],F,G):I[J],M!==null&&(M>0&&(Q[y]+=M),p<0&&r>0?M<0?R[y]+=Math.abs(M):w[y]+=M:w[y]+=Math.abs(M-(M<0?r:p)),x.push(M))}else M=o?f(c[y],F,G):c[y],M=c[y]=h(M),M!==null&&x.push(M);this.max=E=Math.max.apply(Math,x),this.min=D=Math.min.apply(Math,x),this.stackMax=r=H?Math.max.apply(Math,Q):E,this.stackMin=p=H?Math.min.apply(Math,x):D,d.get("chartRangeMin")!==undefined&&(d.get("chartRangeClip")||d.get("chartRangeMin")<D)&&(D=d.get("chartRangeMin")),d.get("chartRangeMax")!==undefined&&(d.get("chartRangeClip")||d.get("chartRangeMax")>E)&&(E=d.get("chartRangeMax")),this.zeroAxis=B=d.get("zeroAxis",!0),D<=0&&E>=0&&B?C=0:B==0?C=D:D>0?C=D:C=E,this.xaxisOffset=C,A=H?Math.max.apply(Math,w)+Math.max.apply(Math,R):E-D,this.canvasHeightEf=B&&D<0?this.canvasHeight-2:this.canvasHeight-1,D<C?(O=H&&E>=0?r:E,N=(O-C)/A*this.canvasHeight,N!==Math.ceil(N)&&(this.canvasHeightEf-=2,N=Math.ceil(N))):N=this.canvasHeight,this.yoffset=N,a.isArray(d.get("colorMap"))?(this.colorMapByIndex=d.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=d.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===undefined&&(this.colorMapByValue=new q(this.colorMapByValue))),this.range=A},getRegion:function(a,b,c){var d=Math.floor(b/this.totalBarWidth);return d<0||d>=this.values.length?undefined:d},getCurrentRegionFields:function(){var a=this.currentRegion,b=o(this.values[a]),c=[],d,e;for(e=b.length;e--;)d=b[e],c.push({isNull:d===null,value:d,color:this.calcColor(e,d,a),offset:a});return c},calcColor:function(b,c,d){var e=this.colorMapByIndex,f=this.colorMapByValue,g=this.options,h,i;return this.stacked?h=g.get("stackedBarColor"):h=c<0?g.get("negBarColor"):g.get("barColor"),c===0&&g.get("zeroColor")!==undefined&&(h=g.get("zeroColor")),f&&(i=f.get(c))?h=i:e&&e.length>d&&(h=e[d]),a.isArray(h)?h[b%h.length]:h},renderRegion:function(b,c){var d=this.values[b],e=this.options,f=this.xaxisOffset,g=[],h=this.range,i=this.stacked,j=this.target,k=b*this.totalBarWidth,m=this.canvasHeightEf,n=this.yoffset,o,p,q,r,s,t,u,v,w,x;d=a.isArray(d)?d:[d],u=d.length,v=d[0],r=l(null,d),x=l(f,d,!0);if(r)return e.get("nullColor")?(q=c?e.get("nullColor"):this.calcHighlightColor(e.get("nullColor"),e),o=n>0?n-1:n,j.drawRect(k,o,this.barWidth-1,0,q,q)):undefined;s=n;for(t=0;t<u;t++){v=d[t];if(i&&v===f){if(!x||w)continue;w=!0}h>0?p=Math.floor(m*(Math.abs(v-f)/h))+1:p=1,v<f||v===f&&n===0?(o=s,s+=p):(o=n-p,n-=p),q=this.calcColor(t,v,b),c&&(q=this.calcHighlightColor(q,e)),g.push(j.drawRect(k,o,this.barWidth-1,p-1,q,q))}return g.length===1?g[0]:g}}),a.fn.sparkline.tristate=w=d(a.fn.sparkline._base,t,{type:"tristate",init:function(b,c,d,e,f){var g=parseInt(d.get("barWidth"),10),h=parseInt(d.get("barSpacing"),10);w._super.init.call(this,b,c,d,e,f),this.regionShapes={},this.barWidth=g,this.barSpacing=h,this.totalBarWidth=g+h,this.values=a.map(c,Number),this.width=e=c.length*g+(c.length-1)*h,a.isArray(d.get("colorMap"))?(this.colorMapByIndex=d.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=d.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===undefined&&(this.colorMapByValue=new q(this.colorMapByValue))),this.initTarget()},getRegion:function(a,b,c){return Math.floor(b/this.totalBarWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===undefined,value:this.values[a],color:this.calcColor(this.values[a],a),offset:a}},calcColor:function(a,b){var c=this.values,d=this.options,e=this.colorMapByIndex,f=this.colorMapByValue,g,h;return f&&(h=f.get(a))?g=h:e&&e.length>b?g=e[b]:c[b]<0?g=d.get("negBarColor"):c[b]>0?g=d.get("posBarColor"):g=d.get("zeroBarColor"),g},renderRegion:function(a,b){var c=this.values,d=this.options,e=this.target,f,g,h,i,j,k;f=e.pixelHeight,h=Math.round(f/2),i=a*this.totalBarWidth,c[a]<0?(j=h,g=h-1):c[a]>0?(j=0,g=h-1):(j=h-1,g=2),k=this.calcColor(c[a],a);if(k===null)return;return b&&(k=this.calcHighlightColor(k,d)),e.drawRect(i,j,this.barWidth-1,g-1,k,k)}}),a.fn.sparkline.discrete=x=d(a.fn.sparkline._base,t,{type:"discrete",init:function(b,c,d,e,f){x._super.init.call(this,b,c,d,e,f),this.regionShapes={},this.values=c=a.map(c,Number),this.min=Math.min.apply(Math,c),this.max=Math.max.apply(Math,c),this.range=this.max-this.min,this.width=e=d.get("width")==="auto"?c.length*2:this.width,this.interval=Math.floor(e/c.length),this.itemWidth=e/c.length,d.get("chartRangeMin")!==undefined&&(d.get("chartRangeClip")||d.get("chartRangeMin")<this.min)&&(this.min=d.get("chartRangeMin")),d.get("chartRangeMax")!==undefined&&(d.get("chartRangeClip")||d.get("chartRangeMax")>this.max)&&(this.max=d.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight=d.get("lineHeight")==="auto"?Math.round(this.canvasHeight*.3):d.get("lineHeight"))},getRegion:function(a,b,c){return Math.floor(b/this.itemWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===undefined,value:this.values[a],offset:a}},renderRegion:function(a,b){var c=this.values,d=this.options,e=this.min,g=this.max,h=this.range,i=this.interval,j=this.target,k=this.canvasHeight,l=this.lineHeight,m=k-l,n,o,p,q;return o=f(c[a],e,g),q=a*i,n=Math.round(m-m*((o-e)/h)),p=d.get("thresholdColor")&&o<d.get("thresholdValue")?d.get("thresholdColor"):d.get("lineColor"),b&&(p=this.calcHighlightColor(p,d)),j.drawLine(q,n,q,n+l,p)}}),a.fn.sparkline.bullet=y=d(a.fn.sparkline._base,{type:"bullet",init:function(a,b,c,d,e){var f,g,h;y._super.init.call(this,a,b,c,d,e),this.values=b=i(b),h=b.slice(),h[0]=h[0]===null?h[2]:h[0],h[1]=b[1]===null?h[2]:h[1],f=Math.min.apply(Math,b),g=Math.max.apply(Math,b),c.get("base")===undefined?f=f<0?f:0:f=c.get("base"),this.min=f,this.max=g,this.range=g-f,this.shapes={},this.valueShapes={},this.regiondata={},this.width=d=c.get("width")==="auto"?"4.0em":d,this.target=this.$el.simpledraw(d,e,c.get("composite")),b.length||(this.disabled=!0),this.initTarget()},getRegion:function(a,b,c){var d=this.target.getShapeAt(a,b,c);return d!==undefined&&this.shapes[d]!==undefined?this.shapes[d]:undefined},getCurrentRegionFields:function(){var a=this.currentRegion;return{fieldkey:a.substr(0,1),value:this.values[a.substr(1)],region:a}},changeHighlight:function(a){var b=this.currentRegion,c=this.valueShapes[b],d;delete this.shapes[c];switch(b.substr(0,1)){case"r":d=this.renderRange(b.substr(1),a);break;case"p":d=this.renderPerformance(a);break;case"t":d=this.renderTarget(a)}this.valueShapes[b]=d.id,this.shapes[d.id]=b,this.target.replaceWithShape(c,d)},renderRange:function(a,b){var c=this.values[a],d=Math.round(this.canvasWidth*((c-this.min)/this.range)),e=this.options.get("rangeColors")[a-2];return b&&(e=this.calcHighlightColor(e,this.options)),this.target.drawRect(0,0,d-1,this.canvasHeight-1,e,e)},renderPerformance:function(a){var b=this.values[1],c=Math.round(this.canvasWidth*((b-this.min)/this.range)),d=this.options.get("performanceColor");return a&&(d=this.calcHighlightColor(d,this.options)),this.target.drawRect(0,Math.round(this.canvasHeight*.3),c-1,Math.round(this.canvasHeight*.4)-1,d,d)},renderTarget:function(a){var b=this.values[0],c=Math.round(this.canvasWidth*((b-this.min)/this.range)-this.options.get("targetWidth")/2),d=Math.round(this.canvasHeight*.1),e=this.canvasHeight-d*2,f=this.options.get("targetColor");return a&&(f=this.calcHighlightColor(f,this.options)),this.target.drawRect(c,d,this.options.get("targetWidth")-1,e-1,f,f)},render:function(){var a=this.values.length,b=this.target,c,d;if(!y._super.render.call(this))return;for(c=2;c<a;c++)d=this.renderRange(c).append(),this.shapes[d.id]="r"+c,this.valueShapes["r"+c]=d.id;this.values[1]!==null&&(d=this.renderPerformance().append(),this.shapes[d.id]="p1",this.valueShapes.p1=d.id),this.values[0]!==null&&(d=this.renderTarget().append(),this.shapes[d.id]="t0",this.valueShapes.t0=d.id),b.render()}}),a.fn.sparkline.pie=z=d(a.fn.sparkline._base,{type:"pie",init:function(b,c,d,e,f){var g=0,h;z._super.init.call(this,b,c,d,e,f),this.shapes={},this.valueShapes={},this.values=c=a.map(c,Number),d.get("width")==="auto"&&(this.width=this.height);if(c.length>0)for(h=c.length;h--;)g+=c[h];this.total=g,this.initTarget(),this.radius=Math.floor(Math.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(a,b,c){var d=this.target.getShapeAt(a,b,c);return d!==undefined&&this.shapes[d]!==undefined?this.shapes[d]:undefined},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===undefined,value:this.values[a],percent:this.values[a]/this.total*100,color:this.options.get("sliceColors")[a%this.options.get("sliceColors").length],offset:a}},changeHighlight:function(a){var b=this.currentRegion,c=this.renderSlice(b,a),d=this.valueShapes[b];delete this.shapes[d],this.target.replaceWithShape(d,c),this.valueShapes[b]=c.id,this.shapes[c.id]=b},renderSlice:function(a,b){var c=this.target,d=this.options,e=this.radius,f=d.get("borderWidth"),g=d.get("offset"),h=2*Math.PI,i=this.values,j=this.total,k=g?2*Math.PI*(g/360):0,l,m,n,o,p;o=i.length;for(n=0;n<o;n++){l=k,m=k,j>0&&(m=k+h*(i[n]/j));if(a===n)return p=d.get("sliceColors")[n%d.get("sliceColors").length],b&&(p=this.calcHighlightColor(p,d)),c.drawPieSlice(e,e,e-f,l,m,undefined,p);k=m}},render:function(){var a=this.target,b=this.values,c=this.options,d=this.radius,e=c.get("borderWidth"),f,g;if(!z._super.render.call(this))return;
5
- e&&a.drawCircle(d,d,Math.floor(d-e/2),c.get("borderColor"),undefined,e).append();for(g=b.length;g--;)b[g]&&(f=this.renderSlice(g).append(),this.valueShapes[g]=f.id,this.shapes[f.id]=g);a.render()}}),a.fn.sparkline.box=A=d(a.fn.sparkline._base,{type:"box",init:function(b,c,d,e,f){A._super.init.call(this,b,c,d,e,f),this.values=a.map(c,Number),this.width=d.get("width")==="auto"?"4.0em":e,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var a=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==undefined&&a.push({field:"lo",value:this.loutlier}),this.routlier!==undefined&&a.push({field:"ro",value:this.routlier}),this.lwhisker!==undefined&&a.push({field:"lw",value:this.lwhisker}),this.rwhisker!==undefined&&a.push({field:"rw",value:this.rwhisker}),a},render:function(){var a=this.target,b=this.values,c=b.length,d=this.options,e=this.canvasWidth,f=this.canvasHeight,h=d.get("chartRangeMin")===undefined?Math.min.apply(Math,b):d.get("chartRangeMin"),i=d.get("chartRangeMax")===undefined?Math.max.apply(Math,b):d.get("chartRangeMax"),j=0,k,l,m,n,o,p,q,r,s,t,u;if(!A._super.render.call(this))return;if(d.get("raw"))d.get("showOutliers")&&b.length>5?(l=b[0],k=b[1],n=b[2],o=b[3],p=b[4],q=b[5],r=b[6]):(k=b[0],n=b[1],o=b[2],p=b[3],q=b[4]);else{b.sort(function(a,b){return a-b}),n=g(b,1),o=g(b,2),p=g(b,3),m=p-n;if(d.get("showOutliers")){k=q=undefined;for(s=0;s<c;s++)k===undefined&&b[s]>n-m*d.get("outlierIQR")&&(k=b[s]),b[s]<p+m*d.get("outlierIQR")&&(q=b[s]);l=b[0],r=b[c-1]}else k=b[0],q=b[c-1]}this.quartiles=[n,o,p],this.lwhisker=k,this.rwhisker=q,this.loutlier=l,this.routlier=r,u=e/(i-h+1),d.get("showOutliers")&&(j=Math.ceil(d.get("spotRadius")),e-=2*Math.ceil(d.get("spotRadius")),u=e/(i-h+1),l<k&&a.drawCircle((l-h)*u+j,f/2,d.get("spotRadius"),d.get("outlierLineColor"),d.get("outlierFillColor")).append(),r>q&&a.drawCircle((r-h)*u+j,f/2,d.get("spotRadius"),d.get("outlierLineColor"),d.get("outlierFillColor")).append()),a.drawRect(Math.round((n-h)*u+j),Math.round(f*.1),Math.round((p-n)*u),Math.round(f*.8),d.get("boxLineColor"),d.get("boxFillColor")).append(),a.drawLine(Math.round((k-h)*u+j),Math.round(f/2),Math.round((n-h)*u+j),Math.round(f/2),d.get("lineColor")).append(),a.drawLine(Math.round((k-h)*u+j),Math.round(f/4),Math.round((k-h)*u+j),Math.round(f-f/4),d.get("whiskerColor")).append(),a.drawLine(Math.round((q-h)*u+j),Math.round(f/2),Math.round((p-h)*u+j),Math.round(f/2),d.get("lineColor")).append(),a.drawLine(Math.round((q-h)*u+j),Math.round(f/4),Math.round((q-h)*u+j),Math.round(f-f/4),d.get("whiskerColor")).append(),a.drawLine(Math.round((o-h)*u+j),Math.round(f*.1),Math.round((o-h)*u+j),Math.round(f*.9),d.get("medianColor")).append(),d.get("target")&&(t=Math.ceil(d.get("spotRadius")),a.drawLine(Math.round((d.get("target")-h)*u+j),Math.round(f/2-t),Math.round((d.get("target")-h)*u+j),Math.round(f/2+t),d.get("targetColor")).append(),a.drawLine(Math.round((d.get("target")-h)*u+j-t),Math.round(f/2),Math.round((d.get("target")-h)*u+j+t),Math.round(f/2),d.get("targetColor")).append()),a.render()}}),a.browser.msie&&document.namespaces&&!document.namespaces.v&&document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),a.browser.hasCanvas===undefined&&(a.browser.hasCanvas=document.createElement("canvas").getContext!==undefined),D=d({init:function(a,b,c,d){this.target=a,this.id=b,this.type=c,this.args=d},append:function(){return this.target.appendShape(this),this}}),E=d({_pxregex:/(\d+)(px)?\s*$/i,init:function(b,c,d){if(!b)return;this.width=b,this.height=c,this.target=d,this.lastShapeId=null,d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this)},drawLine:function(a,b,c,d,e,f){return this.drawShape([[a,b],[c,d]],e,f)},drawShape:function(a,b,c,d){return this._genShape("Shape",[a,b,c,d])},drawCircle:function(a,b,c,d,e,f){return this._genShape("Circle",[a,b,c,d,e,f])},drawPieSlice:function(a,b,c,d,e,f,g){return this._genShape("PieSlice",[a,b,c,d,e,f,g])},drawRect:function(a,b,c,d,e,f){return this._genShape("Rect",[a,b,c,d,e,f])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(b,c){a(c).html(b)},_calculatePixelDims:function(b,c,d){var e;e=this._pxregex.exec(c),e?this.pixelHeight=e[1]:this.pixelHeight=a(d).height(),e=this._pxregex.exec(b),e?this.pixelWidth=e[1]:this.pixelWidth=a(d).width()},_genShape:function(a,b){var c=I++;return b.unshift(c),new D(this,c,a,b)},appendShape:function(a){alert("appendShape not implemented")},replaceWithShape:function(a,b){alert("replaceWithShape not implemented")},insertAfterShape:function(a,b){alert("insertAfterShape not implemented")},removeShapeId:function(a){alert("removeShapeId not implemented")},getShapeAt:function(a,b,c){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),F=d(E,{init:function(b,c,d,e){F._super.init.call(this,b,c,d),this.canvas=document.createElement("canvas"),d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this),a(this.canvas).css({display:"inline-block",width:b,height:c,verticalAlign:"top"}),this._insert(this.canvas,d),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=e,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=undefined,a(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(a,b,c){var d=this.canvas.getContext("2d");return a!==undefined&&(d.strokeStyle=a),d.lineWidth=c===undefined?1:c,b!==undefined&&(d.fillStyle=b),d},reset:function(){var a=this._getContext();a.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=undefined},_drawShape:function(a,b,c,d,e){var f=this._getContext(c,d,e),g,h;f.beginPath(),f.moveTo(b[0][0]+.5,b[0][1]+.5);for(g=1,h=b.length;g<h;g++)f.lineTo(b[g][0]+.5,b[g][1]+.5);c!==undefined&&f.stroke(),d!==undefined&&f.fill(),this.targetX!==undefined&&this.targetY!==undefined&&f.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawCircle:function(a,b,c,d,e,f,g){var h=this._getContext(e,f,g);h.beginPath(),h.arc(b,c,d,0,2*Math.PI,!1),this.targetX!==undefined&&this.targetY!==undefined&&h.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a),e!==undefined&&h.stroke(),f!==undefined&&h.fill()},_drawPieSlice:function(a,b,c,d,e,f,g,h){var i=this._getContext(g,h);i.beginPath(),i.moveTo(b,c),i.arc(b,c,d,e,f,!1),i.lineTo(b,c),i.closePath(),g!==undefined&&i.stroke(),h&&i.fill(),this.targetX!==undefined&&this.targetY!==undefined&&i.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b+d,c],[b+d,c+e],[b,c+e],[b,c]],f,g)},appendShape:function(a){return this.shapes[a.id]=a,this.shapeseq.push(a.id),this.lastShapeId=a.id,a.id},replaceWithShape:function(a,b){var c=this.shapeseq,d;this.shapes[b.id]=b;for(d=c.length;d--;)c[d]==a&&(c[d]=b.id);delete this.shapes[a]},replaceWithShapes:function(a,b){var c=this.shapeseq,d={},e,f,g;for(f=a.length;f--;)d[a[f]]=!0;for(f=c.length;f--;)e=c[f],d[e]&&(c.splice(f,1),delete this.shapes[e],g=f);for(f=b.length;f--;)c.splice(g,0,b[f].id),this.shapes[b[f].id]=b[f]},insertAfterShape:function(a,b){var c=this.shapeseq,d;for(d=c.length;d--;)if(c[d]===a){c.splice(d+1,0,b.id),this.shapes[b.id]=b;return}},removeShapeId:function(a){var b=this.shapeseq,c;for(c=b.length;c--;)if(b[c]===a){b.splice(c,1);break}delete this.shapes[a]},getShapeAt:function(a,b,c){return this.targetX=b,this.targetY=c,this.render(),this.currentTargetShapeId},render:function(){var a=this.shapeseq,b=this.shapes,c=a.length,d=this._getContext(),e,f,g;d.clearRect(0,0,this.pixelWidth,this.pixelHeight);for(g=0;g<c;g++)e=a[g],f=b[e],this["_draw"+f.type].apply(this,f.args);this.interact||(this.shapes={},this.shapeseq=[])}}),G=d(E,{init:function(b,c,d){var e;G._super.init.call(this,b,c,d),d[0]&&(d=d[0]),a.data(d,"_jqs_vcanvas",this),this.canvas=document.createElement("span"),a(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:b,height:c,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,d),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,e='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"'+' style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",e),this.group=a(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(a,b,c,d,e){var f=[],g,h,i,j,k,l,m;for(m=0,l=b.length;m<l;m++)f[m]=""+b[m][0]+","+b[m][1];return g=f.splice(0,1),e=e===undefined?1:e,h=c===undefined?' stroked="false" ':' strokeWeight="'+e+'px" strokeColor="'+c+'" ',i=d===undefined?' filled="false"':' fillColor="'+d+'" filled="true" ',j=f[0]===f[f.length-1]?"x ":"",k='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+a+'" '+h+i+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+g+" l "+f.join(", ")+" "+j+'e">'+" </v:shape>",k},_drawCircle:function(a,b,c,d,e,f,g){var h,i,j;return b-=d,c-=d,h=e===undefined?' stroked="false" ':' strokeWeight="'+g+'px" strokeColor="'+e+'" ',i=f===undefined?' filled="false"':' fillColor="'+f+'" filled="true" ',j='<v:oval id="jqsshape'+a+'" '+h+i+' style="position:absolute;top:'+c+"px; left:"+b+"px; width:"+d*2+"px; height:"+d*2+'px"></v:oval>',j},_drawPieSlice:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p;if(e===f)return;f-e===2*Math.PI&&(e=0,f=2*Math.PI),j=b+Math.round(Math.cos(e)*d),k=c+Math.round(Math.sin(e)*d),l=b+Math.round(Math.cos(f)*d),m=c+Math.round(Math.sin(f)*d);if(j===l&&k===m&&f-e<Math.PI)return;return i=[b-d,c-d,b+d,c+d,j,k,l,m],n=g===undefined?' stroked="false" ':' strokeWeight="1px" strokeColor="'+g+'" ',o=h===undefined?' filled="false"':' fillColor="'+h+'" filled="true" ',p='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+a+'" '+n+o+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+b+","+c+" wa "+i.join(", ")+' x e">'+" </v:shape>",p},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b,c+e],[b+d,c+e],[b+d,c],[b,c]],f,g)},reset:function(){this.group.innerHTML=""},appendShape:function(a){var b=this["_draw"+a.type].apply(this,a.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",b):this.prerender+=b,this.lastShapeId=a.id,a.id},replaceWithShape:function(b,c){var d=a("#jqsshape"+b),e=this["_draw"+c.type].apply(this,c.args);d[0].outerHTML=e},replaceWithShapes:function(b,c){var d=a("#jqsshape"+b[0]),e="",f=c.length,g;for(g=0;g<f;g++)e+=this["_draw"+c[g].type].apply(this,c[g].args);d[0].outerHTML=e;for(g=1;g<b.length;g++)a("#jqsshape"+b[g]).remove()},insertAfterShape:function(b,c){var d=a("#jqsshape"+b),e=this["_draw"+c.type].apply(this,c.args);d[0].insertAdjacentHTML("afterEnd",e)},removeShapeId:function(b){var c=a("#jqsshape"+b);this.group.removeChild(c[0])},getShapeAt:function(a,b,c){var d=a.id.substr(8);return d},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})});
1
+ /* jquery.sparkline 2.1.2 - http://omnipotent.net/jquery.sparkline/
2
+ ** Licensed under the New BSD License - see above site for details */
3
+
4
+ (function(a,b,c){(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.sparkline&&a(jQuery)})(function(d){"use strict";var e={},f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L=0;f=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:c,normalRangeMax:c,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:c,chartRangeMax:c,chartRangeMinX:c,chartRangeMaxX:c,tooltipFormat:new h('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:c,nullColor:c,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:c,chartRangeMin:c,chartRangeClip:!1,colorMap:c,tooltipFormat:new h('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new h('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:c,thresholdValue:0,chartRangeMax:c,chartRangeMin:c,chartRangeClip:!1,tooltipFormat:new h("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:c,tooltipFormat:new h("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new h('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:c,targetColor:"#4a2",chartRangeMax:c,chartRangeMin:c,tooltipFormat:new h("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},E='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: center;white-space: nowrap;padding:5px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-ms-box-sizing:content-box;-o-box-sizing:content-box;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',g=function(){var a,b;return a=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(a.prototype=d.extend(new arguments[0],arguments[arguments.length-1]),a._super=arguments[0].prototype):a.prototype=arguments[arguments.length-1],arguments.length>2&&(b=Array.prototype.slice.call(arguments,1,-1),b.unshift(a.prototype),d.extend.apply(d,b))):a.prototype=arguments[0],a.prototype.cls=a,a},d.SPFormatClass=h=g({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(a,b){this.format=a,this.fclass=b},render:function(a,b,d){var e=this,f=a,g,h,i,j,k;return this.format.replace(this.fre,function(){var a;return h=arguments[1],i=arguments[3],g=e.precre.exec(h),g?(k=g[2],h=g[1]):k=!1,j=f[h],j===c?"":i&&b&&b[i]?(a=b[i],a.get?b[i].get(j)||j:b[i][j]||j):(n(j)&&(d.get("numberFormatter")?j=d.get("numberFormatter")(j):j=s(j,k,d.get("numberDigitGroupCount"),d.get("numberDigitGroupSep"),d.get("numberDecimalMark"))),j)})}}),d.spformat=function(a,b){return new h(a,b)},i=function(a,b,c){return a<b?b:a>c?c:a},j=function(a,c){var d;return c===2?(d=b.floor(a.length/2),a.length%2?a[d]:(a[d-1]+a[d])/2):a.length%2?(d=(a.length*c+c)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1]):(d=(a.length*c+2)/4,d%1?(a[b.floor(d)]+a[b.floor(d)-1])/2:a[d-1])},k=function(a){var b;switch(a){case"undefined":a=c;break;case"null":a=null;break;case"true":a=!0;break;case"false":a=!1;break;default:b=parseFloat(a),a==b&&(a=b)}return a},l=function(a){var b,c=[];for(b=a.length;b--;)c[b]=k(a[b]);return c},m=function(a,b){var c,d,e=[];for(c=0,d=a.length;c<d;c++)a[c]!==b&&e.push(a[c]);return e},n=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},s=function(a,b,c,e,f){var g,h;a=(b===!1?parseFloat(a).toString():a.toFixed(b)).split(""),g=(g=d.inArray(".",a))<0?a.length:g,g<a.length&&(a[g]=f);for(h=g-c;h>0;h-=c)a.splice(h,0,e);return a.join("")},o=function(a,b,c){var d;for(d=b.length;d--;){if(c&&b[d]===null)continue;if(b[d]!==a)return!1}return!0},p=function(a){var b=0,c;for(c=a.length;c--;)b+=typeof a[c]=="number"?a[c]:0;return b},r=function(a){return d.isArray(a)?a:[a]},q=function(b){var c;a.createStyleSheet?a.createStyleSheet().cssText=b:(c=a.createElement("style"),c.type="text/css",a.getElementsByTagName("head")[0].appendChild(c),c[typeof a.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=b)},d.fn.simpledraw=function(b,e,f,g){var h,i;if(f&&(h=this.data("_jqs_vcanvas")))return h;if(d.fn.sparkline.canvas===!1)return!1;if(d.fn.sparkline.canvas===c){var j=a.createElement("canvas");if(!j.getContext||!j.getContext("2d")){if(!a.namespaces||!!a.namespaces.v)return d.fn.sparkline.canvas=!1,!1;a.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),d.fn.sparkline.canvas=function(a,b,c,d){return new J(a,b,c)}}else d.fn.sparkline.canvas=function(a,b,c,d){return new I(a,b,c,d)}}return b===c&&(b=d(this).innerWidth()),e===c&&(e=d(this).innerHeight()),h=d.fn.sparkline.canvas(b,e,this,g),i=d(this).data("_jqs_mhandler"),i&&i.registerCanvas(h),h},d.fn.cleardraw=function(){var a=this.data("_jqs_vcanvas");a&&a.reset()},d.RangeMapClass=t=g({init:function(a){var b,c,d=[];for(b in a)a.hasOwnProperty(b)&&typeof b=="string"&&b.indexOf(":")>-1&&(c=b.split(":"),c[0]=c[0].length===0?-Infinity:parseFloat(c[0]),c[1]=c[1].length===0?Infinity:parseFloat(c[1]),c[2]=a[b],d.push(c));this.map=a,this.rangelist=d||!1},get:function(a){var b=this.rangelist,d,e,f;if((f=this.map[a])!==c)return f;if(b)for(d=b.length;d--;){e=b[d];if(e[0]<=a&&e[1]>=a)return e[2]}return c}}),d.range_map=function(a){return new t(a)},u=g({init:function(a,b){var c=d(a);this.$el=c,this.options=b,this.currentPageX=0,this.currentPageY=0,this.el=a,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!b.get("disableTooltips"),this.highlightEnabled=!b.get("disableHighlight")},registerSparkline:function(a){this.splist.push(a),this.over&&this.updateDisplay()},registerCanvas:function(a){var b=d(a.canvas);this.canvas=a,this.$canvas=b,b.mouseenter(d.proxy(this.mouseenter,this)),b.mouseleave(d.proxy(this.mouseleave,this)),b.click(d.proxy(this.mouseclick,this))},reset:function(a){this.splist=[],this.tooltip&&a&&(this.tooltip.remove(),this.tooltip=c)},mouseclick:function(a){var b=d.Event("sparklineClick");b.originalEvent=a,b.sparklines=this.splist,this.$el.trigger(b)},mouseenter:function(b){d(a.body).unbind("mousemove.jqs"),d(a.body).bind("mousemove.jqs",d.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=b.pageX,this.currentPageY=b.pageY,this.currentEl=b.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new v(this.options),this.tooltip.updatePosition(b.pageX,b.pageY)),this.updateDisplay()},mouseleave:function(){d(a.body).unbind("mousemove.jqs");var b=this.splist,c=b.length,e=!1,f,g;this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null);for(g=0;g<c;g++)f=b[g],f.clearRegionHighlight()&&(e=!0);e&&this.canvas.render()},mousemove:function(a){this.currentPageX=a.pageX,this.currentPageY=a.pageY,this.currentEl=a.target,this.tooltip&&this.tooltip.updatePosition(a.pageX,a.pageY),this.updateDisplay()},updateDisplay:function(){var a=this.splist,b=a.length,c=!1,e=this.$canvas.offset(),f=this.currentPageX-e.left,g=this.currentPageY-e.top,h,i,j,k,l;if(!this.over)return;for(j=0;j<b;j++)i=a[j],k=i.setRegionHighlight(this.currentEl,f,g),k&&(c=!0);if(c){l=d.Event("sparklineRegionChange"),l.sparklines=this.splist,this.$el.trigger(l);if(this.tooltip){h="";for(j=0;j<b;j++)i=a[j],h+=i.getCurrentRegionTooltip();this.tooltip.setContent(h)}this.disableHighlight||this.canvas.render()}k===null&&this.mouseleave()}}),v=g({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(b){var c=b.get("tooltipClassname","jqstooltip"),e=this.sizeStyle,f;this.container=b.get("tooltipContainer")||a.body,this.tooltipOffsetX=b.get("tooltipOffsetX",10),this.tooltipOffsetY=b.get("tooltipOffsetY",12),d("#jqssizetip").remove(),d("#jqstooltip").remove(),this.sizetip=d("<div/>",{id:"jqssizetip",style:e,"class":c}),this.tooltip=d("<div/>",{id:"jqstooltip","class":c}).appendTo(this.container),f=this.tooltip.offset(),this.offsetLeft=f.left,this.offsetTop=f.top,this.hidden=!0,d(window).unbind("resize.jqs scroll.jqs"),d(window).bind("resize.jqs scroll.jqs",d.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=d(window).scrollTop(),this.scrollLeft=d(window).scrollLeft(),this.scrollRight=this.scrollLeft+d(window).width(),this.updatePosition()},getSize:function(a){this.sizetip.html(a).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(a){if(!a){this.tooltip.css("visibility","hidden"),this.hidden=!0;return}this.getSize(a),this.tooltip.html(a).css({width:this.width,height:this.height,visibility:"visible"}),this.hidden&&(this.hidden=!1,this.updatePosition())},updatePosition:function(a,b){if(a===c){if(this.mousex===c)return;a=this.mousex-this.offsetLeft,b=this.mousey-this.offsetTop}else this.mousex=a-=this.offsetLeft,this.mousey=b-=this.offsetTop;if(!this.height||!this.width||this.hidden)return;b-=this.height+this.tooltipOffsetY,a+=this.tooltipOffsetX,b<this.scrollTop&&(b=this.scrollTop),a<this.scrollLeft?a=this.scrollLeft:a+this.width>this.scrollRight&&(a=this.scrollRight-this.width),this.tooltip.css({left:a,top:b})},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=c,d(window).unbind("resize.jqs scroll.jqs")}}),F=function(){q(E)},d(F),K=[],d.fn.sparkline=function(b,e){return this.each(function(){var f=new d.fn.sparkline.options(this,e),g=d(this),h,i;h=function(){var e,h,i,j,k,l,m;if(b==="html"||b===c){m=this.getAttribute(f.get("tagValuesAttribute"));if(m===c||m===null)m=g.html();e=m.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,"").split(",")}else e=b;h=f.get("width")==="auto"?e.length*f.get("defaultPixelsPerValue"):f.get("width");if(f.get("height")==="auto"){if(!f.get("composite")||!d.data(this,"_jqs_vcanvas"))j=a.createElement("span"),j.innerHTML="a",g.html(j),i=d(j).innerHeight()||d(j).height(),d(j).remove(),j=null}else i=f.get("height");f.get("disableInteraction")?k=!1:(k=d.data(this,"_jqs_mhandler"),k?f.get("composite")||k.reset():(k=new u(this,f),d.data(this,"_jqs_mhandler",k)));if(f.get("composite")&&!d.data(this,"_jqs_vcanvas")){d.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),d.data(this,"_jqs_errnotify",!0));return}l=new(d.fn.sparkline[f.get("type")])(this,e,f,h,i),l.render(),k&&k.registerSparkline(l)};if(d(this).html()&&!f.get("disableHiddenCheck")&&d(this).is(":hidden")||!d(this).parents("body").length){if(!f.get("composite")&&d.data(this,"_jqs_pending"))for(i=K.length;i;i--)K[i-1][0]==this&&K.splice(i-1,1);K.push([this,h]),d.data(this,"_jqs_pending",!0)}else h.call(this)})},d.fn.sparkline.defaults=f(),d.sparkline_display_visible=function(){var a,b,c,e=[];for(b=0,c=K.length;b<c;b++)a=K[b][0],d(a).is(":visible")&&!d(a).parents().is(":hidden")?(K[b][1].call(a),d.data(K[b][0],"_jqs_pending",!1),e.push(b)):!d(a).closest("html").length&&!d.data(a,"_jqs_pending")&&(d.data(K[b][0],"_jqs_pending",!1),e.push(b));for(b=e.length;b;b--)K.splice(e[b-1],1)},d.fn.sparkline.options=g({init:function(a,b){var c,f,g,h;this.userOptions=b=b||{},this.tag=a,this.tagValCache={},f=d.fn.sparkline.defaults,g=f.common,this.tagOptionsPrefix=b.enableTagOptions&&(b.tagOptionsPrefix||g.tagOptionsPrefix),h=this.getTagSetting("type"),h===e?c=f[b.type||g.type]:c=f[h],this.mergedOptions=d.extend({},g,c,b)},getTagSetting:function(a){var b=this.tagOptionsPrefix,d,f,g,h;if(b===!1||b===c)return e;if(this.tagValCache.hasOwnProperty(a))d=this.tagValCache.key;else{d=this.tag.getAttribute(b+a);if(d===c||d===null)d=e;else if(d.substr(0,1)==="["){d=d.substr(1,d.length-2).split(",");for(f=d.length;f--;)d[f]=k(d[f].replace(/(^\s*)|(\s*$)/g,""))}else if(d.substr(0,1)==="{"){g=d.substr(1,d.length-2).split(","),d={};for(f=g.length;f--;)h=g[f].split(":",2),d[h[0].replace(/(^\s*)|(\s*$)/g,"")]=k(h[1].replace(/(^\s*)|(\s*$)/g,""))}else d=k(d);this.tagValCache.key=d}return d},get:function(a,b){var d=this.getTagSetting(a),f;return d!==e?d:(f=this.mergedOptions[a])===c?b:f}}),d.fn.sparkline._base=g({disabled:!1,init:function(a,b,e,f,g){this.el=a,this.$el=d(a),this.values=b,this.options=e,this.width=f,this.height=g,this.currentRegion=c},initTarget:function(){var a=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),a))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(a,b){},setRegionHighlight:function(a,b,d){var e=this.currentRegion,f=!this.options.get("disableHighlight"),g;return b>this.canvasWidth||d>this.canvasHeight||b<0||d<0?null:(g=this.getRegion(a,b,d),e!==g?(e!==c&&f&&this.removeHighlight(),this.currentRegion=g,g!==c&&f&&this.renderHighlight(),!0):!1)},clearRegionHighlight:function(){return this.currentRegion!==c?(this.removeHighlight(),this.currentRegion=c,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(a){},getCurrentRegionTooltip:function(){var a=this.options,b="",e=[],f,g,i,j,k,l,m,n,o,p,q,r,s,t;if(this.currentRegion===c)return"";f=this.getCurrentRegionFields(),q=a.get("tooltipFormatter");if(q)return q(this,a,f);a.get("tooltipChartTitle")&&(b+='<div class="jqs jqstitle">'+a.get("tooltipChartTitle")+"</div>\n"),g=this.options.get("tooltipFormat");if(!g)return"";d.isArray(g)||(g=[g]),d.isArray(f)||(f=[f]),m=this.options.get("tooltipFormatFieldlist"),n=this.options.get("tooltipFormatFieldlistKey");if(m&&n){o=[];for(l=f.length;l--;)p=f[l][n],(t=d.inArray(p,m))!=-1&&(o[t]=f[l]);f=o}i=g.length,s=f.length;for(l=0;l<i;l++){r=g[l],typeof r=="string"&&(r=new h(r)),j=r.fclass||"jqsfield";for(t=0;t<s;t++)if(!f[t].isNull||!a.get("tooltipSkipNull"))d.extend(f[t],{prefix:a.get("tooltipPrefix"),suffix:a.get("tooltipSuffix")}),k=r.render(f[t],a.get("tooltipValueLookups"),a),e.push('<div class="'+j+'">'+k+"</div>")}return e.length?b+e.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(a,c){var d=c.get("highlightColor"),e=c.get("highlightLighten"),f,g,h,j;if(d)return d;if(e){f=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(a);if(f){h=[],g=a.length===4?16:1;for(j=0;j<3;j++)h[j]=i(b.round(parseInt(f[j+1],16)*g*e),0,255);return"rgb("+h.join(",")+")"}}return a}}),w={changeHighlight:function(a){var b=this.currentRegion,c=this.target,e=this.regionShapes[b],f;e&&(f=this.renderRegion(b,a),d.isArray(f)||d.isArray(e)?(c.replaceWithShapes(e,f),this.regionShapes[b]=d.map(f,function(a){return a.id})):(c.replaceWithShape(e,f),this.regionShapes[b]=f.id))},render:function(){var a=this.values,b=this.target,c=this.regionShapes,e,f,g,h;if(!this.cls._super.render.call(this))return;for(g=a.length;g--;){e=this.renderRegion(g);if(e)if(d.isArray(e)){f=[];for(h=e.length;h--;)e[h].append(),f.push(e[h].id);c[g]=f}else e.append(),c[g]=e.id;else c[g]=null}b.render()}},d.fn.sparkline.line=x=g(d.fn.sparkline._base,{type:"line",init:function(a,b,c,d,e){x._super.init.call(this,a,b,c,d,e),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(a,b,d){var e,f=this.regionMap;for(e=f.length;e--;)if(f[e]!==null&&b>=f[e][0]&&b<=f[e][1])return f[e][2];return c},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.yvalues[a]===null,x:this.xvalues[a],y:this.yvalues[a],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:a}},renderHighlight:function(){var a=this.currentRegion,b=this.target,d=this.vertices[a],e=this.options,f=e.get("spotRadius"),g=e.get("highlightSpotColor"),h=e.get("highlightLineColor"),i,j;if(!d)return;f&&g&&(i=b.drawCircle(d[0],d[1],f,c,g),this.highlightSpotId=i.id,b.insertAfterShape(this.lastShapeId,i)),h&&(j=b.drawLine(d[0],this.canvasTop,d[0],this.canvasTop+this.canvasHeight,h),this.highlightLineId=j.id,b.insertAfterShape(this.lastShapeId,j))},removeHighlight:function(){var a=this.target;this.highlightSpotId&&(a.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(a.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var a=this.values,c=a.length,d=this.xvalues,e=this.yvalues,f=this.yminmax,g,h,i,j,k;for(g=0;g<c;g++)h=a[g],i=typeof a[g]=="string",j=typeof a[g]=="object"&&a[g]instanceof Array,k=i&&a[g].split(":"),i&&k.length===2?(d.push(Number(k[0])),e.push(Number(k[1])),f.push(Number(k[1]))):j?(d.push(h[0]),e.push(h[1]),f.push(h[1])):(d.push(g),a[g]===null||a[g]==="null"?e.push(null):(e.push(Number(h)),f.push(Number(h))));this.options.get("xvalues")&&(d=this.options.get("xvalues")),this.maxy=this.maxyorg=b.max.apply(b,f),this.miny=this.minyorg=b.min.apply(b,f),this.maxx=b.max.apply(b,d),this.minx=b.min.apply(b,d),this.xvalues=d,this.yvalues=e,this.yminmax=f},processRangeOptions:function(){var a=this.options,b=a.get("normalRangeMin"),d=a.get("normalRangeMax");b!==c&&(b<this.miny&&(this.miny=b),d>this.maxy&&(this.maxy=d)),a.get("chartRangeMin")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMin")<this.miny)&&(this.miny=a.get("chartRangeMin")),a.get("chartRangeMax")!==c&&(a.get("chartRangeClip")||a.get("chartRangeMax")>this.maxy)&&(this.maxy=a.get("chartRangeMax")),a.get("chartRangeMinX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMinX")<this.minx)&&(this.minx=a.get("chartRangeMinX")),a.get("chartRangeMaxX")!==c&&(a.get("chartRangeClipX")||a.get("chartRangeMaxX")>this.maxx)&&(this.maxx=a.get("chartRangeMaxX"))},drawNormalRange:function(a,d,e,f,g){var h=this.options.get("normalRangeMin"),i=this.options.get("normalRangeMax"),j=d+b.round(e-e*((i-this.miny)/g)),k=b.round(e*(i-h)/g);this.target.drawRect(a,j,f,k,c,this.options.get("normalRangeColor")).append()},render:function(){var a=this.options,e=this.target,f=this.canvasWidth,g=this.canvasHeight,h=this.vertices,i=a.get("spotRadius"),j=this.regionMap,k,l,m,n,o,p,q,r,s,u,v,w,y,z,A,B,C,D,E,F,G,H,I,J,K;if(!x._super.render.call(this))return;this.scanValues(),this.processRangeOptions(),I=this.xvalues,J=this.yvalues;if(!this.yminmax.length||this.yvalues.length<2)return;n=o=0,k=this.maxx-this.minx===0?1:this.maxx-this.minx,l=this.maxy-this.miny===0?1:this.maxy-this.miny,m=this.yvalues.length-1,i&&(f<i*4||g<i*4)&&(i=0);if(i){G=a.get("highlightSpotColor")&&!a.get("disableInteraction");if(G||a.get("minSpotColor")||a.get("spotColor")&&J[m]===this.miny)g-=b.ceil(i);if(G||a.get("maxSpotColor")||a.get("spotColor")&&J[m]===this.maxy)g-=b.ceil(i),n+=b.ceil(i);if(G||(a.get("minSpotColor")||a.get("maxSpotColor"))&&(J[0]===this.miny||J[0]===this.maxy))o+=b.ceil(i),f-=b.ceil(i);if(G||a.get("spotColor")||a.get("minSpotColor")||a.get("maxSpotColor")&&(J[m]===this.miny||J[m]===this.maxy))f-=b.ceil(i)}g--,a.get("normalRangeMin")!==c&&!a.get("drawNormalOnTop")&&this.drawNormalRange(o,n,g,f,l),q=[],r=[q],z=A=null,B=J.length;for(K=0;K<B;K++)s=I[K],v=I[K+1],u=J[K],w=o+b.round((s-this.minx)*(f/k)),y=K<B-1?o+b.round((v-this.minx)*(f/k)):f,A=w+(y-w)/2,j[K]=[z||0,A,K],z=A,u===null?K&&(J[K-1]!==null&&(q=[],r.push(q)),h.push(null)):(u<this.miny&&(u=this.miny),u>this.maxy&&(u=this.maxy),q.length||q.push([w,n+g]),p=[w,n+b.round(g-g*((u-this.miny)/l))],q.push(p),h.push(p));C=[],D=[],E=r.length;for(K=0;K<E;K++)q=r[K],q.length&&(a.get("fillColor")&&(q.push([q[q.length-1][0],n+g]),D.push(q.slice(0)),q.pop()),q.length>2&&(q[0]=[q[0][0],q[1][1]]),C.push(q));E=D.length;for(K=0;K<E;K++)e.drawShape(D[K],a.get("fillColor"),a.get("fillColor")).append();a.get("normalRangeMin")!==c&&a.get("drawNormalOnTop")&&this.drawNormalRange(o,n,g,f,l),E=C.length;for(K=0;K<E;K++)e.drawShape(C[K],a.get("lineColor"),c,a.get("lineWidth")).append();if(i&&a.get("valueSpots")){F=a.get("valueSpots"),F.get===c&&(F=new t(F));for(K=0;K<B;K++)H=F.get(J[K]),H&&e.drawCircle(o+b.round((I[K]-this.minx)*(f/k)),n+b.round(g-g*((J[K]-this.miny)/l)),i,c,H).append()}i&&a.get("spotColor")&&J[m]!==null&&e.drawCircle(o+b.round((I[I.length-1]-this.minx)*(f/k)),n+b.round(g-g*((J[m]-this.miny)/l)),i,c,a.get("spotColor")).append(),this.maxy!==this.minyorg&&(i&&a.get("minSpotColor")&&(s=I[d.inArray(this.minyorg,J)],e.drawCircle(o+b.round((s-this.minx)*(f/k)),n+b.round(g-g*((this.minyorg-this.miny)/l)),i,c,a.get("minSpotColor")).append()),i&&a.get("maxSpotColor")&&(s=I[d.inArray(this.maxyorg,J)],e.drawCircle(o+b.round((s-this.minx)*(f/k)),n+b.round(g-g*((this.maxyorg-this.miny)/l)),i,c,a.get("maxSpotColor")).append())),this.lastShapeId=e.getLastShapeId(),this.canvasTop=n,e.render()}}),d.fn.sparkline.bar=y=g(d.fn.sparkline._base,w,{type:"bar",init:function(a,e,f,g,h){var j=parseInt(f.get("barWidth"),10),n=parseInt(f.get("barSpacing"),10),o=f.get("chartRangeMin"),p=f.get("chartRangeMax"),q=f.get("chartRangeClip"),r=Infinity,s=-Infinity,u,v,w,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R;y._super.init.call(this,a,e,f,g,h);for(A=0,B=e.length;A<B;A++){O=e[A],u=typeof O=="string"&&O.indexOf(":")>-1;if(u||d.isArray(O))J=!0,u&&(O=e[A]=l(O.split(":"))),O=m(O,null),v=b.min.apply(b,O),w=b.max.apply(b,O),v<r&&(r=v),w>s&&(s=w)}this.stacked=J,this.regionShapes={},this.barWidth=j,this.barSpacing=n,this.totalBarWidth=j+n,this.width=g=e.length*j+(e.length-1)*n,this.initTarget(),q&&(H=o===c?-Infinity:o,I=p===c?Infinity:p),z=[],x=J?[]:z;var S=[],T=[];for(A=0,B=e.length;A<B;A++)if(J){K=e[A],e[A]=N=[],S[A]=0,x[A]=T[A]=0;for(L=0,M=K.length;L<M;L++)O=N[L]=q?i(K[L],H,I):K[L],O!==null&&(O>0&&(S[A]+=O),r<0&&s>0?O<0?T[A]+=b.abs(O):x[A]+=O:x[A]+=b.abs(O-(O<0?s:r)),z.push(O))}else O=q?i(e[A],H,I):e[A],O=e[A]=k(O),O!==null&&z.push(O);this.max=G=b.max.apply(b,z),this.min=F=b.min.apply(b,z),this.stackMax=s=J?b.max.apply(b,S):G,this.stackMin=r=J?b.min.apply(b,z):F,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<F)&&(F=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>G)&&(G=f.get("chartRangeMax")),this.zeroAxis=D=f.get("zeroAxis",!0),F<=0&&G>=0&&D?E=0:D==0?E=F:F>0?E=F:E=G,this.xaxisOffset=E,C=J?b.max.apply(b,x)+b.max.apply(b,T):G-F,this.canvasHeightEf=D&&F<0?this.canvasHeight-2:this.canvasHeight-1,F<E?(Q=J&&G>=0?s:G,P=(Q-E)/C*this.canvasHeight,P!==b.ceil(P)&&(this.canvasHeightEf-=2,P=b.ceil(P))):P=this.canvasHeight,this.yoffset=P,d.isArray(f.get("colorMap"))?(this.colorMapByIndex=f.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=f.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new t(this.colorMapByValue))),this.range=C},getRegion:function(a,d,e){var f=b.floor(d/this.totalBarWidth);return f<0||f>=this.values.length?c:f},getCurrentRegionFields:function(){var a=this.currentRegion,b=r(this.values[a]),c=[],d,e;for(e=b.length;e--;)d=b[e],c.push({isNull:d===null,value:d,color:this.calcColor(e,d,a),offset:a});return c},calcColor:function(a,b,e){var f=this.colorMapByIndex,g=this.colorMapByValue,h=this.options,i,j;return this.stacked?i=h.get("stackedBarColor"):i=b<0?h.get("negBarColor"):h.get("barColor"),b===0&&h.get("zeroColor")!==c&&(i=h.get("zeroColor")),g&&(j=g.get(b))?i=j:f&&f.length>e&&(i=f[e]),d.isArray(i)?i[a%i.length]:i},renderRegion:function(a,e){var f=this.values[a],g=this.options,h=this.xaxisOffset,i=[],j=this.range,k=this.stacked,l=this.target,m=a*this.totalBarWidth,n=this.canvasHeightEf,p=this.yoffset,q,r,s,t,u,v,w,x,y,z;f=d.isArray(f)?f:[f],w=f.length,x=f[0],t=o(null,f),z=o(h,f,!0);if(t)return g.get("nullColor")?(s=e?g.get("nullColor"):this.calcHighlightColor(g.get("nullColor"),g),q=p>0?p-1:p,l.drawRect(m,q,this.barWidth-1,0,s,s)):c;u=p;for(v=0;v<w;v++){x=f[v];if(k&&x===h){if(!z||y)continue;y=!0}j>0?r=b.floor(n*(b.abs(x-h)/j))+1:r=1,x<h||x===h&&p===0?(q=u,u+=r):(q=p-r,p-=r),s=this.calcColor(v,x,a),e&&(s=this.calcHighlightColor(s,g)),i.push(l.drawRect(m,q,this.barWidth-1,r-1,s,s))}return i.length===1?i[0]:i}}),d.fn.sparkline.tristate=z=g(d.fn.sparkline._base,w,{type:"tristate",init:function(a,b,e,f,g){var h=parseInt(e.get("barWidth"),10),i=parseInt(e.get("barSpacing"),10);z._super.init.call(this,a,b,e,f,g),this.regionShapes={},this.barWidth=h,this.barSpacing=i,this.totalBarWidth=h+i,this.values=d.map(b,Number),this.width=f=b.length*h+(b.length-1)*i,d.isArray(e.get("colorMap"))?(this.colorMapByIndex=e.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=e.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===c&&(this.colorMapByValue=new t(this.colorMapByValue))),this.initTarget()},getRegion:function(a,c,d){return b.floor(c/this.totalBarWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===c,value:this.values[a],color:this.calcColor(this.values[a],a),offset:a}},calcColor:function(a,b){var c=this.values,d=this.options,e=this.colorMapByIndex,f=this.colorMapByValue,g,h;return f&&(h=f.get(a))?g=h:e&&e.length>b?g=e[b]:c[b]<0?g=d.get("negBarColor"):c[b]>0?g=d.get("posBarColor"):g=d.get("zeroBarColor"),g},renderRegion:function(a,c){var d=this.values,e=this.options,f=this.target,g,h,i,j,k,l;g=f.pixelHeight,i=b.round(g/2),j=a*this.totalBarWidth,d[a]<0?(k=i,h=i-1):d[a]>0?(k=0,h=i-1):(k=i-1,h=2),l=this.calcColor(d[a],a);if(l===null)return;return c&&(l=this.calcHighlightColor(l,e)),f.drawRect(j,k,this.barWidth-1,h-1,l,l)}}),d.fn.sparkline.discrete=A=g(d.fn.sparkline._base,w,{type:"discrete",init:function(a,e,f,g,h){A._super.init.call(this,a,e,f,g,h),this.regionShapes={},this.values=e=d.map(e,Number),this.min=b.min.apply(b,e),this.max=b.max.apply(b,e),this.range=this.max-this.min,this.width=g=f.get("width")==="auto"?e.length*2:this.width,this.interval=b.floor(g/e.length),this.itemWidth=g/e.length,f.get("chartRangeMin")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMin")<this.min)&&(this.min=f.get("chartRangeMin")),f.get("chartRangeMax")!==c&&(f.get("chartRangeClip")||f.get("chartRangeMax")>this.max)&&(this.max=f.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight=f.get("lineHeight")==="auto"?b.round(this.canvasHeight*.3):f.get("lineHeight"))},getRegion:function(a,c,d){return b.floor(c/this.itemWidth)},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===c,value:this.values[a],offset:a}},renderRegion:function(a,c){var d=this.values,e=this.options,f=this.min,g=this.max,h=this.range,j=this.interval,k=this.target,l=this.canvasHeight,m=this.lineHeight,n=l-m,o,p,q,r;return p=i(d[a],f,g),r=a*j,o=b.round(n-n*((p-f)/h)),q=e.get("thresholdColor")&&p<e.get("thresholdValue")?e.get("thresholdColor"):e.get("lineColor"),c&&(q=this.calcHighlightColor(q,e)),k.drawLine(r,o,r,o+m,q)}}),d.fn.sparkline.bullet=B=g(d.fn.sparkline._base,{type:"bullet",init:function(a,d,e,f,g){var h,i,j;B._super.init.call(this,a,d,e,f,g),this.values=d=l(d),j=d.slice(),j[0]=j[0]===null?j[2]:j[0],j[1]=d[1]===null?j[2]:j[1],h=b.min.apply(b,d),i=b.max.apply(b,d),e.get("base")===c?h=h<0?h:0:h=e.get("base"),this.min=h,this.max=i,this.range=i-h,this.shapes={},this.valueShapes={},this.regiondata={},this.width=f=e.get("width")==="auto"?"4.0em":f,this.target=this.$el.simpledraw(f,g,e.get("composite")),d.length||(this.disabled=!0),this.initTarget()},getRegion:function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},getCurrentRegionFields:function(){var a=this.currentRegion;return{fieldkey:a.substr(0,1),value:this.values[a.substr(1)],region:a}},changeHighlight:function(a){var b=this.currentRegion,c=this.valueShapes[b],d;delete this.shapes[c];switch(b.substr(0,1)){case"r":d=this.renderRange(b.substr(1),a);break;case"p":d=this.renderPerformance(a);break;case"t":d=this.renderTarget(a)}this.valueShapes[b]=d.id,this.shapes[d.id]=b,this.target.replaceWithShape(c,d)},renderRange:function(a,c){var d=this.values[a],e=b.round(this.canvasWidth*((d-this.min)/this.range)),f=this.options.get("rangeColors")[a-2];return c&&(f=this.calcHighlightColor(f,this.options)),this.target.drawRect(0,0,e-1,this.canvasHeight-1,f,f)},renderPerformance:function(a){var c=this.values[1],d=b.round(this.canvasWidth*((c-this.min)/this.range)),e=this.options.get("performanceColor");return a&&(e=this.calcHighlightColor(e,this.options)),this.target.drawRect(0,b.round(this.canvasHeight*.3),d-1,b.round(this.canvasHeight*.4)-1,e,e)},renderTarget:function(a){var c=this.values[0],d=b.round(this.canvasWidth*((c-this.min)/this.range)-this.options.get("targetWidth")/2),e=b.round(this.canvasHeight*.1),f=this.canvasHeight-e*2,g=this.options.get("targetColor");return a&&(g=this.calcHighlightColor(g,this.options)),this.target.drawRect(d,e,this.options.get("targetWidth")-1,f-1,g,g)},render:function(){var a=this.values.length,b=this.target,c,d;if(!B._super.render.call(this))return;for(c=2;c<a;c++)d=this.renderRange(c).append(),this.shapes[d.id]="r"+c,this.valueShapes["r"+c]=d.id;this.values[1]!==null&&(d=this.renderPerformance().append(),this.shapes[d.id]="p1",this.valueShapes.p1=d.id),this.values[0]!==null&&(d=this.renderTarget().append(),this.shapes[d.id]="t0",this.valueShapes.t0=d.id),b.render()}}),d.fn.sparkline.pie=C=g(d.fn.sparkline._base,{type:"pie",init:function(a,c,e,f,g){var h=0,i;C._super.init.call(this,a,c,e,f,g),this.shapes={},this.valueShapes={},this.values=c=d.map(c,Number),e.get("width")==="auto"&&(this.width=this.height);if(c.length>0)for(i=c.length;i--;)h+=c[i];this.total=h,this.initTarget(),this.radius=b.floor(b.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(a,b,d){var e=this.target.getShapeAt(a,b,d);return e!==c&&this.shapes[e]!==c?this.shapes[e]:c},getCurrentRegionFields:function(){var a=this.currentRegion;return{isNull:this.values[a]===c,value:this.values[a],percent:this.values[a]/this.total*100,color:this.options.get("sliceColors")[a%this.options.get("sliceColors").length],offset:a}},changeHighlight:function(a){var b=this.currentRegion,c=this.renderSlice(b,a),d=this.valueShapes[b];delete this.shapes[d],this.target.replaceWithShape(d,c),this.valueShapes[b]=c.id,this.shapes[c.id]=b},renderSlice:function(a,d){var e=this.target,f=this.options,g=this.radius,h=f.get("borderWidth"),i=f.get("offset"),j=2*b.PI,k=this.values,l=this.total,m=i?2*b.PI*(i/360):0,n,o,p,q,r;q=k.length;for(p=0;p<q;p++){n=m,o=m,l>0&&(o=m+j*(k[p]/l));if(a===p)return r=f.get("sliceColors")[p%f.get("sliceColors").length],d&&(r=this.calcHighlightColor(r,f)),e.drawPieSlice(g,g,g-h,n,o,c,r);m=o}},render:function(){var a=this.target,d=this.values,e=this.options,f=this.radius,g=e.get("borderWidth"),h,i;if(!C._super.render.call(this))return;g&&a.drawCircle(f,f,b.floor(f-g/2),e.get("borderColor"),c,g).append();for(i=d.length;i--;)d[i]&&(h=this.renderSlice(i).append(),this.valueShapes[i]=h.id,this.shapes[h.id]=i);a.render()}}),d.fn.sparkline.box=D=g(d.fn.sparkline._base,{type:"box",init:function(a,b,c,e,f){D._super.init.call(this,a,b,c,e,f),this.values=d.map(b,Number),this.width=c.get("width")==="auto"?"4.0em":e,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var a=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles
5
+ [1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==c&&a.push({field:"lo",value:this.loutlier}),this.routlier!==c&&a.push({field:"ro",value:this.routlier}),this.lwhisker!==c&&a.push({field:"lw",value:this.lwhisker}),this.rwhisker!==c&&a.push({field:"rw",value:this.rwhisker}),a},render:function(){var a=this.target,d=this.values,e=d.length,f=this.options,g=this.canvasWidth,h=this.canvasHeight,i=f.get("chartRangeMin")===c?b.min.apply(b,d):f.get("chartRangeMin"),k=f.get("chartRangeMax")===c?b.max.apply(b,d):f.get("chartRangeMax"),l=0,m,n,o,p,q,r,s,t,u,v,w;if(!D._super.render.call(this))return;if(f.get("raw"))f.get("showOutliers")&&d.length>5?(n=d[0],m=d[1],p=d[2],q=d[3],r=d[4],s=d[5],t=d[6]):(m=d[0],p=d[1],q=d[2],r=d[3],s=d[4]);else{d.sort(function(a,b){return a-b}),p=j(d,1),q=j(d,2),r=j(d,3),o=r-p;if(f.get("showOutliers")){m=s=c;for(u=0;u<e;u++)m===c&&d[u]>p-o*f.get("outlierIQR")&&(m=d[u]),d[u]<r+o*f.get("outlierIQR")&&(s=d[u]);n=d[0],t=d[e-1]}else m=d[0],s=d[e-1]}this.quartiles=[p,q,r],this.lwhisker=m,this.rwhisker=s,this.loutlier=n,this.routlier=t,w=g/(k-i+1),f.get("showOutliers")&&(l=b.ceil(f.get("spotRadius")),g-=2*b.ceil(f.get("spotRadius")),w=g/(k-i+1),n<m&&a.drawCircle((n-i)*w+l,h/2,f.get("spotRadius"),f.get("outlierLineColor"),f.get("outlierFillColor")).append(),t>s&&a.drawCircle((t-i)*w+l,h/2,f.get("spotRadius"),f.get("outlierLineColor"),f.get("outlierFillColor")).append()),a.drawRect(b.round((p-i)*w+l),b.round(h*.1),b.round((r-p)*w),b.round(h*.8),f.get("boxLineColor"),f.get("boxFillColor")).append(),a.drawLine(b.round((m-i)*w+l),b.round(h/2),b.round((p-i)*w+l),b.round(h/2),f.get("lineColor")).append(),a.drawLine(b.round((m-i)*w+l),b.round(h/4),b.round((m-i)*w+l),b.round(h-h/4),f.get("whiskerColor")).append(),a.drawLine(b.round((s-i)*w+l),b.round(h/2),b.round((r-i)*w+l),b.round(h/2),f.get("lineColor")).append(),a.drawLine(b.round((s-i)*w+l),b.round(h/4),b.round((s-i)*w+l),b.round(h-h/4),f.get("whiskerColor")).append(),a.drawLine(b.round((q-i)*w+l),b.round(h*.1),b.round((q-i)*w+l),b.round(h*.9),f.get("medianColor")).append(),f.get("target")&&(v=b.ceil(f.get("spotRadius")),a.drawLine(b.round((f.get("target")-i)*w+l),b.round(h/2-v),b.round((f.get("target")-i)*w+l),b.round(h/2+v),f.get("targetColor")).append(),a.drawLine(b.round((f.get("target")-i)*w+l-v),b.round(h/2),b.round((f.get("target")-i)*w+l+v),b.round(h/2),f.get("targetColor")).append()),a.render()}}),G=g({init:function(a,b,c,d){this.target=a,this.id=b,this.type=c,this.args=d},append:function(){return this.target.appendShape(this),this}}),H=g({_pxregex:/(\d+)(px)?\s*$/i,init:function(a,b,c){if(!a)return;this.width=a,this.height=b,this.target=c,this.lastShapeId=null,c[0]&&(c=c[0]),d.data(c,"_jqs_vcanvas",this)},drawLine:function(a,b,c,d,e,f){return this.drawShape([[a,b],[c,d]],e,f)},drawShape:function(a,b,c,d){return this._genShape("Shape",[a,b,c,d])},drawCircle:function(a,b,c,d,e,f){return this._genShape("Circle",[a,b,c,d,e,f])},drawPieSlice:function(a,b,c,d,e,f,g){return this._genShape("PieSlice",[a,b,c,d,e,f,g])},drawRect:function(a,b,c,d,e,f){return this._genShape("Rect",[a,b,c,d,e,f])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(a,b){d(b).html(a)},_calculatePixelDims:function(a,b,c){var e;e=this._pxregex.exec(b),e?this.pixelHeight=e[1]:this.pixelHeight=d(c).height(),e=this._pxregex.exec(a),e?this.pixelWidth=e[1]:this.pixelWidth=d(c).width()},_genShape:function(a,b){var c=L++;return b.unshift(c),new G(this,c,a,b)},appendShape:function(a){alert("appendShape not implemented")},replaceWithShape:function(a,b){alert("replaceWithShape not implemented")},insertAfterShape:function(a,b){alert("insertAfterShape not implemented")},removeShapeId:function(a){alert("removeShapeId not implemented")},getShapeAt:function(a,b,c){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),I=g(H,{init:function(b,e,f,g){I._super.init.call(this,b,e,f),this.canvas=a.createElement("canvas"),f[0]&&(f=f[0]),d.data(f,"_jqs_vcanvas",this),d(this.canvas).css({display:"inline-block",width:b,height:e,verticalAlign:"top"}),this._insert(this.canvas,f),this._calculatePixelDims(b,e,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=g,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c,d(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(a,b,d){var e=this.canvas.getContext("2d");return a!==c&&(e.strokeStyle=a),e.lineWidth=d===c?1:d,b!==c&&(e.fillStyle=b),e},reset:function(){var a=this._getContext();a.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=c},_drawShape:function(a,b,d,e,f){var g=this._getContext(d,e,f),h,i;g.beginPath(),g.moveTo(b[0][0]+.5,b[0][1]+.5);for(h=1,i=b.length;h<i;h++)g.lineTo(b[h][0]+.5,b[h][1]+.5);d!==c&&g.stroke(),e!==c&&g.fill(),this.targetX!==c&&this.targetY!==c&&g.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawCircle:function(a,d,e,f,g,h,i){var j=this._getContext(g,h,i);j.beginPath(),j.arc(d,e,f,0,2*b.PI,!1),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a),g!==c&&j.stroke(),h!==c&&j.fill()},_drawPieSlice:function(a,b,d,e,f,g,h,i){var j=this._getContext(h,i);j.beginPath(),j.moveTo(b,d),j.arc(b,d,e,f,g,!1),j.lineTo(b,d),j.closePath(),h!==c&&j.stroke(),i&&j.fill(),this.targetX!==c&&this.targetY!==c&&j.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=a)},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b+d,c],[b+d,c+e],[b,c+e],[b,c]],f,g)},appendShape:function(a){return this.shapes[a.id]=a,this.shapeseq.push(a.id),this.lastShapeId=a.id,a.id},replaceWithShape:function(a,b){var c=this.shapeseq,d;this.shapes[b.id]=b;for(d=c.length;d--;)c[d]==a&&(c[d]=b.id);delete this.shapes[a]},replaceWithShapes:function(a,b){var c=this.shapeseq,d={},e,f,g;for(f=a.length;f--;)d[a[f]]=!0;for(f=c.length;f--;)e=c[f],d[e]&&(c.splice(f,1),delete this.shapes[e],g=f);for(f=b.length;f--;)c.splice(g,0,b[f].id),this.shapes[b[f].id]=b[f]},insertAfterShape:function(a,b){var c=this.shapeseq,d;for(d=c.length;d--;)if(c[d]===a){c.splice(d+1,0,b.id),this.shapes[b.id]=b;return}},removeShapeId:function(a){var b=this.shapeseq,c;for(c=b.length;c--;)if(b[c]===a){b.splice(c,1);break}delete this.shapes[a]},getShapeAt:function(a,b,c){return this.targetX=b,this.targetY=c,this.render(),this.currentTargetShapeId},render:function(){var a=this.shapeseq,b=this.shapes,c=a.length,d=this._getContext(),e,f,g;d.clearRect(0,0,this.pixelWidth,this.pixelHeight);for(g=0;g<c;g++)e=a[g],f=b[e],this["_draw"+f.type].apply(this,f.args);this.interact||(this.shapes={},this.shapeseq=[])}}),J=g(H,{init:function(b,c,e){var f;J._super.init.call(this,b,c,e),e[0]&&(e=e[0]),d.data(e,"_jqs_vcanvas",this),this.canvas=a.createElement("span"),d(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:b,height:c,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,e),this._calculatePixelDims(b,c,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,f='<v:group coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'"'+' style="position:absolute;top:0;left:0;width:'+this.pixelWidth+"px;height="+this.pixelHeight+'px;"></v:group>',this.canvas.insertAdjacentHTML("beforeEnd",f),this.group=d(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(a,b,d,e,f){var g=[],h,i,j,k,l,m,n;for(n=0,m=b.length;n<m;n++)g[n]=""+b[n][0]+","+b[n][1];return h=g.splice(0,1),f=f===c?1:f,i=d===c?' stroked="false" ':' strokeWeight="'+f+'px" strokeColor="'+d+'" ',j=e===c?' filled="false"':' fillColor="'+e+'" filled="true" ',k=g[0]===g[g.length-1]?"x ":"",l='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+a+'" '+i+j+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+h+" l "+g.join(", ")+" "+k+'e">'+" </v:shape>",l},_drawCircle:function(a,b,d,e,f,g,h){var i,j,k;return b-=e,d-=e,i=f===c?' stroked="false" ':' strokeWeight="'+h+'px" strokeColor="'+f+'" ',j=g===c?' filled="false"':' fillColor="'+g+'" filled="true" ',k='<v:oval id="jqsshape'+a+'" '+i+j+' style="position:absolute;top:'+d+"px; left:"+b+"px; width:"+e*2+"px; height:"+e*2+'px"></v:oval>',k},_drawPieSlice:function(a,d,e,f,g,h,i,j){var k,l,m,n,o,p,q,r;if(g===h)return"";h-g===2*b.PI&&(g=0,h=2*b.PI),l=d+b.round(b.cos(g)*f),m=e+b.round(b.sin(g)*f),n=d+b.round(b.cos(h)*f),o=e+b.round(b.sin(h)*f);if(l===n&&m===o){if(h-g<b.PI)return"";l=n=d+f,m=o=e}return l===n&&m===o&&h-g<b.PI?"":(k=[d-f,e-f,d+f,e+f,l,m,n,o],p=i===c?' stroked="false" ':' strokeWeight="1px" strokeColor="'+i+'" ',q=j===c?' filled="false"':' fillColor="'+j+'" filled="true" ',r='<v:shape coordorigin="0 0" coordsize="'+this.pixelWidth+" "+this.pixelHeight+'" '+' id="jqsshape'+a+'" '+p+q+' style="position:absolute;left:0px;top:0px;height:'+this.pixelHeight+"px;width:"+this.pixelWidth+'px;padding:0px;margin:0px;" '+' path="m '+d+","+e+" wa "+k.join(", ")+' x e">'+" </v:shape>",r)},_drawRect:function(a,b,c,d,e,f,g){return this._drawShape(a,[[b,c],[b,c+e],[b+d,c+e],[b+d,c],[b,c]],f,g)},reset:function(){this.group.innerHTML=""},appendShape:function(a){var b=this["_draw"+a.type].apply(this,a.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",b):this.prerender+=b,this.lastShapeId=a.id,a.id},replaceWithShape:function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].outerHTML=e},replaceWithShapes:function(a,b){var c=d("#jqsshape"+a[0]),e="",f=b.length,g;for(g=0;g<f;g++)e+=this["_draw"+b[g].type].apply(this,b[g].args);c[0].outerHTML=e;for(g=1;g<a.length;g++)d("#jqsshape"+a[g]).remove()},insertAfterShape:function(a,b){var c=d("#jqsshape"+a),e=this["_draw"+b.type].apply(this,b.args);c[0].insertAdjacentHTML("afterEnd",e)},removeShapeId:function(a){var b=d("#jqsshape"+a);this.group.removeChild(b[0])},getShapeAt:function(a,b,c){var d=a.id.substr(8);return d},render:function(){this.rendered||(this.group.innerHTML=this.prerender,this.rendered=!0)}})})})(document,Math);
@@ -0,0 +1,306 @@
1
+ /**
2
+ * jquery.switchButton.js v1.0
3
+ * jQuery iPhone-like switch button
4
+ * @author Olivier Lance <olivier.lance@sylights.com>
5
+ *
6
+ * Copyright (c) Olivier Lance - released under MIT License {{{
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person
9
+ * obtaining a copy of this software and associated documentation
10
+ * files (the "Software"), to deal in the Software without
11
+ * restriction, including without limitation the rights to use,
12
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the
14
+ * Software is furnished to do so, subject to the following
15
+ * conditions:
16
+
17
+ * The above copyright notice and this permission notice shall be
18
+ * included in all copies or substantial portions of the Software.
19
+
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ * OTHER DEALINGS IN THE SOFTWARE.
28
+
29
+ * }}}
30
+ */
31
+
32
+ /*
33
+ * Meant to be used on a <input type="checkbox">, this widget will replace the receiver element with an iPhone-style
34
+ * switch button with two states: "on" and "off".
35
+ * Labels of the states are customizable, as are their presence and position. The receiver element's "checked" attribute
36
+ * is updated according to the state of the switch, so that it can be used in a <form>.
37
+ *
38
+ */
39
+
40
+ (function($) {
41
+
42
+ $.widget("sylightsUI.switchButton", {
43
+
44
+ options: {
45
+ checked: undefined, // State of the switch
46
+
47
+ show_labels: true, // Should we show the on and off labels?
48
+ labels_placement: "both", // Position of the labels: "both", "left" or "right"
49
+ on_label: "ON", // Text to be displayed when checked
50
+ off_label: "OFF", // Text to be displayed when unchecked
51
+
52
+ width: 25, // Width of the button in pixels
53
+ height: 11, // Height of the button in pixels
54
+ button_width: 12, // Width of the sliding part in pixels
55
+
56
+ clear: true, // Should we insert a div with style="clear: both;" after the switch button?
57
+ clear_after: null // Override the element after which the clearing div should be inserted (null > right after the button)
58
+ },
59
+
60
+ _create: function() {
61
+ // Init the switch from the checkbox if no state was specified on creation
62
+ if (this.options.checked === undefined) {
63
+ this.options.checked = this.element.prop("checked");
64
+ }
65
+
66
+ this._initLayout();
67
+ this._initEvents();
68
+ },
69
+
70
+ _initLayout: function() {
71
+ // Hide the receiver element
72
+ this.element.hide();
73
+
74
+ this.id_container = this.element;
75
+ this.id_container.attr("type", "hidden");
76
+
77
+ // Create our objects: two labels and the button
78
+ this.off_label = $("<span>").addClass("switch-button-label");
79
+ this.on_label = $("<span>").addClass("switch-button-label");
80
+
81
+ this.button_bg = $("<div>").addClass("switch-button-background");
82
+ this.button = $("<div>").addClass("switch-button-button");
83
+
84
+ // Insert the objects into the DOM
85
+ this.off_label.insertAfter(this.element);
86
+ this.button_bg.insertAfter(this.off_label);
87
+ this.on_label.insertAfter(this.button_bg);
88
+
89
+ this.button_bg.append(this.button);
90
+
91
+ // Insert a clearing element after the specified element if needed
92
+ if(this.options.clear)
93
+ {
94
+ if (this.options.clear_after === null) {
95
+ this.options.clear_after = this.on_label;
96
+ }
97
+ $("<div>").css({
98
+ clear: "left"
99
+ }).insertAfter(this.options.clear_after);
100
+ }
101
+
102
+ // Call refresh to update labels text and visibility
103
+ this._refresh();
104
+
105
+ // Init labels and switch state
106
+ // This will animate all checked switches to the ON position when
107
+ // loading... this is intentional!
108
+ this.options.checked = !this.options.checked;
109
+ this._toggleSwitch();
110
+ },
111
+
112
+ _refresh: function() {
113
+ // Refresh labels display
114
+ if (this.options.show_labels) {
115
+ this.off_label.show();
116
+ this.on_label.show();
117
+ }
118
+ else {
119
+ this.off_label.hide();
120
+ this.on_label.hide();
121
+ }
122
+
123
+ // Move labels around depending on labels_placement option
124
+ switch(this.options.labels_placement) {
125
+ case "both":
126
+ {
127
+ // Don't move anything if labels are already in place
128
+ if(this.button_bg.prev() !== this.off_label || this.button_bg.next() !== this.on_label)
129
+ {
130
+ // Detach labels form DOM and place them correctly
131
+ this.off_label.detach();
132
+ this.on_label.detach();
133
+ this.off_label.insertBefore(this.button_bg);
134
+ this.on_label.insertAfter(this.button_bg);
135
+
136
+ // Update label classes
137
+ this.on_label.addClass(this.options.checked ? "on" : "off").removeClass(this.options.checked ? "off" : "on");
138
+ this.off_label.addClass(this.options.checked ? "off" : "on").removeClass(this.options.checked ? "on" : "off");
139
+
140
+ }
141
+ break;
142
+ }
143
+
144
+ case "left":
145
+ {
146
+ // Don't move anything if labels are already in place
147
+ if(this.button_bg.prev() !== this.on_label || this.on_label.prev() !== this.off_label)
148
+ {
149
+ // Detach labels form DOM and place them correctly
150
+ this.off_label.detach();
151
+ this.on_label.detach();
152
+ this.off_label.insertBefore(this.button_bg);
153
+ this.on_label.insertBefore(this.button_bg);
154
+
155
+ // update label classes
156
+ this.on_label.addClass("on").removeClass("off");
157
+ this.off_label.addClass("off").removeClass("on");
158
+ }
159
+ break;
160
+ }
161
+
162
+ case "right":
163
+ {
164
+ // Don't move anything if labels are already in place
165
+ if(this.button_bg.next() !== this.off_label || this.off_label.next() !== this.on_label)
166
+ {
167
+ // Detach labels form DOM and place them correctly
168
+ this.off_label.detach();
169
+ this.on_label.detach();
170
+ this.off_label.insertAfter(this.button_bg);
171
+ this.on_label.insertAfter(this.off_label);
172
+
173
+ // update label classes
174
+ this.on_label.addClass("on").removeClass("off");
175
+ this.off_label.addClass("off").removeClass("on");
176
+ }
177
+ break;
178
+ }
179
+
180
+ }
181
+
182
+ // Refresh labels texts
183
+ this.on_label.html(this.options.on_label);
184
+ this.off_label.html(this.options.off_label);
185
+
186
+ // Refresh button's dimensions
187
+ this.button_bg.width(this.options.width);
188
+ this.button_bg.height(this.options.height);
189
+ this.button.width(this.options.button_width);
190
+ this.button.height(this.options.height);
191
+
192
+ this._setChecked(this.id_container.attr("value"));
193
+ },
194
+
195
+ _initEvents: function() {
196
+ var self = this;
197
+
198
+ // Toggle switch when the switch is clicked
199
+ this.button_bg.click(function(e) {
200
+ e.preventDefault();
201
+ e.stopPropagation();
202
+ self._toggleSwitch();
203
+ return false;
204
+ });
205
+ this.button.click(function(e) {
206
+ e.preventDefault();
207
+ e.stopPropagation();
208
+ self._toggleSwitch();
209
+ return false;
210
+ });
211
+
212
+ // Set switch value when clicking labels
213
+ this.on_label.click(function(e) {
214
+ if (self.options.checked && self.options.labels_placement === "both") {
215
+ return false;
216
+ }
217
+
218
+ self._toggleSwitch();
219
+ return false;
220
+ });
221
+
222
+ this.off_label.click(function(e) {
223
+ if (!self.options.checked && self.options.labels_placement === "both") {
224
+ return false;
225
+ }
226
+
227
+ self._toggleSwitch();
228
+ return false;
229
+ });
230
+
231
+ },
232
+
233
+ _setOption: function(key, value) {
234
+ if (key === "checked") {
235
+ this._setChecked(value);
236
+ return;
237
+ }
238
+
239
+ this.options[key] = value;
240
+ this._refresh();
241
+ },
242
+
243
+ _setChecked: function(value) {
244
+ if (value === this.options.checked) {
245
+ return;
246
+ }
247
+
248
+ this.options.checked = !value;
249
+ this._toggleSwitch();
250
+ },
251
+
252
+ _toggleSwitch: function() {
253
+ this.options.checked = !this.options.checked;
254
+
255
+
256
+ var newLeft = "";
257
+ if (this.options.checked) {
258
+ // Update the underlying checkbox state
259
+ this.id_container.attr("checked", true);
260
+ this.id_container.attr("value", true);
261
+ this.id_container.change();
262
+
263
+ var dLeft = this.options.width - this.options.button_width;
264
+ newLeft = "+=" + dLeft;
265
+
266
+ // Update labels states
267
+ if(this.options.labels_placement == "both")
268
+ {
269
+ this.off_label.removeClass("on").addClass("off");
270
+ this.on_label.removeClass("off").addClass("on");
271
+ }
272
+ else
273
+ {
274
+ this.off_label.hide();
275
+ this.on_label.show();
276
+ }
277
+ this.button_bg.addClass("checked");
278
+
279
+ }
280
+ else {
281
+ // Update the underlying checkbox state
282
+ this.id_container.attr("checked", false);
283
+ this.id_container.attr("value", false);
284
+ this.id_container.change();
285
+ newLeft = "-1px";
286
+
287
+ // Update labels states
288
+ if(this.options.labels_placement == "both")
289
+ {
290
+ this.off_label.removeClass("off").addClass("on");
291
+ this.on_label.removeClass("on").addClass("off");
292
+ }
293
+ else
294
+ {
295
+ this.off_label.show();
296
+ this.on_label.hide();
297
+ }
298
+ this.button_bg.removeClass("checked");
299
+ }
300
+ // Animate the switch
301
+ this.button.animate({ left: newLeft }, 250, "easeInOutCubic");
302
+ }
303
+
304
+ });
305
+
306
+ })(jQuery);
@@ -230,7 +230,7 @@
230
230
 
231
231
  $(data.holder).css('width',settings.width);
232
232
  $(data.holder).css('min-height',settings.height);
233
- $(data.holder).css('height','100%');
233
+ $(data.holder).css('height',settings.height);
234
234
 
235
235
  if ($(data.real_input).val()!='') {
236
236
  $.fn.tagsInput.importTags($(data.real_input),$(data.real_input).val());
@@ -0,0 +1,986 @@
1
+ /*
2
+ SWFObject v2.2 <http://code.google.com/p/swfobject/>
3
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
4
+ */
5
+ ;var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;
6
+ if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;
7
+ X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);
8
+ ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");
9
+ if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac};
10
+ }(),k=function(){if(!M.w3){return;}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f();
11
+ }if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false);}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);
12
+ f();}});if(O==top){(function(){if(J){return;}try{j.documentElement.doScroll("left");}catch(X){setTimeout(arguments.callee,0);return;}f();})();}}if(M.wk){(function(){if(J){return;
13
+ }if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return;}f();})();}s(f);}}();function f(){if(J){return;}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));
14
+ Z.parentNode.removeChild(Z);}catch(aa){return;}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]();}}function K(X){if(J){X();}else{U[U.length]=X;}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false);
15
+ }else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false);}else{if(typeof O.attachEvent!=D){i(O,"onload",Y);}else{if(typeof O.onload=="function"){var X=O.onload;
16
+ O.onload=function(){X();Y();};}else{O.onload=Y;}}}}}function h(){if(T){V();}else{H();}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);
17
+ aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");
18
+ M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return;}}X.removeChild(aa);Z=null;H();
19
+ })();}else{H();}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);
20
+ if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa);}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;
21
+ ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class");}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align");
22
+ }var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value");
23
+ }}P(ai,ah,Y,ab);}else{p(ae);if(ab){ab(aa);}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z;}ab(aa);}}}}}function z(aa){var X=null;
24
+ var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y;}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z;}}}return X;}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312);
25
+ }function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null;}else{l=ae;Q=X;}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310";
26
+ }if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137";}j.title=j.title.slice(0,47)+" - Flash Player Installation";
27
+ var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac;
28
+ }else{ab.flashvars=ac;}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";
29
+ (function(){if(ae.readyState==4){ae.parentNode.removeChild(ae);}else{setTimeout(arguments.callee,10);}})();}u(aa,ab,X);}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");
30
+ Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y);}else{setTimeout(arguments.callee,10);
31
+ }})();}else{Y.parentNode.replaceChild(g(Y),Y);}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML;}else{var Y=ab.getElementsByTagName(r)[0];
32
+ if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true));
33
+ }}}}}return aa;}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X;}if(aa){if(typeof ai.id==D){ai.id=Y;}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae];
34
+ }else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"';}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"';}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />';
35
+ }}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id);}else{var Z=C(r);Z.setAttribute("type",q);
36
+ for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac]);}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac]);
37
+ }}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab]);}}aa.parentNode.replaceChild(Z,aa);X=Z;}}return X;}function e(Z,X,Y){var aa=C("param");
38
+ aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa);}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";
39
+ (function(){if(X.readyState==4){b(Y);}else{setTimeout(arguments.callee,10);}})();}else{X.parentNode.removeChild(X);}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null;
40
+ }}Y.parentNode.removeChild(Y);}}function c(Z){var X=null;try{X=j.getElementById(Z);}catch(Y){}return X;}function C(X){return j.createElement(X);}function i(Z,X,Y){Z.attachEvent(X,Y);
41
+ I[I.length]=[Z,X,Y];}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false;
42
+ }function v(ac,Y,ad,ab){if(M.ie&&M.mac){return;}var aa=j.getElementsByTagName("head")[0];if(!aa){return;}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;
43
+ G=null;}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1];
44
+ }G=X;}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y);}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"));
45
+ }}}function w(Z,X){if(!m){return;}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y;}else{v("#"+Z,"visibility:"+Y);}}function L(Y){var Z=/[\\\"<>\.;]/;
46
+ var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y;}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;
47
+ for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2]);}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa]);}for(var Y in M){M[Y]=null;}M=null;for(var X in swfobject){swfobject[X]=null;
48
+ }swfobject=null;});}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;
49
+ w(ab,false);}else{if(Z){Z({success:false,id:ab});}}},getObjectById:function(X){if(M.w3){return z(X);}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};
50
+ if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al];}}aj.data=ab;
51
+ aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak];}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai];
52
+ }else{am.flashvars=ai+"="+Z[ai];}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true);}X.success=true;X.ref=an;}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);
53
+ return;}else{w(ah,true);}}if(ac){ac(X);}});}else{if(ac){ac(X);}}},switchOffAutoHideShow:function(){m=false;},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]};
54
+ },hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X);}else{return undefined;}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y);
55
+ }},removeSWF:function(X){if(M.w3){y(X);}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X);}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;
56
+ if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1];}if(aa==null){return L(Z);}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)));
57
+ }}}return"";},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block";
58
+ }}if(E){E(B);}}a=false;}}};}();
59
+
60
+ /*
61
+ SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
62
+
63
+ mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
64
+
65
+ SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
66
+ http://www.opensource.org/licenses/mit-license.php
67
+
68
+ SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
69
+ http://www.opensource.org/licenses/mit-license.php
70
+ */
71
+
72
+ var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(a){if(typeof(a)!=="string"||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var c=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var b=window.location.pathname.lastIndexOf("/");if(b<=0){path="/"}else{path=window.location.pathname.substr(0,b)+"/"}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}b=document.createElement("div");b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(a),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(b),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var c=this.settings.post_params;var b=[];if(typeof(c)==="object"){for(var a in c){if(c.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+"="+encodeURIComponent(c[a].toString()))}}}return b.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&&typeof(a.CallFunction)==="unknown"){for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(e){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(d){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(b,c,a){if(c==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=c)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(a){this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash("CancelUpload",[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(a){this.callFlash("SetStats",[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)==="number"){return this.callFlash("GetFileByIndex",[a])}else{return this.callFlash("GetFile",[a])}};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash("AddFileParam",[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash("RemoveFileParam",[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash("SetUploadURL",[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash("SetPostParams",[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash("SetFileTypes",[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash("SetFileSizeLimit",[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash("SetFileUploadLimit",[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash("SetFileQueueLimit",[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash("SetFilePostName",[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash("SetUseQueryString",[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash("SetRequeueOnError",[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a==="string"){a=a.replace(" ","").split(",")}this.settings.http_success=a;this.callFlash("SetHTTPSuccess",[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash("SetAssumeSuccessTimeout",[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash("SetDebugEnabled",[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=""}this.settings.button_image_url=a;this.callFlash("SetButtonImageURL",[a])};SWFUpload.prototype.setButtonDimensions=function(c,a){this.settings.button_width=c;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=c+"px";b.style.height=a+"px"}this.callFlash("SetButtonDimensions",[c,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash("SetButtonText",[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash("SetButtonTextPadding",[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash("SetButtonTextStyle",[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash("SetButtonDisabled",[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash("SetButtonAction",[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash("SetButtonCursor",[a])};SWFUpload.prototype.queueEvent=function(b,c){if(c==undefined){c=[]}else{if(!(c instanceof Array)){c=[c]}}var a=this;if(typeof this.settings[b]==="function"){this.eventQueue.push(function(){this.settings[b].apply(this,c)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw"Event handler "+b+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)==="function"){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(c){var e=/[$]([0-9a-f]{4})/i;var f={};var d;if(c!=undefined){for(var a in c.post){if(c.post.hasOwnProperty(a)){d=a;var b;while((b=e.exec(d))!==null){d=d.replace(b[0],String.fromCharCode(parseInt("0x"+b[1],16)))}f[d]=c.post[a]}}c.post=f}return c};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(a);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&&typeof(a.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var c in a){try{if(typeof(a[c])==="function"){a[c]=null}}catch(b){}}}}catch(d){}window.__flash__removeCallback=function(e,f){try{if(e){e[f]=null}}catch(g){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("file_queued_handler",a)};SWFUpload.prototype.fileQueueError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("file_queue_error_handler",[a,c,b])};SWFUpload.prototype.fileDialogComplete=function(b,c,a){this.queueEvent("file_dialog_complete_handler",[b,c,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("return_upload_start_handler",a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler==="function"){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(b===undefined){b=true}b=!!b;this.callFlash("ReturnUploadStart",[b])};SWFUpload.prototype.uploadProgress=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_progress_handler",[a,c,b])};SWFUpload.prototype.uploadError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent("upload_error_handler",[a,c,b])};SWFUpload.prototype.uploadSuccess=function(b,a,c){b=this.unescapeFilePostParams(b);this.queueEvent("upload_success_handler",[b,a,c])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent("upload_complete_handler",a)};SWFUpload.prototype.debug=function(a){this.queueEvent("debug_handler",a)};SWFUpload.prototype.debugMessage=function(c){if(this.settings.debug){var a,d=[];if(typeof c==="object"&&typeof c.name==="string"&&typeof c.message==="string"){for(var b in c){if(c.hasOwnProperty(b)){d.push(b+": "+c[b])}}a=d.join("\n")||"";d=a.split("\n");a="EXCEPTION: "+d.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(c)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(d){var b,a;try{b=document.getElementById("SWFUpload_Console");if(!b){a=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(a);b=document.createElement("textarea");b.id="SWFUpload_Console";b.style.fontFamily="monospace";b.setAttribute("wrap","off");b.wrap="off";b.style.overflow="auto";b.style.width="700px";b.style.height="350px";b.style.margin="5px";a.appendChild(b)}b.value+=d+"\n";b.scrollTop=b.scrollHeight-b.clientHeight}catch(c){alert("Exception: "+c.name+" Message: "+c.message)}};
73
+
74
+ /*
75
+ Uploadify v3.2.1
76
+ Copyright (c) 2012 Reactive Apps, Ronnie Garcia
77
+ Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
78
+ */
79
+
80
+ (function($) {
81
+
82
+ // These methods can be called by adding them as the first argument in the uploadify plugin call
83
+ var methods = {
84
+
85
+ init : function(options, swfUploadOptions) {
86
+
87
+ return this.each(function() {
88
+
89
+ // Create a reference to the jQuery DOM object
90
+ var $this = $(this);
91
+
92
+ // Clone the original DOM object
93
+ var $clone = $this.clone();
94
+
95
+ // Setup the default options
96
+ var settings = $.extend({
97
+ // Required Settings
98
+ id : $this.attr('id'), // The ID of the DOM object
99
+ swf : 'uploadify.swf', // The path to the uploadify SWF file
100
+ uploader : 'uploadify.php', // The path to the server-side upload script
101
+
102
+ // Options
103
+ auto : true, // Automatically upload files when added to the queue
104
+ buttonClass : '', // A class name to add to the browse button DOM object
105
+ buttonCursor : 'hand', // The cursor to use with the browse button
106
+ buttonImage : null, // (String or null) The path to an image to use for the Flash browse button if not using CSS to style the button
107
+ buttonText : 'SELECT FILES', // The text to use for the browse button
108
+ checkExisting : false, // The path to a server-side script that checks for existing files on the server
109
+ debug : false, // Turn on swfUpload debugging mode
110
+ fileObjName : 'Filedata', // The name of the file object to use in your server-side script
111
+ fileSizeLimit : 0, // The maximum size of an uploadable file in KB (Accepts units B KB MB GB if string, 0 for no limit)
112
+ fileTypeDesc : 'All Files', // The description for file types in the browse dialog
113
+ fileTypeExts : '*.*', // Allowed extensions in the browse dialog (server-side validation should also be used)
114
+ height : 30, // The height of the browse button
115
+ itemTemplate : false, // The template for the file item in the queue
116
+ method : 'post', // The method to use when sending files to the server-side upload script
117
+ multi : true, // Allow multiple file selection in the browse dialog
118
+ formData : {}, // An object with additional data to send to the server-side upload script with every file upload
119
+ preventCaching : true, // Adds a random value to the Flash URL to prevent caching of it (conflicts with existing parameters)
120
+ progressData : 'percentage', // ('percentage' or 'speed') Data to show in the queue item during a file upload
121
+ queueID : false, // The ID of the DOM object to use as a file queue (without the #)
122
+ queueSizeLimit : 999, // The maximum number of files that can be in the queue at one time
123
+ removeCompleted : true, // Remove queue items from the queue when they are done uploading
124
+ removeTimeout : 3, // The delay in seconds before removing a queue item if removeCompleted is set to true
125
+ requeueErrors : false, // Keep errored files in the queue and keep trying to upload them
126
+ successTimeout : 30, // The number of seconds to wait for Flash to detect the server's response after the file has finished uploading
127
+ uploadLimit : 0, // The maximum number of files you can upload
128
+ width : 120, // The width of the browse button
129
+
130
+ // Events
131
+ overrideEvents : [] // (Array) A list of default event handlers to skip
132
+ /*
133
+ onCancel // Triggered when a file is cancelled from the queue
134
+ onClearQueue // Triggered during the 'clear queue' method
135
+ onDestroy // Triggered when the uploadify object is destroyed
136
+ onDialogClose // Triggered when the browse dialog is closed
137
+ onDialogOpen // Triggered when the browse dialog is opened
138
+ onDisable // Triggered when the browse button gets disabled
139
+ onEnable // Triggered when the browse button gets enabled
140
+ onFallback // Triggered is Flash is not detected
141
+ onInit // Triggered when Uploadify is initialized
142
+ onQueueComplete // Triggered when all files in the queue have been uploaded
143
+ onSelectError // Triggered when an error occurs while selecting a file (file size, queue size limit, etc.)
144
+ onSelect // Triggered for each file that is selected
145
+ onSWFReady // Triggered when the SWF button is loaded
146
+ onUploadComplete // Triggered when a file upload completes (success or error)
147
+ onUploadError // Triggered when a file upload returns an error
148
+ onUploadSuccess // Triggered when a file is uploaded successfully
149
+ onUploadProgress // Triggered every time a file progress is updated
150
+ onUploadStart // Triggered immediately before a file upload starts
151
+ */
152
+ }, options);
153
+
154
+ // Prepare settings for SWFUpload
155
+ var swfUploadSettings = {
156
+ assume_success_timeout : settings.successTimeout,
157
+ button_placeholder_id : settings.id,
158
+ button_width : settings.width,
159
+ button_height : settings.height,
160
+ button_text : null,
161
+ button_text_style : null,
162
+ button_text_top_padding : 0,
163
+ button_text_left_padding : 0,
164
+ button_action : (settings.multi ? SWFUpload.BUTTON_ACTION.SELECT_FILES : SWFUpload.BUTTON_ACTION.SELECT_FILE),
165
+ button_disabled : false,
166
+ button_cursor : (settings.buttonCursor == 'arrow' ? SWFUpload.CURSOR.ARROW : SWFUpload.CURSOR.HAND),
167
+ button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
168
+ debug : settings.debug,
169
+ requeue_on_error : settings.requeueErrors,
170
+ file_post_name : settings.fileObjName,
171
+ file_size_limit : settings.fileSizeLimit,
172
+ file_types : settings.fileTypeExts,
173
+ file_types_description : settings.fileTypeDesc,
174
+ file_queue_limit : settings.queueSizeLimit,
175
+ file_upload_limit : settings.uploadLimit,
176
+ flash_url : settings.swf,
177
+ prevent_swf_caching : settings.preventCaching,
178
+ post_params : settings.formData,
179
+ upload_url : settings.uploader,
180
+ use_query_string : (settings.method == 'get'),
181
+
182
+ // Event Handlers
183
+ file_dialog_complete_handler : handlers.onDialogClose,
184
+ file_dialog_start_handler : handlers.onDialogOpen,
185
+ file_queued_handler : handlers.onSelect,
186
+ file_queue_error_handler : handlers.onSelectError,
187
+ swfupload_loaded_handler : settings.onSWFReady,
188
+ upload_complete_handler : handlers.onUploadComplete,
189
+ upload_error_handler : handlers.onUploadError,
190
+ upload_progress_handler : handlers.onUploadProgress,
191
+ upload_start_handler : handlers.onUploadStart,
192
+ upload_success_handler : handlers.onUploadSuccess
193
+ }
194
+
195
+ // Merge the user-defined options with the defaults
196
+ if (swfUploadOptions) {
197
+ swfUploadSettings = $.extend(swfUploadSettings, swfUploadOptions);
198
+ }
199
+ // Add the user-defined settings to the swfupload object
200
+ swfUploadSettings = $.extend(swfUploadSettings, settings);
201
+
202
+ // Detect if Flash is available
203
+ var playerVersion = swfobject.getFlashPlayerVersion();
204
+ var flashInstalled = (playerVersion.major >= 9);
205
+
206
+ if (flashInstalled) {
207
+ // Create the swfUpload instance
208
+ window['uploadify_' + settings.id] = new SWFUpload(swfUploadSettings);
209
+ var swfuploadify = window['uploadify_' + settings.id];
210
+
211
+ // Add the SWFUpload object to the elements data object
212
+ $this.data('uploadify', swfuploadify);
213
+
214
+ // Wrap the instance
215
+ var $wrapper = $('<div />', {
216
+ 'id' : settings.id,
217
+ 'class' : 'uploadify',
218
+ 'css' : {
219
+ 'height' : settings.height + 'px',
220
+ 'width' : settings.width + 'px'
221
+ }
222
+ });
223
+ $('#' + swfuploadify.movieName).wrap($wrapper);
224
+ // Recreate the reference to wrapper
225
+ $wrapper = $('#' + settings.id);
226
+ // Add the data object to the wrapper
227
+ $wrapper.data('uploadify', swfuploadify);
228
+
229
+ // Create the button
230
+ var $button = $('<div />', {
231
+ 'id' : settings.id + '-button',
232
+ 'class' : 'uploadify-button ' + settings.buttonClass
233
+ });
234
+ if (settings.buttonImage) {
235
+ $button.css({
236
+ 'background-image' : "url('" + settings.buttonImage + "')",
237
+ 'text-indent' : '-9999px'
238
+ });
239
+ }
240
+ $button.html('<span class="uploadify-button-text">' + settings.buttonText + '</span>')
241
+ .css({
242
+ 'height' : settings.height + 'px',
243
+ 'line-height' : settings.height + 'px',
244
+ 'width' : settings.width + 'px'
245
+ });
246
+ // Append the button to the wrapper
247
+ $wrapper.append($button);
248
+
249
+ // Adjust the styles of the movie
250
+ $('#' + swfuploadify.movieName).css({
251
+ 'position' : 'absolute',
252
+ 'z-index' : 1
253
+ });
254
+
255
+ // Create the file queue
256
+ if (!settings.queueID) {
257
+ var $queue = $('<div />', {
258
+ 'id' : settings.id + '-queue',
259
+ 'class' : 'uploadify-queue'
260
+ });
261
+ $wrapper.after($queue);
262
+ swfuploadify.settings.queueID = settings.id + '-queue';
263
+ swfuploadify.settings.defaultQueue = true;
264
+ }
265
+
266
+ // Create some queue related objects and variables
267
+ swfuploadify.queueData = {
268
+ files : {}, // The files in the queue
269
+ filesSelected : 0, // The number of files selected in the last select operation
270
+ filesQueued : 0, // The number of files added to the queue in the last select operation
271
+ filesReplaced : 0, // The number of files replaced in the last select operation
272
+ filesCancelled : 0, // The number of files that were cancelled instead of replaced
273
+ filesErrored : 0, // The number of files that caused error in the last select operation
274
+ uploadsSuccessful : 0, // The number of files that were successfully uploaded
275
+ uploadsErrored : 0, // The number of files that returned errors during upload
276
+ averageSpeed : 0, // The average speed of the uploads in KB
277
+ queueLength : 0, // The number of files in the queue
278
+ queueSize : 0, // The size in bytes of the entire queue
279
+ uploadSize : 0, // The size in bytes of the upload queue
280
+ queueBytesUploaded : 0, // The size in bytes that have been uploaded for the current upload queue
281
+ uploadQueue : [], // The files currently to be uploaded
282
+ errorMsg : 'Some files were not added to the queue:'
283
+ };
284
+
285
+ // Save references to all the objects
286
+ swfuploadify.original = $clone;
287
+ swfuploadify.wrapper = $wrapper;
288
+ swfuploadify.button = $button;
289
+ swfuploadify.queue = $queue;
290
+
291
+ // Call the user-defined init event handler
292
+ if (settings.onInit) settings.onInit.call($this, swfuploadify);
293
+
294
+ } else {
295
+
296
+ // Call the fallback function
297
+ if (settings.onFallback) settings.onFallback.call($this);
298
+
299
+ }
300
+ });
301
+
302
+ },
303
+
304
+ // Stop a file upload and remove it from the queue
305
+ cancel : function(fileID, supressEvent) {
306
+
307
+ var args = arguments;
308
+
309
+ this.each(function() {
310
+ // Create a reference to the jQuery DOM object
311
+ var $this = $(this),
312
+ swfuploadify = $this.data('uploadify'),
313
+ settings = swfuploadify.settings,
314
+ delay = -1;
315
+
316
+ if (args[0]) {
317
+ // Clear the queue
318
+ if (args[0] == '*') {
319
+ var queueItemCount = swfuploadify.queueData.queueLength;
320
+ $('#' + settings.queueID).find('.uploadify-queue-item').each(function() {
321
+ delay++;
322
+ if (args[1] === true) {
323
+ swfuploadify.cancelUpload($(this).attr('id'), false);
324
+ } else {
325
+ swfuploadify.cancelUpload($(this).attr('id'));
326
+ }
327
+ $(this).find('.data').removeClass('data').html(' - Cancelled');
328
+ $(this).find('.uploadify-progress-bar').remove();
329
+ $(this).delay(1000 + 100 * delay).fadeOut(500, function() {
330
+ $(this).remove();
331
+ });
332
+ });
333
+ swfuploadify.queueData.queueSize = 0;
334
+ swfuploadify.queueData.queueLength = 0;
335
+ // Trigger the onClearQueue event
336
+ if (settings.onClearQueue) settings.onClearQueue.call($this, queueItemCount);
337
+ } else {
338
+ for (var n = 0; n < args.length; n++) {
339
+ swfuploadify.cancelUpload(args[n]);
340
+ $('#' + args[n]).find('.data').removeClass('data').html(' - Cancelled');
341
+ $('#' + args[n]).find('.uploadify-progress-bar').remove();
342
+ $('#' + args[n]).delay(1000 + 100 * n).fadeOut(500, function() {
343
+ $(this).remove();
344
+ });
345
+ }
346
+ }
347
+ } else {
348
+ var item = $('#' + settings.queueID).find('.uploadify-queue-item').get(0);
349
+ $item = $(item);
350
+ swfuploadify.cancelUpload($item.attr('id'));
351
+ $item.find('.data').removeClass('data').html(' - Cancelled');
352
+ $item.find('.uploadify-progress-bar').remove();
353
+ $item.delay(1000).fadeOut(500, function() {
354
+ $(this).remove();
355
+ });
356
+ }
357
+ });
358
+
359
+ },
360
+
361
+ // Revert the DOM object back to its original state
362
+ destroy : function() {
363
+
364
+ this.each(function() {
365
+ // Create a reference to the jQuery DOM object
366
+ var $this = $(this),
367
+ swfuploadify = $this.data('uploadify'),
368
+ settings = swfuploadify.settings;
369
+
370
+ // Destroy the SWF object and
371
+ swfuploadify.destroy();
372
+
373
+ // Destroy the queue
374
+ if (settings.defaultQueue) {
375
+ $('#' + settings.queueID).remove();
376
+ }
377
+
378
+ // Reload the original DOM element
379
+ $('#' + settings.id).replaceWith(swfuploadify.original);
380
+
381
+ // Call the user-defined event handler
382
+ if (settings.onDestroy) settings.onDestroy.call(this);
383
+
384
+ delete swfuploadify;
385
+ });
386
+
387
+ },
388
+
389
+ // Disable the select button
390
+ disable : function(isDisabled) {
391
+
392
+ this.each(function() {
393
+ // Create a reference to the jQuery DOM object
394
+ var $this = $(this),
395
+ swfuploadify = $this.data('uploadify'),
396
+ settings = swfuploadify.settings;
397
+
398
+ // Call the user-defined event handlers
399
+ if (isDisabled) {
400
+ swfuploadify.button.addClass('disabled');
401
+ if (settings.onDisable) settings.onDisable.call(this);
402
+ } else {
403
+ swfuploadify.button.removeClass('disabled');
404
+ if (settings.onEnable) settings.onEnable.call(this);
405
+ }
406
+
407
+ // Enable/disable the browse button
408
+ swfuploadify.setButtonDisabled(isDisabled);
409
+ });
410
+
411
+ },
412
+
413
+ // Get or set the settings data
414
+ settings : function(name, value, resetObjects) {
415
+
416
+ var args = arguments;
417
+ var returnValue = value;
418
+
419
+ this.each(function() {
420
+ // Create a reference to the jQuery DOM object
421
+ var $this = $(this),
422
+ swfuploadify = $this.data('uploadify'),
423
+ settings = swfuploadify.settings;
424
+
425
+ if (typeof(args[0]) == 'object') {
426
+ for (var n in value) {
427
+ setData(n,value[n]);
428
+ }
429
+ }
430
+ if (args.length === 1) {
431
+ returnValue = settings[name];
432
+ } else {
433
+ switch (name) {
434
+ case 'uploader':
435
+ swfuploadify.setUploadURL(value);
436
+ break;
437
+ case 'formData':
438
+ if (!resetObjects) {
439
+ value = $.extend(settings.formData, value);
440
+ }
441
+ swfuploadify.setPostParams(settings.formData);
442
+ break;
443
+ case 'method':
444
+ if (value == 'get') {
445
+ swfuploadify.setUseQueryString(true);
446
+ } else {
447
+ swfuploadify.setUseQueryString(false);
448
+ }
449
+ break;
450
+ case 'fileObjName':
451
+ swfuploadify.setFilePostName(value);
452
+ break;
453
+ case 'fileTypeExts':
454
+ swfuploadify.setFileTypes(value, settings.fileTypeDesc);
455
+ break;
456
+ case 'fileTypeDesc':
457
+ swfuploadify.setFileTypes(settings.fileTypeExts, value);
458
+ break;
459
+ case 'fileSizeLimit':
460
+ swfuploadify.setFileSizeLimit(value);
461
+ break;
462
+ case 'uploadLimit':
463
+ swfuploadify.setFileUploadLimit(value);
464
+ break;
465
+ case 'queueSizeLimit':
466
+ swfuploadify.setFileQueueLimit(value);
467
+ break;
468
+ case 'buttonImage':
469
+ swfuploadify.button.css('background-image', settingValue);
470
+ break;
471
+ case 'buttonCursor':
472
+ if (value == 'arrow') {
473
+ swfuploadify.setButtonCursor(SWFUpload.CURSOR.ARROW);
474
+ } else {
475
+ swfuploadify.setButtonCursor(SWFUpload.CURSOR.HAND);
476
+ }
477
+ break;
478
+ case 'buttonText':
479
+ $('#' + settings.id + '-button').find('.uploadify-button-text').html(value);
480
+ break;
481
+ case 'width':
482
+ swfuploadify.setButtonDimensions(value, settings.height);
483
+ break;
484
+ case 'height':
485
+ swfuploadify.setButtonDimensions(settings.width, value);
486
+ break;
487
+ case 'multi':
488
+ if (value) {
489
+ swfuploadify.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILES);
490
+ } else {
491
+ swfuploadify.setButtonAction(SWFUpload.BUTTON_ACTION.SELECT_FILE);
492
+ }
493
+ break;
494
+ }
495
+ settings[name] = value;
496
+ }
497
+ });
498
+
499
+ if (args.length === 1) {
500
+ return returnValue;
501
+ }
502
+
503
+ },
504
+
505
+ // Stop the current uploads and requeue what is in progress
506
+ stop : function() {
507
+
508
+ this.each(function() {
509
+ // Create a reference to the jQuery DOM object
510
+ var $this = $(this),
511
+ swfuploadify = $this.data('uploadify');
512
+
513
+ // Reset the queue information
514
+ swfuploadify.queueData.averageSpeed = 0;
515
+ swfuploadify.queueData.uploadSize = 0;
516
+ swfuploadify.queueData.bytesUploaded = 0;
517
+ swfuploadify.queueData.uploadQueue = [];
518
+
519
+ swfuploadify.stopUpload();
520
+ });
521
+
522
+ },
523
+
524
+ // Start uploading files in the queue
525
+ upload : function() {
526
+
527
+ var args = arguments;
528
+
529
+ this.each(function() {
530
+ // Create a reference to the jQuery DOM object
531
+ var $this = $(this),
532
+ swfuploadify = $this.data('uploadify');
533
+
534
+ // Reset the queue information
535
+ swfuploadify.queueData.averageSpeed = 0;
536
+ swfuploadify.queueData.uploadSize = 0;
537
+ swfuploadify.queueData.bytesUploaded = 0;
538
+ swfuploadify.queueData.uploadQueue = [];
539
+
540
+ // Upload the files
541
+ if (args[0]) {
542
+ if (args[0] == '*') {
543
+ swfuploadify.queueData.uploadSize = swfuploadify.queueData.queueSize;
544
+ swfuploadify.queueData.uploadQueue.push('*');
545
+ swfuploadify.startUpload();
546
+ } else {
547
+ for (var n = 0; n < args.length; n++) {
548
+ swfuploadify.queueData.uploadSize += swfuploadify.queueData.files[args[n]].size;
549
+ swfuploadify.queueData.uploadQueue.push(args[n]);
550
+ }
551
+ swfuploadify.startUpload(swfuploadify.queueData.uploadQueue.shift());
552
+ }
553
+ } else {
554
+ swfuploadify.startUpload();
555
+ }
556
+
557
+ });
558
+
559
+ }
560
+
561
+ }
562
+
563
+ // These functions handle all the events that occur with the file uploader
564
+ var handlers = {
565
+
566
+ // Triggered when the file dialog is opened
567
+ onDialogOpen : function() {
568
+ // Load the swfupload settings
569
+ var settings = this.settings;
570
+
571
+ // Reset some queue info
572
+ this.queueData.errorMsg = 'Some files were not added to the queue:';
573
+ this.queueData.filesReplaced = 0;
574
+ this.queueData.filesCancelled = 0;
575
+
576
+ // Call the user-defined event handler
577
+ if (settings.onDialogOpen) settings.onDialogOpen.call(this);
578
+ },
579
+
580
+ // Triggered when the browse dialog is closed
581
+ onDialogClose : function(filesSelected, filesQueued, queueLength) {
582
+ // Load the swfupload settings
583
+ var settings = this.settings;
584
+
585
+ // Update the queue information
586
+ this.queueData.filesErrored = filesSelected - filesQueued;
587
+ this.queueData.filesSelected = filesSelected;
588
+ this.queueData.filesQueued = filesQueued - this.queueData.filesCancelled;
589
+ this.queueData.queueLength = queueLength;
590
+
591
+ // Run the default event handler
592
+ if ($.inArray('onDialogClose', settings.overrideEvents) < 0) {
593
+ if (this.queueData.filesErrored > 0) {
594
+ alert(this.queueData.errorMsg);
595
+ }
596
+ }
597
+
598
+ // Call the user-defined event handler
599
+ if (settings.onDialogClose) settings.onDialogClose.call(this, this.queueData);
600
+
601
+ // Upload the files if auto is true
602
+ if (settings.auto) $('#' + settings.id).uploadify('upload', '*');
603
+ },
604
+
605
+ // Triggered once for each file added to the queue
606
+ onSelect : function(file) {
607
+ // Load the swfupload settings
608
+ var settings = this.settings;
609
+
610
+ // Check if a file with the same name exists in the queue
611
+ var queuedFile = {};
612
+ for (var n in this.queueData.files) {
613
+ queuedFile = this.queueData.files[n];
614
+ if (queuedFile.uploaded != true && queuedFile.name == file.name) {
615
+ var replaceQueueItem = confirm('The file named "' + file.name + '" is already in the queue.\nDo you want to replace the existing item in the queue?');
616
+ if (!replaceQueueItem) {
617
+ this.cancelUpload(file.id);
618
+ this.queueData.filesCancelled++;
619
+ return false;
620
+ } else {
621
+ $('#' + queuedFile.id).remove();
622
+ this.cancelUpload(queuedFile.id);
623
+ this.queueData.filesReplaced++;
624
+ }
625
+ }
626
+ }
627
+
628
+ // Get the size of the file
629
+ var fileSize = Math.round(file.size / 1024);
630
+ var suffix = 'KB';
631
+ if (fileSize > 1000) {
632
+ fileSize = Math.round(fileSize / 1000);
633
+ suffix = 'MB';
634
+ }
635
+ var fileSizeParts = fileSize.toString().split('.');
636
+ fileSize = fileSizeParts[0];
637
+ if (fileSizeParts.length > 1) {
638
+ fileSize += '.' + fileSizeParts[1].substr(0,2);
639
+ }
640
+ fileSize += suffix;
641
+
642
+ // Truncate the filename if it's too long
643
+ var fileName = file.name;
644
+ if (fileName.length > 25) {
645
+ fileName = fileName.substr(0,25) + '...';
646
+ }
647
+
648
+ // Create the file data object
649
+ itemData = {
650
+ 'fileID' : file.id,
651
+ 'instanceID' : settings.id,
652
+ 'fileName' : fileName,
653
+ 'fileSize' : fileSize
654
+ }
655
+
656
+ // Create the file item template
657
+ if (settings.itemTemplate == false) {
658
+ settings.itemTemplate = '<div id="${fileID}" class="uploadify-queue-item">\
659
+ <div class="cancel">\
660
+ <a href="javascript:$(\'#${instanceID}\').uploadify(\'cancel\', \'${fileID}\')">X</a>\
661
+ </div>\
662
+ <span class="fileName">${fileName} (${fileSize})</span><span class="data"></span>\
663
+ <div class="uploadify-progress">\
664
+ <div class="uploadify-progress-bar"><!--Progress Bar--></div>\
665
+ </div>\
666
+ </div>';
667
+ }
668
+
669
+ // Run the default event handler
670
+ if ($.inArray('onSelect', settings.overrideEvents) < 0) {
671
+
672
+ // Replace the item data in the template
673
+ itemHTML = settings.itemTemplate;
674
+ for (var d in itemData) {
675
+ itemHTML = itemHTML.replace(new RegExp('\\$\\{' + d + '\\}', 'g'), itemData[d]);
676
+ }
677
+
678
+ // Add the file item to the queue
679
+ $('#' + settings.queueID).append(itemHTML);
680
+ }
681
+
682
+ this.queueData.queueSize += file.size;
683
+ this.queueData.files[file.id] = file;
684
+
685
+ // Call the user-defined event handler
686
+ if (settings.onSelect) settings.onSelect.apply(this, arguments);
687
+ },
688
+
689
+ // Triggered when a file is not added to the queue
690
+ onSelectError : function(file, errorCode, errorMsg) {
691
+ // Load the swfupload settings
692
+ var settings = this.settings;
693
+
694
+ // Run the default event handler
695
+ if ($.inArray('onSelectError', settings.overrideEvents) < 0) {
696
+ switch(errorCode) {
697
+ case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
698
+ if (settings.queueSizeLimit > errorMsg) {
699
+ this.queueData.errorMsg += '\nThe number of files selected exceeds the remaining upload limit (' + errorMsg + ').';
700
+ } else {
701
+ this.queueData.errorMsg += '\nThe number of files selected exceeds the queue size limit (' + settings.queueSizeLimit + ').';
702
+ }
703
+ break;
704
+ case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
705
+ this.queueData.errorMsg += '\nThe file "' + file.name + '" exceeds the size limit (' + settings.fileSizeLimit + ').';
706
+ break;
707
+ case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
708
+ this.queueData.errorMsg += '\nThe file "' + file.name + '" is empty.';
709
+ break;
710
+ case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
711
+ this.queueData.errorMsg += '\nThe file "' + file.name + '" is not an accepted file type (' + settings.fileTypeDesc + ').';
712
+ break;
713
+ }
714
+ }
715
+ if (errorCode != SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
716
+ delete this.queueData.files[file.id];
717
+ }
718
+
719
+ // Call the user-defined event handler
720
+ if (settings.onSelectError) settings.onSelectError.apply(this, arguments);
721
+ },
722
+
723
+ // Triggered when all the files in the queue have been processed
724
+ onQueueComplete : function() {
725
+ if (this.settings.onQueueComplete) this.settings.onQueueComplete.call(this, this.settings.queueData);
726
+ },
727
+
728
+ // Triggered when a file upload successfully completes
729
+ onUploadComplete : function(file) {
730
+ // Load the swfupload settings
731
+ var settings = this.settings,
732
+ swfuploadify = this;
733
+
734
+ // Check if all the files have completed uploading
735
+ var stats = this.getStats();
736
+ this.queueData.queueLength = stats.files_queued;
737
+ if (this.queueData.uploadQueue[0] == '*') {
738
+ if (this.queueData.queueLength > 0) {
739
+ this.startUpload();
740
+ } else {
741
+ this.queueData.uploadQueue = [];
742
+
743
+ // Call the user-defined event handler for queue complete
744
+ if (settings.onQueueComplete) settings.onQueueComplete.call(this, this.queueData);
745
+ }
746
+ } else {
747
+ if (this.queueData.uploadQueue.length > 0) {
748
+ this.startUpload(this.queueData.uploadQueue.shift());
749
+ } else {
750
+ this.queueData.uploadQueue = [];
751
+
752
+ // Call the user-defined event handler for queue complete
753
+ if (settings.onQueueComplete) settings.onQueueComplete.call(this, this.queueData);
754
+ }
755
+ }
756
+
757
+ // Call the default event handler
758
+ if ($.inArray('onUploadComplete', settings.overrideEvents) < 0) {
759
+ if (settings.removeCompleted) {
760
+ switch (file.filestatus) {
761
+ case SWFUpload.FILE_STATUS.COMPLETE:
762
+ setTimeout(function() {
763
+ if ($('#' + file.id)) {
764
+ swfuploadify.queueData.queueSize -= file.size;
765
+ swfuploadify.queueData.queueLength -= 1;
766
+ delete swfuploadify.queueData.files[file.id]
767
+ $('#' + file.id).fadeOut(500, function() {
768
+ $(this).remove();
769
+ });
770
+ }
771
+ }, settings.removeTimeout * 1000);
772
+ break;
773
+ case SWFUpload.FILE_STATUS.ERROR:
774
+ if (!settings.requeueErrors) {
775
+ setTimeout(function() {
776
+ if ($('#' + file.id)) {
777
+ swfuploadify.queueData.queueSize -= file.size;
778
+ swfuploadify.queueData.queueLength -= 1;
779
+ delete swfuploadify.queueData.files[file.id];
780
+ $('#' + file.id).fadeOut(500, function() {
781
+ $(this).remove();
782
+ });
783
+ }
784
+ }, settings.removeTimeout * 1000);
785
+ }
786
+ break;
787
+ }
788
+ } else {
789
+ file.uploaded = true;
790
+ }
791
+ }
792
+
793
+ // Call the user-defined event handler
794
+ if (settings.onUploadComplete) settings.onUploadComplete.call(this, file);
795
+ },
796
+
797
+ // Triggered when a file upload returns an error
798
+ onUploadError : function(file, errorCode, errorMsg) {
799
+ // Load the swfupload settings
800
+ var settings = this.settings;
801
+
802
+ // Set the error string
803
+ var errorString = 'Error';
804
+ switch(errorCode) {
805
+ case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
806
+ errorString = 'HTTP Error (' + errorMsg + ')';
807
+ break;
808
+ case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
809
+ errorString = 'Missing Upload URL';
810
+ break;
811
+ case SWFUpload.UPLOAD_ERROR.IO_ERROR:
812
+ errorString = 'IO Error';
813
+ break;
814
+ case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
815
+ errorString = 'Security Error';
816
+ break;
817
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
818
+ alert('The upload limit has been reached (' + errorMsg + ').');
819
+ errorString = 'Exceeds Upload Limit';
820
+ break;
821
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
822
+ errorString = 'Failed';
823
+ break;
824
+ case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:
825
+ break;
826
+ case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
827
+ errorString = 'Validation Error';
828
+ break;
829
+ case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
830
+ errorString = 'Cancelled';
831
+ this.queueData.queueSize -= file.size;
832
+ this.queueData.queueLength -= 1;
833
+ if (file.status == SWFUpload.FILE_STATUS.IN_PROGRESS || $.inArray(file.id, this.queueData.uploadQueue) >= 0) {
834
+ this.queueData.uploadSize -= file.size;
835
+ }
836
+ // Trigger the onCancel event
837
+ if (settings.onCancel) settings.onCancel.call(this, file);
838
+ delete this.queueData.files[file.id];
839
+ break;
840
+ case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
841
+ errorString = 'Stopped';
842
+ break;
843
+ }
844
+
845
+ // Call the default event handler
846
+ if ($.inArray('onUploadError', settings.overrideEvents) < 0) {
847
+
848
+ if (errorCode != SWFUpload.UPLOAD_ERROR.FILE_CANCELLED && errorCode != SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED) {
849
+ $('#' + file.id).addClass('uploadify-error');
850
+ }
851
+
852
+ // Reset the progress bar
853
+ $('#' + file.id).find('.uploadify-progress-bar').css('width','1px');
854
+
855
+ // Add the error message to the queue item
856
+ if (errorCode != SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND && file.status != SWFUpload.FILE_STATUS.COMPLETE) {
857
+ $('#' + file.id).find('.data').html(' - ' + errorString);
858
+ }
859
+ }
860
+
861
+ var stats = this.getStats();
862
+ this.queueData.uploadsErrored = stats.upload_errors;
863
+
864
+ // Call the user-defined event handler
865
+ if (settings.onUploadError) settings.onUploadError.call(this, file, errorCode, errorMsg, errorString);
866
+ },
867
+
868
+ // Triggered periodically during a file upload
869
+ onUploadProgress : function(file, fileBytesLoaded, fileTotalBytes) {
870
+ // Load the swfupload settings
871
+ var settings = this.settings;
872
+
873
+ // Setup all the variables
874
+ var timer = new Date();
875
+ var newTime = timer.getTime();
876
+ var lapsedTime = newTime - this.timer;
877
+ if (lapsedTime > 500) {
878
+ this.timer = newTime;
879
+ }
880
+ var lapsedBytes = fileBytesLoaded - this.bytesLoaded;
881
+ this.bytesLoaded = fileBytesLoaded;
882
+ var queueBytesLoaded = this.queueData.queueBytesUploaded + fileBytesLoaded;
883
+ var percentage = Math.round(fileBytesLoaded / fileTotalBytes * 100);
884
+
885
+ // Calculate the average speed
886
+ var suffix = 'KB/s';
887
+ var mbs = 0;
888
+ var kbs = (lapsedBytes / 1024) / (lapsedTime / 1000);
889
+ kbs = Math.floor(kbs * 10) / 10;
890
+ if (this.queueData.averageSpeed > 0) {
891
+ this.queueData.averageSpeed = Math.floor((this.queueData.averageSpeed + kbs) / 2);
892
+ } else {
893
+ this.queueData.averageSpeed = Math.floor(kbs);
894
+ }
895
+ if (kbs > 1000) {
896
+ mbs = (kbs * .001);
897
+ this.queueData.averageSpeed = Math.floor(mbs);
898
+ suffix = 'MB/s';
899
+ }
900
+
901
+ // Call the default event handler
902
+ if ($.inArray('onUploadProgress', settings.overrideEvents) < 0) {
903
+ if (settings.progressData == 'percentage') {
904
+ $('#' + file.id).find('.data').html(' - ' + percentage + '%');
905
+ } else if (settings.progressData == 'speed' && lapsedTime > 500) {
906
+ $('#' + file.id).find('.data').html(' - ' + this.queueData.averageSpeed + suffix);
907
+ }
908
+ $('#' + file.id).find('.uploadify-progress-bar').css('width', percentage + '%');
909
+ }
910
+
911
+ // Call the user-defined event handler
912
+ if (settings.onUploadProgress) settings.onUploadProgress.call(this, file, fileBytesLoaded, fileTotalBytes, queueBytesLoaded, this.queueData.uploadSize);
913
+ },
914
+
915
+ // Triggered right before a file is uploaded
916
+ onUploadStart : function(file) {
917
+ // Load the swfupload settings
918
+ var settings = this.settings;
919
+
920
+ var timer = new Date();
921
+ this.timer = timer.getTime();
922
+ this.bytesLoaded = 0;
923
+ if (this.queueData.uploadQueue.length == 0) {
924
+ this.queueData.uploadSize = file.size;
925
+ }
926
+ if (settings.checkExisting) {
927
+ $.ajax({
928
+ type : 'POST',
929
+ async : false,
930
+ url : settings.checkExisting,
931
+ data : {filename: file.name},
932
+ success : function(data) {
933
+ if (data == 1) {
934
+ var overwrite = confirm('A file with the name "' + file.name + '" already exists on the server.\nWould you like to replace the existing file?');
935
+ if (!overwrite) {
936
+ this.cancelUpload(file.id);
937
+ $('#' + file.id).remove();
938
+ if (this.queueData.uploadQueue.length > 0 && this.queueData.queueLength > 0) {
939
+ if (this.queueData.uploadQueue[0] == '*') {
940
+ this.startUpload();
941
+ } else {
942
+ this.startUpload(this.queueData.uploadQueue.shift());
943
+ }
944
+ }
945
+ }
946
+ }
947
+ }
948
+ });
949
+ }
950
+
951
+ // Call the user-defined event handler
952
+ if (settings.onUploadStart) settings.onUploadStart.call(this, file);
953
+ },
954
+
955
+ // Triggered when a file upload returns a successful code
956
+ onUploadSuccess : function(file, data, response) {
957
+ // Load the swfupload settings
958
+ var settings = this.settings;
959
+ var stats = this.getStats();
960
+ this.queueData.uploadsSuccessful = stats.successful_uploads;
961
+ this.queueData.queueBytesUploaded += file.size;
962
+
963
+ // Call the default event handler
964
+ if ($.inArray('onUploadSuccess', settings.overrideEvents) < 0) {
965
+ $('#' + file.id).find('.data').html(' - Complete');
966
+ }
967
+
968
+ // Call the user-defined event handler
969
+ if (settings.onUploadSuccess) settings.onUploadSuccess.call(this, file, data, response);
970
+ }
971
+
972
+ }
973
+
974
+ $.fn.uploadify = function(method) {
975
+
976
+ if (methods[method]) {
977
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
978
+ } else if (typeof method === 'object' || !method) {
979
+ return methods.init.apply(this, arguments);
980
+ } else {
981
+ $.error('The method ' + method + ' does not exist in $.uploadify');
982
+ }
983
+
984
+ }
985
+
986
+ })($);