repsheet_visualizer 0.2.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (504) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +8 -6
  4. data/lib/repsheet_visualizer/application/app.rb +51 -5
  5. data/lib/repsheet_visualizer/application/backend.rb +27 -0
  6. data/lib/repsheet_visualizer/application/public/fonts/FontAwesome.otf +0 -0
  7. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.eot +0 -0
  8. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.svg +414 -0
  9. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.ttf +0 -0
  10. data/lib/repsheet_visualizer/application/public/fonts/fontawesome-webfont.woff +0 -0
  11. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.eot +0 -0
  12. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.svg +228 -0
  13. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  14. data/lib/repsheet_visualizer/application/public/fonts/glyphicons-halflings-regular.woff +0 -0
  15. data/lib/repsheet_visualizer/application/public/img/jquery/handle-vertical.png +0 -0
  16. data/lib/repsheet_visualizer/application/public/img/jquery/handle.png +0 -0
  17. data/lib/repsheet_visualizer/application/public/img/layout/sidebar-bg.png +0 -0
  18. data/lib/repsheet_visualizer/application/public/img/loaders/ajax-loader.gif +0 -0
  19. data/lib/repsheet_visualizer/application/public/img/photos/map.png +0 -0
  20. data/lib/repsheet_visualizer/application/public/js/App.js +372 -0
  21. data/lib/repsheet_visualizer/application/public/js/Login.js +17 -0
  22. data/lib/repsheet_visualizer/application/public/js/demos/buttons.js +7 -0
  23. data/lib/repsheet_visualizer/application/public/js/demos/calendar.js +142 -0
  24. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/area.js +73 -0
  25. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart1.js +77 -0
  26. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart2.js +70 -0
  27. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart3.js +71 -0
  28. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/chart4.js +69 -0
  29. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/donut.js +49 -0
  30. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/horizontal.js +56 -0
  31. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/line.js +76 -0
  32. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/pie.js +50 -0
  33. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/scatter.js +62 -0
  34. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-area.js +86 -0
  35. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-horizontal.js +60 -0
  36. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/stacked-vertical.js +75 -0
  37. data/lib/repsheet_visualizer/application/public/js/demos/charts/flot/vertical.js +70 -0
  38. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/area.js +28 -0
  39. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/bar.js +29 -0
  40. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/donut.js +26 -0
  41. data/lib/repsheet_visualizer/application/public/js/demos/charts/morris/line.js +30 -0
  42. data/lib/repsheet_visualizer/application/public/js/demos/dashboard.js +26 -0
  43. data/lib/repsheet_visualizer/application/public/js/demos/form-extended.js +61 -0
  44. data/lib/repsheet_visualizer/application/public/js/demos/popups.js +16 -0
  45. data/lib/repsheet_visualizer/application/public/js/demos/pricing.js +10 -0
  46. data/lib/repsheet_visualizer/application/public/js/demos/sliders.js +77 -0
  47. data/lib/repsheet_visualizer/application/public/js/libs/bootstrap.js +1999 -0
  48. data/lib/repsheet_visualizer/application/public/js/libs/bootstrap.min.js +6 -0
  49. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  50. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  51. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  52. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  53. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  54. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  55. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  56. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  57. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  58. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  59. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  60. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  61. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  62. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  63. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css +294 -0
  64. data/lib/repsheet_visualizer/application/public/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css +7 -0
  65. data/lib/repsheet_visualizer/application/public/js/libs/jquery-1.9.1.min.js +5 -0
  66. data/lib/repsheet_visualizer/application/public/js/libs/jquery-ui-1.9.2.custom.min.js +6 -0
  67. data/lib/repsheet_visualizer/application/public/js/libs/jquery.min.map +1 -0
  68. data/lib/repsheet_visualizer/application/public/js/libs/raphael-2.1.2.min.js +11 -0
  69. data/lib/repsheet_visualizer/application/public/js/plugins/autosize/jquery.autosize.min.js +7 -0
  70. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/DT_bootstrap.js +148 -0
  71. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/Sorting icons.psd +0 -0
  72. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_disabled.png +0 -0
  73. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_enabled.png +0 -0
  74. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/back_enabled_hover.png +0 -0
  75. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/datatable-row-openclose.png +0 -0
  76. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/favicon.ico +0 -0
  77. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_disabled.png +0 -0
  78. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_enabled.png +0 -0
  79. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/forward_enabled_hover.png +0 -0
  80. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_asc.png +0 -0
  81. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_asc_disabled.png +0 -0
  82. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_both.png +0 -0
  83. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_desc.png +0 -0
  84. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/img/sort_desc_disabled.png +0 -0
  85. data/lib/repsheet_visualizer/application/public/js/plugins/datatables/jquery.dataTables.min.js +155 -0
  86. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/bootstrap-datepicker.js +1258 -0
  87. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/datepicker.css +481 -0
  88. data/lib/repsheet_visualizer/application/public/js/plugins/datepicker/less/datepicker.less +122 -0
  89. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.css +132 -0
  90. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.js +169 -0
  91. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.min.css +31 -0
  92. data/lib/repsheet_visualizer/application/public/js/plugins/fileupload/bootstrap-fileupload.min.js +7 -0
  93. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.js +2599 -0
  94. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.orderBars.js +186 -0
  95. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.pie.js +750 -0
  96. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.resize.js +57 -0
  97. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.stack.js +184 -0
  98. data/lib/repsheet_visualizer/application/public/js/plugins/flot/jquery.flot.tooltip.min.js +14 -0
  99. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.css +589 -0
  100. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.js +6110 -0
  101. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.min.js +7 -0
  102. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/fullcalendar.print.css +32 -0
  103. data/lib/repsheet_visualizer/application/public/js/plugins/fullcalendar/gcal.js +107 -0
  104. data/lib/repsheet_visualizer/application/public/js/plugins/howl/howl.js +70 -0
  105. data/lib/repsheet_visualizer/application/public/js/plugins/howl/howl.min.js +2 -0
  106. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/jquery.icheck.js +462 -0
  107. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/jquery.icheck.min.js +11 -0
  108. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/all.css +61 -0
  109. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/_all.css +540 -0
  110. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero.css +54 -0
  111. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero.png +0 -0
  112. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/aero@2x.png +0 -0
  113. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue.css +54 -0
  114. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue.png +0 -0
  115. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/blue@2x.png +0 -0
  116. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat.css +54 -0
  117. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat.png +0 -0
  118. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/flat@2x.png +0 -0
  119. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green.css +54 -0
  120. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green.png +0 -0
  121. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/green@2x.png +0 -0
  122. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey.css +54 -0
  123. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey.png +0 -0
  124. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/grey@2x.png +0 -0
  125. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange.css +54 -0
  126. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange.png +0 -0
  127. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/orange@2x.png +0 -0
  128. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink.css +54 -0
  129. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink.png +0 -0
  130. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/pink@2x.png +0 -0
  131. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple.css +54 -0
  132. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple.png +0 -0
  133. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/purple@2x.png +0 -0
  134. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red.css +54 -0
  135. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red.png +0 -0
  136. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/red@2x.png +0 -0
  137. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow.css +54 -0
  138. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow.png +0 -0
  139. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/flat/yellow@2x.png +0 -0
  140. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico.css +54 -0
  141. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico.png +0 -0
  142. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/futurico/futurico@2x.png +0 -0
  143. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/_all.css +740 -0
  144. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/aero.css +74 -0
  145. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/blue.css +74 -0
  146. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/green.css +74 -0
  147. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/grey.css +74 -0
  148. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line.css +74 -0
  149. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line.png +0 -0
  150. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/line@2x.png +0 -0
  151. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/orange.css +74 -0
  152. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/pink.css +74 -0
  153. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/purple.css +74 -0
  154. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/red.css +74 -0
  155. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/line/yellow.css +74 -0
  156. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/_all.css +600 -0
  157. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero.css +60 -0
  158. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero.png +0 -0
  159. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/aero@2x.png +0 -0
  160. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue.css +60 -0
  161. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue.png +0 -0
  162. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/blue@2x.png +0 -0
  163. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green.css +60 -0
  164. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green.png +0 -0
  165. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/green@2x.png +0 -0
  166. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey.css +60 -0
  167. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey.png +0 -0
  168. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/grey@2x.png +0 -0
  169. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal.css +60 -0
  170. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal.png +0 -0
  171. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/minimal@2x.png +0 -0
  172. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange.css +60 -0
  173. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange.png +0 -0
  174. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/orange@2x.png +0 -0
  175. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink.css +60 -0
  176. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink.png +0 -0
  177. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/pink@2x.png +0 -0
  178. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple.css +60 -0
  179. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple.png +0 -0
  180. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/purple@2x.png +0 -0
  181. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red.css +60 -0
  182. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red.png +0 -0
  183. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/red@2x.png +0 -0
  184. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow.css +60 -0
  185. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow.png +0 -0
  186. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/minimal/yellow@2x.png +0 -0
  187. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris.css +60 -0
  188. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris.png +0 -0
  189. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/polaris/polaris@2x.png +0 -0
  190. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/_all.css +600 -0
  191. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero.css +60 -0
  192. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero.png +0 -0
  193. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/aero@2x.png +0 -0
  194. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue.css +60 -0
  195. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue.png +0 -0
  196. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/blue@2x.png +0 -0
  197. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green.css +60 -0
  198. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green.png +0 -0
  199. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/green@2x.png +0 -0
  200. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey.css +60 -0
  201. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey.png +0 -0
  202. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/grey@2x.png +0 -0
  203. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange.css +60 -0
  204. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange.png +0 -0
  205. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/orange@2x.png +0 -0
  206. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink.css +60 -0
  207. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink.png +0 -0
  208. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/pink@2x.png +0 -0
  209. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple.css +60 -0
  210. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple.png +0 -0
  211. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/purple@2x.png +0 -0
  212. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red.css +60 -0
  213. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red.png +0 -0
  214. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/red@2x.png +0 -0
  215. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square.css +60 -0
  216. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square.png +0 -0
  217. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/square@2x.png +0 -0
  218. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow.css +60 -0
  219. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow.png +0 -0
  220. data/lib/repsheet_visualizer/application/public/js/plugins/icheck/skins/square/yellow@2x.png +0 -0
  221. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/jquery.magnific-popup.js +2026 -0
  222. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/jquery.magnific-popup.min.js +4 -0
  223. data/lib/repsheet_visualizer/application/public/js/plugins/magnific/magnific-popup.css +396 -0
  224. data/lib/repsheet_visualizer/application/public/js/plugins/morris/morris.css +1 -0
  225. data/lib/repsheet_visualizer/application/public/js/plugins/morris/morris.min.js +1 -0
  226. data/lib/repsheet_visualizer/application/public/js/plugins/parsley/parsley.js +1363 -0
  227. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2-spinner.gif +0 -0
  228. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.css +615 -0
  229. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.js +3217 -0
  230. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.min.js +22 -0
  231. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2.png +0 -0
  232. data/lib/repsheet_visualizer/application/public/js/plugins/select2/select2x2.png +0 -0
  233. data/lib/repsheet_visualizer/application/public/js/plugins/simplecolorpicker/jquery.simplecolorpicker.css +98 -0
  234. data/lib/repsheet_visualizer/application/public/js/plugins/simplecolorpicker/jquery.simplecolorpicker.js +211 -0
  235. data/lib/repsheet_visualizer/application/public/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  236. data/lib/repsheet_visualizer/application/public/js/plugins/tableCheckable/jquery.tableCheckable.js +122 -0
  237. data/lib/repsheet_visualizer/application/public/js/plugins/textarea-counter/jquery.textarea-counter.js +163 -0
  238. data/lib/repsheet_visualizer/application/public/js/plugins/timepicker/bootstrap-timepicker.css +121 -0
  239. data/lib/repsheet_visualizer/application/public/js/plugins/timepicker/bootstrap-timepicker.js +893 -0
  240. data/lib/repsheet_visualizer/application/public/stylesheets/App.css +3436 -0
  241. data/lib/repsheet_visualizer/application/public/stylesheets/Login.css +88 -0
  242. data/lib/repsheet_visualizer/application/public/stylesheets/bootstrap.min.css +9 -0
  243. data/lib/repsheet_visualizer/application/public/stylesheets/custom.css +0 -0
  244. data/lib/repsheet_visualizer/application/public/stylesheets/font-awesome.min.css +395 -0
  245. data/lib/repsheet_visualizer/application/views/actor.erb +169 -0
  246. data/lib/repsheet_visualizer/application/views/blacklist.erb +105 -0
  247. data/lib/repsheet_visualizer/application/views/index.erb +188 -0
  248. data/lib/repsheet_visualizer/application/views/layout.erb +73 -0
  249. data/lib/repsheet_visualizer/application/views/suspects.erb +105 -0
  250. data/lib/repsheet_visualizer/application/views/whitelist.erb +90 -78
  251. data/lib/repsheet_visualizer/application/views/worldview.erb +84 -78
  252. data/lib/repsheet_visualizer/version.rb +1 -1
  253. data/redesign/404.html +446 -0
  254. data/redesign/500.html +453 -0
  255. data/redesign/actor.html +237 -0
  256. data/redesign/blacklist.html +274 -0
  257. data/redesign/css/App.css +3436 -0
  258. data/redesign/css/Login.css +88 -0
  259. data/redesign/css/bootstrap.min.css +9 -0
  260. data/redesign/css/custom.css +0 -0
  261. data/redesign/css/font-awesome.min.css +395 -0
  262. data/redesign/fonts/FontAwesome.otf +0 -0
  263. data/redesign/fonts/fontawesome-webfont.eot +0 -0
  264. data/redesign/fonts/fontawesome-webfont.svg +414 -0
  265. data/redesign/fonts/fontawesome-webfont.ttf +0 -0
  266. data/redesign/fonts/fontawesome-webfont.woff +0 -0
  267. data/redesign/fonts/glyphicons-halflings-regular.eot +0 -0
  268. data/redesign/fonts/glyphicons-halflings-regular.svg +228 -0
  269. data/redesign/fonts/glyphicons-halflings-regular.ttf +0 -0
  270. data/redesign/fonts/glyphicons-halflings-regular.woff +0 -0
  271. data/redesign/img/jquery/handle-vertical.png +0 -0
  272. data/redesign/img/jquery/handle.png +0 -0
  273. data/redesign/img/layout/sidebar-bg.png +0 -0
  274. data/redesign/img/loaders/ajax-loader.gif +0 -0
  275. data/redesign/img/photos/map.png +0 -0
  276. data/redesign/index.html +333 -0
  277. data/redesign/js/App.js +372 -0
  278. data/redesign/js/Login.js +17 -0
  279. data/redesign/js/demos/buttons.js +7 -0
  280. data/redesign/js/demos/calendar.js +142 -0
  281. data/redesign/js/demos/charts/flot/area.js +73 -0
  282. data/redesign/js/demos/charts/flot/chart1.js +77 -0
  283. data/redesign/js/demos/charts/flot/chart2.js +70 -0
  284. data/redesign/js/demos/charts/flot/chart3.js +71 -0
  285. data/redesign/js/demos/charts/flot/chart4.js +69 -0
  286. data/redesign/js/demos/charts/flot/donut.js +49 -0
  287. data/redesign/js/demos/charts/flot/horizontal.js +56 -0
  288. data/redesign/js/demos/charts/flot/line.js +76 -0
  289. data/redesign/js/demos/charts/flot/pie.js +50 -0
  290. data/redesign/js/demos/charts/flot/scatter.js +62 -0
  291. data/redesign/js/demos/charts/flot/stacked-area.js +86 -0
  292. data/redesign/js/demos/charts/flot/stacked-horizontal.js +60 -0
  293. data/redesign/js/demos/charts/flot/stacked-vertical.js +75 -0
  294. data/redesign/js/demos/charts/flot/vertical.js +70 -0
  295. data/redesign/js/demos/charts/morris/area.js +28 -0
  296. data/redesign/js/demos/charts/morris/bar.js +29 -0
  297. data/redesign/js/demos/charts/morris/donut.js +26 -0
  298. data/redesign/js/demos/charts/morris/line.js +30 -0
  299. data/redesign/js/demos/dashboard.js +26 -0
  300. data/redesign/js/demos/form-extended.js +61 -0
  301. data/redesign/js/demos/popups.js +16 -0
  302. data/redesign/js/demos/pricing.js +10 -0
  303. data/redesign/js/demos/sliders.js +77 -0
  304. data/redesign/js/libs/bootstrap.js +1999 -0
  305. data/redesign/js/libs/bootstrap.min.js +6 -0
  306. data/redesign/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  307. data/redesign/js/libs/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  308. data/redesign/js/libs/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  309. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  310. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  311. data/redesign/js/libs/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  312. data/redesign/js/libs/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  313. data/redesign/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  314. data/redesign/js/libs/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  315. data/redesign/js/libs/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  316. data/redesign/js/libs/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  317. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  318. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  319. data/redesign/js/libs/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  320. data/redesign/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css +294 -0
  321. data/redesign/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css +7 -0
  322. data/redesign/js/libs/jquery-1.9.1.min.js +5 -0
  323. data/redesign/js/libs/jquery-ui-1.9.2.custom.min.js +6 -0
  324. data/redesign/js/libs/jquery.min.map +1 -0
  325. data/redesign/js/libs/raphael-2.1.2.min.js +11 -0
  326. data/redesign/js/plugins/autosize/jquery.autosize.min.js +7 -0
  327. data/redesign/js/plugins/datatables/DT_bootstrap.js +148 -0
  328. data/redesign/js/plugins/datatables/img/Sorting icons.psd +0 -0
  329. data/redesign/js/plugins/datatables/img/back_disabled.png +0 -0
  330. data/redesign/js/plugins/datatables/img/back_enabled.png +0 -0
  331. data/redesign/js/plugins/datatables/img/back_enabled_hover.png +0 -0
  332. data/redesign/js/plugins/datatables/img/datatable-row-openclose.png +0 -0
  333. data/redesign/js/plugins/datatables/img/favicon.ico +0 -0
  334. data/redesign/js/plugins/datatables/img/forward_disabled.png +0 -0
  335. data/redesign/js/plugins/datatables/img/forward_enabled.png +0 -0
  336. data/redesign/js/plugins/datatables/img/forward_enabled_hover.png +0 -0
  337. data/redesign/js/plugins/datatables/img/sort_asc.png +0 -0
  338. data/redesign/js/plugins/datatables/img/sort_asc_disabled.png +0 -0
  339. data/redesign/js/plugins/datatables/img/sort_both.png +0 -0
  340. data/redesign/js/plugins/datatables/img/sort_desc.png +0 -0
  341. data/redesign/js/plugins/datatables/img/sort_desc_disabled.png +0 -0
  342. data/redesign/js/plugins/datatables/jquery.dataTables.min.js +155 -0
  343. data/redesign/js/plugins/datepicker/bootstrap-datepicker.js +1258 -0
  344. data/redesign/js/plugins/datepicker/datepicker.css +481 -0
  345. data/redesign/js/plugins/datepicker/less/datepicker.less +122 -0
  346. data/redesign/js/plugins/fileupload/bootstrap-fileupload.css +132 -0
  347. data/redesign/js/plugins/fileupload/bootstrap-fileupload.js +169 -0
  348. data/redesign/js/plugins/fileupload/bootstrap-fileupload.min.css +31 -0
  349. data/redesign/js/plugins/fileupload/bootstrap-fileupload.min.js +7 -0
  350. data/redesign/js/plugins/flot/jquery.flot.js +2599 -0
  351. data/redesign/js/plugins/flot/jquery.flot.orderBars.js +186 -0
  352. data/redesign/js/plugins/flot/jquery.flot.pie.js +750 -0
  353. data/redesign/js/plugins/flot/jquery.flot.resize.js +57 -0
  354. data/redesign/js/plugins/flot/jquery.flot.stack.js +184 -0
  355. data/redesign/js/plugins/flot/jquery.flot.tooltip.min.js +14 -0
  356. data/redesign/js/plugins/fullcalendar/fullcalendar.css +589 -0
  357. data/redesign/js/plugins/fullcalendar/fullcalendar.js +6110 -0
  358. data/redesign/js/plugins/fullcalendar/fullcalendar.min.js +7 -0
  359. data/redesign/js/plugins/fullcalendar/fullcalendar.print.css +32 -0
  360. data/redesign/js/plugins/fullcalendar/gcal.js +107 -0
  361. data/redesign/js/plugins/howl/howl.js +70 -0
  362. data/redesign/js/plugins/howl/howl.min.js +2 -0
  363. data/redesign/js/plugins/icheck/jquery.icheck.js +462 -0
  364. data/redesign/js/plugins/icheck/jquery.icheck.min.js +11 -0
  365. data/redesign/js/plugins/icheck/skins/all.css +61 -0
  366. data/redesign/js/plugins/icheck/skins/flat/_all.css +540 -0
  367. data/redesign/js/plugins/icheck/skins/flat/aero.css +54 -0
  368. data/redesign/js/plugins/icheck/skins/flat/aero.png +0 -0
  369. data/redesign/js/plugins/icheck/skins/flat/aero@2x.png +0 -0
  370. data/redesign/js/plugins/icheck/skins/flat/blue.css +54 -0
  371. data/redesign/js/plugins/icheck/skins/flat/blue.png +0 -0
  372. data/redesign/js/plugins/icheck/skins/flat/blue@2x.png +0 -0
  373. data/redesign/js/plugins/icheck/skins/flat/flat.css +54 -0
  374. data/redesign/js/plugins/icheck/skins/flat/flat.png +0 -0
  375. data/redesign/js/plugins/icheck/skins/flat/flat@2x.png +0 -0
  376. data/redesign/js/plugins/icheck/skins/flat/green.css +54 -0
  377. data/redesign/js/plugins/icheck/skins/flat/green.png +0 -0
  378. data/redesign/js/plugins/icheck/skins/flat/green@2x.png +0 -0
  379. data/redesign/js/plugins/icheck/skins/flat/grey.css +54 -0
  380. data/redesign/js/plugins/icheck/skins/flat/grey.png +0 -0
  381. data/redesign/js/plugins/icheck/skins/flat/grey@2x.png +0 -0
  382. data/redesign/js/plugins/icheck/skins/flat/orange.css +54 -0
  383. data/redesign/js/plugins/icheck/skins/flat/orange.png +0 -0
  384. data/redesign/js/plugins/icheck/skins/flat/orange@2x.png +0 -0
  385. data/redesign/js/plugins/icheck/skins/flat/pink.css +54 -0
  386. data/redesign/js/plugins/icheck/skins/flat/pink.png +0 -0
  387. data/redesign/js/plugins/icheck/skins/flat/pink@2x.png +0 -0
  388. data/redesign/js/plugins/icheck/skins/flat/purple.css +54 -0
  389. data/redesign/js/plugins/icheck/skins/flat/purple.png +0 -0
  390. data/redesign/js/plugins/icheck/skins/flat/purple@2x.png +0 -0
  391. data/redesign/js/plugins/icheck/skins/flat/red.css +54 -0
  392. data/redesign/js/plugins/icheck/skins/flat/red.png +0 -0
  393. data/redesign/js/plugins/icheck/skins/flat/red@2x.png +0 -0
  394. data/redesign/js/plugins/icheck/skins/flat/yellow.css +54 -0
  395. data/redesign/js/plugins/icheck/skins/flat/yellow.png +0 -0
  396. data/redesign/js/plugins/icheck/skins/flat/yellow@2x.png +0 -0
  397. data/redesign/js/plugins/icheck/skins/futurico/futurico.css +54 -0
  398. data/redesign/js/plugins/icheck/skins/futurico/futurico.png +0 -0
  399. data/redesign/js/plugins/icheck/skins/futurico/futurico@2x.png +0 -0
  400. data/redesign/js/plugins/icheck/skins/line/_all.css +740 -0
  401. data/redesign/js/plugins/icheck/skins/line/aero.css +74 -0
  402. data/redesign/js/plugins/icheck/skins/line/blue.css +74 -0
  403. data/redesign/js/plugins/icheck/skins/line/green.css +74 -0
  404. data/redesign/js/plugins/icheck/skins/line/grey.css +74 -0
  405. data/redesign/js/plugins/icheck/skins/line/line.css +74 -0
  406. data/redesign/js/plugins/icheck/skins/line/line.png +0 -0
  407. data/redesign/js/plugins/icheck/skins/line/line@2x.png +0 -0
  408. data/redesign/js/plugins/icheck/skins/line/orange.css +74 -0
  409. data/redesign/js/plugins/icheck/skins/line/pink.css +74 -0
  410. data/redesign/js/plugins/icheck/skins/line/purple.css +74 -0
  411. data/redesign/js/plugins/icheck/skins/line/red.css +74 -0
  412. data/redesign/js/plugins/icheck/skins/line/yellow.css +74 -0
  413. data/redesign/js/plugins/icheck/skins/minimal/_all.css +600 -0
  414. data/redesign/js/plugins/icheck/skins/minimal/aero.css +60 -0
  415. data/redesign/js/plugins/icheck/skins/minimal/aero.png +0 -0
  416. data/redesign/js/plugins/icheck/skins/minimal/aero@2x.png +0 -0
  417. data/redesign/js/plugins/icheck/skins/minimal/blue.css +60 -0
  418. data/redesign/js/plugins/icheck/skins/minimal/blue.png +0 -0
  419. data/redesign/js/plugins/icheck/skins/minimal/blue@2x.png +0 -0
  420. data/redesign/js/plugins/icheck/skins/minimal/green.css +60 -0
  421. data/redesign/js/plugins/icheck/skins/minimal/green.png +0 -0
  422. data/redesign/js/plugins/icheck/skins/minimal/green@2x.png +0 -0
  423. data/redesign/js/plugins/icheck/skins/minimal/grey.css +60 -0
  424. data/redesign/js/plugins/icheck/skins/minimal/grey.png +0 -0
  425. data/redesign/js/plugins/icheck/skins/minimal/grey@2x.png +0 -0
  426. data/redesign/js/plugins/icheck/skins/minimal/minimal.css +60 -0
  427. data/redesign/js/plugins/icheck/skins/minimal/minimal.png +0 -0
  428. data/redesign/js/plugins/icheck/skins/minimal/minimal@2x.png +0 -0
  429. data/redesign/js/plugins/icheck/skins/minimal/orange.css +60 -0
  430. data/redesign/js/plugins/icheck/skins/minimal/orange.png +0 -0
  431. data/redesign/js/plugins/icheck/skins/minimal/orange@2x.png +0 -0
  432. data/redesign/js/plugins/icheck/skins/minimal/pink.css +60 -0
  433. data/redesign/js/plugins/icheck/skins/minimal/pink.png +0 -0
  434. data/redesign/js/plugins/icheck/skins/minimal/pink@2x.png +0 -0
  435. data/redesign/js/plugins/icheck/skins/minimal/purple.css +60 -0
  436. data/redesign/js/plugins/icheck/skins/minimal/purple.png +0 -0
  437. data/redesign/js/plugins/icheck/skins/minimal/purple@2x.png +0 -0
  438. data/redesign/js/plugins/icheck/skins/minimal/red.css +60 -0
  439. data/redesign/js/plugins/icheck/skins/minimal/red.png +0 -0
  440. data/redesign/js/plugins/icheck/skins/minimal/red@2x.png +0 -0
  441. data/redesign/js/plugins/icheck/skins/minimal/yellow.css +60 -0
  442. data/redesign/js/plugins/icheck/skins/minimal/yellow.png +0 -0
  443. data/redesign/js/plugins/icheck/skins/minimal/yellow@2x.png +0 -0
  444. data/redesign/js/plugins/icheck/skins/polaris/polaris.css +60 -0
  445. data/redesign/js/plugins/icheck/skins/polaris/polaris.png +0 -0
  446. data/redesign/js/plugins/icheck/skins/polaris/polaris@2x.png +0 -0
  447. data/redesign/js/plugins/icheck/skins/square/_all.css +600 -0
  448. data/redesign/js/plugins/icheck/skins/square/aero.css +60 -0
  449. data/redesign/js/plugins/icheck/skins/square/aero.png +0 -0
  450. data/redesign/js/plugins/icheck/skins/square/aero@2x.png +0 -0
  451. data/redesign/js/plugins/icheck/skins/square/blue.css +60 -0
  452. data/redesign/js/plugins/icheck/skins/square/blue.png +0 -0
  453. data/redesign/js/plugins/icheck/skins/square/blue@2x.png +0 -0
  454. data/redesign/js/plugins/icheck/skins/square/green.css +60 -0
  455. data/redesign/js/plugins/icheck/skins/square/green.png +0 -0
  456. data/redesign/js/plugins/icheck/skins/square/green@2x.png +0 -0
  457. data/redesign/js/plugins/icheck/skins/square/grey.css +60 -0
  458. data/redesign/js/plugins/icheck/skins/square/grey.png +0 -0
  459. data/redesign/js/plugins/icheck/skins/square/grey@2x.png +0 -0
  460. data/redesign/js/plugins/icheck/skins/square/orange.css +60 -0
  461. data/redesign/js/plugins/icheck/skins/square/orange.png +0 -0
  462. data/redesign/js/plugins/icheck/skins/square/orange@2x.png +0 -0
  463. data/redesign/js/plugins/icheck/skins/square/pink.css +60 -0
  464. data/redesign/js/plugins/icheck/skins/square/pink.png +0 -0
  465. data/redesign/js/plugins/icheck/skins/square/pink@2x.png +0 -0
  466. data/redesign/js/plugins/icheck/skins/square/purple.css +60 -0
  467. data/redesign/js/plugins/icheck/skins/square/purple.png +0 -0
  468. data/redesign/js/plugins/icheck/skins/square/purple@2x.png +0 -0
  469. data/redesign/js/plugins/icheck/skins/square/red.css +60 -0
  470. data/redesign/js/plugins/icheck/skins/square/red.png +0 -0
  471. data/redesign/js/plugins/icheck/skins/square/red@2x.png +0 -0
  472. data/redesign/js/plugins/icheck/skins/square/square.css +60 -0
  473. data/redesign/js/plugins/icheck/skins/square/square.png +0 -0
  474. data/redesign/js/plugins/icheck/skins/square/square@2x.png +0 -0
  475. data/redesign/js/plugins/icheck/skins/square/yellow.css +60 -0
  476. data/redesign/js/plugins/icheck/skins/square/yellow.png +0 -0
  477. data/redesign/js/plugins/icheck/skins/square/yellow@2x.png +0 -0
  478. data/redesign/js/plugins/magnific/jquery.magnific-popup.js +2026 -0
  479. data/redesign/js/plugins/magnific/jquery.magnific-popup.min.js +4 -0
  480. data/redesign/js/plugins/magnific/magnific-popup.css +396 -0
  481. data/redesign/js/plugins/morris/morris.css +1 -0
  482. data/redesign/js/plugins/morris/morris.min.js +1 -0
  483. data/redesign/js/plugins/parsley/parsley.js +1363 -0
  484. data/redesign/js/plugins/select2/select2-spinner.gif +0 -0
  485. data/redesign/js/plugins/select2/select2.css +615 -0
  486. data/redesign/js/plugins/select2/select2.js +3217 -0
  487. data/redesign/js/plugins/select2/select2.min.js +22 -0
  488. data/redesign/js/plugins/select2/select2.png +0 -0
  489. data/redesign/js/plugins/select2/select2x2.png +0 -0
  490. data/redesign/js/plugins/simplecolorpicker/jquery.simplecolorpicker.css +98 -0
  491. data/redesign/js/plugins/simplecolorpicker/jquery.simplecolorpicker.js +211 -0
  492. data/redesign/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  493. data/redesign/js/plugins/tableCheckable/jquery.tableCheckable.js +122 -0
  494. data/redesign/js/plugins/textarea-counter/jquery.textarea-counter.js +163 -0
  495. data/redesign/js/plugins/timepicker/bootstrap-timepicker.css +121 -0
  496. data/redesign/js/plugins/timepicker/bootstrap-timepicker.js +893 -0
  497. data/redesign/page-blank.html +417 -0
  498. data/redesign/suspects.html +273 -0
  499. data/redesign/whitelist.html +273 -0
  500. data/repsheet_visualizer.gemspec +1 -0
  501. data/script/fill +2 -0
  502. metadata +508 -5
  503. data/lib/repsheet_visualizer/application/views/activity.erb +0 -74
  504. data/lib/repsheet_visualizer/application/views/actors.erb +0 -130
