Easing Slider - Version 2.0

Version Description

  • Too many updates to count. Completely revamped plugin from a clean slate. Hope you enjoy using it as much as I did creating it!
Download this release

Release Info

Developer MatthewRuddy
Plugin Icon 128x128 Easing Slider
Version 2.0
Comparing to
See all releases

Code changes from version 1.2.1 to 2.0

Files changed (71) hide show
  1. css/admin.css +287 -0
  2. css/admin.min.css +1 -0
  3. css/slider.css +0 -22
  4. css/slideshow.css +316 -0
  5. css/slideshow.min.css +1 -0
  6. css/tabs.css +0 -39
  7. easingslider.php +0 -1017
  8. images/advert.jpg +0 -0
  9. images/arrows.gif +0 -0
  10. images/b_next.png +0 -0
  11. images/b_prev.png +0 -0
  12. images/bar.gif +0 -0
  13. images/bg_trans.png +0 -0
  14. images/bigflower.gif +0 -0
  15. images/bounceball.gif +0 -0
  16. images/delete_icon.png +0 -0
  17. images/delete_icon@2x.png +0 -0
  18. images/edit_icon.png +0 -0
  19. images/edit_icon@2x.png +0 -0
  20. images/indicator.gif +0 -0
  21. images/indicatorlight.gif +0 -0
  22. images/load-indicator.gif +0 -0
  23. images/loading.gif +0 -0
  24. images/menu_icon.png +0 -0
  25. images/menu_icon_2x.png +0 -0
  26. images/menu_icon_single.png +0 -0
  27. images/menu_icon_single_grey.png +0 -0
  28. images/next.png +0 -0
  29. images/pagination.png +0 -0
  30. images/pagination_current.png +0 -0
  31. images/pagination_hover.png +0 -0
  32. images/pik.gif +0 -0
  33. images/selected_admin.jpg +0 -0
  34. images/shadow_arc.png +0 -0
  35. images/shadow_large.png +0 -0
  36. images/shadow_small.png +0 -0
  37. images/slideshow_arrows.png +0 -0
  38. images/slideshow_icons.png +0 -0
  39. images/snake.gif +0 -0
  40. images/spinner.gif +0 -0
  41. images/transparent_bg.png +0 -0
  42. images/trash.png +0 -0
  43. images/trash@2x.png +0 -0
  44. images/unselected_admin.jpg +0 -0
  45. images/white-grad.png +0 -0
  46. includes/Resize.php +181 -0
  47. includes/Slideshow.php +81 -0
  48. includes/Upgrade.php +111 -0
  49. includes/Widget.php +78 -0
  50. js/admin.js +581 -0
  51. js/admin.min.js +2 -0
  52. js/jquery.easing.js +0 -205
  53. js/jquery.js +0 -154
  54. js/script.js +0 -333
  55. js/slideshow.js +618 -0
  56. js/slideshow.min.js +2 -0
  57. js/uploadimagebutton.js +0 -15
  58. readme.txt +31 -83
  59. rivasliderlite.php +914 -0
  60. screenshot-1.jpg +0 -0
  61. screenshot-2.jpg +0 -0
  62. screenshot-3.jpg +0 -0
  63. screenshot-4.jpg +0 -0
  64. screenshot-5.jpg +0 -0
  65. templates/editsettings.php +119 -0
  66. templates/editslideshow-media-details.php +45 -0
  67. templates/editslideshow-sidebar.php +239 -0
  68. templates/editslideshow-slide.php +57 -0
  69. templates/editslideshow-welcome.php +45 -0
  70. templates/editslideshow.php +47 -0
  71. templates/slideshow.php +117 -0
