iqvoc 3.2.11 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (351) hide show
  1. data/Gemfile +9 -9
  2. data/Gemfile.lock +108 -101
  3. data/{public/images/iqvoc → app/assets/images}/arrow_down.gif +0 -0
  4. data/{public/images/iqvoc → app/assets/images}/arrow_up.gif +0 -0
  5. data/{public/stylesheets/iqvoc → app/assets}/images/back.png +0 -0
  6. data/{public/stylesheets/iqvoc → app/assets}/images/branch.png +0 -0
  7. data/{public/stylesheets/iqvoc → app/assets}/images/categ.png +0 -0
  8. data/{public/stylesheets/iqvoc → app/assets}/images/categ_open.png +0 -0
  9. data/{public/images/iqvoc → app/assets/images}/footer.png +0 -0
  10. data/{public/stylesheets/iqvoc → app/assets}/images/go_there.png +0 -0
  11. data/{public/images/iqvoc → app/assets/images}/header_long.png +0 -0
  12. data/{public/stylesheets/iqvoc → app/assets}/images/iqvoc.png +0 -0
  13. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_end.png +0 -0
  14. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_end_filled.png +0 -0
  15. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_mid.png +0 -0
  16. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_mid_filled.png +0 -0
  17. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_nothing.png +0 -0
  18. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_only.png +0 -0
  19. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_only_filled.png +0 -0
  20. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_top.png +0 -0
  21. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_top_filled.png +0 -0
  22. data/{public/stylesheets/iqvoc → app/assets}/images/nothing.png +0 -0
  23. data/{public/images/iqvoc → app/assets/images}/ok.png +0 -0
  24. data/{public/images/iqvoc → app/assets/images}/rdf_flyer.gif +0 -0
  25. data/{public/images/iqvoc → app/assets/images}/red_arrow.png +0 -0
  26. data/{public/images/iqvoc → app/assets/images}/shadow.png +0 -0
  27. data/{public/images/iqvoc → app/assets/images}/spinner.gif +0 -0
  28. data/{public/images/iqvoc → app/assets/images}/tokenizer_delete.png +0 -0
  29. data/{public/images/iqvoc → app/assets/images}/tokenizer_pencile.png +0 -0
  30. data/{public/images/iqvoc → app/assets/images}/tokenizer_show.png +0 -0
  31. data/{public/stylesheets/iqvoc → app/assets}/images/top_01.png +0 -0
  32. data/{public/stylesheets/iqvoc → app/assets}/images/trunk.png +0 -0
  33. data/{public/images/iqvoc → app/assets/images}/unfinished.png +0 -0
  34. data/app/assets/javascripts/framework.js +7 -0
  35. data/{public/javascripts/iqvoc/entityselect.js → app/assets/javascripts/iqvoc/entityselect.js.erb} +1 -1
  36. data/{public/javascripts/iqvoc/application.js → app/assets/javascripts/iqvoc/iqvoc.js} +118 -1
  37. data/{public → app/assets}/javascripts/iqvoc/langselect.js +0 -0
  38. data/app/assets/javascripts/iqvoc/manifest.js +3 -0
  39. data/{public → app/assets}/javascripts/iqvoc/visualization.js +0 -0
  40. data/app/assets/javascripts/manifest.js +2 -0
  41. data/app/assets/stylesheets/framework.css +4 -0
  42. data/{public/stylesheets/iqvoc/forms.css → app/assets/stylesheets/iqvoc/forms.css.erb} +1 -1
  43. data/app/assets/stylesheets/iqvoc/ie_fixes.css +6 -0
  44. data/{public/stylesheets/iqvoc/iqvoc.css → app/assets/stylesheets/iqvoc/iqvoc.css.erb} +3 -3
  45. data/app/assets/stylesheets/iqvoc/manifest.css +5 -0
  46. data/{public → app/assets}/stylesheets/iqvoc/widgets.css +0 -0
  47. data/app/assets/stylesheets/manifest.css +4 -0
  48. data/app/controllers/collections_controller.rb +10 -4
  49. data/app/controllers/concepts/alphabetical_controller.rb +1 -2
  50. data/app/controllers/concepts/hierarchical_controller.rb +1 -1
  51. data/app/controllers/concepts_controller.rb +7 -6
  52. data/app/helpers/concepts_helper.rb +0 -1
  53. data/app/helpers/dashboard_helper.rb +2 -2
  54. data/app/models/concept/base.rb +6 -7
  55. data/app/models/concept/relation/base.rb +1 -1
  56. data/app/models/labeling/base.rb +1 -1
  57. data/app/models/labeling/skos/base.rb +5 -10
  58. data/app/models/match/base.rb +1 -1
  59. data/app/models/note/base.rb +1 -1
  60. data/app/models/user.rb +1 -0
  61. data/app/views/concepts/_visualization.html.erb +2 -2
  62. data/app/views/concepts/index.iqrdf +6 -2
  63. data/app/views/layouts/application.html.erb +7 -27
  64. data/app/views/partials/_rdf_logo.html.erb +1 -2
  65. data/config/application.rb +12 -3
  66. data/config/database.yml +21 -13
  67. data/config/engine.rb +6 -5
  68. data/config/environments/development.rb +45 -37
  69. data/config/environments/production.rb +45 -34
  70. data/config/environments/test.rb +43 -34
  71. data/config/initializers/iqvoc.rb +4 -8
  72. data/config/initializers/secret_token.rb +30 -0
  73. data/config/initializers/session_store.rb +1 -1
  74. data/config/locales/activerecord.de.yml +85 -111
  75. data/config/locales/activerecord.en.yml +85 -111
  76. data/db/iqvoc_test.sqlite3 +0 -0
  77. data/db/schema.rb +67 -153
  78. data/iqvoc.gemspec +3 -1
  79. data/lib/iqvoc/deep_cloning.rb +5 -5
  80. data/lib/iqvoc/version.rb +1 -1
  81. data/lib/iqvoc/versioning.rb +1 -1
  82. data/lib/iqvoc.rb +0 -6
  83. metadata +103 -369
  84. checksums.yaml +0 -7
  85. data/public/export/104047454295817920610168807659129435311.nt +0 -28
  86. data/public/export/10726.nt +0 -28
  87. data/public/export/10751365034669120987598940220863369604.nt +0 -28
  88. data/public/export/111691466774189666307584118743393932328.nt +0 -28
  89. data/public/export/12325399400132639231204595208154762660.nt +0 -28
  90. data/public/export/15263706163704853684442315777380853572.nt +0 -28
  91. data/public/export/15327.nt +0 -28
  92. data/public/export/15666.nt +0 -28
  93. data/public/export/173626129450223321263719262149444213847.nt +0 -28
  94. data/public/export/18948.nt +0 -28
  95. data/public/export/199578749544886032300136278910417855540.nt +0 -28
  96. data/public/export/213890660005255527251394676521741138403.nt +0 -28
  97. data/public/export/21930.nt +0 -28
  98. data/public/export/24509.nt +0 -28
  99. data/public/export/249458227092013520089223290936103182178.nt +0 -28
  100. data/public/export/271163890329327117562409702966294853312.nt +0 -28
  101. data/public/export/27484.nt +0 -28
  102. data/public/export/287251617830426667971006908766107175810.nt +0 -28
  103. data/public/export/28754.nt +0 -28
  104. data/public/export/29022.nt +0 -28
  105. data/public/export/293720064238755056739270868818770835353.nt +0 -28
  106. data/public/export/29976.nt +0 -28
  107. data/public/export/30643.nt +0 -28
  108. data/public/export/309135899928267675232062298368405782595.nt +0 -28
  109. data/public/export/32054.nt +0 -28
  110. data/public/export/327890543532187929176278243423558506722.nt +0 -28
  111. data/public/export/33055.nt +0 -28
  112. data/public/export/337748600310244218106909976567220577473.nt +0 -28
  113. data/public/export/33936.nt +0 -28
  114. data/public/export/33993.nt +0 -28
  115. data/public/export/34906.nt +0 -28
  116. data/public/export/35365.nt +0 -28
  117. data/public/export/37098.nt +0 -28
  118. data/public/export/37534146541112437090211766955764945845.nt +0 -28
  119. data/public/export/39353594202090916952403280275602550330.nt +0 -28
  120. data/public/export/41272.nt +0 -28
  121. data/public/export/42271.nt +0 -28
  122. data/public/export/44392.nt +0 -28
  123. data/public/export/45675.nt +0 -28
  124. data/public/export/47529.nt +0 -28
  125. data/public/export/48309.nt +0 -28
  126. data/public/export/4956.nt +0 -28
  127. data/public/export/49623.nt +0 -28
  128. data/public/export/50516.nt +0 -28
  129. data/public/export/54880.nt +0 -28
  130. data/public/export/55142.nt +0 -28
  131. data/public/export/55398.nt +0 -28
  132. data/public/export/5754.nt +0 -28
  133. data/public/export/57727.nt +0 -28
  134. data/public/export/58069939020968861674794480549301466954.nt +0 -28
  135. data/public/export/5890.nt +0 -28
  136. data/public/export/62809.nt +0 -28
  137. data/public/export/65156.nt +0 -28
  138. data/public/export/6520.nt +0 -28
  139. data/public/export/863.nt +0 -28
  140. data/public/export/9372.nt +0 -28
  141. data/public/javascripts/iqvoc/excanvas.js +0 -35
  142. data/public/javascripts/iqvoc/iqvoc.js +0 -118
  143. data/public/javascripts/iqvoc/jit_rgraph.js +0 -153
  144. data/public/javascripts/iqvoc/jquery-1.6.2.min.js +0 -18
  145. data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +0 -29
  146. data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +0 -44
  147. data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
  148. data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +0 -43
  149. data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +0 -56
  150. data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +0 -340
  151. data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +0 -559
  152. data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +0 -621
  153. data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +0 -24
  154. data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +0 -82
  155. data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +0 -87
  156. data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +0 -87
  157. data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
  158. data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
  159. data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
  160. data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
  161. data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
  162. data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
  163. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
  164. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
  165. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
  166. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
  167. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
  168. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
  169. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
  170. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
  171. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
  172. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
  173. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +0 -82
  174. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +0 -75
  175. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +0 -251
  176. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +0 -15
  177. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +0 -16
  178. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +0 -92
  179. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +0 -3363
  180. data/public/javascripts/iqvoc/jquery-treeview/todo +0 -8
  181. data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.js +0 -3269
  182. data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.min.js +0 -165
  183. data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +0 -22
  184. data/public/javascripts/iqvoc/json2.js +0 -480
  185. data/public/javascripts/iqvoc/rails.js +0 -132
  186. data/public/javascripts/iqvoc/storage.js +0 -122
  187. data/public/stylesheets/iqvoc/blueprint/ie.css +0 -35
  188. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
  189. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
  190. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
  191. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +0 -32
  192. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +0 -97
  193. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +0 -14
  194. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +0 -71
  195. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
  196. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
  197. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
  198. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
  199. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
  200. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  201. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
  202. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
  203. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +0 -18
  204. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +0 -40
  205. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +0 -10
  206. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +0 -110
  207. data/public/stylesheets/iqvoc/blueprint/print.css +0 -29
  208. data/public/stylesheets/iqvoc/blueprint/screen.css +0 -258
  209. data/public/stylesheets/iqvoc/blueprint/src/forms.css +0 -65
  210. data/public/stylesheets/iqvoc/blueprint/src/grid.css +0 -280
  211. data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
  212. data/public/stylesheets/iqvoc/blueprint/src/ie.css +0 -76
  213. data/public/stylesheets/iqvoc/blueprint/src/print.css +0 -85
  214. data/public/stylesheets/iqvoc/blueprint/src/reset.css +0 -45
  215. data/public/stylesheets/iqvoc/blueprint/src/typography.css +0 -106
  216. data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  217. data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  218. data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  219. data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  220. data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  221. data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  222. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  223. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  224. data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
  225. data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
  226. data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
  227. data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
  228. data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  229. data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
  230. data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
  231. data/public/stylesheets/iqvoc/jquery-ui-1.8.16.custom.css +0 -410
  232. data/public/uploads/import/038dd516e01fe211375441c3af8d90e8.nt +0 -259
  233. data/public/uploads/import/07e71ca0235e798be39acd246114d962.nt +0 -259
  234. data/public/uploads/import/0a4c173bc9db7a5cd469c9454fdfa749.nt +0 -259
  235. data/public/uploads/import/0e8336cb2ef2c8b67767dfe8879d9cfb.nt +0 -259
  236. data/public/uploads/import/0f4eb8cd6390b1c5c5354a22e533ee0e.nt +0 -259
  237. data/public/uploads/import/105400714d68d2207209e23826345e76.nt +0 -259
  238. data/public/uploads/import/1147ab054ce55abf0a5bf93b99220231.nt +0 -259
  239. data/public/uploads/import/14b64b1f2252aba1e89d83f770d14e29.nt +0 -259
  240. data/public/uploads/import/1c6f11c300224248bf919885f8545daf.nt +0 -259
  241. data/public/uploads/import/21d34b65ef0a8156111e845992fd004f.nt +0 -259
  242. data/public/uploads/import/2783fade523132942999836a74228d64.nt +0 -259
  243. data/public/uploads/import/2bc90e07e5c42e5f26a1607756cc0ab3.nt +0 -259
  244. data/public/uploads/import/2e4073a94eeae98095de9f43b5e5774a.nt +0 -259
  245. data/public/uploads/import/32548678e7d47b3e256590d6eef6fb03.nt +0 -259
  246. data/public/uploads/import/330e08c32fde94fb80f656346d1f8383.nt +0 -259
  247. data/public/uploads/import/337790be2663214e66066b1215fdd137.nt +0 -259
  248. data/public/uploads/import/34b77ff970ca71511fb4b224b7dadd1c.nt +0 -259
  249. data/public/uploads/import/38de0d3c9cba92e8a3c312e7e95e7ec1.nt +0 -259
  250. data/public/uploads/import/3981aa91cf22e26fbf6b1312b2bcdcc8.nt +0 -259
  251. data/public/uploads/import/3d01f84539a62ebe6f76124e8cdbbb23.nt +0 -259
  252. data/public/uploads/import/3d05bb72c3751da3830cf53e966283d4.nt +0 -259
  253. data/public/uploads/import/3e1d2f770bfe3c79a367780731536a3a.nt +0 -259
  254. data/public/uploads/import/3e41bd1875dc23401278c73bd12be881.nt +0 -259
  255. data/public/uploads/import/3f3e3dbb09c3df6bfaed261311de3e7d.nt +0 -259
  256. data/public/uploads/import/4297d9970e47be5ced4991a083032eb9.nt +0 -259
  257. data/public/uploads/import/5925186958bd537ad5e79e76e3a1f714.nt +0 -259
  258. data/public/uploads/import/5dc5dcd978db1c59ec074e9137f0109c.nt +0 -259
  259. data/public/uploads/import/5e46663e7e2eb92e5e8846d7c0f8e713.nt +0 -259
  260. data/public/uploads/import/70022a2a7e808000dc3d55529d203480.nt +0 -259
  261. data/public/uploads/import/70b32583acaca5843ac7dbdc2a89de99.nt +0 -259
  262. data/public/uploads/import/8030e54313e2c7231c4c30cd4145d576.nt +0 -259
  263. data/public/uploads/import/8bb6484a9eb0c3266274c08ad8500669.nt +0 -259
  264. data/public/uploads/import/90711ea002f6b7b4e5476e414e185603.nt +0 -259
  265. data/public/uploads/import/918a5fc2c8fcdbaddc2a02588d599dcf.nt +0 -259
  266. data/public/uploads/import/923f9ebccb7b0e9e9fafddc60750b989.nt +0 -259
  267. data/public/uploads/import/933e4e2baee4d91b8f7681fa4d2ad9fa.nt +0 -259
  268. data/public/uploads/import/93f642eacd966c98645345d2ccdf578d.nt +0 -259
  269. data/public/uploads/import/9a3d0f8d1872d4ba5dd281194ddea4a2.nt +0 -259
  270. data/public/uploads/import/9a3f1c9de8e734b7e1d969d07ea57a83.nt +0 -259
  271. data/public/uploads/import/9f91263fee5275ecbf303c7da0a9e84d.nt +0 -259
  272. data/public/uploads/import/9f9d6b4293be8def1b406156a3e2bcd9.nt +0 -259
  273. data/public/uploads/import/a230b36c3666a6b16fec6283e99b221f.nt +0 -259
  274. data/public/uploads/import/a51b35089dc096f0f1f5d5250edb8d5c.nt +0 -259
  275. data/public/uploads/import/a5265a00946627588ecdac317c061c6c.nt +0 -259
  276. data/public/uploads/import/a95b7d93b7483116ff13c894a46b5c1c.nt +0 -259
  277. data/public/uploads/import/b5e47ea582afb81341f7b7084cc17a06.nt +0 -259
  278. data/public/uploads/import/b826bcfad8f18294a425d65482c46033.nt +0 -259
  279. data/public/uploads/import/bcf18c9e4dbe72745f4ec2878a4b1690.nt +0 -259
  280. data/public/uploads/import/c32855cb4b3e8616db2ef3f5f9cb5ca7.nt +0 -259
  281. data/public/uploads/import/c8ee5bc696312468c4354bad6c583321.nt +0 -259
  282. data/public/uploads/import/cfc73574fe398be7ce684fbc17aa1bb7.nt +0 -259
  283. data/public/uploads/import/d2366992f6e9e4377d02fc691fc2d3d3.nt +0 -259
  284. data/public/uploads/import/dc14a0fa30c105a5770da2c960daaf29.nt +0 -259
  285. data/public/uploads/import/e9289f6f920cf44d0e81599410b39090.nt +0 -259
  286. data/public/uploads/import/ed1c212d4f320e414caacda7a7988f83.nt +0 -259
  287. data/public/uploads/import/ed460af60bf4d0884d37a86bb02411e7.nt +0 -259
  288. data/public/uploads/import/f17024adf37be768041307528e848bd6.nt +0 -259
  289. data/public/uploads/import/f2f6025f6de90ee4609c2928a817c51d.nt +0 -259
  290. data/public/uploads/import/f427507b1c208ddf69204ea5414e5d18.nt +0 -259
  291. data/public/uploads/import/ffce91887b3ac5b7319a80926ff310ef.nt +0 -259
  292. data/public/uploads/tmp/1417625624-7926-3861/hobbies.nt +0 -259
  293. data/public/uploads/tmp/1417625658-7975-5171/hobbies.nt +0 -259
  294. data/public/uploads/tmp/1418649743-7886-1510/hobbies.nt +0 -259
  295. data/public/uploads/tmp/1418653029-9019-1572/hobbies.nt +0 -259
  296. data/public/uploads/tmp/1418656093-9614-5971/hobbies.nt +0 -259
  297. data/public/uploads/tmp/1418659992-10218-8665/hobbies.nt +0 -259
  298. data/public/uploads/tmp/1418664440-11199-8740/hobbies.nt +0 -259
  299. data/public/uploads/tmp/1418665022-11430-9919/hobbies.nt +0 -259
  300. data/public/uploads/tmp/1418665225-11485-5805/hobbies.nt +0 -259
  301. data/public/uploads/tmp/1418665744-11777-4958/hobbies.nt +0 -259
  302. data/public/uploads/tmp/1418666103-11837-9818/hobbies.nt +0 -259
  303. data/public/uploads/tmp/1418666157-11880-9002/hobbies.nt +0 -259
  304. data/public/uploads/tmp/1418666292-11920-9076/hobbies.nt +0 -259
  305. data/public/uploads/tmp/1418666482-11968-5799/hobbies.nt +0 -259
  306. data/public/uploads/tmp/1418666589-12006-6137/hobbies.nt +0 -259
  307. data/public/uploads/tmp/1419417707-62741-8601/hobbies.nt +0 -259
  308. data/public/uploads/tmp/1419418501-62977-9798/hobbies.nt +0 -259
  309. data/public/uploads/tmp/1419419091-63178-5200/hobbies.nt +0 -259
  310. data/public/uploads/tmp/1419845421-37940-7338/hobbies.nt +0 -259
  311. data/public/uploads/tmp/1419872019-93309-7785/hobbies.nt +0 -259
  312. data/public/uploads/tmp/1419872459-93489-7475/hobbies.nt +0 -259
  313. data/public/uploads/tmp/1420204292-55473-2339/hobbies.nt +0 -259
  314. data/public/uploads/tmp/1420469113-94913-1977/hobbies.nt +0 -259
  315. data/public/uploads/tmp/1420469218-94957-7818/hobbies.nt +0 -259
  316. data/public/uploads/tmp/1420471310-95437-1840/hobbies.nt +0 -259
  317. data/public/uploads/tmp/1420475764-97681-5693/hobbies.nt +0 -259
  318. data/public/uploads/tmp/1420475937-97729-2119/hobbies.nt +0 -259
  319. data/public/uploads/tmp/1420476857-98058-7891/hobbies.nt +0 -259
  320. data/public/uploads/tmp/1420535851-99018-0174/hobbies.nt +0 -259
  321. data/public/uploads/tmp/1420536204-1785-0172/hobbies.nt +0 -259
  322. data/public/uploads/tmp/1420551687-4559-4581/hobbies.nt +0 -259
  323. data/public/uploads/tmp/1420553228-5060-8398/hobbies.nt +0 -259
  324. data/public/uploads/tmp/1420554138-5330-1218/hobbies.nt +0 -259
  325. data/public/uploads/tmp/1420623682-11549-0730/hobbies.nt +0 -259
  326. data/public/uploads/tmp/1420627830-12489-1669/hobbies.nt +0 -259
  327. data/public/uploads/tmp/1420643849-18200-3932/hobbies.nt +0 -259
  328. data/public/uploads/tmp/1420649772-21728-5542/hobbies.nt +0 -259
  329. data/public/uploads/tmp/1420708117-27095-8292/hobbies.nt +0 -259
  330. data/public/uploads/tmp/1420708387-27223-6774/hobbies.nt +0 -259
  331. data/public/uploads/tmp/1420708470-27267-7475/hobbies.nt +0 -259
  332. data/public/uploads/tmp/1420708517-27294-4695/hobbies.nt +0 -259
  333. data/public/uploads/tmp/1420708539-27319-1354/hobbies.nt +0 -259
  334. data/public/uploads/tmp/1420708586-27334-3786/hobbies.nt +0 -259
  335. data/public/uploads/tmp/1420708992-27418-8019/hobbies.nt +0 -259
  336. data/public/uploads/tmp/1420709221-27495-1252/hobbies.nt +0 -259
  337. data/public/uploads/tmp/1420709888-27667-9904/hobbies.nt +0 -259
  338. data/public/uploads/tmp/1420710092-27729-5735/hobbies.nt +0 -259
  339. data/public/uploads/tmp/1420710448-27814-7190/hobbies.nt +0 -259
  340. data/public/uploads/tmp/1420710886-27909-4558/hobbies.nt +0 -259
  341. data/public/uploads/tmp/1420711474-28046-6914/hobbies.nt +0 -259
  342. data/public/uploads/tmp/1420711601-28081-0714/hobbies.nt +0 -259
  343. data/public/uploads/tmp/1420711904-28153-8591/hobbies.nt +0 -259
  344. data/public/uploads/tmp/1420712160-28240-2054/hobbies.nt +0 -259
  345. data/public/uploads/tmp/1420712349-28303-3685/hobbies.nt +0 -259
  346. data/public/uploads/tmp/1420712756-28475-0893/hobbies.nt +0 -259
  347. data/public/uploads/tmp/1420712995-28567-4743/hobbies.nt +0 -259
  348. data/public/uploads/tmp/1420722946-31448-5312/hobbies.nt +0 -259
  349. data/public/uploads/tmp/1420723021-31498-6069/hobbies.nt +0 -259
  350. data/public/uploads/tmp/1420723172-31541-4390/hobbies.nt +0 -259
  351. data/public/uploads/tmp/1420723249-31574-6508/hobbies.nt +0 -259
