Uji Countdown - Version 2.0.1

Version Description

  • Fix select style option.
Download this release

Release Info

Developer ujimoto
Plugin Icon 128x128 Uji Countdown
Version 2.0.1
Comparing to
See all releases

Code changes from version 1.3.3 to 2.0.1

Files changed (164) hide show
  1. readme.txt → README.txt +75 -120
  2. assets/banner-1544x500.png +0 -0
  3. assets/banner-772x250.png +0 -0
  4. assets/css/admin.css +454 -0
  5. assets/css/jquery-ui-custom.css +78 -0
  6. assets/css/pink.css +54 -0
  7. assets/css/pink.png +0 -0
  8. assets/css/pink.psd +0 -0
  9. assets/css/pink@2x.png +0 -0
  10. assets/css/pink@2x.psd +0 -0
  11. assets/googlefonts.php +8 -0
  12. {images → assets/images}/align-center.png +0 -0
  13. {images → assets/images}/align-left.png +0 -0
  14. {images → assets/images}/align-none.png +0 -0
  15. {images → assets/images}/align-right.png +0 -0
  16. assets/images/back.jpg +0 -0
  17. assets/images/classic.png +0 -0
  18. assets/images/classic@2.png +0 -0
  19. assets/images/custom.png +0 -0
  20. assets/images/custom@2.png +0 -0
  21. assets/images/icon-custom.png +0 -0
  22. assets/images/icon-font.png +0 -0
  23. assets/images/icon-glob.png +0 -0
  24. assets/images/icon-mob.png +0 -0
  25. assets/images/icon-rtl.png +0 -0
  26. assets/images/icon-wp.png +0 -0
  27. assets/images/modern.png +0 -0
  28. assets/images/modern@2.png +0 -0
  29. assets/images/slider-control.png +0 -0
  30. assets/images/ucount-icon.png +0 -0
  31. assets/images/ucount-icon@x2.png +0 -0
  32. assets/images/ujic-ps.jpg +0 -0
  33. assets/images/ujic-ps2.jpg +0 -0
  34. assets/images/ujic-ps3.png +0 -0
  35. assets/index.php +1 -0
  36. assets/js/admin.js +237 -0
  37. assets/js/jquery.icheck.min.js +11 -0
  38. assets/js/widget.js +24 -0
  39. assets/tinymce/config.php +79 -0
  40. assets/tinymce/css/jquery-ui.min.css +5 -0
  41. assets/tinymce/css/popup.css +223 -0
  42. assets/tinymce/get_wp.php +11 -0
  43. assets/tinymce/images/data-picker.png +0 -0
  44. assets/tinymce/images/data-picker@2.png +0 -0
  45. images/icon_large.png → assets/tinymce/images/icon.png +0 -0
  46. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_flat_75_ffffff_40x100.png +0 -0
  47. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  48. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  49. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_75_dadada_1x400.png +0 -0
  50. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  51. {inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  52. {inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_222222_256x240.png +0 -0
  53. {inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_2e83ff_256x240.png +0 -0
  54. {inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_454545_256x240.png +0 -0
  55. {inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_888888_256x240.png +0 -0
  56. {inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_cd0a0a_256x240.png +0 -0
  57. assets/tinymce/js/base64.js +333 -0
  58. assets/tinymce/js/jquery.appendo.js +136 -0
  59. assets/tinymce/js/jquery.livequery.js +226 -0
  60. assets/tinymce/js/popup.js +192 -0
  61. assets/tinymce/js/popup.old.js +191 -0
  62. assets/tinymce/plugin.js +32 -0
  63. assets/tinymce/plugin.old.js +51 -0
  64. assets/tinymce/popup.php +63 -0
  65. assets/tinymce/shortcodes.class.php +344 -0
  66. classes/class-uji-countdown-admin.php +702 -0
  67. classes/class-uji-countdown-front.php +155 -0
  68. classes/class-uji-countdown.php +607 -0
  69. classes/class-uji-widget.php +250 -0
  70. css/admin.countdown.css +0 -120
  71. css/jquery.countdown.css +0 -103
  72. css/uji-countdown.css +93 -0
  73. images/icon.png +0 -0
  74. images/ujic-ps.jpg +0 -0
  75. images/ujic-ps2.jpg +0 -0
  76. images/ujic-ps3.png +0 -0
  77. inc/css/colorpicker.css +0 -161
  78. inc/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  79. inc/css/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  80. inc/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  81. inc/css/images/ui-bg_flat_10_000000_40x100.png +0 -0
  82. inc/css/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  83. inc/css/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  84. inc/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  85. inc/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  86. inc/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  87. inc/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  88. inc/css/images/ui-icons_228ef1_256x240.png +0 -0
  89. inc/css/images/ui-icons_ef8c08_256x240.png +0 -0
  90. inc/css/images/ui-icons_ffd27a_256x240.png +0 -0
  91. inc/css/images/ui-icons_ffffff_256x240.png +0 -0
  92. inc/css/jquery-ui-1.9.2.custom.css +0 -421
  93. inc/css/jquery-ui-timepicker-addon.css +0 -10
  94. inc/css/layout.css +0 -84
  95. inc/images/blank.gif +0 -0
  96. inc/images/colorpicker_background.png +0 -0
  97. inc/images/colorpicker_hex.png +0 -0
  98. inc/images/colorpicker_hsb_b.png +0 -0
  99. inc/images/colorpicker_hsb_h.png +0 -0
  100. inc/images/colorpicker_hsb_s.png +0 -0
  101. inc/images/colorpicker_indic.gif +0 -0
  102. inc/images/colorpicker_overlay.png +0 -0
  103. inc/images/colorpicker_rgb_b.png +0 -0
  104. inc/images/colorpicker_rgb_g.png +0 -0
  105. inc/images/colorpicker_rgb_r.png +0 -0
  106. inc/images/colorpicker_select.gif +0 -0
  107. inc/images/colorpicker_submit.png +0 -0
  108. inc/images/custom_background.png +0 -0
  109. inc/images/custom_hex.png +0 -0
  110. inc/images/custom_hsb_b.png +0 -0
  111. inc/images/custom_hsb_h.png +0 -0
  112. inc/images/custom_hsb_s.png +0 -0
  113. inc/images/custom_indic.gif +0 -0
  114. inc/images/custom_rgb_b.png +0 -0
  115. inc/images/custom_rgb_g.png +0 -0
  116. inc/images/custom_rgb_r.png +0 -0
  117. inc/images/custom_submit.png +0 -0
  118. inc/images/select.png +0 -0
  119. inc/images/select2.png +0 -0
  120. inc/images/slider.png +0 -0
  121. inc/js/admin.color.js +0 -89
  122. inc/js/colorpicker.js +0 -484
  123. inc/js/jquery-ui-old.min.js +0 -5
  124. inc/js/jquery-ui-timepicker-old.js +0 -1755
  125. inc/js/jquery-ui-timepicker.js +0 -2103
  126. inc/js/jquery-ui.min.js +0 -12
  127. inc/js/widget-js.js +0 -34
  128. js/countdown.js +0 -58
  129. js/jquery.countdown.js +1 -1
  130. js/prev.countdown.js +0 -48
  131. js/serverTime.php +0 -4
  132. js/uji-countdown.js +1 -0
  133. lang/index.php +1 -0
  134. lang/uji-countdown-de_DE.mo +0 -0
  135. lang/uji-countdown-de_DE.po +73 -0
  136. {languages → lang}/uji-countdown-en_EN.mo +0 -0
  137. {languages → lang}/uji-countdown-en_EN.po +0 -0
  138. lang/uji-countdown-en_US.mo +0 -0
  139. lang/uji-countdown-en_US.pot +406 -0
  140. lang/uji-countdown-es_ES.mo +0 -0
  141. lang/uji-countdown-es_ES.po +71 -0
  142. lang/uji-countdown-fr_FR.mo +0 -0
  143. lang/uji-countdown-fr_FR.po +71 -0
  144. lang/uji-countdown-hu_HU.mo +0 -0
  145. lang/uji-countdown-hu_HU.po +71 -0
  146. lang/uji-countdown-it_IT.mo +0 -0
  147. lang/uji-countdown-it_IT.po +71 -0
  148. lang/uji-countdown-nl_NL.mo +0 -0
  149. lang/uji-countdown-nl_NL.po +71 -0
  150. lang/uji-countdown-ro_RO.mo +0 -0
  151. lang/uji-countdown-ro_RO.po +73 -0
  152. lang/uji-countdown-ru_RU.mo +0 -0
  153. lang/uji-countdown-ru_RU.po +71 -0
  154. screenshot-1.png +0 -0
  155. screenshot-2.png +0 -0
  156. screenshot-3.png +0 -0
  157. uji-countdown-add.php +0 -288
  158. uji-countdown-front.php +0 -224
  159. uji-countdown-widget.php +0 -125
  160. uji-countdown.php +0 -159
  161. ujicountdown.php +43 -0
  162. views/admin.php +49 -0
  163. views/index.php +1 -0
  164. views/public.php +15 -0
readme.txt → README.txt RENAMED
@@ -1,122 +1,77 @@
1
- === Uji Countdown ===
2
- Contributors: ujimoto
3
- Donate link: http://wpmanage.com/Uji-countdown
4
- Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer
5
- Requires at least: 3.0
6
- Tested up to: 3.9
7
- Stable tag: 1.3.3
8
-
9
- Uji Countdown - HTML5 Customizable Countdown Timer
10
-
11
- == Description ==
12
-
13
- Uji Countdown allows you to display a countdown on your post or page. The easiest way to place your full customizable HTML5 Countdown Timer.
14
-
15
- Features:
16
-
17
- * HTML5 features
18
- * No flash, only javascript!
19
- * Customize of colors for text and background
20
- * Customize boxes color
21
- * Enable animation
22
- * Set the texts for date, time
23
- * Create unlimited styles
24
- * Simple using shortcode
25
- * Multilanguage support for date
26
- * Add countdown timers from Widgets area
27
-
28
- <a href="http://wpmanage.com/uji-countdown">Uji Countdown Premium</a> is now available with new features.
29
-
30
- http://www.youtube.com/watch?v=NMDoUU8CQIs
31
-
32
- **Plugin's Official Site**
33
- WPmanage [(http://www.wpmanage.com/uji-countdown/)](http://www.wpmanage.com/uji-countdown/)
34
-
35
- == Installation ==
36
-
37
- 1. Upload the `uji-countdown` folder to the `/wp-content/plugins/` directory
38
- 2. Activate the Uji Countdown plugin through the 'Plugins' menu in WordPress
39
- 3. Create your new Countdown style in Settings/Countdown
40
- 4. Place your Countdown in Post/Page via Edit: Post or Page
41
-
42
- == Screenshots ==
43
-
44
- 1. Create your new Countdown style.
45
- 2. Place your Countdown in Post/Page via Edit: Post or Page.
46
- 3. Front-end view
47
-
48
  == Changelog ==
49
 
50
- = 1.3.3 =
51
- * Important Fix: WP 3.9 color picker compatibility with jquery 1.10+
52
- * Important Fix: WP 3.9 compatibility
53
-
54
- = 1.3.2 =
55
-
56
- * Fix WP 3.8 admin styles.
57
-
58
- = 1.3.1 =
59
-
60
- * Fix seconds animation
61
-
62
- = 1.3 =
63
-
64
- * Fix Safari and iOS 7 bug
65
-
66
- = 1.2 =
67
-
68
- * Fix jQuery UI for wordpress 3.6
69
-
70
- = 1.1 =
71
-
72
- * Fix Chrome bug
73
-
74
- = 1.0.9 =
75
-
76
- * Important Fix: WP 3.5 links bug fix
77
- * Fix datapicker
78
-
79
- = 1.0.8 =
80
-
81
- * Important Fix: Get server time instead of local PC time. See same values on any GMT/UTC time zone
82
- * Fix p or br tag inclusion on some themes
83
- * Move script to separate file. More cleaner code
84
-
85
- = 1.0.7 =
86
-
87
- * Fix: "Setting the date and time" on some themes
88
- * Updates for scripts
89
- * Include "title" for the widgets countdown
90
-
91
- = 1.0.6.1 =
92
-
93
- * Fix bug for: "Select style"
94
-
95
- = 1.0.6 =
96
-
97
- * Add countdown timers from Widgets area
98
-
99
- = 1.0.5 =
100
-
101
- * Fix several bugs.
102
-
103
- = 1.0.4 =
104
-
105
- * Fix few bugs.
106
-
107
- = 1.0.3 =
108
-
109
- * Add option to redirect link after countdown expire.
110
- * Add option to hide and remove script after countdown expire.
111
-
112
- = 1.0.2 =
113
-
114
- * Fix do_shortcode when using hardcoded.
115
-
116
- = 1.0.1 =
117
-
118
- * Fix align center.
119
-
120
- = 1.0 =
121
-
122
- * First version. Stable version.
1
+ === Uji Countdown ===
2
+ Contributors: ujimoto
3
+ Donate link: http://www.wpmanage.com/uji-countdown
4
+ Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer
5
+ Requires at least: 3.0
6
+ Tested up to: 4.0
7
+ Stable tag: 2.0
8
+
9
+ Uji Countdown - HTML5 Customizable Countdown Timer
10
+
11
+ == Description ==
12
+
13
+ Uji Countdown allows you to display a countdown on your post or page. The easiest way to place your full customizable HTML5 Countdown Timer.
14
+
15
+ Features:
16
+
17
+ * HTML5 features
18
+ * No flash, only javascript!
19
+ * Customize of colors for text and background
20
+ * Customize boxes color
21
+ * Enable animation
22
+ * Set the texts for date, time
23
+ * Create unlimited styles
24
+ * Simple using shortcode
25
+ * Multilanguage support for date
26
+ * Add countdown timers from Widgets area
27
+ * Easy translation
28
+
29
+ [youtube http://www.youtube.com/watch?v=ARNRRsIk6aI]
30
+
31
+ **Plugin's Official Site**
32
+ WPmanage [(http://www.wpmanage.com/uji-countdown/)](http://www.wpmanage.com/uji-countdown/)
33
+
34
+ == Installation ==
35
+
36
+ 1. Upload the `uji-countdown` folder to the `/wp-content/plugins/` directory
37
+ 2. Activate the Uji Countdown plugin through the 'Plugins' menu in WordPress
38
+ 3. Create your new Countdown style in Settings/Countdown
39
+ 4. Place your Countdown in Post/Page via Edit: Post or Page
40
+
 
 
 
 
 
 
 
41
  == Changelog ==
42
 
43
+ = 2.0.1 =
44
+ * Fix select style option.
45
+
46
+ = 2.0 =
47
+
48
+ * Complete core rebuilt.
49
+ * New:
50
+ * --- New Admin Panel
51
+ * --- Google font integrate
52
+ * --- More timer customization
53
+ * --- Color and size customization for label text
54
+ * --- Quick translation
55
+ * --- Right-To-Left (RTL)
56
+
57
+ = 1.3 =
58
+
59
+ * Important Fix: WP 3.9 color picker compatibility with jquery 1.10+
60
+
61
+ = 1.2 =
62
+
63
+ * Important Fix: WP 3.5 links bug fix
64
+ * Fix datapicker
65
+
66
+ = 1.1 =
67
+
68
+ * Important Fix: Get server time instead of local PC time. See same values on any GMT/UTC time zone
69
+ * Fix p or br tag inclusion on some themes
70
+ * Move script to separate file. More cleaner code
71
+
72
+ = 1.0 =
73
+
74
+ * First version. Stable version.
75
+
76
+ * SUPPORT *
77
+ Contact us for support: info@wpmanage.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/banner-1544x500.png ADDED
Binary file
assets/banner-772x250.png ADDED
Binary file
assets/css/admin.css ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ============================================================================
3
+ Admin NEW
4
+ ============================================================================
5
+ */
6
+
7
+ #ujic_new{
8
+ width: 600px;
9
+ margin-top: 20px;
10
+ display: block;
11
+ float: left;
12
+ background: 0 0 url('../images/back.jpg');
13
+ background-size: cover;
14
+ color: white;
15
+ -webkit-border-radius: 5px;
16
+ -moz-border-radius: 5px;
17
+ border-radius: 5px;
18
+ padding: 30px 40px;
19
+ text-align: center;
20
+ font-family: "Open Sans",sans-serif;
21
+ }
22
+
23
+ .ujic_butnew{
24
+ display: inline-block;
25
+ font-size: 14px;
26
+ padding: 8px 15px;
27
+ text-align: center;
28
+ border: 1px solid #ffffff;
29
+ -webkit-border-radius: 2px;
30
+ -moz-border-radius: 2px;
31
+ border-radius: 2px;
32
+ color: #ffffff;
33
+ text-decoration: none;
34
+ }
35
+
36
+ .ujic_butnew:hover{
37
+ background: #ffffff;
38
+ color: #a61ba6;
39
+ }
40
+
41
+ #ujic_new h2,
42
+ #ujic_new h3{
43
+ color: #ffffff;
44
+ }
45
+
46
+ .ujic_new_cnt{
47
+ border-top: 1px solid #ffffff;
48
+ margin-top: 30px;
49
+ padding-top: 30px;
50
+ }
51
+
52
+ .ujic_new_cnt ul{
53
+ margin: 0;
54
+ }
55
+
56
+
57
+ .ujic_new_cnt ul li{
58
+ margin: 30px 0;
59
+ display: block;
60
+ }
61
+ /*
62
+ ============================================================================
63
+ Admin Icons
64
+ ============================================================================
65
+ */
66
+ #icon-options-general{
67
+ background: transparent url("../images/ucount-icon.png") no-repeat 0 0;
68
+ }
69
+
70
+ .ujc-admin-tit{
71
+ background: transparent url("../images/ucount-icon.png") no-repeat 0 8px;
72
+ padding-left: 40px!important;
73
+ }
74
+
75
+
76
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2) {
77
+
78
+ #icon-options-general{
79
+ background-image: url("../images/ucount-icon@x2.png");
80
+ background-size: 32px 187px;
81
+ }
82
+
83
+ .ujc-admin-tit{
84
+ background: transparent url("../images/ucount-icon@x2.png") no-repeat 0 8px;
85
+ padding-left: 40px!important;
86
+ background-size: 32px 187px;
87
+ }
88
+ }
89
+
90
+
91
+ .ujic-mico{
92
+ position: relative;
93
+ top: 4px;
94
+ padding-right: 4px;
95
+ }
96
+
97
+ /*
98
+ ============================================================================
99
+ Admin Message
100
+ ============================================================================
101
+ */
102
+ #message {
103
+ width: 943px;
104
+ }
105
+
106
+
107
+ /*
108
+ ============================================================================
109
+ Color Picker Fix
110
+ ============================================================================
111
+ */
112
+
113
+ .iris-picker .iris-slider-offset {
114
+
115
+ }
116
+
117
+ /*
118
+ ============================================================================
119
+ Admin Form
120
+ ============================================================================
121
+ */
122
+
123
+ .uji-fedit .postbox{
124
+ background: #FEF4FF;
125
+ }
126
+
127
+ .ujic-create{
128
+ width: 680px;
129
+ float: left;
130
+ display: inline-block;
131
+ margin: 10px 0 0 5px;
132
+ }
133
+
134
+ .ujic-create .label {
135
+ float: left;
136
+ font-weight: normal;
137
+ width: 200px;
138
+ height: 40px;
139
+ line-height: 40px;
140
+ }
141
+
142
+ .ujic-create .regular-chk{
143
+ margin-top: 4px;
144
+ }
145
+
146
+ .ujic-create .mini{
147
+ width: 40px;
148
+ }
149
+
150
+ .ujic-create .ujic-box {
151
+ overflow: hidden;
152
+ display: block;
153
+ margin: 15px 0;
154
+ border-bottom: 1px solid #e1e1e1;
155
+ padding-bottom: 15px;
156
+ }
157
+
158
+ .ujic-settings .ujic-box {
159
+ border-bottom: 0;
160
+ }
161
+
162
+
163
+ /* Input Option */
164
+
165
+ .ujic-create .regular-text{
166
+ margin-top: 10px;
167
+ }
168
+
169
+ /* SliderUI Option */
170
+
171
+ .ujic_sliderui{
172
+ margin-top: 15px;
173
+ }
174
+
175
+ /* Checkbox Option */
176
+
177
+
178
+
179
+
180
+ .ujic-chkbtn{
181
+ float: left;
182
+ position: relative;
183
+ margin: 10px 0 0 0;
184
+ }
185
+
186
+ .icheckbox_flat-pink, .iradio_flat-pink {
187
+ display: inline-block!important;
188
+ float: left!important;
189
+ margin-right: 10px!important;
190
+ }
191
+
192
+ .ujic-chkbtn label{
193
+ float: left;
194
+ line-height: 22px;
195
+ padding-right: 15px;
196
+ }
197
+
198
+ /* Radiobox Option */
199
+
200
+ #img-none{
201
+ background: url("../images/align-none.png") right 3px no-repeat;
202
+ padding-right: 25px;
203
+ }
204
+
205
+ #img-left{
206
+ background: url("../images/align-left.png") right 3px no-repeat;
207
+ padding-right: 30px;
208
+ }
209
+
210
+ #img-center{
211
+ background: url("../images/align-center.png") right 3px no-repeat;
212
+ padding-right: 30px;
213
+ }
214
+
215
+ #img-right{
216
+ background: url("../images/align-left.png") right 3px no-repeat;
217
+ padding-right: 30px;
218
+ }
219
+
220
+ .ujic-radbtn{
221
+ margin: 10px;
222
+ }
223
+
224
+ .ujic-radbtn label{
225
+ float: left;
226
+ line-height: 20px;
227
+ margin-right: 20px;
228
+ }
229
+
230
+ /* select Option */
231
+ .ujic-select{
232
+ padding: 4px;
233
+ border: 1px solid #aeaeae;
234
+ background: #bc59bc;
235
+ -webkit-border-radius: 5px;
236
+ -moz-border-radius: 5px;
237
+ border-radius: 5px;
238
+ float: left;
239
+ }
240
+
241
+ /* Style Option */
242
+
243
+ .ujic-types{
244
+ width: 32px;
245
+ height: 34px;
246
+ display: block;
247
+ float: left;
248
+ padding: 0 2px;
249
+ text-indent: -99999px;
250
+ margin-right: 20px;
251
+ border: 1px solid transparent;
252
+ }
253
+
254
+ .ujic-types:hover{
255
+ border: 1px solid #cfcfcf;
256
+ }
257
+
258
+ .ujic-types-sel{
259
+ border: 1px solid #bbbbbb!important;
260
+ }
261
+
262
+
263
+ #ujic-style-classic{
264
+ background: url(../images/classic.png) center 1px no-repeat;
265
+ }
266
+
267
+ #ujic-style-custom{
268
+ background: url(../images/custom.png) center 1px no-repeat;
269
+ }
270
+ /*
271
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2) {
272
+ #ujic-style-classic{
273
+ background: url(../images/classic@2.png) no-repeat;
274
+ }
275
+ #ujic-style-modern{
276
+ background: url(../images/modern@2.png) no-repeat;
277
+ }
278
+ #ujic-style-custom{
279
+ background: url(../images/custom@2.png) no-repeat;
280
+ }
281
+ }*/
282
+ /* Color Option */
283
+
284
+ .ujic-color{
285
+ overflow: hidden;
286
+ clear: both;
287
+ float: none;
288
+ }
289
+
290
+ .ujic-color span{
291
+ display: block;
292
+ }
293
+
294
+ .ujic-color .ujic-color-hold{
295
+ float: left;
296
+ display: inline-block;
297
+ margin-right: 20px;
298
+ }
299
+
300
+ .ujic-color-box {
301
+ display: block;
302
+ float: left;
303
+ overflow: hidden;
304
+ }
305
+
306
+ /* Button Option */
307
+ .ujic-create .submit{
308
+ display: inline;
309
+ margin-right: 10px;
310
+ }
311
+
312
+ /*
313
+ ============================================================================
314
+ Table Admin
315
+ ============================================================================
316
+ */
317
+
318
+ #ujic_table{
319
+ padding: 20px 0;
320
+ width: 680px;
321
+ float: left;
322
+
323
+ }
324
+
325
+ #ujic_table{
326
+ line-height: 30px;
327
+ }
328
+
329
+ #ujic_table_new{
330
+ margin: 0 0 10px 0;
331
+ }
332
+
333
+ #message{
334
+ margin: 20px 0 0 0;
335
+ }
336
+
337
+ .ujic-submit-hold{
338
+ display: block;
339
+ overflow:hidden;
340
+ margin: 20px 0 0 0;
341
+ }
342
+
343
+ /*
344
+ ============================================================================
345
+ Tutorial Admin
346
+ ============================================================================
347
+ */
348
+
349
+ .ujic-tut{
350
+ float: left;
351
+ display: inline;
352
+ margin: 10px 0 0 10px;
353
+ }
354
+
355
+ /*
356
+ ============================================================================
357
+ Preview Style
358
+ ============================================================================
359
+ */
360
+
361
+ .ujic-preview{
362
+ display: block;
363
+ float: none;
364
+ clear: both;
365
+ width: 970px;
366
+ }
367
+
368
+ .ujic-preview .postbox {
369
+ overflow: hidden;
370
+ z-index: 9999;
371
+ }
372
+
373
+ .ujic-preview .postbox:hover {
374
+ cursor: move;
375
+ }
376
+
377
+ #ujiCountdown{
378
+ margin-bottom: 20px;
379
+ overflow: hidden;
380
+ padding-top: 10px;
381
+ }
382
+
383
+ #ujiCountdown .ujic_y,
384
+ #ujiCountdown .ujic_o,
385
+ #ujiCountdown .ujic_w
386
+ {
387
+ display: none;
388
+ }
389
+
390
+ .ujic-classic .countdown_section {
391
+ float:left;
392
+ display: block;
393
+ text-align: center;
394
+ margin: 0 15px 0 0;
395
+ }
396
+
397
+ .ujic-classic span.countdown_amount {
398
+ display: inline-block;
399
+ color: #fff;
400
+ padding: 5px 10px 5px 10px;
401
+ margin-right: 2px;
402
+
403
+ font: 35px/1.5 'Open Sans Condensed',sans-serif;
404
+ font-weight: normal;
405
+
406
+ box-shadow:1px 1px 1px rgba(4, 4, 4, 0.35);
407
+
408
+ -webkit-border-radius: 5px;
409
+ -ms-border-radius: 5px;
410
+ -moz-border-radius: 5px;
411
+ -o-border-radius: 5px;
412
+ border-radius: 5px;
413
+ text-shadow: 1px 1px 1px #000;
414
+
415
+ background: #a61ba6; /* Old browsers */
416
+ background: -moz-linear-gradient(top, #a61ba6 50%, #c368c3 50%); /* FF3.6+ */
417
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#a61ba6), color-stop(50%,#c368c3)); /* Chrome,Safari4+ */
418
+ background: -webkit-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* Chrome10+,Safari5.1+ */
419
+ background: -o-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* Opera 11.10+ */
420
+ background: -ms-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* IE10+ */
421
+ background: linear-gradient(to bottom, #a61ba6 50%,#c368c3 50%); /* W3C */
422
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a61ba6', endColorstr='#c368c3',GradientType=0 ); /* IE6-9 */
423
+
424
+ }
425
+
426
+ .ujic-classic span.countdown_txt {
427
+ display: block;
428
+ text-align: center;
429
+ margin: 5px 0 0 0;
430
+ }
431
+
432
+
433
+ .nav-tab-pro{
434
+ background-color: #9a469a;
435
+ color: #ffffff!important;
436
+ }
437
+
438
+ .nav-tab-pro:hover{
439
+ background-color: #793979;
440
+ color: #ffffff!important;
441
+ }
442
+
443
+ /*
444
+ ============================================================================
445
+ Responsive
446
+ ============================================================================
447
+ */
448
+
449
+ @media only screen
450
+ and (max-width : 1169px) {
451
+ .ujic-tut{
452
+ display: none;
453
+ }
454
+ }
assets/css/jquery-ui-custom.css ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.14
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ujic_slider .ui-helper-hidden { display: none; }
14
+ .ujic_slider .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ujic_slider .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ujic_slider .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ujic_slider .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ujic_slider .ui-helper-clearfix { height:1%; }
20
+ .ujic_slider .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ujic_slider .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ujic_slider .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ujic_slider .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ujic_slider .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+
43
+
44
+ /*
45
+ * jQuery UI Slider 1.8.14
46
+ *
47
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
+ * Dual licensed under the MIT or GPL Version 2 licenses.
49
+ * http://jquery.org/license
50
+ *
51
+ * http://docs.jquery.com/UI/Slider#theming
52
+ */
53
+ .ujic_sliderui { position: relative; text-align: left; background:#eee; border-radius:2px; width:200px; display:inline-block; margin-right:10px; border: 1px solid #999;}
54
+ .ujic_slider .ui-slider-handle { position: absolute; z-index: 2; width: 18px; height: 18px; cursor: default; background: url(../images/slider-control.png) no-repeat center center !important; cursor: pointer;}
55
+ .ujic_slider .ui-slider-handle.ui-corner-all { border:0 !important;}
56
+ .ujic_slider .ui-slider-handle.ui-state-focus { border:0 !important; background: url(../images/slider-control.png) no-repeat center center !important;outline: none;}
57
+ .ujic_slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
58
+
59
+ .ujic_slider .ui-slider-horizontal { height: 7px; border-color: #aaa;
60
+ border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
61
+ box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
62
+ -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
63
+ -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
64
+ .ujic_slider .ui-slider-horizontal .ui-slider-handle { top: -5px; margin-left: -9px; }
65
+ .ujic_slider .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
66
+ .ujic_slider .ui-slider-horizontal .ui-slider-range-min { left: 0; }
67
+ .ujic_slider .ui-slider-horizontal .ui-slider-range-max { right: 0; }
68
+ .ui-slider-range{border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
69
+ box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
70
+ -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
71
+ -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
72
+ .ujic_slider .ui-slider-range.ui-widget-header{border: 1px solid #a61ba6; margin-top: -1px; margin-left: -1px; background: #bd5abd;border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;}
73
+
74
+ .ujic_slider .ui-slider-vertical { width: .8em; height: 100px; }
75
+ .ujic_slider .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
76
+ .ujic_slider .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
77
+ .ujic_slider .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
78
+ .ujic_slider .ui-slider-vertical .ui-slider-range-max { top: 0; }
assets/css/pink.css ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* iCheck plugin Flat skin, pink
2
+ ----------------------------------- */
3
+ .icheckbox_flat-pink,
4
+ .iradio_flat-pink {
5
+ display: block;
6
+ margin: 0;
7
+ padding: 0;
8
+ width: 20px;
9
+ height: 20px;
10
+ background: url(pink.png) no-repeat;
11
+ border: none;
12
+ cursor: pointer;
13
+ }
14
+
15
+ .icheckbox_flat-pink {
16
+ background-position: 0 0;
17
+ }
18
+ .icheckbox_flat-pink.checked {
19
+ background-position: -22px 0;
20
+ }
21
+ .icheckbox_flat-pink.disabled {
22
+ background-position: -44px 0;
23
+ cursor: default;
24
+ }
25
+ .icheckbox_flat-pink.checked.disabled {
26
+ background-position: -66px 0;
27
+ }
28
+
29
+ .iradio_flat-pink {
30
+ background-position: -88px 0;
31
+ }
32
+ .iradio_flat-pink.checked {
33
+ background-position: -110px 0;
34
+ }
35
+ .iradio_flat-pink.disabled {
36
+ background-position: -132px 0;
37
+ cursor: default;
38
+ }
39
+ .iradio_flat-pink.checked.disabled {
40
+ background-position: -154px 0;
41
+ }
42
+
43
+ /* Retina support */
44
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
45
+ only screen and (-moz-min-device-pixel-ratio: 1.5),
46
+ only screen and (-o-min-device-pixel-ratio: 3/2),
47
+ only screen and (min-device-pixel-ratio: 1.5) {
48
+ .icheckbox_flat-pink,
49
+ .iradio_flat-pink {
50
+ background-image: url("pink@2x.png");
51
+ -webkit-background-size: 176px 22px;
52
+ background-size: 176px 22px;
53
+ }
54
+ }
assets/css/pink.png ADDED
Binary file
assets/css/pink.psd ADDED
Binary file
assets/css/pink@2x.png ADDED
Binary file
assets/css/pink@2x.psd ADDED
Binary file
assets/googlefonts.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function ujic_googlefonts() {
4
+ //return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kameron' => 'Kameron', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
5
+ return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alef' => 'Alef', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alegreya Sans' => 'Alegreya Sans', 'Alegreya Sans SC' => 'Alegreya Sans SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Ek Mukta' => 'Ek Mukta', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Exo 2' => 'Exo 2', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Fauna One' => 'Fauna One', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fira Mono' => 'Fira Mono', 'Fira Sans' => 'Fira Sans', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Halant' => 'Halant', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Hind' => 'Hind', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kalam' => 'Kalam', 'Kameron' => 'Kameron', 'Kantumruy' => 'Kantumruy', 'Karla' => 'Karla', 'Karma' => 'Karma', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Kdam Thmor' => 'Kdam Thmor', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khand' => 'Khand', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Laila' => 'Laila', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Lily Script One' => 'Lily Script One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Pathway Gothic One' => 'Pathway Gothic One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Rajdhani' => 'Rajdhani', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Roboto Slab' => 'Roboto Slab', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Rozha One' => 'Rozha One', 'Rubik Mono One' => 'Rubik Mono One', 'Rubik One' => 'Rubik One', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Sarpanch' => 'Sarpanch', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slabo 13px' => 'Slabo 13px', 'Slabo 27px' => 'Slabo 27px', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Source Serif Pro' => 'Source Serif Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Teko' => 'Teko', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vesper Libre' => 'Vesper Libre', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
6
+ }
7
+
8
+ ?>
{images → assets/images}/align-center.png RENAMED
File without changes
{images → assets/images}/align-left.png RENAMED
File without changes
{images → assets/images}/align-none.png RENAMED
File without changes
{images → assets/images}/align-right.png RENAMED
File without changes
assets/images/back.jpg ADDED
Binary file
assets/images/classic.png ADDED
Binary file
assets/images/classic@2.png ADDED
Binary file
assets/images/custom.png ADDED
Binary file
assets/images/custom@2.png ADDED
Binary file
assets/images/icon-custom.png ADDED
Binary file
assets/images/icon-font.png ADDED
Binary file
assets/images/icon-glob.png ADDED
Binary file
assets/images/icon-mob.png ADDED
Binary file
assets/images/icon-rtl.png ADDED
Binary file
assets/images/icon-wp.png ADDED
Binary file
assets/images/modern.png ADDED
Binary file
assets/images/modern@2.png ADDED
Binary file
assets/images/slider-control.png ADDED
Binary file
assets/images/ucount-icon.png ADDED
Binary file
assets/images/ucount-icon@x2.png ADDED
Binary file
assets/images/ujic-ps.jpg ADDED
Binary file
assets/images/ujic-ps2.jpg ADDED
Binary file
assets/images/ujic-ps3.png ADDED
Binary file
assets/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden ?>
assets/js/admin.js ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+
3
+ /** Fire up jQuery - let's dance!
4
+ */
5
+ jQuery(document).ready(function ($) {
6
+
7
+ var fname = jQuery("#ujic-style").val() + 'Select';
8
+
9
+ /* jQuery UI Slider */
10
+ jQuery('.ujic_sliderui').each(function () {
11
+
12
+ var obj = jQuery(this);
13
+ var sId = "#" + obj.data('id');
14
+ var val = parseInt(obj.data('val'));
15
+ var min = parseInt(obj.data('min'));
16
+ var max = parseInt(obj.data('max'));
17
+ var step = parseInt(obj.data('step'));
18
+
19
+ //slider init
20
+ obj.slider({
21
+ value: val,
22
+ min: min,
23
+ max: max,
24
+ step: step,
25
+ range: "min",
26
+ slide: function (event, ui) {
27
+ jQuery(sId).val(ui.value);
28
+ if("#ujic_size" == sId)
29
+ window[fname].the_size(ui.value);
30
+ if("#ujic_thick" == sId)
31
+ window[fname].the_thick(ui.value);
32
+ if("#ujic_lab_sz" == sId)
33
+ window[fname].the_lab_sz(ui.value);
34
+ }
35
+ });
36
+
37
+ });
38
+
39
+ /* jQuery Color Picker */
40
+ jQuery('.ujic_colorpick').wpColorPicker({change: function (event, ui) {
41
+ window[fname].new_colors($(this).attr("id"), $(this).val())
42
+ }});
43
+
44
+
45
+ /* JQuery Checkbox/Radio */
46
+ jQuery('input').iCheck({
47
+ checkboxClass: 'icheckbox_flat-pink',
48
+ radioClass: 'iradio_flat-pink'
49
+ });
50
+
51
+ jQuery(".ujic-preview").draggable();
52
+ jQuery(".ujic-preview").find('.handlediv').hide();
53
+ jQuery(".ujic-preview").find('.postbox').click(function () {
54
+ $(this).removeClass('closed');
55
+ });
56
+
57
+
58
+ if (jQuery('#ujic_name').length) {
59
+ /* Style Preview */
60
+ window[fname].init();
61
+ }
62
+
63
+ });
64
+
65
+
66
+ //select styles
67
+ function sel_style(s) {
68
+ var lnk;
69
+ if (s == 'classic')
70
+ lnk = 'options-general.php?page=uji-countdown&tab=tab_ujic_new&style=classic';
71
+ if (s == 'custom')
72
+ lnk = 'options-general.php?page=uji-countdown&tab=tab_ujic_new&style=custom';
73
+ window.location.href = "" + lnk + "";
74
+ }
75
+
76
+
77
+ //redirect to home admin
78
+ function ujic_admin_home() {
79
+ window.location.href = 'options-general.php?page=uji-countdown';
80
+ }
81
+
82
+
83
+ /**
84
+ *
85
+ * Preview Clasic Panel Admin
86
+ *
87
+ *
88
+ */
89
+
90
+ (function ($) {
91
+ classicSelect = {
92
+ /// Init
93
+ init: function () {
94
+ var style = $('#ujic-style');
95
+ if (style.length) {
96
+ this.the_size();
97
+ this.the_lab_sz();
98
+ this.the_format();
99
+ this.the_colors();
100
+ this.the_labels();
101
+ this.the_fonts();
102
+ }
103
+ },
104
+ /// Size
105
+ the_size: function (val) {
106
+ var size = $('#ujic_size');
107
+ if (size.length) {
108
+ var newsize = (val && val != 'undefined' && val.length) ? val : size.val();
109
+ }
110
+ $('#ujiCountdown').find('.countdown_amount').css('font-size', newsize + 'px');
111
+ },
112
+ /// Label Size
113
+ the_lab_sz: function (val) {
114
+ var size = $('#ujic_lab_sz');
115
+ if (size.length) {
116
+ $('.countdown_txt').css('font-size', ((val && val != 'undefined' && val.length) ? val : size.val()) + 'px');
117
+ }
118
+ },
119
+ /// Format
120
+ the_format: function ( ) {
121
+ var format = new Array('ujic_d', 'ujic_h', 'ujic_m', 'ujic_s', 'ujic_y', 'ujic_o', 'ujic_w');
122
+ for (var i = 0; i < format.length; i++) {
123
+ if ($('#' + format[i]).is(":checked")) {
124
+ $('#ujiCountdown').find('.' + format[i]).show();
125
+ } else {
126
+ $('#ujiCountdown').find('.' + format[i]).hide();
127
+ }
128
+ }
129
+ //live change
130
+ $('.iCheck-helper').click(function () {
131
+ var id = $(this).parent().find(":checkbox").attr("id");
132
+ if ($(this).parent().hasClass('checked')) {
133
+ $('#ujiCountdown').find('.' + id).show();
134
+ } else {
135
+ $('#ujiCountdown').find('.' + id).hide();
136
+ }
137
+ });
138
+ },
139
+ /// Colors
140
+ the_colors: function (id, hex) {
141
+ var col_txt = $('#ujic_col_txt').val();
142
+ var col_sw = $('#ujic_col_sw').val();
143
+ var col_up = $('#ujic_col_up').val();
144
+ var col_dw = $('#ujic_col_dw').val();
145
+ var col_lab = $('#ujic_col_lab').val();
146
+
147
+ $('.countdown_amount').css('color', col_txt);
148
+ $('.countdown_amount').css("text-shadow", '1px 1px 1px ' + col_sw);
149
+
150
+ $('.ujic-classic').find('.countdown_amount').css("background", "-moz-linear-gradient(top, " + col_up + " 50%, " + col_dw + " 50%)"); /* FF3.6+ */
151
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(50%," + col_up + "), color-stop(50%," + col_dw + "))"); /* Chrome,Safari4+ */
152
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-linear-gradient(top, " + col_up + " 50%," + col_dw + " 50%)"); /* Chrome10+,Safari5.1+ */
153
+ $('.ujic-classic').find('.countdown_amount').css("background", "-o-linear-gradient(top, " + col_up + " 50%," + col_dw + " 50%)"); /* Opera 11.10+ */
154
+ $('.ujic-classic').find('.countdown_amount').css("background", "-ms-linear-gradient(top, " + col_up + " 50%," + col_dw + " 50%)"); /* IE10+ */
155
+ $('.ujic-classic').find('.countdown_amount').css("background", "linear-gradient(to bottom, " + col_up + " 50%," + col_dw + " 50%)"); /* W3C */
156
+ $('.ujic-classic').find('.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + col_up + "', endColorstr='" + col_dw + "',GradientType=0 )"); /* IE6-9 */
157
+
158
+ $('.countdown_txt').css('color', col_lab);
159
+ },
160
+ /// Colors
161
+ new_colors: function (id, hex) {
162
+ var col_up = $('#ujic_col_up').val();
163
+ var col_dw = $('#ujic_col_dw').val();
164
+
165
+ switch (id)
166
+ {
167
+ case 'ujic_col_txt':
168
+ $('.countdown_amount').css('color', hex);
169
+ break;
170
+ case 'ujic_col_sw':
171
+ $('.countdown_amount').css("text-shadow", '1px 1px 1px ' + hex);
172
+ break;
173
+ case 'ujic_col_up':
174
+ $('.ujic-classic').find('.countdown_amount').css("background", "-moz-linear-gradient(top, " + hex + " 50%, " + col_dw + " 50%)"); /* FF3.6+ */
175
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(50%," + hex + "), color-stop(50%," + col_dw + "))"); /* Chrome,Safari4+ */
176
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-linear-gradient(top, " + hex + " 50%," + col_dw + " 50%)"); /* Chrome10+,Safari5.1+ */
177
+ $('.ujic-classic').find('.countdown_amount').css("background", "-o-linear-gradient(top, " + hex + " 50%," + col_dw + " 50%)"); /* Opera 11.10+ */
178
+ $('.ujic-classic').find('.countdown_amount').css("background", "-ms-linear-gradient(top, " + hex + " 50%," + col_dw + " 50%)"); /* IE10+ */
179
+ $('.ujic-classic').find('.countdown_amount').css("background", "linear-gradient(to bottom, " + hex + " 50%," + col_dw + " 50%)"); /* W3C */
180
+ $('.ujic-classic').find('.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + hex + "', endColorstr='" + col_dw + "',GradientType=0 )"); /* IE6-9 */
181
+ break;
182
+ case 'ujic_col_dw':
183
+ $('.ujic-classic').find('.countdown_amount').css("background", "-moz-linear-gradient(top, " + col_up + " 50%, " + hex + " 50%)"); /* FF3.6+ */
184
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(50%," + col_up + "), color-stop(50%," + hex + "))"); /* Chrome,Safari4+ */
185
+ $('.ujic-classic').find('.countdown_amount').css("background", "-webkit-linear-gradient(top, " + col_up + " 50%," + hex + " 50%)"); /* Chrome10+,Safari5.1+ */
186
+ $('.ujic-classic').find('.countdown_amount').css("background", "-o-linear-gradient(top, " + col_up + " 50%," + hex + " 50%)"); /* Opera 11.10+ */
187
+ $('.ujic-classic').find('.countdown_amount').css("background", "-ms-linear-gradient(top, " + col_up + " 50%," + hex + " 50%)"); /* IE10+ */
188
+ $('.ujic-classic').find('.countdown_amount').css("background", "linear-gradient(to bottom, " + col_up + " 50%," + hex + " 50%)"); /* W3C */
189
+ $('.ujic-classic').find('.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + col_up + "', endColorstr='" + hex + "',GradientType=0 )"); /* IE6-9 */
190
+ break;
191
+ case 'ujic_col_lab':
192
+ $('.countdown_txt').css('color', hex);
193
+ break;
194
+ }
195
+ },
196
+ /// Text Labels
197
+ the_labels: function ( ) {
198
+ if ($('#ujic_txt').is(":checked")) {
199
+ $('.countdown_txt').show();
200
+ } else {
201
+ $('.countdown_txt').hide();
202
+ }
203
+
204
+ //live change
205
+ $('.iCheck-helper').click(function () {
206
+ var id = $(this).parent().find(":checkbox").attr("id");
207
+ if (id == 'ujic_txt' && $(this).parent().hasClass('checked')) {
208
+ $('.countdown_txt').show();
209
+ }
210
+ else if (id == 'ujic_txt') {
211
+ $('.countdown_txt').hide();
212
+ }
213
+ });
214
+
215
+ },
216
+ /// Google Font
217
+ the_fonts: function ( ) {
218
+ var val = $('#ujic_goof').val();
219
+ if (val && val != 'none') {
220
+ var the_font = val.replace(/\s+/g, '+');
221
+ //add reference to google font family
222
+ $('head').append('<link href="http://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
223
+ $('.countdown_amount').css('font-family', val + ', sans-serif');
224
+ }
225
+ //live change
226
+ $('#ujic_goof').bind("change keyup", function () {
227
+ var val = $(this).val();
228
+ var the_font = val.replace(/\s+/g, '+');
229
+ //add reference to google font family
230
+ $('head').append('<link href="http://fonts.googleapis.com/css?family=' + the_font + '" rel="stylesheet" type="text/css">');
231
+ $('.countdown_amount').css('font-family', val + ', sans-serif');
232
+
233
+ });
234
+ }
235
+
236
+ };
237
+ })(jQuery);
assets/js/jquery.icheck.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * iCheck v0.9.1 jQuery plugin, http://git.io/uhUPMA
3
+ */
4
+ (function(f){function C(a,c,d){var b=a[0],e=/er/.test(d)?k:/bl/.test(d)?u:j;active=d==E?{checked:b[j],disabled:b[u],indeterminate:"true"==a.attr(k)||"false"==a.attr(v)}:b[e];if(/^(ch|di|in)/.test(d)&&!active)p(a,e);else if(/^(un|en|de)/.test(d)&&active)w(a,e);else if(d==E)for(var e in active)active[e]?p(a,e,!0):w(a,e,!0);else if(!c||"toggle"==d){if(!c)a[r]("ifClicked");active?b[l]!==x&&w(a,e):p(a,e)}}function p(a,c,d){var b=a[0],e=a.parent(),g=c==j,H=c==k,m=H?v:g?I:"enabled",r=h(b,m+y(b[l])),L=h(b,
5
+ c+y(b[l]));if(!0!==b[c]){if(!d&&c==j&&b[l]==x&&b.name){var p=a.closest("form"),s='input[name="'+b.name+'"]',s=p.length?p.find(s):f(s);s.each(function(){this!==b&&f.data(this,n)&&w(f(this),c)})}H?(b[c]=!0,b[j]&&w(a,j,"force")):(d||(b[c]=!0),g&&b[k]&&w(a,k,!1));J(a,g,c,d)}b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"default");e[t](L||h(b,c));e[A](r||h(b,m)||"")}function w(a,c,d){var b=a[0],e=a.parent(),g=c==j,f=c==k,m=f?v:g?I:"enabled",n=h(b,m+y(b[l])),p=h(b,c+y(b[l]));if(!1!==b[c]){if(f||!d||"force"==d)b[c]=
6
+ !1;J(a,g,m,d)}!b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"pointer");e[A](p||h(b,c)||"");e[t](n||h(b,m))}function K(a,c){if(f.data(a,n)){var d=f(a);d.parent().html(d.attr("style",f.data(a,n).s||"")[r](c||""));d.off(".i").unwrap();f(D+'[for="'+a.id+'"]').add(d.closest(D)).off(".i")}}function h(a,c,d){if(f.data(a,n))return f.data(a,n).o[c+(d?"":"Class")]}function y(a){return a.charAt(0).toUpperCase()+a.slice(1)}function J(a,c,d,b){if(!b){if(c)a[r]("ifToggled");a[r]("ifChanged")[r]("if"+y(d))}}var n="iCheck",
7
+ F=n+"-helper",x="radio",j="checked",I="un"+j,u="disabled",v="determinate",k="in"+v,E="update",l="type",t="addClass",A="removeClass",r="trigger",D="label",z="cursor",G=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini/i.test(navigator.userAgent);f.fn[n]=function(a,c){var d=":checkbox, :"+x,b=f(),e=function(a){a.each(function(){var a=f(this);b=a.is(d)?b.add(a):b.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),
8
+ e(this),b.each(function(){"destroy"==a?K(this,"ifDestroyed"):C(f(this),!0,a);f.isFunction(c)&&c()});if("object"==typeof a||!a){var g=f.extend({checkedClass:j,disabledClass:u,indeterminateClass:k,labelHover:!0},a),h=g.handle,m=g.hoverClass||"hover",y=g.focusClass||"focus",v=g.activeClass||"active",z=!!g.labelHover,s=g.labelHoverClass||"hover",B=(""+g.increaseArea).replace("%","")|0;if("checkbox"==h||h==x)d=":"+h;-50>B&&(B=-50);e(this);return b.each(function(){K(this);var a=f(this),b=this,c=b.id,d=
9
+ -B+"%",e=100+2*B+"%",e={position:"absolute",top:d,left:d,display:"block",width:e,height:e,margin:0,padding:0,background:"#fff",border:0,opacity:0},d=G?{position:"absolute",visibility:"hidden"}:B?e:{position:"absolute",opacity:0},h="checkbox"==b[l]?g.checkboxClass||"icheckbox":g.radioClass||"i"+x,k=f(D+'[for="'+c+'"]').add(a.closest(D)),q=a.wrap('<div class="'+h+'"/>')[r]("ifCreated").parent().append(g.insert),e=f('<ins class="'+F+'"/>').css(e).appendTo(q);a.data(n,{o:g,s:a.attr("style")}).css(d);
10
+ g.inheritClass&&q[t](b.className);g.inheritID&&c&&q.attr("id",n+"-"+c);"static"==q.css("position")&&q.css("position","relative");C(a,!0,E);if(k.length)k.on("click.i mouseenter.i mouseleave.i touchbegin.i touchend.i",function(c){var d=c[l],e=f(this);if(!b[u])if("click"==d?C(a,!1,!0):z&&(/ve|nd/.test(d)?(q[A](m),e[A](s)):(q[t](m),e[t](s))),G)c.stopPropagation();else return!1});a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(c){var d=c[l];c=c.keyCode;if("click"==d)return!1;if("keydown"==
11
+ d&&32==c)return b[l]==x&&b[j]||(b[j]?w(a,j):p(a,j)),!1;if("keyup"==d&&b[l]==x)!b[j]&&p(a,j);else if(/us|ur/.test(d))q["blur"==d?A:t](y)});e.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(d){var c=d[l],e=/wn|up/.test(c)?v:m;if(!b[u]){if("click"==c)C(a,!1,!0);else{if(/wn|er|in/.test(c))q[t](e);else q[A](e+" "+v);if(k.length&&z&&e==m)k[/ut|nd/.test(c)?A:t](s)}if(G)d.stopPropagation();else return!1}})})}return this}})(jQuery);
assets/js/widget.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ jQuery("#widgets-right").on( "mouseover", ".ujic_date", function() {
3
+ jQuery("#widgets-right").find(".ujic_date").datepicker({
4
+ dateFormat : 'yy/mm/dd'
5
+ });
6
+ });
7
+
8
+ jQuery('.ujic_link').each(function() {
9
+ jQuery(this).keyup(function () {
10
+ var value = jQuery(this).val();
11
+ var cname = jQuery(this).parent().parent().find('.ujic_exp').attr("name");
12
+ jQuery(this).parent().parent().find('.ujic_exp').css('border', 'red');
13
+ //alert(cname);
14
+
15
+ if(value){
16
+ jQuery('input[name="'+cname+'"]').attr('checked', false);
17
+ }else{
18
+
19
+ jQuery('input[name="'+cname+'"]').attr('checked', true);
20
+ }
21
+
22
+ });
23
+ });
24
+ });
assets/tinymce/config.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*-----------------------------------------------------------------------------------*/
4
+ /* Countdown Config
5
+ /*-----------------------------------------------------------------------------------*/
6
+
7
+ // GET All Styles
8
+ function ujic_get_styles( $desc = false ){
9
+ global $wpdb;
10
+ $ujic_styles = $wpdb->get_results( "SELECT style, title FROM " . $wpdb->prefix . "uji_counter ORDER BY `time` DESC" );
11
+ $ujic_sel = array();
12
+ if( !empty($ujic_styles) ){
13
+ if( $desc ){
14
+ return '';
15
+ }else{
16
+ foreach( $ujic_styles as $ujic ){
17
+ $ujic_sel[$ujic->title] = $ujic->title .' - '. $ujic->style;
18
+ }
19
+ return $ujic_sel;
20
+ }
21
+ }else{
22
+ if( $desc ){
23
+ return '<span style="color:red">1. Go to Settings/Uji Countdown <br> 2. Click on Create a new timer style</span>';
24
+ }else{
25
+ return array( __('Please add a new style first', 'ujicountdown') );
26
+ }
27
+ }
28
+ }
29
+
30
+ //GET Data/Time
31
+ function ujic_get_datetime($nr){
32
+ for($i=0; $i<=$nr; $i++){
33
+ $num[sprintf("%02s",$i)] = sprintf("%02s",$i);
34
+ }
35
+
36
+ return $num;
37
+ }
38
+
39
+
40
+ $ujic_shortcodes['countdown'] = array(
41
+ 'no_preview' => true,
42
+ 'params' => array(
43
+ 'style' => array(
44
+ 'type' => 'select',
45
+ 'label' => __('Select Style', 'ujicountdown'),
46
+ 'desc' => __('Select the style for your countdown', 'ujicountdown'),
47
+ 'options' => ujic_get_styles(),
48
+ 'desc' => ujic_get_styles(true)
49
+ ),
50
+ 'thedate' => array(
51
+ 'std' => '',
52
+ 'type' => 'datapick',
53
+ 'label' => __('Expire Date', 'ujicountdown'),
54
+ 'desc' => __('Select the date to expire', 'ujicountdown'),
55
+ ),
56
+ 'thetime' => array(
57
+ 'type' => 'timepick',
58
+ 'label' => __('Time', 'ujicountdown'),
59
+ 'desc' => __('Select the time to expire', 'ujicountdown'),
60
+ 'options_h' => ujic_get_datetime(23),
61
+ 'options_m' => ujic_get_datetime(59),
62
+
63
+ ),
64
+ 'thexpi' => array(
65
+ 'std' => '',
66
+ 'std2' => 'http://',
67
+ 'type' => 'expiry',
68
+ 'fname' => __('Hide the countdown: ', 'ujicountdown'),
69
+ 'fname2' => __('Or go to URL: ', 'ujicountdown'),
70
+ 'label' => __('After Expiry', 'ujicountdown'),
71
+ 'desc' => __('Select option after expiry', 'ujicountdown')
72
+ )
73
+ ),
74
+ 'shortcode' => '[ujicountdown id="{{style}}" expire="{{thedate}} {{thetime}}:{{thetime_}}" hide="{{thexpi}}" url="{{thexpi_}}"]',
75
+ 'popup_title' => __('Insert Countdown Shortcode', 'ujicountdown')
76
+
77
+ );
78
+
79
+ ?>
assets/tinymce/css/jquery-ui.min.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*! jQuery UI - v1.10.3 - 2013-05-03
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
+ * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(../images/jq_UI/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(../images/jq_UI/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(../images/jq_UI/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(../images/jq_UI/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jq_UI/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(../images/jq_UI/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(../images/jq_UI/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(../images/jq_UI/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/jq_UI/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/jq_UI/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/jq_UI/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/jq_UI/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/jq_UI/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/jq_UI/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(../images/jq_UI/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(../images/jq_UI/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
assets/tinymce/css/popup.css ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ i.mce-i-icon {
2
+ font: 400 20px/1 dashicons;
3
+ padding: 0;
4
+ vertical-align: top;
5
+ speak: none;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ margin-left: -2px;
9
+ padding-right: 2px
10
+ }
11
+
12
+ /* GLOBAL
13
+ ------------------------------------------------------- */
14
+ #ujic-popup {
15
+ width: 560px;
16
+ font: 12px/20px Arial, Helvetica, sans-serif;
17
+ overflow: hidden;
18
+ }
19
+
20
+ /* form side */
21
+ #ujic-sc-form-wrap {
22
+ width: 550px;
23
+ float: left;
24
+ }
25
+ #ujic-sc-form-wrap #ujic-sc-form-head {
26
+ width: 520px;
27
+ padding: 15px;
28
+ color: #fff;
29
+ font-weight: bold;
30
+ line-height: 1;
31
+ text-shadow: 0 -1px 0 #000;
32
+ background-color: #404040;
33
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#404040), to(#393939));
34
+ background-image: -webkit-linear-gradient(top, #404040, #393939);
35
+ background-image: -moz-linear-gradient(top, #404040, #393939);
36
+ background-image: -ms-linear-gradient(top, #404040, #393939);
37
+ background-image: -o-linear-gradient(top, #404040, #393939);
38
+ background-image: linear-gradient(top, #404040, #393939);
39
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#404040', EndColorStr='#393939');
40
+ }
41
+ #ujic-popup.no_preview #ujic-sc-form-wrap #ujic-sc-form-head {
42
+ width: 530px;
43
+ }
44
+ #ujic-sc-form-wrap #ujic-sc-form {
45
+ width: 490px;
46
+ padding: 15px;
47
+ }
48
+
49
+
50
+ /* FORM
51
+ ------------------------------------------------------- */
52
+
53
+ #ujic-sc-form-table {
54
+ width: 530px;
55
+ }
56
+ #ujic-sc-form-table tbody tr.form-row {
57
+ display: block;
58
+ padding: 5px 0;
59
+ border-bottom: solid 1px #eaeaea;
60
+ }
61
+ #ujic-sc-form-table tbody:last-child tr.form-row {
62
+ border-bottom: none;
63
+ }
64
+ #ujic-sc-form-table tbody tr.form-row .label {
65
+ width: 130px;
66
+ text-align: left;
67
+ vertical-align: top;
68
+ line-height: 35px;
69
+ padding-right: 20px;
70
+ }
71
+ #ujic-sc-form-table tbody tr.form-row .field {
72
+ width: 370px;
73
+ }
74
+ #ujic-sc-form-table tbody tr.form-row .ujic-insert {
75
+ color: #fff;
76
+ }
77
+
78
+ /* child rows, sortable */
79
+ #ujic-sc-form-table .has-child #form-child-add {
80
+ display: block;
81
+ width: 520px;
82
+ -moz-border-radius: 5px;
83
+ border-radius: 5px;
84
+ padding: 0;
85
+ height: 30px;
86
+ line-height: 30px;
87
+ margin-bottom: 20px;
88
+ font-weight: bold;
89
+ font-size: 16px;
90
+ text-align: center;
91
+ }
92
+ #ujic-sc-form-table .has-child .child-clone-rows {
93
+ display: block;
94
+ }
95
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row {
96
+ padding: 8px 15px;
97
+ background: #f7f7f7;
98
+ border: solid 1px #e0e0e0;
99
+ margin-bottom: 10px;
100
+ cursor: move;
101
+ -moz-border-radius: 5px;
102
+ border-radius: 5px;
103
+ }
104
+ #ujic-sc-form-table .has-child .sortable-placeholder {
105
+ border: dashed 2px #e0e0e0;
106
+ margin-bottom: 10px;
107
+ -moz-border-radius: 5px;
108
+ border-radius: 5px;
109
+ background: #f7f7f7;
110
+ height: 40px;
111
+ }
112
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-form {
113
+ display: block;
114
+ }
115
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-form .child-clone-row-form-row {
116
+ display: block;
117
+ padding: 7px 0;
118
+ border-bottom: solid 1px #ddd;
119
+ }
120
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-form .child-clone-row-form-row .child-clone-row-label label {
121
+ display: block;
122
+ font-weight: bold;
123
+ font-style: italic;
124
+ padding-bottom: 7px;
125
+ line-height: 1;
126
+ }
127
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-remove {
128
+ color: #FF0000;
129
+ padding: 1px;
130
+ }
131
+ #ujic-sc-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-remove:hover {
132
+ color: #fff;
133
+ background: #FF0000;
134
+ }
135
+
136
+ /* form elements */
137
+
138
+ /* - all */
139
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-text,
140
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-textarea,
141
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-select {
142
+ width: auto;
143
+ padding: 5px 10px;
144
+ background: #f7f7f7;
145
+ border: none;
146
+ border-left: solid 1px #ddd;
147
+ border-top: solid 1px #ddd;
148
+ -moz-border-radius: 5px;
149
+ border-radius: 5px;
150
+ }
151
+ #ujic-sc-form-table tbody tr.form-row.has-child .ujic-form-text,
152
+ #ujic-sc-form-table tbody tr.form-row.has-child .ujic-form-textarea,
153
+ #ujic-sc-form-table tbody tr.form-row.has-child .ujic-form-select {
154
+ background: #fff;
155
+ width: 485px;
156
+ }
157
+
158
+ /* - textarea */
159
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-textarea {
160
+ height: 120px;
161
+ }
162
+ #ujic-sc-form-table tbody tr.form-row.has-child .ujic-form-textarea {
163
+ height: 100px;
164
+ }
165
+
166
+ /* - select */
167
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-select {
168
+ display: block;
169
+ height: 28px;
170
+ }
171
+
172
+ #ujic-sc-form-table tbody tr.form-row #ujic_thetime,
173
+ #ujic-sc-form-table tbody tr.form-row #ujic_thetime_ {
174
+ width: 60px;
175
+ display: inline-block;
176
+ font-size: 14px;
177
+ }
178
+
179
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-expiry{
180
+ width: 220px;
181
+ margin-left: 35px;
182
+ }
183
+
184
+ #ujic-sc-form-table tbody tr.form-row #ujic-form-expiry-url{
185
+ margin-top: 10px;
186
+ }
187
+
188
+ #ujic-sc-form-table tbody tr.form-row.has-child .ujic-form-select {
189
+ width: auto;
190
+ height: 25px;
191
+ }
192
+
193
+ /* - desc */
194
+ #ujic-sc-form-table tbody tr.form-row .field .ujic-form-desc,
195
+ #ujic-sc-form-table tbody tr.form-row .child-clone-row-desc {
196
+ display: block;
197
+ font-size: 12px;
198
+ color: #aaa;
199
+ font-style: italic;
200
+ padding-top: 3px;
201
+ }
202
+
203
+ /* Hide outline on focus */
204
+ #content_ujic_button { outline: none; }
205
+
206
+
207
+ /* - datapicker */
208
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-datapick {
209
+ height: 26px;
210
+ width: 180px;
211
+ background: #f7f7f7 url(../images/data-picker.png) right top no-repeat;
212
+
213
+ }
214
+
215
+ /* CSS for high-resolution devices */
216
+ @media
217
+ (-webkit-min-device-pixel-ratio: 2),
218
+ (min-resolution: 192dpi) {
219
+ /* - datapicker */
220
+ #ujic-sc-form-table tbody tr.form-row .ujic-form-datapick {
221
+ background: #f7f7f7 url(../images/data-picker.png) top right no-repeat;
222
+ }
223
+ }
assets/tinymce/get_wp.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $absolute_path = __FILE__;
4
+ $path_to_file = explode( 'wp-content', $absolute_path );
5
+ $path_to_wp = $path_to_file[0];
6
+
7
+ // Access WordPress
8
+ require_once( $path_to_wp . '/wp-load.php' );
9
+
10
+
11
+ ?>
assets/tinymce/images/data-picker.png ADDED
Binary file
assets/tinymce/images/data-picker@2.png ADDED
Binary file
images/icon_large.png → assets/tinymce/images/icon.png RENAMED
Binary file
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_flat_75_ffffff_40x100.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_55_fbf9ee_1x400.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_75_dadada_1x400.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_glass_75_e6e6e6_1x400.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-bg_highlight-soft_75_cccccc_1x100.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_222222_256x240.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_2e83ff_256x240.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_454545_256x240.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_888888_256x240.png RENAMED
File without changes
{inc/css/images → assets/tinymce/images/jq_UI}/ui-icons_cd0a0a_256x240.png RENAMED
File without changes
assets/tinymce/js/base64.js ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * More info at: http://phpjs.org
3
+ *
4
+ * This is version: 3.24
5
+ * php.js is copyright 2011 Kevin van Zonneveld.
6
+ *
7
+ * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
8
+ * (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
9
+ * (http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jonas Raoni
10
+ * Soares Silva (http://www.jsfromhell.com), Jack, Philip Peterson, Ates Goral
11
+ * (http://magnetiq.com), Legaev Andrey, Ratheous, Alex, Martijn Wieringa,
12
+ * Nate, lmeyrick (https://sourceforge.net/projects/bcmath-js/), Enrique
13
+ * Gonzalez, Philippe Baumann, Rafał Kukawski (http://blog.kukawski.pl),
14
+ * Webtoolkit.info (http://www.webtoolkit.info/), Ole Vrijenhoek, Ash Searle
15
+ * (http://hexmen.com/blog/), travc, Carlos R. L. Rodrigues
16
+ * (http://www.jsfromhell.com), Jani Hartikainen, stag019, GeekFG
17
+ * (http://geekfg.blogspot.com), WebDevHobo (http://webdevhobo.blogspot.com/),
18
+ * Erkekjetter, pilus, Rafał Kukawski (http://blog.kukawski.pl/), Johnny Mast
19
+ * (http://www.phpvrouwen.nl), T.Wild,
20
+ * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
21
+ * d3x, Michael Grier, Andrea Giammarchi (http://webreflection.blogspot.com),
22
+ * marrtins, Mailfaker (http://www.weedem.fr/), Steve Hilder, gettimeofday,
23
+ * mdsjack (http://www.mdsjack.bo.it), felix, majak, Steven Levithan
24
+ * (http://blog.stevenlevithan.com), Mirek Slugen, Oleg Eremeev, Felix
25
+ * Geisendoerfer (http://www.debuggable.com/felix), Martin
26
+ * (http://www.erlenwiese.de/), gorthaur, Lars Fischer, Joris, AJ, Paul Smith,
27
+ * Tim de Koning (http://www.kingsquare.nl), KELAN, Josh Fraser
28
+ * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
29
+ * Chris, Marc Palau, Kevin van Zonneveld (http://kevin.vanzonneveld.net/),
30
+ * Arpad Ray (mailto:arpad@php.net), Breaking Par Consulting Inc
31
+ * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
32
+ * Nathan, Karol Kowalski, David, Dreamer, Diplom@t (http://difane.com/), Caio
33
+ * Ariede (http://caioariede.com), Robin, Imgen Tata (http://www.myipdf.com/),
34
+ * Pellentesque Malesuada, saulius, Aman Gupta, Sakimori, Tyler Akins
35
+ * (http://rumkin.com), Thunder.m, Public Domain
36
+ * (http://www.json.org/json2.js), Michael White, Kankrelune
37
+ * (http://www.webfaktory.info/), Alfonso Jimenez
38
+ * (http://www.alfonsojimenez.com), Frank Forte, vlado houba, Marco, Billy,
39
+ * David James, madipta, noname, sankai, class_exists, Jalal Berrami, ger,
40
+ * Itsacon (http://www.itsacon.net/), Scott Cariss, nobbler, Arno, Denny
41
+ * Wardhana, ReverseSyntax, Mateusz "loonquawl" Zalega, Slawomir Kaniecki,
42
+ * Francois, Fox, mktime, Douglas Crockford (http://javascript.crockford.com),
43
+ * john (http://www.jd-tech.net), Oskar Larsson Högfeldt
44
+ * (http://oskar-lh.name/), marc andreu, Nick Kolosov (http://sammy.ru), date,
45
+ * Marc Jansen, Steve Clay, Olivier Louvignes (http://mg-crea.com/), Soren
46
+ * Hansen, merabi, Subhasis Deb, josh, T0bsn, Tim Wiel, Brad Touesnard, MeEtc
47
+ * (http://yass.meetcweb.com), Peter-Paul Koch
48
+ * (http://www.quirksmode.org/js/beat.html), Pyerre, Jon Hohle, duncan, Bayron
49
+ * Guevara, Adam Wallner (http://web2.bitbaro.hu/), paulo kuong, Gilbert,
50
+ * Lincoln Ramsay, Thiago Mata (http://thiagomata.blog.com), Linuxworld,
51
+ * lmeyrick (https://sourceforge.net/projects/bcmath-js/this.), djmix, Bryan
52
+ * Elliott, David Randall, Sanjoy Roy, jmweb, Francesco, Stoyan Kyosev
53
+ * (http://www.svest.org/), J A R, kenneth, T. Wild, Ole Vrijenhoek
54
+ * (http://www.nervous.nl/), Raphael (Ao RUDLER), Shingo, LH, JB, nord_ua, jd,
55
+ * JT, Thomas Beaucourt (http://www.webapp.fr), Ozh, XoraX
56
+ * (http://www.xorax.info), EdorFaus, Eugene Bulkin (http://doubleaw.com/),
57
+ * Der Simon (http://innerdom.sourceforge.net/), 0m3r, echo is bad,
58
+ * FremyCompany, stensi, Kristof Coomans (SCK-CEN Belgian Nucleair Research
59
+ * Centre), Devan Penner-Woelk, Pierre-Luc Paour, Martin Pool, Brant Messenger
60
+ * (http://www.brantmessenger.com/), Kirk Strobeck, Saulo Vallory, Christoph,
61
+ * Wagner B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
62
+ * (http://carrot.org/), Daniel Esteban, strftime, Rick Waldron, Mick@el,
63
+ * Anton Ongson, Bjorn Roesbeke (http://www.bjornroesbeke.be/), Simon Willison
64
+ * (http://simonwillison.net), Gabriel Paderni, Philipp Lenssen, Marco van
65
+ * Oort, Bug?, Blues (http://tech.bluesmoon.info/), Tomasz Wesolowski, rezna,
66
+ * Eric Nagel, Evertjan Garretsen, Luke Godfrey, Pul, Bobby Drake, uestla,
67
+ * Alan C, Ulrich, Zahlii, Yves Sucaet, sowberry, Norman "zEh" Fuchs, hitwork,
68
+ * johnrembo, Brian Tafoya (http://www.premasolutions.com/), Nick Callen,
69
+ * Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Philippe
70
+ * Jausions (http://pear.php.net/user/jausions), Aidan Lister
71
+ * (http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
72
+ * strcmp, Taras Bogach, jpfle, Alexander Ermolaev
73
+ * (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
74
+ * dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
75
+ * (http://www.pedrotainha.com), James, penutbutterjelly, Arnout Kazemier
76
+ * (http://www.3rd-Eden.com), 3D-GRAF, daniel airton wermann
77
+ * (http://wermann.com.br), jakes, Yannoo, FGFEmperor, gabriel paderni, Atli
78
+ * Þór, Maximusya, Diogo Resende, Rival, Howard Yeend, Allan Jensen
79
+ * (http://www.winternet.no), davook, Benjamin Lupton, baris ozdil, Greg
80
+ * Frazier, Manish, Matt Bradley, Cord, fearphage
81
+ * (http://http/my.opera.com/fearphage/), Matteo, Victor, taith, Tim de
82
+ * Koning, Ryan W Tenney (http://ryan.10e.us), Tod Gentille, Alexander M
83
+ * Beedie, Riddler (http://www.frontierwebdev.com/), Luis Salazar
84
+ * (http://www.freaky-media.com/), Rafał Kukawski, T.J. Leahy, Luke Smith
85
+ * (http://lucassmith.name), Kheang Hok Chin (http://www.distantia.ca/),
86
+ * Russell Walker (http://www.nbill.co.uk/), Jamie Beck
87
+ * (http://www.terabit.ca/), Garagoth, Andrej Pavlovic, Dino, Le Torbi
88
+ * (http://www.letorbi.de/), Ben (http://benblume.co.uk/), DtTvB
89
+ * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Michael, Chris
90
+ * McMacken, setcookie, YUI Library:
91
+ * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Andreas,
92
+ * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, rem, Josep Sanz
93
+ * (http://www.ws3.es/), Cagri Ekin, Lorenzo Pisani, incidence, Amirouche, Jay
94
+ * Klehr, Amir Habibi (http://www.residence-mixte.com/), Tony, booeyOH, meo,
95
+ * William, Greenseed, Yen-Wei Liu, Ben Bryan, Leslie Hoare, mk.keck
96
+ *
97
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
98
+ * and GPL (GPL-LICENSE.txt) licenses.
99
+ *
100
+ * Permission is hereby granted, free of charge, to any person obtaining a
101
+ * copy of this software and associated documentation files (the
102
+ * "Software"), to deal in the Software without restriction, including
103
+ * without limitation the rights to use, copy, modify, merge, publish,
104
+ * distribute, sublicense, and/or sell copies of the Software, and to
105
+ * permit persons to whom the Software is furnished to do so, subject to
106
+ * the following conditions:
107
+ *
108
+ * The above copyright notice and this permission notice shall be included
109
+ * in all copies or substantial portions of the Software.
110
+ *
111
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
112
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
114
+ * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
115
+ * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
116
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
117
+ * OTHER DEALINGS IN THE SOFTWARE.
118
+ */
119
+
120
+
121
+ function base64_decode (data) {
122
+ // Decodes string using MIME base64 algorithm
123
+ //
124
+ // version: 1103.1210
125
+ // discuss at: http://phpjs.org/functions/base64_decode
126
+ // + original by: Tyler Akins (http://rumkin.com)
127
+ // + improved by: Thunder.m
128
+ // + input by: Aman Gupta
129
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
130
+ // + bugfixed by: Onno Marsman
131
+ // + bugfixed by: Pellentesque Malesuada
132
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
133
+ // + input by: Brett Zamir (http://brett-zamir.me)
134
+ // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
135
+ // - depends on: utf8_decode
136
+ // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');
137
+ // * returns 1: 'Kevin van Zonneveld'
138
+ // mozilla has this native
139
+ // - but breaks in 2.0.0.12!
140
+ //if (typeof this.window['btoa'] == 'function') {
141
+ // return btoa(data);
142
+ //}
143
+ var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
144
+ var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
145
+ ac = 0,
146
+ dec = "",
147
+ tmp_arr = [];
148
+
149
+ if (!data) {
150
+ return data;
151
+ }
152
+
153
+ data += '';
154
+
155
+ do { // unpack four hexets into three octets using index points in b64
156
+ h1 = b64.indexOf(data.charAt(i++));
157
+ h2 = b64.indexOf(data.charAt(i++));
158
+ h3 = b64.indexOf(data.charAt(i++));
159
+ h4 = b64.indexOf(data.charAt(i++));
160
+
161
+ bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
162
+
163
+ o1 = bits >> 16 & 0xff;
164
+ o2 = bits >> 8 & 0xff;
165
+ o3 = bits & 0xff;
166
+
167
+ if (h3 == 64) {
168
+ tmp_arr[ac++] = String.fromCharCode(o1);
169
+ } else if (h4 == 64) {
170
+ tmp_arr[ac++] = String.fromCharCode(o1, o2);
171
+ } else {
172
+ tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
173
+ }
174
+ } while (i < data.length);
175
+
176
+ dec = tmp_arr.join('');
177
+ dec = this.utf8_decode(dec);
178
+
179
+ return dec;
180
+ }
181
+
182
+ function base64_encode (data) {
183
+ // Encodes string using MIME base64 algorithm
184
+ //
185
+ // version: 1103.1210
186
+ // discuss at: http://phpjs.org/functions/base64_encode
187
+ // + original by: Tyler Akins (http://rumkin.com)
188
+ // + improved by: Bayron Guevara
189
+ // + improved by: Thunder.m
190
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
191
+ // + bugfixed by: Pellentesque Malesuada
192
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
193
+ // - depends on: utf8_encode
194
+ // * example 1: base64_encode('Kevin van Zonneveld');
195
+ // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='
196
+ // mozilla has this native
197
+ // - but breaks in 2.0.0.12!
198
+ //if (typeof this.window['atob'] == 'function') {
199
+ // return atob(data);
200
+ //}
201
+ var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
202
+ var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
203
+ ac = 0,
204
+ enc = "",
205
+ tmp_arr = [];
206
+
207
+ if (!data) {
208
+ return data;
209
+ }
210
+
211
+ data = this.utf8_encode(data + '');
212
+
213
+ do { // pack three octets into four hexets
214
+ o1 = data.charCodeAt(i++);
215
+ o2 = data.charCodeAt(i++);
216
+ o3 = data.charCodeAt(i++);
217
+
218
+ bits = o1 << 16 | o2 << 8 | o3;
219
+
220
+ h1 = bits >> 18 & 0x3f;
221
+ h2 = bits >> 12 & 0x3f;
222
+ h3 = bits >> 6 & 0x3f;
223
+ h4 = bits & 0x3f;
224
+
225
+ // use hexets to index into b64, and append result to encoded string
226
+ tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
227
+ } while (i < data.length);
228
+
229
+ enc = tmp_arr.join('');
230
+
231
+ switch (data.length % 3) {
232
+ case 1:
233
+ enc = enc.slice(0, -2) + '==';
234
+ break;
235
+ case 2:
236
+ enc = enc.slice(0, -1) + '=';
237
+ break;
238
+ }
239
+
240
+ return enc;
241
+ }
242
+
243
+ function utf8_decode (str_data) {
244
+ // Converts a UTF-8 encoded string to ISO-8859-1
245
+ //
246
+ // version: 1103.1210
247
+ // discuss at: http://phpjs.org/functions/utf8_decode
248
+ // + original by: Webtoolkit.info (http://www.webtoolkit.info/)
249
+ // + input by: Aman Gupta
250
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
251
+ // + improved by: Norman "zEh" Fuchs
252
+ // + bugfixed by: hitwork
253
+ // + bugfixed by: Onno Marsman
254
+ // + input by: Brett Zamir (http://brett-zamir.me)
255
+ // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
256
+ // * example 1: utf8_decode('Kevin van Zonneveld');
257
+ // * returns 1: 'Kevin van Zonneveld'
258
+ var tmp_arr = [],
259
+ i = 0,
260
+ ac = 0,
261
+ c1 = 0,
262
+ c2 = 0,
263
+ c3 = 0;
264
+
265
+ str_data += '';
266
+
267
+ while (i < str_data.length) {
268
+ c1 = str_data.charCodeAt(i);
269
+ if (c1 < 128) {
270
+ tmp_arr[ac++] = String.fromCharCode(c1);
271
+ i++;
272
+ } else if (c1 > 191 && c1 < 224) {
273
+ c2 = str_data.charCodeAt(i + 1);
274
+ tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
275
+ i += 2;
276
+ } else {
277
+ c2 = str_data.charCodeAt(i + 1);
278
+ c3 = str_data.charCodeAt(i + 2);
279
+ tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
280
+ i += 3;
281
+ }
282
+ }
283
+
284
+ return tmp_arr.join('');
285
+ }
286
+
287
+ function utf8_encode (argString) {
288
+ // Encodes an ISO-8859-1 string to UTF-8
289
+ //
290
+ // version: 1103.1210
291
+ // discuss at: http://phpjs.org/functions/utf8_encode
292
+ // + original by: Webtoolkit.info (http://www.webtoolkit.info/)
293
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
294
+ // + improved by: sowberry
295
+ // + tweaked by: Jack
296
+ // + bugfixed by: Onno Marsman
297
+ // + improved by: Yves Sucaet
298
+ // + bugfixed by: Onno Marsman
299
+ // + bugfixed by: Ulrich
300
+ // * example 1: utf8_encode('Kevin van Zonneveld');
301
+ // * returns 1: 'Kevin van Zonneveld'
302
+ var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");
303
+ var utftext = "",
304
+ start, end, stringl = 0;
305
+
306
+ start = end = 0;
307
+ stringl = string.length;
308
+ for (var n = 0; n < stringl; n++) {
309
+ var c1 = string.charCodeAt(n);
310
+ var enc = null;
311
+
312
+ if (c1 < 128) {
313
+ end++;
314
+ } else if (c1 > 127 && c1 < 2048) {
315
+ enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);
316
+ } else {
317
+ enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);
318
+ }
319
+ if (enc !== null) {
320
+ if (end > start) {
321
+ utftext += string.slice(start, end);
322
+ }
323
+ utftext += enc;
324
+ start = end = n + 1;
325
+ }
326
+ }
327
+
328
+ if (end > start) {
329
+ utftext += string.slice(start, stringl);
330
+ }
331
+
332
+ return utftext;
333
+ }
assets/tinymce/js/jquery.appendo.js ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Appendo Plugin for jQuery v1.01
3
+ * Creates interface to create duplicate clones of last table row (usually for forms)
4
+ * (c) 2008 Kelly Hallman. Free software released under MIT License.
5
+ * See http://deepliquid.com/content/Appendo.html for more info
6
+ */
7
+
8
+ // Attach appendo as a jQuery plugin
9
+ jQuery.fn.appendo = function(opt)
10
+ {
11
+ this.each(function() { jQuery.appendo.init(this,opt); });
12
+ return this;
13
+ };
14
+
15
+ // appendo namespace
16
+ jQuery.appendo = function() {
17
+
18
+ // Create a closure so that we can refer to "this" correctly down the line
19
+ var myself = this;
20
+
21
+ // Global Options
22
+ // These can be set with inline Javascript like so:
23
+ // jQuery.appendo.opt.maxRows = 5;
24
+ // $.appendo.opt.allowDelete = false;
25
+ // (no need, in fact you shouldn't, wrap in jQuery(document).ready() etc)
26
+ this.opt = { };
27
+
28
+ this.init = function(obj,opt) {
29
+
30
+ // Extend the defaults with global options and options given, if any
31
+ var options = jQuery.extend({
32
+ labelAdd: 'Add Row',
33
+ labelDel: 'Remove',
34
+ allowDelete: true,
35
+ // copyHandlers does not seem to work
36
+ // it's been removed from the docs for now...
37
+ copyHandlers: false,
38
+ focusFirst: true,
39
+ onAdd: function() { return true; },
40
+ onDel: function() { return true; },
41
+ maxRows: 0,
42
+ wrapClass: 'appendoButtons',
43
+ wrapStyle: { padding: '.4em .2em .5em' },
44
+ buttonStyle: { marginRight: '.5em' },
45
+ subSelect: 'tr:last'
46
+ },
47
+ myself.opt,
48
+ opt
49
+ );
50
+
51
+ // Store clone of last table row
52
+ var $cpy = jQuery(obj).find(options.subSelect).clone(options.copyHandlers);
53
+ // We consider this starting off with 1 row
54
+ var rows = 1;
55
+ // Create two button objects
56
+ var $add_btn = jQuery('#form-child-add').click(clicked_add),
57
+ $del_btn = new_button(options.labelDel).click(clicked_del).hide()
58
+ ;
59
+
60
+ // Append a row to table instance
61
+ function add_row()
62
+ {
63
+ var $dup = $cpy.clone(options.copyHandlers);
64
+ $dup.appendTo(obj);
65
+ update_buttons(1);
66
+ if (typeof(options.onAdd) == "function") options.onAdd($dup);
67
+ if (!!options.focusFirst) $dup.find('input:first').focus();
68
+ };
69
+
70
+ // Remove last row from table instance
71
+ function del_row()
72
+ {
73
+ var $row = jQuery(obj).find(options.subSelect);
74
+ if ((typeof(options.onDel) != "function") || options.onDel($row))
75
+ {
76
+ $row.remove();
77
+ update_buttons(-1);
78
+ }
79
+ };
80
+
81
+ // Updates the button states after rows change
82
+ function update_buttons(rowdelta)
83
+ {
84
+ // Update rows if a delta is provided
85
+ rows = rows + (rowdelta || 0);
86
+ // Disable the add button if maxRows is set and we have that many rows
87
+ // $add_btn.attr('disabled',(!options.maxRows || (rows < options.maxRows))?false:true);
88
+ // Show remove button if we've added rows and allowDelete is set
89
+ (options.allowDelete && (rows > 1))? $del_btn.show(): $del_btn.hide();
90
+ };
91
+
92
+ // Returns (jQuery) button objects with label
93
+ function new_button(label)
94
+ {
95
+ return jQuery('<button />')
96
+ .css(options.buttonStyle)
97
+ .html(label);
98
+ };
99
+
100
+ // This function can be returned to kill a received event
101
+ function nothing(e)
102
+ {
103
+ e.stopPropagation();
104
+ e.preventDefault();
105
+ return false;
106
+ };
107
+
108
+ // Handles a click on the add button
109
+ function clicked_add(e)
110
+ {
111
+ if (!options.maxRows || (rows < options.maxRows)) add_row();
112
+ return nothing(e);
113
+ };
114
+
115
+ // Handles a click event on the remove button
116
+ function clicked_del(e)
117
+ {
118
+ if (rows > 1) del_row();
119
+ return nothing(e);
120
+ };
121
+
122
+ // Add the buttons after the table instance
123
+ /*
124
+ jQuery('<div />')
125
+ .addClass(options.wrapClass)
126
+ .css(options.wrapStyle)
127
+ .append( $add_btn, $del_btn )
128
+ .insertAfter(obj);
129
+ */
130
+
131
+ // Update the buttons
132
+ update_buttons();
133
+
134
+ };
135
+ return this;
136
+ }();
assets/tinymce/js/jquery.livequery.js ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2
+ * Dual licensed under the MIT (MIT_LICENSE.txt)
3
+ * and GPL Version 2 (GPL_LICENSE.txt) licenses.
4
+ *
5
+ * Version: 1.1.1
6
+ * Requires jQuery 1.3+
7
+ * Docs: http://docs.jquery.com/Plugins/livequery
8
+ */
9
+
10
+ (function($) {
11
+
12
+ $.extend($.fn, {
13
+ livequery: function(type, fn, fn2) {
14
+ var self = this, q;
15
+
16
+ // Handle different call patterns
17
+ if ($.isFunction(type))
18
+ fn2 = fn, fn = type, type = undefined;
19
+
20
+ // See if Live Query already exists
21
+ $.each( $.livequery.queries, function(i, query) {
22
+ if ( self.selector == query.selector && self.context == query.context &&
23
+ type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
24
+ // Found the query, exit the each loop
25
+ return (q = query) && false;
26
+ });
27
+
28
+ // Create new Live Query if it wasn't found
29
+ q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
30
+
31
+ // Make sure it is running
32
+ q.stopped = false;
33
+
34
+ // Run it immediately for the first time
35
+ q.run();
36
+
37
+ // Contnue the chain
38
+ return this;
39
+ },
40
+
41
+ expire: function(type, fn, fn2) {
42
+ var self = this;
43
+
44
+ // Handle different call patterns
45
+ if ($.isFunction(type))
46
+ fn2 = fn, fn = type, type = undefined;
47
+
48
+ // Find the Live Query based on arguments and stop it
49
+ $.each( $.livequery.queries, function(i, query) {
50
+ if ( self.selector == query.selector && self.context == query.context &&
51
+ (!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
52
+ $.livequery.stop(query.id);
53
+ });
54
+
55
+ // Continue the chain
56
+ return this;
57
+ }
58
+ });
59
+
60
+ $.livequery = function(selector, context, type, fn, fn2) {
61
+ this.selector = selector;
62
+ this.context = context;
63
+ this.type = type;
64
+ this.fn = fn;
65
+ this.fn2 = fn2;
66
+ this.elements = [];
67
+ this.stopped = false;
68
+
69
+ // The id is the index of the Live Query in $.livequery.queries
70
+ this.id = $.livequery.queries.push(this)-1;
71
+
72
+ // Mark the functions for matching later on
73
+ fn.$lqguid = fn.$lqguid || $.livequery.guid++;
74
+ if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
75
+
76
+ // Return the Live Query
77
+ return this;
78
+ };
79
+
80
+ $.livequery.prototype = {
81
+ stop: function() {
82
+ var query = this;
83
+
84
+ if ( this.type )
85
+ // Unbind all bound events
86
+ this.elements.unbind(this.type, this.fn);
87
+ else if (this.fn2)
88
+ // Call the second function for all matched elements
89
+ this.elements.each(function(i, el) {
90
+ query.fn2.apply(el);
91
+ });
92
+
93
+ // Clear out matched elements
94
+ this.elements = [];
95
+
96
+ // Stop the Live Query from running until restarted
97
+ this.stopped = true;
98
+ },
99
+
100
+ run: function() {
101
+ // Short-circuit if stopped
102
+ if ( this.stopped ) return;
103
+ var query = this;
104
+
105
+ var oEls = this.elements,
106
+ els = $(this.selector, this.context),
107
+ nEls = els.not(oEls);
108
+
109
+ // Set elements to the latest set of matched elements
110
+ this.elements = els;
111
+
112
+ if (this.type) {
113
+ // Bind events to newly matched elements
114
+ nEls.bind(this.type, this.fn);
115
+
116
+ // Unbind events to elements no longer matched
117
+ if (oEls.length > 0)
118
+ $.each(oEls, function(i, el) {
119
+ if ( $.inArray(el, els) < 0 )
120
+ $.event.remove(el, query.type, query.fn);
121
+ });
122
+ }
123
+ else {
124
+ // Call the first function for newly matched elements
125
+ nEls.each(function() {
126
+ query.fn.apply(this);
127
+ });
128
+
129
+ // Call the second function for elements no longer matched
130
+ if ( this.fn2 && oEls.length > 0 )
131
+ $.each(oEls, function(i, el) {
132
+ if ( $.inArray(el, els) < 0 )
133
+ query.fn2.apply(el);
134
+ });
135
+ }
136
+ }
137
+ };
138
+
139
+ $.extend($.livequery, {
140
+ guid: 0,
141
+ queries: [],
142
+ queue: [],
143
+ running: false,
144
+ timeout: null,
145
+
146
+ checkQueue: function() {
147
+ if ( $.livequery.running && $.livequery.queue.length ) {
148
+ var length = $.livequery.queue.length;
149
+ // Run each Live Query currently in the queue
150
+ while ( length-- )
151
+ $.livequery.queries[ $.livequery.queue.shift() ].run();
152
+ }
153
+ },
154
+
155
+ pause: function() {
156
+ // Don't run anymore Live Queries until restarted
157
+ $.livequery.running = false;
158
+ },
159
+
160
+ play: function() {
161
+ // Restart Live Queries
162
+ $.livequery.running = true;
163
+ // Request a run of the Live Queries
164
+ $.livequery.run();
165
+ },
166
+
167
+ registerPlugin: function() {
168
+ $.each( arguments, function(i,n) {
169
+ // Short-circuit if the method doesn't exist
170
+ if (!$.fn[n]) return;
171
+
172
+ // Save a reference to the original method
173
+ var old = $.fn[n];
174
+
175
+ // Create a new method
176
+ $.fn[n] = function() {
177
+ // Call the original method
178
+ var r = old.apply(this, arguments);
179
+
180
+ // Request a run of the Live Queries
181
+ $.livequery.run();
182
+
183
+ // Return the original methods result
184
+ return r;
185
+ }
186
+ });
187
+ },
188
+
189
+ run: function(id) {
190
+ if (id != undefined) {
191
+ // Put the particular Live Query in the queue if it doesn't already exist
192
+ if ( $.inArray(id, $.livequery.queue) < 0 )
193
+ $.livequery.queue.push( id );
194
+ }
195
+ else
196
+ // Put each Live Query in the queue if it doesn't already exist
197
+ $.each( $.livequery.queries, function(id) {
198
+ if ( $.inArray(id, $.livequery.queue) < 0 )
199
+ $.livequery.queue.push( id );
200
+ });
201
+
202
+ // Clear timeout if it already exists
203
+ if ($.livequery.timeout) clearTimeout($.livequery.timeout);
204
+ // Create a timeout to check the queue and actually run the Live Queries
205
+ $.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
206
+ },
207
+
208
+ stop: function(id) {
209
+ if (id != undefined)
210
+ // Stop are particular Live Query
211
+ $.livequery.queries[ id ].stop();
212
+ else
213
+ // Stop all Live Queries
214
+ $.each( $.livequery.queries, function(id) {
215
+ $.livequery.queries[ id ].stop();
216
+ });
217
+ }
218
+ });
219
+
220
+ // Register core DOM manipulation methods
221
+ $.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove', 'html');
222
+
223
+ // Run Live Queries when the Document is ready
224
+ $(function() { $.livequery.play(); });
225
+
226
+ })(jQuery);
assets/tinymce/js/popup.js ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // start the popup specefic scripts
2
+ // safe to use $
3
+ jQuery(document).ready(function($) {
4
+ var ujics = {
5
+ loadVals: function()
6
+ {
7
+ var shortcode = $('#_ujic_shortcode').text(),
8
+ uShortcode = shortcode;
9
+
10
+ // fill in the gaps eg {{param}}
11
+ $('.ujic-input').each(function() {
12
+ var input = $(this),
13
+ id = input.attr('id'),
14
+ id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
+ re = new RegExp("{{"+id+"}}","g");
16
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
+ uShortcode = uShortcode.replace(re, input.val());
18
+ else uShortcode = uShortcode.replace(re, '');
19
+ });
20
+
21
+ // adds the filled-in shortcode as hidden input
22
+ $('#_ujic_ushortcode').remove();
23
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
+ },
25
+ cLoadVals: function()
26
+ {
27
+ var shortcode = $('#_ujic_cshortcode').text(),
28
+ pShortcode = '';
29
+ shortcodes = '';
30
+
31
+ // fill in the gaps eg {{param}}
32
+ $('.child-clone-row').each(function() {
33
+ var row = $(this),
34
+ rShortcode = shortcode;
35
+
36
+ $('.ujic-cinput', this).each(function() {
37
+ var input = $(this),
38
+ id = input.attr('id'),
39
+ id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
+ re = new RegExp("{{"+id+"}}","g");
41
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
+ rShortcode = rShortcode.replace(re, input.val());
43
+ else rShortcode = rShortcode.replace(re, '');
44
+ });
45
+
46
+ shortcodes = shortcodes + rShortcode + "\n";
47
+ });
48
+
49
+ // adds the filled-in shortcode as hidden input
50
+ $('#_ujic_cshortcodes').remove();
51
+ $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
+
53
+ // add to parent shortcode
54
+ this.loadVals();
55
+ pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
+
57
+ // add updated parent shortcode
58
+ $('#_ujic_ushortcode').remove();
59
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
+ },
61
+ children: function()
62
+ {
63
+ // assign the cloning plugin
64
+ $('.child-clone-rows').appendo({
65
+ subSelect: '> div.child-clone-row:last-child',
66
+ allowDelete: false,
67
+ focusFirst: false
68
+ });
69
+
70
+ // remove button
71
+ $('.child-clone-row-remove').live('click', function() {
72
+ var btn = $(this),
73
+ row = btn.parent();
74
+
75
+ if( $('.child-clone-row').size() > 1 )
76
+ {
77
+ row.remove();
78
+ }
79
+ else
80
+ {
81
+ alert('You need a minimum of one row');
82
+ }
83
+
84
+ return false;
85
+ });
86
+
87
+ // assign jUI sortable
88
+ $( ".child-clone-rows" ).sortable({
89
+ placeholder: "sortable-placeholder",
90
+ items: '.child-clone-row'
91
+
92
+ });
93
+ },
94
+ resizeTB: function()
95
+ {
96
+ var ajaxCont = $('#TB_ajaxContent'),
97
+ tbWindow = $('#TB_window'),
98
+ ujicPopup = $('#ujic-popup');
99
+
100
+ tbWindow.css({
101
+ height: ujicPopup.outerHeight() + 50,
102
+ width: ujicPopup.outerWidth(),
103
+ marginLeft: -(ujicPopup.outerWidth()/2)
104
+ });
105
+
106
+ ajaxCont.css({
107
+ paddingTop: 0,
108
+ paddingLeft: 0,
109
+ paddingRight: 0,
110
+ height: (tbWindow.outerHeight()-47),
111
+ overflow: 'auto', // IMPORTANT
112
+ width: ujicPopup.outerWidth()
113
+ });
114
+
115
+ $('#ujic-popup').addClass('no_preview');
116
+ },
117
+ load: function()
118
+ {
119
+ var ujics = this,
120
+ popup = $('#ujic-popup'),
121
+ form = $('#ujic-sc-form', popup),
122
+ shortcode = $('#_ujic_shortcode', form).text(),
123
+ popupType = $('#_ujic_popup', form).text(),
124
+ uShortcode = '';
125
+
126
+ // resize TB
127
+ ujics.resizeTB();
128
+ $(window).resize(function() { ujics.resizeTB() });
129
+
130
+ // initialise
131
+ ujics.loadVals();
132
+ ujics.children();
133
+ ujics.cLoadVals();
134
+
135
+ // update on children value change
136
+ $('.ujic-cinput', form).live('change', function() {
137
+ ujics.cLoadVals();
138
+ });
139
+
140
+ // update on value change
141
+ $('.ujic-input', form).change(function() {
142
+ ujics.loadVals();
143
+ });
144
+
145
+ $('.ujic-datapick').datepicker({
146
+ dateFormat: 'yy/mm/dd'
147
+ });
148
+
149
+ // when insert is clicked
150
+ $('.ujic-insert', form).click(function() {
151
+ var errors = false;
152
+ var style_id = jQuery("#ujic_style").val();
153
+ var date_id = jQuery("#ujic_thedate").val();
154
+ var url_id = jQuery('#ujic_thexpi_').val();
155
+ if(style_id == ""){
156
+ alert("Please select a style");
157
+ errors = true;
158
+ return;
159
+ }
160
+ if(date_id == ""){
161
+ alert("Please select countdown date");
162
+ errors = true;
163
+ return;
164
+ }
165
+ if(url_id != "" && !isUrl(url_id)){
166
+ alert("Please insert valid link");
167
+ errors = true;
168
+ return;
169
+ }
170
+
171
+ if(parent.tinymce && !errors)
172
+ {
173
+ parent.tinymce.activeEditor.execCommand('mceInsertContent',false,$('#_ujic_ushortcode', form).html());
174
+ tb_remove();
175
+ }
176
+
177
+ });
178
+ }
179
+ }
180
+
181
+ // run
182
+ $('#ujic-popup').livequery( function() { ujics.load(); } );
183
+ });
184
+
185
+ function isUrl(url) {
186
+ var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
187
+ if(RegExp.test(url)){
188
+ return true;
189
+ }else{
190
+ return false;
191
+ }
192
+ }
assets/tinymce/js/popup.old.js ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // start the popup specefic scripts
2
+ // safe to use $
3
+ jQuery(document).ready(function($) {
4
+ var ujics = {
5
+ loadVals: function()
6
+ {
7
+ var shortcode = $('#_ujic_shortcode').text(),
8
+ uShortcode = shortcode;
9
+
10
+ // fill in the gaps eg {{param}}
11
+ $('.ujic-input').each(function() {
12
+ var input = $(this),
13
+ id = input.attr('id'),
14
+ id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
+ re = new RegExp("{{"+id+"}}","g");
16
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
+ uShortcode = uShortcode.replace(re, input.val());
18
+ else uShortcode = uShortcode.replace(re, '');
19
+ });
20
+
21
+ // adds the filled-in shortcode as hidden input
22
+ $('#_ujic_ushortcode').remove();
23
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
+ },
25
+ cLoadVals: function()
26
+ {
27
+ var shortcode = $('#_ujic_cshortcode').text(),
28
+ pShortcode = '';
29
+ shortcodes = '';
30
+
31
+ // fill in the gaps eg {{param}}
32
+ $('.child-clone-row').each(function() {
33
+ var row = $(this),
34
+ rShortcode = shortcode;
35
+
36
+ $('.ujic-cinput', this).each(function() {
37
+ var input = $(this),
38
+ id = input.attr('id'),
39
+ id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
+ re = new RegExp("{{"+id+"}}","g");
41
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
+ rShortcode = rShortcode.replace(re, input.val());
43
+ else rShortcode = rShortcode.replace(re, '');
44
+ });
45
+
46
+ shortcodes = shortcodes + rShortcode + "\n";
47
+ });
48
+
49
+ // adds the filled-in shortcode as hidden input
50
+ $('#_ujic_cshortcodes').remove();
51
+ $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
+
53
+ // add to parent shortcode
54
+ this.loadVals();
55
+ pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
+
57
+ // add updated parent shortcode
58
+ $('#_ujic_ushortcode').remove();
59
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
+ },
61
+ children: function()
62
+ {
63
+ // assign the cloning plugin
64
+ $('.child-clone-rows').appendo({
65
+ subSelect: '> div.child-clone-row:last-child',
66
+ allowDelete: false,
67
+ focusFirst: false
68
+ });
69
+
70
+ // remove button
71
+ $('.child-clone-row-remove').live('click', function() {
72
+ var btn = $(this),
73
+ row = btn.parent();
74
+
75
+ if( $('.child-clone-row').size() > 1 )
76
+ {
77
+ row.remove();
78
+ }
79
+ else
80
+ {
81
+ alert('You need a minimum of one row');
82
+ }
83
+
84
+ return false;
85
+ });
86
+
87
+ // assign jUI sortable
88
+ $( ".child-clone-rows" ).sortable({
89
+ placeholder: "sortable-placeholder",
90
+ items: '.child-clone-row'
91
+
92
+ });
93
+ },
94
+ resizeTB: function()
95
+ {
96
+ var ajaxCont = $('#TB_ajaxContent'),
97
+ tbWindow = $('#TB_window'),
98
+ ujicPopup = $('#ujic-popup');
99
+
100
+ tbWindow.css({
101
+ height: ujicPopup.outerHeight() + 50,
102
+ width: ujicPopup.outerWidth(),
103
+ marginLeft: -(ujicPopup.outerWidth()/2)
104
+ });
105
+
106
+ ajaxCont.css({
107
+ paddingTop: 0,
108
+ paddingLeft: 0,
109
+ paddingRight: 0,
110
+ height: (tbWindow.outerHeight()-47),
111
+ overflow: 'auto', // IMPORTANT
112
+ width: ujicPopup.outerWidth()
113
+ });
114
+
115
+ $('#ujic-popup').addClass('no_preview');
116
+ },
117
+ load: function()
118
+ {
119
+ var ujics = this,
120
+ popup = $('#ujic-popup'),
121
+ form = $('#ujic-sc-form', popup),
122
+ shortcode = $('#_ujic_shortcode', form).text(),
123
+ popupType = $('#_ujic_popup', form).text(),
124
+ uShortcode = '';
125
+
126
+ // resize TB
127
+ ujics.resizeTB();
128
+ $(window).resize(function() { ujics.resizeTB() });
129
+
130
+ // initialise
131
+ ujics.loadVals();
132
+ ujics.children();
133
+ ujics.cLoadVals();
134
+
135
+ // update on children value change
136
+ $('.ujic-cinput', form).live('change', function() {
137
+ ujics.cLoadVals();
138
+ });
139
+
140
+ // update on value change
141
+ $('.ujic-input', form).change(function() {
142
+ ujics.loadVals();
143
+ });
144
+
145
+ $('.ujic-datapick').datepicker({
146
+ dateFormat: 'yy/mm/dd'
147
+ });
148
+
149
+ // when insert is clicked
150
+ $('.ujic-insert', form).click(function() {
151
+ var errors = false;
152
+ var style_id = jQuery("#ujic_style").val();
153
+ var date_id = jQuery("#ujic_thedate").val();
154
+ var url_id = jQuery('#ujic_thexpi_').val();
155
+ if(style_id == ""){
156
+ alert("Please select a style");
157
+ errors = true;
158
+ return;
159
+ }
160
+ if(date_id == ""){
161
+ alert("Please select countdown date");
162
+ errors = true;
163
+ return;
164
+ }
165
+ if(url_id != "" && !isUrl(url_id)){
166
+ alert("Please insert valid link");
167
+ errors = true;
168
+ return;
169
+ }
170
+
171
+ if(window.tinyMCE && !errors)
172
+ {
173
+ window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, $('#_ujic_ushortcode', form).html());
174
+ tb_remove();
175
+ }
176
+ });
177
+ }
178
+ }
179
+
180
+ // run
181
+ $('#ujic-popup').livequery( function() { ujics.load(); } );
182
+ });
183
+
184
+ function isUrl(url) {
185
+ var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
186
+ if(RegExp.test(url)){
187
+ return true;
188
+ }else{
189
+ return false;
190
+ }
191
+ }
assets/tinymce/plugin.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ "use strict";
3
+
4
+
5
+
6
+ //Shortcodes
7
+ tinymce.PluginManager.add( 'ujicShortcodes', function( editor, url ) {
8
+
9
+ editor.addCommand("ujicPopup", function ( a, params )
10
+ {
11
+ var popup = params.identifier;
12
+ tb_show("Insert Uji Countdown", url + "/popup.php?popup=" + popup + "&width=" + 800);
13
+ });
14
+
15
+ editor.addButton( 'ujic_button', {
16
+ type: 'button',
17
+ text: false,
18
+ icon: 'icon dashicons-clock',
19
+ onclick : function(e) {
20
+ editor.execCommand("ujicPopup", false, {title: 'Uji Countdown',identifier: 'countdown'})
21
+ }
22
+
23
+
24
+
25
+
26
+ });
27
+
28
+ });
29
+
30
+
31
+
32
+ })(jQuery);
assets/tinymce/plugin.old.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ()
2
+ {
3
+ // create ujicShortcodes plugin
4
+ tinymce.create("tinymce.plugins.ujicShortcodes",
5
+ {
6
+ init: function ( ed, url )
7
+ {
8
+ ed.addCommand("ujicPopup", function ( a, params )
9
+ {
10
+ var popup = params.identifier;
11
+
12
+ // load thickbox
13
+ tb_show("Insert Countdown Shortcode", url + "/popup.php?popup=" + popup + "&width=" + 800);
14
+ });
15
+ },
16
+ createControl: function ( btn, e )
17
+ {
18
+ if ( btn == "ujic_button" )
19
+ {
20
+ var a = this;
21
+
22
+ var btn = e.createButton('ujic_button', {
23
+ title: "Insert Ujic Shortcode",
24
+ image: UjicShortcodes.plugin_folder +"assets/tinymce/images/icon.png",
25
+ icons: false,
26
+ onclick : function() {
27
+ tinyMCE.activeEditor.execCommand("ujicPopup", false, {
28
+ title: 'Uji Countdown',
29
+ identifier: 'countdown'
30
+ })
31
+ }
32
+ });
33
+
34
+ return btn;
35
+ }
36
+
37
+ return null;
38
+ },
39
+ addImmediate: function ( ed, title, sc) {
40
+ ed.add({
41
+ title: title,
42
+ onclick: function () {
43
+ tinyMCE.activeEditor.execCommand( "mceInsertContent", false, sc )
44
+ }
45
+ })
46
+ }
47
+ });
48
+
49
+ // add ujicShortcodes plugin
50
+ tinymce.PluginManager.add("ujicShortcodes", tinymce.plugins.ujicShortcodes);
51
+ })();
assets/tinymce/popup.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // loads the shortcodes class, wordpress is loaded with it
4
+ require_once( 'shortcodes.class.php' );
5
+
6
+ // get popup type
7
+ $popup = trim( $_GET['popup'] );
8
+ $shortcode = new Ujic_shortcodes( $popup );
9
+
10
+ ?>
11
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
12
+ <html xmlns="http://www.w3.org/1999/xhtml">
13
+ <head></head>
14
+ <body>
15
+ <div id="ujic-popup">
16
+
17
+ <div id="ujic-shortcode-wrap">
18
+
19
+ <div id="ujic-sc-form-wrap">
20
+
21
+ <div id="ujic-sc-form-head">
22
+
23
+ <?php echo $shortcode->popup_title; ?>
24
+
25
+ </div>
26
+ <!-- /#ujic-sc-form-head -->
27
+
28
+ <form method="post" id="ujic-sc-form">
29
+
30
+ <p style="font-size:11px">
31
+ Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
32
+ </p>
33
+
34
+ <table id="ujic-sc-form-table">
35
+
36
+ <?php echo $shortcode->output; ?>
37
+
38
+ <tbody>
39
+ <tr class="form-row">
40
+ <?php if( ! $shortcode->has_child ) : ?><td class="label">&nbsp;</td><?php endif; ?>
41
+ <td class="field"><a href="#" class="button-primary ujic-insert">Insert Shortcode</a></td>
42
+ </tr>
43
+ </tbody>
44
+
45
+ </table>
46
+ <!-- /#ujic-sc-form-table -->
47
+
48
+ </form>
49
+ <!-- /#ujic-sc-form -->
50
+
51
+ </div>
52
+ <!-- /#ujic-sc-form-wrap -->
53
+
54
+ <div class="clear"></div>
55
+
56
+ </div>
57
+ <!-- /#ujic-shortcode-wrap -->
58
+
59
+ </div>
60
+ <!-- /#ujic-popup -->
61
+
62
+ </body>
63
+ </html>
assets/tinymce/shortcodes.class.php ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // load wordpress
4
+ require_once('get_wp.php');
5
+
6
+ class Ujic_shortcodes
7
+ {
8
+ var $conf;
9
+ var $popup;
10
+ var $params;
11
+ var $shortcode;
12
+ var $cparams;
13
+ var $cshortcode;
14
+ var $popup_title;
15
+ var $no_preview;
16
+ var $has_child;
17
+ var $output;
18
+ var $errors;
19
+
20
+ // --------------------------------------------------------------------------
21
+
22
+ function __construct( $popup )
23
+ {
24
+ if( file_exists( dirname(__FILE__) . '/config.php' ) )
25
+ {
26
+ $this->conf = dirname(__FILE__) . '/config.php';
27
+ $this->popup = $popup;
28
+
29
+ $this->formate_shortcode();
30
+ }
31
+ else
32
+ {
33
+ $this->append_error('Config file does not exist');
34
+ }
35
+ }
36
+
37
+ // --------------------------------------------------------------------------
38
+
39
+ function formate_shortcode()
40
+ {
41
+ // get config file
42
+ require_once( $this->conf );
43
+
44
+ if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
45
+ $this->has_child = true;
46
+
47
+ if( isset( $ujic_shortcodes ) && is_array( $ujic_shortcodes ) )
48
+ {
49
+ // get shortcode config stuff
50
+ $this->params = $ujic_shortcodes[$this->popup]['params'];
51
+ $this->shortcode = $ujic_shortcodes[$this->popup]['shortcode'];
52
+ $this->popup_title = $ujic_shortcodes[$this->popup]['popup_title'];
53
+
54
+
55
+ // adds stuff for js use
56
+ $this->append_output( "\n" . '<div id="_ujic_shortcode" class="hidden">' . $this->shortcode . '</div>' );
57
+ $this->append_output( "\n" . '<div id="_ujic_popup" class="hidden">' . $this->popup . '</div>' );
58
+
59
+ if( isset( $ujic_shortcodes[$this->popup]['no_preview'] ) && $ujic_shortcodes[$this->popup]['no_preview'] )
60
+ {
61
+ //$this->append_output( "\n" . '<div id="_ujic_preview" class="hidden">false</div>' );
62
+ $this->no_preview = true;
63
+ }
64
+
65
+ // filters and excutes params
66
+ foreach( $this->params as $pkey => $param )
67
+ {
68
+ // prefix the fields names and ids with ujic_
69
+ $pkey = 'ujic_' . $pkey;
70
+
71
+ // popup form row start
72
+ $row_start = '<tbody>' . "\n";
73
+ $row_start .= '<tr class="form-row">' . "\n";
74
+ $row_start .= '<td class="label">' . $param['label'] . '</td>' . "\n";
75
+ $row_start .= '<td class="field">' . "\n";
76
+
77
+ // popup form row end
78
+ $row_end = '<span class="ujic-form-desc">' . $param['desc'] . '</span>' . "\n";
79
+ $row_end .= '</td>' . "\n";
80
+ $row_end .= '</tr>' . "\n";
81
+ $row_end .= '</tbody>' . "\n";
82
+
83
+ switch( $param['type'] )
84
+ {
85
+ case 'text' :
86
+
87
+ // prepare
88
+ $output = $row_start;
89
+ $output .= '<input type="text" class="ujic-form-text ujic-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
90
+ $output .= $row_end;
91
+
92
+ // append
93
+ $this->append_output( $output );
94
+
95
+ break;
96
+
97
+ case 'textarea' :
98
+
99
+ // prepare
100
+ $output = $row_start;
101
+ $output .= '<textarea rows="10" cols="30" name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-textarea ujic-input">' . $param['std'] . '</textarea>' . "\n";
102
+ $output .= $row_end;
103
+
104
+ // append
105
+ $this->append_output( $output );
106
+
107
+ break;
108
+
109
+ case 'select' :
110
+
111
+ // prepare
112
+ $output = $row_start;
113
+ $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
114
+
115
+ foreach( $param['options'] as $value => $option )
116
+ {
117
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
118
+ }
119
+
120
+ $output .= '</select>' . "\n";
121
+ $output .= $row_end;
122
+
123
+ // append
124
+ $this->append_output( $output );
125
+
126
+ break;
127
+
128
+ case 'checkbox' :
129
+
130
+ // prepare
131
+ $output = $row_start;
132
+ $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . "\n";
133
+ $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" id="' . $pkey . '" ' . ( $param['std'] ? 'checked' : '' ) . ' />' . "\n";
134
+ $output .= ' ' . $param['checkbox_text'] . '</label>' . "\n";
135
+ $output .= $row_end;
136
+
137
+ // append
138
+ $this->append_output( $output );
139
+
140
+ break;
141
+
142
+ case 'datapick' :
143
+
144
+ // prepare
145
+
146
+ $output = $row_start;
147
+ $output .= '<input type="text" class="ujic-input ujic-form-datapick ujic-datapick" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
148
+ $output .= $row_end;
149
+
150
+ // append
151
+ $this->append_output( $output );
152
+
153
+ break;
154
+
155
+ case 'timepick' :
156
+
157
+ // prepare
158
+ $output = $row_start;
159
+ $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
160
+
161
+ foreach( $param['options_h'] as $value => $option )
162
+ {
163
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
164
+ }
165
+
166
+ $output .= '</select> : ' . "\n";
167
+
168
+ $output .= '<select name="' . $pkey . '_" id="' . $pkey . '_" class="ujic-form-select ujic-input">' . "\n";
169
+
170
+ foreach( $param['options_m'] as $value => $option )
171
+ {
172
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
173
+ }
174
+
175
+ $output .= '</select>' . "\n";
176
+
177
+ $output .= $row_end;
178
+
179
+ // append
180
+ $this->append_output( $output );
181
+
182
+ break;
183
+
184
+ case 'expiry' :
185
+
186
+ // prepare
187
+
188
+ $output = $row_start;
189
+ $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . $param['fname'] . "\n";
190
+ $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" value="true" id="' . $pkey . '" ' . ( !empty($param['std']) ? 'checked' : '' ) . ' />' . "\n";
191
+ $output .= '</label>' . "\n";
192
+ $output .= '<div id="ujic-form-expiry-url">' . $param['fname2'] .' <input type="text" class="ujic-input ujic-form-expiry" name="' . $pkey . '_" id="' . $pkey . '_" placeholder="' . $param['std2'] . '" value="" /></div>' . "\n";
193
+ $output .= $row_end;
194
+
195
+ // append
196
+ $this->append_output( $output );
197
+
198
+ break;
199
+
200
+ }
201
+ }
202
+
203
+ // checks if has a child shortcode
204
+ if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
205
+ {
206
+ // set child shortcode
207
+ $this->cparams = $ujic_shortcodes[$this->popup]['child_shortcode']['params'];
208
+ $this->cshortcode = $ujic_shortcodes[$this->popup]['child_shortcode']['shortcode'];
209
+
210
+ // popup parent form row start
211
+ $prow_start = '<tbody>' . "\n";
212
+ $prow_start .= '<tr class="form-row has-child">' . "\n";
213
+ $prow_start .= '<td><a href="#" id="form-child-add" class="button-secondary">' . $ujic_shortcodes[$this->popup]['child_shortcode']['clone_button'] . '</a>' . "\n";
214
+ $prow_start .= '<div class="child-clone-rows">' . "\n";
215
+
216
+ // for js use
217
+ $prow_start .= '<div id="_ujic_cshortcode" class="hidden">' . $this->cshortcode . '</div>' . "\n";
218
+
219
+ // start the default row
220
+ $prow_start .= '<div class="child-clone-row">' . "\n";
221
+ $prow_start .= '<ul class="child-clone-row-form">' . "\n";
222
+
223
+ // add $prow_start to output
224
+ $this->append_output( $prow_start );
225
+
226
+ foreach( $this->cparams as $cpkey => $cparam )
227
+ {
228
+
229
+ // prefix the fields names and ids with ujic_
230
+ $cpkey = 'ujic_' . $cpkey;
231
+
232
+ // popup form row start
233
+ $crow_start = '<li class="child-clone-row-form-row">' . "\n";
234
+ $crow_start .= '<div class="child-clone-row-label">' . "\n";
235
+ $crow_start .= '<label>' . $cparam['label'] . '</label>' . "\n";
236
+ $crow_start .= '</div>' . "\n";
237
+ $crow_start .= '<div class="child-clone-row-field">' . "\n";
238
+
239
+ // popup form row end
240
+ $crow_end = '<span class="child-clone-row-desc">' . $cparam['desc'] . '</span>' . "\n";
241
+ $crow_end .= '</div>' . "\n";
242
+ $crow_end .= '</li>' . "\n";
243
+
244
+ switch( $cparam['type'] )
245
+ {
246
+ case 'text' :
247
+
248
+ // prepare
249
+ $coutput = $crow_start;
250
+ $coutput .= '<input type="text" class="ujic-form-text ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" value="' . $cparam['std'] . '" />' . "\n";
251
+ $coutput .= $crow_end;
252
+
253
+ // append
254
+ $this->append_output( $coutput );
255
+
256
+ break;
257
+
258
+ case 'textarea' :
259
+
260
+ // prepare
261
+ $coutput = $crow_start;
262
+ $coutput .= '<textarea rows="10" cols="30" name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-textarea ujic-cinput">' . $cparam['std'] . '</textarea>' . "\n";
263
+ $coutput .= $crow_end;
264
+
265
+ // append
266
+ $this->append_output( $coutput );
267
+
268
+ break;
269
+
270
+ case 'select' :
271
+
272
+ // prepare
273
+ $coutput = $crow_start;
274
+ $coutput .= '<select name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-select ujic-cinput">' . "\n";
275
+
276
+ foreach( $cparam['options'] as $value => $option )
277
+ {
278
+ $coutput .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
279
+ }
280
+
281
+ $coutput .= '</select>' . "\n";
282
+ $coutput .= $crow_end;
283
+
284
+ // append
285
+ $this->append_output( $coutput );
286
+
287
+ break;
288
+
289
+ case 'checkbox' :
290
+
291
+ // prepare
292
+ $coutput = $crow_start;
293
+ $coutput .= '<label for="' . $cpkey . '" class="ujic-form-checkbox">' . "\n";
294
+ $coutput .= '<input type="checkbox" class="ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" ' . ( $cparam['std'] ? 'checked' : '' ) . ' />' . "\n";
295
+ $coutput .= ' ' . $cparam['checkbox_text'] . '</label>' . "\n";
296
+ $coutput .= $crow_end;
297
+
298
+ // append
299
+ $this->append_output( $coutput );
300
+
301
+ break;
302
+ }
303
+ }
304
+
305
+ // popup parent form row end
306
+ $prow_end = '</ul>' . "\n"; // end .child-clone-row-form
307
+ $prow_end .= '<a href="#" class="child-clone-row-remove">Remove</a>' . "\n";
308
+ $prow_end .= '</div>' . "\n"; // end .child-clone-row
309
+
310
+
311
+ $prow_end .= '</div>' . "\n"; // end .child-clone-rows
312
+ $prow_end .= '</td>' . "\n";
313
+ $prow_end .= '</tr>' . "\n";
314
+ $prow_end .= '</tbody>' . "\n";
315
+
316
+ // add $prow_end to output
317
+ $this->append_output( $prow_end );
318
+ }
319
+ }
320
+ }
321
+
322
+ // --------------------------------------------------------------------------
323
+
324
+ function append_output( $output )
325
+ {
326
+ $this->output = $this->output . "\n" . $output;
327
+ }
328
+
329
+ // --------------------------------------------------------------------------
330
+
331
+ function reset_output( $output )
332
+ {
333
+ $this->output = '';
334
+ }
335
+
336
+ // --------------------------------------------------------------------------
337
+
338
+ function append_error( $error )
339
+ {
340
+ $this->errors = $this->errors . "\n" . $error;
341
+ }
342
+ }
343
+
344
+ ?>
classes/class-uji-countdown-admin.php ADDED
@@ -0,0 +1,702 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * Plugin Name: Uji Countdown Premium Plus 2.0
6
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
7
+ * Description: HTML5 Countdown.
8
+ * Version: 2.0
9
+ * Author: WPmanage <info@wpmanage.com>
10
+ * Author URI: http://www.wpmanage.com
11
+ */
12
+ if ( !defined( 'ABSPATH' ) )
13
+ exit; // Exit if accessed directly
14
+
15
+ class Uji_Countdown_Admin {
16
+
17
+ /**
18
+ * Style
19
+ *
20
+ * @since 2.0
21
+ *
22
+ * @var string
23
+ */
24
+ protected $styles = array( 'classic' );
25
+
26
+ /**
27
+ * Init label vars
28
+ *
29
+ * @since 2.0
30
+ */
31
+ public static function ujic_labels() {
32
+ return array( 'ujic_years' => 'Years',
33
+ 'ujic_year' => 'Year',
34
+ 'ujic_months' => 'Months',
35
+ 'ujic_month' => 'Month',
36
+ 'ujic_weeks' => 'Weeks',
37
+ 'ujic_week' => 'Week',
38
+ 'ujic_days' => 'Days',
39
+ 'ujic_day' => 'Day',
40
+ 'ujic_hours' => 'Hours',
41
+ 'ujic_hour' => 'Hour',
42
+ 'ujic_minutes' => 'Minutes',
43
+ 'ujic_minute' => 'Minute',
44
+ 'ujic_seconds' => 'Seconds',
45
+ 'ujic_second' => 'Second',
46
+ );
47
+ }
48
+
49
+ /**
50
+ * Print template of table counters.
51
+ *
52
+ * @since 2.0
53
+ */
54
+ public function admin_tablelist() {
55
+
56
+ $this->cform_delete();
57
+
58
+ if ( $this->saved_db_style() ) {
59
+
60
+ $table_headers = '
61
+ <th class="manage-column" scope="col"><span>' . __( 'Date', $this->plugin_slug ) . '</span></th>
62
+ <th class="manage-column" scope="col"><span>' . __( 'Name', $this->plugin_slug ) . '</span></th>
63
+ <th class="manage-column" scope="col"><span>' . __( 'Style', $this->plugin_slug ) . '</span></th>
64
+ <th class="manage-column" scope="col"><span>' . __( 'Change', $this->plugin_slug ) . '</span></th>';
65
+
66
+ $tab = '<div id="ujic_table" class="list">
67
+ <a href="?page=uji-countdown&tab=tab_ujic_new" class="button button-primary" id="ujic_table_new">' . __( 'Create a new timer style', $this->plugin_slug ) . '</a>
68
+ <table cellspacing="0" class="widefat fixed">
69
+ <thead>
70
+ <tr>
71
+ ' . $table_headers . '
72
+ </tr>
73
+ </thead>
74
+ <tfoot>
75
+ <tr>
76
+ ' . $table_headers . '
77
+ </tr>
78
+ </tfoot>
79
+
80
+ <tbody>
81
+ ' . $this->ujic_tabs_values() . '
82
+ <tbody>
83
+ </table>
84
+ </div>';
85
+
86
+ echo $tab;
87
+
88
+ $this->pro_metaboxes();
89
+
90
+
91
+ } else {
92
+ //echo '<div class="ujic-create"><a href="?page=uji-countdown&tab=tab_ujic_new" class="button button-primary" id="ujic_table_new">' . __( 'Create a new timer style', $this->plugin_slug ) . '</a></div>';
93
+ echo '<div id="ujic_new"><h1>Uji Countdown 2.0</h1><h4>The most customizable countdown plugin for Wordpress</h4>';
94
+ echo '<a href="?page=uji-countdown&tab=tab_ujic_new" class="ujic_butnew" id="ujic_table_new">' . __( 'Add New Style', $this->plugin_slug ) . '</a>';
95
+ echo '<div class="ujic_new_cnt"><h2>WHAT\'S NEW</h2>';
96
+ echo '<ul>
97
+ <li>
98
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-custom.png">
99
+ <h3>More Customization</h3>
100
+ <p>Option to enable/disable the units of the time</p>
101
+ <p>Option to change the label color and size</p>
102
+ </li>
103
+ <li>
104
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-glob.png">
105
+ <h3>Multilanguage</h3>
106
+ <p>This plugins come with translation capability. That means can be translated (aka localized) to other languages </p>
107
+ <p>Quick translation for the units of time </p>
108
+ </li>
109
+ <li>
110
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-font.png">
111
+ <h3>Google Fonts</h3>
112
+ <p>Now support google fonts inclusion</p>
113
+ </li>
114
+ <li>
115
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-rtl.png">
116
+ <h3>Right-To-Left (RTL)</h3>
117
+ <p>Support “Left to Right” to Arabic “Right to Left” </p>
118
+ </li>
119
+ <li>
120
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-wp.png">
121
+ <h3>WordPress 4.0</h3>
122
+ <p>Fully supports WordPress 4.0, while maintaining compatibility through version 3.5+</p>
123
+ </li>
124
+ </ul>';
125
+ echo '</div></div>';
126
+
127
+ $this->pro_metaboxes();
128
+ }
129
+
130
+ //Left Metaboxes
131
+ if( isset($_GET['tab']) && $_GET['tab'] == 'tab_ujic_new' )
132
+ $this->left_metaboxes();
133
+
134
+ }
135
+
136
+ /**
137
+ * Print template new/edit countdown.
138
+ *
139
+ * @since 2.0
140
+ */
141
+ public function admin_countdown() {
142
+
143
+ //Save/Edit in database
144
+ $this->cform_save_db();
145
+
146
+ //ID
147
+ $cur_id = ( $this->cform_is_edit() ) ? $_GET['edit'] : '';
148
+
149
+ //Get vars
150
+ $vars = $this->ujic_option( $cur_id );
151
+
152
+ //Curent style
153
+ $cur_style = ( $this->cform_is_edit() ) ? $vars['ujic_style'] : ( ( isset( $_GET['style'] ) && !empty( $_GET['style'] ) ) ? $_GET['style'] : 'classic' );
154
+
155
+
156
+ //Build Forms
157
+ $cnt = '<form method="post" action="page=uji-countdown&tab=tab_ujic_new&style=' . $cur_style . '&save=true">';
158
+ $cnt = $this->cform_ftype( $cur_style, $cur_id );
159
+ //$cnt .= $this->cform_style( $cur_style );
160
+ $cnt .= '<input name="ujic_style" id="ujic-style" type="hidden" class="normal-text" value="' . $cur_style . '"/>';
161
+ $cnt .= $this->cform_input( __( 'Timer Title:', $this->plugin_slug ), 'ujic_name', $vars['ujic_name'] );
162
+ $cnt .= $this->cform_select( __( 'Google Font:', $this->plugin_slug ), 'ujic_goof', ujic_googlefonts(), $vars['ujic_goof'] );
163
+ $cnt .= $this->cform_radiobox( __( 'Alignment:', $this->plugin_slug ), 'ujic_pos', array( __( 'None', $this->plugin_slug ), __( 'Left', $this->plugin_slug ), __( 'Center', $this->plugin_slug ), __( 'Right', $this->plugin_slug ) ), array( 'none', 'left', 'center', 'right' ), $vars['ujic_pos'] );
164
+ $cnt .= $this->cform_checkbox( __( 'Main format:', $this->plugin_slug ), array( 'ujic_d', 'ujic_h', 'ujic_m', 'ujic_s' ), array( __( 'Days', $this->plugin_slug ), __( 'Hours', $this->plugin_slug ), __( 'Minutes', $this->plugin_slug ), __( 'Seconds', $this->plugin_slug ) ), array( $vars['ujic_d'], $vars['ujic_h'], $vars['ujic_m'], $vars['ujic_s'] ) );
165
+ $cnt .= $this->cform_checkbox( __( 'Secondary format:', $this->plugin_slug ), array( 'ujic_y', 'ujic_o', 'ujic_w' ), array( __( 'Years', $this->plugin_slug ), __( 'Months', $this->plugin_slug ), __( 'Weeks', $this->plugin_slug ) ), array( $vars['ujic_y'], $vars['ujic_o'], $vars['ujic_w'] ) );
166
+ if ( $cur_style == 'classic' )
167
+ $cnt .= $this->cform_checkbox( __( 'Animation for seconds:', $this->plugin_slug ), array( 'ujic_ani' ), array( '' ), array( $vars['ujic_ani'] ) );
168
+ $cnt .= $this->cform_checkbox( __( 'Display time label text:', $this->plugin_slug ), array( 'ujic_txt' ), array( '' ), array( $vars['ujic_txt'] ) );
169
+ if ( $cur_style == 'classic' )
170
+ $cnt .= $this->cform_sliderui( __( 'Timer Size:', $this->plugin_slug ), 'ujic_size', $vars['ujic_size'], 10, 80, 1 );
171
+ if ( $cur_style == 'classic' )
172
+ $cnt .= $this->cform_color( __( 'Select Box Color:', $this->plugin_slug ), array( 'ujic_col_dw', 'ujic_col_up' ), array( __( 'Bottom', $this->plugin_slug ), __( 'Up', $this->plugin_slug ) ), array( $vars['ujic_col_dw'], $vars['ujic_col_up'] ) );
173
+ if ( $cur_style == 'classic' )
174
+ $cnt .= $this->cform_color( __( 'Text Color:', $this->plugin_slug ), array( 'ujic_col_txt', 'ujic_col_sw' ), array( __( 'Number Color', $this->plugin_slug ), __( 'Shadow Color', $this->plugin_slug ) ), array( $vars['ujic_col_txt'], $vars['ujic_col_sw'] ) );
175
+
176
+ $cnt .= $this->cform_color( __( 'Label Color:', $this->plugin_slug ), array( 'ujic_col_lab' ), array( __( 'Label Text Color', $this->plugin_slug ) ), array( $vars['ujic_col_lab'] ) );
177
+ $cnt .= $this->cform_sliderui( __( 'Label Size:', $this->plugin_slug ), 'ujic_lab_sz', $vars['ujic_lab_sz'], 8, 25, 1 );
178
+ $cnt .= $this->cform_buttons();
179
+ $cnt .= '</form>';
180
+ //Build Metabox
181
+ if ( $cur_id )
182
+ echo $this->custom_metabox( __( 'Edit Timer Style', $this->plugin_slug ), $cnt, 'ujic-create uji-fedit' );
183
+ else
184
+ echo $this->custom_metabox( __( 'Create New Timer Style', $this->plugin_slug ), $cnt, 'ujic-create' );
185
+
186
+ //Left Metaboxes
187
+ $this->left_metaboxes();
188
+
189
+ //Preview Metaboxes
190
+ $this->prev_metaboxes( $cur_style );
191
+
192
+ }
193
+
194
+ /**
195
+ * Custom Metabox template.
196
+ *
197
+ * @since 2.0
198
+ */
199
+ private function custom_metabox( $name, $cnt, $class = NULL ) {
200
+ $meta = '<div class="metabox-holder' . ( ( isset( $class ) && !empty( $class ) ) ? ' ' . $class : '' ) . '">';
201
+ $meta .= '<div class="postbox">';
202
+ $meta .= '<div class="handlediv" title="Click to toggle"><br/></div>';
203
+ $meta .= '<h3 class="hndle"><span>' . $name . '</span></h3>';
204
+ $meta .= '<div class="inside">';
205
+ $meta .= $cnt;
206
+ $meta .= '</div>';
207
+ $meta .= '</div>';
208
+ $meta .= '</div>';
209
+
210
+ return $meta;
211
+ }
212
+
213
+ /**
214
+ * Multi Custom Metabox template.
215
+ *
216
+ * @since 2.0
217
+ */
218
+ private function multi_custom_metabox( $name, $cnt, $class = NULL ) {
219
+ $meta = '<div class="metabox-holder' . ( ( isset( $class ) && !empty( $class ) ) ? ' ' . $class : '' ) . '">';
220
+ $i = 0;
221
+ foreach ( $cnt as $content ) {
222
+ $meta .= '<div class="postbox">';
223
+ $meta .= '<div class="handlediv" title="Click to toggle"><br/></div>';
224
+ $meta .= '<h3 class="hndle"><span>' . $name[$i] . '</span></h3>';
225
+ $meta .= '<div class="inside">';
226
+ $meta .= $content;
227
+ $meta .= '</div>';
228
+ $meta .= '</div>';
229
+ $i++;
230
+ }
231
+ $meta .= '</div>';
232
+
233
+ return $meta;
234
+ }
235
+
236
+ /**
237
+ * Tutorial metaboxes.
238
+ *
239
+ * @since 2.0
240
+ */
241
+ private function prev_metaboxes( $style ) {
242
+ if ( $style == 'classic' ) {
243
+ $prw = '<div class="ujic-' . $style . ' hasCountdown" id="ujiCountdown">
244
+ <span class="countdown_row">
245
+ <span class="countdown_section ujic_y">
246
+ <span class="countdown_amount">0</span>
247
+ <span class="countdown_amount">1</span>
248
+ <span class="countdown_txt">' . __( 'Years', $this->plugin_slug ) . '</span>
249
+ </span>
250
+ <span class="countdown_section ujic_o">
251
+ <span class="countdown_amount">1</span>
252
+ <span class="countdown_amount">1</span>
253
+ <span class="countdown_txt">' . __( 'Months', $this->plugin_slug ) . '</span>
254
+ </span>
255
+ <span class="countdown_section ujic_w">
256
+ <span class="countdown_amount">0</span>
257
+ <span class="countdown_amount">2</span>
258
+ <span class="countdown_txt">' . __( 'Weeks', $this->plugin_slug ) . '</span>
259
+ </span>
260
+ <span class="countdown_section ujic_d">
261
+ <span class="countdown_amount">2</span>
262
+ <span class="countdown_amount">9</span>
263
+ <span class="countdown_txt">' . __( 'Days', $this->plugin_slug ) . '</span>
264
+ </span>
265
+ <span class="countdown_section ujic_h">
266
+ <span class="countdown_amount">0</span>
267
+ <span class="countdown_amount">9</span>
268
+ <span class="countdown_txt">' . __( 'Hours', $this->plugin_slug ) . '</span>
269
+ </span>
270
+ <span class="countdown_section ujic_m">
271
+ <span class="countdown_amount">3</span>
272
+ <span class="countdown_amount">1</span>
273
+ <span class="countdown_txt">' . __( 'Minutes', $this->plugin_slug ) . '</span>
274
+ </span>
275
+ <span class="countdown_section ujic_s">
276
+ <span class="countdown_amount">5</span>
277
+ <span class="countdown_amount">3</span>
278
+ <span class="countdown_txt">' . __( 'Seconds', $this->plugin_slug ) . '</span>
279
+ </span>
280
+ </span>
281
+ </div>';
282
+ }
283
+
284
+ echo $this->custom_metabox( __( 'Preview Timer Style', $this->plugin_slug ), $prw, 'ujic-preview' );
285
+ }
286
+
287
+ /**
288
+ * Tutorial metaboxes.
289
+ *
290
+ * @since 2.0
291
+ */
292
+ private function left_metaboxes() {
293
+ $tut_sho = '<img src="' . UJICOUNTDOWN_URL . 'assets/images/ujic-ps.jpg">';
294
+ $tut_wid = '<img src="' . UJICOUNTDOWN_URL . 'assets/images/ujic-ps2.jpg">';
295
+ echo $this->multi_custom_metabox( array( __( 'How To Add Countdown Shortcode', $this->plugin_slug ), __( 'Add New Countdown <br>from the Widget Areas', $this->plugin_slug ) ), array( $tut_sho, $tut_wid ), 'ujic-tut' );
296
+ }
297
+
298
+ /**
299
+ * Premium metaboxes.
300
+ *
301
+ * @since 2.0
302
+ */
303
+ private function pro_metaboxes() {
304
+ $pro_sho = '<a href="http://wpmanage.com/uji-countdown" target="_blank"><img src="' . UJICOUNTDOWN_URL . 'assets/images/ujic-ps3.png"></a>';
305
+ echo $this->multi_custom_metabox( array( __( 'Upgrade to PRO Version', $this->plugin_slug ) ), array( $pro_sho ), 'ujic-tut' );
306
+ }
307
+
308
+ /**
309
+ * Print form style.
310
+ *
311
+ * @since 2.0
312
+ */
313
+ private function cform_style( $val ) {
314
+ $styles = $this->styles;
315
+ $form = '<div class="ujic-box">';
316
+ if ( $this->cform_is_edit() ) {
317
+ $form .= '<div class="label">' . __( "Style Type:", $this->plugin_slug ) . '</div>';
318
+ $form .= '<span id="ujic-style-' . $val . '" class="ujic-types ujic-types-sel">' . $val . '</span>';
319
+ } else {
320
+ $form .= '<div class="label">' . __( "Select Style:", $this->plugin_slug ) . '</div>';
321
+ foreach ( $styles as $style ) {
322
+ $sel = ( $style == ( isset( $_GET['style'] ) && !empty( $_GET['style'] ) ? $_GET['style'] : 'classic' ) ) ? ' ujic-types-sel' : '';
323
+ $form .= '<a href="#" onclick="sel_style(\'' . $style . '\')" id="ujic-style-' . $style . '" class="ujic-types' . $sel . '">' . $style . '</a>';
324
+ }
325
+ }
326
+ $form .= '<input name="ujic_style" id="ujic-style" type="hidden" class="normal-text" value="' . $val . '"/>';
327
+ $form .= '</div>';
328
+ return $form;
329
+ }
330
+
331
+ /**
332
+ * Print title.
333
+ *
334
+ * @since 2.0
335
+ */
336
+ private function cform_title( $title ) {
337
+ $form = '<div class="ujic-box">';
338
+ $form .= '<h3 style="padding-left: 0">' . $title . '</h3>';
339
+ $form .= '</div>';
340
+ return $form;
341
+ }
342
+
343
+ /**
344
+ * Print input field.
345
+ *
346
+ * @since 2.0
347
+ */
348
+ private function cform_input( $label, $name, $val, $cls = null ) {
349
+ $form = '<div class="ujic-box">';
350
+ $form .= '<div class="label">' . $label . '</div>';
351
+ $form .= '<input type="text" value="' . $val . '" name="' . $name . '" id="' . $name . '" class="' . ($cls ? $cls : 'regular-text') . '">';
352
+ $form .= '</div>';
353
+ return $form;
354
+ }
355
+
356
+ /**
357
+ * Print checkbox field.
358
+ *
359
+ * @since 2.0
360
+ */
361
+ private function cform_checkbox( $label, $names, $name_val, $val ) {
362
+ $form = '<div class="ujic-box">';
363
+ $form .= '<div class="label">' . $label . '</div>';
364
+ $form .= '<div class="ujic-chkbtn">';
365
+ $i = 0;
366
+ foreach ( $names as $name ) {
367
+ $form .= '<input id="' . $name . '" type="checkbox" value="true" class="icheckbox_flat-pink" name="' . $name . '" ' . checked( $val[$i], "true", false ) . '>';
368
+ $form .= '<label for="' . $name . '">' . $name_val[$i] . '</label>';
369
+ $i++;
370
+ }
371
+ $form .= '</div>';
372
+ $form .= '</div>';
373
+ return $form;
374
+ }
375
+
376
+ /**
377
+ * Print radio field.
378
+ *
379
+ * @since 2.0
380
+ */
381
+ private function cform_radiobox( $label, $name, $name_val, $types, $val ) {
382
+ $form = '<div class="ujic-box">';
383
+ $form .= '<div class="label">' . $label . '</div>';
384
+ $form .= '<div class="ujic-radbtn">';
385
+ $i = 0;
386
+ foreach ( $types as $type ) {
387
+ $form .= '<input id="' . $type . '" type="radio" value="' . $type . '" class="iradio_flat-pink" name="' . $name . '" ' . checked( $val, $type, false ) . '>';
388
+ $form .= '<label for="' . $name . '" id="img-' . $type . '">' . $name_val[$i] . '</label>';
389
+ $i++;
390
+ }
391
+ $form .= '</div>';
392
+ $form .= '</div>';
393
+ return $form;
394
+ }
395
+
396
+ /**
397
+ * Print select field.
398
+ *
399
+ * @since 2.0
400
+ */
401
+ private function cform_select( $label, $name, $types, $val ) {
402
+ $form = '<div class="ujic-box">';
403
+ $form .= '<div class="label">' . $label . '</div>';
404
+ $form .= '<div class="ujic-select">';
405
+ $form .= '<select class="select of-input" name="' . $name . '" id="' . $name . '">';
406
+ foreach ( $types as $type => $option ) {
407
+ $form .= '<option id="' . sanitize_text_field( $type ) . '" value="' . $type . '" ' . selected( $type, $val, false ) . ' />' . $option . '</option>';
408
+ }
409
+ $form .= '</select></div>';
410
+ $form .= '</div>';
411
+ return $form;
412
+ }
413
+
414
+ /**
415
+ * Print slider-ui field.
416
+ *
417
+ * @since 2.0
418
+ */
419
+ private function cform_sliderui( $label, $name, $val, $min, $max, $step ) {
420
+ $form = '<div class="ujic-box ujic_slider">';
421
+ $form .= '<div class="label">' . $label . '</div>';
422
+ //values
423
+ $val = ($val == '') ? 32 : $val;
424
+ $data = 'data-id="' . $name . '" data-val="' . $val . '" data-min="' . $min . '" data-max="' . $max . '" data-step="' . $step . '"';
425
+ //html output
426
+ $form .= '<input type="text" name="' . $name . '" id="' . $name . '" value="' . $val . '" class="mini" readonly="readonly" />';
427
+ $form .= '<div id="' . $name . '-slider" class="ujic_sliderui" style="margin-left: 7px;" ' . $data . '></div>';
428
+ $form .= '</div>';
429
+ return $form;
430
+ }
431
+
432
+ /**
433
+ * Color picker field.
434
+ *
435
+ * @since 2.0
436
+ */
437
+ private function cform_color( $label, $names, $clabels, $vals ) {
438
+ $form = '<div class="ujic-box ujic-color">';
439
+ $form .= '<div class="label">' . $label . '</div>';
440
+ $form .= '<div class="ujic-color-box">';
441
+ $i = 0;
442
+ foreach ( $names as $name ) {
443
+ //values
444
+ $default_color = ' data-default-color="' . $vals[$i] . '" ';
445
+
446
+ $form .= '<div class="ujic-color-hold">';
447
+ $form .= '<span> ' . $clabels[$i] . ' :</span>';
448
+ $form .= '<input name="' . $name . '" id="' . $name . '" class="ujic_colorpick" type="text" value="' . $vals[$i] . '"' . $default_color . ' />';
449
+ $form .= '</div>';
450
+ $i++;
451
+ }
452
+ $form .= '</div>';
453
+ $form .= '</div>';
454
+ return $form;
455
+ }
456
+
457
+ /**
458
+ * Add buttons.
459
+ *
460
+ * @since 2.0
461
+ */
462
+ private function cform_buttons() {
463
+ $type = ( isset( $_GET['edit'] ) && !empty( $_GET['edit'] ) ) ? $_GET['edit'] : '';
464
+ $form = '<div class="ujic-submit-hold">';
465
+ if ( !empty( $type ) && is_numeric( $type ) ) {
466
+ $form .= get_submit_button( __( 'Update Style', $this->plugin_slug ), 'primary', 'submit_ujic', true );
467
+ //$form .= get_submit_button(__( 'Cancel Add New', $this->plugin_slug ), 'secondary', 'cancel_ujic', true);
468
+ $form .= '<a href="?page=uji-countdown&tab=tab_ujic_new" class="button button-secondary" id="ujic_table_new">' . __( 'Cancel Add New', $this->plugin_slug ) . '</a>';
469
+ } else {
470
+ $form .= get_submit_button( __( 'Save Style', $this->plugin_slug ), 'primary', 'submit_ujic', true );
471
+ }
472
+ $form .= '</div>';
473
+
474
+ return $form;
475
+ }
476
+
477
+ /**
478
+ * Form Type.
479
+ *
480
+ * @since 2.0
481
+ */
482
+ private function cform_ftype( $cur_style, $id = NULL ) {
483
+ $type = ( isset( $_GET['edit'] ) && !empty( $_GET['edit'] ) ) ? $_GET['edit'] : '';
484
+
485
+ if ( !empty( $type ) && is_numeric( $type ) && !empty( $id ) ) {
486
+ $form = '<form method="post" action="options-general.php?page=uji-countdown&tab=tab_ujic_new&edit=' . $id . '">';
487
+ } else {
488
+ $form = '<form method="post" action="options-general.php?page=uji-countdown&tab=tab_ujic_new&style=' . $cur_style . '&save=true">';
489
+ }
490
+
491
+ return $form;
492
+ }
493
+
494
+ /**
495
+ * Insert/Edit database values.
496
+ *
497
+ * @since 2.0
498
+ */
499
+ private function cform_save_db() {
500
+ if ( $this->cform_is_create() ) {
501
+ if ( $this->cform_errors() ) {
502
+ $this->ins_ujic_db( $_POST );
503
+ $this->ujic_message( __( "Your Timer Style Was Created", $this->plugin_slug ) );
504
+ echo '<script type="text/javascript"> ujic_admin_home(); </script>';
505
+ }
506
+ }
507
+ if ( isset( $_POST ) && !empty( $_POST ) && $this->cform_is_edit() ) {
508
+ if ( $this->cform_errors() ) {
509
+ $this->upd_ujic_db( $_POST, $_GET['edit'] );
510
+ $this->ujic_message( __( "Your Timer Style Was Updated", $this->plugin_slug ) );
511
+ }
512
+ }
513
+ }
514
+
515
+ /**
516
+ * Errors check.
517
+ *
518
+ * @since 2.0
519
+ */
520
+ private function cform_errors() {
521
+ global $wpdb;
522
+ $ujic_form_err = '';
523
+
524
+ //name not empty
525
+ if ( empty( $_POST['ujic_name'] ) ) {
526
+ $ujic_form_err .= __( "Please Complete Timer Title", $this->plugin_slug ) . '<br/>';
527
+ }
528
+
529
+ //check format
530
+ if ( !isset( $_POST['ujic_d'] ) && !isset( $_POST['ujic_h'] ) && !isset( $_POST['ujic_m'] ) && !isset( $_POST['ujic_s'] ) && !isset( $_POST['ujic_y'] ) && !isset( $_POST['ujic_o'] ) && !isset( $_POST['ujic_w'] ) ) {
531
+ $ujic_form_err .= __( "Please Select Timer Format", $this->plugin_slug ) . '<br/>';
532
+ }
533
+
534
+ //check name exist
535
+ if ( !empty( $_POST['ujic_name'] ) && !$this->cform_is_edit() ) {
536
+ $cname = $wpdb->get_var( "SELECT title FROM " . $this->ujic_tab_name() . " WHERE title = '" . $_POST['ujic_name'] . "'" );
537
+ if ( !empty( $cname ) ) {
538
+ $ujic_form_err .= __("This Name Already Exist. Please Change Timer Name. <br/>", $this->plugin_slug);
539
+ }
540
+ }
541
+
542
+ if ( empty( $ujic_form_err ) ) {
543
+ return true;
544
+ } else if ( !empty( $ujic_form_err ) ) {
545
+ $this->ujic_message( $ujic_form_err, true );
546
+ return false;
547
+ }
548
+ }
549
+
550
+ /**
551
+ * Check if have saved style.
552
+ *
553
+ * @since 2.0
554
+ */
555
+ private function saved_db_style() {
556
+ global $wpdb;
557
+ $cname = $wpdb->get_var( "SELECT title FROM " . $this->ujic_tab_name() . " LIMIT 1" );
558
+ if ( !empty( $cname ) ) {
559
+ return true;
560
+ } else {
561
+ return false;
562
+ }
563
+ }
564
+
565
+ /**
566
+ * Return If Create Form.
567
+ *
568
+ * @since 2.0
569
+ */
570
+ public function cform_is_create() {
571
+ if ( isset( $_POST ) && !empty( $_POST ) && isset( $_GET['save'] ) && !empty( $_GET['save'] ) && $_GET['save'] == 'true' )
572
+ return true;
573
+ else
574
+ return false;
575
+ }
576
+
577
+ /**
578
+ * Return Edit Form.
579
+ *
580
+ * @since 2.0
581
+ */
582
+ private function cform_is_edit() {
583
+ if ( isset( $_GET['edit'] ) && (!empty( $_GET['edit'] ) && is_numeric( $_GET['edit'] ) ) )
584
+ return true;
585
+ else
586
+ return false;
587
+ }
588
+
589
+ /**
590
+ * Return Delete Form.
591
+ *
592
+ * @since 2.0
593
+ */
594
+ private function cform_delete() {
595
+ if ( isset( $_GET['del'] ) && (!empty( $_GET['del'] ) && is_numeric( $_GET['del'] ) ) ) {
596
+ $this->del_ujic_db( trim( $_GET['del'] ) );
597
+ $this->ujic_message( __("Your countdown style was deleted", $this->plugin_slug) );
598
+ }
599
+ }
600
+
601
+ /**
602
+ * Creating The Tabs.
603
+ *
604
+ * @since 2.0
605
+ */
606
+ private function ujic_tabs_values() {
607
+ global $wpdb;
608
+ $ujictab = '';
609
+ $table_name = $wpdb->prefix . "uji_counter";
610
+ $ujic_datas = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY `time` DESC" );
611
+ if ( !empty( $ujic_datas ) ) {
612
+ foreach ( $ujic_datas as $ujic ) {
613
+ $ujic_style = !empty( $ujic->style ) ? $ujic->style : 'classic';
614
+ $ujic_ico = '<span id="ujic-style-' . $ujic_style . '" class="ujic-types">' . $ujic_style . '</span>';
615
+ $ujictab .='<tr>
616
+ <td>' . $ujic->time . '</td>
617
+ <td>' . $ujic->title . '</td>
618
+ <td>' . $ujic_ico . '</td>
619
+ <td>
620
+ <a href="?page=uji-countdown&tab=tab_ujic_new&edit=' . $ujic->id . '"><i class="dashicons dashicons-welcome-write-blog"></i>Edit</a> | <a href="options-general.php?page=uji-countdown&del=' . $ujic->id . '"><i class="dashicons dashicons-trash"></i> Delete</a>
621
+ </td>
622
+ </tr>';
623
+ }
624
+ }
625
+
626
+ return $ujictab;
627
+ }
628
+
629
+ /**
630
+ * Message Notification.
631
+ *
632
+ * @since 2.0
633
+ */
634
+ private function ujic_message( $message, $errormsg = false ) {
635
+ if ( $errormsg ) {
636
+ echo '<div id="message" class="error">';
637
+ } else {
638
+ echo '<div id="message" class="updated fade">';
639
+ }
640
+
641
+ echo "<p><strong>$message</strong></p></div>";
642
+ }
643
+
644
+ /**
645
+ * Timer settings
646
+ *
647
+ * @since 2.0
648
+ */
649
+ public function admin_timerset() {
650
+ //Save data
651
+ $this->save_timerset();
652
+ //Get data
653
+ $vars = $this->get_timerset();
654
+
655
+ //Build Forms
656
+ $cnt = '<form method="post" action="options-general.php?page=uji-countdown&tab=tab_ujic_set&saveset=true">';
657
+
658
+ $cnt .= $this->cform_checkbox( __( "Right-To-Left (RTL):", $this->plugin_slug ), array( 'ujic_rtl' ), array( __("Writing starts from the right of the page and continues to the left.", $this->plugin_slug ) ), array( ( isset($vars['ujic_rtl']) ? $vars['ujic_rtl'] : false ) ) );
659
+ $cnt .= $this->cform_title( __( "Quick Translation", $this->plugin_slug ) );
660
+
661
+ $labels = self::ujic_labels();
662
+
663
+ foreach ( $labels as $v => $n ){
664
+ $cnt .= $this->cform_input( __( $n.':', $this->plugin_slug ), $v, $vars[$v], 'default-text' );
665
+ }
666
+ $cnt .= get_submit_button( __( "Save Changes", $this->plugin_slug ), 'primary', 'submit_ujic', true );
667
+
668
+ $cnt .= '</form>';
669
+
670
+ echo $this->custom_metabox( __( "Timer Settings", $this->plugin_slug ), $cnt, 'ujic-create ujic-settings' );
671
+ }
672
+
673
+ /**
674
+ * Save timer settings
675
+ *
676
+ * @since 2.0
677
+ */
678
+ public function save_timerset() {
679
+ if ( isset( $_POST ) && !empty( $_POST ) && isset( $_GET['saveset'] ) && !empty( $_GET['saveset'] ) && $_GET['saveset'] == 'true' ){
680
+ $settings = $_POST;
681
+ unset($settings['submit_ujic']);
682
+ update_option('ujic_set', $settings);
683
+ $this->ujic_message( __("Settings saved.", $this->plugin_slug ) );
684
+ }elseif( isset( $_POST ) && !empty( $_POST ) ){
685
+ $this->ujic_message( __("Some error occured. Please try again.", $this->plugin_slug ) );
686
+ }
687
+ }
688
+
689
+ /**
690
+ * Get timer settings
691
+ *
692
+ * @since 2.0
693
+ */
694
+ public function get_timerset( $name = null ) {
695
+ $vars = get_option('ujic_set');
696
+ if($name)
697
+ return $vars[$name];
698
+ else
699
+ return $vars;
700
+ }
701
+
702
+ }
classes/class-uji-countdown-front.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Plugin Name: Uji Countdown
5
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
+ * Description: HTML5 Countdown.
7
+ * Version: 2.0
8
+ * Author: WPmanage <info@wpmanage.com>
9
+ * Author URI: http://www.wpmanage.com
10
+ */
11
+ if ( !defined( 'ABSPATH' ) )
12
+ exit; // Exit if accessed directly
13
+
14
+ class UjiCountdown extends Uji_Countdown {
15
+
16
+ /**
17
+ * Init vars
18
+ *
19
+ * @since 2.0
20
+ */
21
+ public static function uji_vars() {
22
+ return array( 'class' => 'ujic_pos',
23
+ 'ujic_style' => 'ujic_style',
24
+ 'ujic_txt_size' => 'ujic_size',
25
+ 'ujic_col_dw' => 'ujic_col_dw',
26
+ 'ujic_col_up' => 'ujic_col_up',
27
+ 'ujic_col_txt' => 'ujic_col_txt',
28
+ 'ujic_col_sw' => 'ujic_col_sw',
29
+ 'ujic_col_lab' => 'ujic_col_lab',
30
+ 'ujic_lab_sz' => 'ujic_lab_sz',
31
+ 'ujic_thick' => 'ujic_thick',
32
+ 'ujic_txt' => 'ujic_txt',
33
+ 'ujic_ani' => 'ujic_ani',
34
+ 'ujic_d' => 'ujic_d',
35
+ 'ujic_h' => 'ujic_h',
36
+ 'ujic_m' => 'ujic_m',
37
+ 'ujic_s' => 'ujic_s',
38
+ 'ujic_y' => 'ujic_y',
39
+ 'ujic_o' => 'ujic_o',
40
+ 'ujic_w' => 'ujic_w',
41
+ 'ujic_goof' => 'ujic_goof',
42
+ 'ujic_post' => 'time');
43
+ }
44
+
45
+ /**
46
+ * Initialize the plugin frontend.
47
+ *
48
+ * @since 2.0
49
+ */
50
+ public function __construct() {
51
+ //add the shortcode
52
+ add_shortcode( 'ujicountdown', array( $this, 'ujic_shortcode' ) );
53
+
54
+ }
55
+
56
+ /**
57
+ * The shortcode
58
+ *
59
+ * @since 2.0
60
+ */
61
+ public function ujic_shortcode( $atts, $content = null ) {
62
+ extract( shortcode_atts( array(
63
+ // 'style' => "classic",
64
+ 'id' => "",
65
+ 'expire' => "",
66
+ 'hide' => "",
67
+ 'url' => ""
68
+ ), $atts ) );
69
+ //Increment counters
70
+ static $ujic_count = 0;
71
+
72
+ $unx_time = strtotime( $expire . ":00" );
73
+ $now_time = (int) current_time( 'timestamp' );
74
+
75
+ if ( ($hide == "true" && $now_time > $unx_time) || $ujic_count > 0 ) {
76
+ return $content;
77
+ } else {
78
+
79
+ //get all vars
80
+ $get_vars = self::uji_vars();
81
+
82
+ foreach ($get_vars as $nm => $var){
83
+ ${$nm} = $this->sel_ujic_db( $id, $var );
84
+ }
85
+
86
+ $ujic_id = 'ujiCountdown';
87
+ $classh = !empty( $ujic_style ) ? ' ujic-' . $ujic_style : '';
88
+ $hclass =!empty( $class ) ? ' ujic_' . $class . '' : '';
89
+
90
+ //Days Cicle
91
+ $exp_time = strtotime($expire);
92
+ $post_time = strtotime($ujic_post);
93
+ $difference = $exp_time - $post_time;
94
+ $difference = ($difference < 0) ? $difference = 0 : $difference;
95
+ $exp_d = floor($difference/60/60/24);
96
+ $exp_days = !empty($exp_d) ? $exp_d : "2000";
97
+
98
+ //enqueue
99
+ wp_enqueue_style( $this->plugin_slug . '-uji-countdown' );
100
+ wp_enqueue_script( $this->plugin_slug . '-core' );
101
+ wp_localize_script( $this->plugin_slug . '-init', 'ujiCount', array(
102
+ 'uji_plugin' => plugins_url(),
103
+ 'uji_style' => $ujic_style,
104
+ 'expire' => $expire,
105
+ 'exp_days'=> $exp_days,
106
+ 'Years' => ( $this->ujic_get_option('ujic_years') ) ? $this->ujic_get_option('ujic_years') : __( "Years", $this->plugin_slug ),
107
+ 'Year' => ( $this->ujic_get_option('ujic_year') ) ? $this->ujic_get_option('ujic_year') : __( "Year", $this->plugin_slug ),
108
+ 'Months' => ( $this->ujic_get_option('ujic_months') ) ? $this->ujic_get_option('ujic_months') : __( "Months", $this->plugin_slug ),
109
+ 'Month' => ( $this->ujic_get_option('ujic_month') ) ? $this->ujic_get_option('ujic_month') : __( "Month", $this->plugin_slug ),
110
+ 'Weeks' => ( $this->ujic_get_option('ujic_weeks') ) ? $this->ujic_get_option('ujic_weeks') : __( "Weeks", $this->plugin_slug ),
111
+ 'Week' => ( $this->ujic_get_option('ujic_week') ) ? $this->ujic_get_option('ujic_week') : __( "Week", $this->plugin_slug ),
112
+ 'Days' => ( $this->ujic_get_option('ujic_days') ) ? $this->ujic_get_option('ujic_days') : __( "Days", $this->plugin_slug ),
113
+ 'Day' => ( $this->ujic_get_option('ujic_day') ) ? $this->ujic_get_option('ujic_day') : __( "Day", $this->plugin_slug ),
114
+ 'Hours' => ( $this->ujic_get_option('ujic_hours') ) ? $this->ujic_get_option('ujic_hours') : __( "Hours", $this->plugin_slug ),
115
+ 'Hour' => ( $this->ujic_get_option('ujic_hour') ) ? $this->ujic_get_option('ujic_hour') : __( "Hour", $this->plugin_slug ),
116
+ 'Minutes' => ( $this->ujic_get_option('ujic_minutes') ) ? $this->ujic_get_option('ujic_minutes') : __( "Minutes", $this->plugin_slug ),
117
+ 'Minute' => ( $this->ujic_get_option('ujic_minute') ) ? $this->ujic_get_option('ujic_minute') : __( "Minute", $this->plugin_slug ),
118
+ 'Seconds' => ( $this->ujic_get_option('ujic_seconds') ) ? $this->ujic_get_option('ujic_seconds') : __( "Seconds", $this->plugin_slug ),
119
+ 'Second' => ( $this->ujic_get_option('ujic_second') ) ? $this->ujic_get_option('ujic_second') : __( "Second", $this->plugin_slug ),
120
+ 'ujic_txt_size' => $ujic_txt_size,
121
+ 'ujic_thick' => $ujic_thick,
122
+ 'ujic_col_dw' => $ujic_col_dw,
123
+ 'ujic_col_up' => $ujic_col_up,
124
+ 'ujic_col_txt' => $ujic_col_txt,
125
+ 'ujic_col_sw' => $ujic_col_sw,
126
+ 'ujic_col_lab' => $ujic_col_lab,
127
+ 'ujic_lab_sz' => $ujic_lab_sz,
128
+ 'ujic_txt' => $ujic_txt,
129
+ 'ujic_ani' => $ujic_ani,
130
+ 'ujic_url' => $url,
131
+ 'ujic_goof' => $ujic_goof,
132
+ 'uji_center' => $classh,
133
+ 'ujic_d' => $ujic_d, //Main format: Days
134
+ 'ujic_h' => $ujic_h, //Main format: Hours
135
+ 'ujic_m' => $ujic_m, //Main format: Minutes
136
+ 'ujic_s' => $ujic_s, //Main format: Seconds
137
+ 'ujic_y' => $ujic_y, //Secondary format: Years
138
+ 'ujic_o' => $ujic_o, //Secondary format: Months
139
+ 'ujic_w' => $ujic_w, //Secondary format: Weeks
140
+ 'uji_time' => date_i18n( 'M j, Y H:i:s ' ) . "+0000",
141
+ 'uji_hide' => ($hide == "true") ? 'true' : 'false',
142
+ 'ujic_rtl' => ( $this->ujic_get_option('ujic_rtl') ) ? $this->ujic_get_option('ujic_rtl') : false
143
+ ) );
144
+
145
+ wp_enqueue_script( $this->plugin_slug . '-init' );
146
+ $ujic_count ++;
147
+ return strip_shortcodes( '<div class="ujic-hold' . $hclass . '"> <div class="ujiCountdown' . $classh . '" id="' . $ujic_id . '"></div></div>' . $content );
148
+
149
+ }
150
+ }
151
+
152
+
153
+ }
154
+
155
+ ?>
classes/class-uji-countdown.php ADDED
@@ -0,0 +1,607 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Plugin Name: Uji Countdown
5
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
+ * Description: HTML5 Countdown.
7
+ * Version: 2.0
8
+ * Author: WPmanage <info@wpmanage.com>
9
+ * Author URI: http://www.wpmanage.com
10
+ */
11
+
12
+ if ( !defined( 'ABSPATH' ) )
13
+ exit; // Exit if accessed directly
14
+
15
+ class Uji_Countdown extends Uji_Countdown_Admin {
16
+
17
+ /**
18
+ * Uji Countdown
19
+ *
20
+ * @since 2.0
21
+ *
22
+ * @var string
23
+ */
24
+ protected $pname = UJIC_NAME;
25
+
26
+ /**
27
+ * Plugin version, used for cache-busting of style and script file references.
28
+ *
29
+ * @since 2.0
30
+ *
31
+ * @var string
32
+ */
33
+ protected $version = UJIC_VERS;
34
+
35
+ /**
36
+ * Unique identifier for your plugin.
37
+ *
38
+ * Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
39
+ * match the Text Domain file header in the main plugin file.
40
+ *
41
+ * @since 2.0
42
+ *
43
+ * @var string
44
+ */
45
+ protected $plugin_slug = 'uji-countdown';
46
+
47
+ /**
48
+ * Counter Options.
49
+ *
50
+ * @since 2.0
51
+ *
52
+ * @var array
53
+ */
54
+ private $options = array();
55
+
56
+ /**
57
+ * Instance of this class.
58
+ *
59
+ * @since 2.0
60
+ *
61
+ * @var object
62
+ */
63
+ protected static $instance = null;
64
+
65
+ /**
66
+ * Slug of the plugin screen.
67
+ *
68
+ * @since 2.0
69
+ *
70
+ * @var string
71
+ */
72
+ protected $plugin_screen_hook_suffix = null;
73
+
74
+ /**
75
+ * Init.
76
+ *
77
+ * @since 2.0
78
+ *
79
+ * @var string
80
+ */
81
+ public $uji;
82
+
83
+ /**
84
+ * Initialize the plugin by setting localization, filters, and administration functions.
85
+ *
86
+ * @since 2.0
87
+ */
88
+ public function __construct() {
89
+
90
+ // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
91
+ register_activation_hook( UJICOUNTDOWN_FILE, array( $this, 'activate' ) );
92
+ register_deactivation_hook( UJICOUNTDOWN_FILE, array( $this, 'deactivate' ) );
93
+
94
+ //Show on front
95
+ if ( !is_admin() ) {
96
+ $ujic = new UjiCountdown();
97
+ }
98
+ // Load plugin text domain
99
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
100
+
101
+ // Load public-facing style sheet and JavaScript.
102
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
103
+
104
+ // HOOKs Widget
105
+ add_action( 'widgets_init', array( $this, 'ujic_register_widgets' ) );
106
+
107
+ if ( is_admin() ) {
108
+
109
+ // Add the options page and menu item.
110
+ add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
111
+
112
+ // Load admin style sheet and JavaScript.
113
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
114
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
115
+
116
+ // Load admin shortcode style sheet and JavaScript.
117
+ add_action( 'admin_enqueue_scripts', array( &$this, 'ujic_shortcode_scripts' ) );
118
+
119
+ // Add the Link from plugins
120
+ add_filter('plugin_action_links', array($this, 'plugin_settings_link'),10,2);
121
+
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Counter Options.
127
+ *
128
+ * @since 2.0
129
+ */
130
+ public function ujic_option( $id = NULL, $name = NULL ) {
131
+ //Default values
132
+ $sz = ( isset( $_GET['style'] ) && $_GET['style'] == 'modern' ) ? 50 : 32;
133
+ $col = ( isset( $_GET['style'] ) && $_GET['style'] == 'modern' ) ? '#efefef' : '#c368c3';
134
+ $txtc = ( isset( $_GET['style'] ) && $_GET['style'] == 'modern' ) ? '#000000' : '#ffffff';
135
+ $options = array(
136
+ "ujic_name" => "", //Name
137
+ "ujic_style" => "classic", //Style
138
+ "ujic_size" => $sz, //Timer Size
139
+ "ujic_thick" => 10, //Thickness
140
+ "ujic_goof" => 'none', //Google Font
141
+ "ujic_col_dw" => '#a61ba6', //Select Box Color Down
142
+ "ujic_col_up" => $col, //Select Box Color Up
143
+ "ujic_col_txt" => $txtc, //Text Color Number
144
+ "ujic_col_sw" => '#000000', //Text Color Shadow
145
+ "ujic_col_lab" => '#000000', //LAbel Text Color
146
+ "ujic_lab_sz" => 13, //Label size
147
+ "ujic_pos" => 'none', //Alignment
148
+ "ujic_d" => "true", //Main format: Days
149
+ "ujic_h" => "true", //Main format: Hours
150
+ "ujic_m" => "true", //Main format: Minutes
151
+ "ujic_s" => "true", //Main format: Seconds
152
+ "ujic_y" => 0, //Secondary format: Years
153
+ "ujic_o" => 0, //Secondary format: Months
154
+ "ujic_w" => 0, //Secondary format: Weeks
155
+ "ujic_txt" => "true", //Show Label Text
156
+ "ujic_ani" => 0 //Animation for seconds
157
+ );
158
+
159
+ //Return default values
160
+ if ( (!isset( $name ) || empty( $name ) ) && (!isset( $id ) || empty( $id ) ) ) {
161
+ if ( $this->cform_is_create() ) {
162
+ foreach ( $options as $nm => $val ) {
163
+ $new_options[$nm] = ( isset( $_POST[$nm] ) && !empty( $_POST[$nm] ) ) ? $_POST[$nm] : '';
164
+ }
165
+ return $new_options;
166
+ } else {
167
+ return $options;
168
+ }
169
+ }
170
+
171
+ //Return all saved values
172
+ if ( !isset( $name ) && isset( $id ) ) {
173
+ $get_option = $this->sel_ujic_db( $id );
174
+
175
+ foreach ( $options as $nm => $val ) {
176
+ $val = ( isset( $_GET['edit'] ) && !empty( $_GET['edit'] ) ) ? '' : $val;
177
+ $new_options[$nm] = ( isset( $get_option[$nm] ) && !empty( $get_option[$nm] ) ) ? $get_option[$nm] : $val;
178
+ }
179
+ return $new_options;
180
+ }
181
+
182
+ //Return one saved value
183
+ if ( isset( $name ) && isset( $id ) && !empty( $name ) && !empty( $id ) ) {
184
+ $one_option = $this->sel_ujic_db( $id, $name );
185
+ $new_option = (!empty( $one_option ) ) ? $one_option : $options[$name];
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Short Link
191
+ *
192
+ * @since 2.0
193
+ */
194
+ public function plugin_settings_link( $links, $file ) {
195
+ if ( $file != UJICOUNTDOWN_BASE)
196
+ return $links;
197
+
198
+ array_unshift($links, '<a href="options-general.php?page=uji-countdown">' . __( 'Settings', $this->plugin_slug ) . '</a>');
199
+
200
+ return $links;
201
+ }
202
+
203
+ /**
204
+ * Table Name.
205
+ *
206
+ * @since 2.0
207
+ */
208
+ public static function ujic_tab_name() {
209
+ global $wpdb;
210
+ return $wpdb->prefix . "uji_counter";
211
+ }
212
+
213
+ /**
214
+ * Get Database.
215
+ *
216
+ * @since 2.0
217
+ */
218
+ public function sel_ujic_db( $id, $name = NULL ) {
219
+ global $wpdb;
220
+ $options = array();
221
+
222
+ if ( is_numeric( $id ) )
223
+ $ujic_data = $wpdb->get_row( "SELECT * FROM " . self::ujic_tab_name() . " WHERE id = $id" );
224
+ else
225
+ $ujic_data = $wpdb->get_row( "SELECT * FROM " . self::ujic_tab_name() . " WHERE title = '" . $id . "'" );
226
+
227
+ $var['id'] = $ujic_data->id;
228
+ $var['time'] = $ujic_data->time;
229
+ $var['ujic_name'] = $ujic_data->title;
230
+ $var['ujic_style'] = $ujic_data->style;
231
+
232
+
233
+ if ( !empty( $ujic_data->options ) ) {
234
+ $options = maybe_unserialize( $ujic_data->options );
235
+ foreach ( $options as $option => $val ) {
236
+ $var[$option] = $val;
237
+ }
238
+ }
239
+ if ( $name )
240
+ return isset( $var[$name] ) ? $var[$name] : null;
241
+ else
242
+ return $var;
243
+ }
244
+
245
+ /**
246
+ * Insert Database.
247
+ *
248
+ * @since 2.0
249
+ */
250
+ public function ins_ujic_db( $posts ) {
251
+ global $wpdb;
252
+
253
+ $options = array();
254
+ $default = $this->ujic_option();
255
+ foreach ( $posts as $name => $val ) {
256
+ $options[$name] = (!empty( $val ) ) ? $val : $default[$name];
257
+ }
258
+ $title = $options['ujic_name'];
259
+ $style = $options['ujic_style'];
260
+ unset( $options['ujic_name'], $options['ujic_style'], $options['submit_ujic'] );
261
+ //insert to DB
262
+ $wpdb->query( $wpdb->prepare( "INSERT INTO " . self::ujic_tab_name() . "(time, title, style, options )
263
+ VALUES (utc_timestamp(), %s, %s, %s)", trim( $title ), trim( $style ), maybe_serialize( $options )
264
+ ) );
265
+ }
266
+
267
+ /**
268
+ * Update Database.
269
+ *
270
+ * @since 2.0
271
+ */
272
+ public function upd_ujic_db( $posts, $id ) {
273
+ global $wpdb;
274
+
275
+ $options = array();
276
+ $default = $this->ujic_option();
277
+ foreach ( $posts as $name => $val ) {
278
+ $options[$name] = (!empty( $val ) ) ? $val : $default[$name];
279
+ }
280
+ $title = $options['ujic_name'];
281
+ $style = $options['ujic_style'];
282
+ unset( $options['ujic_name'], $options['ujic_style'], $options['submit_ujic'], $options['cancel_ujic'] );
283
+ //update DB
284
+ $wpdb->query( $wpdb->prepare( "UPDATE " . self::ujic_tab_name() . " SET title=%s, style=%s, options=%s WHERE id=%d", trim( $title ), trim( $style ), maybe_serialize( $options ), $id
285
+ ) );
286
+ }
287
+
288
+ /**
289
+ * Delete Database.
290
+ *
291
+ * @since 2.0
292
+ */
293
+ public function del_ujic_db( $id ) {
294
+ global $wpdb;
295
+ $wpdb->query( "DELETE FROM " . self::ujic_tab_name() . " WHERE id = '" . $id . "'" );
296
+ }
297
+
298
+ /**
299
+ * Create Database.
300
+ *
301
+ * @since 2.0
302
+ */
303
+ private static function create_ujic_db() {
304
+ global $wpdb;
305
+
306
+ $wpdb->hide_errors();
307
+ $collate = '';
308
+
309
+ if ( $wpdb->has_cap( 'collation' ) ) {
310
+ if ( ! empty($wpdb->charset ) ) {
311
+ $collate .= "DEFAULT CHARACTER SET $wpdb->charset";
312
+ }
313
+ if ( ! empty($wpdb->collate ) ) {
314
+ $collate .= " COLLATE $wpdb->collate";
315
+ }
316
+ }
317
+
318
+
319
+ $sql = "CREATE TABLE " . self::ujic_tab_name() . " (
320
+ id int(9) unsigned NOT NULL AUTO_INCREMENT,
321
+ time datetime not null,
322
+ title varchar(128) not null,
323
+ style varchar(8) not null,
324
+ options longtext,
325
+ PRIMARY KEY (id),
326
+ KEY id (id)
327
+ ) $collate";
328
+ require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
329
+ dbDelta( $sql );
330
+ }
331
+
332
+ /**
333
+ * Create/Upgrade Database.
334
+ *
335
+ * @since 2.0
336
+ */
337
+ private function upgrade_db() {
338
+ global $wpdb;
339
+
340
+ if ( ! $wpdb->get_var( "SHOW COLUMNS FROM " . self::ujic_tab_name() . " LIKE 'options'" ) ) {
341
+
342
+ // Create DB
343
+ self::create_ujic_db();
344
+
345
+ $old_data = $wpdb->get_results("SELECT * FROM " . self::ujic_tab_name());
346
+
347
+ foreach ( $old_data as $data ) {
348
+
349
+ $posts["ujic_name"] = $data->title; //Timer Title
350
+ $posts["ujic_style"] = $data->style; //Timer Style
351
+ $posts["ujic_size"] = $data->size; //Timer Size
352
+ if( $data->ujic_thick ) $posts["ujic_thick"] = $data->ujic_thick; //Thickness
353
+ $posts["ujic_col_dw"] = $data->col_dw; //Select Box Color Down
354
+ $posts["ujic_col_up"] = $data->col_up; //Select Box Color Up
355
+ if( $data->col_txt ) $posts["ujic_col_txt"] = $data->col_txt; //Text Color Number
356
+ if( $data->col_sw ) $posts["ujic_col_sw"] = $data->col_sw; //Text Color Shadow
357
+ $posts["ujic_pos"] = $data->ujic_pos; //Alignment
358
+ $posts["ujic_goof"] = 'none'; //Google Font
359
+ $posts["ujic_txt"] = ($data->ujic_txt) ? "true" : 0; //Show Label Text
360
+ $posts["ujic_col_lab"] = '#000000'; //LAbel Text Color
361
+ $posts["ujic_lab_sz"] = 13; //Label size
362
+ $posts["ujic_ani"] = ($data->ujic_ani) ? "true" : 0; //Animation for seconds
363
+ $posts["ujic_d"] = "true"; //Main format: Days
364
+ $posts["ujic_h"] = "true"; //Main format: Hours
365
+ $posts["ujic_m"] = "true"; //Main format: Minutes
366
+ $posts["ujic_s"] = "true"; //Main format: Seconds
367
+ $posts["ujic_y"] = 0; //Secondary format: Years
368
+ $posts["ujic_o"] = 0; //Secondary format: Months
369
+ $posts["ujic_w"] = 0; //Secondary format: Weeks
370
+
371
+ $this->upd_ujic_db( $posts, $data->id );
372
+
373
+ $wpdb->query( "ALTER TABLE " . self::ujic_tab_name() . " ENGINE = INNODB;");
374
+ $wpdb->query( "ALTER TABLE " . self::ujic_tab_name() . " DROP `size`, DROP `col_dw`, DROP `col_up`, DROP `ujic_pos`, DROP `col_txt`, DROP `col_sw`, DROP `ujic_ani`, DROP `ujic_txt`, DROP `ujic_thick`;");
375
+
376
+ }
377
+
378
+ }else{
379
+ // Create DB
380
+ self::create_ujic_db();
381
+ }
382
+
383
+ }
384
+
385
+ /**
386
+ * Return an instance of this class.
387
+ *
388
+ * @since 2.0
389
+ *
390
+ * @return object A single instance of this class.
391
+ */
392
+ public static function get_instance() {
393
+
394
+ // If the single instance hasn't been set, set it now.
395
+ if ( null == self::$instance ) {
396
+ self::$instance = new self;
397
+ }
398
+
399
+ return self::$instance;
400
+ }
401
+
402
+ /**
403
+ * Fired when the plugin is activated.
404
+ *
405
+ * @since 2.0
406
+ *
407
+ * @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false if WPMU is disabled or plugin is activated on an individual blog.
408
+ */
409
+ public function activate( $network_wide ) {
410
+ //Upgrade DB
411
+ $this->upgrade_db();
412
+ }
413
+
414
+ /**
415
+ * Fired when the plugin is deactivated.
416
+ *
417
+ * @since 2.0
418
+ *
419
+ * @param boolean $network_wide True if WPMU superadmin uses "Network Deactivate" action, false if WPMU is disabled or plugin is deactivated on an individual blog.
420
+ */
421
+ public static function deactivate( $network_wide ) {
422
+ // TODO: Define deactivation functionality here
423
+ }
424
+
425
+ /**
426
+ * Load the plugin text domain for translation.
427
+ *
428
+ * @since 2.0
429
+ */
430
+ public function load_plugin_textdomain() {
431
+
432
+ $domain = $this->plugin_slug;
433
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
434
+
435
+ load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
436
+ load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
437
+ }
438
+
439
+ /**
440
+ * Register and enqueue admin-specific style sheet.
441
+ *
442
+ * @since 2.0
443
+ *
444
+ * @return null Return early if no settings page is registered.
445
+ */
446
+ public function enqueue_admin_styles() {
447
+
448
+ if ( !isset( $this->plugin_screen_hook_suffix ) ) {
449
+ return;
450
+ }
451
+
452
+ $screen = get_current_screen();
453
+ if ( $screen->id == $this->plugin_screen_hook_suffix ) {
454
+ if(isset($_GET['tab']) && (isset($_GET['tab']) && $_GET['tab'] != "tab_ujic_list") ){
455
+ wp_enqueue_style( 'wp-color-picker' );
456
+ wp_enqueue_style( $this->plugin_slug . '-admin-jqueryui', UJICOUNTDOWN_URL . 'assets/css/jquery-ui-custom.css', array(), $this->version );
457
+ wp_enqueue_style( $this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/css/pink.css', array(), $this->version );
458
+ }
459
+ wp_enqueue_style( $this->plugin_slug . '-admin-styles', UJICOUNTDOWN_URL . 'assets/css/admin.css', array(), $this->version );
460
+ }
461
+ }
462
+
463
+ /**
464
+ * Register and enqueue admin-specific JavaScript.
465
+ *
466
+ * @since 2.0
467
+ *
468
+ * @return null Return early if no settings page is registered.
469
+ */
470
+ public function enqueue_admin_scripts() {
471
+
472
+ if ( !isset( $this->plugin_screen_hook_suffix ) ) {
473
+ return;
474
+ }
475
+ wp_enqueue_style( 'dashicons' );
476
+ $screen = get_current_screen();
477
+ if ( $screen->id == $this->plugin_screen_hook_suffix && (isset($_GET['tab']) && $_GET['tab'] != "tab_ujic_list")) {
478
+ wp_enqueue_script( 'dashboard' );
479
+ wp_enqueue_script( 'jquery-ui-core' );
480
+ wp_enqueue_script( 'jquery-ui-slider' );
481
+ wp_enqueue_script( 'jquery-ui-draggable' );
482
+ wp_enqueue_script( $this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/js/jquery.icheck.min.js' );
483
+ wp_enqueue_script( $this->plugin_slug . '-admin-script', UJICOUNTDOWN_URL . 'assets/js/admin.js', array( 'wp-color-picker' ), $this->version );
484
+ }
485
+ }
486
+
487
+ /**
488
+ * Register and enqueues public-facing JavaScript files.
489
+ *
490
+ * @since 2.0
491
+ */
492
+ public function enqueue_scripts() {
493
+ wp_register_style( $this->plugin_slug . '-uji-countdown', UJICOUNTDOWN_URL . 'css/uji-countdown.css', array(), $this->version );
494
+ wp_register_script( $this->plugin_slug . '-core', UJICOUNTDOWN_URL . 'js/jquery.countdown.js', array( 'jquery' ), $this->version );
495
+ wp_register_script( $this->plugin_slug . '-init', UJICOUNTDOWN_URL . 'js/uji-countdown.js', array( 'jquery' ), $this->version );
496
+ }
497
+
498
+ /**
499
+ * Register the administration menu for this plugin into the WordPress Dashboard menu.
500
+ *
501
+ * @since 2.0
502
+ */
503
+ public function add_plugin_admin_menu() {
504
+ $this->plugin_screen_hook_suffix = add_submenu_page(
505
+ 'options-general.php', $this->pname . " " . $this->version, $this->pname, 'manage_options', $this->plugin_slug, array( $this, 'display_plugin_admin_page' )
506
+ );
507
+ }
508
+
509
+ /**
510
+ * Render the settings page for this plugin.
511
+ *
512
+ * @since 2.0
513
+ */
514
+ public function display_plugin_admin_page() {
515
+ include_once( UJICOUNTDOWN . 'views/admin.php' );
516
+ }
517
+
518
+ // ---------------------------------------------------------------------------------------------------
519
+
520
+ /**
521
+ * Shortcode Admin Init
522
+ *
523
+ * @since 2.0
524
+ */
525
+ public function ujic_shortcode_scripts() {
526
+ $screen = get_current_screen();
527
+ if ( $screen->base == 'post' ):
528
+ // css
529
+ wp_enqueue_style( 'ujic-jui', UJICOUNTDOWN_URL . 'assets/tinymce/css/jquery-ui.min.css' );
530
+ wp_enqueue_style( 'ujic-popup', UJICOUNTDOWN_URL . 'assets/tinymce/css/popup.css', false, '1.0', 'all' );
531
+
532
+ // js
533
+ wp_enqueue_script( 'jquery-ui-sortable' );
534
+ wp_enqueue_script( 'jquery-ui-datepicker' );
535
+ wp_enqueue_script( 'jquery-livequery', UJICOUNTDOWN_URL . 'assets/tinymce/js/jquery.livequery.js', false, '1.1.1', false );
536
+ wp_enqueue_script( 'jquery-appendo', UJICOUNTDOWN_URL . 'assets/tinymce/js/jquery.appendo.js', false, '1.0', false );
537
+ wp_enqueue_script( 'base64', UJICOUNTDOWN_URL . 'assets/tinymce/js/base64.js', false, '1.0', false );
538
+ if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) {
539
+ wp_enqueue_script( 'ujic-popup', UJICOUNTDOWN_URL . 'assets/tinymce/js/popup.js', false, '1.0', false );
540
+ } else {
541
+ wp_enqueue_script( 'ujic-popup', UJICOUNTDOWN_URL . 'assets/tinymce/js/popup.old.js', false, '1.0', false );
542
+ //For older versions of WP
543
+ }
544
+
545
+ wp_localize_script( 'jquery', 'UjicShortcodes', array( 'plugin_folder' => UJICOUNTDOWN_URL ) );
546
+
547
+ if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) )
548
+ return;
549
+
550
+ if ( get_user_option( 'rich_editing' ) == 'true' ) {
551
+ add_filter( 'mce_external_plugins', array( &$this, 'add_rich_plugins' ) );
552
+ add_filter( 'mce_buttons', array( &$this, 'register_rich_buttons' ) );
553
+ }
554
+ endif;
555
+ }
556
+
557
+ /**
558
+ * Defins TinyMCE rich editor js plugin
559
+ *
560
+ * @return void
561
+ */
562
+ public function add_rich_plugins( $plugin_array ) {
563
+ if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) {
564
+ $plugin_array['ujicShortcodes'] = UJICOUNTDOWN_URL . 'assets/tinymce/plugin.js';
565
+ } else {
566
+ $plugin_array['ujicShortcodes'] = UJICOUNTDOWN_URL . 'assets/tinymce/plugin.old.js'; // For old versions of WP
567
+ }
568
+ return $plugin_array;
569
+ }
570
+
571
+ /**
572
+ * Adds TinyMCE rich editor buttons
573
+ *
574
+ * @return void
575
+ */
576
+ public function register_rich_buttons( $buttons ) {
577
+ array_push( $buttons, "|", 'ujic_button' );
578
+ return $buttons;
579
+ }
580
+
581
+ /**
582
+ * Register widget
583
+ *
584
+ * @return void
585
+ */
586
+ public function ujic_register_widgets() {
587
+ // Include - no need to use autoload as WP loads them anyway
588
+ include_once( 'class-uji-widget.php' );
589
+
590
+ // Register widgets
591
+ register_widget( 'ujic_Widget' );
592
+ }
593
+
594
+ /**
595
+ * Get options/option
596
+ *
597
+ * @since 2.0
598
+ */
599
+ public function ujic_get_option( $name, $opt = 'ujic_set' ) {
600
+ $vars = get_option($opt);
601
+ if($name && isset($vars[$name]) && !empty($vars[$name]) )
602
+ return $vars[$name];
603
+ else
604
+ return false;
605
+ }
606
+
607
+ }
classes/class-uji-widget.php ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Plugin Name: Uji Countdown
5
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
+ * Description: HTML5 Countdown.
7
+ * Version: 2.0
8
+ * Author: WPmanage <info@wpmanage.com>
9
+ * Author URI: http://www.wpmanage.com
10
+ */
11
+ if ( !defined( 'ABSPATH' ) )
12
+ exit; // Exit if accessed directly
13
+
14
+ class ujic_Widget extends WP_Widget {
15
+
16
+ protected $plugin_slug = 'uji-countdown';
17
+
18
+ /**
19
+ * Uji Countdown Init
20
+ *
21
+ * @since 2.0
22
+ *
23
+ * @var string
24
+ */
25
+ public function ujic_Widget() {
26
+ $widget_ops = array(
27
+ 'classname' => 'uji_Widget',
28
+ 'description' => 'Uji Countdown widget.'
29
+ );
30
+ $this->WP_Widget( 'uji_Widget', 'Uji Countdown', $widget_ops );
31
+
32
+ //actions
33
+ add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
34
+ add_action( 'admin_enqueue_scripts', array( &$this, 'admin_widgets_scripts_styles' ) );
35
+ }
36
+
37
+ /**
38
+ * Uji Countdown Admin Scripts
39
+ *
40
+ * @since 2.0
41
+ *
42
+ * @var string
43
+ */
44
+ public function admin_widgets_scripts_styles( $page ) {
45
+ if ( $page !== 'widgets.php' )
46
+ return;
47
+
48
+ wp_enqueue_script( 'jquery-ui-datepicker' );
49
+ wp_enqueue_style( 'jquery-ui', UJICOUNTDOWN_URL . 'assets/tinymce/css/jquery-ui.min.css' );
50
+ wp_enqueue_script( 'jquery-widget', UJICOUNTDOWN_URL . 'assets/js/widget.js' );
51
+ }
52
+
53
+ /**
54
+ * Uji Countdown Form
55
+ *
56
+ * @since 2.0
57
+ *
58
+ * @var string
59
+ */
60
+ public function ujic_forms( $sel = NULL ) {
61
+ global $wpdb;
62
+ $table_name = $wpdb->prefix . "uji_counter";
63
+ $ujic_datas = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY `time` DESC" );
64
+ if ( !empty( $ujic_datas ) ) {
65
+ $ujictab = false;
66
+ foreach ( $ujic_datas as $ujic ) {
67
+ $type = !empty( $ujic->style ) ? $ujic->style : "classic";
68
+ $select = (isset( $sel ) && !empty( $sel ) && $sel == $ujic->title ) ? ' selected="selected"' : '';
69
+ $ujictab .='<option value="' . $ujic->title . '" data-type=' . $type . ' ' . $select . '> ' . $ujic->title . ' - ' . $type . ' </option>';
70
+ }
71
+ return $ujictab;
72
+ } else {
73
+ return false;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Uji Countdown Get Time/Date
79
+ *
80
+ * @since 2.0
81
+ *
82
+ * @var string
83
+ */
84
+ public function ujic_sel_datetime( $nr, $sel = null ) {
85
+ for ( $i = 0; $i <= $nr; $i++ ) {
86
+ $num[sprintf( "%02s", $i )] = sprintf( "%02s", $i );
87
+ }
88
+ $numbers = false;
89
+ foreach ( $num as $n ) {
90
+ $select = (isset( $sel ) && !empty( $sel ) && $sel == $n) ? ' selected="selected"' : '';
91
+ $numbers .='<option value="' . $n . '"' . $select . '> ' . $n . ' </option>';
92
+ }
93
+
94
+ return $numbers;
95
+ }
96
+
97
+ /**
98
+ * Uji Countdown Widget
99
+ *
100
+ * @since 2.0
101
+ *
102
+ * @var string
103
+ */
104
+ public function widget( $args, $instance ) {
105
+ extract( $args, EXTR_SKIP );
106
+
107
+ /* Our variables from the widget settings. */
108
+ $title = apply_filters( 'widget_UJI_title', $instance['UJI_title'], $instance, $this->id_base );
109
+ $name = isset( $instance['UJI_style'] ) ? $instance['UJI_style'] : false;
110
+ $date = isset( $instance['UJI_date'] ) ? $instance['UJI_date'] : false;
111
+ $hour = isset( $instance['UJI_hours'] ) ? $instance['UJI_hours'] : false;
112
+ $minut = isset( $instance['UJI_minutes'] ) ? $instance['UJI_minutes'] : false;
113
+ $hide = isset( $instance['UJI_hide'] ) ? $instance['UJI_hide'] : false;
114
+ $url = isset( $instance['UJI_url'] ) ? $instance['UJI_url'] : false;
115
+
116
+ $shtval = '';
117
+ $shtval .= (!empty( $name ) ) ? ' id="' . $name . '"' : $shtval;
118
+ $shtval .= (!empty( $date ) ) ? ' expire="' . $date . ' ' . $hour . ':' . $minut . '"' : $shtval;
119
+ $shtval .= (!empty( $hide ) ) ? ' hide = "true"' : $shtval;
120
+ $shtval .= ( empty( $hide ) && !empty( $url ) ) ? ' url = "' . $url . '"' : $shtval;
121
+
122
+ $shortcode = (!empty( $shtval ) ) ? '[ujicountdown' . $shtval . ']' : '';
123
+
124
+ if ( !empty( $shortcode ) ) {
125
+ echo $before_widget;
126
+ if ( $title )
127
+ echo $before_title . $title . $after_title;
128
+ echo do_shortcode( $shortcode );
129
+ echo $after_widget;
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Uji Countdown Update
135
+ *
136
+ * @since 2.0
137
+ *
138
+ * @var string
139
+ */
140
+ public function update( $new_instance, $old_instance ) {
141
+ $instance = $old_instance;
142
+ $instance['UJI_title'] = strip_tags( $new_instance['UJI_title'] );
143
+ $instance['UJI_style'] = strip_tags( $new_instance['UJI_style'] );
144
+ $instance['UJI_date'] = strip_tags( $new_instance['UJI_date'] );
145
+ $instance['UJI_hours'] = strip_tags( $new_instance['UJI_hours'] );
146
+ $instance['UJI_minutes'] = strip_tags( $new_instance['UJI_minutes'] );
147
+ $instance['UJI_hide'] = strip_tags( $new_instance['UJI_hide'] );
148
+ $instance['UJI_url'] = strip_tags( $new_instance['UJI_url'] );
149
+
150
+ return $instance;
151
+ }
152
+
153
+ /**
154
+ * Uji Countdown Form
155
+ *
156
+ * @since 2.0
157
+ *
158
+ * @var string
159
+ */
160
+ public function form( $instance ) {
161
+
162
+ $defaults = array(
163
+ 'UJI_title' => '',
164
+ 'UJI_style' => false,
165
+ 'UJI_date' => '',
166
+ 'UJI_hours' => 23,
167
+ 'UJI_minutes' => 59,
168
+ 'UJI_hide' => '',
169
+ 'UJI_url' => ''
170
+ );
171
+
172
+ $instance = wp_parse_args( (array) $instance, $defaults );
173
+ ?>
174
+ <p style="font-size:11px">
175
+ Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
176
+ <p>
177
+ <!-- Widget Title: Text Input -->
178
+ <p>
179
+ <label for="<?php echo $this->get_field_id( 'UJI_title' ); ?>"><?php _e( 'Title (optional):', $this->plugin_slug ); ?></label>
180
+ <input type="text" name="<?php echo $this->get_field_name( 'UJI_title' ); ?>" value="<?php echo $instance['UJI_title']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_title' ); ?>" />
181
+ </p>
182
+
183
+ <!-- Widget Select Style: Select Input -->
184
+ <p>
185
+
186
+ <?php if ( $this->ujic_forms() ): ?>
187
+
188
+ <label for="<?php echo $this->get_field_id( 'UJI_style' ); ?>"><?php _e( 'Select a Style:', $this->plugin_slug ); ?></label>
189
+ <select name="<?php echo $this->get_field_name( 'UJI_style' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_style' ); ?>">
190
+ <?php
191
+ echo $this->ujic_forms( $instance['UJI_style'] );
192
+ ?>
193
+ </select>
194
+
195
+ <?php else: ?>
196
+
197
+ <h4 style="color: firebrick"><?php _e( 'Please create new timer style first.', $this->plugin_slug ); ?></h4>
198
+
199
+ <?php endif; ?>
200
+
201
+ </p>
202
+
203
+ <!-- Widget Date: Text Input -->
204
+ <p>
205
+ <label for="<?php echo $this->get_field_id( 'UJI_date' ); ?>"><?php _e( 'Expire Date:', $this->plugin_slug ); ?></label>
206
+ <input type="text" name="<?php echo $this->get_field_name( 'UJI_date' ); ?>" value="<?php echo $instance['UJI_date']; ?>" style="background: url('<?php echo UJICOUNTDOWN_URL ?>/assets/tinymce/images/data-picker.png') no-repeat scroll right top; display:block; height: 26px; width: 180px;" class="widefat ujic_date" id="<?php echo $this->get_field_id( 'UJI_date' ); ?>" />
207
+ </p>
208
+
209
+ <!-- Widget Select Time: Select Input -->
210
+ <p>
211
+ <label><?php _e( 'Select the Time:', $this->plugin_slug ); ?></label>
212
+ <div style="display: block;">
213
+ <div style="display: inline-block; margin: 0 5px 0 5px">
214
+ <h4 style="margin:0"><?php _e( 'Hour:', $this->plugin_slug ); ?> </h4>
215
+ <select name="<?php echo $this->get_field_name( 'UJI_hours' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_hours' ); ?>">
216
+ <?php
217
+ echo $this->ujic_sel_datetime( 23, $instance['UJI_hours'] );
218
+ ?>
219
+ </select>
220
+ </div>
221
+ :
222
+ <div style="display: inline-block; margin: 0 5px 0 5px">
223
+ <h4 style="margin:0"><?php _e( 'Minute:', $this->plugin_slug ); ?> </h4>
224
+ <select name="<?php echo $this->get_field_name( 'UJI_minutes' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_minutes' ); ?>">
225
+ <?php
226
+ echo $this->ujic_sel_datetime( 59, $instance['UJI_minutes'] );
227
+ ?>
228
+ </select>
229
+ </div>
230
+ </div>
231
+ </p>
232
+ <h4><?php _e( 'After Expiry:', $this->plugin_slug ); ?> </h4>
233
+ <!-- Widget Hide: Checkbox Input -->
234
+ <p>
235
+ <label for="<?php echo $this->get_field_id( 'UJI_hide' ); ?>"><?php _e( 'Hide Countdown:', $this->plugin_slug ); ?></label>
236
+ <input class="ujic_exp" id="<?php echo $this->get_field_id( 'UJI_hide' ); ?>" name="<?php echo $this->get_field_name( 'UJI_hide' ); ?>" type="checkbox" value="hide" <?php checked( $instance['UJI_hide'], 'hide' ) ?> />
237
+ </p>
238
+
239
+ <!-- Widget Go to Link: Select Input -->
240
+ <p>
241
+ <label for="<?php echo $this->get_field_id( 'UJI_url' ); ?>"><?php _e( 'Or go to this link:', $this->plugin_slug ); ?></label><br />
242
+ <small><?php _e( 'Select URL to send after expire', $this->plugin_slug ); ?></small>
243
+ <input class="widefat ujic_link" id="<?php echo $this->get_field_id( 'UJI_url' ); ?>" name="<?php echo $this->get_field_name( 'UJI_url' ); ?>" type="text" value="<?php echo $instance['UJI_url']; ?>" />
244
+ </p>
245
+
246
+ <?php
247
+ }
248
+
249
+ }
250
+ ?>
css/admin.countdown.css DELETED
@@ -1,120 +0,0 @@
1
- /* Uji Countdown:
2
- * Copyright (c) 2012 Ujimoto
3
- * Project : http://wpmanage.com/uji-countdown
4
- */
5
- .error, .updated{
6
- width: 535px;
7
- padding: 5px!important;
8
- margin-left: 20px!important;
9
- }
10
- .cancel{
11
- float: left;
12
- display: inline-block!important;
13
- margin-left: 4px!important;
14
- }
15
-
16
- .widefat{
17
- width: 525px;
18
- }
19
- .wrap h2 {
20
- background: transparent url(../images/icon_large.png) 0 8px no-repeat;
21
- text-indent: 38px;
22
- }
23
- .ujic-update{
24
- background-color: #fffadb!important;
25
- }
26
- #ujic-add{
27
- -webkit-border-radius: 4px;
28
- -moz-border-radius: 4px;
29
- -o-border-radius: 4px;
30
- border-radius: 4px;
31
- background-color: #eeeeee;
32
- width: 500px;
33
- padding: 10px;
34
- overflow: hidden;
35
- border: 1px solid #c2c2c2;
36
- margin-bottom: 10px;
37
- }
38
- #ujic-add div{
39
- display: block;
40
- overflow: hidden;
41
- margin-bottom: 10px;
42
- font-size: 12px;
43
- }
44
-
45
- #ujic-add input[type="checkbox"],
46
- #ujic-add input[type="radio"] {
47
- margin: 2px 0 0 0 !important;
48
- width: 13px!important;
49
- height: 13px!important;
50
- }
51
-
52
- #ujic-add label{
53
- float: left;
54
- width: 160px;
55
- font-weight: bold;
56
- font-size: 12px;
57
- }
58
- #ujic-add input{
59
- display: inline;
60
- float: left;
61
- }
62
- #ujic-add small{
63
- margin-left: 5px;
64
- }
65
- #ujic-add .fleft{
66
- float: left;
67
- display: inline-block;
68
- margin-right: 30px;
69
- }
70
- #ujic-add .fleft span{
71
- display: block;
72
- margin-bottom: 5px;
73
- }
74
- #ujic-add #ujic_col_dw, #ujic-add #ujic_col_up, #ujic-add #ujic_col_txt, #ujic-add #ujic_col_sw{
75
- margin: 10px 0 0 10px;
76
- width: 80px;
77
- }
78
- #uji_pos_0, #uji_pos_1, #uji_pos_2, #uji_pos_3{
79
- display: inline-block;
80
- margin: 0 6px 0 6px;
81
- float: left;
82
- padding-left: 25px;
83
- }
84
- #uji_pos_0{
85
- background: url(../images/align-none.png) top left no-repeat;
86
- }
87
- #uji_pos_1{
88
- background: url(../images/align-left.png) top left no-repeat;
89
- }
90
- #uji_pos_2{
91
- background: url(../images/align-center.png) top left no-repeat;
92
- }
93
- #uji_pos_3{
94
- background: url(../images/align-right.png) top left no-repeat;
95
- }
96
- /*----------Preview--------------*/
97
- #ujic-pre{
98
- -webkit-border-radius: 4px;
99
- -moz-border-radius: 4px;
100
- -o-border-radius: 4px;
101
- border-radius: 4px;
102
- background-color: #fff;
103
- width: 500px;
104
- padding: 10px;
105
- border: 1px solid #c2c2c2;
106
- overflow: hidden;
107
- }
108
- #ujic_box, .metabox-holder{
109
- float: left;
110
- display: inline;
111
- }
112
- .metabox-holder{
113
- margin: 0 0 0 20px;
114
- }
115
- #donate{
116
- margin-left: 50px;
117
- }
118
- #hire{
119
- margin-left: 95px;
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/jquery.countdown.css DELETED
@@ -1,103 +0,0 @@
1
- /* Uji Countdown:
2
- * Copyright (c) 2012 Ujimoto
3
- * Project : http://wpmanage.com/uji-countdown
4
- */
5
- .countdown_rtl {
6
- direction: rtl;
7
- }
8
- .countdown_row {
9
- clear: both;
10
- display: block;
11
- text-align: center;
12
- overflow: hidden;
13
- }
14
- .countdown_section {
15
- display: block;
16
- float: left;
17
- margin: 0 10px 0 0;
18
- text-align: center;
19
- }
20
- .countdown_amount {
21
- display: inline-block!important;
22
- }
23
- .countdown_txt {
24
- display: block;
25
- text-align: center;
26
- }
27
- .countdown_descr {
28
- display: block;
29
- }
30
- /*----------ujiCountdown------------*/
31
-
32
- #ujiCountdown{
33
- overflow: hidden;
34
- display: inline-block;
35
- }
36
- .countdown_amount {
37
- color: #fff;
38
- padding: 5px 10px 5px 10px;
39
- margin-right: 2px;
40
-
41
- font: 35px/1.5 'Open Sans Condensed',sans-serif;
42
- font-weight: bold;
43
-
44
- box-shadow:1px 1px 1px rgba(4, 4, 4, 0.35);
45
-
46
- background-image: -webkit-gradient(
47
- linear,
48
- left bottom,
49
- left top,
50
- color-stop(0.5, #3A3A3A),
51
- color-stop(0.5, #635b63)
52
- );
53
- -webkit-border-radius: 5px;
54
- -ms-border-radius: 5px;
55
- -moz-border-radius: 5px;
56
- -o-border-radius: 5px;
57
- border-radius: 5px;
58
- text-shadow: 1px 1px 1px #000;
59
- }
60
- .countdown_txt {
61
- padding: 5px;
62
- font-family: 'Open Sans Condensed',sans-serif;
63
- display: block;
64
- clear: both;
65
- float: none;
66
- position: relative;
67
- z-index: 99;
68
- }
69
- #uji_sec{
70
- overflow: hidden;
71
- display: block;
72
- float: left;
73
- margin: 0 10px 0 0;
74
- text-align: center;
75
- }
76
- #uji_sec .countdown_section{
77
- position: relative;
78
- overflow: hidden;
79
- display: block;
80
- }
81
- #uji_sec .countdown_amount{
82
- float: left;
83
- display: inline-block;
84
- }
85
- .ujic_center{
86
- margin: 0 auto;
87
- display: block;
88
- float: none;
89
- clear: both;
90
- overflow: hidden;
91
- }
92
- .ujic_left{
93
- display: block;
94
- float: left;
95
- }
96
- .ujic_right{
97
- display: block;
98
- float: right;
99
- overflow: hidden;
100
- }
101
- .ujic_none{
102
- display: block;
103
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/uji-countdown.css ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ==========================================================================
2
+ Classic
3
+ ========================================================================== */
4
+ .ujic-classic{
5
+ position: relative;
6
+ overflow: hidden;
7
+ }
8
+
9
+ .ujic-classic .countdown_section {
10
+ float:left;
11
+ display: block;
12
+ text-align: center;
13
+ margin: 0 15px 0 0;
14
+ }
15
+
16
+ .ujic-classic span.countdown_amount {
17
+ display: inline-block;
18
+ color: #fff;
19
+ padding: 5px;
20
+ margin-right: 2px;
21
+
22
+ font: 35px/1.5 'Open Sans Condensed',sans-serif;
23
+ font-weight: normal;
24
+
25
+ box-shadow:1px 1px 1px rgba(4, 4, 4, 0.35);
26
+
27
+ -webkit-border-radius: 5px;
28
+ -ms-border-radius: 5px;
29
+ -moz-border-radius: 5px;
30
+ -o-border-radius: 5px;
31
+ border-radius: 5px;
32
+ text-shadow: 1px 1px 1px #000;
33
+
34
+ background: #a61ba6; /* Old browsers */
35
+ background: -moz-linear-gradient(top, #a61ba6 50%, #c368c3 50%); /* FF3.6+ */
36
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#a61ba6), color-stop(50%,#c368c3)); /* Chrome,Safari4+ */
37
+ background: -webkit-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* Chrome10+,Safari5.1+ */
38
+ background: -o-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* Opera 11.10+ */
39
+ background: -ms-linear-gradient(top, #a61ba6 50%,#c368c3 50%); /* IE10+ */
40
+ background: linear-gradient(to bottom, #a61ba6 50%,#c368c3 50%); /* W3C */
41
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a61ba6', endColorstr='#c368c3',GradientType=0 ); /* IE6-9 */
42
+
43
+ }
44
+
45
+ .ujic-classic span.countdown_txt {
46
+ display: block;
47
+ text-align: center;
48
+ margin: 5px 0 0 0;
49
+ }
50
+
51
+ /* The ghost, nudged to maintain perfect centering */
52
+ .ujic-hold:before {
53
+ content: '';
54
+ display: inline-block;
55
+ height: 100%;
56
+ vertical-align: middle;
57
+ margin-right: -0.25em; /* Adjusts for spacing */
58
+ }
59
+
60
+ .ujic-hold .ujiCountdown {
61
+ display: inline-block;
62
+ vertical-align: middle;
63
+ }
64
+
65
+ .ujic_center{
66
+ text-align: center;
67
+ }
68
+
69
+ .ujic_left{
70
+ text-align: left;
71
+ }
72
+
73
+ .ujic_right{
74
+ text-align: right;
75
+ }
76
+
77
+ .ujic_right:after{
78
+ clear: both;
79
+ float: none;
80
+ }
81
+
82
+ .countdown_section {
83
+ width: auto!important;
84
+ text-transform: none!important;
85
+ }
86
+
87
+
88
+ /* ==========================================================================
89
+ RTL
90
+ ========================================================================== */
91
+ .countdown-rtl{
92
+ direction: initial;
93
+ }
images/icon.png DELETED
Binary file
images/ujic-ps.jpg DELETED
Binary file
images/ujic-ps2.jpg DELETED
Binary file
images/ujic-ps3.png DELETED
Binary file
inc/css/colorpicker.css DELETED
@@ -1,161 +0,0 @@
1
- .colorpicker {
2
- width: 356px;
3
- height: 176px;
4
- overflow: hidden;
5
- position: absolute;
6
- background: url(../images/colorpicker_background.png);
7
- font-family: Arial, Helvetica, sans-serif;
8
- display: none;
9
- }
10
- .colorpicker_color {
11
- width: 150px;
12
- height: 150px;
13
- left: 14px;
14
- top: 13px;
15
- position: absolute;
16
- background: #f00;
17
- overflow: hidden;
18
- cursor: crosshair;
19
- }
20
- .colorpicker_color div {
21
- position: absolute;
22
- top: 0;
23
- left: 0;
24
- width: 150px;
25
- height: 150px;
26
- background: url(../images/colorpicker_overlay.png);
27
- }
28
- .colorpicker_color div div {
29
- position: absolute;
30
- top: 0;
31
- left: 0;
32
- width: 11px;
33
- height: 11px;
34
- overflow: hidden;
35
- background: url(../images/colorpicker_select.gif);
36
- margin: -5px 0 0 -5px;
37
- }
38
- .colorpicker_hue {
39
- position: absolute;
40
- top: 13px;
41
- left: 171px;
42
- width: 35px;
43
- height: 150px;
44
- cursor: n-resize;
45
- }
46
- .colorpicker_hue div {
47
- position: absolute;
48
- width: 35px;
49
- height: 9px;
50
- overflow: hidden;
51
- background: url(../images/colorpicker_indic.gif) left top;
52
- margin: -4px 0 0 0;
53
- left: 0px;
54
- }
55
- .colorpicker_new_color {
56
- position: absolute;
57
- width: 60px;
58
- height: 30px;
59
- left: 213px;
60
- top: 13px;
61
- background: #f00;
62
- }
63
- .colorpicker_current_color {
64
- position: absolute;
65
- width: 60px;
66
- height: 30px;
67
- left: 283px;
68
- top: 13px;
69
- background: #f00;
70
- }
71
- .colorpicker input {
72
- background-color: transparent;
73
- border: 1px solid transparent;
74
- position: absolute;
75
- font-size: 10px;
76
- font-family: Arial, Helvetica, sans-serif;
77
- color: #898989;
78
- top: 4px;
79
- right: 11px;
80
- text-align: right;
81
- margin: 0;
82
- padding: 0;
83
- height: 11px;
84
- }
85
- .colorpicker_hex {
86
- position: absolute;
87
- width: 72px;
88
- height: 22px;
89
- background: url(../images/colorpicker_hex.png) top;
90
- left: 212px;
91
- top: 142px;
92
- }
93
- .colorpicker_hex input {
94
- right: 6px;
95
- }
96
- .colorpicker_field {
97
- height: 22px;
98
- width: 62px;
99
- background-position: top;
100
- position: absolute;
101
- }
102
- .colorpicker_field span {
103
- position: absolute;
104
- width: 12px;
105
- height: 22px;
106
- overflow: hidden;
107
- top: 0;
108
- right: 0;
109
- cursor: n-resize;
110
- }
111
- .colorpicker_rgb_r {
112
- background-image: url(../images/colorpicker_rgb_r.png);
113
- top: 52px;
114
- left: 212px;
115
- }
116
- .colorpicker_rgb_g {
117
- background-image: url(../images/colorpicker_rgb_g.png);
118
- top: 82px;
119
- left: 212px;
120
- }
121
- .colorpicker_rgb_b {
122
- background-image: url(../images/colorpicker_rgb_b.png);
123
- top: 112px;
124
- left: 212px;
125
- }
126
- .colorpicker_hsb_h {
127
- background-image: url(../images/colorpicker_hsb_h.png);
128
- top: 52px;
129
- left: 282px;
130
- }
131
- .colorpicker_hsb_s {
132
- background-image: url(../images/colorpicker_hsb_s.png);
133
- top: 82px;
134
- left: 282px;
135
- }
136
- .colorpicker_hsb_b {
137
- background-image: url(../images/colorpicker_hsb_b.png);
138
- top: 112px;
139
- left: 282px;
140
- }
141
- .colorpicker_submit {
142
- position: absolute;
143
- width: 22px;
144
- height: 22px;
145
- background: url(../images/colorpicker_submit.png) top;
146
- left: 322px;
147
- top: 142px;
148
- overflow: hidden;
149
- }
150
- .colorpicker_focus {
151
- background-position: center;
152
- }
153
- .colorpicker_hex.colorpicker_focus {
154
- background-position: bottom;
155
- }
156
- .colorpicker_submit.colorpicker_focus {
157
- background-position: bottom;
158
- }
159
- .colorpicker_slider {
160
- background-position: bottom;
161
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png DELETED
Binary file
inc/css/images/ui-bg_diagonals-thick_20_666666_40x40.png DELETED
Binary file
inc/css/images/ui-bg_flat_0_aaaaaa_40x100.png DELETED
Binary file
inc/css/images/ui-bg_flat_10_000000_40x100.png DELETED
Binary file
inc/css/images/ui-bg_glass_100_f6f6f6_1x400.png DELETED
Binary file
inc/css/images/ui-bg_glass_100_fdf5ce_1x400.png DELETED
Binary file
inc/css/images/ui-bg_glass_95_fef1ec_1x400.png DELETED
Binary file
inc/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png DELETED
Binary file
inc/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png DELETED
Binary file
inc/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png DELETED
Binary file
inc/css/images/ui-icons_228ef1_256x240.png DELETED
Binary file
inc/css/images/ui-icons_ef8c08_256x240.png DELETED
Binary file
inc/css/images/ui-icons_ffd27a_256x240.png DELETED
Binary file
inc/css/images/ui-icons_ffffff_256x240.png DELETED
Binary file
inc/css/jquery-ui-1.9.2.custom.css DELETED
@@ -1,421 +0,0 @@
1
- /*! jQuery UI - v1.9.2 - 2013-01-07
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.slider.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
- * Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .ui-helper-hidden { display: none; }
10
- .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
11
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12
- .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
13
- .ui-helper-clearfix:after { clear: both; }
14
- .ui-helper-clearfix { zoom: 1; }
15
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
16
-
17
-
18
- /* Interaction Cues
19
- ----------------------------------*/
20
- .ui-state-disabled { cursor: default !important; }
21
-
22
-
23
- /* Icons
24
- ----------------------------------*/
25
-
26
- /* states and images */
27
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
28
-
29
-
30
- /* Misc visuals
31
- ----------------------------------*/
32
-
33
- /* Overlays */
34
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
35
- .ui-resizable { position: relative;}
36
- .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
37
- .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
38
- .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
39
- .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
40
- .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
41
- .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
42
- .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
43
- .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
44
- .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
45
- .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}.ui-autocomplete {
46
- position: absolute;
47
- top: 0;
48
- left: 0;
49
- cursor: default;
50
- }
51
-
52
- /* workarounds */
53
- * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
54
- .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
55
- .ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
56
- .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
57
- button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
58
- .ui-button-icons-only { width: 3.4em; }
59
- button.ui-button-icons-only { width: 3.7em; }
60
-
61
- /*button text element */
62
- .ui-button .ui-button-text { display: block; line-height: 1.4; }
63
- .ui-button-text-only .ui-button-text { padding: .4em 1em; }
64
- .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
65
- .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
66
- .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
67
- .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
68
- /* no icon support for input elements, provide padding by default */
69
- input.ui-button { padding: .4em 1em; }
70
-
71
- /*button icon element(s) */
72
- .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
73
- .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
74
- .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
75
- .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
76
- .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
77
-
78
- /*button sets*/
79
- .ui-buttonset { margin-right: 7px; }
80
- .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
81
-
82
- /* workarounds */
83
- button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
84
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
85
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
86
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
87
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
88
- .ui-datepicker .ui-datepicker-prev { left:2px; }
89
- .ui-datepicker .ui-datepicker-next { right:2px; }
90
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
91
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
92
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
93
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
94
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
95
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
96
- .ui-datepicker select.ui-datepicker-month,
97
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
98
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
99
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
100
- .ui-datepicker td { border: 0; padding: 1px; }
101
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
102
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
103
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
104
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
105
-
106
- /* with multiple calendars */
107
- .ui-datepicker.ui-datepicker-multi { width:auto; }
108
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
109
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
110
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
111
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
112
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
113
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
114
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
115
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
116
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
117
-
118
- /* RTL support */
119
- .ui-datepicker-rtl { direction: rtl; }
120
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
121
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
122
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
123
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
124
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
125
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
126
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
127
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
128
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
129
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
130
-
131
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
132
- .ui-datepicker-cover {
133
- position: absolute; /*must have*/
134
- z-index: -1; /*must have*/
135
- filter: mask(); /*must have*/
136
- top: -4px; /*must have*/
137
- left: -4px; /*must have*/
138
- width: 200px; /*must have*/
139
- height: 200px; /*must have*/
140
- }
141
- /*.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; }
142
- .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
143
- .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
144
- .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
145
- .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
146
- .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
147
- .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
148
- .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
149
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
150
- .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
151
- .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
152
- .ui-draggable .ui-dialog-titlebar { cursor: move; }
153
- .ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
154
- .ui-menu .ui-menu { margin-top: -3px; position: absolute; }
155
- .ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
156
- .ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
157
- .ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
158
- .ui-menu .ui-menu-item a.ui-state-focus,
159
- .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
160
-
161
- .ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
162
- .ui-menu .ui-state-disabled a { cursor: default; }
163
- */
164
- /* icon support */
165
- .ui-menu-icons { position: relative; }
166
- .ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
167
-
168
- /* left-aligned */
169
- .ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
170
-
171
- /* right-aligned */
172
- .ui-menu .ui-menu-icon { position: static; float: right; }
173
- .ui-slider { position: relative; text-align: left; }
174
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
175
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
176
-
177
- .ui-slider-horizontal { height: .8em; }
178
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
179
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
180
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
181
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
182
-
183
- .ui-slider-vertical { width: .8em; height: 100px; }
184
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
185
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
186
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
187
- .ui-slider-vertical .ui-slider-range-max { top: 0; }
188
- /* Component containers
189
- ----------------------------------*/
190
- #ujicountdownadd .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
191
- #ujicountdownadd .ui-widget .ui-widget { font-size: 1em; }
192
- #ujicountdownadd .ui-widget input, #ujicountdownadd .ui-widget select, #ujicountdownadd .ui-widget textarea, #ujicountdownadd .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
193
- #ujicountdownadd .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
194
- #ujicountdownadd .ui-widget-content a { color: #222222; }
195
- #ujicountdownadd .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
196
- #ujicountdownadd .ui-widget-header a { color: #222222; }
197
-
198
- /* Interaction states
199
- ----------------------------------*/
200
- #ujicountdownadd .ui-state-default, #ujicountdownadd .ui-widget-content .ui-state-default, #ujicountdownadd .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
201
- #ujicountdownadd .ui-state-default a, #ujicountdownadd .ui-state-default a:link, #ujicountdownadd .ui-state-default a:visited { color: #555555; text-decoration: none; }
202
- #ujicountdownadd .ui-state-hover, #ujicountdownadd .ui-widget-content .ui-state-hover, #ujicountdownadd .ui-widget-header .ui-state-hover, #ujicountdownadd .ui-state-focus, #ujicountdownadd .ui-widget-content .ui-state-focus, #ujicountdownadd .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
203
- #ujicountdownadd .ui-state-hover a, #ujicountdownadd .ui-state-hover a:hover, #ujicountdownadd .ui-state-hover a:link, #ujicountdownadd .ui-state-hover a:visited { color: #212121; text-decoration: none; }
204
- #ujicountdownadd .ui-state-active, #ujicountdownadd .ui-widget-content .ui-state-active, #ujicountdownadd .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
205
- #ujicountdownadd .ui-state-active a, #ujicountdownadd .ui-state-active a:link, #ujicountdownadd .ui-state-active a:visited { color: #212121; text-decoration: none; }
206
-
207
- /* Interaction Cues
208
- ----------------------------------*/
209
- #ujicountdownadd .ui-state-highlight, #ujicountdownadd .ui-widget-content .ui-state-highlight, #ujicountdownadd .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
210
- #ujicountdownadd .ui-state-highlight a, #ujicountdownadd .ui-widget-content .ui-state-highlight a,#ujicountdownadd .ui-widget-header .ui-state-highlight a { color: #363636; }
211
- #ujicountdownadd .ui-state-error, #ujicountdownadd .ui-widget-content .ui-state-error, #ujicountdownadd .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
212
- #ujicountdownadd .ui-state-error a, #ujicountdownadd .ui-widget-content .ui-state-error a, #ujicountdownadd .ui-widget-header .ui-state-error a { color: #cd0a0a; }
213
- #ujicountdownadd .ui-state-error-text, #ujicountdownadd .ui-widget-content .ui-state-error-text, #ujicountdownadd .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
214
- #ujicountdownadd .ui-priority-primary, #ujicountdownadd .ui-widget-content .ui-priority-primary, #ujicountdownadd .ui-widget-header .ui-priority-primary { font-weight: bold; }
215
- #ujicountdownadd .ui-priority-secondary, #ujicountdownadd .ui-widget-content .ui-priority-secondary, #ujicountdownadd .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
216
- #ujicountdownadd .ui-state-disabled, #ujicountdownadd .ui-widget-content .ui-state-disabled, #ujicountdownadd .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
217
- #ujicountdownadd .ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
218
-
219
- /* Icons
220
- ----------------------------------*/
221
-
222
- /* states and images */
223
- #ujicountdownadd .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
224
- #ujicountdownadd .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
225
- #ujicountdownadd .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
226
- #ujicountdownadd .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
227
- #ujicountdownadd .ui-state-hover .ui-icon, #ujicountdownadd .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
228
- #ujicountdownadd .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
229
- #ujicountdownadd .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
230
- #ujicountdownadd .ui-state-error .ui-icon, #ujicountdownadd .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
231
-
232
- /* positioning */
233
- #ujicountdownadd .ui-icon-carat-1-n { background-position: 0 0; }
234
- #ujicountdownadd .ui-icon-carat-1-ne { background-position: -16px 0; }
235
- #ujicountdownadd .ui-icon-carat-1-e { background-position: -32px 0; }
236
- #ujicountdownadd .ui-icon-carat-1-se { background-position: -48px 0; }
237
- #ujicountdownadd .ui-icon-carat-1-s { background-position: -64px 0; }
238
- #ujicountdownadd .ui-icon-carat-1-sw { background-position: -80px 0; }
239
- #ujicountdownadd .ui-icon-carat-1-w { background-position: -96px 0; }
240
- #ujicountdownadd .ui-icon-carat-1-nw { background-position: -112px 0; }
241
- #ujicountdownadd .ui-icon-carat-2-n-s { background-position: -128px 0; }
242
- #ujicountdownadd .ui-icon-carat-2-e-w { background-position: -144px 0; }
243
- #ujicountdownadd .ui-icon-triangle-1-n { background-position: 0 -16px; }
244
- #ujicountdownadd .ui-icon-triangle-1-ne { background-position: -16px -16px; }
245
- #ujicountdownadd .ui-icon-triangle-1-e { background-position: -32px -16px; }
246
- #ujicountdownadd .ui-icon-triangle-1-se { background-position: -48px -16px; }
247
- #ujicountdownadd .ui-icon-triangle-1-s { background-position: -64px -16px; }
248
- #ujicountdownadd .ui-icon-triangle-1-sw { background-position: -80px -16px; }
249
- #ujicountdownadd .ui-icon-triangle-1-w { background-position: -96px -16px; }
250
- #ujicountdownadd .ui-icon-triangle-1-nw { background-position: -112px -16px; }
251
- #ujicountdownadd .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
252
- #ujicountdownadd .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
253
- #ujicountdownadd .ui-icon-arrow-1-n { background-position: 0 -32px; }
254
- #ujicountdownadd .ui-icon-arrow-1-ne { background-position: -16px -32px; }
255
- #ujicountdownadd .ui-icon-arrow-1-e { background-position: -32px -32px; }
256
- #ujicountdownadd .ui-icon-arrow-1-se { background-position: -48px -32px; }
257
- #ujicountdownadd .ui-icon-arrow-1-s { background-position: -64px -32px; }
258
- #ujicountdownadd .ui-icon-arrow-1-sw { background-position: -80px -32px; }
259
- #ujicountdownadd .ui-icon-arrow-1-w { background-position: -96px -32px; }
260
- #ujicountdownadd .ui-icon-arrow-1-nw { background-position: -112px -32px; }
261
- #ujicountdownadd .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
262
- #ujicountdownadd .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
263
- #ujicountdownadd .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
264
- #ujicountdownadd .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
265
- #ujicountdownadd .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
266
- #ujicountdownadd .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
267
- #ujicountdownadd .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
268
- #ujicountdownadd .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
269
- #ujicountdownadd .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
270
- #ujicountdownadd .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
271
- #ujicountdownadd .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
272
- #ujicountdownadd .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
273
- #ujicountdownadd .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
274
- #ujicountdownadd .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
275
- #ujicountdownadd .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
276
- #ujicountdownadd .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
277
- #ujicountdownadd .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
278
- #ujicountdownadd .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
279
- #ujicountdownadd .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
280
- #ujicountdownadd .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
281
- #ujicountdownadd .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
282
- #ujicountdownadd .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
283
- #ujicountdownadd .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
284
- #ujicountdownadd .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
285
- #ujicountdownadd .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
286
- #ujicountdownadd .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
287
- #ujicountdownadd .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
288
- #ujicountdownadd .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
289
- #ujicountdownadd .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
290
- #ujicountdownadd .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
291
- #ujicountdownadd .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
292
- #ujicountdownadd .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
293
- #ujicountdownadd .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
294
- #ujicountdownadd .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
295
- #ujicountdownadd .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
296
- #ujicountdownadd .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
297
- #ujicountdownadd .ui-icon-arrow-4 { background-position: 0 -80px; }
298
- #ujicountdownadd .ui-icon-arrow-4-diag { background-position: -16px -80px; }
299
- #ujicountdownadd .ui-icon-extlink { background-position: -32px -80px; }
300
- #ujicountdownadd .ui-icon-newwin { background-position: -48px -80px; }
301
- #ujicountdownadd .ui-icon-refresh { background-position: -64px -80px; }
302
- #ujicountdownadd .ui-icon-shuffle { background-position: -80px -80px; }
303
- #ujicountdownadd .ui-icon-transfer-e-w { background-position: -96px -80px; }
304
- #ujicountdownadd .ui-icon-transferthick-e-w { background-position: -112px -80px; }
305
- #ujicountdownadd .ui-icon-folder-collapsed { background-position: 0 -96px; }
306
- #ujicountdownadd .ui-icon-folder-open { background-position: -16px -96px; }
307
- #ujicountdownadd .ui-icon-document { background-position: -32px -96px; }
308
- #ujicountdownadd .ui-icon-document-b { background-position: -48px -96px; }
309
- #ujicountdownadd .ui-icon-note { background-position: -64px -96px; }
310
- #ujicountdownadd .ui-icon-mail-closed { background-position: -80px -96px; }
311
- #ujicountdownadd .ui-icon-mail-open { background-position: -96px -96px; }
312
- #ujicountdownadd .ui-icon-suitcase { background-position: -112px -96px; }
313
- #ujicountdownadd .ui-icon-comment { background-position: -128px -96px; }
314
- #ujicountdownadd .ui-icon-person { background-position: -144px -96px; }
315
- #ujicountdownadd .ui-icon-print { background-position: -160px -96px; }
316
- #ujicountdownadd .ui-icon-trash { background-position: -176px -96px; }
317
- #ujicountdownadd .ui-icon-locked { background-position: -192px -96px; }
318
- #ujicountdownadd .ui-icon-unlocked { background-position: -208px -96px; }
319
- #ujicountdownadd .ui-icon-bookmark { background-position: -224px -96px; }
320
- #ujicountdownadd .ui-icon-tag { background-position: -240px -96px; }
321
- #ujicountdownadd .ui-icon-home { background-position: 0 -112px; }
322
- #ujicountdownadd .ui-icon-flag { background-position: -16px -112px; }
323
- #ujicountdownadd .ui-icon-calendar { background-position: -32px -112px; }
324
- #ujicountdownadd .ui-icon-cart { background-position: -48px -112px; }
325
- #ujicountdownadd .ui-icon-pencil { background-position: -64px -112px; }
326
- #ujicountdownadd .ui-icon-clock { background-position: -80px -112px; }
327
- #ujicountdownadd .ui-icon-disk { background-position: -96px -112px; }
328
- #ujicountdownadd .ui-icon-calculator { background-position: -112px -112px; }
329
- #ujicountdownadd .ui-icon-zoomin { background-position: -128px -112px; }
330
- #ujicountdownadd .ui-icon-zoomout { background-position: -144px -112px; }
331
- #ujicountdownadd .ui-icon-search { background-position: -160px -112px; }
332
- #ujicountdownadd .ui-icon-wrench { background-position: -176px -112px; }
333
- #ujicountdownadd .ui-icon-gear { background-position: -192px -112px; }
334
- #ujicountdownadd .ui-icon-heart { background-position: -208px -112px; }
335
- #ujicountdownadd .ui-icon-star { background-position: -224px -112px; }
336
- #ujicountdownadd .ui-icon-link { background-position: -240px -112px; }
337
- #ujicountdownadd .ui-icon-cancel { background-position: 0 -128px; }
338
- #ujicountdownadd .ui-icon-plus { background-position: -16px -128px; }
339
- #ujicountdownadd .ui-icon-plusthick { background-position: -32px -128px; }
340
- #ujicountdownadd .ui-icon-minus { background-position: -48px -128px; }
341
- #ujicountdownadd .ui-icon-minusthick { background-position: -64px -128px; }
342
- #ujicountdownadd .ui-icon-close { background-position: -80px -128px; }
343
- #ujicountdownadd .ui-icon-closethick { background-position: -96px -128px; }
344
- #ujicountdownadd .ui-icon-key { background-position: -112px -128px; }
345
- #ujicountdownadd .ui-icon-lightbulb { background-position: -128px -128px; }
346
- #ujicountdownadd .ui-icon-scissors { background-position: -144px -128px; }
347
- #ujicountdownadd .ui-icon-clipboard { background-position: -160px -128px; }
348
- #ujicountdownadd .ui-icon-copy { background-position: -176px -128px; }
349
- #ujicountdownadd .ui-icon-contact { background-position: -192px -128px; }
350
- #ujicountdownadd .ui-icon-image { background-position: -208px -128px; }
351
- #ujicountdownadd .ui-icon-video { background-position: -224px -128px; }
352
- #ujicountdownadd .ui-icon-script { background-position: -240px -128px; }
353
- #ujicountdownadd .ui-icon-alert { background-position: 0 -144px; }
354
- #ujicountdownadd .ui-icon-info { background-position: -16px -144px; }
355
- #ujicountdownadd .ui-icon-notice { background-position: -32px -144px; }
356
- #ujicountdownadd .ui-icon-help { background-position: -48px -144px; }
357
- #ujicountdownadd .ui-icon-check { background-position: -64px -144px; }
358
- #ujicountdownadd .ui-icon-bullet { background-position: -80px -144px; }
359
- #ujicountdownadd .ui-icon-radio-on { background-position: -96px -144px; }
360
- #ujicountdownadd .ui-icon-radio-off { background-position: -112px -144px; }
361
- #ujicountdownadd .ui-icon-pin-w { background-position: -128px -144px; }
362
- #ujicountdownadd .ui-icon-pin-s { background-position: -144px -144px; }
363
- #ujicountdownadd .ui-icon-play { background-position: 0 -160px; }
364
- #ujicountdownadd .ui-icon-pause { background-position: -16px -160px; }
365
- #ujicountdownadd .ui-icon-seek-next { background-position: -32px -160px; }
366
- #ujicountdownadd .ui-icon-seek-prev { background-position: -48px -160px; }
367
- #ujicountdownadd .ui-icon-seek-end { background-position: -64px -160px; }
368
- #ujicountdownadd .ui-icon-seek-start { background-position: -80px -160px; }
369
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
370
- #ujicountdownadd .ui-icon-seek-first { background-position: -80px -160px; }
371
- #ujicountdownadd .ui-icon-stop { background-position: -96px -160px; }
372
- #ujicountdownadd .ui-icon-eject { background-position: -112px -160px; }
373
- #ujicountdownadd .ui-icon-volume-off { background-position: -128px -160px; }
374
- #ujicountdownadd .ui-icon-volume-on { background-position: -144px -160px; }
375
- #ujicountdownadd .ui-icon-power { background-position: 0 -176px; }
376
- #ujicountdownadd .ui-icon-signal-diag { background-position: -16px -176px; }
377
- #ujicountdownadd .ui-icon-signal { background-position: -32px -176px; }
378
- #ujicountdownadd .ui-icon-battery-0 { background-position: -48px -176px; }
379
- #ujicountdownadd .ui-icon-battery-1 { background-position: -64px -176px; }
380
- #ujicountdownadd .ui-icon-battery-2 { background-position: -80px -176px; }
381
- #ujicountdownadd .ui-icon-battery-3 { background-position: -96px -176px; }
382
- #ujicountdownadd .ui-icon-circle-plus { background-position: 0 -192px; }
383
- #ujicountdownadd .ui-icon-circle-minus { background-position: -16px -192px; }
384
- #ujicountdownadd .ui-icon-circle-close { background-position: -32px -192px; }
385
- #ujicountdownadd .ui-icon-circle-triangle-e { background-position: -48px -192px; }
386
- #ujicountdownadd .ui-icon-circle-triangle-s { background-position: -64px -192px; }
387
- #ujicountdownadd .ui-icon-circle-triangle-w { background-position: -80px -192px; }
388
- #ujicountdownadd .ui-icon-circle-triangle-n { background-position: -96px -192px; }
389
- #ujicountdownadd .ui-icon-circle-arrow-e { background-position: -112px -192px; }
390
- #ujicountdownadd .ui-icon-circle-arrow-s { background-position: -128px -192px; }
391
- #ujicountdownadd .ui-icon-circle-arrow-w { background-position: -144px -192px; }
392
- #ujicountdownadd .ui-icon-circle-arrow-n { background-position: -160px -192px; }
393
- #ujicountdownadd .ui-icon-circle-zoomin { background-position: -176px -192px; }
394
- #ujicountdownadd .ui-icon-circle-zoomout { background-position: -192px -192px; }
395
- #ujicountdownadd .ui-icon-circle-check { background-position: -208px -192px; }
396
- #ujicountdownadd .ui-icon-circlesmall-plus { background-position: 0 -208px; }
397
- #ujicountdownadd .ui-icon-circlesmall-minus { background-position: -16px -208px; }
398
- #ujicountdownadd .ui-icon-circlesmall-close { background-position: -32px -208px; }
399
- #ujicountdownadd .ui-icon-squaresmall-plus { background-position: -48px -208px; }
400
- #ujicountdownadd .ui-icon-squaresmall-minus { background-position: -64px -208px; }
401
- #ujicountdownadd .ui-icon-squaresmall-close { background-position: -80px -208px; }
402
- #ujicountdownadd .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
403
- #ujicountdownadd .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
404
- #ujicountdownadd .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
405
- #ujicountdownadd .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
406
- #ujicountdownadd .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
407
- #ujicountdownadd .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
408
-
409
-
410
- /* Misc visuals
411
- ----------------------------------*/
412
-
413
- /* Corner radius */
414
- #ujicountdownadd .ui-corner-all, #ujicountdownadd .ui-corner-top, #ujicountdownadd .ui-corner-left, #ujicountdownadd .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
415
- #ujicountdownadd .ui-corner-all, #ujicountdownadd .ui-corner-top, #ujicountdownadd .ui-corner-right, #ujicountdownadd .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
416
- #ujicountdownadd .ui-corner-all, #ujicountdownadd .ui-corner-bottom, #ujicountdownadd .ui-corner-left, #ujicountdownadd .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
417
- #ujicountdownadd .ui-corner-all, #ujicountdownadd .ui-corner-bottom, #ujicountdownadd .ui-corner-right, #ujicountdownadd .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
418
-
419
- /* Overlays */
420
- #ujicountdownadd .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
421
- #ujicountdownadd .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/css/jquery-ui-timepicker-addon.css DELETED
@@ -1,10 +0,0 @@
1
- .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
2
- .ui-timepicker-div dl { text-align: left; }
3
- .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
4
- .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
5
- .ui-timepicker-div td { font-size: 90%; }
6
- .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
7
-
8
- .ui-timepicker-rtl{ direction: rtl; }
9
- .ui-timepicker-rtl dl { text-align: right; }
10
- .ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
 
 
 
 
 
 
 
 
 
 
inc/css/layout.css DELETED
@@ -1,84 +0,0 @@
1
-
2
- #colorSelector, #colorSelector3 {
3
- position: relative;
4
- width: 36px;
5
- height: 36px;
6
- background: url(../images/select.png);
7
- float: left;
8
- display: inline;
9
- }
10
- #colorSelector div, #colorSelector3 div {
11
- position: absolute;
12
- top: 3px;
13
- left: 3px;
14
- width: 30px;
15
- height: 30px;
16
- background: url(../images/select.png) center;
17
- }
18
- #colorSelector2, #colorSelector4 {
19
- position: relative;
20
- width: 36px;
21
- height: 36px;
22
- background: url(../images/select.png);
23
- float: left;
24
- display: inline;
25
- }
26
- #colorSelector2 div, #colorSelector4 div {
27
- position: absolute;
28
- top: 4px;
29
- left: 4px;
30
- width: 28px;
31
- height: 28px;
32
- background: url(../images/select2.png) center;
33
- }
34
- #colorpickerHolder2 {
35
- top: 32px;
36
- left: 0;
37
- width: 356px;
38
- height: 0;
39
- overflow: hidden;
40
- position: absolute;
41
- }
42
- #colorpickerHolder2 .colorpicker {
43
- background-image: url(../images/custom_background.png);
44
- position: absolute;
45
- bottom: 0;
46
- left: 0;
47
- }
48
- #colorpickerHolder2 .colorpicker_hue div {
49
- background-image: url(../images/custom_indic.gif);
50
- }
51
- #colorpickerHolder2 .colorpicker_hex {
52
- background-image: url(../images/custom_hex.png);
53
- }
54
- #colorpickerHolder2 .colorpicker_rgb_r {
55
- background-image: url(../images/custom_rgb_r.png);
56
- }
57
- #colorpickerHolder2 .colorpicker_rgb_g {
58
- background-image: url(../images/custom_rgb_g.png);
59
- }
60
- #colorpickerHolder2 .colorpicker_rgb_b {
61
- background-image: url(../images/custom_rgb_b.png);
62
- }
63
- #colorpickerHolder2 .colorpicker_hsb_s {
64
- background-image: url(../images/custom_hsb_s.png);
65
- display: none;
66
- }
67
- #colorpickerHolder2 .colorpicker_hsb_h {
68
- background-image: url(../images/custom_hsb_h.png);
69
- display: none;
70
- }
71
- #colorpickerHolder2 .colorpicker_hsb_b {
72
- background-image: url(../images/custom_hsb_b.png);
73
- display: none;
74
- }
75
- #colorpickerHolder2 .colorpicker_submit {
76
- background-image: url(../images/custom_submit.png);
77
- }
78
- #colorpickerHolder2 .colorpicker input {
79
- color: #778398;
80
- }
81
- #customWidget {
82
- position: relative;
83
- height: 36px;
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/images/blank.gif DELETED
Binary file
inc/images/colorpicker_background.png DELETED
Binary file
inc/images/colorpicker_hex.png DELETED
Binary file
inc/images/colorpicker_hsb_b.png DELETED
Binary file
inc/images/colorpicker_hsb_h.png DELETED
Binary file
inc/images/colorpicker_hsb_s.png DELETED
Binary file
inc/images/colorpicker_indic.gif DELETED
Binary file
inc/images/colorpicker_overlay.png DELETED
Binary file
inc/images/colorpicker_rgb_b.png DELETED
Binary file
inc/images/colorpicker_rgb_g.png DELETED
Binary file
inc/images/colorpicker_rgb_r.png DELETED
Binary file
inc/images/colorpicker_select.gif DELETED
Binary file
inc/images/colorpicker_submit.png DELETED
Binary file
inc/images/custom_background.png DELETED
Binary file
inc/images/custom_hex.png DELETED
Binary file
inc/images/custom_hsb_b.png DELETED
Binary file
inc/images/custom_hsb_h.png DELETED
Binary file
inc/images/custom_hsb_s.png DELETED
Binary file
inc/images/custom_indic.gif DELETED
Binary file
inc/images/custom_rgb_b.png DELETED
Binary file
inc/images/custom_rgb_g.png DELETED
Binary file
inc/images/custom_rgb_r.png DELETED
Binary file
inc/images/custom_submit.png DELETED
Binary file
inc/images/select.png DELETED
Binary file
inc/images/select2.png DELETED
Binary file
inc/images/slider.png DELETED
Binary file
inc/js/admin.color.js DELETED
@@ -1,89 +0,0 @@
1
- if ( jQuery().ColorPicker && jQuery( '#ujic_col_dw, #ujic_col_up' ).length ) {
2
-
3
- var color = jQuery('#ujic_col_dw' ).val();
4
- jQuery( '#ujic_col_dw, #colorSelector' ).ColorPicker({
5
- color: color,
6
- onShow: function (colpkr) {
7
- jQuery(colpkr).fadeIn(500);
8
- return false;
9
- },
10
- onHide: function (colpkr) {
11
- jQuery(colpkr).fadeOut(500);
12
- return false;
13
- },
14
- onChange: function (hsb, hex, rgb) {
15
- jQuery('#colorSelector div').css('backgroundColor', '#' + hex);
16
- jQuery( '#ujic_col_dw' ).attr( 'value', '#' + hex );
17
- var color_up = jQuery( '#ujic_col_up' ).val();
18
- hex = "#"+hex;
19
- jQuery( '.countdown_amount').css("background", "-moz-linear-gradient(top, "+color_up+" 50%, "+hex+" 50%)"); /* FF3.6+ */
20
- jQuery( '.countdown_amount').css("background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,"+color_up+"), color-stop(50%,"+hex+"))"); /* Chrome,Safari4+ */
21
- jQuery( '.countdown_amount').css("background", "-webkit-linear-gradient(top, "+color_up+" 50%,"+hex+" 50%)"); /* Chrome10+,Safari5.1+ */
22
- jQuery( '.countdown_amount').css("background", "-o-linear-gradient(top, "+color_up+" 50%,"+hex+" 50%)"); /* Opera 11.10+ */
23
- jQuery( '.countdown_amount').css("background", "-ms-linear-gradient(top, "+color_up+" 50%,"+hex+" 50%)"); /* IE10+ */
24
- jQuery( '.countdown_amount').css("background", "linear-gradient(to bottom, "+color_up+" 50%,"+hex+" 50%)"); /* W3C */
25
- jQuery( '.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='"+color_up+"', endColorstr='"+hex+"',GradientType=0 )"); /* IE6-9 */
26
-
27
- }
28
- });
29
- var color2 = jQuery('#ujic_col_up' ).val();
30
- jQuery( '#ujic_col_up, #colorSelector2' ).ColorPicker({
31
- color: color2,
32
- onShow: function (colpkr) {
33
- jQuery(colpkr).fadeIn(500);
34
- return false;
35
- },
36
- onHide: function (colpkr) {
37
- jQuery(colpkr).fadeOut(500);
38
- return false;
39
- },
40
- onChange: function (hsb, hex, rgb) {
41
- jQuery('#colorSelector2 div').css('backgroundColor', '#' + hex);
42
- jQuery( '#ujic_col_up' ).attr( 'value', '#' + hex );
43
- var color_down = jQuery( '#ujic_col_dw' ).val();
44
- hex = "#"+hex;
45
- jQuery( '.countdown_amount').css("background", "-moz-linear-gradient(top, "+hex+" 50%, "+color_down+" 50%)"); /* FF3.6+ */
46
- jQuery( '.countdown_amount').css("background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,"+hex+"), color-stop(50%,"+color_down+"))"); /* Chrome,Safari4+ */
47
- jQuery( '.countdown_amount').css("background", "-webkit-linear-gradient(top, "+hex+" 50%,"+color_down+" 50%)"); /* Chrome10+,Safari5.1+ */
48
- jQuery( '.countdown_amount').css("background", "-o-linear-gradient(top, "+hex+" 50%,"+color_down+" 50%)"); /* Opera 11.10+ */
49
- jQuery( '.countdown_amount').css("background", "-ms-linear-gradient(top, "+hex+" 50%,"+color_down+" 50%)"); /* IE10+ */
50
- jQuery( '.countdown_amount').css("background", "linear-gradient(to bottom, "+hex+" 50%,"+color_down+" 50%)"); /* W3C */
51
- jQuery( '.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='"+hex+"', endColorstr='"+color_down+"',GradientType=0 )"); /* IE6-9 */
52
- }
53
- });
54
- var color3 = jQuery('#ujic_col_txt' ).val();
55
- jQuery( '#ujic_col_txt, #colorSelector3' ).ColorPicker({
56
- color: color2,
57
- onShow: function (colpkr) {
58
- jQuery(colpkr).fadeIn(500);
59
- return false;
60
- },
61
- onHide: function (colpkr) {
62
- jQuery(colpkr).fadeOut(500);
63
- return false;
64
- },
65
- onChange: function (hsb, hex, rgb) {
66
- jQuery('#colorSelector3 div').css('backgroundColor', '#' + hex);
67
- jQuery( '#ujic_col_txt' ).attr( 'value', '#' + hex );
68
- jQuery( '.countdown_amount').css("color",'#' + hex);
69
- }
70
- });
71
- var color4 = jQuery('#ujic_col_sw' ).val();
72
- jQuery( '#ujic_col_sw, #colorSelector4' ).ColorPicker({
73
- color: color2,
74
- onShow: function (colpkr) {
75
- jQuery(colpkr).fadeIn(500);
76
- return false;
77
- },
78
- onHide: function (colpkr) {
79
- jQuery(colpkr).fadeOut(500);
80
- return false;
81
- },
82
- onChange: function (hsb, hex, rgb) {
83
- jQuery('#colorSelector4 div').css('backgroundColor', '#' + hex);
84
- jQuery( '#ujic_col_sw' ).attr( 'value', '#' + hex );
85
- jQuery( '.countdown_amount').css("text-shadow",'1px 1px 1px #' + hex);
86
- }
87
- });
88
-
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/js/colorpicker.js DELETED
@@ -1,484 +0,0 @@
1
- /**
2
- *
3
- * Color picker
4
- * Author: Stefan Petre www.eyecon.ro
5
- *
6
- * Dual licensed under the MIT and GPL licenses
7
- *
8
- */
9
- (function ($) {
10
- var ColorPicker = function () {
11
- var
12
- ids = {},
13
- inAction,
14
- charMin = 65,
15
- visible,
16
- tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
- defaults = {
18
- eventName: 'click',
19
- onShow: function () {},
20
- onBeforeShow: function(){},
21
- onHide: function () {},
22
- onChange: function () {},
23
- onSubmit: function () {},
24
- color: 'ff0000',
25
- livePreview: true,
26
- flat: false
27
- },
28
- fillRGBFields = function (hsb, cal) {
29
- var rgb = HSBToRGB(hsb);
30
- $(cal).data('colorpicker').fields
31
- .eq(1).val(rgb.r).end()
32
- .eq(2).val(rgb.g).end()
33
- .eq(3).val(rgb.b).end();
34
- },
35
- fillHSBFields = function (hsb, cal) {
36
- $(cal).data('colorpicker').fields
37
- .eq(4).val(hsb.h).end()
38
- .eq(5).val(hsb.s).end()
39
- .eq(6).val(hsb.b).end();
40
- },
41
- fillHexFields = function (hsb, cal) {
42
- $(cal).data('colorpicker').fields
43
- .eq(0).val(HSBToHex(hsb)).end();
44
- },
45
- setSelector = function (hsb, cal) {
46
- $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
- $(cal).data('colorpicker').selectorIndic.css({
48
- left: parseInt(150 * hsb.s/100, 10),
49
- top: parseInt(150 * (100-hsb.b)/100, 10)
50
- });
51
- },
52
- setHue = function (hsb, cal) {
53
- $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
- },
55
- setCurrentColor = function (hsb, cal) {
56
- $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
- },
58
- setNewColor = function (hsb, cal) {
59
- $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
- },
61
- keyDown = function (ev) {
62
- var pressedKey = ev.charCode || ev.keyCode || -1;
63
- if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
- return false;
65
- }
66
- var cal = $(this).parent().parent();
67
- if (cal.data('colorpicker').livePreview === true) {
68
- change.apply(this);
69
- }
70
- },
71
- change = function (ev) {
72
- var cal = $(this).parent().parent(), col;
73
- if (this.parentNode.className.indexOf('_hex') > 0) {
74
- cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
- } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
- cal.data('colorpicker').color = col = fixHSB({
77
- h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
- s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
- b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
- });
81
- } else {
82
- cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
- r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
- g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
- b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
- }));
87
- }
88
- if (ev) {
89
- fillRGBFields(col, cal.get(0));
90
- fillHexFields(col, cal.get(0));
91
- fillHSBFields(col, cal.get(0));
92
- }
93
- setSelector(col, cal.get(0));
94
- setHue(col, cal.get(0));
95
- setNewColor(col, cal.get(0));
96
- cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
- },
98
- blur = function (ev) {
99
- var cal = $(this).parent().parent();
100
- cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
- },
102
- focus = function () {
103
- charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
- $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
- $(this).parent().addClass('colorpicker_focus');
106
- },
107
- downIncrement = function (ev) {
108
- var field = $(this).parent().find('input').focus();
109
- var current = {
110
- el: $(this).parent().addClass('colorpicker_slider'),
111
- max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
- y: ev.pageY,
113
- field: field,
114
- val: parseInt(field.val(), 10),
115
- preview: $(this).parent().parent().data('colorpicker').livePreview
116
- };
117
- $(document).bind('mouseup', current, upIncrement);
118
- $(document).bind('mousemove', current, moveIncrement);
119
- },
120
- moveIncrement = function (ev) {
121
- ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
122
- if (ev.data.preview) {
123
- change.apply(ev.data.field.get(0), [true]);
124
- }
125
- return false;
126
- },
127
- upIncrement = function (ev) {
128
- change.apply(ev.data.field.get(0), [true]);
129
- ev.data.el.removeClass('colorpicker_slider').find('input').focus();
130
- $(document).unbind('mouseup', upIncrement);
131
- $(document).unbind('mousemove', moveIncrement);
132
- return false;
133
- },
134
- downHue = function (ev) {
135
- var current = {
136
- cal: $(this).parent(),
137
- y: $(this).offset().top
138
- };
139
- current.preview = current.cal.data('colorpicker').livePreview;
140
- $(document).bind('mouseup', current, upHue);
141
- $(document).bind('mousemove', current, moveHue);
142
- },
143
- moveHue = function (ev) {
144
- change.apply(
145
- ev.data.cal.data('colorpicker')
146
- .fields
147
- .eq(4)
148
- .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
149
- .get(0),
150
- [ev.data.preview]
151
- );
152
- return false;
153
- },
154
- upHue = function (ev) {
155
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
156
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
157
- $(document).unbind('mouseup', upHue);
158
- $(document).unbind('mousemove', moveHue);
159
- return false;
160
- },
161
- downSelector = function (ev) {
162
- var current = {
163
- cal: $(this).parent(),
164
- pos: $(this).offset()
165
- };
166
- current.preview = current.cal.data('colorpicker').livePreview;
167
- $(document).bind('mouseup', current, upSelector);
168
- $(document).bind('mousemove', current, moveSelector);
169
- },
170
- moveSelector = function (ev) {
171
- change.apply(
172
- ev.data.cal.data('colorpicker')
173
- .fields
174
- .eq(6)
175
- .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
176
- .end()
177
- .eq(5)
178
- .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
179
- .get(0),
180
- [ev.data.preview]
181
- );
182
- return false;
183
- },
184
- upSelector = function (ev) {
185
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
186
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
187
- $(document).unbind('mouseup', upSelector);
188
- $(document).unbind('mousemove', moveSelector);
189
- return false;
190
- },
191
- enterSubmit = function (ev) {
192
- $(this).addClass('colorpicker_focus');
193
- },
194
- leaveSubmit = function (ev) {
195
- $(this).removeClass('colorpicker_focus');
196
- },
197
- clickSubmit = function (ev) {
198
- var cal = $(this).parent();
199
- var col = cal.data('colorpicker').color;
200
- cal.data('colorpicker').origColor = col;
201
- setCurrentColor(col, cal.get(0));
202
- cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
203
- },
204
- show = function (ev) {
205
- var cal = $('#' + $(this).data('colorpickerId'));
206
- cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
207
- var pos = $(this).offset();
208
- var viewPort = getViewport();
209
- var top = pos.top + this.offsetHeight;
210
- var left = pos.left;
211
- if (top + 176 > viewPort.t + viewPort.h) {
212
- top -= this.offsetHeight + 176;
213
- }
214
- if (left + 356 > viewPort.l + viewPort.w) {
215
- left -= 356;
216
- }
217
- cal.css({left: left + 'px', top: top + 'px'});
218
- if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
219
- cal.show();
220
- }
221
- $(document).bind('mousedown', {cal: cal}, hide);
222
- return false;
223
- },
224
- hide = function (ev) {
225
- if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
226
- if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
227
- ev.data.cal.hide();
228
- }
229
- $(document).unbind('mousedown', hide);
230
- }
231
- },
232
- isChildOf = function(parentEl, el, container) {
233
- if (parentEl == el) {
234
- return true;
235
- }
236
- if (parentEl.contains) {
237
- return parentEl.contains(el);
238
- }
239
- if ( parentEl.compareDocumentPosition ) {
240
- return !!(parentEl.compareDocumentPosition(el) & 16);
241
- }
242
- var prEl = el.parentNode;
243
- while(prEl && prEl != container) {
244
- if (prEl == parentEl)
245
- return true;
246
- prEl = prEl.parentNode;
247
- }
248
- return false;
249
- },
250
- getViewport = function () {
251
- var m = document.compatMode == 'CSS1Compat';
252
- return {
253
- l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
254
- t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
255
- w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
256
- h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
257
- };
258
- },
259
- fixHSB = function (hsb) {
260
- return {
261
- h: Math.min(360, Math.max(0, hsb.h)),
262
- s: Math.min(100, Math.max(0, hsb.s)),
263
- b: Math.min(100, Math.max(0, hsb.b))
264
- };
265
- },
266
- fixRGB = function (rgb) {
267
- return {
268
- r: Math.min(255, Math.max(0, rgb.r)),
269
- g: Math.min(255, Math.max(0, rgb.g)),
270
- b: Math.min(255, Math.max(0, rgb.b))
271
- };
272
- },
273
- fixHex = function (hex) {
274
- var len = 6 - hex.length;
275
- if (len > 0) {
276
- var o = [];
277
- for (var i=0; i<len; i++) {
278
- o.push('0');
279
- }
280
- o.push(hex);
281
- hex = o.join('');
282
- }
283
- return hex;
284
- },
285
- HexToRGB = function (hex) {
286
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
287
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
288
- },
289
- HexToHSB = function (hex) {
290
- return RGBToHSB(HexToRGB(hex));
291
- },
292
- RGBToHSB = function (rgb) {
293
- var hsb = {
294
- h: 0,
295
- s: 0,
296
- b: 0
297
- };
298
- var min = Math.min(rgb.r, rgb.g, rgb.b);
299
- var max = Math.max(rgb.r, rgb.g, rgb.b);
300
- var delta = max - min;
301
- hsb.b = max;
302
- if (max != 0) {
303
-
304
- }
305
- hsb.s = max != 0 ? 255 * delta / max : 0;
306
- if (hsb.s != 0) {
307
- if (rgb.r == max) {
308
- hsb.h = (rgb.g - rgb.b) / delta;
309
- } else if (rgb.g == max) {
310
- hsb.h = 2 + (rgb.b - rgb.r) / delta;
311
- } else {
312
- hsb.h = 4 + (rgb.r - rgb.g) / delta;
313
- }
314
- } else {
315
- hsb.h = -1;
316
- }
317
- hsb.h *= 60;
318
- if (hsb.h < 0) {
319
- hsb.h += 360;
320
- }
321
- hsb.s *= 100/255;
322
- hsb.b *= 100/255;
323
- return hsb;
324
- },
325
- HSBToRGB = function (hsb) {
326
- var rgb = {};
327
- var h = Math.round(hsb.h);
328
- var s = Math.round(hsb.s*255/100);
329
- var v = Math.round(hsb.b*255/100);
330
- if(s == 0) {
331
- rgb.r = rgb.g = rgb.b = v;
332
- } else {
333
- var t1 = v;
334
- var t2 = (255-s)*v/255;
335
- var t3 = (t1-t2)*(h%60)/60;
336
- if(h==360) h = 0;
337
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
338
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
339
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
340
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
341
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
342
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
343
- else {rgb.r=0; rgb.g=0; rgb.b=0}
344
- }
345
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
346
- },
347
- RGBToHex = function (rgb) {
348
- var hex = [
349
- rgb.r.toString(16),
350
- rgb.g.toString(16),
351
- rgb.b.toString(16)
352
- ];
353
- $.each(hex, function (nr, val) {
354
- if (val.length == 1) {
355
- hex[nr] = '0' + val;
356
- }
357
- });
358
- return hex.join('');
359
- },
360
- HSBToHex = function (hsb) {
361
- return RGBToHex(HSBToRGB(hsb));
362
- },
363
- restoreOriginal = function () {
364
- var cal = $(this).parent();
365
- var col = cal.data('colorpicker').origColor;
366
- cal.data('colorpicker').color = col;
367
- fillRGBFields(col, cal.get(0));
368
- fillHexFields(col, cal.get(0));
369
- fillHSBFields(col, cal.get(0));
370
- setSelector(col, cal.get(0));
371
- setHue(col, cal.get(0));
372
- setNewColor(col, cal.get(0));
373
- };
374
- return {
375
- init: function (opt) {
376
- opt = $.extend({}, defaults, opt||{});
377
- if (typeof opt.color == 'string') {
378
- opt.color = HexToHSB(opt.color);
379
- } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
380
- opt.color = RGBToHSB(opt.color);
381
- } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
382
- opt.color = fixHSB(opt.color);
383
- } else {
384
- return this;
385
- }
386
- return this.each(function () {
387
- if (!$(this).data('colorpickerId')) {
388
- var options = $.extend({}, opt);
389
- options.origColor = opt.color;
390
- var id = 'collorpicker_' + parseInt(Math.random() * 1000);
391
- $(this).data('colorpickerId', id);
392
- var cal = $(tpl).attr('id', id);
393
- if (options.flat) {
394
- cal.appendTo(this).show();
395
- } else {
396
- cal.appendTo(document.body);
397
- }
398
- options.fields = cal
399
- .find('input')
400
- .bind('keyup', keyDown)
401
- .bind('change', change)
402
- .bind('blur', blur)
403
- .bind('focus', focus);
404
- cal
405
- .find('span').bind('mousedown', downIncrement).end()
406
- .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
407
- options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
408
- options.selectorIndic = options.selector.find('div div');
409
- options.el = this;
410
- options.hue = cal.find('div.colorpicker_hue div');
411
- cal.find('div.colorpicker_hue').bind('mousedown', downHue);
412
- options.newColor = cal.find('div.colorpicker_new_color');
413
- options.currentColor = cal.find('div.colorpicker_current_color');
414
- cal.data('colorpicker', options);
415
- cal.find('div.colorpicker_submit')
416
- .bind('mouseenter', enterSubmit)
417
- .bind('mouseleave', leaveSubmit)
418
- .bind('click', clickSubmit);
419
- fillRGBFields(options.color, cal.get(0));
420
- fillHSBFields(options.color, cal.get(0));
421
- fillHexFields(options.color, cal.get(0));
422
- setHue(options.color, cal.get(0));
423
- setSelector(options.color, cal.get(0));
424
- setCurrentColor(options.color, cal.get(0));
425
- setNewColor(options.color, cal.get(0));
426
- if (options.flat) {
427
- cal.css({
428
- position: 'relative',
429
- display: 'block'
430
- });
431
- } else {
432
- $(this).bind(options.eventName, show);
433
- }
434
- }
435
- });
436
- },
437
- showPicker: function() {
438
- return this.each( function () {
439
- if ($(this).data('colorpickerId')) {
440
- show.apply(this);
441
- }
442
- });
443
- },
444
- hidePicker: function() {
445
- return this.each( function () {
446
- if ($(this).data('colorpickerId')) {
447
- $('#' + $(this).data('colorpickerId')).hide();
448
- }
449
- });
450
- },
451
- setColor: function(col) {
452
- if (typeof col == 'string') {
453
- col = HexToHSB(col);
454
- } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
455
- col = RGBToHSB(col);
456
- } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
457
- col = fixHSB(col);
458
- } else {
459
- return this;
460
- }
461
- return this.each(function(){
462
- if ($(this).data('colorpickerId')) {
463
- var cal = $('#' + $(this).data('colorpickerId'));
464
- cal.data('colorpicker').color = col;
465
- cal.data('colorpicker').origColor = col;
466
- fillRGBFields(col, cal.get(0));
467
- fillHSBFields(col, cal.get(0));
468
- fillHexFields(col, cal.get(0));
469
- setHue(col, cal.get(0));
470
- setSelector(col, cal.get(0));
471
- setCurrentColor(col, cal.get(0));
472
- setNewColor(col, cal.get(0));
473
- }
474
- });
475
- }
476
- };
477
- }();
478
- $.fn.extend({
479
- ColorPicker: ColorPicker.init,
480
- ColorPickerHide: ColorPicker.hidePicker,
481
- ColorPickerShow: ColorPicker.showPicker,
482
- ColorPickerSetColor: ColorPicker.setColor
483
- });
484
- })(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/js/jquery-ui-old.min.js DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery UI - v1.8.21 - 2012-06-05
2
- * https://github.com/jquery/jquery-ui
3
- * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js, jquery.effects.blind.js, jquery.effects.bounce.js, jquery.effects.clip.js, jquery.effects.drop.js, jquery.effects.explode.js, jquery.effects.fade.js, jquery.effects.fold.js, jquery.effects.highlight.js, jquery.effects.pulsate.js, jquery.effects.scale.js, jquery.effects.shake.js, jquery.effects.slide.js, jquery.effects.transfer.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.tabs.js
4
- * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
5
- (function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.21",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode>=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&&(d=d.parentNode))d==document&&(e=!0);if(!e&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&&f._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.21"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&&(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"&&(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!e.length)return;var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.21"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h<d.length;h++){if(d[h].options.disabled||b&&!d[h].accept.call(d[h].element[0],b.currentItem||b.element))continue;for(var i=0;i<f.length;i++)if(f[i]==d[h].element[0]){d[h].proportions.height=0;continue g}d[h].visible=d[h].element.css("display")!="none";if(!d[h].visible)continue;e=="mousedown"&&d[h]._activate.call(d[h],c),d[h].offset=d[h].element.offset(),d[h].proportions={width:d[h].element[0].offsetWidth,height:d[h].element[0].offsetHeight}}},drop:function(b,c){var d=!1;return a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c))}),d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&&e=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&&e=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e<d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('<div class="ui-resizable-handle '+g+'"></div>');h.css({zIndex:c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide"),b._handles.show()},function(){if(c.disabled)return;b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");return a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);return l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),e<h.maxWidth&&(h.maxWidth=e),g<h.maxHeight&&(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),g=="sw"&&(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&&(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width)),a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&&e.maxWidth&&e.maxWidth<a.width,i=d(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=d(a.width)&&e.minWidth&&e.minWidth>a.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeight);var p=!a.width&&!a.height;return p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null),a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d<this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(!a.browser.msie||!a(c).is(":hidden")&&!a(c).parents(":hidden").length)e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0});else continue}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.21"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/d.aspectRatio),d.position.left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*d.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.right<e||i.top>h||i.bottom<f):d.tolerance=="fit"&&(j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h),j?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&&((b.metaKey||b.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected&&(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}),!1},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;return a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}}),a.extend(a.ui.selectable,{version:"1.8.21"})}(jQuery),function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+j<i&&b+k>f&&b+k<g;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=this.options.axis==="x"||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=this.options.axis==="y"||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return e?this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&d||f=="left"&&!d:e&&(e=="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i],this.direction=j-h>0?"down":"up")}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.21"})}(jQuery),jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.21",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&&(g=1.70158),(c/=f/2)<1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery),function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight({margin:!0})/3:c.outerWidth({margin:!0})/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m<h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,function(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}}(jQuery),function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&&(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0})/2:c.outerWidth({margin:!0})/2);e=="show"&&c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i<c;i++)for(var j=0;j<d;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}}(jQuery),function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i<e;i++)c.animate({opacity:h},f,b.options.easing),h=(h+1)%2;c.animate({opacity:h},f,b.options.easing,function(){h==0&&c.hide(),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}}(jQuery),function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&&(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&&(e=="show"&&(c.from.opacity=0,c.to.opacity=1),e=="hide"&&(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&&(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&&q.from.y!=q.to.y&&(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){var c=a(this);k&&a.effects.save(c,f);var d={height:c.height(),width:c.width()};c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&&(c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&&(c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.options.easing,function(){k&&a.effects.restore(c,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity),j=="hide"&&c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p<h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}}(jQuery),function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight({margin:!0}):c.outerWidth({margin:!0}));e=="show"&&c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.21",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})}(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery),function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&&(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled)return;a(this).addClass("ui-state-hover"),this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave.button",function(){if(h.disabled)return;a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change.button",function(){if(f)return;b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){if(h.disabled)return;f=!1,d=a.pageX,e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled)return;if(d!==a.pageX||e!==a.pageY)f=!0})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleClass("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1);return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.21"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.21",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=a.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||"&#160;",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("<span></span>").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('<button type="button"></button>').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){if(a==="click")return;a in f?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||"&#160;"))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.21",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b<c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.browser.msie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b<c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})}(jQuery),function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()}(jQuery),function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.21"})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(b.options.disabled)return;switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d.preventDefault();if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e);if(f===!1)return}}i=b.options.step,b.options.values&&b.options.values.length?g=h=b.values(e):g=h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b),b;c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.21"})}(jQuery),function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1<this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.21"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a),b&&b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&&c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})}(jQuery);
 
 
 
 
 
inc/js/jquery-ui-timepicker-old.js DELETED
@@ -1,1755 +0,0 @@
1
- /*
2
- * jQuery timepicker addon
3
- * By: Trent Richardson [http://trentrichardson.com]
4
- * Version 1.0.4
5
- * Last Modified: 09/29/2012
6
- *
7
- * Copyright 2012 Trent Richardson
8
- * You may use this project under MIT or GPL licenses.
9
- * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
10
- * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
11
- *
12
- * HERES THE CSS:
13
- * .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
14
- * .ui-timepicker-div dl { text-align: left; }
15
- * .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
16
- * .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
17
- * .ui-timepicker-div td { font-size: 90%; }
18
- * .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
19
- */
20
-
21
- /*jslint evil: true, white: false, undef: false, nomen: false */
22
-
23
- (function($) {
24
-
25
- /*
26
- * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
27
- */
28
- $.ui.timepicker = $.ui.timepicker || {};
29
- if ($.ui.timepicker.version) {
30
- return;
31
- }
32
-
33
- /*
34
- * Extend jQueryUI, get it started with our version number
35
- */
36
- $.extend($.ui, {
37
- timepicker: {
38
- version: "1.0.4"
39
- }
40
- });
41
-
42
- /*
43
- * Timepicker manager.
44
- * Use the singleton instance of this class, $.timepicker, to interact with the time picker.
45
- * Settings for (groups of) time pickers are maintained in an instance object,
46
- * allowing multiple different settings on the same page.
47
- */
48
- function Timepicker() {
49
- this.regional = []; // Available regional settings, indexed by language code
50
- this.regional[''] = { // Default regional settings
51
- currentText: 'Now',
52
- closeText: 'Done',
53
- ampm: false,
54
- amNames: ['AM', 'A'],
55
- pmNames: ['PM', 'P'],
56
- timeFormat: 'hh:mm tt',
57
- timeSuffix: '',
58
- timeOnlyTitle: 'Choose Time',
59
- timeText: 'Time',
60
- hourText: 'Hour',
61
- minuteText: 'Minute',
62
- secondText: 'Second',
63
- millisecText: 'Millisecond',
64
- timezoneText: 'Time Zone'
65
- };
66
- this._defaults = { // Global defaults for all the datetime picker instances
67
- showButtonPanel: true,
68
- timeOnly: false,
69
- showHour: true,
70
- showMinute: true,
71
- showSecond: false,
72
- showMillisec: false,
73
- showTimezone: false,
74
- showTime: true,
75
- stepHour: 1,
76
- stepMinute: 1,
77
- stepSecond: 1,
78
- stepMillisec: 1,
79
- hour: 0,
80
- minute: 0,
81
- second: 0,
82
- millisec: 0,
83
- timezone: null,
84
- useLocalTimezone: false,
85
- defaultTimezone: "+0000",
86
- hourMin: 0,
87
- minuteMin: 0,
88
- secondMin: 0,
89
- millisecMin: 0,
90
- hourMax: 23,
91
- minuteMax: 59,
92
- secondMax: 59,
93
- millisecMax: 999,
94
- minDateTime: null,
95
- maxDateTime: null,
96
- onSelect: null,
97
- hourGrid: 0,
98
- minuteGrid: 0,
99
- secondGrid: 0,
100
- millisecGrid: 0,
101
- alwaysSetTime: true,
102
- separator: ' ',
103
- altFieldTimeOnly: true,
104
- altSeparator: null,
105
- altTimeSuffix: null,
106
- showTimepicker: true,
107
- timezoneIso8601: false,
108
- timezoneList: null,
109
- addSliderAccess: false,
110
- sliderAccessArgs: null,
111
- defaultValue: null
112
- };
113
- $.extend(this._defaults, this.regional['']);
114
- }
115
-
116
- $.extend(Timepicker.prototype, {
117
- $input: null,
118
- $altInput: null,
119
- $timeObj: null,
120
- inst: null,
121
- hour_slider: null,
122
- minute_slider: null,
123
- second_slider: null,
124
- millisec_slider: null,
125
- timezone_select: null,
126
- hour: 0,
127
- minute: 0,
128
- second: 0,
129
- millisec: 0,
130
- timezone: null,
131
- defaultTimezone: "+0000",
132
- hourMinOriginal: null,
133
- minuteMinOriginal: null,
134
- secondMinOriginal: null,
135
- millisecMinOriginal: null,
136
- hourMaxOriginal: null,
137
- minuteMaxOriginal: null,
138
- secondMaxOriginal: null,
139
- millisecMaxOriginal: null,
140
- ampm: '',
141
- formattedDate: '',
142
- formattedTime: '',
143
- formattedDateTime: '',
144
- timezoneList: null,
145
- units: ['hour','minute','second','millisec'],
146
-
147
- /*
148
- * Override the default settings for all instances of the time picker.
149
- * @param settings object - the new settings to use as defaults (anonymous object)
150
- * @return the manager object
151
- */
152
- setDefaults: function(settings) {
153
- extendRemove(this._defaults, settings || {});
154
- return this;
155
- },
156
-
157
- /*
158
- * Create a new Timepicker instance
159
- */
160
- _newInst: function($input, o) {
161
- var tp_inst = new Timepicker(),
162
- inlineSettings = {};
163
-
164
- for (var attrName in this._defaults) {
165
- if(this._defaults.hasOwnProperty(attrName)){
166
- var attrValue = $input.attr('time:' + attrName);
167
- if (attrValue) {
168
- try {
169
- inlineSettings[attrName] = eval(attrValue);
170
- } catch (err) {
171
- inlineSettings[attrName] = attrValue;
172
- }
173
- }
174
- }
175
- }
176
- tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, {
177
- beforeShow: function(input, dp_inst) {
178
- if ($.isFunction(o.beforeShow)) {
179
- return o.beforeShow(input, dp_inst, tp_inst);
180
- }
181
- },
182
- onChangeMonthYear: function(year, month, dp_inst) {
183
- // Update the time as well : this prevents the time from disappearing from the $input field.
184
- tp_inst._updateDateTime(dp_inst);
185
- if ($.isFunction(o.onChangeMonthYear)) {
186
- o.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
187
- }
188
- },
189
- onClose: function(dateText, dp_inst) {
190
- if (tp_inst.timeDefined === true && $input.val() !== '') {
191
- tp_inst._updateDateTime(dp_inst);
192
- }
193
- if ($.isFunction(o.onClose)) {
194
- o.onClose.call($input[0], dateText, dp_inst, tp_inst);
195
- }
196
- },
197
- timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
198
- });
199
- tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) {
200
- return val.toUpperCase();
201
- });
202
- tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) {
203
- return val.toUpperCase();
204
- });
205
-
206
- if (tp_inst._defaults.timezoneList === null) {
207
- var timezoneList = ['-1200', '-1100', '-1000', '-0930', '-0900', '-0800', '-0700', '-0600', '-0500', '-0430', '-0400', '-0330', '-0300', '-0200', '-0100', '+0000',
208
- '+0100', '+0200', '+0300', '+0330', '+0400', '+0430', '+0500', '+0530', '+0545', '+0600', '+0630', '+0700', '+0800', '+0845', '+0900', '+0930',
209
- '+1000', '+1030', '+1100', '+1130', '+1200', '+1245', '+1300', '+1400'];
210
-
211
- if (tp_inst._defaults.timezoneIso8601) {
212
- timezoneList = $.map(timezoneList, function(val) {
213
- return val == '+0000' ? 'Z' : (val.substring(0, 3) + ':' + val.substring(3));
214
- });
215
- }
216
- tp_inst._defaults.timezoneList = timezoneList;
217
- }
218
-
219
- tp_inst.timezone = tp_inst._defaults.timezone;
220
- tp_inst.hour = tp_inst._defaults.hour;
221
- tp_inst.minute = tp_inst._defaults.minute;
222
- tp_inst.second = tp_inst._defaults.second;
223
- tp_inst.millisec = tp_inst._defaults.millisec;
224
- tp_inst.ampm = '';
225
- tp_inst.$input = $input;
226
-
227
- if (o.altField) {
228
- tp_inst.$altInput = $(o.altField).css({
229
- cursor: 'pointer'
230
- }).focus(function() {
231
- $input.trigger("focus");
232
- });
233
- }
234
-
235
- if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
236
- tp_inst._defaults.minDate = new Date();
237
- }
238
- if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
239
- tp_inst._defaults.maxDate = new Date();
240
- }
241
-
242
- // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
243
- if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {
244
- tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
245
- }
246
- if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
247
- tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
248
- }
249
- if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
250
- tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
251
- }
252
- if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
253
- tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
254
- }
255
- tp_inst.$input.bind('focus', function() {
256
- tp_inst._onFocus();
257
- });
258
-
259
- return tp_inst;
260
- },
261
-
262
- /*
263
- * add our sliders to the calendar
264
- */
265
- _addTimePicker: function(dp_inst) {
266
- var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
267
-
268
- this.timeDefined = this._parseTime(currDT);
269
- this._limitMinMaxDateTime(dp_inst, false);
270
- this._injectTimePicker();
271
- },
272
-
273
- /*
274
- * parse the time string from input value or _setTime
275
- */
276
- _parseTime: function(timeString, withDate) {
277
- if (!this.inst) {
278
- this.inst = $.datepicker._getInst(this.$input[0]);
279
- }
280
-
281
- if (withDate || !this._defaults.timeOnly) {
282
- var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
283
- try {
284
- var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);
285
- if (!parseRes.timeObj) {
286
- return false;
287
- }
288
- $.extend(this, parseRes.timeObj);
289
- } catch (err) {
290
- return false;
291
- }
292
- return true;
293
- } else {
294
- var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);
295
- if (!timeObj) {
296
- return false;
297
- }
298
- $.extend(this, timeObj);
299
- return true;
300
- }
301
- },
302
-
303
- /*
304
- * generate and inject html for timepicker into ui datepicker
305
- */
306
- _injectTimePicker: function() {
307
- var $dp = this.inst.dpDiv,
308
- o = this.inst.settings,
309
- tp_inst = this,
310
- litem = '',
311
- uitem = '',
312
- max = {},
313
- gridSize = {},
314
- size = null;
315
-
316
- // Prevent displaying twice
317
- if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
318
- var noDisplay = ' style="display:none;"',
319
- html = '<div class="ui-timepicker-div"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
320
- '<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
321
-
322
- // Create the markup
323
- for(var i=0,l=this.units.length; i<l; i++){
324
- litem = this.units[i];
325
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
326
- // Added by Peter Medeiros:
327
- // - Figure out what the hour/minute/second max should be based on the step values.
328
- // - Example: if stepMinute is 15, then minMax is 45.
329
- max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
330
- gridSize[litem] = 0;
331
-
332
- html += '<dt class="ui_tpicker_'+ litem +'_label"' + ((o['show'+uitem]) ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
333
- '<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + ((o['show'+uitem]) ? '' : noDisplay) + '></div>';
334
-
335
- if (o['show'+uitem] && o[litem+'Grid'] > 0) {
336
- html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
337
-
338
- if(litem == 'hour'){
339
- for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
340
- gridSize[litem]++;
341
- var tmph = (o.ampm && h > 12) ? h - 12 : h;
342
- if (tmph < 10) {
343
- tmph = '0' + tmph;
344
- }
345
- if (o.ampm) {
346
- if (h === 0) {
347
- tmph = 12 + 'a';
348
- } else {
349
- if (h < 12) {
350
- tmph += 'a';
351
- } else {
352
- tmph += 'p';
353
- }
354
- }
355
- }
356
- html += '<td data-for="'+litem+'">' + tmph + '</td>';
357
- }
358
- }
359
- else{
360
- for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) {
361
- gridSize[litem]++;
362
- html += '<td data-for="'+litem+'">' + ((m < 10) ? '0' : '') + m + '</td>';
363
- }
364
- }
365
-
366
- html += '</tr></table></div>';
367
- }
368
- html += '</dd>';
369
- }
370
-
371
- // Timezone
372
- html += '<dt class="ui_tpicker_timezone_label"' + ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
373
- html += '<dd class="ui_tpicker_timezone" ' + ((o.showTimezone) ? '' : noDisplay) + '></dd>';
374
-
375
- // Create the elements from string
376
- html += '</dl></div>';
377
- var $tp = $(html);
378
-
379
- // if we only want time picker...
380
- if (o.timeOnly === true) {
381
- $tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
382
- $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
383
- }
384
-
385
- // Updated by Peter Medeiros:
386
- // - Pass in Event and UI instance into slide function
387
- this.hour_slider = $tp.find('.ui_tpicker_hour_slider').prop('slide', null).slider({
388
- orientation: "horizontal",
389
- value: this.hour,
390
- min: o.hourMin,
391
- max: max.hour,
392
- step: o.stepHour,
393
- slide: function(event, ui) {
394
- tp_inst.hour_slider.slider("option", "value", ui.value);
395
- tp_inst._onTimeChange();
396
- },
397
- stop: function(event, ui) {
398
- tp_inst._onSelectHandler();
399
- }
400
- });
401
-
402
- this.minute_slider = $tp.find('.ui_tpicker_minute_slider').prop('slide', null).slider({
403
- orientation: "horizontal",
404
- value: this.minute,
405
- min: o.minuteMin,
406
- max: max.minute,
407
- step: o.stepMinute,
408
- slide: function(event, ui) {
409
- tp_inst.minute_slider.slider("option", "value", ui.value);
410
- tp_inst._onTimeChange();
411
- },
412
- stop: function(event, ui) {
413
- tp_inst._onSelectHandler();
414
- }
415
- });
416
-
417
- this.second_slider = $tp.find('.ui_tpicker_second_slider').prop('slide', null).slider({
418
- orientation: "horizontal",
419
- value: this.second,
420
- min: o.secondMin,
421
- max: max.second,
422
- step: o.stepSecond,
423
- slide: function(event, ui) {
424
- tp_inst.second_slider.slider("option", "value", ui.value);
425
- tp_inst._onTimeChange();
426
- },
427
- stop: function(event, ui) {
428
- tp_inst._onSelectHandler();
429
- }
430
- });
431
-
432
- this.millisec_slider = $tp.find('.ui_tpicker_millisec_slider').prop('slide', null).slider({
433
- orientation: "horizontal",
434
- value: this.millisec,
435
- min: o.millisecMin,
436
- max: max.millisec,
437
- step: o.stepMillisec,
438
- slide: function(event, ui) {
439
- tp_inst.millisec_slider.slider("option", "value", ui.value);
440
- tp_inst._onTimeChange();
441
- },
442
- stop: function(event, ui) {
443
- tp_inst._onSelectHandler();
444
- }
445
- });
446
-
447
- // add sliders, adjust grids, add events
448
- for(var i=0,l=tp_inst.units.length; i<l; i++){
449
- litem = tp_inst.units[i];
450
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
451
-
452
- /*
453
- Something fishy happens when assigning to tp_inst['hour_slider'] instead of tp_inst.hour_slider, I think
454
- it is because it is assigned as a prototype. Clicking the slider will always change to the previous value
455
- not the new one clicked. Ideally this works and reduces the 80+ lines of code above
456
- // add the slider
457
- tp_inst[litem+'_slider'] = $tp.find('.ui_tpicker_'+litem+'_slider').prop('slide', null).slider({
458
- orientation: "horizontal",
459
- value: tp_inst[litem],
460
- min: o[litem+'Min'],
461
- max: max[litem],
462
- step: o['step'+uitem],
463
- slide: function(event, ui) {
464
- tp_inst[litem+'_slider'].slider("option", "value", ui.value);
465
- tp_inst._onTimeChange();
466
- },
467
- stop: function(event, ui) {
468
- //Emulate datepicker onSelect behavior. Call on slidestop.
469
- tp_inst._onSelectHandler();
470
- }
471
- });
472
- */
473
-
474
- // adjust the grid and add click event
475
- if (o['show'+uitem] && o[litem+'Grid'] > 0) {
476
- size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']);
477
- $tp.find('.ui_tpicker_'+litem+' table').css({
478
- width: size + "%",
479
- marginLeft: (size / (-2 * gridSize[litem])) + "%",
480
- borderCollapse: 'collapse'
481
- }).find("td").click(function(e){
482
- var $t = $(this),
483
- h = $t.html(),
484
- f = $t.data('for'); // loses scope, so we use data-for
485
-
486
- if (f == 'hour' && o.ampm) {
487
- var ap = h.substring(2).toLowerCase(),
488
- aph = parseInt(h.substring(0, 2), 10);
489
- if (ap == 'a') {
490
- if (aph == 12) {
491
- h = 0;
492
- } else {
493
- h = aph;
494
- }
495
- } else if (aph == 12) {
496
- h = 12;
497
- } else {
498
- h = aph + 12;
499
- }
500
- }
501
- tp_inst[f+'_slider'].slider("option", "value", parseInt(h,10));
502
- tp_inst._onTimeChange();
503
- tp_inst._onSelectHandler();
504
- })
505
- .css({
506
- cursor: 'pointer',
507
- width: (100 / gridSize[litem]) + '%',
508
- textAlign: 'center',
509
- overflow: 'hidden'
510
- });
511
- } // end if grid > 0
512
- } // end for loop
513
-
514
- // Add timezone options
515
- this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
516
- $.fn.append.apply(this.timezone_select,
517
- $.map(o.timezoneList, function(val, idx) {
518
- return $("<option />").val(typeof val == "object" ? val.value : val).text(typeof val == "object" ? val.label : val);
519
- }));
520
- if (typeof(this.timezone) != "undefined" && this.timezone !== null && this.timezone !== "") {
521
- var local_date = new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12);
522
- var local_timezone = $.timepicker.timeZoneOffsetString(local_date);
523
- if (local_timezone == this.timezone) {
524
- selectLocalTimeZone(tp_inst);
525
- } else {
526
- this.timezone_select.val(this.timezone);
527
- }
528
- } else {
529
- if (typeof(this.hour) != "undefined" && this.hour !== null && this.hour !== "") {
530
- this.timezone_select.val(o.defaultTimezone);
531
- } else {
532
- selectLocalTimeZone(tp_inst);
533
- }
534
- }
535
- this.timezone_select.change(function() {
536
- tp_inst._defaults.useLocalTimezone = false;
537
- tp_inst._onTimeChange();
538
- });
539
- // End timezone options
540
-
541
- // inject timepicker into datepicker
542
- var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
543
- if ($buttonPanel.length) {
544
- $buttonPanel.before($tp);
545
- } else {
546
- $dp.append($tp);
547
- }
548
-
549
- this.$timeObj = $tp.find('.ui_tpicker_time');
550
-
551
- if (this.inst !== null) {
552
- var timeDefined = this.timeDefined;
553
- this._onTimeChange();
554
- this.timeDefined = timeDefined;
555
- }
556
-
557
- // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
558
- if (this._defaults.addSliderAccess) {
559
- var sliderAccessArgs = this._defaults.sliderAccessArgs;
560
- setTimeout(function() { // fix for inline mode
561
- if ($tp.find('.ui-slider-access').length === 0) {
562
- $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
563
-
564
- // fix any grids since sliders are shorter
565
- var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
566
- if (sliderAccessWidth) {
567
- $tp.find('table:visible').each(function() {
568
- var $g = $(this),
569
- oldWidth = $g.outerWidth(),
570
- oldMarginLeft = $g.css('marginLeft').toString().replace('%', ''),
571
- newWidth = oldWidth - sliderAccessWidth,
572
- newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%';
573
-
574
- $g.css({
575
- width: newWidth,
576
- marginLeft: newMarginLeft
577
- });
578
- });
579
- }
580
- }
581
- }, 10);
582
- }
583
- // end slideAccess integration
584
-
585
- }
586
- },
587
-
588
- /*
589
- * This function tries to limit the ability to go outside the
590
- * min/max date range
591
- */
592
- _limitMinMaxDateTime: function(dp_inst, adjustSliders) {
593
- var o = this._defaults,
594
- dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
595
-
596
- if (!this._defaults.showTimepicker) {
597
- return;
598
- } // No time so nothing to check here
599
-
600
- if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {
601
- var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
602
- minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
603
-
604
- if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null) {
605
- this.hourMinOriginal = o.hourMin;
606
- this.minuteMinOriginal = o.minuteMin;
607
- this.secondMinOriginal = o.secondMin;
608
- this.millisecMinOriginal = o.millisecMin;
609
- }
610
-
611
- if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
612
- this._defaults.hourMin = minDateTime.getHours();
613
- if (this.hour <= this._defaults.hourMin) {
614
- this.hour = this._defaults.hourMin;
615
- this._defaults.minuteMin = minDateTime.getMinutes();
616
- if (this.minute <= this._defaults.minuteMin) {
617
- this.minute = this._defaults.minuteMin;
618
- this._defaults.secondMin = minDateTime.getSeconds();
619
- if (this.second <= this._defaults.secondMin) {
620
- this.second = this._defaults.secondMin;
621
- this._defaults.millisecMin = minDateTime.getMilliseconds();
622
- } else {
623
- if (this.millisec < this._defaults.millisecMin) {
624
- this.millisec = this._defaults.millisecMin;
625
- }
626
- this._defaults.millisecMin = this.millisecMinOriginal;
627
- }
628
- } else {
629
- this._defaults.secondMin = this.secondMinOriginal;
630
- this._defaults.millisecMin = this.millisecMinOriginal;
631
- }
632
- } else {
633
- this._defaults.minuteMin = this.minuteMinOriginal;
634
- this._defaults.secondMin = this.secondMinOriginal;
635
- this._defaults.millisecMin = this.millisecMinOriginal;
636
- }
637
- } else {
638
- this._defaults.hourMin = this.hourMinOriginal;
639
- this._defaults.minuteMin = this.minuteMinOriginal;
640
- this._defaults.secondMin = this.secondMinOriginal;
641
- this._defaults.millisecMin = this.millisecMinOriginal;
642
- }
643
- }
644
-
645
- if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {
646
- var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
647
- maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
648
-
649
- if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null) {
650
- this.hourMaxOriginal = o.hourMax;
651
- this.minuteMaxOriginal = o.minuteMax;
652
- this.secondMaxOriginal = o.secondMax;
653
- this.millisecMaxOriginal = o.millisecMax;
654
- }
655
-
656
- if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()) {
657
- this._defaults.hourMax = maxDateTime.getHours();
658
- if (this.hour >= this._defaults.hourMax) {
659
- this.hour = this._defaults.hourMax;
660
- this._defaults.minuteMax = maxDateTime.getMinutes();
661
- if (this.minute >= this._defaults.minuteMax) {
662
- this.minute = this._defaults.minuteMax;
663
- this._defaults.secondMax = maxDateTime.getSeconds();
664
- } else if (this.second >= this._defaults.secondMax) {
665
- this.second = this._defaults.secondMax;
666
- this._defaults.millisecMax = maxDateTime.getMilliseconds();
667
- } else {
668
- if (this.millisec > this._defaults.millisecMax) {
669
- this.millisec = this._defaults.millisecMax;
670
- }
671
- this._defaults.millisecMax = this.millisecMaxOriginal;
672
- }
673
- } else {
674
- this._defaults.minuteMax = this.minuteMaxOriginal;
675
- this._defaults.secondMax = this.secondMaxOriginal;
676
- this._defaults.millisecMax = this.millisecMaxOriginal;
677
- }
678
- } else {
679
- this._defaults.hourMax = this.hourMaxOriginal;
680
- this._defaults.minuteMax = this.minuteMaxOriginal;
681
- this._defaults.secondMax = this.secondMaxOriginal;
682
- this._defaults.millisecMax = this.millisecMaxOriginal;
683
- }
684
- }
685
-
686
- if (adjustSliders !== undefined && adjustSliders === true) {
687
- var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
688
- minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
689
- secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
690
- millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10);
691
-
692
- if (this.hour_slider) {
693
- this.hour_slider.slider("option", {
694
- min: this._defaults.hourMin,
695
- max: hourMax
696
- }).slider('value', this.hour);
697
- }
698
- if (this.minute_slider) {
699
- this.minute_slider.slider("option", {
700
- min: this._defaults.minuteMin,
701
- max: minMax
702
- }).slider('value', this.minute);
703
- }
704
- if (this.second_slider) {
705
- this.second_slider.slider("option", {
706
- min: this._defaults.secondMin,
707
- max: secMax
708
- }).slider('value', this.second);
709
- }
710
- if (this.millisec_slider) {
711
- this.millisec_slider.slider("option", {
712
- min: this._defaults.millisecMin,
713
- max: millisecMax
714
- }).slider('value', this.millisec);
715
- }
716
- }
717
-
718
- },
719
-
720
- /*
721
- * when a slider moves, set the internal time...
722
- * on time change is also called when the time is updated in the text field
723
- */
724
- _onTimeChange: function() {
725
- var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false,
726
- minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
727
- second = (this.second_slider) ? this.second_slider.slider('value') : false,
728
- millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false,
729
- timezone = (this.timezone_select) ? this.timezone_select.val() : false,
730
- o = this._defaults;
731
-
732
- if (typeof(hour) == 'object') {
733
- hour = false;
734
- }
735
- if (typeof(minute) == 'object') {
736
- minute = false;
737
- }
738
- if (typeof(second) == 'object') {
739
- second = false;
740
- }
741
- if (typeof(millisec) == 'object') {
742
- millisec = false;
743
- }
744
- if (typeof(timezone) == 'object') {
745
- timezone = false;
746
- }
747
-
748
- if (hour !== false) {
749
- hour = parseInt(hour, 10);
750
- }
751
- if (minute !== false) {
752
- minute = parseInt(minute, 10);
753
- }
754
- if (second !== false) {
755
- second = parseInt(second, 10);
756
- }
757
- if (millisec !== false) {
758
- millisec = parseInt(millisec, 10);
759
- }
760
-
761
- var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
762
-
763
- // If the update was done in the input field, the input field should not be updated.
764
- // If the update was done using the sliders, update the input field.
765
- var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec
766
- || (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
767
- || ((this.timezone === null && timezone != this.defaultTimezone) || (this.timezone !== null && timezone != this.timezone)));
768
-
769
- if (hasChanged) {
770
-
771
- if (hour !== false) {
772
- this.hour = hour;
773
- }
774
- if (minute !== false) {
775
- this.minute = minute;
776
- }
777
- if (second !== false) {
778
- this.second = second;
779
- }
780
- if (millisec !== false) {
781
- this.millisec = millisec;
782
- }
783
- if (timezone !== false) {
784
- this.timezone = timezone;
785
- }
786
-
787
- if (!this.inst) {
788
- this.inst = $.datepicker._getInst(this.$input[0]);
789
- }
790
-
791
- this._limitMinMaxDateTime(this.inst, true);
792
- }
793
- if (o.ampm) {
794
- this.ampm = ampm;
795
- }
796
-
797
- //this._formatTime();
798
- this.formattedTime = $.datepicker.formatTime(this._defaults.timeFormat, this, this._defaults);
799
- if (this.$timeObj) {
800
- this.$timeObj.text(this.formattedTime + o.timeSuffix);
801
- }
802
- this.timeDefined = true;
803
- if (hasChanged) {
804
- this._updateDateTime();
805
- }
806
- },
807
-
808
- /*
809
- * call custom onSelect.
810
- * bind to sliders slidestop, and grid click.
811
- */
812
- _onSelectHandler: function() {
813
- var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
814
- var inputEl = this.$input ? this.$input[0] : null;
815
- if (onSelect && inputEl) {
816
- onSelect.apply(inputEl, [this.formattedDateTime, this]);
817
- }
818
- },
819
-
820
- /*
821
- * left for any backwards compatibility
822
- */
823
- _formatTime: function(time, format) {
824
- time = time || {
825
- hour: this.hour,
826
- minute: this.minute,
827
- second: this.second,
828
- millisec: this.millisec,
829
- ampm: this.ampm,
830
- timezone: this.timezone
831
- };
832
- var tmptime = (format || this._defaults.timeFormat).toString();
833
-
834
- tmptime = $.datepicker.formatTime(tmptime, time, this._defaults);
835
-
836
- if (arguments.length) {
837
- return tmptime;
838
- } else {
839
- this.formattedTime = tmptime;
840
- }
841
- },
842
-
843
- /*
844
- * update our input with the new date time..
845
- */
846
- _updateDateTime: function(dp_inst) {
847
- dp_inst = this.inst || dp_inst;
848
- var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
849
- dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
850
- formatCfg = $.datepicker._getFormatConfig(dp_inst),
851
- timeAvailable = dt !== null && this.timeDefined;
852
- this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
853
- var formattedDateTime = this.formattedDate;
854
-
855
- /*
856
- * remove following lines to force every changes in date picker to change the input value
857
- * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
858
- * If the user manually empty the value in the input field, the date picker will never change selected value.
859
- */
860
- //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
861
- // return;
862
- //}
863
-
864
- if (this._defaults.timeOnly === true) {
865
- formattedDateTime = this.formattedTime;
866
- } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
867
- formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
868
- }
869
-
870
- this.formattedDateTime = formattedDateTime;
871
-
872
- if (!this._defaults.showTimepicker) {
873
- this.$input.val(this.formattedDate);
874
- } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) {
875
- this.$altInput.val(this.formattedTime);
876
- this.$input.val(this.formattedDate);
877
- } else if (this.$altInput) {
878
- this.$input.val(formattedDateTime);
879
- var altFormattedDateTime = '',
880
- altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator,
881
- altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
882
- if (this._defaults.altFormat) altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
883
- else altFormattedDateTime = this.formattedDate;
884
- if (altFormattedDateTime) altFormattedDateTime += altSeparator;
885
- if (this._defaults.altTimeFormat) altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
886
- else altFormattedDateTime += this.formattedTime + altTimeSuffix;
887
- this.$altInput.val(altFormattedDateTime);
888
- } else {
889
- this.$input.val(formattedDateTime);
890
- }
891
-
892
- this.$input.trigger("change");
893
- },
894
-
895
- _onFocus: function() {
896
- if (!this.$input.val() && this._defaults.defaultValue) {
897
- this.$input.val(this._defaults.defaultValue);
898
- var inst = $.datepicker._getInst(this.$input.get(0)),
899
- tp_inst = $.datepicker._get(inst, 'timepicker');
900
- if (tp_inst) {
901
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
902
- try {
903
- $.datepicker._updateDatepicker(inst);
904
- } catch (err) {
905
- $.datepicker.log(err);
906
- }
907
- }
908
- }
909
- }
910
- }
911
-
912
- });
913
-
914
- $.fn.extend({
915
- /*
916
- * shorthand just to use timepicker..
917
- */
918
- timepicker: function(o) {
919
- o = o || {};
920
- var tmp_args = Array.prototype.slice.call(arguments);
921
-
922
- if (typeof o == 'object') {
923
- tmp_args[0] = $.extend(o, {
924
- timeOnly: true
925
- });
926
- }
927
-
928
- return $(this).each(function() {
929
- $.fn.datetimepicker.apply($(this), tmp_args);
930
- });
931
- },
932
-
933
- /*
934
- * extend timepicker to datepicker
935
- */
936
- datetimepicker: function(o) {
937
- o = o || {};
938
- var tmp_args = arguments;
939
-
940
- if (typeof(o) == 'string') {
941
- if (o == 'getDate') {
942
- return $.fn.datepicker.apply($(this[0]), tmp_args);
943
- } else {
944
- return this.each(function() {
945
- var $t = $(this);
946
- $t.datepicker.apply($t, tmp_args);
947
- });
948
- }
949
- } else {
950
- return this.each(function() {
951
- var $t = $(this);
952
- $t.datepicker($.timepicker._newInst($t, o)._defaults);
953
- });
954
- }
955
- }
956
- });
957
-
958
- /*
959
- * Public Utility to parse date and time
960
- */
961
- $.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
962
- var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
963
- if (parseRes.timeObj) {
964
- var t = parseRes.timeObj;
965
- parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
966
- }
967
-
968
- return parseRes.date;
969
- };
970
-
971
- /*
972
- * Public utility to parse time
973
- */
974
- $.datepicker.parseTime = function(timeFormat, timeString, options) {
975
-
976
- // pattern for standard and localized AM/PM markers
977
- var getPatternAmpm = function(amNames, pmNames) {
978
- var markers = [];
979
- if (amNames) {
980
- $.merge(markers, amNames);
981
- }
982
- if (pmNames) {
983
- $.merge(markers, pmNames);
984
- }
985
- markers = $.map(markers, function(val) {
986
- return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
987
- });
988
- return '(' + markers.join('|') + ')?';
989
- };
990
-
991
- // figure out position of time elements.. cause js cant do named captures
992
- var getFormatPositions = function(timeFormat) {
993
- var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z)/g),
994
- orders = {
995
- h: -1,
996
- m: -1,
997
- s: -1,
998
- l: -1,
999
- t: -1,
1000
- z: -1
1001
- };
1002
-
1003
- if (finds) {
1004
- for (var i = 0; i < finds.length; i++) {
1005
- if (orders[finds[i].toString().charAt(0)] == -1) {
1006
- orders[finds[i].toString().charAt(0)] = i + 1;
1007
- }
1008
- }
1009
- }
1010
- return orders;
1011
- };
1012
-
1013
- var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {});
1014
-
1015
- var regstr = '^' + timeFormat.toString()
1016
- .replace(/h{1,2}/ig, '(\\d?\\d)')
1017
- .replace(/m{1,2}/ig, '(\\d?\\d)')
1018
- .replace(/s{1,2}/ig, '(\\d?\\d)')
1019
- .replace(/l{1}/ig, '(\\d?\\d?\\d)')
1020
- .replace(/t{1,2}/ig, getPatternAmpm(o.amNames, o.pmNames))
1021
- .replace(/z{1}/ig, '(z|[-+]\\d\\d:?\\d\\d|\\S+)?')
1022
- .replace(/\s/g, '\\s?') +
1023
- o.timeSuffix + '$',
1024
- order = getFormatPositions(timeFormat),
1025
- ampm = '',
1026
- treg;
1027
-
1028
- treg = timeString.match(new RegExp(regstr, 'i'));
1029
-
1030
- var resTime = {
1031
- hour: 0,
1032
- minute: 0,
1033
- second: 0,
1034
- millisec: 0
1035
- };
1036
-
1037
- if (treg) {
1038
- if (order.t !== -1) {
1039
- if (treg[order.t] === undefined || treg[order.t].length === 0) {
1040
- ampm = '';
1041
- resTime.ampm = '';
1042
- } else {
1043
- ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
1044
- resTime.ampm = o[ampm == 'AM' ? 'amNames' : 'pmNames'][0];
1045
- }
1046
- }
1047
-
1048
- if (order.h !== -1) {
1049
- if (ampm == 'AM' && treg[order.h] == '12') {
1050
- resTime.hour = 0; // 12am = 0 hour
1051
- } else {
1052
- if (ampm == 'PM' && treg[order.h] != '12') {
1053
- resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
1054
- } else {
1055
- resTime.hour = Number(treg[order.h]);
1056
- }
1057
- }
1058
- }
1059
-
1060
- if (order.m !== -1) {
1061
- resTime.minute = Number(treg[order.m]);
1062
- }
1063
- if (order.s !== -1) {
1064
- resTime.second = Number(treg[order.s]);
1065
- }
1066
- if (order.l !== -1) {
1067
- resTime.millisec = Number(treg[order.l]);
1068
- }
1069
- if (order.z !== -1 && treg[order.z] !== undefined) {
1070
- var tz = treg[order.z].toUpperCase();
1071
- switch (tz.length) {
1072
- case 1:
1073
- // Z
1074
- tz = o.timezoneIso8601 ? 'Z' : '+0000';
1075
- break;
1076
- case 5:
1077
- // +hhmm
1078
- if (o.timezoneIso8601) {
1079
- tz = tz.substring(1) == '0000' ? 'Z' : tz.substring(0, 3) + ':' + tz.substring(3);
1080
- }
1081
- break;
1082
- case 6:
1083
- // +hh:mm
1084
- if (!o.timezoneIso8601) {
1085
- tz = tz == 'Z' || tz.substring(1) == '00:00' ? '+0000' : tz.replace(/:/, '');
1086
- } else {
1087
- if (tz.substring(1) == '00:00') {
1088
- tz = 'Z';
1089
- }
1090
- }
1091
- break;
1092
- }
1093
- resTime.timezone = tz;
1094
- }
1095
-
1096
-
1097
- return resTime;
1098
- }
1099
-
1100
- return false;
1101
- };
1102
-
1103
- /*
1104
- * Public utility to format the time
1105
- * format = string format of the time
1106
- * time = a {}, not a Date() for timezones
1107
- * options = essentially the regional[].. amNames, pmNames, ampm
1108
- */
1109
- $.datepicker.formatTime = function(format, time, options) {
1110
- options = options || {};
1111
- options = $.extend({}, $.timepicker._defaults, options);
1112
- time = $.extend({
1113
- hour: 0,
1114
- minute: 0,
1115
- second: 0,
1116
- millisec: 0,
1117
- timezone: '+0000'
1118
- }, time);
1119
-
1120
- var tmptime = format;
1121
- var ampmName = options.amNames[0];
1122
-
1123
- var hour = parseInt(time.hour, 10);
1124
- if (options.ampm) {
1125
- if (hour > 11) {
1126
- ampmName = options.pmNames[0];
1127
- if (hour > 12) {
1128
- hour = hour % 12;
1129
- }
1130
- }
1131
- if (hour === 0) {
1132
- hour = 12;
1133
- }
1134
- }
1135
- tmptime = tmptime.replace(/(?:hh?|mm?|ss?|[tT]{1,2}|[lz]|('.*?'|".*?"))/g, function(match) {
1136
- switch (match.toLowerCase()) {
1137
- case 'hh':
1138
- return ('0' + hour).slice(-2);
1139
- case 'h':
1140
- return hour;
1141
- case 'mm':
1142
- return ('0' + time.minute).slice(-2);
1143
- case 'm':
1144
- return time.minute;
1145
- case 'ss':
1146
- return ('0' + time.second).slice(-2);
1147
- case 's':
1148
- return time.second;
1149
- case 'l':
1150
- return ('00' + time.millisec).slice(-3);
1151
- case 'z':
1152
- return time.timezone === null? options.defaultTimezone : time.timezone;
1153
- case 't':
1154
- case 'tt':
1155
- if (options.ampm) {
1156
- if (match.length == 1) {
1157
- ampmName = ampmName.charAt(0);
1158
- }
1159
- return match.charAt(0) === 'T' ? ampmName.toUpperCase() : ampmName.toLowerCase();
1160
- }
1161
- return '';
1162
- default:
1163
- return match.replace(/\'/g, "") || "'";
1164
- }
1165
- });
1166
-
1167
- tmptime = $.trim(tmptime);
1168
- return tmptime;
1169
- };
1170
-
1171
- /*
1172
- * the bad hack :/ override datepicker so it doesnt close on select
1173
- // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
1174
- */
1175
- $.datepicker._base_selectDate = $.datepicker._selectDate;
1176
- $.datepicker._selectDate = function(id, dateStr) {
1177
- var inst = this._getInst($(id)[0]),
1178
- tp_inst = this._get(inst, 'timepicker');
1179
-
1180
- if (tp_inst) {
1181
- tp_inst._limitMinMaxDateTime(inst, true);
1182
- inst.inline = inst.stay_open = true;
1183
- //This way the onSelect handler called from calendarpicker get the full dateTime
1184
- this._base_selectDate(id, dateStr);
1185
- inst.inline = inst.stay_open = false;
1186
- this._notifyChange(inst);
1187
- this._updateDatepicker(inst);
1188
- } else {
1189
- this._base_selectDate(id, dateStr);
1190
- }
1191
- };
1192
-
1193
- /*
1194
- * second bad hack :/ override datepicker so it triggers an event when changing the input field
1195
- * and does not redraw the datepicker on every selectDate event
1196
- */
1197
- $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
1198
- $.datepicker._updateDatepicker = function(inst) {
1199
-
1200
- // don't popup the datepicker if there is another instance already opened
1201
- var input = inst.input[0];
1202
- if ($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) {
1203
- return;
1204
- }
1205
-
1206
- if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
1207
-
1208
- this._base_updateDatepicker(inst);
1209
-
1210
- // Reload the time control when changing something in the input text field.
1211
- var tp_inst = this._get(inst, 'timepicker');
1212
- if (tp_inst) {
1213
- tp_inst._addTimePicker(inst);
1214
-
1215
- if (tp_inst._defaults.useLocalTimezone) { //checks daylight saving with the new date.
1216
- var date = new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 12);
1217
- selectLocalTimeZone(tp_inst, date);
1218
- tp_inst._onTimeChange();
1219
- }
1220
- }
1221
- }
1222
- };
1223
-
1224
- /*
1225
- * third bad hack :/ override datepicker so it allows spaces and colon in the input field
1226
- */
1227
- $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
1228
- $.datepicker._doKeyPress = function(event) {
1229
- var inst = $.datepicker._getInst(event.target),
1230
- tp_inst = $.datepicker._get(inst, 'timepicker');
1231
-
1232
- if (tp_inst) {
1233
- if ($.datepicker._get(inst, 'constrainInput')) {
1234
- var ampm = tp_inst._defaults.ampm,
1235
- dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
1236
- datetimeChars = tp_inst._defaults.timeFormat.toString()
1237
- .replace(/[hms]/g, '')
1238
- .replace(/TT/g, ampm ? 'APM' : '')
1239
- .replace(/Tt/g, ampm ? 'AaPpMm' : '')
1240
- .replace(/tT/g, ampm ? 'AaPpMm' : '')
1241
- .replace(/T/g, ampm ? 'AP' : '')
1242
- .replace(/tt/g, ampm ? 'apm' : '')
1243
- .replace(/t/g, ampm ? 'ap' : '') +
1244
- " " + tp_inst._defaults.separator +
1245
- tp_inst._defaults.timeSuffix +
1246
- (tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') +
1247
- (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
1248
- dateChars,
1249
- chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
1250
- return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
1251
- }
1252
- }
1253
-
1254
- return $.datepicker._base_doKeyPress(event);
1255
- };
1256
-
1257
- /*
1258
- * Override key up event to sync manual input changes.
1259
- */
1260
- $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
1261
- $.datepicker._doKeyUp = function(event) {
1262
- var inst = $.datepicker._getInst(event.target),
1263
- tp_inst = $.datepicker._get(inst, 'timepicker');
1264
-
1265
- if (tp_inst) {
1266
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
1267
- try {
1268
- $.datepicker._updateDatepicker(inst);
1269
- } catch (err) {
1270
- $.datepicker.log(err);
1271
- }
1272
- }
1273
- }
1274
-
1275
- return $.datepicker._base_doKeyUp(event);
1276
- };
1277
-
1278
- /*
1279
- * override "Today" button to also grab the time.
1280
- */
1281
- $.datepicker._base_gotoToday = $.datepicker._gotoToday;
1282
- $.datepicker._gotoToday = function(id) {
1283
- var inst = this._getInst($(id)[0]),
1284
- $dp = inst.dpDiv;
1285
- this._base_gotoToday(id);
1286
- var tp_inst = this._get(inst, 'timepicker');
1287
- selectLocalTimeZone(tp_inst);
1288
- var now = new Date();
1289
- this._setTime(inst, now);
1290
- $('.ui-datepicker-today', $dp).click();
1291
- };
1292
-
1293
- /*
1294
- * Disable & enable the Time in the datetimepicker
1295
- */
1296
- $.datepicker._disableTimepickerDatepicker = function(target) {
1297
- var inst = this._getInst(target);
1298
- if (!inst) {
1299
- return;
1300
- }
1301
-
1302
- var tp_inst = this._get(inst, 'timepicker');
1303
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
1304
- if (tp_inst) {
1305
- tp_inst._defaults.showTimepicker = false;
1306
- tp_inst._updateDateTime(inst);
1307
- }
1308
- };
1309
-
1310
- $.datepicker._enableTimepickerDatepicker = function(target) {
1311
- var inst = this._getInst(target);
1312
- if (!inst) {
1313
- return;
1314
- }
1315
-
1316
- var tp_inst = this._get(inst, 'timepicker');
1317
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
1318
- if (tp_inst) {
1319
- tp_inst._defaults.showTimepicker = true;
1320
- tp_inst._addTimePicker(inst); // Could be disabled on page load
1321
- tp_inst._updateDateTime(inst);
1322
- }
1323
- };
1324
-
1325
- /*
1326
- * Create our own set time function
1327
- */
1328
- $.datepicker._setTime = function(inst, date) {
1329
- var tp_inst = this._get(inst, 'timepicker');
1330
- if (tp_inst) {
1331
- var defaults = tp_inst._defaults;
1332
-
1333
- // calling _setTime with no date sets time to defaults
1334
- tp_inst.hour = date ? date.getHours() : defaults.hour;
1335
- tp_inst.minute = date ? date.getMinutes() : defaults.minute;
1336
- tp_inst.second = date ? date.getSeconds() : defaults.second;
1337
- tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
1338
-
1339
- //check if within min/max times..
1340
- tp_inst._limitMinMaxDateTime(inst, true);
1341
-
1342
- tp_inst._onTimeChange();
1343
- tp_inst._updateDateTime(inst);
1344
- }
1345
- };
1346
-
1347
- /*
1348
- * Create new public method to set only time, callable as $().datepicker('setTime', date)
1349
- */
1350
- $.datepicker._setTimeDatepicker = function(target, date, withDate) {
1351
- var inst = this._getInst(target);
1352
- if (!inst) {
1353
- return;
1354
- }
1355
-
1356
- var tp_inst = this._get(inst, 'timepicker');
1357
-
1358
- if (tp_inst) {
1359
- this._setDateFromField(inst);
1360
- var tp_date;
1361
- if (date) {
1362
- if (typeof date == "string") {
1363
- tp_inst._parseTime(date, withDate);
1364
- tp_date = new Date();
1365
- tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
1366
- } else {
1367
- tp_date = new Date(date.getTime());
1368
- }
1369
- if (tp_date.toString() == 'Invalid Date') {
1370
- tp_date = undefined;
1371
- }
1372
- this._setTime(inst, tp_date);
1373
- }
1374
- }
1375
-
1376
- };
1377
-
1378
- /*
1379
- * override setDate() to allow setting time too within Date object
1380
- */
1381
- $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
1382
- $.datepicker._setDateDatepicker = function(target, date) {
1383
- var inst = this._getInst(target);
1384
- if (!inst) {
1385
- return;
1386
- }
1387
-
1388
- var tp_date = (date instanceof Date) ? new Date(date.getTime()) : date;
1389
-
1390
- this._updateDatepicker(inst);
1391
- this._base_setDateDatepicker.apply(this, arguments);
1392
- this._setTimeDatepicker(target, tp_date, true);
1393
- };
1394
-
1395
- /*
1396
- * override getDate() to allow getting time too within Date object
1397
- */
1398
- $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
1399
- $.datepicker._getDateDatepicker = function(target, noDefault) {
1400
- var inst = this._getInst(target);
1401
- if (!inst) {
1402
- return;
1403
- }
1404
-
1405
- var tp_inst = this._get(inst, 'timepicker');
1406
-
1407
- if (tp_inst) {
1408
- // if it hasn't yet been defined, grab from field
1409
- if(inst.lastVal === undefined){
1410
- this._setDateFromField(inst, noDefault);
1411
- }
1412
-
1413
- var date = this._getDate(inst);
1414
- if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) {
1415
- date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
1416
- }
1417
- return date;
1418
- }
1419
- return this._base_getDateDatepicker(target, noDefault);
1420
- };
1421
-
1422
- /*
1423
- * override parseDate() because UI 1.8.14 throws an error about "Extra characters"
1424
- * An option in datapicker to ignore extra format characters would be nicer.
1425
- */
1426
- $.datepicker._base_parseDate = $.datepicker.parseDate;
1427
- $.datepicker.parseDate = function(format, value, settings) {
1428
- var date;
1429
- try {
1430
- date = this._base_parseDate(format, value, settings);
1431
- } catch (err) {
1432
- // Hack! The error message ends with a colon, a space, and
1433
- // the "extra" characters. We rely on that instead of
1434
- // attempting to perfectly reproduce the parsing algorithm.
1435
- date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
1436
- }
1437
- return date;
1438
- };
1439
-
1440
- /*
1441
- * override formatDate to set date with time to the input
1442
- */
1443
- $.datepicker._base_formatDate = $.datepicker._formatDate;
1444
- $.datepicker._formatDate = function(inst, day, month, year) {
1445
- var tp_inst = this._get(inst, 'timepicker');
1446
- if (tp_inst) {
1447
- tp_inst._updateDateTime(inst);
1448
- return tp_inst.$input.val();
1449
- }
1450
- return this._base_formatDate(inst);
1451
- };
1452
-
1453
- /*
1454
- * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate
1455
- */
1456
- $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
1457
- $.datepicker._optionDatepicker = function(target, name, value) {
1458
- var inst = this._getInst(target);
1459
- if (!inst) {
1460
- return null;
1461
- }
1462
-
1463
- var tp_inst = this._get(inst, 'timepicker');
1464
- if (tp_inst) {
1465
- var min = null,
1466
- max = null,
1467
- onselect = null;
1468
- if (typeof name == 'string') { // if min/max was set with the string
1469
- if (name === 'minDate' || name === 'minDateTime') {
1470
- min = value;
1471
- } else {
1472
- if (name === 'maxDate' || name === 'maxDateTime') {
1473
- max = value;
1474
- } else {
1475
- if (name === 'onSelect') {
1476
- onselect = value;
1477
- }
1478
- }
1479
- }
1480
- } else {
1481
- if (typeof name == 'object') { //if min/max was set with the JSON
1482
- if (name.minDate) {
1483
- min = name.minDate;
1484
- } else {
1485
- if (name.minDateTime) {
1486
- min = name.minDateTime;
1487
- } else {
1488
- if (name.maxDate) {
1489
- max = name.maxDate;
1490
- } else {
1491
- if (name.maxDateTime) {
1492
- max = name.maxDateTime;
1493
- }
1494
- }
1495
- }
1496
- }
1497
- }
1498
- }
1499
- if (min) { //if min was set
1500
- if (min === 0) {
1501
- min = new Date();
1502
- } else {
1503
- min = new Date(min);
1504
- }
1505
-
1506
- tp_inst._defaults.minDate = min;
1507
- tp_inst._defaults.minDateTime = min;
1508
- } else if (max) { //if max was set
1509
- if (max === 0) {
1510
- max = new Date();
1511
- } else {
1512
- max = new Date(max);
1513
- }
1514
- tp_inst._defaults.maxDate = max;
1515
- tp_inst._defaults.maxDateTime = max;
1516
- } else if (onselect) {
1517
- tp_inst._defaults.onSelect = onselect;
1518
- }
1519
- }
1520
- if (value === undefined) {
1521
- return this._base_optionDatepicker(target, name);
1522
- }
1523
- return this._base_optionDatepicker(target, name, value);
1524
- };
1525
-
1526
- /*
1527
- * jQuery extend now ignores nulls!
1528
- */
1529
- function extendRemove(target, props) {
1530
- $.extend(target, props);
1531
- for (var name in props) {
1532
- if (props[name] === null || props[name] === undefined) {
1533
- target[name] = props[name];
1534
- }
1535
- }
1536
- return target;
1537
- }
1538
-
1539
- /*
1540
- * Splits datetime string into date ans time substrings.
1541
- * Throws exception when date can't be parsed
1542
- * Returns [dateString, timeString]
1543
- */
1544
- var splitDateTime = function(dateFormat, dateTimeString, dateSettings, timeSettings) {
1545
- try {
1546
- // The idea is to get the number separator occurances in datetime and the time format requested (since time has
1547
- // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
1548
- var separator = timeSettings && timeSettings.separator ? timeSettings.separator : $.timepicker._defaults.separator,
1549
- format = timeSettings && timeSettings.timeFormat ? timeSettings.timeFormat : $.timepicker._defaults.timeFormat,
1550
- ampm = timeSettings && timeSettings.ampm ? timeSettings.ampm : $.timepicker._defaults.ampm,
1551
- timeParts = format.split(separator), // how many occurances of separator may be in our format?
1552
- timePartsLen = timeParts.length,
1553
- allParts = dateTimeString.split(separator),
1554
- allPartsLen = allParts.length;
1555
-
1556
- // because our default ampm=false, but our default format has tt, we need to filter this out
1557
- if(!ampm){
1558
- timeParts = $.trim(format.replace(/t/gi,'')).split(separator);
1559
- timePartsLen = timeParts.length;
1560
- }
1561
-
1562
- if (allPartsLen > 1) {
1563
- return [
1564
- allParts.splice(0,allPartsLen-timePartsLen).join(separator),
1565
- allParts.splice(0,timePartsLen).join(separator)
1566
- ];
1567
- }
1568
-
1569
- } catch (err) {
1570
- if (err.indexOf(":") >= 0) {
1571
- // Hack! The error message ends with a colon, a space, and
1572
- // the "extra" characters. We rely on that instead of
1573
- // attempting to perfectly reproduce the parsing algorithm.
1574
- var dateStringLength = dateTimeString.length - (err.length - err.indexOf(':') - 2),
1575
- timeString = dateTimeString.substring(dateStringLength);
1576
-
1577
- return [$.trim(dateTimeString.substring(0, dateStringLength)), $.trim(dateTimeString.substring(dateStringLength))];
1578
-
1579
- } else {
1580
- throw err;
1581
- }
1582
- }
1583
- return [dateTimeString, ''];
1584
- };
1585
-
1586
- /*
1587
- * Internal function to parse datetime interval
1588
- * Returns: {date: Date, timeObj: Object}, where
1589
- * date - parsed date without time (type Date)
1590
- * timeObj = {hour: , minute: , second: , millisec: } - parsed time. Optional
1591
- */
1592
- var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
1593
- var date;
1594
- var splitRes = splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings);
1595
- date = $.datepicker._base_parseDate(dateFormat, splitRes[0], dateSettings);
1596
- if (splitRes[1] !== '') {
1597
- var timeString = splitRes[1],
1598
- parsedTime = $.datepicker.parseTime(timeFormat, timeString, timeSettings);
1599
-
1600
- if (parsedTime === null) {
1601
- throw 'Wrong time format';
1602
- }
1603
- return {
1604
- date: date,
1605
- timeObj: parsedTime
1606
- };
1607
- } else {
1608
- return {
1609
- date: date
1610
- };
1611
- }
1612
- };
1613
-
1614
- /*
1615
- * Internal function to set timezone_select to the local timezone
1616
- */
1617
- var selectLocalTimeZone = function(tp_inst, date) {
1618
- if (tp_inst && tp_inst.timezone_select) {
1619
- tp_inst._defaults.useLocalTimezone = true;
1620
- var now = typeof date !== 'undefined' ? date : new Date();
1621
- var tzoffset = $.timepicker.timeZoneOffsetString(now);
1622
- if (tp_inst._defaults.timezoneIso8601) {
1623
- tzoffset = tzoffset.substring(0, 3) + ':' + tzoffset.substring(3);
1624
- }
1625
- tp_inst.timezone_select.val(tzoffset);
1626
- }
1627
- };
1628
-
1629
- /*
1630
- * Create a Singleton Insance
1631
- */
1632
- $.timepicker = new Timepicker();
1633
-
1634
- /**
1635
- * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)
1636
- * @param date
1637
- * @return string
1638
- */
1639
- $.timepicker.timeZoneOffsetString = function(date) {
1640
- var off = date.getTimezoneOffset() * -1,
1641
- minutes = off % 60,
1642
- hours = (off - minutes) / 60;
1643
- return (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).substr(-2) + ('0' + (minutes * 101).toString()).substr(-2);
1644
- };
1645
-
1646
- /**
1647
- * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to
1648
- * enforce date range limits.
1649
- * n.b. The input value must be correctly formatted (reformatting is not supported)
1650
- * @param Element startTime
1651
- * @param Element endTime
1652
- * @param obj options Options for the timepicker() call
1653
- * @return jQuery
1654
- */
1655
- $.timepicker.timeRange = function(startTime, endTime, options) {
1656
- return $.timepicker.handleRange('timepicker', startTime, endTime, options);
1657
- };
1658
-
1659
- /**
1660
- * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to
1661
- * enforce date range limits.
1662
- * @param Element startTime
1663
- * @param Element endTime
1664
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
1665
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
1666
- * @param string method Can be used to specify the type of picker to be added
1667
- * @return jQuery
1668
- */
1669
- $.timepicker.dateTimeRange = function(startTime, endTime, options) {
1670
- $.timepicker.dateRange(startTime, endTime, options, 'datetimepicker');
1671
- };
1672
-
1673
- /**
1674
- * Calls `method` on the `startTime` and `endTime` elements, and configures them to
1675
- * enforce date range limits.
1676
- * @param Element startTime
1677
- * @param Element endTime
1678
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
1679
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
1680
- * @param string method Can be used to specify the type of picker to be added
1681
- * @return jQuery
1682
- */
1683
- $.timepicker.dateRange = function(startTime, endTime, options, method) {
1684
- method = method || 'datepicker';
1685
- $.timepicker.handleRange(method, startTime, endTime, options);
1686
- };
1687
-
1688
- /**
1689
- * Calls `method` on the `startTime` and `endTime` elements, and configures them to
1690
- * enforce date range limits.
1691
- * @param string method Can be used to specify the type of picker to be added
1692
- * @param Element startTime
1693
- * @param Element endTime
1694
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
1695
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
1696
- * @return jQuery
1697
- */
1698
- $.timepicker.handleRange = function(method, startTime, endTime, options) {
1699
- $.fn[method].call(startTime, $.extend({
1700
- onClose: function(dateText, inst) {
1701
- checkDates(this, endTime, dateText);
1702
- },
1703
- onSelect: function(selectedDateTime) {
1704
- selected(this, endTime, 'minDate');
1705
- }
1706
- }, options, options.start));
1707
- $.fn[method].call(endTime, $.extend({
1708
- onClose: function(dateText, inst) {
1709
- checkDates(this, startTime, dateText);
1710
- },
1711
- onSelect: function(selectedDateTime) {
1712
- selected(this, startTime, 'maxDate');
1713
- }
1714
- }, options, options.end));
1715
- // timepicker doesn't provide access to its 'timeFormat' option,
1716
- // nor could I get datepicker.formatTime() to behave with times, so I
1717
- // have disabled reformatting for timepicker
1718
- if (method != 'timepicker' && options.reformat) {
1719
- $([startTime, endTime]).each(function() {
1720
- var format = $(this)[method].call($(this), 'option', 'dateFormat'),
1721
- date = new Date($(this).val());
1722
- if ($(this).val() && date) {
1723
- $(this).val($.datepicker.formatDate(format, date));
1724
- }
1725
- });
1726
- }
1727
- checkDates(startTime, endTime, startTime.val());
1728
-
1729
- function checkDates(changed, other, dateText) {
1730
- if (other.val() && (new Date(startTime.val()) > new Date(endTime.val()))) {
1731
- other.val(dateText);
1732
- }
1733
- }
1734
- selected(startTime, endTime, 'minDate');
1735
- selected(endTime, startTime, 'maxDate');
1736
-
1737
- function selected(changed, other, option) {
1738
- if (!$(changed).val()) {
1739
- return;
1740
- }
1741
- var date = $(changed)[method].call($(changed), 'getDate');
1742
- // timepicker doesn't implement 'getDate' and returns a jQuery
1743
- if (date.getTime) {
1744
- $(other)[method].call($(other), 'option', option, date);
1745
- }
1746
- }
1747
- return $([startTime.get(0), endTime.get(0)]);
1748
- };
1749
-
1750
- /*
1751
- * Keep up with the version
1752
- */
1753
- $.timepicker.version = "1.0.4";
1754
-
1755
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/js/jquery-ui-timepicker.js DELETED
@@ -1,2103 +0,0 @@
1
- /*
2
- * jQuery timepicker addon
3
- * By: Trent Richardson [http://trentrichardson.com]
4
- * Version 1.3
5
- * Last Modified: 05/05/2013
6
- *
7
- * Copyright 2013 Trent Richardson
8
- * You may use this project under MIT or GPL licenses.
9
- * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
10
- * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
11
- */
12
-
13
- /*jslint evil: true, white: false, undef: false, nomen: false */
14
-
15
- (function($) {
16
-
17
- /*
18
- * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
19
- */
20
- $.ui.timepicker = $.ui.timepicker || {};
21
- if ($.ui.timepicker.version) {
22
- return;
23
- }
24
-
25
- /*
26
- * Extend jQueryUI, get it started with our version number
27
- */
28
- $.extend($.ui, {
29
- timepicker: {
30
- version: "1.3"
31
- }
32
- });
33
-
34
- /*
35
- * Timepicker manager.
36
- * Use the singleton instance of this class, $.timepicker, to interact with the time picker.
37
- * Settings for (groups of) time pickers are maintained in an instance object,
38
- * allowing multiple different settings on the same page.
39
- */
40
- var Timepicker = function() {
41
- this.regional = []; // Available regional settings, indexed by language code
42
- this.regional[''] = { // Default regional settings
43
- currentText: 'Now',
44
- closeText: 'Done',
45
- amNames: ['AM', 'A'],
46
- pmNames: ['PM', 'P'],
47
- timeFormat: 'HH:mm',
48
- timeSuffix: '',
49
- timeOnlyTitle: 'Choose Time',
50
- timeText: 'Time',
51
- hourText: 'Hour',
52
- minuteText: 'Minute',
53
- secondText: 'Second',
54
- millisecText: 'Millisecond',
55
- microsecText: 'Microsecond',
56
- timezoneText: 'Time Zone',
57
- isRTL: false
58
- };
59
- this._defaults = { // Global defaults for all the datetime picker instances
60
- showButtonPanel: true,
61
- timeOnly: false,
62
- showHour: null,
63
- showMinute: null,
64
- showSecond: null,
65
- showMillisec: null,
66
- showMicrosec: null,
67
- showTimezone: null,
68
- showTime: true,
69
- stepHour: 1,
70
- stepMinute: 1,
71
- stepSecond: 1,
72
- stepMillisec: 1,
73
- stepMicrosec: 1,
74
- hour: 0,
75
- minute: 0,
76
- second: 0,
77
- millisec: 0,
78
- microsec: 0,
79
- timezone: null,
80
- hourMin: 0,
81
- minuteMin: 0,
82
- secondMin: 0,
83
- millisecMin: 0,
84
- microsecMin: 0,
85
- hourMax: 23,
86
- minuteMax: 59,
87
- secondMax: 59,
88
- millisecMax: 999,
89
- microsecMax: 999,
90
- minDateTime: null,
91
- maxDateTime: null,
92
- onSelect: null,
93
- hourGrid: 0,
94
- minuteGrid: 0,
95
- secondGrid: 0,
96
- millisecGrid: 0,
97
- microsecGrid: 0,
98
- alwaysSetTime: true,
99
- separator: ' ',
100
- altFieldTimeOnly: true,
101
- altTimeFormat: null,
102
- altSeparator: null,
103
- altTimeSuffix: null,
104
- pickerTimeFormat: null,
105
- pickerTimeSuffix: null,
106
- showTimepicker: true,
107
- timezoneList: null,
108
- addSliderAccess: false,
109
- sliderAccessArgs: null,
110
- controlType: 'slider',
111
- defaultValue: null,
112
- parse: 'strict'
113
- };
114
- $.extend(this._defaults, this.regional['']);
115
- };
116
-
117
- $.extend(Timepicker.prototype, {
118
- $input: null,
119
- $altInput: null,
120
- $timeObj: null,
121
- inst: null,
122
- hour_slider: null,
123
- minute_slider: null,
124
- second_slider: null,
125
- millisec_slider: null,
126
- microsec_slider: null,
127
- timezone_select: null,
128
- hour: 0,
129
- minute: 0,
130
- second: 0,
131
- millisec: 0,
132
- microsec: 0,
133
- timezone: null,
134
- hourMinOriginal: null,
135
- minuteMinOriginal: null,
136
- secondMinOriginal: null,
137
- millisecMinOriginal: null,
138
- microsecMinOriginal: null,
139
- hourMaxOriginal: null,
140
- minuteMaxOriginal: null,
141
- secondMaxOriginal: null,
142
- millisecMaxOriginal: null,
143
- microsecMaxOriginal: null,
144
- ampm: '',
145
- formattedDate: '',
146
- formattedTime: '',
147
- formattedDateTime: '',
148
- timezoneList: null,
149
- units: ['hour','minute','second','millisec', 'microsec'],
150
- support: {},
151
- control: null,
152
-
153
- /*
154
- * Override the default settings for all instances of the time picker.
155
- * @param settings object - the new settings to use as defaults (anonymous object)
156
- * @return the manager object
157
- */
158
- setDefaults: function(settings) {
159
- extendRemove(this._defaults, settings || {});
160
- return this;
161
- },
162
-
163
- /*
164
- * Create a new Timepicker instance
165
- */
166
- _newInst: function($input, o) {
167
- var tp_inst = new Timepicker(),
168
- inlineSettings = {},
169
- fns = {},
170
- overrides, i;
171
-
172
- for (var attrName in this._defaults) {
173
- if(this._defaults.hasOwnProperty(attrName)){
174
- var attrValue = $input.attr('time:' + attrName);
175
- if (attrValue) {
176
- try {
177
- inlineSettings[attrName] = eval(attrValue);
178
- } catch (err) {
179
- inlineSettings[attrName] = attrValue;
180
- }
181
- }
182
- }
183
- }
184
-
185
- overrides = {
186
- beforeShow: function (input, dp_inst) {
187
- if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
188
- return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);
189
- }
190
- },
191
- onChangeMonthYear: function (year, month, dp_inst) {
192
- // Update the time as well : this prevents the time from disappearing from the $input field.
193
- tp_inst._updateDateTime(dp_inst);
194
- if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
195
- tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
196
- }
197
- },
198
- onClose: function (dateText, dp_inst) {
199
- if (tp_inst.timeDefined === true && $input.val() !== '') {
200
- tp_inst._updateDateTime(dp_inst);
201
- }
202
- if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
203
- tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);
204
- }
205
- }
206
- };
207
- for (i in overrides) {
208
- if (overrides.hasOwnProperty(i)) {
209
- fns[i] = o[i] || null;
210
- }
211
- }
212
-
213
- tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, overrides, {
214
- evnts:fns,
215
- timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
216
- });
217
- tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) {
218
- return val.toUpperCase();
219
- });
220
- tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) {
221
- return val.toUpperCase();
222
- });
223
-
224
- // detect which units are supported
225
- tp_inst.support = detectSupport(
226
- tp_inst._defaults.timeFormat +
227
- (tp_inst._defaults.pickerTimeFormat? tp_inst._defaults.pickerTimeFormat:'') +
228
- (tp_inst._defaults.altTimeFormat? tp_inst._defaults.altTimeFormat:''));
229
-
230
- // controlType is string - key to our this._controls
231
- if(typeof(tp_inst._defaults.controlType) === 'string'){
232
- if(tp_inst._defaults.controlType == 'slider' && typeof(jQuery.ui.slider) === 'undefined'){
233
- tp_inst._defaults.controlType = 'select';
234
- }
235
- tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
236
- }
237
- // controlType is an object and must implement create, options, value methods
238
- else{
239
- tp_inst.control = tp_inst._defaults.controlType;
240
- }
241
-
242
- // prep the timezone options
243
- var timezoneList = [-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,
244
- 0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];
245
- if (tp_inst._defaults.timezoneList !== null) {
246
- timezoneList = tp_inst._defaults.timezoneList;
247
- }
248
- var tzl=timezoneList.length,tzi=0,tzv=null;
249
- if (tzl > 0 && typeof timezoneList[0] !== 'object') {
250
- for(; tzi<tzl; tzi++){
251
- tzv = timezoneList[tzi];
252
- timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };
253
- }
254
- }
255
- tp_inst._defaults.timezoneList = timezoneList;
256
-
257
- // set the default units
258
- tp_inst.timezone = tp_inst._defaults.timezone !== null? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :
259
- ((new Date()).getTimezoneOffset()*-1);
260
- tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin? tp_inst._defaults.hourMin :
261
- tp_inst._defaults.hour > tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
262
- tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin :
263
- tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
264
- tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin :
265
- tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second;
266
- tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin :
267
- tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
268
- tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin? tp_inst._defaults.microsecMin :
269
- tp_inst._defaults.microsec > tp_inst._defaults.microsecMax? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
270
- tp_inst.ampm = '';
271
- tp_inst.$input = $input;
272
-
273
- if (o.altField) {
274
- tp_inst.$altInput = $(o.altField).css({
275
- cursor: 'pointer'
276
- }).focus(function() {
277
- $input.trigger("focus");
278
- });
279
- }
280
-
281
- if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
282
- tp_inst._defaults.minDate = new Date();
283
- }
284
- if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
285
- tp_inst._defaults.maxDate = new Date();
286
- }
287
-
288
- // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
289
- if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {
290
- tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
291
- }
292
- if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
293
- tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
294
- }
295
- if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
296
- tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
297
- }
298
- if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
299
- tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
300
- }
301
- tp_inst.$input.bind('focus', function() {
302
- tp_inst._onFocus();
303
- });
304
-
305
- return tp_inst;
306
- },
307
-
308
- /*
309
- * add our sliders to the calendar
310
- */
311
- _addTimePicker: function(dp_inst) {
312
- var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
313
-
314
- this.timeDefined = this._parseTime(currDT);
315
- this._limitMinMaxDateTime(dp_inst, false);
316
- this._injectTimePicker();
317
- },
318
-
319
- /*
320
- * parse the time string from input value or _setTime
321
- */
322
- _parseTime: function(timeString, withDate) {
323
- if (!this.inst) {
324
- this.inst = $.datepicker._getInst(this.$input[0]);
325
- }
326
-
327
- if (withDate || !this._defaults.timeOnly) {
328
- var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
329
- try {
330
- var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);
331
- if (!parseRes.timeObj) {
332
- return false;
333
- }
334
- $.extend(this, parseRes.timeObj);
335
- } catch (err) {
336
- $.timepicker.log("Error parsing the date/time string: " + err +
337
- "\ndate/time string = " + timeString +
338
- "\ntimeFormat = " + this._defaults.timeFormat +
339
- "\ndateFormat = " + dp_dateFormat);
340
- return false;
341
- }
342
- return true;
343
- } else {
344
- var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);
345
- if (!timeObj) {
346
- return false;
347
- }
348
- $.extend(this, timeObj);
349
- return true;
350
- }
351
- },
352
-
353
- /*
354
- * generate and inject html for timepicker into ui datepicker
355
- */
356
- _injectTimePicker: function() {
357
- var $dp = this.inst.dpDiv,
358
- o = this.inst.settings,
359
- tp_inst = this,
360
- litem = '',
361
- uitem = '',
362
- show = null,
363
- max = {},
364
- gridSize = {},
365
- size = null,
366
- i=0,
367
- l=0;
368
-
369
- // Prevent displaying twice
370
- if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
371
- var noDisplay = ' style="display:none;"',
372
- html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
373
- '<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
374
-
375
- // Create the markup
376
- for(i=0,l=this.units.length; i<l; i++){
377
- litem = this.units[i];
378
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
379
- show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
380
-
381
- // Added by Peter Medeiros:
382
- // - Figure out what the hour/minute/second max should be based on the step values.
383
- // - Example: if stepMinute is 15, then minMax is 45.
384
- max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
385
- gridSize[litem] = 0;
386
-
387
- html += '<dt class="ui_tpicker_'+ litem +'_label"' + (show ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
388
- '<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + (show ? '' : noDisplay) + '></div>';
389
-
390
- if (show && o[litem+'Grid'] > 0) {
391
- html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
392
-
393
- if(litem == 'hour'){
394
- for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
395
- gridSize[litem]++;
396
- var tmph = $.datepicker.formatTime(this.support.ampm? 'hht':'HH', {hour:h}, o);
397
- html += '<td data-for="'+litem+'">' + tmph + '</td>';
398
- }
399
- }
400
- else{
401
- for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) {
402
- gridSize[litem]++;
403
- html += '<td data-for="'+litem+'">' + ((m < 10) ? '0' : '') + m + '</td>';
404
- }
405
- }
406
-
407
- html += '</tr></table></div>';
408
- }
409
- html += '</dd>';
410
- }
411
-
412
- // Timezone
413
- var showTz = o.showTimezone !== null? o.showTimezone : this.support.timezone;
414
- html += '<dt class="ui_tpicker_timezone_label"' + (showTz ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
415
- html += '<dd class="ui_tpicker_timezone" ' + (showTz ? '' : noDisplay) + '></dd>';
416
-
417
- // Create the elements from string
418
- html += '</dl></div>';
419
- var $tp = $(html);
420
-
421
- // if we only want time picker...
422
- if (o.timeOnly === true) {
423
- $tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
424
- $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
425
- }
426
-
427
- // add sliders, adjust grids, add events
428
- for(i=0,l=tp_inst.units.length; i<l; i++){
429
- litem = tp_inst.units[i];
430
- uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
431
- show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
432
-
433
- // add the slider
434
- tp_inst[litem+'_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_'+litem+'_slider'), litem, tp_inst[litem], o[litem+'Min'], max[litem], o['step'+uitem]);
435
-
436
- // adjust the grid and add click event
437
- if (show && o[litem+'Grid'] > 0) {
438
- size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']);
439
- $tp.find('.ui_tpicker_'+litem+' table').css({
440
- width: size + "%",
441
- marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"),
442
- marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0',
443
- borderCollapse: 'collapse'
444
- }).find("td").click(function(e){
445
- var $t = $(this),
446
- h = $t.html(),
447
- n = parseInt(h.replace(/[^0-9]/g),10),
448
- ap = h.replace(/[^apm]/ig),
449
- f = $t.data('for'); // loses scope, so we use data-for
450
-
451
- if(f == 'hour'){
452
- if(ap.indexOf('p') !== -1 && n < 12){
453
- n += 12;
454
- }
455
- else{
456
- if(ap.indexOf('a') !== -1 && n === 12){
457
- n = 0;
458
- }
459
- }
460
- }
461
-
462
- tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n);
463
-
464
- tp_inst._onTimeChange();
465
- tp_inst._onSelectHandler();
466
- }).css({
467
- cursor: 'pointer',
468
- width: (100 / gridSize[litem]) + '%',
469
- textAlign: 'center',
470
- overflow: 'hidden'
471
- });
472
- } // end if grid > 0
473
- } // end for loop
474
-
475
- // Add timezone options
476
- this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
477
- $.fn.append.apply(this.timezone_select,
478
- $.map(o.timezoneList, function(val, idx) {
479
- return $("<option />").val(typeof val == "object" ? val.value : val).text(typeof val == "object" ? val.label : val);
480
- }));
481
- if (typeof(this.timezone) != "undefined" && this.timezone !== null && this.timezone !== "") {
482
- var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset()*-1;
483
- if (local_timezone == this.timezone) {
484
- selectLocalTimezone(tp_inst);
485
- } else {
486
- this.timezone_select.val(this.timezone);
487
- }
488
- } else {
489
- if (typeof(this.hour) != "undefined" && this.hour !== null && this.hour !== "") {
490
- this.timezone_select.val(o.timezone);
491
- } else {
492
- selectLocalTimezone(tp_inst);
493
- }
494
- }
495
- this.timezone_select.change(function() {
496
- tp_inst._onTimeChange();
497
- tp_inst._onSelectHandler();
498
- });
499
- // End timezone options
500
-
501
- // inject timepicker into datepicker
502
- var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
503
- if ($buttonPanel.length) {
504
- $buttonPanel.before($tp);
505
- } else {
506
- $dp.append($tp);
507
- }
508
-
509
- this.$timeObj = $tp.find('.ui_tpicker_time');
510
-
511
- if (this.inst !== null) {
512
- var timeDefined = this.timeDefined;
513
- this._onTimeChange();
514
- this.timeDefined = timeDefined;
515
- }
516
-
517
- // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
518
- if (this._defaults.addSliderAccess) {
519
- var sliderAccessArgs = this._defaults.sliderAccessArgs,
520
- rtl = this._defaults.isRTL;
521
- sliderAccessArgs.isRTL = rtl;
522
-
523
- setTimeout(function() { // fix for inline mode
524
- if ($tp.find('.ui-slider-access').length === 0) {
525
- $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
526
-
527
- // fix any grids since sliders are shorter
528
- var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
529
- if (sliderAccessWidth) {
530
- $tp.find('table:visible').each(function() {
531
- var $g = $(this),
532
- oldWidth = $g.outerWidth(),
533
- oldMarginLeft = $g.css(rtl? 'marginRight':'marginLeft').toString().replace('%', ''),
534
- newWidth = oldWidth - sliderAccessWidth,
535
- newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',
536
- css = { width: newWidth, marginRight: 0, marginLeft: 0 };
537
- css[rtl? 'marginRight':'marginLeft'] = newMarginLeft;
538
- $g.css(css);
539
- });
540
- }
541
- }
542
- }, 10);
543
- }
544
- // end slideAccess integration
545
-
546
- }
547
- },
548
-
549
- /*
550
- * This function tries to limit the ability to go outside the
551
- * min/max date range
552
- */
553
- _limitMinMaxDateTime: function(dp_inst, adjustSliders) {
554
- var o = this._defaults,
555
- dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
556
-
557
- if (!this._defaults.showTimepicker) {
558
- return;
559
- } // No time so nothing to check here
560
-
561
- if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {
562
- var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
563
- minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
564
-
565
- if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {
566
- this.hourMinOriginal = o.hourMin;
567
- this.minuteMinOriginal = o.minuteMin;
568
- this.secondMinOriginal = o.secondMin;
569
- this.millisecMinOriginal = o.millisecMin;
570
- this.microsecMinOriginal = o.microsecMin;
571
- }
572
-
573
- if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
574
- this._defaults.hourMin = minDateTime.getHours();
575
- if (this.hour <= this._defaults.hourMin) {
576
- this.hour = this._defaults.hourMin;
577
- this._defaults.minuteMin = minDateTime.getMinutes();
578
- if (this.minute <= this._defaults.minuteMin) {
579
- this.minute = this._defaults.minuteMin;
580
- this._defaults.secondMin = minDateTime.getSeconds();
581
- if (this.second <= this._defaults.secondMin) {
582
- this.second = this._defaults.secondMin;
583
- this._defaults.millisecMin = minDateTime.getMilliseconds();
584
- if(this.millisec <= this._defaults.millisecMin) {
585
- this.millisec = this._defaults.millisecMin;
586
- this._defaults.microsecMin = minDateTime.getMicroseconds();
587
- } else {
588
- if (this.microsec < this._defaults.microsecMin) {
589
- this.microsec = this._defaults.microsecMin;
590
- }
591
- this._defaults.microsecMin = this.microsecMinOriginal;
592
- }
593
- } else {
594
- this._defaults.millisecMin = this.millisecMinOriginal;
595
- this._defaults.microsecMin = this.microsecMinOriginal;
596
- }
597
- } else {
598
- this._defaults.secondMin = this.secondMinOriginal;
599
- this._defaults.millisecMin = this.millisecMinOriginal;
600
- this._defaults.microsecMin = this.microsecMinOriginal;
601
- }
602
- } else {
603
- this._defaults.minuteMin = this.minuteMinOriginal;
604
- this._defaults.secondMin = this.secondMinOriginal;
605
- this._defaults.millisecMin = this.millisecMinOriginal;
606
- this._defaults.microsecMin = this.microsecMinOriginal;
607
- }
608
- } else {
609
- this._defaults.hourMin = this.hourMinOriginal;
610
- this._defaults.minuteMin = this.minuteMinOriginal;
611
- this._defaults.secondMin = this.secondMinOriginal;
612
- this._defaults.millisecMin = this.millisecMinOriginal;
613
- this._defaults.microsecMin = this.microsecMinOriginal;
614
- }
615
- }
616
-
617
- if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {
618
- var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
619
- maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
620
-
621
- if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
622
- this.hourMaxOriginal = o.hourMax;
623
- this.minuteMaxOriginal = o.minuteMax;
624
- this.secondMaxOriginal = o.secondMax;
625
- this.millisecMaxOriginal = o.millisecMax;
626
- this.microsecMaxOriginal = o.microsecMax;
627
- }
628
-
629
- if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()) {
630
- this._defaults.hourMax = maxDateTime.getHours();
631
- if (this.hour >= this._defaults.hourMax) {
632
- this.hour = this._defaults.hourMax;
633
- this._defaults.minuteMax = maxDateTime.getMinutes();
634
- if (this.minute >= this._defaults.minuteMax) {
635
- this.minute = this._defaults.minuteMax;
636
- this._defaults.secondMax = maxDateTime.getSeconds();
637
- if (this.second >= this._defaults.secondMax) {
638
- this.second = this._defaults.secondMax;
639
- this._defaults.millisecMax = maxDateTime.getMilliseconds();
640
- if (this.millisec >= this._defaults.millisecMax) {
641
- this.millisec = this._defaults.millisecMax;
642
- this._defaults.microsecMax = maxDateTime.getMicroseconds();
643
- } else {
644
- if (this.microsec > this._defaults.microsecMax) {
645
- this.microsec = this._defaults.microsecMax;
646
- }
647
- this._defaults.microsecMax = this.microsecMaxOriginal;
648
- }
649
- } else {
650
- this._defaults.millisecMax = this.millisecMaxOriginal;
651
- this._defaults.microsecMax = this.microsecMaxOriginal;
652
- }
653
- } else {
654
- this._defaults.secondMax = this.secondMaxOriginal;
655
- this._defaults.millisecMax = this.millisecMaxOriginal;
656
- this._defaults.microsecMax = this.microsecMaxOriginal;
657
- }
658
- } else {
659
- this._defaults.minuteMax = this.minuteMaxOriginal;
660
- this._defaults.secondMax = this.secondMaxOriginal;
661
- this._defaults.millisecMax = this.millisecMaxOriginal;
662
- this._defaults.microsecMax = this.microsecMaxOriginal;
663
- }
664
- } else {
665
- this._defaults.hourMax = this.hourMaxOriginal;
666
- this._defaults.minuteMax = this.minuteMaxOriginal;
667
- this._defaults.secondMax = this.secondMaxOriginal;
668
- this._defaults.millisecMax = this.millisecMaxOriginal;
669
- this._defaults.microsecMax = this.microsecMaxOriginal;
670
- }
671
- }
672
-
673
- if (adjustSliders !== undefined && adjustSliders === true) {
674
- var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
675
- minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
676
- secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
677
- millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10);
678
- microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);
679
-
680
- if (this.hour_slider) {
681
- this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax });
682
- this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
683
- }
684
- if (this.minute_slider) {
685
- this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax });
686
- this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
687
- }
688
- if (this.second_slider) {
689
- this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax });
690
- this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
691
- }
692
- if (this.millisec_slider) {
693
- this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax });
694
- this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
695
- }
696
- if (this.microsec_slider) {
697
- this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax });
698
- this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));
699
- }
700
- }
701
-
702
- },
703
-
704
- /*
705
- * when a slider moves, set the internal time...
706
- * on time change is also called when the time is updated in the text field
707
- */
708
- _onTimeChange: function() {
709
- var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
710
- minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
711
- second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,
712
- millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,
713
- microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,
714
- timezone = (this.timezone_select) ? this.timezone_select.val() : false,
715
- o = this._defaults,
716
- pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
717
- pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;
718
-
719
- if (typeof(hour) == 'object') {
720
- hour = false;
721
- }
722
- if (typeof(minute) == 'object') {
723
- minute = false;
724
- }
725
- if (typeof(second) == 'object') {
726
- second = false;
727
- }
728
- if (typeof(millisec) == 'object') {
729
- millisec = false;
730
- }
731
- if (typeof(microsec) == 'object') {
732
- microsec = false;
733
- }
734
- if (typeof(timezone) == 'object') {
735
- timezone = false;
736
- }
737
-
738
- if (hour !== false) {
739
- hour = parseInt(hour, 10);
740
- }
741
- if (minute !== false) {
742
- minute = parseInt(minute, 10);
743
- }
744
- if (second !== false) {
745
- second = parseInt(second, 10);
746
- }
747
- if (millisec !== false) {
748
- millisec = parseInt(millisec, 10);
749
- }
750
- if (microsec !== false) {
751
- microsec = parseInt(microsec, 10);
752
- }
753
-
754
- var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
755
-
756
- // If the update was done in the input field, the input field should not be updated.
757
- // If the update was done using the sliders, update the input field.
758
- var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec || microsec != this.microsec
759
- || (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
760
- || (this.timezone !== null && timezone != this.timezone));
761
-
762
- if (hasChanged) {
763
-
764
- if (hour !== false) {
765
- this.hour = hour;
766
- }
767
- if (minute !== false) {
768
- this.minute = minute;
769
- }
770
- if (second !== false) {
771
- this.second = second;
772
- }
773
- if (millisec !== false) {
774
- this.millisec = millisec;
775
- }
776
- if (microsec !== false) {
777
- this.microsec = microsec;
778
- }
779
- if (timezone !== false) {
780
- this.timezone = timezone;
781
- }
782
-
783
- if (!this.inst) {
784
- this.inst = $.datepicker._getInst(this.$input[0]);
785
- }
786
-
787
- this._limitMinMaxDateTime(this.inst, true);
788
- }
789
- if (this.support.ampm) {
790
- this.ampm = ampm;
791
- }
792
-
793
- // Updates the time within the timepicker
794
- this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
795
- if (this.$timeObj) {
796
- if(pickerTimeFormat === o.timeFormat){
797
- this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
798
- }
799
- else{
800
- this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
801
- }
802
- }
803
-
804
- this.timeDefined = true;
805
- if (hasChanged) {
806
- this._updateDateTime();
807
- }
808
- },
809
-
810
- /*
811
- * call custom onSelect.
812
- * bind to sliders slidestop, and grid click.
813
- */
814
- _onSelectHandler: function() {
815
- var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
816
- var inputEl = this.$input ? this.$input[0] : null;
817
- if (onSelect && inputEl) {
818
- onSelect.apply(inputEl, [this.formattedDateTime, this]);
819
- }
820
- },
821
-
822
- /*
823
- * update our input with the new date time..
824
- */
825
- _updateDateTime: function(dp_inst) {
826
- dp_inst = this.inst || dp_inst;
827
- var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
828
- dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
829
- formatCfg = $.datepicker._getFormatConfig(dp_inst),
830
- timeAvailable = dt !== null && this.timeDefined;
831
- this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
832
- var formattedDateTime = this.formattedDate;
833
-
834
- // if a slider was changed but datepicker doesn't have a value yet, set it
835
- if(dp_inst.lastVal===""){
836
- dp_inst.currentYear=dp_inst.selectedYear;
837
- dp_inst.currentMonth=dp_inst.selectedMonth;
838
- dp_inst.currentDay=dp_inst.selectedDay;
839
- }
840
-
841
- /*
842
- * remove following lines to force every changes in date picker to change the input value
843
- * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
844
- * If the user manually empty the value in the input field, the date picker will never change selected value.
845
- */
846
- //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
847
- // return;
848
- //}
849
-
850
- if (this._defaults.timeOnly === true) {
851
- formattedDateTime = this.formattedTime;
852
- } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
853
- formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
854
- }
855
-
856
- this.formattedDateTime = formattedDateTime;
857
-
858
- if (!this._defaults.showTimepicker) {
859
- this.$input.val(this.formattedDate);
860
- } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {
861
- this.$altInput.val(this.formattedTime);
862
- this.$input.val(this.formattedDate);
863
- } else if (this.$altInput) {
864
- this.$input.val(formattedDateTime);
865
- var altFormattedDateTime = '',
866
- altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator,
867
- altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
868
-
869
- if(!this._defaults.timeOnly){
870
- if (this._defaults.altFormat){
871
- altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
872
- }
873
- else{
874
- altFormattedDateTime = this.formattedDate;
875
- }
876
-
877
- if (altFormattedDateTime){
878
- altFormattedDateTime += altSeparator;
879
- }
880
- }
881
-
882
- if(this._defaults.altTimeFormat){
883
- altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
884
- }
885
- else{
886
- altFormattedDateTime += this.formattedTime + altTimeSuffix;
887
- }
888
- this.$altInput.val(altFormattedDateTime);
889
- } else {
890
- this.$input.val(formattedDateTime);
891
- }
892
-
893
- this.$input.trigger("change");
894
- },
895
-
896
- _onFocus: function() {
897
- if (!this.$input.val() && this._defaults.defaultValue) {
898
- this.$input.val(this._defaults.defaultValue);
899
- var inst = $.datepicker._getInst(this.$input.get(0)),
900
- tp_inst = $.datepicker._get(inst, 'timepicker');
901
- if (tp_inst) {
902
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
903
- try {
904
- $.datepicker._updateDatepicker(inst);
905
- } catch (err) {
906
- $.timepicker.log(err);
907
- }
908
- }
909
- }
910
- }
911
- },
912
-
913
- /*
914
- * Small abstraction to control types
915
- * We can add more, just be sure to follow the pattern: create, options, value
916
- */
917
- _controls: {
918
- // slider methods
919
- slider: {
920
- create: function(tp_inst, obj, unit, val, min, max, step){
921
- var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60
922
- return obj.prop('slide', null).slider({
923
- orientation: "horizontal",
924
- value: rtl? val*-1 : val,
925
- min: rtl? max*-1 : min,
926
- max: rtl? min*-1 : max,
927
- step: step,
928
- slide: function(event, ui) {
929
- tp_inst.control.value(tp_inst, $(this), unit, rtl? ui.value*-1:ui.value);
930
- tp_inst._onTimeChange();
931
- },
932
- stop: function(event, ui) {
933
- tp_inst._onSelectHandler();
934
- }
935
- });
936
- },
937
- options: function(tp_inst, obj, unit, opts, val){
938
- if(tp_inst._defaults.isRTL){
939
- if(typeof(opts) == 'string'){
940
- if(opts == 'min' || opts == 'max'){
941
- if(val !== undefined){
942
- return obj.slider(opts, val*-1);
943
- }
944
- return Math.abs(obj.slider(opts));
945
- }
946
- return obj.slider(opts);
947
- }
948
- var min = opts.min,
949
- max = opts.max;
950
- opts.min = opts.max = null;
951
- if(min !== undefined){
952
- opts.max = min * -1;
953
- }
954
- if(max !== undefined){
955
- opts.min = max * -1;
956
- }
957
- return obj.slider(opts);
958
- }
959
- if(typeof(opts) == 'string' && val !== undefined){
960
- return obj.slider(opts, val);
961
- }
962
- return obj.slider(opts);
963
- },
964
- value: function(tp_inst, obj, unit, val){
965
- if(tp_inst._defaults.isRTL){
966
- if(val !== undefined){
967
- return obj.slider('value', val*-1);
968
- }
969
- return Math.abs(obj.slider('value'));
970
- }
971
- if(val !== undefined){
972
- return obj.slider('value', val);
973
- }
974
- return obj.slider('value');
975
- }
976
- },
977
- // select methods
978
- select: {
979
- create: function(tp_inst, obj, unit, val, min, max, step){
980
- var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
981
- format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;
982
-
983
- for(var i=min; i<=max; i+=step){
984
- sel += '<option value="'+ i +'"'+ (i==val? ' selected':'') +'>';
985
- if(unit == 'hour'){
986
- sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,'')), {hour:i}, tp_inst._defaults);
987
- }
988
- else if(unit == 'millisec' || unit == 'microsec' || i >= 10){ sel += i; }
989
- else {sel += '0'+ i.toString(); }
990
- sel += '</option>';
991
- }
992
- sel += '</select>';
993
-
994
- obj.children('select').remove();
995
-
996
- $(sel).appendTo(obj).change(function(e){
997
- tp_inst._onTimeChange();
998
- tp_inst._onSelectHandler();
999
- });
1000
-
1001
- return obj;
1002
- },
1003
- options: function(tp_inst, obj, unit, opts, val){
1004
- var o = {},
1005
- $t = obj.children('select');
1006
- if(typeof(opts) == 'string'){
1007
- if(val === undefined){
1008
- return $t.data(opts);
1009
- }
1010
- o[opts] = val;
1011
- }
1012
- else{ o = opts; }
1013
- return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
1014
- },
1015
- value: function(tp_inst, obj, unit, val){
1016
- var $t = obj.children('select');
1017
- if(val !== undefined){
1018
- return $t.val(val);
1019
- }
1020
- return $t.val();
1021
- }
1022
- }
1023
- } // end _controls
1024
-
1025
- });
1026
-
1027
- $.fn.extend({
1028
- /*
1029
- * shorthand just to use timepicker..
1030
- */
1031
- timepicker: function(o) {
1032
- o = o || {};
1033
- var tmp_args = Array.prototype.slice.call(arguments);
1034
-
1035
- if (typeof o == 'object') {
1036
- tmp_args[0] = $.extend(o, {
1037
- timeOnly: true
1038
- });
1039
- }
1040
-
1041
- return $(this).each(function() {
1042
- $.fn.datetimepicker.apply($(this), tmp_args);
1043
- });
1044
- },
1045
-
1046
- /*
1047
- * extend timepicker to datepicker
1048
- */
1049
- datetimepicker: function(o) {
1050
- o = o || {};
1051
- var tmp_args = arguments;
1052
-
1053
- if (typeof(o) == 'string') {
1054
- if (o == 'getDate') {
1055
- return $.fn.datepicker.apply($(this[0]), tmp_args);
1056
- } else {
1057
- return this.each(function() {
1058
- var $t = $(this);
1059
- $t.datepicker.apply($t, tmp_args);
1060
- });
1061
- }
1062
- } else {
1063
- return this.each(function() {
1064
- var $t = $(this);
1065
- $t.datepicker($.timepicker._newInst($t, o)._defaults);
1066
- });
1067
- }
1068
- }
1069
- });
1070
-
1071
- /*
1072
- * Public Utility to parse date and time
1073
- */
1074
- $.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
1075
- var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
1076
- if (parseRes.timeObj) {
1077
- var t = parseRes.timeObj;
1078
- parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
1079
- parseRex.date.setMicroseconds(t.microsec);
1080
- }
1081
-
1082
- return parseRes.date;
1083
- };
1084
-
1085
- /*
1086
- * Public utility to parse time
1087
- */
1088
- $.datepicker.parseTime = function(timeFormat, timeString, options) {
1089
- var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),
1090
- iso8601 = (timeFormat.replace(/\'.*?\'/g,'').indexOf('Z') !== -1);
1091
-
1092
- // Strict parse requires the timeString to match the timeFormat exactly
1093
- var strictParse = function(f, s, o){
1094
-
1095
- // pattern for standard and localized AM/PM markers
1096
- var getPatternAmpm = function(amNames, pmNames) {
1097
- var markers = [];
1098
- if (amNames) {
1099
- $.merge(markers, amNames);
1100
- }
1101
- if (pmNames) {
1102
- $.merge(markers, pmNames);
1103
- }
1104
- markers = $.map(markers, function(val) {
1105
- return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
1106
- });
1107
- return '(' + markers.join('|') + ')?';
1108
- };
1109
-
1110
- // figure out position of time elements.. cause js cant do named captures
1111
- var getFormatPositions = function(timeFormat) {
1112
- var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),
1113
- orders = {
1114
- h: -1,
1115
- m: -1,
1116
- s: -1,
1117
- l: -1,
1118
- c: -1,
1119
- t: -1,
1120
- z: -1
1121
- };
1122
-
1123
- if (finds) {
1124
- for (var i = 0; i < finds.length; i++) {
1125
- if (orders[finds[i].toString().charAt(0)] == -1) {
1126
- orders[finds[i].toString().charAt(0)] = i + 1;
1127
- }
1128
- }
1129
- }
1130
- return orders;
1131
- };
1132
-
1133
- var regstr = '^' + f.toString()
1134
- .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {
1135
- var ml = match.length;
1136
- switch (match.charAt(0).toLowerCase()) {
1137
- case 'h': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1138
- case 'm': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1139
- case 's': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
1140
- case 'l': return '(\\d?\\d?\\d)';
1141
- case 'c': return '(\\d?\\d?\\d)';
1142
- case 'z': return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
1143
- case 't': return getPatternAmpm(o.amNames, o.pmNames);
1144
- default: // literal escaped in quotes
1145
- return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?';
1146
- }
1147
- })
1148
- .replace(/\s/g, '\\s?') +
1149
- o.timeSuffix + '$',
1150
- order = getFormatPositions(f),
1151
- ampm = '',
1152
- treg;
1153
-
1154
- treg = s.match(new RegExp(regstr, 'i'));
1155
-
1156
- var resTime = {
1157
- hour: 0,
1158
- minute: 0,
1159
- second: 0,
1160
- millisec: 0,
1161
- microsec: 0
1162
- };
1163
-
1164
- if (treg) {
1165
- if (order.t !== -1) {
1166
- if (treg[order.t] === undefined || treg[order.t].length === 0) {
1167
- ampm = '';
1168
- resTime.ampm = '';
1169
- } else {
1170
- ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
1171
- resTime.ampm = o[ampm == 'AM' ? 'amNames' : 'pmNames'][0];
1172
- }
1173
- }
1174
-
1175
- if (order.h !== -1) {
1176
- if (ampm == 'AM' && treg[order.h] == '12') {
1177
- resTime.hour = 0; // 12am = 0 hour
1178
- } else {
1179
- if (ampm == 'PM' && treg[order.h] != '12') {
1180
- resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
1181
- } else {
1182
- resTime.hour = Number(treg[order.h]);
1183
- }
1184
- }
1185
- }
1186
-
1187
- if (order.m !== -1) {
1188
- resTime.minute = Number(treg[order.m]);
1189
- }
1190
- if (order.s !== -1) {
1191
- resTime.second = Number(treg[order.s]);
1192
- }
1193
- if (order.l !== -1) {
1194
- resTime.millisec = Number(treg[order.l]);
1195
- }
1196
- if (order.c !== -1) {
1197
- resTime.microsec = Number(treg[order.c]);
1198
- }
1199
- if (order.z !== -1 && treg[order.z] !== undefined) {
1200
- resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);
1201
- }
1202
-
1203
-
1204
- return resTime;
1205
- }
1206
- return false;
1207
- };// end strictParse
1208
-
1209
- // First try JS Date, if that fails, use strictParse
1210
- var looseParse = function(f,s,o){
1211
- try{
1212
- var d = new Date('2012-01-01 '+ s);
1213
- if(isNaN(d.getTime())){
1214
- d = new Date('2012-01-01T'+ s);
1215
- if(isNaN(d.getTime())){
1216
- d = new Date('01/01/2012 '+ s);
1217
- if(isNaN(d.getTime())){
1218
- throw "Unable to parse time with native Date: "+ s;
1219
- }
1220
- }
1221
- }
1222
-
1223
- return {
1224
- hour: d.getHours(),
1225
- minute: d.getMinutes(),
1226
- second: d.getSeconds(),
1227
- millisec: d.getMilliseconds(),
1228
- microsec: d.getMicroseconds(),
1229
- timezone: d.getTimezoneOffset()*-1
1230
- };
1231
- }
1232
- catch(err){
1233
- try{
1234
- return strictParse(f,s,o);
1235
- }
1236
- catch(err2){
1237
- $.timepicker.log("Unable to parse \ntimeString: "+ s +"\ntimeFormat: "+ f);
1238
- }
1239
- }
1240
- return false;
1241
- }; // end looseParse
1242
-
1243
- if(typeof o.parse === "function"){
1244
- return o.parse(timeFormat, timeString, o);
1245
- }
1246
- if(o.parse === 'loose'){
1247
- return looseParse(timeFormat, timeString, o);
1248
- }
1249
- return strictParse(timeFormat, timeString, o);
1250
- };
1251
-
1252
- /*
1253
- * Public utility to format the time
1254
- * format = string format of the time
1255
- * time = a {}, not a Date() for timezones
1256
- * options = essentially the regional[].. amNames, pmNames, ampm
1257
- */
1258
- $.datepicker.formatTime = function(format, time, options) {
1259
- options = options || {};
1260
- options = $.extend({}, $.timepicker._defaults, options);
1261
- time = $.extend({
1262
- hour: 0,
1263
- minute: 0,
1264
- second: 0,
1265
- millisec: 0,
1266
- timezone: 0
1267
- }, time);
1268
-
1269
- var tmptime = format,
1270
- ampmName = options.amNames[0],
1271
- hour = parseInt(time.hour, 10);
1272
-
1273
- if (hour > 11) {
1274
- ampmName = options.pmNames[0];
1275
- }
1276
-
1277
- tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|('.*?'|".*?"))/g, function(match) {
1278
- switch (match) {
1279
- case 'HH':
1280
- return ('0' + hour).slice(-2);
1281
- case 'H':
1282
- return hour;
1283
- case 'hh':
1284
- return ('0' + convert24to12(hour)).slice(-2);
1285
- case 'h':
1286
- return convert24to12(hour);
1287
- case 'mm':
1288
- return ('0' + time.minute).slice(-2);
1289
- case 'm':
1290
- return time.minute;
1291
- case 'ss':
1292
- return ('0' + time.second).slice(-2);
1293
- case 's':
1294
- return time.second;
1295
- case 'l':
1296
- return ('00' + time.millisec).slice(-3);
1297
- case 'c':
1298
- return ('00' + time.microsec).slice(-3);
1299
- case 'z':
1300
- return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, false);
1301
- case 'Z':
1302
- return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, true);
1303
- case 'T':
1304
- return ampmName.charAt(0).toUpperCase();
1305
- case 'TT':
1306
- return ampmName.toUpperCase();
1307
- case 't':
1308
- return ampmName.charAt(0).toLowerCase();
1309
- case 'tt':
1310
- return ampmName.toLowerCase();
1311
- default:
1312
- return match.replace(/\'/g, "") || "'";
1313
- }
1314
- });
1315
-
1316
- tmptime = $.trim(tmptime);
1317
- return tmptime;
1318
- };
1319
-
1320
- /*
1321
- * the bad hack :/ override datepicker so it doesnt close on select
1322
- // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
1323
- */
1324
- $.datepicker._base_selectDate = $.datepicker._selectDate;
1325
- $.datepicker._selectDate = function(id, dateStr) {
1326
- var inst = this._getInst($(id)[0]),
1327
- tp_inst = this._get(inst, 'timepicker');
1328
-
1329
- if (tp_inst) {
1330
- tp_inst._limitMinMaxDateTime(inst, true);
1331
- inst.inline = inst.stay_open = true;
1332
- //This way the onSelect handler called from calendarpicker get the full dateTime
1333
- this._base_selectDate(id, dateStr);
1334
- inst.inline = inst.stay_open = false;
1335
- this._notifyChange(inst);
1336
- this._updateDatepicker(inst);
1337
- } else {
1338
- this._base_selectDate(id, dateStr);
1339
- }
1340
- };
1341
-
1342
- /*
1343
- * second bad hack :/ override datepicker so it triggers an event when changing the input field
1344
- * and does not redraw the datepicker on every selectDate event
1345
- */
1346
- $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
1347
- $.datepicker._updateDatepicker = function(inst) {
1348
-
1349
- // don't popup the datepicker if there is another instance already opened
1350
- var input = inst.input[0];
1351
- if ($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) {
1352
- return;
1353
- }
1354
-
1355
- if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
1356
-
1357
- this._base_updateDatepicker(inst);
1358
-
1359
- // Reload the time control when changing something in the input text field.
1360
- var tp_inst = this._get(inst, 'timepicker');
1361
- if (tp_inst) {
1362
- tp_inst._addTimePicker(inst);
1363
- }
1364
- }
1365
- };
1366
-
1367
- /*
1368
- * third bad hack :/ override datepicker so it allows spaces and colon in the input field
1369
- */
1370
- $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
1371
- $.datepicker._doKeyPress = function(event) {
1372
- var inst = $.datepicker._getInst(event.target),
1373
- tp_inst = $.datepicker._get(inst, 'timepicker');
1374
-
1375
- if (tp_inst) {
1376
- if ($.datepicker._get(inst, 'constrainInput')) {
1377
- var ampm = tp_inst.support.ampm,
1378
- tz = tp_inst._defaults.showTimezone !== null? tp_inst._defaults.showTimezone : tp_inst.support.timezone,
1379
- dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
1380
- datetimeChars = tp_inst._defaults.timeFormat.toString()
1381
- .replace(/[hms]/g, '')
1382
- .replace(/TT/g, ampm ? 'APM' : '')
1383
- .replace(/Tt/g, ampm ? 'AaPpMm' : '')
1384
- .replace(/tT/g, ampm ? 'AaPpMm' : '')
1385
- .replace(/T/g, ampm ? 'AP' : '')
1386
- .replace(/tt/g, ampm ? 'apm' : '')
1387
- .replace(/t/g, ampm ? 'ap' : '') +
1388
- " " + tp_inst._defaults.separator +
1389
- tp_inst._defaults.timeSuffix +
1390
- (tz ? tp_inst._defaults.timezoneList.join('') : '') +
1391
- (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
1392
- dateChars,
1393
- chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
1394
- return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
1395
- }
1396
- }
1397
-
1398
- return $.datepicker._base_doKeyPress(event);
1399
- };
1400
-
1401
- /*
1402
- * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField
1403
- */
1404
- $.datepicker._base_updateAlternate = $.datepicker._updateAlternate;
1405
- /* Update any alternate field to synchronise with the main field. */
1406
- $.datepicker._updateAlternate = function(inst) {
1407
- var tp_inst = this._get(inst, 'timepicker');
1408
- if(tp_inst){
1409
- var altField = tp_inst._defaults.altField;
1410
- if (altField) { // update alternate field too
1411
- var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
1412
- date = this._getDate(inst),
1413
- formatCfg = $.datepicker._getFormatConfig(inst),
1414
- altFormattedDateTime = '',
1415
- altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
1416
- altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
1417
- altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
1418
-
1419
- altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
1420
- if(!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null){
1421
- if(tp_inst._defaults.altFormat){
1422
- altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;
1423
- }
1424
- else{
1425
- altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;
1426
- }
1427
- }
1428
- $(altField).val(altFormattedDateTime);
1429
- }
1430
- }
1431
- else{
1432
- $.datepicker._base_updateAlternate(inst);
1433
- }
1434
- };
1435
-
1436
- /*
1437
- * Override key up event to sync manual input changes.
1438
- */
1439
- $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
1440
- $.datepicker._doKeyUp = function(event) {
1441
- var inst = $.datepicker._getInst(event.target),
1442
- tp_inst = $.datepicker._get(inst, 'timepicker');
1443
-
1444
- if (tp_inst) {
1445
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
1446
- try {
1447
- $.datepicker._updateDatepicker(inst);
1448
- } catch (err) {
1449
- $.timepicker.log(err);
1450
- }
1451
- }
1452
- }
1453
-
1454
- return $.datepicker._base_doKeyUp(event);
1455
- };
1456
-
1457
- /*
1458
- * override "Today" button to also grab the time.
1459
- */
1460
- $.datepicker._base_gotoToday = $.datepicker._gotoToday;
1461
- $.datepicker._gotoToday = function(id) {
1462
- var inst = this._getInst($(id)[0]),
1463
- $dp = inst.dpDiv;
1464
- this._base_gotoToday(id);
1465
- var tp_inst = this._get(inst, 'timepicker');
1466
- selectLocalTimezone(tp_inst);
1467
- var now = new Date();
1468
- this._setTime(inst, now);
1469
- $('.ui-datepicker-today', $dp).click();
1470
- };
1471
-
1472
- /*
1473
- * Disable & enable the Time in the datetimepicker
1474
- */
1475
- $.datepicker._disableTimepickerDatepicker = function(target) {
1476
- var inst = this._getInst(target);
1477
- if (!inst) {
1478
- return;
1479
- }
1480
-
1481
- var tp_inst = this._get(inst, 'timepicker');
1482
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
1483
- if (tp_inst) {
1484
- tp_inst._defaults.showTimepicker = false;
1485
- tp_inst._updateDateTime(inst);
1486
- }
1487
- };
1488
-
1489
- $.datepicker._enableTimepickerDatepicker = function(target) {
1490
- var inst = this._getInst(target);
1491
- if (!inst) {
1492
- return;
1493
- }
1494
-
1495
- var tp_inst = this._get(inst, 'timepicker');
1496
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
1497
- if (tp_inst) {
1498
- tp_inst._defaults.showTimepicker = true;
1499
- tp_inst._addTimePicker(inst); // Could be disabled on page load
1500
- tp_inst._updateDateTime(inst);
1501
- }
1502
- };
1503
-
1504
- /*
1505
- * Create our own set time function
1506
- */
1507
- $.datepicker._setTime = function(inst, date) {
1508
- var tp_inst = this._get(inst, 'timepicker');
1509
- if (tp_inst) {
1510
- var defaults = tp_inst._defaults;
1511
-
1512
- // calling _setTime with no date sets time to defaults
1513
- tp_inst.hour = date ? date.getHours() : defaults.hour;
1514
- tp_inst.minute = date ? date.getMinutes() : defaults.minute;
1515
- tp_inst.second = date ? date.getSeconds() : defaults.second;
1516
- tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
1517
- tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;
1518
-
1519
- //check if within min/max times..
1520
- tp_inst._limitMinMaxDateTime(inst, true);
1521
-
1522
- tp_inst._onTimeChange();
1523
- tp_inst._updateDateTime(inst);
1524
- }
1525
- };
1526
-
1527
- /*
1528
- * Create new public method to set only time, callable as $().datepicker('setTime', date)
1529
- */
1530
- $.datepicker._setTimeDatepicker = function(target, date, withDate) {
1531
- var inst = this._getInst(target);
1532
- if (!inst) {
1533
- return;
1534
- }
1535
-
1536
- var tp_inst = this._get(inst, 'timepicker');
1537
-
1538
- if (tp_inst) {
1539
- this._setDateFromField(inst);
1540
- var tp_date;
1541
- if (date) {
1542
- if (typeof date == "string") {
1543
- tp_inst._parseTime(date, withDate);
1544
- tp_date = new Date();
1545
- tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
1546
- tp_date.setMicroseconds(tp_inst.microsec);
1547
- } else {
1548
- tp_date = new Date(date.getTime());
1549
- }
1550
- if (tp_date.toString() == 'Invalid Date') {
1551
- tp_date = undefined;
1552
- }
1553
- this._setTime(inst, tp_date);
1554
- }
1555
- }
1556
-
1557
- };
1558
-
1559
- /*
1560
- * override setDate() to allow setting time too within Date object
1561
- */
1562
- $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
1563
- $.datepicker._setDateDatepicker = function(target, date) {
1564
- var inst = this._getInst(target);
1565
- if (!inst) {
1566
- return;
1567
- }
1568
-
1569
- var tp_inst = this._get(inst, 'timepicker'),
1570
- tp_date = (date instanceof Date) ? new Date(date.getTime()) : date;
1571
-
1572
- // This is important if you are using the timezone option, javascript's Date
1573
- // object will only return the timezone offset for the current locale, so we
1574
- // adjust it accordingly. If not using timezone option this won't matter..
1575
- // If a timezone is different in tp, keep the timezone as is
1576
- if(tp_inst && tp_inst.timezone != null){
1577
- date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
1578
- tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
1579
- }
1580
-
1581
- this._updateDatepicker(inst);
1582
- this._base_setDateDatepicker.apply(this, arguments);
1583
- this._setTimeDatepicker(target, tp_date, true);
1584
- };
1585
-
1586
- /*
1587
- * override getDate() to allow getting time too within Date object
1588
- */
1589
- $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
1590
- $.datepicker._getDateDatepicker = function(target, noDefault) {
1591
- var inst = this._getInst(target);
1592
- if (!inst) {
1593
- return;
1594
- }
1595
-
1596
- var tp_inst = this._get(inst, 'timepicker');
1597
-
1598
- if (tp_inst) {
1599
- // if it hasn't yet been defined, grab from field
1600
- if(inst.lastVal === undefined){
1601
- this._setDateFromField(inst, noDefault);
1602
- }
1603
-
1604
- var date = this._getDate(inst);
1605
- if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) {
1606
- date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
1607
- date.setMicroseconds(tp_inst.microsec);
1608
-
1609
- // This is important if you are using the timezone option, javascript's Date
1610
- // object will only return the timezone offset for the current locale, so we
1611
- // adjust it accordingly. If not using timezone option this won't matter..
1612
- if(tp_inst.timezone != null){
1613
- date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
1614
- }
1615
- }
1616
- return date;
1617
- }
1618
- return this._base_getDateDatepicker(target, noDefault);
1619
- };
1620
-
1621
- /*
1622
- * override parseDate() because UI 1.8.14 throws an error about "Extra characters"
1623
- * An option in datapicker to ignore extra format characters would be nicer.
1624
- */
1625
- $.datepicker._base_parseDate = $.datepicker.parseDate;
1626
- $.datepicker.parseDate = function(format, value, settings) {
1627
- var date;
1628
- try {
1629
- date = this._base_parseDate(format, value, settings);
1630
- } catch (err) {
1631
- // Hack! The error message ends with a colon, a space, and
1632
- // the "extra" characters. We rely on that instead of
1633
- // attempting to perfectly reproduce the parsing algorithm.
1634
- if (err.indexOf(":") >= 0) {
1635
- date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
1636
- $.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
1637
- } else {
1638
- throw err;
1639
- }
1640
- }
1641
- return date;
1642
- };
1643
-
1644
- /*
1645
- * override formatDate to set date with time to the input
1646
- */
1647
- $.datepicker._base_formatDate = $.datepicker._formatDate;
1648
- $.datepicker._formatDate = function(inst, day, month, year) {
1649
- var tp_inst = this._get(inst, 'timepicker');
1650
- if (tp_inst) {
1651
- tp_inst._updateDateTime(inst);
1652
- return tp_inst.$input.val();
1653
- }
1654
- return this._base_formatDate(inst);
1655
- };
1656
-
1657
- /*
1658
- * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate
1659
- */
1660
- $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
1661
- $.datepicker._optionDatepicker = function(target, name, value) {
1662
- var inst = this._getInst(target),
1663
- name_clone;
1664
- if (!inst) {
1665
- return null;
1666
- }
1667
-
1668
- var tp_inst = this._get(inst, 'timepicker');
1669
- if (tp_inst) {
1670
- var min = null,
1671
- max = null,
1672
- onselect = null,
1673
- overrides = tp_inst._defaults.evnts,
1674
- fns = {},
1675
- prop;
1676
- if (typeof name == 'string') { // if min/max was set with the string
1677
- if (name === 'minDate' || name === 'minDateTime') {
1678
- min = value;
1679
- } else if (name === 'maxDate' || name === 'maxDateTime') {
1680
- max = value;
1681
- } else if (name === 'onSelect') {
1682
- onselect = value;
1683
- } else if (overrides.hasOwnProperty(name)) {
1684
- if (typeof (value) === 'undefined') {
1685
- return overrides[name];
1686
- }
1687
- fns[name] = value;
1688
- name_clone = {}; //empty results in exiting function after overrides updated
1689
- }
1690
- } else if (typeof name == 'object') { //if min/max was set with the JSON
1691
- if (name.minDate) {
1692
- min = name.minDate;
1693
- } else if (name.minDateTime) {
1694
- min = name.minDateTime;
1695
- } else if (name.maxDate) {
1696
- max = name.maxDate;
1697
- } else if (name.maxDateTime) {
1698
- max = name.maxDateTime;
1699
- }
1700
- for (prop in overrides) {
1701
- if (overrides.hasOwnProperty(prop) && name[prop]) {
1702
- fns[prop] = name[prop];
1703
- }
1704
- }
1705
- }
1706
- for (prop in fns) {
1707
- if (fns.hasOwnProperty(prop)) {
1708
- overrides[prop] = fns[prop];
1709
- if (!name_clone) { name_clone = $.extend({}, name);}
1710
- delete name_clone[prop];
1711
- }
1712
- }
1713
- if (name_clone && isEmptyObject(name_clone)) { return; }
1714
- if (min) { //if min was set
1715
- if (min === 0) {
1716
- min = new Date();
1717
- } else {
1718
- min = new Date(min);
1719
- }
1720
- tp_inst._defaults.minDate = min;
1721
- tp_inst._defaults.minDateTime = min;
1722
- } else if (max) { //if max was set
1723
- if (max === 0) {
1724
- max = new Date();
1725
- } else {
1726
- max = new Date(max);
1727
- }
1728
- tp_inst._defaults.maxDate = max;
1729
- tp_inst._defaults.maxDateTime = max;
1730
- } else if (onselect) {
1731
- tp_inst._defaults.onSelect = onselect;
1732
- }
1733
- }
1734
- if (value === undefined) {
1735
- return this._base_optionDatepicker.call($.datepicker, target, name);
1736
- }
1737
- return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
1738
- };
1739
-
1740
- /*
1741
- * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,
1742
- * it will return false for all objects
1743
- */
1744
- var isEmptyObject = function(obj) {
1745
- var prop;
1746
- for (prop in obj) {
1747
- if (obj.hasOwnProperty(obj)) {
1748
- return false;
1749
- }
1750
- }
1751
- return true;
1752
- };
1753
-
1754
- /*
1755
- * jQuery extend now ignores nulls!
1756
- */
1757
- var extendRemove = function(target, props) {
1758
- $.extend(target, props);
1759
- for (var name in props) {
1760
- if (props[name] === null || props[name] === undefined) {
1761
- target[name] = props[name];
1762
- }
1763
- }
1764
- return target;
1765
- };
1766
-
1767
- /*
1768
- * Determine by the time format which units are supported
1769
- * Returns an object of booleans for each unit
1770
- */
1771
- var detectSupport = function(timeFormat){
1772
- var tf = timeFormat.replace(/\'.*?\'/g,'').toLowerCase(), // removes literals
1773
- isIn = function(f, t){ // does the format contain the token?
1774
- return f.indexOf(t) !== -1? true:false;
1775
- };
1776
- return {
1777
- hour: isIn(tf,'h'),
1778
- minute: isIn(tf,'m'),
1779
- second: isIn(tf,'s'),
1780
- millisec: isIn(tf,'l'),
1781
- microsec: isIn(tf,'c'),
1782
- timezone: isIn(tf,'z'),
1783
- ampm: isIn('t') && isIn(timeFormat,'h'),
1784
- iso8601: isIn(timeFormat, 'Z')
1785
- };
1786
- };
1787
-
1788
- /*
1789
- * Converts 24 hour format into 12 hour
1790
- * Returns 12 hour without leading 0
1791
- */
1792
- var convert24to12 = function(hour) {
1793
- if (hour > 12) {
1794
- hour = hour - 12;
1795
- }
1796
-
1797
- if (hour === 0) {
1798
- hour = 12;
1799
- }
1800
-
1801
- return String(hour);
1802
- };
1803
-
1804
- /*
1805
- * Splits datetime string into date ans time substrings.
1806
- * Throws exception when date can't be parsed
1807
- * Returns [dateString, timeString]
1808
- */
1809
- var splitDateTime = function(dateFormat, dateTimeString, dateSettings, timeSettings) {
1810
- try {
1811
- // The idea is to get the number separator occurances in datetime and the time format requested (since time has
1812
- // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
1813
- var separator = timeSettings && timeSettings.separator ? timeSettings.separator : $.timepicker._defaults.separator,
1814
- format = timeSettings && timeSettings.timeFormat ? timeSettings.timeFormat : $.timepicker._defaults.timeFormat,
1815
- timeParts = format.split(separator), // how many occurances of separator may be in our format?
1816
- timePartsLen = timeParts.length,
1817
- allParts = dateTimeString.split(separator),
1818
- allPartsLen = allParts.length;
1819
-
1820
- if (allPartsLen > 1) {
1821
- return [
1822
- allParts.splice(0,allPartsLen-timePartsLen).join(separator),
1823
- allParts.splice(0,timePartsLen).join(separator)
1824
- ];
1825
- }
1826
-
1827
- } catch (err) {
1828
- $.timepicker.log('Could not split the date from the time. Please check the following datetimepicker options' +
1829
- "\nthrown error: " + err +
1830
- "\ndateTimeString" + dateTimeString +
1831
- "\ndateFormat = " + dateFormat +
1832
- "\nseparator = " + timeSettings.separator +
1833
- "\ntimeFormat = " + timeSettings.timeFormat);
1834
-
1835
- if (err.indexOf(":") >= 0) {
1836
- // Hack! The error message ends with a colon, a space, and
1837
- // the "extra" characters. We rely on that instead of
1838
- // attempting to perfectly reproduce the parsing algorithm.
1839
- var dateStringLength = dateTimeString.length - (err.length - err.indexOf(':') - 2),
1840
- timeString = dateTimeString.substring(dateStringLength);
1841
-
1842
- return [$.trim(dateTimeString.substring(0, dateStringLength)), $.trim(dateTimeString.substring(dateStringLength))];
1843
-
1844
- } else {
1845
- throw err;
1846
- }
1847
- }
1848
- return [dateTimeString, ''];
1849
- };
1850
-
1851
- /*
1852
- * Internal function to parse datetime interval
1853
- * Returns: {date: Date, timeObj: Object}, where
1854
- * date - parsed date without time (type Date)
1855
- * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional
1856
- */
1857
- var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
1858
- var date;
1859
- var splitRes = splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings);
1860
- date = $.datepicker._base_parseDate(dateFormat, splitRes[0], dateSettings);
1861
- if (splitRes[1] !== '') {
1862
- var timeString = splitRes[1],
1863
- parsedTime = $.datepicker.parseTime(timeFormat, timeString, timeSettings);
1864
-
1865
- if (parsedTime === null) {
1866
- throw 'Wrong time format';
1867
- }
1868
- return {
1869
- date: date,
1870
- timeObj: parsedTime
1871
- };
1872
- } else {
1873
- return {
1874
- date: date
1875
- };
1876
- }
1877
- };
1878
-
1879
- /*
1880
- * Internal function to set timezone_select to the local timezone
1881
- */
1882
- var selectLocalTimezone = function(tp_inst, date) {
1883
- if (tp_inst && tp_inst.timezone_select) {
1884
- var now = typeof date !== 'undefined' ? date : new Date();
1885
- tp_inst.timezone_select.val(now.getTimezoneOffset()*-1);
1886
- }
1887
- };
1888
-
1889
- /*
1890
- * Create a Singleton Insance
1891
- */
1892
- $.timepicker = new Timepicker();
1893
-
1894
- /**
1895
- * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)
1896
- * @param number if not a number this value is returned
1897
- * @param boolean if true formats in accordance to iso8601 "+12:45"
1898
- * @return string
1899
- */
1900
- $.timepicker.timezoneOffsetString = function(tzMinutes, iso8601) {
1901
- if(isNaN(tzMinutes) || tzMinutes > 840){
1902
- return tzMinutes;
1903
- }
1904
-
1905
- var off = tzMinutes,
1906
- minutes = off % 60,
1907
- hours = (off - minutes) / 60,
1908
- iso = iso8601? ':':'',
1909
- tz = (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).slice(-2) + iso + ('0' + (minutes * 101).toString()).slice(-2);
1910
-
1911
- if(tz == '+00:00'){
1912
- return 'Z';
1913
- }
1914
- return tz;
1915
- };
1916
-
1917
- /**
1918
- * Get the number in minutes that represents a timezone string
1919
- * @param string formated like "+0500", "-1245"
1920
- * @return number
1921
- */
1922
- $.timepicker.timezoneOffsetNumber = function(tzString) {
1923
- tzString = tzString.toString().replace(':',''); // excuse any iso8601, end up with "+1245"
1924
-
1925
- if(tzString.toUpperCase() === 'Z'){ // if iso8601 with Z, its 0 minute offset
1926
- return 0;
1927
- }
1928
-
1929
- if(!/^(\-|\+)\d{4}$/.test(tzString)){ // possibly a user defined tz, so just give it back
1930
- return tzString;
1931
- }
1932
-
1933
- return ((tzString.substr(0,1) =='-'? -1 : 1) * // plus or minus
1934
- ((parseInt(tzString.substr(1,2),10)*60) + // hours (converted to minutes)
1935
- parseInt(tzString.substr(3,2),10))); // minutes
1936
- };
1937
-
1938
- /**
1939
- * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)
1940
- * @param date
1941
- * @param string formated like "+0500", "-1245"
1942
- * @return date
1943
- */
1944
- $.timepicker.timezoneAdjust = function(date, toTimezone) {
1945
- var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
1946
- if(!isNaN(toTz)){
1947
- var currTz = date.getTimezoneOffset()*-1,
1948
- diff = currTz - toTz; // difference in minutes
1949
-
1950
- date.setMinutes(date.getMinutes()+diff);
1951
- }
1952
- return date;
1953
- };
1954
-
1955
- /**
1956
- * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to
1957
- * enforce date range limits.
1958
- * n.b. The input value must be correctly formatted (reformatting is not supported)
1959
- * @param Element startTime
1960
- * @param Element endTime
1961
- * @param obj options Options for the timepicker() call
1962
- * @return jQuery
1963
- */
1964
- $.timepicker.timeRange = function(startTime, endTime, options) {
1965
- return $.timepicker.handleRange('timepicker', startTime, endTime, options);
1966
- };
1967
-
1968
- /**
1969
- * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to
1970
- * enforce date range limits.
1971
- * @param Element startTime
1972
- * @param Element endTime
1973
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
1974
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
1975
- * @param string method Can be used to specify the type of picker to be added
1976
- * @return jQuery
1977
- */
1978
- $.timepicker.datetimeRange = function(startTime, endTime, options) {
1979
- $.timepicker.handleRange('datetimepicker', startTime, endTime, options);
1980
- };
1981
-
1982
- /**
1983
- * Calls `method` on the `startTime` and `endTime` elements, and configures them to
1984
- * enforce date range limits.
1985
- * @param Element startTime
1986
- * @param Element endTime
1987
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
1988
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
1989
- * @return jQuery
1990
- */
1991
- $.timepicker.dateRange = function(startTime, endTime, options) {
1992
- $.timepicker.handleRange('datepicker', startTime, endTime, options);
1993
- };
1994
-
1995
- /**
1996
- * Calls `method` on the `startTime` and `endTime` elements, and configures them to
1997
- * enforce date range limits.
1998
- * @param string method Can be used to specify the type of picker to be added
1999
- * @param Element startTime
2000
- * @param Element endTime
2001
- * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
2002
- * a boolean value that can be used to reformat the input values to the `dateFormat`.
2003
- * @return jQuery
2004
- */
2005
- $.timepicker.handleRange = function(method, startTime, endTime, options) {
2006
- options = $.extend({}, {
2007
- minInterval: 0, // min allowed interval in milliseconds
2008
- maxInterval: 0, // max allowed interval in milliseconds
2009
- start: {}, // options for start picker
2010
- end: {} // options for end picker
2011
- }, options);
2012
-
2013
- $.fn[method].call(startTime, $.extend({
2014
- onClose: function(dateText, inst) {
2015
- checkDates($(this), endTime);
2016
- },
2017
- onSelect: function(selectedDateTime) {
2018
- selected($(this), endTime, 'minDate');
2019
- }
2020
- }, options, options.start));
2021
- $.fn[method].call(endTime, $.extend({
2022
- onClose: function(dateText, inst) {
2023
- checkDates($(this), startTime);
2024
- },
2025
- onSelect: function(selectedDateTime) {
2026
- selected($(this), startTime, 'maxDate');
2027
- }
2028
- }, options, options.end));
2029
-
2030
- checkDates(startTime, endTime);
2031
- selected(startTime, endTime, 'minDate');
2032
- selected(endTime, startTime, 'maxDate');
2033
-
2034
- function checkDates(changed, other) {
2035
- var startdt = startTime[method]('getDate'),
2036
- enddt = endTime[method]('getDate'),
2037
- changeddt = changed[method]('getDate');
2038
-
2039
- if(startdt !== null){
2040
- var minDate = new Date(startdt.getTime()),
2041
- maxDate = new Date(startdt.getTime());
2042
-
2043
- minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);
2044
- maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);
2045
-
2046
- if(options.minInterval > 0 && minDate > enddt){ // minInterval check
2047
- endTime[method]('setDate',minDate);
2048
- }
2049
- else if(options.maxInterval > 0 && maxDate < enddt){ // max interval check
2050
- endTime[method]('setDate',maxDate);
2051
- }
2052
- else if (startdt > enddt) {
2053
- other[method]('setDate',changeddt);
2054
- }
2055
- }
2056
- }
2057
-
2058
- function selected(changed, other, option) {
2059
- if (!changed.val()) {
2060
- return;
2061
- }
2062
- var date = changed[method].call(changed, 'getDate');
2063
- if(date !== null && options.minInterval > 0){
2064
- if(option == 'minDate'){
2065
- date.setMilliseconds(date.getMilliseconds() + options.minInterval);
2066
- }
2067
- if(option == 'maxDate'){
2068
- date.setMilliseconds(date.getMilliseconds() - options.minInterval);
2069
- }
2070
- }
2071
- if (date.getTime) {
2072
- other[method].call(other, 'option', option, date);
2073
- }
2074
- }
2075
- return $([startTime.get(0), endTime.get(0)]);
2076
- };
2077
-
2078
- /**
2079
- * Log error or data to the console during error or debugging
2080
- * @param Object err pass any type object to log to the console during error or debugging
2081
- * @return void
2082
- */
2083
- $.timepicker.log = function(err){
2084
- if(window.console){
2085
- console.log(err);
2086
- }
2087
- };
2088
-
2089
- /*
2090
- * Rough microsecond support
2091
- */
2092
- if(!Date.prototype.getMicroseconds){
2093
- Date.microseconds = 0;
2094
- Date.prototype.getMicroseconds = function(){ return this.microseconds; };
2095
- Date.prototype.setMicroseconds = function(m){ this.microseconds = m; return this; };
2096
- }
2097
-
2098
- /*
2099
- * Keep up with the version
2100
- */
2101
- $.timepicker.version = "1.3";
2102
-
2103
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/js/jquery-ui.min.js DELETED
@@ -1,12 +0,0 @@
1
- /*! jQuery UI - v1.10.3 - 2013-05-03
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
4
- * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
5
- (function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)
6
- },this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;
7
- this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))
8
- },_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;
9
- case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,E,N,W,O,F,R,L=new Date,j=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:j,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,E=this._daylightSavingAdjust(new Date(te,Z,1-z)),N=0;H>N;N++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],F=E.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>E||J&&E>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(E.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===E.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(E.getTime()===$.getTime()?" "+this._currentClass:"")+(E.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===j.getTime()?" ui-state-highlight":"")+(E.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}
10
- }var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()
11
- },value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);
12
- if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
inc/js/widget-js.js DELETED
@@ -1,34 +0,0 @@
1
- jQuery(function() {
2
- ujidatapick();
3
- ujilink();
4
-
5
- });
6
-
7
- function ujidatapick(){
8
- jQuery('.UJI_date').each(function() {
9
- jQuery(this).datetimepicker({
10
- timeFormat: 'hh:mm',
11
- dateFormat: 'yy/mm/dd'
12
- });
13
- //jQuery(this).trigger("click");
14
- });
15
- }
16
-
17
- function ujilink(){
18
- jQuery('.ujic_link').each(function() {
19
- jQuery(this).keyup(function () {
20
- var value = jQuery(this).val();
21
- var cname = jQuery(this).parent().parent().find('.ujic_exp').attr("name");
22
- jQuery(this).parent().parent().find('.ujic_exp').css('border', 'red');
23
- //alert(cname);
24
-
25
- if(value){
26
- jQuery('input[name="'+cname+'"]').attr('checked', false);
27
- }else{
28
-
29
- jQuery('input[name="'+cname+'"]').attr('checked', true);
30
- }
31
-
32
- });
33
- });
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/countdown.js DELETED
@@ -1,58 +0,0 @@
1
- var uji_plugin = ujiCount.uji_plugin;
2
-
3
- var expire = ujiCount.expire;
4
-
5
- var Years = ujiCount.Years;
6
- var Months = ujiCount.Months;
7
- var Weeks = ujiCount.Weeks;
8
- var Days = ujiCount.Days;
9
- var Hours = ujiCount.Hours;
10
- var Minutes = ujiCount.Minutes;
11
- var Seconds = ujiCount.Seconds;
12
-
13
- var Year = ujiCount.Year;
14
- var Month = ujiCount.Month;
15
- var Week = ujiCount.Week;
16
- var Day = ujiCount.Day;
17
- var Hour = ujiCount.Hour;
18
- var Minute = ujiCount.Minute;
19
- var Second = ujiCount.Second;
20
-
21
- var ujic_txt_size = ujiCount.ujic_txt_size;
22
- var ujic_col_dw = ujiCount.ujic_col_dw;
23
- var ujic_col_up = ujiCount.ujic_col_up;
24
- var ujic_col_txt = ujiCount.ujic_col_txt;
25
- var ujic_col_sw = ujiCount.ujic_col_sw;
26
- var ujic_txt = (ujiCount.ujic_txt == "true") ? true : false ;
27
- var ujic_ani = (ujiCount.ujic_ani == "true") ? true : false ;
28
- var ujic_url = (ujiCount.ujic_url) ? ujiCount.ujic_url : false;
29
-
30
- var uji_center = ujiCount.uji_center;
31
-
32
- jQuery(document).ready(function($){
33
-
34
- var austDay = new Date(''+ expire +'');
35
- jQuery.countdown.regional["uji"] = {
36
- labels: [''+ Years +'', ''+ Months +'', ''+ Weeks +'', ''+ Days +'', ''+ Hours +'', ''+ Minutes +'', ''+ Seconds +''],
37
- labels1: [''+ Year +'', ''+ Month +'', ''+ Week +'', ''+ Day +'', ''+ Hour +'', ''+ Minute +'', ''+ Second +''],
38
- compactLabels: ["A", "L", "S", "Z"],
39
- whichLabels: null,
40
- timeSeparator: ':', isRTL: false};
41
- jQuery.countdown.setDefaults(jQuery.countdown.regional["uji"]);
42
- jQuery("#ujiCountdown").countdown({until: austDay, serverSync: serverTime, text_size: ''+ ujic_txt_size +'', color_down: ''+ ujic_col_dw +'', color_up: ''+ ujic_col_up +'', color_txt: ''+ ujic_col_txt +'', color_sw: ''+ ujic_col_sw +'', ujic_txt: ujic_txt, animate_sec: ujic_ani, ujic_url: ''+ ujic_url +'' });
43
- if(uji_center && uji_center!='')
44
- jQuery("#ujiCountdown").css({"width": (jQuery("#ujiCountdown").width()+5)+"px", "padding-left": "10px", "display": "block"});
45
- });
46
-
47
- // Get Server Time
48
- function serverTime() {
49
- var time = null;
50
- jQuery.ajax({url: uji_plugin + '/js/serverTime.php',
51
- async: false, dataType: 'text',
52
- success: function(text) {
53
- time = new Date(text);
54
- }, error: function(http, message, exc) {
55
- time = new Date();
56
- }});
57
- return time;
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.countdown.js CHANGED
@@ -1 +1 @@
1
- (function(e){function t(){function r(e){var o=e<1e12?n?performance.now()+performance.timing.navigationStart:t():e||t();if(o-s>=1e3){c._updateTargets();s=o}i(r)}this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:false};this._defaults={text_size:"35",animate_sec:false,color_down:"#3A3A3A",color_up:"#635b63",color_txt:"#ffffff",color_sw:"#000000",ujic_txt:true,ujic_url:false,until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1};e.extend(this._defaults,this.regional[""]);this._serverSyncs=[];var t=typeof Date.now=="function"?Date.now:function(){return(new Date).getTime()};var n=window.performance&&typeof window.performance.now=="function";var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var s=0;if(!i||e.noRequestAnimationFrame){e.noRequestAnimationFrame=null;setInterval(function(){c._updateTargets()},980)}else{s=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||t();i(r)}}function l(t,n){if(t=="option"&&(n.length==0||n.length==1&&typeof n[0]=="string")){return true}return e.inArray(t,f)>-1}var n=0;var r=1;var i=2;var s=3;var o=4;var u=5;var a=6;e.extend(t.prototype,{markerClassName:"hasCountdown",propertyName:"countdown",_rtlClass:"countdown_rtl",_sectionClass:"countdown_section",_amountClass:"countdown_amount",_rowClass:"countdown_row",_holdingClass:"countdown_holding",_showClass:"countdown_show",_descrClass:"countdown_descr",_timerTargets:[],setDefaults:function(t){this._resetExtraLabels(this._defaults,t);e.extend(this._defaults,t||{})},UTCDate:function(e,t,n,r,i,s,o,u){if(typeof t=="object"&&t.constructor==Date){u=t.getMilliseconds();o=t.getSeconds();s=t.getMinutes();i=t.getHours();r=t.getDate();n=t.getMonth();t=t.getFullYear()}var a=new Date;a.setUTCFullYear(t);a.setUTCDate(1);a.setUTCMonth(n||0);a.setUTCDate(r||1);a.setUTCHours(i||0);a.setUTCMinutes((s||0)-(Math.abs(e)<30?e*60:e));a.setUTCSeconds(o||0);a.setUTCMilliseconds(u||0);return a},periodsToSeconds:function(e){return e[0]*31557600+e[1]*2629800+e[2]*604800+e[3]*86400+e[4]*3600+e[5]*60+e[6]},_attachPlugin:function(t,n){t=e(t);if(t.hasClass(this.markerClassName)){return}var r={options:e.extend({},this._defaults),_periods:[0,0,0,0,0,0,0]};t.addClass(this.markerClassName).data(this.propertyName,r);this._optionPlugin(t,n)},_addTarget:function(e){if(!this._hasTarget(e)){this._timerTargets.push(e)}},_hasTarget:function(t){return e.inArray(t,this._timerTargets)>-1},_removeTarget:function(t){this._timerTargets=e.map(this._timerTargets,function(e){return e==t?null:e})},_updateTargets:function(){for(var e=this._timerTargets.length-1;e>=0;e--){this._updateCountdown(this._timerTargets[e])}},_optionPlugin:function(t,n,r){t=e(t);var i=t.data(this.propertyName);if(!n||typeof n=="string"&&r==null){var s=n;n=(i||{}).options;return n&&s?n[s]:n}if(!t.hasClass(this.markerClassName)){return}n=n||{};if(typeof n=="string"){var s=n;n={};n[s]=r}if(n.layout){n.layout=n.layout.replace(/&lt;/g,"<").replace(/&gt;/g,">")}this._resetExtraLabels(i.options,n);var o=i.options.timezone!=n.timezone;e.extend(i.options,n);this._adjustSettings(t,i,n.until!=null||n.since!=null||o);var u=new Date;if(i._since&&i._since<u||i._until&&i._until>u){this._addTarget(t[0])}this._updateCountdown(t,i)},_updateCountdown:function(t,n){var r=e(t);n=n||r.data(this.propertyName);if(!n){return}r.html(this._generateHTML(n)).toggleClass(this._rtlClass,n.options.isRTL);var i=n.options.ujic_url;var s=n.options.until;var o=new Date;var u=parseInt(o.getTime()/1e3);var a=parseInt(s.getTime()/1e3)-2;if(i=="false")i=false;if(i&&u>a){window.location.replace(i)}var f=n.options.color_down;var l=n.options.color_up;jQuery("#ujiCountdown .countdown_amount").css("background","-moz-linear-gradient(top, "+l+" 50%, "+f+" 50%)");jQuery("#ujiCountdown .countdown_amount").css("background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,"+l+"), color-stop(50%,"+f+"))");jQuery("#ujiCountdown .countdown_amount").css("background","-webkit-linear-gradient(top, "+l+" 50%,"+f+" 50%)");jQuery("#ujiCountdown .countdown_amount").css("background","-o-linear-gradient(top, "+l+" 50%,"+f+" 50%)");jQuery("#ujiCountdown .countdown_amount").css("background","-ms-linear-gradient(top, "+l+" 50%,"+f+" 50%)");jQuery("#ujiCountdown .countdown_amount").css("background","linear-gradient(to bottom, "+l+" 50%,"+f+" 50%)");jQuery("#ujiCountdown .countdown_amount").css("filter","progid:DXImageTransform.Microsoft.gradient( startColorstr='"+l+"', endColorstr='"+f+"',GradientType=0 )");var c=n.options.color_txt;var h=n.options.color_sw;jQuery("#ujiCountdown .countdown_amount").css("color",c);jQuery("#ujiCountdown .countdown_amount").css("text-shadow","1px 1px 1px "+h);var p=n.options.ujic_txt;if(p){jQuery("#ujiCountdown .countdown_txt").css("display","block")}else{jQuery("#ujiCountdown .countdown_txt").css("display","none")}var d=n.options.text_size;var v=0;switch(parseInt(d)){case 10:v=5;break;case 11:v=3;break;case 12:v=3;break;case 13:v=1;break}jQuery("#ujiCountdown .countdown_amount").css("font",d+"px/1.5 'Open Sans Condensed',sans-serif");if(d<15){jQuery("#ujiCountdown .countdown_amount").css({padding:"2px 5px","margin-right":"1px"});jQuery("#ujiCountdown .countdown_section").css("margin","0px 6px 0px 0px");jQuery("#ujiCountdown .countdown_txt").css("font","9px 'Open Sans Condensed',sans-serif")}var m=n.options.animate_sec;if(m){var g=jQuery("#ujiCountdown").find("#uji_sec").find(".countdown_section").width();jQuery("#ujiCountdown").find("#uji_sec").find(".countdown_section").css({width:g+"px"});jQuery("#ujiCountdown").find("#uji_sec").find(".countdown_amount").eq(1).css({top:"-74px",right:0,position:"absolute",opacity:1});jQuery("#ujiCountdown").find("#uji_sec").find(".countdown_amount").eq(1).animate({top:v+"px",right:0,opacity:1},700,function(){jQuery("#ujiCountdown").find("#uji_sec").find(".countdown_amount").eq(1).animate({opacity:0},300)})}if(e.isFunction(n.options.onTick)){var y=n._hold!="lap"?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date);if(n.options.tickInterval==1||this.periodsToSeconds(y)%n.options.tickInterval==0){n.options.onTick.apply(t,[y])}}var b=n._hold!="pause"&&(n._since?n._now.getTime()<n._since.getTime():n._now.getTime()>=n._until.getTime());if(b&&!n._expiring){n._expiring=true;if(this._hasTarget(t)||n.options.alwaysExpire){this._removeTarget(t);if(e.isFunction(n.options.onExpiry)){n.options.onExpiry.apply(t,[])}if(n.options.expiryText){var w=n.options.layout;n.options.layout=n.options.expiryText;this._updateCountdown(t,n);n.options.layout=w}if(n.options.expiryUrl){window.location=n.options.expiryUrl}}n._expiring=false}else if(n._hold=="pause"){this._removeTarget(t)}r.data(this.propertyName,n)},_resetExtraLabels:function(e,t){var n=false;for(var r in t){if(r!="whichLabels"&&r.match(/[Ll]abels/)){n=true;break}}if(n){for(var r in e){if(r.match(/[Ll]abels[02-9]|compactLabels1/)){e[r]=null}}}},_adjustSettings:function(t,n,r){var i;var s=0;var o=null;for(var u=0;u<this._serverSyncs.length;u++){if(this._serverSyncs[u][0]==n.options.serverSync){o=this._serverSyncs[u][1];break}}if(o!=null){s=n.options.serverSync?o:0;i=new Date}else{var a=e.isFunction(n.options.serverSync)?n.options.serverSync.apply(t,[]):null;i=new Date;s=a?i.getTime()-a.getTime():0;this._serverSyncs.push([n.options.serverSync,s])}var f=n.options.timezone;f=f==null?-i.getTimezoneOffset():f;if(r||!r&&n._until==null&&n._since==null){n._since=n.options.since;if(n._since!=null){n._since=this.UTCDate(f,this._determineTime(n._since,null));if(n._since&&s){n._since.setMilliseconds(n._since.getMilliseconds()+s)}}n._until=this.UTCDate(f,this._determineTime(n.options.until,i));if(s){n._until.setMilliseconds(n._until.getMilliseconds()+s)}}n._show=this._determineShow(n)},_destroyPlugin:function(t){t=e(t);if(!t.hasClass(this.markerClassName)){return}this._removeTarget(t[0]);t.removeClass(this.markerClassName).empty().removeData(this.propertyName)},_pausePlugin:function(e){this._hold(e,"pause")},_lapPlugin:function(e){this._hold(e,"lap")},_resumePlugin:function(e){this._hold(e,null)},_hold:function(t,n){var r=e.data(t,this.propertyName);if(r){if(r._hold=="pause"&&!n){r._periods=r._savePeriods;var i=r._since?"-":"+";r[r._since?"_since":"_until"]=this._determineTime(i+r._periods[0]+"y"+i+r._periods[1]+"o"+i+r._periods[2]+"w"+i+r._periods[3]+"d"+i+r._periods[4]+"h"+i+r._periods[5]+"m"+i+r._periods[6]+"s");this._addTarget(t)}r._hold=n;r._savePeriods=n=="pause"?r._periods:null;e.data(t,this.propertyName,r);this._updateCountdown(t,r)}},_getTimesPlugin:function(t){var n=e.data(t,this.propertyName);return!n?null:n._hold=="pause"?n._savePeriods:!n._hold?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date)},_determineTime:function(e,t){var n=function(e){var t=new Date;t.setTime(t.getTime()+e*1e3);return t};var r=function(e){e=e.toLowerCase();var t=new Date;var n=t.getFullYear();var r=t.getMonth();var i=t.getDate();var s=t.getHours();var o=t.getMinutes();var u=t.getSeconds();var a=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var f=a.exec(e);while(f){switch(f[2]||"s"){case"s":u+=parseInt(f[1],10);break;case"m":o+=parseInt(f[1],10);break;case"h":s+=parseInt(f[1],10);break;case"d":i+=parseInt(f[1],10);break;case"w":i+=parseInt(f[1],10)*7;break;case"o":r+=parseInt(f[1],10);i=Math.min(i,c._getDaysInMonth(n,r));break;case"y":n+=parseInt(f[1],10);i=Math.min(i,c._getDaysInMonth(n,r));break}f=a.exec(e)}return new Date(n,r,i,s,o,u,0)};var i=e==null?t:typeof e=="string"?r(e):typeof e=="number"?n(e):e;if(i)i.setMilliseconds(0);return i},_getDaysInMonth:function(e,t){return 32-(new Date(e,t,32)).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var f=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);var l=false;var c=0;var h=t.options.significant;var p=e.extend({},t._show);for(var d=n;d<=a;d++){l|=t._show[d]=="?"&&t._periods[d]>0;p[d]=t._show[d]=="?"&&!l?null:t._show[d];c+=p[d]?1:0;h-=t._periods[d]>0?1:0}var v=[false,false,false,false,false,false,false];for(var d=a;d>=n;d--){if(t._show[d]){if(t._periods[d]){v[d]=true}else{v[d]=h>0;h--}}}var m=t.options.compact?t.options.compactLabels:t.options.labels;var g=t.options.whichLabels||this._normalLabels;var y=function(e){var n=t.options["compactLabels"+g(t._periods[e])];return p[e]?f._translateDigits(t,t._periods[e])+(n?n[e]:m[e])+" ":""};var b=function(e){var n=t.options["labels"+g(t._periods[e])];if(!x&&p[e]||x&&v[e]){var r="";if(t._periods[e].toString().length==1){r='<span class="countdown_amount">'+0+"</span>"+'<span class="countdown_amount">'+t._periods[e]+"</span>"}else{for(var i=0;i<t._periods[e].toString().length;i++){r+='<span class="countdown_amount">'+t._periods[e].toString().charAt(i)+"</span>"}}return'<span class="countdown_section">'+r+'<span class="countdown_txt">'+(n?n[e]:m[e])+"</span></span>"}else{return""}};var w=t.options.layout;var E=t.options.compact;var x=t.options.significant;var T=t.options.description;return w?this._buildLayout(t,p,w,E,x,v):(E?'<span class="countdown_row countdown_amount'+(t._hold?" countdown_holding":"")+'">'+y(n)+y(r)+y(i)+y(s)+(p[o]?this._minDigits(t._periods[o],2):"")+(p[u]?(p[o]?timeSeparator:"")+this._minDigits(t._periods[u],2):"")+(p[a]?(p[o]||p[u]?timeSeparator:"")+this._minDigits(t._periods[a],2):""):'<span class="countdown_row countdown_show'+(x||c)+(t._hold?" countdown_holding":"")+'">'+b(n)+b(r)+b(i)+b(s)+b(o)+b(u)+'<span id="uji_sec">'+b(a))+"</span>"+"</span>"+(T?'<span class="countdown_row countdown_descr">'+T+"</span>":"")},_buildLayout:function(t,f,l,c,h,p){var d=t.options[c?"compactLabels":"labels"];var v=t.options.whichLabels||this._normalLabels;var m=function(e){return(t.options[(c?"compactLabels":"labels")+v(t._periods[e])]||d)[e]};var g=function(e,n){return t.options.digits[Math.floor(e/n)%10]};var y={desc:t.options.description,sep:t.options.timeSeparator,yl:m(n),yn:this._minDigits(t,t._periods[n],1),ynn:this._minDigits(t,t._periods[n],2),ynnn:this._minDigits(t,t._periods[n],3),y1:g(t._periods[n],1),y10:g(t._periods[n],10),y100:g(t._periods[n],100),y1000:g(t._periods[n],1e3),ol:m(r),on:this._minDigits(t,t._periods[r],1),onn:this._minDigits(t,t._periods[r],2),onnn:this._minDigits(t,t._periods[r],3),o1:g(t._periods[r],1),o10:g(t._periods[r],10),o100:g(t._periods[r],100),o1000:g(t._periods[r],1e3),wl:m(i),wn:this._minDigits(t,t._periods[i],1),wnn:this._minDigits(t,t._periods[i],2),wnnn:this._minDigits(t,t._periods[i],3),w1:g(t._periods[i],1),w10:g(t._periods[i],10),w100:g(t._periods[i],100),w1000:g(t._periods[i],1e3),dl:m(s),dn:this._minDigits(t,t._periods[s],1),dnn:this._minDigits(t,t._periods[s],2),dnnn:this._minDigits(t,t._periods[s],3),d1:g(t._periods[s],1),d10:g(t._periods[s],10),d100:g(t._periods[s],100),d1000:g(t._periods[s],1e3),hl:m(o),hn:this._minDigits(t,t._periods[o],1),hnn:this._minDigits(t,t._periods[o],2),hnnn:this._minDigits(t,t._periods[o],3),h1:g(t._periods[o],1),h10:g(t._periods[o],10),h100:g(t._periods[o],100),h1000:g(t._periods[o],1e3),ml:m(u),mn:this._minDigits(t,t._periods[u],1),mnn:this._minDigits(t,t._periods[u],2),mnnn:this._minDigits(t,t._periods[u],3),m1:g(t._periods[u],1),m10:g(t._periods[u],10),m100:g(t._periods[u],100),m1000:g(t._periods[u],1e3),sl:m(a),sn:this._minDigits(t,t._periods[a],1),snn:this._minDigits(t,t._periods[a],2),snnn:this._minDigits(t,t._periods[a],3),s1:g(t._periods[a],1),s10:g(t._periods[a],10),s100:g(t._periods[a],100),s1000:g(t._periods[a],1e3)};var b=l;for(var w=n;w<=a;w++){var E="yowdhms".charAt(w);var x=new RegExp("\\{"+E+"<\\}([\\s\\S]*)\\{"+E+">\\}","g");b=b.replace(x,!h&&f[w]||h&&p[w]?"$1":"")}e.each(y,function(e,t){var n=new RegExp("\\{"+e+"\\}","g");b=b.replace(n,t)});return b},_minDigits:function(e,t,n){t=""+t;if(t.length>=n){return this._translateDigits(e,t)}t="0000000000"+t;return this._translateDigits(e,t.substr(t.length-n))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format;var f=[];f[n]=t.match("y")?"?":t.match("Y")?"!":null;f[r]=t.match("o")?"?":t.match("O")?"!":null;f[i]=t.match("w")?"?":t.match("W")?"!":null;f[s]=t.match("d")?"?":t.match("D")?"!":null;f[o]=t.match("h")?"?":t.match("H")?"!":null;f[u]=t.match("m")?"?":t.match("M")?"!":null;f[a]=t.match("s")?"?":t.match("S")?"!":null;return f},_calculatePeriods:function(e,t,f,l){e._now=l;e._now.setMilliseconds(0);var h=new Date(e._now.getTime());if(e._since){if(l.getTime()<e._since.getTime()){e._now=l=h}else{l=e._since}}else{h.setTime(e._until.getTime());if(l.getTime()>e._until.getTime()){e._now=l=h}}var p=[0,0,0,0,0,0,0];if(t[n]||t[r]){var d=c._getDaysInMonth(l.getFullYear(),l.getMonth());var v=c._getDaysInMonth(h.getFullYear(),h.getMonth());var m=h.getDate()==l.getDate()||h.getDate()>=Math.min(d,v)&&l.getDate()>=Math.min(d,v);var g=function(e){return(e.getHours()*60+e.getMinutes())*60+e.getSeconds()};var y=Math.max(0,(h.getFullYear()-l.getFullYear())*12+h.getMonth()-l.getMonth()+(h.getDate()<l.getDate()&&!m||m&&g(h)<g(l)?-1:0));p[n]=t[n]?Math.floor(y/12):0;p[r]=t[r]?y-p[n]*12:0;l=new Date(l.getTime());var b=l.getDate()==d;var w=c._getDaysInMonth(l.getFullYear()+p[n],l.getMonth()+p[r]);if(l.getDate()>w){l.setDate(w)}l.setFullYear(l.getFullYear()+p[n]);l.setMonth(l.getMonth()+p[r]);if(b){l.setDate(w)}}var E=Math.floor((h.getTime()-l.getTime())/1e3);var x=function(e,n){p[e]=t[e]?Math.floor(E/n):0;E-=p[e]*n};x(i,604800);x(s,86400);x(o,3600);x(u,60);x(a,1);if(E>0&&!e._since){var T=[1,12,4.3482,7,24,60,60];var N=a;var C=1;for(var k=a;k>=n;k--){if(t[k]){if(p[N]>=C){p[N]=0;E=1}if(E>0){p[k]++;E=0;N=k;C=1}}C*=T[k]}}if(f){for(var k=n;k<=a;k++){if(f&&p[k]){f--}else if(!f){p[k]=0}}}return p}});var f=["getTimes"];e.fn.countdown=function(e){var t=Array.prototype.slice.call(arguments,1);if(l(e,t)){return c["_"+e+"Plugin"].apply(c,[this[0]].concat(t))}return this.each(function(){if(typeof e=="string"){if(!c["_"+e+"Plugin"]){throw"Unknown command: "+e}c["_"+e+"Plugin"].apply(c,[this].concat(t))}else{c._attachPlugin(this,e||{})}})};var c=e.countdown=new t})(jQuery)
1
+ (function(){var e,t;jQuery.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}};e=jQuery.uaMatch(navigator.userAgent);t={};if(e.browser){t[e.browser]=true;t.version=e.version}if(t.chrome){t.webkit=true}else if(t.webkit){t.safari=true}jQuery.browser=t})();(function(){var e=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function t(n){function o(){if(!e&&this._init){this._init.apply(this,arguments)}}var r=this.prototype;e=true;var i=new this;e=false;for(var s in n){i[s]=typeof n[s]=="function"&&typeof r[s]=="function"?function(e,t){return function(){var n=this._super;this._super=function(t){return r[e].apply(this,t)};var i=t.apply(this,arguments);this._super=n;return i}}(s,n[s]):n[s]}o.prototype=i;o.prototype.constructor=o;o.extend=t;return o}})();(function($){function camelCase(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this;$.fn[e]=function(t){var n=Array.prototype.slice.call(arguments,1);if($[e]._isNotChained(t,n)){return $[e][t].apply($[e],[this[0]].concat(n))}return this.each(function(){if(typeof t==="string"){if(t[0]==="_"||!$[e][t]){throw"Unknown method: "+t}$[e][t].apply($[e],[this].concat(n))}else{$[e]._attach(this,t)}})}},setDefaults:function(e){$.extend(this.defaultOptions,e||{})},_isNotChained:function(e,t){if(e==="option"&&(t.length===0||t.length===1&&typeof t[0]==="string")){return true}return $.inArray(e,this._getters)>-1},_attach:function(e,t){e=$(e);if(e.hasClass(this._getMarker())){return}e.addClass(this._getMarker());t=$.extend({},this.defaultOptions,this._getMetadata(e),t||{});var n=$.extend({name:this.name,elem:e,options:t},this._instSettings(e,t));e.data(this.name,n);this._postAttach(e,n);this.option(e,t)},_instSettings:function(e,t){return{}},_postAttach:function(e,t){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/'/g,'"');data=data.replace(/([a-zA-Z0-9]+):/g,function(e,t,n){var r=data.substring(0,n).match(/"/g);return!r||r.length%2===0?'"'+t+'":':t+":"});data=$.parseJSON("{"+data+"}");for(var name in data){var value=data[name];if(typeof value==="string"&&value.match(/^new Date\((.*)\)$/)){data[name]=eval(value)}}return data}catch(e){return{}}},_getInst:function(e){return $(e).data(this.name)||{}},option:function(e,t,n){e=$(e);var r=e.data(this.name);if(!t||typeof t==="string"&&n==null){var i=(r||{}).options;return i&&t?i[t]:i}if(!e.hasClass(this._getMarker())){return}var i=t||{};if(typeof t==="string"){i={};i[t]=n}this._optionsChanged(e,r,i);$.extend(r.options,i)},_optionsChanged:function(e,t,n){},destroy:function(e){e=$(e);if(!e.hasClass(this._getMarker())){return}this._preDestroy(e,this._getInst(e));e.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(e,t){}});$.JQPlugin={createPlugin:function(e,t){if(typeof e==="object"){t=e;e="JQPlugin"}e=camelCase(e);var n=camelCase(t.name);JQClass.classes[n]=JQClass.classes[e].extend(t);new JQClass.classes[n]}}})(jQuery);(function(e){var t="countdown";var n=0;var r=1;var i=2;var s=3;var o=4;var u=5;var a=6;e.JQPlugin.createPlugin({name:t,defaultOptions:{ujic_style:"classic",text_size:"35",animate_sec:false,color_down:"#3A3A3A",color_up:"#635b63",color_txt:"#ffffff",color_sw:"#000000",color_lab:"#000000",lab_sz:"13",ujic_txt:true,ujic_url:false,ujic_goof:"'Open Sans Condensed',sans-serif",ujic_hide:false,until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,padZeroes:true,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:false}},_getters:["getTimes"],_rtlClass:t+"-rtl",_sectionClass:t+"-section",_amountClass:t+"-amount",_periodClass:t+"-period",_rowClass:t+"-row",_holdingClass:t+"-holding",_showClass:t+"-show",_descrClass:t+"-descr",_timerElems:[],_init:function(){function i(e){var u=e<1e12?r?performance.now()+performance.timing.navigationStart:n():e||n();if(u-o>=1e3){t._updateElems();o=u}s(i)}var t=this;this._super();this._serverSyncs=[];var n=typeof Date.now=="function"?Date.now:function(){return(new Date).getTime()};var r=window.performance&&typeof window.performance.now=="function";var s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var o=0;if(!s||e.noRequestAnimationFrame){e.noRequestAnimationFrame=null;setInterval(function(){t._updateElems()},980)}else{o=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||n();s(i)}},UTCDate:function(e,t,n,r,i,s,o,u){if(typeof t=="object"&&t.constructor==Date){u=t.getMilliseconds();o=t.getSeconds();s=t.getMinutes();i=t.getHours();r=t.getDate();n=t.getMonth();t=t.getFullYear()}var a=new Date;a.setUTCFullYear(t);a.setUTCDate(1);a.setUTCMonth(n||0);a.setUTCDate(r||1);a.setUTCHours(i||0);a.setUTCMinutes((s||0)-(Math.abs(e)<30?e*60:e));a.setUTCSeconds(o||0);a.setUTCMilliseconds(u||0);return a},periodsToSeconds:function(e){return e[0]*31557600+e[1]*2629800+e[2]*604800+e[3]*86400+e[4]*3600+e[5]*60+e[6]},_instSettings:function(e,t){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(e){if(!this._hasElem(e)){this._timerElems.push(e)}},_hasElem:function(t){return e.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e==t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--){this._updateCountdown(this._timerElems[e])}},_optionsChanged:function(t,n,r){if(r.layout){r.layout=r.layout.replace(/&lt;/g,"<").replace(/&gt;/g,">")}this._resetExtraLabels(n.options,r);var i=n.options.timezone!=r.timezone;e.extend(n.options,r);this._adjustSettings(t,n,r.until!=null||r.since!=null||i);var s=new Date;if(n._since&&n._since<s||n._until&&n._until>s){this._addElem(t[0])}this._updateCountdown(t,n)},_updateCountdown:function(t,n){t=t.jquery?t:e(t);n=n||t.data(this.name);if(!n){return}t.html(this._generateHTML(n)).toggleClass(this._rtlClass,n.options.isRTL);var r=n.options.ujic_style;if(r=="classic"){var i=n.options.color_down;var s=n.options.color_up;var o=n.options.ujic_goof;var u=navigator.userAgent.toLowerCase();jQuery.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());jQuery("#ujiCountdown"+" .countdown_amount").css("background","-moz-linear-gradient(top, "+s+" 50%, "+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-o-linear-gradient(top, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-ms-linear-gradient(top, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","linear-gradient(to bottom, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("filter","progid:DXImageTransform.Microsoft.gradient( startColorstr='"+s+"', endColorstr='"+i+"',GradientType=0 )");if(jQuery.browser.safari||jQuery.browser.chrome){jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-gradient(linear, left top, left bottom, color-stop(50%,"+s+"), color-stop(50%,"+i+"))");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-linear-gradient(top, "+s+" 50%,"+i+" 50%)")}jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").css("margin","0");if(jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").hasClass("uji_sec")){jQuery("#ujiCountdown").children(".countdown_row").children(".uji_sec").children(".countdown_section").css("margin","0")}var a=n.options.color_txt;var f=n.options.color_sw;jQuery("#ujiCountdown"+" .countdown_amount").css("color",a);jQuery("#ujiCountdown"+" .countdown_amount").css("text-shadow","1px 1px 1px "+f);var l=n.options.color_lab;jQuery("#ujiCountdown"+" .countdown_txt").css("color",l);var c=n.options.ujic_txt;var h=n.options.lab_sz;if(c){jQuery("#ujiCountdown"+" .countdown_txt").css("display","block");jQuery("#ujiCountdown"+" .countdown_txt").css("font",h+"px 'Open Sans Condensed',sans-serif")}else{jQuery("#ujiCountdown"+" .countdown_txt").css("display","none")}var p=n.options.text_size;var d=0;switch(parseInt(p)){case 10:d=5;break;case 11:d=3;break;case 12:d=3;break;case 13:d=1;break}jQuery("#ujiCountdown"+" .countdown_amount").css("font",p+"px/1.5 '"+o+"',sans-serif");if(o!="none")jQuery("#ujiCountdown"+" .countdown_amount").css("min-width",parseInt(p)-10+"px");if(p<15){jQuery("#ujiCountdown"+" .countdown_amount").css({padding:"2px 5px","margin-right":"1px"});jQuery("#ujiCountdown"+" .countdown_section").css("margin","0px 6px 0px 0px");jQuery("#ujiCountdown"+" .countdown_txt").css("font","9px 'Open Sans Condensed',sans-serif")}var v=n.options.animate_sec;if(v){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").css({"text-align":"center"});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).css({top:"-74px",position:"relative",opacity:1});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({top:d+"px",opacity:1},700,function(){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({opacity:0},300)})}}if(e.isFunction(n.options.onTick)){var m=n._hold!="lap"?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date);if(n.options.tickInterval==1||this.periodsToSeconds(m)%n.options.tickInterval==0){n.options.onTick.apply(t[0],[m])}}var g=n._hold!="pause"&&(n._since?n._now.getTime()<n._since.getTime():n._now.getTime()>=n._until.getTime());if(g&&!n._expiring){n._expiring=true;if(this._hasElem(t[0])||n.options.alwaysExpire){this._removeElem(t[0]);if(e.isFunction(n.options.onExpiry)){n.options.onExpiry.apply(t[0],[])}if(n.options.ujic_hide=="true"){jQuery("#ujiCountdown").remove()}if(n.options.expiryText){var y=n.options.layout;n.options.layout=n.options.expiryText;this._updateCountdown(t[0],n);n.options.layout=y}if(n.options.expiryUrl){window.location=n.options.expiryUrl}}n._expiring=false}else if(n._hold=="pause"){this._removeElem(t[0])}},_resetExtraLabels:function(e,t){var n=false;for(var r in t){if(r!="whichLabels"&&r.match(/[Ll]abels/)){n=true;break}}if(n){for(var r in e){if(r.match(/[Ll]abels[02-9]|compactLabels1/)){e[r]=null}}}},_adjustSettings:function(t,n,r){var i;var s=0;var o=null;for(var u=0;u<this._serverSyncs.length;u++){if(this._serverSyncs[u][0]==n.options.serverSync){o=this._serverSyncs[u][1];break}}if(o!=null){s=n.options.serverSync?o:0;i=new Date}else{var a=e.isFunction(n.options.serverSync)?n.options.serverSync.apply(t[0],[]):null;i=new Date;s=a?i.getTime()-a.getTime():0;this._serverSyncs.push([n.options.serverSync,s])}var f=n.options.timezone;f=f==null?-i.getTimezoneOffset():f;if(r||!r&&n._until==null&&n._since==null){n._since=n.options.since;if(n._since!=null){n._since=this.UTCDate(f,this._determineTime(n._since,null));if(n._since&&s){n._since.setMilliseconds(n._since.getMilliseconds()+s)}}n._until=this.UTCDate(f,this._determineTime(n.options.until,i));if(s){n._until.setMilliseconds(n._until.getMilliseconds()+s)}}n._show=this._determineShow(n)},_preDestroy:function(e,t){this._removeElem(e[0]);e.empty()},pause:function(e){this._hold(e,"pause")},lap:function(e){this._hold(e,"lap")},resume:function(e){this._hold(e,null)},toggle:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"pause":"resume"](t)},toggleLap:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"lap":"resume"](t)},_hold:function(t,n){var r=e.data(t,this.name);if(r){if(r._hold=="pause"&&!n){r._periods=r._savePeriods;var i=r._since?"-":"+";r[r._since?"_since":"_until"]=this._determineTime(i+r._periods[0]+"y"+i+r._periods[1]+"o"+i+r._periods[2]+"w"+i+r._periods[3]+"d"+i+r._periods[4]+"h"+i+r._periods[5]+"m"+i+r._periods[6]+"s");this._addElem(t)}r._hold=n;r._savePeriods=n=="pause"?r._periods:null;e.data(t,this.name,r);this._updateCountdown(t,r)}},getTimes:function(t){var n=e.data(t,this.name);return!n?null:n._hold=="pause"?n._savePeriods:!n._hold?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date)},_determineTime:function(e,t){var n=this;var r=function(e){var t=new Date;t.setTime(t.getTime()+e*1e3);return t};var i=function(e){e=e.toLowerCase();var t=new Date;var r=t.getFullYear();var i=t.getMonth();var s=t.getDate();var o=t.getHours();var u=t.getMinutes();var a=t.getSeconds();var f=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var l=f.exec(e);while(l){switch(l[2]||"s"){case"s":a+=parseInt(l[1],10);break;case"m":u+=parseInt(l[1],10);break;case"h":o+=parseInt(l[1],10);break;case"d":s+=parseInt(l[1],10);break;case"w":s+=parseInt(l[1],10)*7;break;case"o":i+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break;case"y":r+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break}l=f.exec(e)}return new Date(r,i,s,o,u,a,0)};var s=e==null?t:typeof e=="string"?i(e):typeof e=="number"?r(e):e;if(s)s.setMilliseconds(0);return s},_getDaysInMonth:function(e,t){return 32-(new Date(e,t,32)).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var f=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);var l=false;var c=0;var h=t.options.significant;var p=e.extend({},t._show);for(var d=n;d<=a;d++){l|=t._show[d]=="?"&&t._periods[d]>0;p[d]=t._show[d]=="?"&&!l?null:t._show[d];c+=p[d]?1:0;h-=t._periods[d]>0?1:0}var v=[false,false,false,false,false,false,false];for(var d=a;d>=n;d--){if(t._show[d]){if(t._periods[d]){v[d]=true}else{v[d]=h>0;h--}}}var m=t.options.compact?t.options.compactLabels:t.options.labels;var g=t.options.whichLabels||this._normalLabels;var y=function(e){var n=t.options["compactLabels"+g(t._periods[e])];return p[e]?f._translateDigits(t,t._periods[e])+(n?n[e]:m[e])+" ":""};var b=t.options.padZeroes?2:1;var w=function(e){var n=t.options["labels"+g(t._periods[e])];if(!N&&p[e]||N&&v[e]){var r="";if(t._periods[e].toString().length==1){r='<span class="countdown_amount">'+0+"</span>"+'<span class="countdown_amount">'+t._periods[e]+"</span>"}else{for(var i=0;i<t._periods[e].toString().length;i++){r+='<span class="countdown_amount">'+t._periods[e].toString().charAt(i)+"</span>"}}return'<span class="countdown_section">'+r+'<span class="countdown_txt">'+(n?n[e]:m[e])+"</span></span>"}else{return""}};var E=t.options.ujic_style;var x=t.options.layout;var T=t.options.compact;var N=t.options.significant;var C=t.options.description;if(E=="classic"){return x?this._buildLayout(t,p,x,T,N,v):(T?'<span class="countdown_row countdown_amount'+(t._hold?" countdown_holding":"")+'">'+y(n)+y(r)+y(i)+y(s)+(p[o]?this._minDigits(t._periods[o],2):"")+(p[u]?(p[o]?timeSeparator:"")+this._minDigits(t._periods[u],2):"")+(p[a]?(p[o]||p[u]?timeSeparator:"")+this._minDigits(t._periods[a],2):""):'<span class="countdown_row countdown_show'+(N||c)+(t._hold?" countdown_holding":"")+'">'+w(n)+w(r)+w(i)+w(s)+w(o)+w(u)+(w(a)?'<span class="uji_sec">'+w(a)+"</span>":""))+"</span>"+(C?'<span class="countdown_row countdown_descr">'+C+"</span>":"")}},_buildLayout:function(t,f,l,c,h,p){var d=t.options[c?"compactLabels":"labels"];var v=t.options.whichLabels||this._normalLabels;var m=function(e){return(t.options[(c?"compactLabels":"labels")+v(t._periods[e])]||d)[e]};var g=function(e,n){return t.options.digits[Math.floor(e/n)%10]};var y={desc:t.options.description,sep:t.options.timeSeparator,yl:m(n),yn:this._minDigits(t,t._periods[n],1),ynn:this._minDigits(t,t._periods[n],2),ynnn:this._minDigits(t,t._periods[n],3),y1:g(t._periods[n],1),y10:g(t._periods[n],10),y100:g(t._periods[n],100),y1000:g(t._periods[n],1e3),ol:m(r),on:this._minDigits(t,t._periods[r],1),onn:this._minDigits(t,t._periods[r],2),onnn:this._minDigits(t,t._periods[r],3),o1:g(t._periods[r],1),o10:g(t._periods[r],10),o100:g(t._periods[r],100),o1000:g(t._periods[r],1e3),wl:m(i),wn:this._minDigits(t,t._periods[i],1),wnn:this._minDigits(t,t._periods[i],2),wnnn:this._minDigits(t,t._periods[i],3),w1:g(t._periods[i],1),w10:g(t._periods[i],10),w100:g(t._periods[i],100),w1000:g(t._periods[i],1e3),dl:m(s),dn:this._minDigits(t,t._periods[s],1),dnn:this._minDigits(t,t._periods[s],2),dnnn:this._minDigits(t,t._periods[s],3),d1:g(t._periods[s],1),d10:g(t._periods[s],10),d100:g(t._periods[s],100),d1000:g(t._periods[s],1e3),hl:m(o),hn:this._minDigits(t,t._periods[o],1),hnn:this._minDigits(t,t._periods[o],2),hnnn:this._minDigits(t,t._periods[o],3),h1:g(t._periods[o],1),h10:g(t._periods[o],10),h100:g(t._periods[o],100),h1000:g(t._periods[o],1e3),ml:m(u),mn:this._minDigits(t,t._periods[u],1),mnn:this._minDigits(t,t._periods[u],2),mnnn:this._minDigits(t,t._periods[u],3),m1:g(t._periods[u],1),m10:g(t._periods[u],10),m100:g(t._periods[u],100),m1000:g(t._periods[u],1e3),sl:m(a),sn:this._minDigits(t,t._periods[a],1),snn:this._minDigits(t,t._periods[a],2),snnn:this._minDigits(t,t._periods[a],3),s1:g(t._periods[a],1),s10:g(t._periods[a],10),s100:g(t._periods[a],100),s1000:g(t._periods[a],1e3)};var b=l;for(var w=n;w<=a;w++){var E="yowdhms".charAt(w);var x=new RegExp("\\{"+E+"<\\}([\\s\\S]*)\\{"+E+">\\}","g");b=b.replace(x,!h&&f[w]||h&&p[w]?"$1":"")}e.each(y,function(e,t){var n=new RegExp("\\{"+e+"\\}","g");b=b.replace(n,t)});return b},_minDigits:function(e,t,n){t=""+t;if(t.length>=n){return this._translateDigits(e,t)}t="0000000000"+t;return this._translateDigits(e,t.substr(t.length-n))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format;var f=[];f[n]=t.match("y")?"?":t.match("Y")?"!":null;f[r]=t.match("o")?"?":t.match("O")?"!":null;f[i]=t.match("w")?"?":t.match("W")?"!":null;f[s]=t.match("d")?"?":t.match("D")?"!":null;f[o]=t.match("h")?"?":t.match("H")?"!":null;f[u]=t.match("m")?"?":t.match("M")?"!":null;f[a]=t.match("s")?"?":t.match("S")?"!":null;return f},_calculatePeriods:function(e,t,f,l){e._now=l;e._now.setMilliseconds(0);var c=new Date(e._now.getTime());if(e._since){if(l.getTime()<e._since.getTime()){e._now=l=c}else{l=e._since}}else{c.setTime(e._until.getTime());if(l.getTime()>e._until.getTime()){e._now=l=c}}var h=[0,0,0,0,0,0,0];if(t[n]||t[r]){var p=this._getDaysInMonth(l.getFullYear(),l.getMonth());var d=this._getDaysInMonth(c.getFullYear(),c.getMonth());var v=c.getDate()==l.getDate()||c.getDate()>=Math.min(p,d)&&l.getDate()>=Math.min(p,d);var m=function(e){return(e.getHours()*60+e.getMinutes())*60+e.getSeconds()};var g=Math.max(0,(c.getFullYear()-l.getFullYear())*12+c.getMonth()-l.getMonth()+(c.getDate()<l.getDate()&&!v||v&&m(c)<m(l)?-1:0));h[n]=t[n]?Math.floor(g/12):0;h[r]=t[r]?g-h[n]*12:0;l=new Date(l.getTime());var y=l.getDate()==p;var b=this._getDaysInMonth(l.getFullYear()+h[n],l.getMonth()+h[r]);if(l.getDate()>b){l.setDate(b)}l.setFullYear(l.getFullYear()+h[n]);l.setMonth(l.getMonth()+h[r]);if(y){l.setDate(b)}}var w=Math.floor((c.getTime()-l.getTime())/1e3);var E=function(e,n){h[e]=t[e]?Math.floor(w/n):0;w-=h[e]*n};E(i,604800);E(s,86400);E(o,3600);E(u,60);E(a,1);if(w>0&&!e._since){var x=[1,12,4.3482,7,24,60,60];var T=a;var N=1;for(var C=a;C>=n;C--){if(t[C]){if(h[T]>=N){h[T]=0;w=1}if(w>0){h[C]++;w=0;T=C;N=1}}N*=x[C]}}if(f){for(var C=n;C<=a;C++){if(f&&h[C]){f--}else if(!f){h[C]=0}}}return h}})})(jQuery)
js/prev.countdown.js DELETED
@@ -1,48 +0,0 @@
1
- jQuery(function($) {
2
- init();
3
- jQuery('#ujic_txt').change(function() {
4
- if(jQuery('#ujic_txt').is(":checked")){
5
- jQuery('.countdown_txt').css("display","block");
6
- }else{
7
- jQuery('.countdown_txt').css("display","none");
8
- }
9
- });
10
-
11
- $('#ujic_txt_sz').change(function() {
12
- var size = jQuery('#ujic_txt_sz').val();
13
- jQuery( '.countdown_amount').css("font", size+"px/1.5 'Open Sans Condensed',sans-serif");
14
- });
15
-
16
- });
17
-
18
- function init(){
19
- /*-----box color---*/
20
- var color_down = jQuery( '#ujic_col_dw' ).val();
21
- var color_up = jQuery( '#ujic_col_up' ).val();
22
-
23
-
24
- jQuery( '.countdown_amount').css("background", "-moz-linear-gradient(top, "+color_up+" 50%, "+color_down+" 50%)"); /* FF3.6+ */
25
- jQuery( '.countdown_amount').css("background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,"+color_up+"), color-stop(50%,"+color_down+"))"); /* Chrome,Safari4+ */
26
- jQuery( '.countdown_amount').css("background", "-webkit-linear-gradient(top, "+color_up+" 50%,"+color_down+" 50%)"); /* Chrome10+,Safari5.1+ */
27
- jQuery( '.countdown_amount').css("background", "-o-linear-gradient(top, "+color_up+" 50%,"+color_down+" 50%)"); /* Opera 11.10+ */
28
- jQuery( '.countdown_amount').css("background", "-ms-linear-gradient(top, "+color_up+" 50%,"+color_down+" 50%)"); /* IE10+ */
29
- jQuery( '.countdown_amount').css("background", "linear-gradient(to bottom, "+color_up+" 50%,"+color_down+" 50%)"); /* W3C */
30
- jQuery( '.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='"+color_up+"', endColorstr='"+color_down+"',GradientType=0 )"); /* IE6-9 */
31
-
32
- /*-----text color---*/
33
- var color_txt = jQuery( '#ujic_col_txt' ).val();
34
- var color_sw = jQuery( '#ujic_col_sw' ).val();
35
-
36
- jQuery('.countdown_amount').css("color", color_txt);
37
- jQuery('.countdown_amount').css("text-shadow",'1px 1px 1px ' + color_sw);
38
- /*-----display time label text---*/
39
- if(jQuery('#ujic_txt').is(":checked")){
40
-
41
- jQuery('.countdown_txt').css("display","block");
42
- }else{
43
- jQuery('.countdown_txt').css("display","none");
44
- }
45
- /*-----font size---*/
46
- var size = jQuery('#ujic_txt_sz').val();
47
- jQuery( '.countdown_amount').css("font", size+"px/1.5 'Open Sans Condensed',sans-serif");
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/serverTime.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- $now = new DateTime();
3
- echo $now->format("M j, Y H:i:s O")."\n";
4
- ?>
 
 
 
 
js/uji-countdown.js ADDED
@@ -0,0 +1 @@
 
1
+ function serverTime(e){var t=null;t=new Date(e);var n=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());t=n;return t}(function(e){"use strict";e(function(){if(typeof ujiCount!=="undefined"){var t="ujiCount";var n=window[t];var r=n.uji_style;var i=n.uji_plugin;var s="ujiCountdown";var o=n.expire;var u=n.exp_days;var a=n.Years;var f=n.Months;var l=n.Weeks;var c=n.Days;var h=n.Hours;var p=n.Minutes;var d=n.Seconds;var v=n.Year;var m=n.Month;var g=n.Week;var y=n.Day;var b=n.Hour;var w=n.Minute;var E=n.Second;var S=n.ujic_txt_size;var x=n.ujic_col_dw;var T=n.ujic_col_up;var N=n.ujic_col_txt;var C=n.ujic_col_sw;var k=n.ujic_col_lab;var L=n.ujic_lab_sz;var A=n.ujic_y;var O=n.ujic_o;var M=n.ujic_w;var _=n.ujic_d;var D=n.ujic_h;var P=n.ujic_m;var H=n.ujic_s;var B=n.ujic_thick;var j=n.ujic_txt=="true"?true:false;var F=n.ujic_ani=="true"?true:false;var I="http://";var q=n.ujic_url?n.ujic_url.substr(0,I.length)!==I?I+n.ujic_url:n.ujic_url:"";var R=n.ujic_goof;var U=n.uji_center;var z=n.uji_time;var W=n.uji_hide;var X=n.ujic_resp;var V=n.ujic_rtl=="true"?true:false;var J=new Date(""+o+"");var K="";K+=A=="true"?"Y":"";K+=O=="true"?"O":"";K+=M=="true"?"W":"";K+=_=="true"?"D":"";K+=D=="true"?"H":"";K+=P=="true"?"M":"";K+=H=="true"?"S":"";var Q=[];if(A=="true")Q.push("uji_year");if(O=="true")Q.push("uji_mont");if(M=="true")Q.push("uji_week");if(_=="true")Q.push("uji_days");if(D=="true")Q.push("uji_hour");if(P=="true")Q.push("uji_minu");if(H=="true")Q.push("uji_secu");e.countdown.regionalOptions["uji"]={labels:[""+a+"",""+f+"",""+l+"",""+c+"",""+h+"",""+p+"",""+d+""],labels1:[""+v+"",""+m+"",""+g+"",""+y+"",""+b+"",""+w+"",""+E+""],compactLabels:["A","L","S","Z"],format:K,whichLabels:null,timeSeparator:":",isRTL:false};e.countdown.setDefaults(e.countdown.regionalOptions["uji"]);if(R){var G=R.replace(/\s+/g,"+");e("head").append('<link href="http://fonts.googleapis.com/css?family='+G+'" rel="stylesheet" type="text/css">')}e("#"+s).countdown({until:J,serverSync:serverTime(z),isRTL:V,text_size:""+S+"",color_down:""+x+"",color_up:""+T+"",color_txt:""+N+"",color_sw:""+C+"",color_lab:""+k+"",lab_sz:""+L+"",ujic_txt:j,animate_sec:F,ujic_hide:W,expiryUrl:q,ujic_goof:""+R+""})}})})(jQuery)
lang/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden ?>
lang/uji-countdown-de_DE.mo ADDED
Binary file
lang/uji-countdown-de_DE.po ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2013-10-30 12:34+0100\n"
7
+ "Last-Translator: Christian Korschan <Christian.Korschan@Chello.at>\n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-Language: English\n"
14
+ "X-Poedit-Country: ROMANIA\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: uji-countdown-front.php:105
18
+ #: uji-countdown-set.php:18
19
+ msgid "Years"
20
+ msgstr "Jahre"
21
+
22
+ #: uji-countdown-front.php:105
23
+ msgid "Months"
24
+ msgstr "Monate"
25
+
26
+ #: uji-countdown-front.php:105
27
+ msgid "Weeks"
28
+ msgstr "Wochen"
29
+
30
+ #: uji-countdown-front.php:105
31
+ msgid "Days"
32
+ msgstr "Tage"
33
+
34
+ #: uji-countdown-front.php:105
35
+ msgid "Hours"
36
+ msgstr "Stunden"
37
+
38
+ #: uji-countdown-front.php:105
39
+ msgid "Minutes"
40
+ msgstr "Minuten"
41
+
42
+ #: uji-countdown-front.php:105
43
+ msgid "Seconds"
44
+ msgstr "Sekunden"
45
+
46
+ #: uji-countdown-front.php:106
47
+ msgid "Year"
48
+ msgstr "Jahr"
49
+
50
+ #: uji-countdown-front.php:106
51
+ msgid "Month"
52
+ msgstr "Monat"
53
+
54
+ #: uji-countdown-front.php:106
55
+ msgid "Week"
56
+ msgstr "Woche"
57
+
58
+ #: uji-countdown-front.php:106
59
+ msgid "Day"
60
+ msgstr "Tag"
61
+
62
+ #: uji-countdown-front.php:106
63
+ msgid "Hour"
64
+ msgstr "Stunde"
65
+
66
+ #: uji-countdown-front.php:106
67
+ msgid "Minute"
68
+ msgstr "Minute"
69
+
70
+ #: uji-countdown-front.php:106
71
+ msgid "Second"
72
+ msgstr "Sekunde"
73
+
{languages → lang}/uji-countdown-en_EN.mo RENAMED
File without changes
{languages → lang}/uji-countdown-en_EN.po RENAMED
File without changes
lang/uji-countdown-en_US.mo ADDED
Binary file
lang/uji-countdown-en_US.pot ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 TODO
2
+ # This file is distributed under the same license as the TODO package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: TODO 1.0.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/byecaptcha\n"
7
+ "POT-Creation-Date: 2014-09-24 09:18-0800\n"
8
+ "PO-Revision-Date: 2014-09-24 09:18-0800\n"
9
+ "Last-Translator: FULL NAME <email@example.com>\n"
10
+ "Language-Team: LANGUAGE <translations@example.com >\n"
11
+ "Language: en_US\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.6.9\n"
16
+ "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
17
+ "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
18
+ "X-Poedit-Basepath: ../\n"
19
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: assets/tinymce/config.php:25
23
+ msgid "Please add a new style first"
24
+ msgstr ""
25
+
26
+ #: assets/tinymce/config.php:45
27
+ msgid "Select Style"
28
+ msgstr ""
29
+
30
+ #: assets/tinymce/config.php:46
31
+ msgid "Select the style for your countdown"
32
+ msgstr ""
33
+
34
+ #: assets/tinymce/config.php:53
35
+ msgid "Expire Date"
36
+ msgstr ""
37
+
38
+ #: assets/tinymce/config.php:54
39
+ msgid "Select the date to expire"
40
+ msgstr ""
41
+
42
+ #: assets/tinymce/config.php:58
43
+ msgid "Time"
44
+ msgstr ""
45
+
46
+ #: assets/tinymce/config.php:59
47
+ msgid "Select the time to expire"
48
+ msgstr ""
49
+
50
+ #: assets/tinymce/config.php:68
51
+ msgid "Hide the countdown: "
52
+ msgstr ""
53
+
54
+ #: assets/tinymce/config.php:69
55
+ msgid "Or go to URL: "
56
+ msgstr ""
57
+
58
+ #: assets/tinymce/config.php:70
59
+ msgid "After Expiry"
60
+ msgstr ""
61
+
62
+ #: assets/tinymce/config.php:71
63
+ msgid "Select option after expiry"
64
+ msgstr ""
65
+
66
+ #: assets/tinymce/config.php:75
67
+ msgid "Insert Countdown Shortcode"
68
+ msgstr ""
69
+
70
+ #: classes/class-uji-countdown-admin.php:61
71
+ msgid "Date"
72
+ msgstr ""
73
+
74
+ #: classes/class-uji-countdown-admin.php:62
75
+ msgid "Name"
76
+ msgstr ""
77
+
78
+ #: classes/class-uji-countdown-admin.php:63
79
+ msgid "Style"
80
+ msgstr ""
81
+
82
+ #: classes/class-uji-countdown-admin.php:64
83
+ msgid "Change"
84
+ msgstr ""
85
+
86
+ #: classes/class-uji-countdown-admin.php:67
87
+ #: classes/class-uji-countdown-admin.php:88
88
+ msgid "Create a new timer style"
89
+ msgstr ""
90
+
91
+ #: classes/class-uji-countdown-admin.php:119
92
+ msgid "Timer Title:"
93
+ msgstr ""
94
+
95
+ #: classes/class-uji-countdown-admin.php:120
96
+ msgid "Google Font:"
97
+ msgstr ""
98
+
99
+ #: classes/class-uji-countdown-admin.php:121
100
+ msgid "Alignment:"
101
+ msgstr ""
102
+
103
+ #: classes/class-uji-countdown-admin.php:121
104
+ msgid "None"
105
+ msgstr ""
106
+
107
+ #: classes/class-uji-countdown-admin.php:121
108
+ msgid "Left"
109
+ msgstr ""
110
+
111
+ #: classes/class-uji-countdown-admin.php:121
112
+ msgid "Center"
113
+ msgstr ""
114
+
115
+ #: classes/class-uji-countdown-admin.php:121
116
+ msgid "Right"
117
+ msgstr ""
118
+
119
+ #: classes/class-uji-countdown-admin.php:122
120
+ msgid "Main format:"
121
+ msgstr ""
122
+
123
+ #: classes/class-uji-countdown-admin.php:122
124
+ #: classes/class-uji-countdown-admin.php:227
125
+ #: classes/class-uji-countdown-front.php:125
126
+ msgid "Days"
127
+ msgstr ""
128
+
129
+ #: classes/class-uji-countdown-admin.php:122
130
+ #: classes/class-uji-countdown-admin.php:232
131
+ #: classes/class-uji-countdown-front.php:127
132
+ msgid "Hours"
133
+ msgstr ""
134
+
135
+ #: classes/class-uji-countdown-admin.php:122
136
+ #: classes/class-uji-countdown-admin.php:237
137
+ #: classes/class-uji-countdown-front.php:129
138
+ msgid "Minutes"
139
+ msgstr ""
140
+
141
+ #: classes/class-uji-countdown-admin.php:122
142
+ #: classes/class-uji-countdown-admin.php:242
143
+ #: classes/class-uji-countdown-front.php:131
144
+ msgid "Seconds"
145
+ msgstr ""
146
+
147
+ #: classes/class-uji-countdown-admin.php:123
148
+ msgid "Secondary format:"
149
+ msgstr ""
150
+
151
+ #: classes/class-uji-countdown-admin.php:123
152
+ #: classes/class-uji-countdown-admin.php:212
153
+ #: classes/class-uji-countdown-front.php:119
154
+ msgid "Years"
155
+ msgstr ""
156
+
157
+ #: classes/class-uji-countdown-admin.php:123
158
+ #: classes/class-uji-countdown-admin.php:217
159
+ #: classes/class-uji-countdown-front.php:121
160
+ msgid "Months"
161
+ msgstr ""
162
+
163
+ #: classes/class-uji-countdown-admin.php:123
164
+ #: classes/class-uji-countdown-admin.php:222
165
+ #: classes/class-uji-countdown-front.php:123
166
+ msgid "Weeks"
167
+ msgstr ""
168
+
169
+ #: classes/class-uji-countdown-admin.php:125
170
+ msgid "Animation for seconds:"
171
+ msgstr ""
172
+
173
+ #: classes/class-uji-countdown-admin.php:126
174
+ msgid "Display time label text:"
175
+ msgstr ""
176
+
177
+ #: classes/class-uji-countdown-admin.php:128
178
+ #: classes/class-uji-countdown-admin.php:130
179
+ msgid "Timer Size:"
180
+ msgstr ""
181
+
182
+ #: classes/class-uji-countdown-admin.php:132
183
+ msgid "Select Box Color:"
184
+ msgstr ""
185
+
186
+ #: classes/class-uji-countdown-admin.php:132
187
+ msgid "Bottom"
188
+ msgstr ""
189
+
190
+ #: classes/class-uji-countdown-admin.php:132
191
+ msgid "Up"
192
+ msgstr ""
193
+
194
+ #: classes/class-uji-countdown-admin.php:134
195
+ msgid "Select Line Color:"
196
+ msgstr ""
197
+
198
+ #: classes/class-uji-countdown-admin.php:134
199
+ msgid "Background"
200
+ msgstr ""
201
+
202
+ #: classes/class-uji-countdown-admin.php:134
203
+ msgid "Line"
204
+ msgstr ""
205
+
206
+ #: classes/class-uji-countdown-admin.php:136
207
+ msgid "Thickness:"
208
+ msgstr ""
209
+
210
+ #: classes/class-uji-countdown-admin.php:138
211
+ #: classes/class-uji-countdown-admin.php:140
212
+ msgid "Text Color:"
213
+ msgstr ""
214
+
215
+ #: classes/class-uji-countdown-admin.php:138
216
+ #: classes/class-uji-countdown-admin.php:140
217
+ msgid "Number Color"
218
+ msgstr ""
219
+
220
+ #: classes/class-uji-countdown-admin.php:138
221
+ msgid "Shadow Color"
222
+ msgstr ""
223
+
224
+ #: classes/class-uji-countdown-admin.php:141
225
+ msgid "Label Color:"
226
+ msgstr ""
227
+
228
+ #: classes/class-uji-countdown-admin.php:141
229
+ msgid "Label Text Color"
230
+ msgstr ""
231
+
232
+ #: classes/class-uji-countdown-admin.php:142
233
+ msgid "Label Size:"
234
+ msgstr ""
235
+
236
+ #: classes/class-uji-countdown-admin.php:147
237
+ msgid "Edit Timer Style"
238
+ msgstr ""
239
+
240
+ #: classes/class-uji-countdown-admin.php:149
241
+ msgid "Create New Timer Style"
242
+ msgstr ""
243
+
244
+ #: classes/class-uji-countdown-admin.php:253
245
+ msgid "Preview Timer Style"
246
+ msgstr ""
247
+
248
+ #: classes/class-uji-countdown-admin.php:264
249
+ msgid "How To Add Countdown Shortcode"
250
+ msgstr ""
251
+
252
+ #: classes/class-uji-countdown-admin.php:264
253
+ msgid "Add New Countdown <br>from the Widget Areas"
254
+ msgstr ""
255
+
256
+ #: classes/class-uji-countdown-admin.php:276
257
+ msgid "Style Type:"
258
+ msgstr ""
259
+
260
+ #: classes/class-uji-countdown-admin.php:279
261
+ msgid "Select Style:"
262
+ msgstr ""
263
+
264
+ #: classes/class-uji-countdown-admin.php:425
265
+ msgid "Update Style"
266
+ msgstr ""
267
+
268
+ #: classes/class-uji-countdown-admin.php:427
269
+ msgid "Cancel Add New"
270
+ msgstr ""
271
+
272
+ #: classes/class-uji-countdown-admin.php:429
273
+ msgid "Save Style"
274
+ msgstr ""
275
+
276
+ #: classes/class-uji-countdown-admin.php:462
277
+ msgid "Your Timer Style Was Created"
278
+ msgstr ""
279
+
280
+ #: classes/class-uji-countdown-admin.php:469
281
+ msgid "Your Timer Style Was Updated"
282
+ msgstr ""
283
+
284
+ #: classes/class-uji-countdown-admin.php:485
285
+ msgid "Please Complete Timer Title"
286
+ msgstr ""
287
+
288
+ #: classes/class-uji-countdown-admin.php:490
289
+ msgid "Please Select Timer Format"
290
+ msgstr ""
291
+
292
+ #: classes/class-uji-countdown-admin.php:497
293
+ msgid "This Name Already Exist. Please Change Timer Name. <br/>"
294
+ msgstr ""
295
+
296
+ #: classes/class-uji-countdown-admin.php:556
297
+ msgid "Your countdown style was deleted"
298
+ msgstr ""
299
+
300
+ #: classes/class-uji-countdown-admin.php:617
301
+ msgid "Show Responsive:"
302
+ msgstr ""
303
+
304
+ #: classes/class-uji-countdown-admin.php:617
305
+ msgid "For Tablet and Mobile devices."
306
+ msgstr ""
307
+
308
+ #: classes/class-uji-countdown-admin.php:618
309
+ msgid "Right-To-Left (RTL):"
310
+ msgstr ""
311
+
312
+ #: classes/class-uji-countdown-admin.php:618
313
+ msgid "Writing starts from the right of the page and continues to the left."
314
+ msgstr ""
315
+
316
+ #: classes/class-uji-countdown-admin.php:619
317
+ msgid "Quick Translation"
318
+ msgstr ""
319
+
320
+ #: classes/class-uji-countdown-admin.php:624
321
+ msgid ":"
322
+ msgstr ""
323
+
324
+ #: classes/class-uji-countdown-admin.php:626
325
+ msgid "Save Changes"
326
+ msgstr ""
327
+
328
+ #: classes/class-uji-countdown-admin.php:630
329
+ msgid "Timer Settings"
330
+ msgstr ""
331
+
332
+ #: classes/class-uji-countdown-admin.php:643
333
+ msgid "Settings saved."
334
+ msgstr ""
335
+
336
+ #: classes/class-uji-countdown-admin.php:645
337
+ msgid "Some error occured. Please try again."
338
+ msgstr ""
339
+
340
+ #: classes/class-uji-countdown-front.php:120
341
+ msgid "Year"
342
+ msgstr ""
343
+
344
+ #: classes/class-uji-countdown-front.php:122
345
+ msgid "Month"
346
+ msgstr ""
347
+
348
+ #: classes/class-uji-countdown-front.php:124
349
+ msgid "Week"
350
+ msgstr ""
351
+
352
+ #: classes/class-uji-countdown-front.php:126
353
+ msgid "Day"
354
+ msgstr ""
355
+
356
+ #: classes/class-uji-countdown-front.php:128
357
+ msgid "Hour"
358
+ msgstr ""
359
+
360
+ #: classes/class-uji-countdown-front.php:130
361
+ msgid "Minute"
362
+ msgstr ""
363
+
364
+ #: classes/class-uji-countdown-front.php:132
365
+ msgid "Second"
366
+ msgstr ""
367
+
368
+ #: classes/class-uji-countdown.php:198 views/admin.php:29
369
+ msgid "Settings"
370
+ msgstr ""
371
+
372
+ #: classes/class-uji-widget.php:176
373
+ msgid "Title (optional):"
374
+ msgstr ""
375
+
376
+ #: classes/class-uji-widget.php:185
377
+ msgid "Select a Style:"
378
+ msgstr ""
379
+
380
+ #: classes/class-uji-widget.php:202
381
+ msgid "Expire Date:"
382
+ msgstr ""
383
+
384
+ #: classes/class-uji-widget.php:208
385
+ msgid "Select the Time:"
386
+ msgstr ""
387
+
388
+ #: classes/class-uji-widget.php:232
389
+ msgid "Hide Countdown:"
390
+ msgstr ""
391
+
392
+ #: classes/class-uji-widget.php:238
393
+ msgid "Or go to this link:"
394
+ msgstr ""
395
+
396
+ #: classes/class-uji-widget.php:239
397
+ msgid "Select URL to send after expire"
398
+ msgstr ""
399
+
400
+ #: views/admin.php:27
401
+ msgid "My Countdowns"
402
+ msgstr ""
403
+
404
+ #: views/admin.php:28
405
+ msgid "Add/Edit Countdown"
406
+ msgstr ""
lang/uji-countdown-es_ES.mo ADDED
Binary file
lang/uji-countdown-es_ES.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2014-08-27 23:04-0800\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.6.3\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Años"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Meses"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Semanas"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Días"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Horas"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Minutos"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Segundos"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Año"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Mes"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Semana"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Dia"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Hora"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Minuto"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Segundo"
lang/uji-countdown-fr_FR.mo ADDED
Binary file
lang/uji-countdown-fr_FR.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2013-09-29 17:54+0100\n"
7
+ "Last-Translator: lamessen <nico@lamessen.fr>\n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.5.4\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Années"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Mois"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Semaines"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Jours"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Heures"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Minutes"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Secondes"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Année"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Mois"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Semaine"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Jour"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Heure"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Minute"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Seconde"
lang/uji-countdown-hu_HU.mo ADDED
Binary file
lang/uji-countdown-hu_HU.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2014-08-27 23:09-0800\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.6.3\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Év"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Hónap"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Hét"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Nap"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Óra"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Perc"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Másodperc"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Év"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Hónap"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Hét"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Nap"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Óra"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Perc"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Másodperc"
lang/uji-countdown-it_IT.mo ADDED
Binary file
lang/uji-countdown-it_IT.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2014-08-27 22:57-0800\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.6.3\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Anni"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Mesi"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Settimane"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Giorni"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Ore"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Minuti"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Secondi"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Anno"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Mese"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Settimana"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Giorno"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Ora"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Minuto"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Secondo"
lang/uji-countdown-nl_NL.mo ADDED
Binary file
lang/uji-countdown-nl_NL.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2014-07-30 19:08-0800\n"
7
+ "Last-Translator: Ujimoto <info@wpmanage.com>\n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.6.3\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Jaren"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Мaanden"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Weken"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Dagen"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Uren"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Мinuten"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Seconden"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Jaar"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Мaand"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Week"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Dag"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Uur"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Minuut"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Seconde"
lang/uji-countdown-ro_RO.mo ADDED
Binary file
lang/uji-countdown-ro_RO.po ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2012-07-19 13:05+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-Language: English\n"
14
+ "X-Poedit-Country: ROMANIA\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: uji-countdown-front.php:105
18
+ #: uji-countdown-set.php:18
19
+ msgid "Years"
20
+ msgstr "Ani"
21
+
22
+ #: uji-countdown-front.php:105
23
+ msgid "Months"
24
+ msgstr "Luni"
25
+
26
+ #: uji-countdown-front.php:105
27
+ msgid "Weeks"
28
+ msgstr "Saptamani"
29
+
30
+ #: uji-countdown-front.php:105
31
+ msgid "Days"
32
+ msgstr "Zile"
33
+
34
+ #: uji-countdown-front.php:105
35
+ msgid "Hours"
36
+ msgstr "Ore"
37
+
38
+ #: uji-countdown-front.php:105
39
+ msgid "Minutes"
40
+ msgstr "Minute"
41
+
42
+ #: uji-countdown-front.php:105
43
+ msgid "Seconds"
44
+ msgstr "Secunde"
45
+
46
+ #: uji-countdown-front.php:106
47
+ msgid "Year"
48
+ msgstr "An"
49
+
50
+ #: uji-countdown-front.php:106
51
+ msgid "Month"
52
+ msgstr "Luna"
53
+
54
+ #: uji-countdown-front.php:106
55
+ msgid "Week"
56
+ msgstr "Saptamana"
57
+
58
+ #: uji-countdown-front.php:106
59
+ msgid "Day"
60
+ msgstr "Zi"
61
+
62
+ #: uji-countdown-front.php:106
63
+ msgid "Hour"
64
+ msgstr "Ora"
65
+
66
+ #: uji-countdown-front.php:106
67
+ msgid "Minute"
68
+ msgstr "Minut"
69
+
70
+ #: uji-countdown-front.php:106
71
+ msgid "Second"
72
+ msgstr "Secunda"
73
+
lang/uji-countdown-ru_RU.mo ADDED
Binary file
lang/uji-countdown-ru_RU.po ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2014-05-21 21:19+0200\n"
7
+ "Last-Translator: Ujimoto <info@wpmanage.com>\n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.6.4\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Лет"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Месяцев"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Недель"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Дней"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Часов"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Минут"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Секунд"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Год"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Месяц"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Неделя"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "День"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Час"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Минута"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Секунда"
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
uji-countdown-add.php DELETED
@@ -1,288 +0,0 @@
1
- <?php
2
-
3
- ////////////////////////////////////ADD NEW STYLE////////////////////////////////////
4
-
5
- function sel_size($sz){
6
- $ujic_txt_sz = array("Ultra Small"=>"12", "Very Small"=>"15", "Small"=>"25", "Medium"=>"35", "Large"=>"45", "Very Large"=>"55");
7
- $select = '<option value="" class="seltit"> - Select Countdown Size - </option>';
8
- foreach($ujic_txt_sz as $size=>$key){
9
- $sel = ((int)$key == $sz) ? ' selected="selected"' : '';
10
- $select .= '<option value="'.$key.'" class="seltit" '.$sel.'>'.$size.'</option>';
11
- }
12
- return $select;
13
- }
14
- function rad_pos($ipos){
15
- $ujic_pos = array("none", "left", "center", "right");
16
- $pos = '';
17
- $i=0;
18
- foreach($ujic_pos as $p){
19
- $sel = ($p == $ipos) ? ' checked="checked"' : '';
20
- $pos .= '<input name="ujic_pos" type="radio" value="'.$p.'" '.$sel.' />
21
- <span id="uji_pos_'.$i.'">'.ucfirst($p).' </span>';
22
- $i++;
23
- }
24
- return $pos;
25
- }
26
- function chk_pos($id, $ichk){
27
- $sel = ($ichk == 1) ? ' checked="checked"' : '';
28
- $chk = '<input name="'.$id.'" id="'.$id.'" type="checkbox" value="1" '.$sel.' />';
29
- return $chk;
30
- }
31
- function ujic_add_new(){
32
- ujic_save_newstyle();
33
- $ujic_name = !empty($_POST['ujic_name']) ? $_POST['ujic_name'] : '';
34
- $ujic_txt_size = !empty($_POST['ujic_txt_size']) ? $_POST['ujic_txt_size'] : 35;
35
- $ujic_col_dw = !empty($_POST['ujic_col_dw']) ? $_POST['ujic_col_dw'] : '#3A3A3A';
36
- $ujic_col_up = !empty($_POST['ujic_col_up']) ? $_POST['ujic_col_up'] : '#635b63';
37
- $ujic_pos = !empty($_POST['ujic_pos']) ? $_POST['ujic_pos'] : 'none';
38
- $ujic_col_txt = !empty($_POST['ujic_col_txt']) ? $_POST['ujic_col_txt'] : '#FFFFFF';
39
- $ujic_col_sw = !empty($_POST['ujic_col_sw']) ? $_POST['ujic_col_sw'] : '#000000';
40
- $ujic_ani = !empty($_POST['ujic_ani']) ? $_POST['ujic_ani'] : '0';
41
- $ujic_txt = !empty($_POST['ujic_txt']) ? $_POST['ujic_txt'] : '0';
42
- $ujic_maint = "Add New Countdown Style";
43
- $ujic_title = "Create New Timer Style";
44
- $ujic_save = "Save this style";
45
- $ujic_update = '';
46
- $ujic_form = 'options-general.php?page=ujic-count&save=ok';
47
- $ujic_cancel = '';
48
-
49
- if(isset($_GET['edit']) && !empty($_GET['edit'])){
50
- $id = $_GET['edit'];
51
- global $wpdb;
52
- $table_name = $wpdb->prefix ."uji_counter";
53
- $ujic_data = $wpdb->get_row("SELECT * FROM $table_name WHERE id = $id");
54
- $ujic_name = $ujic_data->title;
55
- $ujic_txt_size = $ujic_data->size;
56
- $ujic_col_dw = $ujic_data->col_dw;
57
- $ujic_col_up = $ujic_data->col_up;
58
- $ujic_pos = $ujic_data->ujic_pos;
59
- $ujic_col_txt = $ujic_data->col_txt;
60
- $ujic_col_sw = $ujic_data->col_sw;
61
- $ujic_ani = $ujic_data->ujic_ani;
62
- $ujic_txt = $ujic_data->ujic_txt;
63
- $ujic_maint = "Edit Countdown Style";
64
- $ujic_title = "Edit style: <strong>".$ujic_data->title."</strong>";
65
- $ujic_save = "Update this style";
66
- $ujic_update = ' ujic-update"';
67
- $ujic_form = 'options-general.php?page=ujic-count&edit='.$id;
68
- $ujic_cancel = '<a href="options-general.php?page=ujic-count" class="button-primary cancel"> Cancel Add New </a>';
69
- }
70
- ?>
71
- <div class="wrap" id="ujic_box">
72
- <h2> <?php echo $ujic_maint ?></h2>
73
-
74
- <div class="metabox-holder">
75
- <div class="postbox">
76
- <div class="handlediv" title="Click to toggle"><br /></div>
77
- <h3 class="hndle"><span><?php echo $ujic_title ?></span></h3>
78
- <div class="inside">
79
- <div id="ujic-add" class="form-table <?php echo $ujic_update ?>">
80
- <form action="<?php echo $ujic_form ?>" method="post">
81
- <div>
82
- <label>Timer Title:</label>
83
- <input name="ujic_name" id="ujic_name" type="text" class="normal-text" value="<?php echo $ujic_name ?>"/><br/>
84
- </div>
85
- <div>
86
- <label>Countdown Size:</label>
87
- <select id="ujic_txt_sz" name="ujic_txt_sz">
88
- <?php echo sel_size($ujic_txt_size); ?>
89
-
90
- </select>
91
- </div>
92
- <div>
93
- <label>Select Box Color:</label>
94
- <div class="fleft">
95
- <span> Bottom: </span>
96
- <div id="colorSelector"><div style="background-color: <?php echo $ujic_col_dw ?>"></div></div>
97
- <input name="ujic_col_dw" id="ujic_col_dw" type="text" value="<?php echo $ujic_col_dw ?>" class="small-text"/>
98
- </div>
99
- <div class="fleft">
100
- <span> Up: </span>
101
- <div id="colorSelector2"><div style="background-color: <?php echo $ujic_col_up ?>"></div></div>
102
- <input name="ujic_col_up" id="ujic_col_up" type="text" value="<?php echo $ujic_col_up ?>" class="small-text"/>
103
- </div>
104
- </div>
105
- <div>
106
- <label>Alignment:</label>
107
- <?php echo rad_pos($ujic_pos) ?>
108
- </div>
109
- <div>
110
- <label>Text Color:</label>
111
- <div class="fleft">
112
- <span> Number Color: </span>
113
- <div id="colorSelector3"><div style="background-color: <?php echo $ujic_col_txt ?>"></div></div>
114
- <input name="ujic_col_txt" id="ujic_col_txt" type="text" value="<?php echo $ujic_col_txt ?>" class="small-text"/>
115
- </div>
116
- <div class="fleft">
117
- <span> Shadow Color: </span>
118
- <div id="colorSelector4"><div style="background-color: <?php echo $ujic_col_sw ?>"></div></div>
119
- <input name="ujic_col_sw" id="ujic_col_sw" type="text" value="<?php echo $ujic_col_sw ?>" class="small-text"/>
120
- </div>
121
- </div>
122
- <div>
123
- <label>Animation for seconds:</label>
124
- <div class="fleft">
125
- <?php echo chk_pos('ujic_ani', $ujic_ani) ?>
126
- </div>
127
- </div>
128
- <div>
129
- <label>Display time label text:</label>
130
- <div class="fleft">
131
- <?php echo chk_pos('ujic_txt', $ujic_txt) ?>
132
- </div>
133
- <input type="hidden" name="ujic_save" value="save" />
134
- </div>
135
- <p class="submit">
136
- <input class="button-primary" type="submit" name="submit" value="<?php echo $ujic_save ?>" />
137
- <?php echo $ujic_cancel; ?>
138
- </p>
139
- </form>
140
- </div>
141
- </div>
142
- </div>
143
- <h3>Preview Your Style:</h3>
144
- <div id="ujic-pre">
145
- <div id="ujiCountdown" class="hasCountdown">
146
- <span class="countdown_row countdown_show4">
147
- <span class="countdown_section">
148
- <span class="countdown_amount">3</span>
149
- <span class="countdown_amount">4</span>
150
- <span class="countdown_txt">Days</span>
151
- </span>
152
- <span class="countdown_section">
153
- <span class="countdown_amount">1</span>
154
- <span class="countdown_amount">0</span>
155
- <span class="countdown_txt">Hours</span>
156
- </span>
157
- <span class="countdown_section">
158
- <span class="countdown_amount">2</span>
159
- <span class="countdown_amount">3</span>
160
- <span class="countdown_txt">Minutes</span>
161
- </span>
162
- <span class="countdown_section">
163
- <span class="countdown_amount">5</span>
164
- <span class="countdown_amount">9</span>
165
- <span class="countdown_txt">Seconds</span>
166
- </span>
167
- </span>
168
- </div>
169
- </div>
170
- <?php ujic_saved(); ?>
171
- </div>
172
- <div class="metabox-holder">
173
- <div class="postbox">
174
- <div class="handlediv" title="Click to toggle"><br /></div>
175
- <h3 class="hndle"><span>Uji Countdown Premium</span></h3>
176
- <div class="inside">
177
- <a href="http://www.wpmanage.com/uji-countdown" target="_blank"><img src="<?php echo UJI_PLUGIN_URL. '/images/ujic-ps3.png'; ?>" style="padding-left:28px" /></a>
178
- </div>
179
- </div>
180
- <div class="postbox">
181
- <div class="handlediv" title="Click to toggle"><br /></div>
182
- <h3 class="hndle"><span>Add Countdown in Post or Page</span></h3>
183
- <div class="inside">
184
- <img src="<?php echo UJI_PLUGIN_URL. '/images/ujic-ps.jpg'; ?>" />
185
- </div>
186
- </div>
187
- <div class="postbox">
188
- <div class="handlediv" title="Click to toggle"><br /></div>
189
- <h3 class="hndle"><span>Add Countdown From Widgets</span></h3>
190
- <div class="inside">
191
- <img src="<?php echo UJI_PLUGIN_URL. '/images/ujic-ps2.jpg'; ?>" />
192
- </div>
193
- </div>
194
-
195
- </div>
196
- <?php }
197
- function ujic_save_newstyle(){
198
- global $wpdb;
199
- $table_name = $wpdb->prefix ."uji_counter";
200
-
201
- if(isset($_GET['del']) && !empty($_GET['del'])){
202
- $cname = $wpdb->get_var("SELECT title FROM $table_name WHERE id = '".$_GET['del']."'");
203
- $wpdb->query("DELETE FROM $table_name WHERE id = '".$_GET['del']."'");
204
- echo '<div class="updated">Your countdown style named: '.$cname .' was deleted </div>';
205
- }
206
- if(isset($_POST['ujic_save'])){
207
-
208
- $ujic_form_err = '';
209
-
210
- if(!empty($_POST['ujic_name']) && (!isset($_GET['edit']) || empty($_GET['edit']))){
211
- $cname = $wpdb->get_var("SELECT title FROM $table_name WHERE title = '".$_POST['ujic_name']."'");
212
- if(!empty($cname)){
213
- $ujic_form_err .= 'This name already exist. Please change name <br/>';
214
- }
215
- }
216
-
217
- if(empty($_POST['ujic_name'])){
218
- $ujic_form_err .= 'Please complete Timer Title <br/>';
219
- }
220
- if(empty($_POST['ujic_txt_sz'])){
221
- $ujic_form_err .= 'Please complete Countdown Size: <br/>';
222
- }
223
- if(empty($_POST['ujic_col_dw']) || empty($_POST['ujic_col_up'])){
224
- $ujic_form_err .= 'Please select Box Color <br/>';
225
- }
226
- if(empty($_POST['ujic_col_txt']) || empty($_POST['ujic_col_sw'])){
227
- $ujic_form_err .= 'Please select Text Color <br/>';
228
- }
229
- if(!empty($ujic_form_err)) echo '<div class="error">'.$ujic_form_err.' </div>';
230
- else if (empty($ujic_form_err)){
231
- if(!isset($_GET['edit']) || empty($_GET['edit'])){
232
- $ujic_ani = isset($_POST['ujic_ani']) ? $_POST['ujic_ani'] : 0;
233
- $ujic_txt = isset($_POST['ujic_txt']) ? $_POST['ujic_txt'] : 0;
234
-
235
- $wpdb->query($wpdb->prepare("INSERT INTO $table_name(time, title, size, col_dw, col_up, ujic_pos, col_txt, col_sw, ujic_ani, ujic_txt)
236
- VALUES (utc_timestamp(), %s, %d, %s, %s, %s, %s, %s, %d, %d)",
237
- trim($_POST['ujic_name']), $_POST['ujic_txt_sz'], $_POST['ujic_col_dw'], $_POST['ujic_col_up'], $_POST['ujic_pos'], $_POST['ujic_col_txt'], $_POST['ujic_col_sw'], $ujic_ani, $ujic_txt ));
238
-
239
- echo '<div class="updated">Your countdown style was added </div>';
240
-
241
- }else{
242
- $ujic_ani = isset($_POST['ujic_ani']) ? $_POST['ujic_ani'] : 0;
243
- $ujic_txt = isset($_POST['ujic_txt']) ? $_POST['ujic_txt'] : 0;
244
- $wpdb->query( $wpdb->prepare("UPDATE $table_name SET title=%s, size=%d, col_dw=%s, col_up=%s, ujic_pos=%s, col_txt=%s, col_sw=%s, ujic_ani=%d, ujic_txt=%d WHERE id=%d", trim($_POST['ujic_name']), $_POST['ujic_txt_sz'], $_POST['ujic_col_dw'], $_POST['ujic_col_up'], $_POST['ujic_pos'], $_POST['ujic_col_txt'], $_POST['ujic_col_sw'], $ujic_ani, $ujic_txt, $_GET['edit']) );
245
- echo '<div class="updated">Your countdown style was updated </div>';
246
- }
247
- }
248
- }
249
- }
250
- function ujic_saved(){
251
- global $wpdb;
252
- $table_name = $wpdb->prefix ."uji_counter";
253
- $ujic_datas = $wpdb->get_results("SELECT * FROM $table_name ORDER BY `time` DESC");
254
- if(!empty($ujic_datas)){
255
- ?>
256
- <h3>Countdown Styles:</h3>
257
- <table class="widefat">
258
- <thead>
259
- <tr>
260
- <th>Added in</th>
261
- <th>Title</th>
262
- <th>Change</th>
263
- </tr>
264
- </thead>
265
- <tfoot>
266
- <tr>
267
- <th>Added in</th>
268
- <th>Title</th>
269
- <th>Change</th>
270
- </tr>
271
- </tfoot>
272
- <tbody>
273
- <?php
274
- $ujictab='';
275
- foreach($ujic_datas as $ujic)
276
- {
277
- $ujictab .='<tr><td>'.$ujic->time.'</td><td>'.$ujic->title.'</td><td><a href="options-general.php?page=ujic-count&edit='.$ujic->id.'">Edit</a> | <a href="options-general.php?page=ujic-count&del='.$ujic->id.'">Delete</a></td></tr>';
278
- }
279
- echo $ujictab;
280
- ?>
281
- </tbody>
282
- </table>
283
- <?php
284
-
285
- }
286
- }
287
-
288
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
uji-countdown-front.php DELETED
@@ -1,224 +0,0 @@
1
- <?php
2
-
3
- ////////////////////////////////////SETTINGS////////////////////////////////////
4
-
5
- function add_ujic_popup(){
6
- global $wp_version;
7
- if ( $wp_version >= 3.5 ) {
8
- wp_enqueue_script ( 'ujic_jquery_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui.min.js' , array ( 'jquery' ) , '1.10.3' , true );
9
- wp_enqueue_script ( 'ujic_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-timepicker.js' , array ( 'ujic_jquery_date_js' ) , '1.3' , true );
10
- }
11
- else{
12
- wp_enqueue_script ( 'ujic_jquery_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-old.min.js' , array ( 'jquery' ) , '1.9.1' , true );
13
- wp_enqueue_script ( 'ujic_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-timepicker-old.js' , array ( 'ujic_jquery_date_js' ) , '1.1.1' , true );
14
- }
15
- wp_register_style('ujic-jqueryui-css', UJI_PLUGIN_URL . '/inc/css/jquery-ui-1.9.2.custom.css');
16
- wp_enqueue_style( 'ujic-jqueryui-css');
17
- wp_register_style('ujic-timer-css', UJI_PLUGIN_URL . '/inc/css/jquery-ui-timepicker-addon.css');
18
- wp_enqueue_style( 'ujic-timer-css');
19
- ?>
20
- <script>
21
- jQuery(function() {
22
- jQuery('#dateujic').datetimepicker({
23
- timeFormat: 'HH:mm',
24
- dateFormat: 'yy/mm/dd'
25
- });
26
- jQuery("#ui-datepicker-div").wrap('<div id="ujicountdownadd" />');
27
- jQuery('#dateujic').click(function () {
28
- jQuery('#ui-datepicker-div').css("z-index", "9999999999");
29
- });
30
- jQuery('#urlujic').keyup(function () {
31
- var value = jQuery(this).val();
32
-
33
- if(value){
34
- jQuery('input[name=hideujic]').attr('checked', false);
35
- }else{
36
- jQuery('input[name=hideujic]').attr('checked', true);
37
- }
38
-
39
- }).keyup();
40
- });
41
-
42
- function isUrl(url) {
43
- var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
44
- if(RegExp.test(url)){
45
- return true;
46
- }else{
47
- return false;
48
- }
49
- }
50
-
51
-
52
- function InsertContdown(){
53
-
54
-
55
- var style_id = jQuery("#add_style").val();
56
- if(style_id == ""){
57
- alert("Please select a style");
58
- return;
59
- }
60
- var time_id = jQuery('#dateujic').val();
61
- if(time_id == ""){
62
- alert("Please select time for countdown");
63
- return;
64
- }
65
- var url = "";
66
- var url_id = jQuery('#urlujic').val();
67
- if(url_id != "" && !isUrl(url_id)){
68
- alert("Please insert valid link");
69
- return;
70
- }else if(url_id != ""){
71
- url = " url = \"" + url_id + "\"";
72
- }
73
- var hide = "";
74
- if( jQuery('input[name=hideujic]').is(':checked')){
75
- var hide = " hide = \"true\"";
76
- }
77
-
78
-
79
- var form_name = jQuery("#add_form_id option[value='" + style_id + "']").text().replace(/[\[\]]/g, '');
80
- window.send_to_editor("[ujicountdown id=\"" + style_id + "\" expire=\"" + time_id + "\"" + hide + url +"]");
81
- }
82
- </script>
83
-
84
- <div id="select_countdown_form" style="display:none;">
85
- <div class="wrap">
86
- <div>
87
- <div style="padding:15px 15px 0 15px;">
88
- <h3 style="color:#5A5A5A!important; font-family:Georgia,Times New Roman,Times,serif!important; font-size:1.8em!important; font-weight:normal!important;">Insert Countdown</h3>
89
- <span>
90
- Please select your style below to add it to your post or page.
91
- </span>
92
- <p style="font-size:11px">Just one counter on page is allowed. <br>Check <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
93
- </p>
94
- </div>
95
- <div style="padding:15px 15px 0 15px;">
96
- <h3 style="display:block; font-size:14px; margin-bottom:10px">Select style:</h3>
97
- <select id="add_style">
98
- <option value=""> Select a Style </option>
99
- <?php
100
- echo ujic_forms();
101
- ?>
102
- </select>
103
- </div>
104
- <div style="padding:15px 15px 0 15px;">
105
- <h3 style="display:block; font-size:14px; margin-bottom:10px">Countdown Expire In:</h3>
106
- <input type="text" value="" width="200px" id="dateujic" />
107
- </div>
108
- <div style="padding:15px 15px 0 15px;">
109
- <h3 style="display:block; font-size:14px; margin-bottom:10px">After expiry:</h3>
110
- <span style="inline-block; font-size:14px; margin:0px 10px 0 10px">Hide countdown:</span>
111
- <input name="hideujic" id="hideujic" type="checkbox" value="1" checked />
112
- <div style="display:block; padding: 10px 0 10px 0">
113
- <span style="display:inline-block; font-size:14px; margin:0px 35px 0 10px">Or go to link:</span>
114
- <input type="text" value="" id="urlujic" name="urlujic" style="width:240px" />
115
- </div>
116
- </div>
117
- <div style="padding:15px;">
118
- <input type="button" class="button-primary" value="Insert Countdown" onclick="InsertContdown();"/>&nbsp;&nbsp;&nbsp;
119
- <a class="button" style="color:#bbb;" href="#" onclick="tb_remove(); return false;">Cancel</a>
120
- </div>
121
- </div>
122
- </div>
123
- </div>
124
-
125
- <?php
126
- }
127
-
128
- function ujic_forms($sel=NULL){
129
- global $wpdb;
130
- $table_name = $wpdb->prefix ."uji_counter";
131
- $ujic_datas = $wpdb->get_results("SELECT * FROM $table_name ORDER BY `time` DESC");
132
- if(!empty($ujic_datas)){
133
- $select = $ujictab = '';
134
- foreach($ujic_datas as $ujic)
135
- {
136
- $select = (isset($sel) && !empty($sel) && $sel == $ujic->title ) ? ' selected="selected"' : '';
137
- $ujictab .='<option value="'.$ujic->title.'" '.$select.'> '.$ujic->title.' </option>';
138
- }
139
- return $ujictab;
140
- }
141
- }
142
-
143
- function ujic_code( $atts, $content = null ) {
144
- global $wpdb;
145
- extract(shortcode_atts(array(
146
- 'id' => "ujic-black",
147
- 'expire' => "2012/12/21 01:00:00",
148
- 'hide' => "false",
149
- 'url' => ""
150
- ), $atts));
151
- //Timezone
152
-
153
- $utc = 2*(60*60);
154
- $now_time = strtotime(date_i18n("Y/m/d H:i:s"))-$utc;
155
- $unx_time = $expire.":00";
156
- $unx_time = strtotime($unx_time)-$utc;
157
-
158
- if($hide=="true" && $now_time > $unx_time){
159
- return $content;
160
- }else{
161
-
162
- $table_name = $wpdb->prefix ."uji_counter";
163
- $ujic_datas = $wpdb->get_results("SELECT * FROM $table_name WHERE title = '".$id."'");
164
-
165
- foreach($ujic_datas as $ujic)
166
- {
167
- $class = $ujic->ujic_pos;
168
- $ujic_txt_size = $ujic->size;
169
- $ujic_col_dw = $ujic->col_dw;
170
- $ujic_col_up = $ujic->col_up;
171
- $ujic_col_txt = $ujic->col_txt;
172
- $ujic_col_sw = $ujic->col_sw;
173
- $ujic_txt = $ujic->ujic_txt;
174
- $ujic_ani = $ujic->ujic_ani;
175
- }
176
-
177
- $classh = !empty($class) ? ' class="ujic_'.$class.'"' : '';
178
- $ujic_txt_size = !empty($ujic_txt_size) ? $ujic_txt_size : 35;
179
- $ujic_col_dw = !empty($ujic_col_dw) ? $ujic_col_dw : '#3A3A3A';
180
- $ujic_col_up = !empty($ujic_col_up) ? $ujic_col_up : '#635b63';
181
- $ujic_col_txt = !empty($ujic_col_txt) ? $ujic_col_txt : '#FFFFFF';
182
- $ujic_col_sw = !empty($ujic_col_sw) ? $ujic_col_sw : '#000000';
183
- $ujic_txt = !empty($ujic_txt) ? 'true' : 'false';
184
- $ujic_ani = !empty($ujic_ani) ? 'true' : 'false';
185
- $ujic_url = !empty($url) ? $url : 'false';
186
-
187
-
188
- wp_enqueue_style( 'ujiStyleCount');
189
- wp_enqueue_script('UJI_js_countdown');
190
- wp_localize_script('js_countdown', 'ujiCount', array(
191
- 'uji_plugin' => UJI_PLUGIN_URL,
192
- 'expire' => $expire,
193
- 'Years' => __("Years", "uji-countdown"),
194
- 'Months' => __("Months", "uji-countdown"),
195
- 'Weeks' => __("Weeks", "uji-countdown"),
196
- 'Days' => __("Days", "uji-countdown"),
197
- 'Hours' => __("Hours", "uji-countdown"),
198
- 'Minutes' => __("Minutes", "uji-countdown"),
199
- 'Seconds' => __("Seconds", "uji-countdown"),
200
- 'Year' => __("Year", "uji-countdown"),
201
- 'Month' => __("Month", "uji-countdown"),
202
- 'Week' => __("Week", "uji-countdown"),
203
- 'Day' => __("Day", "uji-countdown"),
204
- 'Hour' => __("Hour", "uji-countdown"),
205
- 'Minute' => __("Minute", "uji-countdown"),
206
- 'Second' => __("Second", "uji-countdown"),
207
- 'ujic_txt_size' => $ujic_txt_size,
208
- 'ujic_col_dw' => $ujic_col_dw,
209
- 'ujic_col_up' => $ujic_col_up,
210
- 'ujic_col_txt' => $ujic_col_txt,
211
- 'ujic_col_sw' => $ujic_col_sw,
212
- 'ujic_txt' => $ujic_txt,
213
- 'ujic_ani' => $ujic_ani,
214
- 'ujic_url' => $ujic_url,
215
- 'uji_center' => $classh,
216
- ));
217
- wp_enqueue_script('js_countdown');
218
-
219
- return strip_shortcodes('<div id="ujiCountdown" '.$classh.'></div>'.$content);
220
- }
221
- }
222
- add_shortcode("ujicountdown", "ujic_code");
223
-
224
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
uji-countdown-widget.php DELETED
@@ -1,125 +0,0 @@
1
- <?php class UJI_countdown extends WP_Widget {
2
-
3
- function UJI_countdown(){
4
- $widget_ops = array('description' => 'Uji Countdown widget');
5
- $control_ops = array('width' => 300, 'height' => 400);
6
- parent::WP_Widget('UJI_countdown_widget', $name='..:: Uji Countdown ::..', $widget_ops, $control_ops);
7
- }
8
-
9
- function widget($args, $instance) {
10
- extract($args);
11
- $UJI_title = $instance['UJI_title'];
12
- $UJI_style = $instance['UJI_style'];
13
- $UJI_date = $instance['UJI_date'];
14
- $UJI_exp = $instance['UJI_exp'];
15
- $UJI_link = $instance['UJI_link'];
16
-
17
- $shtval = '';
18
- $shtval .= (!empty($UJI_style)) ? ' id="'.$UJI_style.'"' : $shtval;
19
- $shtval .= (!empty($UJI_date)) ? ' expire="'.$UJI_date.'"' : $shtval;
20
- $shtval .= (!empty($UJI_exp)) ? ' hide = "true"' : $shtval;
21
- $shtval .= (empty($UJI_exp) && !empty($UJI_link)) ? ' url = "'.$UJI_link.'"' : $shtval;
22
- $shortcode = (!empty($shtval)) ? '[ujicountdown'.$shtval.']' : '';
23
-
24
- if(!empty($shortcode)) echo '<h3 class="widget-title">'.$UJI_title.'</h3>'.do_shortcode($shortcode);
25
-
26
- } // widget
27
-
28
- function update($new_instance, $old_instance){
29
- $instance = $old_instance;
30
- $instance['UJI_title'] = stripslashes($new_instance['UJI_title']);
31
- $instance['UJI_style'] = stripslashes($new_instance['UJI_style']);
32
- $instance['UJI_date'] = stripslashes($new_instance['UJI_date']);
33
- $instance['UJI_exp'] = stripslashes($new_instance['UJI_exp']);
34
- $instance['UJI_link'] = stripslashes($new_instance['UJI_link']);
35
- return $instance;
36
- } // save
37
-
38
- function form($instance){
39
- $instance = wp_parse_args( (array) $instance, array('UJI_title'=>'', 'UJI_style'=>'', 'UJI_date'=>'', 'UJI_exp'=>'', 'UJI_link'=>'') );
40
- $UJI_title = htmlspecialchars($instance['UJI_title']);
41
- $UJI_style = htmlspecialchars($instance['UJI_style']);
42
- $UJI_date = htmlspecialchars($instance['UJI_date']);
43
- $UJI_exp = htmlspecialchars($instance['UJI_exp']);
44
- $UJI_link = (isset($UJI_link)) ? htmlspecialchars($instance['UJI_link']) : '';
45
-
46
-
47
- global $wp_version;
48
- if ( $wp_version >= 3.5 ) {
49
- wp_enqueue_script ( 'ujic_jquery_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui.min.js' , array ( 'jquery' ) , '1.10.3' , true );
50
- wp_enqueue_script ( 'ujic_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-timepicker.js' , array ( 'ujic_jquery_date_js' ) , '1.3' , true );
51
- }else{
52
- wp_enqueue_script ( 'ujic_jquery_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-old.min.js' , array ( 'jquery' ) , '1.8' , true );
53
- wp_enqueue_script ( 'ujic_date_js' , UJI_PLUGIN_URL . '/inc/js/jquery-ui-timepicker-old.js' , array ( 'ujic_jquery_date_js' ) , '1.0.1' , true );
54
- }
55
- wp_enqueue_script ( 'ujic_widget_js' , UJI_PLUGIN_URL . '/inc/js/widget-js.js' , array ( 'jquery' ) , '1.0');
56
- wp_register_style('ujic-jqueryui-css', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css");
57
- wp_enqueue_style( 'ujic-jqueryui-css');
58
-
59
-
60
- echo '<p style="font-size:11px">Just one counter on page is allowed. <br>Check <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page. <p>';
61
-
62
- echo '<p><label>' . 'Title:' . '</label>
63
- <input type="text" value="'. $UJI_title .'" width="200px" id="'.$this->get_field_id('UJI_title').'" class="widefat" name="' . $this->get_field_name('UJI_title') . '" />
64
- </p>';
65
-
66
- echo '<p><label>' . 'Select your style:' . '</label>
67
- <select class="widefat" id="'.$this->get_field_id('UJI_style').'" name="'.$this->get_field_name('UJI_style').'">
68
- <option value=""> Select a Style </option>'
69
- .ujic_forms($UJI_style).
70
- '</select></p>';
71
-
72
- echo '<p><label>' . 'Countdown Expire In:' . '</label>
73
- <input type="text" value="'. $UJI_date .'" width="200px" id="'.$this->get_field_id('UJI_date').'" class="UJI_date widefat" name="' . $this->get_field_name('UJI_date') . '" />
74
- </p>';
75
-
76
- echo '<p><h3>After expiry:</h3>
77
- <label>' . 'Hide countdown:' . '</label>
78
- <input type="checkbox" ', ($UJI_exp==1) ? ' checked="checked"' : '' ,' value="1" id="'.$this->get_field_id('UJI_exp').'" class="ujic_exp" name="' . $this->get_field_name('UJI_exp') . '" />
79
- </p>';
80
-
81
- echo '<p><label>' . 'Or go to link:' . '</label>
82
- <input type="text" value="'. $UJI_link .'" width="200px" id="'.$this->get_field_id('UJI_link').'" class="ujic_link widefat" name="' . $this->get_field_name('UJI_link') . '" />
83
- </p>';
84
- ?>
85
- <script language="javascript">
86
- jQuery(function() {
87
-
88
- jQuery('.UJI_date').each(function() {
89
- jQuery(this).datetimepicker({
90
- timeFormat: 'hh:mm',
91
- dateFormat: 'yy/mm/dd'
92
- });
93
- });
94
-
95
- jQuery('.ujic_link').each(function() {
96
- jQuery(this).keyup(function () {
97
- var value = jQuery(this).val();
98
- var cname = jQuery(this).parent().parent().find('.ujic_exp').attr("name");
99
- jQuery(this).parent().parent().find('.ujic_exp').css('border', 'red');
100
- //alert("ccc");
101
-
102
- if(value){
103
- jQuery('input[name="'+cname+'"]').attr('checked', false);
104
- }else{
105
-
106
- jQuery('input[name="'+cname+'"]').attr('checked', true);
107
- }
108
-
109
- });
110
- });
111
-
112
- });
113
-
114
- </script>
115
- <?php
116
- } // form
117
-
118
- } // class
119
-
120
- function UJI_countdownWidget() {
121
- register_widget('UJI_countdown');
122
- }
123
-
124
- add_action('widgets_init', 'UJI_countdownWidget');
125
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
uji-countdown.php DELETED
@@ -1,159 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Uji Countdown
4
- Plugin URI: http://www.wpmanage.com/uji-countdown/
5
- Description: HTML5 Countdown.
6
- Version: 1.3.3
7
- Author: Ujog Raul
8
- Author URI: http://www.wpmanage.com
9
-
10
- Copyright (c) 2012-2014
11
- */
12
-
13
- if (!defined('UJI_PLUGIN_NAME'))
14
- define('UJI_PLUGIN_NAME', trim(dirname(plugin_basename(__FILE__)), '/'));
15
-
16
- if (!defined('UJI_PLUGIN_BASE'))
17
- define('UJI_PLUGIN_BASE', plugin_basename(__FILE__));
18
-
19
- if (!defined('UJI_PLUGIN_URL'))
20
- define('UJI_PLUGIN_URL', WP_PLUGIN_URL . '/' . UJI_PLUGIN_NAME);
21
-
22
- if (!defined('UJI_PLUGIN_DIR'))
23
- define('UJI_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . UJI_PLUGIN_NAME);
24
-
25
- if(!defined("UJI_CURRENT_PAGE"))
26
- define("UJI_CURRENT_PAGE", basename($_SERVER['PHP_SELF']));
27
-
28
- if (!defined('UJI_VERSION_KEY'))
29
- define('UJI_VERSION_KEY', 'UJI_version');
30
-
31
- if (!defined('UJI_VERSION_NUM'))
32
- define('UJI_VERSION_NUM', '1.3');
33
-
34
- ///////////////////////////////////DB///////////////////////////////////////
35
-
36
-
37
- function create_ujic_db(){
38
- global $wpdb;
39
- $sql = "CREATE TABLE " . $wpdb->prefix ."uji_counter (
40
- id int(9) unsigned NOT NULL AUTO_INCREMENT,
41
- time datetime not null,
42
- title varchar(128) not null,
43
- size int(2) not null,
44
- col_dw varchar(7) not null,
45
- col_up varchar(7) not null,
46
- ujic_pos varchar(10) not null,
47
- col_txt varchar(7) not null,
48
- col_sw varchar(7) not null,
49
- ujic_ani int(1) not null,
50
- ujic_txt int(1) not null,
51
- PRIMARY KEY (id)
52
- ) ENGINE=MyISAM DEFAULT CHARSET=$wpdb->charset AUTO_INCREMENT=0;";
53
- require_once(ABSPATH . '/wp-admin/includes/upgrade.php');
54
- dbDelta($sql);
55
- add_option("UJI_VERSION", UJI_VERSION_KEY);
56
- }
57
- register_activation_hook(__FILE__,'create_ujic_db');
58
-
59
- ////////////////////////////////////Add/Edit////////////////////////////////////
60
-
61
- require_once(dirname( __FILE__ ) . "/uji-countdown-add.php");
62
-
63
- ////////////////////////////////////Front////////////////////////////////////
64
-
65
- require_once(dirname( __FILE__ ) . "/uji-countdown-front.php");
66
-
67
- ////////////////////////////////////Widget//////////////////////////////////////
68
-
69
- require_once(dirname( __FILE__ ) . "/uji-countdown-widget.php");
70
-
71
- ///////////////////////////////////CSS///////////////////////////////////////
72
-
73
- function UJI__stylesheet() {
74
- $myStyleUrl = UJI_PLUGIN_URL . '/css/admin.countdown.css';
75
- $myStyleFile = UJI_PLUGIN_DIR . '/css/admin.countdown.css';
76
- if ( file_exists($myStyleFile) ) {
77
- wp_register_style('ujiStyleSheet', $myStyleUrl);
78
- wp_enqueue_style( 'ujiStyleSheet');
79
- wp_register_style('ujiStyleCount', UJI_PLUGIN_URL . '/css/jquery.countdown.css');
80
- wp_enqueue_style( 'ujiStyleCount');
81
- wp_enqueue_style('dashboard');
82
- }
83
- }
84
- function UJI__colopick() {
85
- $colUrl = UJI_PLUGIN_URL . '/inc/css/colorpicker.css';
86
- $colFile = UJI_PLUGIN_DIR . '/inc/css/colorpicker.css';
87
- if ( file_exists($colFile) ) {
88
- wp_register_style('ujiCol', $colUrl);
89
- wp_enqueue_style( 'ujiCol');
90
- wp_register_style('ujiColLay', UJI_PLUGIN_URL . '/inc/css/layout.css');
91
- wp_enqueue_style( 'ujiColLay');
92
- }
93
- }
94
-
95
- ///////////////////////////////////JS////////////////////////////////////////
96
-
97
- function UJI_js() {
98
- wp_enqueue_script ('UJI_js_count', UJI_PLUGIN_URL . '/js/prev.countdown.js', array('jquery'), '1.0', true);
99
- wp_enqueue_script( 'postbox' );
100
- wp_enqueue_script( 'dashboard' );
101
- }
102
- function UJI_color_js() {
103
- wp_enqueue_script ('UJI_color_js', UJI_PLUGIN_URL . '/inc/js/colorpicker.js', array('jquery'), '1.0', true);
104
- wp_enqueue_script ('UJI_acolor_js', UJI_PLUGIN_URL . '/inc/js/admin.color.js', array('jquery'), '1.0', true);
105
- }
106
-
107
- ////////////////////////////////////LOCALIZATION////////////////////////////////
108
-
109
- function ujic_init() {
110
- load_plugin_textdomain( 'uji-countdown', false, '/uji-countdown/languages' );
111
- }
112
- add_action('init', 'ujic_init');
113
-
114
- ////////////////////////////////////MENU////////////////////////////////////
115
-
116
- add_action('admin_menu', 'my_UJI_menu');
117
- function my_UJI_menu() {
118
-
119
- $UJI_edit = add_submenu_page('options-general.php', 'Countdown', 'Countdown', 'manage_options', 'ujic-count', 'ujic_add_new');
120
-
121
- add_action('admin_print_styles-'. $UJI_edit, 'UJI__stylesheet');
122
- add_action('admin_print_styles-'. $UJI_edit, 'UJI__colopick');
123
- add_action('admin_print_scripts-'. $UJI_edit, 'UJI_js');
124
- add_action('admin_print_scripts-'. $UJI_edit, 'UJI_color_js');
125
- }
126
-
127
- ////////////////////////////////////INIT////////////////////////////////////////
128
-
129
- function UJI_set_links($links) {
130
- array_unshift($links, '<a class="edit" href="options-general.php?page=ujic-count">Settings</a>');
131
- return $links;
132
- }
133
-
134
- add_filter('plugin_action_links_'.UJI_PLUGIN_BASE, 'UJI_set_links', 10, 2 );
135
-
136
- ////////////////////////////////////POST BUTTON////////////////////////////////////////
137
-
138
- function ujic_form_button($context){
139
- $image_btn = UJI_PLUGIN_URL. '/images/icon.png';
140
- $out = '<a href="#TB_inline?width=300&height=480&inlineId=select_countdown_form" class="thickbox" id="add_ujic" title="Add Countdown"><img src="'.$image_btn.'" alt="Add Counter" /></a>';
141
- return $context . $out;
142
- }
143
- add_action('media_buttons_context', 'ujic_form_button');
144
-
145
- if(in_array(UJI_CURRENT_PAGE, array('post.php', 'page.php', 'page-new.php', 'post-new.php'))){
146
- add_action('admin_footer', 'add_ujic_popup');
147
- }
148
-
149
- ////////////////////////////////////ENQUIRE SCRIPT////////////////////////////////////////
150
-
151
- function ujic_scripts_register() {
152
- wp_register_style('ujiStyleCount', UJI_PLUGIN_URL . '/css/jquery.countdown.css');
153
- wp_enqueue_script('jquery');
154
- wp_register_script('UJI_js_countdown', UJI_PLUGIN_URL . '/js/jquery.countdown.js', array('jquery'), '1.0', true);
155
- wp_register_script('js_countdown', UJI_PLUGIN_URL . '/js/countdown.js', array('jquery'), '1.0', true);
156
- }
157
- add_action('wp_enqueue_scripts', 'ujic_scripts_register');
158
-
159
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ujicountdown.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Uji Countdown
4
+ * @author Wpmanage <info@wpmanage.com>
5
+ * @license Free
6
+ * @link http://wpmanage.com/uji-countdown
7
+ * @copyright 2014 WPmanage.com
8
+ *
9
+ * @wordpress-plugin
10
+ * Plugin Name: Uji Countdown
11
+ * Plugin URI: http://wpmanage.com/uji-countdown
12
+ * Description: HTML5 Countdown.
13
+ * Version: 2.0.1
14
+ * Author: Wpmanage
15
+ * Author URI: http://wpmanage.com
16
+ * Text Domain: uji-countdown
17
+ * License: GPL-2.0+
18
+ * Domain Path: /lang
19
+ */
20
+
21
+ // If this file is called directly, abort.
22
+ if ( ! defined( 'WPINC' ) ) {
23
+ die;
24
+ }
25
+ define( 'UJIC_NAME', 'Uji Countdown' );
26
+ define( 'UJIC_VERS', '2.0' );
27
+ define( 'UJIC_FOLD', 'uji-countdown' );
28
+ define( 'UJICOUNTDOWN', trailingslashit( dirname(__FILE__) ) );
29
+ define( 'UJICOUNTDOWN_URL', plugin_dir_url( __FILE__ ) );
30
+ define( 'UJICOUNTDOWN_BASE', plugin_basename(__FILE__) );
31
+ define( 'UJICOUNTDOWN_FILE', __FILE__ );
32
+
33
+ //Google Fonts
34
+ require_once( plugin_dir_path( __FILE__ ) . 'assets/googlefonts.php' );
35
+
36
+ // Classes
37
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-admin.php' );
38
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown.php' );
39
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-front.php' );
40
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-widget.php' );
41
+
42
+ // INIT
43
+ Uji_Countdown::get_instance();
views/admin.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Represents the view for the administration dashboard.
4
+ *
5
+ * This includes the header, options, and other information that should provide
6
+ * The User Interface to the end user.
7
+ *
8
+ * @package goodByeCaptcha
9
+ * @author Your Name <email@example.com>
10
+ * @license GPL-2.0+
11
+ * @link http://example.com
12
+ * @copyright 2013 Your Name or Company Name
13
+ */
14
+ ?>
15
+ <div class="wrap">
16
+
17
+ <?php screen_icon(); ?>
18
+ <h2<?php if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) { echo ' class="ujc-admin-tit"'; } ?>><?php echo esc_html( get_admin_page_title() ); ?></h2>
19
+
20
+ <?php
21
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'tab_ujic_list';
22
+ if(isset($_GET['tab']))
23
+ $active_tab = $_GET['tab'];
24
+ ?>
25
+
26
+ <h2 class="nav-tab-wrapper">
27
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_list" class="nav-tab <?php echo $active_tab == 'tab_ujic_list' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-menu ujic-mico"></i><?php _e('My Countdowns', 'uji-countdown'); ?></a>
28
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_new" class="nav-tab <?php echo $active_tab == 'tab_ujic_new' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-clock ujic-mico"></i><?php _e('Add/Edit Countdown', 'uji-countdown'); ?></a>
29
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_set" class="nav-tab <?php echo $active_tab == 'tab_ujic_set' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e('Settings', 'uji-countdown'); ?></a>
30
+ <a href="http://wpmanage.com/uji-countdown" target="_blank" class="nav-tab nav-tab-pro"><i class="dashicons dashicons-plus ujic-mico"></i><?php _e('Upgrade to PRO', 'uji-countdown'); ?></a>
31
+ </h2>
32
+
33
+ <?php $ujicount = new Uji_Countdown(); ?>
34
+
35
+ <?php
36
+ if($active_tab == 'tab_ujic_list') {
37
+ $ujicount -> admin_tablelist();
38
+ }
39
+
40
+ if($active_tab == 'tab_ujic_new') {
41
+ $ujicount -> admin_countdown();
42
+ }
43
+
44
+ if($active_tab == 'tab_ujic_set') {
45
+ $ujicount -> admin_timerset();
46
+ }
47
+ ?>
48
+
49
+ </div>
views/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden ?>
views/public.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Represents the view for the public-facing component of the plugin.
4
+ *
5
+ * This typically includes any information, if any, that is rendered to the
6
+ * frontend of the theme when the plugin is activated.
7
+ *
8
+ * @package goodByeCaptcha
9
+ * @author Your Name <email@example.com>
10
+ * @license GPL-2.0+
11
+ * @link http://example.com
12
+ * @copyright 2013 Your Name or Company Name
13
+ */
14
+ ?>
15
+ <!-- This file is used to markup the public facing aspect of the plugin. -->