css/admin.css ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** ===== Floats & clearfix ===== */
2
+ .pull-left {
3
+ float: left;
4
+ }
5
+ .pull-right {
6
+ float: right;
7
+ }
8
+ .clearfix {
9
+ *zoom: 1;
10
+ }
11
+ .clearfix::before, .clearfix::after {
12
+ display: table;
13
+ content: '';
14
+ line-height: 0;
15
+ }
16
+ .clearfix::after {
17
+ clear: both;
18
+ }
19
+
20
+ /** ===== Slideshow List ===== */
21
+ .column-id {
22
+ width: 2em;
23
+ }
24
+
25
+ /** ===== Media Buttons ===== */
26
+ .wp-media-buttons .button {
27
+ padding-left: .4em;
28
+ margin-right: 5px;
29
+ }
30
+ .wp-media-buttons .button:last-child {
31
+ margin-right: 0;
32
+ }
33
+ .wp-media-buttons span.wp-media-buttons-icon {
34
+ display: inline-block;
35
+ width: 16px;
36
+ height: 16px;
37
+ vertical-align: text-top;
38
+ margin: 0 2px;
39
+ }
40
+ .wp-media-buttons .add-image span.wp-media-buttons-icon {
41
+ background: url('../../../../wp-admin/images/media-button.png') no-repeat top left;
42
+ }
43
+ .wp-media-buttons .delete-images span.wp-media-buttons-icon {
44
+ background: url('../images/trash.png') no-repeat 0 0;
45
+ margin-top: -1px;
46
+ }
47
+ .wp-media-buttons .edit-settings span.wp-media-buttons-icon {
48
+ background: url('../../../../wp-admin/images/menu.png') no-repeat top left;
49
+ background-position: -336px -40px;
50
+ }
51
+
52
+ /** ===== Multiple Checkboxes ===== */
53
+ .multiple-checkbox {
54
+ overflow-x: hidden;
55
+ overflow-y: auto;
56
+ border: 1px solid #dfdfdf;
57
+ background-color: #fff;
58
+ width: 25%;
59
+ height: 120px;
60
+ -webkit-border-radius: 3px;
61
+ border-radius: 3px;
62
+ }
63
+ .multiple-checkbox ul {
64
+ list-style-type: none;
65
+ width: auto;
66
+ line-height: 1.2;
67
+ margin: 0;
68
+ padding: 0;
69
+ }
70
+ .multiple-checkbox ul li {
71
+ margin: 0;
72
+ padding: 2px 2px 0 0;
73
+ line-height: 1.2;
74
+ }
75
+ .multiple-checkbox ul li.odd {
76
+ background-color: #f9f9f9;
77
+ }
78
+ .multiple-checkbox ul li input {
79
+ margin: 0 5px;
80
+ }
81
+
82
+ /** ===== Input helpers ===== */
83
+ input.error,
84
+ textarea.error {
85
+ border-color: #b94a48 !important;
86
+ -webkit-box-shadow: 1px 1px 2px rgba(213, 147, 146, 0.3) !important;
87
+ box-shadow: 1px 1px 2px rgba(213, 147, 146, 0.3) !important;
88
+ }
89
+
90
+ input.success,
91
+ textarea.success {
92
+ border-color: #468847 !important;
93
+ -webkit-box-shadow: 1px 1px 2px rgba(122, 186, 123, 0.3) !important;
94
+ box-shadow: 1px 1px 2px rgba(122, 186, 123, 0.3) !important;
95
+ }
96
+
97
+ /** ===== Main Admin panel ===== */
98
+ .main-panel {
99
+ position: relative;
100
+ }
101
+ .main-panel .description {
102
+ font-size: 11px;
103
+ font-style: italic;
104
+ display: block;
105
+ color: #777;
106
+ padding: 5px 0px;
107
+ }
108
+
109
+ /** ===== Divider ===== */
110
+ .divider {
111
+ padding: 0;
112
+ margin: 20px 0;
113
+ width: 100%;
114
+ height: 1px;
115
+ background: #e6e6e6;
116
+ }
117
+
118
+ /** ===== Settings container ===== */
119
+ .settings-container {
120
+ float: right;
121
+ clear: right;
122
+ width: 285px;
123
+ padding-right: 5px;
124
+ }
125
+ .settings-container .widgets-holder-wrap {
126
+ margin-top: 0;
127
+ }
128
+ .settings-container .sidebar-content {
129
+ border-width: 0 1px 1px;
130
+ border-style: none solid solid;
131
+ -webkit-border-bottom-right-radius: 3px;
132
+ -webkit-border-bottom-left-radius: 3px;
133
+ border-bottom-right-radius: 3px;
134
+ border-bottom-left-radius: 3px;
135
+ padding: 10px;
136
+ min-height: 20px;
137
+ }
138
+ .settings-container .sidebar-content .divider {
139
+ margin-bottom: 0;
140
+ }
141
+ .settings-container .sidebar-content .field,
142
+ .settings-container .sidebar-content .radio {
143
+ width: 100%;
144
+ margin: 1em 0;
145
+ }
146
+ .settings-container .sidebar-content .field span {
147
+ font-weight: bold;
148
+ display: block;
149
+ }
150
+ .settings-container .sidebar-content .field {
151
+ float: left;
152
+ }
153
+ .settings-container .sidebar-content .field input,
154
+ .settings-container .sidebar-content .field select {
155
+ width: 90%;
156
+ }
157
+ .settings-container .sidebar-content .field input[type="checkbox"] {
158
+ width: auto;
159
+ margin-right: 4px;
160
+ }
161
+ .settings-container .sidebar-content .radio > span {
162
+ font-weight: bold;
163
+ float: left;
164
+ }
165
+ .settings-container .sidebar-content .radio .buttons {
166
+ float: right;
167
+ }
168
+ .settings-container .sidebar-content .radio .buttons label {
169
+ margin-right: 10px;
170
+ }
171
+ .settings-container .sidebar-content .radio .buttons input {
172
+ margin-top: 0;
173
+ margin-right: 2px;
174
+ }
175
+ .settings-container .dimension-settings .field {
176
+ width: 45%;
177
+ }
178
+ .settings-container .dimension-settings .field:first-child {
179
+ margin-right: 5%;
180
+ }
181
+
182
+ /** ===== Thumbnails ===== */
183
+ .thumbnails-container {
184
+ float: left;
185
+ clear: left;
186
+ width: 100%;
187
+ margin: 15px -300px 0 0;
188
+ }
189
+ .thumbnails-container .inner {
190
+ margin-right: 300px;
191
+ }
192
+ .thumbnails-container .thumbnail {
193
+ float: left;
194
+ position: relative;
195
+ }
196
+ .thumbnails-container .thumbnail .delete-button {
197
+ position: absolute;
198
+ top: -15px;
199
+ right: 5px;
200
+ width: 36px;
201
+ height: 36px;
202
+ z-index: 10;
203
+ background: url(../images/delete_icon.png) no-repeat top left;
204
+ cursor: pointer;
205
+ opacity: 0;
206
+ -webkit-transition: opacity 0.125s ease;
207
+ -moz-transition: opacity 0.125s ease;
208
+ -ms-transition: opacity 0.125s ease;
209
+ -o-transition: opacity 0.125s ease;
210
+ transition: opacity 0.125s ease;
211
+ }
212
+ .thumbnails-container .thumbnail:hover .delete-button {
213
+ opacity: 1;
214
+ }
215
+ .thumbnails-container .thumbnail img {
216
+ -moz-box-shadow: 0px 1px 4px 0px #a5a5a5;
217
+ -webkit-box-shadow: 0px 1px 4px 0px #a5a5a5;
218
+ box-shadow: 0px 1px 4px 0px #a5a5a5;
219
+ -webkit-border-radius: 2px;
220
+ border-radius: 2px;
221
+ cursor: pointer;
222
+ width: 150px;
223
+ height: 150px;
224
+ padding: 0;
225
+ margin: 0 20px 20px 0;
226
+ }
227
+
228
+ /** ===== Media Frame ===== */
229
+ .media-frame-title,
230
+ .media-frame-router,
231
+ .media-frame-content,
232
+ .media-frame-toolbar {
233
+ left: 0 !important;
234
+ }
235
+ .media-frame-content {
236
+ padding: 0 16px;
237
+ }
238
+ .media-main {
239
+ margin-right: 283px;
240
+ }
241
+ .media-main h2 {
242
+ font-weight: 200;
243
+ }
244
+ .media-main input,
245
+ .media-main textarea {
246
+ max-width: 500px !important;
247
+ }
248
+ .media-main textarea {
249
+ height: 200px;
250
+ resize: none;
251
+ }
252
+ .media-main .embed-link-settings {
253
+ top: 0;
254
+ }
255
+ .media-main .setting {
256
+ margin-top: 30px !important;
257
+ }
258
+ .media-main .setting:first-child {
259
+ margin-top: 0 !important;
260
+ }
261
+ .media-main .description {
262
+ font-size: 11px;
263
+ margin-top: 5px;
264
+ }
265
+ .media-main .thumbnail {
266
+ position: relative;
267
+ }
268
+ .media-main .thumbnail .change-image {
269
+ position: absolute;
270
+ bottom: 10px;
271
+ right: 10px;
272
+ z-index: 9999;
273
+ }
274
+
275
+ /** ===== Settings page ===== */
276
+ .settings label > input {
277
+ margin-top: 0;
278
+ margin-right: 4px;
279
+ }
280
+ .settings label > span {
281
+ margin-right: 20px;
282
+ }
283
+
284
+ /** ===== Additional ===== */
285
+ .supports-drag-drop {
286
+ z-index: 1000;
287
+ }
css/admin.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .pull-left{float:left}.pull-right{float:right}.clearfix{*zoom:1}.clearfix::before,.clearfix::after{display:table;content:'';line-height:0}.clearfix::after{clear:both}.column-id{width:2em}.wp-media-buttons .button{padding-left:.4em;margin-right:5px}.wp-media-buttons .button:last-child{margin-right:0}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:16px;height:16px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add-image span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/media-button.png') no-repeat top left}.wp-media-buttons .delete-images span.wp-media-buttons-icon{background:url('../images/trash.png') no-repeat 0 0;margin-top:-1px}.wp-media-buttons .edit-settings span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/menu.png') no-repeat top left;background-position:-336px -40px}.multiple-checkbox{overflow-x:hidden;overflow-y:auto;border:1px solid #dfdfdf;background-color:#fff;width:25%;height:120px;-webkit-border-radius:3px;border-radius:3px}.multiple-checkbox ul{list-style-type:none;width:auto;line-height:1.2;margin:0;padding:0}.multiple-checkbox ul li{margin:0;padding:2px 2px 0 0;line-height:1.2}.multiple-checkbox ul li.odd{background-color:#f9f9f9}.multiple-checkbox ul li input{margin:0 5px}input.error,textarea.error{border-color:#b94a48!important;-webkit-box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important;box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important}input.success,textarea.success{border-color:#468847!important;-webkit-box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important;box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important}.main-panel{position:relative}.main-panel .description{font-size:11px;font-style:italic;display:block;color:#777;padding:5px 0}.divider{padding:0;margin:20px 0;width:100%;height:1px;background:#e6e6e6}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .widgets-holder-wrap{margin-top:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px;min-height:20px}.settings-container .sidebar-content .divider{margin-bottom:0}.settings-container .sidebar-content .field,.settings-container .sidebar-content .radio{width:100%;margin:1em 0}.settings-container .sidebar-content .field span{font-weight:bold;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input,.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type="checkbox"]{width:auto;margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:bold;float:left}.settings-container .sidebar-content .radio .buttons{float:right}.settings-container .sidebar-content .radio .buttons label{margin-right:10px}.settings-container .sidebar-content .radio .buttons input{margin-top:0;margin-right:2px}.settings-container .dimension-settings .field{width:45%}.settings-container .dimension-settings .field:first-child{margin-right:5%}.thumbnails-container{float:left;clear:left;width:100%;margin:15px -300px 0 0}.thumbnails-container .inner{margin-right:300px}.thumbnails-container .thumbnail{float:left;position:relative}.thumbnails-container .thumbnail .delete-button{position:absolute;top:-15px;right:5px;width:36px;height:36px;z-index:10;background:url(../images/delete_icon.png) no-repeat top left;cursor:pointer;opacity:0;-webkit-transition:opacity .125s ease;-moz-transition:opacity .125s ease;-ms-transition:opacity .125s ease;-o-transition:opacity .125s ease;transition:opacity .125s ease}.thumbnails-container .thumbnail:hover .delete-button{opacity:1}.thumbnails-container .thumbnail img{-moz-box-shadow:0 1px 4px 0 #a5a5a5;-webkit-box-shadow:0 1px 4px 0 #a5a5a5;box-shadow:0 1px 4px 0 #a5a5a5;-webkit-border-radius:2px;border-radius:2px;cursor:pointer;width:150px;height:150px;padding:0;margin:0 20px 20px 0}.media-frame-title,.media-frame-router,.media-frame-content,.media-frame-toolbar{left:0!important}.media-frame-content{padding:0 16px}.media-main{margin-right:283px}.media-main h2{font-weight:200}.media-main input,.media-main textarea{max-width:500px!important}.media-main textarea{height:200px;resize:none}.media-main .embed-link-settings{top:0}.media-main .setting{margin-top:30px!important}.media-main .setting:first-child{margin-top:0!important}.media-main .description{font-size:11px;margin-top:5px}.media-main .thumbnail{position:relative}.media-main .thumbnail .change-image{position:absolute;bottom:10px;right:10px;z-index:9999}.settings label>input{margin-top:0;margin-right:4px}.settings label>span{margin-right:20px}.supports-drag-drop{z-index:1000}
css/slider.css DELETED
@@ -1,22 +0,0 @@
1
- .lof-slidecontent, .lof-slidecontent a { color:#FFF; }
2
- .lof-container {}.lof-slidecontent{ position: relative;}
3
- .lof-slidecontent .preload{ position:absolute; top:0; left:0; z-index:2; height: 100%; width: 100%;}
4
- .lof-main-outer {position: relative; overflow:hidden;}
5
- .lof-main-outer .lof-next, .lof-main-outer .lof-previous{ display:block; width:40px; color:#FFF; cursor:pointer; position:absolute; height:100%; top:0;}
6
- .lof-main-outer .lof-next { right:10px;}
7
- .lof-main-outer .lof-previous { left:10px;}
8
- .lof-main-wapper li {border: none !important;}
9
-
10
- /* main flash */
11
- ul.lof-main-wapper{ /* margin-right:auto; */ background: transparent; padding:0 !important; margin:0 !important; position: relative;}
12
- ul.lof-main-wapper li{ padding:0 !important; margin:0 !important; float:left; list-style: none; position:relative;}
13
- ul.lof-main-wapper li a img {border:none !important;}
14
- .lof-opacity { overflow:visible !important;; position:absolute !important;}
15
- .lof-opacity li{ position:absolute !important;; top:0; left:0; margin:0; padding:0; float:inherit !important;}
16
- ul.lof-main-wapper li img{ padding:0 !important; margin:0 !important; max-width: none !important; }
17
-
18
- /* item navigator */.lof-navigator-wapper { position:absolute;}
19
- .lof-navigator-outer{ position:relative; z-index:1; height:180px; overflow:hidden; color:#FFF; margin:0; padding:0;}ul.lof-navigator{ top:0; padding:0; margin:0; position:relative; width:100%;}
20
- ul.lof-navigator li{ cursor:pointer; list-style:none; padding:0; margin: 0; overflow:hidden; float:left; display:block; text-align:left; border: none !important;}
21
- ul.lof-navigator li span { display: none;}
22
- ul.lof-navigator li.active { display:block;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/slideshow.css ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Riva Slider Dev
3
+ * @version 2.0
4
+ *
5
+ * Slideshow CSS. Advised you don't make changes to this. Instead, add styling changing to your theme's style.css file.
6
+ *
7
+ * Why do we use a lot of '!important' declarations here?
8
+ * Because we need to make sure any theme CSS doesn't destroy the slideshow functionality. Simple as that.
9
+ *
10
+ * Some information:
11
+ * The slideshow container is set to 'display: none;' via inline CSS to prevent the 'flash' of images before the CSS file is conditionally loaded in the footer.
12
+ * This CSS file then sets the container to 'display: block !important', to make sure it overrides the inline CSS.
13
+ * It works, because the CSS is loaded after the slideshow is printed.
14
+ */
15
+
16
+ /* ===== Core structural CSS. Don't edit this! ===== */
17
+ .rivasliderlite,
18
+ .rivasliderlite-viewport,
19
+ .rivasliderlite-slides-container,
20
+ .rivasliderlite-slide,
21
+ .rivasliderlite-preload {
22
+ margin: 0px !important;
23
+ padding: 0px !important;
24
+ border: 0px !important;
25
+ line-height: 0px !important;
26
+ outline: none !important;
27
+ }
28
+
29
+ .rivasliderlite {
30
+ position: relative !important;
31
+ }
32
+
33
+ .rivasliderlite-preload {
34
+ background: url(../images/loading.gif) no-repeat center center #fff !important;
35
+ width: 100% !important;
36
+ height: 100% !important;
37
+ position: absolute !important;
38
+ top: 0px !important;
39
+ left: 0px !important;
40
+ z-index: 50 !important;
41
+ }
42
+
43
+ .rivasliderlite-arrows.has-hover {
44
+ opacity: 0;
45
+ }
46
+
47
+ .rivasliderlite:hover .rivasliderlite-arrows.has-hover {
48
+ opacity: 1;
49
+ }
50
+
51
+ .rivasliderlite-pagination.has-hover {
52
+ opacity: 0;
53
+ }
54
+
55
+ .rivasliderlite:hover .rivasliderlite-pagination.has-hover {
56
+ opacity: 1;
57
+ }
58
+
59
+ .rivasliderlite-viewport {
60
+ position: relative !important;
61
+ overflow: hidden !important;
62
+ z-index: 10 !important;
63
+ }
64
+
65
+ .rivasliderlite-slides-container {
66
+ overflow: hidden !important;
67
+ position: absolute !important;
68
+ top: 0px;
69
+ left: 0px;
70
+ display: block !important;
71
+ }
72
+
73
+ .rivasliderlite.use-css3 .rivasliderlite-slides-container {
74
+ -webkit-transform: translate3d(0, 0, 0);
75
+ -moz-transform: translate3d(0, 0, 0);
76
+ -ms-transform: translate3d(0, 0, 0);
77
+ -o-transform: translate3d(0, 0, 0);
78
+ transform: translate3d(0, 0, 0);
79
+ }
80
+
81
+ .rivasliderlite.use-slide.use-css3 .rivasliderlite-slides-container {
82
+ -webkit-transition: -webkit-transform 0.5s ease;
83
+ -moz-transition: -moz-transform 0.5s ease;
84
+ -ms-transition: -ms-transform 0.5s ease;
85
+ -o-transition: -o-transform 0.5s ease;
86
+ transition: transform 0.5s ease;
87
+ }
88
+
89
+ .rivasliderlite.use-fade.use-css3 .rivasliderlite-slides-container {
90
+ -webkit-transition: none;
91
+ -moz-transition: none;
92
+ -ms-transition: none;
93
+ -o-transition: none;
94
+ transition: none;
95
+ }
96
+
97
+ .rivasliderlite.use-slide .rivasliderlite-slide {
98
+ float: left !important;
99
+ position: relative !important;
100
+ }
101
+
102
+ .rivasliderlite.use-fade .rivasliderlite-slide {
103
+ position: absolute !important;
104
+ top: 0 !important;
105
+ left: 0 !important;
106
+ }
107
+
108
+ .rivasliderlite.use-fade .rivasliderlite-slide.active {
109
+ z-index: 10;
110
+ }
111
+
112
+ .rivasliderlite-slide {
113
+ width: 100%;
114
+ }
115
+
116
+ .rivasliderlite-slide > a {
117
+ display: block !important;
118
+ }
119
+
120
+ .rivasliderlite-image {
121
+ width: 100% !important;
122
+ max-width: 100% !important;
123
+ display: block !important;
124
+ }
125
+
126
+ .rivasliderlite-slide-content {
127
+ position: absolute !important;
128
+ top: 0;
129
+ left: 0;
130
+ }
131
+
132
+ .rivasliderlite-slide-content .caption.left {
133
+ top: 0px !important;
134
+ left: 0px !important;
135
+ }
136
+
137
+ .rivasliderlite-slide-content .caption.right {
138
+ top: 0px !important;
139
+ right: 0px !important;
140
+ }
141
+
142
+ .rivasliderlite-slide-content .caption.top {
143
+ top: 0px !important;
144
+ left: 0px !important;
145
+ }
146
+
147
+ .rivasliderlite-slide-content .caption.bottom {
148
+ bottom: 0px !important;
149
+ left: 0px !important;
150
+ }
151
+
152
+ /* ===== Anything below here can be edited. Have fun! ===== */
153
+ .rivasliderlite-arrows {
154
+ position: absolute;
155
+ top: 46%;
156
+ width: 30px;
157
+ height: 30px;
158
+ background-image: url(../images/slideshow_arrows.png);
159
+ background-repeat: no-repeat;
160
+ background-position: 0px 0px;
161
+ z-index: 30;
162
+ cursor: pointer;
163
+ opacity: 0; /* Slideshow will set to this 1 when it has loaded */
164
+ -webkit-transition: opacity 0.25s linear;
165
+ -moz-transition: opacity 0.25s linear;
166
+ -ms-transition: opacity 0.25s linear;
167
+ -o-transition: opacity 0.25s linear;
168
+ transition: opacity 0.25s linear;
169
+ }
170
+
171
+ .rivasliderlite-next.inside {
172
+ right: 10px;
173
+ background-position: 0px -29px;
174
+ }
175
+
176
+ .rivasliderlite-next.outside {
177
+ right: -40px;
178
+ padding-left: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
179
+ background-position: 20px -29px;
180
+ }
181
+
182
+ .rivasliderlite-prev.inside {
183
+ left: 10px;
184
+ }
185
+
186
+ .rivasliderlite-prev.outside {
187
+ left: -40px;
188
+ padding-right: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
189
+ }
190
+
191
+ .rivasliderlite-pagination {
192
+ position: absolute;
193
+ z-index: 30;
194
+ opacity: 0; /** Slideshow will set to this 1 when it has loaded */
195
+ -webkit-transition: opacity 0.25s linear;
196
+ -moz-transition: opacity 0.25s linear;
197
+ -ms-transition: opacity 0.25s linear;
198
+ -o-transition: opacity 0.25s linear;
199
+ transition: opacity 0.25s linear;
200
+ }
201
+
202
+ .rivasliderlite-pagination.inside.bottom-left {
203
+ bottom: 10px;
204
+ left: 10px;
205
+ }
206
+
207
+ .rivasliderlite-pagination.inside.bottom-right {
208
+ bottom: 10px;
209
+ right: 10px;
210
+ }
211
+
212
+ .rivasliderlite-pagination.inside.bottom-center {
213
+ bottom: 10px;
214
+ left: 0;
215
+ width: 100%;
216
+ text-align: center;
217
+ }
218
+
219
+ .rivasliderlite-pagination.inside.top-left {
220
+ top: 10px;
221
+ left: 10px;
222
+ }
223
+
224
+ .rivasliderlite-pagination.inside.top-right {
225
+ top: 10px;
226
+ right: 10px;
227
+ }
228
+
229
+ .rivasliderlite-pagination.inside.top-center {
230
+ top: 10px;
231
+ left: 0;
232
+ width: 100%;
233
+ text-align: center;
234
+ }
235
+
236
+ .rivasliderlite-pagination.outside.bottom-left {
237
+ bottom: -25px;
238
+ left: 0px;
239
+ padding-top: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
240
+ }
241
+
242
+ .rivasliderlite-pagination.outside.bottom-right {
243
+ bottom: -25px;
244
+ right: 0px;
245
+ padding-top: 20px;
246
+ }
247
+
248
+ .rivasliderlite-pagination.outside.bottom-center {
249
+ bottom: -25px;
250
+ left: 0;
251
+ width: 100%;
252
+ text-align: center;
253
+ padding-top: 20px;
254
+ }
255
+
256
+ .rivasliderlite-pagination.outside.top-left {
257
+ top: -25px;
258
+ left: 0px;
259
+ padding-bottom: 20px;
260
+ }
261
+
262
+ .rivasliderlite-pagination.outside.top-right {
263
+ top: -25px;
264
+ right: 0px;
265
+ padding-bottom: 20px;
266
+ }
267
+
268
+ .rivasliderlite-pagination.outside.top-center {
269
+ top: -25px;
270
+ left: 0;
271
+ width: 100%;
272
+ text-align: center;
273
+ padding-bottom: 20px;
274
+ }
275
+
276
+ .rivasliderlite-icon {
277
+ width: 14px;
278
+ height: 14px;
279
+ background-image: url(../images/slideshow_icons.png);
280
+ background-repeat: no-repeat;
281
+ background-position: 0px 0px;
282
+ display: inline-block;
283
+ z-index: 30;
284
+ cursor: pointer;
285
+ }
286
+
287
+ .rivasliderlite-icon:last-child {
288
+ margin-right: 0px;
289
+ }
290
+
291
+ .rivasliderlite-icon.active {
292
+ background-position: 0px -14px;
293
+ }
294
+
295
+ .rivasliderlite-slide-content .caption {
296
+ background-color: #000; /** Fallback for rgba unsupported browsers */
297
+ background-color: rgba(0, 0, 0, 0.5);
298
+ color: #fff;
299
+ padding: 20px;
300
+ margin: 20px;
301
+ }
302
+
303
+ .active .rivasliderlite-slide-content .caption {
304
+ -webkit-animation-duration: 0.25s;
305
+ -moz-animation-duration: 0.25s;
306
+ -o-animation-duration: 0.25s;
307
+ animation-duration: 0.25s;
308
+ -webkit-animation-delay: 0.5s;
309
+ -moz-animation-delay: 0.5s;
310
+ -o-animation-delay: 0.5s;
311
+ animation-delay: 0.5s;
312
+ -webkit-animation-fill-mode: both;
313
+ -moz-animation-fill-mode: both;
314
+ -o-animation-fill-mode: both;
315
+ animation-fill-mode: both;
316
+ }
css/slideshow.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .rivasliderlite,.rivasliderlite-viewport,.rivasliderlite-slides-container,.rivasliderlite-slide,.rivasliderlite-preload{margin:0!important;padding:0!important;border:0!important;line-height:0!important;outline:none!important}.rivasliderlite{position:relative!important}.rivasliderlite-preload{background:url(../images/loading.gif) no-repeat center center #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.rivasliderlite-arrows.has-hover{opacity:0}.rivasliderlite:hover .rivasliderlite-arrows.has-hover{opacity:1}.rivasliderlite-pagination.has-hover{opacity:0}.rivasliderlite:hover .rivasliderlite-pagination.has-hover{opacity:1}.rivasliderlite-viewport{position:relative!important;overflow:hidden!important;z-index:10!important}.rivasliderlite-slides-container{overflow:hidden!important;position:absolute!important;top:0;left:0;display:block!important}.rivasliderlite.use-css3 .rivasliderlite-slides-container{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.rivasliderlite.use-slide.use-css3 .rivasliderlite-slides-container{-webkit-transition:-webkit-transform .5s ease;-moz-transition:-moz-transform .5s ease;-ms-transition:-ms-transform .5s ease;-o-transition:-o-transform .5s ease;transition:transform .5s ease}.rivasliderlite.use-fade.use-css3 .rivasliderlite-slides-container{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.rivasliderlite.use-slide .rivasliderlite-slide{float:left!important;position:relative!important}.rivasliderlite.use-fade .rivasliderlite-slide{position:absolute!important;top:0!important;left:0!important}.rivasliderlite.use-fade .rivasliderlite-slide.active{z-index:10}.rivasliderlite-slide{width:100%}.rivasliderlite-slide>a{display:block!important}.rivasliderlite-image{width:100%!important;max-width:100%!important;display:block!important}.rivasliderlite-slide-content{position:absolute!important;top:0;left:0}.rivasliderlite-slide-content .caption.left{top:0!important;left:0!important}.rivasliderlite-slide-content .caption.right{top:0!important;right:0!important}.rivasliderlite-slide-content .caption.top{top:0!important;left:0!important}.rivasliderlite-slide-content .caption.bottom{bottom:0!important;left:0!important}.rivasliderlite-arrows{position:absolute;top:46%;width:30px;height:30px;background-image:url(../images/slideshow_arrows.png);background-repeat:no-repeat;background-position:0 0;z-index:30;cursor:pointer;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.rivasliderlite-next.inside{right:10px;background-position:0 -29px}.rivasliderlite-next.outside{right:-40px;padding-left:20px;background-position:20px -29px}.rivasliderlite-prev.inside{left:10px}.rivasliderlite-prev.outside{left:-40px;padding-right:20px}.rivasliderlite-pagination{position:absolute;z-index:30;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.rivasliderlite-pagination.inside.bottom-left{bottom:10px;left:10px}.rivasliderlite-pagination.inside.bottom-right{bottom:10px;right:10px}.rivasliderlite-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.rivasliderlite-pagination.inside.top-left{top:10px;left:10px}.rivasliderlite-pagination.inside.top-right{top:10px;right:10px}.rivasliderlite-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.rivasliderlite-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.rivasliderlite-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.rivasliderlite-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.rivasliderlite-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.rivasliderlite-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.rivasliderlite-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.rivasliderlite-icon{width:14px;height:14px;background-image:url(../images/slideshow_icons.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;z-index:30;cursor:pointer}.rivasliderlite-icon:last-child{margin-right:0}.rivasliderlite-icon.active{background-position:0 -14px}.rivasliderlite-slide-content .caption{background-color:#000;background-color:rgba(0,0,0,0.5);color:#fff;padding:20px;margin:20px}.active .rivasliderlite-slide-content .caption{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}
css/tabs.css DELETED
@@ -1,39 +0,0 @@
1
- #content-explorer {
2
- padding-top: 20px;
3
- width:100%;
4
- line-height:normal;
5
- }
6
- #content-explorer ul {
7
- list-style: none;
8
- height:29px;
9
- border-bottom:2px solid #aaa;
10
- width: 820px;
11
- }
12
- #content-explorer ul li {
13
- background:url(../images/unselected_admin.jpg) repeat-x top left;
14
- float: left;
15
- padding: 6px 5px;
16
- border: 1px solid #aaa;
17
- }
18
- #content-explorer ul li a {
19
- display: block;
20
- margin: 0 auto;text-align:center;
21
- color: #464646;text-decoration:none;
22
- }
23
- #content-explorer ul li a:hover {
24
- color: #343434;
25
- }
26
- #content-explorer ul li.selected {
27
- background:url(../images/selected_admin.jpg) repeat-x top left;
28
- }
29
- #content-explorer ul li.selected a {
30
- padding: 0;font-size:12px;
31
- color: #fff;
32
- }
33
- .yui-content {
34
- }
35
-
36
- .submitbutton {
37
- float: left;
38
- width: 100%;
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
easingslider.php DELETED
@@ -1,1017 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Easing Slider
4
- Plugin URI: http://easingslider.matthewruddy.com
5
- Description: Easing Slider is an image slider which uses the jQuery Easing Plugin. It comes with many different transition and styling settings so you'll never have to edit any of the CSS files directly. <strong>Some major updates are coming to Easing Slider very soon. Please read <a href="http://www.easingslider.matthewruddy.com/update-information">this page</a> before upgrading to 2.0+.</strong>
6
- Version: 1.2.1
7
- Author: Matthew Ruddy
8
- Author URI: http://rivaslider.com/
9
- License: This plugin is licensed under the GNU General Public License.
10
- */
11
-
12
- function my_admin_scripts() {
13
- wp_enqueue_script('media-upload');
14
- wp_enqueue_script('thickbox');
15
- wp_register_script('uploadimagebutton', WP_PLUGIN_URL.'/easing-slider/js/uploadimagebutton.js', array('jquery','media-upload','thickbox'));
16
- wp_enqueue_script('uploadimagebutton');
17
- }
18
-
19
- function my_admin_styles() {
20
- wp_enqueue_style('thickbox');
21
- }
22
-
23
- if (isset($_GET['page']) && $_GET['page'] == 'easing-slider/easingslider.php') {
24
- add_action('admin_print_scripts', 'my_admin_scripts');
25
- add_action('admin_print_styles', 'my_admin_styles');
26
- }
27
-
28
- // Adds new version options
29
- function easing_init() {
30
- if ( !get_option('easingslider_version') ) {
31
- add_option('easingslider_version', '1.2.1');
32
- add_option('easingslider_upgrade_message', 'true');
33
- }
34
- }
35
- add_action( 'admin_init', 'easing_init' );
36
-
37
- function easing_head() {
38
- $width = get_option('width');
39
- $interval = get_option('interval');
40
- $transition = get_option('transition');
41
- $transpeed = get_option('transpeed');
42
- $start = get_option('start');
43
- $pageposition = get_option('pageposition');
44
- $pageside = get_option('pageside');
45
- $paginationon = get_option('paginationon');
46
- $paginationoff = get_option('paginationoff');
47
- ?>
48
-
49
- <!-- Start of Easing Slider -->
50
- <style type="text/css">ul.lof-navigator li{background: url(<?php if($paginationoff=='') echo WP_PLUGIN_URL.'/easing-slider/images/pagination.png'; if($paginationoff!='') echo $paginationoff; ?>) 0 0 no-repeat;} ul.lof-navigator li.active{background: url(<?php if($paginationon=='') echo WP_PLUGIN_URL.'/easing-slider/images/pagination_current.png'; if($paginationon!='') echo $paginationon; ?>) 0 0 no-repeat;}
51
- .lof-opacity{width:<?php echo $width;?>px;height:<?php echo $height;?>px;}
52
- .lof-opacity li{width:<?php echo $width;?>px;height:<?php echo $height;?>px;}
53
- </style>
54
-
55
- <script type="text/javascript">
56
- jQuery.noConflict();
57
- jQuery(document).ready( function($){
58
- var buttons = { previous:$('#lofslidecontent45 .lof-previous') , next:$('#lofslidecontent45 .lof-next') };
59
- $obj = $('#lofslidecontent45')
60
- .lofJSidernews( { interval : <?php echo $interval; ?>,
61
- <?php if($transition=='slide') echo "easing : 'easeInOutExpo'";
62
- if($transition=='smooth') echo "easing : 'easeInOutQuad'";
63
- if($transition=='fade') echo "direction : 'opacity'";
64
- if($transition=='swipe') echo "easing : 'easeOutBack'";
65
- if($transition=='bounce') echo "easing : 'easeOutBounce'"; ?>,
66
- duration : <?php echo $transpeed; ?>,
67
- auto : true,
68
- maxItemDisplay : 10,
69
- startItem:<?php if($start=='1') echo '0';
70
- if($start=='2') echo '1';
71
- if($start=='3') echo '2';
72
- if($start=='4') echo '3';
73
- if($start=='5') echo '4';
74
- if($start=='6') echo '5';
75
- if($start=='7') echo '6';
76
- if($start=='8') echo '7';
77
- if($start=='9') echo '8';
78
- if($start=='10') echo '9'; ?>,
79
- navPosition : 'horizontal', // horizontal
80
- navigatorHeight : 15,
81
- navigatorWidth : 25,
82
- buttons : buttons,
83
- mainWidth:<?php echo $width; ?>} );
84
- });</script>
85
- <!-- End of Easing Slider -->
86
- <?php }
87
-
88
- function add_scripts() {
89
- $scripturl = WP_PLUGIN_URL .'/easing-slider/js/';
90
-
91
- if(get_option('jquery') == 'true') {
92
- if ( !is_admin() ) {
93
- //wp_deregister_script('jquery');
94
- //wp_register_script('jquery', $scripturl.'jquery.js', '', '1.4.2');
95
- wp_enqueue_script('jquery');
96
- }
97
- }
98
-
99
- wp_register_script('easing', $scripturl.'jquery.easing.js', '', '1.3');
100
- wp_enqueue_script('easing');
101
- wp_register_script('script', $scripturl.'script.js', '', '1.2.1');
102
- wp_enqueue_script('script');
103
-
104
- }
105
-
106
- function add_styles() {
107
- $sliderstyle = WP_PLUGIN_URL .'/easing-slider/css/slider.css';
108
-
109
- wp_register_style('slider', $sliderstyle, '', '1.2.1');
110
- wp_enqueue_style('slider');
111
-
112
- }
113
-
114
- add_action('wp_print_styles','add_styles');
115
- add_action('wp_print_scripts','add_scripts');
116
-
117
- function admin_files() {
118
- ?><link rel="stylesheet" href="<?php echo WP_PLUGIN_URL .'/easing-slider/css/tabs.css'; ?>" />
119
- <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
120
- <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"></script>
121
- <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"></script>
122
- <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"></script>
123
- <?php }
124
-
125
- add_action('admin_head', 'admin_files');
126
- add_action('wp_head', 'easing_head');
127
-
128
- function easing_slider() {
129
- $sImg1 = get_option('sImg1');
130
- $sImg2 = get_option('sImg2');
131
- $sImg3 = get_option('sImg3');
132
- $sImg4 = get_option('sImg4');
133
- $sImg5 = get_option('sImg5');
134
- $sImg6 = get_option('sImg6');
135
- $sImg7 = get_option('sImg7');
136
- $sImg8 = get_option('sImg8');
137
- $sImg9 = get_option('sImg9');
138
- $sImg10 = get_option('sImg10');
139
- $sImglink1 = get_option('sImglink1');
140
- $sImglink2 = get_option('sImglink2');
141
- $sImglink3 = get_option('sImglink3');
142
- $sImglink4 = get_option('sImglink4');
143
- $sImglink5 = get_option('sImglink5');
144
- $sImglink6 = get_option('sImglink6');
145
- $sImglink7 = get_option('sImglink7');
146
- $sImglink8 = get_option('sImglink8');
147
- $sImglink9 = get_option('sImglink9');
148
- $sImglink10 = get_option('sImglink10');
149
- $sPagination = get_option('sPagination');
150
- $activation = get_option('activation');
151
- $width = get_option('width');
152
- $height = get_option('height');
153
- $shadow = get_option('shadow');
154
- $interval = get_option('interval');
155
- $transition = get_option('transition');
156
- $bgcolour = get_option('bgcolour');
157
- $transpeed = get_option('transpeed');
158
- $bwidth = get_option('bwidth');
159
- $bcolour = get_option('bcolour');
160
- $preload = get_option('preload');
161
- $start = get_option('start');
162
- $buttons = get_option('buttons');
163
- $source = get_option('source');
164
- $featcat = get_option('featcat');
165
- $featpost = get_option('featpost');
166
- $padbottom = get_option('padbottom');
167
- $padleft = get_option('padleft');
168
- $padright = get_option('padright');
169
- $paddingtop = get_option('paddingtop');
170
- $shadowstyle = get_option('shadowstyle');
171
- $paginationon = get_option('paginationon');
172
- $paginationoff = get_option('paginationoff');
173
- $next = get_option('next');
174
- $prev = get_option('prev');
175
- $pageposition = get_option('pageposition');
176
- $pageside = get_option('pageside');
177
- $permalink = get_option('permalink');
178
- $jquery = get_option('jquery');
179
-
180
- $padtop = $bwidth*2;
181
-
182
- if ($activation == 'enable') {
183
-
184
- $padding = '';
185
-
186
- if ($shadow == '') {
187
- $padding = $padbottom;
188
- $imgpadding = '0'; }
189
- else {
190
- $imgpadding = $padbottom; } ?>
191
- <!-- Easing Slider -->
192
- <div class="lof-container" style="height:<?php echo $height; ?>px;padding-right:<?php echo $padright; ?>px;padding-top:<?php echo $paddingtop; ?>px;padding-left:<?php echo $padleft;?>px;padding-bottom:<?php echo $imgpadding;?>px;">
193
- <div class="lof-slidecontent" id="lofslidecontent45" style="border:<?php echo $bwidth;?>px solid #<?php echo $bcolour; ?>;width:<?php echo $width; ?>px;height:<?php echo $height; ?>px;">
194
- <div class="preload" style="<?php if($transition=='fade') echo 'padding-top:1px\9;'; ?>background:url(<?php echo WP_PLUGIN_URL; ?>/easing-slider/images/<?php if($preload=='indicator') echo 'indicator'; if($preload=='none') echo ''; if($preload=='arrows') echo 'arrows'; if($preload=='bar') echo 'bar'; if($preload=='bigflower') echo 'bigflower'; if($preload=='bounceball') echo 'bounceball'; if($preload=='indicatorlight') echo 'indicatorlight'; if($preload=='pik') echo 'pik'; if($preload=='snake') echo 'snake'; ?>.gif) no-repeat center center #<?php if($bgcolour=='') echo 'fff'; else echo $bgcolour; ?>;">
195
-
196
- </div>
197
- <div class="lof-main-outer" style="background: #<?php echo $bgcolour; ?>;width:<?php echo $width; ?>px;height:<?php echo $height; ?>px;">
198
- <ul class="lof-main-wapper">
199
- <?php
200
-
201
- if(get_option('source') == 'featured') { ?>
202
- <?php $recent = new WP_Query('cat='.$featcat.'&showposts='.$featpost.'');
203
- while($recent->have_posts()) : $recent->the_post(); global $post;
204
- $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
205
- <li><?php if($permalink == '') { ?><a href="<?php the_permalink(); ?>"><?php } ?><img src="<?php echo $image; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($permalink == '') { ?></a><?php } ?></li>
206
-
207
- <?php }endwhile; ?>
208
-
209
- <?php } else if(get_option('source') == 'all') { ?>
210
- <?php $recent = new WP_Query('showposts='.$featpost.'');
211
- while($recent->have_posts()) : $recent->the_post(); global $post;
212
- $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
213
- <li><?php if($permalink == '') { ?><a href="<?php the_permalink(); ?>"><?php } ?><img src="<?php echo $image; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>"/><?php if ($permalink == '') { ?></a><?php } ?></li>
214
-
215
- <?php }endwhile; ?>
216
-
217
- <?php } else if(get_option('source') == 'custom') {
218
-
219
- if ($sImg1) { ?>
220
- <li><?php if($sImglink1!='') echo '<a href="'. $sImglink1 .'">'; ?><img src="<?php echo $sImg1; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink1!='') echo '</a>'; ?></li><?php }
221
-
222
- if ($sImg2) { ?>
223
- <li><?php if($sImglink2!='') echo '<a href="'. $sImglink2 .'">'; ?><img src="<?php echo $sImg2; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink2!='') echo '</a>'; ?></li><?php }
224
-
225
- if ($sImg3) { ?>
226
- <li><?php if($sImglink3!='') echo '<a href="'. $sImglink3 .'">'; ?><img src="<?php echo $sImg3; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink3!='') echo '</a>'; ?></li><?php }
227
-
228
- if ($sImg4) { ?>
229
- <li><?php if($sImglink4!='') echo '<a href="'. $sImglink4 .'">'; ?><img src="<?php echo $sImg4; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink4!='') echo '</a>'; ?></li><?php }
230
-
231
- if ($sImg5) { ?>
232
- <li><?php if($sImglink5!='') echo '<a href="'. $sImglink5 .'">'; ?><img src="<?php echo $sImg5; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink5!='') echo '</a>'; ?></li><?php }
233
-
234
- if ($sImg6) { ?>
235
- <li><?php if($sImglink6!='') echo '<a href="'. $sImglink6 .'">'; ?><img src="<?php echo $sImg6; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink6!='') echo '</a>'; ?></li><?php }
236
-
237
- if ($sImg7) { ?>
238
- <li><?php if($sImglink7!='') echo '<a href="'. $sImglink7 .'">'; ?><img src="<?php echo $sImg7; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink7!='') echo '</a>'; ?></li><?php }
239
-
240
- if ($sImg8) { ?>
241
- <li><?php if($sImglink8!='') echo '<a href="'. $sImglink8 .'">'; ?><img src="<?php echo $sImg8; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink8!='') echo '</a>'; ?></li><?php }
242
-
243
- if ($sImg9) { ?>
244
- <li><?php if($sImglink9!='') echo '<a href="'. $sImglink9 .'">'; ?><img src="<?php echo $sImg9; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink9!='') echo '</a>'; ?></li><?php }
245
-
246
- if ($sImg10) { ?>
247
- <li><?php if($sImglink10!='') echo '<a href="'. $sImglink10 .'">'; ?><img src="<?php echo $sImg10; ?>" style="width:<?php echo $width; ?>px;" alt="<?php echo $images; ?>" /><?php if($sImglink10!='') echo '</a>'; ?></li><?php }
248
-
249
- }
250
-
251
- ?></ul><?php
252
-
253
-
254
- if ($buttons=='');
255
- else { ?>
256
- <div onclick="return false" class="lof-previous" style="
257
- background:url(<?php if($prev=='') echo WP_PLUGIN_URL.'/easing-slider/images/b_prev.png'; if($prev!='') echo $prev; ?>) no-repeat left center;"></div>
258
- <div onclick="return false" class="lof-next" style="
259
- background:url(<?php if($next=='') echo WP_PLUGIN_URL.'/easing-slider/images/b_next.png'; if($next!='') echo $next; ?>) no-repeat right center;"></div> <?php }
260
-
261
- ?></div><?php
262
-
263
-
264
- $sPagination = get_option('sPagination');
265
-
266
- if ($sPagination=='yes') { ?>
267
- <div class="lof-navigator-wapper" style="bottom:<?php if($pageposition=='outside') echo '-35'; if($pageposition=='inside') echo '5'; ?>px;<?php if($pageside=='left') echo 'left: 0'; if($pageside=='right') echo 'right:-10px'; ?>;padding:5px <?php if($pageposition=='outside') echo '5'; if($pageposition=='inside') echo '15'; ?>px;">
268
- <div class="lof-navigator-outer">
269
- <ul class="lof-navigator">
270
- <?php
271
-
272
- if(get_option('source') == 'featured') { ?>
273
- <?php $recent = new WP_Query('cat='.$featcat.'&showposts='.$featpost.'');
274
- while($recent->have_posts()) : $recent->the_post(); global $post;
275
- $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
276
- <li><span>.</span></li>
277
- <?php }endwhile; ?>
278
-
279
- <?php } else if(get_option('source') == 'all') { ?>
280
- <?php $recent = new WP_Query('showposts='.$featpost.'');
281
- while($recent->have_posts()) : $recent->the_post(); global $post;
282
- $image = get_post_meta($post->ID, 'easing', true); if (!empty($image)) { ?>
283
- <li><span>.</span></li>
284
- <?php }endwhile; ?>
285
-
286
- <?php } else if(get_option('source') == 'custom') {
287
-
288
- if ($sImg1) {
289
- echo '<li><span>.</span></li>'; }
290
- if ($sImg2) {
291
- echo '<li><span>.</span></li>'; }
292
- if ($sImg3) {
293
- echo '<li><span>.</span></li>'; }
294
- if ($sImg4) {
295
- echo '<li><span>.</span></li>'; }
296
- if ($sImg5) {
297
- echo '<li><span>.</span></li>'; }
298
- if ($sImg6) {
299
- echo '<li><span>.</span></li>'; }
300
- if ($sImg7) {
301
- echo '<li><span>.</span></li>'; }
302
- if ($sImg8) {
303
- echo '<li><span>.</span></li>'; }
304
- if ($sImg9) {
305
- echo '<li><span>.</span></li>'; }
306
- if ($sImg10) {
307
- echo '<li><span>.</span></li>'; }
308
- }
309
-
310
- ?> </ul>
311
- </div>
312
- </div>
313
-
314
- <?php }
315
-
316
- elseif ($sPagination=='no') {
317
- echo ''; } ?>
318
- </div>
319
- </div><?php
320
-
321
- if ($shadow=='')
322
- echo '<img src="'.WP_PLUGIN_URL.'/easing-slider/images/shadow_'.$shadowstyle.'.png" style="width:'.$width.'px; padding-left:'.$padleft.'px;padding-bottom:'.$padding.'px;padding-top:'.$padtop.'px;margin-left:'.$bwidth.'px;" alt="" />'; ?><!-- End of Easing Slider --><?php
323
-
324
- }
325
- }
326
-
327
-
328
- function easing_slider_short() {
329
- ob_start();
330
- easing_slider();
331
- $output_string=ob_get_contents();;
332
- ob_end_clean();
333
-
334
- return $output_string;
335
- }
336
-
337
-
338
- add_shortcode('easingslider', 'easing_slider_short');
339
-
340
- function set_easing_options() {
341
- add_option('easingslider_version', '1.2.1');
342
- add_option('easingslider_upgrade_message', 'true');
343
- add_option('sImg1','','');
344
- add_option('sImg2','','');
345
- add_option('sImg3','','');
346
- add_option('sImg4','','');
347
- add_option('sImg5','','');
348
- add_option('sImg6','','');
349
- add_option('sImg7','','');
350
- add_option('sImg8','','');
351
- add_option('sImg9','','');
352
- add_option('sImg10','','');
353
- add_option('sImglink1','','');
354
- add_option('sImglink2','','');
355
- add_option('sImglink3','','');
356
- add_option('sImglink4','','');
357
- add_option('sImglink5','','');
358
- add_option('sImglink6','','');
359
- add_option('sImglink7','','');
360
- add_option('sImglink8','','');
361
- add_option('sImglink9','','');
362
- add_option('sImglink10','','');
363
- add_option('sPagination','yes','');
364
- add_option('activation','enable','');
365
- add_option('width','480','');
366
- add_option('height','185','');
367
- add_option('shadow','','');
368
- add_option('interval','4000','');
369
- add_option('transition','slide','');
370
- add_option('bgcolour','fff','');
371
- add_option('transpeed','1200','');
372
- add_option('bwidth','3','');
373
- add_option('bcolour','ccc','');
374
- add_option('preload','indicator','');
375
- add_option('start','1','');
376
- add_option('buttons','','');
377
- add_option('source','custom','');
378
- add_option('featcat','','');
379
- add_option('featpost','5','');
380
- add_option('padbottom','0','');
381
- add_option('padleft','0','');
382
- add_option('padright','0','');
383
- add_option('paddingtop','0','');
384
- add_option('shadowstyle','arc','');
385
- add_option('paginationon','','');
386
- add_option('paginationoff','','');
387
- add_option('next','','');
388
- add_option('prev','','');
389
- add_option('pageposition','outside','');
390
- add_option('pageside','left','');
391
- add_option('permalink','','');
392
- add_option('jquery','true','');
393
- }
394
-
395
- function unset_easing_options() {
396
- delete_option('easingslider_version');
397
- delete_option('easingslider_upgrade_message');
398
- delete_option('sImg1');
399
- delete_option('sImg2');
400
- delete_option('sImg3');
401
- delete_option('sImg4');
402
- delete_option('sImg5');
403
- delete_option('sImg6');
404
- delete_option('sImg7');
405
- delete_option('sImg8');
406
- delete_option('sImg9');
407
- delete_option('sImg10');
408
- delete_option('sImglink1');
409
- delete_option('sImglink2');
410
- delete_option('sImglink3');
411
- delete_option('sImglink4');
412
- delete_option('sImglink5');
413
- delete_option('sImglink6');
414
- delete_option('sImglink7');
415
- delete_option('sImglink8');
416
- delete_option('sImglink9');
417
- delete_option('sImglink10');
418
- delete_option('sPagination');
419
- delete_option('activation');
420
- delete_option('width');
421
- delete_option('height');
422
- delete_option('shadow');
423
- delete_option('interval');
424
- delete_option('transition');
425
- delete_option('bgcolour');
426
- delete_option('transpeed');
427
- delete_option('bwidth');
428
- delete_option('bcolour');
429
- delete_option('preload');
430
- delete_option('start');
431
- delete_option('buttons');
432
- delete_option('source');
433
- delete_option('featcat');
434
- delete_option('featpost');
435
- delete_option('padbottom');
436
- delete_option('padleft');
437
- delete_option('padright');
438
- delete_option('paddingtop');
439
- delete_option('shadowstyle');
440
- delete_option('paginationon');
441
- delete_option('paginationoff');
442
- delete_option('next');
443
- delete_option('prev');
444
- delete_option('pageposition');
445
- delete_option('pageside');
446
- delete_option('permalink');
447
- delete_option('jquery');
448
- }
449
-
450
- register_activation_hook(__FILE__,'set_easing_options');
451
- register_uninstall_hook(__FILE__,'unset_easing_options');
452
-
453
- function admin_easing() {
454
-
455
- $sImg1 = get_option('sImg1');
456
- $sImg2 = get_option('sImg2');
457
- $sImg3 = get_option('sImg3');
458
- $sImg4 = get_option('sImg4');
459
- $sImg5 = get_option('sImg5');
460
- $sImg6 = get_option('sImg6');
461
- $sImg7 = get_option('sImg7');
462
- $sImg8 = get_option('sImg8');
463
- $sImg9 = get_option('sImg9');
464
- $sImg10 = get_option('sImg10');
465
- $sImglink1 = get_option('sImglink1');
466
- $sImglink2 = get_option('sImglink2');
467
- $sImglink3 = get_option('sImglink3');
468
- $sImglink4 = get_option('sImglink4');
469
- $sImglink5 = get_option('sImglink5');
470
- $sImglink6 = get_option('sImglink6');
471
- $sImglink7 = get_option('sImglink7');
472
- $sImglink8 = get_option('sImglink8');
473
- $sImglink9 = get_option('sImglink9');
474
- $sImglink10 = get_option('sImglink10');
475
- $sPagination = get_option('sPagination');
476
- $activation = get_option('activation');
477
- $width = get_option('width');
478
- $height = get_option('height');
479
- $shadow = get_option('shadow');
480
- $interval = get_option('interval');
481
- $transition = get_option('transition');
482
- $bgcolour = get_option('bgcolour');
483
- $transpeed = get_option('transpeed');
484
- $bwidth = get_option('bwidth');
485
- $bcolour = get_option('bcolour');
486
- $preload = get_option('preload');
487
- $start = get_option('start');
488
- $buttons = get_option('buttons');
489
- $source = get_option('source');
490
- $featcat = get_option('featcat');
491
- $featpost = get_option('featpost');
492
- $padbottom = get_option('padbottom');
493
- $padleft = get_option('padleft');
494
- $padright = get_option('padright');
495
- $paddingtop = get_option('paddingtop');
496
- $shadowstyle = get_option('shadowstyle');
497
- $paginationon = get_option('paginationon');
498
- $paginationoff = get_option('paginationoff');
499
- $next = get_option('next');
500
- $prev = get_option('prev');
501
- $pageposition = get_option('pageposition');
502
- $pageside = get_option('pageside');
503
- $permalink = get_option('permalink');
504
- $jquery = get_option('jquery');
505
-
506
- if ( isset( $_POST['options'] ) && 'process' == $_POST['options']) {
507
- update_option('sImg1',$_REQUEST['sImg1']);
508
- update_option('sImg2',$_REQUEST['sImg2']);
509
- update_option('sImg3',$_REQUEST['sImg3']);
510
- update_option('sImg4',$_REQUEST['sImg4']);
511
- update_option('sImg5',$_REQUEST['sImg5']);
512
- update_option('sImg6',$_REQUEST['sImg6']);
513
- update_option('sImg7',$_REQUEST['sImg7']);
514
- update_option('sImg8',$_REQUEST['sImg8']);
515
- update_option('sImg9',$_REQUEST['sImg9']);
516
- update_option('sImg10',$_REQUEST['sImg10']);
517
- update_option('sImglink1',$_REQUEST['sImglink1']);
518
- update_option('sImglink2',$_REQUEST['sImglink2']);
519
- update_option('sImglink3',$_REQUEST['sImglink3']);
520
- update_option('sImglink4',$_REQUEST['sImglink4']);
521
- update_option('sImglink5',$_REQUEST['sImglink5']);
522
- update_option('sImglink6',$_REQUEST['sImglink6']);
523
- update_option('sImglink7',$_REQUEST['sImglink7']);
524
- update_option('sImglink8',$_REQUEST['sImglink8']);
525
- update_option('sImglink9',$_REQUEST['sImglink9']);
526
- update_option('sImglink10',$_REQUEST['sImglink10']);
527
- update_option('sPagination',$_REQUEST['sPagination']);
528
- update_option('activation',$_REQUEST['activation']);
529
- update_option('width',$_REQUEST['width']);
530
- update_option('height',$_REQUEST['height']);
531
- update_option('shadow',$_REQUEST['shadow']);
532
- update_option('interval',$_REQUEST['interval']);
533
- update_option('transition',$_REQUEST['transition']);
534
- update_option('bgcolour',$_REQUEST['bgcolour']);
535
- update_option('transpeed',$_REQUEST['transpeed']);
536
- update_option('bwidth',$_REQUEST['bwidth']);
537
- update_option('bcolour',$_REQUEST['bcolour']);
538
- update_option('preload',$_REQUEST['preload']);
539
- update_option('start',$_REQUEST['start']);
540
- update_option('buttons',$_REQUEST['buttons']);
541
- update_option('source',$_REQUEST['source']);
542
- update_option('featcat',$_REQUEST['featcat']);
543
- update_option('featpost',$_REQUEST['featpost']);
544
- update_option('padbottom',$_REQUEST['padbottom']);
545
- update_option('padleft',$_REQUEST['padleft']);
546
- update_option('padright',$_REQUEST['padright']);
547
- update_option('paddingtop',$_REQUEST['paddingtop']);
548
- update_option('shadowstyle',$_REQUEST['shadowstyle']);
549
- update_option('paginationon',$_REQUEST['paginationon']);
550
- update_option('paginationoff',$_REQUEST['paginationoff']);
551
- update_option('next',$_REQUEST['next']);
552
- update_option('prev',$_REQUEST['prev']);
553
- update_option('pageposition',$_REQUEST['pageposition']);
554
- update_option('pageside',$_REQUEST['pageside']);
555
- update_option('permalink',$_REQUEST['permalink']);
556
- update_option('jquery',$_REQUEST['jquery']);
557
- $sImg1 = get_option('sImg1');
558
- $sImg2 = get_option('sImg2');
559
- $sImg3 = get_option('sImg3');
560
- $sImg4 = get_option('sImg4');
561
- $sImg5 = get_option('sImg5');
562
- $sImg6 = get_option('sImg6');
563
- $sImg7 = get_option('sImg7');
564
- $sImg8 = get_option('sImg8');
565
- $sImg9 = get_option('sImg9');
566
- $sImg10 = get_option('sImg10');
567
- $sImglink1 = get_option('sImglink1');
568
- $sImglink2 = get_option('sImglink2');
569
- $sImglink3 = get_option('sImglink3');
570
- $sImglink4 = get_option('sImglink4');
571
- $sImglink5 = get_option('sImglink5');
572
- $sImglink6 = get_option('sImglink6');
573
- $sImglink7 = get_option('sImglink7');
574
- $sImglink8 = get_option('sImglink8');
575
- $sImglink9 = get_option('sImglink9');
576
- $sImglink10 = get_option('sImglink10');
577
- $sPagination = get_option('sPagination');
578
- $activation = get_option('activation');
579
- $width = get_option('width');
580
- $height = get_option('height');
581
- $shadow = get_option('shadow');
582
- $interval = get_option('interval');
583
- $transition = get_option('transition');
584
- $bgcolour = get_option('bgcolour');
585
- $transpeed = get_option('transpeed');
586
- $bwidth = get_option('bwidth');
587
- $bcolour = get_option('bcolour');
588
- $preload = get_option('preload');
589
- $start = get_option('start');
590
- $buttons = get_option('buttons');
591
- $source = get_option('source');
592
- $featcat = get_option('featcat');
593
- $featpost = get_option('featpost');
594
- $padbottom = get_option('padbottom');
595
- $padleft = get_option('padleft');
596
- $padright = get_option('padright');
597
- $paddingtop = get_option('paddingtop');
598
- $shadowstyle = get_option('shadowstyle');
599
- $paginationon = get_option('paginationon');
600
- $paginationoff = get_option('paginationoff');
601
- $next = get_option('next');
602
- $prev = get_option('prev');
603
- $pageposition = get_option('pageposition');
604
- $pageside = get_option('pageside');
605
- $permalink = get_option('permalink');
606
- $jquery = get_option('jquery');
607
- }
608
-
609
-
610
- ?><div class="wrap"><div id="icon-plugins" class="icon32"></div><h2>Easing Slider</h2>
611
-
612
- <a href="http://rivaslider.com/"><img src="<?php echo WP_PLUGIN_URL.'/easing-slider/images/advert.jpg'; ?>"/></a>
613
-
614
- <?php
615
- // Delete upgrade notice when 'Dismiss' is pressed.
616
- if ( isset( $_GET['dismiss'] ) && $_GET['dismiss'] )
617
- delete_option( 'easingslider_upgrade_message' );
618
- ?>
619
-
620
- <?php if ( get_option( 'easingslider_upgrade_message' ) ) { ?>
621
- <div class="message updated" style="width: 860px;"><p><b>NOTE:</b> A major plugin update is on the way, coming very soon. <a href="http://www.easingslider.matthewruddy.com/update-information">Please read this post</a> before upgrading! Thank you. <a href="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>&amp;dismiss=true" class="button-secondary" style="float: right; margin-top: -3px;">Dismiss</a></p></div>
622
- <?php } ?>
623
-
624
- <?php if ( isset( $_REQUEST['submit'] ) && $_REQUEST['submit'] ) echo '<div id="message" class="updated" style="width:750px;"><p><strong>Slider Options Updated.</strong></p></div>'; ?>
625
-
626
-
627
- <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>&updated=true">
628
- <input type="hidden" name="options" value="process" />
629
-
630
- <?php
631
-
632
- print_easing_form();
633
-
634
- ?></div><?php
635
- }
636
-
637
-
638
- function modify_menu() {
639
- add_menu_page(
640
- 'Easing Slider',
641
- 'Easing Slider',
642
- 'administrator',
643
- 'easing-slider/easingslider.php',
644
- 'admin_easing'
645
- );
646
-
647
- }
648
-
649
- add_action('admin_menu','modify_menu');
650
-
651
- function print_easing_form() {
652
- $sImg1 = get_option('sImg1');
653
- $sImg2 = get_option('sImg2');
654
- $sImg3 = get_option('sImg3');
655
- $sImg4 = get_option('sImg4');
656
- $sImg5 = get_option('sImg5');
657
- $sImg6 = get_option('sImg6');
658
- $sImg7 = get_option('sImg7');
659
- $sImg8 = get_option('sImg8');
660
- $sImg9 = get_option('sImg9');
661
- $sImg10 = get_option('sImg10');
662
- $sImglink1 = get_option('sImglink1');
663
- $sImglink2 = get_option('sImglink2');
664
- $sImglink3 = get_option('sImglink3');
665
- $sImglink4 = get_option('sImglink4');
666
- $sImglink5 = get_option('sImglink5');
667
- $sImglink6 = get_option('sImglink6');
668
- $sImglink7 = get_option('sImglink7');
669
- $sImglink8 = get_option('sImglink8');
670
- $sImglink9 = get_option('sImglink9');
671
- $sImglink10 = get_option('sImglink10');
672
- $sPagination = get_option('sPagination');
673
- $activation = get_option('activation');
674
- $width = get_option('width');
675
- $height = get_option('height');
676
- $shadow = get_option('shadow');
677
- $interval = get_option('interval');
678
- $transition = get_option('transition');
679
- $bgcolour = get_option('bgcolour');
680
- $transpeed = get_option('transpeed');
681
- $bwidth = get_option('bwidth');
682
- $bcolour = get_option('bcolour');
683
- $preload = get_option('preload');
684
- $start = get_option('start');
685
- $buttons = get_option('buttons');
686
- $source = get_option('source');
687
- $featcat = get_option('featcat');
688
- $featpost = get_option('featpost');
689
- $padbottom = get_option('padbottom');
690
- $padleft = get_option('padleft');
691
- $padright = get_option('padright');
692
- $paddingtop = get_option('paddingtop');
693
- $shadowstyle = get_option('shadowstyle');
694
- $paginationon = get_option('paginationon');
695
- $paginationoff = get_option('paginationoff');
696
- $next = get_option('next');
697
- $prev = get_option('prev');
698
- $pageposition = get_option('pageposition');
699
- $pageside = get_option('pageside');
700
- $permalink = get_option('permalink');
701
- $jquery = get_option('jquery');
702
-
703
-
704
- ?>
705
- <div id="content-explorer">
706
- <ul class="yui-nav">
707
- <li class="selected"><a href="#">Custom Images</a></li>
708
- <li><a href="#">Slider Settings</a></li>
709
- <li><a href="#">Usage Settings</a></li>
710
- </ul>
711
-
712
- <div class="metabox-holder" style="width:810px;">
713
- <input class="button-secondary" id="upload_image_button" type="button" value="Upload Image" />
714
- <input type="submit" class="button-primary" name="submit" value="Save Changes" style="" />
715
- <div style="display:inline;font-style:italic;font-size:11px;padding-left:10px;"><b>Important:</b> Click 'save changes' after every image you 'insert into post'. </div>
716
- </div>
717
-
718
- <div class="yui-content">
719
-
720
- <div style="overflow: auto;"><!-- first div for content tabs -->
721
- <?php if($source!='custom') echo '<div id="message" style="padding:10px;margin:10px 0;border:1px solid #e6db55;background:#ffffe0;width:790px;"><strong>Custom Images are currently not enabled. To use them, change "Get Images From?" to "Custom Images" under the "Usage Settings" tab.</strong></div>'; ?>
722
- <div class="metabox-holder" style="width:402px;float:left;"><div class="postbox"><h3><span>Image #1 link:</span></h3>
723
- <?php if($sImg1) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg1.'" style="margin:0 10px;width:380px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(empty($sImg1)) echo 'id="upload_image"'; ?> name="sImg1" value="<?php echo stripslashes($sImg1); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
724
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink1" value="<?php echo stripslashes($sImglink1); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
725
- </div>
726
-
727
- <div class="postbox"><h3><span>Image #2 link:</span></h3>
728
- <?php if($sImg2) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg2.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&empty($sImg2)) echo 'id="upload_image"'; ?> name="sImg2" value="<?php echo stripslashes($sImg2); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
729
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink2" value="<?php echo stripslashes($sImglink2); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
730
- </div>
731
-
732
- <div class="postbox"><h3><span>Image #3 link:</span></h3>
733
- <?php if($sImg3) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg3.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&empty($sImg3)) echo 'id="upload_image"'; ?> id="sImg3" name="sImg3" value="<?php echo stripslashes($sImg3); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
734
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink3" value="<?php echo stripslashes($sImglink3); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
735
- </div>
736
-
737
- <div class="postbox"><h3><span>Image #4 link:</span></h3>
738
- <?php if($sImg4) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg4.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&empty($sImg4)) echo 'id="upload_image"'; ?> name="sImg4" value="<?php echo stripslashes($sImg4); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
739
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink4" value="<?php echo stripslashes($sImglink4); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
740
- </div>
741
-
742
- <div class="postbox"><h3><span>Image #5 link:</span></h3>
743
- <?php if($sImg5) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg5.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&empty($sImg5)) echo 'id="upload_image"'; ?> name="sImg5" value="<?php echo stripslashes($sImg5); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
744
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink5" value="<?php echo stripslashes($sImglink5); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
745
- </div></div>
746
-
747
- <div class="metabox-holder" style="width:402px;float:left;margin-left:10px;"><div class="postbox"><h3><span>Image #6 link:</span></h3>
748
- <?php if($sImg6) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg6.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&empty($sImg6)) echo 'id="upload_image"'; ?> name="sImg6" value="<?php echo stripslashes($sImg6); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
749
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink6" value="<?php echo stripslashes($sImglink6); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
750
- </div>
751
-
752
- <div class="postbox"><h3><span>Image #7 link:</span></h3>
753
- <?php if($sImg7) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg7.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&empty($sImg7)) echo 'id="upload_image"'; ?> name="sImg7" value="<?php echo stripslashes($sImg7); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
754
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink7" value="<?php echo stripslashes($sImglink7); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
755
- </div>
756
-
757
- <div class="postbox"><h3><span>Image #8 link:</span></h3>
758
- <?php if($sImg8) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg8.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&empty($sImg8)) echo 'id="upload_image"'; ?> name="sImg8" value="<?php echo stripslashes($sImg8); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
759
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink8" value="<?php echo stripslashes($sImglink8); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
760
- </div>
761
-
762
- <div class="postbox"><h3><span>Image #9 link:</span></h3>
763
- <?php if($sImg9) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg9.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&isset($sImg8)&empty($sImg9)) echo 'id="upload_image"'; ?> name="sImg9" value="<?php echo stripslashes($sImg9); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
764
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink9" value="<?php echo stripslashes($sImglink9); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
765
- </div>
766
-
767
- <div class="postbox"><h3><span>Image #10 link:</span></h3>
768
- <?php if($sImg10) echo '<h4 style="margin:10px;">Preview:</h4><img src="'.$sImg10.'" style="width:380px;margin:0 10px;" />'; ?><h4 style="margin:10px;">Image Path:</h4><input type="text" <?php if(isset($sImg1)&isset($sImg2)&isset($sImg3)&isset($sImg4)&isset($sImg5)&isset($sImg6)&isset($sImg7)&isset($sImg8)&isset($sImg9)&empty($sImg10)) echo 'id="upload_image"'; ?> name="sImg10" value="<?php echo stripslashes($sImg10); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?>style="width: 380px;margin:10px;margin-top:0px;" />
769
- <h4 style="margin:10px;">Image Link:</h4><input type="text" name="sImglink10" value="<?php echo stripslashes($sImglink10); ?>" <?php if($source!='custom') echo 'readonly="readonly"';?> style="width: 380px;margin:10px;margin-top:0px;"/>
770
- </div></div>
771
-
772
- </div>
773
- <div><!-- second div for content tabs -->
774
-
775
- <div class="metabox-holder" style="width: 815px;">
776
- <div class="postbox">
777
-
778
- <table class="form-table" style="margin:0;">
779
- <tr valign="top"><td style="padding:0;width:180px;"><h3>Name</h3></td><td style="padding:0;width:130px;"><h3>Value</h3></td><td style="padding:0;"><h3>Description</h3></td></tr>
780
-
781
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="shadow" style="padding:10px;font-weight:bold;">disableShadow</label></td>
782
- <td style="padding:5px 0;margin-left:5px;"><input type="checkbox" name="shadow" <?php if (get_option('shadow')) echo "checked='checked'"; ?>/>Disable</td>
783
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Disable the shadow beneath the slider.</p></td></tr>
784
-
785
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="shadowtype" style="padding:10px;font-weight:bold;">shadowStyle:
786
- <td style="padding:5px 0;margin-left:5px;"><select name="shadowstyle" style="width:110px;">
787
- <option style="padding-right:10px;" value="arc" <?php selected('arc', get_option('shadowstyle')); ?>>Arc</option>
788
- <option style="padding-right:10px;" value="large" <?php selected('large', get_option('shadowstyle')); ?>>Large</option>
789
- <option style="padding-right:10px;" value="small" <?php selected('small', get_option('shadowstyle')); ?>>Small</option>
790
- </select></td>
791
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Choose between three different types of shadow beneath the slider.</p></td></tr>
792
-
793
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="buttons" style="padding:10px;font-weight:bold;">next/prevButtons</td></label>
794
- <td style="padding:5px 0;margin-left:5px;"><input type="checkbox" name="buttons" <?php if (get_option('buttons')) echo "checked='checked'"; ?>/>Enable</td>
795
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Enable the "next" and "previous" buttons. By default these are disabled.</p></td></tr>
796
-
797
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="next" style="padding:10px;font-weight:bold;">nextbuttonIcon</label></td>
798
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="next" <?php if(empty($_REQUEST['buttons'])) {echo 'readonly="readonly"';}?> value="<?php echo ($next); ?>" style="width: 100px;" /><?php if($next!='') echo '<img src="'.$next.'" width="20px" style="position:relative;top:5px;padding-left:5px;" />';?></td>
799
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">change the icon used for the 'next' button. If left blank, it will use the default image.</p></td></tr>
800
-
801
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="prev" style="padding:10px;font-weight:bold;">prevbuttonIcon</label></td>
802
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="prev" <?php if(empty($_REQUEST['buttons'])) {echo 'readonly="readonly"';}?> value="<?php echo ($prev); ?>" style="width: 100px;" /><?php if($prev!='') echo '<img src="'.$prev.'" width="20px" style="position:relative;top:5px;padding-left:5px;" />';?></td>
803
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Change the icon used for the 'prev' button. If left blank, it will use the default image.</p></td></tr>
804
-
805
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="width" style="padding:10px;font-weight:bold;">Slider "width"</label></td>
806
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="width" value="<?php echo ($width); ?>" style="width: 50px;" />px</td>
807
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Set the sliders width.</p></td></tr>
808
-
809
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="height" style="padding:10px;font-weight:bold;">Slider "height"</label></td>
810
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="height" value="<?php echo ($height); ?>" style="width: 50px;" />px</td>
811
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Set the sliders height.</p></td></tr>
812
-
813
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="padbottom" style="padding:10px;font-weight:bold;">paddingBottom</label></td>
814
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="padbottom" value="<?php echo ($padbottom); ?>" style="width: 50px;" />px</td>
815
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the bottom of the slider.</p></td></tr>
816
-
817
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="paddingtop" style="padding:10px;font-weight:bold;">paddingTop</label></td>
818
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="paddingtop" value="<?php echo ($paddingtop); ?>" style="width: 50px;" />px</td>
819
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the top of the slider.</p></td></tr>
820
-
821
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="padright" style="padding:10px;font-weight:bold;">paddingRight</label></td>
822
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="padright" value="<?php echo ($padright); ?>" style="width: 50px;" />px</td>
823
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the right of the slider.</p></td></tr>
824
-
825
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="padleft" style="padding:10px;font-weight:bold;">paddingLeft</label></td>
826
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="padleft" value="<?php echo ($padleft); ?>" style="width: 50px;" />px</td>
827
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of padding to add to the left of the slider.</p></td></tr>
828
-
829
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bgcolour" style="padding:10px;font-weight:bold;">backgroundColour:</label></td>
830
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bgcolour" value="<?php echo $bgcolour; ?>" style="width: 50px;" /></td>
831
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Change the sliders background colour. When left blank it is set to white in order for the preloader to function correctly.</p></td></tr>
832
-
833
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="start" style="padding:10px;font-weight:bold;">startPosition:</label></td>
834
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="start" value="<?php echo ($start); ?>" style="width: 50px;" /></td>
835
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Number of the image that the slider will start with. Choose a number between one and ten.</p></td></tr>
836
-
837
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="transpeed" style="padding:10px;font-weight:bold;">transitionSpeed:</label></td>
838
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="transpeed" value="<?php echo $transpeed; ?>" style="width: 50px;" /></td>
839
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Amount of time it takes to transition one image to another.</p></td></tr>
840
-
841
-
842
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="interval" style="padding:10px;font-weight:bold;">autoPlay:</label></td>
843
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="interval" value="<?php echo $interval; ?>" style="width: 50px;" /></td>
844
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">The amount of time in milliseconds each image is displayed for.</p></td></tr>
845
-
846
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="transition" style="padding:10px;font-weight:bold;">animationStyle:
847
- <td style="padding:5px 0;margin-left:5px;"><select name="transition" style="width:110px;">
848
- <option style="padding-right:10px;" value="slide" <?php selected('slide', get_option('transition')); ?>>slide</option>
849
- <option style="padding-right:10px;" value="smooth" <?php selected('smooth', get_option('transition')); ?>>smooth</option>
850
- <option style="padding-right:10px;" value="fade" <?php selected('fade', get_option('transition')); ?>>fade</option>
851
- <option style="padding-right:10px;" value="swipe" <?php selected('swipe', get_option('transition')); ?>>swipe</option>
852
- <option style="padding-right:10px;" value="bounce" <?php selected('bounce', get_option('transition')); ?>>bounce</option>
853
- </select></td>
854
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Easing effect used to transition from each image. Choose from five different effect: slide, smooth, fade, swipe & bounce.</p></td></tr>
855
-
856
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bwidth" style="padding:10px;font-weight:bold;">borderWidth:</label></td>
857
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bwidth" value="<?php echo $bwidth; ?>" style="width: 50px;" />px</td>
858
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Width of the sliders surrounding border. Set to "0" for no border.</p></td></tr>
859
-
860
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="bcolour" style="padding:10px;font-weight:bold;">borderColour:</label></td>
861
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="bcolour" value="<?php echo $bcolour; ?>" style="width: 50px;" /></td>
862
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Colour of the surrounding border.</p></td></tr>
863
-
864
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="preload" style="padding:10px;font-weight:bold;">preloadIcon:</label></td>
865
- <td style="padding:5px 0;margin-left:5px;"><select name="preload" style="width:110px;">
866
- <option style="padding-right:10px;" value="none" <?php selected('none', get_option('preload')); ?>>none</option>
867
- <option style="padding-right:10px;" value="indicator" <?php selected('indicator', get_option('preload')); ?>>indicator</option>
868
- <option style="padding-right:10px;" value="arrows" <?php selected('arrows', get_option('preload')); ?>>arrows</option>
869
- <option style="padding-right:10px;" value="bar" <?php selected('bar', get_option('preload')); ?>>bar</option>
870
- <option style="padding-right:10px;" value="bigflower" <?php selected('bigflower', get_option('preload')); ?>>bigflower</option>
871
- <option style="padding-right:10px;" value="bounceball" <?php selected('bounceball', get_option('preload')); ?>>bounceball</option>
872
- <option style="padding-right:10px;" value="indicatorlight" <?php selected('indicatorlight', get_option('preload')); ?>>indicatorlight</option>
873
- <option style="padding-right:10px;" value="pik" <?php selected('pik', get_option('preload')); ?>>pik</option>
874
- <option style="padding-right:10px;" value="snake" <?php selected('snake', get_option('preload')); ?>>snake</option>
875
- </select></td>
876
-
877
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Animation displayed while slider is loading. Choose between eight different options or set to "none" for no image.</p></td></tr>
878
-
879
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="sPagination" style="padding:10px;font-weight:bold;">pagination:</label></td>
880
- <td style="padding:5px 0;margin-left:5px;"><select name="sPagination" style="width:110px;">
881
- <option style="padding-right:10px;" value="yes" <?php selected('yes', get_option('sPagination')); ?>>Yes</option>
882
- <option style="padding-right:10px;" value="no" <?php selected('no', get_option('sPagination')); ?>>No</option>
883
- </select></td>
884
-
885
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Icons acting as links for each individual image.</p></td></tr>
886
-
887
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="pageposition" style="padding:10px;font-weight:bold;">paginationPosition:</label></td>
888
- <td style="padding:5px 0;margin-left:5px;"><select name="pageposition" style="width:110px;">
889
- <option style="padding-right:10px;" value="outside" <?php selected('outside', get_option('pageposition')); ?>>Outside</option>
890
- <option style="padding-right:10px;" value="inside" <?php selected('inside', get_option('pageposition')); ?>>Inside</option>
891
- </select><br /><select name="pageside" style="width:110px;">
892
- <option style="padding-right:10px;" value="left" <?php selected('left', get_option('pageside')); ?>>Left</option>
893
- <option style="padding-right:10px;" value="right" <?php selected('right', get_option('pageside')); ?>>Right</option>
894
- </select></td>
895
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Choose whether the pagination will be displayed inside the slider or outside of it. Also select whether it will appear on the left or right.</p></td></tr>
896
-
897
-
898
-
899
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="paginationon" style="padding:10px;font-weight:bold;">paginationIcon (on):</label></td>
900
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="paginationon" <?php if($sPagination=='no') echo 'readonly="readonly"';?> value="<?php echo $paginationon; ?>" style="width: 100px;" /><?php if($paginationon!='') echo '<img src="'.$paginationon.'" style="position:relative;top:5px;padding-left:5px;" />';?></td>
901
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Insert the selected version here of your custom pagination icon here.</p></td></tr>
902
-
903
- <tr valign="top" style="border-bottom:1px solid #ccc;"><td style="padding:5px 0;"><label for="paginationoff" style="padding:10px;font-weight:bold;">paginationIcon (off):</label></td>
904
- <td style="padding:5px 0;margin-left:5px;"><input type="text" name="paginationoff" <?php if($sPagination=='no') echo 'readonly="readonly"';?> value="<?php echo $paginationoff; ?>" style="width: 100px;" /><?php if($paginationoff!='') echo '<img src="'.$paginationoff.'" style="position:relative;top:5px;padding-left:5px;" />';?></td>
905
- <td style="margin:5px 0;"><p style="margin:0;margin-left:10px;font-style:italic;font-size:11px;">Use your own custom pagination icons. Insert the unselected version here.</p></td></tr>
906
-
907
- </table></div></div>
908
- </div>
909
- <div><!--third div for content tabs -->
910
- <div class="metabox-holder" style="width:815px;">
911
- <div class="postbox">
912
- <table class="form-table" style="margin:0;">
913
- <tr valign="top"><td style="padding:0;width:180px;"><h3>Name</h3></td><td style="padding:0;width:235px;"><h3>Value</h3></td><td style="padding:0;"><h3>Description</td></h3></tr>
914
- <tr valign="top" style="border-bottom:1px solid #ccc;">
915
- <td style="padding:5px 0;">
916
- <label for="activation" style="padding:10px;font-weight:bold;">Activate Plugin</label>
917
- </td>
918
- <td style="padding:5px 0;">
919
- <?php if($activation == 'enable') { ?>
920
- <input type="radio" checked="checked" value="enable" name="activation">Enable
921
- <br />
922
- <input type="radio" value="disable" name="activation">Disable
923
- <?php } else { ?>
924
- <input type="radio" value="enable" name="activation">Enable
925
- <br />
926
- <input type="radio" checked="checked" value="disable" name="activation">Disable
927
- <?php } ?>
928
- </td>
929
- <td style="margin:5px 0;">
930
- <p style="margin:0;font-style:italic;font-size:11px;">
931
- Enable or disable the slider.
932
- </p>
933
- </td>
934
- </tr>
935
-
936
- <tr valign="top" style="border-bottom:1px solid #ccc;">
937
- <td style="padding:5px 0;">
938
- <label for="source" style="padding:10px;font-weight:bold;">Load jQuery?</label>
939
- </td>
940
- <td style="padding:5px 0;">
941
- <select name="jquery" style="width:235px;">
942
- <option value="true" <?php selected('true', get_option('jquery')); ?>>True</option>
943
- <option value="false" <?php selected('false', get_option('jquery')); ?>>False</option>
944
- </select>
945
- </td>
946
- <td style="padding:5px 0;">
947
- <p style="margin:0 10px;font-style:italic;font-size:11px;">
948
- Choose if the slider should load jQuery. Setting this to 'false' may fix jQuery conflict errors that are breaking the slider.
949
- </p>
950
- </td>
951
- </tr>
952
-
953
- <tr valign="top" style="border-bottom:1px solid #ccc;">
954
- <td style="padding:5px 0;">
955
- <label for="permalink" style="padding:10px;font-weight:bold;">Permalinks</label>
956
- </td>
957
- <td style="padding:5px 0;">
958
- <input type="checkbox" name="permalink" <?php if (get_option('permalink')) echo "checked='checked'"; ?>/>Disable
959
- </td>
960
- <td style="margin:5px 0;">
961
- <p style="margin:0;font-style:italic;font-size:11px;">
962
- Check this box to disable the permalinks on images sourced from posts (custom fields).
963
- </p>
964
- </td>
965
- </tr>
966
-
967
- <tr valign="top" style="border-bottom:1px solid #ccc;">
968
- <td style="padding:5px 0;">
969
- <label for="source" style="padding:10px;font-weight:bold;">Get Images From?</label>
970
- </td>
971
- <td style="padding:5px 0;">
972
- <select name="source" style="width:235px;">
973
- <option value="featured" <?php selected('featured', get_option('source')); ?>>Custom Fields (Selected Category)</option>
974
- <option value="all" <?php selected('all', get_option('source')); ?>>Custom Fields (All Categories)</option>
975
- <option value="custom" <?php selected('custom', get_option('source')); ?>>Custom Images</option>
976
- </select>
977
- </td>
978
- <td style="padding:5px 0;">
979
- <p style="margin:0 10px;font-style:italic;font-size:11px;">
980
- Here you can select the source from which the images are displayed. </p><p style="margin:10px;font-style:italic;font-size:11px;">Select 'Custom Fields' if you wish to get the images from custom fields. To do so, enter 'easing' under name field & and the URL of the chosen image under the value field. </p><p style="margin:10px;font-style:italic;font-size:11px;"> Otherwise, you can choose to display 'custom' images. These images can be uploaded in the 'Custom Images' section where you can specify links to images from the Media Library or elsewhere. </p><p style="margin:10px;font-style:italic;font-size:11px;">By default, this option is set to 'Custom Fields (Selected Category)'.
981
- </p>
982
- </td>
983
- </tr>
984
-
985
- <tr valign="top" style="border-bottom:1px solid #ccc;">
986
- <td style="padding:5px 0;">
987
- <label for="featcat" style="padding:10px;font-weight:bold;">Selected Category:</label>
988
- <td style="padding:5px 0;"><style type="text/css">.cat_select{width:235px;};</style>
989
- <?php wp_dropdown_categories(array('hide_empty' => 0, 'class' => 'cat_select', 'name' => 'featcat', 'orderby' => 'name', 'selected' => get_option('featcat'), 'hierarchical' => true,));?>
990
- </td>
991
- <td style="padding:5px 0;">
992
- <p style="margin:10px;margin-top:0;font-style:italic;font-size:11px;">
993
- Here you can select which categorie's post thumbnails you wish to display if you have selected the 'Post thumbnails (Selected Category)' option above.
994
- </p>
995
- </tr>
996
-
997
- <tr valign="top">
998
- <td style="padding:5px 0;">
999
- <label for="featpost" style="padding:10px;font-weight:bold;">Number of Posts:</label>
1000
- </td>
1001
- <td style="padding:5px 0;"">
1002
- <input type="text" id="test" style="width:50px;" name="featpost" value="<?php echo $featpost; ?>" <?php if($source=='custom') echo 'readonly="readonly"'; ?> />
1003
- </td>
1004
- <td style="padding:5px 0;">
1005
- <p style="margin:0 10px;font-style:italic;font-size:11px;">
1006
- Number of post thumbnails to be displayed in the slider. No matter how high you set it, the slider will display a maximum of 10 images. </p></tr>
1007
- </table>
1008
- </div></div></div>
1009
- </div><!-- #yui-content -->
1010
- </div><!-- #content-explorer -->
1011
-
1012
- </form>
1013
-
1014
- <script type="text/javascript">
1015
- var myTabs = new YAHOO.widget.TabView("content-explorer");
1016
- </script>
1017
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/advert.jpg DELETED
Binary file
images/arrows.gif DELETED
Binary file
images/b_next.png DELETED
Binary file
images/b_prev.png DELETED
Binary file
images/bar.gif DELETED
Binary file
images/bg_trans.png DELETED
Binary file
images/bigflower.gif DELETED
Binary file
images/bounceball.gif DELETED
Binary file
images/delete_icon.png ADDED
Binary file
images/delete_icon@2x.png ADDED
Binary file
images/edit_icon.png ADDED
Binary file
images/edit_icon@2x.png ADDED
Binary file
images/indicator.gif DELETED
Binary file
images/indicatorlight.gif DELETED
Binary file
images/load-indicator.gif DELETED
Binary file
images/loading.gif ADDED
Binary file
images/menu_icon.png ADDED
Binary file
images/menu_icon_2x.png ADDED
Binary file
images/menu_icon_single.png ADDED
Binary file
images/menu_icon_single_grey.png ADDED
Binary file
images/next.png DELETED
Binary file
images/pagination.png DELETED
Binary file
images/pagination_current.png DELETED
Binary file
images/pagination_hover.png DELETED
Binary file
images/pik.gif DELETED
Binary file
images/selected_admin.jpg DELETED
Binary file
images/shadow_arc.png DELETED
Binary file
images/shadow_large.png DELETED
Binary file
images/shadow_small.png DELETED
Binary file
images/slideshow_arrows.png ADDED
Binary file
images/slideshow_icons.png ADDED
Binary file
images/snake.gif DELETED
Binary file
images/spinner.gif DELETED
Binary file
images/transparent_bg.png DELETED
Binary file
images/trash.png ADDED
Binary file
images/trash@2x.png ADDED
Binary file
images/unselected_admin.jpg DELETED
Binary file
images/white-grad.png DELETED
Binary file
includes/Resize.php ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Our custom image resizing class (no Timthumb here!)
5
+ *
6
+ * @author Matthew Ruddy
7
+ * @since 2.0
8
+ */
9
+ add_action( 'delete_attachment', array( 'RSL_Resize', 'destroy' ) );
10
+ class RSL_Resize {
11
+
12
+ /**
13
+ * Main resizing function
14
+ *
15
+ * @since 2.0
16
+ */
17
+ public static function resize( $url, $width, $height, $crop = true, $retina = false ) {
18
+
19
+ global $wpdb;
20
+
21
+ if ( empty( $url ) )
22
+ return new WP_Error( 'no_image_url', __( 'No image URL has been entered.' ), $url );
23
+
24
+ /** Allow for different retina sizes */
25
+ $retina = $retina ? ( $retina === true ? 2 : $retina ) : 1;
26
+
27
+ /**
28
+ * Bail if this image isn't in the Media Library.
29
+ * We only want to resize Media Library images, so we can be sure they get deleted correctly when appropriate.
30
+ */
31
+ $query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
32
+ $get_attachment = $wpdb->get_results( $query );
33
+ if ( !$get_attachment )
34
+ return array( 'url' => $url, 'width' => $width, 'height' => $height );
35
+
36
+ /** Get the image file path */
37
+ $file_path = parse_url( $url );
38
+ $file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];
39
+
40
+ /** Check for Multisite */
41
+ if ( is_multisite() ) {
42
+ global $blog_id;
43
+ $blog_details = get_blog_details( $blog_id );
44
+ $file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/'. $blog_id .'/files/', $file_path );
45
+ }
46
+
47
+ /** Destination width and height variables */
48
+ $dest_width = $width * $retina;
49
+ $dest_height = $height * $retina;
50
+
51
+ /** File name suffix (appended to original file name) */
52
+ $suffix = "{$dest_width}x{$dest_height}";
53
+
54
+ /** Some additional info about the image */
55
+ $info = pathinfo( $file_path );
56
+ $dir = $info['dirname'];
57
+ $ext = $info['extension'];
58
+ $name = wp_basename( $file_path, ".$ext" );
59
+
60
+ /** Suffix applied to filename */
61
+ $suffix = "{$dest_width}x{$dest_height}";
62
+
63
+ /** Get the destination file name */
64
+ $dest_file_name = "{$dir}/{$name}-{$suffix}.{$ext}";
65
+
66
+ if ( !file_exists( $dest_file_name ) ) {
67
+
68
+ /** Load Wordpress Image Editor */
69
+ $editor = wp_get_image_editor( $file_path );
70
+ if ( is_wp_error( $editor ) )
71
+ return array( 'url' => $url, 'width' => $width, 'height' => $height );
72
+
73
+ /** Get the original image size */
74
+ $size = $editor->get_size();
75
+ $orig_width = $size['width'];
76
+ $orig_height = $size['height'];
77
+
78
+ $src_x = $src_y = 0;
79
+ $src_w = $orig_width;
80
+ $src_h = $orig_height;
81
+
82
+ if ( $crop ) {
83
+
84
+ $cmp_x = $orig_width / $dest_width;
85
+ $cmp_y = $orig_height / $dest_height;
86
+
87
+ /** Calculate x or y coordinate, and width or height of source */
88
+ if ( $cmp_x > $cmp_y ) {
89
+ $src_w = round( $orig_width / $cmp_x * $cmp_y );
90
+ $src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
91
+ }
92
+ else if ( $cmp_y > $cmp_x ) {
93
+ $src_h = round( $orig_height / $cmp_y * $cmp_x );
94
+ $src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
95
+ }
96
+
97
+ }
98
+
99
+ /** Time to crop the image! */
100
+ $editor->crop( $src_x, $src_y, $src_w, $src_h, $dest_width, $dest_height );
101
+
102
+ /** Now let's save the image */
103
+ $saved = $editor->save( $dest_file_name );
104
+
105
+ /** Get resized image information */
106
+ $resized_url = str_replace( basename( $url ), basename( $saved['path'] ), $url );
107
+ $resized_width = $saved['width'];
108
+ $resized_height = $saved['height'];
109
+ $resized_type = $saved['mime-type'];
110
+
111
+ /**
112
+ * Add the resized dimensions to original image metadata
113
+ * (so we can delete our resized images when the original image is delete from the Media Library)
114
+ */
115
+ $metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
116
+ if ( isset( $metadata['image_meta'] ) ) {
117
+ $metadata['image_meta']['resized_images'][] = $resized_width .'x'. $resized_height;
118
+ wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
119
+ }
120
+
121
+ /** Create the image array */
122
+ $resized_image = array(
123
+ 'url' => $resized_url,
124
+ 'width' => $resized_width,
125
+ 'height' => $resized_height,
126
+ 'type' => $resized_type
127
+ );
128
+
129
+ }
130
+ else {
131
+ $resized_image = array(
132
+ 'url' => str_replace( basename( $url ), basename( $dest_file_name ), $url ),
133
+ 'width' => $dest_width,
134
+ 'height' => $dest_height,
135
+ 'type' => $ext
136
+ );
137
+ }
138
+
139
+ /** And we're done! */
140
+ return $resized_image;
141
+
142
+ }
143
+
144
+ /**
145
+ * Deletes any resized image (from above function) when the original image is deleted from the Wordpress Media Library.
146
+ *
147
+ * @since 2.0
148
+ */
149
+ public static function destroy( $post_id ) {
150
+
151
+ // Get attachment image metadata
152
+ $metadata = wp_get_attachment_metadata( $post_id );
153
+ if ( !$metadata )
154
+ return;
155
+
156
+ // Do some bailing if we cannot continue
157
+ if ( !isset( $metadata['file'] ) || !isset( $metadata['image_meta']['resized_images'] ) )
158
+ return;
159
+ $pathinfo = pathinfo( $metadata['file'] );
160
+ $resized_images = $metadata['image_meta']['resized_images'];
161
+
162
+ // Get Wordpress uploads directory (and bail if it doesn't exist)
163
+ $wp_upload_dir = wp_upload_dir();
164
+ $upload_dir = $wp_upload_dir['basedir'];
165
+ if ( !is_dir( $upload_dir ) )
166
+ return;
167
+
168
+ // Delete the resized images
169
+ foreach ( $resized_images as $dims ) {
170
+
171
+ // Get the resized images filename
172
+ $file = $upload_dir .'/'. $pathinfo['dirname'] .'/'. $pathinfo['filename'] .'-'. $dims .'.'. $pathinfo['extension'];
173
+
174
+ // Delete the resized image
175
+ @unlink( $file );
176
+
177
+ }
178
+
179
+ }
180
+
181
+ }
includes/Slideshow.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Main Slideshow Class
5
+ *
6
+ * @author Matthew Ruddy
7
+ * @since 2.0
8
+ */
9
+ class RSL_Slideshow {
10
+
11
+ /**
12
+ * Class instance
13
+ *
14
+ * @since 2.0
15
+ */
16
+ private static $instance;
17
+
18
+ /**
19
+ * Getter method for retrieving the class instance.
20
+ *
21
+ * @since 2.0
22
+ */
23
+ public static function get_instance() {
24
+
25
+ if ( !self::$instance instanceof self )
26
+ self::$instance = new self;
27
+ return self::$instance;
28
+
29
+ }
30
+
31
+ /**
32
+ * Loads slideshow styles
33
+ *
34
+ * @since 2.0
35
+ */
36
+ public static function enqueue_styles() {
37
+
38
+ /** Load styling */
39
+ wp_enqueue_style( 'rsd-slideshow' );
40
+
41
+ /** Trigger actions */
42
+ do_action( 'rivasliderlite_enqueue_styles' );
43
+
44
+ }
45
+
46
+ /**
47
+ * Loads slideshow scripts
48
+ *
49
+ * @since 2.0
50
+ */
51
+ public static function enqueue_scripts() {
52
+
53
+ /** Get plugin settings */
54
+ $settings = get_option( 'rivasliderlite_settings' );
55
+
56
+ /** Load jQuery */
57
+ wp_enqueue_script( 'jquery' );
58
+
59
+ /** Load slideshow script */
60
+ wp_enqueue_script( 'rsd-slideshow' );
61
+
62
+ /** Trigger actions */
63
+ do_action( 'rivasliderlite_enqueue_scripts' );
64
+
65
+ }
66
+
67
+ /**
68
+ * Displays a slideshow
69
+ *
70
+ * @since 2.0
71
+ */
72
+ public function display_slideshow() {
73
+
74
+ /** Display the slideshow */
75
+ ob_start();
76
+ require dirname( RivaSliderLite::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'slideshow.php';
77
+ return ob_get_clean();
78
+
79
+ }
80
+
81
+ }
includes/Upgrade.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Plugin upgrade class. This will become more populated over time.
5
+ *
6
+ * @author Matthew Ruddy
7
+ * @since 2.0
8
+ */
9
+ class RSL_Upgrade {
10
+
11
+ /**
12
+ * Upgrade from Easing Slider
13
+ *
14
+ * @since 2.0
15
+ */
16
+ public static final function do_upgrades() {
17
+
18
+ /** Get current plugin version */
19
+ $version = get_option( 'rivasliderlite_version' );
20
+
21
+ /** Let the upgrades begin! */
22
+ if ( self::should_do_easingslider_upgrade() )
23
+ self::easingslider_upgrade();
24
+
25
+ /** Custom hooks */
26
+ do_action( 'rivasliderlite_upgrades', RivaSliderLite::$version, $version );
27
+
28
+ /** Bail if we are already up to date */
29
+ if ( $version == RivaSliderLite::$version )
30
+ return;
31
+
32
+ /** Update plugin version */
33
+ update_option( 'rivasliderlite_version', RivaSliderLite::$version );
34
+
35
+ }
36
+
37
+ /**
38
+ * Checks if we should do an Easing Slider upgrade procedure
39
+ *
40
+ * @since 2.0
41
+ */
42
+ public static final function should_do_easingslider_upgrade() {
43
+
44
+ if ( get_option( 'easingslider_version' ) !== false || get_option( 'activation' ) !== false ) {
45
+ if ( !!get_option( 'rivasliderlite_easingslider_upgrade' ) === false )
46
+ return true;
47
+ }
48
+ return false;
49
+
50
+ }
51
+
52
+ /**
53
+ * Upgrade settings from Easing Slider
54
+ *
55
+ * @since 2.0
56
+ */
57
+ public static final function easingslider_upgrade() {
58
+
59
+ /** Fire plugin activation (won't have been fired by upgrade) */
60
+ RivaSliderLite::get_instance()->activate();
61
+
62
+ /** Get current slideshow settings */
63
+ $slideshow = RivaSliderLite::get_instance()->defaults();
64
+
65
+ /** Transfer the settings */
66
+ $slideshow->dimensions->width = get_option( 'width' );
67
+ $slideshow->dimensions->height = get_option( 'height' );
68
+ $slideshow->transitions->effect = ( get_option( 'transition' ) == 'fade' ) ? 'fade' : 'slide';
69
+ $slideshow->transitions->duration = get_option( 'transpeed' );
70
+ $slideshow->navigation->arrows = ( get_option( 'buttons' ) == '' ) ? 'false' : 'true';
71
+ $slideshow->navigation->pagination = ( get_option( 'sPagination' ) == '' ) ? 'false' : 'true';
72
+ $slideshow->playback->pause = get_option( 'interval' );
73
+
74
+ /** Add the slides */
75
+ $slideshow->slides = array();
76
+ for ( $i = 1; $i <= 10; $i++ ) {
77
+
78
+ /** Check if the slide has an image. Bail if not. */
79
+ $image = get_option( "sImg{$i}" );
80
+ if ( empty( $image ) )
81
+ continue;
82
+
83
+ /** Resize the image and get its thumbnail */
84
+ $resize = RSL_Resize::resize( $image, 150, 150, true );
85
+ $sizes = (object) array(
86
+ 'thumbnail' => (object) array(
87
+ 'url' => $resize['url']
88
+ )
89
+ );
90
+
91
+ /** Add the slide image & link */
92
+ $slideshow->slides[] = (object) array(
93
+ 'id' => $i,
94
+ 'url' => $image,
95
+ 'alt' => null,
96
+ 'title' => null,
97
+ 'link' => get_option( "sImgLink{$i}" ),
98
+ 'linkTarget' => '_blank',
99
+ 'sizes' => $sizes
100
+ );
101
+
102
+ }
103
+
104
+ /** Update the slideshow settings */
105
+ update_option( 'rivasliderlite_slideshow', $slideshow );
106
+
107
+ /** Flag upgrade */
108
+ update_option( 'rivasliderlite_easingslider_upgrade', 1 );
109
+
110
+ }
111
+ }
includes/Widget.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Adds a 'Slideshows' widget to the WordPress widgets interface
5
+ *
6
+ * @author Matthew Ruddy
7
+ * @since 2.0
8
+ */
9
+ class RSL_Widget extends WP_Widget {
10
+
11
+ /**
12
+ * Constructor
13
+ *
14
+ * @since 2.0
15
+ */
16
+ public function __construct() {
17
+ parent::__construct(
18
+ 'rivasliderlite_widget',
19
+ __( 'Slideshow', 'rivasliderlite' ),
20
+ array( 'description' => __( 'Display a slideshow using a widget', 'rivasliderlite' ) )
21
+ );
22
+ }
23
+
24
+ /**
25
+ * Widget logic
26
+ *
27
+ * @since 2.0
28
+ */
29
+ public function widget( $args, $instance ) {
30
+
31
+ /** Extract arguments */
32
+ extract( $args );
33
+
34
+ /** Get widget title */
35
+ $title = apply_filters( 'widgets_title', $instance['title'] );
36
+
37
+ /** Display widget header */
38
+ echo $before_widget;
39
+ if ( !empty( $title ) )
40
+ echo $before_title . $title . $after_title;
41
+
42
+ /** Display slideshow */
43
+ echo RSL_Slideshow::get_instance()->display_slideshow();
44
+
45
+ /** Display widget footer */
46
+ echo $after_widget;
47
+
48
+
49
+ }
50
+
51
+ /**
52
+ * Returns updated settings array. Also does some sanatization.
53
+ *
54
+ * @since 2.0
55
+ */
56
+ public function update( $new_instance, $old_instance ) {
57
+ return array(
58
+ 'title' => strip_tags( $new_instance['title'] )
59
+ );
60
+ }
61
+
62
+ /**
63
+ * Widget settings form
64
+ *
65
+ * @since 2.0
66
+ */
67
+ public function form( $instance ) {
68
+
69
+ ?>
70
+ <p>
71
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'rivasliderlite' ); ?></label>
72
+ <input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="widefat" value="<?php if ( isset( $instance['title'] ) ) echo esc_attr( $instance['title'] ); ?>">
73
+ </p>
74
+ <?php
75
+
76
+ }
77
+
78
+ }
js/admin.js ADDED
@@ -0,0 +1,581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ ;(function($) {
4
+
5
+ /** Backbone pre-compiled template loader */
6
+ window.TemplateLoader = {
7
+
8
+ get: function(selector) {
9
+
10
+ if ( !this.templates )
11
+ this.templates = {};
12
+
13
+ /** Load and cache the template */
14
+ var template = this.templates[selector];
15
+ if ( !template ) {
16
+ template = $(selector).html();
17
+ template = _.template(template);
18
+ this.templates[selector] = template;
19
+ }
20
+
21
+ return template;
22
+
23
+ }
24
+
25
+ }
26
+
27
+ /** Our slide model */
28
+ window.Slide = Backbone.Model.extend({
29
+
30
+ defaults: {
31
+ url: null,
32
+ sizes: null,
33
+ alt: null,
34
+ title: null,
35
+ link: null,
36
+ linkTarget: '_blank',
37
+ },
38
+
39
+ });
40
+
41
+ /** Our slides collection */
42
+ window.SlideCollection = Backbone.Collection.extend({
43
+
44
+ model: Slide,
45
+
46
+ primary: 0,
47
+
48
+ initialize: function() {
49
+
50
+ var self = this;
51
+
52
+ /** Bind events */
53
+ this.on('add', this.addModel, this);
54
+ this.on('remove', this.removeModel, this);
55
+ this.on('reset', this.resetData, this);
56
+ this.on('change', this.resetData, this);
57
+
58
+ /** Increment primary key for each model (timeout ensures models are added before doing so) */
59
+ setTimeout(function() {
60
+ _.each(self.models, function(model) {
61
+ self.primary++;
62
+ });
63
+ });
64
+
65
+ },
66
+
67
+ addModel: function(model) {
68
+
69
+ /** Increment primary key */
70
+ this.primary++;
71
+
72
+ /** Add ID to model & store it */
73
+ model.set({ 'id': this.primary }, { silent: true });
74
+
75
+ /** Silently reset the collection (forces refresh of _byId and _byCid properties) */
76
+ this.reset(this.models, { silent: true });
77
+
78
+ /** Set stored data */
79
+ this.resetData();
80
+
81
+ },
82
+
83
+ removeModel: function() {
84
+
85
+ var self = this;
86
+
87
+ /** Reset model IDs */
88
+ this.resetIDs();
89
+
90
+ /** Silently reset the collection (forces refresh of _byId and _byCid properties) */
91
+ this.reset(this.models, { silent: true });
92
+
93
+ /** Set stored data */
94
+ this.resetData();
95
+
96
+ },
97
+
98
+ resetData: function() {
99
+
100
+ /** Reset stored (hidden input) data */
101
+ $('#slideshow-images').val(JSON.stringify(this));
102
+
103
+ },
104
+
105
+ resetIDs: function() {
106
+
107
+ var self = this;
108
+
109
+ /** Reset primary key */
110
+ this.primary = 0;
111
+
112
+ /** Reset ID's */
113
+ _.each(this.models, function(model) {
114
+ self.primary++;
115
+ model.set({ 'id': self.primary }, { silent: true });
116
+ });
117
+
118
+ return this;
119
+
120
+ },
121
+
122
+ });
123
+
124
+ /** Our slides view */
125
+ window.SlideView = Backbone.View.extend({
126
+
127
+ $container: $('.thumbnails-container .inner'),
128
+
129
+ initialize: function() {
130
+
131
+ var self = this;
132
+
133
+ /** Get our slide template */
134
+ this.template = TemplateLoader.get('#tmpl-slide');
135
+
136
+ /** Bind events */
137
+ this.collection.on('add', this.addThumb, this);
138
+ this.collection.on('remove', this.render, this);
139
+ this.collection.on('reset', this.render, this);
140
+ this.collection.on('change:url', this.render, this);
141
+
142
+ /** Delete all images functionality */
143
+ $('.delete-images').on('click', function(event) {
144
+
145
+ event.preventDefault();
146
+
147
+ /** Remove all of the thumbnails */
148
+ if ( confirm( rivasliderlite.delete_images) )
149
+ self.removeThumbs.call(self, event);
150
+
151
+ });
152
+
153
+ /** Add image(s) functionality */
154
+ $('.add-image').on('click', function(event) {
155
+
156
+ event.preventDefault();
157
+
158
+ /** Display the add image view */
159
+ addImageView.render();
160
+
161
+ });
162
+
163
+ /** Delete image functionality */
164
+ $(document).on('click', '.delete-button', function(event) {
165
+
166
+ event.preventDefault();
167
+
168
+ /** Confirm before deleting the image */
169
+ if ( confirm( rivasliderlite.delete_image ) )
170
+ self.collection.remove(self.collection.get($(this).parent().attr('data-id')));
171
+
172
+ });
173
+
174
+ /** Edit slide functionality */
175
+ $(document).on('click', '.thumbnails-container img', function(event) {
176
+
177
+ event.preventDefault();
178
+
179
+ /** Get the ID of the slide we want to edit */
180
+ var id = $(this).parent().attr('data-id'),
181
+ editSlideView = new EditSlideView({
182
+ model: self.collection.get(id)
183
+ });
184
+
185
+ /** Display slide editor view */
186
+ $(editSlideView.render().el).appendTo('body').focus();
187
+
188
+ });
189
+
190
+ },
191
+
192
+ addThumb: function(model) {
193
+
194
+ /** Add the new thumbnail for this model */
195
+ this.$container.append(this.template(model.toJSON()))
196
+
197
+ },
198
+
199
+ removeThumbs: function(event) {
200
+
201
+ event.preventDefault();
202
+
203
+ /** Remove thumbnails */
204
+ this.$container.empty();
205
+
206
+ /** Clear the collection */
207
+ this.collection.reset();
208
+
209
+ /** Reset primary index */
210
+ this.collection.primary = 0;
211
+
212
+ },
213
+
214
+ render: function() {
215
+
216
+ var self = this;
217
+
218
+ /** Remove the previous thumbnails */
219
+ this.$container.empty();
220
+
221
+ /** Add the current thumbnails */
222
+ _.each(this.collection.models, function(model) {
223
+ self.$container.append(self.template(model.toJSON()));
224
+ });
225
+
226
+ return this;
227
+
228
+ }
229
+
230
+ });
231
+
232
+ /** Edit slide view */
233
+ window.EditSlideView = Backbone.View.extend({
234
+
235
+ attributes: {
236
+ 'tabindex': 0
237
+ },
238
+
239
+ changeImageView: null,
240
+
241
+ events: {
242
+ 'change': 'change',
243
+ 'click .media-modal-backdrop, .media-modal-close': 'discardChanges',
244
+ 'click .change-image': 'changeImage',
245
+ /** As changes are set to the model automatically, we simple close to save changes */
246
+ 'click .media-modal-save': 'close',
247
+ 'click .media-menu-item': 'toggleTab',
248
+ 'keydown': 'keyDown'
249
+ },
250
+
251
+ initialize: function() {
252
+
253
+ /** Clone original attributes as a window is opened (for restoration if changes are discarded) */
254
+ this.origAttributes = _.clone(this.model.attributes);
255
+
256
+ /** Set the slide editor template */
257
+ this.template = TemplateLoader.get('#tmpl-edit-slide');
258
+
259
+ /** Reset thumbnail on image URL change */
260
+ this.model.on('change:url', this.resetThumbnail, this);
261
+
262
+ },
263
+
264
+ toggleTab: function(event) {
265
+
266
+ event.preventDefault();
267
+
268
+ /** Get new tab ID */
269
+ var id = event.target.dataset.tab;
270
+
271
+ /** Reset 'active' class */
272
+ $('.media-menu-item').removeClass('active');
273
+ $(event.target).addClass('active');
274
+
275
+ /** Toggle the appropriate tab */
276
+ $('.media-tab', this.$el).each(function() {
277
+ if ( this.id === id )
278
+ $(this).show();
279
+ else
280
+ $(this).hide();
281
+ });
282
+
283
+ },
284
+
285
+ close: function(event) {
286
+
287
+ event.preventDefault();
288
+
289
+ /** Closes the window, and delete the change image view (if created) */
290
+ this.remove();
291
+ if ( this.changeImageView )
292
+ this.changeImageView.remove();
293
+
294
+ },
295
+
296
+ change: function(event) {
297
+
298
+ /** Changes the models changes immediately after the field itself is changed */
299
+ var target = event.target,
300
+ change = {};
301
+ change[target.id] = target.value;
302
+ this.model.set(change);
303
+
304
+ },
305
+
306
+ discardChanges: function(event) {
307
+
308
+ event.preventDefault();
309
+
310
+ /** JSON strings of attributes (for comparison) */
311
+ var current = JSON.stringify(this.model.attributes),
312
+ original = JSON.stringify(this.origAttributes);
313
+
314
+ /** As model changes are done automatically, to discard changes we simple reset the original model attributes */
315
+ if ( current === original )
316
+ this.close(event);
317
+ else {
318
+ if ( confirm( rivasliderlite.media_upload.discard_changes ) ) {
319
+ this.model.set(this.origAttributes);
320
+ this.close();
321
+ }
322
+ }
323
+
324
+ },
325
+
326
+ resetThumbnail: function(model, value) {
327
+ var sizes = model.get('sizes'),
328
+ size = sizes.large || sizes.medium || sizes.thumbnail;
329
+ this.$('.slide-thumbnail').attr('src', size.url);
330
+ },
331
+
332
+ changeImage: function(event) {
333
+
334
+ event.preventDefault();
335
+
336
+ var self = this;
337
+
338
+ /** Create new view if doesn't already exist */
339
+ if ( this.changeImageView === null ) {
340
+ this.changeImageView = new ChangeImageView({
341
+ id: this.model.get('id'),
342
+ model: this.model
343
+ });
344
+ }
345
+
346
+ /** Render the view */
347
+ this.changeImageView.render();
348
+
349
+ /** Hide backdrop to prevent it from doubling up */
350
+ $('.media-modal-backdrop').first().hide();
351
+
352
+ /** Re-focus & show backdrop after close */
353
+ this.changeImageView.fileFrame.on('close', function() {
354
+ $('.media-modal-backdrop').first().show();
355
+ self.$el.focus();
356
+ });
357
+
358
+ },
359
+
360
+ keyDown: function(event) {
361
+
362
+ /** Close view when 'esc' is pressed */
363
+ if ( event.keyCode === 27 ) {
364
+ event.preventDefault();
365
+ this.discardChanges(event);
366
+ return;
367
+ }
368
+
369
+ },
370
+
371
+ render: function() {
372
+ $(this.el).html(this.template(this.model.toJSON()));
373
+ return this;
374
+ },
375
+
376
+ });
377
+
378
+ /** Backbone Add Image View */
379
+ window.AddImageView = Backbone.View.extend({
380
+
381
+ fileFrame: null,
382
+
383
+ frameProperties: {
384
+ title: rivasliderlite.media_upload.title,
385
+ button: rivasliderlite.media_upload.button,
386
+ multiple: true
387
+ },
388
+
389
+ modelAttributes: ['url', 'sizes', 'alt', 'title'],
390
+
391
+ initialize: function() {
392
+
393
+ /** Bail if file frame already exists */
394
+ if ( this.fileFrame )
395
+ return;
396
+
397
+ /** Create the media frame */
398
+ this.fileFrame = wp.media.frames.fileFrame = new wp.media({
399
+ title: this.frameProperties.title,
400
+ button: {
401
+ text: this.frameProperties.button
402
+ },
403
+ multiple: this.frameProperties.multiple
404
+ });
405
+
406
+ /** Run callback when an image(s) is selected */
407
+ this.fileFrame.on('select', this.onSelect, this);
408
+
409
+ },
410
+
411
+ onSelect: function() {
412
+
413
+ /** Get the selected images */
414
+ var selection = this.fileFrame.state().get('selection'),
415
+ self = this;
416
+
417
+ /** Add them to the slides collection */
418
+ _.each(selection.models, function(image) {
419
+
420
+ /** Only get the attributes we want */
421
+ var newAttributes = {};
422
+ for ( var i in self.modelAttributes )
423
+ newAttributes[self.modelAttributes[i]] = image.get(self.modelAttributes[i]);
424
+
425
+ /** Push the new slide */
426
+ self.collection.add([newAttributes]);
427
+
428
+ });
429
+
430
+ },
431
+
432
+ render: function() {
433
+ this.fileFrame.open();
434
+ }
435
+
436
+ });
437
+
438
+ /** Extension of Add Image View, except for changing a slide's image */
439
+ window.ChangeImageView = AddImageView.extend({
440
+
441
+ frameProperties: {
442
+ title: rivasliderlite.media_upload.title,
443
+ button: rivasliderlite.media_upload.change,
444
+ multiple: false
445
+ },
446
+
447
+ onSelect: function() {
448
+
449
+ /** Get the selected attachment image (aka, the new slide) */
450
+ var selection = this.fileFrame.state().get('selection'),
451
+ image = selection.models[0],
452
+ newAttributes = {};
453
+
454
+ /** Only get the attributes we want */
455
+ for ( var i in this.modelAttributes )
456
+ newAttributes[this.modelAttributes[i]] = image.get(this.modelAttributes[i]);
457
+
458
+ /** Set new slide attributes (thumbnail will reset automagically) */
459
+ this.model.set(newAttributes);
460
+
461
+ },
462
+
463
+ remove: function() {
464
+
465
+ /** Call parent function */
466
+ AddImageView.prototype.remove.apply(this, arguments);
467
+
468
+ /** These two lines seem to be the only true way to remove a media uploader (this.fileFrame) at the moment! */
469
+ this.fileFrame.modal.$el.remove();
470
+ this.fileFrame.uploader.$browser.remove();
471
+
472
+ },
473
+
474
+ });
475
+
476
+ /** Override Medai Library sidebar template with our own */
477
+ wp.media.view.Attachment.Details.prototype.template = wp.media.template('image-details');
478
+
479
+ /** Show/hide settings functionality */
480
+ $('.sidebar-name').on('click', function() {
481
+
482
+ var $thisParent = $(this).parent(),
483
+ $thisContent = $thisParent.find('.sidebar-content');
484
+
485
+ // Close the other widgets before opening selected widget
486
+ if ( !$thisParent.hasClass('exclude' ) ) {
487
+ $('.sidebar-name').each(function() {
488
+
489
+ // Get parent
490
+ var $parent = $(this).parent();
491
+
492
+ // Close the widget
493
+ if ( !$parent.hasClass('exclude') && !$parent.hasClass('closed') ) {
494
+ $parent.find('.sidebar-content').slideUp(200, function() {
495
+ $parent.addClass('closed');
496
+ });
497
+ }
498
+
499
+ });
500
+ }
501
+
502
+ // Open/close the widget
503
+ if ( $thisParent.hasClass('closed') )
504
+ $thisContent.slideDown(200, function() {
505
+ $thisParent.removeClass('closed');
506
+ });
507
+ else
508
+ $thisContent.slideUp(200, function() {
509
+ $thisParent.addClass('closed');
510
+ });
511
+
512
+ });
513
+
514
+ /** Sortables functionality */
515
+ $('.thumbnails-container').sortable({
516
+ items: '.thumbnail',
517
+ containment: 'parent',
518
+ tolerance: 'pointer',
519
+ stop: function(event, ui) {
520
+
521
+ var order = [],
522
+ sortedModels = [];
523
+
524
+ /** Get the new sort order */
525
+ $(this).find('.thumbnail').each(function() {
526
+ order.push($(this).attr('data-id'));
527
+ });
528
+
529
+ /** Get array of models in sorted order */
530
+ for ( var i = 0; i < order.length; i++ )
531
+ sortedModels.push(slideCollection.get(order[i]));
532
+
533
+ /** Reset the collection & its IDs */
534
+ slideCollection.reset(sortedModels).resetIDs().resetData();
535
+
536
+ }
537
+ });
538
+
539
+ /** Delete slideshow warnings */
540
+ $('.trash a').on('click', function(event) {
541
+ if ( !confirm( rivasliderlite.delete_slideshow ) )
542
+ return false;
543
+ });
544
+ $('#doaction, #doaction2').on('click', function(event) {
545
+ var id = event.target.id.replace('do', '');
546
+ if ( $('#'+ id).val() == 'delete' )
547
+ if ( !confirm( rivasliderlite.delete_slideshows ) )
548
+ return false;
549
+ });
550
+
551
+ /** Select all slideshows (import/export page) functionality */
552
+ $('.multiple-checkbox .select-all').on('click', function(event) {
553
+ if ( $(this).hasClass('checked') )
554
+ $(this).removeClass('checked').parents('ul').find('input').removeAttr('checked');
555
+ else
556
+ $(this).addClass('checked').parents('ul').find('input').attr('checked', 'checked');
557
+ });
558
+
559
+ /** Fade out messages after 5 seconds */
560
+ setTimeout(function() {
561
+ $('.message').not('.permanent').each(function() {
562
+ $(this).fadeOut(400, function() {
563
+ $(this).remove();
564
+ });
565
+ });
566
+ }, 5000);
567
+
568
+ /** Get slides and bail if they can't be found */
569
+ if ( $('#slideshow-images').length == 0 )
570
+ return;
571
+
572
+ /** Get our essentials */
573
+ window.slideCollection = new SlideCollection(JSON.parse($('#slideshow-images').val()));
574
+ window.slideView = new SlideView({
575
+ collection: slideCollection
576
+ });
577
+ window.addImageView = new AddImageView({
578
+ collection: slideCollection
579
+ });
580
+
581
+ })(jQuery);
js/admin.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ "use strict";(function(a){window.TemplateLoader={get:function(b){if(!this.templates){this.templates={}}var c=this.templates[b];if(!c){c=a(b).html();c=_.template(c);this.templates[b]=c}return c}};window.Slide=Backbone.Model.extend({defaults:{url:null,sizes:null,alt:null,title:null,link:null,linkTarget:"_blank",},});window.SlideCollection=Backbone.Collection.extend({model:Slide,primary:0,initialize:function(){var b=this;this.on("add",this.addModel,this);this.on("remove",this.removeModel,this);this.on("reset",this.resetData,this);this.on("change",this.resetData,this);setTimeout(function(){_.each(b.models,function(c){b.primary++})})},addModel:function(b){this.primary++;b.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var b=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){a("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var b=this;this.primary=0;_.each(this.models,function(c){b.primary++;c.set({id:b.primary},{silent:true})});return this},});window.SlideView=Backbone.View.extend({$container:a(".thumbnails-container .inner"),initialize:function(){var b=this;this.template=TemplateLoader.get("#tmpl-slide");this.collection.on("add",this.addThumb,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.collection.on("change:url",this.render,this);a(".delete-images").on("click",function(c){c.preventDefault();if(confirm(rivasliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").on("click",function(c){c.preventDefault();addImageView.render()});a(document).on("click",".delete-button",function(c){c.preventDefault();if(confirm(rivasliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).on("click",".thumbnails-container img",function(c){c.preventDefault();var e=a(this).parent().attr("data-id"),d=new EditSlideView({model:b.collection.get(e)});a(d.render().el).appendTo("body").focus()})},addThumb:function(b){this.$container.append(this.template(b.toJSON()))},removeThumbs:function(b){b.preventDefault();this.$container.empty();this.collection.reset();this.collection.primary=0},render:function(){var b=this;this.$container.empty();_.each(this.collection.models,function(c){b.$container.append(b.template(c.toJSON()))});return this}});window.EditSlideView=Backbone.View.extend({attributes:{tabindex:0},changeImageView:null,events:{change:"change","click .media-modal-backdrop, .media-modal-close":"discardChanges","click .change-image":"changeImage","click .media-modal-save":"close","click .media-menu-item":"toggleTab",keydown:"keyDown"},initialize:function(){this.origAttributes=_.clone(this.model.attributes);this.template=TemplateLoader.get("#tmpl-edit-slide");this.model.on("change:url",this.resetThumbnail,this)},toggleTab:function(b){b.preventDefault();var c=b.target.dataset.tab;a(".media-menu-item").removeClass("active");a(b.target).addClass("active");a(".media-tab",this.$el).each(function(){if(this.id===c){a(this).show()}else{a(this).hide()}})},close:function(b){b.preventDefault();this.remove();if(this.changeImageView){this.changeImageView.remove()}},change:function(b){var c=b.target,d={};d[c.id]=c.value;this.model.set(d)},discardChanges:function(c){c.preventDefault();var d=JSON.stringify(this.model.attributes),b=JSON.stringify(this.origAttributes);if(d===b){this.close(c)}else{if(confirm(rivasliderlite.media_upload.discard_changes)){this.model.set(this.origAttributes);this.close()}}},resetThumbnail:function(b,e){var d=b.get("sizes"),c=d.large||d.medium||d.thumbnail;this.$(".slide-thumbnail").attr("src",c.url)},changeImage:function(c){c.preventDefault();var b=this;if(this.changeImageView===null){this.changeImageView=new ChangeImageView({id:this.model.get("id"),model:this.model})}this.changeImageView.render();a(".media-modal-backdrop").first().hide();this.changeImageView.fileFrame.on("close",function(){a(".media-modal-backdrop").first().show();b.$el.focus()})},keyDown:function(b){if(b.keyCode===27){b.preventDefault();this.discardChanges(b);return}},render:function(){a(this.el).html(this.template(this.model.toJSON()));return this},});window.AddImageView=Backbone.View.extend({fileFrame:null,frameProperties:{title:rivasliderlite.media_upload.title,button:rivasliderlite.media_upload.button,multiple:true},modelAttributes:["url","sizes","alt","title"],initialize:function(){if(this.fileFrame){return}this.fileFrame=wp.media.frames.fileFrame=new wp.media({title:this.frameProperties.title,button:{text:this.frameProperties.button},multiple:this.frameProperties.multiple});this.fileFrame.on("select",this.onSelect,this)},onSelect:function(){var c=this.fileFrame.state().get("selection"),b=this;_.each(c.models,function(e){var f={};for(var d in b.modelAttributes){f[b.modelAttributes[d]]=e.get(b.modelAttributes[d])}b.collection.add([f])})},render:function(){this.fileFrame.open()}});window.ChangeImageView=AddImageView.extend({frameProperties:{title:rivasliderlite.media_upload.title,button:rivasliderlite.media_upload.change,multiple:false},onSelect:function(){var c=this.fileFrame.state().get("selection"),d=c.models[0],e={};
2
+ for(var b in this.modelAttributes){e[this.modelAttributes[b]]=d.get(this.modelAttributes[b])}this.model.set(e)},remove:function(){AddImageView.prototype.remove.apply(this,arguments);this.fileFrame.modal.$el.remove();this.fileFrame.uploader.$browser.remove()},});wp.media.view.Attachment.Details.prototype.template=wp.media.template("image-details");a(".sidebar-name").on("click",function(){var c=a(this).parent(),b=c.find(".sidebar-content");if(!c.hasClass("exclude")){a(".sidebar-name").each(function(){var d=a(this).parent();if(!d.hasClass("exclude")&&!d.hasClass("closed")){d.find(".sidebar-content").slideUp(200,function(){d.addClass("closed")})}})}if(c.hasClass("closed")){b.slideDown(200,function(){c.removeClass("closed")})}else{b.slideUp(200,function(){c.addClass("closed")})}});a(".thumbnails-container").sortable({items:".thumbnail",containment:"parent",tolerance:"pointer",stop:function(d,e){var b=[],f=[];a(this).find(".thumbnail").each(function(){b.push(a(this).attr("data-id"))});for(var c=0;c<b.length;c++){f.push(slideCollection.get(b[c]))}slideCollection.reset(f).resetIDs().resetData()}});a(".trash a").on("click",function(b){if(!confirm(rivasliderlite.delete_slideshow)){return false}});a("#doaction, #doaction2").on("click",function(b){var c=b.target.id.replace("do","");if(a("#"+c).val()=="delete"){if(!confirm(rivasliderlite.delete_slideshows)){return false}}});a(".multiple-checkbox .select-all").on("click",function(b){if(a(this).hasClass("checked")){a(this).removeClass("checked").parents("ul").find("input").removeAttr("checked")}else{a(this).addClass("checked").parents("ul").find("input").attr("checked","checked")}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);if(a("#slideshow-images").length==0){return}window.slideCollection=new SlideCollection(JSON.parse(a("#slideshow-images").val()));window.slideView=new SlideView({collection:slideCollection});window.addImageView=new AddImageView({collection:slideCollection})})(jQuery);
js/jquery.easing.js DELETED
@@ -1,205 +0,0 @@
1
- /*
2
- * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
- *
4
- * Uses the built in easing capabilities added In jQuery 1.1
5
- * to offer multiple easing options
6
- *
7
- * TERMS OF USE - jQuery Easing
8
- *
9
- * Open source under the BSD License.
10
- *
11
- * Copyright © 2008 George McGinley Smith
12
- * All rights reserved.
13
- *
14
- * Redistribution and use in source and binary forms, with or without modification,
15
- * are permitted provided that the following conditions are met:
16
- *
17
- * Redistributions of source code must retain the above copyright notice, this list of
18
- * conditions and the following disclaimer.
19
- * Redistributions in binary form must reproduce the above copyright notice, this list
20
- * of conditions and the following disclaimer in the documentation and/or other materials
21
- * provided with the distribution.
22
- *
23
- * Neither the name of the author nor the names of contributors may be used to endorse
24
- * or promote products derived from this software without specific prior written permission.
25
- *
26
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
- * OF THE POSSIBILITY OF SUCH DAMAGE.
35
- *
36
- */
37
-
38
- // t: current time, b: begInnIng value, c: change In value, d: duration
39
- jQuery.easing['jswing'] = jQuery.easing['swing'];
40
-
41
- jQuery.extend( jQuery.easing,
42
- {
43
- def: 'easeOutQuad',
44
- swing: function (x, t, b, c, d) {
45
- //alert(jQuery.easing.default);
46
- return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
- },
48
- easeInQuad: function (x, t, b, c, d) {
49
- return c*(t/=d)*t + b;
50
- },
51
- easeOutQuad: function (x, t, b, c, d) {
52
- return -c *(t/=d)*(t-2) + b;
53
- },
54
- easeInOutQuad: function (x, t, b, c, d) {
55
- if ((t/=d/2) < 1) return c/2*t*t + b;
56
- return -c/2 * ((--t)*(t-2) - 1) + b;
57
- },
58
- easeInCubic: function (x, t, b, c, d) {
59
- return c*(t/=d)*t*t + b;
60
- },
61
- easeOutCubic: function (x, t, b, c, d) {
62
- return c*((t=t/d-1)*t*t + 1) + b;
63
- },
64
- easeInOutCubic: function (x, t, b, c, d) {
65
- if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
- return c/2*((t-=2)*t*t + 2) + b;
67
- },
68
- easeInQuart: function (x, t, b, c, d) {
69
- return c*(t/=d)*t*t*t + b;
70
- },
71
- easeOutQuart: function (x, t, b, c, d) {
72
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
- },
74
- easeInOutQuart: function (x, t, b, c, d) {
75
- if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
- return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
- },
78
- easeInQuint: function (x, t, b, c, d) {
79
- return c*(t/=d)*t*t*t*t + b;
80
- },
81
- easeOutQuint: function (x, t, b, c, d) {
82
- return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
- },
84
- easeInOutQuint: function (x, t, b, c, d) {
85
- if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
- return c/2*((t-=2)*t*t*t*t + 2) + b;
87
- },
88
- easeInSine: function (x, t, b, c, d) {
89
- return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
- },
91
- easeOutSine: function (x, t, b, c, d) {
92
- return c * Math.sin(t/d * (Math.PI/2)) + b;
93
- },
94
- easeInOutSine: function (x, t, b, c, d) {
95
- return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
- },
97
- easeInExpo: function (x, t, b, c, d) {
98
- return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
- },
100
- easeOutExpo: function (x, t, b, c, d) {
101
- return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
- },
103
- easeInOutExpo: function (x, t, b, c, d) {
104
- if (t==0) return b;
105
- if (t==d) return b+c;
106
- if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
- return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
- },
109
- easeInCirc: function (x, t, b, c, d) {
110
- return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
- },
112
- easeOutCirc: function (x, t, b, c, d) {
113
- return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
- },
115
- easeInOutCirc: function (x, t, b, c, d) {
116
- if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
- return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
- },
119
- easeInElastic: function (x, t, b, c, d) {
120
- var s=1.70158;var p=0;var a=c;
121
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
- if (a < Math.abs(c)) { a=c; var s=p/4; }
123
- else var s = p/(2*Math.PI) * Math.asin (c/a);
124
- return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
- },
126
- easeOutElastic: function (x, t, b, c, d) {
127
- var s=1.70158;var p=0;var a=c;
128
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
- if (a < Math.abs(c)) { a=c; var s=p/4; }
130
- else var s = p/(2*Math.PI) * Math.asin (c/a);
131
- return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
- },
133
- easeInOutElastic: function (x, t, b, c, d) {
134
- var s=1.70158;var p=0;var a=c;
135
- if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
- if (a < Math.abs(c)) { a=c; var s=p/4; }
137
- else var s = p/(2*Math.PI) * Math.asin (c/a);
138
- if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
- return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
- },
141
- easeInBack: function (x, t, b, c, d, s) {
142
- if (s == undefined) s = 1.70158;
143
- return c*(t/=d)*t*((s+1)*t - s) + b;
144
- },
145
- easeOutBack: function (x, t, b, c, d, s) {
146
- if (s == undefined) s = 1.70158;
147
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
- },
149
- easeInOutBack: function (x, t, b, c, d, s) {
150
- if (s == undefined) s = 1.70158;
151
- if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
- return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
- },
154
- easeInBounce: function (x, t, b, c, d) {
155
- return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
- },
157
- easeOutBounce: function (x, t, b, c, d) {
158
- if ((t/=d) < (1/2.75)) {
159
- return c*(7.5625*t*t) + b;
160
- } else if (t < (2/2.75)) {
161
- return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
- } else if (t < (2.5/2.75)) {
163
- return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
- } else {
165
- return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
- }
167
- },
168
- easeInOutBounce: function (x, t, b, c, d) {
169
- if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
- return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
- }
172
- });
173
-
174
- /*
175
- *
176
- * TERMS OF USE - EASING EQUATIONS
177
- *
178
- * Open source under the BSD License.
179
- *
180
- * Copyright © 2001 Robert Penner
181
- * All rights reserved.
182
- *
183
- * Redistribution and use in source and binary forms, with or without modification,
184
- * are permitted provided that the following conditions are met:
185
- *
186
- * Redistributions of source code must retain the above copyright notice, this list of
187
- * conditions and the following disclaimer.
188
- * Redistributions in binary form must reproduce the above copyright notice, this list
189
- * of conditions and the following disclaimer in the documentation and/or other materials
190
- * provided with the distribution.
191
- *
192
- * Neither the name of the author nor the names of contributors may be used to endorse
193
- * or promote products derived from this software without specific prior written permission.
194
- *
195
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
- * OF THE POSSIBILITY OF SUCH DAMAGE.
204
- *
205
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.js DELETED
@@ -1,154 +0,0 @@
1
- /*!
2
- * jQuery JavaScript Library v1.4.2
3
- * http://jquery.com/
4
- *
5
- * Copyright 2010, John Resig
6
- * Dual licensed under the MIT or GPL Version 2 licenses.
7
- * http://jquery.org/license
8
- *
9
- * Includes Sizzle.js
10
- * http://sizzlejs.com/
11
- * Copyright 2010, The Dojo Foundation
12
- * Released under the MIT, BSD, and GPL Licenses.
13
- *
14
- * Date: Sat Feb 13 22:33:48 2010 -0500
15
- */
16
- (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
17
- e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
18
- j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
19
- "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
20
- true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
21
- Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
22
- (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
23
- a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
24
- "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
25
- function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
26
- c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
27
- L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
28
- "isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
29
- a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
30
- d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
31
- a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
32
- !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
33
- true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
34
- var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
35
- parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
36
- false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
37
- s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
38
- applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
39
- else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
40
- a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
41
- w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
42
- cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
43
- i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
44
- " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
45
- this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
46
- e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
47
- c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
48
- a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
49
- function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
50
- k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
51
- C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
52
- null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
53
- e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
54
- f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
55
- if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
56
- fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
57
- d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
58
- "events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
59
- a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
60
- isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
61
- {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
62
- if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
63
- e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
64
- "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
65
- d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
66
- !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
67
- toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
68
- u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
69
- function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
70
- if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
71
- e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
72
- t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
73
- g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
74
- for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
75
- 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
76
- CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
77
- relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
78
- l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
79
- h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
80
- CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
81
- g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
82
- text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
83
- setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
84
- h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
85
- m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
86
- "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
87
- h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
88
- !h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
89
- h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
90
- q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
91
- if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
92
- (function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
93
- function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
94
- gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
95
- c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
96
- {},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
97
- "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
98
- d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
99
- a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
100
- 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
101
- a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
102
- c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
103
- wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
104
- prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
105
- this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
106
- return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
107
- ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
108
- this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
109
- u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
110
- 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
111
- return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
112
- ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
113
- c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
114
- c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
115
- function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
116
- Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
117
- "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
118
- a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
119
- a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
120
- "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
121
- serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
122
- function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
123
- global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
124
- e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
125
- "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
126
- false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
127
- false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
128
- c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
129
- d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
130
- g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
131
- 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
132
- "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
133
- if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
134
- this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
135
- "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
136
- animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
137
- j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
138
- this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
139
- "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
140
- c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
141
- this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
142
- this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
143
- e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
144
- c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
145
- function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
146
- this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
147
- k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
148
- f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
149
- a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
150
- c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
151
- d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
152
- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
153
- "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
154
- e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/script.js DELETED
@@ -1,333 +0,0 @@
1
- // JavaScript Document
2
- /*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
3
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
4
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
5
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
6
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
7
- *
8
- * Version: 3.0.2
9
- *
10
- * Requires: 1.2.2+
11
- */
12
-
13
- (function($) {
14
-
15
- var types = ['DOMMouseScroll', 'mousewheel'];
16
-
17
- $.event.special.mousewheel = {
18
- setup: function() {
19
- if ( this.addEventListener )
20
- for ( var i=types.length; i; )
21
- this.addEventListener( types[--i], handler, false );
22
- else
23
- this.onmousewheel = handler;
24
- },
25
-
26
- teardown: function() {
27
- if ( this.removeEventListener )
28
- for ( var i=types.length; i; )
29
- this.removeEventListener( types[--i], handler, false );
30
- else
31
- this.onmousewheel = null;
32
- }
33
- };
34
-
35
- $.fn.extend({
36
- mousewheel: function(fn) {
37
- return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
38
- },
39
-
40
- unmousewheel: function(fn) {
41
- return this.unbind("mousewheel", fn);
42
- }
43
- });
44
-
45
-
46
- function handler(event) {
47
- var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;
48
-
49
- event = $.event.fix(event || window.event);
50
- event.type = "mousewheel";
51
-
52
- if ( event.wheelDelta ) delta = event.wheelDelta/120;
53
- if ( event.detail ) delta = -event.detail/3;
54
-
55
- // Add events and delta to the front of the arguments
56
- args.unshift(event, delta);
57
-
58
- return $.event.handle.apply(this, args);
59
- }
60
-
61
- })(jQuery);
62
-
63
- /**
64
- * @version $Id: $Revision
65
- * @package jquery
66
- * @subpackage lofslidernews
67
- * @copyright Copyright (C) JAN 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>. All rights reserved.
68
- * @website http://landofcoder.com
69
- * @license This plugin is dual-licensed under the GNU General Public License and the MIT License
70
- */
71
- // JavaScript Document
72
- (function($) {
73
- $.fn.lofJSidernews = function( settings ) {
74
- return this.each(function() {
75
- // get instance of the lofSiderNew.
76
- new $.lofSidernews( this, settings );
77
- });
78
- }
79
- $.lofSidernews = function( obj, settings ){
80
- this.settings = {
81
- direction : '',
82
- mainItemSelector : 'li',
83
- navInnerSelector : 'ul',
84
- navSelector : 'li' ,
85
- navigatorEvent : 'click',
86
- wapperSelector: '.lof-main-wapper',
87
- interval : 4000,
88
- auto : true, // whether to automatic play the slideshow
89
- maxItemDisplay : 3,
90
- startItem : 0,
91
- navPosition : 'vertical',
92
- navigatorHeight : 100,
93
- navigatorWidth : 310,
94
- duration : 600,
95
- navItemsSelector : '.lof-navigator li',
96
- navOuterSelector : '.lof-navigator-outer' ,
97
- isPreloaded : true,
98
- easing : 'easeInOutQuad'
99
- }
100
- $.extend( this.settings, settings ||{} );
101
- this.nextNo = null;
102
- this.previousNo = null;
103
- this.maxWidth = this.settings.mainWidth || 600;
104
- this.wrapper = $( obj ).find( this.settings.wapperSelector );
105
- this.slides = this.wrapper.find( this.settings.mainItemSelector );
106
- if( !this.wrapper.length || !this.slides.length ) return ;
107
- // set width of wapper
108
- if( this.settings.maxItemDisplay > this.slides.length ){
109
- this.settings.maxItemDisplay = this.slides.length;
110
- }
111
- this.currentNo = isNaN(this.settings.startItem)||this.settings.startItem > this.slides.length?0:this.settings.startItem;
112
- this.navigatorOuter = $( obj ).find( this.settings.navOuterSelector );
113
- this.navigatorItems = $( obj ).find( this.settings.navItemsSelector ) ;
114
- this.navigatorInner = this.navigatorOuter.find( this.settings.navInnerSelector );
115
-
116
- if( this.settings.navPosition == 'horizontal' ){
117
- this.navigatorInner.width( this.slides.length * this.settings.navigatorWidth );
118
- this.navigatorOuter.width( this.settings.maxItemDisplay * this.settings.navigatorWidth );
119
- this.navigatorOuter.height( this.settings.navigatorHeight );
120
-
121
- } else {
122
- this.navigatorInner.height( this.slides.length * this.settings.navigatorHeight );
123
-
124
- this.navigatorOuter.height( this.settings.maxItemDisplay * this.settings.navigatorHeight );
125
- this.navigatorOuter.width( this.settings.navigatorWidth );
126
- }
127
- this.navigratorStep = this.__getPositionMode( this.settings.navPosition );
128
- this.directionMode = this.__getDirectionMode();
129
-
130
-
131
- if( this.settings.direction == 'opacity') {
132
- var text = '.lof-main-item-desc';
133
- this.wrapper.addClass( 'lof-opacity' );
134
- $(this.slides).css({'opacity':0, 'display':'none'}).eq(this.currentNo).css({'opacity':1, 'display':'block'});
135
- $(this.wrapper).find(text).slideUp().eq(this.currentNo).slideDown();
136
- } else {
137
- var text = '.lof-main-item-desc';
138
- this.wrapper.css({'left':'-'+this.currentNo*this.maxSize+'px', 'width':( this.maxWidth ) * this.slides.length } );
139
- $(this.wrapper).find(text).show();
140
- }
141
-
142
-
143
- if( this.settings.isPreloaded ) {
144
- this.preLoadImage( this.onComplete );
145
- } else {
146
- this.onComplete();
147
- }
148
-
149
- }
150
- $.lofSidernews.fn = $.lofSidernews.prototype;
151
- $.lofSidernews.fn.extend = $.lofSidernews.extend = $.extend;
152
-
153
- $.lofSidernews.fn.extend({
154
-
155
- startUp:function( obj, wrapper ) {
156
-
157
- this.navigatorItems.each( function(index, item ){
158
- $(item).click( function(){
159
- obj.jumping( index, true );
160
- obj.setNavActive( index, item );
161
- } );
162
- $(item).css( {'height': obj.settings.navigatorHeight, 'width': obj.settings.navigatorWidth} );
163
- })
164
- this.navigatorItems.find('img').hover(function(){ $(this).stop().animate({'opacity':0.7},500,'easeInOutQuad') },
165
- function(){ $(this).animate({'opacity':1},500,'easeInOutSine') } );
166
- this.registerWheelHandler( this.navigatorOuter, this );
167
- this.setNavActive(this.currentNo );
168
-
169
- if( this.settings.buttons && typeof (this.settings.buttons) == "object" ){
170
- this.registerButtonsControl( 'click', this.settings.buttons, this );
171
-
172
- }
173
- if( this.settings.auto )
174
- this.play( this.settings.interval,'next', true );
175
-
176
- return this;
177
- },
178
- onComplete:function(){
179
-
180
- setTimeout( function(){ $('.preload').fadeOut( 900 ); }, 400 ); this.startUp( this );
181
- },
182
- preLoadImage:function( callback ){
183
- var self = this;
184
- var images = this.wrapper.find('img');
185
- var count = 0;
186
- images.one('load', function() {
187
- count++;
188
- if(count == images.length) {
189
- self.onComplete();
190
- }
191
- }).each(function(){
192
- if(this.complete || (jQuery.browser.msie && parseInt(jQuery.browser.version) >= 6))
193
- $(this).trigger('load');
194
- });
195
- },
196
- navivationAnimate:function( currentIndex ) {
197
- if (currentIndex <= this.settings.startItem
198
- || currentIndex - this.settings.startItem >= this.settings.maxItemDisplay-1) {
199
- this.settings.startItem = currentIndex - this.settings.maxItemDisplay+2;
200
- if (this.settings.startItem < 0) this.settings.startItem = 0;
201
- if (this.settings.startItem >this.slides.length-this.settings.maxItemDisplay) {
202
- this.settings.startItem = this.slides.length-this.settings.maxItemDisplay;
203
- }
204
- }
205
- this.navigatorInner.stop().animate( eval('({'+this.navigratorStep[0]+':-'+this.settings.startItem*this.navigratorStep[1]+'})'),
206
- {duration:500, easing:'easeInOutQuad'} );
207
- },
208
- setNavActive:function( index, item ){
209
- if( (this.navigatorItems) ){
210
- this.navigatorItems.removeClass( 'active' );
211
- $(this.navigatorItems.get(index)).addClass( 'active' );
212
- this.navivationAnimate( this.currentNo );
213
- }
214
- },
215
- __getPositionMode:function( position ){
216
- if( position == 'horizontal' ){
217
- return ['left', this.settings.navigatorWidth];
218
- }
219
- return ['top', this.settings.navigatorHeight];
220
- },
221
- __getDirectionMode:function(){
222
- switch( this.settings.direction ){
223
- case 'opacity': this.maxSize=0; return ['opacity','opacity'];
224
- default: this.maxSize=this.maxWidth; return ['left','width'];
225
- }
226
- },
227
- registerWheelHandler:function( element, obj ){
228
- element.bind('mousewheel', function(event, delta ) {
229
- var dir = delta > 0 ? 'Up' : 'Down',
230
- vel = Math.abs(delta);
231
- if( delta > 0 ){
232
- obj.previous( true );
233
- } else {
234
- obj.next( true );
235
- }
236
- return false;
237
- });
238
- },
239
- registerButtonsControl:function( eventHandler, objects, self ){
240
- for( var action in objects ){
241
- switch (action.toString() ){
242
- case 'next':
243
- objects[action].click( function() { self.next( true) } );
244
- break;
245
- case 'previous':
246
- objects[action].click( function() { self.previous( true) } );
247
- break;
248
- }
249
- }
250
- return this;
251
- },
252
- onProcessing:function( manual, start, end ){
253
- this.previousNo = this.currentNo + (this.currentNo>0 ? -1 : this.slides.length-1);
254
- this.nextNo = this.currentNo + (this.currentNo < this.slides.length-1 ? 1 : 1- this.slides.length);
255
- return this;
256
- },
257
- finishFx:function( manual ){
258
- if( manual ) this.stop();
259
- if( manual && this.settings.auto ){
260
- this.play( this.settings.interval,'next', true );
261
- }
262
- this.setNavActive( this.currentNo );
263
- },
264
- getObjectDirection:function( start, end ){
265
- return eval("({'"+this.directionMode[0]+"':-"+(this.currentNo*start)+"})");
266
- },
267
- fxStart:function( index, obj, currentObj ){
268
- if( this.settings.direction == 'opacity' ) {
269
- var text = '.lof-main-item-desc';
270
- $(text).slideUp(200);
271
- $(this.slides).stop().animate({opacity:0}, {
272
- duration: this.settings.duration,
273
- easing:this.settings.easing,
274
- complete:function(){
275
- $(this).css({'display':'none'});
276
- }
277
- });
278
- $(this.slides).eq(index).stop().animate( {opacity:1}, {
279
- duration: this.settings.duration,
280
- easing:this.settings.easing,
281
- step:function(){
282
- $(this).css({'display':'block'})
283
- },
284
- complete:function(){
285
- $(this).find(text).slideDown(200);
286
- }
287
- });
288
- }else {
289
- var text = '.lof-main-item-desc';
290
- $(this.wrapper).find(text).slideUp(200);
291
- this.wrapper.stop().animate( obj, {
292
- duration: this.settings.duration,
293
- easing:this.settings.easing,
294
- complete:function() {
295
- $(this).find(text).slideDown(200); } });
296
- }
297
- return this;
298
- },
299
- jumping:function( no, manual ){
300
- this.stop();
301
- if( this.currentNo == no ) return;
302
- var obj = eval("({'"+this.directionMode[0]+"':-"+(this.maxSize*no)+"})");
303
- this.onProcessing( null, manual, 0, this.maxSize )
304
- .fxStart( no, obj, this )
305
- .finishFx( manual );
306
- this.currentNo = no;
307
- },
308
- next:function( manual , item){
309
-
310
- this.currentNo += (this.currentNo < this.slides.length-1) ? 1 : (1 - this.slides.length);
311
- this.onProcessing( item, manual, 0, this.maxSize )
312
- .fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
313
- .finishFx( manual );
314
- },
315
- previous:function( manual, item ){
316
- this.currentNo += this.currentNo > 0 ? -1 : this.slides.length - 1;
317
- this.onProcessing( item, manual )
318
- .fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
319
- .finishFx( manual );
320
- },
321
- play:function( delay, direction, wait ){
322
- this.stop();
323
- if(!wait){ this[direction](false); }
324
- var self = this;
325
- this.isRun = setTimeout(function() { self[direction](true); }, delay);
326
- },
327
- stop:function(){
328
- if (this.isRun == null) return;
329
- clearTimeout(this.isRun);
330
- this.isRun = null;
331
- }
332
- })
333
- })(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/slideshow.js ADDED
@@ -0,0 +1,618 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function($) {
2
+
3
+ /** Main plugin object */
4
+ $.RivaSliderLite = function(el) {
5
+
6
+ /** Core variables */
7
+ var base = this,
8
+ o;
9
+
10
+ /** Cache the slideshow elements */
11
+ base.el = el;
12
+ base.$el = $(base.el);
13
+ base.$viewport = base.$el.find('.rivasliderlite-viewport');
14
+ base.$container = base.$viewport.find('.rivasliderlite-slides-container');
15
+ base.$slides = base.$container.find('.rivasliderlite-slide');
16
+ base.$images = base.$slides.find('.rivasliderlite-image');
17
+
18
+ /** Get the plugin options */
19
+ base.options = o = $.extend({}, $.RivaSliderLite.defaults, JSON.parse(base.$el.attr('data-options')));
20
+
21
+ /** State variables */
22
+ base.current = 0;
23
+ base.previous = 0;
24
+ base.count = base.$slides.length;
25
+ base.width = o.dimensions.width;
26
+ base.height = o.dimensions.height;
27
+
28
+ /** Store our data for external use */
29
+ base.$el.data('rivasliderlite', base);
30
+
31
+ /**
32
+ * Constructor
33
+ *
34
+ * @author Matthew Ruddy
35
+ * @since 2.0
36
+ */
37
+ base.initialize = function() {
38
+
39
+ /** Remove inline CSS display property from container */
40
+ base.$container.css({ 'display': '' });
41
+
42
+ /** Detect CSS3 support */
43
+ base.useCSS3 = ( o.general.enableCSS3 ) ? base._supportsCSS3() : false;
44
+ if ( base.useCSS3 )
45
+ base.$el.addClass('use-css3');
46
+
47
+ /** Setup responsive functionality */
48
+ if ( o.dimensions.responsive )
49
+ base._setupResponsive();
50
+
51
+ /** Detect touch support and set device click/touch event */
52
+ base.supportsTouch = ( 'ontouchstart' in document.documentElement && o.general.enableTouch ) ? true : false;
53
+ base.clickEvent = ( base.supportsTouch ) ? 'touchstart.rivasliderlite' : 'click.rivasliderlite';
54
+
55
+ /** Setup navigation elements */
56
+ if ( o.navigation.arrows )
57
+ base._setupArrows();
58
+ if ( o.navigation.pagination )
59
+ base._setupPagination();
60
+
61
+ /** Flag current slide (and queue for slide change) */
62
+ base.$slides.eq(base.current).addClass('active');
63
+ base.$el.on('beforetransition', function() {
64
+ base.$slides.removeClass('active').eq(base.current).addClass('active');
65
+ });
66
+
67
+ /** Queue playback (if enabled) */
68
+ if ( o.playback.enabled )
69
+ base.$el.one('load', base.startPlayback);
70
+
71
+ /** Preload slideshow */
72
+ base._preload();
73
+
74
+ /** Allow custom hooks */
75
+ base.$el.trigger('initialize', base);
76
+
77
+ };
78
+
79
+ /**
80
+ * Detects browser CSS3 support
81
+ *
82
+ * @author Matthew Ruddy
83
+ * @since 2.0
84
+ */
85
+ base._supportsCSS3 = function() {
86
+
87
+ var element = document.createElement('div'),
88
+ props = [ 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective' ];
89
+ for ( var i in props ) {
90
+ if ( typeof element.style[ props[ i ] ] !== 'undefined' ) {
91
+ base.vendorPrefix = props[i].replace('Perspective', '').toLowerCase();
92
+ return true;
93
+ }
94
+ }
95
+ return false;
96
+
97
+ };
98
+
99
+ /**
100
+ * Setup responsive functionality
101
+ *
102
+ * @author Matthew Ruddy
103
+ * @since 2.0
104
+ */
105
+ base._setupResponsive = function() {
106
+
107
+ /** Responsive indicator class */
108
+ base.$el.addClass('is-responsive');
109
+
110
+ /** Resize slideshow on window resize */
111
+ $(window).on('resize.rivasliderlite', function(event) {
112
+
113
+ /** Queue custom resize end event */
114
+ clearTimeout(base.resizeEnd);
115
+ base.resizeEnd = setTimeout(function() {
116
+ $(window).trigger('resizeend');
117
+ delete base.resizeEnd;
118
+ }, 50);
119
+
120
+ /** Get the new slideshow width and height */
121
+ var width = base.$viewport.outerWidth(),
122
+ height = base.$viewport.outerHeight();
123
+
124
+ /** Bail if slideshow width hasn't changed */
125
+ if ( width === base.width )
126
+ return;
127
+
128
+ /** Save new dimensions */
129
+ base.width = width;
130
+ base.height = height;
131
+
132
+ /** Prevent transitions from triggering & reset container positioning */
133
+ if ( base.useCSS3 && o.transitions.effect == 'slide' ) {
134
+
135
+ /** Apply our CSS changes */
136
+ var properties = {};
137
+ properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = '0ms';
138
+ properties[ '-'+ base.vendorPrefix +'-transform' ] = 'translate3d(-'+ ( base.current * base.width ) +'px, 0, 0)';
139
+ base.$container.css(properties);
140
+
141
+ /** Queue transition duration reset */
142
+ $(window).one('resizeend', function() {
143
+ properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = o.transitions.duration +'ms';
144
+ base.$container.css(properties);
145
+ });
146
+
147
+ }
148
+
149
+ /** Resize the slides */
150
+ base.$slides.css({ 'width': width +'px', 'height': height +'px' });
151
+
152
+ });
153
+
154
+ /** Trigger a resize now */
155
+ $(window).trigger('resize.rivasliderlite');
156
+
157
+ };
158
+
159
+ /**
160
+ * Sets up the arrow navigation
161
+ *
162
+ * @author Matthew Ruddy
163
+ * @since 2.0
164
+ */
165
+ base._setupArrows = function() {
166
+
167
+ /** Get and display the navigation */
168
+ var $next = $('.rivasliderlite-next'),
169
+ $prev = $('.rivasliderlite-prev'),
170
+ $arrows = $().add($next).add($prev);
171
+
172
+ /** Bind click events */
173
+ $next.on(base.clickEvent, function(event) {
174
+ base.nextSlide();
175
+ return false;
176
+ });
177
+ $prev.on(base.clickEvent, function(event) {
178
+ base.prevSlide();
179
+ return false;
180
+ });
181
+
182
+ /** Visibility & hover styling */
183
+ if ( o.navigation.arrows_hover )
184
+ $arrows.addClass('has-hover');
185
+ else {
186
+ base.$el.one('load', function() {
187
+ $arrows.css({ 'opacity': 1 });
188
+ });
189
+ }
190
+
191
+ /** Trigger custom actions */
192
+ base.$el.trigger('setuparrows', base);
193
+
194
+ };
195
+
196
+ /**
197
+ * Sets up the pagination navigation
198
+ *
199
+ * @author Matthew Ruddy
200
+ * @since 2.0
201
+ */
202
+ base._setupPagination = function() {
203
+
204
+ /** Get & display the navigation */
205
+ var $pagination = $('.rivasliderlite-pagination'),
206
+ $icons = $pagination.children('div');
207
+
208
+ /** Bind click events */
209
+ $icons.on(base.clickEvent, function(event) {
210
+ base.goToSlide($(this).index());
211
+ return false;
212
+ });
213
+
214
+ /** Set current icon now & on slide change */
215
+ $icons.eq(base.current).addClass('active');
216
+ base.$el.on('beforetransition', function() {
217
+ $icons.removeClass('active').eq(base.current).addClass('active');
218
+ });
219
+
220
+ /** Visibility & hover styling */
221
+ if ( o.navigation.pagination_hover )
222
+ $pagination.addClass('has-hover');
223
+ else {
224
+ base.$el.one('load', function() {
225
+ $pagination.css({ 'opacity': 1 });
226
+ });
227
+ }
228
+
229
+ /** Trigger custom actions */
230
+ base.$el.trigger('setuppagination', base);
231
+
232
+ };
233
+
234
+ /**
235
+ * Preloads the slideshows images
236
+ *
237
+ * @author Matthew Ruddy
238
+ * @since 2.0
239
+ */
240
+ base._preload = function() {
241
+
242
+ /** Loop through and preload each slide image */
243
+ var index = 0;
244
+ base.$images.each(function() {
245
+
246
+ var $self = $(this),
247
+ src = $self.attr('src');
248
+
249
+ /** Preload this image and trigger action on last image */
250
+ $.get(src, function() {
251
+ index++;
252
+ if ( base.count == index ) {
253
+ base.$el.find('.rivasliderlite-preload').animate({ 'opacity': 0 }, { duration: 200, complete: function() {
254
+ $(this).remove();
255
+ base.$el.trigger('load');
256
+ }});
257
+ }
258
+ });
259
+
260
+ });
261
+
262
+ return 'test';
263
+
264
+ };
265
+
266
+ /**
267
+ * Transitions the slideshow
268
+ *
269
+ * @author Matthew Ruddy
270
+ * @since 2.0
271
+ */
272
+ base._transition = function() {
273
+
274
+ /** Trigger before transition actions */
275
+ base._beforeTransition();
276
+
277
+ /** Queue after transition actions (takes place after all transitions occur, not just one) */
278
+ clearTimeout(base.afterTransition);
279
+ base.afterTransition = setTimeout(function() {
280
+
281
+ /** Run functon */
282
+ base._afterTransition();
283
+
284
+ /** Delete timeout variable */
285
+ delete base.afterTransition;
286
+
287
+ }, o.transitions.duration);
288
+
289
+ /** Do appropriate transition */
290
+ if ( o.transitions.effect == 'slide' ) {
291
+
292
+ /** Do CSS3 transition if supported */
293
+ if ( base.useCSS3 ) {
294
+
295
+ /** Get the properties to transition */
296
+ var properties = {};
297
+ properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = o.transitions.duration;
298
+ properties[ '-'+ base.vendorPrefix +'-transform' ] = 'translate3d(-'+ ( base.width * base.current ) +'px, 0, 0)';
299
+
300
+ /** Do the CSS3 transition */
301
+ base.$container.css(properties);
302
+
303
+ }
304
+ else {
305
+ /** Otherwise fallback to jQuery/Zepto animate */
306
+ base.$container.animate({ 'left': '-'+ ( base.width * base.current )}, o.transitions.duration);
307
+ }
308
+
309
+ }
310
+ else if ( o.transitions.effect == 'fade' ) {
311
+
312
+ /** Prevent from triggering fade transition on the currently visible slide */
313
+ if ( base.current === base.previous )
314
+ return;
315
+
316
+ /** Z-index order increment */
317
+ base.order = ( base.order ) ? base.order+1 : 1;
318
+
319
+ /** Do some CSS resetting after all fade transitions have occurred */
320
+ base.$el.off('aftertransition._transition').one('aftertransition._transition', function() {
321
+
322
+ /** Resets CSS for each slide after fade transition has ended */
323
+ base.$slides.each(function(index) {
324
+ var restore = ( index === base.current ) ? { 'z-index': '' } : { 'opacity': 0, 'display': 'none', 'z-index': '' };
325
+ $(this).css(restore);
326
+ });
327
+
328
+ /** Delete variables */
329
+ delete base.order;
330
+ delete base.animationClear;
331
+
332
+ });
333
+
334
+ /** Only do jQuery/Zepto animate for this transition. CSS3 opacity effects mke no performance difference */
335
+ base.$slides.eq(base.current).css({ 'opacity': '0', 'display': 'block', 'z-index': base.order }).animate({ 'opacity': '1' }, o.transitions.duration);
336
+
337
+ }
338
+ else {
339
+ /** Allow for custom transitions */
340
+ base.$el.trigger('transition', base, o.transitions.effect );
341
+ }
342
+
343
+ };
344
+
345
+ /**
346
+ * Executed before slide transition
347
+ *
348
+ * @author Matthew Ruddy
349
+ * @since 2.0
350
+ */
351
+ base._beforeTransition = function() {
352
+
353
+ /** Clear playback timer */
354
+ if ( o.playback.enabled )
355
+ clearTimeout(base.playbackTimer);
356
+
357
+ /** Trigger actions */
358
+ base.$el.trigger('beforetransition', base);
359
+
360
+ };
361
+
362
+ /**
363
+ * Executed after slide transition
364
+ *
365
+ * @author Matthew Ruddy
366
+ * @since 2.0
367
+ */
368
+ base._afterTransition = function() {
369
+
370
+ /** Restart playback (if enabled) */
371
+ if ( o.playback.enabled )
372
+ base.startPlayback({ silent: true });
373
+
374
+ /** Trigger actions */
375
+ base.$el.trigger('aftertransition', base);
376
+
377
+ };
378
+
379
+ /**
380
+ * Starts slideshow automatic playback
381
+ *
382
+ * @author Matthew Ruddy
383
+ * @since 2.0
384
+ */
385
+ base.startPlayback = function(options) {
386
+
387
+ /** Extend options */
388
+ options = $.extend({}, { silent: false }, options);
389
+
390
+ /** Alter slideshow playback setting */
391
+ if ( !o.playback.enabled )
392
+ o.playback.enabled = true;
393
+
394
+ /** Runtime variable */
395
+ base.runtime = new Date();
396
+
397
+ /** Get pause time */
398
+ base.pauseTime = o.playback.pause;
399
+
400
+ /** Start automatic playback */
401
+ base.playbackTimer = setTimeout(function() {
402
+ base.nextSlide();
403
+ }, base.pauseTime);
404
+
405
+ /** Trigger actions */
406
+ if ( !options.silent )
407
+ base.$el.trigger('startplayback', base);
408
+
409
+ };
410
+
411
+ /**
412
+ * Ends slideshow automatic playback
413
+ *
414
+ * @author Matthew Ruddy
415
+ * @since 2.0
416
+ */
417
+ base.endPlayback = function(options) {
418
+
419
+ /** Extend options */
420
+ options = $.extend({}, { silent: false }, options);
421
+
422
+ /** Alter slideshow playback setting */
423
+ if ( o.playback.enabled )
424
+ o.playback.enabled = false;
425
+
426
+ /** Clear playback timer */
427
+ clearTimeout(base.playbackTimer);
428
+
429
+ /** Trigger actions */
430
+ if ( !options.silent )
431
+ base.$el.trigger('endplayback', base);
432
+
433
+ };
434
+
435
+ /**
436
+ * Pauses slideshow automatic playback
437
+ *
438
+ * @author Matthew Ruddy
439
+ * @since 2.0
440
+ */
441
+ base.pausePlayback = function(options) {
442
+
443
+ /** Extend options */
444
+ options = $.extend({}, { silent: false }, options);
445
+
446
+ /** Clear playback timer */
447
+ clearTimeout(base.playbackTimer);
448
+
449
+ /** Calculate runtime left */
450
+ base.runtime = Math.ceil( new Date() - base.runtime );
451
+
452
+ /** Trigger actions */
453
+ if ( !options.silent )
454
+ base.$el.trigger('pauseplayback', base);
455
+
456
+ };
457
+
458
+ /**
459
+ * Resumes slideshow automatic playback
460
+ *
461
+ * @author Matthew Ruddy
462
+ * @since 2.0
463
+ */
464
+ base.resumePlayback = function(options) {
465
+
466
+ /** Extend options */
467
+ options = $.extend({}, { silent: false }, options);
468
+
469
+ /** Calculate playback time remaining */
470
+ base.pauseTime = Math.ceil( base.pauseTime - base.runtime );
471
+
472
+ /** Reset runtime */
473
+ base.runtime = new Date();
474
+
475
+ /** Resume automatic playback */
476
+ base.playbackTimer = setTimeout(function() {
477
+ base.nextSlide();
478
+ }, base.pauseTime);
479
+
480
+ /** Trigger actions */
481
+ if ( !options.silent )
482
+ base.$el.trigger('resumeplayback', base);
483
+
484
+ };
485
+
486
+ /**
487
+ * Transitions to the next slide
488
+ *
489
+ * @author Matthew Ruddy
490
+ * @since 2.0
491
+ */
492
+ base.nextSlide = function(options) {
493
+
494
+ /** Extend options */
495
+ options = $.extend({}, { silent: false }, options);
496
+
497
+ /** Get the next slide and transition the slideshow */
498
+ base.previous = base.current;
499
+ base.current = ( base.current == ( base.count-1 ) ) ? 0 : ( base.current+1 );
500
+ base._transition( base.current, base.previous );
501
+
502
+ /** Trigger actions */
503
+ if ( !options.silent )
504
+ base.$el.trigger('nextslide', base);
505
+
506
+ };
507
+
508
+ /**
509
+ * Transitions to the previous slide
510
+ *
511
+ * @author Matthew Ruddy
512
+ * @since 2.0
513
+ */
514
+ base.prevSlide = function(options) {
515
+
516
+ /** Extend options */
517
+ options = $.extend({}, { silent: false }, options);
518
+
519
+ /** Get the previous slide and transition the slideshow */
520
+ base.previous = base.current;
521
+ base.current = ( base.current == 0 ) ? ( base.count-1 ) : ( base.current-1 );
522
+ base._transition( base.current, base.previous );
523
+
524
+ /** Trigger actions */
525
+ if ( !options.silent )
526
+ base.$el.trigger('prevslide', base);
527
+
528
+ };
529
+
530
+ /**
531
+ * Transitions to a specified slide
532
+ *
533
+ * @author Matthew Ruddy
534
+ * @since 2.0
535
+ */
536
+ base.goToSlide = function(eq, options) {
537
+
538
+ /** Extend options */
539
+ options = $.extend({}, { silent: false }, options);
540
+
541
+ /** Bail if specified slide doesn't exist */
542
+ if ( base.$slides.eq(eq).length == 0 )
543
+ return;
544
+
545
+ /** Transition to the slide */
546
+ base.previous = base.current;
547
+ base.current = eq;
548
+ base._transition( base.current, base.previous, true );
549
+
550
+ /** Trigger actions */
551
+ if ( !options.silent )
552
+ base.$el.trigger('gotoslide', base, eq);
553
+
554
+ };
555
+
556
+ /** Quick a dirty hack for allowing users to override plugin methods with their own */
557
+ base = $.extend({}, base, $.RivaSliderLite.extensions);
558
+
559
+ /** Initialize the plugin */
560
+ base.initialize();
561
+
562
+ };
563
+
564
+ /**
565
+ * Plugin defaults settings
566
+ *
567
+ * @author Matthew Ruddy
568
+ * @since 2.0
569
+ */
570
+ $.RivaSliderLite.defaults = {
571
+ general: {
572
+ enableCSS3: true,
573
+ },
574
+ navigation: {
575
+ arrows: true,
576
+ arrows_hover: true,
577
+ arrows_position: 'inside',
578
+ pagination: true,
579
+ pagination_hover: true,
580
+ pagination_position: 'inside',
581
+ pagination_location: 'bottom-left',
582
+ },
583
+ dimensions: {
584
+ width: 500,
585
+ height: 200,
586
+ responsive: true,
587
+ },
588
+ transitions: {
589
+ effect: 'slide',
590
+ duration: 500,
591
+ },
592
+ playback: {
593
+ enabled: false,
594
+ pause: 1000
595
+ }
596
+ };
597
+
598
+ /**
599
+ * Plugin method extensions
600
+ *
601
+ * @author Matthew Ruddy
602
+ * @since 2.0
603
+ */
604
+ $.RivaSliderLite.extensions = {};
605
+
606
+ /** Initiates the plugin on each element */
607
+ $.fn.RivaSliderLite = function() {
608
+ return this.each(function() {
609
+ new $.RivaSliderLite(this);
610
+ });
611
+ };
612
+
613
+ /** Let's go! */
614
+ $(document).ready(function() {
615
+ $('.rivasliderlite').RivaSliderLite();
616
+ });
617
+
618
+ })(jQuery);
js/slideshow.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ (function(a){a.RivaSliderLite=function(b){var c=this,d;c.el=b;c.$el=a(c.el);c.$viewport=c.$el.find(".rivasliderlite-viewport");c.$container=c.$viewport.find(".rivasliderlite-slides-container");c.$slides=c.$container.find(".rivasliderlite-slide");c.$images=c.$slides.find(".rivasliderlite-image");c.options=d=a.extend({},a.RivaSliderLite.defaults,JSON.parse(c.$el.attr("data-options")));c.current=0;c.previous=0;c.count=c.$slides.length;c.width=d.dimensions.width;c.height=d.dimensions.height;c.$el.data("rivasliderlite",c);c.initialize=function(){c.$container.css({display:""});c.useCSS3=(d.general.enableCSS3)?c._supportsCSS3():false;if(c.useCSS3){c.$el.addClass("use-css3")}if(d.dimensions.responsive){c._setupResponsive()}c.supportsTouch=("ontouchstart" in document.documentElement&&d.general.enableTouch)?true:false;c.clickEvent=(c.supportsTouch)?"touchstart.rivasliderlite":"click.rivasliderlite";if(d.navigation.arrows){c._setupArrows()}if(d.navigation.pagination){c._setupPagination()}c.$slides.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){c.$slides.removeClass("active").eq(c.current).addClass("active")});if(d.playback.enabled){c.$el.one("load",c.startPlayback)}c._preload();c.$el.trigger("initialize",c)};c._supportsCSS3=function(){var f=document.createElement("div"),g=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var e in g){if(typeof f.style[g[e]]!=="undefined"){c.vendorPrefix=g[e].replace("Perspective","").toLowerCase();return true}}return false};c._setupResponsive=function(){c.$el.addClass("is-responsive");a(window).on("resize.rivasliderlite",function(h){clearTimeout(c.resizeEnd);c.resizeEnd=setTimeout(function(){a(window).trigger("resizeend");delete c.resizeEnd},50);var g=c.$viewport.outerWidth(),e=c.$viewport.outerHeight();if(g===c.width){return}c.width=g;c.height=e;if(c.useCSS3&&d.transitions.effect=="slide"){var f={};f["-"+c.vendorPrefix+"-transition-duration"]="0ms";f["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.current*c.width)+"px, 0, 0)";c.$container.css(f);a(window).one("resizeend",function(){f["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration+"ms";c.$container.css(f)})}c.$slides.css({width:g+"px",height:e+"px"})});a(window).trigger("resize.rivasliderlite")};c._setupArrows=function(){var e=a(".rivasliderlite-next"),f=a(".rivasliderlite-prev"),g=a().add(e).add(f);e.on(c.clickEvent,function(h){c.nextSlide();return false});f.on(c.clickEvent,function(h){c.prevSlide();return false});if(d.navigation.arrows_hover){g.addClass("has-hover")}else{c.$el.one("load",function(){g.css({opacity:1})})}c.$el.trigger("setuparrows",c)};c._setupPagination=function(){var e=a(".rivasliderlite-pagination"),f=e.children("div");f.on(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){f.removeClass("active").eq(c.current).addClass("active")});if(d.navigation.pagination_hover){e.addClass("has-hover")}else{c.$el.one("load",function(){e.css({opacity:1})})}c.$el.trigger("setuppagination",c)};c._preload=function(){var e=0;c.$images.each(function(){var g=a(this),f=g.attr("src");a.get(f,function(){e++;if(c.count==e){c.$el.find(".rivasliderlite-preload").animate({opacity:0},{duration:200,complete:function(){a(this).remove();c.$el.trigger("load")}})}})});return"test"};c._transition=function(){c._beforeTransition();clearTimeout(c.afterTransition);c.afterTransition=setTimeout(function(){c._afterTransition();delete c.afterTransition},d.transitions.duration);if(d.transitions.effect=="slide"){if(c.useCSS3){var e={};e["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration;e["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.width*c.current)+"px, 0, 0)";c.$container.css(e)}else{c.$container.animate({left:"-"+(c.width*c.current)},d.transitions.duration)}}else{if(d.transitions.effect=="fade"){if(c.current===c.previous){return}c.order=(c.order)?c.order+1:1;c.$el.off("aftertransition._transition").one("aftertransition._transition",function(){c.$slides.each(function(f){var g=(f===c.current)?{"z-index":""}:{opacity:0,display:"none","z-index":""};a(this).css(g)});delete c.order;delete c.animationClear});c.$slides.eq(c.current).css({opacity:"0",display:"block","z-index":c.order}).animate({opacity:"1"},d.transitions.duration)}else{c.$el.trigger("transition",c,d.transitions.effect)}}};c._beforeTransition=function(){if(d.playback.enabled){clearTimeout(c.playbackTimer)}c.$el.trigger("beforetransition",c)};c._afterTransition=function(){if(d.playback.enabled){c.startPlayback({silent:true})}c.$el.trigger("aftertransition",c)};c.startPlayback=function(e){e=a.extend({},{silent:false},e);if(!d.playback.enabled){d.playback.enabled=true}c.runtime=new Date();c.pauseTime=d.playback.pause;c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("startplayback",c)}};c.endPlayback=function(e){e=a.extend({},{silent:false},e);if(d.playback.enabled){d.playback.enabled=false
2
+ }clearTimeout(c.playbackTimer);if(!e.silent){c.$el.trigger("endplayback",c)}};c.pausePlayback=function(e){e=a.extend({},{silent:false},e);clearTimeout(c.playbackTimer);c.runtime=Math.ceil(new Date()-c.runtime);if(!e.silent){c.$el.trigger("pauseplayback",c)}};c.resumePlayback=function(e){e=a.extend({},{silent:false},e);c.pauseTime=Math.ceil(c.pauseTime-c.runtime);c.runtime=new Date();c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("resumeplayback",c)}};c.nextSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==(c.count-1))?0:(c.current+1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("nextslide",c)}};c.prevSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==0)?(c.count-1):(c.current-1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("prevslide",c)}};c.goToSlide=function(e,f){f=a.extend({},{silent:false},f);if(c.$slides.eq(e).length==0){return}c.previous=c.current;c.current=e;c._transition(c.current,c.previous,true);if(!f.silent){c.$el.trigger("gotoslide",c,e)}};c=a.extend({},c,a.RivaSliderLite.extensions);c.initialize()};a.RivaSliderLite.defaults={general:{enableCSS3:true,},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-left",},dimensions:{width:500,height:200,responsive:true,},transitions:{effect:"slide",duration:500,},playback:{enabled:false,pause:1000}};a.RivaSliderLite.extensions={};a.fn.RivaSliderLite=function(){return this.each(function(){new a.RivaSliderLite(this)})};a(document).ready(function(){a(".rivasliderlite").RivaSliderLite()})})(jQuery);
js/uploadimagebutton.js DELETED
@@ -1,15 +0,0 @@
1
- jQuery(document).ready(function() {
2
-
3
- jQuery('#upload_image_button').click(function() {
4
- formfield = jQuery('#upload_image').attr('name');
5
- tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
6
- return false;
7
- });
8
-
9
- window.send_to_editor = function(html) {
10
- imgurl = jQuery('img',html).attr('src');
11
- jQuery('#upload_image').val(imgurl);
12
- tb_remove();
13
- }
14
-
15
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,106 +1,55 @@
1
- === Easing Slider ===
2
- Homepage: http://easingslider.matthewruddy.com
3
  Contributors: MatthewRuddy
4
- Tags: slider, slides, slideshow, slideshows, easing, plugin, jquery, content, featured, images
5
- Requires at least: 2.9.2
6
- Tested up to: 3.4.2
7
- Stable tag: 1.2.1
8
 
9
- The Easing Slider is an image slider plugin for WordPress which uses the jQuery Easing plugin.
10
 
11
  == Description ==
12
 
13
- <a href="http://rivaslider.com/">Need more features? unlimited slideshows, unlimited images, video support? Get the Riva Slider Pro!</a>
14
 
15
- The Easing Slider comes with various options that allow you to choose different sources to get the images from and also multiple styling options so that you"ll never have to edit any files directly & with ease. Create your own unique elegant slider.
 
 
 
 
 
 
 
 
16
 
17
- <h4>Choose between images sourced from:</h4>
18
- - Custom fields from a particular category
19
- - Custom fields from all categories
20
- - Selected images from the plugins "Custom Images" section.
21
 
22
- <h4>The Easing Slider has the following optional features:</h4>
23
- - *New* Link images to URLs.
24
- - Pagination (with custom icons if you wish)
25
- - Next/previous buttons
26
- - Choose between three different shadow types
27
- - 7 different types of preloading icons (or use none)
28
- - Padding & border settings
29
- - And much more.
30
-
31
- <a href="http://easingslider.matthewruddy.com">Check out our website for more information.</a>
32
 
 
33
 
34
  == Installation ==
35
 
36
- <h4>Installation</h4>
37
- <b>Via FTP:</b>
38
- Once you download the plugin, extract the folder from the .rar file. Next, via FTP place the file in the "plugins" directory with all other plugins. This directory can be found in wp-content under the directory in which you store WordPress's files.
39
-
40
- <b>Via Admin panel:</b>
41
- Go to Add new under Plugins. Then search "easing slider" then click install.
42
-
43
-
44
- <h4>Usage</h4>
45
- To use the Easing Slider you can use the following methods:
46
-
47
- Shortcode in posts:
48
- `[easingslider]`
49
-
50
- Function in template files (via php):
51
- `<?php if (function_exists("easing_slider")){ easing_slider(); }; ?>`
52
-
53
-
54
- <h4>Image Source:</h4>
55
- You can change many of the sliders settings from the "Easing Slider" control panel in the WordPress administration panel.
56
- Once the plugin is activated a new tab called "Easing Slider" emerges in the WordPress admin control panel. Under the tab "Usage Settings" there is a section called "Get images from?". Here there is a dropdown menu with which you can select three different sources to get images from. These are:
57
-
58
- Custom Fields (Selected Category):
59
- Allows you to use custom fields to specify an image from each post to be displayed on the slider from a particular category only. To display an image use the custom field name "easing" followed by the URL of the image in the value field. You can only upload <i>ONE</i> custom field per post.
60
-
61
- Custom Fields (All Categories):
62
- This option displays images from custom fields with the name "easing" from all categories, then enter the URL of the image in the value field.
63
-
64
- Custom Images:
65
- This allows you to use a maximum of ten custom images specified in the "Custom Images" tab. Here you can enter your own URL to specific images of insert images from your media library. This panel also gives you a preview of all the custom images that will be displayed on the slider.
66
-
67
- <h4>Adding an image</h4>
68
 
69
- Note: You can only use one custom field per post.
70
 
71
- Custom Fields:
72
- If you are NOT using custom images you can insert images into the slider via Custom Fields. To do this, insert "easing" into the Custom field <i>name</i> field followed by the URL of the image in the <i>value</i> field. You can only insert one image per post.
73
 
74
- Custom Images tab:
75
- If you have selected "Custom Images" as your source you can now use the custom images tab. To insert images from this tab onto the slider simply paste the link into the text box and then clicking "save changes". Alternatively you can use the "upload image" button which uses Wordpress's built in media library. Once you uploaded the image click "insert into post" to insert the image URL into the next available text box. Then click "save changes" after each one.
76
 
 
77
 
78
- == Screenshots ==
79
 
80
- 1. The Easing Slider used on MatthewRuddy.com showing how the slider can be tailored to your site.
81
-
82
- 2. Preview of the slider's "Custom Images" panel.
83
-
84
- 3. Use Wordpress's media library to upload new images to the slider.
85
-
86
- 4. Modify the sliders styling to your liking. Customize nearly everything.
87
-
88
- 5. Usage settings tab. Change the image source and amount of images shown, etc.
89
-
90
- == Frequently Asked Questions ==
91
-
92
- <h4>The content slider is not working. It is just displaying the loading icon. What's wrong?</h4>
93
-
94
- This (most likely) is due to one of two potential problems:
95
-
96
- 1. You have loaded jQuery already in your theme. If you manually inserted jQuery into your theme previously then it will break the Easing Slider (along with other plugins potentially) because jQuery is being loaded twice (the Easing Slider also loads jQuery).
97
-
98
- 2. No custom fields with the name "easing" followed by the URL of an image in the "value" field have been specified in any of your posts. See the "installation" section for more details on how to display images on the slider via custom fields. Alternatively you can use "custom images" by enabling this in the usage settings tab of the Easing Slider's settings.
99
-
100
- <h4>For more information please email me at info@matthewruddy.com</h4>
101
 
102
  == Changelog ==
103
 
 
 
 
104
  = 1.2.1 =
105
  * Fixed: jQuery re-registering has been removed. Wordpress version of jQuery now used.
106
  * Added: Notification for forthcoming major update.
@@ -154,7 +103,6 @@ This (most likely) is due to one of two potential problems:
154
  * Fixed: Preloader margin-top with IE only. Used IE hack to add 1 pixel to the top margin to make preloader appear aligned.
155
 
156
  = 1.0.1 =
157
-
158
  * Fixed: Issues with 'Thematic' theme.
159
  * Fixed: jQuery into noConflict mode to avoid conflictions with various other jQuery plugins.
160
  * Fixed: Parse errors in CSS file.
1
+ === Riva Slider "Lite" ===
2
+ Homepage: http://rivaslider.com
3
  Contributors: MatthewRuddy
4
+ Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
+ Requires at least: 3.5
6
+ Tested up to: 3.5.1
7
+ Stable tag: 2.0
8
 
9
+ Riva Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
10
 
11
  == Description ==
12
 
13
+ Riva Slider "Lite" is an extremely easy to use slideshow plugin for WordPress. It is built to be lightweight and simple, with absolutely no bloat. It comes with many great features, some of which include:
14
 
15
+ * Fully responsive & mobile ready
16
+ * Lightweight, weighing just 16kb minified including styling
17
+ * Bulk image uploading, integrated with new WordPress Media Library
18
+ * CSS3 transitions for ultra smooth playback
19
+ * Navigation arrows & pagination
20
+ * Preloading functionality on page load
21
+ * Easy to modify styling
22
+ * Developer friendly with built-in Javascript events
23
+ * Lots of actions & filters for custom functionality
24
 
25
+ Throughly tested on iPhone, iPad and multiple Android devices, Riva Slider "Lite" is the perfect solution for mobile slideshows. We've used CSS3 transitions to ensure ultra smooth transitions on all devices. The codebase is also extremely light (just 16kb), which is perfect for those concerned about page loading times.
 
 
 
26
 
27
+ We've also integrated the new WordPress Media Library workflow to provide a better media management experience. Bulk uploading images to your slideshow is now easy, requiring just a few clicks.
 
 
 
 
 
 
 
 
 
28
 
29
+ Last but not least, we've left plenty of opportunity for custom plugin modifications using the WordPress Action & Filter APIs. You can completely create your own external functionality, or modify the plugin to integrate perfectly with your current theme. Awesome!
30
 
31
  == Installation ==
32
 
33
+ = Display a slideshow =
34
+ To display the slideshow, you can use any of the following methods.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ **In a post/page:**
37
 
38
+ Simply insert the shortcode below into the post/page to display the slideshow:
 
39
 
40
+ `[rivasliderlite]`
 
41
 
42
+ **Function in template files (via php):**
43
 
44
+ To insert the slideshow into your theme, add the following code to the appropriate theme file:
45
 
46
+ `<?php if ( function_exists( "rivasliderlite" ) ) { rivasliderlite(); } ?>`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  == Changelog ==
49
 
50
+ = 2.0 =
51
+ * Too many updates to count. Completely revamped plugin from a clean slate. Hope you enjoy using it as much as I did creating it!
52
+
53
  = 1.2.1 =
54
  * Fixed: jQuery re-registering has been removed. Wordpress version of jQuery now used.
55
  * Added: Notification for forthcoming major update.
103
  * Fixed: Preloader margin-top with IE only. Used IE hack to add 1 pixel to the top margin to make preloader appear aligned.
104
 
105
  = 1.0.1 =
 
106
  * Fixed: Issues with 'Thematic' theme.
107
  * Fixed: jQuery into noConflict mode to avoid conflictions with various other jQuery plugins.
108
  * Fixed: Parse errors in CSS file.
rivasliderlite.php ADDED
@@ -0,0 +1,914 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: Riva Slider "Lite"
5
+ Plugin URI: http://rivaslider.com/
6
+ Version: 2.0
7
+ Author: Matthew Ruddy
8
+ Author URI: http://matthewruddy.com/
9
+ Description: An easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
10
+ License: GNU General Public License v2.0 or later
11
+ License URI: http://www.opensource.org/licenses/gpl-license.php
12
+
13
+ Copyright 2013 Matthew Ruddy
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License, version 2, as
17
+ published by the Free Software Foundation.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+
29
+ /** Load all of the necessary class files for the plugin */
30
+ spl_autoload_register( 'RivaSliderLite::autoload' );
31
+
32
+ /** Let's go! */
33
+ if ( class_exists( 'RivaSliderLite' ) )
34
+ RivaSliderLite::get_instance();
35
+
36
+ /**
37
+ * Main plugin class
38
+ *
39
+ * @author Matthew Ruddy
40
+ * @since 2.0
41
+ */
42
+ class RivaSliderLite {
43
+
44
+ /**
45
+ * Class instance
46
+ *
47
+ * @since 2.0
48
+ */
49
+ private static $instance;
50
+
51
+ /**
52
+ * String name of the main plugin file
53
+ *
54
+ * @since 2.0
55
+ */
56
+ private static $file = __FILE__;
57
+
58
+ /**
59
+ * Our plugin version
60
+ *
61
+ * @since 2.0
62
+ */
63
+ public static $version = '2.0';
64
+
65
+ /**
66
+ * Arrays of admin messages
67
+ *
68
+ * @since 2.0
69
+ */
70
+ public $admin_messages = array();
71
+
72
+ /**
73
+ * Flag for indicating that we are on a RivaSliderLite plugin page
74
+ *
75
+ * @since 2.0
76
+ */
77
+ private $is_rivasliderlite_page = false;
78
+
79
+ /**
80
+ * PSR-0 compliant autoloader to load classes as needed.
81
+ *
82
+ * @since 2.0
83
+ */
84
+ public static function autoload( $classname ) {
85
+
86
+ if ( 'RSL' !== substr( $classname, 0, 3 ) )
87
+ return;
88
+
89
+ $filename = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . str_replace( 'RSL_', '', $classname ) . '.php';
90
+ require $filename;
91
+
92
+ }
93
+
94
+ /**
95
+ * Getter method for retrieving the class instance.
96
+ *
97
+ * @since 2.0
98
+ */
99
+ public static function get_instance() {
100
+
101
+ if ( !self::$instance instanceof self )
102
+ self::$instance = new self;
103
+ return self::$instance;
104
+
105
+ }
106
+
107
+ /**
108
+ * Gets the main plugin file
109
+ *
110
+ * @since 2.0
111
+ */
112
+ public static function get_file() {
113
+ return self::$file;
114
+ }
115
+
116
+ /**
117
+ * Constructor
118
+ *
119
+ * @since 2.0
120
+ */
121
+ private function __construct() {
122
+
123
+ /** Load plugin textdomain for language capabilities */
124
+ load_plugin_textdomain( 'rivasliderlite', false, dirname( plugin_basename( self::get_file() ) ) . '/languages' );
125
+
126
+ /** Activation and deactivation hooks. Static methods are used to avoid activation/uninstallation scoping errors. */
127
+ if ( is_multisite() ) {
128
+ register_activation_hook( __FILE__, array( __CLASS__, 'do_network_activation' ) );
129
+ register_deactivation_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
130
+ //register_uninstall_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
131
+ }
132
+ else {
133
+ register_activation_hook( __FILE__, array( __CLASS__, 'do_activation' ) );
134
+ register_deactivation_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
135
+ //register_uninstall_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
136
+ }
137
+
138
+ /** Plugin shortcodes */
139
+ add_shortcode( 'rivasliderlite', array( $this, 'do_shortcode' ) );
140
+
141
+ /** Plugin actions */
142
+ add_action( 'init', array( $this, 'register_all_styles' ) );
143
+ add_action( 'init', array( $this, 'register_all_scripts' ) );
144
+ add_action( 'admin_menu', array( $this, 'add_menus' ) );
145
+ add_action( 'admin_menu', array( $this, 'do_actions' ) );
146
+ add_action( 'media_buttons', array( $this, 'add_media_button' ), 11 );
147
+ add_action( 'print_media_templates', array( $this, 'print_backbone_templates' ) );
148
+ add_action( 'wp_before_admin_bar_render', array( $this, 'add_admin_bar_links' ) );
149
+
150
+ /** Do plugin upgrades */
151
+ add_action( 'admin_init', array( 'RSL_Upgrade', 'do_upgrades' ) );
152
+
153
+ /** Register our custom widget */
154
+ add_action( 'widgets_init', create_function( '', 'register_widget( "RSL_Widget" );' ) );
155
+
156
+ /** Some hooks for our own custom actions */
157
+ add_action( 'rivasliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
158
+ add_action( 'rivasliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
159
+
160
+ /** Get plugin settings */
161
+ $settings = get_option( 'rivasliderlite_settings' );
162
+
163
+ /** Load slideshow scripts & styles in the header if set to do so */
164
+ if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' )
165
+ add_action( 'wp_enqueue_scripts', array( 'RSL_Slideshow', 'enqueue_styles' ) );
166
+ if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
167
+ add_action( 'wp_enqueue_scripts', array( 'RSL_Slideshow', 'enqueue_scripts' ) );
168
+
169
+ /** Initialization hook for adding external functionality */
170
+ do_action_ref_array( 'rivasliderlite', array( $this ) );
171
+
172
+ }
173
+
174
+ /**
175
+ * Executes a network activation
176
+ *
177
+ * @since 2.0
178
+ */
179
+ public static function do_network_activation() {
180
+ self::get_instance()->network_activate();
181
+ }
182
+
183
+ /**
184
+ * Executes a network uninstall
185
+ *
186
+ * @since 2.0
187
+ */
188
+ public static function do_network_uninstall() {
189
+ self::get_instance()->network_uninstall();
190
+ }
191
+
192
+ /**
193
+ * Executes an activation
194
+ *
195
+ * @since 2.0
196
+ */
197
+ public static function do_activation() {
198
+ self::get_instance()->activate();
199
+ }
200
+
201
+ /**
202
+ * Executes an uninstall
203
+ *
204
+ * @since 2.0
205
+ */
206
+ public static function do_uninstall() {
207
+ self::get_instance()->uninstall();
208
+ }
209
+
210
+ /**
211
+ * Network activation hook
212
+ *
213
+ * @since 2.0
214
+ */
215
+ public function network_activate() {
216
+
217
+ /** Do plugin version check */
218
+ if ( !$this->version_check() )
219
+ return;
220
+
221
+ /** Get all of the blogs */
222
+ $blogs = $this->get_multisite_blogs();
223
+
224
+ /** Execute acivation for each blog */
225
+ foreach ( $blogs as $blog_id ) {
226
+ switch_to_blog( $blog_id );
227
+ $this->activate();
228
+ restore_current_blog();
229
+ }
230
+
231
+ /** Trigger hooks */
232
+ do_action_ref_array( 'rivasliderlite_network_activate', array( $this ) );
233
+
234
+ }
235
+
236
+ /**
237
+ * Network uninstall hook
238
+ *
239
+ * @since 2.0
240
+ */
241
+ public function network_uninstall() {
242
+
243
+ /** Get all of the blogs */
244
+ $blogs = $this->get_multisite_blogs();
245
+
246
+ /** Execute uninstall for each blog */
247
+ foreach ( $blogs as $blog_id ) {
248
+ switch_to_blog( $blog_id );
249
+ $this->uninstall();
250
+ restore_current_blog();
251
+ }
252
+
253
+ /** Trigger hooks */
254
+ do_action_ref_array( 'rivasliderlite_network_uninstall', array( $this ) );
255
+
256
+ }
257
+
258
+ /**
259
+ * Activation hook
260
+ *
261
+ * @since 2.0
262
+ */
263
+ public function activate() {
264
+
265
+ /** Do plugin version check */
266
+ if ( !$this->version_check() )
267
+ return;
268
+
269
+ /** Add "wp_options" table options */
270
+ add_option( 'rivasliderlite_version', self::$version );
271
+ add_option( 'rivasliderlite_slideshow', $this->defaults() );
272
+ add_option( 'rivasliderlite_settings',
273
+ array(
274
+ 'resizing' => true,
275
+ 'load_styles' => 'header',
276
+ 'load_scripts' => 'header'
277
+ )
278
+ );
279
+ add_option( 'rivasliderlite_easingslider_upgrade', 0 );
280
+ add_option( 'rivasliderlite_disable_welcome_panel', 0 );
281
+
282
+ /** Add user capabilities */
283
+ $this->manage_capabilities( 'add' );
284
+
285
+ /** Trigger hooks */
286
+ do_action_ref_array( 'rivasliderlite_activate', array( $this ) );
287
+
288
+ }
289
+
290
+ /**
291
+ * Uninstall Hook
292
+ *
293
+ * @since 2.0
294
+ */
295
+ public function uninstall() {
296
+
297
+ /** Delete "wp_options" table options */
298
+ delete_option( 'rivasliderlite_version' );
299
+ delete_option( 'rivasliderlite_slideshow' );
300
+ delete_option( 'rivasliderlite_settings' );
301
+ delete_option( 'rivasliderlite_easingslider_upgrade' );
302
+ delete_option( 'rivasliderlite_disable_welcome_panel' );
303
+
304
+ /** Remove user capabilities */
305
+ $this->manage_capabilities( 'remove' );
306
+
307
+ /** Trigger hooks */
308
+ do_action_ref_array( 'rivasliderlite_uninstall', array( $this ) );
309
+
310
+ }
311
+
312
+ /**
313
+ * Does a plugin version check, making sure the current Wordpress version is supported. If not, the plugin is deactivated and an error message is displayed.
314
+ *
315
+ * @author Matthew Ruddy
316
+ * @version 2.0.1
317
+ */
318
+ public function version_check() {
319
+ global $wp_version;
320
+ if ( version_compare( $wp_version, '3.5', '<' ) ) {
321
+ deactivate_plugins( plugin_basename( __FILE__ ) );
322
+ wp_die( __( sprintf( 'Sorry, but your version of WordPress, <strong>%s</strong>, is not supported. The plugin has been deactivated. <a href="%s">Return to the Dashboard.</a>', $wp_version, admin_url() ), 'rivasliderlite' ) );
323
+ return false;
324
+ }
325
+ return true;
326
+ }
327
+
328
+ /**
329
+ * Returns the ids of the various multisite blogs. Returns false if not a multisite installation.
330
+ *
331
+ * @since 2.0
332
+ */
333
+ public function get_multisite_blogs() {
334
+
335
+ global $wpdb;
336
+
337
+ /** Bail if not multisite */
338
+ if ( !is_multisite() )
339
+ return false;
340
+
341
+ /** Get the blogs ids from database */
342
+ $query = "SELECT blog_id from $wpdb->blogs";
343
+ $blogs = $wpdb->get_col($query);
344
+
345
+ /** Push blog ids to array */
346
+ $blog_ids = array();
347
+ foreach ( $blogs as $blog )
348
+ $blog_ids[] = $blog;
349
+
350
+ /** Return the multisite blog ids */
351
+ return $blog_ids;
352
+
353
+ }
354
+
355
+ /**
356
+ * Default slideshow options
357
+ *
358
+ * @since 2.0
359
+ */
360
+ public function defaults() {
361
+
362
+ /** Get the current user to be assigned as the slideshow author */
363
+ $author = __( 'Unknown', 'rivasliderlite' );
364
+ if ( function_exists( 'wp_get_current_user' ) )
365
+ $author = wp_get_current_user()->user_login;
366
+
367
+ $object = new stdClass();
368
+ $object->author = $author;
369
+ $object->slides = array();
370
+ $object->general = (object) array( 'randomize' => '' );
371
+ $object->dimensions = (object) array( 'width' => 640, 'height' => 240, 'responsive' => true );
372
+ $object->transitions = (object) array( 'effect' => 'slide', 'duration' => 500 );
373
+ $object->navigation = (object) array( 'arrows' => true, 'arrows_hover' => false, 'arrows_position' => 'inside', 'pagination' => true, 'pagination_hover' => false, 'pagination_position' => 'inside', 'pagination_location' => 'bottom-center' );
374
+ $object->playback = (object) array( 'enabled' => true, 'pause' => 4000 );
375
+ return apply_filters( 'rivasliderlite_slideshow_defaults', $object );
376
+
377
+ }
378
+
379
+ /**
380
+ * Returns the plugin capabilities
381
+ *
382
+ * @since 2.0
383
+ */
384
+ public function capabilities() {
385
+ $capabilities = array(
386
+ 'rivasliderlite_edit_slideshow',
387
+ 'rivasliderlite_edit_settings'
388
+ );
389
+ $capabilities = apply_filters( 'rivasliderlite_capabilities', $capabilities );
390
+ return $capabilities;
391
+ }
392
+
393
+ /**
394
+ * Manages (adds or removes) user capabilities
395
+ *
396
+ * @since 2.0
397
+ */
398
+ public function manage_capabilities( $action ) {
399
+
400
+ global $wp_roles;
401
+
402
+ /** Get the capabilities */
403
+ $capabilities = $this->capabilities();
404
+
405
+ /** Add capability for each applicable user roel */
406
+ foreach ( $wp_roles->roles as $role => $info ) {
407
+ $user_role = get_role( $role );
408
+ foreach ( $capabilities as $capability ) {
409
+ if ( $action == 'add' )
410
+ $this->add_capability( $capability, $user_role );
411
+ elseif ( $action == 'remove' )
412
+ $this->remove_capability( $capability, $user_role );
413
+ }
414
+ }
415
+
416
+ }
417
+
418
+ /**
419
+ * Adds a user capability
420
+ *
421
+ * @since 2.0
422
+ */
423
+ public function add_capability( $capability, $role ) {
424
+ if ( $role->has_cap( 'edit_plugins' ) )
425
+ $role->add_cap( $capability );
426
+ }
427
+
428
+ /**
429
+ * Removes a user capability
430
+ *
431
+ * @since 2.0
432
+ */
433
+ public function remove_capability( $capability, $role ) {
434
+ if ( $role->has_cap( $capability ) )
435
+ $role->remove_cap( $capability );
436
+ }
437
+
438
+ /**
439
+ * Adds the admin menus
440
+ *
441
+ * @since 2.0
442
+ */
443
+ public function add_menus() {
444
+
445
+ /** Hook suffixs for admin menus */
446
+ $suffixes = array();
447
+ $pages = array( 'rivasliderlite_edit_slideshow', 'rivasliderlite_edit_settings' );
448
+
449
+ /** Toplevel menu */
450
+ $hook_suffixes[] = add_menu_page(
451
+ __( 'Slideshow', 'rivasliderlite' ),
452
+ __( 'Slideshow', 'rivasliderlite' ),
453
+ 'rivasliderlite_edit_slideshow',
454
+ 'rivasliderlite_edit_slideshow',
455
+ null
456
+ );
457
+
458
+ /** Submenus */
459
+ $hook_suffixes[] = add_submenu_page(
460
+ 'rivasliderlite_edit_slideshow',
461
+ __( 'Edit Slideshow', 'rivasliderlite' ),
462
+ __( 'Edit Slideshow', 'rivasliderlite' ),
463
+ 'rivasliderlite_edit_slideshow',
464
+ 'rivasliderlite_edit_slideshow',
465
+ array( $this, 'edit_slideshow_view' )
466
+ );
467
+ $hook_suffixes[] = add_submenu_page(
468
+ 'rivasliderlite_edit_slideshow',
469
+ __( 'Edit Settings', 'rivasliderlite' ),
470
+ __( 'Settings', 'rivasliderlite' ),
471
+ 'rivasliderlite_edit_settings',
472
+ 'rivasliderlite_edit_settings',
473
+ array( $this, 'edit_settings_view' )
474
+ );
475
+
476
+ /** Set flag if we are on one of our own plugin pages */
477
+ if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $pages ) )
478
+ $this->is_rivasliderlite_page = true;
479
+
480
+ /** Load our scripts and styles for our plugin menus */
481
+ foreach ( $hook_suffixes as $hook_suffix ) {
482
+ add_action( "admin_print_styles-{$hook_suffix}", array( $this, 'enqueue_admin_styles' ) );
483
+ add_action( "admin_print_scripts-{$hook_suffix}", array( $this, 'enqueue_admin_scripts' ) );
484
+ }
485
+
486
+ }
487
+
488
+ /**
489
+ * Adds plugin links to the admin bar
490
+ *
491
+ * @author Matthew Ruddy
492
+ * @version 2.0.1
493
+ */
494
+ function add_admin_bar_links() {
495
+
496
+ global $wp_admin_bar;
497
+
498
+ /** Add the new toplevel menu */
499
+ $wp_admin_bar->add_menu(
500
+ array(
501
+ 'id' => 'slideshows-top_menu',
502
+ 'title' => __( 'Slideshow', 'rivasliderlite' ),
503
+ 'href' => admin_url( "admin.php?page=rivasliderlite_edit_slideshow" )
504
+ )
505
+ );
506
+
507
+ /** Add submenu links to our toplevel menu */
508
+ $wp_admin_bar->add_menu(
509
+ array(
510
+ 'parent' => 'slideshows-top_menu',
511
+ 'id' => 'edit-slideshow-sub_menu',
512
+ 'title' => __( 'Edit Slideshow', 'rivasliderlite' ),
513
+ 'href' => admin_url( "admin.php?page=rivasliderlite_edit_slideshow" )
514
+ )
515
+ );
516
+ $wp_admin_bar->add_menu(
517
+ array(
518
+ 'parent' => 'slideshows-top_menu',
519
+ 'id' => 'edit-settings-sub_menu',
520
+ 'title' => __( 'Settings', 'rivasliderlite' ),
521
+ 'href' => admin_url( "admin.php?page=rivasliderlite_edit_settings" )
522
+ )
523
+ );
524
+
525
+ }
526
+
527
+ /**
528
+ * Adds a media button (for inserting a slideshow) to the Post Editor
529
+ *
530
+ * @since 2.0
531
+ */
532
+ function add_media_button( $editor_id ) {
533
+ $img = '<span class="insert-slideshow-icon"></span>';
534
+ ?>
535
+ <style type="text/css">
536
+ .insert-slideshow.button .insert-slideshow-icon {
537
+ width: 16px;
538
+ height: 16px;
539
+ margin-top: -1px;
540
+ margin-left: -1px;
541
+ margin-right: 4px;
542
+ display: inline-block;
543
+ vertical-align: text-top;
544
+ background: url(<?php echo plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'menu_icon_single_grey.png' ); ?>) no-repeat top left;
545
+ }
546
+ </style>
547
+ <script type="text/javascript">
548
+ function insertSlideshow() {
549
+ send_to_editor( '[rivasliderlite]' );
550
+ tb_close();
551
+ return false;
552
+ }
553
+ </script>
554
+ <a onClick="insertSlideshow();" class="button insert-slideshow" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a slideshow', 'rivasliderlite' ); ?>"><?php echo $img . __( 'Add Slideshow', 'rivasliderlite' ); ?></a>
555
+ <?php
556
+ }
557
+
558
+ /**
559
+ * Queues an admin message to be displayed
560
+ *
561
+ * @since 2.0
562
+ */
563
+ public function queue_message( $text, $type ) {
564
+ $message = "<div class='message $type'><p>$text</p></div>";
565
+ add_action( 'rivasliderlite_admin_messages', create_function( '', 'echo "'. $message .'";' ) );
566
+ }
567
+
568
+ /**
569
+ * Does security nonce checks
570
+ *
571
+ * @since 2.0
572
+ */
573
+ public function security_check( $action, $page ) {
574
+ if ( check_admin_referer( "rivasliderlite-{$action}_{$page}", "rivasliderlite-{$action}_{$page}" ) )
575
+ return true;
576
+ return false;
577
+ }
578
+
579
+ /**
580
+ * Nonce URL function, polyfill for upcoming trac contribution by me! :)
581
+ * http://core.trac.wordpress.org/ticket/22423
582
+ *
583
+ * @since 2.0
584
+ */
585
+ public function nonce_url( $actionurl, $action, $arg = '_wpnonce' ) {
586
+ $actionurl = str_replace( '&amp;', '&', $actionurl );
587
+ return esc_html( add_query_arg( $arg, wp_create_nonce( $action, $actionurl ), $actionurl ) );
588
+ }
589
+
590
+ /**
591
+ * Does admin actions (if appropriate)
592
+ *
593
+ * @since 2.0
594
+ */
595
+ public function do_actions() {
596
+
597
+ /** Bail if we aren't on a RivaSliderLite page */
598
+ if ( !$this->is_rivasliderlite_page )
599
+ return;
600
+
601
+ /** Do admin actions */
602
+ do_action( "{$_GET['page']}_actions", $_GET['page'] );
603
+
604
+ }
605
+
606
+ /**
607
+ * Slideshow based actions
608
+ *
609
+ * @since 2.0
610
+ */
611
+ public function do_slideshow_actions( $page ) {
612
+
613
+ /** Disable welcome panel if it is dismissed */
614
+ if ( isset( $_GET['disable_welcome_panel'] ) )
615
+ update_option( 'rivasliderlite_disable_welcome_panel', filter_var( $_GET['disable_welcome_panel'], FILTER_VALIDATE_BOOLEAN ) );
616
+
617
+ /** Save or update a slideshow. Whichever is appropriate. */
618
+ if ( isset( $_POST['save'] ) ) {
619
+
620
+ /** Security check. Page is hardcoded to prevent errors when adding a new slidesow) */
621
+ if ( !$this->security_check( 'save', 'rivasliderlite_edit_slideshow' ) ) {
622
+ wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'rivasliderlite' ) );
623
+ exit();
624
+ }
625
+
626
+ /** Updates the slideshow */
627
+ $slideshow = update_option( 'rivasliderlite_slideshow',
628
+ (object) array(
629
+ 'author' => stripslashes_deep( $_POST['author'] ),
630
+ 'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
631
+ 'general' => (object) stripslashes_deep( $_POST['general'] ),
632
+ 'dimensions' => (object) stripslashes_deep( $_POST['dimensions'] ),
633
+ 'transitions' => (object) stripslashes_deep( $_POST['transitions'] ),
634
+ 'navigation' => (object) stripslashes_deep( $_POST['navigation'] ),
635
+ 'playback' => (object) stripslashes_deep( $_POST['playback'] )
636
+ )
637
+ );
638
+
639
+ /** Return success message */
640
+ return $this->queue_message( __( 'Slideshow has been <strong>saved</strong> successfully.', 'rivasliderlite' ), 'updated' );
641
+
642
+ }
643
+
644
+ }
645
+
646
+ /**
647
+ * Settings page actions
648
+ *
649
+ * @since 2.0
650
+ */
651
+ public function do_settings_actions( $page ) {
652
+
653
+ /** Removes old legacy Easing Slider settings */
654
+ if ( isset( $_POST['easingslider'] ) ) {
655
+
656
+ /** Horrific amount of options. God I was bad back then! */
657
+ $options = array(
658
+ 'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10',
659
+ 'sImglink1', 'sImglink2', 'sImglink3', 'sImglink4', 'sImglink5', 'sImglink6', 'sImglink7', 'sImglink8', 'sImglink9', 'sImglink10',
660
+ 'activation', 'width', 'height', 'shadow', 'interval', 'transition', 'bgcolour', 'transpeed', 'bwidth', 'bcolour', 'preload', 'starts',
661
+ 'buttons', 'source', 'featcat', 'featpost', 'padbottom', 'padleft', 'padright', 'paddingtop', 'shadowstyle', 'paginationon', 'paginationoff',
662
+ 'next', 'prev', 'pageposition', 'pageside', 'permalink', 'jquery', 'easingslider_version'
663
+ );
664
+
665
+ /** Delete the options */
666
+ foreach ( $options as $option )
667
+ delete_option( $option );
668
+
669
+ /** Queue message */
670
+ return $this->queue_message( __( 'Easing Slider settings have been permanently deleted!', 'rivasliderlite' ), 'updated' );
671
+
672
+ }
673
+
674
+ /** Save the settings */
675
+ if ( isset( $_POST['save'] ) ) {
676
+
677
+ /** Security check */
678
+ if ( !$this->security_check( 'save', $page ) ) {
679
+ wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'rivasliderlite' ) );
680
+ exit();
681
+ }
682
+
683
+ /** Get settings and do some validation */
684
+ $settings = $this->validate( $_POST['settings'] );
685
+
686
+ /** Update database option and get response */
687
+ $response = update_option( 'rivasliderlite_settings', stripslashes_deep( $settings ) );
688
+
689
+ /** Show update message */
690
+ return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'rivasliderlite' ), 'updated' );
691
+
692
+ }
693
+
694
+ }
695
+
696
+ /**
697
+ * Does validation
698
+ *
699
+ * @since 2.0
700
+ */
701
+ public function validate( $values ) {
702
+
703
+ /** Object flag */
704
+ $is_object = ( is_object( $values ) ) ? true : false;
705
+
706
+ /** Convert objects to arrays */
707
+ if ( $is_object )
708
+ $values = (array) $values;
709
+
710
+ /** Get settings and do some validation */
711
+ foreach ( $values as $key => $value ) {
712
+
713
+ /** Validators */
714
+ if ( is_numeric( $value ) )
715
+ $values[ $key ] = filter_var( $value, FILTER_VALIDATE_INT );
716
+ elseif ( $value === 'true' || $value === 'false' )
717
+ $values[ $key ] = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
718
+
719
+ /** Recurse if necessary */
720
+ if ( is_object( $value ) || is_array( $value ) )
721
+ $values[ $key ] = $this->validate( $value );
722
+
723
+ }
724
+
725
+ /** Convert back to an object */
726
+ if ( $is_object )
727
+ $values = (object) $values;
728
+
729
+ return stripslashes_deep( $values );
730
+
731
+ }
732
+
733
+ /**
734
+ * Validates all of the objects within given values
735
+ *
736
+ * @since 2.0
737
+ */
738
+ public function validate_all() {
739
+
740
+ }
741
+
742
+ /**
743
+ * Executes a shortcode handler
744
+ *
745
+ * @since 2.0
746
+ */
747
+ public function do_shortcode() {
748
+
749
+ /** Get the slideshow */
750
+ $slideshow = RSL_Slideshow::get_instance()->display_slideshow();
751
+
752
+ /** Display the slideshow (or error message if it doesn't exist) */
753
+ if ( is_wp_error( $slideshow ) )
754
+ return $slideshow->get_error_message();
755
+ else
756
+ return $slideshow;
757
+
758
+ }
759
+
760
+ /**
761
+ * Register all admin stylesheets
762
+ *
763
+ * @since 2.0
764
+ */
765
+ public function register_all_styles() {
766
+
767
+ /** Get the extension */
768
+ $ext = ( apply_filters( 'rivasliderlite_style_debug', __return_false() ) === true ) ? '.css' : '.min.css';
769
+
770
+ /** Register styles */
771
+ wp_register_style( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
772
+ wp_register_style( 'rsd-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
773
+
774
+ }
775
+
776
+ /**
777
+ * Register all admin scripts
778
+ *
779
+ * @since 2.0
780
+ */
781
+ public function register_all_scripts() {
782
+
783
+ /** Get the extension */
784
+ $ext = ( apply_filters( 'rivasliderlite_script_debug', __return_false() ) ) ? '.js' : '.min.js';
785
+
786
+ /** Register scripts */
787
+ wp_register_script( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'admin'. $ext ), array( 'jquery', 'jquery-ui-sortable', 'backbone' ), self::$version, true);
788
+ wp_register_script( 'rsd-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
789
+
790
+ }
791
+
792
+ /**
793
+ * Loads admin stylesheets
794
+ *
795
+ * @since 2.0
796
+ */
797
+ public function enqueue_admin_styles() {
798
+
799
+ /** Load admin styling */
800
+ wp_enqueue_style( 'rsd-admin' );
801
+
802
+ /** Load your custom admin styles here */
803
+ do_action( 'rivasliderlite_enqueue_admin_styles' );
804
+
805
+ }
806
+
807
+ /**
808
+ * Loads admin javascript files
809
+ *
810
+ * @since 2.0
811
+ */
812
+ public function enqueue_admin_scripts() {
813
+
814
+ /** Load new media uploader functionality */
815
+ wp_enqueue_media();
816
+
817
+ /** Load admin scripting and jQuery sortables plugin */
818
+ wp_enqueue_script( 'rsd-admin' );
819
+
820
+ /** Print Localized variables */
821
+ wp_localize_script( 'rsd-admin', 'rivasliderlite', $this->localizations() );
822
+
823
+ /** Load your custom admin scripts here */
824
+ do_action( 'rivasliderlite_enqueue_admin_scripts' );
825
+
826
+ }
827
+
828
+ /**
829
+ * Translations localized via Javascript
830
+ *
831
+ * @since 2.0
832
+ */
833
+ public function localizations() {
834
+ return array(
835
+ 'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( self::get_file() ) ) .'/',
836
+ 'delete_image' => __( 'Are you sure you wish to delete this image? This cannot be reversed.', 'rivasliderlite' ),
837
+ 'delete_images' => __( 'Are you sure you wish to delete all of this slideshows images? This cannot be reversed.', 'rivasliderlite' ),
838
+ 'media_upload' => array(
839
+ 'title' => __( 'Add Images to Slideshow', 'rivasliderlite' ),
840
+ 'button' => __( 'Insert into slideshow', 'rivasliderlite' ),
841
+ 'change' => __( 'Use this image', 'rivasliderlite' ),
842
+ 'discard_changes' => __( 'Are you sure you wish to discard changes?', 'rivasliderlite' )
843
+ )
844
+ );
845
+ }
846
+
847
+ /**
848
+ * Prints the backbone templates used in the admin area
849
+ *
850
+ * @since 2.0
851
+ */
852
+ public function print_backbone_templates() {
853
+
854
+ /** Bail if not a RivaSliderLite page */
855
+ if ( !$this->is_rivasliderlite_page )
856
+ return;
857
+
858
+ /** Slide template */
859
+ echo '<script type="text/html" id="tmpl-slide"><div class="thumbnail" data-id="<%= id %>"><a href="#" class="delete-button"></a><img src="<%= sizes.thumbnail.url %>" alt="<%= alt %>" /></div></script>';
860
+
861
+ /** Slide editor template */
862
+ echo '<script type="text/html" id="tmpl-edit-slide">';
863
+ require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow-slide.php';
864
+ echo '</script>';
865
+
866
+ /** Media Library custom sidebar */
867
+ echo '<script type="text/html" id="tmpl-image-details">';
868
+ require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow-media-details.php';
869
+ echo '</script>';
870
+
871
+ }
872
+
873
+ /**
874
+ * Edit a slideshow view
875
+ *
876
+ * @since 2.0
877
+ */
878
+ public function edit_slideshow_view() {
879
+
880
+ /** Load the edit view template */
881
+ require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow.php';
882
+
883
+ }
884
+
885
+ /**
886
+ * Edit settings view
887
+ *
888
+ * @since 2.0
889
+ */
890
+ public function edit_settings_view() {
891
+
892
+ /** Load the edit settings view */
893
+ require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editsettings.php';
894
+
895
+ }
896
+
897
+ }
898
+
899
+ /**
900
+ * Handy helper & legacy functions for displaying a slideshow
901
+ *
902
+ * @author Matthew Ruddy
903
+ * @since 2.0
904
+ */
905
+ if ( !function_exists( 'rivasliderlite' ) ) {
906
+ function rivasliderlite() {
907
+ echo RSL_Slideshow::get_instance()->display_slideshow();
908
+ }
909
+ }
910
+ if ( !function_exists( 'easing_slider' ) ) {
911
+ function easing_slider() {
912
+ echo RSL_Slideshow::get_instance()->display_slideshow();
913
+ }
914
+ }
screenshot-1.jpg DELETED
Binary file
screenshot-2.jpg DELETED
Binary file
screenshot-3.jpg DELETED
Binary file
screenshot-4.jpg DELETED
Binary file
screenshot-5.jpg DELETED
Binary file
templates/editsettings.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** Get the plugin settings */
3
+ $settings = $s = get_option( 'rivasliderlite_settings' );
4
+ ?>
5
+ <div class="wrap">
6
+ <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
7
+ <h2><?php _e( 'Edit Settings', 'rivasliderlite' ); ?></h2>
8
+ <form name="post" action="admin.php?page=rivasliderlite_edit_settings" method="post">
9
+ <?php
10
+ /** Security nonce field */
11
+ wp_nonce_field( "rivasliderlite-save_{$_GET['page']}", "rivasliderlite-save_{$_GET['page']}", false );
12
+ ?>
13
+ <div class="main-panel">
14
+ <div class="messages-container">
15
+ <?php do_action( 'rivasliderlite_admin_messages' ); ?>
16
+ </div>
17
+
18
+ <h3><?php _e( 'General Settings', 'rivasliderlite' ); ?></h3>
19
+ <table class="form-table settings">
20
+ <tbody>
21
+ <tr valign="top">
22
+ <th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'rivasliderlite' ); ?></label></th>
23
+ <td>
24
+ <label for="resizing_true">
25
+ <input type="radio" name="settings[resizing]" id="resizing_true" value="true" <?php checked( $s['resizing'], true ); ?>><span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
26
+ </label>
27
+ <label for="resizing_false">
28
+ <input type="radio" name="settings[resizing]" id="resizing_false" value="false" <?php checked( $s['resizing'], false ); ?>><span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
29
+ </label>
30
+ <p class="description"><?php _e( 'Enable or disable the plugins image resizing functionality. Disable this if you do not want the slide images to be resized.', 'rivasliderlite' ); ?></p>
31
+ </td>
32
+ </tr>
33
+
34
+ <tr valign="top">
35
+ <th scope="row"><label for="load_scripts"><?php _e( 'Output JS', 'rivasliderlite' ); ?></label></th>
36
+ <td>
37
+ <label for="load_scripts_header">
38
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_header" value="header" <?php checked( $s['load_scripts'], 'header' ); ?>><span><?php _e( 'Header', 'rivasliderlite' ); ?></span>
39
+ </label>
40
+ <label for="load_scripts_footer">
41
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_footer" value="footer" <?php checked( $s['load_scripts'], 'footer' ); ?>><span><?php _e( 'Footer', 'rivasliderlite' ); ?></span>
42
+ </label>
43
+ <label for="load_scripts_off">
44
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_off" value="false" <?php checked( $s['load_scripts'], false ); ?>><span><?php _e( 'Off', 'rivasliderlite' ); ?></span>
45
+ </label>
46
+ <p class="description"><?php _e( 'Settings for Javascript output. Scripts loaded in the "Footer" are only when they are needed. This decreases page loading times but is prone to errors.', 'rivasliderlite' ); ?></p>
47
+ </td>
48
+ </tr>
49
+
50
+ <tr valign="top">
51
+ <th scope="row"><label for="load_styles"><?php _e( 'Output CSS', 'rivasliderlite' ); ?></label></th>
52
+ <td>
53
+ <label for="load_styles_header">
54
+ <input type="radio" name="settings[load_styles]" id="load_styles_header" value="header" <?php checked( $s['load_styles'], 'header' ); ?>><span><?php _e( 'Header', 'rivasliderlite' ); ?></span>
55
+ </label>
56
+ <label for="load_styles_footer">
57
+ <input type="radio" name="settings[load_styles]" id="load_styles_footer" value="footer" <?php checked( $s['load_styles'], 'footer' ); ?>><span><?php _e( 'Footer', 'rivasliderlite' ); ?></span>
58
+ </label>
59
+ <label for="load_styles_off">
60
+ <input type="radio" name="settings[load_styles]" id="load_styles_off" value="false" <?php checked( $s['load_styles'], false ); ?>><span><?php _e( 'Off', 'rivasliderlite' ); ?></span>
61
+ </label>
62
+ <p class="description"><?php _e( 'Settings for CSS output. Styles loaded in the "Footer" will invalidate the HTML, but will prevent them from loading when not needed.', 'rivasliderlite' ); ?></p>
63
+ </td>
64
+ </tr>
65
+ </tbody>
66
+ </table>
67
+
68
+ <?php if ( get_option( 'easingslider_version' ) ) : ?>
69
+ <div class="divider"></div>
70
+
71
+ <h3><?php _e( 'Legacy Settings', 'rivasliderlite' ); ?></h3>
72
+ <table class="form-table settings">
73
+ <tbody>
74
+ <tr valign="top">
75
+ <th scope="row"><label for="load_scripts"><?php _e( 'Easing Slider', 'rivasliderlite' ); ?></label></th>
76
+ <td>
77
+ <input type="submit" name="easingslider" class="button button-secondary" value="<?php _e( 'Remove Easing Slider Settings', 'rivasliderlite' ); ?>">
78
+ <p class="description"><?php _e( 'Clicking this button will permanently delete your Easing Slider settings from the database. Only do this if you are sure you will not be using it again.', 'rivasliderlite' ); ?></p>
79
+ </td>
80
+ </tr>
81
+ </tbody>
82
+ </table>
83
+ <?php endif; ?>
84
+
85
+ <div class="divider"></div>
86
+
87
+ <h3><?php _e( 'Installation Settings', 'rivasliderlite' ); ?></h3>
88
+ <table class="form-table">
89
+ <tbody>
90
+ <tr valign="top">
91
+ <th scope="row"><?php _e( 'PHP Version', 'rivasliderlite' ); ?></th>
92
+ <td><?php echo phpversion(); ?></td>
93
+ </tr>
94
+
95
+ <tr valign="top">
96
+ <th scope="row"><?php _e( 'MySQL Version', 'rivasliderlite' ); ?></th>
97
+ <td><?php echo mysql_get_server_info(); ?></td>
98
+ </tr>
99
+
100
+ <tr valign="top">
101
+ <th scope="row"><?php _e( 'WordPress Version', 'rivasliderlite' ); ?></th>
102
+ <td><?php global $wp_version; echo $wp_version; ?></td>
103
+ </tr>
104
+
105
+ <tr valign="top">
106
+ <th scope="row"><?php _e( 'Plugin Version', 'rivasliderlite' ); ?></th>
107
+ <td><?php echo RivaSliderLite::$version; ?></td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+
112
+ <div class="divider"></div>
113
+
114
+ <p class="submit">
115
+ <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Settings', 'rivasliderlite' ); ?>">
116
+ </p>
117
+ </div>
118
+ </form>
119
+ </div>
templates/editslideshow-media-details.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Backbone template -->
2
+ <h3>
3
+ <?php _e( 'Image Details', 'rivasliderlite' ); ?>
4
+ <span class="settings-save-status">
5
+ <span class="spinner"></span>
6
+ <span class="saved"><?php esc_html_e( 'Saved.', 'rivasliderlite' ); ?></span>
7
+ </span>
8
+ </h3>
9
+
10
+ <div class="attachment-info">
11
+ <div class="thumbnail" style="max-width: none; max-height: 220px;">
12
+ <# if ( data.uploading ) { #>
13
+ <div class="media-progress-bar"><div></div></div>
14
+ <# } else if ( 'image' === data.type ) { #>
15
+ <img src="{{ data.size.url }}" draggable="false" style="max-width: none; max-height: 220px;" />
16
+ <# } else { #>
17
+ <img src="{{ data.icon }}" class="icon" draggable="false" />
18
+ <# } #>
19
+ </div>
20
+ <div class="details">
21
+ <div class="filename">{{ data.filename }}</div>
22
+ <div class="uploaded">{{ data.dateFormatted }}</div>
23
+
24
+ <# if ( 'image' === data.type && ! data.uploading ) { #>
25
+ <# if ( data.width && data.height ) { #>
26
+ <div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
27
+ <# } #>
28
+
29
+ <# if ( data.can.save ) { #>
30
+ <a class="edit-attachment" href="{{ data.editLink }}&amp;image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
31
+ <a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a>
32
+ <# } #>
33
+ <# } #>
34
+
35
+ <# if ( ! data.uploading && data.can.remove ) { #>
36
+ <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
37
+ <# } #>
38
+
39
+ <div class="compat-meta">
40
+ <# if ( data.compat && data.compat.meta ) { #>
41
+ {{{ data.compat.meta }}}
42
+ <# } #>
43
+ </div>
44
+ </div>
45
+ </div>
templates/editslideshow-sidebar.php ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Manage Slides -->
2
+ <div class="widgets-holder-wrap exclude">
3
+ <div class="sidebar-name">
4
+ <div class="sidebar-name-arrow"></div>
5
+ <h3><?php _e( 'Manage Slides', 'rivasliderlite' ); ?></h3>
6
+ </div>
7
+ <div class="sidebar-content widgets-sortables clearfix">
8
+ <div class="hide-if-no-js manage-slides-buttons wp-media-buttons" style="margin-top: 1em;">
9
+ <a href="#" id="add-image" class="button button-secondary add-image" data-editor="content" title="<?php _e( 'Add Images', 'rivasliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Add Images', 'rivasliderlite' ); ?></a>
10
+ <a href="#" id="delete-images" class="button button-secondary delete-images" title="<?php _e( 'Delete Images', 'rivasliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Delete Images', 'rivasliderlite' ); ?></a>
11
+ <?php do_action( 'rivasliderlite_manage_slides_buttons', $s ); ?>
12
+ </div>
13
+ <div class="field">
14
+ <label for="randomize">
15
+ <input type="hidden" name="general[randomize]" value="">
16
+ <input type="checkbox" id="randomize" name="general[randomize]" value="true" <?php checked( $s->general->randomize, true ); ?>><span style="display: inline;"><?php _e( 'Randomize the slideshow order.', 'rivasliderlite' ); ?></span>
17
+ </label>
18
+ </div>
19
+ <?php do_action( 'rivasliderlite_manage_slides_metabox', $s ); ?>
20
+ </div>
21
+ </div>
22
+
23
+ <!-- Dimensions -->
24
+ <div class="widgets-holder-wrap" <?php if ( (bool) apply_filters( 'rivasliderlite_hide_dimensions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
25
+ <div class="sidebar-name">
26
+ <div class="sidebar-name-arrow"></div>
27
+ <h3><?php _e( 'Dimensions', 'rivasliderlite' ); ?></h3>
28
+ </div>
29
+ <div class="sidebar-content widgets-sortables clearfix">
30
+ <div class="dimension-settings">
31
+ <div class="field">
32
+ <label for="width">
33
+ <span><?php _e( 'Width:', 'rivasliderlite' ); ?></span>
34
+ <input type="number" name="dimensions[width]" id="width" value="<?php echo esc_attr( $s->dimensions->width ); ?>">
35
+ </label>
36
+ </div>
37
+ <div class="field">
38
+ <label for="height">
39
+ <span><?php _e( 'Height:', 'rivasliderlite' ); ?></span>
40
+ <input type="number" name="dimensions[height]" id="height" value="<?php echo esc_attr( $s->dimensions->height ); ?>">
41
+ </label>
42
+ </div>
43
+ <p class="description"><?php _e( 'Slideshow "width" and "height" values (in pixels).', 'rivasliderlite' ); ?></p>
44
+ </div>
45
+ <div class="divider"></div>
46
+ <div>
47
+ <div class="field">
48
+ <label for="responsive">
49
+ <input type="hidden" name="dimensions[responsive]" value="">
50
+ <input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $s->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slideshow responsive.', 'rivasliderlite' ); ?></span>
51
+ </label>
52
+ </div>
53
+ <p class="description"><?php _e( 'Check this option to make this slideshow responsive. If enabled, the "width" and "height" values above will act as maximums.', 'rivasliderlite' ); ?></p>
54
+ </div>
55
+ <?php do_action( 'rivasliderlite_dimensions_metabox', $s ); ?>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Transitions -->
60
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_transitions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
61
+ <div class="sidebar-name">
62
+ <div class="sidebar-name-arrow"></div>
63
+ <h3><?php _e( 'Transitions', 'rivasliderlite' ); ?></h3>
64
+ </div>
65
+ <div class="sidebar-content widgets-sortables clearfix" style="display: none;">
66
+ <div>
67
+ <div class="field">
68
+ <label for="effect">
69
+ <span><?php _e( 'Effect:', 'rivasliderlite' ); ?></span>
70
+ <select name="transitions[effect]" id="effect">
71
+ <option value="slide" <?php selected( $s->transitions->effect, 'slide' ); ?>><?php _e( 'Slide', 'rivasliderlite' ); ?></option>
72
+ <option value="fade" <?php selected( $s->transitions->effect, 'fade' ); ?>><?php _e( 'Fade', 'rivasliderlite' ); ?></option>
73
+ </select>
74
+ </label>
75
+ </div>
76
+ <p class="description"><?php _e( 'Choose the transition effect you would like to use.', 'rivasliderlite' ); ?></p>
77
+ </div>
78
+ <div class="divider"></div>
79
+ <div>
80
+ <div class="field">
81
+ <label for="duration">
82
+ <span><?php _e( 'Duration:', 'rivasliderlite' ); ?></span>
83
+ <input type="number" name="transitions[duration]" id="duration" value="<?php echo esc_attr( $s->transitions->duration ); ?>">
84
+ </label>
85
+ </div>
86
+ <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the slideshow transition.', 'rivasliderlite' ); ?></p>
87
+ </div>
88
+ <?php do_action( 'rivasliderlite_transitions_metabox', $s ); ?>
89
+ </div>
90
+ </div>
91
+
92
+ <!-- Next & Previous Arrows -->
93
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_arrows_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
94
+ <div class="sidebar-name">
95
+ <div class="sidebar-name-arrow"></div>
96
+ <h3><?php _e( 'Next & Previous Arrows', 'rivasliderlite' ); ?></h3>
97
+ </div>
98
+ <div class="sidebar-content widgets-sortables" style="display: none;">
99
+ <div>
100
+ <div class="radio clearfix">
101
+ <span><?php _e( 'Arrows:', 'rivasliderlite' ); ?></span>
102
+ <div class="buttons">
103
+ <label for="arrows-enable"><input type="radio" name="navigation[arrows]" id="arrows-enable" value="true" <?php checked( $s->navigation->arrows, true ); ?>>
104
+ <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
105
+ </label>
106
+ <label for="arrows-disable"><input type="radio" name="navigation[arrows]" id="arrows-disable" value="false" <?php checked( $s->navigation->arrows, false ); ?>>
107
+ <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
108
+ </label>
109
+ </div>
110
+ </div>
111
+ <p class="description"><?php _e( 'Toggles the next and previous slide arrows.', 'rivasliderlite' ); ?></p>
112
+ </div>
113
+ <div class="divider"></div>
114
+ <div>
115
+ <div class="radio clearfix">
116
+ <span><?php _e( 'On Hover:', 'rivasliderlite' ); ?></span>
117
+ <div class="buttons">
118
+ <label for="arrows-hover-true"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-true" value="true" <?php checked( $s->navigation->arrows_hover, true ); ?>>
119
+ <span><?php _e( 'True', 'rivasliderlite' ); ?></span>
120
+ </label>
121
+ <label for="arrows-hover-false"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-false" value="false" <?php checked( $s->navigation->arrows_hover, false ); ?>>
122
+ <span><?php _e( 'False', 'rivasliderlite' ); ?></span>
123
+ </label>
124
+ </div>
125
+ </div>
126
+ <p class="description"><?php _e( 'Set to "True" to only show the arrows when the user hovers over the slideshow.', 'rivasliderlite' ); ?></p>
127
+ </div>
128
+ <div class="divider"></div>
129
+ <div>
130
+ <div class="field">
131
+ <label for="arrows_position">
132
+ <span><?php _e( 'Position:', 'rivasliderlite' ); ?></span>
133
+ <select name="navigation[arrows_position]" id="arrows_position">
134
+ <option value="inside" <?php selected( $s->navigation->arrows_position, 'inside' ); ?>><?php _e( 'Inside', 'rivasliderlite' ); ?></option>
135
+ <option value="outside" <?php selected( $s->navigation->arrows_position, 'outside' ); ?>><?php _e( 'Outside', 'rivasliderlite' ); ?></option>
136
+ </select>
137
+ </label>
138
+ </div>
139
+ <p class="description"><?php _e( 'Select a position for the arrows.', 'rivasliderlite' ); ?></p>
140
+ </div>
141
+ <?php do_action( 'rivasliderlite_arrows_metabox', $s ); ?>
142
+ </div>
143
+ </div>
144
+
145
+ <!-- Pagination Icons -->
146
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_pagination_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
147
+ <div class="sidebar-name">
148
+ <div class="sidebar-name-arrow"></div>
149
+ <h3><?php _e( 'Pagination Icons', 'rivasliderlite' ); ?></h3>
150
+ </div>
151
+ <div class="sidebar-content widgets-sortables" style="display: none;">
152
+ <div>
153
+ <div class="radio clearfix">
154
+ <span><?php _e( 'Pagination:', 'rivasliderlite' ); ?></span>
155
+ <div class="buttons">
156
+ <label for="pagination-enable"><input type="radio" name="navigation[pagination]" id="pagination-enable" value="true" <?php checked( $s->navigation->pagination, true ); ?>>
157
+ <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
158
+ </label>
159
+ <label for="pagination-disable"><input type="radio" name="navigation[pagination]" id="pagination-disable" value="false" <?php checked( $s->navigation->pagination, false ); ?>>
160
+ <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
161
+ </label>
162
+ </div>
163
+ </div>
164
+ <p class="description"><?php _e( 'Enable/Disable the Pagination Icons. Each icon represents a slide in their respective order.', 'rivasliderlite' ); ?></p>
165
+ </div>
166
+ <div class="divider"></div>
167
+ <div>
168
+ <div class="radio clearfix">
169
+ <span><?php _e( 'On Hover:', 'rivasliderlite' ); ?></span>
170
+ <div class="buttons">
171
+ <label for="pagination-hover-true"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-true" value="true" <?php checked( $s->navigation->pagination_hover, true ); ?>>
172
+ <span><?php _e( 'True', 'rivasliderlite' ); ?></span>
173
+ </label>
174
+ <label for="pagination-hover-false"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-false" value="false" <?php checked( $s->navigation->pagination_hover, false ); ?>>
175
+ <span><?php _e( 'False', 'rivasliderlite' ); ?></span>
176
+ </label>
177
+ </div>
178
+ </div>
179
+ <p class="description"><?php _e( 'Set to "True" to only show the pagination when the user hovers over the slideshow.', 'rivasliderlite' ); ?></p>
180
+ </div>
181
+ <div class="divider"></div>
182
+ <div>
183
+ <div class="field">
184
+ <label for="pagination_position">
185
+ <span><?php _e( 'Position:', 'rivasliderlite' ); ?></span>
186
+ <select name="navigation[pagination_position]" id="pagination_position" style="width: 45%; float: left;">
187
+ <option value="inside" <?php selected( $s->navigation->pagination_position, 'inside' ); ?>><?php _e( 'Inside', 'rivasliderlite' ); ?></option>
188
+ <option value="outside" <?php selected( $s->navigation->pagination_position, 'outside' ); ?>><?php _e( 'Outside', 'rivasliderlite' ); ?></option>
189
+ </select>
190
+ <select name="navigation[pagination_location]" id="pagination_location" style="width: 45%; float: left; margin-left: 10px;">
191
+ <option value="top-left" <?php selected( $s->navigation->pagination_location, 'top-left' ); ?>><?php _e( 'Top Left', 'rivasliderlite' ); ?></option>
192
+ <option value="top-right" <?php selected( $s->navigation->pagination_location, 'top-right' ); ?>><?php _e( 'Top Right', 'rivasliderlite' ); ?></option>
193
+ <option value="top-center" <?php selected( $s->navigation->pagination_location, 'top-center' ); ?>><?php _e( 'Top Center', 'rivasliderlite' ); ?></option>
194
+ <option value="bottom-left" <?php selected( $s->navigation->pagination_location, 'bottom-left' ); ?>><?php _e( 'Bottom Left', 'rivasliderlite' ); ?></option>
195
+ <option value="bottom-right" <?php selected( $s->navigation->pagination_location, 'bottom-right' ); ?>><?php _e( 'Bottom Right', 'rivasliderlite' ); ?></option>
196
+ <option value="bottom-center" <?php selected( $s->navigation->pagination_location, 'bottom-center' ); ?>><?php _e( 'Bottom Center', 'rivasliderlite' ); ?></option>
197
+ </select>
198
+ </label>
199
+ </div>
200
+ <p class="description"><?php _e( 'Select a position for the pagination icons.', 'rivasliderlite' ); ?></p>
201
+ </div>
202
+ <?php do_action( 'rivasliderlite_pagination_metabox', $s ); ?>
203
+ </div>
204
+ </div>
205
+
206
+ <!-- Playback -->
207
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_playback_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
208
+ <div class="sidebar-name">
209
+ <div class="sidebar-name-arrow"></div>
210
+ <h3><?php _e( 'Automatic Playback', 'rivasliderlite' ); ?></h3>
211
+ </div>
212
+ <div class="sidebar-content widgets-sortables" style="display: none;">
213
+ <div>
214
+ <div class="radio clearfix">
215
+ <span><?php _e( 'Playback:', 'rivasliderlite' ); ?></span>
216
+ <div class="buttons">
217
+ <label for="playback-enable"><input type="radio" name="playback[enabled]" id="playback-enable" value="true" <?php checked( $s->playback->enabled, true ); ?>>
218
+ <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
219
+ </label>
220
+ <label for="playback-disable"><input type="radio" name="playback[enabled]" id="playback-disable" value="false" <?php checked( $s->playback->enabled, false ); ?>>
221
+ <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
222
+ </label>
223
+ </div>
224
+ </div>
225
+ <p class="description"><?php _e( 'Enable/Disable slideshow automatic playback.', 'rivasliderlite' ); ?></p>
226
+ </div>
227
+ <div class="divider"></div>
228
+ <div>
229
+ <div class="field">
230
+ <label for="playback_pause">
231
+ <span><?php _e( 'Pause Duration:', 'rivasliderlite' ); ?></span>
232
+ <input type="number" name="playback[pause]" id="playback_pause" value="<?php echo esc_attr( $s->playback->pause ); ?>">
233
+ </label>
234
+ </div>
235
+ <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the pause between slide transitions.', 'rivasliderlite' ); ?></p>
236
+ </div>
237
+ <?php do_action( 'rivasliderlite_playback_metabox', $s ); ?>
238
+ </div>
239
+ </div>
templates/editslideshow-slide.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Backbone template -->
2
+ <div class="editslideview media-modal wp-core-ui">
3
+ <a class="media-modal-close" href="#" title="Close"><span class="media-modal-icon"></span></a>
4
+ <div class="media-modal-content">
5
+ <div class="media-frame wp-core-ui">
6
+ <div class="media-frame-title">
7
+ <h1><?php _e( 'Edit a Slide: #<%= id %>', 'rivasliderlite' ); ?></h1>
8
+ </div>
9
+
10
+ <div class="media-frame-router" style="height: 0;"></div>
11
+
12
+ <div class="media-frame-content" style="top: 45px;">
13
+ <div class="media-main media-embed">
14
+ <div id="general" class="media-tab">
15
+ <div class="embed-link-settings" style="top: 0;">
16
+ <div class="thumbnail">
17
+ <% var size = sizes.large || sizes.medium || sizes.thumbnail || url; %>
18
+ <img src="<%= size.url %>" class="slide-thumbnail" alt="<%= alt %>" />
19
+ <a href="#" id="change-image" class="button button-primary button-large change-image" data-editor="content" title="Change Image"><span class="wp-media-buttons-icon"></span> Change Image</a>
20
+ </div>
21
+
22
+ <label for="link" class="setting">
23
+ <span><?php _e( 'Link URL', 'rivasliderlite' ); ?></span>
24
+ <input type="text" id="link" value="<%= link %>">
25
+ <select id="linkTarget" style="margin-top: 5px;">
26
+ <option value="_self" <% ( '_self' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link same tab/window', 'rivasliderlite' ); ?></option>
27
+ <option value="_blank" <% ( '_blank' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link in new tab/window', 'rivasliderlite' ); ?></option>
28
+ </select>
29
+ <p class="description"><?php _e( 'Enter a URL to link this slide to another page.', 'rivasliderlite' ); ?></p>
30
+ </label>
31
+
32
+ <label for="title" class="setting">
33
+ <span><?php _e( 'Title', 'rivasliderlite' ); ?></span>
34
+ <input type="text" id="title" value="<%= title %>">
35
+ <p class="description"><?php _e( 'Enter a value for the image "title" attribute.'. 'rivasliderlite' ); ?></p>
36
+ </label>
37
+
38
+ <label for="alt" class="setting">
39
+ <span><?php _e( 'Alt Text', 'rivasliderlite' ); ?></span>
40
+ <input type="text" id="alt" value="<%= alt %>">
41
+ <p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.'. 'rivasliderlite' ); ?></p>
42
+ </label>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <div class="media-frame-toolbar">
48
+ <div class="media-toolbar">
49
+ <div class="media-toolbar-primary">
50
+ <a href="#" class="button media-button button-primary button-large media-button-select media-modal-save"><?php _e( 'Apply Changes', 'rivasliderlite' ); ?></a>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <div class="media-modal-backdrop"></div>
templates/editslideshow-welcome.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** Display the panel */
4
+ if ( get_option( 'rivasliderlite_disable_welcome_panel' ) == false ) :
5
+
6
+ /** URL references */
7
+ $links = array(
8
+ 'get-started' => 'http://wordpress.org/extend/plugins/easing-slider/installation/',
9
+ 'display-slideshow' => 'http://wordpress.org/extend/plugins/easing-slider/installation/#display',
10
+ 'faqs' => 'http://wordpress.org/extend/plugins/easing-slider/faq/',
11
+ 'support-forums' => 'http://wordpress.org/support/plugin/easing-slider',
12
+ );
13
+
14
+ ?>
15
+ <div id="rivasliderlite-welcome-message" class="welcome-panel">
16
+ <a href="admin.php?page=rivasliderlite_edit_slideshow&amp;disable_welcome_panel=true" class="welcome-panel-close"><?php _e( 'Dismiss', 'rivasliderlite' ); ?></a>
17
+ <div class="welcome-panel-content">
18
+ <h3><?php _e( 'Welcome to Riva Slider "Lite"', 'rivasliderlite' ); ?></h3>
19
+ <p class="about-description">
20
+ <?php
21
+ if ( get_option( 'rivasliderlite_easingslider_upgrade' ) )
22
+ _e( 'Thanks for upgrading to Riva Slider "Lite". Here are some links to get you clued up on the new plugin.', 'rivasliderlite' );
23
+ else
24
+ _e( 'Thanks for installing Riva Slider "Lite". Here are some links to help get you started.', 'rivasliderlite' );
25
+ ?>
26
+ </p>
27
+
28
+ <div class="welcome-panel-column-container">
29
+ <div class="welcome-panel-column">
30
+ <h4><?php _e( 'Get Started', 'rivasliderlite' ); ?></h4>
31
+ <a class="button button-primary button-hero" href="<?php echo $links['get-started']; ?>"><?php _e( 'View the Documentation', 'rivasliderlite' ); ?></a>
32
+ </div>
33
+
34
+ <div class="welcome-panel-column">
35
+ <h4><?php _e( 'Need some help?', 'rivasliderlite' ); ?></h4>
36
+ <ul>
37
+ <li><a href='<?php echo $links['display-slideshow']; ?>'><?php _e( 'Displaying a Slideshow', 'rivasliderlite' ); ?></a></li>
38
+ <li><a href='<?php echo $links['faqs']; ?>'><?php _e( 'Frequently Asked Questions', 'rivasliderlite' ); ?></a></li>
39
+ <li><a href='<?php echo $links['support-forums']; ?>'><?php _e( 'Support Forums', 'rivasliderlite' ); ?></a></li>
40
+ </ul>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ <?php endif; ?>
templates/editslideshow.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** Get the slideshow */
3
+ $slideshow = $s = RivaSliderLite::get_instance()->validate( get_option( 'rivasliderlite_slideshow' ) );
4
+ ?>
5
+ <div class="wrap">
6
+ <form name="post" action="admin.php?page=rivasliderlite_edit_slideshow" method="post">
7
+ <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
8
+ <h2><?php _e( 'Edit Slideshow', 'rivasliderlite' ); ?></h2>
9
+ <?php
10
+
11
+ /** Display welcome message */
12
+ require 'editslideshow-welcome.php';
13
+
14
+ /** Security nonce field */
15
+ wp_nonce_field( "rivasliderlite-save_rivasliderlite_edit_slideshow", "rivasliderlite-save_rivasliderlite_edit_slideshow", false );
16
+
17
+ ?>
18
+ <div class="main-panel">
19
+ <div class="messages-container">
20
+ <?php do_action( 'rivasliderlite_admin_messages' ); ?>
21
+ </div>
22
+
23
+ <div class="clearfix">
24
+ <div class="thumbnails-container">
25
+ <div class="inner clearfix">
26
+ <?php
27
+ /** We display the current slides anyway using PHP (rather than Javascript) to avoid any rendering delays */
28
+ if ( $s->slides )
29
+ foreach ( $s->slides as $slide )
30
+ echo "<div class='thumbnail' data-id='{$slide->id}'><a href='#' class='delete-button'></a><img src='{$slide->sizes->thumbnail->url}' alt='{$slide->alt}' /></div>";
31
+ ?>
32
+ </div>
33
+ </div>
34
+ <div class="settings-container">
35
+ <?php require 'editslideshow-sidebar.php'; ?>
36
+ </div>
37
+ </div>
38
+ <div class="divider"></div>
39
+
40
+ <input type="hidden" name="author" value="<?php echo esc_attr( $s->author ); ?>">
41
+ <input type="hidden" name="slides" id="slideshow-images" value="">
42
+ <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Slideshow', 'rivasliderlite' ); ?>">
43
+ <?php /** This ensures that the slide's JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
44
+ <script type="text/javascript">document.getElementById('slideshow-images').value = '<?php echo json_encode( $s->slides ); ?>';</script>
45
+ </div>
46
+ </form>
47
+ </div>
templates/slideshow.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** Get the slideshow */
4
+ $slideshow = $s = RivaSliderLite::get_instance()->validate( get_option( 'rivasliderlite_slideshow' ) );
5
+
6
+ /** Return WordPress error if slideshow doesn't exist */
7
+ if ( $s === false )
8
+ return printf( __( 'The slideshow does not appear to exist. Oh dear! Please try contacting support.', 'rivasliderlite' ), $id );
9
+
10
+ /** Get plugin settings */
11
+ $settings = get_option( 'rivasliderlite_settings' );
12
+
13
+ /** Load slideshow scripts and styles in foooter (if set to do so) */
14
+ if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'footer' )
15
+ add_action( 'wp_footer', array( $this, 'enqueue_styles' ) );
16
+ if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'footer' )
17
+ add_action( 'wp_footer', array( $this, 'enqueue_scripts' ) );
18
+
19
+ /** Bail if there are no slides to display */
20
+ if ( count( $slideshow->slides ) == 0 ) {
21
+ if ( current_user_can( 'rivasliderlite_edit_slideshow' ) )
22
+ _e( '<p>This slideshow contains no slides. Uh oh!', 'rivasliderlite' );
23
+ return;
24
+ }
25
+
26
+ /** Inline slideshow styles */
27
+ if ( $s->dimensions->responsive )
28
+ $slideshow_styles = "max-width: {$s->dimensions->width}px; max-height: {$s->dimensions->height}px";
29
+ else
30
+ $slideshow_styles = "width: {$s->dimensions->width}px; height: {$s->dimensions->height}px";
31
+ $slideshow_styles = apply_filters( 'rivasliderlite_slideshow_styles', $slideshow_styles, $s );
32
+ $slideshow_options = json_encode(
33
+ array(
34
+ 'dimensions' => $s->dimensions,
35
+ 'transitions' => $s->transitions,
36
+ 'navigation' => $s->navigation,
37
+ 'playback' => $s->playback
38
+ )
39
+ );
40
+
41
+ /** Dynamically calculcated viewport height */
42
+ $viewport_height = ( 100 * ( $s->dimensions->height / $s->dimensions->width ) );
43
+ $viewport_styles = "padding-top: {$viewport_height}% !important;";
44
+ $viewport_styles = apply_filters( 'rivasliderlite_viewport_styles', $viewport_styles, $s );
45
+
46
+ /** Slide container styles */
47
+ $container_width = ( $s->transitions->effect == 'slide' ) ? ( 100 * ( count( $s->slides )+2 ) ) : '100';
48
+ $container_styles = "display: none; width: {$container_width}%;";
49
+ $container_styles = apply_filters( 'rivasliderlite_container_styles', $container_styles, $s );
50
+
51
+ /** Add viewport height when using 'fade' transition */
52
+ if ( $s->transitions->effect == 'fade' )
53
+ $container_styles .= " padding-top: {$viewport_height}% !important;";
54
+
55
+ ?>
56
+ <div class="rivasliderlite use-<?php echo $s->transitions->effect; ?>" data-options="<?php echo esc_attr( $slideshow_options ); ?>" style="<?php echo esc_attr( $slideshow_styles ); ?>">
57
+ <div class="rivasliderlite-viewport" style="<?php echo esc_attr( $viewport_styles ); ?>">
58
+ <div class="rivasliderlite-slides-container" style="<?php echo esc_attr( $container_styles ); ?>">
59
+ <?php
60
+ /** Randomize the slides if set to do so */
61
+ if ( $s->general->randomize )
62
+ shuffle( $s->slides );
63
+ ?>
64
+ <?php foreach ( $s->slides as $index => $slide ) : ?>
65
+ <?php
66
+
67
+ /** Get slide styles */
68
+ $slide_styles = $slideshow_styles;
69
+ if ( $s->transitions->effect == 'fade' && $index > 0 )
70
+ $slide_styles .= " display: none; opacity: 0;";
71
+
72
+ /** Apply filter for custom styles */
73
+ $slide_styles = apply_filters( 'rivasliderlite_slide_styles', $slide_styles, $slide, $s );
74
+
75
+ /** Resized image */
76
+ if ( $settings['resizing'] )
77
+ $image = RSL_Resize::resize( $slide->url, $s->dimensions->width, $s->dimensions->height, true, true );
78
+ else
79
+ $image = array( 'url' => $slide->url, 'width' => $s->dimensions->width, 'height' => $s->dimensions->height );
80
+
81
+ ?>
82
+ <div class="rivasliderlite-slide" style="<?php echo $slide_styles; ?>">
83
+ <?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
84
+ <img src="<?php echo esc_attr( $image['url'] ); ?>" class="rivasliderlite-image" alt="<?php echo esc_attr( $slide->alt ); ?>" />
85
+ <?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
86
+ <?php if ( !empty( $slide->content ) ) { ?>
87
+ <div class="rivasliderlite-slide-content">
88
+ <?php echo do_shortcode( html_entity_decode( $slide->content ) ) ?>
89
+ </div>
90
+ <?php } ?>
91
+ </div>
92
+ <?php endforeach; ?>
93
+ </div>
94
+ </div>
95
+
96
+ <div class="rivasliderlite-preload"></div>
97
+
98
+ <?php if ( $s->navigation->arrows && !has_action( 'rivasliderlite_arrows' ) ) : ?>
99
+ <div class="rivasliderlite-arrows rivasliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
100
+ <div class="rivasliderlite-arrows rivasliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
101
+ <?php else : do_action( 'rivasliderlite_arrows', $s ); endif; ?>
102
+
103
+ <?php if ( $s->navigation->pagination && !has_action( 'rivasliderlite_pagination' ) ) : ?>
104
+ <div class="rivasliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
105
+ <?php foreach ( $s->slides as $index => $slide ) : ?>
106
+ <div class="rivasliderlite-icon"></div>
107
+ <?php endforeach; ?>
108
+ </div>
109
+ <?php else : do_action( 'rivasliderlite_pagination', $s ); endif; ?>
110
+
111
+ <?php /** Edit slideshow link, don't remove this! Won't show if user isn't logged in or doesn't have permission to edit slideshows */ ?>
112
+ <?php if ( current_user_can( 'rivasliderlite_edit_slideshow' ) && apply_filters( 'rivasliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
113
+ <a href="<?php echo admin_url( "admin.php?page=rivasliderlite_edit_slideshow" ); ?>" style="position: absolute; top: -15px; left: -15px; z-index: 50;">
114
+ <img src="<?php echo plugins_url( dirname( plugin_basename( RivaSliderLite::get_file() ) ) ) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'edit_icon.png'; ?>" style="box-shadow: none; border-radius: none;" />
115
+ </a>
116
+ <?php endif; ?>
117
+ </div>