@@ -1,3363 +0,0 @@
1
- (function(){
2
- /*
3
- * jQuery 1.2.2b2 - New Wave Javascript
4
- *
5
- * Copyright (c) 2007 John Resig (jquery.com)
6
- * Dual licensed under the MIT (MIT-LICENSE.txt)
7
- * and GPL (GPL-LICENSE.txt) licenses.
8
- *
9
- * $Date: 2007-12-20 14:36:56 +0100 (Don, 20 Dez 2007) $
10
- * $Rev: 4251 $
11
- */
12
-
13
- // Map over jQuery in case of overwrite
14
- if ( window.jQuery )
15
- var _jQuery = window.jQuery;
16
-
17
- var jQuery = window.jQuery = function( selector, context ) {
18
- // The jQuery object is actually just the init constructor 'enhanced'
19
- return new jQuery.prototype.init( selector, context );
20
- };
21
-
22
- // Map over the $ in case of overwrite
23
- if ( window.$ )
24
- var _$ = window.$;
25
-
26
- // Map the jQuery namespace to the '$' one
27
- window.$ = jQuery;
28
-
29
- // A simple way to check for HTML strings or ID strings
30
- // (both of which we optimize for)
31
- var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
32
-
33
- // Is it a simple selector
34
- var isSimple = /^.[^:#\[\.]*$/;
35
-
36
- jQuery.fn = jQuery.prototype = {
37
- init: function( selector, context ) {
38
- // Make sure that a selection was provided
39
- selector = selector || document;
40
-
41
- // Handle $(DOMElement)
42
- if ( selector.nodeType ) {
43
- this[0] = selector;
44
- this.length = 1;
45
- return this;
46
-
47
- // Handle HTML strings
48
- } else if ( typeof selector == "string" ) {
49
- // Are we dealing with HTML string or an ID?
50
- var match = quickExpr.exec( selector );
51
-
52
- // Verify a match, and that no context was specified for #id
53
- if ( match && (match[1] || !context) ) {
54
-
55
- // HANDLE: $(html) -> $(array)
56
- if ( match[1] )
57
- selector = jQuery.clean( [ match[1] ], context );
58
-
59
- // HANDLE: $("#id")
60
- else {
61
- var elem = document.getElementById( match[3] );
62
-
63
- // Make sure an element was located
64
- if ( elem )
65
- // Handle the case where IE and Opera return items
66
- // by name instead of ID
67
- if ( elem.id != match[3] )
68
- return jQuery().find( selector );
69
-
70
- // Otherwise, we inject the element directly into the jQuery object
71
- else {
72
- this[0] = elem;
73
- this.length = 1;
74
- return this;
75
- }
76
-
77
- else
78
- selector = [];
79
- }
80
-
81
- // HANDLE: $(expr, [context])
82
- // (which is just equivalent to: $(content).find(expr)
83
- } else
84
- return new jQuery( context ).find( selector );
85
-
86
- // HANDLE: $(function)
87
- // Shortcut for document ready
88
- } else if ( jQuery.isFunction( selector ) )
89
- return new jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
90
-
91
- return this.setArray(
92
- // HANDLE: $(array)
93
- selector.constructor == Array && selector ||
94
-
95
- // HANDLE: $(arraylike)
96
- // Watch for when an array-like object, contains DOM nodes, is passed in as the selector
97
- (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
98
-
99
- // HANDLE: $(*)
100
- [ selector ] );
101
- },
102
-
103
- // The current version of jQuery being used
104
- jquery: "@VERSION",
105
-
106
- // The number of elements contained in the matched element set
107
- size: function() {
108
- return this.length;
109
- },
110
-
111
- // The number of elements contained in the matched element set
112
- length: 0,
113
-
114
- // Get the Nth element in the matched element set OR
115
- // Get the whole matched element set as a clean array
116
- get: function( num ) {
117
- return num == undefined ?
118
-
119
- // Return a 'clean' array
120
- jQuery.makeArray( this ) :
121
-
122
- // Return just the object
123
- this[ num ];
124
- },
125
-
126
- // Take an array of elements and push it onto the stack
127
- // (returning the new matched element set)
128
- pushStack: function( elems ) {
129
- // Build a new jQuery matched element set
130
- var ret = jQuery( elems );
131
-
132
- // Add the old object onto the stack (as a reference)
133
- ret.prevObject = this;
134
-
135
- // Return the newly-formed element set
136
- return ret;
137
- },
138
-
139
- // Force the current matched set of elements to become
140
- // the specified array of elements (destroying the stack in the process)
141
- // You should use pushStack() in order to do this, but maintain the stack
142
- setArray: function( elems ) {
143
- // Resetting the length to 0, then using the native Array push
144
- // is a super-fast way to populate an object with array-like properties
145
- this.length = 0;
146
- Array.prototype.push.apply( this, elems );
147
-
148
- return this;
149
- },
150
-
151
- // Execute a callback for every element in the matched set.
152
- // (You can seed the arguments with an array of args, but this is
153
- // only used internally.)
154
- each: function( callback, args ) {
155
- return jQuery.each( this, callback, args );
156
- },
157
-
158
- // Determine the position of an element within
159
- // the matched set of elements
160
- index: function( elem ) {
161
- var ret = -1;
162
-
163
- // Locate the position of the desired element
164
- this.each(function(i){
165
- if ( this == elem )
166
- ret = i;
167
- });
168
-
169
- return ret;
170
- },
171
-
172
- attr: function( name, value, type ) {
173
- var options = name;
174
-
175
- // Look for the case where we're accessing a style value
176
- if ( name.constructor == String )
177
- if ( value == undefined )
178
- return this.length && jQuery[ type || "attr" ]( this[0], name ) || undefined;
179
-
180
- else {
181
- options = {};
182
- options[ name ] = value;
183
- }
184
-
185
- // Check to see if we're setting style values
186
- return this.each(function(i){
187
- // Set all the styles
188
- for ( name in options )
189
- jQuery.attr(
190
- type ?
191
- this.style :
192
- this,
193
- name, jQuery.prop( this, options[ name ], type, i, name )
194
- );
195
- });
196
- },
197
-
198
- css: function( key, value ) {
199
- // ignore negative width and height values
200
- if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
201
- value = undefined;
202
- return this.attr( key, value, "curCSS" );
203
- },
204
-
205
- text: function( text ) {
206
- if ( typeof text != "object" && text != null )
207
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
208
-
209
- var ret = "";
210
-
211
- jQuery.each( text || this, function(){
212
- jQuery.each( this.childNodes, function(){
213
- if ( this.nodeType != 8 )
214
- ret += this.nodeType != 1 ?
215
- this.nodeValue :
216
- jQuery.fn.text( [ this ] );
217
- });
218
- });
219
-
220
- return ret;
221
- },
222
-
223
- wrapAll: function( html ) {
224
- if ( this[0] )
225
- // The elements to wrap the target around
226
- jQuery( html, this[0].ownerDocument )
227
- .clone()
228
- .insertBefore( this[0] )
229
- .map(function(){
230
- var elem = this;
231
-
232
- while ( elem.firstChild )
233
- elem = elem.firstChild;
234
-
235
- return elem;
236
- })
237
- .append(this);
238
-
239
- return this;
240
- },
241
-
242
- wrapInner: function( html ) {
243
- return this.each(function(){
244
- jQuery( this ).contents().wrapAll( html );
245
- });
246
- },
247
-
248
- wrap: function( html ) {
249
- return this.each(function(){
250
- jQuery( this ).wrapAll( html );
251
- });
252
- },
253
-
254
- append: function() {
255
- return this.domManip(arguments, true, false, function(elem){
256
- if (this.nodeType == 1)
257
- this.appendChild( elem );
258
- });
259
- },
260
-
261
- prepend: function() {
262
- return this.domManip(arguments, true, true, function(elem){
263
- if (this.nodeType == 1)
264
- this.insertBefore( elem, this.firstChild );
265
- });
266
- },
267
-
268
- before: function() {
269
- return this.domManip(arguments, false, false, function(elem){
270
- this.parentNode.insertBefore( elem, this );
271
- });
272
- },
273
-
274
- after: function() {
275
- return this.domManip(arguments, false, true, function(elem){
276
- this.parentNode.insertBefore( elem, this.nextSibling );
277
- });
278
- },
279
-
280
- end: function() {
281
- return this.prevObject || jQuery( [] );
282
- },
283
-
284
- find: function( selector ) {
285
- var elems = jQuery.map(this, function(elem){
286
- return jQuery.find( selector, elem );
287
- });
288
-
289
- return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ?
290
- jQuery.unique( elems ) :
291
- elems );
292
- },
293
-
294
- clone: function( events ) {
295
- // Do the clone
296
- var ret = this.map(function(){
297
- if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {
298
- // IE copies events bound via attachEvent when
299
- // using cloneNode. Calling detachEvent on the
300
- // clone will also remove the events from the orignal
301
- // In order to get around this, we use innerHTML.
302
- // Unfortunately, this means some modifications to
303
- // attributes in IE that are actually only stored
304
- // as properties will not be copied (such as the
305
- // the name attribute on an input).
306
- var clone = this.cloneNode(true),
307
- container = document.createElement("div"),
308
- container2 = document.createElement("div");
309
- container.appendChild(clone);
310
- container2.innerHTML = container.innerHTML;
311
- return container2.firstChild;
312
- } else
313
- return this.cloneNode(true);
314
- });
315
-
316
- // Need to set the expando to null on the cloned set if it exists
317
- // removeData doesn't work here, IE removes it from the original as well
318
- // this is primarily for IE but the data expando shouldn't be copied over in any browser
319
- var clone = ret.find("*").andSelf().each(function(){
320
- if ( this[ expando ] != undefined )
321
- this[ expando ] = null;
322
- });
323
-
324
- // Copy the events from the original to the clone
325
- if ( events === true )
326
- this.find("*").andSelf().each(function(i){
327
- var events = jQuery.data( this, "events" );
328
-
329
- for ( var type in events )
330
- for ( var handler in events[ type ] )
331
- jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
332
- });
333
-
334
- // Return the cloned set
335
- return ret;
336
- },
337
-
338
- filter: function( selector ) {
339
- return this.pushStack(
340
- jQuery.isFunction( selector ) &&
341
- jQuery.grep(this, function(elem, i){
342
- return selector.call( elem, i );
343
- }) ||
344
-
345
- jQuery.multiFilter( selector, this ) );
346
- },
347
-
348
- not: function( selector ) {
349
- if ( selector.constructor == String )
350
- // test special case where just one selector is passed in
351
- if ( isSimple.test( selector ) )
352
- return this.pushStack( jQuery.multiFilter( selector, this, true ) );
353
- else
354
- selector = jQuery.multiFilter( selector, this );
355
-
356
- var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
357
- return this.filter(function() {
358
- return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
359
- });
360
- },
361
-
362
- add: function( selector ) {
363
- return !selector ? this : this.pushStack( jQuery.merge(
364
- this.get(),
365
- selector.constructor == String ?
366
- jQuery( selector ).get() :
367
- selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ?
368
- selector : [selector] ) );
369
- },
370
-
371
- is: function( selector ) {
372
- return selector ?
373
- jQuery.multiFilter( selector, this ).length > 0 :
374
- false;
375
- },
376
-
377
- hasClass: function( selector ) {
378
- return this.is( "." + selector );
379
- },
380
-
381
- val: function( value ) {
382
- if ( value == undefined ) {
383
-
384
- if ( this.length ) {
385
- var elem = this[0];
386
-
387
- // We need to handle select boxes special
388
- if ( jQuery.nodeName( elem, "select" ) ) {
389
- var index = elem.selectedIndex,
390
- values = [],
391
- options = elem.options,
392
- one = elem.type == "select-one";
393
-
394
- // Nothing was selected
395
- if ( index < 0 )
396
- return null;
397
-
398
- // Loop through all the selected options
399
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
400
- var option = options[ i ];
401
-
402
- if ( option.selected ) {
403
- // Get the specifc value for the option
404
- value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
405
-
406
- // We don't need an array for one selects
407
- if ( one )
408
- return value;
409
-
410
- // Multi-Selects return an array
411
- values.push( value );
412
- }
413
- }
414
-
415
- return values;
416
-
417
- // Everything else, we just grab the value
418
- } else
419
- return (this[0].value || "").replace(/\r/g, "");
420
-
421
- }
422
-
423
- return undefined;
424
- }
425
-
426
- return this.each(function(){
427
- if ( this.nodeType != 1 )
428
- return;
429
-
430
- if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
431
- this.checked = (jQuery.inArray(this.value, value) >= 0 ||
432
- jQuery.inArray(this.name, value) >= 0);
433
-
434
- else if ( jQuery.nodeName( this, "select" ) ) {
435
- var values = value.constructor == Array ?
436
- value :
437
- [ value ];
438
-
439
- jQuery( "option", this ).each(function(){
440
- this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
441
- jQuery.inArray( this.text, values ) >= 0);
442
- });
443
-
444
- if ( !values.length )
445
- this.selectedIndex = -1;
446
-
447
- } else
448
- this.value = value;
449
- });
450
- },
451
-
452
- html: function( value ) {
453
- return value == undefined ?
454
- (this.length ?
455
- this[0].innerHTML :
456
- null) :
457
- this.empty().append( value );
458
- },
459
-
460
- replaceWith: function( value ) {
461
- return this.after( value ).remove();
462
- },
463
-
464
- eq: function( i ) {
465
- return this.slice( i, i + 1 );
466
- },
467
-
468
- slice: function() {
469
- return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
470
- },
471
-
472
- map: function( callback ) {
473
- return this.pushStack( jQuery.map(this, function(elem, i){
474
- return callback.call( elem, i, elem );
475
- }));
476
- },
477
-
478
- andSelf: function() {
479
- return this.add( this.prevObject );
480
- },
481
-
482
- domManip: function( args, table, reverse, callback ) {
483
- var clone = this.length > 1, elems;
484
-
485
- return this.each(function(){
486
- if ( !elems ) {
487
- elems = jQuery.clean( args, this.ownerDocument );
488
-
489
- if ( reverse )
490
- elems.reverse();
491
- }
492
-
493
- var obj = this;
494
-
495
- if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) )
496
- obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") );
497
-
498
- var scripts = jQuery( [] );
499
-
500
- jQuery.each(elems, function(){
501
- var elem = clone ?
502
- jQuery( this ).clone( true )[0] :
503
- this;
504
-
505
- // execute all scripts after the elements have been injected
506
- if ( jQuery.nodeName( elem, "script" ) ) {
507
- scripts = scripts.add( elem );
508
- } else {
509
- // Remove any inner scripts for later evaluation
510
- if ( elem.nodeType == 1 )
511
- scripts = scripts.add( jQuery( "script", elem ).remove() );
512
-
513
- // Inject the elements into the document
514
- callback.call( obj, elem );
515
- }
516
- });
517
-
518
- scripts.each( evalScript );
519
- });
520
- }
521
- };
522
-
523
- // Give the init function the jQuery prototype for later instantiation
524
- jQuery.prototype.init.prototype = jQuery.prototype;
525
-
526
- function evalScript( i, elem ) {
527
- if ( elem.src )
528
- jQuery.ajax({
529
- url: elem.src,
530
- async: false,
531
- dataType: "script"
532
- });
533
-
534
- else
535
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
536
-
537
- if ( elem.parentNode )
538
- elem.parentNode.removeChild( elem );
539
- }
540
-
541
- jQuery.extend = jQuery.fn.extend = function() {
542
- // copy reference to target object
543
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
544
-
545
- // Handle a deep copy situation
546
- if ( target.constructor == Boolean ) {
547
- deep = target;
548
- target = arguments[1] || {};
549
- // skip the boolean and the target
550
- i = 2;
551
- }
552
-
553
- // Handle case when target is a string or something (possible in deep copy)
554
- if ( typeof target != "object" && typeof target != "function" )
555
- target = {};
556
-
557
- // extend jQuery itself if only one argument is passed
558
- if ( length == 1 ) {
559
- target = this;
560
- i = 0;
561
- }
562
-
563
- for ( ; i < length; i++ )
564
- // Only deal with non-null/undefined values
565
- if ( (options = arguments[ i ]) != null )
566
- // Extend the base object
567
- for ( var name in options ) {
568
- // Prevent never-ending loop
569
- if ( target === options[ name ] )
570
- continue;
571
-
572
- // Recurse if we're merging object values
573
- if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType )
574
- target[ name ] = jQuery.extend( target[ name ], options[ name ] );
575
-
576
- // Don't bring in undefined values
577
- else if ( options[ name ] != undefined )
578
- target[ name ] = options[ name ];
579
-
580
- }
581
-
582
- // Return the modified object
583
- return target;
584
- };
585
-
586
- var expando = "jQuery" + (new Date()).getTime(), uuid = 0, windowData = {};
587
-
588
- // exclude the following css properties to add px
589
- var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
590
-
591
- jQuery.extend({
592
- noConflict: function( deep ) {
593
- window.$ = _$;
594
-
595
- if ( deep )
596
- window.jQuery = _jQuery;
597
-
598
- return jQuery;
599
- },
600
-
601
- // This may seem like some crazy code, but trust me when I say that this
602
- // is the only cross-browser way to do this. --John
603
- isFunction: function( fn ) {
604
- return !!fn && typeof fn != "string" && !fn.nodeName &&
605
- fn.constructor != Array && /function/i.test( fn + "" );
606
- },
607
-
608
- // check if an element is in a (or is an) XML document
609
- isXMLDoc: function( elem ) {
610
- return elem.documentElement && !elem.body ||
611
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
612
- },
613
-
614
- // Evalulates a script in a global context
615
- globalEval: function( data ) {
616
- data = jQuery.trim( data );
617
-
618
- if ( data ) {
619
- // Inspired by code by Andrea Giammarchi
620
- // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
621
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
622
- script = document.createElement("script");
623
-
624
- script.type = "text/javascript";
625
- if ( jQuery.browser.msie )
626
- script.text = data;
627
- else
628
- script.appendChild( document.createTextNode( data ) );
629
-
630
- head.appendChild( script );
631
- head.removeChild( script );
632
- }
633
- },
634
-
635
- nodeName: function( elem, name ) {
636
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
637
- },
638
-
639
- cache: {},
640
-
641
- data: function( elem, name, data ) {
642
- elem = elem == window ?
643
- windowData :
644
- elem;
645
-
646
- var id = elem[ expando ];
647
-
648
- // Compute a unique ID for the element
649
- if ( !id )
650
- id = elem[ expando ] = ++uuid;
651
-
652
- // Only generate the data cache if we're
653
- // trying to access or manipulate it
654
- if ( name && !jQuery.cache[ id ] )
655
- jQuery.cache[ id ] = {};
656
-
657
- // Prevent overriding the named cache with undefined values
658
- if ( data != undefined )
659
- jQuery.cache[ id ][ name ] = data;
660
-
661
- // Return the named cache data, or the ID for the element
662
- return name ?
663
- jQuery.cache[ id ][ name ] :
664
- id;
665
- },
666
-
667
- removeData: function( elem, name ) {
668
- elem = elem == window ?
669
- windowData :
670
- elem;
671
-
672
- var id = elem[ expando ];
673
-
674
- // If we want to remove a specific section of the element's data
675
- if ( name ) {
676
- if ( jQuery.cache[ id ] ) {
677
- // Remove the section of cache data
678
- delete jQuery.cache[ id ][ name ];
679
-
680
- // If we've removed all the data, remove the element's cache
681
- name = "";
682
-
683
- for ( name in jQuery.cache[ id ] )
684
- break;
685
-
686
- if ( !name )
687
- jQuery.removeData( elem );
688
- }
689
-
690
- // Otherwise, we want to remove all of the element's data
691
- } else {
692
- // Clean up the element expando
693
- try {
694
- delete elem[ expando ];
695
- } catch(e){
696
- // IE has trouble directly removing the expando
697
- // but it's ok with using removeAttribute
698
- if ( elem.removeAttribute )
699
- elem.removeAttribute( expando );
700
- }
701
-
702
- // Completely remove the data cache
703
- delete jQuery.cache[ id ];
704
- }
705
- },
706
-
707
- // args is for internal usage only
708
- each: function( object, callback, args ) {
709
- if ( args ) {
710
- if ( object.length == undefined )
711
- for ( var name in object )
712
- callback.apply( object[ name ], args );
713
- else
714
- for ( var i = 0, length = object.length; i < length; i++ )
715
- if ( callback.apply( object[ i ], args ) === false )
716
- break;
717
-
718
- // A special, fast, case for the most common use of each
719
- } else {
720
- if ( object.length == undefined )
721
- for ( var name in object )
722
- callback.call( object[ name ], name, object[ name ] );
723
- else
724
- for ( var i = 0, length = object.length, value = object[0];
725
- i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
726
- }
727
-
728
- return object;
729
- },
730
-
731
- prop: function( elem, value, type, i, name ) {
732
- // Handle executable functions
733
- if ( jQuery.isFunction( value ) )
734
- value = value.call( elem, i );
735
-
736
- // Handle passing in a number to a CSS property
737
- return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
738
- value + "px" :
739
- value;
740
- },
741
-
742
- className: {
743
- // internal only, use addClass("class")
744
- add: function( elem, classNames ) {
745
- jQuery.each((classNames || "").split(/\s+/), function(i, className){
746
- if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
747
- elem.className += (elem.className ? " " : "") + className;
748
- });
749
- },
750
-
751
- // internal only, use removeClass("class")
752
- remove: function( elem, classNames ) {
753
- if (elem.nodeType == 1)
754
- elem.className = classNames != undefined ?
755
- jQuery.grep(elem.className.split(/\s+/), function(className){
756
- return !jQuery.className.has( classNames, className );
757
- }).join(" ") :
758
- "";
759
- },
760
-
761
- // internal only, use is(".class")
762
- has: function( elem, className ) {
763
- return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
764
- }
765
- },
766
-
767
- // A method for quickly swapping in/out CSS properties to get correct calculations
768
- swap: function( elem, options, callback ) {
769
- var old = {};
770
- // Remember the old values, and insert the new ones
771
- for ( var name in options ) {
772
- old[ name ] = elem.style[ name ];
773
- elem.style[ name ] = options[ name ];
774
- }
775
-
776
- callback.call( elem );
777
-
778
- // Revert the old values
779
- for ( var name in options )
780
- elem.style[ name ] = old[ name ];
781
- },
782
-
783
- css: function( elem, name, force ) {
784
- if ( name == "width" || name == "height" ) {
785
- var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
786
-
787
- function getWH() {
788
- val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
789
- var padding = 0, border = 0;
790
- jQuery.each( which, function() {
791
- padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
792
- border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
793
- });
794
- val -= Math.round(padding + border);
795
- }
796
-
797
- if ( jQuery(elem).is(":visible") )
798
- getWH();
799
- else
800
- jQuery.swap( elem, props, getWH );
801
-
802
- return Math.max(0, val);
803
- }
804
-
805
- return jQuery.curCSS( elem, name, force );
806
- },
807
-
808
- curCSS: function( elem, name, force ) {
809
- var ret;
810
-
811
- // A helper method for determining if an element's values are broken
812
- function color( elem ) {
813
- if ( !jQuery.browser.safari )
814
- return false;
815
-
816
- var ret = document.defaultView.getComputedStyle( elem, null );
817
- return !ret || ret.getPropertyValue("color") == "";
818
- }
819
-
820
- // We need to handle opacity special in IE
821
- if ( name == "opacity" && jQuery.browser.msie ) {
822
- ret = jQuery.attr( elem.style, "opacity" );
823
-
824
- return ret == "" ?
825
- "1" :
826
- ret;
827
- }
828
- // Opera sometimes will give the wrong display answer, this fixes it, see #2037
829
- if ( jQuery.browser.opera && name == "display" ) {
830
- var save = elem.style.display;
831
- elem.style.display = "block";
832
- elem.style.display = save;
833
- }
834
-
835
- // Make sure we're using the right name for getting the float value
836
- if ( name.match( /float/i ) )
837
- name = styleFloat;
838
-
839
- if ( !force && elem.style[ name ] )
840
- ret = elem.style[ name ];
841
-
842
- else if ( document.defaultView && document.defaultView.getComputedStyle ) {
843
-
844
- // Only "float" is needed here
845
- if ( name.match( /float/i ) )
846
- name = "float";
847
-
848
- name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
849
-
850
- var getComputedStyle = document.defaultView.getComputedStyle( elem, null );
851
-
852
- if ( getComputedStyle && !color( elem ) )
853
- ret = getComputedStyle.getPropertyValue( name );
854
-
855
- // If the element isn't reporting its values properly in Safari
856
- // then some display: none elements are involved
857
- else {
858
- var swap = [], stack = [];
859
-
860
- // Locate all of the parent display: none elements
861
- for ( var a = elem; a && color(a); a = a.parentNode )
862
- stack.unshift(a);
863
-
864
- // Go through and make them visible, but in reverse
865
- // (It would be better if we knew the exact display type that they had)
866
- for ( var i = 0; i < stack.length; i++ )
867
- if ( color( stack[ i ] ) ) {
868
- swap[ i ] = stack[ i ].style.display;
869
- stack[ i ].style.display = "block";
870
- }
871
-
872
- // Since we flip the display style, we have to handle that
873
- // one special, otherwise get the value
874
- ret = name == "display" && swap[ stack.length - 1 ] != null ?
875
- "none" :
876
- ( getComputedStyle && getComputedStyle.getPropertyValue( name ) ) || "";
877
-
878
- // Finally, revert the display styles back
879
- for ( var i = 0; i < swap.length; i++ )
880
- if ( swap[ i ] != null )
881
- stack[ i ].style.display = swap[ i ];
882
- }
883
-
884
- // We should always get a number back from opacity
885
- if ( name == "opacity" && ret == "" )
886
- ret = "1";
887
-
888
- } else if ( elem.currentStyle ) {
889
- var camelCase = name.replace(/\-(\w)/g, function(all, letter){
890
- return letter.toUpperCase();
891
- });
892
-
893
- ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
894
-
895
- // From the awesome hack by Dean Edwards
896
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
897
-
898
- // If we're not dealing with a regular pixel number
899
- // but a number that has a weird ending, we need to convert it to pixels
900
- if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
901
- // Remember the original values
902
- var style = elem.style.left, runtimeStyle = elem.runtimeStyle.left;
903
-
904
- // Put in the new values to get a computed value out
905
- elem.runtimeStyle.left = elem.currentStyle.left;
906
- elem.style.left = ret || 0;
907
- ret = elem.style.pixelLeft + "px";
908
-
909
- // Revert the changed values
910
- elem.style.left = style;
911
- elem.runtimeStyle.left = runtimeStyle;
912
- }
913
- }
914
-
915
- return ret;
916
- },
917
-
918
- clean: function( elems, context ) {
919
- var ret = [];
920
- context = context || document;
921
- // !context.createElement fails in IE with an error but returns typeof 'object'
922
- if (typeof context.createElement == 'undefined')
923
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
924
-
925
- jQuery.each(elems, function(i, elem){
926
- if ( !elem )
927
- return;
928
-
929
- if ( elem.constructor == Number )
930
- elem = elem.toString();
931
-
932
- // Convert html string into DOM nodes
933
- if ( typeof elem == "string" ) {
934
- // Fix "XHTML"-style tags in all browsers
935
- elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
936
- return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i) ?
937
- all :
938
- front + "></" + tag + ">";
939
- });
940
-
941
- // Trim whitespace, otherwise indexOf won't work as expected
942
- var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");
943
-
944
- var wrap =
945
- // option or optgroup
946
- !tags.indexOf("<opt") &&
947
- [ 1, "<select multiple='multiple'>", "</select>" ] ||
948
-
949
- !tags.indexOf("<leg") &&
950
- [ 1, "<fieldset>", "</fieldset>" ] ||
951
-
952
- tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
953
- [ 1, "<table>", "</table>" ] ||
954
-
955
- !tags.indexOf("<tr") &&
956
- [ 2, "<table><tbody>", "</tbody></table>" ] ||
957
-
958
- // <thead> matched above
959
- (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
960
- [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
961
-
962
- !tags.indexOf("<col") &&
963
- [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
964
-
965
- // IE can't serialize <link> and <script> tags normally
966
- jQuery.browser.msie &&
967
- [ 1, "div<div>", "</div>" ] ||
968
-
969
- [ 0, "", "" ];
970
-
971
- // Go to html and back, then peel off extra wrappers
972
- div.innerHTML = wrap[1] + elem + wrap[2];
973
-
974
- // Move to the right depth
975
- while ( wrap[0]-- )
976
- div = div.lastChild;
977
-
978
- // Remove IE's autoinserted <tbody> from table fragments
979
- if ( jQuery.browser.msie ) {
980
-
981
- // String was a <table>, *may* have spurious <tbody>
982
- var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
983
- div.firstChild && div.firstChild.childNodes :
984
-
985
- // String was a bare <thead> or <tfoot>
986
- wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
987
- div.childNodes :
988
- [];
989
-
990
- for ( var j = tbody.length - 1; j >= 0 ; --j )
991
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
992
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
993
-
994
- // IE completely kills leading whitespace when innerHTML is used
995
- if ( /^\s/.test( elem ) )
996
- div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
997
-
998
- }
999
-
1000
- elem = jQuery.makeArray( div.childNodes );
1001
- }
1002
-
1003
- if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) )
1004
- return;
1005
-
1006
- if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options )
1007
- ret.push( elem );
1008
-
1009
- else
1010
- ret = jQuery.merge( ret, elem );
1011
-
1012
- });
1013
-
1014
- return ret;
1015
- },
1016
-
1017
- attr: function( elem, name, value ) {
1018
- // don't set attributes on text and comment nodes
1019
- if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
1020
- return undefined;
1021
-
1022
- var fix = jQuery.isXMLDoc( elem ) ?
1023
- {} :
1024
- jQuery.props;
1025
-
1026
- // Safari mis-reports the default selected property of a hidden option
1027
- // Accessing the parent's selectedIndex property fixes it
1028
- if ( name == "selected" && jQuery.browser.safari )
1029
- elem.parentNode.selectedIndex;
1030
-
1031
- // Certain attributes only work when accessed via the old DOM 0 way
1032
- if ( fix[ name ] ) {
1033
- if ( value != undefined )
1034
- elem[ fix[ name ] ] = value;
1035
-
1036
- return elem[ fix[ name ] ];
1037
-
1038
- } else if ( jQuery.browser.msie && name == "style" )
1039
- return jQuery.attr( elem.style, "cssText", value );
1040
-
1041
- else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName( elem, "form" ) && (name == "action" || name == "method") )
1042
- return elem.getAttributeNode( name ).nodeValue;
1043
-
1044
- // IE elem.getAttribute passes even for style
1045
- else if ( elem.tagName ) {
1046
-
1047
- if ( value != undefined ) {
1048
- // We can't allow the type property to be changed (since it causes problems in IE)
1049
- if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
1050
- throw "type property can't be changed";
1051
-
1052
- // convert the value to a string (all browsers do this but IE) see #1070
1053
- elem.setAttribute( name, "" + value );
1054
- }
1055
-
1056
- if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) )
1057
- return elem.getAttribute( name, 2 );
1058
-
1059
- return elem.getAttribute( name );
1060
-
1061
- // elem is actually elem.style ... set the style
1062
- } else {
1063
- // IE actually uses filters for opacity
1064
- if ( name == "opacity" && jQuery.browser.msie ) {
1065
- if ( value != undefined ) {
1066
- // IE has trouble with opacity if it does not have layout
1067
- // Force it by setting the zoom level
1068
- elem.zoom = 1;
1069
-
1070
- // Set the alpha filter to set the opacity
1071
- elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
1072
- (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
1073
- }
1074
-
1075
- return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
1076
- (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() :
1077
- "";
1078
- }
1079
-
1080
- name = name.replace(/-([a-z])/ig, function(all, letter){
1081
- return letter.toUpperCase();
1082
- });
1083
-
1084
- if ( value != undefined )
1085
- elem[ name ] = value;
1086
-
1087
- return elem[ name ];
1088
- }
1089
- },
1090
-
1091
- trim: function( text ) {
1092
- return (text || "").replace( /^\s+|\s+$/g, "" );
1093
- },
1094
-
1095
- makeArray: function( array ) {
1096
- var ret = [];
1097
-
1098
- // Need to use typeof to fight Safari childNodes crashes
1099
- if ( typeof array != "array" )
1100
- for ( var i = 0, length = array.length; i < length; i++ )
1101
- ret.push( array[ i ] );
1102
- else
1103
- ret = array.slice( 0 );
1104
-
1105
- return ret;
1106
- },
1107
-
1108
- inArray: function( elem, array ) {
1109
- for ( var i = 0, length = array.length; i < length; i++ )
1110
- if ( array[ i ] == elem )
1111
- return i;
1112
-
1113
- return -1;
1114
- },
1115
-
1116
- merge: function( first, second ) {
1117
- // We have to loop this way because IE & Opera overwrite the length
1118
- // expando of getElementsByTagName
1119
-
1120
- // Also, we need to make sure that the correct elements are being returned
1121
- // (IE returns comment nodes in a '*' query)
1122
- if ( jQuery.browser.msie ) {
1123
- for ( var i = 0; second[ i ]; i++ )
1124
- if ( second[ i ].nodeType != 8 )
1125
- first.push( second[ i ] );
1126
-
1127
- } else
1128
- for ( var i = 0; second[ i ]; i++ )
1129
- first.push( second[ i ] );
1130
-
1131
- return first;
1132
- },
1133
-
1134
- unique: function( array ) {
1135
- var ret = [], done = {};
1136
-
1137
- try {
1138
-
1139
- for ( var i = 0, length = array.length; i < length; i++ ) {
1140
- var id = jQuery.data( array[ i ] );
1141
-
1142
- if ( !done[ id ] ) {
1143
- done[ id ] = true;
1144
- ret.push( array[ i ] );
1145
- }
1146
- }
1147
-
1148
- } catch( e ) {
1149
- ret = array;
1150
- }
1151
-
1152
- return ret;
1153
- },
1154
-
1155
- grep: function( elems, callback, inv ) {
1156
- // If a string is passed in for the function, make a function
1157
- // for it (a handy shortcut)
1158
- if ( typeof callback == "string" )
1159
- callback = eval("false||function(a,i){return " + callback + "}");
1160
-
1161
- var ret = [];
1162
-
1163
- // Go through the array, only saving the items
1164
- // that pass the validator function
1165
- for ( var i = 0, length = elems.length; i < length; i++ )
1166
- if ( !inv && callback( elems[ i ], i ) || inv && !callback( elems[ i ], i ) )
1167
- ret.push( elems[ i ] );
1168
-
1169
- return ret;
1170
- },
1171
-
1172
- map: function( elems, callback ) {
1173
- var ret = [];
1174
-
1175
- // Go through the array, translating each of the items to their
1176
- // new value (or values).
1177
- for ( var i = 0, length = elems.length; i < length; i++ ) {
1178
- var value = callback( elems[ i ], i );
1179
-
1180
- if ( value !== null && value != undefined ) {
1181
- if ( value.constructor != Array )
1182
- value = [ value ];
1183
-
1184
- ret = ret.concat( value );
1185
- }
1186
- }
1187
-
1188
- return ret;
1189
- }
1190
- });
1191
-
1192
- var userAgent = navigator.userAgent.toLowerCase();
1193
-
1194
- // Figure out what browser is being used
1195
- jQuery.browser = {
1196
- version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
1197
- safari: /webkit/.test( userAgent ),
1198
- opera: /opera/.test( userAgent ),
1199
- msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
1200
- mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
1201
- };
1202
-
1203
- var styleFloat = jQuery.browser.msie ?
1204
- "styleFloat" :
1205
- "cssFloat";
1206
-
1207
- jQuery.extend({
1208
- // Check to see if the W3C box model is being used
1209
- boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
1210
-
1211
- props: {
1212
- "for": "htmlFor",
1213
- "class": "className",
1214
- "float": styleFloat,
1215
- cssFloat: styleFloat,
1216
- styleFloat: styleFloat,
1217
- innerHTML: "innerHTML",
1218
- className: "className",
1219
- value: "value",
1220
- disabled: "disabled",
1221
- checked: "checked",
1222
- readonly: "readOnly",
1223
- selected: "selected",
1224
- maxlength: "maxLength",
1225
- selectedIndex: "selectedIndex",
1226
- defaultValue: "defaultValue",
1227
- tagName: "tagName",
1228
- nodeName: "nodeName"
1229
- }
1230
- });
1231
-
1232
- jQuery.each({
1233
- parent: "elem.parentNode",
1234
- parents: "jQuery.dir(elem,'parentNode')",
1235
- next: "jQuery.nth(elem,2,'nextSibling')",
1236
- prev: "jQuery.nth(elem,2,'previousSibling')",
1237
- nextAll: "jQuery.dir(elem,'nextSibling')",
1238
- prevAll: "jQuery.dir(elem,'previousSibling')",
1239
- siblings: "jQuery.sibling(elem.parentNode.firstChild,elem)",
1240
- children: "jQuery.sibling(elem.firstChild)",
1241
- contents: "jQuery.nodeName(elem,'iframe')?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)"
1242
- }, function(name, fn){
1243
- fn = eval("false||function(elem){return " + fn + "}");
1244
-
1245
- jQuery.fn[ name ] = function( selector ) {
1246
- var ret = jQuery.map( this, fn );
1247
-
1248
- if ( selector && typeof selector == "string" )
1249
- ret = jQuery.multiFilter( selector, ret );
1250
-
1251
- return this.pushStack( jQuery.unique( ret ) );
1252
- };
1253
- });
1254
-
1255
- jQuery.each({
1256
- appendTo: "append",
1257
- prependTo: "prepend",
1258
- insertBefore: "before",
1259
- insertAfter: "after",
1260
- replaceAll: "replaceWith"
1261
- }, function(name, original){
1262
- jQuery.fn[ name ] = function() {
1263
- var args = arguments;
1264
-
1265
- return this.each(function(){
1266
- for ( var i = 0, length = args.length; i < length; i++ )
1267
- jQuery( args[ i ] )[ original ]( this );
1268
- });
1269
- };
1270
- });
1271
-
1272
- jQuery.each({
1273
- removeAttr: function( name ) {
1274
- jQuery.attr( this, name, "" );
1275
- if (this.nodeType == 1)
1276
- this.removeAttribute( name );
1277
- },
1278
-
1279
- addClass: function( classNames ) {
1280
- jQuery.className.add( this, classNames );
1281
- },
1282
-
1283
- removeClass: function( classNames ) {
1284
- jQuery.className.remove( this, classNames );
1285
- },
1286
-
1287
- toggleClass: function( classNames ) {
1288
- jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
1289
- },
1290
-
1291
- remove: function( selector ) {
1292
- if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {
1293
- // Prevent memory leaks
1294
- jQuery( "*", this ).add(this).each(function(){
1295
- jQuery.event.remove(this);
1296
- jQuery.removeData(this);
1297
- });
1298
- if (this.parentNode)
1299
- this.parentNode.removeChild( this );
1300
- }
1301
- },
1302
-
1303
- empty: function() {
1304
- // Remove element nodes and prevent memory leaks
1305
- jQuery( ">*", this ).remove();
1306
-
1307
- // Remove any remaining nodes
1308
- while ( this.firstChild )
1309
- this.removeChild( this.firstChild );
1310
- }
1311
- }, function(name, fn){
1312
- jQuery.fn[ name ] = function(){
1313
- return this.each( fn, arguments );
1314
- };
1315
- });
1316
-
1317
- jQuery.each([ "Height", "Width" ], function(i, name){
1318
- var type = name.toLowerCase();
1319
-
1320
- jQuery.fn[ type ] = function( size ) {
1321
- // Get window width or height
1322
- return this[0] == window ?
1323
- // Opera reports document.body.client[Width/Height] properly in both quirks and standards
1324
- jQuery.browser.opera && document.body[ "client" + name ] ||
1325
-
1326
- // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
1327
- jQuery.browser.safari && window[ "inner" + name ] ||
1328
-
1329
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
1330
- document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
1331
-
1332
- // Get document width or height
1333
- this[0] == document ?
1334
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
1335
- Math.max(
1336
- Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
1337
- Math.max(document.body["offset" + name], document.documentElement["offset" + name])
1338
- ) :
1339
-
1340
- // Get or set width or height on the element
1341
- size == undefined ?
1342
- // Get width or height on the element
1343
- (this.length ? jQuery.css( this[0], type ) : null) :
1344
-
1345
- // Set the width or height on the element (default to pixels if value is unitless)
1346
- this.css( type, size.constructor == String ? size : size + "px" );
1347
- };
1348
- });
1349
-
1350
- var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
1351
- "(?:[\\w*_-]|\\\\.)" :
1352
- "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
1353
- quickChild = new RegExp("^>\\s*(" + chars + "+)"),
1354
- quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
1355
- quickClass = new RegExp("^([#.]?)(" + chars + "*)");
1356
-
1357
- jQuery.extend({
1358
- expr: {
1359
- "": "m[2]=='*'||jQuery.nodeName(a,m[2])",
1360
- "#": "a.getAttribute('id')==m[2]",
1361
- ":": {
1362
- // Position Checks
1363
- lt: "i<m[3]-0",
1364
- gt: "i>m[3]-0",
1365
- nth: "m[3]-0==i",
1366
- eq: "m[3]-0==i",
1367
- first: "i==0",
1368
- last: "i==r.length-1",
1369
- even: "i%2==0",
1370
- odd: "i%2",
1371
-
1372
- // Child Checks
1373
- "first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
1374
- "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
1375
- "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
1376
-
1377
- // Parent Checks
1378
- parent: "a.firstChild",
1379
- empty: "!a.firstChild",
1380
-
1381
- // Text Check
1382
- contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
1383
-
1384
- // Visibility
1385
- visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
1386
- hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
1387
-
1388
- // Form attributes
1389
- enabled: "!a.disabled",
1390
- disabled: "a.disabled",
1391
- checked: "a.checked",
1392
- selected: "a.selected||jQuery.attr(a,'selected')",
1393
-
1394
- // Form elements
1395
- text: "'text'==a.type",
1396
- radio: "'radio'==a.type",
1397
- checkbox: "'checkbox'==a.type",
1398
- file: "'file'==a.type",
1399
- password: "'password'==a.type",
1400
- submit: "'submit'==a.type",
1401
- image: "'image'==a.type",
1402
- reset: "'reset'==a.type",
1403
- button: '"button"==a.type||jQuery.nodeName(a,"button")',
1404
- input: "/input|select|textarea|button/i.test(a.nodeName)",
1405
-
1406
- // :has()
1407
- has: "jQuery.find(m[3],a).length",
1408
-
1409
- // :header
1410
- header: "/h\\d/i.test(a.nodeName)",
1411
-
1412
- // :animated
1413
- animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
1414
- }
1415
- },
1416
-
1417
- // The regular expressions that power the parsing engine
1418
- parse: [
1419
- // Match: [@value='test'], [@foo]
1420
- /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
1421
-
1422
- // Match: :contains('foo')
1423
- /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
1424
-
1425
- // Match: :even, :last-chlid, #id, .class
1426
- new RegExp("^([:.#]*)(" + chars + "+)")
1427
- ],
1428
-
1429
- multiFilter: function( expr, elems, not ) {
1430
- var old, cur = [];
1431
-
1432
- while ( expr && expr != old ) {
1433
- old = expr;
1434
- var f = jQuery.filter( expr, elems, not );
1435
- expr = f.t.replace(/^\s*,\s*/, "" );
1436
- cur = not ? elems = f.r : jQuery.merge( cur, f.r );
1437
- }
1438
-
1439
- return cur;
1440
- },
1441
-
1442
- find: function( t, context ) {
1443
- // Quickly handle non-string expressions
1444
- if ( typeof t != "string" )
1445
- return [ t ];
1446
-
1447
- // check to make sure context is a DOM element or a document
1448
- if ( context && context.nodeType != 1 && context.nodeType != 9)
1449
- return [ ];
1450
-
1451
- // Set the correct context (if none is provided)
1452
- context = context || document;
1453
-
1454
- // Initialize the search
1455
- var ret = [context], done = [], last, nodeName;
1456
-
1457
- // Continue while a selector expression exists, and while
1458
- // we're no longer looping upon ourselves
1459
- while ( t && last != t ) {
1460
- var r = [];
1461
- last = t;
1462
-
1463
- t = jQuery.trim(t);
1464
-
1465
- var foundToken = false;
1466
-
1467
- // An attempt at speeding up child selectors that
1468
- // point to a specific element tag
1469
- var re = quickChild;
1470
- var m = re.exec(t);
1471
-
1472
- if ( m ) {
1473
- nodeName = m[1].toUpperCase();
1474
-
1475
- // Perform our own iteration and filter
1476
- for ( var i = 0; ret[i]; i++ )
1477
- for ( var c = ret[i].firstChild; c; c = c.nextSibling )
1478
- if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )
1479
- r.push( c );
1480
-
1481
- ret = r;
1482
- t = t.replace( re, "" );
1483
- if ( t.indexOf(" ") == 0 ) continue;
1484
- foundToken = true;
1485
- } else {
1486
- re = /^([>+~])\s*(\w*)/i;
1487
-
1488
- if ( (m = re.exec(t)) != null ) {
1489
- r = [];
1490
-
1491
- var merge = {};
1492
- nodeName = m[2].toUpperCase();
1493
- m = m[1];
1494
-
1495
- for ( var j = 0, rl = ret.length; j < rl; j++ ) {
1496
- var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
1497
- for ( ; n; n = n.nextSibling )
1498
- if ( n.nodeType == 1 ) {
1499
- var id = jQuery.data(n);
1500
-
1501
- if ( m == "~" && merge[id] ) break;
1502
-
1503
- if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {
1504
- if ( m == "~" ) merge[id] = true;
1505
- r.push( n );
1506
- }
1507
-
1508
- if ( m == "+" ) break;
1509
- }
1510
- }
1511
-
1512
- ret = r;
1513
-
1514
- // And remove the token
1515
- t = jQuery.trim( t.replace( re, "" ) );
1516
- foundToken = true;
1517
- }
1518
- }
1519
-
1520
- // See if there's still an expression, and that we haven't already
1521
- // matched a token
1522
- if ( t && !foundToken ) {
1523
- // Handle multiple expressions
1524
- if ( !t.indexOf(",") ) {
1525
- // Clean the result set
1526
- if ( context == ret[0] ) ret.shift();
1527
-
1528
- // Merge the result sets
1529
- done = jQuery.merge( done, ret );
1530
-
1531
- // Reset the context
1532
- r = ret = [context];
1533
-
1534
- // Touch up the selector string
1535
- t = " " + t.substr(1,t.length);
1536
-
1537
- } else {
1538
- // Optimize for the case nodeName#idName
1539
- var re2 = quickID;
1540
- var m = re2.exec(t);
1541
-
1542
- // Re-organize the results, so that they're consistent
1543
- if ( m ) {
1544
- m = [ 0, m[2], m[3], m[1] ];
1545
-
1546
- } else {
1547
- // Otherwise, do a traditional filter check for
1548
- // ID, class, and element selectors
1549
- re2 = quickClass;
1550
- m = re2.exec(t);
1551
- }
1552
-
1553
- m[2] = m[2].replace(/\\/g, "");
1554
-
1555
- var elem = ret[ret.length-1];
1556
-
1557
- // Try to do a global search by ID, where we can
1558
- if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
1559
- // Optimization for HTML document case
1560
- var oid = elem.getElementById(m[2]);
1561
-
1562
- // Do a quick check for the existence of the actual ID attribute
1563
- // to avoid selecting by the name attribute in IE
1564
- // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
1565
- if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
1566
- oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
1567
-
1568
- // Do a quick check for node name (where applicable) so
1569
- // that div#foo searches will be really fast
1570
- ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
1571
- } else {
1572
- // We need to find all descendant elements
1573
- for ( var i = 0; ret[i]; i++ ) {
1574
- // Grab the tag name being searched for
1575
- var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
1576
-
1577
- // Handle IE7 being really dumb about <object>s
1578
- if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
1579
- tag = "param";
1580
-
1581
- r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
1582
- }
1583
-
1584
- // It's faster to filter by class and be done with it
1585
- if ( m[1] == "." )
1586
- r = jQuery.classFilter( r, m[2] );
1587
-
1588
- // Same with ID filtering
1589
- if ( m[1] == "#" ) {
1590
- var tmp = [];
1591
-
1592
- // Try to find the element with the ID
1593
- for ( var i = 0; r[i]; i++ )
1594
- if ( r[i].getAttribute("id") == m[2] ) {
1595
- tmp = [ r[i] ];
1596
- break;
1597
- }
1598
-
1599
- r = tmp;
1600
- }
1601
-
1602
- ret = r;
1603
- }
1604
-
1605
- t = t.replace( re2, "" );
1606
- }
1607
-
1608
- }
1609
-
1610
- // If a selector string still exists
1611
- if ( t ) {
1612
- // Attempt to filter it
1613
- var val = jQuery.filter(t,r);
1614
- ret = r = val.r;
1615
- t = jQuery.trim(val.t);
1616
- }
1617
- }
1618
-
1619
- // An error occurred with the selector;
1620
- // just return an empty set instead
1621
- if ( t )
1622
- ret = [];
1623
-
1624
- // Remove the root context
1625
- if ( ret && context == ret[0] )
1626
- ret.shift();
1627
-
1628
- // And combine the results
1629
- done = jQuery.merge( done, ret );
1630
-
1631
- return done;
1632
- },
1633
-
1634
- classFilter: function(r,m,not){
1635
- m = " " + m + " ";
1636
- var tmp = [];
1637
- for ( var i = 0; r[i]; i++ ) {
1638
- var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
1639
- if ( !not && pass || not && !pass )
1640
- tmp.push( r[i] );
1641
- }
1642
- return tmp;
1643
- },
1644
-
1645
- filter: function(t,r,not) {
1646
- var last;
1647
-
1648
- // Look for common filter expressions
1649
- while ( t && t != last ) {
1650
- last = t;
1651
-
1652
- var p = jQuery.parse, m;
1653
-
1654
- for ( var i = 0; p[i]; i++ ) {
1655
- m = p[i].exec( t );
1656
-
1657
- if ( m ) {
1658
- // Remove what we just matched
1659
- t = t.substring( m[0].length );
1660
-
1661
- m[2] = m[2].replace(/\\/g, "");
1662
- break;
1663
- }
1664
- }
1665
-
1666
- if ( !m )
1667
- break;
1668
-
1669
- // :not() is a special case that can be optimized by
1670
- // keeping it out of the expression list
1671
- if ( m[1] == ":" && m[2] == "not" )
1672
- // optimize if only one selector found (most common case)
1673
- r = isSimple.test( m[3] ) ?
1674
- jQuery.filter(m[3], r, true).r :
1675
- jQuery( r ).not( m[3] );
1676
-
1677
- // We can get a big speed boost by filtering by class here
1678
- else if ( m[1] == "." )
1679
- r = jQuery.classFilter(r, m[2], not);
1680
-
1681
- else if ( m[1] == "[" ) {
1682
- var tmp = [], type = m[3];
1683
-
1684
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
1685
- var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
1686
-
1687
- if ( z == null || /href|src|selected/.test(m[2]) )
1688
- z = jQuery.attr(a,m[2]) || '';
1689
-
1690
- if ( (type == "" && !!z ||
1691
- type == "=" && z == m[5] ||
1692
- type == "!=" && z != m[5] ||
1693
- type == "^=" && z && !z.indexOf(m[5]) ||
1694
- type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
1695
- (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
1696
- tmp.push( a );
1697
- }
1698
-
1699
- r = tmp;
1700
-
1701
- // We can get a speed boost by handling nth-child here
1702
- } else if ( m[1] == ":" && m[2] == "nth-child" ) {
1703
- var merge = {}, tmp = [],
1704
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
1705
- test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
1706
- m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
1707
- !/\D/.test(m[3]) && "0n+" + m[3] || m[3]),
1708
- // calculate the numbers (first)n+(last) including if they are negative
1709
- first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0;
1710
-
1711
- // loop through all the elements left in the jQuery object
1712
- for ( var i = 0, rl = r.length; i < rl; i++ ) {
1713
- var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
1714
-
1715
- if ( !merge[id] ) {
1716
- var c = 1;
1717
-
1718
- for ( var n = parentNode.firstChild; n; n = n.nextSibling )
1719
- if ( n.nodeType == 1 )
1720
- n.nodeIndex = c++;
1721
-
1722
- merge[id] = true;
1723
- }
1724
-
1725
- var add = false;
1726
-
1727
- if ( first == 0 ) {
1728
- if ( node.nodeIndex == last )
1729
- add = true;
1730
- } else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )
1731
- add = true;
1732
-
1733
- if ( add ^ not )
1734
- tmp.push( node );
1735
- }
1736
-
1737
- r = tmp;
1738
-
1739
- // Otherwise, find the expression to execute
1740
- } else {
1741
- var f = jQuery.expr[m[1]];
1742
- if ( typeof f != "string" )
1743
- f = jQuery.expr[m[1]][m[2]];
1744
-
1745
- // Build a custom macro to enclose it
1746
- f = eval("false||function(a,i){return " + f + "}");
1747
-
1748
- // Execute it against the current filter
1749
- r = jQuery.grep( r, f, not );
1750
- }
1751
- }
1752
-
1753
- // Return an array of filtered elements (r)
1754
- // and the modified expression string (t)
1755
- return { r: r, t: t };
1756
- },
1757
-
1758
- dir: function( elem, dir ){
1759
- var matched = [];
1760
- var cur = elem[dir];
1761
- while ( cur && cur != document ) {
1762
- if ( cur.nodeType == 1 )
1763
- matched.push( cur );
1764
- cur = cur[dir];
1765
- }
1766
- return matched;
1767
- },
1768
-
1769
- nth: function(cur,result,dir,elem){
1770
- result = result || 1;
1771
- var num = 0;
1772
-
1773
- for ( ; cur; cur = cur[dir] )
1774
- if ( cur.nodeType == 1 && ++num == result )
1775
- break;
1776
-
1777
- return cur;
1778
- },
1779
-
1780
- sibling: function( n, elem ) {
1781
- var r = [];
1782
-
1783
- for ( ; n; n = n.nextSibling ) {
1784
- if ( n.nodeType == 1 && (!elem || n != elem) )
1785
- r.push( n );
1786
- }
1787
-
1788
- return r;
1789
- }
1790
- });
1791
-
1792
- /*
1793
- * A number of helper functions used for managing events.
1794
- * Many of the ideas behind this code orignated from
1795
- * Dean Edwards' addEvent library.
1796
- */
1797
- jQuery.event = {
1798
-
1799
- // Bind an event to an element
1800
- // Original by Dean Edwards
1801
- add: function(elem, types, handler, data) {
1802
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
1803
- return;
1804
-
1805
- // For whatever reason, IE has trouble passing the window object
1806
- // around, causing it to be cloned in the process
1807
- if ( jQuery.browser.msie && elem.setInterval != undefined )
1808
- elem = window;
1809
-
1810
- // Make sure that the function being executed has a unique ID
1811
- if ( !handler.guid )
1812
- handler.guid = this.guid++;
1813
-
1814
- // if data is passed, bind to handler
1815
- if( data != undefined ) {
1816
- // Create temporary function pointer to original handler
1817
- var fn = handler;
1818
-
1819
- // Create unique handler function, wrapped around original handler
1820
- handler = function() {
1821
- // Pass arguments and context to original handler
1822
- return fn.apply(this, arguments);
1823
- };
1824
-
1825
- // Store data in unique handler
1826
- handler.data = data;
1827
-
1828
- // Set the guid of unique handler to the same of original handler, so it can be removed
1829
- handler.guid = fn.guid;
1830
- }
1831
-
1832
- // Init the element's event structure
1833
- var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
1834
- handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
1835
- // returned undefined or false
1836
- var val;
1837
-
1838
- // Handle the second event of a trigger and when
1839
- // an event is called after a page has unloaded
1840
- if ( typeof jQuery == "undefined" || jQuery.event.triggered )
1841
- return val;
1842
-
1843
- val = jQuery.event.handle.apply(elem, arguments);
1844
-
1845
- return val;
1846
- });
1847
-
1848
- // Handle multiple events seperated by a space
1849
- // jQuery(...).bind("mouseover mouseout", fn);
1850
- jQuery.each(types.split(/\s+/), function(index, type) {
1851
- // Namespaced event handlers
1852
- var parts = type.split(".");
1853
- type = parts[0];
1854
- handler.type = parts[1];
1855
-
1856
- // Get the current list of functions bound to this event
1857
- var handlers = events[type];
1858
-
1859
- // Init the event handler queue
1860
- if (!handlers) {
1861
- handlers = events[type] = {};
1862
-
1863
- // Check for a special event handler
1864
- // Only use addEventListener/attachEvent if the special
1865
- // events handler returns false
1866
- if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) {
1867
- // Bind the global event handler to the element
1868
- if (elem.addEventListener)
1869
- elem.addEventListener(type, handle, false);
1870
- else if (elem.attachEvent)
1871
- elem.attachEvent("on" + type, handle);
1872
- }
1873
- }
1874
-
1875
- // Add the function to the element's handler list
1876
- handlers[handler.guid] = handler;
1877
-
1878
- // Keep track of which events have been used, for global triggering
1879
- jQuery.event.global[type] = true;
1880
- });
1881
- },
1882
-
1883
- guid: 1,
1884
- global: {},
1885
-
1886
- // Detach an event or set of events from an element
1887
- remove: function(elem, types, handler) {
1888
- // don't do events on text and comment nodes
1889
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
1890
- return;
1891
-
1892
- var events = jQuery.data(elem, "events"), ret, index;
1893
-
1894
- if ( events ) {
1895
- // Unbind all events for the element
1896
- if ( types == undefined )
1897
- for ( var type in events )
1898
- this.remove( elem, type );
1899
- else {
1900
- // types is actually an event object here
1901
- if ( types.type ) {
1902
- handler = types.handler;
1903
- types = types.type;
1904
- }
1905
-
1906
- // Handle multiple events seperated by a space
1907
- // jQuery(...).unbind("mouseover mouseout", fn);
1908
- jQuery.each(types.split(/\s+/), function(index, type){
1909
- // Namespaced event handlers
1910
- var parts = type.split(".");
1911
- type = parts[0];
1912
-
1913
- if ( events[type] ) {
1914
- // remove the given handler for the given type
1915
- if ( handler )
1916
- delete events[type][handler.guid];
1917
-
1918
- // remove all handlers for the given type
1919
- else
1920
- for ( handler in events[type] )
1921
- // Handle the removal of namespaced events
1922
- if ( !parts[1] || events[type][handler].type == parts[1] )
1923
- delete events[type][handler];
1924
-
1925
- // remove generic event handler if no more handlers exist
1926
- for ( ret in events[type] ) break;
1927
- if ( !ret ) {
1928
- if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) {
1929
- if (elem.removeEventListener)
1930
- elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
1931
- else if (elem.detachEvent)
1932
- elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
1933
- }
1934
- ret = null;
1935
- delete events[type];
1936
- }
1937
- }
1938
- });
1939
- }
1940
-
1941
- // Remove the expando if it's no longer used
1942
- for ( ret in events ) break;
1943
- if ( !ret ) {
1944
- jQuery.removeData( elem, "events" );
1945
- jQuery.removeData( elem, "handle" );
1946
- }
1947
- }
1948
- },
1949
-
1950
- trigger: function(type, data, elem, donative, extra) {
1951
- // Clone the incoming data, if any
1952
- data = jQuery.makeArray(data || []);
1953
-
1954
- // Handle a global trigger
1955
- if ( !elem ) {
1956
- // Only trigger if we've ever bound an event for it
1957
- if ( this.global[type] )
1958
- jQuery("*").add([window, document]).trigger(type, data);
1959
-
1960
- // Handle triggering a single element
1961
- } else {
1962
- // don't do events on text and comment nodes
1963
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
1964
- return undefined;
1965
-
1966
- var val, ret, fn = jQuery.isFunction( elem[ type ] || null ),
1967
- // Check to see if we need to provide a fake event, or not
1968
- event = !data[0] || !data[0].preventDefault;
1969
-
1970
- // Pass along a fake event
1971
- if ( event )
1972
- data.unshift( this.fix({ type: type, target: elem }) );
1973
-
1974
- // Enforce the right trigger type
1975
- data[0].type = type;
1976
-
1977
- // Trigger the event
1978
- if ( jQuery.isFunction( jQuery.data(elem, "handle") ) )
1979
- val = jQuery.data(elem, "handle").apply( elem, data );
1980
-
1981
- // Handle triggering native .onfoo handlers
1982
- if ( !fn && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
1983
- val = false;
1984
-
1985
- // Extra functions don't get the custom event object
1986
- if ( event )
1987
- data.shift();
1988
-
1989
- // Handle triggering of extra function
1990
- if ( extra && jQuery.isFunction( extra ) ) {
1991
- // call the extra function and tack the current return value on the end for possible inspection
1992
- var ret = extra.apply( elem, data.concat( val ) );
1993
- // if anything is returned, give it precedence and have it overwrite the previous value
1994
- if (ret !== undefined)
1995
- val = ret;
1996
- }
1997
-
1998
- // Trigger the native events (except for clicks on links)
1999
- if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
2000
- this.triggered = true;
2001
- try {
2002
- elem[ type ]();
2003
- // prevent IE from throwing an error for some hidden elements
2004
- } catch (e) {}
2005
- }
2006
-
2007
- this.triggered = false;
2008
- }
2009
-
2010
- return val;
2011
- },
2012
-
2013
- handle: function(event) {
2014
- // returned undefined or false
2015
- var val;
2016
-
2017
- // Empty object is for triggered events with no data
2018
- event = jQuery.event.fix( event || window.event || {} );
2019
-
2020
- // Namespaced event handlers
2021
- var parts = event.type.split(".");
2022
- event.type = parts[0];
2023
-
2024
- var handlers = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
2025
- args.unshift( event );
2026
-
2027
- for ( var j in handlers ) {
2028
- var handler = handlers[j];
2029
- // Pass in a reference to the handler function itself
2030
- // So that we can later remove it
2031
- args[0].handler = handler;
2032
- args[0].data = handler.data;
2033
-
2034
- // Filter the functions by class
2035
- if ( !parts[1] || handler.type == parts[1] ) {
2036
- var ret = handler.apply( this, args );
2037
-
2038
- if ( val !== false )
2039
- val = ret;
2040
-
2041
- if ( ret === false ) {
2042
- event.preventDefault();
2043
- event.stopPropagation();
2044
- }
2045
- }
2046
- }
2047
-
2048
- // Clean up added properties in IE to prevent memory leak
2049
- if (jQuery.browser.msie)
2050
- event.target = event.preventDefault = event.stopPropagation =
2051
- event.handler = event.data = null;
2052
-
2053
- return val;
2054
- },
2055
-
2056
- fix: function(event) {
2057
- // Short-circuit if the event has already been fixed by jQuery.event.fix
2058
- if ( event[ expando ] )
2059
- return event;
2060
-
2061
- // store a copy of the original event object
2062
- // and clone to set read-only properties
2063
- var originalEvent = event;
2064
- event = jQuery.extend({}, originalEvent);
2065
-
2066
- // Mark the event as fixed by jQuery.event.fix
2067
- event[ expando ] = true;
2068
-
2069
- // add preventDefault and stopPropagation since
2070
- // they will not work on the clone
2071
- event.preventDefault = function() {
2072
- // if preventDefault exists run it on the original event
2073
- if (originalEvent.preventDefault)
2074
- originalEvent.preventDefault();
2075
- // otherwise set the returnValue property of the original event to false (IE)
2076
- originalEvent.returnValue = false;
2077
- };
2078
- event.stopPropagation = function() {
2079
- // if stopPropagation exists run it on the original event
2080
- if (originalEvent.stopPropagation)
2081
- originalEvent.stopPropagation();
2082
- // otherwise set the cancelBubble property of the original event to true (IE)
2083
- originalEvent.cancelBubble = true;
2084
- };
2085
-
2086
- // Fix target property, if necessary
2087
- if ( !event.target )
2088
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
2089
-
2090
- // check if target is a textnode (safari)
2091
- if ( event.target.nodeType == 3 )
2092
- event.target = originalEvent.target.parentNode;
2093
-
2094
- // Add relatedTarget, if necessary
2095
- if ( !event.relatedTarget && event.fromElement )
2096
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
2097
-
2098
- // Calculate pageX/Y if missing and clientX/Y available
2099
- if ( event.pageX == null && event.clientX != null ) {
2100
- var doc = document.documentElement, body = document.body;
2101
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
2102
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
2103
- }
2104
-
2105
- // Add which for key events
2106
- if ( !event.which && (event.charCode || event.keyCode) )
2107
- event.which = event.charCode || event.keyCode;
2108
-
2109
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
2110
- if ( !event.metaKey && event.ctrlKey )
2111
- event.metaKey = event.ctrlKey;
2112
-
2113
- // Add which for click: 1 == left; 2 == middle; 3 == right
2114
- // Note: button is not normalized, so don't use it
2115
- if ( !event.which && event.button )
2116
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
2117
-
2118
- return event;
2119
- },
2120
-
2121
- special: {
2122
- ready: {
2123
- setup: function() {
2124
- // Make sure the ready event is setup
2125
- bindReady();
2126
- return;
2127
- },
2128
-
2129
- teardown: function() { return; }
2130
- },
2131
-
2132
- mouseenter: {
2133
- setup: function() {
2134
- if ( jQuery.browser.msie ) return false;
2135
- jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
2136
- return true;
2137
- },
2138
-
2139
- teardown: function() {
2140
- if ( jQuery.browser.msie ) return false;
2141
- jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler);
2142
- return true;
2143
- },
2144
-
2145
- handler: function(event) {
2146
- // If we actually just moused on to a sub-element, ignore it
2147
- if ( withinElement(event, this) ) return true;
2148
- // Execute the right handlers by setting the event type to mouseenter
2149
- arguments[0].type = "mouseenter";
2150
- return jQuery.event.handle.apply(this, arguments);
2151
- }
2152
- },
2153
-
2154
- mouseleave: {
2155
- setup: function() {
2156
- if ( jQuery.browser.msie ) return false;
2157
- jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
2158
- return true;
2159
- },
2160
-
2161
- teardown: function() {
2162
- if ( jQuery.browser.msie ) return false;
2163
- jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler);
2164
- return true;
2165
- },
2166
-
2167
- handler: function(event) {
2168
- // If we actually just moused on to a sub-element, ignore it
2169
- if ( withinElement(event, this) ) return true;
2170
- // Execute the right handlers by setting the event type to mouseleave
2171
- arguments[0].type = "mouseleave";
2172
- return jQuery.event.handle.apply(this, arguments);
2173
- }
2174
- }
2175
- }
2176
- };
2177
-
2178
- jQuery.fn.extend({
2179
- bind: function( type, data, fn ) {
2180
- return type == "unload" ? this.one(type, data, fn) : this.each(function(){
2181
- jQuery.event.add( this, type, fn || data, fn && data );
2182
- });
2183
- },
2184
-
2185
- one: function( type, data, fn ) {
2186
- return this.each(function(){
2187
- jQuery.event.add( this, type, function(event) {
2188
- jQuery(this).unbind(event);
2189
- return (fn || data).apply( this, arguments);
2190
- }, fn && data);
2191
- });
2192
- },
2193
-
2194
- unbind: function( type, fn ) {
2195
- return this.each(function(){
2196
- jQuery.event.remove( this, type, fn );
2197
- });
2198
- },
2199
-
2200
- trigger: function( type, data, fn ) {
2201
- return this.each(function(){
2202
- jQuery.event.trigger( type, data, this, true, fn );
2203
- });
2204
- },
2205
-
2206
- triggerHandler: function( type, data, fn ) {
2207
- if ( this[0] )
2208
- return jQuery.event.trigger( type, data, this[0], false, fn );
2209
- return undefined;
2210
- },
2211
-
2212
- toggle: function() {
2213
- // Save reference to arguments for access in closure
2214
- var args = arguments;
2215
-
2216
- return this.click(function(event) {
2217
- // Figure out which function to execute
2218
- this.lastToggle = 0 == this.lastToggle ? 1 : 0;
2219
-
2220
- // Make sure that clicks stop
2221
- event.preventDefault();
2222
-
2223
- // and execute the function
2224
- return args[this.lastToggle].apply( this, arguments ) || false;
2225
- });
2226
- },
2227
-
2228
- hover: function(fnOver, fnOut) {
2229
- return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut);
2230
- },
2231
-
2232
- ready: function(fn) {
2233
- // Attach the listeners
2234
- bindReady();
2235
-
2236
- // If the DOM is already ready
2237
- if ( jQuery.isReady )
2238
- // Execute the function immediately
2239
- fn.call( document, jQuery );
2240
-
2241
- // Otherwise, remember the function for later
2242
- else
2243
- // Add the function to the wait list
2244
- jQuery.readyList.push( function() { return fn.call(this, jQuery); } );
2245
-
2246
- return this;
2247
- }
2248
- });
2249
-
2250
- jQuery.extend({
2251
- isReady: false,
2252
- readyList: [],
2253
- // Handle when the DOM is ready
2254
- ready: function() {
2255
- // Make sure that the DOM is not already loaded
2256
- if ( !jQuery.isReady ) {
2257
- // Remember that the DOM is ready
2258
- jQuery.isReady = true;
2259
-
2260
- // If there are functions bound, to execute
2261
- if ( jQuery.readyList ) {
2262
- // Execute all of them
2263
- jQuery.each( jQuery.readyList, function(){
2264
- this.apply( document );
2265
- });
2266
-
2267
- // Reset the list of functions
2268
- jQuery.readyList = null;
2269
- }
2270
-
2271
- // Trigger any bound ready events
2272
- $(document).triggerHandler("ready");
2273
- }
2274
- }
2275
- });
2276
-
2277
- var readyBound = false;
2278
-
2279
- function bindReady(){
2280
- if ( readyBound ) return;
2281
- readyBound = true;
2282
-
2283
- // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
2284
- if ( document.addEventListener && !jQuery.browser.opera)
2285
- // Use the handy event callback
2286
- document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
2287
-
2288
- // If IE is used and is not in a frame
2289
- // Continually check to see if the document is ready
2290
- if ( jQuery.browser.msie && window == top ) (function(){
2291
- if (jQuery.isReady) return;
2292
- try {
2293
- // If IE is used, use the trick by Diego Perini
2294
- // http://javascript.nwbox.com/IEContentLoaded/
2295
- document.documentElement.doScroll("left");
2296
- } catch( error ) {
2297
- setTimeout( arguments.callee, 0 );
2298
- return;
2299
- }
2300
- // and execute any waiting functions
2301
- jQuery.ready();
2302
- })();
2303
-
2304
- if ( jQuery.browser.opera )
2305
- document.addEventListener( "DOMContentLoaded", function () {
2306
- if (jQuery.isReady) return;
2307
- for (var i = 0; i < document.styleSheets.length; i++)
2308
- if (document.styleSheets[i].disabled) {
2309
- setTimeout( arguments.callee, 0 );
2310
- return;
2311
- }
2312
- // and execute any waiting functions
2313
- jQuery.ready();
2314
- }, false);
2315
-
2316
- if ( jQuery.browser.safari ) {
2317
- var numStyles;
2318
- (function(){
2319
- if (jQuery.isReady) return;
2320
- if ( document.readyState != "loaded" && document.readyState != "complete" ) {
2321
- setTimeout( arguments.callee, 0 );
2322
- return;
2323
- }
2324
- if ( numStyles === undefined )
2325
- numStyles = jQuery("style, link[rel=stylesheet]").length;
2326
- if ( document.styleSheets.length != numStyles ) {
2327
- setTimeout( arguments.callee, 0 );
2328
- return;
2329
- }
2330
- // and execute any waiting functions
2331
- jQuery.ready();
2332
- })();
2333
- }
2334
-
2335
- // A fallback to window.onload, that will always work
2336
- jQuery.event.add( window, "load", jQuery.ready );
2337
- }
2338
-
2339
- jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
2340
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
2341
- "submit,keydown,keypress,keyup,error").split(","), function(i, name){
2342
-
2343
- // Handle event binding
2344
- jQuery.fn[name] = function(fn){
2345
- return fn ? this.bind(name, fn) : this.trigger(name);
2346
- };
2347
- });
2348
-
2349
- // Checks if an event happened on an element within another element
2350
- // Used in jQuery.event.special.mouseenter and mouseleave handlers
2351
- var withinElement = function(event, elem) {
2352
- // Check if mouse(over|out) are still within the same parent element
2353
- var parent = event.relatedTarget;
2354
- // Traverse up the tree
2355
- while ( parent && parent != elem ) try { parent = parent.parentNode } catch(error) { parent = elem; };
2356
- // Return true if we actually just moused on to a sub-element
2357
- return parent == elem;
2358
- };
2359
-
2360
- // Prevent memory leaks in IE
2361
- // And prevent errors on refresh with events like mouseover in other browsers
2362
- // Window isn't included so as not to unbind existing unload events
2363
- jQuery(window).bind("unload", function() {
2364
- jQuery("*").add(document).unbind();
2365
- });
2366
- jQuery.fn.extend({
2367
- load: function( url, params, callback ) {
2368
- if ( jQuery.isFunction( url ) )
2369
- return this.bind("load", url);
2370
-
2371
- var off = url.indexOf(" ");
2372
- if ( off >= 0 ) {
2373
- var selector = url.slice(off, url.length);
2374
- url = url.slice(0, off);
2375
- }
2376
-
2377
- callback = callback || function(){};
2378
-
2379
- // Default to a GET request
2380
- var type = "GET";
2381
-
2382
- // If the second parameter was provided
2383
- if ( params )
2384
- // If it's a function
2385
- if ( jQuery.isFunction( params ) ) {
2386
- // We assume that it's the callback
2387
- callback = params;
2388
- params = null;
2389
-
2390
- // Otherwise, build a param string
2391
- } else {
2392
- params = jQuery.param( params );
2393
- type = "POST";
2394
- }
2395
-
2396
- var self = this;
2397
-
2398
- // Request the remote document
2399
- jQuery.ajax({
2400
- url: url,
2401
- type: type,
2402
- dataType: "html",
2403
- data: params,
2404
- complete: function(res, status){
2405
- // If successful, inject the HTML into all the matched elements
2406
- if ( status == "success" || status == "notmodified" )
2407
- // See if a selector was specified
2408
- self.html( selector ?
2409
- // Create a dummy div to hold the results
2410
- jQuery("<div/>")
2411
- // inject the contents of the document in, removing the scripts
2412
- // to avoid any 'Permission Denied' errors in IE
2413
- .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
2414
-
2415
- // Locate the specified elements
2416
- .find(selector) :
2417
-
2418
- // If not, just inject the full result
2419
- res.responseText );
2420
-
2421
- self.each( callback, [res.responseText, status, res] );
2422
- }
2423
- });
2424
- return this;
2425
- },
2426
-
2427
- serialize: function() {
2428
- return jQuery.param(this.serializeArray());
2429
- },
2430
- serializeArray: function() {
2431
- return this.map(function(){
2432
- return jQuery.nodeName(this, "form") ?
2433
- jQuery.makeArray(this.elements) : this;
2434
- })
2435
- .filter(function(){
2436
- return this.name && !this.disabled &&
2437
- (this.checked || /select|textarea/i.test(this.nodeName) ||
2438
- /text|hidden|password/i.test(this.type));
2439
- })
2440
- .map(function(i, elem){
2441
- var val = jQuery(this).val();
2442
- return val == null ? null :
2443
- val.constructor == Array ?
2444
- jQuery.map( val, function(val, i){
2445
- return {name: elem.name, value: val};
2446
- }) :
2447
- {name: elem.name, value: val};
2448
- }).get();
2449
- }
2450
- });
2451
-
2452
- // Attach a bunch of functions for handling common AJAX events
2453
- jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
2454
- jQuery.fn[o] = function(f){
2455
- return this.bind(o, f);
2456
- };
2457
- });
2458
-
2459
- var jsc = (new Date).getTime();
2460
-
2461
- jQuery.extend({
2462
- get: function( url, data, callback, type ) {
2463
- // shift arguments if data argument was ommited
2464
- if ( jQuery.isFunction( data ) ) {
2465
- callback = data;
2466
- data = null;
2467
- }
2468
-
2469
- return jQuery.ajax({
2470
- type: "GET",
2471
- url: url,
2472
- data: data,
2473
- success: callback,
2474
- dataType: type
2475
- });
2476
- },
2477
-
2478
- getScript: function( url, callback ) {
2479
- return jQuery.get(url, null, callback, "script");
2480
- },
2481
-
2482
- getJSON: function( url, data, callback ) {
2483
- return jQuery.get(url, data, callback, "json");
2484
- },
2485
-
2486
- post: function( url, data, callback, type ) {
2487
- if ( jQuery.isFunction( data ) ) {
2488
- callback = data;
2489
- data = {};
2490
- }
2491
-
2492
- return jQuery.ajax({
2493
- type: "POST",
2494
- url: url,
2495
- data: data,
2496
- success: callback,
2497
- dataType: type
2498
- });
2499
- },
2500
-
2501
- ajaxSetup: function( settings ) {
2502
- jQuery.extend( jQuery.ajaxSettings, settings );
2503
- },
2504
-
2505
- ajaxSettings: {
2506
- global: true,
2507
- type: "GET",
2508
- timeout: 0,
2509
- contentType: "application/x-www-form-urlencoded",
2510
- processData: true,
2511
- async: true,
2512
- data: null
2513
- },
2514
-
2515
- // Last-Modified header cache for next request
2516
- lastModified: {},
2517
-
2518
- ajax: function( s ) {
2519
- var jsonp, jsre = /=\?(&|$)/g, status, data;
2520
-
2521
- // Extend the settings, but re-extend 's' so that it can be
2522
- // checked again later (in the test suite, specifically)
2523
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
2524
-
2525
- // convert data if not already a string
2526
- if ( s.data && s.processData && typeof s.data != "string" )
2527
- s.data = jQuery.param(s.data);
2528
-
2529
- // Handle JSONP Parameter Callbacks
2530
- if ( s.dataType == "jsonp" ) {
2531
- if ( s.type.toLowerCase() == "get" ) {
2532
- if ( !s.url.match(jsre) )
2533
- s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
2534
- } else if ( !s.data || !s.data.match(jsre) )
2535
- s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
2536
- s.dataType = "json";
2537
- }
2538
-
2539
- // Build temporary JSONP function
2540
- if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
2541
- jsonp = "jsonp" + jsc++;
2542
-
2543
- // Replace the =? sequence both in the query string and the data
2544
- if ( s.data )
2545
- s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
2546
- s.url = s.url.replace(jsre, "=" + jsonp + "$1");
2547
-
2548
- // We need to make sure
2549
- // that a JSONP style response is executed properly
2550
- s.dataType = "script";
2551
-
2552
- // Handle JSONP-style loading
2553
- window[ jsonp ] = function(tmp){
2554
- data = tmp;
2555
- success();
2556
- complete();
2557
- // Garbage collect
2558
- window[ jsonp ] = undefined;
2559
- try{ delete window[ jsonp ]; } catch(e){}
2560
- if ( head )
2561
- head.removeChild( script );
2562
- };
2563
- }
2564
-
2565
- if ( s.dataType == "script" && s.cache == null )
2566
- s.cache = false;
2567
-
2568
- if ( s.cache === false && s.type.toLowerCase() == "get" ) {
2569
- var ts = (new Date()).getTime();
2570
- // try replacing _= if it is there
2571
- var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
2572
- // if nothing was replaced, add timestamp to the end
2573
- s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
2574
- }
2575
-
2576
- // If data is available, append data to url for get requests
2577
- if ( s.data && s.type.toLowerCase() == "get" ) {
2578
- s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
2579
-
2580
- // IE likes to send both get and post data, prevent this
2581
- s.data = null;
2582
- }
2583
-
2584
- // Watch for a new set of requests
2585
- if ( s.global && ! jQuery.active++ )
2586
- jQuery.event.trigger( "ajaxStart" );
2587
-
2588
- // If we're requesting a remote document
2589
- // and trying to load JSON or Script with a GET
2590
- if ( (!s.url.indexOf("http") || !s.url.indexOf("//")) && ( s.dataType == "script" || s.dataType =="json" ) && s.type.toLowerCase() == "get" ) {
2591
- var head = document.getElementsByTagName("head")[0];
2592
- var script = document.createElement("script");
2593
- script.src = s.url;
2594
- if (s.scriptCharset)
2595
- script.charset = s.scriptCharset;
2596
-
2597
- // Handle Script loading
2598
- if ( !jsonp ) {
2599
- var done = false;
2600
-
2601
- // Attach handlers for all browsers
2602
- script.onload = script.onreadystatechange = function(){
2603
- if ( !done && (!this.readyState ||
2604
- this.readyState == "loaded" || this.readyState == "complete") ) {
2605
- done = true;
2606
- success();
2607
- complete();
2608
- head.removeChild( script );
2609
- }
2610
- };
2611
- }
2612
-
2613
- head.appendChild(script);
2614
-
2615
- // We handle everything using the script element injection
2616
- return undefined;
2617
- }
2618
-
2619
- var requestDone = false;
2620
-
2621
- // Create the request object; Microsoft failed to properly
2622
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
2623
- var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
2624
-
2625
- // Open the socket
2626
- xml.open(s.type, s.url, s.async);
2627
-
2628
- // Need an extra try/catch for cross domain requests in Firefox 3
2629
- try {
2630
- // Set the correct header, if data is being sent
2631
- if ( s.data )
2632
- xml.setRequestHeader("Content-Type", s.contentType);
2633
-
2634
- // Set the If-Modified-Since header, if ifModified mode.
2635
- if ( s.ifModified )
2636
- xml.setRequestHeader("If-Modified-Since",
2637
- jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
2638
-
2639
- // Set header so the called script knows that it's an XMLHttpRequest
2640
- xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
2641
- } catch(e){}
2642
-
2643
- // Allow custom headers/mimetypes
2644
- if ( s.beforeSend )
2645
- s.beforeSend(xml);
2646
-
2647
- if ( s.global )
2648
- jQuery.event.trigger("ajaxSend", [xml, s]);
2649
-
2650
- // Wait for a response to come back
2651
- var onreadystatechange = function(isTimeout){
2652
- // The transfer is complete and the data is available, or the request timed out
2653
- if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
2654
- requestDone = true;
2655
-
2656
- // clear poll interval
2657
- if (ival) {
2658
- clearInterval(ival);
2659
- ival = null;
2660
- }
2661
-
2662
- status = isTimeout == "timeout" && "timeout" ||
2663
- !jQuery.httpSuccess( xml ) && "error" ||
2664
- s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
2665
- "success";
2666
-
2667
- if ( status == "success" ) {
2668
- // Watch for, and catch, XML document parse errors
2669
- try {
2670
- // process the data (runs the xml through httpData regardless of callback)
2671
- data = jQuery.httpData( xml, s.dataType );
2672
- } catch(e) {
2673
- status = "parsererror";
2674
- }
2675
- }
2676
-
2677
- // Make sure that the request was successful or notmodified
2678
- if ( status == "success" ) {
2679
- // Cache Last-Modified header, if ifModified mode.
2680
- var modRes;
2681
- try {
2682
- modRes = xml.getResponseHeader("Last-Modified");
2683
- } catch(e) {} // swallow exception thrown by FF if header is not available
2684
-
2685
- if ( s.ifModified && modRes )
2686
- jQuery.lastModified[s.url] = modRes;
2687
-
2688
- // JSONP handles its own success callback
2689
- if ( !jsonp )
2690
- success();
2691
- } else
2692
- jQuery.handleError(s, xml, status);
2693
-
2694
- // Fire the complete handlers
2695
- complete();
2696
-
2697
- // Stop memory leaks
2698
- if ( s.async )
2699
- xml = null;
2700
- }
2701
- };
2702
-
2703
- if ( s.async ) {
2704
- // don't attach the handler to the request, just poll it instead
2705
- var ival = setInterval(onreadystatechange, 13);
2706
-
2707
- // Timeout checker
2708
- if ( s.timeout > 0 )
2709
- setTimeout(function(){
2710
- // Check to see if the request is still happening
2711
- if ( xml ) {
2712
- // Cancel the request
2713
- xml.abort();
2714
-
2715
- if( !requestDone )
2716
- onreadystatechange( "timeout" );
2717
- }
2718
- }, s.timeout);
2719
- }
2720
-
2721
- // Send the data
2722
- try {
2723
- xml.send(s.data);
2724
- } catch(e) {
2725
- jQuery.handleError(s, xml, null, e);
2726
- }
2727
-
2728
- // firefox 1.5 doesn't fire statechange for sync requests
2729
- if ( !s.async )
2730
- onreadystatechange();
2731
-
2732
- function success(){
2733
- // If a local callback was specified, fire it and pass it the data
2734
- if ( s.success )
2735
- s.success( data, status );
2736
-
2737
- // Fire the global callback
2738
- if ( s.global )
2739
- jQuery.event.trigger( "ajaxSuccess", [xml, s] );
2740
- }
2741
-
2742
- function complete(){
2743
- // Process result
2744
- if ( s.complete )
2745
- s.complete(xml, status);
2746
-
2747
- // The request was completed
2748
- if ( s.global )
2749
- jQuery.event.trigger( "ajaxComplete", [xml, s] );
2750
-
2751
- // Handle the global AJAX counter
2752
- if ( s.global && ! --jQuery.active )
2753
- jQuery.event.trigger( "ajaxStop" );
2754
- }
2755
-
2756
- // return XMLHttpRequest to allow aborting the request etc.
2757
- return xml;
2758
- },
2759
-
2760
- handleError: function( s, xml, status, e ) {
2761
- // If a local callback was specified, fire it
2762
- if ( s.error ) s.error( xml, status, e );
2763
-
2764
- // Fire the global callback
2765
- if ( s.global )
2766
- jQuery.event.trigger( "ajaxError", [xml, s, e] );
2767
- },
2768
-
2769
- // Counter for holding the number of active queries
2770
- active: 0,
2771
-
2772
- // Determines if an XMLHttpRequest was successful or not
2773
- httpSuccess: function( r ) {
2774
- try {
2775
- // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
2776
- return !r.status && location.protocol == "file:" ||
2777
- ( r.status >= 200 && r.status < 300 ) || r.status == 304 || r.status == 1223 ||
2778
- jQuery.browser.safari && r.status == undefined;
2779
- } catch(e){}
2780
- return false;
2781
- },
2782
-
2783
- // Determines if an XMLHttpRequest returns NotModified
2784
- httpNotModified: function( xml, url ) {
2785
- try {
2786
- var xmlRes = xml.getResponseHeader("Last-Modified");
2787
-
2788
- // Firefox always returns 200. check Last-Modified date
2789
- return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
2790
- jQuery.browser.safari && xml.status == undefined;
2791
- } catch(e){}
2792
- return false;
2793
- },
2794
-
2795
- httpData: function( r, type ) {
2796
- var ct = r.getResponseHeader("content-type");
2797
- var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
2798
- var data = xml ? r.responseXML : r.responseText;
2799
-
2800
- if ( xml && data.documentElement.tagName == "parsererror" )
2801
- throw "parsererror";
2802
-
2803
- // If the type is "script", eval it in global context
2804
- if ( type == "script" )
2805
- jQuery.globalEval( data );
2806
-
2807
- // Get the JavaScript object, if JSON is used.
2808
- if ( type == "json" )
2809
- data = eval("(" + data + ")");
2810
-
2811
- return data;
2812
- },
2813
-
2814
- // Serialize an array of form elements or a set of
2815
- // key/values into a query string
2816
- param: function( a ) {
2817
- var s = [];
2818
-
2819
- // If an array was passed in, assume that it is an array
2820
- // of form elements
2821
- if ( a.constructor == Array || a.jquery )
2822
- // Serialize the form elements
2823
- jQuery.each( a, function(){
2824
- s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
2825
- });
2826
-
2827
- // Otherwise, assume that it's an object of key/value pairs
2828
- else
2829
- // Serialize the key/values
2830
- for ( var j in a )
2831
- // If the value is an array then the key names need to be repeated
2832
- if ( a[j] && a[j].constructor == Array )
2833
- jQuery.each( a[j], function(){
2834
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
2835
- });
2836
- else
2837
- s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
2838
-
2839
- // Return the resulting serialization
2840
- return s.join("&").replace(/%20/g, "+");
2841
- }
2842
-
2843
- });
2844
- jQuery.fn.extend({
2845
- show: function(speed,callback){
2846
- return speed ?
2847
- this.animate({
2848
- height: "show", width: "show", opacity: "show"
2849
- }, speed, callback) :
2850
-
2851
- this.filter(":hidden").each(function(){
2852
- this.style.display = this.oldblock || "";
2853
- if ( jQuery.css(this,"display") == "none" ) {
2854
- var elem = jQuery("<" + this.tagName + " />").appendTo("body");
2855
- this.style.display = elem.css("display");
2856
- elem.remove();
2857
- }
2858
- }).end();
2859
- },
2860
-
2861
- hide: function(speed,callback){
2862
- return speed ?
2863
- this.animate({
2864
- height: "hide", width: "hide", opacity: "hide"
2865
- }, speed, callback) :
2866
-
2867
- this.filter(":visible").each(function(){
2868
- this.oldblock = this.oldblock || jQuery.css(this,"display");
2869
- this.style.display = "none";
2870
- }).end();
2871
- },
2872
-
2873
- // Save the old toggle function
2874
- _toggle: jQuery.fn.toggle,
2875
-
2876
- toggle: function( fn, fn2 ){
2877
- return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
2878
- this._toggle( fn, fn2 ) :
2879
- fn ?
2880
- this.animate({
2881
- height: "toggle", width: "toggle", opacity: "toggle"
2882
- }, fn, fn2) :
2883
- this.each(function(){
2884
- jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
2885
- });
2886
- },
2887
-
2888
- slideDown: function(speed,callback){
2889
- return this.animate({height: "show"}, speed, callback);
2890
- },
2891
-
2892
- slideUp: function(speed,callback){
2893
- return this.animate({height: "hide"}, speed, callback);
2894
- },
2895
-
2896
- slideToggle: function(speed, callback){
2897
- return this.animate({height: "toggle"}, speed, callback);
2898
- },
2899
-
2900
- fadeIn: function(speed, callback){
2901
- return this.animate({opacity: "show"}, speed, callback);
2902
- },
2903
-
2904
- fadeOut: function(speed, callback){
2905
- return this.animate({opacity: "hide"}, speed, callback);
2906
- },
2907
-
2908
- fadeTo: function(speed,to,callback){
2909
- return this.animate({opacity: to}, speed, callback);
2910
- },
2911
-
2912
- animate: function( prop, speed, easing, callback ) {
2913
- var optall = jQuery.speed(speed, easing, callback);
2914
-
2915
- return this[ optall.queue === false ? "each" : "queue" ](function(){
2916
- if ( this.nodeType != 1)
2917
- return false;
2918
-
2919
- var opt = jQuery.extend({}, optall);
2920
- var hidden = jQuery(this).is(":hidden"), self = this;
2921
-
2922
- for ( var p in prop ) {
2923
- if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
2924
- return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
2925
-
2926
- if ( p == "height" || p == "width" ) {
2927
- // Store display property
2928
- opt.display = jQuery.css(this, "display");
2929
-
2930
- // Make sure that nothing sneaks out
2931
- opt.overflow = this.style.overflow;
2932
- }
2933
- }
2934
-
2935
- if ( opt.overflow != null )
2936
- this.style.overflow = "hidden";
2937
-
2938
- opt.curAnim = jQuery.extend({}, prop);
2939
-
2940
- jQuery.each( prop, function(name, val){
2941
- var e = new jQuery.fx( self, opt, name );
2942
-
2943
- if ( /toggle|show|hide/.test(val) )
2944
- e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
2945
- else {
2946
- var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
2947
- start = e.cur(true) || 0;
2948
-
2949
- if ( parts ) {
2950
- var end = parseFloat(parts[2]),
2951
- unit = parts[3] || "px";
2952
-
2953
- // We need to compute starting value
2954
- if ( unit != "px" ) {
2955
- self.style[ name ] = (end || 1) + unit;
2956
- start = ((end || 1) / e.cur(true)) * start;
2957
- self.style[ name ] = start + unit;
2958
- }
2959
-
2960
- // If a +=/-= token was provided, we're doing a relative animation
2961
- if ( parts[1] )
2962
- end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
2963
-
2964
- e.custom( start, end, unit );
2965
- } else
2966
- e.custom( start, val, "" );
2967
- }
2968
- });
2969
-
2970
- // For JS strict compliance
2971
- return true;
2972
- });
2973
- },
2974
-
2975
- queue: function(type, fn){
2976
- if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
2977
- fn = type;
2978
- type = "fx";
2979
- }
2980
-
2981
- if ( !type || (typeof type == "string" && !fn) )
2982
- return queue( this[0], type );
2983
-
2984
- return this.each(function(){
2985
- if ( this.nodeType != 1)
2986
- return;
2987
-
2988
- if ( fn.constructor == Array )
2989
- queue(this, type, fn);
2990
- else {
2991
- queue(this, type).push( fn );
2992
-
2993
- if ( queue(this, type).length == 1 )
2994
- fn.apply(this);
2995
- }
2996
- });
2997
- },
2998
-
2999
- stop: function(clearQueue, gotoEnd){
3000
- var timers = jQuery.timers;
3001
-
3002
- if (clearQueue)
3003
- this.queue([]);
3004
-
3005
- this.each(function(){
3006
- // go in reverse order so anything added to the queue during the loop is ignored
3007
- for ( var i = timers.length - 1; i >= 0; i-- )
3008
- if ( timers[i].elem == this ) {
3009
- if (gotoEnd)
3010
- // force the next step to be the last
3011
- timers[i](true);
3012
- timers.splice(i, 1);
3013
- }
3014
- });
3015
-
3016
- // start the next in the queue if the last step wasn't forced
3017
- if (!gotoEnd)
3018
- this.dequeue();
3019
-
3020
- return this;
3021
- }
3022
-
3023
- });
3024
-
3025
- var queue = function( elem, type, array ) {
3026
- if ( !elem )
3027
- return undefined;
3028
-
3029
- type = type || "fx";
3030
-
3031
- var q = jQuery.data( elem, type + "queue" );
3032
-
3033
- if ( !q || array )
3034
- q = jQuery.data( elem, type + "queue",
3035
- array ? jQuery.makeArray(array) : [] );
3036
-
3037
- return q;
3038
- };
3039
-
3040
- jQuery.fn.dequeue = function(type){
3041
- type = type || "fx";
3042
-
3043
- return this.each(function(){
3044
- var q = queue(this, type);
3045
-
3046
- q.shift();
3047
-
3048
- if ( q.length )
3049
- q[0].apply( this );
3050
- });
3051
- };
3052
-
3053
- jQuery.extend({
3054
-
3055
- speed: function(speed, easing, fn) {
3056
- var opt = speed && speed.constructor == Object ? speed : {
3057
- complete: fn || !fn && easing ||
3058
- jQuery.isFunction( speed ) && speed,
3059
- duration: speed,
3060
- easing: fn && easing || easing && easing.constructor != Function && easing
3061
- };
3062
-
3063
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
3064
- opt.duration :
3065
- { slow: 600, fast: 200 }[opt.duration]) || 400;
3066
-
3067
- // Queueing
3068
- opt.old = opt.complete;
3069
- opt.complete = function(){
3070
- if ( opt.queue !== false )
3071
- jQuery(this).dequeue();
3072
- if ( jQuery.isFunction( opt.old ) )
3073
- opt.old.apply( this );
3074
- };
3075
-
3076
- return opt;
3077
- },
3078
-
3079
- easing: {
3080
- linear: function( p, n, firstNum, diff ) {
3081
- return firstNum + diff * p;
3082
- },
3083
- swing: function( p, n, firstNum, diff ) {
3084
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
3085
- }
3086
- },
3087
-
3088
- timers: [],
3089
- timerId: null,
3090
-
3091
- fx: function( elem, options, prop ){
3092
- this.options = options;
3093
- this.elem = elem;
3094
- this.prop = prop;
3095
-
3096
- if ( !options.orig )
3097
- options.orig = {};
3098
- }
3099
-
3100
- });
3101
-
3102
- jQuery.fx.prototype = {
3103
-
3104
- // Simple function for setting a style value
3105
- update: function(){
3106
- if ( this.options.step )
3107
- this.options.step.apply( this.elem, [ this.now, this ] );
3108
-
3109
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
3110
-
3111
- // Set display property to block for height/width animations
3112
- if ( this.prop == "height" || this.prop == "width" )
3113
- this.elem.style.display = "block";
3114
- },
3115
-
3116
- // Get the current size
3117
- cur: function(force){
3118
- if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
3119
- return this.elem[ this.prop ];
3120
-
3121
- var r = parseFloat(jQuery.css(this.elem, this.prop, force));
3122
- return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
3123
- },
3124
-
3125
- // Start an animation from one number to another
3126
- custom: function(from, to, unit){
3127
- this.startTime = (new Date()).getTime();
3128
- this.start = from;
3129
- this.end = to;
3130
- this.unit = unit || this.unit || "px";
3131
- this.now = this.start;
3132
- this.pos = this.state = 0;
3133
- this.update();
3134
-
3135
- var self = this;
3136
- function t(gotoEnd){
3137
- return self.step(gotoEnd);
3138
- }
3139
-
3140
- t.elem = this.elem;
3141
-
3142
- jQuery.timers.push(t);
3143
-
3144
- if ( jQuery.timerId == null ) {
3145
- jQuery.timerId = setInterval(function(){
3146
- var timers = jQuery.timers;
3147
-
3148
- for ( var i = 0; i < timers.length; i++ )
3149
- if ( !timers[i]() )
3150
- timers.splice(i--, 1);
3151
-
3152
- if ( !timers.length ) {
3153
- clearInterval( jQuery.timerId );
3154
- jQuery.timerId = null;
3155
- }
3156
- }, 13);
3157
- }
3158
- },
3159
-
3160
- // Simple 'show' function
3161
- show: function(){
3162
- // Remember where we started, so that we can go back to it later
3163
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
3164
- this.options.show = true;
3165
-
3166
- // Begin the animation
3167
- this.custom(0, this.cur());
3168
-
3169
- // Make sure that we start at a small width/height to avoid any
3170
- // flash of content
3171
- if ( this.prop == "width" || this.prop == "height" )
3172
- this.elem.style[this.prop] = "1px";
3173
-
3174
- // Start by showing the element
3175
- jQuery(this.elem).show();
3176
- },
3177
-
3178
- // Simple 'hide' function
3179
- hide: function(){
3180
- // Remember where we started, so that we can go back to it later
3181
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
3182
- this.options.hide = true;
3183
-
3184
- // Begin the animation
3185
- this.custom(this.cur(), 0);
3186
- },
3187
-
3188
- // Each step of an animation
3189
- step: function(gotoEnd){
3190
- var t = (new Date()).getTime();
3191
-
3192
- if ( gotoEnd || t > this.options.duration + this.startTime ) {
3193
- this.now = this.end;
3194
- this.pos = this.state = 1;
3195
- this.update();
3196
-
3197
- this.options.curAnim[ this.prop ] = true;
3198
-
3199
- var done = true;
3200
- for ( var i in this.options.curAnim )
3201
- if ( this.options.curAnim[i] !== true )
3202
- done = false;
3203
-
3204
- if ( done ) {
3205
- if ( this.options.display != null ) {
3206
- // Reset the overflow
3207
- this.elem.style.overflow = this.options.overflow;
3208
-
3209
- // Reset the display
3210
- this.elem.style.display = this.options.display;
3211
- if ( jQuery.css(this.elem, "display") == "none" )
3212
- this.elem.style.display = "block";
3213
- }
3214
-
3215
- // Hide the element if the "hide" operation was done
3216
- if ( this.options.hide )
3217
- this.elem.style.display = "none";
3218
-
3219
- // Reset the properties, if the item has been hidden or shown
3220
- if ( this.options.hide || this.options.show )
3221
- for ( var p in this.options.curAnim )
3222
- jQuery.attr(this.elem.style, p, this.options.orig[p]);
3223
- }
3224
-
3225
- // If a callback was provided, execute it
3226
- if ( done && jQuery.isFunction( this.options.complete ) )
3227
- // Execute the complete function
3228
- this.options.complete.apply( this.elem );
3229
-
3230
- return false;
3231
- } else {
3232
- var n = t - this.startTime;
3233
- this.state = n / this.options.duration;
3234
-
3235
- // Perform the easing function, defaults to swing
3236
- this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
3237
- this.now = this.start + ((this.end - this.start) * this.pos);
3238
-
3239
- // Perform the next step of the animation
3240
- this.update();
3241
- }
3242
-
3243
- return true;
3244
- }
3245
-
3246
- };
3247
-
3248
- jQuery.fx.step = {
3249
- scrollLeft: function(fx){
3250
- fx.elem.scrollLeft = fx.now;
3251
- },
3252
-
3253
- scrollTop: function(fx){
3254
- fx.elem.scrollTop = fx.now;
3255
- },
3256
-
3257
- opacity: function(fx){
3258
- jQuery.attr(fx.elem.style, "opacity", fx.now);
3259
- },
3260
-
3261
- _default: function(fx){
3262
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
3263
- }
3264
- };
3265
- // The Offset Method
3266
- // Originally By Brandon Aaron, part of the Dimension Plugin
3267
- // http://jquery.com/plugins/project/dimensions
3268
- jQuery.fn.offset = function() {
3269
- var left = 0, top = 0, elem = this[0], results;
3270
-
3271
- if ( elem ) with ( jQuery.browser ) {
3272
- var parent = elem.parentNode,
3273
- offsetChild = elem,
3274
- offsetParent = elem.offsetParent,
3275
- doc = elem.ownerDocument,
3276
- safari2 = safari && parseInt(version) < 522,
3277
- fixed = jQuery.css(elem, "position") == "fixed";
3278
-
3279
- // Use getBoundingClientRect if available
3280
- if ( elem.getBoundingClientRect ) {
3281
- var box = elem.getBoundingClientRect();
3282
-
3283
- // Add the document scroll offsets
3284
- add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
3285
- box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop));
3286
-
3287
- // IE adds the HTML element's border, by default it is medium which is 2px
3288
- // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; }
3289
- // IE 7 standards mode, the border is always 2px
3290
- // This border/offset is typically represented by the clientLeft and clientTop properties
3291
- // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS
3292
- // Therefore this method will be off by 2px in IE while in quirksmode
3293
- add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop );
3294
-
3295
- // Otherwise loop through the offsetParents and parentNodes
3296
- } else {
3297
-
3298
- // Initial element offsets
3299
- add( elem.offsetLeft, elem.offsetTop );
3300
-
3301
- // Get parent offsets
3302
- while ( offsetParent ) {
3303
- // Add offsetParent offsets
3304
- add( offsetParent.offsetLeft, offsetParent.offsetTop );
3305
-
3306
- // Mozilla and Safari > 2 does not include the border on offset parents
3307
- // However Mozilla adds the border for table or table cells
3308
- if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 )
3309
- border( offsetParent );
3310
-
3311
- // Add the document scroll offsets if position is fixed on any offsetParent
3312
- if ( !fixed && jQuery.css(offsetParent, "position") == "fixed" )
3313
- fixed = true;
3314
-
3315
- // Set offsetChild to previous offsetParent unless it is the body element
3316
- offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent;
3317
- // Get next offsetParent
3318
- offsetParent = offsetParent.offsetParent;
3319
- }
3320
-
3321
- // Get parent scroll offsets
3322
- while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
3323
- // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug
3324
- if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) )
3325
- // Subtract parent scroll offsets
3326
- add( -parent.scrollLeft, -parent.scrollTop );
3327
-
3328
- // Mozilla does not add the border for a parent that has overflow != visible
3329
- if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
3330
- border( parent );
3331
-
3332
- // Get next parent
3333
- parent = parent.parentNode;
3334
- }
3335
-
3336
- // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild
3337
- // Mozilla doubles body offsets with a non-absolutely positioned offsetChild
3338
- if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) ||
3339
- (mozilla && jQuery.css(offsetChild, "position") != "absolute") )
3340
- add( -doc.body.offsetLeft, -doc.body.offsetTop );
3341
-
3342
- // Add the document scroll offsets if position is fixed
3343
- if ( fixed )
3344
- add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
3345
- Math.max(doc.documentElement.scrollTop, doc.body.scrollTop));
3346
- }
3347
-
3348
- // Return an object with top and left properties
3349
- results = { top: top, left: left };
3350
- }
3351
-
3352
- function border(elem) {
3353
- add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) );
3354
- }
3355
-
3356
- function add(l, t) {
3357
- left += parseInt(l) || 0;
3358
- top += parseInt(t) || 0;
3359
- }
3360
-
3361
- return results;
3362
- };
3363
- })();