compass-jquery-plugin 0.3.2.8 → 0.3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -6
- data/VERSION.yml +3 -3
- data/lib/jquery/gridify/grid_column.rb +6 -6
- data/lib/jquery/gridify/grid_options.rb +4 -4
- data/lib/jquery/mark_it_up.rb +2 -0
- data/lib/jquery/mobile.rb +0 -1
- data/templates/dynatree/jquery.dynatree.js +2896 -2880
- data/templates/dynatree/jquery.dynatree.min.js +55 -54
- data/templates/dynatree/jquery/dynatree/aero.scss +4 -2
- data/templates/dynatree/jquery/dynatree/aqua.scss +4 -2
- data/templates/dynatree/jquery/dynatree/crystal.scss +4 -2
- data/templates/dynatree/jquery/dynatree/xp.scss +5 -3
- data/templates/emulators/emulators/bb.playbook.landscape.png +0 -0
- data/templates/emulators/emulators/bb.playbook.landscape.scss +18 -0
- data/templates/emulators/emulators/bb.playbook.portrait.png +0 -0
- data/templates/emulators/emulators/bb.playbook.portrait.scss +18 -0
- data/templates/emulators/emulators/{blackberry.torch.landscape.png → bb.torch.landscape.png} +0 -0
- data/templates/emulators/emulators/{blackberry.torch.landscape.scss → bb.torch.landscape.scss} +1 -3
- data/templates/emulators/emulators/{blackberry.torch.portrait.png → bb.torch.portrait.png} +0 -0
- data/templates/emulators/emulators/{blackberry.torch.portrait.scss → bb.torch.portrait.scss} +1 -3
- data/templates/emulators/emulators/galaxy.ace.landscape.png +0 -0
- data/templates/emulators/emulators/galaxy.ace.landscape.scss +18 -0
- data/templates/emulators/emulators/galaxy.ace.portrait.png +0 -0
- data/templates/emulators/emulators/galaxy.ace.portrait.scss +18 -0
- data/templates/emulators/emulators/galaxy.s.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.s.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.s2.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.s2.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.10.1.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.10.1.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.7.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.7.portrait.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.8.9.landscape.scss +0 -2
- data/templates/emulators/emulators/galaxy.tab.8.9.portrait.scss +0 -2
- data/templates/emulators/emulators/htc.sensation.landscape.png +0 -0
- data/templates/emulators/emulators/htc.sensation.landscape.scss +18 -0
- data/templates/emulators/emulators/htc.sensation.portrait.png +0 -0
- data/templates/emulators/emulators/htc.sensation.portrait.scss +18 -0
- data/templates/emulators/emulators/ipad.landscape.scss +0 -2
- data/templates/emulators/emulators/ipad.portrait.scss +0 -2
- data/templates/emulators/emulators/iphone.3.landscape.scss +0 -2
- data/templates/emulators/emulators/iphone.3.portrait.scss +0 -2
- data/templates/emulators/emulators/{iphone.4.landscape .scss → iphone.4.landscape.scss} +0 -2
- data/templates/emulators/emulators/iphone.4.portrait.scss +0 -2
- data/templates/emulators/emulators/palm.pre.2.landscape.scss +0 -2
- data/templates/emulators/emulators/palm.pre.2.portrait.scss +0 -2
- data/templates/emulators/manifest.rb +17 -5
- data/templates/graphics/highcharts/dark-blue.js +159 -159
- data/templates/graphics/highcharts/dark-green.js +159 -159
- data/templates/graphics/highcharts/gray.js +154 -154
- data/templates/graphics/highcharts/grid.js +84 -84
- data/templates/graphics/highcharts/highslide-config.js +2 -2
- data/templates/graphics/highcharts/highslide-full.js +3310 -3310
- data/templates/graphics/highcharts/skies.js +72 -72
- data/templates/graphics/jquery.ganttView.js +1550 -1550
- data/templates/graphics/jquery.highcharts.js +11277 -11285
- data/templates/graphics/jquery.sparkline.js +1072 -1072
- data/templates/ical/jquery.ical.js +7637 -7637
- data/templates/ical/jquery/ical.print.scss +3 -3
- data/templates/jqgrid/i18n/jqgrid/locale-ar.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +131 -131
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +131 -131
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +132 -132
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +129 -129
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +134 -134
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +129 -129
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +141 -141
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +153 -153
- data/templates/jqgrid/i18n/jqgrid/locale-lt.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-mne.js +134 -0
- data/templates/jqgrid/i18n/jqgrid/locale-mne.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +145 -145
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +12 -12
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +126 -126
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +140 -140
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sr.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +128 -128
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +127 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +128 -128
- data/templates/jqgrid/jquery.jqGrid.js +13477 -13443
- data/templates/jqgrid/jquery.jqGrid.min.js +292 -287
- data/templates/jqgrid/jquery/jqGrid.scss +13 -12
- data/templates/jqgrid/manifest.rb +2 -0
- data/templates/jqtouch/jquery.jqtouch.js +9601 -9556
- data/templates/jqtouch/jquery.jqtouch.min.js +3 -3
- data/templates/jqtouch/jquery/touch/default.scss +2 -2
- data/templates/jqtouch/jquery/touch/jqt.scss +2 -2
- data/templates/jqtouch/jquery/touch/jqtouch.scss +26 -5
- data/templates/jquery/amplify.store.js +211 -211
- data/templates/jquery/config/initializers/jquery.rb +2 -0
- data/templates/jquery/history.adapter.jquery.js +42 -36
- data/templates/jquery/history.html4.js +563 -563
- data/templates/jquery/history.html4.min.js +5 -5
- data/templates/jquery/history.js +1721 -1694
- data/templates/jquery/history.min.js +28 -27
- data/templates/jquery/i18n/jquery.ui/datepicker-af.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ar-DZ.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-az.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-bg.js +21 -21
- data/templates/jquery/i18n/jquery.ui/datepicker-bs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ca.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-cs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-da.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-de.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-el.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-AU.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-en-GB.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-NZ.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-eo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-es.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-et.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-eu.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fa.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-fi.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-fo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr-CH.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-gl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-he.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hu.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-hy.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-id.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-is.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-it.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-ja.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ko.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-kz.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-lt.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-lv.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-ml.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ms.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-no.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-pl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-pt-BR.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-pt.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-rm.js +17 -17
- data/templates/jquery/i18n/jquery.ui/datepicker-ro.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ru.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sk.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sk.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-sl.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-sq.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr-SR.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sv.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ta.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-th.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-tj.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-tr.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-uk.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-vi.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-CN.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-HK.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-TW.js +20 -20
- data/templates/jquery/jquery-ui.js +11913 -11882
- data/templates/jquery/jquery-ui.min.js +340 -339
- data/templates/jquery/jquery.bgiframe.js +27 -27
- data/templates/jquery/jquery.contextMenu.js +202 -202
- data/templates/jquery/jquery.cookie.js +26 -26
- data/templates/jquery/jquery.dotimeout.js +227 -227
- data/templates/jquery/jquery.dst.js +89 -89
- data/templates/jquery/jquery.easing.js +226 -0
- data/templates/jquery/jquery.easing.min.js +8 -0
- data/templates/jquery/jquery.farbtastic.js +294 -294
- data/templates/jquery/jquery.flashMessages.js +14 -14
- data/templates/jquery/jquery.form.js +761 -761
- data/templates/jquery/jquery.haml.js +247 -247
- data/templates/jquery/jquery.hotkeys.js +79 -79
- data/templates/jquery/jquery.js +1490 -928
- data/templates/jquery/jquery.layout.js +2454 -2454
- data/templates/jquery/jquery.mediahelpers.js +216 -0
- data/templates/jquery/jquery.mediahelpers.min.js +3 -0
- data/templates/jquery/jquery.min.js +177 -166
- data/templates/jquery/jquery.mousewheel.js +57 -57
- data/templates/jquery/jquery.offline.js +171 -171
- data/templates/jquery/jquery.pngFix.js +72 -72
- data/templates/jquery/jquery.rails.js +145 -145
- data/templates/jquery/jquery.replacetext.js +80 -80
- data/templates/jquery/jquery.themeswitchertool.js +195 -195
- data/templates/jquery/jquery.tmpl.js +460 -460
- data/templates/jquery/jquery.tmplPlus.js +78 -78
- data/templates/jquery/jquery.tokeninput.js +480 -475
- data/templates/jquery/jquery/ui/_theme.scss +14 -14
- data/templates/jquery/jquery/ui/black-tie/ui-icons_4ca300_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_ededed_256x240.png +0 -0
- data/templates/jquery/jquery/ui/black-tie/ui-icons_ffcf29_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_c98000_256x240.png +0 -0
- data/templates/jquery/jquery/ui/vader/ui-icons_f29a00_256x240.png +0 -0
- data/templates/jquery/json.js +66 -66
- data/templates/jquery/json2.js +177 -177
- data/templates/jquery/manifest.rb +4 -0
- data/templates/jstree/jquery.jstree.js +5918 -5918
- data/templates/markitup/app/views/shared/_mark_it_up.parsed.preview.blue.html.haml +9 -0
- data/templates/markitup/app/views/shared/_mark_it_up.parsed.preview.html.haml +9 -0
- data/templates/markitup/app/views/shared/_mark_it_up.preview.blue.html.haml +8 -0
- data/templates/markitup/app/views/shared/_mark_it_up.preview.html.haml +8 -0
- data/templates/markitup/config/initializers/mark_it_up.rb +40 -0
- data/templates/markitup/jquery.markitup.js +586 -0
- data/templates/markitup/jquery.markitup.min.js +1 -0
- data/templates/markitup/jquery/markitup/preview/body.blue.png +0 -0
- data/templates/markitup/jquery/markitup/preview/bullet.blue.png +0 -0
- data/templates/markitup/jquery/markitup/preview/preview.blue.scss +58 -0
- data/templates/markitup/jquery/markitup/preview/preview.scss +7 -0
- data/templates/markitup/jquery/markitup/sets/bbcode.scss +34 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/fonts.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/bbcode/underline.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css.scss +54 -0
- data/templates/markitup/jquery/markitup/sets/css/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/css.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/tag.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_center.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_justify.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_left.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_align_right.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_indent.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_letterspacing.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_linespacing.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_lowercase.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_bottom.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_left.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_right.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_padding_top.png +0 -0
- data/templates/markitup/jquery/markitup/sets/css/text_uppercase.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default.scss +22 -0
- data/templates/markitup/jquery/markitup/sets/default/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/dotclear/url.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/html/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/html/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/markdown/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markdown/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/markmin/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/markmin/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest.scss +38 -0
- data/templates/markitup/jquery/markitup/sets/rest/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/rest/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile.scss +44 -0
- data/templates/markitup/jquery/markitup/sets/textile/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/textile/table.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy.scss +40 -0
- data/templates/markitup/jquery/markitup/sets/texy/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/disconnect.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/page_white_code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/texy/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags.scss +44 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/disconnect.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/txt2tags/underline.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/wiki/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/code.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/quotes.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/table.png +0 -0
- data/templates/markitup/jquery/markitup/sets/wiki/url.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode.scss +42 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/bold.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/clean.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h1.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h2.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h3.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h4.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h5.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/h6.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/image.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/italic.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/link.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-item.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/paragraph.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/picture.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/preview.png +0 -0
- data/templates/markitup/jquery/markitup/sets/xbbcode/stroke.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua.scss +136 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-container-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-footer-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-footer.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-header-white.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/bg-header.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/spacer.gif +0 -0
- data/templates/markitup/jquery/markitup/skins/aqua/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor.scss +141 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-bbcode.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-dotclear.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-html.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-markdown.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-textile.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor-wiki.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/bg-editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/jtageditor/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live.scss +135 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-footer.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/bg-header.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/live/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup.scss +150 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-bbcode.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-dotclear.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-html.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-json.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-markdown.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-textile.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-wiki.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor-xml.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/bg-editor.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/submenu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple.scss +117 -0
- data/templates/markitup/jquery/markitup/skins/simple/handle.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple/submenu.png +0 -0
- data/templates/markitup/manifest.rb +311 -0
- data/templates/markitup/markitup/jquery.markitup.set.bbcode.js +40 -0
- data/templates/markitup/markitup/jquery.markitup.set.bbcode.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.css.js +53 -0
- data/templates/markitup/markitup/jquery.markitup.set.css.min.js +5 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.js +30 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.min.js +2 -0
- data/templates/markitup/markitup/jquery.markitup.set.dotclear.js +38 -0
- data/templates/markitup/markitup/jquery.markitup.set.dotclear.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.html.js +40 -0
- data/templates/markitup/markitup/jquery.markitup.set.html.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.markdown.js +53 -0
- data/templates/markitup/markitup/jquery.markitup.set.markdown.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.markmin.js +50 -0
- data/templates/markitup/markitup/jquery.markitup.set.markmin.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.rest.js +52 -0
- data/templates/markitup/markitup/jquery.markitup.set.rest.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.textile.js +58 -0
- data/templates/markitup/markitup/jquery.markitup.set.textile.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.texy.js +52 -0
- data/templates/markitup/markitup/jquery.markitup.set.texy.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.txt2tags.js +42 -0
- data/templates/markitup/markitup/jquery.markitup.set.txt2tags.min.js +3 -0
- data/templates/markitup/markitup/jquery.markitup.set.wiki.js +61 -0
- data/templates/markitup/markitup/jquery.markitup.set.wiki.min.js +4 -0
- data/templates/markitup/markitup/jquery.markitup.set.xbbcode.js +36 -0
- data/templates/markitup/markitup/jquery.markitup.set.xbbcode.min.js +4 -0
- data/templates/mobile/config/initializers/mobile.rb +2 -0
- data/templates/mobile/jquery.mobile.js +4545 -4454
- data/templates/mobile/jquery.mobile.min.js +16 -7
- data/templates/mobile/jquery/mobile/960.fluid.scss +191 -0
- data/templates/mobile/jquery/mobile/960.scss +213 -0
- data/templates/mobile/jquery/mobile/_base.scss +37 -20
- data/templates/mobile/jquery/mobile/default.scss +48 -56
- data/templates/mobile/jquery/mobile/valencia.scss +43 -44
- data/templates/mobile/manifest.rb +2 -0
- data/templates/ribbon/jquery.ribbon.js +195 -195
- data/templates/ribbon/jquery.ribbon.min.js +1 -1
- data/templates/ribbon/jquery/ribbon/office.scss +12 -12
- data/templates/ribbon/jquery/ribbon/windows7.scss +12 -12
- data/templates/secret_sauce/secret_sauce.js +8 -8
- data/templates/tools/flowplayer.js +897 -897
- data/templates/tools/jquery.tools.js +3647 -3647
- data/templates/tools/jquery.tools.min.js +47 -47
- data/templates/tools/swfobject.js +760 -760
- metadata +350 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(a){a.jQTouch=function(v){var D,s=a("head"),L="",I=[],H=0,m={},j="",u="portrait",T=true,S=0,e=0,i=[],w={},k=351,N=a.jQTouch.prototype.extensions,R=[],r="",E={addGlossToIcon:true,backSelector:".back, .cancel, .goback",cacheGetRequests:true,debug:false,fallback2dAnimation:"fade",fixedViewport:true,formSelector:"form",fullScreen:true,fullScreenClass:"fullscreen",hoverDelay:50,icon:null,icon4:null,moveThreshold:10,preloadImages:false,pressDelay:1000,startupScreen:null,statusBar:"default",submitSelector:".submit",touchSelector:"a, .touch",useAnimations:true,useFastTouch:true,animations:[{selector:".cube",name:"cubeleft",is3d:true},{selector:".cubeleft",name:"cubeleft",is3d:true},{selector:".cuberight",name:"cuberight",is3d:true},{selector:".dissolve",name:"dissolve",is3d:false},{selector:".fade",name:"fade",is3d:false},{selector:".flip",name:"flipleft",is3d:true},{selector:".flipleft",name:"flipleft",is3d:true},{selector:".flipright",name:"flipright",is3d:true},{selector:".pop",name:"pop",is3d:true},{selector:".slide",name:"slideleft",is3d:false},{selector:".slidedown",name:"slidedown",is3d:false},{selector:".slideleft",name:"slideleft",is3d:false},{selector:".slideright",name:"slideright",is3d:false},{selector:".slideup",name:"slideup",is3d:false},{selector:".swap",name:"swapleft",is3d:true},{selector:"#jqt > * > ul li a",name:"slideleft",is3d:false}]};function z(U){now=(new Date).getTime();delta=now-S;S=now;if(m.debug){if(U){f(delta+": "+U)}else{f(delta+": Called "+arguments.callee.caller.name)}}}function f(U){if(window.console!==undefined){console.log(U)}}function b(U){z();if(typeof(U.selector)==="string"&&typeof(U.name)==="string"){R.push(U)}}function l(V,U){z();I.unshift({page:V,animation:U,hash:"#"+V.attr("id"),id:V.attr("id")})}function o(V){z();if(!T){z("ClickHandler handler aborted because tap is not ready");V.preventDefault();return false}var U=a(V.target);if(!U.is(i.join(", "))){var U=a(V.target).closest(i.join(", "))}if(U&&U.attr("href")&&!U.isExternalLink()){z("Need to prevent default click behavior");V.preventDefault()}else{z("No need to prevent default click behavior")}if(a.support.touch){z("Not converting click to a tap event because touch handler is on the job")}else{z("Converting click event to a tap event");a(V.target).trigger("tap",V)}}function c(Z,W,Y,V){z();if(W.length===0){a.fn.unselect();z("Target element is missing.");return false}if(W.hasClass("current")){a.fn.unselect();z("You are already on the page you are trying to navigate to.");return false}a(":focus").blur();Z.trigger("pageAnimationStart",{direction:"out"});W.trigger("pageAnimationStart",{direction:"in"});if(a.support.animationEvents&&Y&&m.useAnimations){T=false;if(!a.support.transform3d&&Y.is3d){Y.name=m.fallback2dAnimation}var U;if(V){if(Y.name.indexOf("left")>0){U=Y.name.replace(/left/,"right")}else{if(Y.name.indexOf("right")>0){U=Y.name.replace(/right/,"left")}else{if(Y.name.indexOf("up")>0){U=Y.name.replace(/up/,"down")}else{if(Y.name.indexOf("down")>0){U=Y.name.replace(/down/,"up")}else{U=Y.name}}}}}else{U=Y.name}Z.bind("webkitAnimationEnd",X);Z.bind("webkitTransitionEnd",X);scrollTo(0,0);W.addClass(U+" in current");Z.addClass(U+" out")}else{W.addClass("current");X()}function X(aa){z();if(a.support.animationEvents&&Y&&m.useAnimations){Z.unbind("webkitAnimationEnd",X);Z.unbind("webkitTransitionEnd",X);Z.removeClass(U+" out current");W.removeClass(U+" in")}else{Z.removeClass(U+" out current")}j=W;if(V){I.shift()}else{l(j,Y)}Z.unselect();e=(new Date()).getTime();n(j.attr("id"));T=true;W.trigger("pageAnimationEnd",{direction:"in",animation:Y});Z.trigger("pageAnimationEnd",{direction:"out",animation:Y})}return true}function Q(){z();return u}function h(){z();if(I.length<1){z("History is empty.")}if(I.length===1){z("You are on the first panel.")}var V=I[0],U=I[1];if(c(V.page,U.page,V.animation,true)){return w}else{z("Could not go back.");return false}}function M(Y,Z,W){z();if(W){f("The reverse parameter of the goTo() function has been deprecated.")}var aa=I[0].page;if(typeof Z==="string"){for(var X=0,U=R.length;X<U;X++){if(R[X].name===Z){Z=R[X];break}}}if(typeof(Y)==="string"){var V=a(Y);if(V.length<1){d(Y,{animation:Z});return}else{Y=V}}if(c(aa,Y,Z)){return w}else{z("Could not animate pages.");return false}}function P(U){z();if(I[1]===undefined){z("There is no previous page in history")}else{if(location.hash===I[1].hash){h()}else{z(location.hash+" !== "+I[1].hash)}}}function O(U){z();m=a.extend({},E,U);if(m.preloadImages){for(var V=m.preloadImages.length-1;V>=0;V--){(new Image()).src=m.preloadImages[V]}}if(m.icon||m.icon4){var W,X;if(m.icon4&&window.devicePixelRatio&&window.devicePixelRatio===2){X=m.icon4}else{if(m.icon){X=m.icon}else{X=false}}if(X){W=(m.addGlossToIcon)?"":"-precomposed";r+='<link rel="apple-touch-icon'+W+'" href="'+X+'" />'}}if(m.startupScreen){r+='<link rel="apple-touch-startup-image" href="'+m.startupScreen+'" />'}if(m.fixedViewport){r+='<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>'}if(m.fullScreen){r+='<meta name="apple-mobile-web-app-capable" content="yes" />';if(m.statusBar){r+='<meta name="apple-mobile-web-app-status-bar-style" content="'+m.statusBar+'" />'}}if(r){s.prepend(r)}}function B(U,V){z();var W=null;a(U).each(function(Y,Z){var X=a(this);if(!X.attr("id")){X.attr("id","page-"+(++H))}a("#"+X.attr("id")).remove();D.trigger("pageInserted",{page:X.appendTo(D)});if(X.hasClass("current")||!W){W=X}});if(W!==null){M(W,V);return W}else{return false}}function A(U){var V=(new Date()).getTime()-e;if(V<k){return false}}function g(){z();u=Math.abs(window.orientation)==90?"landscape":"portrait";D.removeClass("portrait landscape").addClass(u).trigger("turn",{orientation:u})}function n(U){z("setHash is off at the moment");return;U=U.replace(/^#/,""),window.onhashchange=null;location.hash="#"+U;window.onhashchange=P}function d(U,V){z();var X={data:null,method:"GET",animation:null,callback:null,$referrer:null};var W=a.extend({},X,V);if(U!="#"){a.ajax({url:U,data:W.data,type:W.method,success:function(Y,aa){var Z=B(Y,W.animation);if(Z){if(W.method=="GET"&&m.cacheGetRequests===true&&W.$referrer){W.$referrer.attr("href","#"+Z.attr("id"))}if(W.callback){W.callback(true)}}},error:function(Y){if(W.$referrer){W.$referrer.unselect()}if(W.callback){W.callback(false)}}})}else{if(W.$referrer){W.$referrer.unselect()}}}function q(V,W){z();a(":focus").blur();V.preventDefault();var U=(typeof(V)==="string")?a(V).eq(0):(V.target?a(V.target):a(V));z(U.attr("action"));if(U.length&&U.is(m.formSelector)&&U.attr("action")){d(U.attr("action"),{data:U.serialize(),method:U.attr("method")||"POST",animation:R[0]||null,callback:W});return false}return false}function K(W){z();var V=W.closest("form");if(V.length===0){z("No parent form found")}else{z("About to submit parent form");var U=a.Event("submit");U.preventDefault();V.trigger(U);return false}return true}function p(){z();return(typeof WebKitAnimationEvent!="undefined")}function F(){z();return(typeof WebKitCSSMatrix!="undefined")}function J(){z();if(!m.useFastTouch){return false}if(typeof TouchEvent!="undefined"){if(window.navigator.userAgent.indexOf("Mobile")>-1){return true}else{return false}}else{return false}}function C(){z();var W,V,X,Y,U;W=document.getElementsByTagName("head")[0];V=document.body;X=document.createElement("style");X.textContent="@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#jqtTestFor3dSupport{height:3px}}";Y=document.createElement("div");Y.id="jqtTestFor3dSupport";W.appendChild(X);V.appendChild(Y);U=Y.offsetHeight===3;X.parentNode.removeChild(X);Y.parentNode.removeChild(Y);return U}function G(aa){z();if(!T){z("Tap is not ready");return false}var W=a(aa.target);if(!W.is(i.join(", "))){var W=a(aa.target).closest(i.join(", "))}if(!W.length||!W.attr("href")){z("Could not find a link related to tapped element");return false}var Z=W.attr("target"),Y=W.attr("hash"),X=null;if(W.isExternalLink()){W.unselect();return true}else{if(W.is(m.backSelector)){h(Y)}else{if(W.is(m.submitSelector)){K(W)}else{if(Z==="_webapp"){window.location=W.attr("href");return false}else{if(W.attr("href")==="#"){W.unselect();return true}else{for(var V=0,U=R.length;V<U;V++){if(W.is(R[V].selector)){X=R[V];break}}if(!X){f("Animation could not be found. Using slideleft.");X="slideleft"}if(Y&&Y!=="#"){W.addClass("active");M(a(Y).data("referrer",W),X,W.hasClass("reverse"));return false}else{W.addClass("loading active");d(W.attr("href"),{animation:X,callback:function(){W.removeClass("loading");setTimeout(a.fn.unselect,250,W)},$referrer:W});return false}}}}}}}function t(ae){z();if(!T){z("TouchStart handler aborted because tap is not ready");ae.preventDefault();return false}var ai=a(ae.target);if(!ai.length){z("Could not find target of touchstart event.");return}var W=(new Date).getTime(),U=null,X=null,aa,ac,ab,Z=0,Y=0,ad=0;if(event.changedTouches&&event.changedTouches.length){aa=event.changedTouches[0];ac=aa.pageX;ab=aa.pageY}ai.bind("touchmove",af).bind("touchend",V).bind("touchcancel",ag);U=setTimeout(function(){ai.makeActive()},m.hoverDelay);X=setTimeout(function(){ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag);ai.unselect();clearTimeout(U);ai.trigger("press")},m.pressDelay);function ag(aj){z();clearTimeout(U);ai.unselect();ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag)}function V(aj){z();ai.unbind("touchend",V).unbind("touchcancel",ag);clearTimeout(U);clearTimeout(X);if(Math.abs(Z)<m.moveThreshold&&Math.abs(Y)<m.moveThreshold&&ad<m.pressDelay){ai.trigger("tap",aj)}else{ai.unselect()}}function af(am){ah();var al=Math.abs(Z);var aj=Math.abs(Y);var ak;if(al>aj&&(al>35)&&ad<1000){if(Z<0){ak="left"}else{ak="right"}ai.unbind("touchmove",af).unbind("touchend",V).unbind("touchcancel",ag);ai.trigger("swipe",{direction:ak,deltaX:Z,deltaY:Y})}ai.unselect();clearTimeout(U);if(al>m.moveThreshold||aj>m.moveThreshold){clearTimeout(X)}}function ah(){var aj=event.changedTouches[0]||null;Z=aj.pageX-ac;Y=aj.pageY-ab;ad=(new Date).getTime()-W}}O(v);a(document).ready(function(){a.support.animationEvents=p();a.support.cssMatrix=F();a.support.touch=J();a.support.transform3d=C();if(!a.support.touch){f("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable.")}if(!a.support.transform3d){f("This device does not support 3d animation. 2d animations will be used instead.")}a.fn.isExternalLink=function(){var Y=a(this);return(Y.attr("target")=="_blank"||Y.attr("rel")=="external"||Y.is('a[href^="http://maps.google.com"], a[href^="mailto:"], a[href^="tel:"], a[href^="javascript:"], a[href*="youtube.com/v"], a[href*="youtube.com/watch"]'))};a.fn.makeActive=function(){return a(this).addClass("active")};a.fn.press=function(Y){if(a.isFunction(Y)){return a(this).live("press",Y)}else{return a(this).trigger("press")}};a.fn.swipe=function(Y){if(a.isFunction(Y)){return a(this).live("swipe",Y)}else{return a(this).trigger("swipe")}};a.fn.tap=function(Y){if(a.isFunction(Y)){return a(this).live("tap",Y)}else{return a(this).trigger("tap")}};a.fn.unselect=function(Y){if(Y){Y.removeClass("active")}else{a(".active").removeClass("active")}};for(var V=0,U=N.length;V<U;V++){var W=N[V];if(a.isFunction(W)){a.extend(w,W(w))}}if(m.cubeSelector){f("NOTE: cubeSelector has been deprecated. Please use cubeleftSelector instead.");m.cubeleftSelector=m.cubeSelector}if(m.flipSelector){f("NOTE: flipSelector has been deprecated. Please use flipleftSelector instead.");m.flipleftSelector=m.flipSelector}if(m.slideSelector){f("NOTE: slideSelector has been deprecated. Please use slideleftSelector instead.");m.slideleftSelector=m.slideSelector}for(var V=0,U=E.animations.length;V<U;V++){var X=E.animations[V];if(m[X.name+"Selector"]!==undefined){X.selector=m[X.name+"Selector"]}b(X)}i.push("input");i.push(m.touchSelector);i.push(m.backSelector);i.push(m.submitSelector);a(i.join(", ")).css("-webkit-touch-callout","none");D=a("#jqt");if(D.length===0){f('Could not find an element with the id "jqt", so the body id has been set to "jqt". If you are having any problems, wrapping your panels in a div with the id "jqt" might help.');D=a("body").attr("id","jqt")}if(a.support.transform3d){D.addClass("supports3d")}if(m.fullScreenClass&&window.navigator.standalone==true){D.addClass(m.fullScreenClass+" "+m.statusBar)}if(window.navigator.userAgent.match(/Android/ig)){D.addClass("android")}D.bind("touchstart",t).bind("click",o).bind("mousedown",A).bind("orientationchange",g).bind("submit",q).bind("tap",G).trigger("orientationchange");if(a("#jqt > .current").length==0){j=a("#jqt > *:first")}else{j=a("#jqt > .current:first");a("#jqt > .current").removeClass("current")}a(j).addClass("current");L=a(j).attr("id");n(L);l(j);scrollTo(0,0);a("#jqt > *").css("minHeight",window.innerHeight)});w={animations:R,hist:I,settings:m,support:a.support,getOrientation:Q,goBack:h,goTo:M,addAnimation:b,submitForm:q};return w};a.jQTouch.prototype.extensions=[];a.jQTouch.addExtension=function(b){a.jQTouch.prototype.extensions.push(b)}})(jQuery);(function(a){a.fn.transition=function(c,b){return this.each(function(){var e=a(this);var h={speed:"300ms",callback:null,ease:"ease-in-out"};var g=a.extend({},h,b);if(g.speed===0){e.css(c);window.setTimeout(g.callback,0)}else{if(a.browser.safari){var f=[];for(var d in c){f.push(d)}e.css({webkitTransitionProperty:f.join(", "),webkitTransitionDuration:g.speed,webkitTransitionTimingFunction:g.ease});if(g.callback){e.one("webkitTransitionEnd",g.callback)}setTimeout(function(i){i.css(c)},0,e)}else{e.animate(c,g.speed,g.callback)}}})}})(jQuery);var SpinningWheel={cellHeight:44,friction:0.003,slotData:[],handleEvent:function(a){if(a.type=="touchstart"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapDown(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollStart(a)}}}else{if(a.type=="touchmove"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapCancel(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollMove(a)}}}else{if(a.type=="touchend"){if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapUp(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollEnd(a)}}}else{if(a.type=="webkitTransitionEnd"){if(a.target.id=="sw-wrapper"){}else{this.backWithinBoundaries(a)}}else{if(a.type=="orientationchange"){this.onOrientationChange(a)}else{if(a.type=="scroll"){this.onScroll(a)}}}}}}},onOrientationChange:function(a){window.scrollTo(0,0);this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px";this.calculateSlotsWidth()},onScroll:function(a){this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px"},lockScreen:function(a){a.preventDefault();a.stopPropagation()},reset:function(){this.slotEl=[];this.activeSlot=null;this.swWrapper=undefined;this.swSlotWrapper=undefined;this.swSlots=undefined;this.swFrame=undefined},calculateSlotsWidth:function(){var b=this.swSlots.getElementsByTagName("div");for(var a=0;a<b.length;a+=1){this.slotEl[a].slotWidth=b[a].offsetWidth}},create:function(){var d,a,b,c,e;this.reset();e=document.createElement("div");e.id="sw-wrapper";e.style.top=window.innerHeight+window.pageYOffset+"px";e.style.webkitTransitionProperty="-webkit-transform";e.innerHTML='<div id="sw-slots-wrapper"><div id="sw-slots"></div></div><div id="sw-frame"></div>';document.body.appendChild(e);this.swWrapper=e;this.swSlotWrapper=document.getElementById("sw-slots-wrapper");this.swSlots=document.getElementById("sw-slots");this.swFrame=document.getElementById("sw-frame");for(a=0;a<this.slotData.length;a+=1){c=document.createElement("ul");b="";for(d in this.slotData[a].values){b+="<li>"+this.slotData[a].values[d]+"</li>"}c.innerHTML=b;e=document.createElement("div");e.className=this.slotData[a].style;e.appendChild(c);this.swSlots.appendChild(e);c.slotPosition=a;c.slotYPosition=0;c.slotWidth=0;c.slotMaxScroll=this.swSlotWrapper.clientHeight-c.clientHeight-86;c.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.slotEl.push(c);if(this.slotData[a].defaultValue){this.scrollToValue(a,this.slotData[a].defaultValue)}}this.calculateSlotsWidth();document.addEventListener("touchmove",this,false);window.addEventListener("orientationchange",this,true);window.addEventListener("scroll",this,true);document.getElementById("sw-done").addEventListener("touchstart",this,false);this.swFrame.addEventListener("touchstart",this,false)},open:function(){this.create();this.swWrapper.style.webkitTransitionTimingFunction="ease-out";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, -210px, 0)"},destroy:function(){this.swWrapper.removeEventListener("webkitTransitionEnd",this,false);this.swFrame.removeEventListener("touchstart",this,false);document.getElementById("sw-done").removeEventListener("touchstart",this,false);document.removeEventListener("touchmove",this,false);window.removeEventListener("orientationchange",this,true);window.removeEventListener("scroll",this,true);this.slotData=[];this.cancelAction=function(){return false};this.cancelDone=function(){return true};this.reset();document.body.removeChild(document.getElementById("sw-wrapper"))},close:function(){this.swWrapper.style.webkitTransitionTimingFunction="ease-in";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, 0, 0)";this.swWrapper.addEventListener("webkitTransitionEnd",this,false)},addSlot:function(b,d,a){if(!d){d=""}d=d.split(" ");for(var c=0;c<d.length;c+=1){d[c]="sw-"+d[c]}d=d.join(" ");var e={values:b,style:d,defaultValue:a};this.slotData.push(e)},getSelectedValues:function(){var c,f,d,a,e=[],b=[];for(d in this.slotEl){this.slotEl[d].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[d].style.webkitTransitionDuration="0";if(this.slotEl[d].slotYPosition>0){this.setPosition(d,0)}else{if(this.slotEl[d].slotYPosition<this.slotEl[d].slotMaxScroll){this.setPosition(d,this.slotEl[d].slotMaxScroll)}}c=-Math.round(this.slotEl[d].slotYPosition/this.cellHeight);f=0;for(a in this.slotData[d].values){if(f==c){e.push(a);b.push(this.slotData[d].values[a]);break}f+=1}}return{keys:e,values:b}},setPosition:function(b,a){this.slotEl[b].slotYPosition=a;this.slotEl[b].style.webkitTransform="translate3d(0, "+a+"px, 0)"},scrollStart:function(c){var d=c.targetTouches[0].clientX-this.swSlots.offsetLeft;var f=0;for(var a=0;a<this.slotEl.length;a+=1){f+=this.slotEl[a].slotWidth;if(d<f){this.activeSlot=a;break}}if(this.slotData[this.activeSlot].style.match("readonly")){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);return false}this.slotEl[this.activeSlot].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[this.activeSlot].style.webkitTransitionDuration="0";var b=window.getComputedStyle(this.slotEl[this.activeSlot]).webkitTransform;b=new WebKitCSSMatrix(b).m42;if(b!=this.slotEl[this.activeSlot].slotYPosition){this.setPosition(this.activeSlot,b)}this.startY=c.targetTouches[0].clientY;this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=c.timeStamp;this.swFrame.addEventListener("touchmove",this,false);this.swFrame.addEventListener("touchend",this,false);return true},scrollMove:function(b){var a=b.targetTouches[0].clientY-this.startY;if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){a/=2}this.setPosition(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition+a);this.startY=b.targetTouches[0].clientY;if(b.timeStamp-this.scrollStartTime>80){this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=b.timeStamp}},scrollEnd:function(f){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){this.scrollTo(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition>0?0:this.slotEl[this.activeSlot].slotMaxScroll);return false}var b=this.slotEl[this.activeSlot].slotYPosition-this.scrollStartY;if(b<this.cellHeight/1.5&&b>-this.cellHeight/1.5){if(this.slotEl[this.activeSlot].slotYPosition%this.cellHeight){this.scrollTo(this.activeSlot,Math.round(this.slotEl[this.activeSlot].slotYPosition/this.cellHeight)*this.cellHeight,"100ms")}return false}var g=f.timeStamp-this.scrollStartTime;var a=(2*b/g)/this.friction;var d=(this.friction/2)*(a*a);if(a<0){a=-a;d=-d}var c=this.slotEl[this.activeSlot].slotYPosition+d;if(c>0){c/=2;a/=3;if(c>this.swSlotWrapper.clientHeight/4){c=this.swSlotWrapper.clientHeight/4}}else{if(c<this.slotEl[this.activeSlot].slotMaxScroll){c=(c-this.slotEl[this.activeSlot].slotMaxScroll)/2+this.slotEl[this.activeSlot].slotMaxScroll;a/=3;if(c<this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4){c=this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4}}else{c=Math.round(c/this.cellHeight)*this.cellHeight}}this.scrollTo(this.activeSlot,Math.round(c),Math.round(a)+"ms");return true},scrollTo:function(c,a,b){this.slotEl[c].style.webkitTransitionDuration=b?b:"100ms";this.setPosition(c,a?a:0);if(this.slotEl[c].slotYPosition>0||this.slotEl[c].slotYPosition<this.slotEl[c].slotMaxScroll){this.slotEl[c].addEventListener("webkitTransitionEnd",this,false)}},scrollToValue:function(e,d){var c,b,a;this.slotEl[e].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[e].style.webkitTransitionDuration="0";b=0;for(a in this.slotData[e].values){if(a==d){c=b*this.cellHeight;this.setPosition(e,c);break}b-=1}},backWithinBoundaries:function(a){a.target.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(a.target.slotPosition,a.target.slotYPosition>0?0:a.target.slotMaxScroll,"150ms");return false},tapDown:function(a){a.currentTarget.addEventListener("touchmove",this,false);a.currentTarget.addEventListener("touchend",this,false);a.currentTarget.className="sw-pressed"},tapCancel:function(a){a.currentTarget.removeEventListener("touchmove",this,false);a.currentTarget.removeEventListener("touchend",this,false);a.currentTarget.className=""},tapUp:function(a){this.tapCancel(a);if(a.currentTarget.id=="sw-cancel"){this.cancelAction()}else{this.doneAction()}},setCancelAction:function(a){this.cancelAction=a},setDoneAction:function(a){this.doneAction=a},cancelAction:function(){return false},cancelDone:function(){return true}};(function(){var o=this;var j=Array();var p=Array();function f(u,v){for(var t in v){u[t]=v[t]}}function h(v,t,u){v.style.width=t.toString()+"px";v.style.height=u.toString()+"px"}function s(u,t,v){u.style.left=Math.round(t).toString()+"px";u.style.top=Math.round(v).toString()+"px"}TrayController=function(){return this};TrayController.prototype.init=function(t){this.currentX=0;this.elem=t};TrayController.prototype.touchstart=function(t){this.startX=t.touches[0].pageX-this.currentX;this.touchMoved=false;window.addEventListener("touchmove",this,true);window.addEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0s"};TrayController.prototype.touchmove=function(t){this.touchMoved=true;this.lastX=this.currentX;this.lastMoveTime=new Date();this.currentX=event.touches[0].pageX-this.startX;this.delegate.update(this.currentX)};TrayController.prototype.touchend=function(u){window.removeEventListener("touchmove",this,true);window.removeEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0.4s";if(this.touchMoved){var v=this.currentX-this.lastX;var t=(new Date())-this.lastMoveTime+1;this.currentX=this.currentX+v*200/t;this.delegate.updateTouchEnd(this)}else{this.delegate.clicked(this.currentX)}};TrayController.prototype.handleEvent=function(t){this[t.type](t);t.preventDefault()};const e=150;const n=e/2;const d=70;const a=n/2;const g=e;const b=e/3;const k="rotateY("+(-d)+"deg)";const c="rotateY("+d+"deg)";const i="translateZ("+g+"px)";FlowDelegate=function(){this.cells=new Array();this.transforms=new Array()};FlowDelegate.prototype.init=function(t){this.elem=t};FlowDelegate.prototype.updateTouchEnd=function(t){this.lastFocus=undefined;var u=this.getFocusedCell(t.currentX);t.currentX=-u*n;this.update(t.currentX)};FlowDelegate.prototype.clicked=function(u){var v=-Math.round(u/n);var t=this.cells[v];galleryCell=v};FlowDelegate.prototype.getFocusedCell=function(t){var u=-Math.round(t/n);return Math.min(Math.max(u,0),this.cells.length-1)};FlowDelegate.prototype.transformForCell=function(u,w,z){var t=(w*n);var v=t+z;if((v<a)&&(v>=-a)){return i+" translateX("+t+"px)"}else{if(v>0){return"translateX("+(t+b)+"px) "+k}else{return"translateX("+(t-b)+"px) "+c}}};FlowDelegate.prototype.setTransformForCell=function(t,v,u){if(this.transforms[v]!=u){t.style.webkitTransform=u;this.transforms[v]=u}};FlowDelegate.prototype.update=function(u){this.elem.style.webkitTransform="translateX("+(u)+"px)";for(var v in this.cells){var t=this.cells[v];this.setTransformForCell(t,v,this.transformForCell(t,v,u));v+=1}};var l=new TrayController();var q=new FlowDelegate();o.zflow=function(v,u){var z=document.querySelector(u);l.init(z);q.init(z);l.delegate=q;var t={top:Math.round(-e*0.65)+"px",left:Math.round(-e/2)+"px",width:e+"px",height:Math.round(e*1.5)+"px",opacity:0,};var w=0;function A(){var B=document.createElement("div");var F=document.createElement("img");var D=document.createElement("canvas");var E=document.createElement("a");var C=document.createElement("caption");B.className="cell";B.appendChild(E);E.appendChild(F);B.appendChild(D);B.appendChild(C);F.src=v[w];j[w]=v[w];E.href="show_image?fName="+v[w];E.className="slide-right";o.afnc=function(){var G=F.width;var J=F.height;var H=Math.min(e/J,e/G);G*=H;J*=H;h(F,G,J);f(B.style,t);s(F,(e-G)/2,e-J);s(D,(e-G)/2,e);s(C,(e-G)/2,e+10);m(F,G,J,D);var I=v[w].match(/(.*)[\/\\]([^\/\\]+)\.\w+$/)[2];I=I.replace(/_/g," ");I=I.replace(/(^|\s)([a-z])/g,function(K,M,L){return M+L.toUpperCase()});p[w]=I;r(C,G,w);q.setTransformForCell(B,q.cells.length,q.transformForCell(B,q.cells.length,l.currentX));q.cells.push(B);z.appendChild(B);B.style.opacity=1;if(w<(v.length-1)){w++;A()}else{window.setTimeout(function(){window.scrollTo(0,0)},100);galleryInit=1}};F.addEventListener("load",afnc,true)}A();z.addEventListener("touchstart",l,false)};o.zflowCleanup=function(t){var u=document.querySelector(t);if(u){if(u.childNodes.length>0){q.transforms.length=0;q.cells.length=0;while(u.hasChildNodes()){var v=u.childNodes[0].childNodes[0].childNodes[0];v.removeEventListener("load",afnc,true);u.removeChild(u.childNodes[0])}var w=document.getElementById("gallery");if(w){w.parentNode.removeChild(w);galleryInit=0;galleryCell=0}}}};o.zflowGetImageSource=function(t,u){var v=document.querySelector(t);var w="";if(v){if(v.childNodes.length>0){while(v.hasChildNodes()){w=v.childNodes[0].childNodes[0].childNodes[u].src}}}return w};function r(u,t,v){u.width=t;u.innerHTML=p[v]}function m(z,u,A,v){v.width=u;v.height=A/2;var t=v.getContext("2d");t.save();t.translate(0,A-1);t.scale(1,-1);t.drawImage(z,0,0,u,A);t.restore();t.globalCompositeOperation="destination-out";var w=t.createLinearGradient(0,0,0,A/2);w.addColorStop(1,"rgba(255, 255, 255, 1.0)");w.addColorStop(0,"rgba(255, 255, 255, 0.5)");t.fillStyle=w;t.fillRect(0,0,u,A/2)}})();var now=new Date();var url_month="month";var url_event="events.htm";function getCalendar(e,c,b){url_month=e;url_event=c;var f=b.getDate();var a=b.getMonth()+1;var g=b.getFullYear();$.get(url_month,{month:a,year:g},function(d){$("#ical").empty();$(d).appendTo("#ical");setBindings();setToday();setSelectedAndLoadEvents(b)})}function getEvents(b){var c=b.getDate();var a=b.getMonth()+1;var e=b.getFullYear();$.get(url_event,{day:c,month:a,year:e},function(d){$("#ical .events").empty();$(d).appendTo("#ical .events")})}function getNoEvents(){var a="<li class='no-event'>No Events</li>";$("#ical .events").empty();$(a).appendTo("#ical .events")}function setBindings(){$("#ical td").bind("click",function(){var b=$(this).attr("class");var a=getClickedDate($(this));RemoveSelectedCell();setToday();if(b.indexOf("date_has_event")!=-1||b.indexOf("today_date_has_event")!=-1){$(this).attr("class","selected_date_has_event");getEvents(a)}if(b==""||b.indexOf("today")!=-1){$(this).attr("class","selected");getNoEvents()}if(b.indexOf("prevmonth")!=-1||b.indexOf("nextmonth")!=-1){getCalendar(url,a)}});$("#ical .bottom-bar .bottom-bar-today").bind("click",function(){getCalendar(url_month,url_event,now)});$("#ical .goto-prevmonth").bind("click",function(){loadPrevNextMonth(-1)});$("#ical .goto-nextmonth").bind("click",function(){loadPrevNextMonth(1)})}function RemoveSelectedCell(){$("#ical .selected_date_has_event").removeClass("selected_date_has_event");$("#ical .selected").removeClass("selected")}function getClickedDate(b){var c=$(b).find("input").val();var a=getDateFromHiddenField(c);return a}function loadPrevNextMonth(c){var b=$("#ical .selected").text();if(b==""){b=$("#ical .selected_date_has_event").text()}var a=parseInt($("#ical > #month").val());var e=$("#ical > #year").val();var d=new Date(e,a-1,b);if(c==1){d.nextMonth()}else{d.prevMonth()}getCalendar(url_month,url_event,d)}function setToday(){$("#ical :hidden").each(function(c){var a=getDateFromHiddenField($(this).val());if(!isNaN(a)){var h=now;var j=now.getDate();var i=a.getDate();var g=now.getMonth();var f=a.getMonth();var e=now.getFullYear();var d=a.getFullYear();if(now.getDate()==a.getDate()&&now.getMonth()==a.getMonth()&&now.getFullYear()==a.getFullYear()){var b=$(this).closest("td");if($(b).attr("class")=="date_has_event"){$(b).attr("class","today_date_has_event")}else{$(b).attr("class","today")}}}})}function getDateFromHiddenField(c){var b=c.split("-");return new Date(b[0],b[1]-1,b[2])}function setSelectedAndLoadEvents(a){RemoveSelectedCell();$("#ical td").each(function(c){var d=$(this).attr("class");var b=getClickedDate($(this));if((d!="prevmonth"&&d!="nextmonth")&&a.getDate()==b.getDate()&&a.getMonth()==b.getMonth()&&a.getFullYear()==b.getFullYear()){if(d=="date_has_event"){$(this).attr("class","selected_date_has_event");getEvents(a)}else{$(this).attr("class","selected");getNoEvents()}}});setToday()}function trim(b,a){return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}function dateAddExtention(c,a){var b=new String();c=c.toLowerCase();if(isNaN(a)){throw"The second parameter must be a number. \n You passed: "+a;return false}a=new Number(a);switch(c.toLowerCase()){case"yyyy":this.setFullYear(this.getFullYear()+a);break;case"q":this.setMonth(this.getMonth()+(a*3));break;case"m":this.setMonth(this.getMonth()+a);break;case"y":case"d":case"w":this.setDate(this.getDate()+a);break;case"ww":this.setDate(this.getDate()+(a*7));break;case"h":this.setHours(this.getHours()+a);break;case"n":this.setMinutes(this.getMinutes()+a);break;case"s":this.setSeconds(this.getSeconds()+a);break;case"ms":this.setMilliseconds(this.getMilliseconds()+a);break;default:throw"The first parameter must be a string from this list: \nyyyy, q, m, y, d, w, ww, h, n, s, or ms. You passed: "+c;return false}return this}Date.prototype.dateAdd=dateAddExtention;function prevMonth(){var a=this.getMonth();this.setMonth(a-1);if(this.getMonth()!=a-1&&(this.getMonth()!=11||(a==11&&this.getDate()==1))){this.setDate(0)}}function nextMonth(){var a=this.getMonth();this.setMonth(a+1);if(this.getMonth()!=a+1&&this.getMonth()!=0){this.setDate(0)}}Date.prototype.nextMonth=nextMonth;Date.prototype.prevMonth=prevMonth;(function(c){c.fn.drag=function(f,e,d){if(e){this.bind("dragstart",f)}if(d){this.bind("dragend",d)}return !f?this.trigger("mousedown",{which:1}):this.bind("drag",e?e:f)};var b=c.event.special.drag={distance:0,setup:function(d){d=c.extend({distance:b.distance},d||{});c.event.add(this,"mousedown",b.handler,d)},teardown:function(){c.event.remove(this,"mousedown",b.handler);if(this==b.dragging){b.dragging=b.proxy=null}a(this,true)},handler:function(e){var d;if(e.data.elem){e.dragTarget=e.data.elem;e.dragProxy=b.proxy||e.dragTarget;e.cursorOffsetX=e.data.x-e.data.left;e.cursorOffsetY=e.data.y-e.data.top;e.offsetX=e.pageX-e.cursorOffsetX;e.offsetY=e.pageY-e.cursorOffsetY}switch(e.type){case !b.dragging&&e.which==1&&"mousedown":c.extend(e.data,c(this).offset(),{x:e.pageX,y:e.pageY,elem:this,dist2:Math.pow(e.data.distance,2)});c.event.add(document.body,"mousemove mouseup",b.handler,e.data);a(this,false);return false;case !b.dragging&&"mousemove":if(Math.pow(e.pageX-e.data.x,2)+Math.pow(e.pageY-e.data.y,2)<e.data.dist2){break}b.dragging=e.dragTarget;e.type="dragstart";d=c.event.handle.call(b.dragging,e);b.proxy=c(d)[0]||b.dragging;if(d!==false){break}a(b.dragging,true);b.dragging=b.proxy=null;case"mousemove":if(b.dragging){e.type="drag";d=c.event.handle.call(b.dragging,e);if(c.event.special.drop){c.event.special.drop.allowed=(d!==false);c.event.special.drop.handler(e)}if(d!==false){break}e.type="mouseup"}case"mouseup":c.event.remove(document.body,"mousemove mouseup",b.handler);if(b.dragging){if(c.event.special.drop){c.event.special.drop.handler(e)}e.type="dragend";c.event.handle.call(b.dragging,e);a(b.dragging,true);b.dragging=b.proxy=null;e.data={}}break}}};function a(e,d){if(!e){return}e.unselectable=d?"off":"on";e.onselectstart=function(){return d};if(e.style){e.style.MozUserSelect=d?"":"none"}}})(jQuery);(function(b){b.fn.drop=function(e,d,c){if(d){this.bind("dropstart",e)}if(c){this.bind("dropend",c)}return !e?this.trigger("drop"):this.bind("drop",d?d:e)};b.dropManage=function(c){b.extend(a,{filter:"*",data:[],tolerance:null},c||{});return a.$elements.filter(a.filter).each(function(d){a.data[d]=a.locate(this)})};var a=b.event.special.drop={delay:100,mode:"intersect",$elements:b([]),data:[],setup:function(){a.$elements=a.$elements.add(this);a.data[a.data.length]=a.locate(this)},teardown:function(){var c=this;a.$elements=a.$elements.not(this);a.data=b.grep(a.data,function(d){return(d.elem!==c)})},handler:function(d){var c=null,e;d.dropTarget=a.dropping||undefined;if(a.data.length&&d.dragTarget){switch(d.type){case"drag":a.event=d;if(!a.timer){a.timer=setTimeout(a.tolerate,20)}break;case"mouseup":a.timer=clearTimeout(a.timer);if(!a.dropping){break}if(a.allowed){d.type="drop";e=b.event.handle.call(a.dropping,d)}c=false;case a.dropping&&"dropstart":d.type="dropend";c=c===null&&a.allowed?true:false;case a.dropping&&"dropend":b.event.handle.call(a.dropping,d);a.dropping=null;if(e===false){d.dropTarget=undefined}if(!c){break}d.type="dropstart";case a.allowed&&"dropstart":d.dropTarget=this;a.dropping=b.event.handle.call(this,d)!==false?this:null;break}}},tolerate:function(){var d=0,c,e,f=[a.event.pageX,a.event.pageY],g=a.locate(a.event.dragProxy);a.tolerance=a.tolerance||a.modes[a.mode];do{if(c=a.data[d]){if(a.tolerance){e=a.tolerance.call(a,a.event,g,c)}else{if(a.contains(c,f)){e=c}}}}while(++d<a.data.length&&!e);a.event.type=(e=e||a.best)?"dropstart":"dropend";if(a.event.type=="dropend"||e.elem!=a.dropping){a.handler.call(e?e.elem:a.dropping,a.event)}if(a.last&&f[0]==a.last.pageX&&f[1]==a.last.pageY){delete a.timer}else{a.timer=setTimeout(a.tolerate,a.delay)}a.last=a.event;a.best=null},locate:function(f){var d=b(f),g=d.offset(),e=d.outerHeight(),c=d.outerWidth();return{elem:f,L:g.left,R:g.left+c,T:g.top,B:g.top+e,W:c,H:e}},contains:function(c,d){return((d[0]||d.L)>=c.L&&(d[0]||d.R)<=c.R&&(d[1]||d.T)>=c.T&&(d[1]||d.B)<=c.B)},modes:{intersect:function(d,c,e){return this.contains(e,[d.pageX,d.pageY])?e:this.modes.overlap.apply(this,arguments)},overlap:function(d,c,e){e.overlap=Math.max(0,Math.min(e.B,c.B)-Math.max(e.T,c.T))*Math.max(0,Math.min(e.R,c.R)-Math.max(e.L,c.L));if(e.overlap>((this.best||{}).overlap||0)){this.best=e}return null},fit:function(d,c,e){return this.contains(e,c)?e:null},middle:function(d,c,e){return this.contains(e,[c.L+c.W/2,c.T+c.H/2])?e:null}}}})(jQuery);var _target=null,_dragx=null,_dragy=null,_rotate=null,_resort=null;var _dragging=false,_sizing=false,_animate=false;var _rotating=0,_width=0,_height=0,_left=0,_top=0,_xspeed=0,_yspeed=0;var _zindex=1000;jQuery.fn.touch=function(a){a=jQuery.extend({animate:true,sticky:false,dragx:true,dragy:true,rotate:false,resort:true,scale:false},a);var b=[];b=$.extend({},$.fn.touch.defaults,a);this.each(function(){this.opts=b;this.ontouchstart=touchstart;this.ontouchend=touchend;this.ontouchmove=touchmove;this.ongesturestart=gesturestart;this.ongesturechange=gesturechange;this.ongestureend=gestureend})};function touchstart(a){_target=this.id;_dragx=this.opts.dragx;_dragy=this.opts.dragy;_resort=this.opts.resort;_animate=this.opts.animate;_xspeed=0;_yspeed=0;$(a.changedTouches).each(function(){var c=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));var b=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));if(!_dragging&&!_sizing){_left=(a.pageX-c);_top=(a.pageY-b);_dragging=[_left,_top];if(_resort){_zindex=($("#"+_target).css("z-index")==_zindex)?_zindex:_zindex+1;$("#"+_target).css({zIndex:_zindex})}}})}function touchmove(c){if(_dragging&&!_sizing&&_animate){var a=(isNaN(parseInt($("#"+_target).css("left"))))?0:parseInt($("#"+_target).css("left"));var b=(isNaN(parseInt($("#"+_target).css("top"))))?0:parseInt($("#"+_target).css("top"))}$(c.changedTouches).each(function(){c.preventDefault();_left=(this.pageX-(parseInt($("#"+_target).css("width"))/2));_top=(this.pageY-(parseInt($("#"+_target).css("height"))/2));if(_dragging&&!_sizing){if(_animate){_xspeed=Math.round((_xspeed+Math.round(_left-a))/1.5);_yspeed=Math.round((_yspeed+Math.round(_top-b))/1.5)}if(_dragx||_dragy){$("#"+_target).css({position:"absolute"})}if(_dragx){$("#"+_target).css({left:_left+"px"})}if(_dragy){$("#"+_target).css({top:_top+"px"})}$("#"+_target).css({backgroundColor:"#4B880B"});$("#"+_target+" b").text("WEEEEEEEE!!!!")}})}function touchend(a){$(a.changedTouches).each(function(){if(!a.targetTouches.length){_dragging=false;if(_animate){_left=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));_top=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));var c=(_dragx)?(_left+_xspeed)+"px":_left+"px";var b=(_dragy)?(_top+_yspeed)+"px":_top+"px";if(_dragx||_dragy){$("#"+_target).animate({left:c,top:b},"fast")}}}});$("#"+_target+" b").text("I am sad :(");$("#"+_target).css({backgroundColor:"#0B4188"});setTimeout(changeBack,5000,_target)}function gesturestart(a){_sizing=[$("#"+this.id).css("width"),$("#"+this.id).css("height")]}function gesturechange(a){if(_sizing){_width=(this.opts.scale)?Math.min(parseInt(_sizing[0])*a.scale,300):_sizing[0];_height=(this.opts.scale)?Math.min(parseInt(_sizing[1])*a.scale,300):_sizing[1];_rotate=(this.opts.rotate)?"rotate("+((_rotating+a.rotation)%360)+"deg)":"0deg";$("#"+this.id).css({width:_width+"px",height:_height+"px",webkitTransform:_rotate});$("#"+this.id+" b").text("TRANSFORM!");$("#"+this.id).css({backgroundColor:"#4B880B"})}}function gestureend(a){_sizing=false;_rotating=(_rotating+a.rotation)%360}function changeBack(a){$("#"+a+" b").text("Touch Me :)");$("#"+a).css({backgroundColor:"#999"})}(function(b){var a=this,c=a.jQExtensionsCSS||{};b(a).load(function(){a.scrollTo(0,0);var g=a.innerWidth<a.innerHeight?"profile":"landscape",f=c.toolbarHeight||b("#jqt .toolbar").outerHeight()||45,e={profile:null,landscape:null},d=b.extend({defaults:".horizontal-scroll, .horizontal-scroll .scroll-container, .horizontal-slide, .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .vertical-scroll > div, .vertical-slide > div { margin: 0 auto; padding-bottom:{paddingBottom}px; } #jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div, #jqt.fullscreen .vertical-slide.use-bottom-toolbar > div { padding-bottom:0px; } .vertical-scroll, .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .vertical-scroll.use-bottom-toolbar, .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }\n",profile:".profile .horizontal-scroll, .profile .horizontal-scroll .scroll-container, .profile .horizontal-slide, .profile .horizontal-slide .slide-container { width: {width}px; } .profile .vertical-scroll, .profile .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .profile .vertical-scroll.use-bottom-toolbar, .profile .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }",landscape:".landscape .horizontal-scroll, .landscape .horizontal-scroll .scroll-container, .landscape .horizontal-slide, .landscape .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .landscape .vertical-scroll, .landscape .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .landscape .vertical-scroll.use-bottom-toolbar, .landscape .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }"},c.css||{});e[g]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[g]||{});e.defaults=b.extend({},e[g],c.defaults||{});b(document.createElement("style")).attr("type","text/css").html(d.defaults.replace(/\{(\w+)\}/g,function(i,h){return h in e.defaults?e.defaults[h]:i})+d[g].replace(/\{(\w+)\}/g,function(i,h){return h in e[g]?e[g][h]:i})).appendTo("head");b(a).one("orientationchange",function(){var h=a.innerWidth<a.innerHeight?"profile":"landscape";e[h]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[h]||{});b(document.createElement("style")).attr("type","text/css").html(d[h].replace(/\{(\w+)\}/g,function(j,i){return i in e[h]?e[h][i]:j})).appendTo("head")})})})(jQuery);(function($){$.Chain={version:"0.2",tag:["{","}"],services:{},service:function(name,proto){this.services[name]=proto;$.fn[name]=function(options){if(!this.length){return this}var instance=this.data("chain-"+name);var args=Array.prototype.slice.call(arguments,1);if(!instance){if(options=="destroy"){return this}instance=$.extend({element:this},$.Chain.services[name]);this.data("chain-"+name,instance);if(instance.init){instance.init()}}var result;if(typeof options=="string"&&instance["$"+options]){result=instance["$"+options].apply(instance,args)}else{if(instance.handler){result=instance.handler.apply(instance,[options].concat(args))}else{result=this}}if(options=="destroy"){this.removeData("chain-"+name)}return result}},extend:function(name,proto){if(this.services[name]){this.services[name]=$.extend(this.services[name],proto)}},jobject:function(obj){return obj&&obj.init==$.fn.init},jidentic:function(j1,j2){if(!j1||!j2||j1.length!=j2.length){return false}var a1=j1.get();var a2=j2.get();for(var i=0;i<a1.length;i++){if(a1[i]!=a2[i]){return false}}return true},parse:function(){var $this={};$this.closure=['function($data, $el){var $text = [];\n$text.print = function(text){this.push((typeof text == "number") ? text : ((typeof text != "undefined") ? text : ""));};\nwith($data){\n','}\nreturn $text.join("");}'];$this.textPrint=function(text){return'$text.print("'+text.split("\\").join("\\\\").split("'").join("\\'").split('"').join('\\"')+'");'};$this.scriptPrint=function(text){return"$text.print("+text+");"};$this.parser=function(text){var tag=$.Chain.tag;var opener,closer,closer2=null,result=[];while(text){opener=text.indexOf(tag[0]);closer=opener+text.substring(opener).indexOf(tag[1]);if(opener!=-1){if(text[opener-1]=="\\"){closer2=opener+tag[0].length+text.substring(opener+tag[0].length).indexOf(tag[0]);if(closer2!=opener+tag[0].length-1&&text[closer2-1]=="\\"){closer2=closer2-1}else{if(closer2==opener+tag[0].length-1){closer2=text.length}}result.push($this.textPrint(text.substring(0,opener-1)));result.push($this.textPrint(text.substring(opener,closer2)))}else{closer2=null;if(closer==opener-1){closer=text.length}result.push($this.textPrint(text.substring(0,opener)));result.push($this.scriptPrint(text.substring(opener+tag[0].length,closer)))}text=text.substring((closer2===null)?closer+tag[1].length:closer2)}else{if(text){result.push($this.textPrint(text));text=""}}}return result.join("\n")};return function($text){var $fn=function(){};try{eval("$fn = "+$this.closure[0]+$this.parser($text)+$this.closure[1])}catch(e){throw"Parsing Error"}return $fn}}()}})(jQuery);(function(a){a.Chain.service("update",{handler:function(b){if(typeof b=="function"){return this.bind(b)}else{return this.trigger(b)}},bind:function(b){return this.element.bind("update",b)},trigger:function(b){this.element.items("update");this.element.item("update");this.element.triggerHandler("preupdate",this.element.item());if(b=="hard"){this.element.items(true).each(function(){a(this).update()})}this.element.triggerHandler("update",this.element.item());return this.element}})})(jQuery);(function(a){a.Chain.service("chain",{init:function(){this.anchor=this.element;this.template=this.anchor.html();this.tplNumber=0;this.builder=this.createBuilder();this.plugins={};this.isActive=false;this.destroyers=[];this.element.addClass("chain-element")},handler:function(b){this.element.items("backup");this.element.item("backup");if(typeof b=="object"){this.handleUpdater(b)}else{if(typeof b=="function"){this.handleBuilder(b)}}this.anchor.empty();this.isActive=true;this.element.update();return this.element},handleUpdater:function(h){var b=h.builder;delete h.builder;if(h.anchor){this.setAnchor(h.anchor)}delete h.anchor;var e=h.override;delete h.override;for(var d in h){if(typeof h[d]=="string"){h[d]=a.Chain.parse(h[d])}else{if(typeof h[d]=="object"){for(var c in h[d]){if(typeof h[d][c]=="string"){h[d][c]=a.Chain.parse(h[d][c])}}}}}var f=function(o,p){var n,q;var k=a(this);for(var m in h){if(m=="self"){n=k}else{n=a(m,k)}if(typeof h[m]=="function"){q=h[m].apply(k,[p,n]);if(typeof q=="string"){n.not(":input").html(q).end().filter(":input").val(q)}}else{if(typeof h[m]=="object"){for(var l in h[m]){if(typeof h[m][l]=="function"){q=h[m][l].apply(k,[p,n]);if(typeof q=="string"){if(l=="content"){n.html(q)}else{if(l=="text"){n.text(q)}else{if(l=="value"){n.val(q)}else{if(l=="class"||l=="className"){n.addClass(q)}else{n.attr(l,q)}}}}}}}}}}};var g=this.defaultBuilder;this.builder=function(i){if(b){b.apply(this,[i])}if(!e){g.apply(this)}this.update(f);return false}},handleBuilder:function(b){this.builder=this.createBuilder(b)},defaultBuilder:function(c,b){var d=c?(c.apply(this,[b])!==false):true;if(d){this.bind("update",function(g,h){var e=a(this);for(var f in h){if(typeof h[f]!="object"&&typeof h[f]!="function"){e.find("> ."+f+", *:not(.chain-element) ."+f).each(function(){var i=a(this);if(i.filter(":input").length){i.val(h[f])}else{if(i.filter("img").length){i.attr("src",h[f])}else{i.html(h[f])}}})}}})}},createBuilder:function(b){var c=this.defaultBuilder;return function(d){c.apply(this,[b,d]);return false}},setAnchor:function(b){this.anchor.html(this.template);this.anchor=b==this.element?b:this.element.find(b).eq(0);this.template=this.anchor.html();this.anchor.empty()},$anchor:function(b){if(b){this.element.items("backup");this.element.item("backup");this.setAnchor(b);this.element.update();return this.element}else{return this.anchor}},$template:function(b){if(!arguments.length){return a("<div>").html(this.template).children().eq(this.tplNumber)}if(b=="raw"){return this.template}if(typeof b=="number"){this.tplNumber=b}else{var c=a("<div>").html(this.template).children();var d=c.filter(b).eq(0);if(d.length){this.tplNumber=c.index(d)}else{return this.element}}this.element.items("backup");this.element.item("backup");this.element.update();return this.element},$builder:function(b){if(b){return this.handler(b)}else{return this.builder}},$active:function(){return this.isActive},$plugin:function(b,c){if(c===null){delete this.plugins[b]}else{if(typeof c=="function"){this.plugins[b]=c}else{if(b&&!c){return this.plugins[b]}else{return this.plugins}}}if(typeof c=="function"){this.element.items(true).each(function(){var d=a(this);c.call(d,d.item("root"))})}this.element.update();return this.element},$clone:function(){var c=this.element.attr("id");this.element.attr("id","");var b=this.element.clone().empty().html(this.template);this.element.attr("id",c);return b},$destroy:function(b){this.element.removeClass("chain-element");if(!b){this.element.items("backup");this.element.item("backup");this.element.find(".chain-element").each(function(){a(this).chain("destroy",true)})}this.element.triggerHandler("destroy");this.isActive=false;this.anchor.html(this.template);return this.element}})})(jQuery);(function(a){a.Chain.service("item",{init:function(){this.isActive=false;this.isBuilt=false;this.root=this.element;this.data=false;this.datafn=this.dataHandler},handler:function(b){if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="function"){return this.handleFunction(b)}else{return this.handleDefault()}}},handleObject:function(b){this.setData(b);this.isActive=true;this.update();return this.element},handleFunction:function(b){this.datafn=b;return this.element},handleDefault:function(){if(this.isActive){return this.getData()}else{return false}},getData:function(){this.data=this.datafn.call(this.element,this.data);return this.data},setData:function(d){var c;if(a.Chain.jobject(d)&&d.item()){c=a.extend({},d.item())}else{if(a.Chain.jobject(d)){c={}}else{c=d}}this.data=this.datafn.call(this.element,this.data||c,c);if(this.linkElement&&this.linkElement[0]!=d[0]){var b=this.linkFunction();if(a.Chain.jobject(b)&&b.length&&b.item()){b.item(this.data)}}},dataHandler:function(b,c){if(arguments.length==2){return a.extend(b,c)}else{return b}},update:function(){return this.element.update()},build:function(){var b=this.element.chain("template","raw").replace(/jQuery\d+\=\"null\"/gi,"");this.element.chain("anchor").html(b);if(!a.Chain.jidentic(this.root,this.element)){var c=this.root.chain("plugin");for(var d in c){c[d].apply(this.element,[this.root])}}this.element.chain("builder").apply(this.element,[this.root]);this.isBuilt=true},$update:function(){if(this.element.chain("active")&&this.isActive&&!this.isBuilt&&this.getData()){this.build()}return this.element},$replace:function(b){this.data={};this.setData(b);this.isActive=true;this.update();return this.element},$remove:function(b){this.element.chain("destroy");this.element.remove();this.element.item("link",null);this.element.item("destroy");if(!a.Chain.jidentic(this.root,this.element)&&!b){this.root.update()}},$active:function(){return this.isActive},$root:function(b){if(arguments.length){this.root=b;this.update();return this.element}else{return this.root}},$backup:function(){this.isBuilt=false;return this.element},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.isActive=true;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){var e=b.linkFunction();if(e&&e.length){b.element.item(e)}};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$destroy:function(){return this.element}})})(jQuery);(function(a){a.Chain.service("items",{collections:{all:function(){return this.element.chain("anchor").children(".chain-item")},visible:function(){return this.element.chain("anchor").children(".chain-item:visible")},hidden:function(){return this.element.chain("anchor").children(".chain-item:hidden")},self:function(){return this.element}},init:function(){this.isActive=false;this.pushBuffer=[];this.shiftBuffer=[];this.collections=a.extend({},this.collections)},handler:function(b){if(b instanceof Array){return this.handleArray(b)}else{if(!this.isActive){return a().eq(-1)}else{if(a.Chain.jobject(b)){return this.handleElement(b)}else{if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="number"){return this.handleNumber(b)}else{if(b===true){return this.handleTrue()}else{return this.handleDefault()}}}}}}},handleObject:function(b){return this.collection("all").filter(function(){return a(this).item()==b})},handleElement:function(b){if(!a.Chain.jidentic(b,b.item("root"))&&a.Chain.jidentic(this.element,b.item("root"))){return b}else{return a().eq(-1)}},handleArray:function(b){return this.$merge(b)},handleNumber:function(b){if(b==-1){return this.collection("visible").filter(":last")}else{return this.collection("visible").eq(b)}},handleTrue:function(){return this.collection("all")},handleDefault:function(){return this.collection("visible")},update:function(){this.element.update()},empty:function(){var b=this.collection("all");setTimeout(function(){b.each(function(){a(this).item("remove",true)})},1);this.element.chain("anchor").empty()},collection:function(b,c){if(arguments.length>1){if(typeof c=="function"){this.collections[b]=c}return this.element}else{if(this.collections[b]){return this.collections[b].apply(this)}else{return a().eq(-1)}}},$update:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var c=this;var b=this.element.chain("builder");var f=this.element.chain("template");var d;var e=function(){var g=f.clone()[d?"appendTo":"prependTo"](c.element.chain("anchor")).addClass("chain-item").item("root",c.element);if(c.linkElement&&a.Chain.jobject(this)&&this.item()){g.item("link",this,"self")}else{g.item(this)}g.chain(b)};d=false;a.each(this.shiftBuffer,e);d=true;a.each(this.pushBuffer,e);this.shiftBuffer=[];this.pushBuffer=[];return this.element},$add:function(){if(this.linkElement){return this.element}var d;var c=Array.prototype.slice.call(arguments);if(typeof c[0]=="string"){d=c.shift()}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this[b]=this[b].concat(c);this.update();return this.element},$merge:function(d,c){if(this.linkElement){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;if(a.Chain.jobject(c)){this[b]=this[b].concat(c.map(function(){return a(this)}).get())}else{if(c instanceof Array){this[b]=this[b].concat(c)}}this.update();return this.element},$replace:function(d,c){if(this.linkElement&&arguments.callee.caller!=this.linkUpdater){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this.empty();if(a.Chain.jobject(c)){this[b]=c.map(function(){return a(this)}).get()}else{if(c instanceof Array){this[b]=c}}this.update();return this.element},$remove:function(){if(this.linkElement){return this.element}for(var b=0;b<arguments.length;b++){this.handler(arguments[b]).item("remove",true)}this.update();return this.element},$reorder:function(c,b){if(b){this.handler(c).before(this.handler(b))}else{this.handler(c).appendTo(this.element.chain("anchor"))}this.update();return this.element},$empty:function(){if(this.linkElement){return this.element}this.empty();this.shiftBuffer=[];this.pushBuffer=[];this.update();return this.element},$data:function(b){return this.handler(b).map(function(){return a(this).item()}).get()},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){b.$replace(b.linkFunction())};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$index:function(b){return this.collection("all").index(this.handler(b))},$collection:function(){return this.collection.apply(this,Array.prototype.slice.call(arguments))},$active:function(){return this.isActive},$backup:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var b=[];this.collection("all").each(function(){var c=a(this).item();if(c){b.push(c)}});this.pushBuffer=b.concat(this.pushBuffer);this.empty();return this.element},$destroy:function(){this.empty();return this.element}});a.Chain.extend("items",{doFilter:function(){var c=this.searchProperties;var d=this.searchText;if(d){if(typeof d=="string"){d=d.toLowerCase()}var b=this.element.items(true).filter(function(){var f=a(this).item();if(c){for(var e=0;e<c.length;e++){if(typeof f[c[e]]=="string"&&!!(typeof d=="string"?f[c[e]].toLowerCase():f[c[e]]).match(d)){return true}}}else{for(var g in f){if(typeof f[g]=="string"&&!!(typeof d=="string"?f[g].toLowerCase():f[g]).match(d)){return true}}}});this.element.items(true).not(b).hide();b.show()}else{this.element.items(true).show();this.element.unbind("preupdate",this.searchBinding);this.searchBinding=null}},$filter:function(d,c){if(!arguments.length){return this.update()}this.searchText=d;if(typeof c=="string"){this.searchProperties=[c]}else{if(c instanceof Array){this.searchProperties=c}else{this.searchProperties=null}}if(!this.searchBinding){var b=this;this.searchBinding=function(f,e){b.doFilter()};this.element.bind("preupdate",this.searchBinding)}return this.update()}});a.Chain.extend("items",{doSort:function(){var b=this.sortName;var d=this.sortOpt;var g={number:function(i,h){return parseFloat((a(i).item()[b]+"").match(/\d+/gi)[0])-parseFloat((a(h).item()[b]+"").match(/\d+/gi)[0])},"default":function(i,h){return a(i).item()[b]>a(h).item()[b]?1:-1}};if(b){var e=d.fn||g[d.type]||g["default"];var f=this.element.items(true).get().sort(e);f=d.desc?f.reverse():f;for(var c=0;c<f.length;c++){this.element.chain("anchor").append(f[c])}d.desc=d.toggle?!d.desc:d.desc}else{this.element.unbind("preupdate",this.sortBinding);this.sortBinding=null}},$sort:function(c,d){if(!c&&c!==null&&c!==false){return this.update()}if(this.sortName!=c){this.sortOpt=a.extend({desc:false,type:"default",toggle:false},d)}else{a.extend(this.sortOpt,d)}this.sortName=c;if(!this.sortBinding){var b=this;this.sortBinding=function(f,e){b.doSort()};this.element.bind("preupdate",this.sortBinding)}return this.update()}})})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(e){var d=".toolbar h1";a(function(){a("#jqt").bind("pageAnimationStart",function(i,g){if(g.direction==="in"){var f=a(d,a(i.target));var h=a(i.target).data("referrer");if(f.length&&h&&f.html()===""){f.html(h.text())}}})});function c(f){d=f}return{setTitleSelector:c}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(f){var m,i;var d=false;function n(p,o,r,q){i=p;if(window.openDatabase){m=openDatabase(p,o,r,q);if(!m){debugTxt=("Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota");if(d){c(debugTxt)}}}else{debugTxt=("Couldn't open the database. Please try with a WebKit nightly with this feature enabled");if(d){c(debugTxt)}}}function e(o){for(x=0;x<o.createTables.length;x++){p(o.createTables[x])}function p(r){debugTxt="create table "+r.table;var q="CREATE TABLE "+r.table+" (";nodeSize=r.property.length-1;for(y=0;y<=nodeSize;y++){q+=r.property[y].name+" "+r.property[y].type;if(y!=nodeSize){q+=", "}}q+=")";k(q,debugTxt)}}function j(p,o,q){stringQuery="DELETE FROM "+p+" WHERE "+o+" = "+q;debugTxt="delete row"+o+" "+q;k(stringQuery,debugTxt)}function g(p,o){stringQuery="SELECT * FROM "+p;debugTxt="selecting everything in table "+p;k(stringQuery,debugTxt,o)}function h(o){stringQuery="DROP TABLE "+o;debugTxt="delete table "+o;k(stringQuery,debugTxt)}function l(o){for(x=0;x<o.addRow.length;x++){p(o.addRow[x])}function p(q){debugTxt="create row "+q.table;stringQuery="INSERT INTO "+q.table+" (";nodeSize=q.property.length-1;for(y=0;y<=nodeSize;y++){stringQuery+=q.property[y].name;if(y!=nodeSize){stringQuery+=", "}}stringQuery+=") VALUES (";for(y=0;y<=nodeSize;y++){stringQuery+='"'+q.property[y].value+'"';if(y!=nodeSize){stringQuery+=", "}}stringQuery+=")";k(stringQuery,debugTxt)}}function k(o,p,q){p+="<br> SQL: "+o;callback=q;m.transaction(function(r){r.executeSql(o,[],function(t,s){if(callback){callback(s)}if(d){p+="<br><span style='color:green'>success</span> ";c(p)}},function(s,t){p+="<br><span style='color:red'>"+t.message+"</span> ";if(d){c(p)}})})}function c(o){if(!a("#debugMode")[0]){a("body").append("<div style='position:abolute;top:0 !important;left:0 !important;width:100% !important;min-height:100px !important; height:300px; overflow:scroll;z-index:1000; display:block; opacity:0.8; background:#000;-webkit-backface-visibility:visible ' id='debugMode'></div>")}a("#debugMode").append("<div class='debugerror'>"+o+"</div>")}return{dbOpen:n,dbDeleteRow:j,dbDropTable:h,dbInsertRows:l,dbSelectAll:g,dbExecuteQuery:k,dbCreateTables:e}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(d){function c(g){if(g==null){g=0}var f=e(g);a("body > *").css("min-height",f+"px !important");a("body.fullscreen > *").css("min-height",f+"px !important");a("body.fullscreen.black-translucent > *").css("min-height",f+"px !important");a("body.landscape > *").css("min-height",f+"px !important")}function e(g){var f=0;if(typeof(window.innerWidth)=="number"){f=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){f=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){f=document.body.clientHeight}}}if(f<g){f=g}return f}return{resetHeight:c}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(c){b.fn.makeFloaty=function(d){var f={align:"top",spacing:20,time:".3s"};var e=b.extend({},f,d);e.align=(e.align=="top")?"top":"bottom";return this.each(function(){var g=b(this);g.css({"-webkit-transition":"top "+e.time+" ease-in-out",display:"block","min-height":"0 !important"}).data("settings",e);b(document).bind("scroll",function(){if(g.data("floatyVisible")===true){g.scrollFloaty()}});g.scrollFloaty()})};b.fn.scrollFloaty=function(){return this.each(function(){var d=b(this);var f=d.data("settings");var e=b("html").attr("clientHeight");var g=window.pageYOffset+((f.align=="top")?f.spacing:e-f.spacing-d.get(0).offsetHeight);d.css("top",g).data("floatyVisible",true)})};b.fn.hideFloaty=function(){return this.each(function(){var d=b(this);var e=d.get(0).offsetHeight;d.css("top",-e-10).data("floatyVisible",false)})};b.fn.toggleFloaty=function(){return this.each(function(){var d=b(this);if(d.data("floatyVisible")===true){d.hideFloaty()}else{d.scrollFloaty()}})}})}})(jQuery);(function(c){if(c.jQTouch){function b(f){var i,e,h,i,g=0;h={element:c("#gesture_test"),onGestureStart:null,onGestureChange:null,onGestureEnd:null,};h=c.extend({},h,f);h.element.bind("gesturestart",function(j){j.originalEvent.preventDefault();if(h.onGestureStart){h.onGestureStart(a(j,i),d(j,g),j,h.element)}}).bind("gesturechange",function(j){if(h.onGestureChange){h.onGestureChange(a(j,i),d(j,g),j,h.element)}}).bind("gestureend",function(j){i=j.originalEvent.scale;g=(j.originalEvent.rotation+g)%360;if(h.onGestureEnd){h.onGestureEnd(a(j,i),d(j,g),j,h.element)}})}function d(f,e){return f.originalEvent.rotation+e}function a(f,e){return f.originalEvent.scale+e}c.fn.bindGestures=function(e){e.element=this;b(e)}}})(jQuery);(function(f){var g,j=this,o=j.document,l=this.WebKitCSSMatrix,k={selector:".horizontal-scroll > table",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",defaultTransform:"defaulttransform",bounce:function(u){return u.attr("bounce")==="false"?false:k.bounce},scrollBar:function(u){return u.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageX",numberOfTouches:1,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,bounceSpeed:500,preventDefault:true,maxScrollTime:1000,friction:3,bounceTimingFunction:"cubic-bezier(0,0,.25,1)",bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:s,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:t,momentum:m},q=function(){return j.innerWidth+"px"},n=function(u){return(j.innerHeight-u.toolbar)+"px"},h={variables:{toolbar:45},defaults:{".horizontal-scroll":{width:q,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:n},".horizontal-scroll > table":{height:"100%"},".horizontal-scroll .scrollbar.horizontal":{"-webkit-transition-timing-function":"cubic-bezier(0,0,0.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,300ms","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 8, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3 2",position:"absolute","z-index":10,width:"1px",height:"5px",bottom:"1px",left:"1px"}},portrait:{".portrait .horizontal-scroll":{width:q}},landscape:{".landscape .horizontal-scroll":{width:q}}};if(f.jQTouch){f.jQTouch.addExtension(function(v){function u(A,z){var w=z.page.find(k.selector);w.scrollHorizontally(k.attributesToOptions(w,k.attributes))}f(o.body).bind("pageInserted",u);f(function(){f(k.selector).each(function(){f(this).scrollHorizontally(k.attributesToOptions(f(this),k.attributes))})});return{}})}function e(w,u){var v={};f.each(u,function(z,A){if(f.isFunction(A)){v[z]=A(w)}else{if(w.attr(A)!=g){v[z]=w.attr(A)}}});return v}f.fn.scrollHorizontally=function(u){u=f.extend(true,{},k,u||{});return this.each(function(){p(this,u)})};f.fn.scrollHorizontally.defaults=function(u){if(u!==g){k=f.extend(true,k,u)}return f.extend({},k)};f.fn.scrollHorizontally.defaultCSS=function(u){if(u!==g){h=f.extend(true,h,u)}return f.extend({},h)};function p(z,w){var u=f(z).data("jqt-horizontal-scroll-options",w).css("webkitTransform",r(w.defaultTransform,w.defaultOffset)),v=new l(u.css("webkitTransform"));f.each(w.events,function(A,B){z.addEventListener(A,B,false)});w.currentPosition=v.m41;w.parentWidth=u.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(u.parent(),"horizontal",w.scrollBarOptions||{}):b(u.parent(),"horizontal",w.scrollBarOptions||{})}}function a(C){var D=f(this),w=D.data("jqt-horizontal-scroll-options"),v,B=D.outerWidth(),A=D.parent().width(),z=-(B-A),u=A/6;w.parentWidth=A;if(!!w.ignoreTags&&f(C.target).is(w.ignoreTags)||C.targetTouches.length!==w.numberOfTouches){return null}v=new l(D.css("webkitTransform"));D.data("jqt-horizontal-scroll-current-event",{startLocation:C.touches[0][w.eventProperty],startPosition:v.m41,currentPosition:v.m41,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentWidth:A,endPoint:z,minScroll:!w.bounce?0:u,maxScroll:!w.bounce?z:z-u,timingFunction:w.bounceTimingFunction});if(w.scrollBarElement){w.scrollBarElement.init(A,B)}w.setPosition(D,w,v.m41,"0");if(w.preventDefault){C.preventDefault();return false}else{return true}}function s(z){var B=f(this),w=B.data("jqt-horizontal-scroll-options"),A=B.data("jqt-horizontal-scroll-current-event"),v=A.lastMoveTime,C=A.startLocation-z.touches[0][w.eventProperty],u=A.startPosition-C;A.currentPosition=u;A.moved=true;A.lastMoveTime=z.timeStamp;if((A.lastMoveTime-v)>w.maxScrollTime){A.startTime=A.lastMoveTime}if(w.scrollBarElement&&!w.scrollBarElement.visible){w.scrollBarElement.show()}w.setPosition(B,w,A.currentPosition,0);if(w.preventDefault){z.preventDefault();return false}else{return true}}function d(v){var A=f(this),u=A.data("jqt-horizontal-scroll-options"),w=A.data("jqt-horizontal-scroll-current-event"),z,B;if(!w.moved){if(u.scrollBarElement){u.scrollBarElement.hide()}z=v.target;if(z.nodeType==3){z=z.parentNode}B=o.createEvent("MouseEvents");B.initEvent("click",true,true);z.dispatchEvent(B);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}}u.momentum(A,u,w,v);u.setPosition(A,u,w.currentPosition,w.duration);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}else{return true}}function i(z){var w=f(this),u=w.data("jqt-horizontal-scroll-options"),v=w.data("jqt-horizontal-scroll-current-event");if(v){if(v.currentPosition>0){v.currentPosition=0;u.setPosition(w,u,0,u.bounceSpeed)}else{if(v.currentPosition<v.endPoint){v.currentPosition=v.endPoint;u.setPosition(w,u,v.endPoint,u.bounceSpeed)}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}function m(C,F,D,v){var z=Math.min(F.maxScrollTime,D.lastMoveTime-D.startTime),u=D.startPosition-D.currentPosition,A=Math.abs(u)/z,B=z*A*F.friction,w=Math.round(u*A),E=Math.round(D.currentPosition-w);if(D.currentPosition>0){E=0}else{if(D.currentPosition<D.endPoint){E=D.endPoint}else{if(E>D.minScroll){B=B*Math.abs(D.minScroll/E);E=D.minScroll}else{if(E<D.maxScroll){B=B*Math.abs(D.maxScroll/E);E=D.maxScroll}}}}D.momentum=E/D.currentPosition;D.currentPosition=E;D.duration=B}function t(v,u){return u.setPosition(v,u,0,u.defaultDuration)}function c(w,v,u,B,A){if(v.scrollBarElement){var z=(w.parent().width()-w.outerWidth());if(u>0){z+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/z*u,r("{0}ms",B!==g?B:v.defaultDuration))}if(B!==g){w.css("webkitTransitionDuration",r("{0}ms",B))}if(A!==g){w.css("webkitTransitionTimingFunction",A)}v.currentPosition=u||0;return w.css("webkitTransform",r("translate3d({0}px, 0, 0)",v.currentPosition))}function r(v){var u=arguments;return v.replace(/\{(\d+)\}/g,function(z,w){return u[Number(w)+1]+""})}function b(v,w,u){if(!(this instanceof b)){return new b(v,w,u)}this.direction=w;this.bar=f(o.createElement("div")).addClass("scrollbar "+w).appendTo(v)[0]}b.prototype={direction:"horizontal",size:0,maxSize:0,maxScroll:0,visible:false,init:function(u,v){var w=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=u-8;this.size=Math.round(this.maxSize*this.maxSize/v)+w;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-w)+"px"},setPosition:function(u){u=this.direction=="horizontal"?"translate3d("+Math.round(u)+"px,0,0)":"translate3d(0,"+Math.round(u)+"px,0)";this.bar.style.webkitTransform=u},scrollTo:function(v,u){this.bar.style.webkitTransitionDuration=(u||"400ms")+",300ms";this.setPosition(v)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){j.scrollTo(0,0);var u="",z=h,w=j.innerHeight>j.innerWidth?"portrait":"landscape",A=function(B,C){u+=B+":"+(f.isFunction(C)?C(z.variables):C)+";"},v=function(B,C){u+=B+"{";f.each(C,A);u+="}"};f.each(z.defaults,v);f.each(z[w],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head");f(j).one("orientationchange",function(){setTimeout(function(){j.scrollTo(0,0);u="";f.each(z[j.innerHeight>j.innerWidth?"portrait":"landscape"],v);f(o.createElement("style")).attr({type:"text/css",media:"screen"}).html(u).appendTo("head")},30)})})})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var i,f,h;function d(){return navigator.geolocation}function g(j){if(d()){h=j;navigator.geolocation.getCurrentPosition(c);return true}else{console.log("Device not capable of geo-location.");j(false);return false}}function c(j){i=j.coords.latitude;f=j.coords.longitude;if(h){h(e())}}function e(){if(i&&f){return{latitude:i,longitude:f}}else{console.log("No location available. Try calling updateLocation() first.");return false}}return{updateLocation:g,getLocation:e}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var c=[];c[0]="uncached";c[1]="idle";c[2]="checking";c[3]="downloading";c[4]="updateready";c[5]="obsolete";var d=window.applicationCache;d.addEventListener("cached",f,false);d.addEventListener("checking",f,false);d.addEventListener("downloading",f,false);d.addEventListener("error",f,false);d.addEventListener("noupdate",f,false);d.addEventListener("obsolete",f,false);d.addEventListener("progress",f,false);d.addEventListener("updateready",f,false);function f(m){var j,i,k,l;j=(h())?"yes":"no";i=c[d.status];k=m.type;l="online: "+j;l+=", event: "+k;l+=", status: "+i;if(k=="error"&&navigator.onLine){l+=" There was an unknown error, check your Cache Manifest."}console.log(l)}function h(){return navigator.onLine}if(!b("html").attr("manifest")){console.log("No Cache Manifest listed on the <html> tag.")}d.addEventListener("updateready",function(i){if(c[d.status]!="idle"){d.swapCache();console.log("Swapped/updated the Cache Manifest.")}},false);function e(){d.update()}function g(){setInterval(function(){d.update()},10000)}return{isOnline:h,checkForUpdates:e,autoCheckForUpdates:g}})}})(jQuery);
|
|
1
|
+
(function(a){a.jQTouch=function(w){var E,t=a("head"),M="",J=[],I=0,m={},j="",v="portrait",U=true,T=0,e=0,i=[],z={},k=351,O=a.jQTouch.prototype.extensions,S=[],s="",F={addGlossToIcon:true,backSelector:".back, .cancel, .goback",cacheGetRequests:true,debug:false,fallback2dAnimation:"fade",fixedViewport:true,formSelector:"form",fullScreen:true,fullScreenClass:"fullscreen",hoverDelay:50,icon:null,icon4:null,moveThreshold:10,preloadImages:false,pressDelay:1000,startupScreen:null,statusBar:"default",submitSelector:".submit",touchSelector:"a, .touch",useAnimations:true,useFastTouch:true,animations:[{selector:".cube",name:"cubeleft",is3d:true},{selector:".cubeleft",name:"cubeleft",is3d:true},{selector:".cuberight",name:"cuberight",is3d:true},{selector:".dissolve",name:"dissolve",is3d:false},{selector:".fade",name:"fade",is3d:false},{selector:".flip",name:"flipleft",is3d:true},{selector:".flipleft",name:"flipleft",is3d:true},{selector:".flipright",name:"flipright",is3d:true},{selector:".pop",name:"pop",is3d:true},{selector:".slide",name:"slideleft",is3d:false},{selector:".slidedown",name:"slidedown",is3d:false},{selector:".slideleft",name:"slideleft",is3d:false},{selector:".slideright",name:"slideright",is3d:false},{selector:".slideup",name:"slideup",is3d:false},{selector:".swap",name:"swapleft",is3d:true},{selector:"#jqt > * > ul li a",name:"slideleft",is3d:false}]};function A(V){now=(new Date).getTime();delta=now-T;T=now;if(m.debug){if(V){f(delta+": "+V)}else{f(delta+": Called "+arguments.callee.caller.name)}}}function f(V){if(window.console!==undefined){console.log(V)}}function b(V){if(typeof(V.selector)==="string"&&typeof(V.name)==="string"){S.push(V)}}function l(W,V){A();J.unshift({page:W,animation:V,hash:"#"+W.prop("id"),id:W.prop("id")})}function o(W){A();if(!U){A("ClickHandler handler aborted because tap is not ready");W.preventDefault();return false}var V=a(W.target);if(!V.is(i.join(", "))){var V=a(W.target).closest(i.join(", "))}if(V&&V.prop("href")&&!V.isExternalLink()){A("Need to prevent default click behavior");W.preventDefault()}else{A("No need to prevent default click behavior")}if(a.support.touch){A("Not converting click to a tap event because touch handler is on the job")}else{A("Converting click event to a tap event because touch handlers are not present or off");a(W.target).trigger("tap",W)}}function c(aa,X,Z,W){A();if(X.length===0){a.fn.unselect();A("Target element is missing.");return false}if(X.hasClass("current")){a.fn.unselect();A("You are already on the page you are trying to navigate to.");return false}a(":focus").blur();aa.trigger("pageAnimationStart",{direction:"out"});X.trigger("pageAnimationStart",{direction:"in"});if(a.support.animationEvents&&Z&&m.useAnimations){U=false;if(!a.support.transform3d&&Z.is3d){Z.name=m.fallback2dAnimation}var V;if(W){if(Z.name.indexOf("left")>0){V=Z.name.replace(/left/,"right")}else{if(Z.name.indexOf("right")>0){V=Z.name.replace(/right/,"left")}else{if(Z.name.indexOf("up")>0){V=Z.name.replace(/up/,"down")}else{if(Z.name.indexOf("down")>0){V=Z.name.replace(/down/,"up")}else{V=Z.name}}}}}else{V=Z.name}aa.bind("webkitAnimationEnd",Y);aa.bind("webkitTransitionEnd",Y);scrollTo(0,0);X.addClass(V+" in current");aa.addClass(V+" out")}else{X.addClass("current");Y()}function Y(ab){A();if(a.support.animationEvents&&Z&&m.useAnimations){aa.unbind("webkitAnimationEnd",Y);aa.unbind("webkitTransitionEnd",Y);aa.removeClass(V+" out current");X.removeClass(V+" in")}else{aa.removeClass(V+" out current")}j=X;if(W){J.shift()}else{l(j,Z)}aa.unselect();e=(new Date()).getTime();n(j.prop("id"));U=true;X.trigger("pageAnimationEnd",{direction:"in",animation:Z});aa.trigger("pageAnimationEnd",{direction:"out",animation:Z})}return true}function R(){A();return v}function h(){A();if(J.length<1){A("History is empty.")}if(J.length===1){A("You are on the first panel.")}var W=J[0],V=J[1];if(c(W.page,V.page,W.animation,true)){return z}else{A("Could not go back.");return false}}function N(Z,aa,X){A();if(X){f("The reverse parameter of the goTo() function has been deprecated.")}var ab=J[0].page;if(typeof aa==="string"){for(var Y=0,V=S.length;Y<V;Y++){if(S[Y].name===aa){aa=S[Y];break}}}if(typeof(Z)==="string"){var W=a(Z);if(W.length<1){d(Z,{animation:aa});return}else{Z=W}}if(c(ab,Z,aa)){return z}else{A("Could not animate pages.");return false}}function Q(V){A();if(location.hash===J[0].hash){A("We are on the right panel")}else{A("We are not on the right panel");if(location.hash===J[1].hash){h()}else{A(location.hash+" !== "+J[1].hash)}}}function P(V){A();m=a.extend({},F,V);if(m.preloadImages){for(var W=m.preloadImages.length-1;W>=0;W--){(new Image()).src=m.preloadImages[W]}}if(m.icon||m.icon4){var X,Y;if(m.icon4&&window.devicePixelRatio&&window.devicePixelRatio===2){Y=m.icon4}else{if(m.icon){Y=m.icon}else{Y=false}}if(Y){X=(m.addGlossToIcon)?"":"-precomposed";s+='<link rel="apple-touch-icon'+X+'" href="'+Y+'" />'}}if(m.startupScreen){s+='<link rel="apple-touch-startup-image" href="'+m.startupScreen+'" />'}if(m.fixedViewport){s+='<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>'}if(m.fullScreen){s+='<meta name="apple-mobile-web-app-capable" content="yes" />';if(m.statusBar){s+='<meta name="apple-mobile-web-app-status-bar-style" content="'+m.statusBar+'" />'}}if(s){t.prepend(s)}}function C(V,W){A();var X=null;a(V).each(function(Z,aa){var Y=a(this);if(!Y.prop("id")){Y.prop("id","page-"+(++I))}a("#"+Y.prop("id")).remove();E.trigger("pageInserted",{page:Y.appendTo(E)});if(Y.hasClass("current")||!X){X=Y}});if(X!==null){N(X,W);return X}else{return false}}function B(V){var W=(new Date()).getTime()-e;if(W<k){return false}}function g(){A();v=Math.abs(window.orientation)==90?"landscape":"portrait";E.removeClass("portrait landscape").addClass(v).trigger("turn",{orientation:v})}function n(V){A();V=V.replace(/^#/,""),location.hash="#"+V}function d(V,W){A();var Y={data:null,method:"GET",animation:null,callback:null,$referrer:null};var X=a.extend({},Y,W);if(V!="#"){a.ajax({url:V,data:X.data,type:X.method,success:function(Z,ab){var aa=C(Z,X.animation);if(aa){if(X.method=="GET"&&m.cacheGetRequests===true&&X.$referrer){X.$referrer.prop("href","#"+aa.prop("id"))}if(X.callback){X.callback(true)}}},error:function(Z){if(X.$referrer){X.$referrer.unselect()}if(X.callback){X.callback(false)}}})}else{if(X.$referrer){X.$referrer.unselect()}}}function q(W,X){A();a(":focus").blur();W.preventDefault();var V=(typeof(W)==="string")?a(W).eq(0):(W.target?a(W.target):a(W));A(V.prop("action"));if(V.length&&V.is(m.formSelector)&&V.prop("action")){d(V.prop("action"),{data:V.serialize(),method:V.prop("method")||"POST",animation:S[0]||null,callback:X});return false}return false}function L(X){A();var W=X.closest("form");if(W.length===0){A("No parent form found")}else{A("About to submit parent form");var V=a.Event("submit");V.preventDefault();W.trigger(V);return false}return true}function p(){A();return(typeof WebKitAnimationEvent!="undefined")}function G(){A();return(typeof WebKitCSSMatrix!="undefined")}function K(){A();if(typeof TouchEvent!="undefined"){if(window.navigator.userAgent.indexOf("Mobile")>-1){return true}else{return false}}else{return false}}function D(){A();var X,W,Y,Z,V;X=document.getElementsByTagName("head")[0];W=document.body;Y=document.createElement("style");Y.textContent="@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#jqtTestFor3dSupport{height:3px}}";Z=document.createElement("div");Z.id="jqtTestFor3dSupport";X.appendChild(Y);W.appendChild(Z);V=Z.offsetHeight===3;Y.parentNode.removeChild(Y);Z.parentNode.removeChild(Z);return V}function H(ab){A();if(!U){A("Tap is not ready");return false}var X=a(ab.target);if(!X.is(i.join(", "))){var X=a(ab.target).closest(i.join(", "))}if(!X.length||!X.prop("href")){A("Could not find a link related to tapped element");return false}var aa=X.prop("target"),Z=X.prop("hash"),Y=null;if(X.isExternalLink()){X.unselect();return true}else{if(X.is(m.backSelector)){h(Z)}else{if(X.is(m.submitSelector)){L(X)}else{if(aa==="_webapp"){window.location=X.prop("href");return false}else{if(X.prop("href")==="#"){X.unselect();return true}else{for(var W=0,V=S.length;W<V;W++){if(X.is(S[W].selector)){Y=S[W];break}}if(!Y){f("Animation could not be found. Using slideleft.");Y="slideleft"}if(Z&&Z!=="#"){X.addClass("active");N(a(Z).data("referrer",X),Y,X.hasClass("reverse"));return false}else{X.addClass("loading active");d(X.prop("href"),{animation:Y,callback:function(){X.removeClass("loading");setTimeout(a.fn.unselect,250,X)},$referrer:X});return false}}}}}}}function u(af){A();if(!U){A("TouchStart handler aborted because tap is not ready");af.preventDefault();return false}var aj=a(af.target);if(!aj.length){A("Could not find target of touchstart event.");return}var X=(new Date).getTime(),V=null,Y=null,ab,ad,ac,aa=0,Z=0,ae=0;if(event.changedTouches&&event.changedTouches.length){ab=event.changedTouches[0];ad=ab.pageX;ac=ab.pageY}aj.bind("touchmove",ag).bind("touchend",W).bind("touchcancel",ah);V=setTimeout(function(){aj.makeActive()},m.hoverDelay);Y=setTimeout(function(){aj.unbind("touchmove",ag).unbind("touchend",W).unbind("touchcancel",ah);aj.unselect();clearTimeout(V);aj.trigger("press")},m.pressDelay);function ah(ak){A();clearTimeout(V);aj.unselect();aj.unbind("touchmove",ag).unbind("touchend",W).unbind("touchcancel",ah)}function W(ak){A();aj.unbind("touchend",W).unbind("touchcancel",ah);clearTimeout(V);clearTimeout(Y);if(Math.abs(aa)<m.moveThreshold&&Math.abs(Z)<m.moveThreshold&&ae<m.pressDelay){aj.trigger("tap",ak)}else{aj.unselect()}}function ag(an){ai();var am=Math.abs(aa);var ak=Math.abs(Z);var al;if(am>ak&&(am>35)&&ae<1000){if(aa<0){al="left"}else{al="right"}aj.unbind("touchmove",ag).unbind("touchend",W).unbind("touchcancel",ah);aj.trigger("swipe",{direction:al,deltaX:aa,deltaY:Z})}aj.unselect();clearTimeout(V);if(am>m.moveThreshold||ak>m.moveThreshold){clearTimeout(Y)}}function ai(){var ak=event.changedTouches[0]||null;aa=ak.pageX-ad;Z=ak.pageY-ac;ae=(new Date).getTime()-X}}function r(V){A();if(V!==undefined){if(V===true){if(K()){a.support.touch=true}else{f("This device does not support touch events")}}else{a.support.touch=false}}return a.support.touch}P(w);a(document).ready(function(){a.support.animationEvents=p();a.support.cssMatrix=G();a.support.touch=K()&&m.useFastTouch;a.support.transform3d=D();if(!a.support.touch){f("This device does not support touch interaction, or it has been deactivated by the developer. Some features might be unavailable.")}if(!a.support.transform3d){f("This device does not support 3d animation. 2d animations will be used instead.")}a.fn.isExternalLink=function(){var Z=a(this);return(Z.prop("target")=="_blank"||Z.prop("rel")=="external"||Z.is('a[href^="http://maps.google.com"], a[href^="mailto:"], a[href^="tel:"], a[href^="javascript:"], a[href*="youtube.com/v"], a[href*="youtube.com/watch"]'))};a.fn.makeActive=function(){return a(this).addClass("active")};a.fn.press=function(Z){if(a.isFunction(Z)){return a(this).live("press",Z)}else{return a(this).trigger("press")}};a.fn.swipe=function(Z){if(a.isFunction(Z)){return a(this).live("swipe",Z)}else{return a(this).trigger("swipe")}};a.fn.tap=function(Z){if(a.isFunction(Z)){return a(this).live("tap",Z)}else{return a(this).trigger("tap")}};a.fn.unselect=function(Z){if(Z){Z.removeClass("active")}else{a(".active").removeClass("active")}};for(var W=0,V=O.length;W<V;W++){var X=O[W];if(a.isFunction(X)){a.extend(z,X(z))}}if(m.cubeSelector){f("NOTE: cubeSelector has been deprecated. Please use cubeleftSelector instead.");m.cubeleftSelector=m.cubeSelector}if(m.flipSelector){f("NOTE: flipSelector has been deprecated. Please use flipleftSelector instead.");m.flipleftSelector=m.flipSelector}if(m.slideSelector){f("NOTE: slideSelector has been deprecated. Please use slideleftSelector instead.");m.slideleftSelector=m.slideSelector}for(var W=0,V=F.animations.length;W<V;W++){var Y=F.animations[W];if(m[Y.name+"Selector"]!==undefined){Y.selector=m[Y.name+"Selector"]}b(Y)}i.push("input");i.push(m.touchSelector);i.push(m.backSelector);i.push(m.submitSelector);a(i.join(", ")).css("-webkit-touch-callout","none");E=a("#jqt");if(E.length===0){f('Could not find an element with the id "jqt", so the body id has been set to "jqt". If you are having any problems, wrapping your panels in a div with the id "jqt" might help.');E=a("body").prop("id","jqt")}if(a.support.transform3d){E.addClass("supports3d")}if(m.fullScreenClass&&window.navigator.standalone==true){E.addClass(m.fullScreenClass+" "+m.statusBar)}if(window.navigator.userAgent.match(/Android/ig)){E.addClass("android")}a(window).bind("hashchange",Q);E.bind("touchstart",u).bind("click",o).bind("mousedown",B).bind("orientationchange",g).bind("submit",q).bind("tap",H).trigger("orientationchange");if(a("#jqt > .current").length==0){j=a("#jqt > *:first")}else{j=a("#jqt > .current:first");a("#jqt > .current").removeClass("current")}a(j).addClass("current");M=a(j).prop("id");n(M);l(j);scrollTo(0,0);a("#jqt > *").css("minHeight",window.innerHeight)});z={addAnimation:b,animations:S,getOrientation:R,goBack:h,goTo:N,hist:J,settings:m,submitForm:q,support:a.support,useFastTouch:r};return z};a.jQTouch.prototype.extensions=[];a.jQTouch.addExtension=function(b){a.jQTouch.prototype.extensions.push(b)}})(jQuery);(function(a){a.fn.transition=function(c,b){return this.each(function(){var e=a(this);var h={speed:"300ms",callback:null,ease:"ease-in-out"};var g=a.extend({},h,b);if(g.speed===0){e.css(c);window.setTimeout(g.callback,0)}else{if(a.browser.safari){var f=[];for(var d in c){f.push(d)}e.css({webkitTransitionProperty:f.join(", "),webkitTransitionDuration:g.speed,webkitTransitionTimingFunction:g.ease});if(g.callback){e.one("webkitTransitionEnd",g.callback)}setTimeout(function(i){i.css(c)},0,e)}else{e.animate(c,g.speed,g.callback)}}})}})(jQuery);var SpinningWheel={cellHeight:44,friction:0.003,slotData:[],handleEvent:function(a){if(a.type=="touchstart"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapDown(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollStart(a)}}}else{if(a.type=="touchmove"){this.lockScreen(a);if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapCancel(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollMove(a)}}}else{if(a.type=="touchend"){if(a.currentTarget.id=="sw-cancel"||a.currentTarget.id=="sw-done"){this.tapUp(a)}else{if(a.currentTarget.id=="sw-frame"){this.scrollEnd(a)}}}else{if(a.type=="webkitTransitionEnd"){if(a.target.id=="sw-wrapper"){}else{this.backWithinBoundaries(a)}}else{if(a.type=="orientationchange"){this.onOrientationChange(a)}else{if(a.type=="scroll"){this.onScroll(a)}}}}}}},onOrientationChange:function(a){window.scrollTo(0,0);this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px";this.calculateSlotsWidth()},onScroll:function(a){this.swWrapper.style.top=window.innerHeight+window.pageYOffset+"px"},lockScreen:function(a){a.preventDefault();a.stopPropagation()},reset:function(){this.slotEl=[];this.activeSlot=null;this.swWrapper=undefined;this.swSlotWrapper=undefined;this.swSlots=undefined;this.swFrame=undefined},calculateSlotsWidth:function(){var b=this.swSlots.getElementsByTagName("div");for(var a=0;a<b.length;a+=1){this.slotEl[a].slotWidth=b[a].offsetWidth}},create:function(){var d,a,b,c,e;this.reset();e=document.createElement("div");e.id="sw-wrapper";e.style.top=window.innerHeight+window.pageYOffset+"px";e.style.webkitTransitionProperty="-webkit-transform";e.innerHTML='<div id="sw-slots-wrapper"><div id="sw-slots"></div></div><div id="sw-frame"></div>';document.body.appendChild(e);this.swWrapper=e;this.swSlotWrapper=document.getElementById("sw-slots-wrapper");this.swSlots=document.getElementById("sw-slots");this.swFrame=document.getElementById("sw-frame");for(a=0;a<this.slotData.length;a+=1){c=document.createElement("ul");b="";for(d in this.slotData[a].values){b+="<li>"+this.slotData[a].values[d]+"</li>"}c.innerHTML=b;e=document.createElement("div");e.className=this.slotData[a].style;e.appendChild(c);this.swSlots.appendChild(e);c.slotPosition=a;c.slotYPosition=0;c.slotWidth=0;c.slotMaxScroll=this.swSlotWrapper.clientHeight-c.clientHeight-86;c.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.slotEl.push(c);if(this.slotData[a].defaultValue){this.scrollToValue(a,this.slotData[a].defaultValue)}}this.calculateSlotsWidth();document.addEventListener("touchmove",this,false);window.addEventListener("orientationchange",this,true);window.addEventListener("scroll",this,true);document.getElementById("sw-done").addEventListener("touchstart",this,false);this.swFrame.addEventListener("touchstart",this,false)},open:function(){this.create();this.swWrapper.style.webkitTransitionTimingFunction="ease-out";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, -210px, 0)"},destroy:function(){this.swWrapper.removeEventListener("webkitTransitionEnd",this,false);this.swFrame.removeEventListener("touchstart",this,false);document.getElementById("sw-done").removeEventListener("touchstart",this,false);document.removeEventListener("touchmove",this,false);window.removeEventListener("orientationchange",this,true);window.removeEventListener("scroll",this,true);this.slotData=[];this.cancelAction=function(){return false};this.cancelDone=function(){return true};this.reset();document.body.removeChild(document.getElementById("sw-wrapper"))},close:function(){this.swWrapper.style.webkitTransitionTimingFunction="ease-in";this.swWrapper.style.webkitTransitionDuration="400ms";this.swWrapper.style.webkitTransform="translate3d(0, 0, 0)";this.swWrapper.addEventListener("webkitTransitionEnd",this,false)},addSlot:function(b,d,a){if(!d){d=""}d=d.split(" ");for(var c=0;c<d.length;c+=1){d[c]="sw-"+d[c]}d=d.join(" ");var e={values:b,style:d,defaultValue:a};this.slotData.push(e)},getSelectedValues:function(){var c,f,d,a,e=[],b=[];for(d in this.slotEl){this.slotEl[d].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[d].style.webkitTransitionDuration="0";if(this.slotEl[d].slotYPosition>0){this.setPosition(d,0)}else{if(this.slotEl[d].slotYPosition<this.slotEl[d].slotMaxScroll){this.setPosition(d,this.slotEl[d].slotMaxScroll)}}c=-Math.round(this.slotEl[d].slotYPosition/this.cellHeight);f=0;for(a in this.slotData[d].values){if(f==c){e.push(a);b.push(this.slotData[d].values[a]);break}f+=1}}return{keys:e,values:b}},setPosition:function(b,a){this.slotEl[b].slotYPosition=a;this.slotEl[b].style.webkitTransform="translate3d(0, "+a+"px, 0)"},scrollStart:function(c){var d=c.targetTouches[0].clientX-this.swSlots.offsetLeft;var f=0;for(var a=0;a<this.slotEl.length;a+=1){f+=this.slotEl[a].slotWidth;if(d<f){this.activeSlot=a;break}}if(this.slotData[this.activeSlot].style.match("readonly")){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);return false}this.slotEl[this.activeSlot].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[this.activeSlot].style.webkitTransitionDuration="0";var b=window.getComputedStyle(this.slotEl[this.activeSlot]).webkitTransform;b=new WebKitCSSMatrix(b).m42;if(b!=this.slotEl[this.activeSlot].slotYPosition){this.setPosition(this.activeSlot,b)}this.startY=c.targetTouches[0].clientY;this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=c.timeStamp;this.swFrame.addEventListener("touchmove",this,false);this.swFrame.addEventListener("touchend",this,false);return true},scrollMove:function(b){var a=b.targetTouches[0].clientY-this.startY;if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){a/=2}this.setPosition(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition+a);this.startY=b.targetTouches[0].clientY;if(b.timeStamp-this.scrollStartTime>80){this.scrollStartY=this.slotEl[this.activeSlot].slotYPosition;this.scrollStartTime=b.timeStamp}},scrollEnd:function(f){this.swFrame.removeEventListener("touchmove",this,false);this.swFrame.removeEventListener("touchend",this,false);if(this.slotEl[this.activeSlot].slotYPosition>0||this.slotEl[this.activeSlot].slotYPosition<this.slotEl[this.activeSlot].slotMaxScroll){this.scrollTo(this.activeSlot,this.slotEl[this.activeSlot].slotYPosition>0?0:this.slotEl[this.activeSlot].slotMaxScroll);return false}var b=this.slotEl[this.activeSlot].slotYPosition-this.scrollStartY;if(b<this.cellHeight/1.5&&b>-this.cellHeight/1.5){if(this.slotEl[this.activeSlot].slotYPosition%this.cellHeight){this.scrollTo(this.activeSlot,Math.round(this.slotEl[this.activeSlot].slotYPosition/this.cellHeight)*this.cellHeight,"100ms")}return false}var g=f.timeStamp-this.scrollStartTime;var a=(2*b/g)/this.friction;var d=(this.friction/2)*(a*a);if(a<0){a=-a;d=-d}var c=this.slotEl[this.activeSlot].slotYPosition+d;if(c>0){c/=2;a/=3;if(c>this.swSlotWrapper.clientHeight/4){c=this.swSlotWrapper.clientHeight/4}}else{if(c<this.slotEl[this.activeSlot].slotMaxScroll){c=(c-this.slotEl[this.activeSlot].slotMaxScroll)/2+this.slotEl[this.activeSlot].slotMaxScroll;a/=3;if(c<this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4){c=this.slotEl[this.activeSlot].slotMaxScroll-this.swSlotWrapper.clientHeight/4}}else{c=Math.round(c/this.cellHeight)*this.cellHeight}}this.scrollTo(this.activeSlot,Math.round(c),Math.round(a)+"ms");return true},scrollTo:function(c,a,b){this.slotEl[c].style.webkitTransitionDuration=b?b:"100ms";this.setPosition(c,a?a:0);if(this.slotEl[c].slotYPosition>0||this.slotEl[c].slotYPosition<this.slotEl[c].slotMaxScroll){this.slotEl[c].addEventListener("webkitTransitionEnd",this,false)}},scrollToValue:function(e,d){var c,b,a;this.slotEl[e].removeEventListener("webkitTransitionEnd",this,false);this.slotEl[e].style.webkitTransitionDuration="0";b=0;for(a in this.slotData[e].values){if(a==d){c=b*this.cellHeight;this.setPosition(e,c);break}b-=1}},backWithinBoundaries:function(a){a.target.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(a.target.slotPosition,a.target.slotYPosition>0?0:a.target.slotMaxScroll,"150ms");return false},tapDown:function(a){a.currentTarget.addEventListener("touchmove",this,false);a.currentTarget.addEventListener("touchend",this,false);a.currentTarget.className="sw-pressed"},tapCancel:function(a){a.currentTarget.removeEventListener("touchmove",this,false);a.currentTarget.removeEventListener("touchend",this,false);a.currentTarget.className=""},tapUp:function(a){this.tapCancel(a);if(a.currentTarget.id=="sw-cancel"){this.cancelAction()}else{this.doneAction()}},setCancelAction:function(a){this.cancelAction=a},setDoneAction:function(a){this.doneAction=a},cancelAction:function(){return false},cancelDone:function(){return true}};(function(){var o=this;var j=Array();var p=Array();function f(u,v){for(var t in v){u[t]=v[t]}}function h(v,t,u){v.style.width=t.toString()+"px";v.style.height=u.toString()+"px"}function s(u,t,v){u.style.left=Math.round(t).toString()+"px";u.style.top=Math.round(v).toString()+"px"}TrayController=function(){return this};TrayController.prototype.init=function(t){this.currentX=0;this.elem=t};TrayController.prototype.touchstart=function(t){this.startX=t.touches[0].pageX-this.currentX;this.touchMoved=false;window.addEventListener("touchmove",this,true);window.addEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0s"};TrayController.prototype.touchmove=function(t){this.touchMoved=true;this.lastX=this.currentX;this.lastMoveTime=new Date();this.currentX=event.touches[0].pageX-this.startX;this.delegate.update(this.currentX)};TrayController.prototype.touchend=function(u){window.removeEventListener("touchmove",this,true);window.removeEventListener("touchend",this,true);this.elem.style.webkitTransitionDuration="0.4s";if(this.touchMoved){var v=this.currentX-this.lastX;var t=(new Date())-this.lastMoveTime+1;this.currentX=this.currentX+v*200/t;this.delegate.updateTouchEnd(this)}else{this.delegate.clicked(this.currentX)}};TrayController.prototype.handleEvent=function(t){this[t.type](t);t.preventDefault()};const e=150;const n=e/2;const d=70;const a=n/2;const g=e;const b=e/3;const k="rotateY("+(-d)+"deg)";const c="rotateY("+d+"deg)";const i="translateZ("+g+"px)";FlowDelegate=function(){this.cells=new Array();this.transforms=new Array()};FlowDelegate.prototype.init=function(t){this.elem=t};FlowDelegate.prototype.updateTouchEnd=function(t){this.lastFocus=undefined;var u=this.getFocusedCell(t.currentX);t.currentX=-u*n;this.update(t.currentX)};FlowDelegate.prototype.clicked=function(u){var v=-Math.round(u/n);var t=this.cells[v];galleryCell=v};FlowDelegate.prototype.getFocusedCell=function(t){var u=-Math.round(t/n);return Math.min(Math.max(u,0),this.cells.length-1)};FlowDelegate.prototype.transformForCell=function(u,w,z){var t=(w*n);var v=t+z;if((v<a)&&(v>=-a)){return i+" translateX("+t+"px)"}else{if(v>0){return"translateX("+(t+b)+"px) "+k}else{return"translateX("+(t-b)+"px) "+c}}};FlowDelegate.prototype.setTransformForCell=function(t,v,u){if(this.transforms[v]!=u){t.style.webkitTransform=u;this.transforms[v]=u}};FlowDelegate.prototype.update=function(u){this.elem.style.webkitTransform="translateX("+(u)+"px)";for(var v in this.cells){var t=this.cells[v];this.setTransformForCell(t,v,this.transformForCell(t,v,u));v+=1}};var l=new TrayController();var q=new FlowDelegate();o.zflow=function(v,u){var z=document.querySelector(u);l.init(z);q.init(z);l.delegate=q;var t={top:Math.round(-e*0.65)+"px",left:Math.round(-e/2)+"px",width:e+"px",height:Math.round(e*1.5)+"px",opacity:0,};var w=0;function A(){var B=document.createElement("div");var F=document.createElement("img");var D=document.createElement("canvas");var E=document.createElement("a");var C=document.createElement("caption");B.className="cell";B.appendChild(E);E.appendChild(F);B.appendChild(D);B.appendChild(C);F.src=v[w];j[w]=v[w];E.href="show_image?fName="+v[w];E.className="slide-right";o.afnc=function(){var G=F.width;var J=F.height;var H=Math.min(e/J,e/G);G*=H;J*=H;h(F,G,J);f(B.style,t);s(F,(e-G)/2,e-J);s(D,(e-G)/2,e);s(C,(e-G)/2,e+10);m(F,G,J,D);var I=v[w].match(/(.*)[\/\\]([^\/\\]+)\.\w+$/)[2];I=I.replace(/_/g," ");I=I.replace(/(^|\s)([a-z])/g,function(K,M,L){return M+L.toUpperCase()});p[w]=I;r(C,G,w);q.setTransformForCell(B,q.cells.length,q.transformForCell(B,q.cells.length,l.currentX));q.cells.push(B);z.appendChild(B);B.style.opacity=1;if(w<(v.length-1)){w++;A()}else{window.setTimeout(function(){window.scrollTo(0,0)},100);galleryInit=1}};F.addEventListener("load",afnc,true)}A();z.addEventListener("touchstart",l,false)};o.zflowCleanup=function(t){var u=document.querySelector(t);if(u){if(u.childNodes.length>0){q.transforms.length=0;q.cells.length=0;while(u.hasChildNodes()){var v=u.childNodes[0].childNodes[0].childNodes[0];v.removeEventListener("load",afnc,true);u.removeChild(u.childNodes[0])}var w=document.getElementById("gallery");if(w){w.parentNode.removeChild(w);galleryInit=0;galleryCell=0}}}};o.zflowGetImageSource=function(t,u){var v=document.querySelector(t);var w="";if(v){if(v.childNodes.length>0){while(v.hasChildNodes()){w=v.childNodes[0].childNodes[0].childNodes[u].src}}}return w};function r(u,t,v){u.width=t;u.innerHTML=p[v]}function m(z,u,A,v){v.width=u;v.height=A/2;var t=v.getContext("2d");t.save();t.translate(0,A-1);t.scale(1,-1);t.drawImage(z,0,0,u,A);t.restore();t.globalCompositeOperation="destination-out";var w=t.createLinearGradient(0,0,0,A/2);w.addColorStop(1,"rgba(255, 255, 255, 1.0)");w.addColorStop(0,"rgba(255, 255, 255, 0.5)");t.fillStyle=w;t.fillRect(0,0,u,A/2)}})();var now=new Date();var url_month="month";var url_event="events.htm";function getCalendar(e,c,b){url_month=e;url_event=c;var f=b.getDate();var a=b.getMonth()+1;var g=b.getFullYear();$.get(url_month,{month:a,year:g},function(d){$("#ical").empty();$(d).appendTo("#ical");setBindings();setToday();setSelectedAndLoadEvents(b)})}function getEvents(b){var c=b.getDate();var a=b.getMonth()+1;var e=b.getFullYear();$.get(url_event,{day:c,month:a,year:e},function(d){$("#ical .events").empty();$(d).appendTo("#ical .events")})}function getNoEvents(){var a="<li class='no-event'>No Events</li>";$("#ical .events").empty();$(a).appendTo("#ical .events")}function setBindings(){$("#ical td").bind("click",function(){var b=$(this).prop("class");var a=getClickedDate($(this));RemoveSelectedCell();setToday();if(b.indexOf("date_has_event")!=-1||b.indexOf("today_date_has_event")!=-1){$(this).prop("class","selected_date_has_event");getEvents(a)}if(b==""||b.indexOf("today")!=-1){$(this).prop("class","selected");getNoEvents()}if(b.indexOf("prevmonth")!=-1||b.indexOf("nextmonth")!=-1){getCalendar(url,a)}});$("#ical .bottom-bar .bottom-bar-today").bind("click",function(){getCalendar(url_month,url_event,now)});$("#ical .goto-prevmonth").bind("click",function(){loadPrevNextMonth(-1)});$("#ical .goto-nextmonth").bind("click",function(){loadPrevNextMonth(1)})}function RemoveSelectedCell(){$("#ical .selected_date_has_event").removeClass("selected_date_has_event");$("#ical .selected").removeClass("selected")}function getClickedDate(b){var c=$(b).find("input").val();var a=getDateFromHiddenField(c);return a}function loadPrevNextMonth(c){var b=$("#ical .selected").text();if(b==""){b=$("#ical .selected_date_has_event").text()}var a=parseInt($("#ical > #month").val());var e=$("#ical > #year").val();var d=new Date(e,a-1,b);if(c==1){d.nextMonth()}else{d.prevMonth()}getCalendar(url_month,url_event,d)}function setToday(){$("#ical :hidden").each(function(c){var a=getDateFromHiddenField($(this).val());if(!isNaN(a)){var h=now;var j=now.getDate();var i=a.getDate();var g=now.getMonth();var f=a.getMonth();var e=now.getFullYear();var d=a.getFullYear();if(now.getDate()==a.getDate()&&now.getMonth()==a.getMonth()&&now.getFullYear()==a.getFullYear()){var b=$(this).closest("td");if($(b).attr("class")=="date_has_event"){$(b).prop("class","today_date_has_event")}else{$(b).prop("class","today")}}}})}function getDateFromHiddenField(c){var b=c.split("-");return new Date(b[0],b[1]-1,b[2])}function setSelectedAndLoadEvents(a){RemoveSelectedCell();$("#ical td").each(function(c){var d=$(this).prop("class");var b=getClickedDate($(this));if((d!="prevmonth"&&d!="nextmonth")&&a.getDate()==b.getDate()&&a.getMonth()==b.getMonth()&&a.getFullYear()==b.getFullYear()){if(d=="date_has_event"){$(this).prop("class","selected_date_has_event");getEvents(a)}else{$(this).prop("class","selected");getNoEvents()}}});setToday()}function trim(b,a){return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}function dateAddExtention(c,a){var b=new String();c=c.toLowerCase();if(isNaN(a)){throw"The second parameter must be a number. \n You passed: "+a;return false}a=new Number(a);switch(c.toLowerCase()){case"yyyy":this.setFullYear(this.getFullYear()+a);break;case"q":this.setMonth(this.getMonth()+(a*3));break;case"m":this.setMonth(this.getMonth()+a);break;case"y":case"d":case"w":this.setDate(this.getDate()+a);break;case"ww":this.setDate(this.getDate()+(a*7));break;case"h":this.setHours(this.getHours()+a);break;case"n":this.setMinutes(this.getMinutes()+a);break;case"s":this.setSeconds(this.getSeconds()+a);break;case"ms":this.setMilliseconds(this.getMilliseconds()+a);break;default:throw"The first parameter must be a string from this list: \nyyyy, q, m, y, d, w, ww, h, n, s, or ms. You passed: "+c;return false}return this}Date.prototype.dateAdd=dateAddExtention;function prevMonth(){var a=this.getMonth();this.setMonth(a-1);if(this.getMonth()!=a-1&&(this.getMonth()!=11||(a==11&&this.getDate()==1))){this.setDate(0)}}function nextMonth(){var a=this.getMonth();this.setMonth(a+1);if(this.getMonth()!=a+1&&this.getMonth()!=0){this.setDate(0)}}Date.prototype.nextMonth=nextMonth;Date.prototype.prevMonth=prevMonth;(function(c){c.fn.drag=function(f,e,d){if(e){this.bind("dragstart",f)}if(d){this.bind("dragend",d)}return !f?this.trigger("mousedown",{which:1}):this.bind("drag",e?e:f)};var b=c.event.special.drag={distance:0,setup:function(d){d=c.extend({distance:b.distance},d||{});c.event.add(this,"mousedown",b.handler,d)},teardown:function(){c.event.remove(this,"mousedown",b.handler);if(this==b.dragging){b.dragging=b.proxy=null}a(this,true)},handler:function(e){var d;if(e.data.elem){e.dragTarget=e.data.elem;e.dragProxy=b.proxy||e.dragTarget;e.cursorOffsetX=e.data.x-e.data.left;e.cursorOffsetY=e.data.y-e.data.top;e.offsetX=e.pageX-e.cursorOffsetX;e.offsetY=e.pageY-e.cursorOffsetY}switch(e.type){case !b.dragging&&e.which==1&&"mousedown":c.extend(e.data,c(this).offset(),{x:e.pageX,y:e.pageY,elem:this,dist2:Math.pow(e.data.distance,2)});c.event.add(document.body,"mousemove mouseup",b.handler,e.data);a(this,false);return false;case !b.dragging&&"mousemove":if(Math.pow(e.pageX-e.data.x,2)+Math.pow(e.pageY-e.data.y,2)<e.data.dist2){break}b.dragging=e.dragTarget;e.type="dragstart";d=c.event.handle.call(b.dragging,e);b.proxy=c(d)[0]||b.dragging;if(d!==false){break}a(b.dragging,true);b.dragging=b.proxy=null;case"mousemove":if(b.dragging){e.type="drag";d=c.event.handle.call(b.dragging,e);if(c.event.special.drop){c.event.special.drop.allowed=(d!==false);c.event.special.drop.handler(e)}if(d!==false){break}e.type="mouseup"}case"mouseup":c.event.remove(document.body,"mousemove mouseup",b.handler);if(b.dragging){if(c.event.special.drop){c.event.special.drop.handler(e)}e.type="dragend";c.event.handle.call(b.dragging,e);a(b.dragging,true);b.dragging=b.proxy=null;e.data={}}break}}};function a(e,d){if(!e){return}e.unselectable=d?"off":"on";e.onselectstart=function(){return d};if(e.style){e.style.MozUserSelect=d?"":"none"}}})(jQuery);(function(b){b.fn.drop=function(e,d,c){if(d){this.bind("dropstart",e)}if(c){this.bind("dropend",c)}return !e?this.trigger("drop"):this.bind("drop",d?d:e)};b.dropManage=function(c){b.extend(a,{filter:"*",data:[],tolerance:null},c||{});return a.$elements.filter(a.filter).each(function(d){a.data[d]=a.locate(this)})};var a=b.event.special.drop={delay:100,mode:"intersect",$elements:b([]),data:[],setup:function(){a.$elements=a.$elements.add(this);a.data[a.data.length]=a.locate(this)},teardown:function(){var c=this;a.$elements=a.$elements.not(this);a.data=b.grep(a.data,function(d){return(d.elem!==c)})},handler:function(d){var c=null,e;d.dropTarget=a.dropping||undefined;if(a.data.length&&d.dragTarget){switch(d.type){case"drag":a.event=d;if(!a.timer){a.timer=setTimeout(a.tolerate,20)}break;case"mouseup":a.timer=clearTimeout(a.timer);if(!a.dropping){break}if(a.allowed){d.type="drop";e=b.event.handle.call(a.dropping,d)}c=false;case a.dropping&&"dropstart":d.type="dropend";c=c===null&&a.allowed?true:false;case a.dropping&&"dropend":b.event.handle.call(a.dropping,d);a.dropping=null;if(e===false){d.dropTarget=undefined}if(!c){break}d.type="dropstart";case a.allowed&&"dropstart":d.dropTarget=this;a.dropping=b.event.handle.call(this,d)!==false?this:null;break}}},tolerate:function(){var d=0,c,e,f=[a.event.pageX,a.event.pageY],g=a.locate(a.event.dragProxy);a.tolerance=a.tolerance||a.modes[a.mode];do{if(c=a.data[d]){if(a.tolerance){e=a.tolerance.call(a,a.event,g,c)}else{if(a.contains(c,f)){e=c}}}}while(++d<a.data.length&&!e);a.event.type=(e=e||a.best)?"dropstart":"dropend";if(a.event.type=="dropend"||e.elem!=a.dropping){a.handler.call(e?e.elem:a.dropping,a.event)}if(a.last&&f[0]==a.last.pageX&&f[1]==a.last.pageY){delete a.timer}else{a.timer=setTimeout(a.tolerate,a.delay)}a.last=a.event;a.best=null},locate:function(f){var d=b(f),g=d.offset(),e=d.outerHeight(),c=d.outerWidth();return{elem:f,L:g.left,R:g.left+c,T:g.top,B:g.top+e,W:c,H:e}},contains:function(c,d){return((d[0]||d.L)>=c.L&&(d[0]||d.R)<=c.R&&(d[1]||d.T)>=c.T&&(d[1]||d.B)<=c.B)},modes:{intersect:function(d,c,e){return this.contains(e,[d.pageX,d.pageY])?e:this.modes.overlap.apply(this,arguments)},overlap:function(d,c,e){e.overlap=Math.max(0,Math.min(e.B,c.B)-Math.max(e.T,c.T))*Math.max(0,Math.min(e.R,c.R)-Math.max(e.L,c.L));if(e.overlap>((this.best||{}).overlap||0)){this.best=e}return null},fit:function(d,c,e){return this.contains(e,c)?e:null},middle:function(d,c,e){return this.contains(e,[c.L+c.W/2,c.T+c.H/2])?e:null}}}})(jQuery);var _target=null,_dragx=null,_dragy=null,_rotate=null,_resort=null;var _dragging=false,_sizing=false,_animate=false;var _rotating=0,_width=0,_height=0,_left=0,_top=0,_xspeed=0,_yspeed=0;var _zindex=1000;jQuery.fn.touch=function(a){a=jQuery.extend({animate:true,sticky:false,dragx:true,dragy:true,rotate:false,resort:true,scale:false},a);var b=[];b=$.extend({},$.fn.touch.defaults,a);this.each(function(){this.opts=b;this.ontouchstart=touchstart;this.ontouchend=touchend;this.ontouchmove=touchmove;this.ongesturestart=gesturestart;this.ongesturechange=gesturechange;this.ongestureend=gestureend})};function touchstart(a){_target=this.id;_dragx=this.opts.dragx;_dragy=this.opts.dragy;_resort=this.opts.resort;_animate=this.opts.animate;_xspeed=0;_yspeed=0;$(a.changedTouches).each(function(){var c=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));var b=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));if(!_dragging&&!_sizing){_left=(a.pageX-c);_top=(a.pageY-b);_dragging=[_left,_top];if(_resort){_zindex=($("#"+_target).css("z-index")==_zindex)?_zindex:_zindex+1;$("#"+_target).css({zIndex:_zindex})}}})}function touchmove(c){if(_dragging&&!_sizing&&_animate){var a=(isNaN(parseInt($("#"+_target).css("left"))))?0:parseInt($("#"+_target).css("left"));var b=(isNaN(parseInt($("#"+_target).css("top"))))?0:parseInt($("#"+_target).css("top"))}$(c.changedTouches).each(function(){c.preventDefault();_left=(this.pageX-(parseInt($("#"+_target).css("width"))/2));_top=(this.pageY-(parseInt($("#"+_target).css("height"))/2));if(_dragging&&!_sizing){if(_animate){_xspeed=Math.round((_xspeed+Math.round(_left-a))/1.5);_yspeed=Math.round((_yspeed+Math.round(_top-b))/1.5)}if(_dragx||_dragy){$("#"+_target).css({position:"absolute"})}if(_dragx){$("#"+_target).css({left:_left+"px"})}if(_dragy){$("#"+_target).css({top:_top+"px"})}$("#"+_target).css({backgroundColor:"#4B880B"});$("#"+_target+" b").text("WEEEEEEEE!!!!")}})}function touchend(a){$(a.changedTouches).each(function(){if(!a.targetTouches.length){_dragging=false;if(_animate){_left=($("#"+_target).css("left")=="auto")?this.pageX:parseInt($("#"+_target).css("left"));_top=($("#"+_target).css("top")=="auto")?this.pageY:parseInt($("#"+_target).css("top"));var c=(_dragx)?(_left+_xspeed)+"px":_left+"px";var b=(_dragy)?(_top+_yspeed)+"px":_top+"px";if(_dragx||_dragy){$("#"+_target).animate({left:c,top:b},"fast")}}}});$("#"+_target+" b").text("I am sad :(");$("#"+_target).css({backgroundColor:"#0B4188"});setTimeout(changeBack,5000,_target)}function gesturestart(a){_sizing=[$("#"+this.id).css("width"),$("#"+this.id).css("height")]}function gesturechange(a){if(_sizing){_width=(this.opts.scale)?Math.min(parseInt(_sizing[0])*a.scale,300):_sizing[0];_height=(this.opts.scale)?Math.min(parseInt(_sizing[1])*a.scale,300):_sizing[1];_rotate=(this.opts.rotate)?"rotate("+((_rotating+a.rotation)%360)+"deg)":"0deg";$("#"+this.id).css({width:_width+"px",height:_height+"px",webkitTransform:_rotate});$("#"+this.id+" b").text("TRANSFORM!");$("#"+this.id).css({backgroundColor:"#4B880B"})}}function gestureend(a){_sizing=false;_rotating=(_rotating+a.rotation)%360}function changeBack(a){$("#"+a+" b").text("Touch Me :)");$("#"+a).css({backgroundColor:"#999"})}(function(b){var a=this,c=a.jQExtensionsCSS||{};b(a).load(function(){a.scrollTo(0,0);var g=a.innerWidth<a.innerHeight?"profile":"landscape",f=c.toolbarHeight||b("#jqt .toolbar").outerHeight()||45,e={profile:null,landscape:null},d=b.extend({defaults:".horizontal-scroll, .horizontal-scroll .scroll-container, .horizontal-slide, .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .vertical-scroll > div, .vertical-slide > div { margin: 0 auto; padding-bottom:{paddingBottom}px; } #jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div, #jqt.fullscreen .vertical-slide.use-bottom-toolbar > div { padding-bottom:0px; } .vertical-scroll, .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .vertical-scroll.use-bottom-toolbar, .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }\n",profile:".profile .horizontal-scroll, .profile .horizontal-scroll .scroll-container, .profile .horizontal-slide, .profile .horizontal-slide .slide-container { width: {width}px; } .profile .vertical-scroll, .profile .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .profile .vertical-scroll.use-bottom-toolbar, .profile .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }",landscape:".landscape .horizontal-scroll, .landscape .horizontal-scroll .scroll-container, .landscape .horizontal-slide, .landscape .horizontal-slide .slide-container { width: {width}px; height: 100%; overflow: hidden; padding: 0; } .landscape .vertical-scroll, .landscape .vertical-slide { position: relative; z-index: 1; overflow: hidden; height: {height}px; } .landscape .vertical-scroll.use-bottom-toolbar, .landscape .vertical-slide.use-bottom-toolbar { height: {bottomToolbarHeight}px !important; }"},c.css||{});e[g]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[g]||{});e.defaults=b.extend({},e[g],c.defaults||{});b(document.createElement("style")).prop("type","text/css").html(d.defaults.replace(/\{(\w+)\}/g,function(i,h){return h in e.defaults?e.defaults[h]:i})+d[g].replace(/\{(\w+)\}/g,function(i,h){return h in e[g]?e[g][h]:i})).appendTo("head");b(a).one("orientationchange",function(){var h=a.innerWidth<a.innerHeight?"profile":"landscape";e[h]=b.extend({paddingBottom:5,width:a.innerWidth,height:a.innerHeight-f,bottomToolbarHeight:a.innerHeight-(f*2)},c[h]||{});b(document.createElement("style")).prop("type","text/css").html(d[h].replace(/\{(\w+)\}/g,function(j,i){return i in e[h]?e[h][i]:j})).appendTo("head")})})})(jQuery);(function($){$.Chain={version:"0.2",tag:["{","}"],services:{},service:function(name,proto){this.services[name]=proto;$.fn[name]=function(options){if(!this.length){return this}var instance=this.data("chain-"+name);var args=Array.prototype.slice.call(arguments,1);if(!instance){if(options=="destroy"){return this}instance=$.extend({element:this},$.Chain.services[name]);this.data("chain-"+name,instance);if(instance.init){instance.init()}}var result;if(typeof options=="string"&&instance["$"+options]){result=instance["$"+options].apply(instance,args)}else{if(instance.handler){result=instance.handler.apply(instance,[options].concat(args))}else{result=this}}if(options=="destroy"){this.removeData("chain-"+name)}return result}},extend:function(name,proto){if(this.services[name]){this.services[name]=$.extend(this.services[name],proto)}},jobject:function(obj){return obj&&obj.init==$.fn.init},jidentic:function(j1,j2){if(!j1||!j2||j1.length!=j2.length){return false}var a1=j1.get();var a2=j2.get();for(var i=0;i<a1.length;i++){if(a1[i]!=a2[i]){return false}}return true},parse:function(){var $this={};$this.closure=['function($data, $el){var $text = [];\n$text.print = function(text){this.push((typeof text == "number") ? text : ((typeof text != "undefined") ? text : ""));};\nwith($data){\n','}\nreturn $text.join("");}'];$this.textPrint=function(text){return'$text.print("'+text.split("\\").join("\\\\").split("'").join("\\'").split('"').join('\\"')+'");'};$this.scriptPrint=function(text){return"$text.print("+text+");"};$this.parser=function(text){var tag=$.Chain.tag;var opener,closer,closer2=null,result=[];while(text){opener=text.indexOf(tag[0]);closer=opener+text.substring(opener).indexOf(tag[1]);if(opener!=-1){if(text[opener-1]=="\\"){closer2=opener+tag[0].length+text.substring(opener+tag[0].length).indexOf(tag[0]);if(closer2!=opener+tag[0].length-1&&text[closer2-1]=="\\"){closer2=closer2-1}else{if(closer2==opener+tag[0].length-1){closer2=text.length}}result.push($this.textPrint(text.substring(0,opener-1)));result.push($this.textPrint(text.substring(opener,closer2)))}else{closer2=null;if(closer==opener-1){closer=text.length}result.push($this.textPrint(text.substring(0,opener)));result.push($this.scriptPrint(text.substring(opener+tag[0].length,closer)))}text=text.substring((closer2===null)?closer+tag[1].length:closer2)}else{if(text){result.push($this.textPrint(text));text=""}}}return result.join("\n")};return function($text){var $fn=function(){};try{eval("$fn = "+$this.closure[0]+$this.parser($text)+$this.closure[1])}catch(e){throw"Parsing Error"}return $fn}}()}})(jQuery);(function(a){a.Chain.service("update",{handler:function(b){if(typeof b=="function"){return this.bind(b)}else{return this.trigger(b)}},bind:function(b){return this.element.bind("update",b)},trigger:function(b){this.element.items("update");this.element.item("update");this.element.triggerHandler("preupdate",this.element.item());if(b=="hard"){this.element.items(true).each(function(){a(this).update()})}this.element.triggerHandler("update",this.element.item());return this.element}})})(jQuery);(function(a){a.Chain.service("chain",{init:function(){this.anchor=this.element;this.template=this.anchor.html();this.tplNumber=0;this.builder=this.createBuilder();this.plugins={};this.isActive=false;this.destroyers=[];this.element.addClass("chain-element")},handler:function(b){this.element.items("backup");this.element.item("backup");if(typeof b=="object"){this.handleUpdater(b)}else{if(typeof b=="function"){this.handleBuilder(b)}}this.anchor.empty();this.isActive=true;this.element.update();return this.element},handleUpdater:function(h){var b=h.builder;delete h.builder;if(h.anchor){this.setAnchor(h.anchor)}delete h.anchor;var e=h.override;delete h.override;for(var d in h){if(typeof h[d]=="string"){h[d]=a.Chain.parse(h[d])}else{if(typeof h[d]=="object"){for(var c in h[d]){if(typeof h[d][c]=="string"){h[d][c]=a.Chain.parse(h[d][c])}}}}}var f=function(o,p){var n,q;var k=a(this);for(var m in h){if(m=="self"){n=k}else{n=a(m,k)}if(typeof h[m]=="function"){q=h[m].apply(k,[p,n]);if(typeof q=="string"){n.not(":input").html(q).end().filter(":input").val(q)}}else{if(typeof h[m]=="object"){for(var l in h[m]){if(typeof h[m][l]=="function"){q=h[m][l].apply(k,[p,n]);if(typeof q=="string"){if(l=="content"){n.html(q)}else{if(l=="text"){n.text(q)}else{if(l=="value"){n.val(q)}else{if(l=="class"||l=="className"){n.addClass(q)}else{n.prop(l,q)}}}}}}}}}}};var g=this.defaultBuilder;this.builder=function(i){if(b){b.apply(this,[i])}if(!e){g.apply(this)}this.update(f);return false}},handleBuilder:function(b){this.builder=this.createBuilder(b)},defaultBuilder:function(c,b){var d=c?(c.apply(this,[b])!==false):true;if(d){this.bind("update",function(g,h){var e=a(this);for(var f in h){if(typeof h[f]!="object"&&typeof h[f]!="function"){e.find("> ."+f+", *:not(.chain-element) ."+f).each(function(){var i=a(this);if(i.filter(":input").length){i.val(h[f])}else{if(i.filter("img").length){i.prop("src",h[f])}else{i.html(h[f])}}})}}})}},createBuilder:function(b){var c=this.defaultBuilder;return function(d){c.apply(this,[b,d]);return false}},setAnchor:function(b){this.anchor.html(this.template);this.anchor=b==this.element?b:this.element.find(b).eq(0);this.template=this.anchor.html();this.anchor.empty()},$anchor:function(b){if(b){this.element.items("backup");this.element.item("backup");this.setAnchor(b);this.element.update();return this.element}else{return this.anchor}},$template:function(b){if(!arguments.length){return a("<div>").html(this.template).children().eq(this.tplNumber)}if(b=="raw"){return this.template}if(typeof b=="number"){this.tplNumber=b}else{var c=a("<div>").html(this.template).children();var d=c.filter(b).eq(0);if(d.length){this.tplNumber=c.index(d)}else{return this.element}}this.element.items("backup");this.element.item("backup");this.element.update();return this.element},$builder:function(b){if(b){return this.handler(b)}else{return this.builder}},$active:function(){return this.isActive},$plugin:function(b,c){if(c===null){delete this.plugins[b]}else{if(typeof c=="function"){this.plugins[b]=c}else{if(b&&!c){return this.plugins[b]}else{return this.plugins}}}if(typeof c=="function"){this.element.items(true).each(function(){var d=a(this);c.call(d,d.item("root"))})}this.element.update();return this.element},$clone:function(){var c=this.element.prop("id");this.element.prop("id","");var b=this.element.clone().empty().html(this.template);this.element.prop("id",c);return b},$destroy:function(b){this.element.removeClass("chain-element");if(!b){this.element.items("backup");this.element.item("backup");this.element.find(".chain-element").each(function(){a(this).chain("destroy",true)})}this.element.triggerHandler("destroy");this.isActive=false;this.anchor.html(this.template);return this.element}})})(jQuery);(function(a){a.Chain.service("item",{init:function(){this.isActive=false;this.isBuilt=false;this.root=this.element;this.data=false;this.datafn=this.dataHandler},handler:function(b){if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="function"){return this.handleFunction(b)}else{return this.handleDefault()}}},handleObject:function(b){this.setData(b);this.isActive=true;this.update();return this.element},handleFunction:function(b){this.datafn=b;return this.element},handleDefault:function(){if(this.isActive){return this.getData()}else{return false}},getData:function(){this.data=this.datafn.call(this.element,this.data);return this.data},setData:function(d){var c;if(a.Chain.jobject(d)&&d.item()){c=a.extend({},d.item())}else{if(a.Chain.jobject(d)){c={}}else{c=d}}this.data=this.datafn.call(this.element,this.data||c,c);if(this.linkElement&&this.linkElement[0]!=d[0]){var b=this.linkFunction();if(a.Chain.jobject(b)&&b.length&&b.item()){b.item(this.data)}}},dataHandler:function(b,c){if(arguments.length==2){return a.extend(b,c)}else{return b}},update:function(){return this.element.update()},build:function(){var b=this.element.chain("template","raw").replace(/jQuery\d+\=\"null\"/gi,"");this.element.chain("anchor").html(b);if(!a.Chain.jidentic(this.root,this.element)){var c=this.root.chain("plugin");for(var d in c){c[d].apply(this.element,[this.root])}}this.element.chain("builder").apply(this.element,[this.root]);this.isBuilt=true},$update:function(){if(this.element.chain("active")&&this.isActive&&!this.isBuilt&&this.getData()){this.build()}return this.element},$replace:function(b){this.data={};this.setData(b);this.isActive=true;this.update();return this.element},$remove:function(b){this.element.chain("destroy");this.element.remove();this.element.item("link",null);this.element.item("destroy");if(!a.Chain.jidentic(this.root,this.element)&&!b){this.root.update()}},$active:function(){return this.isActive},$root:function(b){if(arguments.length){this.root=b;this.update();return this.element}else{return this.root}},$backup:function(){this.isBuilt=false;return this.element},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.isActive=true;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){var e=b.linkFunction();if(e&&e.length){b.element.item(e)}};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$destroy:function(){return this.element}})})(jQuery);(function(a){a.Chain.service("items",{collections:{all:function(){return this.element.chain("anchor").children(".chain-item")},visible:function(){return this.element.chain("anchor").children(".chain-item:visible")},hidden:function(){return this.element.chain("anchor").children(".chain-item:hidden")},self:function(){return this.element}},init:function(){this.isActive=false;this.pushBuffer=[];this.shiftBuffer=[];this.collections=a.extend({},this.collections)},handler:function(b){if(b instanceof Array){return this.handleArray(b)}else{if(!this.isActive){return a().eq(-1)}else{if(a.Chain.jobject(b)){return this.handleElement(b)}else{if(typeof b=="object"){return this.handleObject(b)}else{if(typeof b=="number"){return this.handleNumber(b)}else{if(b===true){return this.handleTrue()}else{return this.handleDefault()}}}}}}},handleObject:function(b){return this.collection("all").filter(function(){return a(this).item()==b})},handleElement:function(b){if(!a.Chain.jidentic(b,b.item("root"))&&a.Chain.jidentic(this.element,b.item("root"))){return b}else{return a().eq(-1)}},handleArray:function(b){return this.$merge(b)},handleNumber:function(b){if(b==-1){return this.collection("visible").filter(":last")}else{return this.collection("visible").eq(b)}},handleTrue:function(){return this.collection("all")},handleDefault:function(){return this.collection("visible")},update:function(){this.element.update()},empty:function(){var b=this.collection("all");setTimeout(function(){b.each(function(){a(this).item("remove",true)})},1);this.element.chain("anchor").empty()},collection:function(b,c){if(arguments.length>1){if(typeof c=="function"){this.collections[b]=c}return this.element}else{if(this.collections[b]){return this.collections[b].apply(this)}else{return a().eq(-1)}}},$update:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var c=this;var b=this.element.chain("builder");var f=this.element.chain("template");var d;var e=function(){var g=f.clone()[d?"appendTo":"prependTo"](c.element.chain("anchor")).addClass("chain-item").item("root",c.element);if(c.linkElement&&a.Chain.jobject(this)&&this.item()){g.item("link",this,"self")}else{g.item(this)}g.chain(b)};d=false;a.each(this.shiftBuffer,e);d=true;a.each(this.pushBuffer,e);this.shiftBuffer=[];this.pushBuffer=[];return this.element},$add:function(){if(this.linkElement){return this.element}var d;var c=Array.prototype.slice.call(arguments);if(typeof c[0]=="string"){d=c.shift()}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this[b]=this[b].concat(c);this.update();return this.element},$merge:function(d,c){if(this.linkElement){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;if(a.Chain.jobject(c)){this[b]=this[b].concat(c.map(function(){return a(this)}).get())}else{if(c instanceof Array){this[b]=this[b].concat(c)}}this.update();return this.element},$replace:function(d,c){if(this.linkElement&&arguments.callee.caller!=this.linkUpdater){return this.element}if(typeof d!="string"){c=d}var b=(d=="shift")?"shiftBuffer":"pushBuffer";this.isActive=true;this.empty();if(a.Chain.jobject(c)){this[b]=c.map(function(){return a(this)}).get()}else{if(c instanceof Array){this[b]=c}}this.update();return this.element},$remove:function(){if(this.linkElement){return this.element}for(var b=0;b<arguments.length;b++){this.handler(arguments[b]).item("remove",true)}this.update();return this.element},$reorder:function(c,b){if(b){this.handler(c).before(this.handler(b))}else{this.handler(c).appendTo(this.element.chain("anchor"))}this.update();return this.element},$empty:function(){if(this.linkElement){return this.element}this.empty();this.shiftBuffer=[];this.pushBuffer=[];this.update();return this.element},$data:function(b){return this.handler(b).map(function(){return a(this).item()}).get()},$link:function(c,d){if(this.linkElement){this.linkElement.unbind("update",this.linkUpdater);this.linkElement=null}c=a(c);if(c.length){var b=this;this.linkElement=c;this.linkFunction=function(){if(typeof d=="function"){try{return d.call(b.element,b.linkElement)}catch(f){return a().eq(-1)}}else{if(typeof d=="string"){return b.linkElement.items("collection",d)}else{return a().eq(-1)}}};this.linkUpdater=function(){b.$replace(b.linkFunction())};this.linkElement.bind("update",this.linkUpdater);this.linkUpdater()}return this.element},$index:function(b){return this.collection("all").index(this.handler(b))},$collection:function(){return this.collection.apply(this,Array.prototype.slice.call(arguments))},$active:function(){return this.isActive},$backup:function(){if(!this.element.chain("active")||!this.isActive){return this.element}var b=[];this.collection("all").each(function(){var c=a(this).item();if(c){b.push(c)}});this.pushBuffer=b.concat(this.pushBuffer);this.empty();return this.element},$destroy:function(){this.empty();return this.element}});a.Chain.extend("items",{doFilter:function(){var c=this.searchProperties;var d=this.searchText;if(d){if(typeof d=="string"){d=d.toLowerCase()}var b=this.element.items(true).filter(function(){var f=a(this).item();if(c){for(var e=0;e<c.length;e++){if(typeof f[c[e]]=="string"&&!!(typeof d=="string"?f[c[e]].toLowerCase():f[c[e]]).match(d)){return true}}}else{for(var g in f){if(typeof f[g]=="string"&&!!(typeof d=="string"?f[g].toLowerCase():f[g]).match(d)){return true}}}});this.element.items(true).not(b).hide();b.show()}else{this.element.items(true).show();this.element.unbind("preupdate",this.searchBinding);this.searchBinding=null}},$filter:function(d,c){if(!arguments.length){return this.update()}this.searchText=d;if(typeof c=="string"){this.searchProperties=[c]}else{if(c instanceof Array){this.searchProperties=c}else{this.searchProperties=null}}if(!this.searchBinding){var b=this;this.searchBinding=function(f,e){b.doFilter()};this.element.bind("preupdate",this.searchBinding)}return this.update()}});a.Chain.extend("items",{doSort:function(){var b=this.sortName;var d=this.sortOpt;var g={number:function(i,h){return parseFloat((a(i).item()[b]+"").match(/\d+/gi)[0])-parseFloat((a(h).item()[b]+"").match(/\d+/gi)[0])},"default":function(i,h){return a(i).item()[b]>a(h).item()[b]?1:-1}};if(b){var e=d.fn||g[d.type]||g["default"];var f=this.element.items(true).get().sort(e);f=d.desc?f.reverse():f;for(var c=0;c<f.length;c++){this.element.chain("anchor").append(f[c])}d.desc=d.toggle?!d.desc:d.desc}else{this.element.unbind("preupdate",this.sortBinding);this.sortBinding=null}},$sort:function(c,d){if(!c&&c!==null&&c!==false){return this.update()}if(this.sortName!=c){this.sortOpt=a.extend({desc:false,type:"default",toggle:false},d)}else{a.extend(this.sortOpt,d)}this.sortName=c;if(!this.sortBinding){var b=this;this.sortBinding=function(f,e){b.doSort()};this.element.bind("preupdate",this.sortBinding)}return this.update()}})})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(e){var d=".toolbar h1";a(function(){a("#jqt").bind("pageAnimationStart",function(i,g){if(g.direction==="in"){var f=a(d,a(i.target));var h=a(i.target).data("referrer");if(f.length&&h&&f.html()===""){f.html(h.text())}}})});function c(f){d=f}return{setTitleSelector:c}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(f){var m,i;var d=false;function n(p,o,r,q){i=p;if(window.openDatabase){m=openDatabase(p,o,r,q);if(!m){debugTxt=("Failed to open the database on disk. This is probably because the version was bad or there is not enough space left in this domain's quota");if(d){c(debugTxt)}}}else{debugTxt=("Couldn't open the database. Please try with a WebKit nightly with this feature enabled");if(d){c(debugTxt)}}}function e(o){for(x=0;x<o.createTables.length;x++){p(o.createTables[x])}function p(r){debugTxt="create table "+r.table;var q="CREATE TABLE "+r.table+" (";nodeSize=r.property.length-1;for(y=0;y<=nodeSize;y++){q+=r.property[y].name+" "+r.property[y].type;if(y!=nodeSize){q+=", "}}q+=")";k(q,debugTxt)}}function j(p,o,q){stringQuery="DELETE FROM "+p+" WHERE "+o+" = "+q;debugTxt="delete row"+o+" "+q;k(stringQuery,debugTxt)}function g(p,o){stringQuery="SELECT * FROM "+p;debugTxt="selecting everything in table "+p;k(stringQuery,debugTxt,o)}function h(o){stringQuery="DROP TABLE "+o;debugTxt="delete table "+o;k(stringQuery,debugTxt)}function l(o){for(x=0;x<o.addRow.length;x++){p(o.addRow[x])}function p(q){debugTxt="create row "+q.table;stringQuery="INSERT INTO "+q.table+" (";nodeSize=q.property.length-1;for(y=0;y<=nodeSize;y++){stringQuery+=q.property[y].name;if(y!=nodeSize){stringQuery+=", "}}stringQuery+=") VALUES (";for(y=0;y<=nodeSize;y++){stringQuery+='"'+q.property[y].value+'"';if(y!=nodeSize){stringQuery+=", "}}stringQuery+=")";k(stringQuery,debugTxt)}}function k(o,p,q){p+="<br> SQL: "+o;callback=q;m.transaction(function(r){r.executeSql(o,[],function(t,s){if(callback){callback(s)}if(d){p+="<br><span style='color:green'>success</span> ";c(p)}},function(s,t){p+="<br><span style='color:red'>"+t.message+"</span> ";if(d){c(p)}})})}function c(o){if(!a("#debugMode")[0]){a("body").append("<div style='position:abolute;top:0 !important;left:0 !important;width:100% !important;min-height:100px !important; height:300px; overflow:scroll;z-index:1000; display:block; opacity:0.8; background:#000;-webkit-backface-visibility:visible ' id='debugMode'></div>")}a("#debugMode").append("<div class='debugerror'>"+o+"</div>")}return{dbOpen:n,dbDeleteRow:j,dbDropTable:h,dbInsertRows:l,dbSelectAll:g,dbExecuteQuery:k,dbCreateTables:e}})}})(jQuery);(function(a){if(a.jQTouch){a.jQTouch.addExtension(function b(d){function c(g){if(g==null){g=0}var f=e(g);a("body > *").css("min-height",f+"px !important");a("body.fullscreen > *").css("min-height",f+"px !important");a("body.fullscreen.black-translucent > *").css("min-height",f+"px !important");a("body.landscape > *").css("min-height",f+"px !important")}function e(g){var f=0;if(typeof(window.innerWidth)=="number"){f=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){f=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){f=document.body.clientHeight}}}if(f<g){f=g}return f}return{resetHeight:c}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(c){b.fn.makeFloaty=function(d){var f={align:"top",spacing:20,time:".3s"};var e=b.extend({},f,d);e.align=(e.align=="top")?"top":"bottom";return this.each(function(){var g=b(this);g.css({"-webkit-transition":"top "+e.time+" ease-in-out",display:"block","min-height":"0 !important"}).data("settings",e);b(document).bind("scroll",function(){if(g.data("floatyVisible")===true){g.scrollFloaty()}});g.scrollFloaty()})};b.fn.scrollFloaty=function(){return this.each(function(){var d=b(this);var f=d.data("settings");var e=b("html").prop("clientHeight");var g=window.pageYOffset+((f.align=="top")?f.spacing:e-f.spacing-d.get(0).offsetHeight);d.css("top",g).data("floatyVisible",true)})};b.fn.hideFloaty=function(){return this.each(function(){var d=b(this);var e=d.get(0).offsetHeight;d.css("top",-e-10).data("floatyVisible",false)})};b.fn.toggleFloaty=function(){return this.each(function(){var d=b(this);if(d.data("floatyVisible")===true){d.hideFloaty()}else{d.scrollFloaty()}})}})}})(jQuery);(function(c){if(c.jQTouch){function b(f){var i,e,h,i,g=0;h={element:c("#gesture_test"),onGestureStart:null,onGestureChange:null,onGestureEnd:null,};h=c.extend({},h,f);h.element.bind("gesturestart",function(j){j.originalEvent.preventDefault();if(h.onGestureStart){h.onGestureStart(a(j,i),d(j,g),j,h.element)}}).bind("gesturechange",function(j){if(h.onGestureChange){h.onGestureChange(a(j,i),d(j,g),j,h.element)}}).bind("gestureend",function(j){i=j.originalEvent.scale;g=(j.originalEvent.rotation+g)%360;if(h.onGestureEnd){h.onGestureEnd(a(j,i),d(j,g),j,h.element)}})}function d(f,e){return f.originalEvent.rotation+e}function a(f,e){return f.originalEvent.scale+e}c.fn.bindGestures=function(e){e.element=this;b(e)}}})(jQuery);(function(f){var g,j=this,o=j.document,l=this.WebKitCSSMatrix,k={selector:".horizontal-scroll > table",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",defaultTransform:"defaulttransform",bounce:function(u){return u.prop("bounce")==="false"?false:k.bounce},scrollBar:function(u){return u.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageX",numberOfTouches:1,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,bounceSpeed:500,preventDefault:true,maxScrollTime:1000,friction:3,bounceTimingFunction:"cubic-bezier(0,0,.25,1)",bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:s,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:t,momentum:m},q=function(){return j.innerWidth+"px"},n=function(u){return(j.innerHeight-u.toolbar)+"px"},h={variables:{toolbar:45},defaults:{".horizontal-scroll":{width:q,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:n},".horizontal-scroll > table":{height:"100%"},".horizontal-scroll .scrollbar.horizontal":{"-webkit-transition-timing-function":"cubic-bezier(0,0,0.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,300ms","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 8, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3 2",position:"absolute","z-index":10,width:"1px",height:"5px",bottom:"1px",left:"1px"}},portrait:{".portrait .horizontal-scroll":{width:q}},landscape:{".landscape .horizontal-scroll":{width:q}}};if(f.jQTouch){f.jQTouch.addExtension(function(v){function u(A,z){var w=z.page.find(k.selector);w.scrollHorizontally(k.attributesToOptions(w,k.attributes))}f(o.body).bind("pageInserted",u);f(function(){f(k.selector).each(function(){f(this).scrollHorizontally(k.attributesToOptions(f(this),k.attributes))})});return{}})}function e(w,u){var v={};f.each(u,function(z,A){if(f.isFunction(A)){v[z]=A(w)}else{if(w.attr(A)!=g){v[z]=w.prop(A)}}});return v}f.fn.scrollHorizontally=function(u){u=f.extend(true,{},k,u||{});return this.each(function(){p(this,u)})};f.fn.scrollHorizontally.defaults=function(u){if(u!==g){k=f.extend(true,k,u)}return f.extend({},k)};f.fn.scrollHorizontally.defaultCSS=function(u){if(u!==g){h=f.extend(true,h,u)}return f.extend({},h)};function p(z,w){var u=f(z).data("jqt-horizontal-scroll-options",w).css("webkitTransform",r(w.defaultTransform,w.defaultOffset)),v=new l(u.css("webkitTransform"));f.each(w.events,function(A,B){z.addEventListener(A,B,false)});w.currentPosition=v.m41;w.parentWidth=u.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(u.parent(),"horizontal",w.scrollBarOptions||{}):b(u.parent(),"horizontal",w.scrollBarOptions||{})}}function a(C){var D=f(this),w=D.data("jqt-horizontal-scroll-options"),v,B=D.outerWidth(),A=D.parent().width(),z=-(B-A),u=A/6;w.parentWidth=A;if(!!w.ignoreTags&&f(C.target).is(w.ignoreTags)||C.targetTouches.length!==w.numberOfTouches){return null}v=new l(D.css("webkitTransform"));D.data("jqt-horizontal-scroll-current-event",{startLocation:C.touches[0][w.eventProperty],startPosition:v.m41,currentPosition:v.m41,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentWidth:A,endPoint:z,minScroll:!w.bounce?0:u,maxScroll:!w.bounce?z:z-u,timingFunction:w.bounceTimingFunction});if(w.scrollBarElement){w.scrollBarElement.init(A,B)}w.setPosition(D,w,v.m41,"0");if(w.preventDefault){C.preventDefault();return false}else{return true}}function s(z){var B=f(this),w=B.data("jqt-horizontal-scroll-options"),A=B.data("jqt-horizontal-scroll-current-event"),v=A.lastMoveTime,C=A.startLocation-z.touches[0][w.eventProperty],u=A.startPosition-C;A.currentPosition=u;A.moved=true;A.lastMoveTime=z.timeStamp;if((A.lastMoveTime-v)>w.maxScrollTime){A.startTime=A.lastMoveTime}if(w.scrollBarElement&&!w.scrollBarElement.visible){w.scrollBarElement.show()}w.setPosition(B,w,A.currentPosition,0);if(w.preventDefault){z.preventDefault();return false}else{return true}}function d(v){var A=f(this),u=A.data("jqt-horizontal-scroll-options"),w=A.data("jqt-horizontal-scroll-current-event"),z,B;if(!w.moved){if(u.scrollBarElement){u.scrollBarElement.hide()}z=v.target;if(z.nodeType==3){z=z.parentNode}B=o.createEvent("MouseEvents");B.initEvent("click",true,true);z.dispatchEvent(B);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}}u.momentum(A,u,w,v);u.setPosition(A,u,w.currentPosition,w.duration);if(u.preventDefault){v.preventDefault();v.stopPropagation();return false}else{return true}}function i(z){var w=f(this),u=w.data("jqt-horizontal-scroll-options"),v=w.data("jqt-horizontal-scroll-current-event");if(v){if(v.currentPosition>0){v.currentPosition=0;u.setPosition(w,u,0,u.bounceSpeed)}else{if(v.currentPosition<v.endPoint){v.currentPosition=v.endPoint;u.setPosition(w,u,v.endPoint,u.bounceSpeed)}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}}else{if(u.scrollBarElement){u.scrollBarElement.hide()}}}function m(C,F,D,v){var z=Math.min(F.maxScrollTime,D.lastMoveTime-D.startTime),u=D.startPosition-D.currentPosition,A=Math.abs(u)/z,B=z*A*F.friction,w=Math.round(u*A),E=Math.round(D.currentPosition-w);if(D.currentPosition>0){E=0}else{if(D.currentPosition<D.endPoint){E=D.endPoint}else{if(E>D.minScroll){B=B*Math.abs(D.minScroll/E);E=D.minScroll}else{if(E<D.maxScroll){B=B*Math.abs(D.maxScroll/E);E=D.maxScroll}}}}D.momentum=E/D.currentPosition;D.currentPosition=E;D.duration=B}function t(v,u){return u.setPosition(v,u,0,u.defaultDuration)}function c(w,v,u,B,A){if(v.scrollBarElement){var z=(w.parent().width()-w.outerWidth());if(u>0){z+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/z*u,r("{0}ms",B!==g?B:v.defaultDuration))}if(B!==g){w.css("webkitTransitionDuration",r("{0}ms",B))}if(A!==g){w.css("webkitTransitionTimingFunction",A)}v.currentPosition=u||0;return w.css("webkitTransform",r("translate3d({0}px, 0, 0)",v.currentPosition))}function r(v){var u=arguments;return v.replace(/\{(\d+)\}/g,function(z,w){return u[Number(w)+1]+""})}function b(v,w,u){if(!(this instanceof b)){return new b(v,w,u)}this.direction=w;this.bar=f(o.createElement("div")).addClass("scrollbar "+w).appendTo(v)[0]}b.prototype={direction:"horizontal",size:0,maxSize:0,maxScroll:0,visible:false,init:function(u,v){var w=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=u-8;this.size=Math.round(this.maxSize*this.maxSize/v)+w;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-w)+"px"},setPosition:function(u){u=this.direction=="horizontal"?"translate3d("+Math.round(u)+"px,0,0)":"translate3d(0,"+Math.round(u)+"px,0)";this.bar.style.webkitTransform=u},scrollTo:function(v,u){this.bar.style.webkitTransitionDuration=(u||"400ms")+",300ms";this.setPosition(v)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){j.scrollTo(0,0);var u="",z=h,w=j.innerHeight>j.innerWidth?"portrait":"landscape",A=function(B,C){u+=B+":"+(f.isFunction(C)?C(z.variables):C)+";"},v=function(B,C){u+=B+"{";f.each(C,A);u+="}"};f.each(z.defaults,v);f.each(z[w],v);f(o.createElement("style")).prop({type:"text/css",media:"screen"}).html(u).appendTo("head");f(j).one("orientationchange",function(){setTimeout(function(){j.scrollTo(0,0);u="";f.each(z[j.innerHeight>j.innerWidth?"portrait":"landscape"],v);f(o.createElement("style")).prop({type:"text/css",media:"screen"}).html(u).appendTo("head")},30)})})})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var i,f,h;function d(){return navigator.geolocation}function g(j){if(d()){h=j;navigator.geolocation.getCurrentPosition(c);return true}else{console.log("Device not capable of geo-location.");j(false);return false}}function c(j){i=j.coords.latitude;f=j.coords.longitude;if(h){h(e())}}function e(){if(i&&f){return{latitude:i,longitude:f}}else{console.log("No location available. Try calling updateLocation() first.");return false}}return{updateLocation:g,getLocation:e}})}})(jQuery);(function(b){if(b.jQTouch){b.jQTouch.addExtension(function a(){var c=[];c[0]="uncached";c[1]="idle";c[2]="checking";c[3]="downloading";c[4]="updateready";c[5]="obsolete";var d=window.applicationCache;d.addEventListener("cached",f,false);d.addEventListener("checking",f,false);d.addEventListener("downloading",f,false);d.addEventListener("error",f,false);d.addEventListener("noupdate",f,false);d.addEventListener("obsolete",f,false);d.addEventListener("progress",f,false);d.addEventListener("updateready",f,false);function f(m){var j,i,k,l;j=(h())?"yes":"no";i=c[d.status];k=m.type;l="online: "+j;l+=", event: "+k;l+=", status: "+i;if(k=="error"&&navigator.onLine){l+=" There was an unknown error, check your Cache Manifest."}console.log(l)}function h(){return navigator.onLine}if(!b("html").prop("manifest")){console.log("No Cache Manifest listed on the <html> tag.")}d.addEventListener("updateready",function(i){if(c[d.status]!="idle"){d.swapCache();console.log("Swapped/updated the Cache Manifest.")}},false);function e(){d.update()}function g(){setInterval(function(){d.update()},10000)}return{isOnline:h,checkForUpdates:e,autoCheckForUpdates:g}})}})(jQuery);
|
|
2
2
|
/*!*
|
|
3
3
|
* Provides event handling for iPhone like photo gallery (without thumbnail portion)
|
|
4
4
|
*
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* jqt-photo-show-toolbars - show the visibility of the toolbars
|
|
40
40
|
* jqt-photo-toggle-toolbars - toggle the visibility of the toolbars
|
|
41
41
|
*/
|
|
42
|
-
(function(P){if(!"WebKitCSSMatrix" in this){return null}var q,z=[],s="Touch" in this,H=s?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},f,ae=false,X=this,k=X.document,C=X.Math,ad=C.min,l=C.floor,T=C.sqrt,L=C.pow,O=C.abs,E=O(X.orientation)==90?"landscape":"portrait",R={data:[],galleryName:"{0} of {1}",defaultIndex:0,transitionProperty:"-webkit-transform",timingFunction:"cubic-bezier(0,0,.25,1)",transform:"translate3d({0}px,0,0)",imageTransform:"scale({0}) translate3d({1}px, {2}px, 0)",maxSlidesBefore:2,maxSlidesAfter:2,slideDelay:5000,scrollSpeed:500,scaleSpeed:500,useDynamicStyleSheet:true,repeatSlideShow:false,appendTo:"#jqt",dataAttribute:"data-index",tagNames:"A,INPUT,SELECT,TEXTAREA",backLink:'<a class="back">Back</a>',blankImage:'<img class="jqt-photo-img"/>',slideTemplate:'<td class="jqt-photo-image-slide"> <div class="jqt-photo-not-loaded"> <img class="jqt-photo-img"/> <div class="jqt-photo-caption"></div> </div> </td>',parsedClassTemplate:"#jqt .jqt-photo .jqt-photo-image-slide > .{0}{max-width:auto;max-height:auto;}",galleryTemplate:'<div class="jqt-photo"> <div class="toolbar toolbar-top"></div> <table class="jqt-photo-table"> <tr class="jqt-photo-slide-list"></tr> </table> <div class="toolbar toolbar-bottom"> <div class="jqt-photo-prev"></div> <div class="jqt-photo-pause"></div> <div class="jqt-photo-play"></div> <div class="jqt-photo-next"></div> </div> </div>',pageAnimationEnd:i,pageAnimationStart:d,slideTo:h,play:K,pause:c,next:g,prev:N,goTo:Z,showToolbars:u,hideToolbars:Y,toggleToolbars:J,touchStart:U,dragStart:n,drag:j,dragEnd:aa,scaleStart:r,scale:Q,scaleEnd:p,loader:D,createSlide:S,rearrange:W,presizedClass:"jqt-photo-presized",parsedClass:"jqt-photo-parsed",currentClass:"jqt-photo-current",playingClass:"jqt-photo-playing",notLoadedClass:"jqt-photo-not-loaded",toolbarAnimationInClass:"jqt-photo-toolbar-animation-in",toolbarAnimationOutClass:"jqt-photo-toolbar-animation-out",toolbarHideClass:"jqt-photo-toolbar-hidden",tableSelector:".jqt-photo-table",captionSelector:".jqt-photo-caption",slideSelector:".jqt-photo-image-slide",imageSelector:"img.jqt-photo-img",titleSelector:".toolbar-top h1",listSelector:".jqt-photo-slide-list",playSelector:".jqt-photo-play",pauseSelector:".jqt-photo-pause",nextSelector:".jqt-photo-next",prevSelector:".jqt-photo-prev",gallerySelector:".jqt-photo"},V=function(af){return(X.innerHeight-af.caption)+"px"},e=function(){return X.innerHeight+"px"},a=function(){return X.innerWidth+"px"},A=function(af){return(X.innerHeight-af.toolbar)+"px"},w={variables:{caption:90,toolbar:45},defaults:{"#jqt .jqt-photo .toolbar-bottom":{top:A},"#jqt .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}},portrait:{"#jqt.portrait .jqt-photo":{height:e,width:a,},"#jqt.portrait .jqt-photo .toolbar-bottom":{top:A},"#jqt.portrait .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e,},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}},landscape:{"#jqt.landscape .jqt-photo":{height:e,width:a,},"#jqt.landscape .jqt-photo .toolbar-bottom":{top:A,},"#jqt.landscape .jqt-photo .jqt-photo-table":{height:e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide > div":{height:e,width:a,"line-height":e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}}};if(P.jQTouch){P.jQTouch.addExtension(function(af){return{generateGallery:t,goToSlide:function(ag,aj,am,ai){var al=P(ag),ah=al.data("jqt-photo-options"),ak=al.find(ah.slideSelector);if(ak.index("."+ah.currentClass)!=aj){ak.removeClass(ah.currentClass).eq(aj).addClass(ah.currentClass)}if(!al.hasClass("current")){af.goTo(al,am||"slide",ai)}al.triggerHandler("jqt-photo-show-toolbars");return al}}})}function t(am,af,ah){ah=P.extend({},R,ah);ah.data=af;if(!ae){ae=true;var ai=k.styleSheets[k.styleSheets.length-1];ai.insertRule(M(ah.parsedClassTemplate,ah.parsedClass),ai.cssRules.length)}ah.gallery=P(ah.galleryTemplate).appendTo(ah.appendTo);var al=ah.list=ah.gallery.find(ah.listSelector),ag=ah.defaultIndex-ah.maxSlidesBefore,aj=ah.defaultIndex+ah.maxSlidesAfter,ak=ah.gallery.attr("id",am).find(".toolbar-top").append(P("<h1></h1>").html(M(ah.galleryName,ah.defaultIndex+1,af.length)));if(ah.backLink){ak.append(ah.backLink)}P.each(af,function(an,ao){al.append(ah.createSlide(ao,an,ah,an>=ag&&an<=aj))});return B(ah.gallery[0],ah)}P.fn.jqtPhoto=function(af){af=P.extend({},R,af||{});return this.each(function(){B(this,af)})};P.jqtPhoto={generateGallery:t,defaults:function(af){if(af){R=P.extend(R,af)}return P.extend({},R)},defaultCSS:function(af){if(af!==q){w=P.extend(true,w,af)}return P.extend({},w)}};function B(ai,ah){var ag=P(ai),aj=v(ag,ah).find(ah.slideSelector),af=aj.find(ah.imageSelector);ah.list=ag.find(ah.listSelector);ah.table=o(ag.data("jqt-photo-options",ah),ah);ah.blankImage=I(ag,P(ah.blankImage).load(ah.loader),ah);if(!aj.filter("."+ah.currentClass).length){if(!aj.filter(M("[{0}={1}]",ah.dataAttribute,ah.defaultIndex)).addClass(ah.currentClass).length){aj.eq(0).addClass(ah.currentClass)}}ag.find(ah.tableSelector).css({webkitTransitionProperty:ah.transitionProperty,webkitTransitionTimingFunction:ah.timingFunction,webkitTransitionDuration:ah.defaultDuration+"s",webkitTransform:M(ah.transform,-aj.filter("."+ah.currentClass).attr("offsetLeft")||0)});I(ag,af,ah);z=z.concat(P.makeArray(ag));return ag}function o(aj,ah){var ai=aj.find(ah.tableSelector),ag=X.getComputedStyle(ai[0]).webkitTransform,af=new WebKitCSSMatrix(ag);return ai.data("jqt-photo-position",{x:Number(af.m41||0),gallery:aj})}function v(ag,af){return ag.each(function(){this.addEventListener(H.start,af.touchStart,false)}).bind("jqt-photo-slideto",af.slideTo).bind("jqt-photo-goto",af.goTo).bind("jqt-photo-play",af.play).bind("jqt-photo-pause",af.pause).bind("jqt-photo-prev",af.prev).bind("jqt-photo-next",af.next).bind("jqt-photo-hide-toolbars",af.hideToolbars).bind("jqt-photo-show-toolbars",af.showToolbars).bind("jqt-photo-toggle-toolbars",af.toggleToolbars).bind("pageAnimationEnd",af.pageAnimationEnd).bind("pageAnimationStart",af.pageAnimationStart)}function I(ah,af,ag){return af.each(function(){var aj=P(this).addClass(ag.parsedClass),ai=new WebKitCSSMatrix(X.getComputedStyle(this).webkitTransform),al=Number(ai.m11),ak=aj.data("jqt-photo-info")||{},am={scale:al,top:Number(ai.m42),left:Number(ai.m41),width:aj.width()*al,height:aj.height()*al,parent:aj.parent()};ak.galleryOptions=ag;ak.gallery=ak.gallery||ah;ak[E]={current:am,original:P.extend({},am)};aj.data("jqt-photo-info",ak)})}function U(ah){var aj=P(ah.target.nodeType==3?ah.target.parentNode:ah.target),ai=P(this),af=ai.data("jqt-photo-options"),ag=s?ah.targetTouches:{length:!ah.ctrlKey?1:2};if(aj.is(af.tagNames)){return null}if(aj.is(af.playSelector)){if(!ai.hasClass(af.playingClass)&&af.play){return af.play.call(this,ah)}return true}else{if(aj.is(af.pauseSelector)){if(ai.hasClass(af.playingClass)&&af.pause){return af.pause.call(this,ah)}return true}else{if(aj.is(af.nextSelector)&&af.next){return af.next.call(this,ah)}else{if(aj.is(af.prevSelector)&&af.prev){return af.prev.call(this,ah)}else{if(ag.length==2&&aj.closest(af.imageSelector).length&&af.scaleStart){if(ai.hasClass(af.playingClass)&&af.pause){af.pause.call(this)}return af.scaleStart.call(this,ah)}else{if(ag.length==1&&af.dragStart){if(ai.hasClass(af.playingClass)&&af.pause){af.pause.call(this,ah)}return af.dragStart.call(this,ah)}}}}}}return true}function n(af){af.preventDefault();X.scrollTo(0,0);var am=P(this),ao=am.data("jqt-photo-options"),an=am.find(ao.tableSelector).css("webkitTransitionDuration","0s"),ai=an.data("jqt-photo-position"),al=P(af.target).closest(ao.imageSelector),ah=al.data("jqt-photo-info")||false,ag=!!ah&&ah[E]||false,ak=!!ag&&ag.current||{},aj=s?af.targetTouches[0]:af;this.addEventListener(H.move,ao.drag,false);this.addEventListener(H.end,ao.dragEnd,false);am.data("jqt-photo-event",{table:an,position:{current:ai.x,original:ai.x},target:al.css("webkitTransitionDuration","0s"),options:ao,slides:an.find(ao.slideSelector),moved:false,x:aj.pageX,y:aj.pageY,left:ak.left||0,top:ak.top||0,timeStamp:+new Date});return true}function j(ap){ap.preventDefault();var ag=P(this),ao=ag.data("jqt-photo-event"),at=ao.table,ay=ao.position,ax=ao.target,av=ax.data("jqt-photo-info"),az=!!av&&av[E]||false,am=az.current||false,af=s?ap.targetTouches[0]:ap,au=ao.x-af.pageX,ar=ao.y-af.pageY,aj,aq,ai,ah,an,ak,aw,al=am.scale;ao.moved=true;if(az){ag.triggerHandler("jqt-photo-hide-toolbars",[ao.options]);if(au){ai=ax.width()*al;aj=am.parent.width();an=ao.left;if(ai>aj){an-=au/al;au=0;aw=((ai-aj)/al)/2;if(an>aw){au=aw-an;an=aw}else{if(an<-aw){au=-(an+aw);an=-aw}}}am.left=l(an)}if(ar){ah=ax.height()*al;aq=am.parent.height(),ak=ao.top;if(ah>aq){ak-=ar/al}am.top=l(ak)}ax.css({webkitTransitionDuration:"0s",webkitTransform:M(ao.options.imageTransform,al,am.left,am.top)})}ay.current=ay.original-au;at.css({webkitTransitionDuration:"0s",webkitTransform:M(ao.options.transform,ay.current)});return true}function aa(aq){var af=P(this),ap=af.data("jqt-photo-event"),at=ap.table,aj=at.data("jqt-photo-position"),ax=ap.position,aw=ap.target,au=aw.data("jqt-photo-info"),ay=!!au&&au[E]||false,am=ay.current||false,ao=ap.slides,ar,ah,ag,ak,av,an,ai,al=am.scale;this.removeEventListener(H.move,ap.options.drag,false);this.removeEventListener(H.end,ap.options.dragEnd,false);if(!ap.moved){af.trigger("jqt-photo-toggle-toolbars");return ab(aq.target)}aq.preventDefault();if(ay){ag=aw.height()*al;ar=am.parent.height(),ak=am.top;if(ag>ar){av=((ag-ar)/al)/2;if(ak>av){ak=av}else{if(ak<-av){ak=-av}}}am.top=l(ak);aw.css({webkitTransitionDuration:ap.options.scaleSpeed+"ms",webkitTransform:M(ap.options.imageTransform,al,am.left,am.top)})}av=(+new Date()-ap.timeStamp);if(ax.current>0){aj.x=0}else{if(ax.current<(ao.eq(ao.length-1).width()-at.outerWidth())){aj.x=(ao.eq(ao.length-1).width()-at.outerWidth())}else{an=aj.x<ax.current?-1:1;ah=ao.filter("."+ap.options.currentClass);ak=O(ah.attr("offsetLeft")+ax.current);ai=ah.width()/3;if(ak>ai){af.triggerHandler("jqt-photo-slideto",[ao.index(ah[0])+an,(av>1000?1000:av),ap.options,ao]);return true}}}at.css({webkitTransitionDuration:(av>1000?1000:av)+"ms",webkitTransform:M(ap.options.transform,aj.x)});return true}function r(ah){ah.preventDefault();X.scrollTo(0,0);var aj=P(this),af=aj.data("jqt-photo-options"),ag=s?ah.targetTouches:[{pageX:f.x-ah.pageX,pageY:f.y-ah.pageY},ah];this.addEventListener(H.move,af.scale,false);this.addEventListener(H.end,af.scaleEnd,false);try{this.removeEventListener(H.move,af.drag,false);this.removeEventListener(H.end,af.dragEnd,false)}catch(ai){}aj.data("jqt-photo-event",{target:P(ah.target).closest(af.imageSelector).css("webkitTransitionDuration","0s"),options:af,distance:T(L((ag[1].pageX-ag[0].pageX),2)+L((ag[1].pageY-ag[0].pageY),2))}).find(".image-list").css("webkitTransitionDuration","0s");return true}function Q(ag){if(ag.targetTouches.length!=2){return true}ag.preventDefault();var aq=P(this),aj=aq.data("jqt-photo-event"),ao=aj.target,ai=ao.data("jqt-photo-info"),al=!!ai&&ai[E]||false,ap=ag.targetTouches,af=T(L((ap[1].pageX-ap[0].pageX),2)+L((ap[1].pageY-ap[0].pageY),2)),ak=af-aj.distance,am=(ak/aj.distance)/2,an=al.current,ah;if(!an){I(aq,ao,aj.options);ai=ao.data("jqt-photo-info");al=!!ai&&ai[E]||false;an=al.current}aq.triggerHandler("jqt-photo-hide-toolbars",[aj.options]);ah=M(aj.options.imageTransform,(an.scale=(an.scale+(an.scale*am))),an.left,an.top);aj.distance=af;ao.css({webkitTransitionDuration:"0s",webkitTransform:ah});return true}function p(ag){ag.preventDefault();var ak=P(this),af=ak.data("jqt-photo-event"),aj=af.target.data("jqt-photo-info"),ah=!!aj&&aj[E]||false,ai=ah.current;this.removeEventListener(H.move,af.options.scale,false);this.removeEventListener(H.end,af.options.scaleEnd,false);if(!ai){I(ak,af.target,af.options);aj=af.target.data("jqt-photo-info");ah=!!aj&&aj[E]||false;ai=ah.current}if(ai.scale<ah.original.scale){ai.scale=ah.original.scale;ai.left=ah.original.left;ai.top=ah.original.top}af.target.css({webkitTransitionDuration:af.options.scaleSpeed+"ms",webkitTransform:M(af.options.imageTransform,ai.scale,ai.left,ai.top)});return true}function ab(af){var ag=af.ownerDocument.createEvent("MouseEvents");ag.initEvent("click",true,true);af.dispatchEvent(ag);return true}function K(ai,ag){ai.preventDefault&&ai.preventDefault();var aj=P(this),af=aj.data("jqt-photo-options"),ah=aj.find(af.slideSelector),ak=ag===q||ag<0?Number(ah.filter("."+af.currentClass).attr(af.dataAttribute)):O(ag);G(aj.addClass(af.playingClass),aj.find(af.pauseSelector)[0]);if(ak!=ag){aj.triggerHandler("jqt-photo-goto",[ak,0,af,ah])}aj.data("jqt-photo-slide-timer",setInterval(function(){b(aj,ah,af)},af.slideDelay));return true}function b(aj,ah,ag){var af=Number(aj.find(ag.slideSelector).filter("."+ag.currentClass).attr(ag.dataAttribute))+1,ai="jqt-photo-slideto";if(af===ag.data.length){if(!ag.repeatSlideShow){aj.triggerHandler("jqt-photo-pause");return null}af=0;ai="jqt-photo-goto"}aj.triggerHandler(ai,[af,ag.scrollSpeed,ag,ah]);aj.triggerHandler("jqt-photo-hide-toolbars",[ag]);return null}function c(ag){ag.preventDefault&&ag.preventDefault();var ah=P(this),ai=ah.data("jqt-photo-slide-timer"),af=ah.data("jqt-photo-options");G(ah,ah.find(af.playSelector)[0]);clearInterval(ai);ah.removeClass(af.playingClass).data("jqt-photo-slide-timer",null).triggerHandler("jqt-photoshow-toolbars");return true}function h(af,aj,ah,ap,ag){af.preventDefault&&af.preventDefault();var al=P(this),ao,ak,am,an,ai;ap=ap||al.data("jqt-photo-options");ag=ag||al.find(ap.slideSelector);ao=ap.table;aj=Number(aj||0);ah=ah===q||ah<0?ap.scrollSpeed:(Number(ah)||0);if(aj>=ap.data.length){al.triggerHandler("jqt-photo-goto",[0,ah,ap,ag]);return true}if(aj<0){aj=ap.data.length+aj}an=ag.filter("."+ap.currentClass);ak=ag.removeClass(ap.currentClass).filter(M("[{0}={1}]",ap.dataAttribute,aj));ai=ak.find(ap.imageSelector);if(ai.attr("src")!=ap.data[aj].src){ai.parent().addClass(ap.notLoadedClass);ai.attr("src",ap.data[aj].src)}position=-ak.addClass(ap.currentClass).attr("offsetLeft");if(position>0){position=0}else{if(position<-(ao.width()-ak.width())){position=-(ao.width()-ak.width())}}al.trigger("jqt-photo-slide-change",[aj,ah,position]);ao.data("jqt-photo-position").x=position;ao.one("webkitTransitionEnd",function(){ap.rearrange(ak,an,ap)}).css({webkitTransitionDuration:ah+"ms",webkitTransform:M(ap.transform,position)});am=al.find(ap.titleSelector);am.html(M(ap.galleryName||am.html(),Number(aj)+1,ap.data.length));return true}function Z(af,aj,ah,ap,ag){af.preventDefault&&af.preventDefault();var al=P(this),ao,ak,am,an,ai;ap=ap||al.data("jqt-photo-options");ag=ag||al.find(ap.slideSelector);ao=ap.table;aj=Number(aj||0);ah=ah===q||ah<0?ap.scrollSpeed:(Number(ah)||0);if(aj>=ap.data.length){aj=0}if(aj<0){aj=ap.data.length+aj}an=ag.filter("."+ap.currentClass);ak=ag.removeClass(ap.currentClass).filter(M("[{0}={1}]",ap.dataAttribute,aj));ai=ak.find(ap.imageSelector);if(ai.attr("src")!=ap.data[aj].src){ai.parent().addClass(ap.notLoadedClass);ai.attr("src",ap.data[aj].src)}position=-ak.addClass(ap.currentClass).attr("offsetLeft");if(position>0){position=0}else{if(position<-(ao.width()-ak.width())){position=-(ao.width()-ak.width())}}ao.data("jqt-photo-position").x=position;ao.css({webkitTransitionDuration:"0s",webkitTransform:M(ap.transform,position)});am=al.find(ap.titleSelector);am.html(M(ap.galleryName||am.html(),Number(aj)+1,ap.data.length));ap.rearrange(ak,an,ap);return true}function W(ai,ah,af){var ag=ai.next();N=ai.prev();ag.length&&ag.find(af.imageSelector).attr("src",af.data[ag.attr(af.dataAttribute)].src);N.length&&N.find(af.imageSelector).attr("src",af.data[N.attr(af.dataAttribute)].src);ai.prevAll().slice(af.maxSlidesBefore).find(af.imageSelector).filter("[src]").each(function(){var ak=af.blankImage.clone(true),aj=P(this);aj.parent().addClass(af.notLoadedClass);aj.replaceWith(ak);I(aj,ak,af)});ai.nextAll().slice(af.maxSlidesAfter).find(af.imageSelector).filter("[src]").each(function(){var ak=af.blankImage.clone(true),aj=P(this);aj.parent().addClass(af.notLoadedClass);aj.replaceWith(ak);I(aj,ak,af)});if(ah[0]!==ai[0]){m(ah.find(af.imageSelector))}return true}function N(ai){ai.preventDefault&&ai.preventDefault();var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).attr(ag.dataAttribute));G(aj,ai.target);aj.triggerHandler("jqt-photo-goto",[af-1,0,ag,ah]);return true}function g(ai){ai.preventDefault&&ai.preventDefault();var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).attr(ag.dataAttribute));G(aj,ai.target);aj.triggerHandler("jqt-photo-goto",[af+1,0,ag,ah]);return true}function J(ah,ag){if(ah&&ah.target&&ah.target.tagName==="A"){return null}var af=P(this);ag=ag||af.data("jqt-photo-options");if(af.hasClass(ag.toolbarHideClass)){af.triggerHandler("jqt-photo-show-toolbars",[ag])}else{af.triggerHandler("jqt-photo-hide-toolbars",[ag])}return null}function Y(ah,ag){var af=P(this);ag=ag||af.data("jqt-photo-options");if(!af.hasClass(ag.toolbarHideClass)){af.one("webkitTransitionEnd",function(){af.addClass(ag.toolbarHideClass).removeClass(ag.toolbarAnimationOutClass)}).addClass(ag.toolbarAnimationOutClass)}return null}function u(ah,ag){var af=P(this);ag=ag||af.data("jqt-photo-options");if(af.hasClass(ag.toolbarHideClass)){af.one("webkitTransitionEnd",function(){af.removeClass(ag.toolbarAnimationInClass)}).addClass(ag.toolbarAnimationInClass).removeClass(ag.toolbarHideClass)}return null}function d(ai,ak){if(ak&&ak.direction=="in"){var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).attr(ag.dataAttribute)),al=af>-1?af:(ag.defaultIndex>-1?ag.defaultIndex:0);if(ah.index("."+ag.currentClass)!=al){aj.triggerHandler("jqt-photo-goto",[al,0,ag,ah]);aj.triggerHandler("jqt-photo-show-toolbars")}}return null}function i(ai,ak){var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af,al;if(ak&&ak.direction=="out"){aj.triggerHandler("jqt-photo-goto",[ag.defaultIndex,0,ag,ah]);aj.triggerHandler("jqt-photo-show-toolbars")}else{af=Number(ah.filter("."+ag.currentClass).attr(ag.dataAttribute));al=af>-1?af:(ag.defaultIndex>-1?ag.defaultIndex:0);aj.triggerHandler("jqt-photo-goto",[al,0,ag,ah])}return null}function S(ak,aj,ai,ag){var af=P(ak.template||ai.slideTemplate).attr(ai.dataAttribute,aj),ah=af.find(ai.imageSelector);I(ai.gallery,ah.load(ai.loader),ai);if(ag){ah.attr("src",ak.src)}if(ak.caption){af.find(ai.captionSelector).html(ak.caption)}return af}function m(af){return af.each(function(ah){var ag=P(this),ai=ag.data("jqt-photo-info"),aj=ai[E];if(aj&&aj.current.scale!=1&&aj.current.scale!=aj.original.scale){ag.css({webkitTransitionDuration:"0s",webkitTransform:M(ai.galleryOptions.imageTransform,aj.current.scale=aj.original.scale,aj.current.left=aj.original.left,aj.current.top=aj.original.top)});aj.current.width=aj.original.width;aj.current.height=aj.original.height}return null})}function G(af,ag){P(ag).addClass("hover");af.one("touchend",function(){P(ag).removeClass("hover")});return null}function M(ag){var af=arguments;return ag.replace(/\{(\d+)\}/g,function(ai,ah){return af[Number(ah)+1]+""})}function ac(){E=O(X.orientation)==90?"landscape":"portrait";P("#jqt").removeClass("portrait landscape").addClass(E);setTimeout(function(){var ag=[],af=function(){var ak=P(this),ai=ak.data("jqt-photo-options"),aj=ak.find(ai.slideSelector),ah=aj.find(ai.imageSelector);F(ak,aj,ai);if(ak.hasClass(ai.playingClass)){ag.push(this);ak.triggerHandler("jqt-photo-pause")}m(ah.filter("[src]"))};P(z).filter(":visible").each(af).end().filter(":not(:visible)").each(af);P(ag).triggerHandler("jqt-photo-play")},10);f={x:X.innerWidth/2,y:X.innerHeight/2};return null}function F(ah,ag,af){table=ah.find(af.tableSelector),position=-ag.filter("."+af.currentClass).attr("offsetLeft");table.data("jqt-photo-position").x=position;table.css({webkitTransitionDuration:"0s",webkitTransform:M(af.transform,position)});return null}function D(){var am=X.innerWidth,af=X.innerHeight,al=P(this),ao=al.width(),ak=al.height(),an,ah,ai=ad(ad(ao,am)/ao,ad(ak,af)/ak),ag=ao*ai,ap=ak*ai,aj=al.data("jqt-photo-info"),aq=aj.galleryOptions;al.parent().removeClass(aq.notLoadedClass);if(!al.is(":visible")){aj.gallery.one("pageAnimationEnd",function(){I(aj.gallery,al,aj.galleryOptions)})}else{if(ag>am||ap>af){ah=-l(((ag-am)/ai)/2);an=-l(((ap-af)/ai)/2);al.css({webkitTransitionDuration:"0s",webkitTransform:M(aq.imageTransform,ai,ah,an)}).addClass(aq.presizedClass);aj=aj[E];aj.current.scale=aj.original.scale=ai;aj.current.left=aj.original.left=ah;aj.current.top=aj.original.top=an;aj.current.width=aj.original.width=ag*ai;aj.current.height=aj.original.height=ap*ai}}return null}P(function(){X.scrollTo(0,0);f={x:X.innerWidth/2,y:X.innerHeight/2};if(R.useDynamicStyleSheet){var af="",ai=w,ah=X.innerHeight>X.innerWidth?"portrait":"landscape",aj=function(ak,al){af+=ak+":"+(P.isFunction(al)?al(ai.variables):al)+";"},ag=function(ak,al){af+=ak+"{";P.each(al,aj);af+="}"};P.each(ai.defaults,ag);P.each(ai[ah],ag);P(k.createElement("style")).attr({type:"text/css",media:"screen"}).html(af).appendTo("head");P(X).one("orientationchange",function(){X.scrollTo(0,0);E=O(X.orientation)==90?"landscape":"portrait";P("#jqt").removeClass("portrait landscape").addClass(E);af="";P.each(ai[E],ag);P(k.createElement("style")).attr({type:"text/css",media:"screen"}).html(af).appendTo("head")})}P(X).bind("orientationchange",ac)})})(jQuery);(function(b){b.fn.scalable=function(c){return this.each(function(){new a(this,c)})};if(b.jQTouch){b.jQTouch.addExtension(function(d){function c(g,f){f.page.find(".scalable").scalable()}b(document.body).bind("pageInserted",c);b(function(){b("body > *").each(function(){c({},{page:b(this)})})});return{}});function a(d,c){var e=this;this.numberOfTouches=2;this.element=d;this.scale(1);this.refresh();this.scaleLessThanOne=false;d.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";d.addEventListener("touchstart",this,false);d.addEventListener("touchmove",this,false);d.addEventListener("touchend",this,false);window.addEventListener("unload",function(){d.removeEventListener("touchstart",e,false);d.removeEventListener("touchmove",e,false);d.removeEventListener("touchend",e,false);this.removeEventListener("unload",arguments.callee,false)},false);if(c){b.extend(this,c)}}a.prototype={handleEvent:function(c){switch(c.type){case"touchstart":return this.onTouchStart(c);break;case"touchmove":return this.onTouchMove(c);break;case"touchend":return this.onTouchEnd(c);break}},scale:function(c){if(c!==undefined){this._scale=c;this.element.style.webkitTransform="scale("+c+")";return}return this._scale},refresh:function(){this.element.style.webkitTransitionDuration="0"},onTouchStart:function(c){if(c.targetTouches.length!=this.numberOfTouches){return}this.refresh();this.moved=false;this.startDistance=Math.sqrt(Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2)+Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2));return false},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}f.preventDefault();this.moved=true;this.refresh();var c=Math.sqrt(Math.pow((f.targetTouches[1].clientX-f.targetTouches[0].clientX),2)+Math.pow((f.targetTouches[1].clientY-f.targetTouches[0].clientY),2)),g=c-this.startDistance,d=(g/this.startDistance)/2;this.scale(this.scale()+(this.scale()*d));this.startDistance=c;return false},onTouchEnd:function(d){var c,f;if(!this.moved){c=d.target;if(c.nodeType==3){c=c.parentNode}f=document.createEvent("MouseEvents");f.initEvent("click",true,true);c.dispatchEvent(f);return}d.preventDefault();d.stopPropagation();if(!this.scaleLessThanOne&&this.scale()<1){this.element.style.webkitTransitionDuration="200ms";this.scale(1)}return false},scaleTo:function(c,d){this.element.style.webkitTransitionDuration=d?d:"300ms";this.scale(c?c:0)}}}})(jQuery);
|
|
42
|
+
(function(P){if(!"WebKitCSSMatrix" in this){return null}var q,z=[],s="Touch" in this,H=s?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},f,ae=false,X=this,k=X.document,C=X.Math,ad=C.min,l=C.floor,T=C.sqrt,L=C.pow,O=C.abs,E=O(X.orientation)==90?"landscape":"portrait",R={data:[],galleryName:"{0} of {1}",defaultIndex:0,transitionProperty:"-webkit-transform",timingFunction:"cubic-bezier(0,0,.25,1)",transform:"translate3d({0}px,0,0)",imageTransform:"scale({0}) translate3d({1}px, {2}px, 0)",maxSlidesBefore:2,maxSlidesAfter:2,slideDelay:5000,scrollSpeed:500,scaleSpeed:500,useDynamicStyleSheet:true,repeatSlideShow:false,appendTo:"#jqt",dataAttribute:"data-index",tagNames:"A,INPUT,SELECT,TEXTAREA",backLink:'<a class="back">Back</a>',blankImage:'<img class="jqt-photo-img"/>',slideTemplate:'<td class="jqt-photo-image-slide"> <div class="jqt-photo-not-loaded"> <img class="jqt-photo-img"/> <div class="jqt-photo-caption"></div> </div> </td>',parsedClassTemplate:"#jqt .jqt-photo .jqt-photo-image-slide > .{0}{max-width:auto;max-height:auto;}",galleryTemplate:'<div class="jqt-photo"> <div class="toolbar toolbar-top"></div> <table class="jqt-photo-table"> <tr class="jqt-photo-slide-list"></tr> </table> <div class="toolbar toolbar-bottom"> <div class="jqt-photo-prev"></div> <div class="jqt-photo-pause"></div> <div class="jqt-photo-play"></div> <div class="jqt-photo-next"></div> </div> </div>',pageAnimationEnd:i,pageAnimationStart:d,slideTo:h,play:K,pause:c,next:g,prev:N,goTo:Z,showToolbars:u,hideToolbars:Y,toggleToolbars:J,touchStart:U,dragStart:n,drag:j,dragEnd:aa,scaleStart:r,scale:Q,scaleEnd:p,loader:D,createSlide:S,rearrange:W,presizedClass:"jqt-photo-presized",parsedClass:"jqt-photo-parsed",currentClass:"jqt-photo-current",playingClass:"jqt-photo-playing",notLoadedClass:"jqt-photo-not-loaded",toolbarAnimationInClass:"jqt-photo-toolbar-animation-in",toolbarAnimationOutClass:"jqt-photo-toolbar-animation-out",toolbarHideClass:"jqt-photo-toolbar-hidden",tableSelector:".jqt-photo-table",captionSelector:".jqt-photo-caption",slideSelector:".jqt-photo-image-slide",imageSelector:"img.jqt-photo-img",titleSelector:".toolbar-top h1",listSelector:".jqt-photo-slide-list",playSelector:".jqt-photo-play",pauseSelector:".jqt-photo-pause",nextSelector:".jqt-photo-next",prevSelector:".jqt-photo-prev",gallerySelector:".jqt-photo"},V=function(af){return(X.innerHeight-af.caption)+"px"},e=function(){return X.innerHeight+"px"},a=function(){return X.innerWidth+"px"},A=function(af){return(X.innerHeight-af.toolbar)+"px"},w={variables:{caption:90,toolbar:45},defaults:{"#jqt .jqt-photo .toolbar-bottom":{top:A},"#jqt .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}},portrait:{"#jqt.portrait .jqt-photo":{height:e,width:a,},"#jqt.portrait .jqt-photo .toolbar-bottom":{top:A},"#jqt.portrait .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e,},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}},landscape:{"#jqt.landscape .jqt-photo":{height:e,width:a,},"#jqt.landscape .jqt-photo .toolbar-bottom":{top:A,},"#jqt.landscape .jqt-photo .jqt-photo-table":{height:e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide > div":{height:e,width:a,"line-height":e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:V,}}};if(P.jQTouch){P.jQTouch.addExtension(function(af){return{generateGallery:t,goToSlide:function(ag,aj,am,ai){var al=P(ag),ah=al.data("jqt-photo-options"),ak=al.find(ah.slideSelector);if(ak.index("."+ah.currentClass)!=aj){ak.removeClass(ah.currentClass).eq(aj).addClass(ah.currentClass)}if(!al.hasClass("current")){af.goTo(al,am||"slide",ai)}al.triggerHandler("jqt-photo-show-toolbars");return al}}})}function t(am,af,ah){ah=P.extend({},R,ah);ah.data=af;if(!ae){ae=true;var ai=k.styleSheets[k.styleSheets.length-1];ai.insertRule(M(ah.parsedClassTemplate,ah.parsedClass),ai.cssRules.length)}ah.gallery=P(ah.galleryTemplate).appendTo(ah.appendTo);var al=ah.list=ah.gallery.find(ah.listSelector),ag=ah.defaultIndex-ah.maxSlidesBefore,aj=ah.defaultIndex+ah.maxSlidesAfter,ak=ah.gallery.prop("id",am).find(".toolbar-top").append(P("<h1></h1>").html(M(ah.galleryName,ah.defaultIndex+1,af.length)));if(ah.backLink){ak.append(ah.backLink)}P.each(af,function(an,ao){al.append(ah.createSlide(ao,an,ah,an>=ag&&an<=aj))});return B(ah.gallery[0],ah)}P.fn.jqtPhoto=function(af){af=P.extend({},R,af||{});return this.each(function(){B(this,af)})};P.jqtPhoto={generateGallery:t,defaults:function(af){if(af){R=P.extend(R,af)}return P.extend({},R)},defaultCSS:function(af){if(af!==q){w=P.extend(true,w,af)}return P.extend({},w)}};function B(ai,ah){var ag=P(ai),aj=v(ag,ah).find(ah.slideSelector),af=aj.find(ah.imageSelector);ah.list=ag.find(ah.listSelector);ah.table=o(ag.data("jqt-photo-options",ah),ah);ah.blankImage=I(ag,P(ah.blankImage).load(ah.loader),ah);if(!aj.filter("."+ah.currentClass).length){if(!aj.filter(M("[{0}={1}]",ah.dataAttribute,ah.defaultIndex)).addClass(ah.currentClass).length){aj.eq(0).addClass(ah.currentClass)}}ag.find(ah.tableSelector).css({webkitTransitionProperty:ah.transitionProperty,webkitTransitionTimingFunction:ah.timingFunction,webkitTransitionDuration:ah.defaultDuration+"s",webkitTransform:M(ah.transform,-aj.filter("."+ah.currentClass).prop("offsetLeft")||0)});I(ag,af,ah);z=z.concat(P.makeArray(ag));return ag}function o(aj,ah){var ai=aj.find(ah.tableSelector),ag=X.getComputedStyle(ai[0]).webkitTransform,af=new WebKitCSSMatrix(ag);return ai.data("jqt-photo-position",{x:Number(af.m41||0),gallery:aj})}function v(ag,af){return ag.each(function(){this.addEventListener(H.start,af.touchStart,false)}).bind("jqt-photo-slideto",af.slideTo).bind("jqt-photo-goto",af.goTo).bind("jqt-photo-play",af.play).bind("jqt-photo-pause",af.pause).bind("jqt-photo-prev",af.prev).bind("jqt-photo-next",af.next).bind("jqt-photo-hide-toolbars",af.hideToolbars).bind("jqt-photo-show-toolbars",af.showToolbars).bind("jqt-photo-toggle-toolbars",af.toggleToolbars).bind("pageAnimationEnd",af.pageAnimationEnd).bind("pageAnimationStart",af.pageAnimationStart)}function I(ah,af,ag){return af.each(function(){var aj=P(this).addClass(ag.parsedClass),ai=new WebKitCSSMatrix(X.getComputedStyle(this).webkitTransform),al=Number(ai.m11),ak=aj.data("jqt-photo-info")||{},am={scale:al,top:Number(ai.m42),left:Number(ai.m41),width:aj.width()*al,height:aj.height()*al,parent:aj.parent()};ak.galleryOptions=ag;ak.gallery=ak.gallery||ah;ak[E]={current:am,original:P.extend({},am)};aj.data("jqt-photo-info",ak)})}function U(ah){var aj=P(ah.target.nodeType==3?ah.target.parentNode:ah.target),ai=P(this),af=ai.data("jqt-photo-options"),ag=s?ah.targetTouches:{length:!ah.ctrlKey?1:2};if(aj.is(af.tagNames)){return null}if(aj.is(af.playSelector)){if(!ai.hasClass(af.playingClass)&&af.play){return af.play.call(this,ah)}return true}else{if(aj.is(af.pauseSelector)){if(ai.hasClass(af.playingClass)&&af.pause){return af.pause.call(this,ah)}return true}else{if(aj.is(af.nextSelector)&&af.next){return af.next.call(this,ah)}else{if(aj.is(af.prevSelector)&&af.prev){return af.prev.call(this,ah)}else{if(ag.length==2&&aj.closest(af.imageSelector).length&&af.scaleStart){if(ai.hasClass(af.playingClass)&&af.pause){af.pause.call(this)}return af.scaleStart.call(this,ah)}else{if(ag.length==1&&af.dragStart){if(ai.hasClass(af.playingClass)&&af.pause){af.pause.call(this,ah)}return af.dragStart.call(this,ah)}}}}}}return true}function n(af){af.preventDefault();X.scrollTo(0,0);var am=P(this),ao=am.data("jqt-photo-options"),an=am.find(ao.tableSelector).css("webkitTransitionDuration","0s"),ai=an.data("jqt-photo-position"),al=P(af.target).closest(ao.imageSelector),ah=al.data("jqt-photo-info")||false,ag=!!ah&&ah[E]||false,ak=!!ag&&ag.current||{},aj=s?af.targetTouches[0]:af;this.addEventListener(H.move,ao.drag,false);this.addEventListener(H.end,ao.dragEnd,false);am.data("jqt-photo-event",{table:an,position:{current:ai.x,original:ai.x},target:al.css("webkitTransitionDuration","0s"),options:ao,slides:an.find(ao.slideSelector),moved:false,x:aj.pageX,y:aj.pageY,left:ak.left||0,top:ak.top||0,timeStamp:+new Date});return true}function j(ap){ap.preventDefault();var ag=P(this),ao=ag.data("jqt-photo-event"),at=ao.table,ay=ao.position,ax=ao.target,av=ax.data("jqt-photo-info"),az=!!av&&av[E]||false,am=az.current||false,af=s?ap.targetTouches[0]:ap,au=ao.x-af.pageX,ar=ao.y-af.pageY,aj,aq,ai,ah,an,ak,aw,al=am.scale;ao.moved=true;if(az){ag.triggerHandler("jqt-photo-hide-toolbars",[ao.options]);if(au){ai=ax.width()*al;aj=am.parent.width();an=ao.left;if(ai>aj){an-=au/al;au=0;aw=((ai-aj)/al)/2;if(an>aw){au=aw-an;an=aw}else{if(an<-aw){au=-(an+aw);an=-aw}}}am.left=l(an)}if(ar){ah=ax.height()*al;aq=am.parent.height(),ak=ao.top;if(ah>aq){ak-=ar/al}am.top=l(ak)}ax.css({webkitTransitionDuration:"0s",webkitTransform:M(ao.options.imageTransform,al,am.left,am.top)})}ay.current=ay.original-au;at.css({webkitTransitionDuration:"0s",webkitTransform:M(ao.options.transform,ay.current)});return true}function aa(aq){var af=P(this),ap=af.data("jqt-photo-event"),at=ap.table,aj=at.data("jqt-photo-position"),ax=ap.position,aw=ap.target,au=aw.data("jqt-photo-info"),ay=!!au&&au[E]||false,am=ay.current||false,ao=ap.slides,ar,ah,ag,ak,av,an,ai,al=am.scale;this.removeEventListener(H.move,ap.options.drag,false);this.removeEventListener(H.end,ap.options.dragEnd,false);if(!ap.moved){af.trigger("jqt-photo-toggle-toolbars");return ab(aq.target)}aq.preventDefault();if(ay){ag=aw.height()*al;ar=am.parent.height(),ak=am.top;if(ag>ar){av=((ag-ar)/al)/2;if(ak>av){ak=av}else{if(ak<-av){ak=-av}}}am.top=l(ak);aw.css({webkitTransitionDuration:ap.options.scaleSpeed+"ms",webkitTransform:M(ap.options.imageTransform,al,am.left,am.top)})}av=(+new Date()-ap.timeStamp);if(ax.current>0){aj.x=0}else{if(ax.current<(ao.eq(ao.length-1).width()-at.outerWidth())){aj.x=(ao.eq(ao.length-1).width()-at.outerWidth())}else{an=aj.x<ax.current?-1:1;ah=ao.filter("."+ap.options.currentClass);ak=O(ah.prop("offsetLeft")+ax.current);ai=ah.width()/3;if(ak>ai){af.triggerHandler("jqt-photo-slideto",[ao.index(ah[0])+an,(av>1000?1000:av),ap.options,ao]);return true}}}at.css({webkitTransitionDuration:(av>1000?1000:av)+"ms",webkitTransform:M(ap.options.transform,aj.x)});return true}function r(ah){ah.preventDefault();X.scrollTo(0,0);var aj=P(this),af=aj.data("jqt-photo-options"),ag=s?ah.targetTouches:[{pageX:f.x-ah.pageX,pageY:f.y-ah.pageY},ah];this.addEventListener(H.move,af.scale,false);this.addEventListener(H.end,af.scaleEnd,false);try{this.removeEventListener(H.move,af.drag,false);this.removeEventListener(H.end,af.dragEnd,false)}catch(ai){}aj.data("jqt-photo-event",{target:P(ah.target).closest(af.imageSelector).css("webkitTransitionDuration","0s"),options:af,distance:T(L((ag[1].pageX-ag[0].pageX),2)+L((ag[1].pageY-ag[0].pageY),2))}).find(".image-list").css("webkitTransitionDuration","0s");return true}function Q(ag){if(ag.targetTouches.length!=2){return true}ag.preventDefault();var aq=P(this),aj=aq.data("jqt-photo-event"),ao=aj.target,ai=ao.data("jqt-photo-info"),al=!!ai&&ai[E]||false,ap=ag.targetTouches,af=T(L((ap[1].pageX-ap[0].pageX),2)+L((ap[1].pageY-ap[0].pageY),2)),ak=af-aj.distance,am=(ak/aj.distance)/2,an=al.current,ah;if(!an){I(aq,ao,aj.options);ai=ao.data("jqt-photo-info");al=!!ai&&ai[E]||false;an=al.current}aq.triggerHandler("jqt-photo-hide-toolbars",[aj.options]);ah=M(aj.options.imageTransform,(an.scale=(an.scale+(an.scale*am))),an.left,an.top);aj.distance=af;ao.css({webkitTransitionDuration:"0s",webkitTransform:ah});return true}function p(ag){ag.preventDefault();var ak=P(this),af=ak.data("jqt-photo-event"),aj=af.target.data("jqt-photo-info"),ah=!!aj&&aj[E]||false,ai=ah.current;this.removeEventListener(H.move,af.options.scale,false);this.removeEventListener(H.end,af.options.scaleEnd,false);if(!ai){I(ak,af.target,af.options);aj=af.target.data("jqt-photo-info");ah=!!aj&&aj[E]||false;ai=ah.current}if(ai.scale<ah.original.scale){ai.scale=ah.original.scale;ai.left=ah.original.left;ai.top=ah.original.top}af.target.css({webkitTransitionDuration:af.options.scaleSpeed+"ms",webkitTransform:M(af.options.imageTransform,ai.scale,ai.left,ai.top)});return true}function ab(af){var ag=af.ownerDocument.createEvent("MouseEvents");ag.initEvent("click",true,true);af.dispatchEvent(ag);return true}function K(ai,ag){ai.preventDefault&&ai.preventDefault();var aj=P(this),af=aj.data("jqt-photo-options"),ah=aj.find(af.slideSelector),ak=ag===q||ag<0?Number(ah.filter("."+af.currentClass).prop(af.dataAttribute)):O(ag);G(aj.addClass(af.playingClass),aj.find(af.pauseSelector)[0]);if(ak!=ag){aj.triggerHandler("jqt-photo-goto",[ak,0,af,ah])}aj.data("jqt-photo-slide-timer",setInterval(function(){b(aj,ah,af)},af.slideDelay));return true}function b(aj,ah,ag){var af=Number(aj.find(ag.slideSelector).filter("."+ag.currentClass).prop(ag.dataAttribute))+1,ai="jqt-photo-slideto";if(af===ag.data.length){if(!ag.repeatSlideShow){aj.triggerHandler("jqt-photo-pause");return null}af=0;ai="jqt-photo-goto"}aj.triggerHandler(ai,[af,ag.scrollSpeed,ag,ah]);aj.triggerHandler("jqt-photo-hide-toolbars",[ag]);return null}function c(ag){ag.preventDefault&&ag.preventDefault();var ah=P(this),ai=ah.data("jqt-photo-slide-timer"),af=ah.data("jqt-photo-options");G(ah,ah.find(af.playSelector)[0]);clearInterval(ai);ah.removeClass(af.playingClass).data("jqt-photo-slide-timer",null).triggerHandler("jqt-photoshow-toolbars");return true}function h(af,aj,ah,ap,ag){af.preventDefault&&af.preventDefault();var al=P(this),ao,ak,am,an,ai;ap=ap||al.data("jqt-photo-options");ag=ag||al.find(ap.slideSelector);ao=ap.table;aj=Number(aj||0);ah=ah===q||ah<0?ap.scrollSpeed:(Number(ah)||0);if(aj>=ap.data.length){al.triggerHandler("jqt-photo-goto",[0,ah,ap,ag]);return true}if(aj<0){aj=ap.data.length+aj}an=ag.filter("."+ap.currentClass);ak=ag.removeClass(ap.currentClass).filter(M("[{0}={1}]",ap.dataAttribute,aj));ai=ak.find(ap.imageSelector);if(ai.prop("src")!=ap.data[aj].src){ai.parent().addClass(ap.notLoadedClass);ai.prop("src",ap.data[aj].src)}position=-ak.addClass(ap.currentClass).prop("offsetLeft");if(position>0){position=0}else{if(position<-(ao.width()-ak.width())){position=-(ao.width()-ak.width())}}al.trigger("jqt-photo-slide-change",[aj,ah,position]);ao.data("jqt-photo-position").x=position;ao.one("webkitTransitionEnd",function(){ap.rearrange(ak,an,ap)}).css({webkitTransitionDuration:ah+"ms",webkitTransform:M(ap.transform,position)});am=al.find(ap.titleSelector);am.html(M(ap.galleryName||am.html(),Number(aj)+1,ap.data.length));return true}function Z(af,aj,ah,ap,ag){af.preventDefault&&af.preventDefault();var al=P(this),ao,ak,am,an,ai;ap=ap||al.data("jqt-photo-options");ag=ag||al.find(ap.slideSelector);ao=ap.table;aj=Number(aj||0);ah=ah===q||ah<0?ap.scrollSpeed:(Number(ah)||0);if(aj>=ap.data.length){aj=0}if(aj<0){aj=ap.data.length+aj}an=ag.filter("."+ap.currentClass);ak=ag.removeClass(ap.currentClass).filter(M("[{0}={1}]",ap.dataAttribute,aj));ai=ak.find(ap.imageSelector);if(ai.prop("src")!=ap.data[aj].src){ai.parent().addClass(ap.notLoadedClass);ai.prop("src",ap.data[aj].src)}position=-ak.addClass(ap.currentClass).prop("offsetLeft");if(position>0){position=0}else{if(position<-(ao.width()-ak.width())){position=-(ao.width()-ak.width())}}ao.data("jqt-photo-position").x=position;ao.css({webkitTransitionDuration:"0s",webkitTransform:M(ap.transform,position)});am=al.find(ap.titleSelector);am.html(M(ap.galleryName||am.html(),Number(aj)+1,ap.data.length));ap.rearrange(ak,an,ap);return true}function W(ai,ah,af){var ag=ai.next();N=ai.prev();ag.length&&ag.find(af.imageSelector).prop("src",af.data[ag.prop(af.dataAttribute)].src);N.length&&N.find(af.imageSelector).prop("src",af.data[N.prop(af.dataAttribute)].src);ai.prevAll().slice(af.maxSlidesBefore).find(af.imageSelector).filter("[src]").each(function(){var ak=af.blankImage.clone(true),aj=P(this);aj.parent().addClass(af.notLoadedClass);aj.replaceWith(ak);I(aj,ak,af)});ai.nextAll().slice(af.maxSlidesAfter).find(af.imageSelector).filter("[src]").each(function(){var ak=af.blankImage.clone(true),aj=P(this);aj.parent().addClass(af.notLoadedClass);aj.replaceWith(ak);I(aj,ak,af)});if(ah[0]!==ai[0]){m(ah.find(af.imageSelector))}return true}function N(ai){ai.preventDefault&&ai.preventDefault();var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).prop(ag.dataAttribute));G(aj,ai.target);aj.triggerHandler("jqt-photo-goto",[af-1,0,ag,ah]);return true}function g(ai){ai.preventDefault&&ai.preventDefault();var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).prop(ag.dataAttribute));G(aj,ai.target);aj.triggerHandler("jqt-photo-goto",[af+1,0,ag,ah]);return true}function J(ah,ag){if(ah&&ah.target&&ah.target.tagName==="A"){return null}var af=P(this);ag=ag||af.data("jqt-photo-options");if(af.hasClass(ag.toolbarHideClass)){af.triggerHandler("jqt-photo-show-toolbars",[ag])}else{af.triggerHandler("jqt-photo-hide-toolbars",[ag])}return null}function Y(ah,ag){var af=P(this);ag=ag||af.data("jqt-photo-options");if(!af.hasClass(ag.toolbarHideClass)){af.one("webkitTransitionEnd",function(){af.addClass(ag.toolbarHideClass).removeClass(ag.toolbarAnimationOutClass)}).addClass(ag.toolbarAnimationOutClass)}return null}function u(ah,ag){var af=P(this);ag=ag||af.data("jqt-photo-options");if(af.hasClass(ag.toolbarHideClass)){af.one("webkitTransitionEnd",function(){af.removeClass(ag.toolbarAnimationInClass)}).addClass(ag.toolbarAnimationInClass).removeClass(ag.toolbarHideClass)}return null}function d(ai,ak){if(ak&&ak.direction=="in"){var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af=Number(ah.filter("."+ag.currentClass).prop(ag.dataAttribute)),al=af>-1?af:(ag.defaultIndex>-1?ag.defaultIndex:0);if(ah.index("."+ag.currentClass)!=al){aj.triggerHandler("jqt-photo-goto",[al,0,ag,ah]);aj.triggerHandler("jqt-photo-show-toolbars")}}return null}function i(ai,ak){var aj=P(this),ag=aj.data("jqt-photo-options"),ah=aj.find(ag.slideSelector),af,al;if(ak&&ak.direction=="out"){aj.triggerHandler("jqt-photo-goto",[ag.defaultIndex,0,ag,ah]);aj.triggerHandler("jqt-photo-show-toolbars")}else{af=Number(ah.filter("."+ag.currentClass).prop(ag.dataAttribute));al=af>-1?af:(ag.defaultIndex>-1?ag.defaultIndex:0);aj.triggerHandler("jqt-photo-goto",[al,0,ag,ah])}return null}function S(ak,aj,ai,ag){var af=P(ak.template||ai.slideTemplate).prop(ai.dataAttribute,aj),ah=af.find(ai.imageSelector);I(ai.gallery,ah.load(ai.loader),ai);if(ag){ah.prop("src",ak.src)}if(ak.caption){af.find(ai.captionSelector).html(ak.caption)}return af}function m(af){return af.each(function(ah){var ag=P(this),ai=ag.data("jqt-photo-info"),aj=ai[E];if(aj&&aj.current.scale!=1&&aj.current.scale!=aj.original.scale){ag.css({webkitTransitionDuration:"0s",webkitTransform:M(ai.galleryOptions.imageTransform,aj.current.scale=aj.original.scale,aj.current.left=aj.original.left,aj.current.top=aj.original.top)});aj.current.width=aj.original.width;aj.current.height=aj.original.height}return null})}function G(af,ag){P(ag).addClass("hover");af.one("touchend",function(){P(ag).removeClass("hover")});return null}function M(ag){var af=arguments;return ag.replace(/\{(\d+)\}/g,function(ai,ah){return af[Number(ah)+1]+""})}function ac(){E=O(X.orientation)==90?"landscape":"portrait";P("#jqt").removeClass("portrait landscape").addClass(E);setTimeout(function(){var ag=[],af=function(){var ak=P(this),ai=ak.data("jqt-photo-options"),aj=ak.find(ai.slideSelector),ah=aj.find(ai.imageSelector);F(ak,aj,ai);if(ak.hasClass(ai.playingClass)){ag.push(this);ak.triggerHandler("jqt-photo-pause")}m(ah.filter("[src]"))};P(z).filter(":visible").each(af).end().filter(":not(:visible)").each(af);P(ag).triggerHandler("jqt-photo-play")},10);f={x:X.innerWidth/2,y:X.innerHeight/2};return null}function F(ah,ag,af){table=ah.find(af.tableSelector),position=-ag.filter("."+af.currentClass).prop("offsetLeft");table.data("jqt-photo-position").x=position;table.css({webkitTransitionDuration:"0s",webkitTransform:M(af.transform,position)});return null}function D(){var am=X.innerWidth,af=X.innerHeight,al=P(this),ao=al.width(),ak=al.height(),an,ah,ai=ad(ad(ao,am)/ao,ad(ak,af)/ak),ag=ao*ai,ap=ak*ai,aj=al.data("jqt-photo-info"),aq=aj.galleryOptions;al.parent().removeClass(aq.notLoadedClass);if(!al.is(":visible")){aj.gallery.one("pageAnimationEnd",function(){I(aj.gallery,al,aj.galleryOptions)})}else{if(ag>am||ap>af){ah=-l(((ag-am)/ai)/2);an=-l(((ap-af)/ai)/2);al.css({webkitTransitionDuration:"0s",webkitTransform:M(aq.imageTransform,ai,ah,an)}).addClass(aq.presizedClass);aj=aj[E];aj.current.scale=aj.original.scale=ai;aj.current.left=aj.original.left=ah;aj.current.top=aj.original.top=an;aj.current.width=aj.original.width=ag*ai;aj.current.height=aj.original.height=ap*ai}}return null}P(function(){X.scrollTo(0,0);f={x:X.innerWidth/2,y:X.innerHeight/2};if(R.useDynamicStyleSheet){var af="",ai=w,ah=X.innerHeight>X.innerWidth?"portrait":"landscape",aj=function(ak,al){af+=ak+":"+(P.isFunction(al)?al(ai.variables):al)+";"},ag=function(ak,al){af+=ak+"{";P.each(al,aj);af+="}"};P.each(ai.defaults,ag);P.each(ai[ah],ag);P(k.createElement("style")).prop({type:"text/css",media:"screen"}).html(af).appendTo("head");P(X).one("orientationchange",function(){X.scrollTo(0,0);E=O(X.orientation)==90?"landscape":"portrait";P("#jqt").removeClass("portrait landscape").addClass(E);af="";P.each(ai[E],ag);P(k.createElement("style")).prop({type:"text/css",media:"screen"}).html(af).appendTo("head")})}P(X).bind("orientationchange",ac)})})(jQuery);(function(b){b.fn.scalable=function(c){return this.each(function(){new a(this,c)})};if(b.jQTouch){b.jQTouch.addExtension(function(d){function c(g,f){f.page.find(".scalable").scalable()}b(document.body).bind("pageInserted",c);b(function(){b("body > *").each(function(){c({},{page:b(this)})})});return{}});function a(d,c){var e=this;this.numberOfTouches=2;this.element=d;this.scale(1);this.refresh();this.scaleLessThanOne=false;d.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";d.addEventListener("touchstart",this,false);d.addEventListener("touchmove",this,false);d.addEventListener("touchend",this,false);window.addEventListener("unload",function(){d.removeEventListener("touchstart",e,false);d.removeEventListener("touchmove",e,false);d.removeEventListener("touchend",e,false);this.removeEventListener("unload",arguments.callee,false)},false);if(c){b.extend(this,c)}}a.prototype={handleEvent:function(c){switch(c.type){case"touchstart":return this.onTouchStart(c);break;case"touchmove":return this.onTouchMove(c);break;case"touchend":return this.onTouchEnd(c);break}},scale:function(c){if(c!==undefined){this._scale=c;this.element.style.webkitTransform="scale("+c+")";return}return this._scale},refresh:function(){this.element.style.webkitTransitionDuration="0"},onTouchStart:function(c){if(c.targetTouches.length!=this.numberOfTouches){return}this.refresh();this.moved=false;this.startDistance=Math.sqrt(Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2)+Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2));return false},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}f.preventDefault();this.moved=true;this.refresh();var c=Math.sqrt(Math.pow((f.targetTouches[1].clientX-f.targetTouches[0].clientX),2)+Math.pow((f.targetTouches[1].clientY-f.targetTouches[0].clientY),2)),g=c-this.startDistance,d=(g/this.startDistance)/2;this.scale(this.scale()+(this.scale()*d));this.startDistance=c;return false},onTouchEnd:function(d){var c,f;if(!this.moved){c=d.target;if(c.nodeType==3){c=c.parentNode}f=document.createEvent("MouseEvents");f.initEvent("click",true,true);c.dispatchEvent(f);return}d.preventDefault();d.stopPropagation();if(!this.scaleLessThanOne&&this.scale()<1){this.element.style.webkitTransitionDuration="200ms";this.scale(1)}return false},scaleTo:function(c,d){this.element.style.webkitTransitionDuration=d?d:"300ms";this.scale(c?c:0)}}}})(jQuery);
|
|
43
43
|
/*!*
|
|
44
44
|
*
|
|
45
45
|
* Add support for scrolling vertically and horizontally using jQTouch in Webkit Mobile
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
*
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
|
-
(function(g){if(!"WebKitCSSMatrix" in this){return null}var i,l=this,u=l.document,B=l.Number,m=l.Math,t=("m11" in new WebKitCSSMatrix()),h={attributesToOptions:f,attributes:{defaultDuration:"slidespeed",preventDefault:function(C,D){return g(C).attr("preventdefault")==="false"?false:!!n[D].preventDefault},bounce:function(C,D){return C.attr("bounce")==="false"?false:n[D].bounce},scrollBar:function(C,D){return C.hasClass("with-scrollbar")},useSlides:function(C,D){return g(C).find(n[D].slides.selector).length>0}},ignore:"SELECT,TEXTAREA,BUTTON,INPUT",useSlides:false,slides:{selector:".slide-container",currentClass:"jqt-slide-current",portion:3,easing:2,callback:r},numberOfTouches:1,divider:6,touchEventList:["touchend","touchmove","touchcancel"],bounceSpeed:300,defaultDuration:500,defaultOffset:0,preventDefault:true,maxScrollTime:1000,friction:3,scrollTopOnTouchstart:true,bounce:true,scrollBar:true,scrollBarObject:null,events:{scrollTo:b,reset:A,touchstart:a,touchmove:z,touchend:e,touchcancel:e,webkitTransitionEnd:j},setPosition:d,momentum:p},n={vertical:g.extend({},h,{direction:"vertical",dimension:"height",outerDimension:"outerHeight",matrixProperty:"m42",selector:".vertical-scroll > div",eventProperty:"pageY",tranform:t?"translate3d(0,{0}px,0)":"translate(0,{0}px)",slideProperty:"offsetTop"}),horizontal:g.extend({},h,{direction:"horizontal",dimension:"width",outerDimension:"outerWidth",matrixProperty:"m41",selector:".horizontal-scroll > table",eventProperty:"pageX",tranform:t?"translate3d({0}px,0,0)":"translate({0}px,0)",slideProperty:"offsetLeft"})},o=function(C){return(l.innerHeight-(C.toolbarHeight*2))+"px !important"},s=function(C){return(l.innerHeight-C.toolbarHeight)+"px"},v=function(){return l.innerWidth+"px"},k={variables:{toolbarHeight:46},defaults:{".vertical-scroll":{position:"relative","z-index":1,overflow:"hidden","margin-bottom":"44px",height:s},".vertical-scroll.use-bottom-toolbar":{height:o},".vertical-scroll > div":{margin:"0 auto","padding-bottom":"15px","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",},".vertical-scroll.use-bottom-toolbar":{"margin-bottom":"0px"},".vertical-scroll.use-bottom-toolbar > div":{"padding-bottom":"0px"},".scrollbar":{"-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,0,0,1s","-webkit-border-radius":"2px","pointer-events":"none",opacity:0,background:"rgba(0,0,0,.5)","-webkit-box-shadow":"0 0 2px rgba(255,255,255,.5)",position:"absolute","z-index":10,width:"5px",height:"5px"},".scrollbar.vertical":{top:"1px",right:"1px"},".scrollbar.horizontal":{bottom:"1px",left:"1px"},".horizontal-scroll":{width:v,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:s,"line-height":s},".horizontal-scroll > table":{height:"100%","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",}},portrait:{".portrait .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".portrait .vertical-scroll.use-bottom-toolbar,.portrait .horizontal-scroll.use-bottom-toolbar":{height:o},".portrait .horizontal-scroll":{width:v},".portrait .slide-container":{height:s,width:v}},landscape:{".landscape .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".landscape .vertical-scroll.use-bottom-toolbar,.landscape .horizontal-scroll.use-bottom-toolbar":{height:o},".landscape .horizontal-scroll":{width:v},".landscape .slide-container":{height:s,width:v}}};if(g.jQTouch){g.jQTouch.addExtension(function(D){var E=n;function C(K,J){var H=E.vertical,I=E.horizontal,G=J.page.find(H.selector),F=J.page.find(I.selector);G.verticallyScroll(H.attributesToOptions(G,"vertical",H.attributes));F.horizontallyScroll(I.attributesToOptions(F,"horizontal",I.attributes))}g(u.body).bind("pageInserted",C);g(function(){var F=E.vertical,G=E.horizontal;g(F.selector).each(function(){g(this).verticallyScroll(F.attributesToOptions(g(this),"vertical",F.attributes))});g(G.selector).each(function(){g(this).horizontallyScroll(G.attributesToOptions(g(this),"horizontal",G.attributes))})});return{}})}function f(E,F,C){var D={};g.each(C,function(G,H){if(g.isFunction(H)){D[G]=H(E,F)}else{if(E.attr(H)!=i){D[G]=E.attr(H)}}});return D}g.fn.verticallyScroll=function(C){return this.inertiaScroll("vertical",C)};g.fn.horizontallyScroll=function(C){return this.inertiaScroll("horizontal",C)};g.fn.inertiaScroll=function(D,C){C=g.extend(true,{},n[D],C||{});return this.each(function(){q(this,C)})};g.inertiaScroll={defaults:function(C){if(C!==i){n=g.extend(true,n,C)}return g.extend({},n)},defaultCSS:function(C){if(C!==i){k=g.extend(true,k,C)}return g.extend({},k)}};function q(G,F){var C=g(G).data("jqt-scroll-options",F).css("webkitTransform",w(F.tranform,F.defaultOffset)),E=C.css("webkitTransform"),D=E?new WebKitCSSMatrix(E):{m41:0};g.each(F.events,function(H,I){G.addEventListener(H,I,false)});C.bind("reset",F.events.reset).bind("scrollTo",F.events.scrollTo);F.currentPosition=D[F.matrixProperty];F.parentWidth=C.parent()[F.dimension]();if(F.scrollBar&&F.scrollBar===true&&!F.scrollBarObject){F.scrollBarObject=g.isFunction(F.scrollBar)?F.scrollBar(C.parent(),F.direction):c(C.parent(),F.direction)}return null}function a(C){var G=g(this),L=G.data("jqt-scroll-options"),K=C.touches[0][L.eventProperty],I,E,F=G[L.outerDimension](),J=G.parent()[L.dimension](),H=-(F-J),D=J/L.divider;if(!!L.ignore&&g(C.target).is(L.ignore)||C.targetTouches.length!==L.numberOfTouches){return null}L.parentDimension=J;if(L.scrollTopOnTouchstart){l.scrollTo(0,0)}I=new WebKitCSSMatrix(G.css("webkitTransform"));E=I[L.matrixProperty];G.data("jqt-scroll-current-event",{startLocation:K,currentLocation:K,startPosition:E,lastPosition:E,currentPosition:E,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentDimension:J,endPoint:H,minScroll:!L.bounce?0:D,maxScroll:!L.bounce?H:H-D,end:false});if(L.scrollBarObject){L.scrollBarObject.init(J,F)}L.setPosition(G,L,E,0);if(L.preventDefault){C.preventDefault();return false}else{return true}}function z(D){var I=g(this),K=I.data("jqt-scroll-options"),G=I.data("jqt-scroll-current-event"),E=G.lastMoveTime,H=D.touches[0][K.eventProperty],C=G.startLocation-H,J=G.startPosition-C,F=0;if(J>5){J=(J-5)/K.friction}else{if(J<G.endPoint){J=G.endPoint-((G.endPoint-J)/K.friction)}}G.currentPosition=G.lastPosition=m.floor(J);G.moved=true;G.lastMoveTime=D.timeStamp;G.currentLocation=H;if((G.lastMoveTime-E)>K.maxScrollTime){G.startTime=G.lastMoveTime}if(K.scrollBarObject&&!K.scrollBarObject.visible){K.scrollBarObject.show()}K.setPosition(I,K,G.currentPosition,F);if(K.preventDefault){D.preventDefault();return false}else{return true}}function e(D){var G=g(this),C=G.data("jqt-scroll-options"),E=G.data("jqt-scroll-current-event"),F,H;if(!E.moved){if(C.scrollBarObject){C.scrollBarObject.hide()}F=D.target;if(F.nodeType==3){F=F.parentNode}H=u.createEvent("MouseEvents");H.initEvent("click",true,true);F.dispatchEvent(H);if(C.preventDefault){D.preventDefault();return false}}if(C.useSlides&&g.isFunction(C.slides.callback)){C.slides.callback(G,C,E,D)}else{C.momentum(G,C,E,D)}C.setPosition(G,C,E.currentPosition,E.duration);if(C.preventDefault){D.preventDefault();return false}else{return true}}function j(D){var F=g(this),C=F.data("jqt-scroll-options"),E=F.data("jqt-scroll-current-event");if(E&&!E.end){if(E.currentPosition>0){E.currentPosition=0;C.setPosition(F,C,0,C.bounceSpeed)}else{if(E.currentPosition<E.endPoint){E.currentPosition=E.endPoint;C.setPosition(F,C,E.endPoint,C.bounceSpeed)}else{if(C.scrollBarObject){C.scrollBarObject.hide()}}}E.end=true}else{if(C.scrollBarObject){C.scrollBarObject.hide()}}return null}function p(E,D,G,F){var C=m;duration=C.min(D.maxScrollTime,G.lastMoveTime-G.startTime),distance=G.startPosition-G.currentPosition,velocity=C.abs(distance)/duration,acceleration=duration*velocity*D.friction,p=C.round(distance*velocity),position=C.round(G.currentPosition-p);if(G.currentPosition>0){position=0}else{if(G.currentPosition<G.endPoint){position=G.endPoint}else{if(position>G.minScroll){acceleration=acceleration*C.abs(G.minScroll/position);position=G.minScroll}else{if(position<G.maxScroll){acceleration=acceleration*C.abs(G.maxScroll/position);position=G.maxScroll}}}}G.momentum=C.abs(p);G.currentPosition=position;G.duration=acceleration;return null}function r(F,L,I,D){var E=F.find(L.slides.selector),K=E.filter("."+L.slides.currentClass).eq(0),J,C=I.startPosition-I.currentPosition,G=K[L.dimension]()/L.slides.portion,H;if(!K.length){K=E.eq(0)}J=E.index(K[0]);E.removeClass(L.slides.currentClass);if(I.currentPosition>0){position=0;E.eq(0).addClass(L.slides.currentClass)}else{if(I.currentPosition<I.endPoint){position=I.endPoint;E.eq(E.length-1).addClass(L.slides.currentClass)}else{if(C<-G){position=-E.eq(J>0?J-1:0).addClass(L.slides.currentClass).parent().attr(L.slideProperty)}else{if(C>G){position=-E.eq(J<E.length-1?J+1:E.length-1).addClass(L.slides.currentClass).parent().attr(L.slideProperty)}else{position=-K.addClass(L.slides.currentClass).parent().attr(L.slideProperty)}}}}H=m.abs(I.currentPosition-position)*L.slides.easing;I.momentum=H;I.currentPosition=position;I.duration=H;return null}function A(){var D=g(this),C=D.data("jqt-scroll-options");return C.setPosition(D,C,C.defaultOffset,C.defaultDuration)}function b(D,G,F){var E=g(this),C=E.data("jqt-scroll-options");return C.setPosition(E,C,G!==i?G:(D.detail||C.currentPosition),F!==i?F:C.defaultDuration)}function d(E,D,C,H,F){if(D.scrollBarObject){var G=(E.parent()[D.dimension]()-E[D.dimension]());if(C>0){G+=B(C)}D.scrollBarObject.scrollTo(D.scrollBarObject.maxScroll/G*C,w("{0}ms",H!==i?H:D.defaultDuration))}if(H!==i){E.css("webkitTransitionDuration",w("{0}ms",H))}if(F!==i){E.css("webkitTransitionTimingFunction",F)}D.currentPosition=C||0;return E.css("webkitTransform",w(D.tranform,D.currentPosition))}function w(D){var C=arguments;return D.replace(/\{(\d+)\}/g,function(F,E){return C[B(E)+1]+""})}function c(C,D){if(!(this instanceof c)){return new c(C,D)}this.direction=D;this.bar=g(u.createElement("div")).addClass("scrollbar "+D).appendTo(C)[0]}c.prototype={direction:"vertical",transform:t?"translate3d({0}px,{1}px,0)":"translate({0}px,{1}px)",size:0,maxSize:0,maxScroll:0,visible:false,offset:0,init:function(C,D){this.offset=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=C-8;this.size=m.round(this.maxSize*this.maxSize/D)+this.offset;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-this.offset)+"px"},setPosition:function(C){this.bar.style.webkitTransform=w(this.transform,this.direction=="horizontal"?m.round(C):0,this.direction=="horizontal"?0:m.round(C))},scrollTo:function(D,C){this.bar.style.webkitTransitionDuration=(C||"400ms")+",300ms";this.setPosition(D)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};g(function(){l.scrollTo(0,0);var C="",F=k,E=l.innerHeight>l.innerWidth?"portrait":"landscape",G=function(H,I){C+=H+":"+(g.isFunction(I)?I(F.variables):I)+";"},D=function(H,I){C+=H+"{";g.each(I,G);C+="}"};g.each(F.defaults,D);g.each(F[E],D);g(u.createElement("style")).attr({type:"text/css",media:"screen"}).html(C).appendTo("head");g(l).one("orientationchange",function(){setTimeout(function(){l.scrollTo(0,0);C="";E=l.innerHeight>l.innerWidth?"portrait":"landscape";g.each(F[E],D);g(u.createElement("style")).attr({type:"text/css",media:"screen"}).html(C).appendTo("head")},30)})})})(jQuery);(function(a){a.fn.scrollVertically=function(d){return this.each(function(){new c(this,d)})};a.fn.scrollHorizontally=function(d){return this.each(function(){new b(this,d)})};if(a.jQTouch){a.jQTouch.addExtension(function(e){function d(i,h){var f=h.page.find(".horizontal-scroll > table"),g=h.page.find(".vertical-scroll > div");f.scrollHorizontally({acceleration:Number(f.attr("slidespeed")||500)||null,preventdefault:f.attr("preventdefault")!=="false",startposition:Number(f.attr("position")||0)||0});g.scrollVertically({acceleration:Number(g.attr("slidespeed")||500),preventdefault:g.attr("preventdefault")!=="false",startposition:Number(f.attr("position")||0)||0})}a(document.body).bind("pageInserted",d);a(function(){a("body > *").each(function(){d({},{page:a(this)})})});return{}});function c(e,d){var f=this;this.numberOfTouches=1;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=0.009;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){a.extend(this,d)}}c.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d(0, "+d+"px, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetHeight<this.element.parentNode.clientHeight){this.maxScroll=0}else{this.maxScroll=this.element.parentNode.clientHeight-this.element.offsetHeight}},onTouchStart:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}this.refresh();var d=window.getComputedStyle(this.element).webkitTransform;d=new WebKitCSSMatrix(d).m42;if(d!=this.position()){this.position(d)}this.startY=f.targetTouches[0].clientY;this.scrollStartY=this.position();this.scrollStartTime=f.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientY-this.startY;if(this.position()>0||this.position()<this.maxScroll){d/=2}this.position(this.position()+d);this.startY=f.targetTouches[0].clientY;this.moved=true;if(f.timeStamp-this.scrollStartTime>100){this.scrollStartY=this.position();this.scrollStartTime=f.timeStamp}if(this.preventdefault){return false}},onTouchEnd:function(j){this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.preventdefault){j.preventDefault()}var g,i,k,f,l,d,h;if(this.position()>0||this.position()<this.maxScroll){this.scrollTo(this.position()>0?0:this.maxScroll);return}if(!this.moved){i=j.target;if(i.nodeType==3){i=i.parentNode}k=document.createEvent("MouseEvents");k.initEvent("click",true,true);i.dispatchEvent(k);if(this.preventdefault){return false}}f=this.position()-this.scrollStartY;l=j.timeStamp-this.scrollStartTime;d=(2*f/l)/this.acceleration;h=(this.acceleration/2)*(d*d);if(d<0){d=-d;h=-h}g=this.position()+h;if(g>this.element.parentNode.clientHeight/2){g=this.element.parentNode.clientHeight/2}else{if(g>0){g/=1.5}else{if(g<this.maxScroll-this.element.parentNode.clientHeight/2){g=this.maxScroll-this.element.parentNode.clientHeight/2}else{if(g<this.maxScroll){g=(g-this.maxScroll)/1.5+this.maxScroll}else{d*=6}}}}this.scrollTo(g,Math.round(d)+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(this.position()>0?0:this.maxScroll)},scrollTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:"300ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxScroll){this.element.addEventListener("webkitTransitionEnd",this,false)}}};function b(e,d){var f=this;this.numberOfTouches=1;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=0.009;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){a.extend(this,d)}}b.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d("+d+"px, 0, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetWidth<this.element.parentNode.clientWidth){this.maxScroll=0}else{this.maxScroll=this.element.parentNode.clientWidth-this.element.offsetWidth}},onTouchStart:function(d){if(d.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){d.preventDefault()}this.refresh();this.startX=d.targetTouches[0].clientX;this.scrollStartX=this.position();this.scrollStartTime=d.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientX-this.startX;if(this.position()>0||this.position()<this.maxScroll){d/=2}this.position(this.position()+d);this.startX=f.targetTouches[0].clientX;this.moved=true;if(f.timeStamp-this.scrollStartTime>100){this.scrollStartX=this.position();this.scrollStartTime=f.timeStamp}if(this.preventdefault){return false}},onTouchEnd:function(j){this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.preventdefault){j.preventDefault()}var g,i,k,f,l,d,h;if(!this.moved){i=j.target;if(i.nodeType==3){i=i.parentNode}k=document.createEvent("MouseEvents");k.initEvent("click",true,true);i.dispatchEvent(k);if(this.preventdefault){return false}}f=this.position()-this.scrollStartX;l=j.timeStamp-this.scrollStartTime;d=(2*f/l)/this.acceleration;h=(this.acceleration/2)*(d*d);if(d<0){d=-d;h=-h}g=this.position()+h;if(g>this.element.parentNode.clientWidth/2){g=this.element.parentNode.clientWidth/2}else{if(g<this.maxScroll-this.element.parentNode.clientWidth/2){g=this.maxScroll-this.element.parentNode.clientWidth/2}else{if(g<this.maxScroll){g=(g-this.maxScroll)/1.5+this.maxScroll}else{d*=6}}}this.scrollTo(g,Math.round(d)+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(this.position()>0?0:this.maxScroll)},scrollTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:"300ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxScroll){this.element.addEventListener("webkitTransitionEnd",this,false)}}}}})(jQuery);(function(c){c.fn.slideVertically=function(d){return this.each(function(){new b(this,d)})};c.fn.slideHorizontally=function(d){return this.each(function(){new a(this,d)})};if(c.jQTouch){c.jQTouch.addExtension(function(e){function d(i,h){var f=h.page.find(".horizontal-slide > table"),g=h.page.find(".vertical-slide > div");f.slideHorizontally({acceleration:Number(f.attr("slidespeed")||500)||null,preventdefault:f.attr("preventdefault")!=="false",startposition:Number(f.attr("position")||0)||0});g.slideVertically({acceleration:Number(g.attr("slidespeed")||500),preventdefault:g.attr("preventdefault")!=="false",startposition:Number(f.attr("position")||0)||0})}c(document.body).bind("pageInserted",d);c(function(){c("body > *").each(function(){d({},{page:c(this)})})});return{}});function b(e,d){var f=this;this.numberOfTouches=1;this.acceleration=500;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){c.extend(this,d)}}b.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d(0, "+d+"px, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetHeight<this.element.parentNode.clientHeight){this.maxSlide=0}else{this.maxSlide=this.element.parentNode.clientHeight-this.element.offsetHeight}},onTouchStart:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}this.refresh();var d=window.getComputedStyle(this.element).webkitTransform;d=new WebKitCSSMatrix(d).m42;if(d!=this.position()){this.position(d)}this.startY=f.targetTouches[0].clientY;this.slideStartY=this.position();this.slideStartTime=f.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientY-this.startY;if(this.position()>0||this.position()<this.maxSlide){d/=2}this.position(this.position()+d);this.startY=f.targetTouches[0].clientY;this.moved=true;if(this.preventdefault){return false}},onTouchEnd:function(h){if(this.preventdefault){h.preventDefault()}this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);var d=this.position(),g,i,f;if(d>0||d<this.maxSlide){this.slideTo(d>0?0:this.maxSlide);return}if(!this.moved){g=h.target;if(g.nodeType==3){g=g.parentNode}i=document.createEvent("MouseEvents");i.initEvent("click",true,true);g.dispatchEvent(i);if(this.preventdefault){return false}}if(d>0){f=0}else{if(d<this.maxSlide){f=this.maxSlide}else{f=this.snapTo(this.position(),this.slideStartY<this.position())}}this.slideTo(f,this.acceleration+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.slideTo(this.position()>0?0:this.maxSlide)},slideTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:this.acceleration+"ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxSlide){this.element.addEventListener("webkitTransitionEnd",this,false)}},snapTo:function(f,e){if(f!=0){var j=-f,h=this.element.querySelectorAll(".vertical-slide-snapto"),g=0,d=h.length;for(d=h.length;g<d;++g){if(h[g].offsetTop>=j){return !e?-h[g].offsetTop:-(h[g-1]||h[0]||{offsetTop:f}).offsetTop}}}return f}};function a(e,d){var f=this;this.numberOfTouches=1;this.acceleration=500;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=null;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){c.extend(this,d)}}a.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d("+d+"px, 0, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetWidth<this.element.parentNode.clientWidth){this.maxSlide=0}else{this.maxSlide=this.element.parentNode.clientWidth-this.element.offsetWidth}},onTouchStart:function(d){if(d.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){d.preventDefault()}this.refresh();this.slideStartX=this.startX=d.targetTouches[0].clientX;this.slideStartTime=d.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientX-this.startX;this.position(this.position()+d);this.startX=f.targetTouches[0].clientX;this.moved=true;if(this.preventdefault){return false}},onTouchEnd:function(k){if(this.preventdefault){k.preventDefault()}var h,j,l,i,g,d,f;this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.position()>0||this.position()<this.maxSlide){this.slideTo(this.position()>0?0:this.maxSlide);return}if(!this.moved){j=k.target;if(j.nodeType==3){j=j.parentNode}l=document.createEvent("MouseEvents");l.initEvent("click",true,true);j.dispatchEvent(l);if(this.preventdefault){return false}}h=this.position()+((this.startX-this.slideStartX)/2);if(h>0){h=0}else{if(h<this.maxSlide){h=this.maxSlide}else{h=this.snapTo(this.position(),h>this.position())}}this.slideTo(h,this.acceleration+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.slideTo(this.position()>0?0:this.maxScroll)},slideTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:this.acceleration+"ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxSlide){this.element.addEventListener("webkitTransitionEnd",this,false)}},snapTo:function(f,e){if(f!=0){var j=-f,g=0,h=this.element.querySelectorAll(".horizontal-slide-snapto"),d=h.length;for(;g<d;++g){if(h[g].offsetLeft>=j){return !e?-h[g].offsetLeft:-(h[g-1]||h[0]||{offsetLeft:f}).offsetLeft}}}return f}}}})(jQuery);(function(f){var g,k=this,p=k.document,l={selector:".vertical-scroll > div",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",bounce:function(t){return t.attr("bounce")==="false"?false:l.bounce},scrollBar:function(t){return t.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageY",numberOfTouches:1,touchEventList:["touchend","touchmove","touchcancel"],bounceSpeed:300,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,preventDefault:true,maxScrollTime:1000,friction:3,scrollTopOnTouchstart:true,bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:r,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:s,momentum:n},m=function(t){return(k.innerHeight-(t.toolbarHeight*2))+"px !important"},o=function(t){return(k.innerHeight-t.toolbarHeight)+"px"},h={variables:{toolbarHeight:45},defaults:{".vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o},".vertical-scroll.use-bottom-toolbar":{height:m},".vertical-scroll > div":{margin:"0 auto","padding-bottom":"5px","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":0,},"#jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div":{"padding-bottom":"0px"},".vertical-scroll .scrollbar.vertical":{"-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,1s","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 4, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3",position:"absolute","z-index":10,width:"1px",height:"5px",top:"1px",right:"1px"}},portrait:{".portrait .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o,},".portrait .vertical-scroll.use-bottom-toolbar":{height:m}},landscape:{".landscape .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o,},".landscape .vertical-scroll.use-bottom-toolbar":{height:m}}};if(f.jQTouch){f.jQTouch.addExtension(function(u){function t(z,w){var v=w.page.find(l.selector);v.scrollVertically(l.attributesToOptions(v,l.attributes))}f(p.body).bind("pageInserted",t);f(function(){f(l.selector).each(function(){f(this).scrollVertically(l.attributesToOptions(f(this),l.attributes))})});return{}})}function e(v,t){var u={};f.each(t,function(w,z){if(f.isFunction(z)){u[w]=z(v)}else{if(v.attr(z)!=g){u[w]=v.attr(z)}}});return u}f.fn.scrollVertically=function(t){t=f.extend(true,{},l,t||{});return this.each(function(){j(this,t)})};f.fn.scrollVertically.defaults=function(t){if(t!==g){l=f.extend(true,l,t)}return f.extend({},l)};f.fn.scrollVertically.defaultCSS=function(t){if(t!==g){h=f.extend(true,h,t)}return f.extend({},h)};function j(z,w){var t=f(z).data("jqt-vertical-scroll-options",w).css("webkitTransform",q(w.defaultTransform,w.defaultOffset)),v=t.css("webkitTransform"),u=v?new WebKitCSSMatrix(v):{m41:0};f.each(w.events,function(A,B){if(!A.match(/^touchend|touchcancel|touchmove/)){z.addEventListener(A,B,false)}});w.delegate=function(A){if(w.events[A.type]){return w.events[A.type].call(z,A)}return null};w.currentPosition=u.m41;w.parentWidth=t.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(t.parent(),"vertical",w.scrollBarOptions||{}):b(t.parent(),"vertical",w.scrollBarOptions||{})}return null}function a(t){var w=f(this),D=w.data("jqt-vertical-scroll-options"),B=t.touches[0][D.eventProperty],A,C=w.outerHeight(),v=w.parent().height(),z=-(C-v),u=v/6;D.parentHeight=v;if(D.scrollTopOnTouchstart){k.scrollTo(0,0)}if(!!D.ignoreTags&&f(t.target).is(D.ignoreTags)||t.targetTouches.length!==D.numberOfTouches){return null}A=new WebKitCSSMatrix(w.css("webkitTransform"));w.data("jqt-vertical-scroll-current-event",{startLocation:B,currentLocation:B,startPosition:A.m42,lastPosition:A.m42,currentPosition:A.m42,startTime:t.timeStamp,moved:false,lastMoveTime:t.timeStamp,parentHeight:v,endPoint:z,minScroll:!D.bounce?0:u,maxScroll:!D.bounce?z:z-u,end:false});if(D.scrollBarElement){D.scrollBarElement.init(v,C)}D.setPosition(w,D,A.m42,"0");f.each(D.touchEventList,function(F,E){k.addEventListener(E,D.delegate,false)});if(D.preventDefault){t.preventDefault();return false}else{return true}}function r(u){var B=f(this),D=B.data("jqt-vertical-scroll-options"),z=B.data("jqt-vertical-scroll-current-event"),v=z.lastMoveTime,A=u.touches[0][D.eventProperty],t=z.startLocation-A,C=z.startPosition-t,w=0;if(C>5){C=(C-5)/D.friction}else{if(C<z.endPoint){C=z.endPoint-((z.endPoint-C)/D.friction)}}z.currentPosition=z.lastPosition=Math.floor(C);z.moved=true;z.lastMoveTime=u.timeStamp;z.currentLocation=A;if((z.lastMoveTime-v)>D.maxScrollTime){z.startTime=z.lastMoveTime}if(D.scrollBarElement&&!D.scrollBarElement.visible){D.scrollBarElement.show()}D.setPosition(B,D,z.currentPosition,w);if(D.preventDefault){u.preventDefault();return false}else{return true}}function d(u){var z=f(this),t=z.data("jqt-vertical-scroll-options"),v=z.data("jqt-vertical-scroll-current-event"),w,A;if(!v.moved){if(t.scrollBarElement){t.scrollBarElement.hide()}w=u.target;if(w.nodeType==3){w=w.parentNode}A=p.createEvent("MouseEvents");A.initEvent("click",true,true);w.dispatchEvent(A);if(t.preventDefault){u.preventDefault();return false}}t.momentum(z,t,v,u);t.setPosition(z,t,v.currentPosition,v.duration);f.each(t.touchEventList,function(C,B){k.removeEventListener(B,t.delegate,false)});if(t.preventDefault){u.preventDefault();return false}else{return true}}function i(w){var v=f(this),t=v.data("jqt-vertical-scroll-options"),u=v.data("jqt-vertical-scroll-current-event");if(u&&!u.end){if(u.currentPosition>0){u.currentPosition=0;t.setPosition(v,t,0,t.bounceSpeed)}else{if(u.currentPosition<u.endPoint){u.currentPosition=u.endPoint;t.setPosition(v,t,u.endPoint,t.bounceSpeed)}else{if(t.scrollBarElement){t.scrollBarElement.hide()}}}u.end=true}else{if(t.scrollBarElement){t.scrollBarElement.hide()}}return null}function n(B,E,C,u){var w=Math.min(E.maxScrollTime,C.lastMoveTime-C.startTime),t=C.startPosition-C.currentPosition,z=Math.abs(t)/w,A=w*z*E.friction,v=Math.round(t*z),D=Math.round(C.currentPosition-v);if(C.currentPosition>0){D=0}else{if(C.currentPosition<C.endPoint){D=C.endPoint}else{if(D>C.minScroll){A=A*Math.abs(C.minScroll/D);D=C.minScroll}else{if(D<C.maxScroll){A=A*Math.abs(C.maxScroll/D);D=C.maxScroll}}}}C.momentum=Math.abs(v);C.currentPosition=D;C.duration=A;return null}function s(u,t){return t.setPosition(u,t,0,t.defaultDuration)}function c(w,v,u,A,z){if(v.scrollBarElement){var t=(w.parent().height()-w.height());if(u>0){t+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/t*u,q("{0}ms",A!==g?A:v.defaultDuration))}if(A!==g){w.css("webkitTransitionDuration",q("{0}ms",A))}if(z!==g){w.css("webkitTransitionTimingFunction",z)}v.currentPosition=u||0;return w.css("webkitTransform",q("translate3d(0, {0}px, 0)",v.currentPosition))}function q(u){var t=arguments;return u.replace(/\{(\d+)\}/g,function(w,v){return t[Number(v)+1]+""})}function b(u,v,t){if(!(this instanceof b)){return new b(u,v,t)}this.direction=v;this.bar=f(p.createElement("div")).addClass("scrollbar "+v).appendTo(u)[0]}b.prototype={direction:"vertical",size:0,maxSize:0,maxScroll:0,visible:false,init:function(t,u){var v=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=t-8;this.size=Math.round(this.maxSize*this.maxSize/u)+v;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-v)+"px"},setPosition:function(t){t=this.direction=="horizontal"?"translate3d("+Math.round(t)+"px,0,0)":"translate3d(0,"+Math.round(t)+"px,0)";this.bar.style.webkitTransform=t},scrollTo:function(u,t){this.bar.style.webkitTransitionDuration=(t||"400ms")+",300ms";this.setPosition(u)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){k.scrollTo(0,0);var t="",w=h,v=k.innerHeight>k.innerWidth?"portrait":"landscape",z=function(A,B){t+=A+":"+(f.isFunction(B)?B(w.variables):B)+";"},u=function(A,B){t+=A+"{";f.each(B,z);t+="}"};f.each(w.defaults,u);f.each(w[v],u);f(p.createElement("style")).attr({type:"text/css",media:"screen"}).html(t).appendTo("head");f(k).one("orientationchange",function(){setTimeout(function(){k.scrollTo(0,0);t="";f.each(w[k.innerHeight>k.innerWidth?"portrait":"landscape"],u);f(p.createElement("style")).attr({type:"text/css",media:"screen"}).html(t).appendTo("head")},30)})})})(jQuery);
|
|
60
|
+
(function(g){if(!"WebKitCSSMatrix" in this){return null}var i,l=this,u=l.document,B=l.Number,m=l.Math,t=("m11" in new WebKitCSSMatrix()),h={attributesToOptions:f,attributes:{defaultDuration:"slidespeed",preventDefault:function(C,D){return g(C).attr("preventdefault")==="false"?false:!!n[D].preventDefault},bounce:function(C,D){return C.attr("bounce")==="false"?false:n[D].bounce},scrollBar:function(C,D){return C.hasClass("with-scrollbar")},useSlides:function(C,D){return g(C).find(n[D].slides.selector).length>0}},ignore:"SELECT,TEXTAREA,BUTTON,INPUT",useSlides:false,slides:{selector:".slide-container",currentClass:"jqt-slide-current",portion:3,easing:2,callback:r},numberOfTouches:1,divider:6,touchEventList:["touchend","touchmove","touchcancel"],bounceSpeed:300,defaultDuration:500,defaultOffset:0,preventDefault:true,maxScrollTime:1000,friction:3,scrollTopOnTouchstart:true,bounce:true,scrollBar:true,scrollBarObject:null,events:{scrollTo:b,reset:A,touchstart:a,touchmove:z,touchend:e,touchcancel:e,webkitTransitionEnd:j},setPosition:d,momentum:p},n={vertical:g.extend({},h,{direction:"vertical",dimension:"height",outerDimension:"outerHeight",matrixProperty:"m42",selector:".vertical-scroll > div",eventProperty:"pageY",tranform:t?"translate3d(0,{0}px,0)":"translate(0,{0}px)",slideProperty:"offsetTop"}),horizontal:g.extend({},h,{direction:"horizontal",dimension:"width",outerDimension:"outerWidth",matrixProperty:"m41",selector:".horizontal-scroll > table",eventProperty:"pageX",tranform:t?"translate3d({0}px,0,0)":"translate({0}px,0)",slideProperty:"offsetLeft"})},o=function(C){return(l.innerHeight-(C.toolbarHeight*2))+"px !important"},s=function(C){return(l.innerHeight-C.toolbarHeight)+"px"},v=function(){return l.innerWidth+"px"},k={variables:{toolbarHeight:46},defaults:{".vertical-scroll":{position:"relative","z-index":1,overflow:"hidden","margin-bottom":"44px",height:s},".vertical-scroll.use-bottom-toolbar":{height:o},".vertical-scroll > div":{margin:"0 auto","padding-bottom":"15px","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",},".vertical-scroll.use-bottom-toolbar":{"margin-bottom":"0px"},".vertical-scroll.use-bottom-toolbar > div":{"padding-bottom":"0px"},".scrollbar":{"-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,0,0,1s","-webkit-border-radius":"2px","pointer-events":"none",opacity:0,background:"rgba(0,0,0,.5)","-webkit-box-shadow":"0 0 2px rgba(255,255,255,.5)",position:"absolute","z-index":10,width:"5px",height:"5px"},".scrollbar.vertical":{top:"1px",right:"1px"},".scrollbar.horizontal":{bottom:"1px",left:"1px"},".horizontal-scroll":{width:v,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:s,"line-height":s},".horizontal-scroll > table":{height:"100%","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",}},portrait:{".portrait .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".portrait .vertical-scroll.use-bottom-toolbar,.portrait .horizontal-scroll.use-bottom-toolbar":{height:o},".portrait .horizontal-scroll":{width:v},".portrait .slide-container":{height:s,width:v}},landscape:{".landscape .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".landscape .vertical-scroll.use-bottom-toolbar,.landscape .horizontal-scroll.use-bottom-toolbar":{height:o},".landscape .horizontal-scroll":{width:v},".landscape .slide-container":{height:s,width:v}}};if(g.jQTouch){g.jQTouch.addExtension(function(D){var E=n;function C(K,J){var H=E.vertical,I=E.horizontal,G=J.page.find(H.selector),F=J.page.find(I.selector);G.verticallyScroll(H.attributesToOptions(G,"vertical",H.attributes));F.horizontallyScroll(I.attributesToOptions(F,"horizontal",I.attributes))}g(u.body).bind("pageInserted",C);g(function(){var F=E.vertical,G=E.horizontal;g(F.selector).each(function(){g(this).verticallyScroll(F.attributesToOptions(g(this),"vertical",F.attributes))});g(G.selector).each(function(){g(this).horizontallyScroll(G.attributesToOptions(g(this),"horizontal",G.attributes))})});return{}})}function f(E,F,C){var D={};g.each(C,function(G,H){if(g.isFunction(H)){D[G]=H(E,F)}else{if(E.attr(H)!=i){D[G]=E.prop(H)}}});return D}g.fn.verticallyScroll=function(C){return this.inertiaScroll("vertical",C)};g.fn.horizontallyScroll=function(C){return this.inertiaScroll("horizontal",C)};g.fn.inertiaScroll=function(D,C){C=g.extend(true,{},n[D],C||{});return this.each(function(){q(this,C)})};g.inertiaScroll={defaults:function(C){if(C!==i){n=g.extend(true,n,C)}return g.extend({},n)},defaultCSS:function(C){if(C!==i){k=g.extend(true,k,C)}return g.extend({},k)}};function q(G,F){var C=g(G).data("jqt-scroll-options",F).css("webkitTransform",w(F.tranform,F.defaultOffset)),E=C.css("webkitTransform"),D=E?new WebKitCSSMatrix(E):{m41:0};g.each(F.events,function(H,I){G.addEventListener(H,I,false)});C.bind("reset",F.events.reset).bind("scrollTo",F.events.scrollTo);F.currentPosition=D[F.matrixProperty];F.parentWidth=C.parent()[F.dimension]();if(F.scrollBar&&F.scrollBar===true&&!F.scrollBarObject){F.scrollBarObject=g.isFunction(F.scrollBar)?F.scrollBar(C.parent(),F.direction):c(C.parent(),F.direction)}return null}function a(C){var G=g(this),L=G.data("jqt-scroll-options"),K=C.touches[0][L.eventProperty],I,E,F=G[L.outerDimension](),J=G.parent()[L.dimension](),H=-(F-J),D=J/L.divider;if(!!L.ignore&&g(C.target).is(L.ignore)||C.targetTouches.length!==L.numberOfTouches){return null}L.parentDimension=J;if(L.scrollTopOnTouchstart){l.scrollTo(0,0)}I=new WebKitCSSMatrix(G.css("webkitTransform"));E=I[L.matrixProperty];G.data("jqt-scroll-current-event",{startLocation:K,currentLocation:K,startPosition:E,lastPosition:E,currentPosition:E,startTime:C.timeStamp,moved:false,lastMoveTime:C.timeStamp,parentDimension:J,endPoint:H,minScroll:!L.bounce?0:D,maxScroll:!L.bounce?H:H-D,end:false});if(L.scrollBarObject){L.scrollBarObject.init(J,F)}L.setPosition(G,L,E,0);if(L.preventDefault){C.preventDefault();return false}else{return true}}function z(D){var I=g(this),K=I.data("jqt-scroll-options"),G=I.data("jqt-scroll-current-event"),E=G.lastMoveTime,H=D.touches[0][K.eventProperty],C=G.startLocation-H,J=G.startPosition-C,F=0;if(J>5){J=(J-5)/K.friction}else{if(J<G.endPoint){J=G.endPoint-((G.endPoint-J)/K.friction)}}G.currentPosition=G.lastPosition=m.floor(J);G.moved=true;G.lastMoveTime=D.timeStamp;G.currentLocation=H;if((G.lastMoveTime-E)>K.maxScrollTime){G.startTime=G.lastMoveTime}if(K.scrollBarObject&&!K.scrollBarObject.visible){K.scrollBarObject.show()}K.setPosition(I,K,G.currentPosition,F);if(K.preventDefault){D.preventDefault();return false}else{return true}}function e(D){var G=g(this),C=G.data("jqt-scroll-options"),E=G.data("jqt-scroll-current-event"),F,H;if(!E.moved){if(C.scrollBarObject){C.scrollBarObject.hide()}F=D.target;if(F.nodeType==3){F=F.parentNode}H=u.createEvent("MouseEvents");H.initEvent("click",true,true);F.dispatchEvent(H);if(C.preventDefault){D.preventDefault();return false}}if(C.useSlides&&g.isFunction(C.slides.callback)){C.slides.callback(G,C,E,D)}else{C.momentum(G,C,E,D)}C.setPosition(G,C,E.currentPosition,E.duration);if(C.preventDefault){D.preventDefault();return false}else{return true}}function j(D){var F=g(this),C=F.data("jqt-scroll-options"),E=F.data("jqt-scroll-current-event");if(E&&!E.end){if(E.currentPosition>0){E.currentPosition=0;C.setPosition(F,C,0,C.bounceSpeed)}else{if(E.currentPosition<E.endPoint){E.currentPosition=E.endPoint;C.setPosition(F,C,E.endPoint,C.bounceSpeed)}else{if(C.scrollBarObject){C.scrollBarObject.hide()}}}E.end=true}else{if(C.scrollBarObject){C.scrollBarObject.hide()}}return null}function p(E,D,G,F){var C=m;duration=C.min(D.maxScrollTime,G.lastMoveTime-G.startTime),distance=G.startPosition-G.currentPosition,velocity=C.abs(distance)/duration,acceleration=duration*velocity*D.friction,p=C.round(distance*velocity),position=C.round(G.currentPosition-p);if(G.currentPosition>0){position=0}else{if(G.currentPosition<G.endPoint){position=G.endPoint}else{if(position>G.minScroll){acceleration=acceleration*C.abs(G.minScroll/position);position=G.minScroll}else{if(position<G.maxScroll){acceleration=acceleration*C.abs(G.maxScroll/position);position=G.maxScroll}}}}G.momentum=C.abs(p);G.currentPosition=position;G.duration=acceleration;return null}function r(F,L,I,D){var E=F.find(L.slides.selector),K=E.filter("."+L.slides.currentClass).eq(0),J,C=I.startPosition-I.currentPosition,G=K[L.dimension]()/L.slides.portion,H;if(!K.length){K=E.eq(0)}J=E.index(K[0]);E.removeClass(L.slides.currentClass);if(I.currentPosition>0){position=0;E.eq(0).addClass(L.slides.currentClass)}else{if(I.currentPosition<I.endPoint){position=I.endPoint;E.eq(E.length-1).addClass(L.slides.currentClass)}else{if(C<-G){position=-E.eq(J>0?J-1:0).addClass(L.slides.currentClass).parent().prop(L.slideProperty)}else{if(C>G){position=-E.eq(J<E.length-1?J+1:E.length-1).addClass(L.slides.currentClass).parent().prop(L.slideProperty)}else{position=-K.addClass(L.slides.currentClass).parent().prop(L.slideProperty)}}}}H=m.abs(I.currentPosition-position)*L.slides.easing;I.momentum=H;I.currentPosition=position;I.duration=H;return null}function A(){var D=g(this),C=D.data("jqt-scroll-options");return C.setPosition(D,C,C.defaultOffset,C.defaultDuration)}function b(D,G,F){var E=g(this),C=E.data("jqt-scroll-options");return C.setPosition(E,C,G!==i?G:(D.detail||C.currentPosition),F!==i?F:C.defaultDuration)}function d(E,D,C,H,F){if(D.scrollBarObject){var G=(E.parent()[D.dimension]()-E[D.dimension]());if(C>0){G+=B(C)}D.scrollBarObject.scrollTo(D.scrollBarObject.maxScroll/G*C,w("{0}ms",H!==i?H:D.defaultDuration))}if(H!==i){E.css("webkitTransitionDuration",w("{0}ms",H))}if(F!==i){E.css("webkitTransitionTimingFunction",F)}D.currentPosition=C||0;return E.css("webkitTransform",w(D.tranform,D.currentPosition))}function w(D){var C=arguments;return D.replace(/\{(\d+)\}/g,function(F,E){return C[B(E)+1]+""})}function c(C,D){if(!(this instanceof c)){return new c(C,D)}this.direction=D;this.bar=g(u.createElement("div")).addClass("scrollbar "+D).appendTo(C)[0]}c.prototype={direction:"vertical",transform:t?"translate3d({0}px,{1}px,0)":"translate({0}px,{1}px)",size:0,maxSize:0,maxScroll:0,visible:false,offset:0,init:function(C,D){this.offset=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=C-8;this.size=m.round(this.maxSize*this.maxSize/D)+this.offset;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-this.offset)+"px"},setPosition:function(C){this.bar.style.webkitTransform=w(this.transform,this.direction=="horizontal"?m.round(C):0,this.direction=="horizontal"?0:m.round(C))},scrollTo:function(D,C){this.bar.style.webkitTransitionDuration=(C||"400ms")+",300ms";this.setPosition(D)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};g(function(){l.scrollTo(0,0);var C="",F=k,E=l.innerHeight>l.innerWidth?"portrait":"landscape",G=function(H,I){C+=H+":"+(g.isFunction(I)?I(F.variables):I)+";"},D=function(H,I){C+=H+"{";g.each(I,G);C+="}"};g.each(F.defaults,D);g.each(F[E],D);g(u.createElement("style")).prop({type:"text/css",media:"screen"}).html(C).appendTo("head");g(l).one("orientationchange",function(){setTimeout(function(){l.scrollTo(0,0);C="";E=l.innerHeight>l.innerWidth?"portrait":"landscape";g.each(F[E],D);g(u.createElement("style")).prop({type:"text/css",media:"screen"}).html(C).appendTo("head")},30)})})})(jQuery);(function(a){a.fn.scrollVertically=function(d){return this.each(function(){new c(this,d)})};a.fn.scrollHorizontally=function(d){return this.each(function(){new b(this,d)})};if(a.jQTouch){a.jQTouch.addExtension(function(e){function d(i,h){var f=h.page.find(".horizontal-scroll > table"),g=h.page.find(".vertical-scroll > div");f.scrollHorizontally({acceleration:Number(f.prop("slidespeed")||500)||null,preventdefault:f.attr("preventdefault")!=="false",startposition:Number(f.prop("position")||0)||0});g.scrollVertically({acceleration:Number(g.prop("slidespeed")||500),preventdefault:g.attr("preventdefault")!=="false",startposition:Number(f.prop("position")||0)||0})}a(document.body).bind("pageInserted",d);a(function(){a("body > *").each(function(){d({},{page:a(this)})})});return{}});function c(e,d){var f=this;this.numberOfTouches=1;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=0.009;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){a.extend(this,d)}}c.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d(0, "+d+"px, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetHeight<this.element.parentNode.clientHeight){this.maxScroll=0}else{this.maxScroll=this.element.parentNode.clientHeight-this.element.offsetHeight}},onTouchStart:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}this.refresh();var d=window.getComputedStyle(this.element).webkitTransform;d=new WebKitCSSMatrix(d).m42;if(d!=this.position()){this.position(d)}this.startY=f.targetTouches[0].clientY;this.scrollStartY=this.position();this.scrollStartTime=f.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientY-this.startY;if(this.position()>0||this.position()<this.maxScroll){d/=2}this.position(this.position()+d);this.startY=f.targetTouches[0].clientY;this.moved=true;if(f.timeStamp-this.scrollStartTime>100){this.scrollStartY=this.position();this.scrollStartTime=f.timeStamp}if(this.preventdefault){return false}},onTouchEnd:function(j){this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.preventdefault){j.preventDefault()}var g,i,k,f,l,d,h;if(this.position()>0||this.position()<this.maxScroll){this.scrollTo(this.position()>0?0:this.maxScroll);return}if(!this.moved){i=j.target;if(i.nodeType==3){i=i.parentNode}k=document.createEvent("MouseEvents");k.initEvent("click",true,true);i.dispatchEvent(k);if(this.preventdefault){return false}}f=this.position()-this.scrollStartY;l=j.timeStamp-this.scrollStartTime;d=(2*f/l)/this.acceleration;h=(this.acceleration/2)*(d*d);if(d<0){d=-d;h=-h}g=this.position()+h;if(g>this.element.parentNode.clientHeight/2){g=this.element.parentNode.clientHeight/2}else{if(g>0){g/=1.5}else{if(g<this.maxScroll-this.element.parentNode.clientHeight/2){g=this.maxScroll-this.element.parentNode.clientHeight/2}else{if(g<this.maxScroll){g=(g-this.maxScroll)/1.5+this.maxScroll}else{d*=6}}}}this.scrollTo(g,Math.round(d)+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(this.position()>0?0:this.maxScroll)},scrollTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:"300ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxScroll){this.element.addEventListener("webkitTransitionEnd",this,false)}}};function b(e,d){var f=this;this.numberOfTouches=1;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=0.009;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){a.extend(this,d)}}b.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d("+d+"px, 0, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetWidth<this.element.parentNode.clientWidth){this.maxScroll=0}else{this.maxScroll=this.element.parentNode.clientWidth-this.element.offsetWidth}},onTouchStart:function(d){if(d.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){d.preventDefault()}this.refresh();this.startX=d.targetTouches[0].clientX;this.scrollStartX=this.position();this.scrollStartTime=d.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientX-this.startX;if(this.position()>0||this.position()<this.maxScroll){d/=2}this.position(this.position()+d);this.startX=f.targetTouches[0].clientX;this.moved=true;if(f.timeStamp-this.scrollStartTime>100){this.scrollStartX=this.position();this.scrollStartTime=f.timeStamp}if(this.preventdefault){return false}},onTouchEnd:function(j){this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.preventdefault){j.preventDefault()}var g,i,k,f,l,d,h;if(!this.moved){i=j.target;if(i.nodeType==3){i=i.parentNode}k=document.createEvent("MouseEvents");k.initEvent("click",true,true);i.dispatchEvent(k);if(this.preventdefault){return false}}f=this.position()-this.scrollStartX;l=j.timeStamp-this.scrollStartTime;d=(2*f/l)/this.acceleration;h=(this.acceleration/2)*(d*d);if(d<0){d=-d;h=-h}g=this.position()+h;if(g>this.element.parentNode.clientWidth/2){g=this.element.parentNode.clientWidth/2}else{if(g<this.maxScroll-this.element.parentNode.clientWidth/2){g=this.maxScroll-this.element.parentNode.clientWidth/2}else{if(g<this.maxScroll){g=(g-this.maxScroll)/1.5+this.maxScroll}else{d*=6}}}this.scrollTo(g,Math.round(d)+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.scrollTo(this.position()>0?0:this.maxScroll)},scrollTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:"300ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxScroll){this.element.addEventListener("webkitTransitionEnd",this,false)}}}}})(jQuery);(function(c){c.fn.slideVertically=function(d){return this.each(function(){new b(this,d)})};c.fn.slideHorizontally=function(d){return this.each(function(){new a(this,d)})};if(c.jQTouch){c.jQTouch.addExtension(function(e){function d(i,h){var f=h.page.find(".horizontal-slide > table"),g=h.page.find(".vertical-slide > div");f.slideHorizontally({acceleration:Number(f.prop("slidespeed")||500)||null,preventdefault:f.attr("preventdefault")!=="false",startposition:Number(f.prop("position")||0)||0});g.slideVertically({acceleration:Number(g.prop("slidespeed")||500),preventdefault:g.attr("preventdefault")!=="false",startposition:Number(f.prop("position")||0)||0})}c(document.body).bind("pageInserted",d);c(function(){c("body > *").each(function(){d({},{page:c(this)})})});return{}});function b(e,d){var f=this;this.numberOfTouches=1;this.acceleration=500;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){c.extend(this,d)}}b.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d(0, "+d+"px, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetHeight<this.element.parentNode.clientHeight){this.maxSlide=0}else{this.maxSlide=this.element.parentNode.clientHeight-this.element.offsetHeight}},onTouchStart:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}this.refresh();var d=window.getComputedStyle(this.element).webkitTransform;d=new WebKitCSSMatrix(d).m42;if(d!=this.position()){this.position(d)}this.startY=f.targetTouches[0].clientY;this.slideStartY=this.position();this.slideStartTime=f.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientY-this.startY;if(this.position()>0||this.position()<this.maxSlide){d/=2}this.position(this.position()+d);this.startY=f.targetTouches[0].clientY;this.moved=true;if(this.preventdefault){return false}},onTouchEnd:function(h){if(this.preventdefault){h.preventDefault()}this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);var d=this.position(),g,i,f;if(d>0||d<this.maxSlide){this.slideTo(d>0?0:this.maxSlide);return}if(!this.moved){g=h.target;if(g.nodeType==3){g=g.parentNode}i=document.createEvent("MouseEvents");i.initEvent("click",true,true);g.dispatchEvent(i);if(this.preventdefault){return false}}if(d>0){f=0}else{if(d<this.maxSlide){f=this.maxSlide}else{f=this.snapTo(this.position(),this.slideStartY<this.position())}}this.slideTo(f,this.acceleration+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.slideTo(this.position()>0?0:this.maxSlide)},slideTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:this.acceleration+"ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxSlide){this.element.addEventListener("webkitTransitionEnd",this,false)}},snapTo:function(f,e){if(f!=0){var j=-f,h=this.element.querySelectorAll(".vertical-slide-snapto"),g=0,d=h.length;for(d=h.length;g<d;++g){if(h[g].offsetTop>=j){return !e?-h[g].offsetTop:-(h[g-1]||h[0]||{offsetTop:f}).offsetTop}}}return f}};function a(e,d){var f=this;this.numberOfTouches=1;this.acceleration=500;this.preventdefault=true;this.element=e;this.position(d.startposition||0);this.refresh();e.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";this.acceleration=null;e.addEventListener("touchstart",this,false);window.addEventListener("unload",function(){e.removeEventListener("touchstart",f,false);window.removeEventListener("unload",arguments.callee,false)},false);if(d){c.extend(this,d)}}a.prototype={handleEvent:function(d){switch(d.type){case"touchstart":this.onTouchStart(d);break;case"touchmove":this.onTouchMove(d);break;case"touchend":this.onTouchEnd(d);break;case"webkitTransitionEnd":this.onTransitionEnd(d);break}},position:function(d){if(d!==undefined){this._position=d;this.element.style.webkitTransform="translate3d("+d+"px, 0, 0)";return}return this._position},refresh:function(){this.element.style.webkitTransitionDuration="0";if(this.element.offsetWidth<this.element.parentNode.clientWidth){this.maxSlide=0}else{this.maxSlide=this.element.parentNode.clientWidth-this.element.offsetWidth}},onTouchStart:function(d){if(d.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){d.preventDefault()}this.refresh();this.slideStartX=this.startX=d.targetTouches[0].clientX;this.slideStartTime=d.timeStamp;this.moved=false;this.element.addEventListener("touchmove",this,false);this.element.addEventListener("touchend",this,false);if(this.preventdefault){return false}},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}if(this.preventdefault){f.preventDefault()}var d=f.targetTouches[0].clientX-this.startX;this.position(this.position()+d);this.startX=f.targetTouches[0].clientX;this.moved=true;if(this.preventdefault){return false}},onTouchEnd:function(k){if(this.preventdefault){k.preventDefault()}var h,j,l,i,g,d,f;this.element.removeEventListener("touchmove",this,false);this.element.removeEventListener("touchend",this,false);if(this.position()>0||this.position()<this.maxSlide){this.slideTo(this.position()>0?0:this.maxSlide);return}if(!this.moved){j=k.target;if(j.nodeType==3){j=j.parentNode}l=document.createEvent("MouseEvents");l.initEvent("click",true,true);j.dispatchEvent(l);if(this.preventdefault){return false}}h=this.position()+((this.startX-this.slideStartX)/2);if(h>0){h=0}else{if(h<this.maxSlide){h=this.maxSlide}else{h=this.snapTo(this.position(),h>this.position())}}this.slideTo(h,this.acceleration+"ms");if(this.preventdefault){return false}},onTransitionEnd:function(){this.element.removeEventListener("webkitTransitionEnd",this,false);this.slideTo(this.position()>0?0:this.maxScroll)},slideTo:function(d,e){this.element.style.webkitTransitionDuration=e?e:this.acceleration+"ms";this.position(d?d:0);if(this.position()>0||this.position()<this.maxSlide){this.element.addEventListener("webkitTransitionEnd",this,false)}},snapTo:function(f,e){if(f!=0){var j=-f,g=0,h=this.element.querySelectorAll(".horizontal-slide-snapto"),d=h.length;for(;g<d;++g){if(h[g].offsetLeft>=j){return !e?-h[g].offsetLeft:-(h[g-1]||h[0]||{offsetLeft:f}).offsetLeft}}}return f}}}})(jQuery);(function(f){var g,k=this,p=k.document,l={selector:".vertical-scroll > div",attributesToOptions:e,attributes:{defaultDuration:"slidespeed",preventDefault:"preventdefault",bounce:function(t){return t.attr("bounce")==="false"?false:l.bounce},scrollBar:function(t){return t.hasClass("with-scrollbar")}},ignoreTags:"SELECT,TEXTAREA,BUTTON,INPUT",eventProperty:"pageY",numberOfTouches:1,touchEventList:["touchend","touchmove","touchcancel"],bounceSpeed:300,defaultDuration:500,defaultTransform:"translate3d({0}px,0,0)",defaultOffset:0,preventDefault:true,maxScrollTime:1000,friction:3,scrollTopOnTouchstart:true,bounce:true,scrollBar:true,scrollBarElement:null,scrollBarOptions:{},events:{touchstart:a,touchmove:r,touchend:d,touchcancel:d,webkitTransitionEnd:i,},setPosition:c,reset:s,momentum:n},m=function(t){return(k.innerHeight-(t.toolbarHeight*2))+"px !important"},o=function(t){return(k.innerHeight-t.toolbarHeight)+"px"},h={variables:{toolbarHeight:45},defaults:{".vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o},".vertical-scroll.use-bottom-toolbar":{height:m},".vertical-scroll > div":{margin:"0 auto","padding-bottom":"5px","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":0,},"#jqt.fullscreen .vertical-scroll.use-bottom-toolbar > div":{"padding-bottom":"0px"},".vertical-scroll .scrollbar.vertical":{"-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,1s","-webkit-border-radius":"4px","pointer-events":"none",opacity:0,"-webkit-border-image":"-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 4, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 3",position:"absolute","z-index":10,width:"1px",height:"5px",top:"1px",right:"1px"}},portrait:{".portrait .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o,},".portrait .vertical-scroll.use-bottom-toolbar":{height:m}},landscape:{".landscape .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:o,},".landscape .vertical-scroll.use-bottom-toolbar":{height:m}}};if(f.jQTouch){f.jQTouch.addExtension(function(u){function t(z,w){var v=w.page.find(l.selector);v.scrollVertically(l.attributesToOptions(v,l.attributes))}f(p.body).bind("pageInserted",t);f(function(){f(l.selector).each(function(){f(this).scrollVertically(l.attributesToOptions(f(this),l.attributes))})});return{}})}function e(v,t){var u={};f.each(t,function(w,z){if(f.isFunction(z)){u[w]=z(v)}else{if(v.attr(z)!=g){u[w]=v.prop(z)}}});return u}f.fn.scrollVertically=function(t){t=f.extend(true,{},l,t||{});return this.each(function(){j(this,t)})};f.fn.scrollVertically.defaults=function(t){if(t!==g){l=f.extend(true,l,t)}return f.extend({},l)};f.fn.scrollVertically.defaultCSS=function(t){if(t!==g){h=f.extend(true,h,t)}return f.extend({},h)};function j(z,w){var t=f(z).data("jqt-vertical-scroll-options",w).css("webkitTransform",q(w.defaultTransform,w.defaultOffset)),v=t.css("webkitTransform"),u=v?new WebKitCSSMatrix(v):{m41:0};f.each(w.events,function(A,B){if(!A.match(/^touchend|touchcancel|touchmove/)){z.addEventListener(A,B,false)}});w.delegate=function(A){if(w.events[A.type]){return w.events[A.type].call(z,A)}return null};w.currentPosition=u.m41;w.parentWidth=t.parent().width();if(w.scrollBar&&w.scrollBar===true&&!w.scrollBarElement){w.scrollBarElement=f.isFunction(w.scrollBar)?w.scrollBar(t.parent(),"vertical",w.scrollBarOptions||{}):b(t.parent(),"vertical",w.scrollBarOptions||{})}return null}function a(t){var w=f(this),D=w.data("jqt-vertical-scroll-options"),B=t.touches[0][D.eventProperty],A,C=w.outerHeight(),v=w.parent().height(),z=-(C-v),u=v/6;D.parentHeight=v;if(D.scrollTopOnTouchstart){k.scrollTo(0,0)}if(!!D.ignoreTags&&f(t.target).is(D.ignoreTags)||t.targetTouches.length!==D.numberOfTouches){return null}A=new WebKitCSSMatrix(w.css("webkitTransform"));w.data("jqt-vertical-scroll-current-event",{startLocation:B,currentLocation:B,startPosition:A.m42,lastPosition:A.m42,currentPosition:A.m42,startTime:t.timeStamp,moved:false,lastMoveTime:t.timeStamp,parentHeight:v,endPoint:z,minScroll:!D.bounce?0:u,maxScroll:!D.bounce?z:z-u,end:false});if(D.scrollBarElement){D.scrollBarElement.init(v,C)}D.setPosition(w,D,A.m42,"0");f.each(D.touchEventList,function(F,E){k.addEventListener(E,D.delegate,false)});if(D.preventDefault){t.preventDefault();return false}else{return true}}function r(u){var B=f(this),D=B.data("jqt-vertical-scroll-options"),z=B.data("jqt-vertical-scroll-current-event"),v=z.lastMoveTime,A=u.touches[0][D.eventProperty],t=z.startLocation-A,C=z.startPosition-t,w=0;if(C>5){C=(C-5)/D.friction}else{if(C<z.endPoint){C=z.endPoint-((z.endPoint-C)/D.friction)}}z.currentPosition=z.lastPosition=Math.floor(C);z.moved=true;z.lastMoveTime=u.timeStamp;z.currentLocation=A;if((z.lastMoveTime-v)>D.maxScrollTime){z.startTime=z.lastMoveTime}if(D.scrollBarElement&&!D.scrollBarElement.visible){D.scrollBarElement.show()}D.setPosition(B,D,z.currentPosition,w);if(D.preventDefault){u.preventDefault();return false}else{return true}}function d(u){var z=f(this),t=z.data("jqt-vertical-scroll-options"),v=z.data("jqt-vertical-scroll-current-event"),w,A;if(!v.moved){if(t.scrollBarElement){t.scrollBarElement.hide()}w=u.target;if(w.nodeType==3){w=w.parentNode}A=p.createEvent("MouseEvents");A.initEvent("click",true,true);w.dispatchEvent(A);if(t.preventDefault){u.preventDefault();return false}}t.momentum(z,t,v,u);t.setPosition(z,t,v.currentPosition,v.duration);f.each(t.touchEventList,function(C,B){k.removeEventListener(B,t.delegate,false)});if(t.preventDefault){u.preventDefault();return false}else{return true}}function i(w){var v=f(this),t=v.data("jqt-vertical-scroll-options"),u=v.data("jqt-vertical-scroll-current-event");if(u&&!u.end){if(u.currentPosition>0){u.currentPosition=0;t.setPosition(v,t,0,t.bounceSpeed)}else{if(u.currentPosition<u.endPoint){u.currentPosition=u.endPoint;t.setPosition(v,t,u.endPoint,t.bounceSpeed)}else{if(t.scrollBarElement){t.scrollBarElement.hide()}}}u.end=true}else{if(t.scrollBarElement){t.scrollBarElement.hide()}}return null}function n(B,E,C,u){var w=Math.min(E.maxScrollTime,C.lastMoveTime-C.startTime),t=C.startPosition-C.currentPosition,z=Math.abs(t)/w,A=w*z*E.friction,v=Math.round(t*z),D=Math.round(C.currentPosition-v);if(C.currentPosition>0){D=0}else{if(C.currentPosition<C.endPoint){D=C.endPoint}else{if(D>C.minScroll){A=A*Math.abs(C.minScroll/D);D=C.minScroll}else{if(D<C.maxScroll){A=A*Math.abs(C.maxScroll/D);D=C.maxScroll}}}}C.momentum=Math.abs(v);C.currentPosition=D;C.duration=A;return null}function s(u,t){return t.setPosition(u,t,0,t.defaultDuration)}function c(w,v,u,A,z){if(v.scrollBarElement){var t=(w.parent().height()-w.height());if(u>0){t+=Number(u)}v.scrollBarElement.scrollTo(v.scrollBarElement.maxScroll/t*u,q("{0}ms",A!==g?A:v.defaultDuration))}if(A!==g){w.css("webkitTransitionDuration",q("{0}ms",A))}if(z!==g){w.css("webkitTransitionTimingFunction",z)}v.currentPosition=u||0;return w.css("webkitTransform",q("translate3d(0, {0}px, 0)",v.currentPosition))}function q(u){var t=arguments;return u.replace(/\{(\d+)\}/g,function(w,v){return t[Number(v)+1]+""})}function b(u,v,t){if(!(this instanceof b)){return new b(u,v,t)}this.direction=v;this.bar=f(p.createElement("div")).addClass("scrollbar "+v).appendTo(u)[0]}b.prototype={direction:"vertical",size:0,maxSize:0,maxScroll:0,visible:false,init:function(t,u){var v=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=t-8;this.size=Math.round(this.maxSize*this.maxSize/u)+v;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-v)+"px"},setPosition:function(t){t=this.direction=="horizontal"?"translate3d("+Math.round(t)+"px,0,0)":"translate3d(0,"+Math.round(t)+"px,0)";this.bar.style.webkitTransform=t},scrollTo:function(u,t){this.bar.style.webkitTransitionDuration=(t||"400ms")+",300ms";this.setPosition(u)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};f(function(){k.scrollTo(0,0);var t="",w=h,v=k.innerHeight>k.innerWidth?"portrait":"landscape",z=function(A,B){t+=A+":"+(f.isFunction(B)?B(w.variables):B)+";"},u=function(A,B){t+=A+"{";f.each(B,z);t+="}"};f.each(w.defaults,u);f.each(w[v],u);f(p.createElement("style")).prop({type:"text/css",media:"screen"}).html(t).appendTo("head");f(k).one("orientationchange",function(){setTimeout(function(){k.scrollTo(0,0);t="";f.each(w[k.innerHeight>k.innerWidth?"portrait":"landscape"],u);f(p.createElement("style")).prop({type:"text/css",media:"screen"}).html(t).appendTo("head")},30)})})})(jQuery);
|
|
@@ -129,7 +129,7 @@ body {
|
|
|
129
129
|
overflow: hidden;
|
|
130
130
|
&.arrow {
|
|
131
131
|
background-color: #4c4d4e !important;
|
|
132
|
-
background-image: image_url("jquery/touch/default/chevron.png")
|
|
132
|
+
background-image: image_url("jquery/touch/default/chevron.png"), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
|
|
133
133
|
background-position: right center !important;
|
|
134
134
|
background-repeat: no-repeat !important;
|
|
135
135
|
a {
|
|
@@ -378,7 +378,7 @@ body {
|
|
|
378
378
|
margin-bottom: -1px;
|
|
379
379
|
&.arrow {
|
|
380
380
|
background-color: #404142 !important;
|
|
381
|
-
background-image: image_url("jquery/touch/default/chevron.png");
|
|
381
|
+
background-image: image_url("jquery/touch/default/chevron.png"), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1e1f21), to(#272729));
|
|
382
382
|
background-position: right center;
|
|
383
383
|
background-repeat: no-repeat; }
|
|
384
384
|
&.sep {
|
|
@@ -94,7 +94,7 @@ body {
|
|
|
94
94
|
text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0; }
|
|
95
95
|
.whiteButton.active, .grayButton.active, .redButton.active, .blueButton.active, .greenButton.active, .whiteButton:active, .grayButton:active, .redButton:active, .blueButton:active, .greenButton:active {
|
|
96
96
|
-webkit-border-image: image_url("jquery/touch/jqt/activeButton.png") 0 12 0 12;
|
|
97
|
-
color:
|
|
97
|
+
color: #000000 !important; }
|
|
98
98
|
.whiteButton {
|
|
99
99
|
-webkit-border-image: image_url("jquery/touch/jqt/whiteButton.png") 0 12 0 12; }
|
|
100
100
|
.grayButton {
|
|
@@ -390,7 +390,7 @@ body {
|
|
|
390
390
|
margin-bottom: -1px;
|
|
391
391
|
&.arrow {
|
|
392
392
|
background-color: #404142 !important;
|
|
393
|
-
background-image: image_url("jquery/touch/jqt/chevron.png");
|
|
393
|
+
background-image: image_url("jquery/touch/jqt/chevron.png"), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1e1f21), to(#272729));
|
|
394
394
|
background-position: right center;
|
|
395
395
|
background-repeat: no-repeat; }
|
|
396
396
|
&.sep {
|
|
@@ -55,6 +55,11 @@ body {
|
|
|
55
55
|
-webkit-animation-name: fadeIn; }
|
|
56
56
|
&.out {
|
|
57
57
|
-webkit-animation-name: fadeOut; } }
|
|
58
|
+
.dissolve {
|
|
59
|
+
&.in {
|
|
60
|
+
-webkit-animation-name: dissolveIn; }
|
|
61
|
+
&.out {
|
|
62
|
+
-webkit-animation-name: dissolveOut; } }
|
|
58
63
|
.pop {
|
|
59
64
|
&.in {
|
|
60
65
|
-webkit-animation-name: popIn; }
|
|
@@ -145,6 +150,22 @@ body {
|
|
|
145
150
|
opacity: 0; } }
|
|
146
151
|
|
|
147
152
|
|
|
153
|
+
/* Disolve */
|
|
154
|
+
|
|
155
|
+
@-webkit-keyframes dissolveIn {
|
|
156
|
+
0% {
|
|
157
|
+
opacity: 0; }
|
|
158
|
+
100% {
|
|
159
|
+
opacity: 1; } }
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@-webkit-keyframes dissolveOut {
|
|
163
|
+
0% {
|
|
164
|
+
opacity: 1; }
|
|
165
|
+
100% {
|
|
166
|
+
opacity: 0; } }
|
|
167
|
+
|
|
168
|
+
|
|
148
169
|
/* Pop */
|
|
149
170
|
|
|
150
171
|
@-webkit-keyframes popIn {
|
|
@@ -233,7 +254,7 @@ body {
|
|
|
233
254
|
|
|
234
255
|
@-webkit-keyframes flipLeftIn {
|
|
235
256
|
0% {
|
|
236
|
-
-webkit-transform: rotateY(
|
|
257
|
+
-webkit-transform: rotateY(180deg) scale(0.8); }
|
|
237
258
|
100% {
|
|
238
259
|
-webkit-transform: rotateY(0deg) scale(1); } }
|
|
239
260
|
|
|
@@ -242,14 +263,14 @@ body {
|
|
|
242
263
|
0% {
|
|
243
264
|
-webkit-transform: rotateY(0deg) scale(1); }
|
|
244
265
|
100% {
|
|
245
|
-
-webkit-transform: rotateY(180deg) scale(0.8); } }
|
|
266
|
+
-webkit-transform: rotateY(-180deg) scale(0.8); } }
|
|
246
267
|
|
|
247
268
|
|
|
248
269
|
/* Flip Right */
|
|
249
270
|
|
|
250
271
|
@-webkit-keyframes flipRightIn {
|
|
251
272
|
0% {
|
|
252
|
-
-webkit-transform: rotateY(180deg) scale(0.8); }
|
|
273
|
+
-webkit-transform: rotateY(-180deg) scale(0.8); }
|
|
253
274
|
100% {
|
|
254
275
|
-webkit-transform: rotateY(0deg) scale(1); } }
|
|
255
276
|
|
|
@@ -258,7 +279,7 @@ body {
|
|
|
258
279
|
0% {
|
|
259
280
|
-webkit-transform: rotateY(0deg) scale(1); }
|
|
260
281
|
100% {
|
|
261
|
-
-webkit-transform: rotateY(
|
|
282
|
+
-webkit-transform: rotateY(180deg) scale(0.8); } }
|
|
262
283
|
|
|
263
284
|
|
|
264
285
|
/* Swap Right */
|
|
@@ -527,7 +548,7 @@ body {
|
|
|
527
548
|
background: #ddd; }
|
|
528
549
|
li {
|
|
529
550
|
border-top: 0px solid black !important;
|
|
530
|
-
color:
|
|
551
|
+
color: #000000 !important;
|
|
531
552
|
padding: 0 8px;
|
|
532
553
|
height: 44px;
|
|
533
554
|
overflow: hidden;
|
|
@@ -10,239 +10,239 @@
|
|
|
10
10
|
(function(amplify, undefined) {
|
|
11
11
|
|
|
12
12
|
// MooTools Compatibility
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
JSON.stringify = JSON.stringify || JSON.encode;
|
|
14
|
+
JSON.parse = JSON.parse || JSON.decode;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
store.types[ type ] = storage;
|
|
32
|
-
store[ type ] = function(key, value, options) {
|
|
33
|
-
options = options || {};
|
|
34
|
-
options.type = type;
|
|
35
|
-
return store(key, value, options);
|
|
36
|
-
};
|
|
16
|
+
var store = amplify.store = function(key, value, options, type) {
|
|
17
|
+
var type = store.type;
|
|
18
|
+
if (options && options.type && options.type in store.types) {
|
|
19
|
+
type = options.type;
|
|
20
|
+
}
|
|
21
|
+
return store.types[ type ](key, value, options || {});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
store.types = {};
|
|
25
|
+
store.type = null;
|
|
26
|
+
store.addType = function(type, storage) {
|
|
27
|
+
if (!store.type) {
|
|
28
|
+
store.type = type;
|
|
37
29
|
}
|
|
38
|
-
store.error = function() {
|
|
39
|
-
return "amplify.store quota exceeded";
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
function createSimpleStorage(storageType, storage) {
|
|
43
|
-
var values = storage.__amplify__ ? JSON.parse(storage.__amplify__) : {};
|
|
44
|
-
store.addType(storageType, function(key, value, options) {
|
|
45
|
-
var ret = value,
|
|
46
|
-
now = (new Date()).getTime(),
|
|
47
|
-
storedValue,
|
|
48
|
-
parsed;
|
|
49
|
-
|
|
50
|
-
if (!key) {
|
|
51
|
-
ret = {};
|
|
52
|
-
for (key in values) {
|
|
53
|
-
storedValue = storage[ key ];
|
|
54
|
-
parsed = storedValue ? JSON.parse(storedValue) : { expires: -1 };
|
|
55
|
-
if (parsed.expires && parsed.expires <= now) {
|
|
56
|
-
delete storage[ key ];
|
|
57
|
-
delete values[ key ];
|
|
58
|
-
} else {
|
|
59
|
-
ret[ key.replace(/^__amplify__/, "") ] = parsed.data;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
storage.__amplify__ = JSON.stringify(values);
|
|
63
|
-
return ret;
|
|
64
|
-
}
|
|
65
30
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
31
|
+
store.types[ type ] = storage;
|
|
32
|
+
store[ type ] = function(key, value, options) {
|
|
33
|
+
options = options || {};
|
|
34
|
+
options.type = type;
|
|
35
|
+
return store(key, value, options);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
store.error = function() {
|
|
39
|
+
return "amplify.store quota exceeded";
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
function createSimpleStorage(storageType, storage) {
|
|
43
|
+
var values = storage.__amplify__ ? JSON.parse(storage.__amplify__) : {};
|
|
44
|
+
store.addType(storageType, function(key, value, options) {
|
|
45
|
+
var ret = value,
|
|
46
|
+
now = (new Date()).getTime(),
|
|
47
|
+
storedValue,
|
|
48
|
+
parsed;
|
|
49
|
+
|
|
50
|
+
if (!key) {
|
|
51
|
+
ret = {};
|
|
52
|
+
for (key in values) {
|
|
53
|
+
storedValue = storage[ key ];
|
|
54
|
+
parsed = storedValue ? JSON.parse(storedValue) : { expires: -1 };
|
|
55
|
+
if (parsed.expires && parsed.expires <= now) {
|
|
56
|
+
delete storage[ key ];
|
|
57
|
+
delete values[ key ];
|
|
58
|
+
} else {
|
|
59
|
+
ret[ key.replace(/^__amplify__/, "") ] = parsed.data;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
storage.__amplify__ = JSON.stringify(values);
|
|
63
|
+
return ret;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// protect against overwriting built-in properties
|
|
67
|
+
key = "__amplify__" + key;
|
|
68
|
+
|
|
69
|
+
if (value === undefined) {
|
|
70
|
+
if (values[ key ]) {
|
|
71
|
+
storedValue = storage[ key ];
|
|
72
|
+
parsed = storedValue ? JSON.parse(storedValue) : { expires: -1 };
|
|
73
|
+
if (parsed.expires && parsed.expires <= now) {
|
|
74
|
+
delete storage[ key ];
|
|
75
|
+
delete values[ key ];
|
|
76
|
+
} else {
|
|
77
|
+
return parsed.data;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
if (value === null) {
|
|
82
|
+
delete storage[ key ];
|
|
83
|
+
delete values[ key ];
|
|
84
|
+
} else {
|
|
85
|
+
parsed = JSON.stringify({
|
|
86
|
+
data: value,
|
|
87
|
+
expires: options.expires ? now + options.expires : null
|
|
88
|
+
});
|
|
89
|
+
try {
|
|
90
|
+
storage[ key ] = parsed;
|
|
91
|
+
values[ key ] = true;
|
|
92
|
+
// quota exceeded
|
|
93
|
+
} catch(error) {
|
|
94
|
+
// expire old data and try again
|
|
95
|
+
store[ storageType ]();
|
|
96
|
+
try {
|
|
97
|
+
storage[ key ] = parsed;
|
|
98
|
+
values[ key ] = true;
|
|
99
|
+
} catch(error) {
|
|
100
|
+
throw store.error();
|
|
104
101
|
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
storage.__amplify__ = JSON.stringify(values);
|
|
107
|
+
return ret;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
110
|
|
|
111
111
|
// localStorage + sessionStorage
|
|
112
112
|
// IE 8+, Firefox 3.5+, Safari 4+, Chrome 4+, Opera 10.5+, iPhone 2+, Android 2+
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
113
|
+
for (var webStorageType in { localStorage: 1, sessionStorage: 1 }) {
|
|
114
|
+
// try/catch for file protocol in Firefox
|
|
115
|
+
try {
|
|
116
|
+
if (window[ webStorageType ].getItem) {
|
|
117
|
+
createSimpleStorage(webStorageType, window[ webStorageType ]);
|
|
118
|
+
}
|
|
119
|
+
} catch(e) {
|
|
121
120
|
}
|
|
121
|
+
}
|
|
122
122
|
|
|
123
123
|
// globalStorage
|
|
124
124
|
// non-standard: Firefox 2+
|
|
125
125
|
// https://developer.mozilla.org/en/dom/storage#globalStorage
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
126
|
+
if (window.globalStorage) {
|
|
127
|
+
createSimpleStorage("globalStorage",
|
|
128
|
+
window.globalStorage[ window.location.hostname ]);
|
|
129
|
+
// Firefox 2.0 and 3.0 have sessionStorage and globalStorage
|
|
130
|
+
// make sure we defualt to globalStorage
|
|
131
|
+
// but don't default to globalStorage in 3.5+ which also has localStorage
|
|
132
|
+
if (store.type === "sessionStorage") {
|
|
133
|
+
store.type = "globalStorage";
|
|
135
134
|
}
|
|
135
|
+
}
|
|
136
136
|
|
|
137
137
|
// userData
|
|
138
138
|
// non-standard: IE 5+
|
|
139
139
|
// http://msdn.microsoft.com/en-us/library/ms531424(v=vs.85).aspx
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
});
|
|
204
|
-
div.setAttribute(key, parsed);
|
|
205
|
-
attrs[ key ] = true;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
div.setAttribute(attrKey, JSON.stringify(attrs));
|
|
210
|
-
try {
|
|
211
|
-
div.save(attrKey);
|
|
212
|
-
// quota exceeded
|
|
213
|
-
} catch (error) {
|
|
214
|
-
// roll the value back to the previous value
|
|
215
|
-
if (prevValue === null) {
|
|
216
|
-
div.removeAttribute(key);
|
|
217
|
-
delete attrs[ key ];
|
|
218
|
-
} else {
|
|
219
|
-
div.setAttribute(key, prevValue);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// expire old data and try again
|
|
223
|
-
store.userData();
|
|
224
|
-
try {
|
|
225
|
-
div.setAttribute(key, parsed);
|
|
226
|
-
attrs[ key ] = true;
|
|
227
|
-
div.save(attrKey);
|
|
228
|
-
} catch (error) {
|
|
229
|
-
// roll the value back to the previous value
|
|
230
|
-
if (prevValue === null) {
|
|
231
|
-
div.removeAttribute(key);
|
|
232
|
-
delete attrs[ key ];
|
|
233
|
-
} else {
|
|
234
|
-
div.setAttribute(key, prevValue);
|
|
235
|
-
}
|
|
236
|
-
throw store.error();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return ret;
|
|
140
|
+
(function() {
|
|
141
|
+
// append to html instead of body so we can do this from the head
|
|
142
|
+
var div = document.createElement("div"),
|
|
143
|
+
attrKey = "amplify",
|
|
144
|
+
attrs;
|
|
145
|
+
div.style.display = "none";
|
|
146
|
+
document.getElementsByTagName("head")[ 0 ].appendChild(div);
|
|
147
|
+
if (div.addBehavior) {
|
|
148
|
+
div.addBehavior("#default#userdata");
|
|
149
|
+
div.load(attrKey);
|
|
150
|
+
attrs = div.getAttribute(attrKey) ? JSON.parse(div.getAttribute(attrKey)) : {};
|
|
151
|
+
|
|
152
|
+
store.addType("userData", function(key, value, options) {
|
|
153
|
+
var ret = value,
|
|
154
|
+
now = (new Date()).getTime(),
|
|
155
|
+
attr,
|
|
156
|
+
parsed,
|
|
157
|
+
prevValue;
|
|
158
|
+
|
|
159
|
+
if (!key) {
|
|
160
|
+
ret = {};
|
|
161
|
+
for (key in attrs) {
|
|
162
|
+
attr = div.getAttribute(key);
|
|
163
|
+
parsed = attr ? JSON.parse(attr) : { expires: -1 };
|
|
164
|
+
if (parsed.expires && parsed.expires <= now) {
|
|
165
|
+
div.removeAttribute(key);
|
|
166
|
+
delete attrs[ key ];
|
|
167
|
+
} else {
|
|
168
|
+
ret[ key ] = parsed.data;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
div.setAttribute(attrKey, JSON.stringify(attrs));
|
|
172
|
+
div.save(attrKey);
|
|
173
|
+
return ret;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// convert invalid characters to dashes
|
|
177
|
+
// http://www.w3.org/TR/REC-xml/#NT-Name
|
|
178
|
+
// simplified to assume the starting character is valid
|
|
179
|
+
// also removed colon as it is invalid in HTML attribute names
|
|
180
|
+
key = key.replace(/[^-._0-9A-Za-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u37f-\u1fff\u200c-\u200d\u203f\u2040\u2070-\u218f]/g, "-");
|
|
181
|
+
|
|
182
|
+
if (value === undefined) {
|
|
183
|
+
if (key in attrs) {
|
|
184
|
+
attr = div.getAttribute(key);
|
|
185
|
+
parsed = attr ? JSON.parse(attr) : { expires: -1 };
|
|
186
|
+
if (parsed.expires && parsed.expires <= now) {
|
|
187
|
+
div.removeAttribute(key);
|
|
188
|
+
delete attrs[ key ];
|
|
189
|
+
} else {
|
|
190
|
+
return parsed.data;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
if (value === null) {
|
|
195
|
+
div.removeAttribute(key);
|
|
196
|
+
delete attrs[ key ];
|
|
197
|
+
} else {
|
|
198
|
+
// we need to get the previous value in case we need to rollback
|
|
199
|
+
prevValue = div.getAttribute(key);
|
|
200
|
+
parsed = JSON.stringify({
|
|
201
|
+
data: value,
|
|
202
|
+
expires: (options.expires ? (now + options.expires) : null)
|
|
240
203
|
});
|
|
204
|
+
div.setAttribute(key, parsed);
|
|
205
|
+
attrs[ key ] = true;
|
|
206
|
+
}
|
|
241
207
|
}
|
|
242
|
-
|
|
208
|
+
|
|
209
|
+
div.setAttribute(attrKey, JSON.stringify(attrs));
|
|
210
|
+
try {
|
|
211
|
+
div.save(attrKey);
|
|
212
|
+
// quota exceeded
|
|
213
|
+
} catch (error) {
|
|
214
|
+
// roll the value back to the previous value
|
|
215
|
+
if (prevValue === null) {
|
|
216
|
+
div.removeAttribute(key);
|
|
217
|
+
delete attrs[ key ];
|
|
218
|
+
} else {
|
|
219
|
+
div.setAttribute(key, prevValue);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// expire old data and try again
|
|
223
|
+
store.userData();
|
|
224
|
+
try {
|
|
225
|
+
div.setAttribute(key, parsed);
|
|
226
|
+
attrs[ key ] = true;
|
|
227
|
+
div.save(attrKey);
|
|
228
|
+
} catch (error) {
|
|
229
|
+
// roll the value back to the previous value
|
|
230
|
+
if (prevValue === null) {
|
|
231
|
+
div.removeAttribute(key);
|
|
232
|
+
delete attrs[ key ];
|
|
233
|
+
} else {
|
|
234
|
+
div.setAttribute(key, prevValue);
|
|
235
|
+
}
|
|
236
|
+
throw store.error();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return ret;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}() );
|
|
243
243
|
|
|
244
244
|
// in-memory storage
|
|
245
245
|
// fallback for all browsers to enable the API even if we can't persist data
|
|
246
|
-
|
|
246
|
+
createSimpleStorage("memory", {});
|
|
247
247
|
|
|
248
248
|
}(this.amplify = this.amplify || {}) );
|