compass-jquery-plugin 0.3.2.6 → 0.3.2.7.nil

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/README.md +2 -1
  2. data/VERSION.yml +2 -2
  3. data/lib/handle_js_files.rb +21 -2
  4. data/templates/dynatree/jquery.dynatree.js +23 -20
  5. data/templates/dynatree/jquery.dynatree.min.js +38 -38
  6. data/templates/dynatree/jquery/dynatree/aero.scss +1 -1
  7. data/templates/dynatree/jquery/dynatree/aqua.scss +1 -1
  8. data/templates/dynatree/jquery/dynatree/crystal.scss +1 -1
  9. data/templates/dynatree/jquery/dynatree/xp.scss +2 -2
  10. data/templates/ical/jquery/ical.scss +10 -10
  11. data/templates/jqgrid/i18n/jqgrid/locale-lt.js +134 -0
  12. data/templates/jqgrid/i18n/jqgrid/locale-lt.min.js +7 -0
  13. data/templates/jqgrid/jquery.jqGrid.js +155 -65
  14. data/templates/jqgrid/jquery.jqGrid.min.js +396 -393
  15. data/templates/jqgrid/manifest.rb +2 -0
  16. data/templates/jqtouch/jquery.jqtouch.js +166 -195
  17. data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
  18. data/templates/jqtouch/jquery/touch/apple.scss +5 -5
  19. data/templates/jqtouch/jquery/touch/default.scss +5 -5
  20. data/templates/jqtouch/jquery/touch/jqt.scss +12 -7
  21. data/templates/jqtouch/jquery/touch/jqtouch.scss +11 -13
  22. data/templates/jquery/history.adapter.jquery.js +54 -67
  23. data/templates/jquery/history.adapter.jquery.min.js +2 -2
  24. data/templates/jquery/history.html4.js +587 -680
  25. data/templates/jquery/history.html4.min.js +8 -18
  26. data/templates/jquery/history.js +1670 -1289
  27. data/templates/jquery/history.min.js +25 -21
  28. data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +1 -1
  29. data/templates/jquery/i18n/jquery.ui/datepicker-ar.min.js +1 -1
  30. data/templates/jquery/i18n/jquery.ui/datepicker-tj.js +23 -0
  31. data/templates/jquery/i18n/jquery.ui/datepicker-tj.min.js +2 -0
  32. data/templates/jquery/jquery-ui.js +97 -61
  33. data/templates/jquery/jquery-ui.min.js +175 -175
  34. data/templates/jquery/jquery.dst.js +86 -151
  35. data/templates/jquery/jquery/ui/_theme.scss +13 -13
  36. data/templates/jquery/json2.js +214 -214
  37. data/templates/jquery/manifest.rb +2 -0
  38. data/templates/mobile/jquery.mobile.js +324 -225
  39. data/templates/mobile/jquery.mobile.min.js +4 -4
  40. data/templates/mobile/jquery/mobile/_base.scss +60 -48
  41. data/templates/mobile/jquery/mobile/default.scss +57 -80
  42. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  43. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  44. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  45. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  46. data/templates/mobile/jquery/mobile/valencia.scss +61 -73
  47. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  48. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  49. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  50. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  51. data/templates/mobile/manifest.rb +0 -8
  52. data/templates/ribbon/jquery/ribbon/office.scss +12 -12
  53. data/templates/ribbon/jquery/ribbon/windows7.scss +12 -12
  54. data/templates/tiny_mce/manifest.rb +16 -0
  55. data/templates/tiny_mce/tiny_mce/jquery.tinymce.js +1 -1
  56. data/templates/tiny_mce/tiny_mce/langs/de.js +1 -0
  57. data/templates/tiny_mce/tiny_mce/langs/en.js +1 -222
  58. data/templates/tiny_mce/tiny_mce/plugins/advhr/css/advhr.css +1 -5
  59. data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin.js +1 -1
  60. data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin_src.js +1 -57
  61. data/templates/tiny_mce/tiny_mce/plugins/advhr/js/rule.js +1 -43
  62. data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/de_dlg.js +1 -0
  63. data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/en_dlg.js +1 -7
  64. data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -58
  65. data/templates/tiny_mce/tiny_mce/plugins/advimage/css/advimage.css +1 -13
  66. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
  67. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -50
  68. data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -235
  69. data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -445
  70. data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/de_dlg.js +1 -0
  71. data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/en_dlg.js +1 -45
  72. data/templates/tiny_mce/tiny_mce/plugins/advlink/css/advlink.css +1 -8
  73. data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin.js +1 -1
  74. data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin_src.js +1 -61
  75. data/templates/tiny_mce/tiny_mce/plugins/advlink/js/advlink.js +1 -525
  76. data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/de_dlg.js +1 -0
  77. data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/en_dlg.js +1 -54
  78. data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -338
  79. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
  80. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -154
  81. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
  82. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -119
  83. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
  84. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -431
  85. data/templates/tiny_mce/tiny_mce/plugins/autosave/langs/en.js +1 -4
  86. data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin.js +1 -1
  87. data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin_src.js +1 -120
  88. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
  89. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -154
  90. data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin.js +1 -1
  91. data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin_src.js +1 -82
  92. data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin.js +1 -1
  93. data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin_src.js +1 -43
  94. data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -41
  95. data/templates/tiny_mce/tiny_mce/plugins/emotions/js/emotions.js +1 -22
  96. data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/de_dlg.js +1 -0
  97. data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -20
  98. data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -22
  99. data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin.js +1 -1
  100. data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin_src.js +1 -84
  101. data/templates/tiny_mce/tiny_mce/plugins/example/js/dialog.js +1 -19
  102. data/templates/tiny_mce/tiny_mce/plugins/example/langs/en.js +1 -3
  103. data/templates/tiny_mce/tiny_mce/plugins/example/langs/en_dlg.js +1 -3
  104. data/templates/tiny_mce/tiny_mce/plugins/fullpage/css/fullpage.css +1 -182
  105. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
  106. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -166
  107. data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -571
  108. data/templates/tiny_mce/tiny_mce/plugins/fullpage/js/fullpage.js +1 -492
  109. data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/de_dlg.js +1 -0
  110. data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/en_dlg.js +1 -85
  111. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -1
  112. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin_src.js +1 -159
  113. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/fullscreen.htm +1 -109
  114. data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin.js +1 -1
  115. data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin_src.js +1 -54
  116. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
  117. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -696
  118. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -90
  119. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -387
  120. data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -1
  121. data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +1 -83
  122. data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin.js +1 -1
  123. data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin_src.js +1 -214
  124. data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -1
  125. data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +1 -139
  126. data/templates/tiny_mce/tiny_mce/plugins/media/css/media.css +1 -17
  127. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
  128. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -770
  129. data/templates/tiny_mce/tiny_mce/plugins/media/js/embed.js +1 -73
  130. data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -340
  131. data/templates/tiny_mce/tiny_mce/plugins/media/langs/de_dlg.js +1 -0
  132. data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -109
  133. data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -812
  134. data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -1
  135. data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +1 -53
  136. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
  137. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -90
  138. data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -1
  139. data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin_src.js +1 -74
  140. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
  141. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -899
  142. data/templates/tiny_mce/tiny_mce/plugins/paste/js/pastetext.js +1 -36
  143. data/templates/tiny_mce/tiny_mce/plugins/paste/js/pasteword.js +1 -51
  144. data/templates/tiny_mce/tiny_mce/plugins/paste/langs/de_dlg.js +1 -0
  145. data/templates/tiny_mce/tiny_mce/plugins/paste/langs/en_dlg.js +1 -5
  146. data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -27
  147. data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -21
  148. data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin.js +1 -1
  149. data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin_src.js +1 -53
  150. data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +17 -16
  151. data/templates/tiny_mce/tiny_mce/plugins/preview/jscripts/embed.js +1 -73
  152. data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +10 -9
  153. data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin.js +1 -1
  154. data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin_src.js +1 -34
  155. data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin.js +1 -1
  156. data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin_src.js +1 -101
  157. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/css/searchreplace.css +1 -6
  158. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -1
  159. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin_src.js +1 -61
  160. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/js/searchreplace.js +1 -140
  161. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/de_dlg.js +1 -0
  162. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/en_dlg.js +1 -16
  163. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -100
  164. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/css/content.css +1 -1
  165. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
  166. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -415
  167. data/templates/tiny_mce/tiny_mce/plugins/style/css/props.css +1 -13
  168. data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin.js +1 -1
  169. data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin_src.js +1 -55
  170. data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -635
  171. data/templates/tiny_mce/tiny_mce/plugins/style/langs/de_dlg.js +1 -0
  172. data/templates/tiny_mce/tiny_mce/plugins/style/langs/en_dlg.js +1 -70
  173. data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -838
  174. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
  175. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -114
  176. data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -178
  177. data/templates/tiny_mce/tiny_mce/plugins/table/css/cell.css +1 -17
  178. data/templates/tiny_mce/tiny_mce/plugins/table/css/row.css +1 -25
  179. data/templates/tiny_mce/tiny_mce/plugins/table/css/table.css +1 -13
  180. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
  181. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1183
  182. data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -284
  183. data/templates/tiny_mce/tiny_mce/plugins/table/js/merge_cells.js +1 -27
  184. data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -232
  185. data/templates/tiny_mce/tiny_mce/plugins/table/js/table.js +1 -450
  186. data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -0
  187. data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -74
  188. data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -32
  189. data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -157
  190. data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -188
  191. data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -12
  192. data/templates/tiny_mce/tiny_mce/plugins/template/css/template.css +1 -23
  193. data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin.js +1 -1
  194. data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin_src.js +1 -159
  195. data/templates/tiny_mce/tiny_mce/plugins/template/js/template.js +1 -106
  196. data/templates/tiny_mce/tiny_mce/plugins/template/langs/de_dlg.js +1 -0
  197. data/templates/tiny_mce/tiny_mce/plugins/template/langs/en_dlg.js +1 -15
  198. data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -31
  199. data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin.js +1 -1
  200. data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin_src.js +1 -83
  201. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
  202. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -114
  203. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -142
  204. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -142
  205. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -149
  206. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -142
  207. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/attributes.css +1 -11
  208. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/popup.css +1 -9
  209. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -162
  210. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -1
  211. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +1 -132
  212. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -162
  213. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/abbr.js +1 -28
  214. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/acronym.js +1 -28
  215. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/attributes.js +1 -125
  216. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/cite.js +1 -28
  217. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/del.js +1 -53
  218. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/element_common.js +1 -229
  219. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/ins.js +1 -53
  220. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js +1 -0
  221. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +1 -32
  222. data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -52
  223. data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -26
  224. data/templates/tiny_mce/tiny_mce/themes/advanced/charmap.htm +1 -51
  225. data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -74
  226. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
  227. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1328
  228. data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -80
  229. data/templates/tiny_mce/tiny_mce/themes/advanced/js/about.js +1 -73
  230. data/templates/tiny_mce/tiny_mce/themes/advanced/js/anchor.js +1 -42
  231. data/templates/tiny_mce/tiny_mce/themes/advanced/js/charmap.js +1 -354
  232. data/templates/tiny_mce/tiny_mce/themes/advanced/js/color_picker.js +1 -329
  233. data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -247
  234. data/templates/tiny_mce/tiny_mce/themes/advanced/js/link.js +1 -153
  235. data/templates/tiny_mce/tiny_mce/themes/advanced/js/source_editor.js +1 -56
  236. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -0
  237. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de_dlg.js +1 -0
  238. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en.js +1 -68
  239. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en_dlg.js +1 -54
  240. data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -57
  241. data/templates/tiny_mce/tiny_mce/themes/advanced/shortcuts.htm +1 -47
  242. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -47
  243. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -117
  244. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -213
  245. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/content.css +1 -23
  246. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -105
  247. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -101
  248. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -46
  249. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -116
  250. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -215
  251. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +1 -8
  252. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +1 -5
  253. data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -25
  254. data/templates/tiny_mce/tiny_mce/themes/simple/editor_template.js +1 -1
  255. data/templates/tiny_mce/tiny_mce/themes/simple/editor_template_src.js +1 -84
  256. data/templates/tiny_mce/tiny_mce/themes/simple/langs/de.js +1 -0
  257. data/templates/tiny_mce/tiny_mce/themes/simple/langs/en.js +1 -11
  258. data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/content.css +1 -25
  259. data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -32
  260. data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/content.css +1 -17
  261. data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -35
  262. data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
  263. data/templates/tiny_mce/tiny_mce/tiny_mce_popup.js +1 -5
  264. data/templates/tiny_mce/tiny_mce/utils/editable_selects.js +1 -70
  265. data/templates/tiny_mce/tiny_mce/utils/form_utils.js +1 -207
  266. data/templates/tiny_mce/tiny_mce/utils/mctabs.js +1 -162
  267. data/templates/tiny_mce/tiny_mce/utils/validate.js +1 -252
  268. metadata +32 -17
  269. data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
  270. data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
  271. data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
  272. data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
  273. data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
  274. data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
  275. data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
  276. data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