@@ -0,0 +1,60 @@
1
+ /* iCheck plugin Square skin, red
2
+ ----------------------------------- */
3
+ .icheckbox_square-red,
4
+ .iradio_square-red {
5
+ display: block;
6
+ margin: 0;
7
+ padding: 0;
8
+ width: 22px;
9
+ height: 22px;
10
+ background: url(red.png) no-repeat;
11
+ border: none;
12
+ cursor: pointer;
13
+ }
14
+
15
+ .icheckbox_square-red {
16
+ background-position: 0 0;
17
+ }
18
+ .icheckbox_square-red.hover {
19
+ background-position: -24px 0;
20
+ }
21
+ .icheckbox_square-red.checked {
22
+ background-position: -48px 0;
23
+ }
24
+ .icheckbox_square-red.disabled {
25
+ background-position: -72px 0;
26
+ cursor: default;
27
+ }
28
+ .icheckbox_square-red.checked.disabled {
29
+ background-position: -96px 0;
30
+ }
31
+
32
+ .iradio_square-red {
33
+ background-position: -120px 0;
34
+ }
35
+ .iradio_square-red.hover {
36
+ background-position: -144px 0;
37
+ }
38
+ .iradio_square-red.checked {
39
+ background-position: -168px 0;
40
+ }
41
+ .iradio_square-red.disabled {
42
+ background-position: -192px 0;
43
+ cursor: default;
44
+ }
45
+ .iradio_square-red.checked.disabled {
46
+ background-position: -216px 0;
47
+ }
48
+
49
+ /* Retina support */
50
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
51
+ only screen and (-moz-min-device-pixel-ratio: 1.5),
52
+ only screen and (-o-min-device-pixel-ratio: 3/2),
53
+ only screen and (min-device-pixel-ratio: 1.5) {
54
+ .icheckbox_square-red,
55
+ .iradio_square-red {
56
+ background-image: url(red@2x.png);
57
+ -webkit-background-size: 240px 24px;
58
+ background-size: 240px 24px;
59
+ }
60
+ }
@@ -0,0 +1,60 @@
1
+ /* iCheck plugin Square skin, black
2
+ ----------------------------------- */
3
+ .icheckbox_square,
4
+ .iradio_square {
5
+ display: block;
6
+ margin: 0;
7
+ padding: 0;
8
+ width: 22px;
9
+ height: 22px;
10
+ background: url(square.png) no-repeat;
11
+ border: none;
12
+ cursor: pointer;
13
+ }
14
+
15
+ .icheckbox_square {
16
+ background-position: 0 0;
17
+ }
18
+ .icheckbox_square.hover {
19
+ background-position: -24px 0;
20
+ }
21
+ .icheckbox_square.checked {
22
+ background-position: -48px 0;
23
+ }
24
+ .icheckbox_square.disabled {
25
+ background-position: -72px 0;
26
+ cursor: default;
27
+ }
28
+ .icheckbox_square.checked.disabled {
29
+ background-position: -96px 0;
30
+ }
31
+
32
+ .iradio_square {
33
+ background-position: -120px 0;
34
+ }
35
+ .iradio_square.hover {
36
+ background-position: -144px 0;
37
+ }
38
+ .iradio_square.checked {
39
+ background-position: -168px 0;
40
+ }
41
+ .iradio_square.disabled {
42
+ background-position: -192px 0;
43
+ cursor: default;
44
+ }
45
+ .iradio_square.checked.disabled {
46
+ background-position: -216px 0;
47
+ }
48
+
49
+ /* Retina support */
50
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
51
+ only screen and (-moz-min-device-pixel-ratio: 1.5),
52
+ only screen and (-o-min-device-pixel-ratio: 3/2),
53
+ only screen and (min-device-pixel-ratio: 1.5) {
54
+ .icheckbox_square,
55
+ .iradio_square {
56
+ background-image: url(square@2x.png);
57
+ -webkit-background-size: 240px 24px;
58
+ background-size: 240px 24px;
59
+ }
60
+ }
@@ -0,0 +1,60 @@
1
+ /* iCheck plugin Square skin, yellow
2
+ ----------------------------------- */
3
+ .icheckbox_square-yellow,
4
+ .iradio_square-yellow {
5
+ display: block;
6
+ margin: 0;
7
+ padding: 0;
8
+ width: 22px;
9
+ height: 22px;
10
+ background: url(yellow.png) no-repeat;
11
+ border: none;
12
+ cursor: pointer;
13
+ }
14
+
15
+ .icheckbox_square-yellow {
16
+ background-position: 0 0;
17
+ }
18
+ .icheckbox_square-yellow.hover {
19
+ background-position: -24px 0;
20
+ }
21
+ .icheckbox_square-yellow.checked {
22
+ background-position: -48px 0;
23
+ }
24
+ .icheckbox_square-yellow.disabled {
25
+ background-position: -72px 0;
26
+ cursor: default;
27
+ }
28
+ .icheckbox_square-yellow.checked.disabled {
29
+ background-position: -96px 0;
30
+ }
31
+
32
+ .iradio_square-yellow {
33
+ background-position: -120px 0;
34
+ }
35
+ .iradio_square-yellow.hover {
36
+ background-position: -144px 0;
37
+ }
38
+ .iradio_square-yellow.checked {
39
+ background-position: -168px 0;
40
+ }
41
+ .iradio_square-yellow.disabled {
42
+ background-position: -192px 0;
43
+ cursor: default;
44
+ }
45
+ .iradio_square-yellow.checked.disabled {
46
+ background-position: -216px 0;
47
+ }
48
+
49
+ /* Retina support */
50
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
51
+ only screen and (-moz-min-device-pixel-ratio: 1.5),
52
+ only screen and (-o-min-device-pixel-ratio: 3/2),
53
+ only screen and (min-device-pixel-ratio: 1.5) {
54
+ .icheckbox_square-yellow,
55
+ .iradio_square-yellow {
56
+ background-image: url(yellow@2x.png);
57
+ -webkit-background-size: 240px 24px;
58
+ background-size: 240px 24px;
59
+ }
60
+ }
@@ -0,0 +1,2026 @@
1
+ /*! Magnific Popup - v0.9.5 - 2013-08-21
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2013 Dmitry Semenov; */
4
+ ;(function($) {
5
+
6
+ /*>>core*/
7
+ /**
8
+ *
9
+ * Magnific Popup Core JS file
10
+ *
11
+ */
12
+
13
+
14
+ /**
15
+ * Private static constants
16
+ */
17
+ var CLOSE_EVENT = 'Close',
18
+ BEFORE_CLOSE_EVENT = 'BeforeClose',
19
+ AFTER_CLOSE_EVENT = 'AfterClose',
20
+ BEFORE_APPEND_EVENT = 'BeforeAppend',
21
+ MARKUP_PARSE_EVENT = 'MarkupParse',
22
+ OPEN_EVENT = 'Open',
23
+ CHANGE_EVENT = 'Change',
24
+ NS = 'mfp',
25
+ EVENT_NS = '.' + NS,
26
+ READY_CLASS = 'mfp-ready',
27
+ REMOVING_CLASS = 'mfp-removing',
28
+ PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
29
+
30
+
31
+ /**
32
+ * Private vars
33
+ */
34
+ var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
35
+ MagnificPopup = function(){},
36
+ _isJQ = !!(window.jQuery),
37
+ _prevStatus,
38
+ _window = $(window),
39
+ _body,
40
+ _document,
41
+ _prevContentType,
42
+ _wrapClasses,
43
+ _currPopupType;
44
+
45
+
46
+ /**
47
+ * Private functions
48
+ */
49
+ var _mfpOn = function(name, f) {
50
+ mfp.ev.on(NS + name + EVENT_NS, f);
51
+ },
52
+ _getEl = function(className, appendTo, html, raw) {
53
+ var el = document.createElement('div');
54
+ el.className = 'mfp-'+className;
55
+ if(html) {
56
+ el.innerHTML = html;
57
+ }
58
+ if(!raw) {
59
+ el = $(el);
60
+ if(appendTo) {
61
+ el.appendTo(appendTo);
62
+ }
63
+ } else if(appendTo) {
64
+ appendTo.appendChild(el);
65
+ }
66
+ return el;
67
+ },
68
+ _mfpTrigger = function(e, data) {
69
+ mfp.ev.triggerHandler(NS + e, data);
70
+
71
+ if(mfp.st.callbacks) {
72
+ // converts "mfpEventName" to "eventName" callback and triggers it if it's present
73
+ e = e.charAt(0).toLowerCase() + e.slice(1);
74
+ if(mfp.st.callbacks[e]) {
75
+ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
76
+ }
77
+ }
78
+ },
79
+ _setFocus = function() {
80
+ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
81
+ },
82
+ _getCloseBtn = function(type) {
83
+ if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
84
+ mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
85
+ _currPopupType = type;
86
+ }
87
+ return mfp.currTemplate.closeBtn;
88
+ },
89
+ // Initialize Magnific Popup only when called at least once
90
+ _checkInstance = function() {
91
+ if(!$.magnificPopup.instance) {
92
+ mfp = new MagnificPopup();
93
+ mfp.init();
94
+ $.magnificPopup.instance = mfp;
95
+ }
96
+ },
97
+ // Check to close popup or not
98
+ // "target" is an element that was clicked
99
+ _checkIfClose = function(target) {
100
+
101
+ if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
102
+ return;
103
+ }
104
+
105
+ var closeOnContent = mfp.st.closeOnContentClick;
106
+ var closeOnBg = mfp.st.closeOnBgClick;
107
+
108
+ if(closeOnContent && closeOnBg) {
109
+ return true;
110
+ } else {
111
+
112
+ // We close the popup if click is on close button or on preloader. Or if there is no content.
113
+ if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
114
+ return true;
115
+ }
116
+
117
+ // if click is outside the content
118
+ if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
119
+ if(closeOnBg) {
120
+ // last check, if the clicked element is in DOM, (in case it's removed onclick)
121
+ if( $.contains(document, target) ) {
122
+ return true;
123
+ }
124
+ }
125
+ } else if(closeOnContent) {
126
+ return true;
127
+ }
128
+
129
+ }
130
+ return false;
131
+ },
132
+ // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
133
+ supportsTransitions = function() {
134
+ var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
135
+ v = ['ms','O','Moz','Webkit']; // 'v' for vendor
136
+
137
+ if( s['transition'] !== undefined ) {
138
+ return true;
139
+ }
140
+
141
+ while( v.length ) {
142
+ if( v.pop() + 'Transition' in s ) {
143
+ return true;
144
+ }
145
+ }
146
+
147
+ return false;
148
+ };
149
+
150
+
151
+
152
+ /**
153
+ * Public functions
154
+ */
155
+ MagnificPopup.prototype = {
156
+
157
+ constructor: MagnificPopup,
158
+
159
+ /**
160
+ * Initializes Magnific Popup plugin.
161
+ * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
162
+ */
163
+ init: function() {
164
+ var appVersion = navigator.appVersion;
165
+ mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1;
166
+ mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1;
167
+ mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
168
+ mfp.isAndroid = (/android/gi).test(appVersion);
169
+ mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
170
+ mfp.supportsTransition = supportsTransitions();
171
+
172
+ // We disable fixed positioned lightbox on devices that don't handle it nicely.
173
+ // If you know a better way of detecting this - let me know.
174
+ mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
175
+ _body = $(document.body);
176
+ _document = $(document);
177
+
178
+ mfp.popupsCache = {};
179
+ },
180
+
181
+ /**
182
+ * Opens popup
183
+ * @param data [description]
184
+ */
185
+ open: function(data) {
186
+
187
+ var i;
188
+
189
+ if(data.isObj === false) {
190
+ // convert jQuery collection to array to avoid conflicts later
191
+ mfp.items = data.items.toArray();
192
+
193
+ mfp.index = 0;
194
+ var items = data.items,
195
+ item;
196
+ for(i = 0; i < items.length; i++) {
197
+ item = items[i];
198
+ if(item.parsed) {
199
+ item = item.el[0];
200
+ }
201
+ if(item === data.el[0]) {
202
+ mfp.index = i;
203
+ break;
204
+ }
205
+ }
206
+ } else {
207
+ mfp.items = $.isArray(data.items) ? data.items : [data.items];
208
+ mfp.index = data.index || 0;
209
+ }
210
+
211
+ // if popup is already opened - we just update the content
212
+ if(mfp.isOpen) {
213
+ mfp.updateItemHTML();
214
+ return;
215
+ }
216
+
217
+ mfp.types = [];
218
+ _wrapClasses = '';
219
+ if(data.mainEl && data.mainEl.length) {
220
+ mfp.ev = data.mainEl.eq(0);
221
+ } else {
222
+ mfp.ev = _document;
223
+ }
224
+
225
+ if(data.key) {
226
+ if(!mfp.popupsCache[data.key]) {
227
+ mfp.popupsCache[data.key] = {};
228
+ }
229
+ mfp.currTemplate = mfp.popupsCache[data.key];
230
+ } else {
231
+ mfp.currTemplate = {};
232
+ }
233
+
234
+
235
+
236
+ mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
237
+ mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
238
+
239
+ if(mfp.st.modal) {
240
+ mfp.st.closeOnContentClick = false;
241
+ mfp.st.closeOnBgClick = false;
242
+ mfp.st.showCloseBtn = false;
243
+ mfp.st.enableEscapeKey = false;
244
+ }
245
+
246
+
247
+ // Building markup
248
+ // main containers are created only once
249
+ if(!mfp.bgOverlay) {
250
+
251
+ // Dark overlay
252
+ mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
253
+ mfp.close();
254
+ });
255
+
256
+ mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
257
+ if(_checkIfClose(e.target)) {
258
+ mfp.close();
259
+ }
260
+ });
261
+
262
+ mfp.container = _getEl('container', mfp.wrap);
263
+ }
264
+
265
+ mfp.contentContainer = _getEl('content');
266
+ if(mfp.st.preloader) {
267
+ mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
268
+ }
269
+
270
+
271
+ // Initializing modules
272
+ var modules = $.magnificPopup.modules;
273
+ for(i = 0; i < modules.length; i++) {
274
+ var n = modules[i];
275
+ n = n.charAt(0).toUpperCase() + n.slice(1);
276
+ mfp['init'+n].call(mfp);
277
+ }
278
+ _mfpTrigger('BeforeOpen');
279
+
280
+
281
+ if(mfp.st.showCloseBtn) {
282
+ // Close button
283
+ if(!mfp.st.closeBtnInside) {
284
+ mfp.wrap.append( _getCloseBtn() );
285
+ } else {
286
+ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
287
+ values.close_replaceWith = _getCloseBtn(item.type);
288
+ });
289
+ _wrapClasses += ' mfp-close-btn-in';
290
+ }
291
+ }
292
+
293
+ if(mfp.st.alignTop) {
294
+ _wrapClasses += ' mfp-align-top';
295
+ }
296
+
297
+
298
+
299
+ if(mfp.fixedContentPos) {
300
+ mfp.wrap.css({
301
+ overflow: mfp.st.overflowY,
302
+ overflowX: 'hidden',
303
+ overflowY: mfp.st.overflowY
304
+ });
305
+ } else {
306
+ mfp.wrap.css({
307
+ top: _window.scrollTop(),
308
+ position: 'absolute'
309
+ });
310
+ }
311
+ if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
312
+ mfp.bgOverlay.css({
313
+ height: _document.height(),
314
+ position: 'absolute'
315
+ });
316
+ }
317
+
318
+
319
+
320
+ if(mfp.st.enableEscapeKey) {
321
+ // Close on ESC key
322
+ _document.on('keyup' + EVENT_NS, function(e) {
323
+ if(e.keyCode === 27) {
324
+ mfp.close();
325
+ }
326
+ });
327
+ }
328
+
329
+ _window.on('resize' + EVENT_NS, function() {
330
+ mfp.updateSize();
331
+ });
332
+
333
+
334
+ if(!mfp.st.closeOnContentClick) {
335
+ _wrapClasses += ' mfp-auto-cursor';
336
+ }
337
+
338
+ if(_wrapClasses)
339
+ mfp.wrap.addClass(_wrapClasses);
340
+
341
+
342
+ // this triggers recalculation of layout, so we get it once to not to trigger twice
343
+ var windowHeight = mfp.wH = _window.height();
344
+
345
+
346
+ var windowStyles = {};
347
+
348
+ if( mfp.fixedContentPos ) {
349
+ if(mfp._hasScrollBar(windowHeight)){
350
+ var s = mfp._getScrollbarSize();
351
+ if(s) {
352
+ windowStyles.paddingRight = s;
353
+ }
354
+ }
355
+ }
356
+
357
+ if(mfp.fixedContentPos) {
358
+ if(!mfp.isIE7) {
359
+ windowStyles.overflow = 'hidden';
360
+ } else {
361
+ // ie7 double-scroll bug
362
+ $('body, html').css('overflow', 'hidden');
363
+ }
364
+ }
365
+
366
+
367
+
368
+ var classesToadd = mfp.st.mainClass;
369
+ if(mfp.isIE7) {
370
+ classesToadd += ' mfp-ie7';
371
+ }
372
+ if(classesToadd) {
373
+ mfp._addClassToMFP( classesToadd );
374
+ }
375
+
376
+ // add content
377
+ mfp.updateItemHTML();
378
+
379
+ _mfpTrigger('BuildControls');
380
+
381
+
382
+ // remove scrollbar, add padding e.t.c
383
+ $('html').css(windowStyles);
384
+
385
+ // add everything to DOM
386
+ mfp.bgOverlay.add(mfp.wrap).prependTo( document.body );
387
+
388
+
389
+
390
+ // Save last focused element
391
+ mfp._lastFocusedEl = document.activeElement;
392
+
393
+ // Wait for next cycle to allow CSS transition
394
+ setTimeout(function() {
395
+
396
+ if(mfp.content) {
397
+ mfp._addClassToMFP(READY_CLASS);
398
+ _setFocus();
399
+ } else {
400
+ // if content is not defined (not loaded e.t.c) we add class only for BG
401
+ mfp.bgOverlay.addClass(READY_CLASS);
402
+ }
403
+
404
+ // Trap the focus in popup
405
+ _document.on('focusin' + EVENT_NS, function (e) {
406
+ if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
407
+ _setFocus();
408
+ return false;
409
+ }
410
+ });
411
+
412
+ }, 16);
413
+
414
+ mfp.isOpen = true;
415
+ mfp.updateSize(windowHeight);
416
+ _mfpTrigger(OPEN_EVENT);
417
+ },
418
+
419
+ /**
420
+ * Closes the popup
421
+ */
422
+ close: function() {
423
+ if(!mfp.isOpen) return;
424
+ _mfpTrigger(BEFORE_CLOSE_EVENT);
425
+
426
+ mfp.isOpen = false;
427
+ // for CSS3 animation
428
+ if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
429
+ mfp._addClassToMFP(REMOVING_CLASS);
430
+ setTimeout(function() {
431
+ mfp._close();
432
+ }, mfp.st.removalDelay);
433
+ } else {
434
+ mfp._close();
435
+ }
436
+ },
437
+
438
+ /**
439
+ * Helper for close() function
440
+ */
441
+ _close: function() {
442
+ _mfpTrigger(CLOSE_EVENT);
443
+
444
+ var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
445
+
446
+ mfp.bgOverlay.detach();
447
+ mfp.wrap.detach();
448
+ mfp.container.empty();
449
+
450
+ if(mfp.st.mainClass) {
451
+ classesToRemove += mfp.st.mainClass + ' ';
452
+ }
453
+
454
+ mfp._removeClassFromMFP(classesToRemove);
455
+
456
+ if(mfp.fixedContentPos) {
457
+ var windowStyles = {paddingRight: ''};
458
+ if(mfp.isIE7) {
459
+ $('body, html').css('overflow', '');
460
+ } else {
461
+ windowStyles.overflow = '';
462
+ }
463
+ $('html').css(windowStyles);
464
+ }
465
+
466
+ _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
467
+ mfp.ev.off(EVENT_NS);
468
+
469
+ // clean up DOM elements that aren't removed
470
+ mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
471
+ mfp.bgOverlay.attr('class', 'mfp-bg');
472
+ mfp.container.attr('class', 'mfp-container');
473
+
474
+ // remove close button from target element
475
+ if(mfp.st.showCloseBtn &&
476
+ (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
477
+ if(mfp.currTemplate.closeBtn)
478
+ mfp.currTemplate.closeBtn.detach();
479
+ }
480
+
481
+
482
+ if(mfp._lastFocusedEl) {
483
+ $(mfp._lastFocusedEl).focus(); // put tab focus back
484
+ }
485
+ mfp.currItem = null;
486
+ mfp.content = null;
487
+ mfp.currTemplate = null;
488
+ mfp.prevHeight = 0;
489
+
490
+ _mfpTrigger(AFTER_CLOSE_EVENT);
491
+ },
492
+
493
+ updateSize: function(winHeight) {
494
+
495
+ if(mfp.isIOS) {
496
+ // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
497
+ var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
498
+ var height = window.innerHeight * zoomLevel;
499
+ mfp.wrap.css('height', height);
500
+ mfp.wH = height;
501
+ } else {
502
+ mfp.wH = winHeight || _window.height();
503
+ }
504
+ // Fixes #84: popup incorrectly positioned with position:relative on body
505
+ if(!mfp.fixedContentPos) {
506
+ mfp.wrap.css('height', mfp.wH);
507
+ }
508
+
509
+ _mfpTrigger('Resize');
510
+
511
+ },
512
+
513
+ /**
514
+ * Set content of popup based on current index
515
+ */
516
+ updateItemHTML: function() {
517
+ var item = mfp.items[mfp.index];
518
+
519
+ // Detach and perform modifications
520
+ mfp.contentContainer.detach();
521
+
522
+ if(mfp.content)
523
+ mfp.content.detach();
524
+
525
+ if(!item.parsed) {
526
+ item = mfp.parseEl( mfp.index );
527
+ }
528
+
529
+ var type = item.type;
530
+
531
+ _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
532
+ // BeforeChange event works like so:
533
+ // _mfpOn('BeforeChange', function(e, prevType, newType) { });
534
+
535
+ mfp.currItem = item;
536
+
537
+
538
+
539
+
540
+
541
+ if(!mfp.currTemplate[type]) {
542
+ var markup = mfp.st[type] ? mfp.st[type].markup : false;
543
+
544
+ // allows to modify markup
545
+ _mfpTrigger('FirstMarkupParse', markup);
546
+
547
+ if(markup) {
548
+ mfp.currTemplate[type] = $(markup);
549
+ } else {
550
+ // if there is no markup found we just define that template is parsed
551
+ mfp.currTemplate[type] = true;
552
+ }
553
+ }
554
+
555
+ if(_prevContentType && _prevContentType !== item.type) {
556
+ mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
557
+ }
558
+
559
+ var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
560
+ mfp.appendContent(newContent, type);
561
+
562
+ item.preloaded = true;
563
+
564
+ _mfpTrigger(CHANGE_EVENT, item);
565
+ _prevContentType = item.type;
566
+
567
+ // Append container back after its content changed
568
+ mfp.container.prepend(mfp.contentContainer);
569
+
570
+ _mfpTrigger('AfterChange');
571
+ },
572
+
573
+
574
+ /**
575
+ * Set HTML content of popup
576
+ */
577
+ appendContent: function(newContent, type) {
578
+ mfp.content = newContent;
579
+
580
+ if(newContent) {
581
+ if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
582
+ mfp.currTemplate[type] === true) {
583
+ // if there is no markup, we just append close button element inside
584
+ if(!mfp.content.find('.mfp-close').length) {
585
+ mfp.content.append(_getCloseBtn());
586
+ }
587
+ } else {
588
+ mfp.content = newContent;
589
+ }
590
+ } else {
591
+ mfp.content = '';
592
+ }
593
+
594
+ _mfpTrigger(BEFORE_APPEND_EVENT);
595
+ mfp.container.addClass('mfp-'+type+'-holder');
596
+
597
+ mfp.contentContainer.append(mfp.content);
598
+ },
599
+
600
+
601
+
602
+
603
+ /**
604
+ * Creates Magnific Popup data object based on given data
605
+ * @param {int} index Index of item to parse
606
+ */
607
+ parseEl: function(index) {
608
+ var item = mfp.items[index],
609
+ type = item.type;
610
+
611
+ if(item.tagName) {
612
+ item = { el: $(item) };
613
+ } else {
614
+ item = { data: item, src: item.src };
615
+ }
616
+
617
+ if(item.el) {
618
+ var types = mfp.types;
619
+
620
+ // check for 'mfp-TYPE' class
621
+ for(var i = 0; i < types.length; i++) {
622
+ if( item.el.hasClass('mfp-'+types[i]) ) {
623
+ type = types[i];
624
+ break;
625
+ }
626
+ }
627
+
628
+ item.src = item.el.attr('data-mfp-src');
629
+ if(!item.src) {
630
+ item.src = item.el.attr('href');
631
+ }
632
+ }
633
+
634
+ item.type = type || mfp.st.type || 'inline';
635
+ item.index = index;
636
+ item.parsed = true;
637
+ mfp.items[index] = item;
638
+ _mfpTrigger('ElementParse', item);
639
+
640
+ return mfp.items[index];
641
+ },
642
+
643
+
644
+ /**
645
+ * Initializes single popup or a group of popups
646
+ */
647
+ addGroup: function(el, options) {
648
+ var eHandler = function(e) {
649
+ e.mfpEl = this;
650
+ mfp._openClick(e, el, options);
651
+ };
652
+
653
+ if(!options) {
654
+ options = {};
655
+ }
656
+
657
+ var eName = 'click.magnificPopup';
658
+ options.mainEl = el;
659
+
660
+ if(options.items) {
661
+ options.isObj = true;
662
+ el.off(eName).on(eName, eHandler);
663
+ } else {
664
+ options.isObj = false;
665
+ if(options.delegate) {
666
+ el.off(eName).on(eName, options.delegate , eHandler);
667
+ } else {
668
+ options.items = el;
669
+ el.off(eName).on(eName, eHandler);
670
+ }
671
+ }
672
+ },
673
+ _openClick: function(e, el, options) {
674
+ var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
675
+
676
+
677
+ if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
678
+ return;
679
+ }
680
+
681
+ var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
682
+
683
+ if(disableOn) {
684
+ if($.isFunction(disableOn)) {
685
+ if( !disableOn.call(mfp) ) {
686
+ return true;
687
+ }
688
+ } else { // else it's number
689
+ if( _window.width() < disableOn ) {
690
+ return true;
691
+ }
692
+ }
693
+ }
694
+
695
+ if(e.type) {
696
+ e.preventDefault();
697
+
698
+ // This will prevent popup from closing if element is inside and popup is already opened
699
+ if(mfp.isOpen) {
700
+ e.stopPropagation();
701
+ }
702
+ }
703
+
704
+
705
+ options.el = $(e.mfpEl);
706
+ if(options.delegate) {
707
+ options.items = el.find(options.delegate);
708
+ }
709
+ mfp.open(options);
710
+ },
711
+
712
+
713
+ /**
714
+ * Updates text on preloader
715
+ */
716
+ updateStatus: function(status, text) {
717
+
718
+ if(mfp.preloader) {
719
+ if(_prevStatus !== status) {
720
+ mfp.container.removeClass('mfp-s-'+_prevStatus);
721
+ }
722
+
723
+ if(!text && status === 'loading') {
724
+ text = mfp.st.tLoading;
725
+ }
726
+
727
+ var data = {
728
+ status: status,
729
+ text: text
730
+ };
731
+ // allows to modify status
732
+ _mfpTrigger('UpdateStatus', data);
733
+
734
+ status = data.status;
735
+ text = data.text;
736
+
737
+ mfp.preloader.html(text);
738
+
739
+ mfp.preloader.find('a').on('click', function(e) {
740
+ e.stopImmediatePropagation();
741
+ });
742
+
743
+ mfp.container.addClass('mfp-s-'+status);
744
+ _prevStatus = status;
745
+ }
746
+ },
747
+
748
+
749
+ /*
750
+ "Private" helpers that aren't private at all
751
+ */
752
+ _addClassToMFP: function(cName) {
753
+ mfp.bgOverlay.addClass(cName);
754
+ mfp.wrap.addClass(cName);
755
+ },
756
+ _removeClassFromMFP: function(cName) {
757
+ this.bgOverlay.removeClass(cName);
758
+ mfp.wrap.removeClass(cName);
759
+ },
760
+ _hasScrollBar: function(winHeight) {
761
+ return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
762
+ },
763
+ _parseMarkup: function(template, values, item) {
764
+ var arr;
765
+ if(item.data) {
766
+ values = $.extend(item.data, values);
767
+ }
768
+ _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
769
+
770
+ $.each(values, function(key, value) {
771
+ if(value === undefined || value === false) {
772
+ return true;
773
+ }
774
+ arr = key.split('_');
775
+ if(arr.length > 1) {
776
+ var el = template.find(EVENT_NS + '-'+arr[0]);
777
+
778
+ if(el.length > 0) {
779
+ var attr = arr[1];
780
+ if(attr === 'replaceWith') {
781
+ if(el[0] !== value[0]) {
782
+ el.replaceWith(value);
783
+ }
784
+ } else if(attr === 'img') {
785
+ if(el.is('img')) {
786
+ el.attr('src', value);
787
+ } else {
788
+ el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
789
+ }
790
+ } else {
791
+ el.attr(arr[1], value);
792
+ }
793
+ }
794
+
795
+ } else {
796
+ template.find(EVENT_NS + '-'+key).html(value);
797
+ }
798
+ });
799
+ },
800
+
801
+ _getScrollbarSize: function() {
802
+ // thx David
803
+ if(mfp.scrollbarSize === undefined) {
804
+ var scrollDiv = document.createElement("div");
805
+ scrollDiv.id = "mfp-sbm";
806
+ scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
807
+ document.body.appendChild(scrollDiv);
808
+ mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
809
+ document.body.removeChild(scrollDiv);
810
+ }
811
+ return mfp.scrollbarSize;
812
+ }
813
+
814
+ }; /* MagnificPopup core prototype end */
815
+
816
+
817
+
818
+
819
+ /**
820
+ * Public static functions
821
+ */
822
+ $.magnificPopup = {
823
+ instance: null,
824
+ proto: MagnificPopup.prototype,
825
+ modules: [],
826
+
827
+ open: function(options, index) {
828
+ _checkInstance();
829
+
830
+ if(!options)
831
+ options = {};
832
+
833
+ options.isObj = true;
834
+ options.index = index || 0;
835
+ return this.instance.open(options);
836
+ },
837
+
838
+ close: function() {
839
+ return $.magnificPopup.instance.close();
840
+ },
841
+
842
+ registerModule: function(name, module) {
843
+ if(module.options) {
844
+ $.magnificPopup.defaults[name] = module.options;
845
+ }
846
+ $.extend(this.proto, module.proto);
847
+ this.modules.push(name);
848
+ },
849
+
850
+ defaults: {
851
+
852
+ // Info about options is in docs:
853
+ // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
854
+
855
+ disableOn: 0,
856
+
857
+ key: null,
858
+
859
+ midClick: false,
860
+
861
+ mainClass: '',
862
+
863
+ preloader: true,
864
+
865
+ focus: '', // CSS selector of input to focus after popup is opened
866
+
867
+ closeOnContentClick: false,
868
+
869
+ closeOnBgClick: true,
870
+
871
+ closeBtnInside: true,
872
+
873
+ showCloseBtn: true,
874
+
875
+ enableEscapeKey: true,
876
+
877
+ modal: false,
878
+
879
+ alignTop: false,
880
+
881
+ removalDelay: 0,
882
+
883
+ fixedContentPos: 'auto',
884
+
885
+ fixedBgPos: 'auto',
886
+
887
+ overflowY: 'auto',
888
+
889
+ closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
890
+
891
+ tClose: 'Close (Esc)',
892
+
893
+ tLoading: 'Loading...'
894
+
895
+ }
896
+ };
897
+
898
+
899
+
900
+ $.fn.magnificPopup = function(options) {
901
+ _checkInstance();
902
+
903
+ var jqEl = $(this);
904
+
905
+ // We call some API method of first param is a string
906
+ if (typeof options === "string" ) {
907
+
908
+ if(options === 'open') {
909
+ var items,
910
+ itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
911
+ index = parseInt(arguments[1], 10) || 0;
912
+
913
+ if(itemOpts.items) {
914
+ items = itemOpts.items[index];
915
+ } else {
916
+ items = jqEl;
917
+ if(itemOpts.delegate) {
918
+ items = items.find(itemOpts.delegate);
919
+ }
920
+ items = items.eq( index );
921
+ }
922
+ mfp._openClick({mfpEl:items}, jqEl, itemOpts);
923
+ } else {
924
+ if(mfp.isOpen)
925
+ mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
926
+ }
927
+
928
+ } else {
929
+
930
+ /*
931
+ * As Zepto doesn't support .data() method for objects
932
+ * and it works only in normal browsers
933
+ * we assign "options" object directly to the DOM element. FTW!
934
+ */
935
+ if(_isJQ) {
936
+ jqEl.data('magnificPopup', options);
937
+ } else {
938
+ jqEl[0].magnificPopup = options;
939
+ }
940
+
941
+ mfp.addGroup(jqEl, options);
942
+
943
+ }
944
+ return jqEl;
945
+ };
946
+
947
+
948
+ //Quick benchmark
949
+ /*
950
+ var start = performance.now(),
951
+ i,
952
+ rounds = 1000;
953
+
954
+ for(i = 0; i < rounds; i++) {
955
+
956
+ }
957
+ console.log('Test #1:', performance.now() - start);
958
+
959
+ start = performance.now();
960
+ for(i = 0; i < rounds; i++) {
961
+
962
+ }
963
+ console.log('Test #2:', performance.now() - start);
964
+ */
965
+
966
+
967
+ /*>>core*/
968
+
969
+ /*>>inline*/
970
+
971
+ var INLINE_NS = 'inline',
972
+ _hiddenClass,
973
+ _inlinePlaceholder,
974
+ _lastInlineElement,
975
+ _putInlineElementsBack = function() {
976
+ if(_lastInlineElement) {
977
+ _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
978
+ _lastInlineElement = null;
979
+ }
980
+ };
981
+
982
+ $.magnificPopup.registerModule(INLINE_NS, {
983
+ options: {
984
+ hiddenClass: 'hide', // will be appended with `mfp-` prefix
985
+ markup: '',
986
+ tNotFound: 'Content not found'
987
+ },
988
+ proto: {
989
+
990
+ initInline: function() {
991
+ mfp.types.push(INLINE_NS);
992
+
993
+ _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
994
+ _putInlineElementsBack();
995
+ });
996
+ },
997
+
998
+ getInline: function(item, template) {
999
+
1000
+ _putInlineElementsBack();
1001
+
1002
+ if(item.src) {
1003
+ var inlineSt = mfp.st.inline,
1004
+ el = $(item.src);
1005
+
1006
+ if(el.length) {
1007
+
1008
+ // If target element has parent - we replace it with placeholder and put it back after popup is closed
1009
+ var parent = el[0].parentNode;
1010
+ if(parent && parent.tagName) {
1011
+ if(!_inlinePlaceholder) {
1012
+ _hiddenClass = inlineSt.hiddenClass;
1013
+ _inlinePlaceholder = _getEl(_hiddenClass);
1014
+ _hiddenClass = 'mfp-'+_hiddenClass;
1015
+ }
1016
+ // replace target inline element with placeholder
1017
+ _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1018
+ }
1019
+
1020
+ mfp.updateStatus('ready');
1021
+ } else {
1022
+ mfp.updateStatus('error', inlineSt.tNotFound);
1023
+ el = $('<div>');
1024
+ }
1025
+
1026
+ item.inlineElement = el;
1027
+ return el;
1028
+ }
1029
+
1030
+ mfp.updateStatus('ready');
1031
+ mfp._parseMarkup(template, {}, item);
1032
+ return template;
1033
+ }
1034
+ }
1035
+ });
1036
+
1037
+ /*>>inline*/
1038
+
1039
+ /*>>ajax*/
1040
+ var AJAX_NS = 'ajax',
1041
+ _ajaxCur,
1042
+ _removeAjaxCursor = function() {
1043
+ if(_ajaxCur) {
1044
+ _body.removeClass(_ajaxCur);
1045
+ }
1046
+ };
1047
+
1048
+ $.magnificPopup.registerModule(AJAX_NS, {
1049
+
1050
+ options: {
1051
+ settings: null,
1052
+ cursor: 'mfp-ajax-cur',
1053
+ tError: '<a href="%url%">The content</a> could not be loaded.'
1054
+ },
1055
+
1056
+ proto: {
1057
+ initAjax: function() {
1058
+ mfp.types.push(AJAX_NS);
1059
+ _ajaxCur = mfp.st.ajax.cursor;
1060
+
1061
+ _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, function() {
1062
+ _removeAjaxCursor();
1063
+ if(mfp.req) {
1064
+ mfp.req.abort();
1065
+ }
1066
+ });
1067
+ },
1068
+
1069
+ getAjax: function(item) {
1070
+
1071
+ if(_ajaxCur)
1072
+ _body.addClass(_ajaxCur);
1073
+
1074
+ mfp.updateStatus('loading');
1075
+
1076
+ var opts = $.extend({
1077
+ url: item.src,
1078
+ success: function(data, textStatus, jqXHR) {
1079
+ var temp = {
1080
+ data:data,
1081
+ xhr:jqXHR
1082
+ };
1083
+
1084
+ _mfpTrigger('ParseAjax', temp);
1085
+
1086
+ mfp.appendContent( $(temp.data), AJAX_NS );
1087
+
1088
+ item.finished = true;
1089
+
1090
+ _removeAjaxCursor();
1091
+
1092
+ _setFocus();
1093
+
1094
+ setTimeout(function() {
1095
+ mfp.wrap.addClass(READY_CLASS);
1096
+ }, 16);
1097
+
1098
+ mfp.updateStatus('ready');
1099
+
1100
+ _mfpTrigger('AjaxContentAdded');
1101
+ },
1102
+ error: function() {
1103
+ _removeAjaxCursor();
1104
+ item.finished = item.loadError = true;
1105
+ mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1106
+ }
1107
+ }, mfp.st.ajax.settings);
1108
+
1109
+ mfp.req = $.ajax(opts);
1110
+
1111
+ return '';
1112
+ }
1113
+ }
1114
+ });
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+ /*>>ajax*/
1123
+
1124
+ /*>>image*/
1125
+ var _imgInterval,
1126
+ _getTitle = function(item) {
1127
+ if(item.data && item.data.title !== undefined)
1128
+ return item.data.title;
1129
+
1130
+ var src = mfp.st.image.titleSrc;
1131
+
1132
+ if(src) {
1133
+ if($.isFunction(src)) {
1134
+ return src.call(mfp, item);
1135
+ } else if(item.el) {
1136
+ return item.el.attr(src) || '';
1137
+ }
1138
+ }
1139
+ return '';
1140
+ };
1141
+
1142
+ $.magnificPopup.registerModule('image', {
1143
+
1144
+ options: {
1145
+ markup: '<div class="mfp-figure">'+
1146
+ '<div class="mfp-close"></div>'+
1147
+ '<div class="mfp-img"></div>'+
1148
+ '<div class="mfp-bottom-bar">'+
1149
+ '<div class="mfp-title"></div>'+
1150
+ '<div class="mfp-counter"></div>'+
1151
+ '</div>'+
1152
+ '</div>',
1153
+ cursor: 'mfp-zoom-out-cur',
1154
+ titleSrc: 'title',
1155
+ verticalFit: true,
1156
+ tError: '<a href="%url%">The image</a> could not be loaded.'
1157
+ },
1158
+
1159
+ proto: {
1160
+ initImage: function() {
1161
+ var imgSt = mfp.st.image,
1162
+ ns = '.image';
1163
+
1164
+ mfp.types.push('image');
1165
+
1166
+ _mfpOn(OPEN_EVENT+ns, function() {
1167
+ if(mfp.currItem.type === 'image' && imgSt.cursor) {
1168
+ _body.addClass(imgSt.cursor);
1169
+ }
1170
+ });
1171
+
1172
+ _mfpOn(CLOSE_EVENT+ns, function() {
1173
+ if(imgSt.cursor) {
1174
+ _body.removeClass(imgSt.cursor);
1175
+ }
1176
+ _window.off('resize' + EVENT_NS);
1177
+ });
1178
+
1179
+ _mfpOn('Resize'+ns, mfp.resizeImage);
1180
+ if(mfp.isLowIE) {
1181
+ _mfpOn('AfterChange', mfp.resizeImage);
1182
+ }
1183
+ },
1184
+ resizeImage: function() {
1185
+ var item = mfp.currItem;
1186
+ if(!item || !item.img) return;
1187
+
1188
+ if(mfp.st.image.verticalFit) {
1189
+ var decr = 0;
1190
+ // fix box-sizing in ie7/8
1191
+ if(mfp.isLowIE) {
1192
+ decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1193
+ }
1194
+ item.img.css('max-height', mfp.wH-decr);
1195
+ }
1196
+ },
1197
+ _onImageHasSize: function(item) {
1198
+ if(item.img) {
1199
+
1200
+ item.hasSize = true;
1201
+
1202
+ if(_imgInterval) {
1203
+ clearInterval(_imgInterval);
1204
+ }
1205
+
1206
+ item.isCheckingImgSize = false;
1207
+
1208
+ _mfpTrigger('ImageHasSize', item);
1209
+
1210
+ if(item.imgHidden) {
1211
+ if(mfp.content)
1212
+ mfp.content.removeClass('mfp-loading');
1213
+
1214
+ item.imgHidden = false;
1215
+ }
1216
+
1217
+ }
1218
+ },
1219
+
1220
+ /**
1221
+ * Function that loops until the image has size to display elements that rely on it asap
1222
+ */
1223
+ findImageSize: function(item) {
1224
+
1225
+ var counter = 0,
1226
+ img = item.img[0],
1227
+ mfpSetInterval = function(delay) {
1228
+
1229
+ if(_imgInterval) {
1230
+ clearInterval(_imgInterval);
1231
+ }
1232
+ // decelerating interval that checks for size of an image
1233
+ _imgInterval = setInterval(function() {
1234
+ if(img.naturalWidth > 0) {
1235
+ mfp._onImageHasSize(item);
1236
+ return;
1237
+ }
1238
+
1239
+ if(counter > 200) {
1240
+ clearInterval(_imgInterval);
1241
+ }
1242
+
1243
+ counter++;
1244
+ if(counter === 3) {
1245
+ mfpSetInterval(10);
1246
+ } else if(counter === 40) {
1247
+ mfpSetInterval(50);
1248
+ } else if(counter === 100) {
1249
+ mfpSetInterval(500);
1250
+ }
1251
+ }, delay);
1252
+ };
1253
+
1254
+ mfpSetInterval(1);
1255
+ },
1256
+
1257
+ getImage: function(item, template) {
1258
+
1259
+ var guard = 0,
1260
+
1261
+ // image load complete handler
1262
+ onLoadComplete = function() {
1263
+ if(item) {
1264
+ if (item.img[0].complete) {
1265
+ item.img.off('.mfploader');
1266
+
1267
+ if(item === mfp.currItem){
1268
+ mfp._onImageHasSize(item);
1269
+
1270
+ mfp.updateStatus('ready');
1271
+ }
1272
+
1273
+ item.hasSize = true;
1274
+ item.loaded = true;
1275
+
1276
+ _mfpTrigger('ImageLoadComplete');
1277
+
1278
+ }
1279
+ else {
1280
+ // if image complete check fails 200 times (20 sec), we assume that there was an error.
1281
+ guard++;
1282
+ if(guard < 200) {
1283
+ setTimeout(onLoadComplete,100);
1284
+ } else {
1285
+ onLoadError();
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+
1291
+ // image error handler
1292
+ onLoadError = function() {
1293
+ if(item) {
1294
+ item.img.off('.mfploader');
1295
+ if(item === mfp.currItem){
1296
+ mfp._onImageHasSize(item);
1297
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1298
+ }
1299
+
1300
+ item.hasSize = true;
1301
+ item.loaded = true;
1302
+ item.loadError = true;
1303
+ }
1304
+ },
1305
+ imgSt = mfp.st.image;
1306
+
1307
+
1308
+ var el = template.find('.mfp-img');
1309
+ if(el.length) {
1310
+ var img = document.createElement('img');
1311
+ img.className = 'mfp-img';
1312
+ item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1313
+ img.src = item.src;
1314
+
1315
+ // without clone() "error" event is not firing when IMG is replaced by new IMG
1316
+ // TODO: find a way to avoid such cloning
1317
+ if(el.is('img')) {
1318
+ item.img = item.img.clone();
1319
+ }
1320
+ if(item.img[0].naturalWidth > 0) {
1321
+ item.hasSize = true;
1322
+ }
1323
+ }
1324
+
1325
+ mfp._parseMarkup(template, {
1326
+ title: _getTitle(item),
1327
+ img_replaceWith: item.img
1328
+ }, item);
1329
+
1330
+ mfp.resizeImage();
1331
+
1332
+ if(item.hasSize) {
1333
+ if(_imgInterval) clearInterval(_imgInterval);
1334
+
1335
+ if(item.loadError) {
1336
+ template.addClass('mfp-loading');
1337
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1338
+ } else {
1339
+ template.removeClass('mfp-loading');
1340
+ mfp.updateStatus('ready');
1341
+ }
1342
+ return template;
1343
+ }
1344
+
1345
+ mfp.updateStatus('loading');
1346
+ item.loading = true;
1347
+
1348
+ if(!item.hasSize) {
1349
+ item.imgHidden = true;
1350
+ template.addClass('mfp-loading');
1351
+ mfp.findImageSize(item);
1352
+ }
1353
+
1354
+ return template;
1355
+ }
1356
+ }
1357
+ });
1358
+
1359
+
1360
+
1361
+ /*>>image*/
1362
+
1363
+ /*>>zoom*/
1364
+ var hasMozTransform,
1365
+ getHasMozTransform = function() {
1366
+ if(hasMozTransform === undefined) {
1367
+ hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1368
+ }
1369
+ return hasMozTransform;
1370
+ };
1371
+
1372
+ $.magnificPopup.registerModule('zoom', {
1373
+
1374
+ options: {
1375
+ enabled: false,
1376
+ easing: 'ease-in-out',
1377
+ duration: 300,
1378
+ opener: function(element) {
1379
+ return element.is('img') ? element : element.find('img');
1380
+ }
1381
+ },
1382
+
1383
+ proto: {
1384
+
1385
+ initZoom: function() {
1386
+ var zoomSt = mfp.st.zoom,
1387
+ ns = '.zoom';
1388
+
1389
+ if(!zoomSt.enabled || !mfp.supportsTransition) {
1390
+ return;
1391
+ }
1392
+
1393
+ var duration = zoomSt.duration,
1394
+ getElToAnimate = function(image) {
1395
+ var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1396
+ transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1397
+ cssObj = {
1398
+ position: 'fixed',
1399
+ zIndex: 9999,
1400
+ left: 0,
1401
+ top: 0,
1402
+ '-webkit-backface-visibility': 'hidden'
1403
+ },
1404
+ t = 'transition';
1405
+
1406
+ cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1407
+
1408
+ newImg.css(cssObj);
1409
+ return newImg;
1410
+ },
1411
+ showMainContent = function() {
1412
+ mfp.content.css('visibility', 'visible');
1413
+ },
1414
+ openTimeout,
1415
+ animatedImg;
1416
+
1417
+ _mfpOn('BuildControls'+ns, function() {
1418
+ if(mfp._allowZoom()) {
1419
+
1420
+ clearTimeout(openTimeout);
1421
+ mfp.content.css('visibility', 'hidden');
1422
+
1423
+ // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1424
+
1425
+ image = mfp._getItemToZoom();
1426
+
1427
+ if(!image) {
1428
+ showMainContent();
1429
+ return;
1430
+ }
1431
+
1432
+ animatedImg = getElToAnimate(image);
1433
+
1434
+ animatedImg.css( mfp._getOffset() );
1435
+
1436
+ mfp.wrap.append(animatedImg);
1437
+
1438
+ openTimeout = setTimeout(function() {
1439
+ animatedImg.css( mfp._getOffset( true ) );
1440
+ openTimeout = setTimeout(function() {
1441
+
1442
+ showMainContent();
1443
+
1444
+ setTimeout(function() {
1445
+ animatedImg.remove();
1446
+ image = animatedImg = null;
1447
+ _mfpTrigger('ZoomAnimationEnded');
1448
+ }, 16); // avoid blink when switching images
1449
+
1450
+ }, duration); // this timeout equals animation duration
1451
+
1452
+ }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
1453
+
1454
+
1455
+ // Lots of timeouts...
1456
+ }
1457
+ });
1458
+ _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
1459
+ if(mfp._allowZoom()) {
1460
+
1461
+ clearTimeout(openTimeout);
1462
+
1463
+ mfp.st.removalDelay = duration;
1464
+
1465
+ if(!image) {
1466
+ image = mfp._getItemToZoom();
1467
+ if(!image) {
1468
+ return;
1469
+ }
1470
+ animatedImg = getElToAnimate(image);
1471
+ }
1472
+
1473
+
1474
+ animatedImg.css( mfp._getOffset(true) );
1475
+ mfp.wrap.append(animatedImg);
1476
+ mfp.content.css('visibility', 'hidden');
1477
+
1478
+ setTimeout(function() {
1479
+ animatedImg.css( mfp._getOffset() );
1480
+ }, 16);
1481
+ }
1482
+
1483
+ });
1484
+
1485
+ _mfpOn(CLOSE_EVENT+ns, function() {
1486
+ if(mfp._allowZoom()) {
1487
+ showMainContent();
1488
+ if(animatedImg) {
1489
+ animatedImg.remove();
1490
+ }
1491
+ }
1492
+ });
1493
+ },
1494
+
1495
+ _allowZoom: function() {
1496
+ return mfp.currItem.type === 'image';
1497
+ },
1498
+
1499
+ _getItemToZoom: function() {
1500
+ if(mfp.currItem.hasSize) {
1501
+ return mfp.currItem.img;
1502
+ } else {
1503
+ return false;
1504
+ }
1505
+ },
1506
+
1507
+ // Get element postion relative to viewport
1508
+ _getOffset: function(isLarge) {
1509
+ var el;
1510
+ if(isLarge) {
1511
+ el = mfp.currItem.img;
1512
+ } else {
1513
+ el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
1514
+ }
1515
+
1516
+ var offset = el.offset();
1517
+ var paddingTop = parseInt(el.css('padding-top'),10);
1518
+ var paddingBottom = parseInt(el.css('padding-bottom'),10);
1519
+ offset.top -= ( $(window).scrollTop() - paddingTop );
1520
+
1521
+
1522
+ /*
1523
+
1524
+ Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
1525
+
1526
+ */
1527
+ var obj = {
1528
+ width: el.width(),
1529
+ // fix Zepto height+padding issue
1530
+ height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
1531
+ };
1532
+
1533
+ // I hate to do this, but there is no another option
1534
+ if( getHasMozTransform() ) {
1535
+ obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
1536
+ } else {
1537
+ obj.left = offset.left;
1538
+ obj.top = offset.top;
1539
+ }
1540
+ return obj;
1541
+ }
1542
+
1543
+ }
1544
+ });
1545
+
1546
+
1547
+
1548
+ /*>>zoom*/
1549
+
1550
+ /*>>iframe*/
1551
+
1552
+ var IFRAME_NS = 'iframe',
1553
+ _emptyPage = '//about:blank',
1554
+
1555
+ _fixIframeBugs = function(isShowing) {
1556
+ if(mfp.currTemplate[IFRAME_NS]) {
1557
+ var el = mfp.currTemplate[IFRAME_NS].find('iframe');
1558
+ if(el.length) {
1559
+ // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
1560
+ if(!isShowing) {
1561
+ el[0].src = _emptyPage;
1562
+ }
1563
+
1564
+ // IE8 black screen bug fix
1565
+ if(mfp.isIE8) {
1566
+ el.css('display', isShowing ? 'block' : 'none');
1567
+ }
1568
+ }
1569
+ }
1570
+ };
1571
+
1572
+ $.magnificPopup.registerModule(IFRAME_NS, {
1573
+
1574
+ options: {
1575
+ markup: '<div class="mfp-iframe-scaler">'+
1576
+ '<div class="mfp-close"></div>'+
1577
+ '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
1578
+ '</div>',
1579
+
1580
+ srcAction: 'iframe_src',
1581
+
1582
+ // we don't care and support only one default type of URL by default
1583
+ patterns: {
1584
+ youtube: {
1585
+ index: 'youtube.com',
1586
+ id: 'v=',
1587
+ src: '//www.youtube.com/embed/%id%?autoplay=1'
1588
+ },
1589
+ vimeo: {
1590
+ index: 'vimeo.com/',
1591
+ id: '/',
1592
+ src: '//player.vimeo.com/video/%id%?autoplay=1'
1593
+ },
1594
+ gmaps: {
1595
+ index: '//maps.google.',
1596
+ src: '%id%&output=embed'
1597
+ }
1598
+ }
1599
+ },
1600
+
1601
+ proto: {
1602
+ initIframe: function() {
1603
+ mfp.types.push(IFRAME_NS);
1604
+
1605
+ _mfpOn('BeforeChange', function(e, prevType, newType) {
1606
+ if(prevType !== newType) {
1607
+ if(prevType === IFRAME_NS) {
1608
+ _fixIframeBugs(); // iframe if removed
1609
+ } else if(newType === IFRAME_NS) {
1610
+ _fixIframeBugs(true); // iframe is showing
1611
+ }
1612
+ }// else {
1613
+ // iframe source is switched, don't do anything
1614
+ //}
1615
+ });
1616
+
1617
+ _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
1618
+ _fixIframeBugs();
1619
+ });
1620
+ },
1621
+
1622
+ getIframe: function(item, template) {
1623
+ var embedSrc = item.src;
1624
+ var iframeSt = mfp.st.iframe;
1625
+
1626
+ $.each(iframeSt.patterns, function() {
1627
+ if(embedSrc.indexOf( this.index ) > -1) {
1628
+ if(this.id) {
1629
+ if(typeof this.id === 'string') {
1630
+ embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
1631
+ } else {
1632
+ embedSrc = this.id.call( this, embedSrc );
1633
+ }
1634
+ }
1635
+ embedSrc = this.src.replace('%id%', embedSrc );
1636
+ return false; // break;
1637
+ }
1638
+ });
1639
+
1640
+ var dataObj = {};
1641
+ if(iframeSt.srcAction) {
1642
+ dataObj[iframeSt.srcAction] = embedSrc;
1643
+ }
1644
+ mfp._parseMarkup(template, dataObj, item);
1645
+
1646
+ mfp.updateStatus('ready');
1647
+
1648
+ return template;
1649
+ }
1650
+ }
1651
+ });
1652
+
1653
+
1654
+
1655
+ /*>>iframe*/
1656
+
1657
+ /*>>gallery*/
1658
+ /**
1659
+ * Get looped index depending on number of slides
1660
+ */
1661
+ var _getLoopedId = function(index) {
1662
+ var numSlides = mfp.items.length;
1663
+ if(index > numSlides - 1) {
1664
+ return index - numSlides;
1665
+ } else if(index < 0) {
1666
+ return numSlides + index;
1667
+ }
1668
+ return index;
1669
+ },
1670
+ _replaceCurrTotal = function(text, curr, total) {
1671
+ return text.replace('%curr%', curr + 1).replace('%total%', total);
1672
+ };
1673
+
1674
+ $.magnificPopup.registerModule('gallery', {
1675
+
1676
+ options: {
1677
+ enabled: false,
1678
+ arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
1679
+ preload: [0,2],
1680
+ navigateByImgClick: true,
1681
+ arrows: true,
1682
+
1683
+ tPrev: 'Previous (Left arrow key)',
1684
+ tNext: 'Next (Right arrow key)',
1685
+ tCounter: '%curr% of %total%'
1686
+ },
1687
+
1688
+ proto: {
1689
+ initGallery: function() {
1690
+
1691
+ var gSt = mfp.st.gallery,
1692
+ ns = '.mfp-gallery',
1693
+ supportsFastClick = Boolean($.fn.mfpFastClick);
1694
+
1695
+ mfp.direction = true; // true - next, false - prev
1696
+
1697
+ if(!gSt || !gSt.enabled ) return false;
1698
+
1699
+ _wrapClasses += ' mfp-gallery';
1700
+
1701
+ _mfpOn(OPEN_EVENT+ns, function() {
1702
+
1703
+ if(gSt.navigateByImgClick) {
1704
+ mfp.wrap.on('click'+ns, '.mfp-img', function() {
1705
+ if(mfp.items.length > 1) {
1706
+ mfp.next();
1707
+ return false;
1708
+ }
1709
+ });
1710
+ }
1711
+
1712
+ _document.on('keydown'+ns, function(e) {
1713
+ if (e.keyCode === 37) {
1714
+ mfp.prev();
1715
+ } else if (e.keyCode === 39) {
1716
+ mfp.next();
1717
+ }
1718
+ });
1719
+ });
1720
+
1721
+ _mfpOn('UpdateStatus'+ns, function(e, data) {
1722
+ if(data.text) {
1723
+ data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
1724
+ }
1725
+ });
1726
+
1727
+ _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
1728
+ var l = mfp.items.length;
1729
+ values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
1730
+ });
1731
+
1732
+ _mfpOn('BuildControls' + ns, function() {
1733
+ if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
1734
+ var markup = gSt.arrowMarkup,
1735
+ arrowLeft = mfp.arrowLeft = $( markup.replace('%title%', gSt.tPrev).replace('%dir%', 'left') ).addClass(PREVENT_CLOSE_CLASS),
1736
+ arrowRight = mfp.arrowRight = $( markup.replace('%title%', gSt.tNext).replace('%dir%', 'right') ).addClass(PREVENT_CLOSE_CLASS);
1737
+
1738
+ var eName = supportsFastClick ? 'mfpFastClick' : 'click';
1739
+ arrowLeft[eName](function() {
1740
+ mfp.prev();
1741
+ });
1742
+ arrowRight[eName](function() {
1743
+ mfp.next();
1744
+ });
1745
+
1746
+ // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
1747
+ if(mfp.isIE7) {
1748
+ _getEl('b', arrowLeft[0], false, true);
1749
+ _getEl('a', arrowLeft[0], false, true);
1750
+ _getEl('b', arrowRight[0], false, true);
1751
+ _getEl('a', arrowRight[0], false, true);
1752
+ }
1753
+
1754
+ mfp.container.append(arrowLeft.add(arrowRight));
1755
+ }
1756
+ });
1757
+
1758
+ _mfpOn(CHANGE_EVENT+ns, function() {
1759
+ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
1760
+
1761
+ mfp._preloadTimeout = setTimeout(function() {
1762
+ mfp.preloadNearbyImages();
1763
+ mfp._preloadTimeout = null;
1764
+ }, 16);
1765
+ });
1766
+
1767
+
1768
+ _mfpOn(CLOSE_EVENT+ns, function() {
1769
+ _document.off(ns);
1770
+ mfp.wrap.off('click'+ns);
1771
+
1772
+ if(mfp.arrowLeft && supportsFastClick) {
1773
+ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
1774
+ }
1775
+ mfp.arrowRight = mfp.arrowLeft = null;
1776
+ });
1777
+
1778
+ },
1779
+ next: function() {
1780
+ mfp.direction = true;
1781
+ mfp.index = _getLoopedId(mfp.index + 1);
1782
+ mfp.updateItemHTML();
1783
+ },
1784
+ prev: function() {
1785
+ mfp.direction = false;
1786
+ mfp.index = _getLoopedId(mfp.index - 1);
1787
+ mfp.updateItemHTML();
1788
+ },
1789
+ goTo: function(newIndex) {
1790
+ mfp.direction = (newIndex >= mfp.index);
1791
+ mfp.index = newIndex;
1792
+ mfp.updateItemHTML();
1793
+ },
1794
+ preloadNearbyImages: function() {
1795
+ var p = mfp.st.gallery.preload,
1796
+ preloadBefore = Math.min(p[0], mfp.items.length),
1797
+ preloadAfter = Math.min(p[1], mfp.items.length),
1798
+ i;
1799
+
1800
+ for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
1801
+ mfp._preloadItem(mfp.index+i);
1802
+ }
1803
+ for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
1804
+ mfp._preloadItem(mfp.index-i);
1805
+ }
1806
+ },
1807
+ _preloadItem: function(index) {
1808
+ index = _getLoopedId(index);
1809
+
1810
+ if(mfp.items[index].preloaded) {
1811
+ return;
1812
+ }
1813
+
1814
+ var item = mfp.items[index];
1815
+ if(!item.parsed) {
1816
+ item = mfp.parseEl( index );
1817
+ }
1818
+
1819
+ _mfpTrigger('LazyLoad', item);
1820
+
1821
+ if(item.type === 'image') {
1822
+ item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
1823
+ item.hasSize = true;
1824
+ }).on('error.mfploader', function() {
1825
+ item.hasSize = true;
1826
+ item.loadError = true;
1827
+ _mfpTrigger('LazyLoadError', item);
1828
+ }).attr('src', item.src);
1829
+ }
1830
+
1831
+
1832
+ item.preloaded = true;
1833
+ }
1834
+ }
1835
+ });
1836
+
1837
+ /*
1838
+ Touch Support that might be implemented some day
1839
+
1840
+ addSwipeGesture: function() {
1841
+ var startX,
1842
+ moved,
1843
+ multipleTouches;
1844
+
1845
+ return;
1846
+
1847
+ var namespace = '.mfp',
1848
+ addEventNames = function(pref, down, move, up, cancel) {
1849
+ mfp._tStart = pref + down + namespace;
1850
+ mfp._tMove = pref + move + namespace;
1851
+ mfp._tEnd = pref + up + namespace;
1852
+ mfp._tCancel = pref + cancel + namespace;
1853
+ };
1854
+
1855
+ if(window.navigator.msPointerEnabled) {
1856
+ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
1857
+ } else if('ontouchstart' in window) {
1858
+ addEventNames('touch', 'start', 'move', 'end', 'cancel');
1859
+ } else {
1860
+ return;
1861
+ }
1862
+ _window.on(mfp._tStart, function(e) {
1863
+ var oE = e.originalEvent;
1864
+ multipleTouches = moved = false;
1865
+ startX = oE.pageX || oE.changedTouches[0].pageX;
1866
+ }).on(mfp._tMove, function(e) {
1867
+ if(e.originalEvent.touches.length > 1) {
1868
+ multipleTouches = e.originalEvent.touches.length;
1869
+ } else {
1870
+ //e.preventDefault();
1871
+ moved = true;
1872
+ }
1873
+ }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
1874
+ if(moved && !multipleTouches) {
1875
+ var oE = e.originalEvent,
1876
+ diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
1877
+
1878
+ if(diff > 20) {
1879
+ mfp.next();
1880
+ } else if(diff < -20) {
1881
+ mfp.prev();
1882
+ }
1883
+ }
1884
+ });
1885
+ },
1886
+ */
1887
+
1888
+
1889
+ /*>>gallery*/
1890
+
1891
+ /*>>retina*/
1892
+
1893
+ var RETINA_NS = 'retina';
1894
+
1895
+ $.magnificPopup.registerModule(RETINA_NS, {
1896
+ options: {
1897
+ replaceSrc: function(item) {
1898
+ return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
1899
+ },
1900
+ ratio: 1 // Function or number. Set to 1 to disable.
1901
+ },
1902
+ proto: {
1903
+ initRetina: function() {
1904
+ if(window.devicePixelRatio > 1) {
1905
+
1906
+ var st = mfp.st.retina,
1907
+ ratio = st.ratio;
1908
+
1909
+ ratio = !isNaN(ratio) ? ratio : ratio();
1910
+
1911
+ if(ratio > 1) {
1912
+ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
1913
+ item.img.css({
1914
+ 'max-width': item.img[0].naturalWidth / ratio,
1915
+ 'width': '100%'
1916
+ });
1917
+ });
1918
+ _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
1919
+ item.src = st.replaceSrc(item, ratio);
1920
+ });
1921
+ }
1922
+ }
1923
+
1924
+ }
1925
+ }
1926
+ });
1927
+
1928
+ /*>>retina*/
1929
+
1930
+ /*>>fastclick*/
1931
+ /**
1932
+ * FastClick event implementation. (removes 300ms delay on touch devices)
1933
+ * Based on https://developers.google.com/mobile/articles/fast_buttons
1934
+ *
1935
+ * You may use it outside the Magnific Popup by calling just:
1936
+ *
1937
+ * $('.your-el').mfpFastClick(function() {
1938
+ * console.log('Clicked!');
1939
+ * });
1940
+ *
1941
+ * To unbind:
1942
+ * $('.your-el').destroyMfpFastClick();
1943
+ *
1944
+ *
1945
+ * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
1946
+ * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
1947
+ *
1948
+ */
1949
+
1950
+ (function() {
1951
+ var ghostClickDelay = 1000,
1952
+ supportsTouch = 'ontouchstart' in window,
1953
+ unbindTouchMove = function() {
1954
+ _window.off('touchmove'+ns+' touchend'+ns);
1955
+ },
1956
+ eName = 'mfpFastClick',
1957
+ ns = '.'+eName;
1958
+
1959
+
1960
+ // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
1961
+ $.fn.mfpFastClick = function(callback) {
1962
+
1963
+ return $(this).each(function() {
1964
+
1965
+ var elem = $(this),
1966
+ lock;
1967
+
1968
+ if( supportsTouch ) {
1969
+
1970
+ var timeout,
1971
+ startX,
1972
+ startY,
1973
+ pointerMoved,
1974
+ point,
1975
+ numPointers;
1976
+
1977
+ elem.on('touchstart' + ns, function(e) {
1978
+ pointerMoved = false;
1979
+ numPointers = 1;
1980
+
1981
+ point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
1982
+ startX = point.clientX;
1983
+ startY = point.clientY;
1984
+
1985
+ _window.on('touchmove'+ns, function(e) {
1986
+ point = e.originalEvent ? e.originalEvent.touches : e.touches;
1987
+ numPointers = point.length;
1988
+ point = point[0];
1989
+ if (Math.abs(point.clientX - startX) > 10 ||
1990
+ Math.abs(point.clientY - startY) > 10) {
1991
+ pointerMoved = true;
1992
+ unbindTouchMove();
1993
+ }
1994
+ }).on('touchend'+ns, function(e) {
1995
+ unbindTouchMove();
1996
+ if(pointerMoved || numPointers > 1) {
1997
+ return;
1998
+ }
1999
+ lock = true;
2000
+ e.preventDefault();
2001
+ clearTimeout(timeout);
2002
+ timeout = setTimeout(function() {
2003
+ lock = false;
2004
+ }, ghostClickDelay);
2005
+ callback();
2006
+ });
2007
+ });
2008
+
2009
+ }
2010
+
2011
+ elem.on('click' + ns, function() {
2012
+ if(!lock) {
2013
+ callback();
2014
+ }
2015
+ });
2016
+ });
2017
+ };
2018
+
2019
+ $.fn.destroyMfpFastClick = function() {
2020
+ $(this).off('touchstart' + ns + ' click' + ns);
2021
+ if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
2022
+ };
2023
+ })();
2024
+
2025
+ /*>>fastclick*/
2026
+ })(window.jQuery || window.Zepto);