action_ui 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (386) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/lib/cre_pro-rails.rb +8 -0
  4. data/lib/cre_pro/rails.rb +7 -0
  5. data/lib/cre_pro/rails/version.rb +5 -0
  6. data/vendor/assets/javascripts/gp/gp.js +292 -0
  7. data/vendor/assets/javascripts/ld/bootstrap-checkbox-radio-switch-tags.js +869 -0
  8. data/vendor/assets/javascripts/ld/bootstrap-datetimepicker.js +2573 -0
  9. data/vendor/assets/javascripts/ld/bootstrap-notify.js +379 -0
  10. data/vendor/assets/javascripts/ld/bootstrap-selectpicker.js +1711 -0
  11. data/vendor/assets/javascripts/ld/bootstrap-table.js +2484 -0
  12. data/vendor/assets/javascripts/ld/chartist.min.js +8 -0
  13. data/vendor/assets/javascripts/ld/demo.js +731 -0
  14. data/vendor/assets/javascripts/ld/fullcalendar.min.js +9 -0
  15. data/vendor/assets/javascripts/ld/jquery-jvectormap.js +3381 -0
  16. data/vendor/assets/javascripts/ld/jquery-ui.min.js +24 -0
  17. data/vendor/assets/javascripts/ld/jquery.bootstrap.wizard.min.js +22 -0
  18. data/vendor/assets/javascripts/ld/jquery.datatables.js +15498 -0
  19. data/vendor/assets/javascripts/ld/jquery.min.js +5 -0
  20. data/vendor/assets/javascripts/ld/jquery.validate.min.js +4 -0
  21. data/vendor/assets/javascripts/ld/ld.js +422 -0
  22. data/vendor/assets/javascripts/ld/moment.min.js +7 -0
  23. data/vendor/assets/javascripts/ld/sweetalert2.js +877 -0
  24. data/vendor/assets/javascripts/mk/bootstrap-datepicker.js +474 -0
  25. data/vendor/assets/javascripts/mk/bootstrap.min.js +7 -0
  26. data/vendor/assets/javascripts/mk/jasny-bootstrap.min.js +6 -0
  27. data/vendor/assets/javascripts/mk/jquery.dropdown.js +378 -0
  28. data/vendor/assets/javascripts/mk/jquery.flexisel.js +342 -0
  29. data/vendor/assets/javascripts/mk/jquery.min.js +3 -0
  30. data/vendor/assets/javascripts/mk/jquery.tagsinput.js +355 -0
  31. data/vendor/assets/javascripts/mk/mk.js +191 -0
  32. data/vendor/assets/javascripts/mk/mk.min.js +1 -0
  33. data/vendor/assets/javascripts/mk/nouislider.min.js +31 -0
  34. data/vendor/assets/javascripts/pd/bootstrap-checkbox-radio-switch-tags.js +869 -0
  35. data/vendor/assets/javascripts/pd/bootstrap-datetimepicker.js +2576 -0
  36. data/vendor/assets/javascripts/pd/bootstrap-notify.js +379 -0
  37. data/vendor/assets/javascripts/pd/bootstrap-selectpicker.js +1711 -0
  38. data/vendor/assets/javascripts/pd/bootstrap-table.js +2484 -0
  39. data/vendor/assets/javascripts/pd/bootstrap.min.js +12 -0
  40. data/vendor/assets/javascripts/pd/chartist.min.js +9 -0
  41. data/vendor/assets/javascripts/pd/demo.js +911 -0
  42. data/vendor/assets/javascripts/pd/fullcalendar.min.js +9 -0
  43. data/vendor/assets/javascripts/pd/jquery-1.10.2.js +9789 -0
  44. data/vendor/assets/javascripts/pd/jquery-1.10.2.min.js +3 -0
  45. data/vendor/assets/javascripts/pd/jquery-jvectormap.js +3381 -0
  46. data/vendor/assets/javascripts/pd/jquery-ui.min.js +24 -0
  47. data/vendor/assets/javascripts/pd/jquery.bootstrap.wizard.min.js +22 -0
  48. data/vendor/assets/javascripts/pd/jquery.datatables.js +15498 -0
  49. data/vendor/assets/javascripts/pd/jquery.easypiechart.min.js +9 -0
  50. data/vendor/assets/javascripts/pd/jquery.min.js +5 -0
  51. data/vendor/assets/javascripts/pd/jquery.tagsinput.js +355 -0
  52. data/vendor/assets/javascripts/pd/jquery.validate.min.js +4 -0
  53. data/vendor/assets/javascripts/pd/moment.min.js +7 -0
  54. data/vendor/assets/javascripts/pd/pd.js +335 -0
  55. data/vendor/assets/javascripts/pd/sweetalert2.js +877 -0
  56. data/vendor/assets/javascripts/pk/bootstrap-datepicker.js +492 -0
  57. data/vendor/assets/javascripts/pk/bootstrap-select.js +1711 -0
  58. data/vendor/assets/javascripts/pk/chartist.min.js +8 -0
  59. data/vendor/assets/javascripts/pk/ct-pk-bootstrapswitch.js +249 -0
  60. data/vendor/assets/javascripts/pk/ct-pk-checkbox.js +109 -0
  61. data/vendor/assets/javascripts/pk/ct-pk-radio.js +140 -0
  62. data/vendor/assets/javascripts/pk/ct-pk.js +305 -0
  63. data/vendor/assets/javascripts/pk/demo.js +289 -0
  64. data/vendor/assets/javascripts/pk/jasny-bootstrap.min.js +6 -0
  65. data/vendor/assets/javascripts/pk/jquery-1.10.2.js +9789 -0
  66. data/vendor/assets/javascripts/pk/jquery-ui-1.10.4.custom.min.js +6 -0
  67. data/vendor/assets/javascripts/pk/jquery.tagsinput.js +355 -0
  68. data/vendor/assets/javascripts/pk/photo_swipe/init-gallery.js +205 -0
  69. data/vendor/assets/javascripts/pk/photo_swipe/photoswipe-ui-default.min.js +4 -0
  70. data/vendor/assets/javascripts/pk/photo_swipe/photoswipe.min.js +4 -0
  71. data/vendor/assets/javascripts/pk/presentation-page/atv-img-min.js +233 -0
  72. data/vendor/assets/javascripts/pk/presentation-page/jquery.sharrre.js +585 -0
  73. data/vendor/assets/javascripts/sd/bootstrap-datepicker.js +492 -0
  74. data/vendor/assets/javascripts/sd/bootstrap-select.js +1711 -0
  75. data/vendor/assets/javascripts/sd/chartist.min.js +8 -0
  76. data/vendor/assets/javascripts/sd/demo.js +227 -0
  77. data/vendor/assets/javascripts/sd/jquery-ui.custom.min.js +7 -0
  78. data/vendor/assets/javascripts/sd/jquery.flexisel.js +342 -0
  79. data/vendor/assets/javascripts/sd/jquery.js +9789 -0
  80. data/vendor/assets/javascripts/sd/jquery.tagsinput.js +355 -0
  81. data/vendor/assets/javascripts/sd/retina.min.js +10 -0
  82. data/vendor/assets/javascripts/sd/sd-bootstrapswitch.js +249 -0
  83. data/vendor/assets/javascripts/sd/sd-checkbox.js +109 -0
  84. data/vendor/assets/javascripts/sd/sd-morphing.js +89 -0
  85. data/vendor/assets/javascripts/sd/sd-radio.js +140 -0
  86. data/vendor/assets/javascripts/sd/sd.js +398 -0
  87. data/vendor/assets/stylesheets/gp/components/_buttons.scss +121 -0
  88. data/vendor/assets/stylesheets/gp/components/_cards.scss +271 -0
  89. data/vendor/assets/stylesheets/gp/components/_carousel.scss +15 -0
  90. data/vendor/assets/stylesheets/gp/components/_clients.scss +172 -0
  91. data/vendor/assets/stylesheets/gp/components/_closure.scss +19 -0
  92. data/vendor/assets/stylesheets/gp/components/_contact.scss +93 -0
  93. data/vendor/assets/stylesheets/gp/components/_dropdown.scss +173 -0
  94. data/vendor/assets/stylesheets/gp/components/_example-pages.scss +524 -0
  95. data/vendor/assets/stylesheets/gp/components/_footers.scss +191 -0
  96. data/vendor/assets/stylesheets/gp/components/_headers.scss +72 -0
  97. data/vendor/assets/stylesheets/gp/components/_inputs.scss +145 -0
  98. data/vendor/assets/stylesheets/gp/components/_labels.scss +15 -0
  99. data/vendor/assets/stylesheets/gp/components/_misc.scss +332 -0
  100. data/vendor/assets/stylesheets/gp/components/_mixins.scss +11 -0
  101. data/vendor/assets/stylesheets/gp/components/_navbars.scss +252 -0
  102. data/vendor/assets/stylesheets/gp/components/_numbers.scss +61 -0
  103. data/vendor/assets/stylesheets/gp/components/_projects.scss +279 -0
  104. data/vendor/assets/stylesheets/gp/components/_responsive.scss +950 -0
  105. data/vendor/assets/stylesheets/gp/components/_sections.scss +328 -0
  106. data/vendor/assets/stylesheets/gp/components/_social-buttons.scss +30 -0
  107. data/vendor/assets/stylesheets/gp/components/_team.scss +182 -0
  108. data/vendor/assets/stylesheets/gp/components/_theme.scss +22 -0
  109. data/vendor/assets/stylesheets/gp/components/_typography.scss +252 -0
  110. data/vendor/assets/stylesheets/gp/components/_variables.scss +267 -0
  111. data/vendor/assets/stylesheets/gp/components/mixins/_buttons.scss +61 -0
  112. data/vendor/assets/stylesheets/gp/components/mixins/_cards.scss +8 -0
  113. data/vendor/assets/stylesheets/gp/components/mixins/_inputs.scss +17 -0
  114. data/vendor/assets/stylesheets/gp/components/mixins/_navbars.scss +11 -0
  115. data/vendor/assets/stylesheets/gp/components/mixins/_transparency.scss +20 -0
  116. data/vendor/assets/stylesheets/gp/components/mixins/_vendor-prefixes.scss +284 -0
  117. data/vendor/assets/stylesheets/gp/gp.scss +30 -0
  118. data/vendor/assets/stylesheets/ld/ld.scss +53 -0
  119. data/vendor/assets/stylesheets/ld/ld/_alerts.scss +82 -0
  120. data/vendor/assets/stylesheets/ld/ld/_buttons.scss +123 -0
  121. data/vendor/assets/stylesheets/ld/ld/_cards.scss +315 -0
  122. data/vendor/assets/stylesheets/ld/ld/_carousel.scss +15 -0
  123. data/vendor/assets/stylesheets/ld/ld/_checkbox-radio-switch.scss +253 -0
  124. data/vendor/assets/stylesheets/ld/ld/_collapse.scss +49 -0
  125. data/vendor/assets/stylesheets/ld/ld/_dropdown.scss +176 -0
  126. data/vendor/assets/stylesheets/ld/ld/_footers.scss +155 -0
  127. data/vendor/assets/stylesheets/ld/ld/_forms.scss +41 -0
  128. data/vendor/assets/stylesheets/ld/ld/_inputs.scss +170 -0
  129. data/vendor/assets/stylesheets/ld/ld/_labels.scss +54 -0
  130. data/vendor/assets/stylesheets/ld/ld/_media.scss +80 -0
  131. data/vendor/assets/stylesheets/ld/ld/_misc.scss +87 -0
  132. data/vendor/assets/stylesheets/ld/ld/_mixins.scss +22 -0
  133. data/vendor/assets/stylesheets/ld/ld/_modal.scss +79 -0
  134. data/vendor/assets/stylesheets/ld/ld/_navbars.scss +362 -0
  135. data/vendor/assets/stylesheets/ld/ld/_pages.scss +215 -0
  136. data/vendor/assets/stylesheets/ld/ld/_progress-bars.scss +26 -0
  137. data/vendor/assets/stylesheets/ld/ld/_responsive.scss +647 -0
  138. data/vendor/assets/stylesheets/ld/ld/_sidebar-and-main-panel.scss +576 -0
  139. data/vendor/assets/stylesheets/ld/ld/_sliders.scss +219 -0
  140. data/vendor/assets/stylesheets/ld/ld/_social-buttons.scss +77 -0
  141. data/vendor/assets/stylesheets/ld/ld/_tables.scss +120 -0
  142. data/vendor/assets/stylesheets/ld/ld/_tabs-navs-pagination.scss +302 -0
  143. data/vendor/assets/stylesheets/ld/ld/_tags.scss +123 -0
  144. data/vendor/assets/stylesheets/ld/ld/_tooltips-and-popovers.scss +156 -0
  145. data/vendor/assets/stylesheets/ld/ld/_typography.scss +93 -0
  146. data/vendor/assets/stylesheets/ld/ld/_variables.scss +319 -0
  147. data/vendor/assets/stylesheets/ld/ld/mixins/_buttons.scss +74 -0
  148. data/vendor/assets/stylesheets/ld/ld/mixins/_cards.scss +8 -0
  149. data/vendor/assets/stylesheets/ld/ld/mixins/_chartist.scss +85 -0
  150. data/vendor/assets/stylesheets/ld/ld/mixins/_icons.scss +13 -0
  151. data/vendor/assets/stylesheets/ld/ld/mixins/_inputs.scss +17 -0
  152. data/vendor/assets/stylesheets/ld/ld/mixins/_labels.scss +21 -0
  153. data/vendor/assets/stylesheets/ld/ld/mixins/_morphing-buttons.scss +34 -0
  154. data/vendor/assets/stylesheets/ld/ld/mixins/_navbars.scss +11 -0
  155. data/vendor/assets/stylesheets/ld/ld/mixins/_social-buttons.scss +43 -0
  156. data/vendor/assets/stylesheets/ld/ld/mixins/_table-row.scss +22 -0
  157. data/vendor/assets/stylesheets/ld/ld/mixins/_tabs.scss +4 -0
  158. data/vendor/assets/stylesheets/ld/ld/mixins/_transparency.scss +20 -0
  159. data/vendor/assets/stylesheets/ld/ld/mixins/_vendor-prefixes.scss +197 -0
  160. data/vendor/assets/stylesheets/ld/ld/plugins/_animate.scss +188 -0
  161. data/vendor/assets/stylesheets/ld/ld/plugins/_bootstrap-select.scss +308 -0
  162. data/vendor/assets/stylesheets/ld/ld/plugins/_bootstrap-table.scss +328 -0
  163. data/vendor/assets/stylesheets/ld/ld/plugins/_chartist.scss +247 -0
  164. data/vendor/assets/stylesheets/ld/ld/plugins/_datatables.net.scss +513 -0
  165. data/vendor/assets/stylesheets/ld/ld/plugins/_datetime-picker.scss +440 -0
  166. data/vendor/assets/stylesheets/ld/ld/plugins/_fullcalendar.scss +1114 -0
  167. data/vendor/assets/stylesheets/ld/ld/plugins/_jquery.jvectormap.scss +135 -0
  168. data/vendor/assets/stylesheets/ld/ld/plugins/_perfect-scrollbar.scss +111 -0
  169. data/vendor/assets/stylesheets/ld/ld/plugins/_sweetalert2.scss +531 -0
  170. data/vendor/assets/stylesheets/mk/mk.scss +50 -0
  171. data/vendor/assets/stylesheets/mk/mk/_alerts.scss +41 -0
  172. data/vendor/assets/stylesheets/mk/mk/_buttons.scss +283 -0
  173. data/vendor/assets/stylesheets/mk/mk/_cards.scss +576 -0
  174. data/vendor/assets/stylesheets/mk/mk/_carousel.scss +86 -0
  175. data/vendor/assets/stylesheets/mk/mk/_checkboxes.scss +195 -0
  176. data/vendor/assets/stylesheets/mk/mk/_colors.scss +326 -0
  177. data/vendor/assets/stylesheets/mk/mk/_dialogs.scss +99 -0
  178. data/vendor/assets/stylesheets/mk/mk/_dividers.scss +73 -0
  179. data/vendor/assets/stylesheets/mk/mk/_dropdown.scss +86 -0
  180. data/vendor/assets/stylesheets/mk/mk/_example-pages.scss +775 -0
  181. data/vendor/assets/stylesheets/mk/mk/_fileupload.scss +115 -0
  182. data/vendor/assets/stylesheets/mk/mk/_flexisel.scss +54 -0
  183. data/vendor/assets/stylesheets/mk/mk/_form.scss +58 -0
  184. data/vendor/assets/stylesheets/mk/mk/_images.scss +6 -0
  185. data/vendor/assets/stylesheets/mk/mk/_import-bs-less.scss +4 -0
  186. data/vendor/assets/stylesheets/mk/mk/_import-bs-sass.scss +2 -0
  187. data/vendor/assets/stylesheets/mk/mk/_info-areas.scss +57 -0
  188. data/vendor/assets/stylesheets/mk/mk/_inputs-size.scss +223 -0
  189. data/vendor/assets/stylesheets/mk/mk/_inputs.scss +394 -0
  190. data/vendor/assets/stylesheets/mk/mk/_labels.scss +10 -0
  191. data/vendor/assets/stylesheets/mk/mk/_lists.scss +104 -0
  192. data/vendor/assets/stylesheets/mk/mk/_media.scss +47 -0
  193. data/vendor/assets/stylesheets/mk/mk/_misc.scss +94 -0
  194. data/vendor/assets/stylesheets/mk/mk/_mixins.scss +413 -0
  195. data/vendor/assets/stylesheets/mk/mk/_navbar.scss +311 -0
  196. data/vendor/assets/stylesheets/mk/mk/_pagination.scss +91 -0
  197. data/vendor/assets/stylesheets/mk/mk/_panels.scss +47 -0
  198. data/vendor/assets/stylesheets/mk/mk/_pills.scss +128 -0
  199. data/vendor/assets/stylesheets/mk/mk/_popups.scss +77 -0
  200. data/vendor/assets/stylesheets/mk/mk/_progress.scss +33 -0
  201. data/vendor/assets/stylesheets/mk/mk/_radios.scss +114 -0
  202. data/vendor/assets/stylesheets/mk/mk/_responsive.scss +115 -0
  203. data/vendor/assets/stylesheets/mk/mk/_ripples.scss +40 -0
  204. data/vendor/assets/stylesheets/mk/mk/_sections.scss +131 -0
  205. data/vendor/assets/stylesheets/mk/mk/_select.scss +108 -0
  206. data/vendor/assets/stylesheets/mk/mk/_shadows.scss +138 -0
  207. data/vendor/assets/stylesheets/mk/mk/_tables.scss +104 -0
  208. data/vendor/assets/stylesheets/mk/mk/_tabs.scss +53 -0
  209. data/vendor/assets/stylesheets/mk/mk/_tags.scss +97 -0
  210. data/vendor/assets/stylesheets/mk/mk/_togglebutton.scss +87 -0
  211. data/vendor/assets/stylesheets/mk/mk/_typography.scss +75 -0
  212. data/vendor/assets/stylesheets/mk/mk/_variables.scss +224 -0
  213. data/vendor/assets/stylesheets/mk/mk/_variables_bootstrap.scss +883 -0
  214. data/vendor/assets/stylesheets/mk/mk/_welljumbo.scss +28 -0
  215. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-datepicker.scss +204 -0
  216. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-nouislider.scss +161 -0
  217. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-selectize.scss +93 -0
  218. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-snackbarjs.scss +34 -0
  219. data/vendor/assets/stylesheets/mk/mk/sections/_blogs.scss +17 -0
  220. data/vendor/assets/stylesheets/mk/mk/sections/_contactus.scss +51 -0
  221. data/vendor/assets/stylesheets/mk/mk/sections/_features.scss +92 -0
  222. data/vendor/assets/stylesheets/mk/mk/sections/_footers.scss +163 -0
  223. data/vendor/assets/stylesheets/mk/mk/sections/_headers.scss +125 -0
  224. data/vendor/assets/stylesheets/mk/mk/sections/_pricing.scss +40 -0
  225. data/vendor/assets/stylesheets/mk/mk/sections/_projects.scss +75 -0
  226. data/vendor/assets/stylesheets/mk/mk/sections/_social-subscribe-lines.scss +71 -0
  227. data/vendor/assets/stylesheets/mk/mk/sections/_team.scss +53 -0
  228. data/vendor/assets/stylesheets/mk/mk/sections/_testimonials.scss +5 -0
  229. data/vendor/assets/stylesheets/pd/pd.scss +51 -0
  230. data/vendor/assets/stylesheets/pd/pd/_alerts.scss +60 -0
  231. data/vendor/assets/stylesheets/pd/pd/_animated-buttons.scss +61 -0
  232. data/vendor/assets/stylesheets/pd/pd/_buttons.scss +173 -0
  233. data/vendor/assets/stylesheets/pd/pd/_cards.scss +546 -0
  234. data/vendor/assets/stylesheets/pd/pd/_carousel.scss +15 -0
  235. data/vendor/assets/stylesheets/pd/pd/_chat-message.scss +206 -0
  236. data/vendor/assets/stylesheets/pd/pd/_checkbox-radio.scss +126 -0
  237. data/vendor/assets/stylesheets/pd/pd/_circlechart.scss +18 -0
  238. data/vendor/assets/stylesheets/pd/pd/_collapse.scss +40 -0
  239. data/vendor/assets/stylesheets/pd/pd/_dropdown.scss +413 -0
  240. data/vendor/assets/stylesheets/pd/pd/_footers.scss +87 -0
  241. data/vendor/assets/stylesheets/pd/pd/_forms.scss +43 -0
  242. data/vendor/assets/stylesheets/pd/pd/_inputs.scss +190 -0
  243. data/vendor/assets/stylesheets/pd/pd/_labels.scss +29 -0
  244. data/vendor/assets/stylesheets/pd/pd/_media.scss +80 -0
  245. data/vendor/assets/stylesheets/pd/pd/_misc.scss +104 -0
  246. data/vendor/assets/stylesheets/pd/pd/_mixins.scss +17 -0
  247. data/vendor/assets/stylesheets/pd/pd/_modal.scss +79 -0
  248. data/vendor/assets/stylesheets/pd/pd/_navbars.scss +289 -0
  249. data/vendor/assets/stylesheets/pd/pd/_pages.scss +196 -0
  250. data/vendor/assets/stylesheets/pd/pd/_progress-bars.scss +27 -0
  251. data/vendor/assets/stylesheets/pd/pd/_responsive.scss +666 -0
  252. data/vendor/assets/stylesheets/pd/pd/_sidebar-and-main-panel.scss +514 -0
  253. data/vendor/assets/stylesheets/pd/pd/_sliders.scss +222 -0
  254. data/vendor/assets/stylesheets/pd/pd/_social.scss +130 -0
  255. data/vendor/assets/stylesheets/pd/pd/_switch.scss +145 -0
  256. data/vendor/assets/stylesheets/pd/pd/_tables.scss +194 -0
  257. data/vendor/assets/stylesheets/pd/pd/_tabs-navs-pagination.scss +341 -0
  258. data/vendor/assets/stylesheets/pd/pd/_tags.scss +104 -0
  259. data/vendor/assets/stylesheets/pd/pd/_timeline.scss +178 -0
  260. data/vendor/assets/stylesheets/pd/pd/_tooltips-and-popovers.scss +156 -0
  261. data/vendor/assets/stylesheets/pd/pd/_typography.scss +117 -0
  262. data/vendor/assets/stylesheets/pd/pd/_variables.scss +367 -0
  263. data/vendor/assets/stylesheets/pd/pd/mixins/_alerts.scss +13 -0
  264. data/vendor/assets/stylesheets/pd/pd/mixins/_buttons.scss +89 -0
  265. data/vendor/assets/stylesheets/pd/pd/mixins/_cards.scss +7 -0
  266. data/vendor/assets/stylesheets/pd/pd/mixins/_chartist.scss +104 -0
  267. data/vendor/assets/stylesheets/pd/pd/mixins/_icons.scss +13 -0
  268. data/vendor/assets/stylesheets/pd/pd/mixins/_inputs.scss +17 -0
  269. data/vendor/assets/stylesheets/pd/pd/mixins/_labels.scss +10 -0
  270. data/vendor/assets/stylesheets/pd/pd/mixins/_navbars.scss +11 -0
  271. data/vendor/assets/stylesheets/pd/pd/mixins/_sidebar.scss +54 -0
  272. data/vendor/assets/stylesheets/pd/pd/mixins/_social.scss +68 -0
  273. data/vendor/assets/stylesheets/pd/pd/mixins/_table-row.scss +22 -0
  274. data/vendor/assets/stylesheets/pd/pd/mixins/_tabs.scss +4 -0
  275. data/vendor/assets/stylesheets/pd/pd/mixins/_transparency.scss +20 -0
  276. data/vendor/assets/stylesheets/pd/pd/mixins/_vendor-prefixes.scss +254 -0
  277. data/vendor/assets/stylesheets/pd/pd/plugins/_animate.scss +189 -0
  278. data/vendor/assets/stylesheets/pd/pd/plugins/_bootstrap-select.scss +313 -0
  279. data/vendor/assets/stylesheets/pd/pd/plugins/_bootstrap-table.scss +375 -0
  280. data/vendor/assets/stylesheets/pd/pd/plugins/_chartist.scss +246 -0
  281. data/vendor/assets/stylesheets/pd/pd/plugins/_datatables.net.scss +504 -0
  282. data/vendor/assets/stylesheets/pd/pd/plugins/_datetime-picker.scss +418 -0
  283. data/vendor/assets/stylesheets/pd/pd/plugins/_fullcalendar.scss +1124 -0
  284. data/vendor/assets/stylesheets/pd/pd/plugins/_jquery.jvectormap.scss +135 -0
  285. data/vendor/assets/stylesheets/pd/pd/plugins/_perfect-scrollbar.scss +112 -0
  286. data/vendor/assets/stylesheets/pd/pd/plugins/_sweetalert2.scss +531 -0
  287. data/vendor/assets/stylesheets/pk/ct-pk.scss +64 -0
  288. data/vendor/assets/stylesheets/pk/ct-pk/_alerts.scss +69 -0
  289. data/vendor/assets/stylesheets/pk/ct-pk/_animated-buttons.scss +63 -0
  290. data/vendor/assets/stylesheets/pk/ct-pk/_bootstrap-select.scss +320 -0
  291. data/vendor/assets/stylesheets/pk/ct-pk/_buttons.scss +161 -0
  292. data/vendor/assets/stylesheets/pk/ct-pk/_cards.scss +570 -0
  293. data/vendor/assets/stylesheets/pk/ct-pk/_carousel.scss +59 -0
  294. data/vendor/assets/stylesheets/pk/ct-pk/_chartist.scss +354 -0
  295. data/vendor/assets/stylesheets/pk/ct-pk/_checkbox-radio.scss +129 -0
  296. data/vendor/assets/stylesheets/pk/ct-pk/_collapse.scss +40 -0
  297. data/vendor/assets/stylesheets/pk/ct-pk/_datepicker.scss +198 -0
  298. data/vendor/assets/stylesheets/pk/ct-pk/_dropdown.scss +291 -0
  299. data/vendor/assets/stylesheets/pk/ct-pk/_fileupload.scss +112 -0
  300. data/vendor/assets/stylesheets/pk/ct-pk/_footers.scss +193 -0
  301. data/vendor/assets/stylesheets/pk/ct-pk/_headers.scss +85 -0
  302. data/vendor/assets/stylesheets/pk/ct-pk/_images.scss +28 -0
  303. data/vendor/assets/stylesheets/pk/ct-pk/_info-areas.scss +62 -0
  304. data/vendor/assets/stylesheets/pk/ct-pk/_inputs.scss +171 -0
  305. data/vendor/assets/stylesheets/pk/ct-pk/_labels.scss +29 -0
  306. data/vendor/assets/stylesheets/pk/ct-pk/_media.scss +82 -0
  307. data/vendor/assets/stylesheets/pk/ct-pk/_misc.scss +124 -0
  308. data/vendor/assets/stylesheets/pk/ct-pk/_mixins.scss +16 -0
  309. data/vendor/assets/stylesheets/pk/ct-pk/_modal.scss +91 -0
  310. data/vendor/assets/stylesheets/pk/ct-pk/_navbars.scss +285 -0
  311. data/vendor/assets/stylesheets/pk/ct-pk/_preloaders.scss +282 -0
  312. data/vendor/assets/stylesheets/pk/ct-pk/_progress-bars.scss +27 -0
  313. data/vendor/assets/stylesheets/pk/ct-pk/_responsive.scss +411 -0
  314. data/vendor/assets/stylesheets/pk/ct-pk/_sections.scss +45 -0
  315. data/vendor/assets/stylesheets/pk/ct-pk/_sidebar.scss +206 -0
  316. data/vendor/assets/stylesheets/pk/ct-pk/_sliders.scss +222 -0
  317. data/vendor/assets/stylesheets/pk/ct-pk/_social.scss +130 -0
  318. data/vendor/assets/stylesheets/pk/ct-pk/_switch.scss +145 -0
  319. data/vendor/assets/stylesheets/pk/ct-pk/_tables.scss +135 -0
  320. data/vendor/assets/stylesheets/pk/ct-pk/_tabs-navs-pagination.scss +311 -0
  321. data/vendor/assets/stylesheets/pk/ct-pk/_tags.scss +108 -0
  322. data/vendor/assets/stylesheets/pk/ct-pk/_tooltips-and-popovers.scss +188 -0
  323. data/vendor/assets/stylesheets/pk/ct-pk/_typography.scss +106 -0
  324. data/vendor/assets/stylesheets/pk/ct-pk/_variables.scss +301 -0
  325. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_alerts.scss +11 -0
  326. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_buttons.scss +104 -0
  327. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_inputs.scss +17 -0
  328. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_labels.scss +10 -0
  329. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_navbars.scss +11 -0
  330. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_popovers.scss +21 -0
  331. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_social.scss +68 -0
  332. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_tabs.scss +4 -0
  333. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_transparency.scss +17 -0
  334. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_vendor-prefixes.scss +233 -0
  335. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_default-skin.scss +592 -0
  336. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_gallery.scss +27 -0
  337. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_main-settings.scss +11 -0
  338. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_main.scss +213 -0
  339. data/vendor/assets/stylesheets/pk/examples.scss +1083 -0
  340. data/vendor/assets/stylesheets/sd/examples.scss +403 -0
  341. data/vendor/assets/stylesheets/sd/sd.scss +41 -0
  342. data/vendor/assets/stylesheets/sd/sd/_alerts.scss +37 -0
  343. data/vendor/assets/stylesheets/sd/sd/_bootstrap-select.scss +307 -0
  344. data/vendor/assets/stylesheets/sd/sd/_buttons.scss +108 -0
  345. data/vendor/assets/stylesheets/sd/sd/_cards.scss +462 -0
  346. data/vendor/assets/stylesheets/sd/sd/_carousel.scss +15 -0
  347. data/vendor/assets/stylesheets/sd/sd/_chartist.scss +335 -0
  348. data/vendor/assets/stylesheets/sd/sd/_checkbox-radio-switch.scss +246 -0
  349. data/vendor/assets/stylesheets/sd/sd/_collapse.scss +33 -0
  350. data/vendor/assets/stylesheets/sd/sd/_datepicker.scss +199 -0
  351. data/vendor/assets/stylesheets/sd/sd/_dropdown.scss +98 -0
  352. data/vendor/assets/stylesheets/sd/sd/_flexisel.scss +53 -0
  353. data/vendor/assets/stylesheets/sd/sd/_footers.scss +216 -0
  354. data/vendor/assets/stylesheets/sd/sd/_icons.scss +127 -0
  355. data/vendor/assets/stylesheets/sd/sd/_inputs.scss +141 -0
  356. data/vendor/assets/stylesheets/sd/sd/_labels.scss +54 -0
  357. data/vendor/assets/stylesheets/sd/sd/_media.scss +80 -0
  358. data/vendor/assets/stylesheets/sd/sd/_misc.scss +115 -0
  359. data/vendor/assets/stylesheets/sd/sd/_mixins.scss +20 -0
  360. data/vendor/assets/stylesheets/sd/sd/_modal.scss +79 -0
  361. data/vendor/assets/stylesheets/sd/sd/_morphing-buttons.scss +161 -0
  362. data/vendor/assets/stylesheets/sd/sd/_navbars.scss +293 -0
  363. data/vendor/assets/stylesheets/sd/sd/_progress-bars.scss +9 -0
  364. data/vendor/assets/stylesheets/sd/sd/_responsive.scss +302 -0
  365. data/vendor/assets/stylesheets/sd/sd/_sections.scss +12 -0
  366. data/vendor/assets/stylesheets/sd/sd/_sidebar-menu.scss +232 -0
  367. data/vendor/assets/stylesheets/sd/sd/_sliders.scss +218 -0
  368. data/vendor/assets/stylesheets/sd/sd/_social-buttons.scss +76 -0
  369. data/vendor/assets/stylesheets/sd/sd/_tables.scss +110 -0
  370. data/vendor/assets/stylesheets/sd/sd/_tabs-navs-pagination.scss +217 -0
  371. data/vendor/assets/stylesheets/sd/sd/_tags.scss +220 -0
  372. data/vendor/assets/stylesheets/sd/sd/_tooltips-and-popovers.scss +156 -0
  373. data/vendor/assets/stylesheets/sd/sd/_typography.scss +73 -0
  374. data/vendor/assets/stylesheets/sd/sd/_variables.scss +249 -0
  375. data/vendor/assets/stylesheets/sd/sd/mixins/_buttons.scss +76 -0
  376. data/vendor/assets/stylesheets/sd/sd/mixins/_cards.scss +8 -0
  377. data/vendor/assets/stylesheets/sd/sd/mixins/_icons.scss +13 -0
  378. data/vendor/assets/stylesheets/sd/sd/mixins/_inputs.scss +17 -0
  379. data/vendor/assets/stylesheets/sd/sd/mixins/_labels.scss +21 -0
  380. data/vendor/assets/stylesheets/sd/sd/mixins/_morphing-buttons.scss +34 -0
  381. data/vendor/assets/stylesheets/sd/sd/mixins/_navbars.scss +11 -0
  382. data/vendor/assets/stylesheets/sd/sd/mixins/_social-buttons.scss +43 -0
  383. data/vendor/assets/stylesheets/sd/sd/mixins/_tabs.scss +4 -0
  384. data/vendor/assets/stylesheets/sd/sd/mixins/_transparency.scss +20 -0
  385. data/vendor/assets/stylesheets/sd/sd/mixins/_vendor-prefixes.scss +177 -0
  386. metadata +484 -0