@@ -1,4 +1,4 @@
1
- (function(a){a.jQTouch=function(u){var C,r=a("head"),K="",H=[],G=0,l={},i="",t="portrait",S=true,R=0,e=0,h=[],v={},j=351,M=a.jQTouch.prototype.extensions,Q=[],q="",D={addGlossToIcon:true,backSelector:".back, .cancel, .goback",cacheGetRequests:true,debug:false,fallback2dAnimation:"fade",fixedViewport:true,formSelector:"form",fullScreen:true,fullScreenClass:"fullscreen",hoverDelay:50,icon:null,icon4:null,moveThreshold:10,preloadImages:false,pressDelay:1000,startupScreen:null,statusBar:"default",submitSelector:".submit",touchSelector:"a, .touch",useAnimations:true,useFastTouch:true,animations:[{selector:".cube",name:"cubeleft",is3d:true},{selector:".cubeleft",name:"cubeleft",is3d:true},{selector:".cuberight",name:"cuberight",is3d:true},{selector:".dissolve",name:"fade",is3d:false},{selector:".fade",name:"fade",is3d:false},{selector:".flip",name:"flipleft",is3d:true},{selector:".flipleft",name:"flipleft",is3d:true},{selector:".flipright",name:"flipright",is3d:true},{selector:".pop",name:"pop",is3d:true},{selector:".slide",name:"slideleft",is3d:false},{selector:".slidedown",name:"slidedown",is3d:false},{selector:".slideleft",name:"slideleft",is3d:false},{selector:".slideright",name:"slideright",is3d:false},{selector:".slideup",name:"slideup",is3d:false},{selector:".swap",name:"swapleft",is3d:true},{selector:"#jqt > * > ul li a",name:"slideleft",is3d:false}]};function w(T){now=(new Date).getTime();delta=now-R;R=now;if(l.debug){if(T){console.log(delta+": "+T)}else{console.log(delta+": Called "+arguments.callee.caller.name)}}}function b(T){w();if(typeof(T.selector)==="string"&&typeof(T.name)==="string"){Q.push(T)}}function k(V,U,T){w();H.unshift({page:V,animation:U,hash:"#"+V.attr("id"),id:V.attr("id")})}function n(U){w();if(!S){w("ClickHandler handler aborted because tap is not ready");U.preventDefault();return false}var T=a(U.target);if(!T.is(h.join(", "))){var T=a(U.target).closest(h.join(", "))}if(T&&T.attr("href")&&!T.isExternalLink()){w("Need to prevent default click behavior");U.preventDefault()}else{w("No need to prevent default click behavior")}if(a.support.touch){w("Not converting click to a tap event because touch handler is on the job")}else{w("Converting click event to a tap event");a(U.target).trigger("tap",U)}}function c(Y,V,X,U){w();if(V.length===0){a.fn.unselect();w("Target element is missing.");return false}if(V.hasClass("current")){a.fn.unselect();w("You are already on the page you are trying to navigate to.");return false}a(":focus").blur();Y.trigger("pageAnimationStart",{direction:"out"});V.trigger("pageAnimationStart",{direction:"in"});if(a.support.animationEvents&&X&&l.useAnimations){S=false;if(!a.support.transform3d&&X.is3d){X.name=l.fallback2dAnimation}var T;if(U){if(X.name.indexOf("left")>0){T=X.name.replace(/left/,"right")}else{if(X.name.indexOf("right")>0){T=X.name.replace(/right/,"left")}else{if(X.name.indexOf("up")>0){T=X.name.replace(/up/,"down")}else{if(X.name.indexOf("down")>0){T=X.name.replace(/down/,"up")}else{T=X.name}}}}}else{T=X.name}Y.bind("webkitAnimationEnd",W);V.addClass(T+" in current");Y.addClass(T+" out")}else{V.addClass("current");W()}function W(Z){w();if(a.support.animationEvents&&X&&l.useAnimations){Y.unbind("webkitAnimationEnd",W);Y.removeClass(T+" out current");V.removeClass(T+" in")}else{Y.removeClass(T+" out current")}i=V;if(U){H.shift()}else{k(i,X)}Y.unselect();e=(new Date()).getTime();m(i.attr("id"));S=true;V.trigger("pageAnimationEnd",{direction:"in",animation:X});Y.trigger("pageAnimationEnd",{direction:"out",animation:X})}return true}function P(){w();return t}function g(){w();if(H.length<1){w("History is empty.")}if(H.length===1){w("You are on the first panel.")}var U=H[0],T=H[1];if(c(U.page,T.page,U.animation,true)){return v}else{w("Could not go back.");return false}}function L(X,Y,V){w();if(V){console.warn("The reverse parameter was sent to goTo() function, which is bad.")}var Z=H[0].page;if(typeof Y==="string"){for(var W=0,T=Q.length;W<T;W++){if(Q[W].name===Y){Y=Q[W];break}}}if(typeof(X)==="string"){var U=a(X);if(U.length<1){d(X,{animation:Y});return}else{X=U}}if(c(Z,X,Y,V)){return v}else{w("Could not animate pages.");return false}}function O(T){w();if(H[1]===undefined){w("There is no previous page in history")}else{if(location.hash===H[1].hash){g()}else{w(location.hash+" !== "+H[1].hash)}}}function N(T){w();l=a.extend({},D,T);if(l.preloadImages){for(var U=l.preloadImages.length-1;U>=0;U--){(new Image()).src=l.preloadImages[U]}}if(l.icon||l.icon4){var V,W;if(l.icon4&&window.devicePixelRatio&&window.devicePixelRatio===2){W=l.icon4}else{if(l.icon){W=l.icon}else{W=false}}if(W){V=(l.addGlossToIcon)?"":"-precomposed";q+='<link rel="apple-touch-icon'+V+'" href="'+W+'" />'}}if(l.startupScreen){q+='<link rel="apple-touch-startup-image" href="'+l.startupScreen+'" />'}if(l.fixedViewport){q+='<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>'}if(l.fullScreen){q+='<meta name="apple-mobile-web-app-capable" content="yes" />';if(l.statusBar){q+='<meta name="apple-mobile-web-app-status-bar-style" content="'+l.statusBar+'" />'}}if(q){r.prepend(q)}}function A(T,U){w();var V=null;a(T).each(function(X,Y){var W=a(this);if(!W.attr("id")){W.attr("id","page-"+(++G))}a("#"+W.attr("id")).remove();C.trigger("pageInserted",{page:W.appendTo(C)});if(W.hasClass("current")||!V){V=W}});if(V!==null){L(V,U);return V}else{return false}}function z(T){var U=(new Date()).getTime()-e;if(U<j){return false}}function f(){w();t=Math.abs(window.orientation)==90?"landscape":"portrait";C.removeClass("portrait landscape").addClass(t).trigger("turn",{orientation:t})}function m(T){w();T=T.replace(/^#/,""),window.onhashchange=null;location.hash="#"+T;window.onhashchange=O}function d(T,U){w();var W={data:null,method:"GET",animation:null,callback:null,$referrer:null};var V=a.extend({},W,U);if(T!="#"){a.ajax({url:T,data:V.data,type:V.method,success:function(X,Z){var Y=A(X,V.animation);if(Y){if(V.method=="GET"&&l.cacheGetRequests===true&&V.$referrer){V.$referrer.attr("href","#"+Y.attr("id"))}if(V.callback){V.callback(true)}}},error:function(X){if(V.$referrer){V.$referrer.unselect()}if(V.callback){V.callback(false)}}})}else{if(V.$referrer){V.$referrer.unselect()}}}function p(U,V){w();a(":focus").blur();U.preventDefault();var T=(typeof(U)==="string")?a(U).eq(0):(U.target?a(U.target):a(U));w(T.attr("action"));if(T.length&&T.is(l.formSelector)&&T.attr("action")){d(T.attr("action"),{data:T.serialize(),method:T.attr("method")||"POST",animation:Q[0]||null,callback:V});return false}return false}function J(V){w();var U=V.closest("form");if(U.length===0){w("No parent form found")}else{w("About to submit parent form");var T=a.Event("submit");T.preventDefault();U.trigger(T);return false}return true}function o(){w();return(typeof WebKitAnimationEvent!="undefined")}function E(){w();return(typeof WebKitCSSMatrix!="undefined")}function I(){w();if(!l.useFastTouch){return false}if(typeof TouchEvent!="undefined"){if(window.navigator.userAgent.indexOf("Mobile")>-1){return true}else{return false}}else{return false}}function B(){w();var V,U,W,X,T;V=document.getElementsByTagName("head")[0];U=document.body;W=document.createElement("style");W.textContent="@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#jqtTestFor3dSupport{height:3px}}";X=document.createElement("div");X.id="jqtTestFor3dSupport";V.appendChild(W);U.appendChild(X);T=X.offsetHeight===3;W.parentNode.removeChild(W);X.parentNode.removeChild(X);return T}function F(Z){w();if(!S){w("Tap is not ready");return false}var V=a(Z.target);if(!V.is(h.join(", "))){var V=a(Z.target).closest(h.join(", "))}if(!V.length||!V.attr("href")){w("Could not find a link related to tapped element");return false}var Y=V.attr("target"),X=V.attr("hash"),W=null;if(V.isExternalLink()){V.unselect();return true}else{if(V.is(l.backSelector)){g(X)}else{if(V.is(l.submitSelector)){J(V)}else{if(Y==="_webapp"){window.location=V.attr("href");return false}else{if(V.attr("href")==="#"){V.unselect();return true}else{for(var U=0,T=Q.length;U<T;U++){if(V.is(Q[U].selector)){W=Q[U];break}}if(!W){console.warn("Animation could not be found. Using slideleft.");W="slideleft"}if(X&&X!=="#"){V.addClass("active");L(a(X).data("referrer",V),W,a(this).hasClass("reverse"));return false}else{V.addClass("loading active");d(V.attr("href"),{animation:W,callback:function(){V.removeClass("loading");setTimeout(a.fn.unselect,250,V)},$referrer:V});return false}}}}}}}function s(ae){w();if(!S){w("TouchStart handler aborted because tap is not ready");ae.preventDefault();return false}var ah=a(ae.target);if(!ah.length){w("Could not find target of touchstart event.");return}var U=(new Date).getTime(),T=null,V=null,aa,ac,ab,Z=0,X=0,ad=0;if(event.changedTouches&&event.changedTouches.length){aa=event.changedTouches[0];ac=aa.pageX;ab=aa.pageY}ah.bind("touchmove",Y).bind("touchend",af).bind("touchcancel",W);T=setTimeout(function(){ah.makeActive()},l.hoverDelay);V=setTimeout(function(){ah.unbind("touchmove",Y).unbind("touchend",af).unbind("touchcancel",W);ah.unselect();clearTimeout(T);ah.trigger("press")},l.pressDelay);function W(ai){w();clearTimeout(T);ah.unselect();ah.unbind("touchmove",Y).unbind("touchend",af).unbind("touchcancel",W)}function af(ai){w();ah.unbind("touchend",af).unbind("touchcancel",W);clearTimeout(T);clearTimeout(V);if(Math.abs(Z)<l.moveThreshold&&Math.abs(X)<l.moveThreshold&&ad<l.pressDelay){ah.trigger("tap",ai)}else{ah.unselect()}}function Y(al){ag();var ak=Math.abs(Z);var ai=Math.abs(X);var aj;if(ak>ai&&(ak>35)&&ad<1000){if(Z<0){aj="left"}else{aj="right"}ah.unbind("touchmove",Y).unbind("touchend",af).unbind("touchcancel",W);ah.trigger("swipe",{direction:aj,deltaX:Z,deltaY:X})}ah.unselect();clearTimeout(T);if(ak>l.moveThreshold||ai>l.moveThreshold){clearTimeout(V)}}function ag(){var ai=event.changedTouches[0]||null;Z=ai.pageX-ac;X=ai.pageY-ab;ad=(new Date).getTime()-U}}N(u);a(document).ready(function(){a.support.animationEvents=o();a.support.cssMatrix=E();a.support.touch=I();a.support.transform3d=B();if(!a.support.touch){console.warn("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable.")}if(!a.support.transform3d){console.warn("This device does not support 3d animation. 2d animations will be used instead.")}a.fn.isExternalLink=function(){var X=a(this);return(X.attr("target")=="_blank"||X.attr("rel")=="external"||X.is('a[href^="http://maps.google.com"], a[href^="mailto:"], a[href^="tel:"], a[href^="javascript:"], a[href*="youtube.com/v"], a[href*="youtube.com/watch"]'))};a.fn.makeActive=function(){return a(this).addClass("active")};a.fn.press=function(X){if(a.isFunction(X)){return a(this).live("press",X)}else{return a(this).trigger("press")}};a.fn.swipe=function(X){if(a.isFunction(X)){return a(this).live("swipe",X)}else{return a(this).trigger("swipe")}};a.fn.tap=function(X){if(a.isFunction(X)){return a(this).live("tap",X)}else{return a(this).trigger("tap")}};a.fn.unselect=function(X){if(X){X.removeClass("active")}else{a(".active").removeClass("active")}};for(var U=0,T=M.length;U<T;U++){var V=M[U];if(a.isFunction(V)){a.extend(v,V(v))}}if(l.cubeSelector){console.warn("NOTE: cubeSelector has been deprecated. Please use cubeleftSelector instead.");l.cubeleftSelector=l.cubeSelector}if(l.flipSelector){console.warn("NOTE: flipSelector has been deprecated. Please use flipleftSelector instead.");l.flipleftSelector=l.flipSelector}if(l.slideSelector){console.warn("NOTE: slideSelector has been deprecated. Please use slideleftSelector instead.");l.slideleftSelector=l.slideSelector}for(var U=0,T=D.animations.length;U<T;U++){var W=D.animations[U];if(l[W.name+"Selector"]!==undefined){W.selector=l[W.name+"Selector"]}b(W)}h.push("input");h.push(l.touchSelector);h.push(l.backSelector);h.push(l.submitSelector);a(h.join(", ")).css("-webkit-touch-callout","none");C=a("#jqt");if(C.length===0){console.warn('Could not find an element with the id "jqt", so the body id has been set to "jqt". If you are having any problems, wrapping your panels in a div with the id "jqt" might help.');C=a("body").attr("id","jqt")}if(a.support.transform3d){C.addClass("supports3d")}if(l.fullScreenClass&&window.navigator.standalone==true){C.addClass(l.fullScreenClass+" "+l.statusBar)}C.bind("touchstart",s).bind("click",n).bind("mousedown",z).bind("orientationchange",f).bind("submit",p).bind("tap",F).trigger("orientationchange");if(location.hash.length){location.replace(location.href.split("#")[0])}if(a("#jqt > .current").length==0){i=a("#jqt > *:first")}else{i=a("#jqt > .current:first");a("#jqt > .current").removeClass("current")}a(i).addClass("current");K=a(i).attr("id");if(history.replaceState!==undefined){history.replaceState(null,null,"#"+K)}else{m(K)}k(i);scrollTo(0,0)});v={animations:Q,hist:H,settings:l,support:a.support,getOrientation:P,goBack:g,goTo:L,addAnimation:b,submitForm:p};return v};a.jQTouch.prototype.extensions=[];a.jQTouch.addExtension=function(b){a.jQTouch.prototype.extensions.push(b)}})(jQuery);(function(a){a.fn.transition=function(c,b){return this.each(function(){var e=a(this);var h={speed:"300ms",callback:null,ease:"ease-in-out"};var g=a.extend({},h,b);if(g.speed===0){e.css(c);window.setTimeout(g.callback,0)}else{if(a.browser.safari){var f=[];for(var d in c){f.push(d)}e.css({webkitTransitionProperty:f.join(", "),webkitTransitionDuration:g.speed,webkitTransitionTimingFunction:g.ease});if(g.callback){e.one("webkitTransitionEnd",g.callback)}setTimeout(function(i){i.css(c)},0,e)}else{e.animate(c,g.speed,g.callback)}}})}})(jQuery);var SpinningWheel={cellHeight:44,friction:0.003,slotData:[],handleEvent:function(a){if(a.type=="touchstart"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapDown(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollStart(a)}}}else{if(a.type=="touchmove"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapCancel(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollMove(a)}}}else{if(a.type=="touchend"){if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapUp(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollEnd(a)}}}else{if(a.type=="webkitTransitionEnd"){if(a.target.id=="sw-wrapper"){}else{this.backWithinBoundaries(a)}}else{if(a.type=="orientationchange"){this.onOrientationChange(a)}else{if(a.type=="scroll"){this.onScroll(a)}}}}}}},onOrientationChange:function(a){window.scrollTo(0,0);this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px";this.calculateSlotsWidth()},onScroll:function(a){this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px"},lockScreen:function(a){a.preventDefault();a.stopPropagation()},reset:function(){this.slotEl=[];this.activeSlot=null;this.swWrapper=undefined;this.swSlotWrapper=undefined;this.swSlots=undefined;this.swFrame=undefined},calculateSlotsWidth:function(){var b=this.swSlots.getElementsByTagName("div");for(var a=0;a<b.length;a+=1){this.slotEl[a].slotWidth=b[a].offsetWidth}},create:function(){var d,a,b,c,e;this.reset();e=document.createElement("div");e.id="sw-wrapper";e.style.top=window.innerHeight+window.pageYOffset+"px";e.style.webkitTransitionProperty="-webkit-transform";e.innerHTML='<div id="sw-slots-wrapper"><div id="sw-slots"></div></div><div id="sw-frame"></div>';document.body.appendChild(e);this.swWrapper=e;this.swSlotWrapper=document.getElementById("sw-slots-wrapper");this.swSlots=document.getElementById("sw-slots");this.swFrame=document.getElementById("sw-frame");for(a=0;a<this.slotData.length;a+=1){c=document.createElement("ul");b="";for(d in this.slotData[a].values){b+="<li>"+this.slotData[a].values[d]+"</li>"}c.innerHTML=b;e=document.createElement("div");e.className=this.slotData[a].style;e.appendChild(c);this.swSlots.appendChild(e);c.slotPosition=a;c.slotYPosition=0;c.slotWidth=0;c.slotMaxScroll=this.swSlotWrapper.clientHeight-c.clientHeight-86;c.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.slotEl.push(c);if(this.slotData[a].defaultValue){this.scrollToValue(a,this.slotData[a].defaultValue)}}this.calculateSlotsWidth();document.addEventListener("touchmove",this,false);window.addEventListener("orientationchange",this,true);window.addEventListener("scroll",this,true);document.getElementById("sw-done").addEventListener("touchstart",this,false);this.swFrame.addEventListener("touchstart",this,false)},open:function(){this.create();this.swWrapper.style.webkitTransitionTimingFunction="ease-out";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, -210px, 0)"},destroy:function(){this.swWrapper.removeEventListener("webkitTransitionEnd",this,false);this.swFrame.removeEventListener("touchstart",this,false);document.getElementById("sw-done").removeEventListener("touchstart",this,false);document.removeEventListener("touchmove",this,false);window.removeEventListener("orientationchange",this,true);window.removeEventListener("scroll",this,true);this.slotData=[];this.cancelAction=function(){return false};this.cancelDone=function(){return true};this.reset();document.body.removeChild(document.getElementById("sw-wrapper"))},close:function(){this.swWrapper.style.webkitTransitionTimingFunction="ease-in";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, 0, 0)";this.swWrapper.addEventListener("webkitTransitionEnd",this,false)},addSlot:function(b,d,a){if(!d){d=""}d=d.split(" ");for(var c=0;c<d.length;c+=1){d[c]="sw-"+d[c]}d=d.join(" ");var e={values:b,style:d,defaultValue:a};this.slotData.push(e)},getSelectedValues:function(){var c,f,d,a,e=[],b=[];for(d in this.slotEl){this.slotEl[d].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[d].style.webkitTransitionDuration="0";if(this.slotEl[d].slotYPosition>0){this.setPosition(d,0)}else{if(this.slotEl[d].slotYPosition<this.slotEl[d].slotMaxScroll){this.setPosition(d,this.slotEl[d].slotMaxScroll)}}c=-Math.round(this.slotEl[d].slotYPosition/this.cellHeight);f=0;for(a in this.slotData[d].values){if(f==c){e.push(a);b.push(this.slotData[d].values[a]);break}f+=1}}return{keys:e,values:b}},setPosition:function(b,a){this.slotEl[b].slotYPosition=a;this.slotEl[b].style.webkitTransform="translate3d(0, "+a+"px, 0)"},scrollStart:function(c){var d=c.targetTouches[0].clientX-this.swSlots.offsetLeft;var f=0;for(var a=0;a<this.slotEl.length;a+=1){f+=this.slotEl[a].slotWidth;if(d<f){this.activeSlot=a;break}}if(this.slotData[this.activeSlot].style.match("readonly")){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);return false}this.slotEl[this.activeSlot].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[this.activeSlot].style.webkitTransitionDuration="0";var b=window.getComputedStyle(this.slotEl[this.activeSlot]).webkitTransform;b=new WebKitCSSMatrix(b).m42;if(b!=this.slotEl[this.activeSlot].slotYPosition){this.setPosition(this.activeSlot,b)}this.startY=c.targetTouches[0].clientY;this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=c.timeStamp;this.swFrame.addEventListener("touchmove",this,false);this.swFrame.addEventListener("touchend",this,false);return true},scrollMove:function(b){var a=b.targetTouches[0].clientY-this.startY;if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){a/=2}this.setPosition(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition+a);this.startY=b.targetTouches[0].clientY;if(b.timeStamp-this.scrollStartTime>80){this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=b.timeStamp}},scrollEnd:function(f){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){this.scrollTo(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition>0?0:this.slotEl[this.activeSlot].slotMaxScroll);return false}var b=this.slotEl[this.activeSlot].slotYPosition-this.scrollStartY;if(b<this.cellHeight/1.5&&b>-this.cellHeight/1.5){if(this.slotEl[this.activeSlot].slotYPosition%this.cellHeight){this.scrollTo(this.activeSlot,Math.round(this.slotEl[this.activeSlot].slotYPosition/this.cellHeight)*this.cellHeight,"100ms")}return false}var g=f.timeStamp-this.scrollStartTime;var a=(2*b/g)/this.friction;var d=(this.friction/2)*(a*a);if(a<0){a=-a;d=-d}var c=this.slotEl[this.activeSlot].slotYPosition+d;if(c>0){c/=2;a/=3;if(c>this.swSlotWrapper.clientHeight/4){c=this.swSlotWrapper.clientHeight/4}}else{if(c<this.slotEl[this.activeSlot].slotMaxScroll){c=(c-this.slotEl[this.activeSlot].slotMaxScroll)/2+this.slotEl[this.activeSlot].slotMaxScroll;a/=3;if(c<this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4){c=this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4}}else{c=Math.round(c/this.cellHeight)*this.cellHeight}}this.scrollTo(this.activeSlot,Math.round(c),Math.round(a)+"ms");return true},scrollTo:function(c,a,b){this.slotEl[c].style.webkitTransitionDuration=b?b:"100ms";this.setPosition(c,a?a:0);if(this.slotEl[c].slotYPosition>0||this.slotEl[c].slotYPosition<this.slotEl[c].slotMaxScroll){this.slotEl[c].addEventListener("webkitTransitionEnd",this,false)}},scrollToValue:function(e,d){var c,b,a;this.slotEl[e].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[e].style.webkitTransitionDuration="0";b=0;for(a in this.slotData[e].values){if(a==d){c=b*this.cellHeight;this.setPosition(e,c);break}b-=1}},backWithinBoundaries:function(a){a.target.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(a.target.slotPosition,a.target.slotYPosition>0?0:a.target.slotMaxScroll,"150ms");return false},tapDown:function(a){a.currentTarget.addEventListener("touchmove",this,false);a.currentTarget.addEventListener("touchend",this,false);a.currentTarget.className="sw-pressed"},tapCancel:function(a){a.currentTarget.removeEventListener("touchmove",this,false);a.currentTarget.removeEventListener("touchend",this,false);a.currentTarget.className=""},tapUp:function(a){this.tapCancel(a);if(a.currentTarget.id=="sw-cancel"){this.cancelAction()}else{this.doneAction()}},setCancelAction:function(a){this.cancelAction=a},setDoneAction:function(a){this.doneAction=a},cancelAction:function(){return false},cancelDone:function(){return true}};(function(){var o=this;var j=Array();var p=Array();function f(u,v){for(var t in v){u[t]=v[t]}}function h(v,t,u){v.style.width=t.toString()+"px";v.style.height=u.toString()+"px"}function s(u,t,v){u.style.left=Math.round(t).toString()+"px";u.style.top=Math.round(v).toString()+"px"}TrayController=function(){return this};TrayController.prototype.init=function(t){this.currentX=0;this.elem=t};TrayController.prototype.touchstart=function(t){this.startX=t.touches[0].pageX-this.currentX;this.touchMoved=false;window.addEventListener("touchmove",this,true);window.addEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0s"};TrayController.prototype.touchmove=function(t){this.touchMoved=true;this.lastX=this.currentX;this.lastMoveTime=new Date();this.currentX=event.touches[0].pageX-this.startX;this.delegate.update(this.currentX)};TrayController.prototype.touchend=function(u){window.removeEventListener("touchmove",this,true);window.removeEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0.4s";if(this.touchMoved){var v=this.currentX-this.lastX;var t=(new Date())-this.lastMoveTime+1;this.currentX=this.currentX+v*200/t;this.delegate.updateTouchEnd(this)}else{this.delegate.clicked(this.currentX)}};TrayController.prototype.handleEvent=function(t){this[t.type](t);t.preventDefault()};const e=150;const n=e/2;const d=70;const a=n/2;const g=e;const b=e/3;const k="rotateY("+(-d)+"deg)";const c="rotateY("+d+"deg)";const i="translateZ("+g+"px)";FlowDelegate=function(){this.cells=new Array();this.transforms=new Array()};FlowDelegate.prototype.init=function(t){this.elem=t};FlowDelegate.prototype.updateTouchEnd=function(t){this.lastFocus=undefined;var u=this.getFocusedCell(t.currentX);t.currentX=-u*n;this.update(t.currentX)};FlowDelegate.prototype.clicked=function(u){var v=-Math.round(u/n);var t=this.cells[v];galleryCell=v};FlowDelegate.prototype.getFocusedCell=function(t){var u=-Math.round(t/n);return Math.min(Math.max(u,0),this.cells.length-1)};FlowDelegate.prototype.transformForCell=function(u,w,z){var t=(w*n);var v=t+z;if((v<a)&&(v>=-a)){return i+" translateX("+t+"px)"}else{if(v>0){return"translateX("+(t+b)+"px) "+k}else{return"translateX("+(t-b)+"px) "+c}}};FlowDelegate.prototype.setTransformForCell=function(t,v,u){if(this.transforms[v]!=u){t.style.webkitTransform=u;this.transforms[v]=u}};FlowDelegate.prototype.update=function(u){this.elem.style.webkitTransform="translateX("+(u)+"px)";for(var v in this.cells){var t=this.cells[v];this.setTransformForCell(t,v,this.transformForCell(t,v,u));v+=1}};var l=new TrayController();var q=new FlowDelegate();o.zflow=function(v,u){var z=document.querySelector(u);l.init(z);q.init(z);l.delegate=q;var t={top:Math.round(-e*0.65)+"px",left:Math.round(-e/2)+"px",width:e+"px",height:Math.round(e*1.5)+"px",opacity:0,};var w=0;function A(){var B=document.createElement("div");var F=document.createElement("img");var D=document.createElement("canvas");var E=document.createElement("a");var C=document.createElement("caption");B.className="cell";B.appendChild(E);E.appendChild(F);B.appendChild(D);B.appendChild(C);F.src=v[w];j[w]=v[w];E.href="show_image?fName="+v[w];E.className="slide-right";o.afnc=function(){var G=F.width;var J=F.height;var H=Math.min(e/J,e/G);G*=H;J*=H;h(F,G,J);f(B.style,t);s(F,(e-G)/2,e-J);s(D,(e-G)/2,e);s(C,(e-G)/2,e+10);m(F,G,J,D);var I=v[w].match(/(.*)[\/\\]([^\/\\]+)\.\w+$/)[2];I=I.replace(/_/g," ");I=I.replace(/(^|\s)([a-z])/g,function(K,M,L){return M+L.toUpperCase()});p[w]=I;r(C,G,w);q.setTransformForCell(B,q.cells.length,q.transformForCell(B,q.cells.length,l.currentX));q.cells.push(B);z.appendChild(B);B.style.opacity=1;if(w<(v.length-1)){w++;A()}else{window.setTimeout(function(){window.scrollTo(0,0)},100);galleryInit=1}};F.addEventListener("load",afnc,true)}A();z.addEventListener("touchstart",l,false)};o.zflowCleanup=function(t){var u=document.querySelector(t);if(u){if(u.childNodes.length>0){q.transforms.length=0;q.cells.length=0;while(u.hasChildNodes()){var v=u.childNodes[0].childNodes[0].childNodes[0];v.removeEventListener("load",afnc,true);u.removeChild(u.childNodes[0])}var w=document.getElementById("gallery");if(w){w.parentNode.removeChild(w);galleryInit=0;galleryCell=0}}}};o.zflowGetImageSource=function(t,u){var v=document.querySelector(t);var w="";if(v){if(v.childNodes.length>0){while(v.hasChildNodes()){w=v.childNodes[0].childNodes[0].childNodes[u].src}}}return w};function r(u,t,v){u.width=t;u.innerHTML=p[v]}function m(z,u,A,v){v.width=u;v.height=A/2;var t=v.getContext("2d");t.save();t.translate(0,A-1);t.scale(1,-1);t.drawImage(z,0,0,u,A);t.restore();t.globalCompositeOperation="destination-out";var w=t.createLinearGradient(0,0,0,A/2);w.addColorStop(1,"rgba(255, 255, 255, 1.0)");w.addColorStop(0,"rgba(255, 255, 255, 0.5)");t.fillStyle=w;t.fillRect(0,0,u,A/2)}})();var now=new Date();var url_month="month";var url_event="events.htm";function getCalendar(e,c,b){url_month=e;url_event=c;var f=b.getDate();var a=b.getMonth()+1;var g=b.getFullYear();$.get(url_month,{month:a,year:g},function(d){$("#ical").empty();$(d).appendTo("#ical");setBindings();setToday();setSelectedAndLoadEvents(b)})}function getEvents(b){var c=b.getDate();var a=b.getMonth()+1;var e=b.getFullYear();$.get(url_event,{day:c,month:a,year:e},function(d){$("#ical .events").empty();$(d).appendTo("#ical .events")})}function getNoEvents(){var a="<li class='no-event'>No Events</li>";$("#ical .events").empty();$(a).appendTo("#ical .events")}function setBindings(){$("#ical td").bind("click",function(){var b=$(this).attr("class");var a=getClickedDate($(this));RemoveSelectedCell();setToday();if(b.indexOf("date_has_event")!=-1||b.indexOf("today_date_has_event")!=-1){$(this).attr("class","selected_date_has_event");getEvents(a)}if(b==""||b.indexOf("today")!=-1){$(this).attr("class","selected");getNoEvents()}if(b.indexOf("prevmonth")!=-1||b.indexOf("nextmonth")!=-1){getCalendar(url,a)}});$("#ical .bottom-bar .bottom-bar-today").bind("click",function(){getCalendar(url_month,url_event,now)});$("#ical .goto-prevmonth").bind("click",function(){loadPrevNextMonth(-1)});$("#ical .goto-nextmonth").bind("click",function(){loadPrevNextMonth(1)})}function RemoveSelectedCell(){$("#ical .selected_date_has_event").removeClass("selected_date_has_event");$("#ical .selected").removeClass("selected")}function getClickedDate(b){var c=$(b).find("input").val();var a=getDateFromHiddenField(c);return a}function loadPrevNextMonth(c){var b=$("#ical .selected").text();if(b==""){b=$("#ical .selected_date_has_event").text()}var a=parseInt($("#ical > #month").val());var e=$("#ical > #year").val();var d=new Date(e,a-1,b);if(c==1){d.nextMonth()}else{d.prevMonth()}getCalendar(url_month,url_event,d)}function setToday(){$("#ical :hidden").each(function(c){var a=getDateFromHiddenField($(this).val());if(!isNaN(a)){var h=now;var j=now.getDate();var i=a.getDate();var g=now.getMonth();var f=a.getMonth();var e=now.getFullYear();var d=a.getFullYear();if(now.getDate()==a.getDate()&&now.getMonth()==a.getMonth()&&now.getFullYear()==a.getFullYear()){var b=$(this).closest("td");if($(b).attr("class")=="date_has_event"){$(b).attr("class","today_date_has_event")}else{$(b).attr("class","today")}}}})}function getDateFromHiddenField(c){var b=c.split("-");return new Date(b[0],b[1]-1,b[2])}function setSelectedAndLoadEvents(a){RemoveSelectedCell();$("#ical td").each(function(c){var d=$(this).attr("class");var b=getClickedDate($(this));if((d!="prevmonth"&&d!="nextmonth")&&a.getDate()==b.getDate()&&a.getMonth()==b.getMonth()&&a.getFullYear()==b.getFullYear()){if(d=="date_has_event"){$(this).attr("class","selected_date_has_event");getEvents(a)}else{$(this).attr("class","selected");getNoEvents()}}});setToday()}function trim(b,a){return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}function dateAddExtention(c,a){var b=new String();c=c.toLowerCase();if(isNaN(a)){throw"The second parameter must be a number. \n You passed: "+a;return false}a=new Number(a);switch(c.toLowerCase()){case"yyyy":this.setFullYear(this.getFullYear()+a);break;case"q":this.setMonth(this.getMonth()+(a*3));break;case"m":this.setMonth(this.getMonth()+a);break;case"y":case"d":case"w":this.setDate(this.getDate()+a);break;case"ww":this.setDate(this.getDate()+(a*7));break;case"h":this.setHours(this.getHours()+a);break;case"n":this.setMinutes(this.getMinutes()+a);break;case"s":this.setSeconds(this.getSeconds()+a);break;case"ms":this.setMilliseconds(this.getMilliseconds()+a);break;default:throw"The first parameter must be a string from this list: \nyyyy, q, m, y, d, w, ww, h, n, s, or ms. You passed: "+c;return false}return this}Date.prototype.dateAdd=dateAddExtention;function prevMonth(){var a=this.getMonth();this.setMonth(a-1);if(this.getMonth()!=a-1&&(this.getMonth()!=11||(a==11&&this.getDate()==1))){this.setDate(0)}}function nextMonth(){var a=this.getMonth();this.setMonth(a+1);if(this.getMonth()!=a+1&&this.getMonth()!=0){this.setDate(0)}}Date.prototype.nextMonth=nextMonth;Date.prototype.prevMonth=prevMonth;(function(c){c.fn.drag=function(f,e,d){if(e){this.bind("dragstart",f)}if(d){this.bind("dragend",d)}return !f?this.trigger("mousedown",{which:1}):this.bind("drag",e?e:f)};var b=c.event.special.drag={distance:0,setup:function(d){d=c.extend({distance:b.distance},d||{});c.event.add(this,"mousedown",b.handler,d)},teardown:function(){c.event.remove(this,"mousedown",b.handler);if(this==b.dragging){b.dragging=b.proxy=null}a(this,true)},handler:function(e){var d;if(e.data.elem){e.dragTarget=e.data.elem;e.dragProxy=b.proxy||e.dragTarget;e.cursorOffsetX=e.data.x-e.data.left;e.cursorOffsetY=e.data.y-e.data.top;e.offsetX=e.pageX-e.cursorOffsetX;e.offsetY=e.pageY-e.cursorOffsetY}switch(e.type){case !b.dragging&&e.which==1&&"mousedown":c.extend(e.data,c(this).offset(),{x:e.pageX,y:e.pageY,elem:this,dist2:Math.pow(e.data.distance,2)});c.event.add(document.body,"mousemove mouseup",b.handler,e.data);a(this,false);return false;case !b.dragging&&"mousemove":if(Math.pow(e.pageX-e.data.x,2)+Math.pow(e.pageY-e.data.y,2)<e.data.dist2){break}b.dragging=e.dragTarget;e.type="dragstart";d=c.event.handle.call(b.dragging,e);b.proxy=c(d)[0]||b.dragging;if(d!==false){break}a(b.dragging,true);b.dragging=b.proxy=null;case"mousemove":if(b.dragging){e.type="drag";d=c.event.handle.call(b.dragging,e);if(c.event.special.drop){c.event.special.drop.allowed=(d!==false);c.event.special.drop.handler(e)}if(d!==false){break}e.type="mouseup"}case"mouseup":c.event.remove(document.body,"mousemove mouseup",b.handler);if(b.dragging){if(c.event.special.drop){c.event.special.drop.handler(e)}e.type="dragend";c.event.handle.call(b.dragging,e);a(b.dragging,true);b.dragging=b.proxy=null;e.data={}}break}}};function a(e,d){if(!e){return}e.unselectable=d?"off":"on";e.onselectstart=function(){return d};if(e.style){e.style.MozUserSelect=d?"":"none"}}})(jQuery);(function(b){b.fn.drop=function(e,d,c){if(d){this.bind("dropstart",e)}if(c){this.bind("dropend",c)}return !e?this.trigger("drop"):this.bind("drop",d?d:e)};b.dropManage=function(c){b.extend(a,{filter:"*",data:[],tolerance:null},c||{});return a.$elements.filter(a.filter).each(function(d){a.data[d]=a.locate(this)})};var a=b.event.special.drop={delay:100,mode:"intersect",$elements:b([]),data:[],setup:function(){a.$elements=a.$elements.add(this);a.data[a.data.length]=a.locate(this)},teardown:function(){var c=this;a.$elements=a.$elements.not(this);a.data=b.grep(a.data,function(d){return(d.elem!==c)})},handler:function(d){var c=null,e;d.dropTarget=a.dropping||undefined;if(a.data.length&&d.dragTarget){switch(d.type){case"drag":a.event=d;if(!a.timer){a.timer=setTimeout(a.tolerate,20)}break;case"mouseup":a.timer=clearTimeout(a.timer);if(!a.dropping){break}if(a.allowed){d.type="drop";e=b.event.handle.call(a.dropping,d)}c=false;case a.dropping&&"dropstart":d.type="dropend";c=c===null&&a.allowed?true:false;case a.dropping&&"dropend":b.event.handle.call(a.dropping,d);a.dropping=null;if(e===false){d.dropTarget=undefined}if(!c){break}d.type="dropstart";case a.allowed&&"dropstart":d.dropTarget=this;a.dropping=b.event.handle.call(this,d)!==false?this:null;break}}},tolerate:function(){var d=0,c,e,f=[a.event.pageX,a.event.pageY],g=a.locate(a.event.dragProxy);a.tolerance=a.tolerance||a.modes[a.mode];do{if(c=a.data[d]){if(a.tolerance){e=a.tolerance.call(a,a.event,g,c)}else{if(a.contains(c,f)){e=c}}}}while(++d<a.data.length&&!e);a.event.type=(e=e||a.best)?"dropstart":"dropend";if(a.event.type=="dropend"||e.elem!=a.dropping){a.handler.call(e?e.elem:a.dropping,a.event)}if(a.last&&f[0]==a.last.pageX&&f[1]==a.last.pageY){delete a.timer}else{a.timer=setTimeout(a.tolerate,a.delay)}a.last=a.event;a.best=null},locate:function(f){var d=b(f),g=d.offset(),e=d.outerHeight(),c=d.outerWidth();return{elem:f,L:g.left,R:g.left+c,T:g.top,B:g.top+e,W:c,H:e}},contains:function(c,d){return((d[0]||d.L)>=c.L&&(d[0]||d.R)<=c.R&&(d[1]||d.T)>=c.T&&(d[1]||d.B)<=c.B)},modes:{intersect:function(d,c,e){return this.contains(e,[d.pageX,d.pageY])?e:this.modes.overlap.apply(this,arguments)},overlap:function(d,c,e){e.overlap=Math.max(0,Math.min(e.B,c.B)-Math.max(e.T,c.T))*Math.max(0,Math.min(e.R,c.R)-Math.max(e.L,c.L));if(e.overlap>((this.best||{}).overlap||0)){this.best=e}return null},fit:function(d,c,e){return this.contains(e,c)?e:null},middle:function(d,c,e){return this.contains(e,[c.L+c.W/2,c.T+c.H/2])?e:null}}}})(jQuery);var _target=null,_dragx=null,_dragy=null,_rotate=null,_resort=null;var _dragging=false,_sizing=false,_animate=false;var _rotating=0,_width=0,_height=0,_left=0,_top=0,_xspeed=0,_yspeed=0;var _zindex=1000;jQuery.fn.touch=function(a){a=jQuery.extend({animate:true,sticky:false,dragx:true,dragy:true,rotate:false,resort:true,scale:false},a);var b=[];b=$.extend({},$.fn.touch.defaults,a);this.each(function(){this.opts=b;this.ontouchstart=touchstart;this.ontouchend=touchend;this.ontouchmove=touchmove;this.ongesturestart=gesturestart;this.ongesturechange=gesturechange;this.ongestureend=gestureend})};function touchstart(a){_target=this.id;_dragx=this.opts.dragx;_dragy=this.opts.dragy;_resort=this.opts.resort;_animate=this.opts.animate;_xspeed=0;_yspeed=0;$(a.changedTouches).each(function(){var c=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));var b=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));if(!_dragging&&!_sizing){_left=(a.pageX-c);_top=(a.pageY-b);_dragging=[_left,_top];if(_resort){_zindex=($("#"+_target).css("z-index")==_zindex)?_zindex:_zindex+1;$("#"+_target).css({zIndex:_zindex})}}})}function touchmove(c){if(_dragging&&!_sizing&&_animate){var a=(isNaN(parseInt($("#"+_target).css("left"))))?0:parseInt($("#"+_target).css("left"));var b=(isNaN(parseInt($("#"+_target).css("top"))))?0:parseInt($("#"+_target).css("top"))}$(c.changedTouches).each(function(){c.preventDefault();_left=(this.pageX-(parseInt($("#"+_target).css("width"))/2));_top=(this.pageY-(parseInt($("#"+_target).css("height"))/2));if(_dragging&&!_sizing){if(_animate){_xspeed=Math.round((_xspeed+Math.round(_left-a))/1.5);_yspeed=Math.round((_yspeed+Math.round(_top-b))/1.5)}if(_dragx||_dragy){$("#"+_target).css({position:"absolute"})}if(_dragx){$("#"+_target).css({left:_left+"px"})}if(_dragy){$("#"+_target).css({top:_top+"px"})}$("#"+_target).css({backgroundColor:"#4B880B"});$("#"+_target+" b").text("WEEEEEEEE!!!!")}})}function touchend(a){$(a.changedTouches).each(function(){if(!a.targetTouches.length){_dragging=false;if(_animate){_left=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));_top=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));var c=(_dragx)?(_left+_xspeed)+"px":_left+"px";var b=(_dragy)?(_top+_yspeed)+"px":_top+"px";if(_dragx||_dragy){$("#"+_target).animate({left:c,top:b},"fast")}}}});$("#"+_target+" b").text("I am sad :(");$("#"+_target).css({backgroundColor:"#0B4188"});setTimeout(changeBack,5000,_target)}function gesturestart(a){_sizing=[$("#"+this.id).css("width"),$("#"+this.id).css("height")]}function gesturechange(a){if(_sizing){_width=(this.opts.scale)?Math.min(parseInt(_sizing[0])*a.scale,300):_sizing[0];_height=(this.opts.scale)?Math.min(parseInt(_sizing[1])*a.scale,300):_sizing[1];_rotate=(this.opts.rotate)?"rotate("+((_rotating+a.rotation)%360)+"deg)":"0deg";$("#"+this.id).css({width:_width+"px",height:_height+"px",webkitTransform:_rotate});$("#"+this.id+" b").text("TRANSFORM!");$("#"+this.id).css({backgroundColor:"#4B880B"})}}function gestureend(a){_sizing=false;_rotating=(_rotating+a.rotation)%360}function changeBack(a){$("#"+a+" b").text("Touch Me :)");$("#"+a).css({backgroundColor:"#999"})}(function(b){var a=this,c=a.jQExtensionsCSS||{};b(a).load(function(){a.scrollTo(0,0);var g=a.innerWidth<a.innerHeight?"profile":"landscape",f=c.toolbarHeight||b("#jqt .toolbar").outerHeight()||45,e={profile:null,landscape:null},d=b.extend({defaults:".horizontal-scroll, .horizontal-scroll .scroll-container, .horizontal-slide, .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .vertical-scroll > div, .vertical-slide > div { margin: 0 auto; padding-bottom:{paddingBottom}px; } #jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div, #jqt.fullscreen .vertical-slide.use-bottom-toolbar > div { padding-bottom:0px; } .vertical-scroll, .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .vertical-scroll.use-bottom-toolbar, .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }\n",profile:".profile .horizontal-scroll, .profile .horizontal-scroll .scroll-container, .profile .horizontal-slide, .profile .horizontal-slide .slide-container { width: {width}px; } .profile .vertical-scroll, .profile .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .profile .vertical-scroll.use-bottom-toolbar, .profile .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }",landscape:".landscape .horizontal-scroll, .landscape .horizontal-scroll .scroll-container, .landscape .horizontal-slide, .landscape .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .landscape .vertical-scroll, .landscape .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .landscape .vertical-scroll.use-bottom-toolbar, .landscape .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }"},c.css||{});e[g]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[g]||{});e.defaults=b.extend({},e[g],c.defaults||{});b(document.createElement("style")).attr("type","text/css").html(d.defaults.replace(/\{(\w+)\}/g,function(i,h){return h in e.defaults?e.defaults[h]:i})+d[g].replace(/\{(\w+)\}/g,function(i,h){return h in e[g]?e[g][h]:i})).appendTo("head");b(a).one("orientationchange",function(){var h=a.innerWidth<a.innerHeight?"profile":"landscape";e[h]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[h]||{});b(document.createElement("style")).attr("type","text/css").html(d[h].replace(/\{(\w+)\}/g,function(j,i){return i in e[h]?e[h][i]:j})).appendTo("head")})})})(jQuery);(function($){$.Chain={version:"0.2",tag:["{","}"],services:{},service:function(name,proto){this.services[name]=proto;$.fn[name]=function(options){if(!this.length){return this}var instance=this.data("chain-"+name);var args=Array.prototype.slice.call(arguments,1);if(!instance){if(options=="destroy"){return this}instance=$.extend({element:this},$.Chain.services[name]);this.data("chain-"+name,instance);if(instance.init){instance.init()}}var result;if(typeof options=="string"&&instance["$"+options]){result=instance["$"+options].apply(instance,args)}else{if(instance.handler){result=instance.handler.apply(instance,[options].concat(args))}else{result=this}}if(options=="destroy"){this.removeData("chain-"+name)}return result}},extend:function(name,proto){if(this.services[name]){this.services[name]=$.extend(this.services[name],proto)}},jobject:function(obj){return obj&&obj.init==$.fn.init},jidentic:function(j1,j2){if(!j1||!j2||j1.length!=j2.length){return false}var a1=j1.get();var a2=j2.get();for(var i=0;i<a1.length;i++){if(a1[i]!=a2[i]){return false}}return true},parse:function(){var $this={};$this.closure=['function($data, $el){var $text = [];\n$text.print = function(text){this.push((typeof text == "number") ? text : ((typeof text != "undefined") ? text : ""));};\nwith($data){\n','}\nreturn $text.join("");}'];$this.textPrint=function(text){return'$text.print("'+text.split("\\").join("\\\\").split("'").join("\\'").split('"').join('\\"')+'");'};$this.scriptPrint=function(text){return"$text.print("+text+");"};$this.parser=function(text){var tag=$.Chain.tag;var opener,closer,closer2=null,result=[];while(text){opener=text.indexOf(tag[0]);closer=opener+text.substring(opener).indexOf(tag[1]);if(opener!=-1){if(text[opener-1]=="\\"){closer2=opener+tag[0].length+text.substring(opener+tag[0].length).indexOf(tag[0]);if(closer2!=opener+tag[0].length-1&&text[closer2-1]=="\\"){closer2=closer2-1}else{if(closer2==opener+tag[0].length-1){closer2=text.length}}result.push($this.textPrint(text.substring(0,opener-1)));result.push($this.textPrint(text.substring(opener,closer2)))}else{closer2=null;if(closer==opener-1){closer=text.length}result.push($this.textPrint(text.substring(0,opener)));result.push($this.scriptPrint(text.substring(opener+tag[0].length,closer)))}text=text.substring((closer2===null)?closer+tag[1].length:closer2)}else{if(text){result.push($this.textPrint(text));text=""}}}return result.join("\n")};return function($text){var $fn=function(){};try{eval("$fn = "+$this.closure[0]+$this.parser($text)+$this.closure[1])}catch(e){throw"Parsing Error"}return $fn}}()}})(jQuery);(function(a){a.Chain.service("update",{handler:function(b){if(typeof b=="function"){return this.bind(b)}else{return this.trigger(b)}},bind:function(b){return this.element.bind("update",b)},trigger:function(b){this.element.items("update");this.element.item("update");this.element.triggerHandler("preupdate",this.element.item());if(b=="hard"){this.element.items(true).each(function(){a(this).update()})}this.element.triggerHandler("update",this.element.item());return this.element}})})(jQuery);(function(a){a.Chain.service("chain",{init:function(){this.anchor=this.element;this.template=this.anchor.html();this.tplNumber=0;this.builder=this.createBuilder();this.plugins={};this.isActive=false;this.destroyers=[];this.element.addClass("chain-element")},handler:function(b){this.element.items("backup");this.element.item("backup");if(typeof b=="object"){this.handleUpdater(b)}else{if(typeof b=="function"){this.handleBuilder(b)}}this.anchor.empty();this.isActive=true;this.element.update();return this.element},handleUpdater:function(h){var b=h.builder;delete h.builder;if(h.anchor){this.setAnchor(h.anchor)}delete h.anchor;var e=h.override;delete h.override;for(var d in h){if(typeof h[d]=="string"){h[d]=a.Chain.parse(h[d])}else{if(typeof h[d]=="object"){for(var c in h[d]){if(typeof h[d][c]=="string"){h[d][c]=a.Chain.parse(h[d][c])}}}}}var f=function(o,p){var n,q;var k=a(this);for(var m in h){if(m=="self"){n=k}else{n=a(m,k)}if(typeof h[m]=="function"){q=h[m].apply(k,[p,n]);if(typeof q=="string"){n.not(":input").html(q).end().filter(":input").val(q)}}else{if(typeof h[m]=="object"){for(var l in h[m]){if(typeof h[m][l]=="function"){q=h[m][l].apply(k,[p,n]);if(typeof q=="string"){if(l=="content"){n.html(q)}else{if(l=="text"){n.text(q)}else{if(l=="value"){n.val(q)}else{if(l=="class"||l=="className"){n.addClass(q)}else{n.attr(l,q)}}}}}}}}}}};var g=this.defaultBuilder;this.builder=function(i){if(b){b.apply(this,[i])}if(!e){g.apply(this)}this.update(f);return false}},handleBuilder:function(b){this.builder=this.createBuilder(b)},defaultBuilder:function(c,b){var d=c?(c.apply(this,[b])!==false):true;if(d){this.bind("update",function(g,h){var e=a(this);for(var f in h){if(typeof h[f]!="object"&&typeof h[f]!="function"){e.find("> ."+f+", *:not(.chain-element) ."+f).each(function(){var i=a(this);if(i.filter(":input").length){i.val(h[f])}else{if(i.filter("img").length){i.attr("src",h[f])}else{i.html(h[f])}}})}}})}},createBuilder:function(b){var c=this.defaultBuilder;return function(d){c.apply(this,[b,d]);return false}},setAnchor:function(b){this.anchor.html(this.template);this.anchor=b==this.element?b:this.element.find(b).eq(0);this.template=this.anchor.html();this.anchor.empty()},$anchor:function(b){if(b){this.element.items("backup");this.element.item("backup");this.setAnchor(b);this.element.update();return this.element}else{return this.anchor}},$template:function(b){if(!arguments.length){return a("<div>").html(this.template).children().eq(this.tplNumber)}if(b=="raw"){return this.template}if(typeof b=="number"){this.tplNumber=b}else{var c=a("<div>").html(this.template).children();var d=c.filter(b).eq(0);if(d.length){this.tplNumber=c.index(d)}else{return this.element}}this.element.items("backup");this.element.item("backup");this.element.update();return this.element},$builder:function(b){if(b){return this.handler(b)}else{return this.builder}},$active:function(){return this.isActive},$plugin:function(b,c){if(c===null){delete this.plugins[b]}else{if(typeof c=="function"){this.plugins[b]=c}else{if(b&&!c){return this.plugins[b]}else{return this.plugins}}}if(typeof c=="function"){this.element.items(true).each(function(){var d=a(this);c.call(d,d.item("root"))})}this.element.update();return this.element},$clone:function(){var c=this.element.attr("id");this.element.attr("id","");var b=this.element.clone().empty().html(this.template);this.element.attr("id",c);return b},$destroy:function(b){this.element.removeClass("chain-element");if(!b){this.element.items("backup");this.element.item("backup");this.element.find(".chain-element").each(function(){a(this).chain("destroy",true)})}this.element.triggerHandler("destroy");this.isActive=false;this.anchor.html(this.template);return this.element}})})(jQuery);(function(a){a.Chain.service("item",{init:function(){this.isActive=false;this.isBuilt=false;this.root=this.element;this.data=false;this.datafn=this.dataHandler},handler:function(b){if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="function"){return this.handleFunction(b)}else{return this.handleDefault()}}},handleObject:function(b){this.setData(b);this.isActive=true;this.update();return this.element},handleFunction:function(b){this.datafn=b;return this.element},handleDefault:function(){if(this.isActive){return this.getData()}else{return false}},getData:function(){this.data=this.datafn.call(this.element,this.data);return this.data},setData:function(d){var c;if(a.Chain.jobject(d)&&d.item()){c=a.extend({},d.item())}else{if(a.Chain.jobject(d)){c={}}else{c=d}}this.data=this.datafn.call(this.element,this.data||c,c);if(this.linkElement&&this.linkElement[0]!=d[0]){var b=this.linkFunction();if(a.Chain.jobject(b)&&b.length&&b.item()){b.item(this.data)}}},dataHandler:function(b,c){if(arguments.length==2){return a.extend(b,c)}else{return b}},update:function(){return this.element.update()},build:function(){var b=this.element.chain("template","raw").replace(/jQuery\d+\=\"null\"/gi,"");this.element.chain("anchor").html(b);if(!a.Chain.jidentic(this.root,this.element)){var c=this.root.chain("plugin");for(var d in c){c[d].apply(this.element,[this.root])}}this.element.chain("builder").apply(this.element,[this.root]);this.isBuilt=true},$update:function(){if(this.element.chain("active")&&this.isActive&&!this.isBuilt&&this.getData()){this.build()}return this.element},$replace:function(b){this.data={};this.setData(b);this.isActive=true;this.update();return this.element},$remove:function(b){this.element.chain("destroy");this.element.remove();this.element.item("link",null);this.element.item("destroy");if(!a.Chain.jidentic(this.root,this.element)&&!b){this.root.update()}},$active:function(){return this.isActive},$root:function(b){if(arguments.length){this.root=b;this.update();return this.element}else{return this.root}},$backup:function(){this.isBuilt=false;return this.element},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.isActive=true;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){var e=b.linkFunction();if(e&&e.length){b.element.item(e)}};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$destroy:function(){return this.element}})})(jQuery);(function(a){a.Chain.service("items",{collections:{all:function(){return this.element.chain("anchor").children(".chain-item")},visible:function(){return this.element.chain("anchor").children(".chain-item:visible")},hidden:function(){return this.element.chain("anchor").children(".chain-item:hidden")},self:function(){return this.element}},init:function(){this.isActive=false;this.pushBuffer=[];this.shiftBuffer=[];this.collections=a.extend({},this.collections)},handler:function(b){if(b instanceof Array){return this.handleArray(b)}else{if(!this.isActive){return a().eq(-1)}else{if(a.Chain.jobject(b)){return this.handleElement(b)}else{if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="number"){return this.handleNumber(b)}else{if(b===true){return this.handleTrue()}else{return this.handleDefault()}}}}}}},handleObject:function(b){return this.collection("all").filter(function(){return a(this).item()==b})},handleElement:function(b){if(!a.Chain.jidentic(b,b.item("root"))&&a.Chain.jidentic(this.element,b.item("root"))){return b}else{return a().eq(-1)}},handleArray:function(b){return this.$merge(b)},handleNumber:function(b){if(b==-1){return this.collection("visible").filter(":last")}else{return this.collection("visible").eq(b)}},handleTrue:function(){return this.collection("all")},handleDefault:function(){return this.collection("visible")},update:function(){this.element.update()},empty:function(){var b=this.collection("all");setTimeout(function(){b.each(function(){a(this).item("remove",true)})},1);this.element.chain("anchor").empty()},collection:function(b,c){if(arguments.length>1){if(typeof c=="function"){this.collections[b]=c}return this.element}else{if(this.collections[b]){return this.collections[b].apply(this)}else{return a().eq(-1)}}},$update:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var c=this;var b=this.element.chain("builder");var f=this.element.chain("template");var d;var e=function(){var g=f.clone()[d?"appendTo":"prependTo"](c.element.chain("anchor")).addClass("chain-item").item("root",c.element);if(c.linkElement&&a.Chain.jobject(this)&&this.item()){g.item("link",this,"self")}else{g.item(this)}g.chain(b)};d=false;a.each(this.shiftBuffer,e);d=true;a.each(this.pushBuffer,e);this.shiftBuffer=[];this.pushBuffer=[];return this.element},$add:function(){if(this.linkElement){return this.element}var d;var c=Array.prototype.slice.call(arguments);if(typeof c[0]=="string"){d=c.shift()}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this[b]=this[b].concat(c);this.update();return this.element},$merge:function(d,c){if(this.linkElement){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;if(a.Chain.jobject(c)){this[b]=this[b].concat(c.map(function(){return a(this)}).get())}else{if(c instanceof Array){this[b]=this[b].concat(c)}}this.update();return this.element},$replace:function(d,c){if(this.linkElement&&arguments.callee.caller!=this.linkUpdater){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this.empty();if(a.Chain.jobject(c)){this[b]=c.map(function(){return a(this)}).get()}else{if(c instanceof Array){this[b]=c}}this.update();return this.element},$remove:function(){if(this.linkElement){return this.element}for(var b=0;b<arguments.length;b++){this.handler(arguments[b]).item("remove",true)}this.update();return this.element},$reorder:function(c,b){if(b){this.handler(c).before(this.handler(b))}else{this.handler(c).appendTo(this.element.chain("anchor"))}this.update();return this.element},$empty:function(){if(this.linkElement){return this.element}this.empty();this.shiftBuffer=[];this.pushBuffer=[];this.update();return this.element},$data:function(b){return this.handler(b).map(function(){return a(this).item()}).get()},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){b.$replace(b.linkFunction())};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$index:function(b){return this.collection("all").index(this.handler(b))},$collection:function(){return this.collection.apply(this,Array.prototype.slice.call(arguments))},$active:function(){return this.isActive},$backup:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var b=[];this.collection("all").each(function(){var c=a(this).item();if(c){b.push(c)}});this.pushBuffer=b.concat(this.pushBuffer);this.empty();return this.element},$destroy:function(){this.empty();return this.element}});a.Chain.extend("items",{doFilter:function(){var c=this.searchProperties;var d=this.searchText;if(d){if(typeof d=="string"){d=d.toLowerCase()}var b=this.element.items(true).filter(function(){var f=a(this).item();if(c){for(var e=0;e<c.length;e++){if(typeof f[c[e]]=="string"&&!!(typeof d=="string"?f[c[e]].toLowerCase():f[c[e]]).match(d)){return true}}}else{for(var g in f){if(typeof f[g]=="string"&&!!(typeof d=="string"?f[g].toLowerCase():f[g]).match(d)){return true}}}});this.element.items(true).not(b).hide();b.show()}else{this.element.items(true).show();this.element.unbind("preupdate",this.searchBinding);this.searchBinding=null}},$filter:function(d,c){if(!arguments.length){return this.update()}this.searchText=d;if(typeof c=="string"){this.searchProperties=[c]}else{if(c instanceof Array){this.searchProperties=c}else{this.searchProperties=null}}if(!this.searchBinding){var b=this;this.searchBinding=function(f,e){b.doFilter()};this.element.bind("preupdate",this.searchBinding)}return this.update()}});a.Chain.extend("items",{doSort:function(){var b=this.sortName;var d=this.sortOpt;var g={number:function(i,h){return parseFloat((a(i).item()[b]+"").match(/\d+/gi)[0])-parseFloat((a(h).item()[b]+"").match(/\d+/gi)[0])},"default":function(i,h){return a(i).item()[b]>a(h).item()[b]?1:-1}};if(b){var e=d.fn||g[d.type]||g["default"];var f=this.element.items(true).get().sort(e);f=d.desc?f.reverse():f;for(var c=0;c<f.length;c++){this.element.chain("anchor").append(f[c])}d.desc=d.toggle?!d.desc:d.desc}else{this.element.unbind("preupdate",this.sortBinding);this.sortBinding=null}},$sort:function(c,d){if(!c&&c!==null&&c!==false){return this.update()}if(this.sortName!=c){this.sortOpt=a.extend({desc:false,type:"default",toggle:false},d)}else{a.extend(this.sortOpt,d)}this.sortName=c;if(!this.sortBinding){var b=this;this.sortBinding=function(f,e){b.doSort()};this.element.bind("preupdate",this.sortBinding)}return this.update()}})})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(e){var d=".toolbar h1";a(function(){a("#jqt").bind("pageAnimationStart",function(i,g){if(g.direction==="in"){var f=a(d,a(i.target));var h=a(i.target).data("referrer");if(f.length&&h&&f.html()===""){f.html(h.text())}}})});function c(f){d=f}return{setTitleSelector:c}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(f){var m,i;var d=false;function n(p,o,r,q){i=p;if(window.openDatabase){m=openDatabase(p,o,r,q);if(!m){debugTxt=("Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota");if(d){c(debugTxt)}}}else{debugTxt=("Couldn't open the database. Please try with a WebKit nightly with this feature enabled");if(d){c(debugTxt)}}}function e(o){for(x=0;x<o.createTables.length;x++){p(o.createTables[x])}function p(r){debugTxt="create table "+r.table;var q="CREATE TABLE "+r.table+" (";nodeSize=r.property.length-1;for(y=0;y<=nodeSize;y++){q+=r.property[y].name+" "+r.property[y].type;if(y!=nodeSize){q+=", "}}q+=")";k(q,debugTxt)}}function j(p,o,q){stringQuery="DELETE FROM "+p+" WHERE "+o+" = "+q;debugTxt="delete row"+o+" "+q;k(stringQuery,debugTxt)}function g(p,o){stringQuery="SELECT * FROM "+p;debugTxt="selecting everything in table "+p;k(stringQuery,debugTxt,o)}function h(o){stringQuery="DROP TABLE "+o;debugTxt="delete table "+o;k(stringQuery,debugTxt)}function l(o){for(x=0;x<o.addRow.length;x++){p(o.addRow[x])}function p(q){debugTxt="create row "+q.table;stringQuery="INSERT INTO "+q.table+" (";nodeSize=q.property.length-1;for(y=0;y<=nodeSize;y++){stringQuery+=q.property[y].name;if(y!=nodeSize){stringQuery+=", "}}stringQuery+=") VALUES (";for(y=0;y<=nodeSize;y++){stringQuery+='"'+q.property[y].value+'"';if(y!=nodeSize){stringQuery+=", "}}stringQuery+=")";k(stringQuery,debugTxt)}}function k(o,p,q){p+="<br> SQL: "+o;callback=q;m.transaction(function(r){r.executeSql(o,[],function(t,s){if(callback){callback(s)}if(d){p+="<br><span style='color:green'>success</span> ";c(p)}},function(s,t){p+="<br><span style='color:red'>"+t.message+"</span> ";if(d){c(p)}})})}function c(o){if(!a("#debugMode")[0]){a("body").append("<div style='position:abolute;top:0 !important;left:0 !important;width:100% !important;min-height:100px !important; height:300px; overflow:scroll;z-index:1000; display:block; opacity:0.8; background:#000;-webkit-backface-visibility:visible ' id='debugMode'></div>")}a("#debugMode").append("<div class='debugerror'>"+o+"</div>")}return{dbOpen:n,dbDeleteRow:j,dbDropTable:h,dbInsertRows:l,dbSelectAll:g,dbExecuteQuery:k,dbCreateTables:e}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(d){function c(g){if(g==null){g=0}var f=e(g);a("body > *").css("min-height",f+"px !important");a("body.fullscreen > *").css("min-height",f+"px !important");a("body.fullscreen.black-translucent > *").css("min-height",f+"px !important");a("body.landscape > *").css("min-height",f+"px !important")}function e(g){var f=0;if(typeof(window.innerWidth)=="number"){f=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){f=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){f=document.body.clientHeight}}}if(f<g){f=g}return f}return{resetHeight:c}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(c){b.fn.makeFloaty=function(d){var f={align:"top",spacing:20,time:".3s"};var e=b.extend({},f,d);e.align=(e.align=="top")?"top":"bottom";return this.each(function(){var g=b(this);g.css({"-webkit-transition":"top "+e.time+" ease-in-out",display:"block","min-height":"0 !important"}).data("settings",e);b(document).bind("scroll",function(){if(g.data("floatyVisible")===true){g.scrollFloaty()}});g.scrollFloaty()})};b.fn.scrollFloaty=function(){return this.each(function(){var d=b(this);var f=d.data("settings");var e=b("html").attr("clientHeight");var g=window.pageYOffset+((f.align=="top")?f.spacing:e-f.spacing-d.get(0).offsetHeight);d.css("top",g).data("floatyVisible",true)})};b.fn.hideFloaty=function(){return this.each(function(){var d=b(this);var e=d.get(0).offsetHeight;d.css("top",-e-10).data("floatyVisible",false)})};b.fn.toggleFloaty=function(){return this.each(function(){var d=b(this);if(d.data("floatyVisible")===true){d.hideFloaty()}else{d.scrollFloaty()}})}})}})(jQuery);(function(c){if(c.jQTouch){function b(f){var i,e,h,i,g=0;h={element:c("#gesture_test"),onGestureStart:null,onGestureChange:null,onGestureEnd:null,};h=c.extend({},h,f);h.element.bind("gesturestart",function(j){j.originalEvent.preventDefault();if(h.onGestureStart){h.onGestureStart(a(j,i),d(j,g),j,h.element)}}).bind("gesturechange",function(j){if(h.onGestureChange){h.onGestureChange(a(j,i),d(j,g),j,h.element)}}).bind("gestureend",function(j){i=j.originalEvent.scale;g=(j.originalEvent.rotation+g)%360;if(h.onGestureEnd){h.onGestureEnd(a(j,i),d(j,g),j,h.element)}})}function d(f,e){return f.originalEvent.rotation+e}function a(f,e){return f.originalEvent.scale+e}c.fn.bindGestures=function(e){e.element=this;b(e)}}})(jQuery);(function(f){var g,j=this,o=j.document,l=this.WebKitCSSMatrix,k={selector:".horizontal-scroll > table",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",defaultTransform:"defaulttransform",bounce:function(u){return u.attr("bounce")==="false"?false:k.bounce},scrollBar:function(u){return u.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageX",numberOfTouches:1,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,bounceSpeed:500,preventDefault:true,maxScrollTime:1000,friction:3,bounceTimingFunction:"cubic-bezier(0,0,.25,1)",bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:s,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:t,momentum:m},q=function(){return j.innerWidth+"px"},n=function(u){return(j.innerHeight-u.toolbar)+"px"},h={variables:{toolbar:45},defaults:{".horizontal-scroll":{width:q,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:n},".horizontal-scroll > table":{height:"100%"},".horizontal-scroll .scrollbar.horizontal":{"-webkit-transition-timing-function":"cubic-bezier(0,0,0.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,300ms","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 8, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3 2",position:"absolute","z-index":10,width:"1px",height:"5px",bottom:"1px",left:"1px"}},portrait:{".portrait .horizontal-scroll":{width:q}},landscape:{".landscape .horizontal-scroll":{width:q}}};if(f.jQTouch){f.jQTouch.addExtension(function(v){function u(A,z){var w=z.page.find(k.selector);w.scrollHorizontally(k.attributesToOptions(w,k.attributes))}f(o.body).bind("pageInserted",u);f(function(){f(k.selector).each(function(){f(this).scrollHorizontally(k.attributesToOptions(f(this),k.attributes))})});return{}})}function e(w,u){var v={};f.each(u,function(z,A){if(f.isFunction(A)){v[z]=A(w)}else{if(w.attr(A)!=g){v[z]=w.attr(A)}}});return v}f.fn.scrollHorizontally=function(u){u=f.extend(true,{},k,u||{});return this.each(function(){p(this,u)})};f.fn.scrollHorizontally.defaults=function(u){if(u!==g){k=f.extend(true,k,u)}return f.extend({},k)};f.fn.scrollHorizontally.defaultCSS=function(u){if(u!==g){h=f.extend(true,h,u)}return f.extend({},h)};function p(z,w){var u=f(z).data("jqt-horizontal-scroll-options",w).css("webkitTransform",r(w.defaultTransform,w.defaultOffset)),v=new l(u.css("webkitTransform"));f.each(w.events,function(A,B){z.addEventListener(A,B,false)});w.currentPosition=v.m41;w.parentWidth=u.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(u.parent(),"horizontal",w.scrollBarOptions||{}):b(u.parent(),"horizontal",w.scrollBarOptions||{})}}function a(C){var D=f(this),w=D.data("jqt-horizontal-scroll-options"),v,B=D.outerWidth(),A=D.parent().width(),z=-(B-A),u=A/6;w.parentWidth=A;if(!!w.ignoreTags&&f(C.target).is(w.ignoreTags)||C.targetTouches.length!==w.numberOfTouches){return null}v=new l(D.css("webkitTransform"));D.data("jqt-horizontal-scroll-current-event",{startLocation:C.touches[0][w.eventProperty],startPosition:v.m41,currentPosition:v.m41,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentWidth:A,endPoint:z,minScroll:!w.bounce?0:u,maxScroll:!w.bounce?z:z-u,timingFunction:w.bounceTimingFunction});if(w.scrollBarElement){w.scrollBarElement.init(A,B)}w.setPosition(D,w,v.m41,"0");if(w.preventDefault){C.preventDefault();return false}else{return true}}function s(z){var B=f(this),w=B.data("jqt-horizontal-scroll-options"),A=B.data("jqt-horizontal-scroll-current-event"),v=A.lastMoveTime,C=A.startLocation-z.touches[0][w.eventProperty],u=A.startPosition-C;A.currentPosition=u;A.moved=true;A.lastMoveTime=z.timeStamp;if((A.lastMoveTime-v)>w.maxScrollTime){A.startTime=A.lastMoveTime}if(w.scrollBarElement&&!w.scrollBarElement.visible){w.scrollBarElement.show()}w.setPosition(B,w,A.currentPosition,0);if(w.preventDefault){z.preventDefault();return false}else{return true}}function d(v){var A=f(this),u=A.data("jqt-horizontal-scroll-options"),w=A.data("jqt-horizontal-scroll-current-event"),z,B;if(!w.moved){if(u.scrollBarElement){u.scrollBarElement.hide()}z=v.target;if(z.nodeType==3){z=z.parentNode}B=o.createEvent("MouseEvents");B.initEvent("click",true,true);z.dispatchEvent(B);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}}u.momentum(A,u,w,v);u.setPosition(A,u,w.currentPosition,w.duration);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}else{return true}}function i(z){var w=f(this),u=w.data("jqt-horizontal-scroll-options"),v=w.data("jqt-horizontal-scroll-current-event");if(v){if(v.currentPosition>0){v.currentPosition=0;u.setPosition(w,u,0,u.bounceSpeed)}else{if(v.currentPosition<v.endPoint){v.currentPosition=v.endPoint;u.setPosition(w,u,v.endPoint,u.bounceSpeed)}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}function m(C,F,D,v){var z=Math.min(F.maxScrollTime,D.lastMoveTime-D.startTime),u=D.startPosition-D.currentPosition,A=Math.abs(u)/z,B=z*A*F.friction,w=Math.round(u*A),E=Math.round(D.currentPosition-w);if(D.currentPosition>0){E=0}else{if(D.currentPosition<D.endPoint){E=D.endPoint}else{if(E>D.minScroll){B=B*Math.abs(D.minScroll/E);E=D.minScroll}else{if(E<D.maxScroll){B=B*Math.abs(D.maxScroll/E);E=D.maxScroll}}}}D.momentum=E/D.currentPosition;D.currentPosition=E;D.duration=B}function t(v,u){return u.setPosition(v,u,0,u.defaultDuration)}function c(w,v,u,B,A){if(v.scrollBarElement){var z=(w.parent().width()-w.outerWidth());if(u>0){z+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/z*u,r("{0}ms",B!==g?B:v.defaultDuration))}if(B!==g){w.css("webkitTransitionDuration",r("{0}ms",B))}if(A!==g){w.css("webkitTransitionTimingFunction",A)}v.currentPosition=u||0;return w.css("webkitTransform",r("translate3d({0}px, 0, 0)",v.currentPosition))}function r(v){var u=arguments;return v.replace(/\{(\d+)\}/g,function(z,w){return u[Number(w)+1]+""})}function b(v,w,u){if(!(this instanceof b)){return new b(v,w,u)}this.direction=w;this.bar=f(o.createElement("div")).addClass("scrollbar "+w).appendTo(v)[0]}b.prototype={direction:"horizontal",size:0,maxSize:0,maxScroll:0,visible:false,init:function(u,v){var w=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=u-8;this.size=Math.round(this.maxSize*this.maxSize/v)+w;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-w)+"px"},setPosition:function(u){u=this.direction=="horizontal"?"translate3d("+Math.round(u)+"px,0,0)":"translate3d(0,"+Math.round(u)+"px,0)";this.bar.style.webkitTransform=u},scrollTo:function(v,u){this.bar.style.webkitTransitionDuration=(u||"400ms")+",300ms";this.setPosition(v)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){j.scrollTo(0,0);var u="",z=h,w=j.innerHeight>j.innerWidth?"portrait":"landscape",A=function(B,C){u+=B+":"+(f.isFunction(C)?C(z.variables):C)+";"},v=function(B,C){u+=B+"{";f.each(C,A);u+="}"};f.each(z.defaults,v);f.each(z[w],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head");f(j).one("orientationchange",function(){setTimeout(function(){j.scrollTo(0,0);u="";f.each(z[j.innerHeight>j.innerWidth?"portrait":"landscape"],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head")},30)})})})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var i,f,h;function d(){return navigator.geolocation}function g(j){if(d()){h=j;navigator.geolocation.getCurrentPosition(c);return true}else{console.log("Device not capable of geo-location.");j(false);return false}}function c(j){i=j.coords.latitude;f=j.coords.longitude;if(h){h(e())}}function e(){if(i&&f){return{latitude:i,longitude:f}}else{console.log("No location available. Try calling updateLocation() first.");return false}}return{updateLocation:g,getLocation:e}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var c=[];c[0]="uncached";c[1]="idle";c[2]="checking";c[3]="downloading";c[4]="updateready";c[5]="obsolete";var d=window.applicationCache;window.addEventListener("cached",f,false);window.addEventListener("checking",f,false);window.addEventListener("downloading",f,false);window.addEventListener("error",f,false);window.addEventListener("noupdate",f,false);window.addEventListener("obsolete",f,false);window.addEventListener("progress",f,false);window.addEventListener("updateready",f,false);function f(m){var j,i,k,l;j=(h())?"yes":"no";i=c[d.status];k=m.type;l="online: "+j;l+=", event: "+k;l+=", status: "+i;if(k=="error"&&navigator.onLine){l+=" There was an unknown error, check your Cache Manifest."}console.log(l)}function h(){return navigator.onLine}if(!b("html").attr("manifest")){console.log("No Cache Manifest listed on the <html> tag.")}d.addEventListener("updateready",function(i){if(c[d.status]!="idle"){d.swapCache();console.log("Swapped/updated the Cache Manifest.")}},false);function e(){d.update()}function g(){setInterval(function(){d.update()},10000)}return{isOnline:h,checkForUpdates:e,autoCheckForUpdates:g}})}})(jQuery);
1
+ (function(a){a.jQTouch=function(v){var D,s=a("head"),L="",I=[],H=0,m={},j="",u="portrait",T=true,S=0,e=0,i=[],w={},k=351,N=a.jQTouch.prototype.extensions,R=[],r="",E={addGlossToIcon:true,backSelector:".back, .cancel, .goback",cacheGetRequests:true,debug:false,fallback2dAnimation:"fade",fixedViewport:true,formSelector:"form",fullScreen:true,fullScreenClass:"fullscreen",hoverDelay:50,icon:null,icon4:null,moveThreshold:10,preloadImages:false,pressDelay:1000,startupScreen:null,statusBar:"default",submitSelector:".submit",touchSelector:"a, .touch",useAnimations:true,useFastTouch:true,animations:[{selector:".cube",name:"cubeleft",is3d:true},{selector:".cubeleft",name:"cubeleft",is3d:true},{selector:".cuberight",name:"cuberight",is3d:true},{selector:".dissolve",name:"dissolve",is3d:false},{selector:".fade",name:"fade",is3d:false},{selector:".flip",name:"flipleft",is3d:true},{selector:".flipleft",name:"flipleft",is3d:true},{selector:".flipright",name:"flipright",is3d:true},{selector:".pop",name:"pop",is3d:true},{selector:".slide",name:"slideleft",is3d:false},{selector:".slidedown",name:"slidedown",is3d:false},{selector:".slideleft",name:"slideleft",is3d:false},{selector:".slideright",name:"slideright",is3d:false},{selector:".slideup",name:"slideup",is3d:false},{selector:".swap",name:"swapleft",is3d:true},{selector:"#jqt > * > ul li a",name:"slideleft",is3d:false}]};function z(U){now=(new Date).getTime();delta=now-S;S=now;if(m.debug){if(U){f(delta+": "+U)}else{f(delta+": Called "+arguments.callee.caller.name)}}}function f(U){if(window.console!==undefined){console.log(U)}}function b(U){z();if(typeof(U.selector)==="string"&&typeof(U.name)==="string"){R.push(U)}}function l(V,U){z();I.unshift({page:V,animation:U,hash:"#"+V.attr("id"),id:V.attr("id")})}function o(V){z();if(!T){z("ClickHandler handler aborted because tap is not ready");V.preventDefault();return false}var U=a(V.target);if(!U.is(i.join(", "))){var U=a(V.target).closest(i.join(", "))}if(U&&U.attr("href")&&!U.isExternalLink()){z("Need to prevent default click behavior");V.preventDefault()}else{z("No need to prevent default click behavior")}if(a.support.touch){z("Not converting click to a tap event because touch handler is on the job")}else{z("Converting click event to a tap event");a(V.target).trigger("tap",V)}}function c(Z,W,Y,V){z();if(W.length===0){a.fn.unselect();z("Target element is missing.");return false}if(W.hasClass("current")){a.fn.unselect();z("You are already on the page you are trying to navigate to.");return false}a(":focus").blur();Z.trigger("pageAnimationStart",{direction:"out"});W.trigger("pageAnimationStart",{direction:"in"});if(a.support.animationEvents&&Y&&m.useAnimations){T=false;if(!a.support.transform3d&&Y.is3d){Y.name=m.fallback2dAnimation}var U;if(V){if(Y.name.indexOf("left")>0){U=Y.name.replace(/left/,"right")}else{if(Y.name.indexOf("right")>0){U=Y.name.replace(/right/,"left")}else{if(Y.name.indexOf("up")>0){U=Y.name.replace(/up/,"down")}else{if(Y.name.indexOf("down")>0){U=Y.name.replace(/down/,"up")}else{U=Y.name}}}}}else{U=Y.name}Z.bind("webkitAnimationEnd",X);Z.bind("webkitTransitionEnd",X);scrollTo(0,0);W.addClass(U+" in current");Z.addClass(U+" out")}else{W.addClass("current");X()}function X(aa){z();if(a.support.animationEvents&&Y&&m.useAnimations){Z.unbind("webkitAnimationEnd",X);Z.unbind("webkitTransitionEnd",X);Z.removeClass(U+" out current");W.removeClass(U+" in")}else{Z.removeClass(U+" out current")}j=W;if(V){I.shift()}else{l(j,Y)}Z.unselect();e=(new Date()).getTime();n(j.attr("id"));T=true;W.trigger("pageAnimationEnd",{direction:"in",animation:Y});Z.trigger("pageAnimationEnd",{direction:"out",animation:Y})}return true}function Q(){z();return u}function h(){z();if(I.length<1){z("History is empty.")}if(I.length===1){z("You are on the first panel.")}var V=I[0],U=I[1];if(c(V.page,U.page,V.animation,true)){return w}else{z("Could not go back.");return false}}function M(Y,Z,W){z();if(W){f("The reverse parameter of the goTo() function has been deprecated.")}var aa=I[0].page;if(typeof Z==="string"){for(var X=0,U=R.length;X<U;X++){if(R[X].name===Z){Z=R[X];break}}}if(typeof(Y)==="string"){var V=a(Y);if(V.length<1){d(Y,{animation:Z});return}else{Y=V}}if(c(aa,Y,Z)){return w}else{z("Could not animate pages.");return false}}function P(U){z();if(I[1]===undefined){z("There is no previous page in history")}else{if(location.hash===I[1].hash){h()}else{z(location.hash+" !== "+I[1].hash)}}}function O(U){z();m=a.extend({},E,U);if(m.preloadImages){for(var V=m.preloadImages.length-1;V>=0;V--){(new Image()).src=m.preloadImages[V]}}if(m.icon||m.icon4){var W,X;if(m.icon4&&window.devicePixelRatio&&window.devicePixelRatio===2){X=m.icon4}else{if(m.icon){X=m.icon}else{X=false}}if(X){W=(m.addGlossToIcon)?"":"-precomposed";r+='<link rel="apple-touch-icon'+W+'" href="'+X+'" />'}}if(m.startupScreen){r+='<link rel="apple-touch-startup-image" href="'+m.startupScreen+'" />'}if(m.fixedViewport){r+='<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>'}if(m.fullScreen){r+='<meta name="apple-mobile-web-app-capable" content="yes" />';if(m.statusBar){r+='<meta name="apple-mobile-web-app-status-bar-style" content="'+m.statusBar+'" />'}}if(r){s.prepend(r)}}function B(U,V){z();var W=null;a(U).each(function(Y,Z){var X=a(this);if(!X.attr("id")){X.attr("id","page-"+(++H))}a("#"+X.attr("id")).remove();D.trigger("pageInserted",{page:X.appendTo(D)});if(X.hasClass("current")||!W){W=X}});if(W!==null){M(W,V);return W}else{return false}}function A(U){var V=(new Date()).getTime()-e;if(V<k){return false}}function g(){z();u=Math.abs(window.orientation)==90?"landscape":"portrait";D.removeClass("portrait landscape").addClass(u).trigger("turn",{orientation:u})}function n(U){z("setHash is off at the moment");return;U=U.replace(/^#/,""),window.onhashchange=null;location.hash="#"+U;window.onhashchange=P}function d(U,V){z();var X={data:null,method:"GET",animation:null,callback:null,$referrer:null};var W=a.extend({},X,V);if(U!="#"){a.ajax({url:U,data:W.data,type:W.method,success:function(Y,aa){var Z=B(Y,W.animation);if(Z){if(W.method=="GET"&&m.cacheGetRequests===true&&W.$referrer){W.$referrer.attr("href","#"+Z.attr("id"))}if(W.callback){W.callback(true)}}},error:function(Y){if(W.$referrer){W.$referrer.unselect()}if(W.callback){W.callback(false)}}})}else{if(W.$referrer){W.$referrer.unselect()}}}function q(V,W){z();a(":focus").blur();V.preventDefault();var U=(typeof(V)==="string")?a(V).eq(0):(V.target?a(V.target):a(V));z(U.attr("action"));if(U.length&&U.is(m.formSelector)&&U.attr("action")){d(U.attr("action"),{data:U.serialize(),method:U.attr("method")||"POST",animation:R[0]||null,callback:W});return false}return false}function K(W){z();var V=W.closest("form");if(V.length===0){z("No parent form found")}else{z("About to submit parent form");var U=a.Event("submit");U.preventDefault();V.trigger(U);return false}return true}function p(){z();return(typeof WebKitAnimationEvent!="undefined")}function F(){z();return(typeof WebKitCSSMatrix!="undefined")}function J(){z();if(!m.useFastTouch){return false}if(typeof TouchEvent!="undefined"){if(window.navigator.userAgent.indexOf("Mobile")>-1){return true}else{return false}}else{return false}}function C(){z();var W,V,X,Y,U;W=document.getElementsByTagName("head")[0];V=document.body;X=document.createElement("style");X.textContent="@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#jqtTestFor3dSupport{height:3px}}";Y=document.createElement("div");Y.id="jqtTestFor3dSupport";W.appendChild(X);V.appendChild(Y);U=Y.offsetHeight===3;X.parentNode.removeChild(X);Y.parentNode.removeChild(Y);return U}function G(aa){z();if(!T){z("Tap is not ready");return false}var W=a(aa.target);if(!W.is(i.join(", "))){var W=a(aa.target).closest(i.join(", "))}if(!W.length||!W.attr("href")){z("Could not find a link related to tapped element");return false}var Z=W.attr("target"),Y=W.attr("hash"),X=null;if(W.isExternalLink()){W.unselect();return true}else{if(W.is(m.backSelector)){h(Y)}else{if(W.is(m.submitSelector)){K(W)}else{if(Z==="_webapp"){window.location=W.attr("href");return false}else{if(W.attr("href")==="#"){W.unselect();return true}else{for(var V=0,U=R.length;V<U;V++){if(W.is(R[V].selector)){X=R[V];break}}if(!X){f("Animation could not be found. Using slideleft.");X="slideleft"}if(Y&&Y!=="#"){W.addClass("active");M(a(Y).data("referrer",W),X,W.hasClass("reverse"));return false}else{W.addClass("loading active");d(W.attr("href"),{animation:X,callback:function(){W.removeClass("loading");setTimeout(a.fn.unselect,250,W)},$referrer:W});return false}}}}}}}function t(ae){z();if(!T){z("TouchStart handler aborted because tap is not ready");ae.preventDefault();return false}var ai=a(ae.target);if(!ai.length){z("Could not find target of touchstart event.");return}var W=(new Date).getTime(),U=null,X=null,aa,ac,ab,Z=0,Y=0,ad=0;if(event.changedTouches&&event.changedTouches.length){aa=event.changedTouches[0];ac=aa.pageX;ab=aa.pageY}ai.bind("touchmove",af).bind("touchend",V).bind("touchcancel",ag);U=setTimeout(function(){ai.makeActive()},m.hoverDelay);X=setTimeout(function(){ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag);ai.unselect();clearTimeout(U);ai.trigger("press")},m.pressDelay);function ag(aj){z();clearTimeout(U);ai.unselect();ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag)}function V(aj){z();ai.unbind("touchend",V).unbind("touchcancel",ag);clearTimeout(U);clearTimeout(X);if(Math.abs(Z)<m.moveThreshold&&Math.abs(Y)<m.moveThreshold&&ad<m.pressDelay){ai.trigger("tap",aj)}else{ai.unselect()}}function af(am){ah();var al=Math.abs(Z);var aj=Math.abs(Y);var ak;if(al>aj&&(al>35)&&ad<1000){if(Z<0){ak="left"}else{ak="right"}ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag);ai.trigger("swipe",{direction:ak,deltaX:Z,deltaY:Y})}ai.unselect();clearTimeout(U);if(al>m.moveThreshold||aj>m.moveThreshold){clearTimeout(X)}}function ah(){var aj=event.changedTouches[0]||null;Z=aj.pageX-ac;Y=aj.pageY-ab;ad=(new Date).getTime()-W}}O(v);a(document).ready(function(){a.support.animationEvents=p();a.support.cssMatrix=F();a.support.touch=J();a.support.transform3d=C();if(!a.support.touch){f("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable.")}if(!a.support.transform3d){f("This device does not support 3d animation. 2d animations will be used instead.")}a.fn.isExternalLink=function(){var Y=a(this);return(Y.attr("target")=="_blank"||Y.attr("rel")=="external"||Y.is('a[href^="http://maps.google.com"], a[href^="mailto:"], a[href^="tel:"], a[href^="javascript:"], a[href*="youtube.com/v"], a[href*="youtube.com/watch"]'))};a.fn.makeActive=function(){return a(this).addClass("active")};a.fn.press=function(Y){if(a.isFunction(Y)){return a(this).live("press",Y)}else{return a(this).trigger("press")}};a.fn.swipe=function(Y){if(a.isFunction(Y)){return a(this).live("swipe",Y)}else{return a(this).trigger("swipe")}};a.fn.tap=function(Y){if(a.isFunction(Y)){return a(this).live("tap",Y)}else{return a(this).trigger("tap")}};a.fn.unselect=function(Y){if(Y){Y.removeClass("active")}else{a(".active").removeClass("active")}};for(var V=0,U=N.length;V<U;V++){var W=N[V];if(a.isFunction(W)){a.extend(w,W(w))}}if(m.cubeSelector){f("NOTE: cubeSelector has been deprecated. Please use cubeleftSelector instead.");m.cubeleftSelector=m.cubeSelector}if(m.flipSelector){f("NOTE: flipSelector has been deprecated. Please use flipleftSelector instead.");m.flipleftSelector=m.flipSelector}if(m.slideSelector){f("NOTE: slideSelector has been deprecated. Please use slideleftSelector instead.");m.slideleftSelector=m.slideSelector}for(var V=0,U=E.animations.length;V<U;V++){var X=E.animations[V];if(m[X.name+"Selector"]!==undefined){X.selector=m[X.name+"Selector"]}b(X)}i.push("input");i.push(m.touchSelector);i.push(m.backSelector);i.push(m.submitSelector);a(i.join(", ")).css("-webkit-touch-callout","none");D=a("#jqt");if(D.length===0){f('Could not find an element with the id "jqt", so the body id has been set to "jqt". If you are having any problems, wrapping your panels in a div with the id "jqt" might help.');D=a("body").attr("id","jqt")}if(a.support.transform3d){D.addClass("supports3d")}if(m.fullScreenClass&&window.navigator.standalone==true){D.addClass(m.fullScreenClass+" "+m.statusBar)}if(window.navigator.userAgent.match(/Android/ig)){D.addClass("android")}D.bind("touchstart",t).bind("click",o).bind("mousedown",A).bind("orientationchange",g).bind("submit",q).bind("tap",G).trigger("orientationchange");if(a("#jqt > .current").length==0){j=a("#jqt > *:first")}else{j=a("#jqt > .current:first");a("#jqt > .current").removeClass("current")}a(j).addClass("current");L=a(j).attr("id");n(L);l(j);scrollTo(0,0);a("#jqt > *").css("minHeight",window.innerHeight)});w={animations:R,hist:I,settings:m,support:a.support,getOrientation:Q,goBack:h,goTo:M,addAnimation:b,submitForm:q};return w};a.jQTouch.prototype.extensions=[];a.jQTouch.addExtension=function(b){a.jQTouch.prototype.extensions.push(b)}})(jQuery);(function(a){a.fn.transition=function(c,b){return this.each(function(){var e=a(this);var h={speed:"300ms",callback:null,ease:"ease-in-out"};var g=a.extend({},h,b);if(g.speed===0){e.css(c);window.setTimeout(g.callback,0)}else{if(a.browser.safari){var f=[];for(var d in c){f.push(d)}e.css({webkitTransitionProperty:f.join(", "),webkitTransitionDuration:g.speed,webkitTransitionTimingFunction:g.ease});if(g.callback){e.one("webkitTransitionEnd",g.callback)}setTimeout(function(i){i.css(c)},0,e)}else{e.animate(c,g.speed,g.callback)}}})}})(jQuery);var SpinningWheel={cellHeight:44,friction:0.003,slotData:[],handleEvent:function(a){if(a.type=="touchstart"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapDown(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollStart(a)}}}else{if(a.type=="touchmove"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapCancel(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollMove(a)}}}else{if(a.type=="touchend"){if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapUp(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollEnd(a)}}}else{if(a.type=="webkitTransitionEnd"){if(a.target.id=="sw-wrapper"){}else{this.backWithinBoundaries(a)}}else{if(a.type=="orientationchange"){this.onOrientationChange(a)}else{if(a.type=="scroll"){this.onScroll(a)}}}}}}},onOrientationChange:function(a){window.scrollTo(0,0);this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px";this.calculateSlotsWidth()},onScroll:function(a){this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px"},lockScreen:function(a){a.preventDefault();a.stopPropagation()},reset:function(){this.slotEl=[];this.activeSlot=null;this.swWrapper=undefined;this.swSlotWrapper=undefined;this.swSlots=undefined;this.swFrame=undefined},calculateSlotsWidth:function(){var b=this.swSlots.getElementsByTagName("div");for(var a=0;a<b.length;a+=1){this.slotEl[a].slotWidth=b[a].offsetWidth}},create:function(){var d,a,b,c,e;this.reset();e=document.createElement("div");e.id="sw-wrapper";e.style.top=window.innerHeight+window.pageYOffset+"px";e.style.webkitTransitionProperty="-webkit-transform";e.innerHTML='<div id="sw-slots-wrapper"><div id="sw-slots"></div></div><div id="sw-frame"></div>';document.body.appendChild(e);this.swWrapper=e;this.swSlotWrapper=document.getElementById("sw-slots-wrapper");this.swSlots=document.getElementById("sw-slots");this.swFrame=document.getElementById("sw-frame");for(a=0;a<this.slotData.length;a+=1){c=document.createElement("ul");b="";for(d in this.slotData[a].values){b+="<li>"+this.slotData[a].values[d]+"</li>"}c.innerHTML=b;e=document.createElement("div");e.className=this.slotData[a].style;e.appendChild(c);this.swSlots.appendChild(e);c.slotPosition=a;c.slotYPosition=0;c.slotWidth=0;c.slotMaxScroll=this.swSlotWrapper.clientHeight-c.clientHeight-86;c.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.slotEl.push(c);if(this.slotData[a].defaultValue){this.scrollToValue(a,this.slotData[a].defaultValue)}}this.calculateSlotsWidth();document.addEventListener("touchmove",this,false);window.addEventListener("orientationchange",this,true);window.addEventListener("scroll",this,true);document.getElementById("sw-done").addEventListener("touchstart",this,false);this.swFrame.addEventListener("touchstart",this,false)},open:function(){this.create();this.swWrapper.style.webkitTransitionTimingFunction="ease-out";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, -210px, 0)"},destroy:function(){this.swWrapper.removeEventListener("webkitTransitionEnd",this,false);this.swFrame.removeEventListener("touchstart",this,false);document.getElementById("sw-done").removeEventListener("touchstart",this,false);document.removeEventListener("touchmove",this,false);window.removeEventListener("orientationchange",this,true);window.removeEventListener("scroll",this,true);this.slotData=[];this.cancelAction=function(){return false};this.cancelDone=function(){return true};this.reset();document.body.removeChild(document.getElementById("sw-wrapper"))},close:function(){this.swWrapper.style.webkitTransitionTimingFunction="ease-in";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, 0, 0)";this.swWrapper.addEventListener("webkitTransitionEnd",this,false)},addSlot:function(b,d,a){if(!d){d=""}d=d.split(" ");for(var c=0;c<d.length;c+=1){d[c]="sw-"+d[c]}d=d.join(" ");var e={values:b,style:d,defaultValue:a};this.slotData.push(e)},getSelectedValues:function(){var c,f,d,a,e=[],b=[];for(d in this.slotEl){this.slotEl[d].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[d].style.webkitTransitionDuration="0";if(this.slotEl[d].slotYPosition>0){this.setPosition(d,0)}else{if(this.slotEl[d].slotYPosition<this.slotEl[d].slotMaxScroll){this.setPosition(d,this.slotEl[d].slotMaxScroll)}}c=-Math.round(this.slotEl[d].slotYPosition/this.cellHeight);f=0;for(a in this.slotData[d].values){if(f==c){e.push(a);b.push(this.slotData[d].values[a]);break}f+=1}}return{keys:e,values:b}},setPosition:function(b,a){this.slotEl[b].slotYPosition=a;this.slotEl[b].style.webkitTransform="translate3d(0, "+a+"px, 0)"},scrollStart:function(c){var d=c.targetTouches[0].clientX-this.swSlots.offsetLeft;var f=0;for(var a=0;a<this.slotEl.length;a+=1){f+=this.slotEl[a].slotWidth;if(d<f){this.activeSlot=a;break}}if(this.slotData[this.activeSlot].style.match("readonly")){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);return false}this.slotEl[this.activeSlot].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[this.activeSlot].style.webkitTransitionDuration="0";var b=window.getComputedStyle(this.slotEl[this.activeSlot]).webkitTransform;b=new WebKitCSSMatrix(b).m42;if(b!=this.slotEl[this.activeSlot].slotYPosition){this.setPosition(this.activeSlot,b)}this.startY=c.targetTouches[0].clientY;this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=c.timeStamp;this.swFrame.addEventListener("touchmove",this,false);this.swFrame.addEventListener("touchend",this,false);return true},scrollMove:function(b){var a=b.targetTouches[0].clientY-this.startY;if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){a/=2}this.setPosition(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition+a);this.startY=b.targetTouches[0].clientY;if(b.timeStamp-this.scrollStartTime>80){this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=b.timeStamp}},scrollEnd:function(f){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){this.scrollTo(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition>0?0:this.slotEl[this.activeSlot].slotMaxScroll);return false}var b=this.slotEl[this.activeSlot].slotYPosition-this.scrollStartY;if(b<this.cellHeight/1.5&&b>-this.cellHeight/1.5){if(this.slotEl[this.activeSlot].slotYPosition%this.cellHeight){this.scrollTo(this.activeSlot,Math.round(this.slotEl[this.activeSlot].slotYPosition/this.cellHeight)*this.cellHeight,"100ms")}return false}var g=f.timeStamp-this.scrollStartTime;var a=(2*b/g)/this.friction;var d=(this.friction/2)*(a*a);if(a<0){a=-a;d=-d}var c=this.slotEl[this.activeSlot].slotYPosition+d;if(c>0){c/=2;a/=3;if(c>this.swSlotWrapper.clientHeight/4){c=this.swSlotWrapper.clientHeight/4}}else{if(c<this.slotEl[this.activeSlot].slotMaxScroll){c=(c-this.slotEl[this.activeSlot].slotMaxScroll)/2+this.slotEl[this.activeSlot].slotMaxScroll;a/=3;if(c<this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4){c=this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4}}else{c=Math.round(c/this.cellHeight)*this.cellHeight}}this.scrollTo(this.activeSlot,Math.round(c),Math.round(a)+"ms");return true},scrollTo:function(c,a,b){this.slotEl[c].style.webkitTransitionDuration=b?b:"100ms";this.setPosition(c,a?a:0);if(this.slotEl[c].slotYPosition>0||this.slotEl[c].slotYPosition<this.slotEl[c].slotMaxScroll){this.slotEl[c].addEventListener("webkitTransitionEnd",this,false)}},scrollToValue:function(e,d){var c,b,a;this.slotEl[e].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[e].style.webkitTransitionDuration="0";b=0;for(a in this.slotData[e].values){if(a==d){c=b*this.cellHeight;this.setPosition(e,c);break}b-=1}},backWithinBoundaries:function(a){a.target.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(a.target.slotPosition,a.target.slotYPosition>0?0:a.target.slotMaxScroll,"150ms");return false},tapDown:function(a){a.currentTarget.addEventListener("touchmove",this,false);a.currentTarget.addEventListener("touchend",this,false);a.currentTarget.className="sw-pressed"},tapCancel:function(a){a.currentTarget.removeEventListener("touchmove",this,false);a.currentTarget.removeEventListener("touchend",this,false);a.currentTarget.className=""},tapUp:function(a){this.tapCancel(a);if(a.currentTarget.id=="sw-cancel"){this.cancelAction()}else{this.doneAction()}},setCancelAction:function(a){this.cancelAction=a},setDoneAction:function(a){this.doneAction=a},cancelAction:function(){return false},cancelDone:function(){return true}};(function(){var o=this;var j=Array();var p=Array();function f(u,v){for(var t in v){u[t]=v[t]}}function h(v,t,u){v.style.width=t.toString()+"px";v.style.height=u.toString()+"px"}function s(u,t,v){u.style.left=Math.round(t).toString()+"px";u.style.top=Math.round(v).toString()+"px"}TrayController=function(){return this};TrayController.prototype.init=function(t){this.currentX=0;this.elem=t};TrayController.prototype.touchstart=function(t){this.startX=t.touches[0].pageX-this.currentX;this.touchMoved=false;window.addEventListener("touchmove",this,true);window.addEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0s"};TrayController.prototype.touchmove=function(t){this.touchMoved=true;this.lastX=this.currentX;this.lastMoveTime=new Date();this.currentX=event.touches[0].pageX-this.startX;this.delegate.update(this.currentX)};TrayController.prototype.touchend=function(u){window.removeEventListener("touchmove",this,true);window.removeEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0.4s";if(this.touchMoved){var v=this.currentX-this.lastX;var t=(new Date())-this.lastMoveTime+1;this.currentX=this.currentX+v*200/t;this.delegate.updateTouchEnd(this)}else{this.delegate.clicked(this.currentX)}};TrayController.prototype.handleEvent=function(t){this[t.type](t);t.preventDefault()};const e=150;const n=e/2;const d=70;const a=n/2;const g=e;const b=e/3;const k="rotateY("+(-d)+"deg)";const c="rotateY("+d+"deg)";const i="translateZ("+g+"px)";FlowDelegate=function(){this.cells=new Array();this.transforms=new Array()};FlowDelegate.prototype.init=function(t){this.elem=t};FlowDelegate.prototype.updateTouchEnd=function(t){this.lastFocus=undefined;var u=this.getFocusedCell(t.currentX);t.currentX=-u*n;this.update(t.currentX)};FlowDelegate.prototype.clicked=function(u){var v=-Math.round(u/n);var t=this.cells[v];galleryCell=v};FlowDelegate.prototype.getFocusedCell=function(t){var u=-Math.round(t/n);return Math.min(Math.max(u,0),this.cells.length-1)};FlowDelegate.prototype.transformForCell=function(u,w,z){var t=(w*n);var v=t+z;if((v<a)&&(v>=-a)){return i+" translateX("+t+"px)"}else{if(v>0){return"translateX("+(t+b)+"px) "+k}else{return"translateX("+(t-b)+"px) "+c}}};FlowDelegate.prototype.setTransformForCell=function(t,v,u){if(this.transforms[v]!=u){t.style.webkitTransform=u;this.transforms[v]=u}};FlowDelegate.prototype.update=function(u){this.elem.style.webkitTransform="translateX("+(u)+"px)";for(var v in this.cells){var t=this.cells[v];this.setTransformForCell(t,v,this.transformForCell(t,v,u));v+=1}};var l=new TrayController();var q=new FlowDelegate();o.zflow=function(v,u){var z=document.querySelector(u);l.init(z);q.init(z);l.delegate=q;var t={top:Math.round(-e*0.65)+"px",left:Math.round(-e/2)+"px",width:e+"px",height:Math.round(e*1.5)+"px",opacity:0,};var w=0;function A(){var B=document.createElement("div");var F=document.createElement("img");var D=document.createElement("canvas");var E=document.createElement("a");var C=document.createElement("caption");B.className="cell";B.appendChild(E);E.appendChild(F);B.appendChild(D);B.appendChild(C);F.src=v[w];j[w]=v[w];E.href="show_image?fName="+v[w];E.className="slide-right";o.afnc=function(){var G=F.width;var J=F.height;var H=Math.min(e/J,e/G);G*=H;J*=H;h(F,G,J);f(B.style,t);s(F,(e-G)/2,e-J);s(D,(e-G)/2,e);s(C,(e-G)/2,e+10);m(F,G,J,D);var I=v[w].match(/(.*)[\/\\]([^\/\\]+)\.\w+$/)[2];I=I.replace(/_/g," ");I=I.replace(/(^|\s)([a-z])/g,function(K,M,L){return M+L.toUpperCase()});p[w]=I;r(C,G,w);q.setTransformForCell(B,q.cells.length,q.transformForCell(B,q.cells.length,l.currentX));q.cells.push(B);z.appendChild(B);B.style.opacity=1;if(w<(v.length-1)){w++;A()}else{window.setTimeout(function(){window.scrollTo(0,0)},100);galleryInit=1}};F.addEventListener("load",afnc,true)}A();z.addEventListener("touchstart",l,false)};o.zflowCleanup=function(t){var u=document.querySelector(t);if(u){if(u.childNodes.length>0){q.transforms.length=0;q.cells.length=0;while(u.hasChildNodes()){var v=u.childNodes[0].childNodes[0].childNodes[0];v.removeEventListener("load",afnc,true);u.removeChild(u.childNodes[0])}var w=document.getElementById("gallery");if(w){w.parentNode.removeChild(w);galleryInit=0;galleryCell=0}}}};o.zflowGetImageSource=function(t,u){var v=document.querySelector(t);var w="";if(v){if(v.childNodes.length>0){while(v.hasChildNodes()){w=v.childNodes[0].childNodes[0].childNodes[u].src}}}return w};function r(u,t,v){u.width=t;u.innerHTML=p[v]}function m(z,u,A,v){v.width=u;v.height=A/2;var t=v.getContext("2d");t.save();t.translate(0,A-1);t.scale(1,-1);t.drawImage(z,0,0,u,A);t.restore();t.globalCompositeOperation="destination-out";var w=t.createLinearGradient(0,0,0,A/2);w.addColorStop(1,"rgba(255, 255, 255, 1.0)");w.addColorStop(0,"rgba(255, 255, 255, 0.5)");t.fillStyle=w;t.fillRect(0,0,u,A/2)}})();var now=new Date();var url_month="month";var url_event="events.htm";function getCalendar(e,c,b){url_month=e;url_event=c;var f=b.getDate();var a=b.getMonth()+1;var g=b.getFullYear();$.get(url_month,{month:a,year:g},function(d){$("#ical").empty();$(d).appendTo("#ical");setBindings();setToday();setSelectedAndLoadEvents(b)})}function getEvents(b){var c=b.getDate();var a=b.getMonth()+1;var e=b.getFullYear();$.get(url_event,{day:c,month:a,year:e},function(d){$("#ical .events").empty();$(d).appendTo("#ical .events")})}function getNoEvents(){var a="<li class='no-event'>No Events</li>";$("#ical .events").empty();$(a).appendTo("#ical .events")}function setBindings(){$("#ical td").bind("click",function(){var b=$(this).attr("class");var a=getClickedDate($(this));RemoveSelectedCell();setToday();if(b.indexOf("date_has_event")!=-1||b.indexOf("today_date_has_event")!=-1){$(this).attr("class","selected_date_has_event");getEvents(a)}if(b==""||b.indexOf("today")!=-1){$(this).attr("class","selected");getNoEvents()}if(b.indexOf("prevmonth")!=-1||b.indexOf("nextmonth")!=-1){getCalendar(url,a)}});$("#ical .bottom-bar .bottom-bar-today").bind("click",function(){getCalendar(url_month,url_event,now)});$("#ical .goto-prevmonth").bind("click",function(){loadPrevNextMonth(-1)});$("#ical .goto-nextmonth").bind("click",function(){loadPrevNextMonth(1)})}function RemoveSelectedCell(){$("#ical .selected_date_has_event").removeClass("selected_date_has_event");$("#ical .selected").removeClass("selected")}function getClickedDate(b){var c=$(b).find("input").val();var a=getDateFromHiddenField(c);return a}function loadPrevNextMonth(c){var b=$("#ical .selected").text();if(b==""){b=$("#ical .selected_date_has_event").text()}var a=parseInt($("#ical > #month").val());var e=$("#ical > #year").val();var d=new Date(e,a-1,b);if(c==1){d.nextMonth()}else{d.prevMonth()}getCalendar(url_month,url_event,d)}function setToday(){$("#ical :hidden").each(function(c){var a=getDateFromHiddenField($(this).val());if(!isNaN(a)){var h=now;var j=now.getDate();var i=a.getDate();var g=now.getMonth();var f=a.getMonth();var e=now.getFullYear();var d=a.getFullYear();if(now.getDate()==a.getDate()&&now.getMonth()==a.getMonth()&&now.getFullYear()==a.getFullYear()){var b=$(this).closest("td");if($(b).attr("class")=="date_has_event"){$(b).attr("class","today_date_has_event")}else{$(b).attr("class","today")}}}})}function getDateFromHiddenField(c){var b=c.split("-");return new Date(b[0],b[1]-1,b[2])}function setSelectedAndLoadEvents(a){RemoveSelectedCell();$("#ical td").each(function(c){var d=$(this).attr("class");var b=getClickedDate($(this));if((d!="prevmonth"&&d!="nextmonth")&&a.getDate()==b.getDate()&&a.getMonth()==b.getMonth()&&a.getFullYear()==b.getFullYear()){if(d=="date_has_event"){$(this).attr("class","selected_date_has_event");getEvents(a)}else{$(this).attr("class","selected");getNoEvents()}}});setToday()}function trim(b,a){return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}function dateAddExtention(c,a){var b=new String();c=c.toLowerCase();if(isNaN(a)){throw"The second parameter must be a number. \n You passed: "+a;return false}a=new Number(a);switch(c.toLowerCase()){case"yyyy":this.setFullYear(this.getFullYear()+a);break;case"q":this.setMonth(this.getMonth()+(a*3));break;case"m":this.setMonth(this.getMonth()+a);break;case"y":case"d":case"w":this.setDate(this.getDate()+a);break;case"ww":this.setDate(this.getDate()+(a*7));break;case"h":this.setHours(this.getHours()+a);break;case"n":this.setMinutes(this.getMinutes()+a);break;case"s":this.setSeconds(this.getSeconds()+a);break;case"ms":this.setMilliseconds(this.getMilliseconds()+a);break;default:throw"The first parameter must be a string from this list: \nyyyy, q, m, y, d, w, ww, h, n, s, or ms. You passed: "+c;return false}return this}Date.prototype.dateAdd=dateAddExtention;function prevMonth(){var a=this.getMonth();this.setMonth(a-1);if(this.getMonth()!=a-1&&(this.getMonth()!=11||(a==11&&this.getDate()==1))){this.setDate(0)}}function nextMonth(){var a=this.getMonth();this.setMonth(a+1);if(this.getMonth()!=a+1&&this.getMonth()!=0){this.setDate(0)}}Date.prototype.nextMonth=nextMonth;Date.prototype.prevMonth=prevMonth;(function(c){c.fn.drag=function(f,e,d){if(e){this.bind("dragstart",f)}if(d){this.bind("dragend",d)}return !f?this.trigger("mousedown",{which:1}):this.bind("drag",e?e:f)};var b=c.event.special.drag={distance:0,setup:function(d){d=c.extend({distance:b.distance},d||{});c.event.add(this,"mousedown",b.handler,d)},teardown:function(){c.event.remove(this,"mousedown",b.handler);if(this==b.dragging){b.dragging=b.proxy=null}a(this,true)},handler:function(e){var d;if(e.data.elem){e.dragTarget=e.data.elem;e.dragProxy=b.proxy||e.dragTarget;e.cursorOffsetX=e.data.x-e.data.left;e.cursorOffsetY=e.data.y-e.data.top;e.offsetX=e.pageX-e.cursorOffsetX;e.offsetY=e.pageY-e.cursorOffsetY}switch(e.type){case !b.dragging&&e.which==1&&"mousedown":c.extend(e.data,c(this).offset(),{x:e.pageX,y:e.pageY,elem:this,dist2:Math.pow(e.data.distance,2)});c.event.add(document.body,"mousemove mouseup",b.handler,e.data);a(this,false);return false;case !b.dragging&&"mousemove":if(Math.pow(e.pageX-e.data.x,2)+Math.pow(e.pageY-e.data.y,2)<e.data.dist2){break}b.dragging=e.dragTarget;e.type="dragstart";d=c.event.handle.call(b.dragging,e);b.proxy=c(d)[0]||b.dragging;if(d!==false){break}a(b.dragging,true);b.dragging=b.proxy=null;case"mousemove":if(b.dragging){e.type="drag";d=c.event.handle.call(b.dragging,e);if(c.event.special.drop){c.event.special.drop.allowed=(d!==false);c.event.special.drop.handler(e)}if(d!==false){break}e.type="mouseup"}case"mouseup":c.event.remove(document.body,"mousemove mouseup",b.handler);if(b.dragging){if(c.event.special.drop){c.event.special.drop.handler(e)}e.type="dragend";c.event.handle.call(b.dragging,e);a(b.dragging,true);b.dragging=b.proxy=null;e.data={}}break}}};function a(e,d){if(!e){return}e.unselectable=d?"off":"on";e.onselectstart=function(){return d};if(e.style){e.style.MozUserSelect=d?"":"none"}}})(jQuery);(function(b){b.fn.drop=function(e,d,c){if(d){this.bind("dropstart",e)}if(c){this.bind("dropend",c)}return !e?this.trigger("drop"):this.bind("drop",d?d:e)};b.dropManage=function(c){b.extend(a,{filter:"*",data:[],tolerance:null},c||{});return a.$elements.filter(a.filter).each(function(d){a.data[d]=a.locate(this)})};var a=b.event.special.drop={delay:100,mode:"intersect",$elements:b([]),data:[],setup:function(){a.$elements=a.$elements.add(this);a.data[a.data.length]=a.locate(this)},teardown:function(){var c=this;a.$elements=a.$elements.not(this);a.data=b.grep(a.data,function(d){return(d.elem!==c)})},handler:function(d){var c=null,e;d.dropTarget=a.dropping||undefined;if(a.data.length&&d.dragTarget){switch(d.type){case"drag":a.event=d;if(!a.timer){a.timer=setTimeout(a.tolerate,20)}break;case"mouseup":a.timer=clearTimeout(a.timer);if(!a.dropping){break}if(a.allowed){d.type="drop";e=b.event.handle.call(a.dropping,d)}c=false;case a.dropping&&"dropstart":d.type="dropend";c=c===null&&a.allowed?true:false;case a.dropping&&"dropend":b.event.handle.call(a.dropping,d);a.dropping=null;if(e===false){d.dropTarget=undefined}if(!c){break}d.type="dropstart";case a.allowed&&"dropstart":d.dropTarget=this;a.dropping=b.event.handle.call(this,d)!==false?this:null;break}}},tolerate:function(){var d=0,c,e,f=[a.event.pageX,a.event.pageY],g=a.locate(a.event.dragProxy);a.tolerance=a.tolerance||a.modes[a.mode];do{if(c=a.data[d]){if(a.tolerance){e=a.tolerance.call(a,a.event,g,c)}else{if(a.contains(c,f)){e=c}}}}while(++d<a.data.length&&!e);a.event.type=(e=e||a.best)?"dropstart":"dropend";if(a.event.type=="dropend"||e.elem!=a.dropping){a.handler.call(e?e.elem:a.dropping,a.event)}if(a.last&&f[0]==a.last.pageX&&f[1]==a.last.pageY){delete a.timer}else{a.timer=setTimeout(a.tolerate,a.delay)}a.last=a.event;a.best=null},locate:function(f){var d=b(f),g=d.offset(),e=d.outerHeight(),c=d.outerWidth();return{elem:f,L:g.left,R:g.left+c,T:g.top,B:g.top+e,W:c,H:e}},contains:function(c,d){return((d[0]||d.L)>=c.L&&(d[0]||d.R)<=c.R&&(d[1]||d.T)>=c.T&&(d[1]||d.B)<=c.B)},modes:{intersect:function(d,c,e){return this.contains(e,[d.pageX,d.pageY])?e:this.modes.overlap.apply(this,arguments)},overlap:function(d,c,e){e.overlap=Math.max(0,Math.min(e.B,c.B)-Math.max(e.T,c.T))*Math.max(0,Math.min(e.R,c.R)-Math.max(e.L,c.L));if(e.overlap>((this.best||{}).overlap||0)){this.best=e}return null},fit:function(d,c,e){return this.contains(e,c)?e:null},middle:function(d,c,e){return this.contains(e,[c.L+c.W/2,c.T+c.H/2])?e:null}}}})(jQuery);var _target=null,_dragx=null,_dragy=null,_rotate=null,_resort=null;var _dragging=false,_sizing=false,_animate=false;var _rotating=0,_width=0,_height=0,_left=0,_top=0,_xspeed=0,_yspeed=0;var _zindex=1000;jQuery.fn.touch=function(a){a=jQuery.extend({animate:true,sticky:false,dragx:true,dragy:true,rotate:false,resort:true,scale:false},a);var b=[];b=$.extend({},$.fn.touch.defaults,a);this.each(function(){this.opts=b;this.ontouchstart=touchstart;this.ontouchend=touchend;this.ontouchmove=touchmove;this.ongesturestart=gesturestart;this.ongesturechange=gesturechange;this.ongestureend=gestureend})};function touchstart(a){_target=this.id;_dragx=this.opts.dragx;_dragy=this.opts.dragy;_resort=this.opts.resort;_animate=this.opts.animate;_xspeed=0;_yspeed=0;$(a.changedTouches).each(function(){var c=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));var b=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));if(!_dragging&&!_sizing){_left=(a.pageX-c);_top=(a.pageY-b);_dragging=[_left,_top];if(_resort){_zindex=($("#"+_target).css("z-index")==_zindex)?_zindex:_zindex+1;$("#"+_target).css({zIndex:_zindex})}}})}function touchmove(c){if(_dragging&&!_sizing&&_animate){var a=(isNaN(parseInt($("#"+_target).css("left"))))?0:parseInt($("#"+_target).css("left"));var b=(isNaN(parseInt($("#"+_target).css("top"))))?0:parseInt($("#"+_target).css("top"))}$(c.changedTouches).each(function(){c.preventDefault();_left=(this.pageX-(parseInt($("#"+_target).css("width"))/2));_top=(this.pageY-(parseInt($("#"+_target).css("height"))/2));if(_dragging&&!_sizing){if(_animate){_xspeed=Math.round((_xspeed+Math.round(_left-a))/1.5);_yspeed=Math.round((_yspeed+Math.round(_top-b))/1.5)}if(_dragx||_dragy){$("#"+_target).css({position:"absolute"})}if(_dragx){$("#"+_target).css({left:_left+"px"})}if(_dragy){$("#"+_target).css({top:_top+"px"})}$("#"+_target).css({backgroundColor:"#4B880B"});$("#"+_target+" b").text("WEEEEEEEE!!!!")}})}function touchend(a){$(a.changedTouches).each(function(){if(!a.targetTouches.length){_dragging=false;if(_animate){_left=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));_top=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));var c=(_dragx)?(_left+_xspeed)+"px":_left+"px";var b=(_dragy)?(_top+_yspeed)+"px":_top+"px";if(_dragx||_dragy){$("#"+_target).animate({left:c,top:b},"fast")}}}});$("#"+_target+" b").text("I am sad :(");$("#"+_target).css({backgroundColor:"#0B4188"});setTimeout(changeBack,5000,_target)}function gesturestart(a){_sizing=[$("#"+this.id).css("width"),$("#"+this.id).css("height")]}function gesturechange(a){if(_sizing){_width=(this.opts.scale)?Math.min(parseInt(_sizing[0])*a.scale,300):_sizing[0];_height=(this.opts.scale)?Math.min(parseInt(_sizing[1])*a.scale,300):_sizing[1];_rotate=(this.opts.rotate)?"rotate("+((_rotating+a.rotation)%360)+"deg)":"0deg";$("#"+this.id).css({width:_width+"px",height:_height+"px",webkitTransform:_rotate});$("#"+this.id+" b").text("TRANSFORM!");$("#"+this.id).css({backgroundColor:"#4B880B"})}}function gestureend(a){_sizing=false;_rotating=(_rotating+a.rotation)%360}function changeBack(a){$("#"+a+" b").text("Touch Me :)");$("#"+a).css({backgroundColor:"#999"})}(function(b){var a=this,c=a.jQExtensionsCSS||{};b(a).load(function(){a.scrollTo(0,0);var g=a.innerWidth<a.innerHeight?"profile":"landscape",f=c.toolbarHeight||b("#jqt .toolbar").outerHeight()||45,e={profile:null,landscape:null},d=b.extend({defaults:".horizontal-scroll, .horizontal-scroll .scroll-container, .horizontal-slide, .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .vertical-scroll > div, .vertical-slide > div { margin: 0 auto; padding-bottom:{paddingBottom}px; } #jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div, #jqt.fullscreen .vertical-slide.use-bottom-toolbar > div { padding-bottom:0px; } .vertical-scroll, .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .vertical-scroll.use-bottom-toolbar, .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }\n",profile:".profile .horizontal-scroll, .profile .horizontal-scroll .scroll-container, .profile .horizontal-slide, .profile .horizontal-slide .slide-container { width: {width}px; } .profile .vertical-scroll, .profile .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .profile .vertical-scroll.use-bottom-toolbar, .profile .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }",landscape:".landscape .horizontal-scroll, .landscape .horizontal-scroll .scroll-container, .landscape .horizontal-slide, .landscape .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .landscape .vertical-scroll, .landscape .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .landscape .vertical-scroll.use-bottom-toolbar, .landscape .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }"},c.css||{});e[g]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[g]||{});e.defaults=b.extend({},e[g],c.defaults||{});b(document.createElement("style")).attr("type","text/css").html(d.defaults.replace(/\{(\w+)\}/g,function(i,h){return h in e.defaults?e.defaults[h]:i})+d[g].replace(/\{(\w+)\}/g,function(i,h){return h in e[g]?e[g][h]:i})).appendTo("head");b(a).one("orientationchange",function(){var h=a.innerWidth<a.innerHeight?"profile":"landscape";e[h]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[h]||{});b(document.createElement("style")).attr("type","text/css").html(d[h].replace(/\{(\w+)\}/g,function(j,i){return i in e[h]?e[h][i]:j})).appendTo("head")})})})(jQuery);(function($){$.Chain={version:"0.2",tag:["{","}"],services:{},service:function(name,proto){this.services[name]=proto;$.fn[name]=function(options){if(!this.length){return this}var instance=this.data("chain-"+name);var args=Array.prototype.slice.call(arguments,1);if(!instance){if(options=="destroy"){return this}instance=$.extend({element:this},$.Chain.services[name]);this.data("chain-"+name,instance);if(instance.init){instance.init()}}var result;if(typeof options=="string"&&instance["$"+options]){result=instance["$"+options].apply(instance,args)}else{if(instance.handler){result=instance.handler.apply(instance,[options].concat(args))}else{result=this}}if(options=="destroy"){this.removeData("chain-"+name)}return result}},extend:function(name,proto){if(this.services[name]){this.services[name]=$.extend(this.services[name],proto)}},jobject:function(obj){return obj&&obj.init==$.fn.init},jidentic:function(j1,j2){if(!j1||!j2||j1.length!=j2.length){return false}var a1=j1.get();var a2=j2.get();for(var i=0;i<a1.length;i++){if(a1[i]!=a2[i]){return false}}return true},parse:function(){var $this={};$this.closure=['function($data, $el){var $text = [];\n$text.print = function(text){this.push((typeof text == "number") ? text : ((typeof text != "undefined") ? text : ""));};\nwith($data){\n','}\nreturn $text.join("");}'];$this.textPrint=function(text){return'$text.print("'+text.split("\\").join("\\\\").split("'").join("\\'").split('"').join('\\"')+'");'};$this.scriptPrint=function(text){return"$text.print("+text+");"};$this.parser=function(text){var tag=$.Chain.tag;var opener,closer,closer2=null,result=[];while(text){opener=text.indexOf(tag[0]);closer=opener+text.substring(opener).indexOf(tag[1]);if(opener!=-1){if(text[opener-1]=="\\"){closer2=opener+tag[0].length+text.substring(opener+tag[0].length).indexOf(tag[0]);if(closer2!=opener+tag[0].length-1&&text[closer2-1]=="\\"){closer2=closer2-1}else{if(closer2==opener+tag[0].length-1){closer2=text.length}}result.push($this.textPrint(text.substring(0,opener-1)));result.push($this.textPrint(text.substring(opener,closer2)))}else{closer2=null;if(closer==opener-1){closer=text.length}result.push($this.textPrint(text.substring(0,opener)));result.push($this.scriptPrint(text.substring(opener+tag[0].length,closer)))}text=text.substring((closer2===null)?closer+tag[1].length:closer2)}else{if(text){result.push($this.textPrint(text));text=""}}}return result.join("\n")};return function($text){var $fn=function(){};try{eval("$fn = "+$this.closure[0]+$this.parser($text)+$this.closure[1])}catch(e){throw"Parsing Error"}return $fn}}()}})(jQuery);(function(a){a.Chain.service("update",{handler:function(b){if(typeof b=="function"){return this.bind(b)}else{return this.trigger(b)}},bind:function(b){return this.element.bind("update",b)},trigger:function(b){this.element.items("update");this.element.item("update");this.element.triggerHandler("preupdate",this.element.item());if(b=="hard"){this.element.items(true).each(function(){a(this).update()})}this.element.triggerHandler("update",this.element.item());return this.element}})})(jQuery);(function(a){a.Chain.service("chain",{init:function(){this.anchor=this.element;this.template=this.anchor.html();this.tplNumber=0;this.builder=this.createBuilder();this.plugins={};this.isActive=false;this.destroyers=[];this.element.addClass("chain-element")},handler:function(b){this.element.items("backup");this.element.item("backup");if(typeof b=="object"){this.handleUpdater(b)}else{if(typeof b=="function"){this.handleBuilder(b)}}this.anchor.empty();this.isActive=true;this.element.update();return this.element},handleUpdater:function(h){var b=h.builder;delete h.builder;if(h.anchor){this.setAnchor(h.anchor)}delete h.anchor;var e=h.override;delete h.override;for(var d in h){if(typeof h[d]=="string"){h[d]=a.Chain.parse(h[d])}else{if(typeof h[d]=="object"){for(var c in h[d]){if(typeof h[d][c]=="string"){h[d][c]=a.Chain.parse(h[d][c])}}}}}var f=function(o,p){var n,q;var k=a(this);for(var m in h){if(m=="self"){n=k}else{n=a(m,k)}if(typeof h[m]=="function"){q=h[m].apply(k,[p,n]);if(typeof q=="string"){n.not(":input").html(q).end().filter(":input").val(q)}}else{if(typeof h[m]=="object"){for(var l in h[m]){if(typeof h[m][l]=="function"){q=h[m][l].apply(k,[p,n]);if(typeof q=="string"){if(l=="content"){n.html(q)}else{if(l=="text"){n.text(q)}else{if(l=="value"){n.val(q)}else{if(l=="class"||l=="className"){n.addClass(q)}else{n.attr(l,q)}}}}}}}}}}};var g=this.defaultBuilder;this.builder=function(i){if(b){b.apply(this,[i])}if(!e){g.apply(this)}this.update(f);return false}},handleBuilder:function(b){this.builder=this.createBuilder(b)},defaultBuilder:function(c,b){var d=c?(c.apply(this,[b])!==false):true;if(d){this.bind("update",function(g,h){var e=a(this);for(var f in h){if(typeof h[f]!="object"&&typeof h[f]!="function"){e.find("> ."+f+", *:not(.chain-element) ."+f).each(function(){var i=a(this);if(i.filter(":input").length){i.val(h[f])}else{if(i.filter("img").length){i.attr("src",h[f])}else{i.html(h[f])}}})}}})}},createBuilder:function(b){var c=this.defaultBuilder;return function(d){c.apply(this,[b,d]);return false}},setAnchor:function(b){this.anchor.html(this.template);this.anchor=b==this.element?b:this.element.find(b).eq(0);this.template=this.anchor.html();this.anchor.empty()},$anchor:function(b){if(b){this.element.items("backup");this.element.item("backup");this.setAnchor(b);this.element.update();return this.element}else{return this.anchor}},$template:function(b){if(!arguments.length){return a("<div>").html(this.template).children().eq(this.tplNumber)}if(b=="raw"){return this.template}if(typeof b=="number"){this.tplNumber=b}else{var c=a("<div>").html(this.template).children();var d=c.filter(b).eq(0);if(d.length){this.tplNumber=c.index(d)}else{return this.element}}this.element.items("backup");this.element.item("backup");this.element.update();return this.element},$builder:function(b){if(b){return this.handler(b)}else{return this.builder}},$active:function(){return this.isActive},$plugin:function(b,c){if(c===null){delete this.plugins[b]}else{if(typeof c=="function"){this.plugins[b]=c}else{if(b&&!c){return this.plugins[b]}else{return this.plugins}}}if(typeof c=="function"){this.element.items(true).each(function(){var d=a(this);c.call(d,d.item("root"))})}this.element.update();return this.element},$clone:function(){var c=this.element.attr("id");this.element.attr("id","");var b=this.element.clone().empty().html(this.template);this.element.attr("id",c);return b},$destroy:function(b){this.element.removeClass("chain-element");if(!b){this.element.items("backup");this.element.item("backup");this.element.find(".chain-element").each(function(){a(this).chain("destroy",true)})}this.element.triggerHandler("destroy");this.isActive=false;this.anchor.html(this.template);return this.element}})})(jQuery);(function(a){a.Chain.service("item",{init:function(){this.isActive=false;this.isBuilt=false;this.root=this.element;this.data=false;this.datafn=this.dataHandler},handler:function(b){if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="function"){return this.handleFunction(b)}else{return this.handleDefault()}}},handleObject:function(b){this.setData(b);this.isActive=true;this.update();return this.element},handleFunction:function(b){this.datafn=b;return this.element},handleDefault:function(){if(this.isActive){return this.getData()}else{return false}},getData:function(){this.data=this.datafn.call(this.element,this.data);return this.data},setData:function(d){var c;if(a.Chain.jobject(d)&&d.item()){c=a.extend({},d.item())}else{if(a.Chain.jobject(d)){c={}}else{c=d}}this.data=this.datafn.call(this.element,this.data||c,c);if(this.linkElement&&this.linkElement[0]!=d[0]){var b=this.linkFunction();if(a.Chain.jobject(b)&&b.length&&b.item()){b.item(this.data)}}},dataHandler:function(b,c){if(arguments.length==2){return a.extend(b,c)}else{return b}},update:function(){return this.element.update()},build:function(){var b=this.element.chain("template","raw").replace(/jQuery\d+\=\"null\"/gi,"");this.element.chain("anchor").html(b);if(!a.Chain.jidentic(this.root,this.element)){var c=this.root.chain("plugin");for(var d in c){c[d].apply(this.element,[this.root])}}this.element.chain("builder").apply(this.element,[this.root]);this.isBuilt=true},$update:function(){if(this.element.chain("active")&&this.isActive&&!this.isBuilt&&this.getData()){this.build()}return this.element},$replace:function(b){this.data={};this.setData(b);this.isActive=true;this.update();return this.element},$remove:function(b){this.element.chain("destroy");this.element.remove();this.element.item("link",null);this.element.item("destroy");if(!a.Chain.jidentic(this.root,this.element)&&!b){this.root.update()}},$active:function(){return this.isActive},$root:function(b){if(arguments.length){this.root=b;this.update();return this.element}else{return this.root}},$backup:function(){this.isBuilt=false;return this.element},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.isActive=true;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){var e=b.linkFunction();if(e&&e.length){b.element.item(e)}};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$destroy:function(){return this.element}})})(jQuery);(function(a){a.Chain.service("items",{collections:{all:function(){return this.element.chain("anchor").children(".chain-item")},visible:function(){return this.element.chain("anchor").children(".chain-item:visible")},hidden:function(){return this.element.chain("anchor").children(".chain-item:hidden")},self:function(){return this.element}},init:function(){this.isActive=false;this.pushBuffer=[];this.shiftBuffer=[];this.collections=a.extend({},this.collections)},handler:function(b){if(b instanceof Array){return this.handleArray(b)}else{if(!this.isActive){return a().eq(-1)}else{if(a.Chain.jobject(b)){return this.handleElement(b)}else{if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="number"){return this.handleNumber(b)}else{if(b===true){return this.handleTrue()}else{return this.handleDefault()}}}}}}},handleObject:function(b){return this.collection("all").filter(function(){return a(this).item()==b})},handleElement:function(b){if(!a.Chain.jidentic(b,b.item("root"))&&a.Chain.jidentic(this.element,b.item("root"))){return b}else{return a().eq(-1)}},handleArray:function(b){return this.$merge(b)},handleNumber:function(b){if(b==-1){return this.collection("visible").filter(":last")}else{return this.collection("visible").eq(b)}},handleTrue:function(){return this.collection("all")},handleDefault:function(){return this.collection("visible")},update:function(){this.element.update()},empty:function(){var b=this.collection("all");setTimeout(function(){b.each(function(){a(this).item("remove",true)})},1);this.element.chain("anchor").empty()},collection:function(b,c){if(arguments.length>1){if(typeof c=="function"){this.collections[b]=c}return this.element}else{if(this.collections[b]){return this.collections[b].apply(this)}else{return a().eq(-1)}}},$update:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var c=this;var b=this.element.chain("builder");var f=this.element.chain("template");var d;var e=function(){var g=f.clone()[d?"appendTo":"prependTo"](c.element.chain("anchor")).addClass("chain-item").item("root",c.element);if(c.linkElement&&a.Chain.jobject(this)&&this.item()){g.item("link",this,"self")}else{g.item(this)}g.chain(b)};d=false;a.each(this.shiftBuffer,e);d=true;a.each(this.pushBuffer,e);this.shiftBuffer=[];this.pushBuffer=[];return this.element},$add:function(){if(this.linkElement){return this.element}var d;var c=Array.prototype.slice.call(arguments);if(typeof c[0]=="string"){d=c.shift()}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this[b]=this[b].concat(c);this.update();return this.element},$merge:function(d,c){if(this.linkElement){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;if(a.Chain.jobject(c)){this[b]=this[b].concat(c.map(function(){return a(this)}).get())}else{if(c instanceof Array){this[b]=this[b].concat(c)}}this.update();return this.element},$replace:function(d,c){if(this.linkElement&&arguments.callee.caller!=this.linkUpdater){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this.empty();if(a.Chain.jobject(c)){this[b]=c.map(function(){return a(this)}).get()}else{if(c instanceof Array){this[b]=c}}this.update();return this.element},$remove:function(){if(this.linkElement){return this.element}for(var b=0;b<arguments.length;b++){this.handler(arguments[b]).item("remove",true)}this.update();return this.element},$reorder:function(c,b){if(b){this.handler(c).before(this.handler(b))}else{this.handler(c).appendTo(this.element.chain("anchor"))}this.update();return this.element},$empty:function(){if(this.linkElement){return this.element}this.empty();this.shiftBuffer=[];this.pushBuffer=[];this.update();return this.element},$data:function(b){return this.handler(b).map(function(){return a(this).item()}).get()},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){b.$replace(b.linkFunction())};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$index:function(b){return this.collection("all").index(this.handler(b))},$collection:function(){return this.collection.apply(this,Array.prototype.slice.call(arguments))},$active:function(){return this.isActive},$backup:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var b=[];this.collection("all").each(function(){var c=a(this).item();if(c){b.push(c)}});this.pushBuffer=b.concat(this.pushBuffer);this.empty();return this.element},$destroy:function(){this.empty();return this.element}});a.Chain.extend("items",{doFilter:function(){var c=this.searchProperties;var d=this.searchText;if(d){if(typeof d=="string"){d=d.toLowerCase()}var b=this.element.items(true).filter(function(){var f=a(this).item();if(c){for(var e=0;e<c.length;e++){if(typeof f[c[e]]=="string"&&!!(typeof d=="string"?f[c[e]].toLowerCase():f[c[e]]).match(d)){return true}}}else{for(var g in f){if(typeof f[g]=="string"&&!!(typeof d=="string"?f[g].toLowerCase():f[g]).match(d)){return true}}}});this.element.items(true).not(b).hide();b.show()}else{this.element.items(true).show();this.element.unbind("preupdate",this.searchBinding);this.searchBinding=null}},$filter:function(d,c){if(!arguments.length){return this.update()}this.searchText=d;if(typeof c=="string"){this.searchProperties=[c]}else{if(c instanceof Array){this.searchProperties=c}else{this.searchProperties=null}}if(!this.searchBinding){var b=this;this.searchBinding=function(f,e){b.doFilter()};this.element.bind("preupdate",this.searchBinding)}return this.update()}});a.Chain.extend("items",{doSort:function(){var b=this.sortName;var d=this.sortOpt;var g={number:function(i,h){return parseFloat((a(i).item()[b]+"").match(/\d+/gi)[0])-parseFloat((a(h).item()[b]+"").match(/\d+/gi)[0])},"default":function(i,h){return a(i).item()[b]>a(h).item()[b]?1:-1}};if(b){var e=d.fn||g[d.type]||g["default"];var f=this.element.items(true).get().sort(e);f=d.desc?f.reverse():f;for(var c=0;c<f.length;c++){this.element.chain("anchor").append(f[c])}d.desc=d.toggle?!d.desc:d.desc}else{this.element.unbind("preupdate",this.sortBinding);this.sortBinding=null}},$sort:function(c,d){if(!c&&c!==null&&c!==false){return this.update()}if(this.sortName!=c){this.sortOpt=a.extend({desc:false,type:"default",toggle:false},d)}else{a.extend(this.sortOpt,d)}this.sortName=c;if(!this.sortBinding){var b=this;this.sortBinding=function(f,e){b.doSort()};this.element.bind("preupdate",this.sortBinding)}return this.update()}})})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(e){var d=".toolbar h1";a(function(){a("#jqt").bind("pageAnimationStart",function(i,g){if(g.direction==="in"){var f=a(d,a(i.target));var h=a(i.target).data("referrer");if(f.length&&h&&f.html()===""){f.html(h.text())}}})});function c(f){d=f}return{setTitleSelector:c}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(f){var m,i;var d=false;function n(p,o,r,q){i=p;if(window.openDatabase){m=openDatabase(p,o,r,q);if(!m){debugTxt=("Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota");if(d){c(debugTxt)}}}else{debugTxt=("Couldn't open the database. Please try with a WebKit nightly with this feature enabled");if(d){c(debugTxt)}}}function e(o){for(x=0;x<o.createTables.length;x++){p(o.createTables[x])}function p(r){debugTxt="create table "+r.table;var q="CREATE TABLE "+r.table+" (";nodeSize=r.property.length-1;for(y=0;y<=nodeSize;y++){q+=r.property[y].name+" "+r.property[y].type;if(y!=nodeSize){q+=", "}}q+=")";k(q,debugTxt)}}function j(p,o,q){stringQuery="DELETE FROM "+p+" WHERE "+o+" = "+q;debugTxt="delete row"+o+" "+q;k(stringQuery,debugTxt)}function g(p,o){stringQuery="SELECT * FROM "+p;debugTxt="selecting everything in table "+p;k(stringQuery,debugTxt,o)}function h(o){stringQuery="DROP TABLE "+o;debugTxt="delete table "+o;k(stringQuery,debugTxt)}function l(o){for(x=0;x<o.addRow.length;x++){p(o.addRow[x])}function p(q){debugTxt="create row "+q.table;stringQuery="INSERT INTO "+q.table+" (";nodeSize=q.property.length-1;for(y=0;y<=nodeSize;y++){stringQuery+=q.property[y].name;if(y!=nodeSize){stringQuery+=", "}}stringQuery+=") VALUES (";for(y=0;y<=nodeSize;y++){stringQuery+='"'+q.property[y].value+'"';if(y!=nodeSize){stringQuery+=", "}}stringQuery+=")";k(stringQuery,debugTxt)}}function k(o,p,q){p+="<br> SQL: "+o;callback=q;m.transaction(function(r){r.executeSql(o,[],function(t,s){if(callback){callback(s)}if(d){p+="<br><span style='color:green'>success</span> ";c(p)}},function(s,t){p+="<br><span style='color:red'>"+t.message+"</span> ";if(d){c(p)}})})}function c(o){if(!a("#debugMode")[0]){a("body").append("<div style='position:abolute;top:0 !important;left:0 !important;width:100% !important;min-height:100px !important; height:300px; overflow:scroll;z-index:1000; display:block; opacity:0.8; background:#000;-webkit-backface-visibility:visible ' id='debugMode'></div>")}a("#debugMode").append("<div class='debugerror'>"+o+"</div>")}return{dbOpen:n,dbDeleteRow:j,dbDropTable:h,dbInsertRows:l,dbSelectAll:g,dbExecuteQuery:k,dbCreateTables:e}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(d){function c(g){if(g==null){g=0}var f=e(g);a("body > *").css("min-height",f+"px !important");a("body.fullscreen > *").css("min-height",f+"px !important");a("body.fullscreen.black-translucent > *").css("min-height",f+"px !important");a("body.landscape > *").css("min-height",f+"px !important")}function e(g){var f=0;if(typeof(window.innerWidth)=="number"){f=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){f=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){f=document.body.clientHeight}}}if(f<g){f=g}return f}return{resetHeight:c}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(c){b.fn.makeFloaty=function(d){var f={align:"top",spacing:20,time:".3s"};var e=b.extend({},f,d);e.align=(e.align=="top")?"top":"bottom";return this.each(function(){var g=b(this);g.css({"-webkit-transition":"top "+e.time+" ease-in-out",display:"block","min-height":"0 !important"}).data("settings",e);b(document).bind("scroll",function(){if(g.data("floatyVisible")===true){g.scrollFloaty()}});g.scrollFloaty()})};b.fn.scrollFloaty=function(){return this.each(function(){var d=b(this);var f=d.data("settings");var e=b("html").attr("clientHeight");var g=window.pageYOffset+((f.align=="top")?f.spacing:e-f.spacing-d.get(0).offsetHeight);d.css("top",g).data("floatyVisible",true)})};b.fn.hideFloaty=function(){return this.each(function(){var d=b(this);var e=d.get(0).offsetHeight;d.css("top",-e-10).data("floatyVisible",false)})};b.fn.toggleFloaty=function(){return this.each(function(){var d=b(this);if(d.data("floatyVisible")===true){d.hideFloaty()}else{d.scrollFloaty()}})}})}})(jQuery);(function(c){if(c.jQTouch){function b(f){var i,e,h,i,g=0;h={element:c("#gesture_test"),onGestureStart:null,onGestureChange:null,onGestureEnd:null,};h=c.extend({},h,f);h.element.bind("gesturestart",function(j){j.originalEvent.preventDefault();if(h.onGestureStart){h.onGestureStart(a(j,i),d(j,g),j,h.element)}}).bind("gesturechange",function(j){if(h.onGestureChange){h.onGestureChange(a(j,i),d(j,g),j,h.element)}}).bind("gestureend",function(j){i=j.originalEvent.scale;g=(j.originalEvent.rotation+g)%360;if(h.onGestureEnd){h.onGestureEnd(a(j,i),d(j,g),j,h.element)}})}function d(f,e){return f.originalEvent.rotation+e}function a(f,e){return f.originalEvent.scale+e}c.fn.bindGestures=function(e){e.element=this;b(e)}}})(jQuery);(function(f){var g,j=this,o=j.document,l=this.WebKitCSSMatrix,k={selector:".horizontal-scroll > table",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",defaultTransform:"defaulttransform",bounce:function(u){return u.attr("bounce")==="false"?false:k.bounce},scrollBar:function(u){return u.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageX",numberOfTouches:1,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,bounceSpeed:500,preventDefault:true,maxScrollTime:1000,friction:3,bounceTimingFunction:"cubic-bezier(0,0,.25,1)",bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:s,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:t,momentum:m},q=function(){return j.innerWidth+"px"},n=function(u){return(j.innerHeight-u.toolbar)+"px"},h={variables:{toolbar:45},defaults:{".horizontal-scroll":{width:q,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:n},".horizontal-scroll > table":{height:"100%"},".horizontal-scroll .scrollbar.horizontal":{"-webkit-transition-timing-function":"cubic-bezier(0,0,0.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,300ms","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 8, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3 2",position:"absolute","z-index":10,width:"1px",height:"5px",bottom:"1px",left:"1px"}},portrait:{".portrait .horizontal-scroll":{width:q}},landscape:{".landscape .horizontal-scroll":{width:q}}};if(f.jQTouch){f.jQTouch.addExtension(function(v){function u(A,z){var w=z.page.find(k.selector);w.scrollHorizontally(k.attributesToOptions(w,k.attributes))}f(o.body).bind("pageInserted",u);f(function(){f(k.selector).each(function(){f(this).scrollHorizontally(k.attributesToOptions(f(this),k.attributes))})});return{}})}function e(w,u){var v={};f.each(u,function(z,A){if(f.isFunction(A)){v[z]=A(w)}else{if(w.attr(A)!=g){v[z]=w.attr(A)}}});return v}f.fn.scrollHorizontally=function(u){u=f.extend(true,{},k,u||{});return this.each(function(){p(this,u)})};f.fn.scrollHorizontally.defaults=function(u){if(u!==g){k=f.extend(true,k,u)}return f.extend({},k)};f.fn.scrollHorizontally.defaultCSS=function(u){if(u!==g){h=f.extend(true,h,u)}return f.extend({},h)};function p(z,w){var u=f(z).data("jqt-horizontal-scroll-options",w).css("webkitTransform",r(w.defaultTransform,w.defaultOffset)),v=new l(u.css("webkitTransform"));f.each(w.events,function(A,B){z.addEventListener(A,B,false)});w.currentPosition=v.m41;w.parentWidth=u.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(u.parent(),"horizontal",w.scrollBarOptions||{}):b(u.parent(),"horizontal",w.scrollBarOptions||{})}}function a(C){var D=f(this),w=D.data("jqt-horizontal-scroll-options"),v,B=D.outerWidth(),A=D.parent().width(),z=-(B-A),u=A/6;w.parentWidth=A;if(!!w.ignoreTags&&f(C.target).is(w.ignoreTags)||C.targetTouches.length!==w.numberOfTouches){return null}v=new l(D.css("webkitTransform"));D.data("jqt-horizontal-scroll-current-event",{startLocation:C.touches[0][w.eventProperty],startPosition:v.m41,currentPosition:v.m41,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentWidth:A,endPoint:z,minScroll:!w.bounce?0:u,maxScroll:!w.bounce?z:z-u,timingFunction:w.bounceTimingFunction});if(w.scrollBarElement){w.scrollBarElement.init(A,B)}w.setPosition(D,w,v.m41,"0");if(w.preventDefault){C.preventDefault();return false}else{return true}}function s(z){var B=f(this),w=B.data("jqt-horizontal-scroll-options"),A=B.data("jqt-horizontal-scroll-current-event"),v=A.lastMoveTime,C=A.startLocation-z.touches[0][w.eventProperty],u=A.startPosition-C;A.currentPosition=u;A.moved=true;A.lastMoveTime=z.timeStamp;if((A.lastMoveTime-v)>w.maxScrollTime){A.startTime=A.lastMoveTime}if(w.scrollBarElement&&!w.scrollBarElement.visible){w.scrollBarElement.show()}w.setPosition(B,w,A.currentPosition,0);if(w.preventDefault){z.preventDefault();return false}else{return true}}function d(v){var A=f(this),u=A.data("jqt-horizontal-scroll-options"),w=A.data("jqt-horizontal-scroll-current-event"),z,B;if(!w.moved){if(u.scrollBarElement){u.scrollBarElement.hide()}z=v.target;if(z.nodeType==3){z=z.parentNode}B=o.createEvent("MouseEvents");B.initEvent("click",true,true);z.dispatchEvent(B);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}}u.momentum(A,u,w,v);u.setPosition(A,u,w.currentPosition,w.duration);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}else{return true}}function i(z){var w=f(this),u=w.data("jqt-horizontal-scroll-options"),v=w.data("jqt-horizontal-scroll-current-event");if(v){if(v.currentPosition>0){v.currentPosition=0;u.setPosition(w,u,0,u.bounceSpeed)}else{if(v.currentPosition<v.endPoint){v.currentPosition=v.endPoint;u.setPosition(w,u,v.endPoint,u.bounceSpeed)}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}function m(C,F,D,v){var z=Math.min(F.maxScrollTime,D.lastMoveTime-D.startTime),u=D.startPosition-D.currentPosition,A=Math.abs(u)/z,B=z*A*F.friction,w=Math.round(u*A),E=Math.round(D.currentPosition-w);if(D.currentPosition>0){E=0}else{if(D.currentPosition<D.endPoint){E=D.endPoint}else{if(E>D.minScroll){B=B*Math.abs(D.minScroll/E);E=D.minScroll}else{if(E<D.maxScroll){B=B*Math.abs(D.maxScroll/E);E=D.maxScroll}}}}D.momentum=E/D.currentPosition;D.currentPosition=E;D.duration=B}function t(v,u){return u.setPosition(v,u,0,u.defaultDuration)}function c(w,v,u,B,A){if(v.scrollBarElement){var z=(w.parent().width()-w.outerWidth());if(u>0){z+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/z*u,r("{0}ms",B!==g?B:v.defaultDuration))}if(B!==g){w.css("webkitTransitionDuration",r("{0}ms",B))}if(A!==g){w.css("webkitTransitionTimingFunction",A)}v.currentPosition=u||0;return w.css("webkitTransform",r("translate3d({0}px, 0, 0)",v.currentPosition))}function r(v){var u=arguments;return v.replace(/\{(\d+)\}/g,function(z,w){return u[Number(w)+1]+""})}function b(v,w,u){if(!(this instanceof b)){return new b(v,w,u)}this.direction=w;this.bar=f(o.createElement("div")).addClass("scrollbar "+w).appendTo(v)[0]}b.prototype={direction:"horizontal",size:0,maxSize:0,maxScroll:0,visible:false,init:function(u,v){var w=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=u-8;this.size=Math.round(this.maxSize*this.maxSize/v)+w;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-w)+"px"},setPosition:function(u){u=this.direction=="horizontal"?"translate3d("+Math.round(u)+"px,0,0)":"translate3d(0,"+Math.round(u)+"px,0)";this.bar.style.webkitTransform=u},scrollTo:function(v,u){this.bar.style.webkitTransitionDuration=(u||"400ms")+",300ms";this.setPosition(v)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){j.scrollTo(0,0);var u="",z=h,w=j.innerHeight>j.innerWidth?"portrait":"landscape",A=function(B,C){u+=B+":"+(f.isFunction(C)?C(z.variables):C)+";"},v=function(B,C){u+=B+"{";f.each(C,A);u+="}"};f.each(z.defaults,v);f.each(z[w],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head");f(j).one("orientationchange",function(){setTimeout(function(){j.scrollTo(0,0);u="";f.each(z[j.innerHeight>j.innerWidth?"portrait":"landscape"],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head")},30)})})})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var i,f,h;function d(){return navigator.geolocation}function g(j){if(d()){h=j;navigator.geolocation.getCurrentPosition(c);return true}else{console.log("Device not capable of geo-location.");j(false);return false}}function c(j){i=j.coords.latitude;f=j.coords.longitude;if(h){h(e())}}function e(){if(i&&f){return{latitude:i,longitude:f}}else{console.log("No location available. Try calling updateLocation() first.");return false}}return{updateLocation:g,getLocation:e}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var c=[];c[0]="uncached";c[1]="idle";c[2]="checking";c[3]="downloading";c[4]="updateready";c[5]="obsolete";var d=window.applicationCache;d.addEventListener("cached",f,false);d.addEventListener("checking",f,false);d.addEventListener("downloading",f,false);d.addEventListener("error",f,false);d.addEventListener("noupdate",f,false);d.addEventListener("obsolete",f,false);d.addEventListener("progress",f,false);d.addEventListener("updateready",f,false);function f(m){var j,i,k,l;j=(h())?"yes":"no";i=c[d.status];k=m.type;l="online: "+j;l+=", event: "+k;l+=", status: "+i;if(k=="error"&&navigator.onLine){l+=" There was an unknown error, check your Cache Manifest."}console.log(l)}function h(){return navigator.onLine}if(!b("html").attr("manifest")){console.log("No Cache Manifest listed on the <html> tag.")}d.addEventListener("updateready",function(i){if(c[d.status]!="idle"){d.swapCache();console.log("Swapped/updated the Cache Manifest.")}},false);function e(){d.update()}function g(){setInterval(function(){d.update()},10000)}return{isOnline:h,checkForUpdates:e,autoCheckForUpdates:g}})}})(jQuery);
2
2
  /*!*
3
3
  * Provides event handling for iPhone like photo gallery (without thumbnail portion)
4
4
  *
@@ -39,7 +39,7 @@ body {
39
39
  &.landscape .toolbar > h1 {
40
40
  margin-left: -125px;
41
41
  width: 250px; }
42
- .button, .back, .cancel, .add, .backRemote {
42
+ .button, .back, .cancel, .add {
43
43
  position: absolute;
44
44
  overflow: hidden;
45
45
  top: 8px;
@@ -65,15 +65,15 @@ body {
65
65
  .blueButton {
66
66
  -webkit-border-image: image_url("jquery/touch/apple/activeButton.png") 0 5 0 5;
67
67
  border-width: 0 5px; }
68
- .back, .backRemote {
68
+ .back {
69
69
  left: 6px;
70
70
  right: auto;
71
71
  padding: 0;
72
72
  max-width: 55px;
73
73
  border-width: 0 8px 0 14px;
74
- -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; }
75
- .back.active, .backRemote.active {
76
- -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; }
74
+ -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14;
75
+ &.active {
76
+ -webkit-border-image: image_url("jquery/touch/apple/backButton.png") 0 8 0 14; } }
77
77
  .leftButton, .cancel {
78
78
  left: 6px;
79
79
  right: auto; }
@@ -40,7 +40,7 @@ body {
40
40
  &.landscape .toolbar > h1 {
41
41
  margin-left: -125px;
42
42
  width: 250px; }
43
- .button, .back, .cancel, .add, .backRemote {
43
+ .button, .back, .cancel, .add {
44
44
  position: absolute;
45
45
  overflow: hidden;
46
46
  top: 8px;
@@ -63,15 +63,15 @@ body {
63
63
  -webkit-border-image: image_url("jquery/touch/default/button.png") 0 5 0 5; }
64
64
  .button.active, .cancel.active, .add.active {
65
65
  -webkit-border-image: image_url("jquery/touch/default/buttonActive.png") 0 5 0 5; }
66
- .back, .backRemote {
66
+ .back {
67
67
  left: 6px;
68
68
  right: auto;
69
69
  padding: 0;
70
70
  max-width: 55px;
71
71
  border-width: 0 8px 0 14px;
72
- -webkit-border-image: image_url("jquery/touch/default/backButton.png") 0 8 0 14; }
73
- .back.active, .backRemote.active {
74
- -webkit-border-image: image_url("jquery/touch/default/backButtonActive.png") 0 8 0 14; }
72
+ -webkit-border-image: image_url("jquery/touch/default/backButton.png") 0 8 0 14;
73
+ &.active {
74
+ -webkit-border-image: image_url("jquery/touch/default/backButtonActive.png") 0 8 0 14; } }
75
75
  .leftButton, .cancel {
76
76
  left: 6px;
77
77
  right: auto; }
@@ -40,7 +40,7 @@ body {
40
40
  &.landscape .toolbar > h1 {
41
41
  margin-left: -125px;
42
42
  width: 250px; }
43
- .button, .back, .cancel, .add, .backRemote {
43
+ .button, .back, .cancel, .add {
44
44
  position: absolute;
45
45
  overflow: hidden;
46
46
  top: 8px;
@@ -66,15 +66,15 @@ body {
66
66
  .blueButton {
67
67
  -webkit-border-image: image_url("jquery/touch/jqt/blueButton.png") 0 5 0 5;
68
68
  border-width: 0 5px; }
69
- .back, .backRemote {
69
+ .back {
70
70
  left: 6px;
71
71
  right: auto;
72
72
  padding: 0;
73
73
  max-width: 55px;
74
74
  border-width: 0 8px 0 14px;
75
- -webkit-border-image: image_url("jquery/touch/jqt/back_button.png") 0 8 0 14; }
76
- .back.active, .backRemote.active {
77
- -webkit-border-image: image_url("jquery/touch/jqt/back_button_clicked.png") 0 8 0 14; }
75
+ -webkit-border-image: image_url("jquery/touch/jqt/back_button.png") 0 8 0 14;
76
+ &.active {
77
+ -webkit-border-image: image_url("jquery/touch/jqt/back_button_clicked.png") 0 8 0 14; } }
78
78
  .leftButton, .cancel {
79
79
  left: 6px;
80
80
  right: auto; }
@@ -94,7 +94,7 @@ body {
94
94
  text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0; }
95
95
  .whiteButton.active, .grayButton.active, .redButton.active, .blueButton.active, .greenButton.active, .whiteButton:active, .grayButton:active, .redButton:active, .blueButton:active, .greenButton:active {
96
96
  -webkit-border-image: image_url("jquery/touch/jqt/activeButton.png") 0 12 0 12;
97
- color: #000000 !important; }
97
+ color: black !important; }
98
98
  .whiteButton {
99
99
  -webkit-border-image: image_url("jquery/touch/jqt/whiteButton.png") 0 12 0 12; }
100
100
  .grayButton {
@@ -285,7 +285,12 @@ body {
285
285
  display: block;
286
286
  width: 246px;
287
287
  color: #777;
288
- margin: -12px 0 0 17px; } }
288
+ margin: -12px 0 0 17px; } } } }
289
+ &.android ul li input {
290
+ &[type="checkbox"]:after, &[type="radio"]:after {
291
+ margin: 3px 0 0 24px; } }
292
+ ul {
293
+ li {
289
294
  small {
290
295
  color: #64c114;
291
296
  font: 17px "Helvetica Neue", Helvetica;
@@ -32,17 +32,19 @@ body {
32
32
  min-height: 100%;
33
33
  overflow-x: hidden;
34
34
  position: absolute;
35
- width: 100%; }
35
+ width: 100%;
36
+ z-index: 0; }
36
37
  .current {
37
- display: block !important; } }
38
+ display: block !important;
39
+ z-index: 10; } }
38
40
  .in, .out {
39
41
  -webkit-animation-duration: 250ms;
40
- -webkit-animation-fill-mode: forwards;
42
+ -webkit-animation-fill-mode: both;
41
43
  -webkit-animation-timing-function: ease-in-out; }
42
44
  .in {
43
45
  z-index: 10; }
44
46
  .out {
45
- z-index: 0; }
47
+ z-index: 0 !important; }
46
48
  &.supports3d {
47
49
  -webkit-perspective: 800;
48
50
  -webkit-transform-style: preserve-3d;
@@ -174,11 +176,9 @@ body {
174
176
 
175
177
  @-webkit-keyframes slideLeftOut {
176
178
  0% {
177
- -webkit-transform: translateX(0px);
178
- opacity: 1; }
179
+ -webkit-transform: translateX(0px); }
179
180
  100% {
180
- -webkit-transform: translateX(-100%);
181
- opacity: 0; } }
181
+ -webkit-transform: translateX(-100%); } }
182
182
 
183
183
 
184
184
  /* Slide Right */
@@ -192,11 +192,9 @@ body {
192
192
 
193
193
  @-webkit-keyframes slideRightOut {
194
194
  0% {
195
- -webkit-transform: translateX(0);
196
- opacity: 1; }
195
+ -webkit-transform: translateX(0); }
197
196
  100% {
198
- -webkit-transform: translateX(100%);
199
- opacity: 0; } }
197
+ -webkit-transform: translateX(100%); } }
200
198
 
201
199
 
202
200
  /* Slide Up */
@@ -529,7 +527,7 @@ body {
529
527
  background: #ddd; }
530
528
  li {
531
529
  border-top: 0px solid black !important;
532
- color: #000000 !important;
530
+ color: black !important;
533
531
  padding: 0 8px;
534
532
  height: 44px;
535
533
  overflow: hidden;
@@ -1,71 +1,58 @@
1
1
  /**
2
2
  * History.js jQuery Adapter
3
- * @author Benjamin Arthur Lupton
4
- * @copyright 2010-2011 Benjamin Arthur Lupton
5
- * @license New BSD License - http://creativecommons.org/licenses/BSD/
3
+ * @author Benjamin Arthur Lupton <contact@balupton.com>
4
+ * @copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
5
+ * @license New BSD License <http://creativecommons.org/licenses/BSD/>
6
6
  */
7
7
 
8
- (function($, window, undefined) {
9
-
10
- // --------------------------------------------------------------------------
11
- // Initialise
12
-
13
- // History Object
14
- window.History = window.History || {};
15
-
16
- // Localise Globals
17
- var
18
- History = window.History || {},
19
- history = window.history;
20
-
21
- // Check Existence of Adapter
22
- if (typeof History.Adapter !== 'undefined') {
23
- throw new Error('History.js Adapter has already been loaded...');
24
- }
25
-
26
- // Add the Adapter
27
- History.Adapter = {
28
-
29
- /**
30
- * History.Adapter.bind(el,event,callback)
31
- * @param {element} el
32
- * @param {string} event
33
- * @param {Function} callback
34
- * @return {element}
35
- */
36
- bind: function(el, event, callback) {
37
- return $(el).bind(event, callback);
38
- },
39
-
40
- /**
41
- * History.Adapter.trigger(el,event)
42
- * @param {element} el
43
- * @param {string} event
44
- * @return {element}
45
- */
46
- trigger: function(el, event) {
47
- return $(el).trigger(event);
48
- },
49
-
50
- /**
51
- * History.Adapter.trigger(el,event,data)
52
- * @param {Function} callback
53
- * @return {true}
54
- */
55
- onDomLoad: function(callback) {
56
- jQuery(callback);
57
- }
58
-
59
- };
60
-
61
- // Check Load Status of HTML5 Support
62
- if (typeof History.initHtml5 !== 'undefined') {
63
- History.initHtml5();
64
- }
65
-
66
- // Check Load Status of HTML4 Support
67
- if (typeof History.initHtml4 !== 'undefined') {
68
- History.initHtml4();
69
- }
70
-
71
- })(jQuery, window);
8
+ // Closure
9
+ (function(window,undefined){
10
+ // Localise Globals
11
+ var
12
+ History = window.History = window.History||{},
13
+ jQuery = window.jQuery;
14
+
15
+ // Check Existence
16
+ if ( typeof History.Adapter !== 'undefined' ) {
17
+ throw new Error('History.js Adapter has already been loaded...');
18
+ }
19
+
20
+ // Add the Adapter
21
+ History.Adapter = {
22
+ /**
23
+ * History.Adapter.bind(el,event,callback)
24
+ * @param {Element|Selector} el
25
+ * @param {String} event - custom and standard events
26
+ * @param {Function} callback
27
+ * @return
28
+ */
29
+ bind: function(el,event,callback){
30
+ jQuery(el).bind(event,callback);
31
+ },
32
+
33
+ /**
34
+ * History.Adapter.trigger(el,event)
35
+ * @param {Element|Selector} el
36
+ * @param {String} event - custom and standard events
37
+ * @return
38
+ */
39
+ trigger: function(el,event){
40
+ jQuery(el).trigger(event);
41
+ },
42
+
43
+ /**
44
+ * History.Adapter.trigger(el,event,data)
45
+ * @param {Function} callback
46
+ * @return
47
+ */
48
+ onDomLoad: function(callback) {
49
+ jQuery(callback);
50
+ }
51
+ };
52
+
53
+ // Try and Initialise History
54
+ if ( typeof History.init !== 'undefined' ) {
55
+ History.init();
56
+ }
57
+
58
+ })(window);
@@ -1,4 +1,4 @@
1
1
  /*
2
- New BSD License - http://creativecommons.org/licenses/BSD/
2
+ New BSD License <http://creativecommons.org/licenses/BSD/>
3
3
  */
4
- (function(e,c){c.History=c.History||{};var a=c.History||{};if(typeof a.Adapter!=="undefined")throw Error("History.js Adapter has already been loaded...");a.Adapter={bind:function(b,d,f){return e(b).bind(d,f)},trigger:function(b,d){return e(b).trigger(d)},onDomLoad:function(b){jQuery(b)}};typeof a.initHtml5!=="undefined"&&a.initHtml5();typeof a.initHtml4!=="undefined"&&a.initHtml4()})(jQuery,window);
4
+ (function(c){var b=c.History=c.History||{},d=c.jQuery;if(typeof b.Adapter!=="undefined")throw Error("History.js Adapter has already been loaded...");b.Adapter={bind:function(a,e,f){d(a).bind(e,f)},trigger:function(a,e){d(a).trigger(e)},onDomLoad:function(a){d(a)}};typeof b.init!=="undefined"&&b.init()})(window);
@@ -6,685 +6,592 @@
6
6
  * @license New BSD License <http://creativecommons.org/licenses/BSD/>
7
7
  */
8
8
 
9
- (function(window, undefined) {
10
-
11
- // --------------------------------------------------------------------------
12
- // Initialise
13
-
14
- // History Object
15
- window.History = window.History || {};
16
- window._History = window._History || {};
17
-
18
- // Localise Globals
19
- var
20
- document = window.document, // Make sure we are using the correct document
21
- _History = window._History, // Private History Object
22
- History = window.History; // Public History Object
23
-
24
- // Check Existence of History.js
25
- if (typeof History.initHtml4 !== 'undefined') {
26
- throw new Error('History.js HTML4 Support has already been loaded...');
27
- }
28
-
29
- // Initialise HTML4 Support
30
- History.initHtml4 = function() {
31
-
32
- // ----------------------------------------------------------------------
33
- // Check Status
34
-
35
- if (typeof History.initHtml5 === 'undefined' || typeof History.Adapter === 'undefined') {
36
- return false;
37
- }
38
-
39
- // ----------------------------------------------------------------------
40
- // Emulated Status
41
-
42
- /**
43
- * _History.getInternetExplorerMajorVersion()
44
- * Get's the major version of Internet Explorer
45
- * @return {integer}
46
- * @license Public Domain
47
- * @author Benjamin Arthur Lupton <contact@balupton.com>
48
- * @author James Padolsey <https://gist.github.com/527683>
49
- */
50
- _History.getInternetExplorerMajorVersion = function() {
51
- var result = _History.getInternetExplorerMajorVersion.cached =
52
- (typeof _History.getInternetExplorerMajorVersion.cached !== 'undefined')
53
- ? _History.getInternetExplorerMajorVersion.cached
54
- : (function() {
55
- var undef,
56
- v = 3,
57
- div = document.createElement('div'),
58
- all = div.getElementsByTagName('i');
59
- while (
60
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
61
- all[0]
62
- );
63
- return v > 4 ? v : undef;
64
- })()
65
- ;
66
- return result;
67
- };
68
-
69
- /**
70
- * _History.isInternetExplorer()
71
- * Are we using Internet Explorer?
72
- * @return {boolean}
73
- * @license Public Domain
74
- * @author Benjamin Arthur Lupton <contact@balupton.com>
75
- */
76
- _History.isInternetExplorer = function() {
77
- var result = _History.isInternetExplorer.cached =
78
- (typeof _History.isInternetExplorer.cached !== 'undefined')
79
- ? _History.isInternetExplorer.cached
80
- : (_History.getInternetExplorerMajorVersion() !== 0)
81
- ;
82
- return result;
83
- };
84
-
85
- /**
86
- * History.emulated
87
- * Which features require emulating?
88
- */
89
- History.emulated.hashChange = Boolean(
90
- !('onhashchange' in window || 'onhashchange' in document)
91
- ||
92
- (_History.isInternetExplorer() && _History.getInternetExplorerMajorVersion() < 8)
93
- );
94
-
95
-
96
- // ----------------------------------------------------------------------
97
- // Hash Storage
98
-
99
- /**
100
- * _History.savedHashes
101
- * Store the hashes in an array
102
- */
103
- _History.savedHashes = [];
104
-
105
- /**
106
- * _History.isLastHash(newHash)
107
- * Checks if the hash is the last hash
108
- * @param {string} newHash
109
- * @return {boolean} true
110
- */
111
- _History.isLastHash = function(newHash) {
112
- // Prepare
113
- var oldHash = _History.getHashByIndex();
114
-
115
- // Check
116
- var isLast = newHash === oldHash;
117
-
118
- // Return isLast
119
- return isLast;
120
- };
121
-
122
- /**
123
- * _History.saveHash(newHash)
124
- * Push a Hash
125
- * @param {string} newHash
126
- * @return {boolean} true
127
- */
128
- _History.saveHash = function(newHash) {
129
- // Check Hash
130
- if (_History.isLastHash(newHash)) {
131
- return false;
132
- }
133
-
134
- // Push the Hash
135
- _History.savedHashes.push(newHash);
136
-
137
- // Return true
138
- return true;
139
- };
140
-
141
- /**
142
- * _History.getHashByIndex()
143
- * Gets a hash by the index
144
- * @param {integer} index
145
- * @return {string}
146
- */
147
- _History.getHashByIndex = function(index) {
148
- // Prepare
149
- var hash = null;
150
-
151
- // Handle
152
- if (typeof index === 'undefined') {
153
- // Get the last inserted
154
- hash = _History.savedHashes[_History.savedHashes.length - 1];
155
- }
156
- else if (index < 0) {
157
- // Get from the end
158
- hash = _History.savedHashes[_History.savedHashes.length + index];
159
- }
160
- else {
161
- // Get from the beginning
162
- hash = _History.savedHashes[index];
163
- }
164
-
165
- // Return hash
166
- return hash;
167
- };
168
-
169
- /**
170
- * _History.stateHashExists
171
- * Checks if the State Hash Exists
172
- * @param {string} stateHash
173
- * @return {boolean} exists
174
- */
175
- _History.stateHashExists = function(stateHash) {
176
- // Prepare
177
- var exists = typeof _History.statesByHash[stateHash] !== 'undefined';
178
-
179
- // Return exists
180
- return exists;
181
- };
182
-
183
- // ----------------------------------------------------------------------
184
- // Discarded States
185
-
186
- /**
187
- * _History.discardedHashes
188
- * A hashed array of discarded hashes
189
- */
190
- _History.discardedHashes = {};
191
-
192
- /**
193
- * _History.discardedStates
194
- * A hashed array of discarded states
195
- */
196
- _History.discardedStates = {};
197
-
198
- /**
199
- * _History.discardState(State)
200
- * Discards the state by ignoring it through History
201
- * @param {object} State
202
- * @return {true}
203
- */
204
- _History.discardState = function(discardedState, forwardState, backState) {
205
- History.debug('History.discardState', this, arguments);
206
- // Prepare
207
- var discardedStateHash = History.contractState(discardedState);
208
-
209
- // Create Discard Object
210
- var discardObject = {
211
- 'discardedState': discardedState,
212
- 'backState': backState,
213
- 'forwardState': forwardState
214
- };
215
-
216
- // Add to DiscardedStates
217
- _History.discardedStates[discardedStateHash] = discardObject;
218
-
219
- // Return true
220
- return true;
221
- };
222
-
223
- /**
224
- * _History.discardHash(hash)
225
- * Discards the hash by ignoring it through History
226
- * @param {string} hash
227
- * @return {true}
228
- */
229
- _History.discardHash = function(discardedHash, forwardState, backState) {
230
- History.debug('History.discardState', this, arguments);
231
- // Create Discard Object
232
- var discardObject = {
233
- 'discardedHash': discardedHash,
234
- 'backState': backState,
235
- 'forwardState': forwardState
236
- };
237
-
238
- // Add to discardedHash
239
- _History.discardedHashes[discardedHash] = discardObject;
240
-
241
- // Return true
242
- return true;
243
- };
244
-
245
- /**
246
- * _History.discardState(State)
247
- * Checks to see if the state is discarded
248
- * @param {object} State
249
- * @return {bool}
250
- */
251
- _History.discardedState = function(State) {
252
- // Prepare
253
- var StateHash = History.contractState(State);
254
-
255
- // Check
256
- var discarded = _History.discardedStates[StateHash] || false;
257
-
258
- // Return true
259
- return discarded;
260
- };
261
-
262
- /**
263
- * _History.discardedHash(hash)
264
- * Checks to see if the state is discarded
265
- * @param {string} State
266
- * @return {bool}
267
- */
268
- _History.discardedHash = function(hash) {
269
- // Check
270
- var discarded = _History.discardedHashes[hash] || false;
271
-
272
- // Return true
273
- return discarded;
274
- };
275
-
276
- /**
277
- * _History.recycleState(State)
278
- * Allows a discarded state to be used again
279
- * @param {object} data
280
- * @param {string} title
281
- * @param {string} url
282
- * @return {true}
283
- */
284
- _History.recycleState = function(State) {
285
- History.debug('History.recycleState', this, arguments);
286
- // Prepare
287
- var StateHash = History.contractState(State);
288
-
289
- // Remove from DiscardedStates
290
- if (_History.discardedState(State)) {
291
- delete _History.discardedStates[StateHash];
292
- }
293
-
294
- // Return true
295
- return true;
296
- };
297
-
298
- // ----------------------------------------------------------------------
299
- // HTML4 HashChange Support
300
-
301
- if (History.emulated.hashChange) {
302
- /*
303
- * We must emulate the HTML4 HashChange Support by manually checking for hash changes
304
- */
305
-
306
- History.Adapter.onDomLoad(function() {
307
- // Define our Checker Function
308
- _History.checkerFunction = null;
309
-
310
- // Handle depending on the browser
311
- if (_History.isInternetExplorer()) {
312
- // IE6 and IE7
313
- // We need to use an iframe to emulate the back and forward buttons
314
-
315
- // Create iFrame
316
- var
317
- iframeId = 'historyjs-iframe',
318
- iframe = document.createElement('iframe');
319
-
320
- // Adjust iFarme
321
- iframe.setAttribute('id', iframeId);
322
- iframe.style.display = 'none';
323
-
324
- // Append iFrame
325
- document.body.appendChild(iframe);
326
-
327
- // Create initial history entry
328
- iframe.contentWindow.document.open();
329
- iframe.contentWindow.document.close();
330
-
331
- // Define some variables that will help in our checker function
332
- var
333
- lastDocumentHash = null,
334
- lastIframeHash = null,
335
- checkerRunning = false;
336
-
337
- // Define the checker function
338
- _History.checkerFunction = function() {
339
- // Check Running
340
- if (checkerRunning) {
341
- History.debug('hashchange.checker: checker is running');
342
- return false;
343
- }
344
-
345
- // Update Running
346
- checkerRunning = true;
347
-
348
- // Fetch
349
- var
350
- documentHash = History.getHash(),
351
- iframeHash = _History.unescapeHash(iframe.contentWindow.document.location.hash);
352
-
353
- // The Document Hash has changed (application caused)
354
- if (documentHash !== lastDocumentHash) {
355
- // Equalise
356
- lastDocumentHash = documentHash;
357
-
358
- // Create a history entry in the iframe
359
- if (iframeHash !== documentHash) {
360
- History.debug('hashchange.checker: iframe hash change', 'documentHash (new):', documentHash, 'iframeHash (old):', iframeHash);
361
-
362
- // Equalise
363
- lastIframeHash = iframeHash = documentHash;
364
-
365
- // Create History Entry
366
- iframe.contentWindow.document.open();
367
- iframe.contentWindow.document.close();
368
-
369
- // Update the iframe's hash
370
- iframe.contentWindow.document.location.hash = _History.escapeHash(documentHash);
371
- }
372
-
373
- // Trigger Hashchange Event
374
- History.Adapter.trigger(window, 'hashchange');
375
- }
376
-
377
- // The iFrame Hash has changed (back button caused)
378
- else if (iframeHash !== lastIframeHash) {
379
- History.debug('hashchange.checker: iframe hash out of sync', 'iframeHash (new):', iframeHash, 'documentHash (old):', documentHash);
380
-
381
- // Equalise
382
- lastIframeHash = iframeHash;
383
-
384
- // Update the Hash
385
- History.setHash(iframeHash, false);
386
- }
387
-
388
- // Reset Running
389
- checkerRunning = false;
390
-
391
- // Return true
392
- return true;
393
- };
394
- }
395
- else {
396
- // We are not IE
397
- // Firefox 1 or 2, Opera
398
-
399
- // Define some variables that will help in our checker function
400
- var
401
- lastDocumentHash = null;
402
-
403
- // Define the checker function
404
- _History.checkerFunction = function() {
405
- // Prepare
406
- var documentHash = History.getHash();
407
-
408
- // The Document Hash has changed (application caused)
409
- if (documentHash !== lastDocumentHash) {
410
- // Equalise
411
- lastDocumentHash = documentHash;
412
-
413
- // Trigger Hashchange Event
414
- History.Adapter.trigger(window, 'hashchange');
415
- }
416
-
417
- // Return true
418
- return true;
419
- };
420
- }
421
-
422
- // Apply the checker function
423
- setInterval(_History.checkerFunction, History.options.hashChangeCheckerDelay);
424
-
425
- // End onDomLoad closure
426
- return true;
427
- });
428
-
429
- }
430
-
431
- // ----------------------------------------------------------------------
432
- // HTML5 State Support
433
-
434
- if (History.emulated.pushState) {
435
- /*
436
- * We must emulate the HTML5 State Management by using HTML4 HashChange
437
- */
438
-
439
- /**
440
- * _History.onHashChange(event)
441
- * Trigger HTML5's window.onpopstate via HTML4 HashChange Support
442
- */
443
- _History.onHashChange = function(event) {
444
- History.debug('_History.onHashChange', this, arguments);
445
- // Prepare
446
- var
447
- currentUrl = (event && event.newURL) || document.location.href;
448
- currentHash = unescape(History.extractHashFromUrl(currentUrl)),
449
- currentState = null,
450
- currentStateHash = null,
451
- currentStateHashExits = null;
452
-
453
- // Check if we are the same state
454
- if (_History.isLastHash(currentHash)) {
455
- // There has been no change (just the page's hash has finally propagated)
456
- History.debug('_History.onHashChange: no change');
457
- History.busy(false);
458
- return false;
459
- }
460
-
461
- // Store our location for use in detecting back/forward direction
462
- _History.saveHash(currentHash);
463
-
464
- // Expand Hash
465
- currentState = History.expandHash(currentHash);
466
- if (!currentState) {
467
- // Traditional Anchor Hash
468
- History.debug('_History.onHashChange: traditional anchor');
469
- History.Adapter.trigger(window, 'anchorchange');
470
- History.busy(false);
471
- return false;
472
- }
473
-
474
- // Check if we are the same state
475
- if (_History.isLastState(currentState)) {
476
- // There has been no change (just the page's hash has finally propagated)
477
- History.debug('_History.onHashChange: no change');
478
- History.busy(false);
479
- return false;
480
- }
481
-
482
- // Create the state Hash
483
- currentStateHash = History.contractState(currentState);
484
-
485
- // Log
486
- History.debug('_History.onHashChange: ',
487
- 'currentStateHash',
488
- currentStateHash,
489
- 'Hash -1',
490
- _History.getHashByIndex(-1),
491
- 'Hash -2',
492
- _History.getHashByIndex(-2),
493
- 'Hash -3',
494
- _History.getHashByIndex(-3),
495
- 'Hash -4',
496
- _History.getHashByIndex(-4),
497
- 'Hash -5',
498
- _History.getHashByIndex(-5),
499
- 'Hash -6',
500
- _History.getHashByIndex(-6),
501
- 'Hash -7',
502
- _History.getHashByIndex(-7)
503
- );
504
-
505
- // Check if we are DiscardedState
506
- var discardObject = _History.discardedState(currentState);
507
- if (discardObject) {
508
- History.debug('forwardState:', History.contractState(discardObject.forwardState), 'backState:', History.contractState(discardObject.backState));
509
- // Ignore this state as it has been discarded and go back to the state before it
510
- if (_History.getHashByIndex(-2) === History.contractState(discardObject.forwardState)) {
511
- // We are going backwards
512
- History.debug('_History.onHashChange: go backwards');
513
- History.back(false);
514
- } else {
515
- // We are going forwards
516
- History.debug('_History.onHashChange: go forwards');
517
- History.forward(false);
518
- }
519
- History.busy(false);
520
- return false;
521
- }
522
-
523
- // Push the new HTML5 State
524
- History.debug('_History.onHashChange: success hashchange');
525
- History.pushState(currentState.data, currentState.title, currentState.url, false);
526
-
527
- // End onHashChange closure
528
- return true;
529
- };
530
- History.Adapter.bind(window, 'hashchange', _History.onHashChange);
531
-
532
- /**
533
- * History.pushState(data,title,url)
534
- * Add a new State to the history object, become it, and trigger onpopstate
535
- * We have to trigger for HTML4 compatibility
536
- * @param {object} data
537
- * @param {string} title
538
- * @param {string} url
539
- * @return {true}
540
- */
541
- History.pushState = function(data, title, url, queue) {
542
- History.debug('History.pushState', this, arguments);
543
-
544
- // Check the State
545
- if (History.extractHashFromUrl(url)) {
546
- throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
547
- }
548
-
549
- // Handle Queueing
550
- if (queue !== false && History.busy()) {
551
- // Wait + Push to Queue
552
- History.debug('History.pushState: we must wait', arguments);
553
- History.pushQueue({
554
- scope: History,
555
- callback: History.pushState,
556
- args: arguments,
557
- queue: queue
558
- });
559
- return false;
560
- }
561
-
562
- // Make Busy
563
- History.busy(true);
564
-
565
- // Fetch the State Object
566
- var
567
- newState = History.createStateObject(data, title, url),
568
- newStateHash = History.contractState(newState),
569
- oldState = History.getState(),
570
- oldStateHash = History.getStateHash(),
571
- html4Hash = unescape(History.getHash());
572
-
573
- // Store the newState
574
- _History.storeState(newState);
575
-
576
- // Recycle the State
577
- _History.recycleState(newState);
578
-
579
- // Force update of the title
580
- if (document.title !== newState.title) {
581
- document.title = newState.title
582
- try {
583
- document.getElementsByTagName('title')[0].innerHTML = newState.title;
584
- }
585
- catch (Exception) {
586
- }
587
- }
588
-
589
- History.debug(
590
- 'History.pushState: details',
591
- 'newStateHash:', newStateHash,
592
- 'oldStateHash:', oldStateHash,
593
- 'html4Hash:', html4Hash
594
- );
595
-
596
- // Check if we are the same State
597
- if (newStateHash === oldStateHash) {
598
- History.debug('History.pushState: no change', newStateHash);
599
- return false;
600
- }
601
-
602
- // Update HTML4 Hash
603
- if (newStateHash !== html4Hash) {
604
- History.debug('History.pushState: update hash', newStateHash);
605
- History.setHash(newStateHash, false);
606
- return false;
607
- }
608
-
609
- // Update HTML5 State
610
- _History.saveState(newState);
611
-
612
- // Fire HTML5 Event
613
- History.debug('History.pushState: trigger popstate');
614
- History.Adapter.trigger(window, 'statechange');
615
- History.busy(false);
616
-
617
- // End pushState closure
618
- return true;
619
- };
620
-
621
- /**
622
- * History.replaceState(data,title,url)
623
- * Replace the State and trigger onpopstate
624
- * We have to trigger for HTML4 compatibility
625
- * @param {object} data
626
- * @param {string} title
627
- * @param {string} url
628
- * @return {true}
629
- */
630
- History.replaceState = function(data, title, url, queue) {
631
- History.debug('History.replaceState', this, arguments);
632
- // Check the State
633
- if (History.extractHashFromUrl(url)) {
634
- throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
635
- }
636
-
637
- // Handle Queueing
638
- if (queue !== false && History.busy()) {
639
- // Wait + Push to Queue
640
- History.debug('History.replaceState: we must wait', arguments);
641
- History.pushQueue({
642
- scope: History,
643
- callback: History.replaceState,
644
- args: arguments,
645
- queue: queue
646
- });
647
- return false;
648
- }
649
-
650
- // Make Busy
651
- History.busy(true);
652
-
653
- // Fetch the State Objects
654
- var
655
- newState = History.createStateObject(data, title, url),
656
- oldState = History.getState(),
657
- previousState = _History.getStateByIndex(-2)
658
-
659
- // Discard Old State
660
- _History.discardState(oldState, newState, previousState);
661
-
662
- // Alias to PushState
663
- History.pushState(newState.data, newState.title, newState.url, false);
664
-
665
- // End replaceState closure
666
- return true;
667
- };
668
-
669
- /**
670
- * Ensure initial state is handled correctly
671
- **/
672
- if (!document.location.hash || document.location.hash === '#') {
673
- History.Adapter.onDomLoad(function() {
674
- History.debug('Internet Explorer Initial State Change Fix');
675
- var currentState = History.createStateObject({}, '', document.location.href);
676
- History.pushState(currentState.data, currentState.title, currentState.url);
677
- });
678
- } else if (!History.emulated.hashChange) {
679
- History.debug('Firefox Initial State Change Fix');
680
- History.Adapter.onDomLoad(function() {
681
- _History.onHashChange();
682
- });
683
- }
684
- }
685
- }
686
-
687
- // Try Load HTML4 Support
688
- History.initHtml4();
9
+ (function(window,undefined){
10
+ "use strict";
11
+
12
+ // --------------------------------------------------------------------------
13
+ // Initialise
14
+
15
+ // Localise Globals
16
+ var
17
+ document = window.document, // Make sure we are using the correct document
18
+ History = window.History = window.History||{}; // Public History Object
19
+
20
+ // Check Existence
21
+ if ( typeof History.initHtml4 !== 'undefined' ) {
22
+ throw new Error('History.js HTML4 Support has already been loaded...');
23
+ }
24
+
25
+ // --------------------------------------------------------------------------
26
+ // Initialise HTML4 Support
27
+
28
+ // Initialise HTML4 Support
29
+ History.initHtml4 = function(){
30
+ // Initialise
31
+ if ( typeof History.initHtml4.initialized !== 'undefined' ) {
32
+ // Already Loaded
33
+ return false;
34
+ }
35
+ else {
36
+ History.initHtml4.initialized = true;
37
+ }
38
+
39
+ // ----------------------------------------------------------------------
40
+ // Hash Storage
41
+
42
+ /**
43
+ * History.savedHashes
44
+ * Store the hashes in an array
45
+ */
46
+ History.savedHashes = [];
47
+
48
+ /**
49
+ * History.isLastHash(newHash)
50
+ * Checks if the hash is the last hash
51
+ * @param {string} newHash
52
+ * @return {boolean} true
53
+ */
54
+ History.isLastHash = function(newHash){
55
+ // Prepare
56
+ var oldHash = History.getHashByIndex();
57
+
58
+ // Check
59
+ var isLast = newHash === oldHash;
60
+
61
+ // Return isLast
62
+ return isLast;
63
+ };
64
+
65
+ /**
66
+ * History.saveHash(newHash)
67
+ * Push a Hash
68
+ * @param {string} newHash
69
+ * @return {boolean} true
70
+ */
71
+ History.saveHash = function(newHash){
72
+ // Check Hash
73
+ if ( History.isLastHash(newHash) ) {
74
+ return false;
75
+ }
76
+
77
+ // Push the Hash
78
+ History.savedHashes.push(newHash);
79
+
80
+ // Return true
81
+ return true;
82
+ };
83
+
84
+ /**
85
+ * History.getHashByIndex()
86
+ * Gets a hash by the index
87
+ * @param {integer} index
88
+ * @return {string}
89
+ */
90
+ History.getHashByIndex = function(index){
91
+ // Prepare
92
+ var hash = null;
93
+
94
+ // Handle
95
+ if ( typeof index === 'undefined' ) {
96
+ // Get the last inserted
97
+ hash = History.savedHashes[History.savedHashes.length-1];
98
+ }
99
+ else if ( index < 0 ) {
100
+ // Get from the end
101
+ hash = History.savedHashes[History.savedHashes.length+index];
102
+ }
103
+ else {
104
+ // Get from the beginning
105
+ hash = History.savedHashes[index];
106
+ }
107
+
108
+ // Return hash
109
+ return hash;
110
+ };
111
+
112
+ // ----------------------------------------------------------------------
113
+ // Discarded States
114
+
115
+ /**
116
+ * History.discardedHashes
117
+ * A hashed array of discarded hashes
118
+ */
119
+ History.discardedHashes = {};
120
+
121
+ /**
122
+ * History.discardedStates
123
+ * A hashed array of discarded states
124
+ */
125
+ History.discardedStates = {};
126
+
127
+ /**
128
+ * History.discardState(State)
129
+ * Discards the state by ignoring it through History
130
+ * @param {object} State
131
+ * @return {true}
132
+ */
133
+ History.discardState = function(discardedState,forwardState,backState){
134
+ //History.debug('History.discardState', arguments);
135
+ // Prepare
136
+ var discardedStateHash = History.getHashByState(discardedState);
137
+
138
+ // Create Discard Object
139
+ var discardObject = {
140
+ 'discardedState': discardedState,
141
+ 'backState': backState,
142
+ 'forwardState': forwardState
143
+ };
144
+
145
+ // Add to DiscardedStates
146
+ History.discardedStates[discardedStateHash] = discardObject;
147
+
148
+ // Return true
149
+ return true;
150
+ };
151
+
152
+ /**
153
+ * History.discardHash(hash)
154
+ * Discards the hash by ignoring it through History
155
+ * @param {string} hash
156
+ * @return {true}
157
+ */
158
+ History.discardHash = function(discardedHash,forwardState,backState){
159
+ //History.debug('History.discardState', arguments);
160
+ // Create Discard Object
161
+ var discardObject = {
162
+ 'discardedHash': discardedHash,
163
+ 'backState': backState,
164
+ 'forwardState': forwardState
165
+ };
166
+
167
+ // Add to discardedHash
168
+ History.discardedHashes[discardedHash] = discardObject;
169
+
170
+ // Return true
171
+ return true;
172
+ };
173
+
174
+ /**
175
+ * History.discardState(State)
176
+ * Checks to see if the state is discarded
177
+ * @param {object} State
178
+ * @return {bool}
179
+ */
180
+ History.discardedState = function(State){
181
+ // Prepare
182
+ var StateHash = History.getHashByState(State);
183
+
184
+ // Check
185
+ var discarded = History.discardedStates[StateHash]||false;
186
+
187
+ // Return true
188
+ return discarded;
189
+ };
190
+
191
+ /**
192
+ * History.discardedHash(hash)
193
+ * Checks to see if the state is discarded
194
+ * @param {string} State
195
+ * @return {bool}
196
+ */
197
+ History.discardedHash = function(hash){
198
+ // Check
199
+ var discarded = History.discardedHashes[hash]||false;
200
+
201
+ // Return true
202
+ return discarded;
203
+ };
204
+
205
+ /**
206
+ * History.recycleState(State)
207
+ * Allows a discarded state to be used again
208
+ * @param {object} data
209
+ * @param {string} title
210
+ * @param {string} url
211
+ * @return {true}
212
+ */
213
+ History.recycleState = function(State){
214
+ //History.debug('History.recycleState', arguments);
215
+ // Prepare
216
+ var StateHash = History.getHashByState(State);
217
+
218
+ // Remove from DiscardedStates
219
+ if ( History.discardedState(State) ) {
220
+ delete History.discardedStates[StateHash];
221
+ }
222
+
223
+ // Return true
224
+ return true;
225
+ };
226
+
227
+ // ----------------------------------------------------------------------
228
+ // HTML4 HashChange Support
229
+
230
+ if ( History.emulated.hashChange ) {
231
+ /*
232
+ * We must emulate the HTML4 HashChange Support by manually checking for hash changes
233
+ */
234
+
235
+ /**
236
+ * History.hashChangeInit()
237
+ * Init the HashChange Emulation
238
+ */
239
+ History.hashChangeInit = function(){
240
+ // Define our Checker Function
241
+ History.checkerFunction = null;
242
+
243
+ // Define some variables that will help in our checker function
244
+ var
245
+ lastDocumentHash = '';
246
+
247
+ // Handle depending on the browser
248
+ if ( History.isInternetExplorer() ) {
249
+ // IE6 and IE7
250
+ // We need to use an iframe to emulate the back and forward buttons
251
+
252
+ // Create iFrame
253
+ var
254
+ iframeId = 'historyjs-iframe',
255
+ iframe = document.createElement('iframe');
256
+
257
+ // Adjust iFarme
258
+ iframe.setAttribute('id', iframeId);
259
+ iframe.style.display = 'none';
260
+
261
+ // Append iFrame
262
+ document.body.appendChild(iframe);
263
+
264
+ // Create initial history entry
265
+ iframe.contentWindow.document.open();
266
+ iframe.contentWindow.document.close();
267
+
268
+ // Define some variables that will help in our checker function
269
+ var
270
+ lastIframeHash = '',
271
+ checkerRunning = false;
272
+
273
+ // Define the checker function
274
+ History.checkerFunction = function(){
275
+ // Check Running
276
+ if ( checkerRunning ) {
277
+ return false;
278
+ }
279
+
280
+ // Update Running
281
+ checkerRunning = true;
282
+
283
+ // Fetch
284
+ var
285
+ documentHash = History.getHash()||'',
286
+ iframeHash = History.unescapeHash(iframe.contentWindow.document.location.hash)||'';
287
+
288
+ // The Document Hash has changed (application caused)
289
+ if ( documentHash !== lastDocumentHash ) {
290
+ // Equalise
291
+ lastDocumentHash = documentHash;
292
+
293
+ // Create a history entry in the iframe
294
+ if ( iframeHash !== documentHash ) {
295
+ //History.debug('hashchange.checker: iframe hash change', 'documentHash (new):', documentHash, 'iframeHash (old):', iframeHash);
296
+
297
+ // Equalise
298
+ lastIframeHash = iframeHash = documentHash;
299
+
300
+ // Create History Entry
301
+ iframe.contentWindow.document.open();
302
+ iframe.contentWindow.document.close();
303
+
304
+ // Update the iframe's hash
305
+ iframe.contentWindow.document.location.hash = History.escapeHash(documentHash);
306
+ }
307
+
308
+ // Trigger Hashchange Event
309
+ History.Adapter.trigger(window,'hashchange');
310
+ }
311
+
312
+ // The iFrame Hash has changed (back button caused)
313
+ else if ( iframeHash !== lastIframeHash ) {
314
+ //History.debug('hashchange.checker: iframe hash out of sync', 'iframeHash (new):', iframeHash, 'documentHash (old):', documentHash);
315
+
316
+ // Equalise
317
+ lastIframeHash = iframeHash;
318
+
319
+ // Update the Hash
320
+ History.setHash(iframeHash,false);
321
+ }
322
+
323
+ // Reset Running
324
+ checkerRunning = false;
325
+
326
+ // Return true
327
+ return true;
328
+ };
329
+ }
330
+ else {
331
+ // We are not IE
332
+ // Firefox 1 or 2, Opera
333
+
334
+ // Define the checker function
335
+ History.checkerFunction = function(){
336
+ // Prepare
337
+ var documentHash = History.getHash();
338
+
339
+ // The Document Hash has changed (application caused)
340
+ if ( documentHash !== lastDocumentHash ) {
341
+ // Equalise
342
+ lastDocumentHash = documentHash;
343
+
344
+ // Trigger Hashchange Event
345
+ History.Adapter.trigger(window,'hashchange');
346
+ }
347
+
348
+ // Return true
349
+ return true;
350
+ };
351
+ }
352
+
353
+ // Apply the checker function
354
+ setInterval(History.checkerFunction, History.options.hashChangeInterval);
355
+
356
+ // Done
357
+ return true;
358
+ }; // History.hashChangeInit
359
+
360
+ // Bind hashChangeInit
361
+ History.Adapter.onDomLoad(History.hashChangeInit);
362
+
363
+ } // History.emulated.hashChange
364
+
365
+
366
+ // ----------------------------------------------------------------------
367
+ // HTML5 State Support
368
+
369
+ if ( History.emulated.pushState ) {
370
+ /*
371
+ * We must emulate the HTML5 State Management by using HTML4 HashChange
372
+ */
373
+
374
+ /**
375
+ * History.onHashChange(event)
376
+ * Trigger HTML5's window.onpopstate via HTML4 HashChange Support
377
+ */
378
+ History.onHashChange = function(event){
379
+ //History.debug('History.onHashChange', arguments);
380
+
381
+ // Prepare
382
+ var
383
+ currentUrl = ((event && event.newURL) || document.location.href),
384
+ currentHash = History.getHashByUrl(currentUrl),
385
+ currentState = null,
386
+ currentStateHash = null,
387
+ currentStateHashExits = null;
388
+
389
+ // Check if we are the same state
390
+ if ( History.isLastHash(currentHash) ) {
391
+ // There has been no change (just the page's hash has finally propagated)
392
+ //History.debug('History.onHashChange: no change');
393
+ History.busy(false);
394
+ return false;
395
+ }
396
+
397
+ // Reset the double check
398
+ History.doubleCheckComplete();
399
+
400
+ // Store our location for use in detecting back/forward direction
401
+ History.saveHash(currentHash);
402
+
403
+ // Expand Hash
404
+ currentState = History.extractState(currentHash||document.location.href);
405
+ if ( !currentState ) {
406
+ //History.debug('History.onHashChange: traditional anchor', currentHash);
407
+ // Traditional Anchor Hash
408
+ History.Adapter.trigger(window,'anchorchange');
409
+ History.busy(false);
410
+ return false;
411
+ }
412
+
413
+ // Check if we are the same state
414
+ if ( History.isLastSavedState(currentState) ) {
415
+ //History.debug('History.onHashChange: no change');
416
+ // There has been no change (just the page's hash has finally propagated)
417
+ History.busy(false);
418
+ return false;
419
+ }
420
+
421
+ // Create the state Hash
422
+ currentStateHash = History.getHashByState(currentState);
423
+
424
+ // Check if we are DiscardedState
425
+ var discardObject = History.discardedState(currentState);
426
+ if ( discardObject ) {
427
+ // Ignore this state as it has been discarded and go back to the state before it
428
+ if ( History.getHashByIndex(-2) === History.getHashByState(discardObject.forwardState) ) {
429
+ // We are going backwards
430
+ //History.debug('History.onHashChange: go backwards');
431
+ History.back(false);
432
+ } else {
433
+ // We are going forwards
434
+ //History.debug('History.onHashChange: go forwards');
435
+ History.forward(false);
436
+ }
437
+ History.busy(false);
438
+ return false;
439
+ }
440
+
441
+ // Push the new HTML5 State
442
+ //History.debug('History.onHashChange: success hashchange');
443
+ History.pushState(currentState.data,currentState.title,currentState.url,false);
444
+
445
+ // End onHashChange closure
446
+ return true;
447
+ };
448
+ History.Adapter.bind(window,'hashchange',History.onHashChange);
449
+
450
+ /**
451
+ * History.pushState(data,title,url)
452
+ * Add a new State to the history object, become it, and trigger onpopstate
453
+ * We have to trigger for HTML4 compatibility
454
+ * @param {object} data
455
+ * @param {string} title
456
+ * @param {string} url
457
+ * @return {true}
458
+ */
459
+ History.pushState = function(data,title,url,queue){
460
+ //History.debug('History.pushState: called', arguments);
461
+
462
+ // Check the State
463
+ if ( History.getHashByUrl(url) ) {
464
+ throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
465
+ }
466
+
467
+ // Handle Queueing
468
+ if ( queue !== false && History.busy() ) {
469
+ // Wait + Push to Queue
470
+ //History.debug('History.pushState: we must wait', arguments);
471
+ History.pushQueue({
472
+ scope: History,
473
+ callback: History.pushState,
474
+ args: arguments,
475
+ queue: queue
476
+ });
477
+ return false;
478
+ }
479
+
480
+ // Make Busy
481
+ History.busy(true);
482
+
483
+ // Fetch the State Object
484
+ var
485
+ newState = History.createStateObject(data,title,url),
486
+ newStateHash = History.getHashByState(newState),
487
+ oldState = History.getState(false),
488
+ oldStateHash = History.getHashByState(oldState),
489
+ html4Hash = History.getHash();
490
+
491
+ // Store the newState
492
+ History.storeState(newState);
493
+ History.expectedStateId = newState.id;
494
+
495
+ // Recycle the State
496
+ History.recycleState(newState);
497
+
498
+ // Force update of the title
499
+ History.setTitle(newState);
500
+
501
+ // Check if we are the same State
502
+ if ( newStateHash === oldStateHash ) {
503
+ //History.debug('History.pushState: no change', newStateHash);
504
+ History.busy(false);
505
+ return false;
506
+ }
507
+
508
+ // Update HTML4 Hash
509
+ if ( newStateHash !== html4Hash && newStateHash !== History.getShortUrl(document.location.href) ) {
510
+ //History.debug('History.pushState: update hash', newStateHash, html4Hash);
511
+ History.setHash(newStateHash,false);
512
+ return false;
513
+ }
514
+
515
+ // Update HTML5 State
516
+ History.saveState(newState);
517
+
518
+ // Fire HTML5 Event
519
+ //History.debug('History.pushState: trigger popstate');
520
+ History.Adapter.trigger(window,'statechange');
521
+ History.busy(false);
522
+
523
+ // End pushState closure
524
+ return true;
525
+ };
526
+
527
+ /**
528
+ * History.replaceState(data,title,url)
529
+ * Replace the State and trigger onpopstate
530
+ * We have to trigger for HTML4 compatibility
531
+ * @param {object} data
532
+ * @param {string} title
533
+ * @param {string} url
534
+ * @return {true}
535
+ */
536
+ History.replaceState = function(data,title,url,queue){
537
+ //History.debug('History.replaceState: called', arguments);
538
+
539
+ // Check the State
540
+ if ( History.getHashByUrl(url) ) {
541
+ throw new Error('History.js does not support states with fragement-identifiers (hashes/anchors).');
542
+ }
543
+
544
+ // Handle Queueing
545
+ if ( queue !== false && History.busy() ) {
546
+ // Wait + Push to Queue
547
+ //History.debug('History.replaceState: we must wait', arguments);
548
+ History.pushQueue({
549
+ scope: History,
550
+ callback: History.replaceState,
551
+ args: arguments,
552
+ queue: queue
553
+ });
554
+ return false;
555
+ }
556
+
557
+ // Make Busy
558
+ History.busy(true);
559
+
560
+ // Fetch the State Objects
561
+ var
562
+ newState = History.createStateObject(data,title,url),
563
+ oldState = History.getState(false),
564
+ previousState = History.getStateByIndex(-2);
565
+
566
+ // Discard Old State
567
+ History.discardState(oldState,newState,previousState);
568
+
569
+ // Alias to PushState
570
+ History.pushState(newState.data,newState.title,newState.url,false);
571
+
572
+ // End replaceState closure
573
+ return true;
574
+ };
575
+
576
+ /**
577
+ * Create the initial State
578
+ */
579
+ History.saveState(History.storeState(History.createStateObject({},'',document.location.href)));
580
+
581
+ /**
582
+ * Ensure initial state is handled correctly
583
+ */
584
+ if ( History.getHash() && !History.emulated.hashChange ) {
585
+ History.Adapter.onDomLoad(function(){
586
+ History.Adapter.trigger(window,'hashchange');
587
+ });
588
+ }
589
+
590
+ } // History.emulated.pushState
591
+
592
+ }; // History.initHtml4
593
+
594
+ // Try and Initialise History
595
+ History.init();
689
596
 
690
597
  })(window);