@@ -0,0 +1,4 @@
1
+ /*! PhotoSwipe Default UI - 4.1.0 - 2015-09-04
2
+ * http://photoswipe.com
3
+ * Copyright (c) 2015 Dmitry Semenov; */
4
+ !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / "},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.className,g=0;g<S.length;g++)c=S[g],c.onTap&&f.indexOf("pswp__"+c.name)>-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>1200},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),c.href?c.hasAttribute("download")?!0:(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1):!1},H=function(){for(var a,b,c,d,e,f="",g=0;g<q.shareButtons.length;g++)a=q.shareButtons[g],c=q.getImageURLForShare(a),d=q.getPageURLForShare(a),e=q.getTextForShare(a),b=a.url.replace("{{url}}",encodeURIComponent(d)).replace("{{image_url}}",encodeURIComponent(c)).replace("{{raw_image_url}}",c).replace("{{text}}",encodeURIComponent(e)),f+='<a href="'+b+'" target="_blank" class="pswp__share--'+a.id+'"'+(a.download?"download":"")+">"+a.label+"</a>",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c<q.closeElClasses.length;c++)if(b.hasClass(a,"pswp__"+q.closeElClasses[c]))return!0},J=0,K=function(){clearTimeout(u),J=0,k&&v.setIdle(!1)},L=function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement;b&&"HTML"!==b.nodeName||(clearTimeout(u),u=setTimeout(function(){v.setIdle(!0)},q.timeToIdleOutside))},M=function(){q.fullscreenEl&&!b.features.isOldAndroid&&(c||(c=v.getFullscreenAPI()),c?(b.bind(document,c.eventK,v.updateFullscreen),v.updateFullscreen(),b.addClass(a.template,"pswp--supports-fs")):b.removeClass(a.template,"pswp--supports-fs"))},N=function(){q.preloaderEl&&(O(!0),l("beforeChange",function(){clearTimeout(o),o=setTimeout(function(){a.currItem&&a.currItem.loading?(!a.allowProgressiveImg()||a.currItem.img&&!a.currItem.img.naturalWidth)&&O(!1):O(!0)},q.loadingIndicatorDelay)}),l("imageLoadComplete",function(b,c){a.currItem===c&&O(!0)}))},O=function(a){n!==a&&(C(m,"preloader--active",!a),n=a)},P=function(a){var c=a.vGap;if(B()){var g=q.barsSize;if(q.captionEl&&"auto"===g.bottom)if(f||(f=b.createEl("pswp__caption pswp__caption--fake"),f.appendChild(b.createEl("pswp__caption__center")),d.insertBefore(f,e),b.addClass(d,"pswp__ui--fit")),q.addCaptionHTMLFn(a,f,!0)){var h=f.clientHeight;c.bottom=parseInt(h,10)||44}else c.bottom=g.top;else c.bottom="auto"===g.bottom?0:g.bottom;c.top=g.top}else c.top=c.bottom=0},Q=function(){q.timeToIdle&&l("mouseUsed",function(){b.bind(document,"mousemove",K),b.bind(document,"mouseout",L),t=setInterval(function(){J++,2===J&&v.setIdle(!0)},q.timeToIdle/2)})},R=function(){l("onVerticalDrag",function(a){x&&.95>a?v.hideControls():!x&&a>=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&.9>b?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"button--share",option:"shareEl",onInit:function(a){h=a},onTap:function(){F()}},{name:"button--zoom",option:"zoomEl",onTap:a.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(a){g=a}},{name:"button--close",option:"closeEl",onTap:a.close},{name:"button--arrow--left",option:"arrowEl",onTap:a.prev},{name:"button--arrow--right",option:"arrowEl",onTap:a.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(a){m=a}}],T=function(){var a,c,e,f=function(d){if(d)for(var f=d.length,g=0;f>g;g++){a=d[g],c=a.className;for(var h=0;h<S.length;h++)e=S[h],c.indexOf("pswp__"+e.name)>-1&&(q[e.option]?(b.removeClass(a,"pswp__element--disabled"),e.onInit&&e.onInit(a)):b.addClass(a,"pswp__element--disabled"))}};f(d.children);var g=b.getChildByClass(d,"pswp__top-bar");g&&f(g.children)};v.init=function(){b.extend(a.options,z,!0),q=a.options,d=b.getChildByClass(a.scrollWrap,"pswp__ui"),l=a.listen,R(),l("beforeChange",v.update),l("doubleTap",function(b){var c=a.currItem.initialZoomLevel;a.getZoomLevel()!==c?a.zoomTo(c,b,333):a.zoomTo(q.getDoubleTapZoom(!1,a.currItem),b,333)}),l("preventDragEvent",function(a,b,c){var d=a.target||a.srcElement;d&&d.className&&a.type.indexOf("mouse")>-1&&(d.className.indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(d.tagName))&&(c.prevent=!1)}),l("bindEvents",function(){b.bind(d,"pswpTap click",A),b.bind(a.scrollWrap,"pswpTap",v.onGlobalTap),a.likelyTouchDevice||b.bind(a.scrollWrap,"mouseover",v.onMouseOver)}),l("unbindEvents",function(){y||F(),t&&clearInterval(t),b.unbind(document,"mouseout",L),b.unbind(document,"mousemove",K),b.unbind(d,"pswpTap click",A),b.unbind(a.scrollWrap,"pswpTap",v.onGlobalTap),b.unbind(a.scrollWrap,"mouseover",v.onMouseOver),c&&(b.unbind(document,c.eventK,v.updateFullscreen),c.isFullscreen()&&(q.hideAnimationDuration=0,c.exit()),c=null)}),l("destroy",function(){q.captionEl&&(f&&d.removeChild(f),b.removeClass(e,"pswp__caption--empty")),i&&(i.children[0].onclick=null),b.removeClass(d,"pswp__ui--over-close"),b.addClass(d,"pswp__ui--hidden"),v.setIdle(!1)}),q.showAnimationDuration||b.removeClass(d,"pswp__ui--hidden"),l("initialZoomIn",function(){q.showAnimationDuration&&b.removeClass(d,"pswp__ui--hidden")}),l("initialZoomOut",function(){b.addClass(d,"pswp__ui--hidden")}),l("parseVerticalMargin",P),T(),q.shareEl&&h&&i&&(y=!0),D(),Q(),M(),N()},v.setIdle=function(a){k=a,C(d,"ui--idle",a)},v.update=function(){x&&a.currItem?(v.updateIndexIndicator(),q.captionEl&&(q.addCaptionHTMLFn(a.currItem,e),C(e,"caption--empty",!a.currItem.title)),w=!0):w=!1,y||F(),D()},v.updateFullscreen=function(d){d&&setTimeout(function(){a.setScrollOffset(0,b.getScrollY())},50),b[(c.isFullscreen()?"add":"remove")+"Class"](a.template,"pswp--fs")},v.updateIndexIndicator=function(){q.counterEl&&(g.innerHTML=a.getCurrentIndex()+1+q.indexIndicatorSep+q.getNumItemsFn())},v.onGlobalTap=function(c){c=c||window.event;var d=c.target||c.srcElement;if(!r)if(c.detail&&"mouse"===c.detail.pointerType){if(I(d))return void a.close();b.hasClass(d,"pswp__img")&&(1===a.getZoomLevel()&&a.getZoomLevel()<=a.currItem.fitRatio?q.clickToCloseNonZoomable&&a.close():a.toggleDesktopZoom(c.detail.releasePoint))}else if(q.tapToToggleControls&&(x?v.hideControls():v.showControls()),q.tapToClose&&(b.hasClass(d,"pswp__img")||I(d)))return void a.close()},v.onMouseOver=function(a){a=a||window.event;var b=a.target||a.srcElement;C(d,"ui--over-close",I(b))},v.hideControls=function(){b.addClass(d,"pswp__ui--hidden"),x=!1},v.showControls=function(){x=!0,w||v.update(),b.removeClass(d,"pswp__ui--hidden")},v.supportsFullscreen=function(){var a=document;return!!(a.exitFullscreen||a.mozCancelFullScreen||a.webkitExitFullscreen||a.msExitFullscreen)},v.getFullscreenAPI=function(){var b,c=document.documentElement,d="fullscreenchange";return c.requestFullscreen?b={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:d}:c.mozRequestFullScreen?b={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+d}:c.webkitRequestFullscreen?b={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+d}:c.msRequestFullscreen&&(b={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),b&&(b.enter=function(){return j=q.closeOnScroll,q.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?a.template[this.enterK]():void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},b.exit=function(){return q.closeOnScroll=j,document[this.exitK]()},b.isFullscreen=function(){return document[this.elementK]}),b}};return a});
@@ -0,0 +1,4 @@
1
+ /*! PhotoSwipe - v4.1.0 - 2015-08-14
2
+ * http://photoswipe.com
3
+ * Copyright (c) 2015 Dmitry Semenov; */
4
+ !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f<b.length;f++)b[f]&&a[e](b[f],c,!1)},isArray:function(a){return a instanceof Array},createEl:function(a,b){var c=document.createElement(b||"div");return a&&(c.className=a),c},getScrollY:function(){var a=window.pageYOffset;return void 0!==a?a:document.documentElement.scrollTop},unbind:function(a,b,c){e.bind(a,b,c,!0)},removeClass:function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(a,b){e.hasClass(a,b)||(a.className+=(a.className?" ":"")+b)},hasClass:function(a,b){return a.className&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},getChildByClass:function(a,b){for(var c=a.firstChild;c;){if(e.hasClass(c,b))return c;c=c.nextSibling}},arraySearch:function(a,b,c){for(var d=a.length;d--;)if(a[d][c]===b)return d;return-1},extend:function(a,b,c){for(var d in b)if(b.hasOwnProperty(d)){if(c&&a.hasOwnProperty(d))continue;a[d]=b[d]}},easing:{sine:{out:function(a){return Math.sin(a*(Math.PI/2))},inOut:function(a){return-(Math.cos(Math.PI*a)-1)/2}},cubic:{out:function(a){return--a*a*a+1}}},detectFeatures:function(){if(e.features)return e.features;var a=e.createEl(),b=a.style,c="",d={};if(d.oldIE=document.all&&!document.addEventListener,d.touch="ontouchstart"in window,window.requestAnimationFrame&&(d.raf=window.requestAnimationFrame,d.caf=window.cancelAnimationFrame),d.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!d.pointerEvent){var f=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var g=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);g&&g.length>0&&(g=parseInt(g[1],10),g>=1&&8>g&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(4.4>i&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;4>n;n++){c=m[n];for(var o=0;3>o;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;h<b.length;h++)if(e=b[h])if("object"==typeof c&&c.handleEvent){if(d){if(!c["oldIE"+e])return!1}else c["oldIE"+e]=g;a[f]("on"+e,c["oldIE"+e])}else a[f]("on"+e,c)});var f=this,g=25,h=3,i={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(a){return"A"===a.tagName},getDoubleTapZoom:function(a,b){return a?1:b.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};e.extend(i,d);var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la=function(){return{x:0,y:0}},ma=la(),na=la(),oa=la(),pa={},qa=0,ra={},sa=la(),ta=0,ua=!0,va=[],wa={},xa=!1,ya=function(a,b){e.extend(f,b.publicMethods),va.push(a)},za=function(a){var b=_b();return a>b-1?a-b:0>a?b+a:a},Aa={},Ba=function(a,b){return Aa[a]||(Aa[a]=[]),Aa[a].push(b)},Ca=function(a){var b=Aa[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;d<b.length;d++)b[d].apply(f,c)}},Da=function(){return(new Date).getTime()},Ea=function(a){ia=a,f.bg.style.opacity=a*i.bgOpacity},Fa=function(a,b,c,d,e){(!xa||e&&e!==f.currItem)&&(d/=e?e.fitRatio:f.currItem.fitRatio),a[E]=u+b+"px, "+c+"px"+v+" scale("+d+")"},Ga=function(a){da&&(a&&(s>f.currItem.fitRatio?xa||(lc(f.currItem,!1,!0),xa=!0):xa&&(lc(f.currItem),xa=!1)),Fa(da,oa.x,oa.y,s))},Ha=function(a){a.container&&Fa(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ia=function(a,b){b[E]=u+a+"px, 0px"+v},Ja=function(a,b){if(!i.loop&&b){var c=m+(sa.x*qa-a)/sa.x,d=Math.round(a-sb.x);(0>c&&d>0||c>=_b()-1&&0>d)&&(a=sb.x+d*i.mainScrollEndFriction)}sb.x=a,Ia(a,n)},Ka=function(a,b){var c=tb[a]-ra[a];return na[a]+ma[a]+c-c*(b/t)},La=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Ma=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Na=null,Oa=function(){Na&&(e.unbind(document,"mousemove",Oa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Ca("mouseUsed")),Na=setTimeout(function(){Na=null},100)},Pa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Oa),e.bind(window,"resize scroll",f),Ca("bindEvents")},Qa=function(){e.unbind(window,"resize",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Oa),N.transform&&e.unbind(f.scrollWrap,"click",f),U&&e.unbind(window,p,f),Ca("unbindEvents")},Ra=function(a,b){var c=hc(f.currItem,pa,a);return b&&(ca=c),c},Sa=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ta=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Ua=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=Ka(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]<b.max[a]?(c[a]=b.max[a],!0):!1)},Va=function(){if(E){var b=N.perspective&&!G;return u="translate"+(b?"3d(":"("),void(v=N.perspective?", 0px)":")")}E="left",e.addClass(a,"pswp--ie"),Ia=function(a,b){b.left=a+"px"},Ha=function(a){var b=a.fitRatio>1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ga=function(){if(da){var a=da,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=oa.x+"px",a.top=oa.y+"px"}}},Wa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Xa=function(a){a&&(X||W||ea||S)&&(a.preventDefault(),a.stopPropagation())},Ya=function(){f.setScrollOffset(0,e.getScrollY())},Za={},$a=0,_a=function(a){Za[a]&&(Za[a].raf&&I(Za[a].raf),$a--,delete Za[a])},ab=function(a){Za[a]&&_a(a),Za[a]||($a++,Za[a]={})},bb=function(){for(var a in Za)Za.hasOwnProperty(a)&&_a(a)},cb=function(a,b,c,d,e,f,g){var h,i=Da();ab(a);var j=function(){if(Za[a]){if(h=Da()-i,h>=d)return _a(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),Za[a].raf=H(j)}};j()},db={shout:Ca,listen:Ba,viewportSize:pa,options:i,isMainScrollAnimating:function(){return ea},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return U},isZooming:function(){return _},setScrollOffset:function(a,b){ra.x=a,M=ra.y=b,Ca("updateScrollOffset",ra)},applyZoomPan:function(a,b,c,d){oa.x=b,oa.y=c,s=a,Ga(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Va(),r={resize:f.updateSize,scroll:Ya,keydown:Wa,click:Xa};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c<va.length;c++)f["init"+va[c]]();if(b){var g=f.ui=new b(f,e);g.init()}Ca("firstUpdate"),m=m||i.index||0,(isNaN(m)||0>m||m>=_b())&&(m=0),f.currItem=$b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(ua=!1),a.setAttribute("aria-hidden","false"),i.modal&&(ua?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Ca("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ta=null,c=0;h>c;c++)Ia((c+o)*sa.x,y[c].el.style);L||e.bind(f.scrollWrap,q,f),Ba("initialZoomInEnd",function(){f.setContent(y[0],m-1),f.setContent(y[2],m+1),y[0].el.style.display=y[2].el.style.display="block",i.focus&&a.focus(),Pa()}),f.setContent(y[1],m),f.updateCurrItem(),Ca("afterInit"),ua||(w=setInterval(function(){$a||U||_||s!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),e.addClass(a,"pswp--visible")}},close:function(){j&&(j=!1,k=!0,Ca("close"),Qa(),bc(f.currItem,null,!0,f.destroy))},destroy:function(){Ca("destroy"),Wb&&clearTimeout(Wb),a.setAttribute("aria-hidden","true"),a.className=J,w&&clearInterval(w),e.unbind(f.scrollWrap,q,f),e.unbind(window,"scroll",f),yb(),bb(),Aa=null},panTo:function(a,b,c){c||(a>ca.min.x?a=ca.min.x:a<ca.max.x&&(a=ca.max.x),b>ca.min.y?b=ca.min.y:b<ca.max.y&&(b=ca.max.y)),oa.x=a,oa.y=b,Ga()},handleEvent:function(a){a=a||window.event,r[a.type]&&r[a.type](a)},goTo:function(a){a=za(a);var b=a-m;ta=b,m=a,f.currItem=$b(m),qa-=b,Ja(sa.x*qa),bb(),ea=!1,f.updateCurrItem()},next:function(){f.goTo(m+1)},prev:function(){f.goTo(m-1)},updateCurrZoomItem:function(a){if(a&&Ca("beforeChange",0),y[1].el.children.length){var b=y[1].el.children[0];da=e.hasClass(b,"pswp__zoom-wrap")?b.style:null}else da=null;ca=f.currItem.bounds,t=s=f.currItem.initialZoomLevel,oa.x=ca.center.x,oa.y=ca.center.y,a&&Ca("afterChange")},invalidateCurrItems:function(){x=!0;for(var a=0;h>a;a++)y[a].item&&(y[a].item.needsUpdate=!0)},updateCurrItem:function(a){if(0!==ta){var b,c=Math.abs(ta);if(!(a&&2>c)){f.currItem=$b(m),xa=!1,Ca("beforeChange",ta),c>=h&&(o+=ta+(ta>0?-h:h),c=h);for(var d=0;c>d;d++)ta>0?(b=y.shift(),y[h-1]=b,o++,Ia((o+2)*sa.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ia(o*sa.x,b.el.style),f.setContent(b,m+c-d-1-1));if(da&&1===Math.abs(ta)){var e=$b(z);e.initialZoomLevel!==s&&(hc(e,pa),lc(e),Ha(e))}ta=0,f.updateCurrZoomItem(),z=m,Ca("afterChange")}}},updateSize:function(b){if(!ua&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&wa.x===window.innerWidth&&wa.y===window.innerHeight)return;wa.x=window.innerWidth,wa.y=window.innerHeight,a.style.height=wa.y+"px"}if(pa.x=f.scrollWrap.clientWidth,pa.y=f.scrollWrap.clientHeight,Ya(),sa.x=pa.x+Math.round(pa.x*i.spacing),sa.y=pa.y,Ja(sa.x*qa),Ca("beforeResize"),void 0!==o){for(var d,g,j,k=0;h>k;k++)d=y[k],Ia((k+o)*sa.x,d.el.style),j=m+k-1,i.loop&&_b()>2&&(j=za(j)),g=$b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):-1===d.index&&j>=0&&f.setContent(d,j),g&&g.container&&(hc(g,pa),lc(g),Ha(g));x=!1}t=s=f.currItem.initialZoomLevel,ca=f.currItem.bounds,ca&&(oa.x=ca.center.x,oa.y=ca.center.y,Ga(!0)),Ca("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,tb.x=Math.abs(b.x)-oa.x,tb.y=Math.abs(b.y)-oa.y,La(na,oa));var g=Ra(a,!1),h={};Ua("x",g,h,a),Ua("y",g,h,a);var i=s,j={x:oa.x,y:oa.y};Ma(h);var k=function(b){1===b?(s=a,oa.x=h.x,oa.y=h.y):(s=(a-i)*b+i,oa.x=(h.x-j.x)*b+j.x,oa.y=(h.y-j.y)*b+j.y),f&&f(b),Ga(1===b)};c?cb("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},eb=30,fb=10,gb={},hb={},ib={},jb={},kb={},lb=[],mb={},nb=[],ob={},pb=0,qb=la(),rb=0,sb=la(),tb=la(),ub=la(),vb=function(a,b){return a.x===b.x&&a.y===b.y},wb=function(a,b){return Math.abs(a.x-b.x)<g&&Math.abs(a.y-b.y)<g},xb=function(a,b){return ob.x=Math.abs(a.x-b.x),ob.y=Math.abs(a.y-b.y),Math.sqrt(ob.x*ob.x+ob.y*ob.y)},yb=function(){Y&&(I(Y),Y=null)},zb=function(){U&&(Y=H(zb),Pb())},Ab=function(){return!("fit"===i.scaleMode&&s===f.currItem.initialZoomLevel)},Bb=function(a,b){return a?a.className&&a.className.indexOf("pswp__scroll-wrap")>-1?!1:b(a)?a:Bb(a.parentNode,b):!1},Cb={},Db=function(a,b){return Cb.prevent=!Bb(a.target,i.isClickableElement),Ca("preventDragEvent",a,b,Cb),Cb.prevent},Eb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Fb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Gb=function(a,b,c){if(a-P>50){var d=nb.length>2?nb.shift():{};d.x=b,d.y=c,nb.push(d),P=a}},Hb=function(){var a=oa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(pa.y/2))},Ib={},Jb={},Kb=[],Lb=function(a){for(;Kb.length>0;)Kb.pop();return F?(ka=0,lb.forEach(function(a){0===ka?Kb[0]=a:1===ka&&(Kb[1]=a),ka++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Kb[0]=Eb(a.touches[0],Ib),a.touches.length>1&&(Kb[1]=Eb(a.touches[1],Jb))):(Ib.x=a.pageX,Ib.y=a.pageY,Ib.id="",Kb[0]=Ib),Kb},Mb=function(a,b){var c,d,e,g,h=0,j=oa[a]+b[a],k=b[a]>0,l=sb.x+b.x,m=sb.x-mb.x;return c=j>ca.min[a]||j<ca.max[a]?i.panEndFriction:1,j=oa[a]+b[a]*c,!i.allowPanToNext&&s!==f.currItem.initialZoomLevel||(da?"h"!==fa||"x"!==a||W||(k?(j>ca.min[a]&&(c=i.panEndFriction,h=ca.min[a]-j,d=ca.min[a]-na[a]),(0>=d||0>m)&&_b()>1?(g=l,0>m&&l>mb.x&&(g=mb.x)):ca.min.x!==ca.max.x&&(e=j)):(j<ca.max[a]&&(c=i.panEndFriction,h=j-ca.max[a],d=na[a]-ca.max[a]),(0>=d||m>0)&&_b()>1?(g=l,m>0&&l<mb.x&&(g=mb.x)):ca.min.x!==ca.max.x&&(e=j))):g=l,"x"!==a)?void(ea||Z||s>f.currItem.fitRatio&&(oa[a]+=b[a]*c)):(void 0!==g&&(Ja(g,!0),Z=g===mb.x?!1:!0),ca.min.x!==ca.max.x&&(void 0!==e?oa.x=e:Z||(oa.x+=b.x*c)),void 0!==g)},Nb=function(a){if(!("mousedown"===a.type&&a.button>0)){if(Zb)return void a.preventDefault();if(!T||"mousedown"!==a.type){if(Db(a,!0)&&a.preventDefault(),Ca("pointerDown"),F){var b=e.arraySearch(lb,a.pointerId,"id");0>b&&(b=lb.length),lb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Lb(a),d=c.length;$=null,bb(),U&&1!==d||(U=ga=!0,e.bind(window,p,f),R=ja=ha=S=Z=X=V=W=!1,fa=null,Ca("firstTouchStart",c),La(na,oa),ma.x=ma.y=0,La(jb,c[0]),La(kb,jb),mb.x=sa.x*qa,nb=[{x:jb.x,y:jb.y}],P=O=Da(),Ra(s,!0),yb(),zb()),!_&&d>1&&!ea&&!Z&&(t=s,W=!1,_=V=!0,ma.y=ma.x=0,La(na,oa),La(gb,c[0]),La(hb,c[1]),Fb(gb,hb,ub),tb.x=Math.abs(ub.x)-oa.x,tb.y=Math.abs(ub.y)-oa.y,aa=ba=xb(gb,hb))}}},Ob=function(a){if(a.preventDefault(),F){var b=e.arraySearch(lb,a.pointerId,"id");if(b>-1){var c=lb[b];c.x=a.pageX,c.y=a.pageY}}if(U){var d=Lb(a);if(fa||X||_)$=d;else if(sb.x!==sa.x*qa)fa="h";else{var f=Math.abs(d[0].x-jb.x)-Math.abs(d[0].y-jb.y);Math.abs(f)>=fb&&(fa=f>0?"h":"v",$=d)}}},Pb=function(){if($){var a=$.length;if(0!==a)if(La(gb,$[0]),ib.x=gb.x-jb.x,ib.y=gb.y-jb.y,_&&a>1){if(jb.x=gb.x,jb.y=gb.y,!ib.x&&!ib.y&&vb($[1],hb))return;La(hb,$[1]),W||(W=!0,Ca("zoomGestureStarted"));var b=xb(gb,hb),c=Ub(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ja=!0);var d=1,e=Sa(),g=Ta();if(e>c)if(i.pinchToClose&&!ja&&t<=f.currItem.initialZoomLevel){var h=e-c,j=1-h/(e/1.2);Ea(j),Ca("onPinchClose",j),ha=!0}else d=(e-c)/e,d>1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);0>d&&(d=0),aa=b,Fb(gb,hb,qb),ma.x+=qb.x-ub.x,ma.y+=qb.y-ub.y,La(ub,qb),oa.x=Ka("x",c),oa.y=Ka("y",c),R=c>s,s=c,Ga()}else{if(!fa)return;if(ga&&(ga=!1,Math.abs(ib.x)>=fb&&(ib.x-=$[0].x-kb.x),Math.abs(ib.y)>=fb&&(ib.y-=$[0].y-kb.y)),jb.x=gb.x,jb.y=gb.y,0===ib.x&&0===ib.y)return;if("v"===fa&&i.closeOnVerticalDrag&&!Ab()){ma.y+=ib.y,oa.y+=ib.y;var k=Hb();return S=!0,Ca("onVerticalDrag",k),Ea(k),void Ga()}Gb(Da(),gb.x,gb.y),X=!0,ca=f.currItem.bounds;var l=Mb("x",ib);l||(Mb("y",ib),Ma(oa),Ga())}}},Qb=function(a){if(N.isOldAndroid){if(T&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(T),T=setTimeout(function(){T=0},600))}Ca("pointerUp"),Db(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(lb,a.pointerId,"id");if(c>-1)if(b=lb.splice(c,1)[0],navigator.pointerEnabled)b.type=a.pointerType||"mouse";else{var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}}var g,h=Lb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return $=null,!0;1===j&&La(kb,h[0]),0!==j||fa||ea||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Ca("touchRelease",a,b));var k=-1;if(0===j&&(U=!1,e.unbind(window,p,f),yb(),_?k=0:-1!==rb&&(k=Da()-rb)),rb=1===j?Da():-1,g=-1!==k&&150>k?"zoom":"swipe",_&&2>j&&(_=!1,1===j&&(g="zoomPointerUp"),Ca("zoomGestureEnded")),$=null,X||W||ea||S)if(bb(),Q||(Q=Rb()),Q.calculateSwipeSpeed("x"),S){var l=Hb();if(l<i.verticalDragRange)f.close();else{var m=oa.y,n=ia;cb("verticalDrag",0,1,300,e.easing.cubic.out,function(a){oa.y=(f.currItem.initialPosition.y-m)*a+m,Ea((1-n)*a+n),Ga()}),Ca("onVerticalDrag",1)}}else{if((Z||ea)&&0===j){var o=Tb(g,Q);if(o)return;g="zoomPointerUp"}if(!ea)return"swipe"!==g?void Vb():void(!Z&&s>f.currItem.fitRatio&&Sb(Q))}},Rb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){nb.length>1?(a=Da()-P+50,b=nb[nb.length-2][d]):(a=Da()-O,b=kb[d]),c.lastFlickOffset[d]=jb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(oa[a]>ca.min[a]?c.backAnimDestination[a]=ca.min[a]:oa[a]<ca.max[a]&&(c.backAnimDestination[a]=ca.max[a]),void 0!==c.backAnimDestination[a]&&(c.slowDownRatio[a]=.7,c.slowDownRatioReverse[a]=1-c.slowDownRatio[a],c.speedDecelerationRatioAbs[a]<.05&&(c.lastFlickSpeed[a]=0,c.backAnimStarted[a]=!0,cb("bounceZoomPan"+a,oa[a],c.backAnimDestination[a],b||300,e.easing.sine.out,function(b){oa[a]=b,Ga()}))))},calculateAnimOffset:function(a){c.backAnimStarted[a]||(c.speedDecelerationRatio[a]=c.speedDecelerationRatio[a]*(c.slowDownRatio[a]+c.slowDownRatioReverse[a]-c.slowDownRatioReverse[a]*c.timeDiff/10),c.speedDecelerationRatioAbs[a]=Math.abs(c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]),c.distanceOffset[a]=c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]*c.timeDiff,oa[a]+=c.distanceOffset[a])},panAnimLoop:function(){return Za.zoomPan&&(Za.zoomPan.raf=H(c.panAnimLoop),c.now=Da(),c.timeDiff=c.now-c.lastNow,c.lastNow=c.now,c.calculateAnimOffset("x"),c.calculateAnimOffset("y"),Ga(),c.calculateOverBoundsAnimOffset("x"),c.calculateOverBoundsAnimOffset("y"),c.speedDecelerationRatioAbs.x<.05&&c.speedDecelerationRatioAbs.y<.05)?(oa.x=Math.round(oa.x),oa.y=Math.round(oa.y),Ga(),void _a("zoomPan")):void 0}};return c},Sb=function(a){return a.calculateSwipeSpeed("y"),ca=f.currItem.bounds,a.backAnimDestination={},a.backAnimStarted={},Math.abs(a.lastFlickSpeed.x)<=.05&&Math.abs(a.lastFlickSpeed.y)<=.05?(a.speedDecelerationRatioAbs.x=a.speedDecelerationRatioAbs.y=0,a.calculateOverBoundsAnimOffset("x"),a.calculateOverBoundsAnimOffset("y"),!0):(ab("zoomPan"),a.lastNow=Da(),void a.panAnimLoop())},Tb=function(a,b){var c;ea||(pb=m);var d;if("swipe"===a){var g=jb.x-kb.x,h=b.lastFlickDist.x<10;g>eb&&(h||b.lastFlickOffset.x>20)?d=-1:-eb>g&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,0>m?(m=i.loop?_b()-1:0,j=!0):m>=_b()&&(m=i.loop?0:_b()-1,j=!0),(!j||i.loop)&&(ta+=d,qa-=d,c=!0));var k,l=sa.x*qa,n=Math.abs(l-sb.x);return c||l>sb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,pb===m&&(c=!1),ea=!0,Ca("mainScrollAnimStart"),cb("mainScroll",sb.x,l,k,e.easing.cubic.out,Ja,function(){bb(),ea=!1,pb=-1,(c||pb!==m)&&f.updateCurrItem(),Ca("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Ub=function(a){return 1/ba*a*t},Vb=function(){var a=s,b=Sa(),c=Ta();b>s?a=b:s>c&&(a=c);var d,g=1,h=ia;return ha&&!R&&!ja&&b>s?(f.close(),!0):(ha&&(d=function(a){Ea((g-h)*a+h)}),f.zoomTo(a,0,200,e.easing.cubic.out,d),!0)};ya("Gestures",{publicMethods:{initGestures:function(){var a=function(a,b,c,d,e){A=a+b,B=a+c,C=a+d,D=e?a+e:""};F=N.pointerEvent,F&&N.touch&&(N.touch=!1),F?navigator.pointerEnabled?a("pointer","down","move","up","cancel"):a("MSPointer","Down","Move","Up","Cancel"):N.touch?(a("touch","start","move","end","cancel"),G=!0):a("mouse","down","move","up"),p=B+" "+C+" "+D,q=A,F&&!G&&(G=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Nb,r[B]=Ob,r[C]=Qb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Wb,Xb,Yb,Zb,$b,_b,ac,bc=function(b,c,d,g){Wb&&clearTimeout(Wb),Zb=!0,Yb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){_a("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Ea(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Ca("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),Zb=!1};if(!j||!h||void 0===h.x)return Ca("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,La(oa,b.initialPosition),Ga(),a.style.opacity=d?0:1,Ea(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,oa.x=h.x,oa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ga()),ab("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Wb=setTimeout(function(){if(Ca("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:oa.x,y:oa.y},l=s,m=ia,n=function(b){1===b?(s=f,oa.x=h.x,oa.y=h.y-M):(s=(f-l)*b+l,oa.x=(h.x-i.x)*b+i.x,oa.y=(h.y-M-i.y)*b+i.y),Ga(),g?a.style.opacity=1-b:Ea(m-b*m)};c?cb("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Wb=setTimeout(k,j+20))}else s=b.initialZoomLevel,La(oa,b.initialPosition),Ga(),Ea(1),g?a.style.opacity=1:Ea(1),Wb=setTimeout(k,j+20)},d?25:90)};n()},cc={},dc=[],ec={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Xb.length}},fc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},gc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((cc.x-b)/2),d.center.y=Math.round((cc.y-c)/2)+a.vGap.top,d.max.x=b>cc.x?Math.round(cc.x-b):d.center.x,d.max.y=c>cc.y?Math.round(cc.y-c)+a.vGap.top:d.center.y,d.min.x=b>cc.x?0:d.center.x,d.min.y=c>cc.y?a.vGap.top:d.center.y},hc=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Ca("parseVerticalMargin",a)),cc.x=b.x,cc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=cc.x/a.w,f=cc.y/a.h;a.fitRatio=f>e?e:f;var g=i.scaleMode;"orig"===g?c=1:"fit"===g&&(c=a.fitRatio),c>1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=fc())}if(!c)return;return gc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=fc(),a.initialPosition=a.bounds.center,a.bounds},ic=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,lc(b,d,b===f.currItem&&xa),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},jc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},kc=function(a,b){return a.src&&a.loadError&&a.container?(b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0):void 0},lc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},mc=function(){if(dc.length){for(var a,b=0;b<dc.length;b++)a=dc[b],a.holder.index===a.index&&ic(a.index,a.item,a.baseDiv,a.img,!1,a.clearPlaceholder);dc=[]}};ya("Controller",{publicMethods:{lazyLoadItem:function(a){a=za(a);var b=$b(a);b&&(!b.loaded&&!b.loading||x)&&(Ca("gettingData",a,b),b.src&&jc(b))},initController:function(){e.extend(i,ec,!0),f.items=Xb=c,$b=f.getItemAt,_b=i.getNumItemsFn,ac=i.loop,_b()<3&&(i.loop=!1),Ba("beforeChange",function(a){var b,c=i.preload,d=null===a?!0:a>=0,e=Math.min(c[0],_b()),g=Math.min(c[1],_b());for(b=1;(d?g:e)>=b;b++)f.lazyLoadItem(m+b);for(b=1;(d?e:g)>=b;b++)f.lazyLoadItem(m-b)}),Ba("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ba("mainScrollAnimComplete",mc),Ba("initialZoomInEnd",mc),Ba("destroy",function(){for(var a,b=0;b<Xb.length;b++)a=Xb[b],a.container&&(a.container=null),a.placeholder&&(a.placeholder=null),a.img&&(a.img=null),a.preloader&&(a.preloader=null),a.loadError&&(a.loaded=a.loadError=!1);dc=null})},getItemAt:function(a){return a>=0&&void 0!==Xb[a]?Xb[a]:!1},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=za(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Ca("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),kc(g),hc(g,pa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,lc(g,d),ic(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(kc(c,!0))return c.loadComplete=c.img=null,hc(c,pa),Ha(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!Zb&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(ea||Zb)?dc.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):ic(b,c,h,c.img,ea||Zb,!0)}c.loadComplete=null,c.img=null,Ca("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),lc(g,l),h.appendChild(l),g.placeholder=l}g.loading||jc(g),f.allowProgressiveImg()&&(!Yb&&N.transform?dc.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):ic(b,g,h,g.img,!0,!0))}Yb||b!==m?Ha(g):(da=h.style,bc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var nc,oc={},pc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};ya("Tap",{publicMethods:{initTap:function(){Ba("firstTouchStart",f.onTapStart),Ba("touchRelease",f.onTapRelease),Ba("destroy",function(){oc={},nc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(nc),nc=null)},onTapRelease:function(a,b){if(b&&!X&&!V&&!$a){var c=b;if(nc&&(clearTimeout(nc),nc=null,wb(c,oc)))return void Ca("doubleTap",c);if("mouse"===b.type)return void pc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void pc(a,b);La(oc,c),nc=setTimeout(function(){pc(a,b),nc=null},300)}}}});var qc;ya("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ba("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){qc={};var c="wheel mousewheel DOMMouseScroll";Ba("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ba("unbindEvents",function(){qc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),1>s?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ba("resize",g),Ba("afterChange",g),Ba("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ba("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||$a||U?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),qc.x=0,"deltaX"in a)1===a.deltaMode?(qc.x=18*a.deltaX,qc.y=18*a.deltaY):(qc.x=a.deltaX,qc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(qc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?qc.y=-.16*a.wheelDeltaY:qc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;qc.y=a.detail}Ra(s,!0);var b=oa.x-qc.x,c=oa.y-qc.y;(i.modal||b<=ca.min.x&&b>=ca.max.x&&c<=ca.min.y&&c>=ca.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:pa.x/2+ra.x,y:pa.y/2+ra.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var rc,sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc={history:!0,galleryUID:1},Ec=function(){return Bc.hash.substring(1)},Fc=function(){rc&&clearTimeout(rc),tc&&clearTimeout(tc)},Gc=function(){var a=Ec(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c<d.length;c++)if(d[c]){var e=d[c].split("=");e.length<2||(b[e[0]]=e[1])}if(i.galleryPIDs){var f=b.pid;for(b.pid=0,c=0;c<Xb.length;c++)if(Xb[c].pid===f){b.pid=c;break}}else b.pid=parseInt(b.pid,10)-1;return b.pid<0&&(b.pid=0),b},Hc=function(){if(tc&&clearTimeout(tc),$a||U)return void(tc=setTimeout(Hc,500));uc?clearTimeout(sc):uc=!0;var a=m+1,b=$b(m);b.hasOwnProperty("pid")&&(a=b.pid);var c=xc+"&gid="+i.galleryUID+"&pid="+a;yc||-1===Bc.hash.indexOf(c)&&(Ac=!0);var d=Bc.href.split("#")[0]+"#"+c;Cc?"#"+c!==window.location.hash&&history[yc?"replaceState":"pushState"]("",document.title,d):yc?Bc.replace(d):Bc.hash=c,yc=!0,sc=setTimeout(function(){uc=!1},60)};ya("History",{publicMethods:{initHistory:function(){if(e.extend(i,Dc,!0),i.history){Bc=window.location,Ac=!1,zc=!1,yc=!1,xc=Ec(),Cc="pushState"in history,xc.indexOf("gid=")>-1&&(xc=xc.split("&gid=")[0],xc=xc.split("?gid=")[0]),Ba("afterChange",f.updateURL),Ba("unbindEvents",function(){e.unbind(window,"hashchange",f.onHashChange)});var a=function(){wc=!0,zc||(Ac?history.back():xc?Bc.hash=xc:Cc?history.pushState("",document.title,Bc.pathname+Bc.search):Bc.hash=""),Fc()};Ba("unbindEvents",function(){l&&a()}),Ba("destroy",function(){wc||a()}),Ba("firstUpdate",function(){m=Gc().pid});var b=xc.indexOf("pid=");b>-1&&(xc=xc.substring(0,b),"&"===xc.slice(-1)&&(xc=xc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Ec()===xc?(zc=!0,void f.close()):void(uc||(vc=!0,f.goTo(Gc().pid),vc=!1))},updateURL:function(){Fc(),vc||(yc?rc=setTimeout(Hc,800):Hc())}}}),e.extend(f,db)};return a});
@@ -0,0 +1,233 @@
1
+ /*
2
+ * atvImg
3
+ * Copyright 2015 Drew Wilson
4
+ * http://drewwilson.com
5
+ *
6
+ * Version 1.1 - Updated: Oct. 26, 2015
7
+ *
8
+ * atvImg = 'AppleTV Image'
9
+ *
10
+ * This plug-in will automatically turn your layered Apple TV PNGs into
11
+ * 3D parallax icons, the same way the new Apple TV treats app icons.
12
+ * You can have any number of AppleTV Images on the page.
13
+ *
14
+ * An example of this plug-in can bee seen here: http://kloc.pm
15
+ *
16
+ * -------------------
17
+ *
18
+ * Here is how to setup the HTML for a single atvImg:
19
+ * <div class="atvImg">
20
+ * <img src="/images/flattened-icon.jpg">
21
+ *
22
+ * <div class="atvImg-layer" data-img="/images/back.png"></div>
23
+ * <div class="atvImg-layer" data-img="/images/front.png"></div>
24
+ * </div>
25
+ *
26
+ * You can have any number of 'atvImg-layer' elements. So add as many
27
+ * as your icon needs. Be sure to use 2x (retina) scale PNGs. The plug-in
28
+ * will downscale for 1x screens. Using 2x scale PNGs is recommended
29
+ * so the icon will appear crisp on 2x screens.
30
+ * Layer images should be 2x the size you want to display the icon as.
31
+ * The plug-in will adapt the atvImg to be whatever size it's parent
32
+ * element is. So if you set your '.atvImg' element to be 320px X 190px,
33
+ * that is how big the icon will appear. If you set it to be
34
+ * 640px X 380px, that is how big it will appear. Just be sure to
35
+ * use the correct aspect ratio for AppleTV icons.
36
+ *
37
+ * The <img> element in the example above is a fallback in case
38
+ * javascript is not allowed to run. It will be removed when the plug-in
39
+ * is running. Put a flattened version (no layers) of you icon in there.
40
+ *
41
+ * Then call the funciton in you <script> tag or JS file like this:
42
+ *
43
+ * atvImg();
44
+ *
45
+ *
46
+ * Just be sure you add that line after you've loaded the DOM. So put
47
+ * it below all your page's HTML just before the closing </body> tag or
48
+ * in a document.ready() function.
49
+ *
50
+ * -------------------
51
+ *
52
+ * This atvImg plug-in is dual licensed under the MIT and GPL licenses:
53
+ * http://www.opensource.org/licenses/mit-license.php
54
+ * http://www.gnu.org/licenses/gpl.html
55
+ *
56
+ * I used http://designmodo.com/apple-tv-effect as reference and
57
+ * inspiration when creating this plug-in.
58
+ */
59
+
60
+ function debounceAtv(func, wait, immediate) {
61
+ var timeout;
62
+ return function() {
63
+ var context = this, args = arguments;
64
+ clearTimeout(timeout);
65
+ timeout = setTimeout(function() {
66
+ timeout = null;
67
+ if (!immediate) func.apply(context, args);
68
+ }, wait);
69
+ if (immediate && !timeout) func.apply(context, args);
70
+ };
71
+ };
72
+
73
+ function atvImg(){
74
+
75
+ var d = document,
76
+ de = d.documentElement,
77
+ bd = d.getElementsByTagName('body')[0],
78
+ win = window,
79
+ imgs = d.querySelectorAll('.atvImg'),
80
+ totalImgs = imgs.length,
81
+ supportsTouch = 'ontouchstart' in win || navigator.msMaxTouchPoints;
82
+
83
+ if(totalImgs <= 0){
84
+ return;
85
+ }
86
+
87
+ // build HTML
88
+ for(var l=0;l<totalImgs;l++){
89
+
90
+ var thisImg = imgs[l],
91
+ layerElems = thisImg.querySelectorAll('.atvImg-layer'),
92
+ totalLayerElems = layerElems.length;
93
+
94
+ if(totalLayerElems <= 0){
95
+ continue;
96
+ }
97
+
98
+ while(thisImg.firstChild) {
99
+ thisImg.removeChild(thisImg.firstChild);
100
+ }
101
+
102
+ var containerHTML = d.createElement('div'),
103
+ shineHTML = d.createElement('div'),
104
+ shadowHTML = d.createElement('div'),
105
+ layersHTML = d.createElement('div'),
106
+ layers = [];
107
+
108
+ thisImg.id = 'atvImg__'+l;
109
+ containerHTML.className = 'atvImg-container';
110
+ shineHTML.className = 'atvImg-shine';
111
+ shadowHTML.className = 'atvImg-shadow';
112
+ layersHTML.className = 'atvImg-layers';
113
+
114
+ for(var i=0;i<totalLayerElems;i++){
115
+ var layer = d.createElement('div'),
116
+ imgSrc = layerElems[i].getAttribute('data-img');
117
+
118
+ layer.className = 'atvImg-rendered-layer';
119
+ layer.setAttribute('data-layer',i);
120
+ layer.style.backgroundImage = 'url('+imgSrc+')';
121
+ layersHTML.appendChild(layer);
122
+
123
+ layers.push(layer);
124
+ }
125
+
126
+ containerHTML.appendChild(shadowHTML);
127
+ containerHTML.appendChild(layersHTML);
128
+ containerHTML.appendChild(shineHTML);
129
+ thisImg.appendChild(containerHTML);
130
+
131
+ var w = thisImg.clientWidth || thisImg.offsetWidth || thisImg.scrollWidth;
132
+ thisImg.style.transform = 'perspective('+ w*3 +'px)';
133
+
134
+ if(supportsTouch){
135
+ win.preventScroll = false;
136
+
137
+ (function(_thisImg,_layers,_totalLayers,_shine) {
138
+ thisImg.addEventListener('touchmove', function(e){
139
+ if (win.preventScroll){
140
+ e.preventDefault();
141
+ }
142
+ processMovement(e,true,_thisImg,_layers,_totalLayers,_shine);
143
+ });
144
+ thisImg.addEventListener('touchstart', function(e){
145
+ win.preventScroll = true;
146
+ processEnter(e,_thisImg);
147
+ });
148
+ thisImg.addEventListener('touchend', function(e){
149
+ win.preventScroll = false;
150
+ processExit(e,_thisImg,_layers,_totalLayers,_shine);
151
+ });
152
+ })(thisImg,layers,totalLayerElems,shineHTML);
153
+ } else {
154
+ (function(_thisImg,_layers,_totalLayers,_shine) {
155
+ thisImg.addEventListener('mousemove', function(e){
156
+ processMovement(e,false,_thisImg,_layers,_totalLayers,_shine);
157
+ });
158
+ thisImg.addEventListener('mouseenter', function(e){
159
+ processEnter(e,_thisImg);
160
+ });
161
+ thisImg.addEventListener('mouseleave', function(e){
162
+ processExit(e,_thisImg,_layers,_totalLayers,_shine);
163
+ });
164
+ })(thisImg,layers,totalLayerElems,shineHTML);
165
+ }
166
+ }
167
+
168
+ processMovement = debounceAtv(function(e, touchEnabled, elem, layers, totalLayers, shine){
169
+ var bdst = $(window).scrollTop(),
170
+ bdsl = bd.scrollLeft,
171
+ pageX = (touchEnabled)? e.touches[0].pageX : e.pageX,
172
+ pageY = (touchEnabled)? e.touches[0].pageY : e.pageY,
173
+ offsets = elem.getBoundingClientRect(),
174
+ w = elem.clientWidth || elem.offsetWidth || elem.scrollWidth, // width
175
+ h = elem.clientHeight || elem.offsetHeight || elem.scrollHeight, // height
176
+ wMultiple = 320/w,
177
+ offsetX = 0.52 - (pageX - offsets.left - bdsl)/w, //cursor position X
178
+ offsetY = 0.52 - (pageY - offsets.top - bdst)/h, //cursor position Y
179
+ dy = (pageY - offsets.top - bdst) - h / 2, //@h/2 = center of container
180
+ dx = (pageX - offsets.left - bdsl) - w / 2, //@w/2 = center of container
181
+ yRotate = (offsetX - dx)*(0.07 * wMultiple), //rotation for container Y
182
+ xRotate = (dy - offsetY)*(0.1 * wMultiple); //rotation for container X
183
+
184
+ //xRotate = xRotate - 140;
185
+ imgCSS = 'rotateX(' + xRotate + 'deg) rotateY(' + yRotate + 'deg)' //img transform
186
+ arad = Math.atan2(dy, dx), //angle between cursor and center of container in RAD
187
+ angle = arad * 180 / Math.PI - 90; //convert rad in degrees
188
+
189
+ //get angle between 0-360
190
+ if (angle < 0) {
191
+ angle = angle + 360;
192
+ }
193
+
194
+ //container transform
195
+ if(elem.firstChild.className.indexOf(' over') != -1){
196
+ imgCSS += ' scale3d(1.07,1.07,1.07)';
197
+ }
198
+ elem.firstChild.style.transform = imgCSS;
199
+
200
+ //gradient angle and opacity for shine
201
+ //shine.style.background = 'linear-gradient(' + angle + 'deg, rgba(255,255,255,' + (pageY - offsets.top - bdst)/h * 0.4 + ') 0%,rgba(255,255,255,0) 80%)';
202
+ //shine.style.transform = 'translateX(' + (offsetX * totalLayers) - 0.1 + 'px) translateY(' + (offsetY * totalLayers) - 0.1 + 'px)';
203
+
204
+ //parallax for each layer
205
+ var revNum = totalLayers;
206
+ for(var ly=0;ly<totalLayers;ly++){
207
+ layers[ly].style.transform = 'translateX(' + (offsetX * revNum) * ((ly * 2.5) / wMultiple) + 'px) translateY(' + (offsetY * totalLayers) * ((ly * 2.5) / wMultiple) + 'px)';
208
+ revNum--;
209
+ }
210
+ }, 5);
211
+
212
+ function processEnter(e, elem){
213
+ elem.firstChild.className += ' over';
214
+ }
215
+
216
+ function processExit(e, elem, layers, totalLayers, shine){
217
+ var container = elem.firstChild;
218
+
219
+ setTimeout(function(){
220
+ container.className = container.className.replace(' over','');
221
+ container.style.transform = '';
222
+ shine.style.cssText = '';
223
+
224
+ for(var ly=0;ly<totalLayers;ly++){
225
+ layers[ly].style.transform = '';
226
+ }
227
+
228
+ }, 50);
229
+
230
+
231
+ }
232
+
233
+ }
@@ -0,0 +1,585 @@
1
+ /*!
2
+ * Sharrre.com - Make your sharing widget!
3
+ * Version: beta 1.3.5
4
+ * Author: Julien Hany
5
+ * License: MIT http://en.wikipedia.org/wiki/MIT_License or GPLv2 http://en.wikipedia.org/wiki/GNU_General_Public_License
6
+ */
7
+
8
+ ;(function ( $, window, document, undefined ) {
9
+
10
+ /* Defaults
11
+ ================================================== */
12
+ var pluginName = 'sharrre',
13
+ defaults = {
14
+ className: 'sharrre',
15
+ share: {
16
+ googlePlus: false,
17
+ facebook: false,
18
+ twitter: false,
19
+ digg: false,
20
+ delicious: false,
21
+ stumbleupon: false,
22
+ linkedin: false,
23
+ pinterest: false
24
+ },
25
+ shareTotal: 0,
26
+ template: '',
27
+ title: '',
28
+ url: document.location.href,
29
+ text: document.title,
30
+ urlCurl: 'sharrre.php', //PHP script for google plus...
31
+ count: {}, //counter by social network
32
+ total: 0, //total of sharing
33
+ shorterTotal: true, //show total by k or M when number is to big
34
+ enableHover: true, //disable if you want to personalize hover event with callback
35
+ enableCounter: true, //disable if you just want use buttons
36
+ enableTracking: false, //tracking with google analitycs
37
+ hover: function(){}, //personalize hover event with this callback function
38
+ hide: function(){}, //personalize hide event with this callback function
39
+ click: function(){}, //personalize click event with this callback function
40
+ render: function(){}, //personalize render event with this callback function
41
+ buttons: { //settings for buttons
42
+ googlePlus : { //http://www.google.com/webmasters/+1/button/
43
+ url: '', //if you need to personnalize button url
44
+ urlCount: false, //if you want to use personnalize button url on global counter
45
+ size: 'medium',
46
+ lang: 'en-US',
47
+ annotation: ''
48
+ },
49
+ facebook: { //http://developers.facebook.com/docs/reference/plugins/like/
50
+ url: '', //if you need to personalize url button
51
+ urlCount: false, //if you want to use personnalize button url on global counter
52
+ action: 'like',
53
+ layout: 'button_count',
54
+ width: '',
55
+ send: 'false',
56
+ faces: 'false',
57
+ colorscheme: '',
58
+ font: '',
59
+ lang: 'en_US'
60
+ },
61
+ twitter: { //http://twitter.com/about/resources/tweetbutton
62
+ url: '', //if you need to personalize url button
63
+ urlCount: false, //if you want to use personnalize button url on global counter
64
+ count: 'horizontal',
65
+ hashtags: '',
66
+ via: '',
67
+ related: '',
68
+ lang: 'en'
69
+ },
70
+ digg: { //http://about.digg.com/downloads/button/smart
71
+ url: '', //if you need to personalize url button
72
+ urlCount: false, //if you want to use personnalize button url on global counter
73
+ type: 'DiggCompact'
74
+ },
75
+ delicious: {
76
+ url: '', //if you need to personalize url button
77
+ urlCount: false, //if you want to use personnalize button url on global counter
78
+ size: 'medium' //medium or tall
79
+ },
80
+ stumbleupon: { //http://www.stumbleupon.com/badges/
81
+ url: '', //if you need to personalize url button
82
+ urlCount: false, //if you want to use personnalize button url on global counter
83
+ layout: '1'
84
+ },
85
+ linkedin: { //http://developer.linkedin.com/plugins/share-button
86
+ url: '', //if you need to personalize url button
87
+ urlCount: false, //if you want to use personnalize button url on global counter
88
+ counter: ''
89
+ },
90
+ pinterest: { //http://pinterest.com/about/goodies/
91
+ url: '', //if you need to personalize url button
92
+ media: '',
93
+ description: '',
94
+ layout: 'horizontal'
95
+ }
96
+ }
97
+ },
98
+ /* Json URL to get count number
99
+ ================================================== */
100
+ urlJson = {
101
+ googlePlus: "",
102
+
103
+ //new FQL method by Sire
104
+ facebook: "https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?",
105
+ //old method facebook: "http://graph.facebook.com/?id={url}&callback=?",
106
+ //facebook : "http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&urls={url}&format=json"
107
+
108
+ twitter: "http://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",
109
+ digg: "http://services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?",
110
+ delicious: 'http://feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?',
111
+ //stumbleupon: "http://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}&format=jsonp&callback=?",
112
+ stumbleupon: "",
113
+ linkedin: "http://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?",
114
+ pinterest: "http://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"
115
+ },
116
+ /* Load share buttons asynchronously
117
+ ================================================== */
118
+ loadButton = {
119
+ googlePlus : function(self){
120
+ var sett = self.options.buttons.googlePlus;
121
+ //$(self.element).find('.buttons').append('<div class="button googleplus"><g:plusone size="'+self.options.buttons.googlePlus.size+'" href="'+self.options.url+'"></g:plusone></div>');
122
+ $(self.element).find('.buttons').append('<div class="button googleplus"><div class="g-plusone" data-size="'+sett.size+'" data-href="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-annotation="'+sett.annotation+'"></div></div>');
123
+ window.___gcfg = {
124
+ lang: self.options.buttons.googlePlus.lang
125
+ };
126
+ var loading = 0;
127
+ if(typeof gapi === 'undefined' && loading == 0){
128
+ loading = 1;
129
+ (function() {
130
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
131
+ po.src = '//apis.google.com/js/plusone.js';
132
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
133
+ })();
134
+ }
135
+ else{
136
+ gapi.plusone.go();
137
+ }
138
+ },
139
+ facebook : function(self){
140
+ var sett = self.options.buttons.facebook;
141
+ $(self.element).find('.buttons').append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-send="'+sett.send+'" data-layout="'+sett.layout+'" data-width="'+sett.width+'" data-show-faces="'+sett.faces+'" data-action="'+sett.action+'" data-colorscheme="'+sett.colorscheme+'" data-font="'+sett.font+'" data-via="'+sett.via+'"></div></div>');
142
+ var loading = 0;
143
+ if(typeof FB === 'undefined' && loading == 0){
144
+ loading = 1;
145
+ (function(d, s, id) {
146
+ var js, fjs = d.getElementsByTagName(s)[0];
147
+ if (d.getElementById(id)) {return;}
148
+ js = d.createElement(s); js.id = id;
149
+ js.src = '//connect.facebook.net/'+sett.lang+'/all.js#xfbml=1';
150
+ fjs.parentNode.insertBefore(js, fjs);
151
+ }(document, 'script', 'facebook-jssdk'));
152
+ }
153
+ else{
154
+ FB.XFBML.parse();
155
+ }
156
+ },
157
+ twitter : function(self){
158
+ var sett = self.options.buttons.twitter;
159
+ $(self.element).find('.buttons').append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-count="'+sett.count+'" data-text="'+self.options.text+'" data-via="'+sett.via+'" data-hashtags="'+sett.hashtags+'" data-related="'+sett.related+'" data-lang="'+sett.lang+'">Tweet</a></div>');
160
+ var loading = 0;
161
+ if(typeof twttr === 'undefined' && loading == 0){
162
+ loading = 1;
163
+ (function() {
164
+ var twitterScriptTag = document.createElement('script');
165
+ twitterScriptTag.type = 'text/javascript';
166
+ twitterScriptTag.async = true;
167
+ twitterScriptTag.src = '//platform.twitter.com/widgets.js';
168
+ var s = document.getElementsByTagName('script')[0];
169
+ s.parentNode.insertBefore(twitterScriptTag, s);
170
+ })();
171
+ }
172
+ else{
173
+ $.ajax({ url: '//platform.twitter.com/widgets.js', dataType: 'script', cache:true}); //http://stackoverflow.com/q/6536108
174
+ }
175
+ },
176
+ digg : function(self){
177
+ var sett = self.options.buttons.digg;
178
+ $(self.element).find('.buttons').append('<div class="button digg"><a class="DiggThisButton '+sett.type+'" rel="nofollow external" href="http://digg.com/submit?url='+encodeURIComponent((sett.url !== '' ? sett.url : self.options.url))+'"></a></div>');
179
+ var loading = 0;
180
+ if(typeof __DBW === 'undefined' && loading == 0){
181
+ loading = 1;
182
+ (function() {
183
+ var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
184
+ s.type = 'text/javascript';
185
+ s.async = true;
186
+ s.src = '//widgets.digg.com/buttons.js';
187
+ s1.parentNode.insertBefore(s, s1);
188
+ })();
189
+ }
190
+ },
191
+ delicious : function(self){
192
+ if(self.options.buttons.delicious.size == 'tall'){//tall
193
+ var css = 'width:50px;',
194
+ cssCount = 'height:35px;width:50px;font-size:15px;line-height:35px;',
195
+ cssShare = 'height:18px;line-height:18px;margin-top:3px;';
196
+ }
197
+ else{//medium
198
+ var css = 'width:93px;',
199
+ cssCount = 'float:right;padding:0 3px;height:20px;width:26px;line-height:20px;',
200
+ cssShare = 'float:left;height:20px;line-height:20px;';
201
+ }
202
+ var count = self.shorterTotal(self.options.count.delicious);
203
+ if(typeof count === "undefined"){
204
+ count = 0;
205
+ }
206
+ $(self.element).find('.buttons').append(
207
+ '<div class="button delicious"><div style="'+css+'font:12px Arial,Helvetica,sans-serif;cursor:pointer;color:#666666;display:inline-block;float:none;height:20px;line-height:normal;margin:0;padding:0;text-indent:0;vertical-align:baseline;">'+
208
+ '<div style="'+cssCount+'background-color:#fff;margin-bottom:5px;overflow:hidden;text-align:center;border:1px solid #ccc;border-radius:3px;">'+count+'</div>'+
209
+ '<div style="'+cssShare+'display:block;padding:0;text-align:center;text-decoration:none;width:50px;background-color:#7EACEE;border:1px solid #40679C;border-radius:3px;color:#fff;">'+
210
+ '<img src="http://www.delicious.com/static/img/delicious.small.gif" height="10" width="10" alt="Delicious" /> Add</div></div></div>');
211
+
212
+ $(self.element).find('.delicious').on('click', function(){
213
+ self.openPopup('delicious');
214
+ });
215
+ },
216
+ stumbleupon : function(self){
217
+ var sett = self.options.buttons.stumbleupon;
218
+ $(self.element).find('.buttons').append('<div class="button stumbleupon"><su:badge layout="'+sett.layout+'" location="'+(sett.url !== '' ? sett.url : self.options.url)+'"></su:badge></div>');
219
+ var loading = 0;
220
+ if(typeof STMBLPN === 'undefined' && loading == 0){
221
+ loading = 1;
222
+ (function() {
223
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
224
+ li.src = '//platform.stumbleupon.com/1/widgets.js';
225
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
226
+ })();
227
+ s = window.setTimeout(function(){
228
+ if(typeof STMBLPN !== 'undefined'){
229
+ STMBLPN.processWidgets();
230
+ clearInterval(s);
231
+ }
232
+ },500);
233
+ }
234
+ else{
235
+ STMBLPN.processWidgets();
236
+ }
237
+ },
238
+ linkedin : function(self){
239
+ var sett = self.options.buttons.linkedin;
240
+ $(self.element).find('.buttons').append('<div class="button linkedin"><script type="in/share" data-url="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-counter="'+sett.counter+'"></script></div>');
241
+ var loading = 0;
242
+ if(typeof window.IN === 'undefined' && loading == 0){
243
+ loading = 1;
244
+ (function() {
245
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
246
+ li.src = '//platform.linkedin.com/in.js';
247
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
248
+ })();
249
+ }
250
+ else{
251
+ window.IN.init();
252
+ }
253
+ },
254
+ pinterest : function(self){
255
+ var sett = self.options.buttons.pinterest;
256
+ $(self.element).find('.buttons').append('<div class="button pinterest"><a href="http://pinterest.com/pin/create/button/?url='+(sett.url !== '' ? sett.url : self.options.url)+'&media='+sett.media+'&description='+sett.description+'" class="pin-it-button" count-layout="'+sett.layout+'">Pin It</a></div>');
257
+
258
+ (function() {
259
+ var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
260
+ li.src = '//assets.pinterest.com/js/pinit.js';
261
+ var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
262
+ })();
263
+ }
264
+ },
265
+ /* Tracking for Google Analytics
266
+ ================================================== */
267
+ tracking = {
268
+ googlePlus: function(){},
269
+ facebook: function(){
270
+ //console.log('facebook');
271
+ fb = window.setInterval(function(){
272
+ if (typeof FB !== 'undefined') {
273
+ FB.Event.subscribe('edge.create', function(targetUrl) {
274
+ _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
275
+ });
276
+ FB.Event.subscribe('edge.remove', function(targetUrl) {
277
+ _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);
278
+ });
279
+ FB.Event.subscribe('message.send', function(targetUrl) {
280
+ _gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);
281
+ });
282
+ //console.log('ok');
283
+ clearInterval(fb);
284
+ }
285
+ },1000);
286
+ },
287
+ twitter: function(){
288
+ //console.log('twitter');
289
+ tw = window.setInterval(function(){
290
+ if (typeof twttr !== 'undefined') {
291
+ twttr.events.bind('tweet', function(event) {
292
+ if (event) {
293
+ _gaq.push(['_trackSocial', 'twitter', 'tweet']);
294
+ }
295
+ });
296
+ //console.log('ok');
297
+ clearInterval(tw);
298
+ }
299
+ },1000);
300
+ },
301
+ digg: function(){
302
+ //if somenone find a solution, mail me !
303
+ /*$(this.element).find('.digg').on('click', function(){
304
+ _gaq.push(['_trackSocial', 'digg', 'add']);
305
+ });*/
306
+ },
307
+ delicious: function(){},
308
+ stumbleupon: function(){},
309
+ linkedin: function(){
310
+ function LinkedInShare() {
311
+ _gaq.push(['_trackSocial', 'linkedin', 'share']);
312
+ }
313
+ },
314
+ pinterest: function(){
315
+ //if somenone find a solution, mail me !
316
+ }
317
+ },
318
+ /* Popup for each social network
319
+ ================================================== */
320
+ popup = {
321
+ googlePlus: function(opt){
322
+ window.open("https://plus.google.com/share?hl="+opt.buttons.googlePlus.lang+"&url="+encodeURIComponent((opt.buttons.googlePlus.url !== '' ? opt.buttons.googlePlus.url : opt.url)), "", "toolbar=0, status=0, width=900, height=500");
323
+ },
324
+ facebook: function(opt){
325
+ window.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent((opt.buttons.facebook.url !== '' ? opt.buttons.facebook.url : opt.url))+"&t="+opt.text+"", "", "toolbar=0, status=0, width=900, height=500");
326
+ },
327
+ twitter: function(opt){
328
+ window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(opt.text)+"&url="+encodeURIComponent((opt.buttons.twitter.url !== '' ? opt.buttons.twitter.url : opt.url))+(opt.buttons.twitter.via !== '' ? '&via='+opt.buttons.twitter.via : ''), "", "toolbar=0, status=0, width=650, height=360");
329
+ },
330
+ digg: function(opt){
331
+ window.open("http://digg.com/tools/diggthis/submit?url="+encodeURIComponent((opt.buttons.digg.url !== '' ? opt.buttons.digg.url : opt.url))+"&title="+opt.text+"&related=true&style=true", "", "toolbar=0, status=0, width=650, height=360");
332
+ },
333
+ delicious: function(opt){
334
+ window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent((opt.buttons.delicious.url !== '' ? opt.buttons.delicious.url : opt.url))+'&title='+opt.text, 'delicious', 'toolbar=no,width=550,height=550');
335
+ },
336
+ stumbleupon: function(opt){
337
+ window.open('http://www.stumbleupon.com/badge/?url='+encodeURIComponent((opt.buttons.stumbleupon.url !== '' ? opt.buttons.stumbleupon.url : opt.url)), 'stumbleupon', 'toolbar=no,width=550,height=550');
338
+ },
339
+ linkedin: function(opt){
340
+ window.open('https://www.linkedin.com/cws/share?url='+encodeURIComponent((opt.buttons.linkedin.url !== '' ? opt.buttons.linkedin.url : opt.url))+'&token=&isFramed=true', 'linkedin', 'toolbar=no,width=550,height=550');
341
+ },
342
+ pinterest: function(opt){
343
+ window.open('http://pinterest.com/pin/create/button/?url='+encodeURIComponent((opt.buttons.pinterest.url !== '' ? opt.buttons.pinterest.url : opt.url))+'&media='+encodeURIComponent(opt.buttons.pinterest.media)+'&description='+opt.buttons.pinterest.description, 'pinterest', 'toolbar=no,width=700,height=300');
344
+ }
345
+ };
346
+
347
+ /* Plugin constructor
348
+ ================================================== */
349
+ function Plugin( element, options ) {
350
+ this.element = element;
351
+
352
+ this.options = $.extend( true, {}, defaults, options);
353
+ this.options.share = options.share; //simple solution to allow order of buttons
354
+
355
+ this._defaults = defaults;
356
+ this._name = pluginName;
357
+
358
+ this.init();
359
+ };
360
+
361
+ /* Initialization method
362
+ ================================================== */
363
+ Plugin.prototype.init = function () {
364
+ var self = this;
365
+ if(this.options.urlCurl !== ''){
366
+ urlJson.googlePlus = this.options.urlCurl + '?url={url}&type=googlePlus'; // PHP script for GooglePlus...
367
+ urlJson.stumbleupon = this.options.urlCurl + '?url={url}&type=stumbleupon'; // PHP script for Stumbleupon...
368
+ }
369
+ $(this.element).addClass(this.options.className); //add class
370
+
371
+ //HTML5 Custom data
372
+ if(typeof $(this.element).data('title') !== 'undefined'){
373
+ this.options.title = $(this.element).attr('data-title');
374
+ }
375
+ if(typeof $(this.element).data('url') !== 'undefined'){
376
+ this.options.url = $(this.element).data('url');
377
+ }
378
+ if(typeof $(this.element).data('text') !== 'undefined'){
379
+ this.options.text = $(this.element).data('text');
380
+ }
381
+
382
+ //how many social website have been selected
383
+ $.each(this.options.share, function(name, val) {
384
+ if(val === true){
385
+ self.options.shareTotal ++;
386
+ }
387
+ });
388
+
389
+ if(self.options.enableCounter === true){ //if for some reason you don't need counter
390
+ //get count of social share that have been selected
391
+ $.each(this.options.share, function(name, val) {
392
+ if(val === true){
393
+ //self.getSocialJson(name);
394
+ try {
395
+ self.getSocialJson(name);
396
+ } catch(e){
397
+ }
398
+ }
399
+ });
400
+ }
401
+ else if(self.options.template !== ''){ //for personalized button (with template)
402
+ this.options.render(this, this.options);
403
+ }
404
+ else{ // if you want to use official button like example 3 or 5
405
+ this.loadButtons();
406
+ }
407
+
408
+ //add hover event
409
+ $(this.element).hover(function(){
410
+ //load social button if enable and 1 time
411
+ if($(this).find('.buttons').length === 0 && self.options.enableHover === true){
412
+ self.loadButtons();
413
+ }
414
+ self.options.hover(self, self.options);
415
+ }, function(){
416
+ self.options.hide(self, self.options);
417
+ });
418
+
419
+ //click event
420
+ $(this.element).click(function(){
421
+ self.options.click(self, self.options);
422
+ return false;
423
+ });
424
+ };
425
+
426
+ /* loadButtons methode
427
+ ================================================== */
428
+ Plugin.prototype.loadButtons = function () {
429
+ var self = this;
430
+ $(this.element).append('<div class="buttons"></div>');
431
+ $.each(self.options.share, function(name, val) {
432
+ if(val == true){
433
+ loadButton[name](self);
434
+ if(self.options.enableTracking === true){ //add tracking
435
+ tracking[name]();
436
+ }
437
+ }
438
+ });
439
+ };
440
+
441
+ /* getSocialJson methode
442
+ ================================================== */
443
+ Plugin.prototype.getSocialJson = function (name) {
444
+ var self = this,
445
+ count = 0,
446
+ url = urlJson[name].replace('{url}', encodeURIComponent(this.options.url));
447
+ if(this.options.buttons[name].urlCount === true && this.options.buttons[name].url !== ''){
448
+ url = urlJson[name].replace('{url}', this.options.buttons[name].url);
449
+ }
450
+ //console.log('name : ' + name + ' - url : '+url); //debug
451
+ if(url != '' && self.options.urlCurl !== ''){ //urlCurl = '' if you don't want to used PHP script but used social button
452
+ $.getJSON(url, function(json){
453
+ if(typeof json.count !== "undefined"){ //GooglePlus, Stumbleupon, Twitter, Pinterest and Digg
454
+ var temp = json.count + '';
455
+ temp = temp.replace('\u00c2\u00a0', ''); //remove google plus special chars
456
+ count += parseInt(temp, 10);
457
+ }
458
+ //get the FB total count (shares, likes and more)
459
+ else if(json.data && json.data.length > 0 && typeof json.data[0].total_count !== "undefined"){ //Facebook total count
460
+ count += parseInt(json.data[0].total_count, 10);
461
+ }
462
+ else if(typeof json[0] !== "undefined"){ //Delicious
463
+ count += parseInt(json[0].total_posts, 10);
464
+ }
465
+ else if(typeof json[0] !== "undefined"){ //Stumbleupon
466
+ }
467
+ self.options.count[name] = count;
468
+ self.options.total += count;
469
+ self.renderer();
470
+ self.rendererPerso();
471
+ //console.log(json); //debug
472
+ })
473
+ .error(function() {
474
+ self.options.count[name] = 0;
475
+ self.rendererPerso();
476
+ });
477
+ }
478
+ else{
479
+ self.renderer();
480
+ self.options.count[name] = 0;
481
+ self.rendererPerso();
482
+ }
483
+ };
484
+
485
+ /* launch render methode
486
+ ================================================== */
487
+ Plugin.prototype.rendererPerso = function () {
488
+ //check if this is the last social website to launch render
489
+ var shareCount = 0;
490
+ for (e in this.options.count) { shareCount++; }
491
+ if(shareCount === this.options.shareTotal){
492
+ this.options.render(this, this.options);
493
+ }
494
+ };
495
+
496
+ /* render methode
497
+ ================================================== */
498
+ Plugin.prototype.renderer = function () {
499
+ var total = this.options.total,
500
+ template = this.options.template;
501
+ if(this.options.shorterTotal === true){ //format number like 1.2k or 5M
502
+ total = this.shorterTotal(total);
503
+ }
504
+
505
+ if(template !== ''){ //if there is a template
506
+ template = template.replace('{total}', total);
507
+ $(this.element).html(template);
508
+ }
509
+ else{ //template by defaults
510
+ $(this.element).html(
511
+ '<div class="box"><a class="count" href="#">' + total + '</a>' +
512
+ (this.options.title !== '' ? '<a class="share" href="#">' + this.options.title + '</a>' : '') +
513
+ '</div>'
514
+ );
515
+ }
516
+ };
517
+
518
+ /* format total numbers like 1.2k or 5M
519
+ ================================================== */
520
+ Plugin.prototype.shorterTotal = function (num) {
521
+ if (num >= 1e6){
522
+ num = (num / 1e6).toFixed(2) + "M"
523
+ } else if (num >= 1e3){
524
+ num = (num / 1e3).toFixed(1) + "k"
525
+ }
526
+ return num;
527
+ };
528
+
529
+ /* Methode for open popup
530
+ ================================================== */
531
+ Plugin.prototype.openPopup = function (site) {
532
+ popup[site](this.options); //open
533
+ if(this.options.enableTracking === true){ //tracking!
534
+ var tracking = {
535
+ googlePlus: {site: 'Google', action: '+1'},
536
+ facebook: {site: 'facebook', action: 'like'},
537
+ twitter: {site: 'twitter', action: 'tweet'},
538
+ digg: {site: 'digg', action: 'add'},
539
+ delicious: {site: 'delicious', action: 'add'},
540
+ stumbleupon: {site: 'stumbleupon', action: 'add'},
541
+ linkedin: {site: 'linkedin', action: 'share'},
542
+ pinterest: {site: 'pinterest', action: 'pin'}
543
+ };
544
+ _gaq.push(['_trackSocial', tracking[site].site, tracking[site].action]);
545
+ }
546
+ };
547
+
548
+ /* Methode for add +1 to a counter
549
+ ================================================== */
550
+ Plugin.prototype.simulateClick = function () {
551
+ var html = $(this.element).html();
552
+ $(this.element).html(html.replace(this.options.total, this.options.total+1));
553
+ };
554
+
555
+ /* Methode for add +1 to a counter
556
+ ================================================== */
557
+ Plugin.prototype.update = function (url, text) {
558
+ if(url !== ''){
559
+ this.options.url = url;
560
+ }
561
+ if(text !== ''){
562
+ this.options.text = text;
563
+ }
564
+ };
565
+
566
+ /* A really lightweight plugin wrapper around the constructor, preventing against multiple instantiations
567
+ ================================================== */
568
+ $.fn[pluginName] = function ( options ) {
569
+ var args = arguments;
570
+ if (options === undefined || typeof options === 'object') {
571
+ return this.each(function () {
572
+ if (!$.data(this, 'plugin_' + pluginName)) {
573
+ $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
574
+ }
575
+ });
576
+ } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
577
+ return this.each(function () {
578
+ var instance = $.data(this, 'plugin_' + pluginName);
579
+ if (instance instanceof Plugin && typeof instance[options] === 'function') {
580
+ instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
581
+ }
582
+ });
583
+ }
584
+ };
585
+ })(jQuery, window, document);