Photo Gallery by Envira – Responsive Image Gallery for WordPress - Version 1.1.6

Version Description

  • Fix: Upgraded Fancybox to 2.1.5
  • Fix: Improved error message UI when uploading files exceeding WordPress / PHP file size limits
Download this release

Release Info

Developer n7studios
Plugin Icon 128x128 Photo Gallery by Envira – Responsive Image Gallery for WordPress
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.6

Files changed (42) hide show
  1. assets/css/envira.css +1 -510
  2. assets/css/images/envirabox_buttons.png +0 -0
  3. assets/css/images/envirabox_loading.gif +0 -0
  4. assets/css/images/envirabox_loading@2x.gif +0 -0
  5. assets/css/images/envirabox_overlay.png +0 -0
  6. assets/css/images/envirabox_sprite.png +0 -0
  7. assets/css/images/envirabox_sprite@2x.png +0 -0
  8. assets/css/images/fancy_close.png +0 -0
  9. assets/css/images/fancy_loading.png +0 -0
  10. assets/css/images/fancy_nav_left.png +0 -0
  11. assets/css/images/fancy_nav_right.png +0 -0
  12. assets/css/images/fancy_shadow_e.png +0 -0
  13. assets/css/images/fancy_shadow_n.png +0 -0
  14. assets/css/images/fancy_shadow_ne.png +0 -0
  15. assets/css/images/fancy_shadow_nw.png +0 -0
  16. assets/css/images/fancy_shadow_s.png +0 -0
  17. assets/css/images/fancy_shadow_se.png +0 -0
  18. assets/css/images/fancy_shadow_sw.png +0 -0
  19. assets/css/images/fancy_shadow_w.png +0 -0
  20. assets/css/images/fancy_title_left.png +0 -0
  21. assets/css/images/fancy_title_main.png +0 -0
  22. assets/css/images/fancy_title_over.png +0 -0
  23. assets/css/images/fancy_title_right.png +0 -0
  24. assets/css/images/fancybox-x.png +0 -0
  25. assets/css/images/fancybox-y.png +0 -0
  26. assets/css/images/fancybox.png +0 -0
  27. assets/css/images/social.png +0 -0
  28. assets/css/images/social@2x.png +0 -0
  29. assets/js/envira.js +0 -1942
  30. assets/js/lib/fancybox.js +2015 -0
  31. assets/js/lib/isotope.js +950 -0
  32. assets/js/lib/mousewheel.js +221 -0
  33. assets/js/metabox.js +50 -33
  34. assets/js/min/envira-min.js +2 -2
  35. assets/js/min/metabox-min.js +1 -1
  36. assets/scss/.sass-cache/9f73c5ea7e9af27ecf0a2c0b5c8c2f634d4a9f0d/envira.scssc +0 -0
  37. assets/scss/envira.scss +625 -0
  38. config.codekit +1251 -0
  39. envira-gallery-lite.php +2 -2
  40. includes/admin/metaboxes.php +1 -1
  41. includes/global/shortcode.php +8 -25
  42. readme.txt +9 -1
assets/css/envira.css CHANGED
@@ -1,510 +1 @@
1
- /* ==========================================================================
2
- Envira Gallery Styles
3
- ========================================================================== */
4
-
5
- .envira-gallery-wrap,
6
- .envira-gallery-wrap * {
7
- background:none;
8
- border:0;
9
- border-radius:0;
10
- -webkit-border-radius:0;
11
- -moz-border-radius:0;
12
- float:none;
13
- font:normal 100%/normal helvetica,arial,sans-serif;
14
- -webkit-font-smoothing:antialiased;
15
- height:auto;
16
- letter-spacing:normal;
17
- list-style:none;
18
- outline:none;
19
- position:static;
20
- text-decoration:none;
21
- text-indent:0;
22
- text-shadow:none;
23
- text-transform:none;
24
- width:auto;
25
- visibility:visible;
26
- overflow:visible;
27
- margin:0;
28
- padding:0;
29
- line-height:1;
30
- box-sizing:border-box;
31
- -webkit-box-sizing:border-box;
32
- -moz-box-sizing:border-box;
33
- -webkit-box-shadow:none;
34
- -moz-box-shadow:none;
35
- -ms-box-shadow:none;
36
- -o-box-shadow:none;
37
- box-shadow:none;
38
- -webkit-appearance:none;
39
- transition: none;
40
- -webkit-transition: none;
41
- -moz-transition: none;
42
- -o-transition: none;
43
- -ms-transition: none;
44
- }
45
-
46
- .envira-gallery-wrap {
47
- opacity: 1;
48
- min-height: 16px;
49
- background: transparent url('images/preloader.gif') no-repeat scroll 50% 0;
50
- }
51
-
52
- .envira-gallery-public,
53
- .envira-gallery-public .envira-gallery-item {
54
- -webkit-transition-duration: 0.8s;
55
- -moz-transition-duration: 0.8s;
56
- -ms-transition-duration: 0.8s;
57
- -o-transition-duration: 0.8s;
58
- transition-duration: 0.8s;
59
- }
60
-
61
- .envira-gallery-public,
62
- .envira-gallery-wrap {
63
- -webkit-transition-property: height, width;
64
- -moz-transition-property: height, width;
65
- -ms-transition-property: height, width;
66
- -o-transition-property: height, width;
67
- transition-property: height, width;
68
- margin: 0 auto 20px;
69
- max-width: 100%;
70
- -webkit-box-sizing: border-box;
71
- -moz-box-sizing: border-box;
72
- box-sizing: border-box;
73
- }
74
-
75
- .envira-gallery-public .envira-gallery-item {
76
- -webkit-transition-property: -webkit-transform, top, left, opacity;
77
- -moz-transition-property: -moz-transform, top, left, opacity;
78
- -ms-transition-property: -ms-transform, top, left, opacity;
79
- -o-transition-property: -o-transform, top, left, opacity;
80
- transition-property: transform, top, left, opacity;
81
- margin-bottom: 10px;
82
- float: left;
83
- width: 200px;
84
- }
85
-
86
- .envira-gallery-public .envira-gallery-item.envira-item-last {
87
- margin-right: 0;
88
- }
89
-
90
- .envira-gallery-public .envira-gallery-item > .envira-gallery-link {
91
- display: block;
92
- outline: none;
93
- border: 0 none;
94
- }
95
-
96
- .envira-gallery-public .envira-gallery-item img {
97
- display: block;
98
- max-width: 100%;
99
- margin: 0 auto;
100
- opacity: 0;
101
- transition: opacity .3s ease-in;
102
- -moz-transition: opacity .3s ease-in;
103
- -webkit-transition: opacity .3s ease-in;
104
- -ms-transition: opacity .3s ease-in;
105
- -o-transition: opacity .3s ease-in;
106
- }
107
-
108
- .envira-clear {
109
- clear: both;
110
- }
111
-
112
- .envira-clear:after {
113
- clear: both;
114
- content: '.';
115
- display: block;
116
- height: 0;
117
- line-height: 0;
118
- overflow: auto;
119
- visibility: hidden;
120
- zoom: 1;
121
- }
122
-
123
- /* ==========================================================================
124
- Envira Lightbox Gallery Styles
125
- ========================================================================== */
126
-
127
- /*
128
- * FancyBox - jQuery Plugin
129
- * Simple and fancy lightbox alternative
130
- *
131
- * Examples and documentation at: http://fancybox.net
132
- *
133
- * Copyright (c) 2008 - 2010 Janis Skarnelis
134
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
135
- *
136
- * Version: 1.3.4 (11/11/2010)
137
- * Requires: jQuery v1.3+
138
- *
139
- * Dual licensed under the MIT and GPL licenses:
140
- * http://www.opensource.org/licenses/mit-license.php
141
- * http://www.gnu.org/licenses/gpl.html
142
- */
143
-
144
- #fancybox-wrap,
145
- #fancybox-wrap *,
146
- #fancybox-overlay {
147
- box-sizing: content-box;
148
- -webkit-box-sizing: content-box;
149
- -moz-box-sizing: content-box;
150
- }
151
-
152
- #fancybox-loading {
153
- position: fixed;
154
- top: 50%;
155
- left: 50%;
156
- width: 40px;
157
- height: 40px;
158
- margin-top: -20px;
159
- margin-left: -20px;
160
- cursor: pointer;
161
- overflow: hidden;
162
- z-index: 1104;
163
- display: none;
164
- }
165
-
166
- #fancybox-loading div {
167
- position: absolute;
168
- top: 0;
169
- left: 0;
170
- width: 40px;
171
- height: 480px;
172
- background-image: url('images/fancybox.png');
173
- }
174
-
175
- #fancybox-overlay {
176
- position: absolute;
177
- top: 0;
178
- left: 0;
179
- width: 100%;
180
- z-index: 1100;
181
- display: none;
182
- }
183
-
184
- #fancybox-tmp {
185
- padding: 0;
186
- margin: 0;
187
- border: 0;
188
- overflow: auto;
189
- display: none;
190
- }
191
-
192
- #fancybox-wrap {
193
- position: absolute;
194
- top: 0;
195
- left: 0;
196
- padding: 20px;
197
- z-index: 1101;
198
- outline: none;
199
- display: none;
200
- }
201
-
202
- #fancybox-outer {
203
- position: relative;
204
- width: 100%;
205
- height: 100%;
206
- background: #fff;
207
- }
208
-
209
- #fancybox-content {
210
- width: 0;
211
- height: 0;
212
- padding: 0;
213
- outline: none;
214
- position: relative;
215
- overflow: hidden;
216
- z-index: 1102;
217
- border: 0px solid #fff;
218
- }
219
-
220
- #fancybox-hide-sel-frame {
221
- position: absolute;
222
- top: 0;
223
- left: 0;
224
- width: 100%;
225
- height: 100%;
226
- background: transparent;
227
- z-index: 1101;
228
- }
229
-
230
- #fancybox-close {
231
- position: absolute;
232
- top: -15px;
233
- right: -15px;
234
- width: 30px;
235
- height: 30px;
236
- background: transparent url('images/fancybox.png') -40px 0px;
237
- cursor: pointer;
238
- z-index: 1103;
239
- display: none;
240
- }
241
-
242
- #fancybox-error {
243
- color: #444;
244
- font: normal 12px/20px Arial;
245
- padding: 14px;
246
- margin: 0;
247
- }
248
-
249
- #fancybox-img {
250
- width: 100%;
251
- height: 100%;
252
- padding: 0;
253
- margin: 0;
254
- border: none;
255
- outline: none;
256
- line-height: 0;
257
- vertical-align: top;
258
- }
259
-
260
- #fancybox-frame {
261
- width: 100%;
262
- height: 100%;
263
- border: none;
264
- display: block;
265
- }
266
-
267
- #fancybox-left, #fancybox-right {
268
- position: absolute;
269
- bottom: 0px;
270
- height: 100%;
271
- width: 35%;
272
- cursor: pointer;
273
- outline: none;
274
- background: transparent url('images/blank.gif');
275
- z-index: 1102;
276
- display: none;
277
- }
278
-
279
- #fancybox-left {
280
- left: 0px;
281
- }
282
-
283
- #fancybox-right {
284
- right: 0px;
285
- }
286
-
287
- #fancybox-left-ico, #fancybox-right-ico {
288
- position: absolute;
289
- top: 50%;
290
- left: -9999px;
291
- width: 30px;
292
- height: 30px;
293
- margin-top: -15px;
294
- cursor: pointer;
295
- z-index: 1102;
296
- display: block;
297
- }
298
-
299
- #fancybox-left-ico {
300
- background-image: url('images/fancybox.png');
301
- background-position: -40px -30px;
302
- }
303
-
304
- #fancybox-right-ico {
305
- background-image: url('images/fancybox.png');
306
- background-position: -40px -60px;
307
- }
308
-
309
- #fancybox-left:hover, #fancybox-right:hover {
310
- visibility: visible; /* IE6 */
311
- }
312
-
313
- #fancybox-left:hover span {
314
- left: 20px;
315
- }
316
-
317
- #fancybox-right:hover span {
318
- left: auto;
319
- right: 20px;
320
- }
321
-
322
- .fancybox-bg {
323
- position: absolute;
324
- padding: 0;
325
- margin: 0;
326
- border: 0;
327
- width: 20px;
328
- height: 20px;
329
- z-index: 1001;
330
- }
331
-
332
- #fancybox-bg-n {
333
- top: -20px;
334
- left: 0;
335
- width: 100%;
336
- background-image: url('images/fancybox-x.png');
337
- }
338
-
339
- #fancybox-bg-ne {
340
- top: -20px;
341
- right: -20px;
342
- background-image: url('images/fancybox.png');
343
- background-position: -40px -162px;
344
- }
345
-
346
- #fancybox-bg-e {
347
- top: 0;
348
- right: -20px;
349
- height: 100%;
350
- background-image: url('images/fancybox-y.png');
351
- background-position: -20px 0px;
352
- }
353
-
354
- #fancybox-bg-se {
355
- bottom: -20px;
356
- right: -20px;
357
- background-image: url('images/fancybox.png');
358
- background-position: -40px -182px;
359
- }
360
-
361
- #fancybox-bg-s {
362
- bottom: -20px;
363
- left: 0;
364
- width: 100%;
365
- background-image: url('images/fancybox-x.png');
366
- background-position: 0px -20px;
367
- }
368
-
369
- #fancybox-bg-sw {
370
- bottom: -20px;
371
- left: -20px;
372
- background-image: url('images/fancybox.png');
373
- background-position: -40px -142px;
374
- }
375
-
376
- #fancybox-bg-w {
377
- top: 0;
378
- left: -20px;
379
- height: 100%;
380
- background-image: url('images/fancybox-y.png');
381
- }
382
-
383
- #fancybox-bg-nw {
384
- top: -20px;
385
- left: -20px;
386
- background-image: url('images/fancybox.png');
387
- background-position: -40px -122px;
388
- }
389
-
390
- #fancybox-title {
391
- font-family: Helvetica;
392
- font-size: 12px;
393
- z-index: 1102;
394
- }
395
-
396
- .fancybox-title-inside {
397
- padding-bottom: 10px;
398
- text-align: center;
399
- color: #333;
400
- background: #fff;
401
- position: relative;
402
- }
403
-
404
- .fancybox-title-outside {
405
- padding-top: 10px;
406
- color: #fff;
407
- }
408
-
409
- .fancybox-title-over {
410
- position: absolute;
411
- bottom: 0;
412
- left: 0;
413
- color: #FFF;
414
- text-align: left;
415
- }
416
-
417
- #fancybox-title-over {
418
- padding: 10px;
419
- background-image: url('images/fancy_title_over.png');
420
- display: block;
421
- }
422
-
423
- .fancybox-title-float {
424
- position: absolute;
425
- left: 0;
426
- bottom: -20px;
427
- height: 32px;
428
- }
429
-
430
- #fancybox-title-float-wrap {
431
- border: none;
432
- border-collapse: collapse;
433
- width: auto;
434
- }
435
-
436
- #fancybox-title-float-wrap tbody,
437
- #fancybox-title-float-wrap td {
438
- border: none;
439
- white-space: nowrap;
440
- }
441
-
442
- #fancybox-title-float-left {
443
- padding: 0 0 0 15px;
444
- background: url('images/fancybox.png') -40px -90px no-repeat;
445
- }
446
-
447
- #fancybox-title-float-main {
448
- color: #FFF;
449
- line-height: 29px;
450
- font-weight: bold;
451
- padding: 0 0 3px 0;
452
- background: url('images/fancybox-x.png') 0px -40px;
453
- }
454
-
455
- #fancybox-title-float-right {
456
- padding: 0 0 0 15px;
457
- background: url('images/fancybox.png') -55px -90px no-repeat;
458
- }
459
-
460
- /* IE6 */
461
-
462
- .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_close.png', sizingMethod='scale'); }
463
-
464
- .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_nav_left.png', sizingMethod='scale'); }
465
- .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_nav_right.png', sizingMethod='scale'); }
466
-
467
- .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
468
- .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_title_left.png', sizingMethod='scale'); }
469
- .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_title_main.png', sizingMethod='scale'); }
470
- .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_title_right.png', sizingMethod='scale'); }
471
-
472
- .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
473
- height: expression(this.parentNode.clientHeight + "px");
474
- }
475
-
476
- #fancybox-loading.fancybox-ie6 {
477
- position: absolute; margin-top: 0;
478
- top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
479
- }
480
-
481
- #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_loading.png', sizingMethod='scale'); }
482
-
483
- /* IE6, IE7, IE8 */
484
-
485
- .fancybox-ie .fancybox-bg { background: transparent !important; }
486
-
487
- .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
488
- .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
489
- .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
490
- .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
491
- .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
492
- .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
493
- .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
494
- .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
495
-
496
- /* Retina stuff */
497
- @media
498
- only screen and (-webkit-min-device-pixel-ratio: 2),
499
- only screen and ( min--moz-device-pixel-ratio: 2),
500
- only screen and ( -o-min-device-pixel-ratio: 2/1),
501
- only screen and ( min-device-pixel-ratio: 2),
502
- only screen and ( min-resolution: 192dpi),
503
- only screen and ( min-resolution: 2dppx) {
504
-
505
- .envira-gallery-wrap {
506
- background-image: url('images/preloader@2x.gif');
507
- background-size: 16px 16px;
508
- }
509
-
510
- }
1
+ .envira-gallery-wrap,.envira-gallery-wrap *,.envira-tags-filter-list,.envira-tags-filter-list *{background:none;border:0 none;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;float:none;font-size:100%;height:auto;letter-spacing:normal;list-style:none;outline:none;position:static;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;width:auto;visibility:visible;overflow:visible;margin:0;padding:0;line-height:1;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-shadow:none;-moz-box-shadow:none;-ms-box-shadow:none;-o-box-shadow:none;box-shadow:none;-webkit-appearance:none;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none}.envira-gallery-wrap{width:100%;margin:0 auto 20px auto}.envira-gallery-wrap .envira-gallery-public{width:100%;margin:0 auto 20px auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.envira-gallery-wrap .envira-gallery-public.envira-clear{clear:both}.envira-gallery-wrap .envira-gallery-public.envira-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}.envira-gallery-wrap .envira-gallery-public .envira-gallery-item{float:left}.envira-gallery-wrap .envira-gallery-public .envira-gallery-item>.envira-gallery-link{display:block;outline:none;border:0 none;position:relative}.envira-gallery-wrap .envira-gallery-public .envira-gallery-item img{display:block;margin:0 auto;max-width:100%}.envira-gallery-wrap.envira-gallery-rtl .envira-gallery-public .envira-gallery-item{float:right}/*! envirabox v2.1.5 fancyapps.com | fancyapps.com/envirabox/#license */.envirabox-wrap,.envirabox-skin,.envirabox-outer,.envirabox-inner,.envirabox-image,.envirabox-wrap iframe,.envirabox-wrap object,.envirabox-nav,.envirabox-nav span,.envirabox-tmp,.envirabox-buttons,.envirabox-thumbs,.envirabox-wrap *,.envirabox-thumbs *,.envirabox-buttons *{background:none;border:0 none;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;float:none;font-size:100%;height:auto;letter-spacing:normal;list-style:none;outline:none;position:static;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;width:auto;visibility:visible;overflow:visible;margin:0;padding:0;line-height:1;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-shadow:none;-moz-box-shadow:none;-ms-box-shadow:none;-o-box-shadow:none;box-shadow:none;-webkit-appearance:none;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;-ms-transition:none}.envirabox-wrap{position:absolute;top:0;left:0;z-index:988020}.envirabox-skin{position:relative;background:#f9f9f9;color:#444;text-shadow:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.envirabox-opened{z-index:988030}.envirabox-opened .envirabox-skin{-webkit-box-shadow:0 10px 25px rgba(0,0,0,0.5);-moz-box-shadow:0 10px 25px rgba(0,0,0,0.5);box-shadow:0 10px 25px rgba(0,0,0,0.5)}.envirabox-outer,.envirabox-inner{position:relative}.envirabox-inner{overflow:hidden}.envirabox-type-iframe .envirabox-inner{-webkit-overflow-scrolling:touch}.envirabox-error{color:#444;font:13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;padding:15px;white-space:nowrap}.envirabox-image,.envirabox-iframe{display:block;width:100%;height:100%}.envirabox-image{max-width:100%;max-height:100%}#envirabox-loading,.envirabox-close,.envirabox-prev span,.envirabox-next span{background-image:url("images/envirabox_sprite.png")}#envirabox-loading{position:fixed;top:50%;left:50%;margin-top:-22px;margin-left:-22px;background-position:0 -108px;opacity:0.8;cursor:pointer;z-index:988060}#envirabox-loading div{width:44px;height:44px;background:url("images/envirabox_loading.gif") center center no-repeat}.envirabox-close{position:absolute;top:-18px;right:-18px;width:36px;height:36px;cursor:pointer;z-index:988040}.envirabox-nav{position:absolute;top:0;width:40%;height:100%;cursor:pointer;text-decoration:none;background:transparent url("images/blank.gif");-webkit-tap-highlight-color:transparent;z-index:988040}.envirabox-prev{left:0}.envirabox-next{right:0}.envirabox-nav span{position:absolute;top:50%;width:36px;height:34px;margin-top:-18px;cursor:pointer;z-index:988040;visibility:hidden}.envirabox-prev span{left:10px;background-position:0 -36px}.envirabox-next span{right:10px;background-position:0 -72px}.envirabox-nav:hover span{visibility:visible}.envirabox-tmp{position:absolute;top:-99999px;left:-99999px;max-width:99999px;max-height:99999px;overflow:visible !important}a.envirabox-close,a.envirabox-nav,a.fancy-close:hover,a.envirabox-nav:hover{border:0}.envirabox-lock{overflow:visible !important;width:auto}.envirabox-lock body{overflow:hidden !important}.envirabox-lock-test{overflow-y:hidden !important}.envirabox-overlay{position:absolute;top:0;left:0;overflow:hidden;display:none;z-index:988010;background:url("images/envirabox_overlay.png")}.envirabox-overlay-fixed{position:fixed;bottom:0;right:0}.envirabox-lock .envirabox-overlay{overflow:auto;overflow-y:scroll}.envirabox-title{visibility:hidden;font-size:13px;line-height:20px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;position:relative;text-shadow:none;z-index:988090}.envirabox-opened .envirabox-title{visibility:visible}.envirabox-title-float-wrap{position:absolute;bottom:auto;right:50%;margin-top:20px;z-index:988050;text-align:center}.envirabox-title-float-wrap .child{display:inline-block;margin-right:-100%;padding:2px 20px;background:transparent;background:rgba(0,0,0,0.8);-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;text-shadow:0 1px 2px #222;color:#FFF;line-height:24px;white-space:nowrap}.envirabox-title-outside-wrap{position:relative;margin-top:10px;color:#fff}.envirabox-title-inside-wrap{padding-top:10px}.envirabox-title-over-wrap{position:absolute;bottom:0;left:0;color:#fff;padding:10px;background:#000;background:rgba(0,0,0,0.8)}#envirabox-buttons{position:fixed;left:0;width:100%;z-index:988050}#envirabox-buttons.top{top:10px}#envirabox-buttons.bottom{bottom:10px}#envirabox-buttons.bottom.has-padding{bottom:80px}#envirabox-buttons.top.has-padding{top:80px}#envirabox-buttons ul{display:block;width:auto;height:30px;margin:0 auto;padding:0;list-style:none;border:1px solid #111;border-radius:3px;-webkit-box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05);-moz-box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05);box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05);background:#323232;background:-moz-linear-gradient(top, #444 0%, #343434 50%, #292929 50%, #333 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #444), color-stop(50%, #343434), color-stop(50%, #292929), color-stop(100%, #333));background:-webkit-linear-gradient(top, #444 0%, #343434 50%, #292929 50%, #333 100%);background:-o-linear-gradient(top, #444 0%, #343434 50%, #292929 50%, #333 100%);background:-ms-linear-gradient(top, #444 0%, #343434 50%, #292929 50%, #333 100%);background:linear-gradient(top, #444 0%, #343434 50%, #292929 50%, #333 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 )}#envirabox-buttons ul li{float:left;margin:0;padding:0}#envirabox-buttons ul li#envirabox-buttons-title span{display:inline-block;padding:0 10px;color:#fff}#envirabox-buttons a{display:block;width:30px;height:30px;text-indent:-9999px;background-color:transparent;background-image:url("images/envirabox_buttons.png");background-repeat:no-repeat;outline:none;opacity:0.8}#envirabox-buttons a:hover{opacity:1}#envirabox-buttons a.btnPrev{background-position:5px 0}#envirabox-buttons a.btnNext{background-position:-33px 0;border-right:1px solid #3e3e3e}#envirabox-buttons a.btnPlay{background-position:0 -30px}#envirabox-buttons a.btnPlayOn{background-position:-30px -30px}#envirabox-buttons a.btnToggle,#envirabox-buttons a.btnFullscreen{background-position:3px -60px;border-left:1px solid #111;border-right:1px solid #3e3e3e;width:35px}#envirabox-buttons a.btnToggleOn,#envirabox-buttons a.btnFullscreenOn{background-position:-27px -60px}#envirabox-buttons a.btnClose{border-left:1px solid #111;width:35px;background-position:-56px 0px}#envirabox-buttons a.btnDisabled{opacity:0.4;cursor:default}#envirabox-thumbs{position:fixed;left:0;width:100%;overflow:hidden;z-index:988050}#envirabox-thumbs.bottom{bottom:2px}#envirabox-thumbs.top{top:2px}#envirabox-thumbs ul{position:relative;list-style:none;margin:0;padding:0}#envirabox-thumbs ul li{border:3px solid #fff;float:left;margin:5px;opacity:1}#envirabox-thumbs ul li.active{opacity:0.75;border:3px solid #888}#envirabox-thumbs ul li:hover{opacity:0.75}#envirabox-thumbs ul li a{display:block;position:relative;overflow:hidden;border:1px solid #222;background:#111;outline:none}#envirabox-thumbs ul li img{display:block;position:relative;border:0;padding:0;max-width:none}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){#envirabox-loading,.envirabox-close,.envirabox-prev span,.envirabox-next span{background-image:url("images/envirabox_sprite@2x.png");background-size:44px 152px}#envirabox-loading div{background-image:url("images/envirabox_loading@2x.gif");background-size:24px 24px}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/images/envirabox_buttons.png ADDED
Binary file
assets/css/images/envirabox_loading.gif ADDED
Binary file
assets/css/images/envirabox_loading@2x.gif ADDED
Binary file
assets/css/images/envirabox_overlay.png ADDED
Binary file
assets/css/images/envirabox_sprite.png ADDED
Binary file
assets/css/images/envirabox_sprite@2x.png ADDED
Binary file
assets/css/images/fancy_close.png DELETED
Binary file
assets/css/images/fancy_loading.png DELETED
Binary file
assets/css/images/fancy_nav_left.png DELETED
Binary file
assets/css/images/fancy_nav_right.png DELETED
Binary file
assets/css/images/fancy_shadow_e.png DELETED
Binary file
assets/css/images/fancy_shadow_n.png DELETED
Binary file
assets/css/images/fancy_shadow_ne.png DELETED
Binary file
assets/css/images/fancy_shadow_nw.png DELETED
Binary file
assets/css/images/fancy_shadow_s.png DELETED
Binary file
assets/css/images/fancy_shadow_se.png DELETED
Binary file
assets/css/images/fancy_shadow_sw.png DELETED
Binary file
assets/css/images/fancy_shadow_w.png DELETED
Binary file
assets/css/images/fancy_title_left.png DELETED
Binary file
assets/css/images/fancy_title_main.png DELETED
Binary file
assets/css/images/fancy_title_over.png DELETED
Binary file
assets/css/images/fancy_title_right.png DELETED
Binary file
assets/css/images/fancybox-x.png DELETED
Binary file
assets/css/images/fancybox-y.png DELETED
Binary file
assets/css/images/fancybox.png DELETED
Binary file
assets/css/images/social.png ADDED
Binary file
assets/css/images/social@2x.png ADDED
Binary file
assets/js/envira.js CHANGED
@@ -1,1945 +1,3 @@
1
- // Isotope 1.5.26.
2
- ;
3
- (function(n, f, i) {
4
- var s = n.document;
5
- var w = s.documentElement;
6
- var k = n.Modernizr;
7
- var p = function(z) {
8
- return z.charAt(0).toUpperCase() + z.slice(1)
9
- };
10
- var u = "Moz Webkit O Ms".split(" ");
11
- var o = function(D) {
12
- var C = w.style,
13
- A;
14
- if (typeof C[D] === "string") {
15
- return D
16
- }
17
- D = p(D);
18
- for (var B = 0, z = u.length; B < z; B++) {
19
- A = u[B] + D;
20
- if (typeof C[A] === "string") {
21
- return A
22
- }
23
- }
24
- };
25
- var c = o("transform"),
26
- v = o("transitionProperty");;
27
- var j = {
28
- csstransforms: function() {
29
- return !!c
30
- },
31
- csstransforms3d: function() {
32
- var B = !! o("perspective");
33
- if (B && "webkitPerspective" in w.style) {
34
- var A = f("<style>@media (transform-3d),(-webkit-transform-3d){#modernizr{height:3px}}</style>").appendTo("head"),
35
- z = f('<div id="modernizr" />').appendTo("html");
36
- B = z.height() === 3;
37
- z.remove();
38
- A.remove()
39
- }
40
- return B
41
- },
42
- csstransitions: function() {
43
- return !!v
44
- }
45
- };
46
- var m;
47
- if (k) {
48
- for (m in j) {
49
- if (!k.hasOwnProperty(m)) {
50
- k.addTest(m, j[m])
51
- }
52
- }
53
- } else {
54
- k = n.Modernizr = {
55
- _version: "1.6ish: miniModernizr for Isotope"
56
- };
57
- var y = " ";
58
- var q;
59
- for (m in j) {
60
- q = j[m]();
61
- k[m] = q;
62
- y += " " + (q ? "" : "no-") + m
63
- }
64
- f("html").addClass(y)
65
- } if (k.csstransforms) {
66
- var e = k.csstransforms3d ? {
67
- translate: function(z) {
68
- return "translate3d(" + z[0] + "px, " + z[1] + "px, 0) "
69
- },
70
- scale: function(z) {
71
- return "scale3d(" + z + ", " + z + ", 1) "
72
- }
73
- } : {
74
- translate: function(z) {
75
- return "translate(" + z[0] + "px, " + z[1] + "px) "
76
- },
77
- scale: function(z) {
78
- return "scale(" + z + ") "
79
- }
80
- };
81
- var t = function(C, A, H) {
82
- var F = f.data(C, "isoTransform") || {}, J = {}, B, D = {}, G;
83
- J[A] = H;
84
- f.extend(F, J);
85
- for (B in F) {
86
- G = F[B];
87
- D[B] = e[B](G)
88
- }
89
- var E = D.translate || "",
90
- I = D.scale || "",
91
- z = E + I;
92
- f.data(C, "isoTransform", F);
93
- C.style[c] = z
94
- };
95
- f.cssNumber.scale = true;
96
- f.cssHooks.scale = {
97
- set: function(z, A) {
98
- t(z, "scale", A)
99
- },
100
- get: function(B, A) {
101
- var z = f.data(B, "isoTransform");
102
- return z && z.scale ? z.scale : 1
103
- }
104
- };
105
- f.fx.step.scale = function(z) {
106
- f.cssHooks.scale.set(z.elem, z.now + z.unit)
107
- };
108
- f.cssNumber.translate = true;
109
- f.cssHooks.translate = {
110
- set: function(z, A) {
111
- t(z, "translate", A)
112
- },
113
- get: function(B, A) {
114
- var z = f.data(B, "isoTransform");
115
- return z && z.translate ? z.translate : [0, 0]
116
- }
117
- }
118
- }
119
- var b, a;
120
- if (k.csstransitions) {
121
- b = {
122
- WebkitTransitionProperty: "webkitTransitionEnd",
123
- MozTransitionProperty: "transitionend",
124
- OTransitionProperty: "oTransitionEnd otransitionend",
125
- transitionProperty: "transitionend"
126
- }[v];
127
- a = o("transitionDuration")
128
- }
129
- var l = f.event,
130
- h = f.event.handle ? "handle" : "dispatch",
131
- d;
132
- l.special.smartresize = {
133
- setup: function() {
134
- f(this).bind("resize", l.special.smartresize.handler)
135
- },
136
- teardown: function() {
137
- f(this).unbind("resize", l.special.smartresize.handler)
138
- },
139
- handler: function(C, z) {
140
- var B = this,
141
- A = arguments;
142
- C.type = "smartresize";
143
- if (d) {
144
- clearTimeout(d)
145
- }
146
- d = setTimeout(function() {
147
- l[h].apply(B, A)
148
- }, z === "execAsap" ? 0 : 100)
149
- }
150
- };
151
- f.fn.smartresize = function(z) {
152
- return z ? this.bind("smartresize", z) : this.trigger("smartresize", ["execAsap"])
153
- };
154
- f.Isotope = function(z, A, B) {
155
- this.element = f(A);
156
- this._create(z);
157
- this._init(B)
158
- };
159
- var g = ["width", "height"];
160
- var r = f(n);
161
- f.Isotope.settings = {
162
- resizable: true,
163
- layoutMode: "masonry",
164
- containerClass: "isotope",
165
- itemClass: "isotope-item",
166
- hiddenClass: "isotope-hidden",
167
- hiddenStyle: {
168
- opacity: 0,
169
- scale: 0.001
170
- },
171
- visibleStyle: {
172
- opacity: 1,
173
- scale: 1
174
- },
175
- containerStyle: {
176
- position: "relative",
177
- overflow: "hidden"
178
- },
179
- animationEngine: "best-available",
180
- animationOptions: {
181
- queue: false,
182
- duration: 800
183
- },
184
- sortBy: "original-order",
185
- sortAscending: true,
186
- resizesContainer: true,
187
- transformsEnabled: true,
188
- itemPositionDataEnabled: false
189
- };
190
- f.Isotope.prototype = {
191
- _create: function(E) {
192
- this.options = f.extend({}, f.Isotope.settings, E);
193
- this.styleQueue = [];
194
- this.elemCount = 0;
195
- var C = this.element[0].style;
196
- this.originalStyle = {};
197
- var B = g.slice(0);
198
- for (var G in this.options.containerStyle) {
199
- B.push(G)
200
- }
201
- for (var F = 0, A = B.length; F < A; F++) {
202
- G = B[F];
203
- this.originalStyle[G] = C[G] || ""
204
- }
205
- this.element.css(this.options.containerStyle);
206
- this._updateAnimationEngine();
207
- this._updateUsingTransforms();
208
- var D = {
209
- "original-order": function(I, H) {
210
- H.elemCount++;
211
- return H.elemCount
212
- },
213
- random: function() {
214
- return Math.random()
215
- }
216
- };
217
- this.options.getSortData = f.extend(this.options.getSortData, D);
218
- this.reloadItems();
219
- this.offset = {
220
- left: parseInt((this.element.css("padding-left") || 0), 10),
221
- top: parseInt((this.element.css("padding-top") || 0), 10)
222
- };
223
- var z = this;
224
- setTimeout(function() {
225
- z.element.addClass(z.options.containerClass)
226
- }, 0);
227
- if (this.options.resizable) {
228
- r.bind("smartresize.isotope", function() {
229
- z.resize()
230
- })
231
- }
232
- this.element.delegate("." + this.options.hiddenClass, "click", function() {
233
- return false
234
- })
235
- },
236
- _getAtoms: function(C) {
237
- var z = this.options.itemSelector,
238
- B = z ? C.filter(z).add(C.find(z)) : C,
239
- A = {
240
- position: "absolute"
241
- };
242
- B = B.filter(function(D, E) {
243
- return E.nodeType === 1
244
- });
245
- if (this.usingTransforms) {
246
- A.left = 0;
247
- A.top = 0
248
- }
249
- B.css(A).addClass(this.options.itemClass);
250
- this.updateSortData(B, true);
251
- return B
252
- },
253
- _init: function(z) {
254
- this.$filteredAtoms = this._filter(this.$allAtoms);
255
- this._sort();
256
- this.reLayout(z)
257
- },
258
- option: function(B) {
259
- if (f.isPlainObject(B)) {
260
- this.options = f.extend(true, this.options, B);
261
- var z;
262
- for (var A in B) {
263
- z = "_update" + p(A);
264
- if (this[z]) {
265
- this[z]()
266
- }
267
- }
268
- }
269
- },
270
- _updateAnimationEngine: function() {
271
- var A = this.options.animationEngine.toLowerCase().replace(/[ _\-]/g, "");
272
- var z;
273
- switch (A) {
274
- case "css":
275
- case "none":
276
- z = false;
277
- break;
278
- case "jquery":
279
- z = true;
280
- break;
281
- default:
282
- z = !k.csstransitions
283
- }
284
- this.isUsingJQueryAnimation = z;
285
- this._updateUsingTransforms()
286
- },
287
- _updateTransformsEnabled: function() {
288
- this._updateUsingTransforms()
289
- },
290
- _updateUsingTransforms: function() {
291
- var z = this.usingTransforms = this.options.transformsEnabled && k.csstransforms && k.csstransitions && !this.isUsingJQueryAnimation;
292
- if (!z) {
293
- delete this.options.hiddenStyle.scale;
294
- delete this.options.visibleStyle.scale
295
- }
296
- this.getPositionStyles = z ? this._translate : this._positionAbs
297
- },
298
- _filter: function(F) {
299
- var B = this.options.filter === "" ? "*" : this.options.filter;
300
- if (!B) {
301
- return F
302
- }
303
- var E = this.options.hiddenClass,
304
- A = "." + E,
305
- D = F.filter(A),
306
- z = D;
307
- if (B !== "*") {
308
- z = D.filter(B);
309
- var C = F.not(A).not(B).addClass(E);
310
- this.styleQueue.push({
311
- $el: C,
312
- style: this.options.hiddenStyle
313
- })
314
- }
315
- this.styleQueue.push({
316
- $el: z,
317
- style: this.options.visibleStyle
318
- });
319
- z.removeClass(E);
320
- return F.filter(B)
321
- },
322
- updateSortData: function(E, B) {
323
- var A = this,
324
- C = this.options.getSortData,
325
- D, z;
326
- E.each(function() {
327
- D = f(this);
328
- z = {};
329
- for (var F in C) {
330
- if (!B && F === "original-order") {
331
- z[F] = f.data(this, "isotope-sort-data")[F]
332
- } else {
333
- z[F] = C[F](D, A)
334
- }
335
- }
336
- f.data(this, "isotope-sort-data", z)
337
- })
338
- },
339
- _sort: function() {
340
- var C = this.options.sortBy,
341
- B = this._getSorter,
342
- z = this.options.sortAscending ? 1 : -1,
343
- A = function(G, F) {
344
- var E = B(G, C),
345
- D = B(F, C);
346
- if (E === D && C !== "original-order") {
347
- E = B(G, "original-order");
348
- D = B(F, "original-order")
349
- }
350
- return ((E > D) ? 1 : (E < D) ? -1 : 0) * z
351
- };
352
- this.$filteredAtoms.sort(A)
353
- },
354
- _getSorter: function(z, A) {
355
- return f.data(z, "isotope-sort-data")[A]
356
- },
357
- _translate: function(z, A) {
358
- return {
359
- translate: [z, A]
360
- }
361
- },
362
- _positionAbs: function(z, A) {
363
- return {
364
- left: z,
365
- top: A
366
- }
367
- },
368
- _pushPosition: function(B, A, C) {
369
- A = Math.round(A + this.offset.left);
370
- C = Math.round(C + this.offset.top);
371
- var z = this.getPositionStyles(A, C);
372
- this.styleQueue.push({
373
- $el: B,
374
- style: z
375
- });
376
- if (this.options.itemPositionDataEnabled) {
377
- B.data("isotope-item-position", {
378
- x: A,
379
- y: C
380
- })
381
- }
382
- },
383
- layout: function(C, B) {
384
- var A = this.options.layoutMode;
385
- this["_" + A + "Layout"](C);
386
- if (this.options.resizesContainer) {
387
- var z = this["_" + A + "GetContainerSize"]();
388
- this.styleQueue.push({
389
- $el: this.element,
390
- style: z
391
- })
392
- }
393
- this._processStyleQueue(C, B);
394
- this.isLaidOut = true
395
- },
396
- _processStyleQueue: function(A, P) {
397
- var C = !this.isLaidOut ? "css" : (this.isUsingJQueryAnimation ? "animate" : "css"),
398
- F = this.options.animationOptions,
399
- G = this.options.onLayout,
400
- N, D, J, K;
401
- D = function(Q, R) {
402
- R.$el[C](R.style, F)
403
- };
404
- if (this._isInserting && this.isUsingJQueryAnimation) {
405
- D = function(Q, R) {
406
- N = R.$el.hasClass("no-transition") ? "css" : C;
407
- R.$el[N](R.style, F)
408
- }
409
- } else {
410
- if (P || G || F.complete) {
411
- var B = false,
412
- I = [P, G, F.complete],
413
- O = this;
414
- J = true;
415
- K = function() {
416
- if (B) {
417
- return
418
- }
419
- var S;
420
- for (var R = 0, Q = I.length; R < Q; R++) {
421
- S = I[R];
422
- if (typeof S === "function") {
423
- S.call(O.element, A, O)
424
- }
425
- }
426
- B = true
427
- };
428
- if (this.isUsingJQueryAnimation && C === "animate") {
429
- F.complete = K;
430
- J = false
431
- } else {
432
- if (k.csstransitions) {
433
- var H = 0,
434
- L = this.styleQueue[0],
435
- M = L && L.$el,
436
- z;
437
- while (!M || !M.length) {
438
- z = this.styleQueue[H++];
439
- if (!z) {
440
- return
441
- }
442
- M = z.$el
443
- }
444
- var E = parseFloat(getComputedStyle(M[0])[a]);
445
- if (E > 0) {
446
- D = function(Q, R) {
447
- R.$el[C](R.style, F).one(b, K)
448
- };
449
- J = false
450
- }
451
- }
452
- }
453
- }
454
- }
455
- f.each(this.styleQueue, D);
456
- if (J) {
457
- K()
458
- }
459
- this.styleQueue = []
460
- },
461
- resize: function() {
462
- if (this["_" + this.options.layoutMode + "ResizeChanged"]()) {
463
- this.reLayout()
464
- }
465
- },
466
- reLayout: function(z) {
467
- this["_" + this.options.layoutMode + "Reset"]();
468
- this.layout(this.$filteredAtoms, z)
469
- },
470
- addItems: function(A, B) {
471
- var z = this._getAtoms(A);
472
- this.$allAtoms = this.$allAtoms.add(z);
473
- if (B) {
474
- B(z)
475
- }
476
- },
477
- insert: function(A, B) {
478
- this.element.append(A);
479
- var z = this;
480
- this.addItems(A, function(C) {
481
- var D = z._filter(C);
482
- z._addHideAppended(D);
483
- z._sort();
484
- z.reLayout();
485
- z._revealAppended(D, B)
486
- })
487
- },
488
- appended: function(A, B) {
489
- var z = this;
490
- this.addItems(A, function(C) {
491
- z._addHideAppended(C);
492
- z.layout(C);
493
- z._revealAppended(C, B)
494
- })
495
- },
496
- _addHideAppended: function(z) {
497
- this.$filteredAtoms = this.$filteredAtoms.add(z);
498
- z.addClass("no-transition");
499
- this._isInserting = true;
500
- this.styleQueue.push({
501
- $el: z,
502
- style: this.options.hiddenStyle
503
- })
504
- },
505
- _revealAppended: function(A, B) {
506
- var z = this;
507
- setTimeout(function() {
508
- A.removeClass("no-transition");
509
- z.styleQueue.push({
510
- $el: A,
511
- style: z.options.visibleStyle
512
- });
513
- z._isInserting = false;
514
- z._processStyleQueue(A, B)
515
- }, 10)
516
- },
517
- reloadItems: function() {
518
- this.$allAtoms = this._getAtoms(this.element.children())
519
- },
520
- remove: function(B, C) {
521
- this.$allAtoms = this.$allAtoms.not(B);
522
- this.$filteredAtoms = this.$filteredAtoms.not(B);
523
- var z = this;
524
- var A = function() {
525
- B.remove();
526
- if (C) {
527
- C.call(z.element)
528
- }
529
- };
530
- if (B.filter(":not(." + this.options.hiddenClass + ")").length) {
531
- this.styleQueue.push({
532
- $el: B,
533
- style: this.options.hiddenStyle
534
- });
535
- this._sort();
536
- this.reLayout(A)
537
- } else {
538
- A()
539
- }
540
- },
541
- shuffle: function(z) {
542
- this.updateSortData(this.$allAtoms);
543
- this.options.sortBy = "random";
544
- this._sort();
545
- this.reLayout(z)
546
- },
547
- destroy: function() {
548
- var B = this.usingTransforms;
549
- var A = this.options;
550
- this.$allAtoms.removeClass(A.hiddenClass + " " + A.itemClass).each(function() {
551
- var D = this.style;
552
- D.position = "";
553
- D.top = "";
554
- D.left = "";
555
- D.opacity = "";
556
- if (B) {
557
- D[c] = ""
558
- }
559
- });
560
- var z = this.element[0].style;
561
- for (var C in this.originalStyle) {
562
- z[C] = this.originalStyle[C]
563
- }
564
- this.element.unbind(".isotope").undelegate("." + A.hiddenClass, "click").removeClass(A.containerClass).removeData("isotope");
565
- r.unbind(".isotope")
566
- },
567
- _getSegments: function(F) {
568
- var C = this.options.layoutMode,
569
- B = F ? "rowHeight" : "columnWidth",
570
- A = F ? "height" : "width",
571
- E = F ? "rows" : "cols",
572
- G = this.element[A](),
573
- z, D = this.options[C] && this.options[C][B] || this.$filteredAtoms["outer" + p(A)](true) || G;
574
- z = Math.floor(G / D);
575
- z = Math.max(z, 1);
576
- this[C][E] = z;
577
- this[C][B] = D
578
- },
579
- _checkIfSegmentsChanged: function(C) {
580
- var A = this.options.layoutMode,
581
- B = C ? "rows" : "cols",
582
- z = this[A][B];
583
- this._getSegments(C);
584
- return (this[A][B] !== z)
585
- },
586
- _masonryReset: function() {
587
- this.masonry = {};
588
- this._getSegments();
589
- var z = this.masonry.cols;
590
- this.masonry.colYs = [];
591
- while (z--) {
592
- this.masonry.colYs.push(0)
593
- }
594
- },
595
- _masonryLayout: function(B) {
596
- var z = this,
597
- A = z.masonry;
598
- B.each(function() {
599
- var G = f(this),
600
- E = Math.ceil(G.outerWidth(true) / A.columnWidth);
601
- E = Math.min(E, A.cols);
602
- if (E === 1) {
603
- z._masonryPlaceBrick(G, A.colYs)
604
- } else {
605
- var H = A.cols + 1 - E,
606
- D = [],
607
- F, C;
608
- for (C = 0; C < H; C++) {
609
- F = A.colYs.slice(C, C + E);
610
- D[C] = Math.max.apply(Math, F)
611
- }
612
- z._masonryPlaceBrick(G, D)
613
- }
614
- })
615
- },
616
- _masonryPlaceBrick: function(C, G) {
617
- var z = Math.min.apply(Math, G),
618
- I = 0;
619
- for (var B = 0, D = G.length; B < D; B++) {
620
- if (G[B] === z) {
621
- I = B;
622
- break
623
- }
624
- }
625
- var H = this.masonry.columnWidth * I,
626
- F = z;
627
- this._pushPosition(C, H, F);
628
- var E = z + C.outerHeight(true),
629
- A = this.masonry.cols + 1 - D;
630
- for (B = 0; B < A; B++) {
631
- this.masonry.colYs[I + B] = E
632
- }
633
- },
634
- _masonryGetContainerSize: function() {
635
- var z = Math.max.apply(Math, this.masonry.colYs);
636
- return {
637
- height: z
638
- }
639
- },
640
- _masonryResizeChanged: function() {
641
- return this._checkIfSegmentsChanged()
642
- },
643
- _fitRowsReset: function() {
644
- this.fitRows = {
645
- x: 0,
646
- y: 0,
647
- height: 0
648
- }
649
- },
650
- _fitRowsLayout: function(C) {
651
- var z = this,
652
- B = this.element.width(),
653
- A = this.fitRows;
654
- C.each(function() {
655
- var F = f(this),
656
- E = F.outerWidth(true),
657
- D = F.outerHeight(true);
658
- if (A.x !== 0 && E + A.x > B) {
659
- A.x = 0;
660
- A.y = A.height
661
- }
662
- z._pushPosition(F, A.x, A.y);
663
- A.height = Math.max(A.y + D, A.height);
664
- A.x += E
665
- })
666
- },
667
- _fitRowsGetContainerSize: function() {
668
- return {
669
- height: this.fitRows.height
670
- }
671
- },
672
- _fitRowsResizeChanged: function() {
673
- return true
674
- },
675
- _cellsByRowReset: function() {
676
- this.cellsByRow = {
677
- index: 0
678
- };
679
- this._getSegments();
680
- this._getSegments(true)
681
- },
682
- _cellsByRowLayout: function(B) {
683
- var z = this,
684
- A = this.cellsByRow;
685
- B.each(function() {
686
- var E = f(this),
687
- D = A.index % A.cols,
688
- F = Math.floor(A.index / A.cols),
689
- C = (D + 0.5) * A.columnWidth - E.outerWidth(true) / 2,
690
- G = (F + 0.5) * A.rowHeight - E.outerHeight(true) / 2;
691
- z._pushPosition(E, C, G);
692
- A.index++
693
- })
694
- },
695
- _cellsByRowGetContainerSize: function() {
696
- return {
697
- height: Math.ceil(this.$filteredAtoms.length / this.cellsByRow.cols) * this.cellsByRow.rowHeight + this.offset.top
698
- }
699
- },
700
- _cellsByRowResizeChanged: function() {
701
- return this._checkIfSegmentsChanged()
702
- },
703
- _straightDownReset: function() {
704
- this.straightDown = {
705
- y: 0
706
- }
707
- },
708
- _straightDownLayout: function(A) {
709
- var z = this;
710
- A.each(function(B) {
711
- var C = f(this);
712
- z._pushPosition(C, 0, z.straightDown.y);
713
- z.straightDown.y += C.outerHeight(true)
714
- })
715
- },
716
- _straightDownGetContainerSize: function() {
717
- return {
718
- height: this.straightDown.y
719
- }
720
- },
721
- _straightDownResizeChanged: function() {
722
- return true
723
- },
724
- _masonryHorizontalReset: function() {
725
- this.masonryHorizontal = {};
726
- this._getSegments(true);
727
- var z = this.masonryHorizontal.rows;
728
- this.masonryHorizontal.rowXs = [];
729
- while (z--) {
730
- this.masonryHorizontal.rowXs.push(0)
731
- }
732
- },
733
- _masonryHorizontalLayout: function(B) {
734
- var z = this,
735
- A = z.masonryHorizontal;
736
- B.each(function() {
737
- var G = f(this),
738
- E = Math.ceil(G.outerHeight(true) / A.rowHeight);
739
- E = Math.min(E, A.rows);
740
- if (E === 1) {
741
- z._masonryHorizontalPlaceBrick(G, A.rowXs)
742
- } else {
743
- var H = A.rows + 1 - E,
744
- D = [],
745
- F, C;
746
- for (C = 0; C < H; C++) {
747
- F = A.rowXs.slice(C, C + E);
748
- D[C] = Math.max.apply(Math, F)
749
- }
750
- z._masonryHorizontalPlaceBrick(G, D)
751
- }
752
- })
753
- },
754
- _masonryHorizontalPlaceBrick: function(C, H) {
755
- var z = Math.min.apply(Math, H),
756
- F = 0;
757
- for (var B = 0, D = H.length; B < D; B++) {
758
- if (H[B] === z) {
759
- F = B;
760
- break
761
- }
762
- }
763
- var I = z,
764
- G = this.masonryHorizontal.rowHeight * F;
765
- this._pushPosition(C, I, G);
766
- var E = z + C.outerWidth(true),
767
- A = this.masonryHorizontal.rows + 1 - D;
768
- for (B = 0; B < A; B++) {
769
- this.masonryHorizontal.rowXs[F + B] = E
770
- }
771
- },
772
- _masonryHorizontalGetContainerSize: function() {
773
- var z = Math.max.apply(Math, this.masonryHorizontal.rowXs);
774
- return {
775
- width: z
776
- }
777
- },
778
- _masonryHorizontalResizeChanged: function() {
779
- return this._checkIfSegmentsChanged(true)
780
- },
781
- _fitColumnsReset: function() {
782
- this.fitColumns = {
783
- x: 0,
784
- y: 0,
785
- width: 0
786
- }
787
- },
788
- _fitColumnsLayout: function(C) {
789
- var z = this,
790
- B = this.element.height(),
791
- A = this.fitColumns;
792
- C.each(function() {
793
- var F = f(this),
794
- E = F.outerWidth(true),
795
- D = F.outerHeight(true);
796
- if (A.y !== 0 && D + A.y > B) {
797
- A.x = A.width;
798
- A.y = 0
799
- }
800
- z._pushPosition(F, A.x, A.y);
801
- A.width = Math.max(A.x + E, A.width);
802
- A.y += D
803
- })
804
- },
805
- _fitColumnsGetContainerSize: function() {
806
- return {
807
- width: this.fitColumns.width
808
- }
809
- },
810
- _fitColumnsResizeChanged: function() {
811
- return true
812
- },
813
- _cellsByColumnReset: function() {
814
- this.cellsByColumn = {
815
- index: 0
816
- };
817
- this._getSegments();
818
- this._getSegments(true)
819
- },
820
- _cellsByColumnLayout: function(B) {
821
- var z = this,
822
- A = this.cellsByColumn;
823
- B.each(function() {
824
- var E = f(this),
825
- D = Math.floor(A.index / A.rows),
826
- F = A.index % A.rows,
827
- C = (D + 0.5) * A.columnWidth - E.outerWidth(true) / 2,
828
- G = (F + 0.5) * A.rowHeight - E.outerHeight(true) / 2;
829
- z._pushPosition(E, C, G);
830
- A.index++
831
- })
832
- },
833
- _cellsByColumnGetContainerSize: function() {
834
- return {
835
- width: Math.ceil(this.$filteredAtoms.length / this.cellsByColumn.rows) * this.cellsByColumn.columnWidth
836
- }
837
- },
838
- _cellsByColumnResizeChanged: function() {
839
- return this._checkIfSegmentsChanged(true)
840
- },
841
- _straightAcrossReset: function() {
842
- this.straightAcross = {
843
- x: 0
844
- }
845
- },
846
- _straightAcrossLayout: function(A) {
847
- var z = this;
848
- A.each(function(B) {
849
- var C = f(this);
850
- z._pushPosition(C, z.straightAcross.x, 0);
851
- z.straightAcross.x += C.outerWidth(true)
852
- })
853
- },
854
- _straightAcrossGetContainerSize: function() {
855
- return {
856
- width: this.straightAcross.x
857
- }
858
- },
859
- _straightAcrossResizeChanged: function() {
860
- return true
861
- }
862
- };;
863
- f.fn.imagesLoaded = function(G) {
864
- var E = this,
865
- C = E.find("img").add(E.filter("img")),
866
- z = C.length,
867
- F = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
868
- B = [];
869
-
870
- function D() {
871
- G.call(E, C)
872
- }
873
-
874
- function A(I) {
875
- var H = I.target;
876
- if (H.src !== F && f.inArray(H, B) === -1) {
877
- B.push(H);
878
- if (--z <= 0) {
879
- setTimeout(D);
880
- C.unbind(".imagesLoaded", A)
881
- }
882
- }
883
- }
884
- if (!z) {
885
- D()
886
- }
887
- C.bind("load.imagesLoaded error.imagesLoaded", A).each(function() {
888
- var H = this.src;
889
- this.src = F;
890
- this.src = H
891
- });
892
- return E
893
- };
894
- var x = function(z) {
895
- if (n.console) {
896
- n.console.error(z)
897
- }
898
- };
899
- f.fn.isotope = function(A, B) {
900
- if (typeof A === "string") {
901
- var z = Array.prototype.slice.call(arguments, 1);
902
- this.each(function() {
903
- var C = f.data(this, "isotope");
904
- if (!C) {
905
- x("cannot call methods on isotope prior to initialization; attempted to call method '" + A + "'");
906
- return
907
- }
908
- if (!f.isFunction(C[A]) || A.charAt(0) === "_") {
909
- x("no such method '" + A + "' for isotope instance");
910
- return
911
- }
912
- C[A].apply(C, z)
913
- })
914
- } else {
915
- this.each(function() {
916
- var C = f.data(this, "isotope");
917
- if (C) {
918
- C.option(A);
919
- C._init(B)
920
- } else {
921
- f.data(this, "isotope", new f.Isotope(A, this, B))
922
- }
923
- })
924
- }
925
- return this
926
- }
927
- })(window, jQuery);
928
- // Isoptope custom extensions and methods.
929
- jQuery.Isotope.prototype._getMasonryGutterColumns = function() {
930
- var a = this.options.masonry && this.options.masonry.gutterWidth || 0;
931
- containerWidth = this.element.width();
932
- this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth || this.$filteredAtoms.outerWidth(true) || containerWidth;
933
- this.masonry.columnWidth += a;
934
- this.masonry.cols = Math.floor((containerWidth + a) / this.masonry.columnWidth);
935
- this.masonry.cols = Math.max(this.masonry.cols, 1)
936
- };
937
- jQuery.Isotope.prototype._masonryReset = function() {
938
- this.masonry = {};
939
- this._getMasonryGutterColumns();
940
- var a = this.masonry.cols;
941
- this.masonry.colYs = [];
942
- while (a--) {
943
- this.masonry.colYs.push(0)
944
- }
945
- };
946
- jQuery.Isotope.prototype._masonryResizeChanged = function() {
947
- var a = this.masonry.cols;
948
- this._getMasonryGutterColumns();
949
- return (this.masonry.cols !== a)
950
- };
951
- // Fancybox v1.3.4
952
- (function(B) {
953
- var L, T, Q, M, d, m, J, A, O, z, C = 0,
954
- H = {}, j = [],
955
- e = 0,
956
- G = {}, y = [],
957
- f = null,
958
- o = new Image(),
959
- i = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,
960
- k = /[^\.]\.(swf)\s*$/i,
961
- p, N = 1,
962
- h = 0,
963
- t = "",
964
- b, c, P = false,
965
- s = B.extend(B("<div/>")[0], {
966
- prop: 0
967
- }),
968
- S = B.browser.msie && B.browser.version < 7 && !window.XMLHttpRequest,
969
- r = function() {
970
- T.hide();
971
- o.onerror = o.onload = null;
972
- if (f) {
973
- f.abort()
974
- }
975
- L.empty()
976
- }, x = function() {
977
- if (false === H.onError(j, C, H)) {
978
- T.hide();
979
- P = false;
980
- return
981
- }
982
- H.titleShow = false;
983
- H.width = "auto";
984
- H.height = "auto";
985
- L.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
986
- n()
987
- }, w = function() {
988
- var Z = j[C],
989
- W, Y, ab, aa, V, X;
990
- r();
991
- H = B.extend({}, B.fn.fancybox.defaults, (typeof B(Z).data("fancybox") == "undefined" ? H : B(Z).data("fancybox")));
992
- X = H.onStart(j, C, H);
993
- if (X === false) {
994
- P = false;
995
- return
996
- } else {
997
- if (typeof X == "object") {
998
- H = B.extend(H, X)
999
- }
1000
- }
1001
- ab = H.title || (Z.nodeName ? B(Z).attr("title") : Z.title) || "";
1002
- if (Z.nodeName && !H.orig) {
1003
- H.orig = B(Z).children("img:first").length ? B(Z).children("img:first") : B(Z)
1004
- }
1005
- if (ab === "" && H.orig && H.titleFromAlt) {
1006
- ab = H.orig.attr("alt")
1007
- }
1008
- W = H.href || (Z.nodeName ? B(Z).attr("href") : Z.href) || null;
1009
- if ((/^(?:javascript)/i).test(W) || W == "#") {
1010
- W = null
1011
- }
1012
- if (H.type) {
1013
- Y = H.type;
1014
- if (!W) {
1015
- W = H.content
1016
- }
1017
- } else {
1018
- if (H.content) {
1019
- Y = "html"
1020
- } else {
1021
- if (W) {
1022
- if (W.match(i)) {
1023
- Y = "image"
1024
- } else {
1025
- if (W.match(k)) {
1026
- Y = "swf"
1027
- } else {
1028
- if (B(Z).hasClass("iframe")) {
1029
- Y = "iframe"
1030
- } else {
1031
- if (W.indexOf("#") === 0) {
1032
- Y = "inline"
1033
- } else {
1034
- Y = "ajax"
1035
- }
1036
- }
1037
- }
1038
- }
1039
- }
1040
- }
1041
- } if (!Y) {
1042
- x();
1043
- return
1044
- }
1045
- if (Y == "inline") {
1046
- Z = W.substr(W.indexOf("#"));
1047
- Y = B(Z).length > 0 ? "inline" : "ajax"
1048
- }
1049
- H.type = Y;
1050
- H.href = W;
1051
- H.title = ab;
1052
- if (H.autoDimensions) {
1053
- if (H.type == "html" || H.type == "inline" || H.type == "ajax") {
1054
- H.width = "auto";
1055
- H.height = "auto"
1056
- } else {
1057
- H.autoDimensions = false
1058
- }
1059
- }
1060
- if (H.modal) {
1061
- H.overlayShow = true;
1062
- H.hideOnOverlayClick = false;
1063
- H.hideOnContentClick = false;
1064
- H.enableEscapeButton = false;
1065
- H.showCloseButton = false
1066
- }
1067
- H.padding = parseInt(H.padding, 10);
1068
- H.margin = parseInt(H.margin, 10);
1069
- L.css("padding", (H.padding + H.margin));
1070
- B(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change", function() {
1071
- B(this).replaceWith(m.children())
1072
- });
1073
- switch (Y) {
1074
- case "html":
1075
- L.html(H.content);
1076
- n();
1077
- break;
1078
- case "inline":
1079
- if (B(Z).parent().is("#fancybox-content") === true) {
1080
- P = false;
1081
- return
1082
- }
1083
- B('<div class="fancybox-inline-tmp" />').hide().insertBefore(B(Z)).bind("fancybox-cleanup", function() {
1084
- B(this).replaceWith(m.children())
1085
- }).bind("fancybox-cancel", function() {
1086
- B(this).replaceWith(L.children())
1087
- });
1088
- B(Z).appendTo(L);
1089
- n();
1090
- break;
1091
- case "image":
1092
- P = false;
1093
- B.fancybox.showActivity();
1094
- o = new Image();
1095
- o.onerror = function() {
1096
- x()
1097
- };
1098
- o.onload = function() {
1099
- P = true;
1100
- o.onerror = o.onload = null;
1101
- F()
1102
- };
1103
- o.src = W;
1104
- break;
1105
- case "swf":
1106
- H.scrolling = "no";
1107
- aa = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + H.width + '" height="' + H.height + '"><param name="movie" value="' + W + '"></param>';
1108
- V = "";
1109
- B.each(H.swf, function(ac, ad) {
1110
- aa += '<param name="' + ac + '" value="' + ad + '"></param>';
1111
- V += " " + ac + '="' + ad + '"'
1112
- });
1113
- aa += '<embed src="' + W + '" type="application/x-shockwave-flash" width="' + H.width + '" height="' + H.height + '"' + V + "></embed></object>";
1114
- L.html(aa);
1115
- n();
1116
- break;
1117
- case "ajax":
1118
- P = false;
1119
- B.fancybox.showActivity();
1120
- H.ajax.win = H.ajax.success;
1121
- f = B.ajax(B.extend({}, H.ajax, {
1122
- url: W,
1123
- data: H.ajax.data || {},
1124
- error: function(ac, ae, ad) {
1125
- if (ac.status > 0) {
1126
- x()
1127
- }
1128
- },
1129
- success: function(ad, af, ac) {
1130
- var ae = typeof ac == "object" ? ac : f;
1131
- if (ae.status == 200) {
1132
- if (typeof H.ajax.win == "function") {
1133
- X = H.ajax.win(W, ad, af, ac);
1134
- if (X === false) {
1135
- T.hide();
1136
- return
1137
- } else {
1138
- if (typeof X == "string" || typeof X == "object") {
1139
- ad = X
1140
- }
1141
- }
1142
- }
1143
- L.html(ad);
1144
- n()
1145
- }
1146
- }
1147
- }));
1148
- break;
1149
- case "iframe":
1150
- E();
1151
- break
1152
- }
1153
- }, n = function() {
1154
- var V = H.width,
1155
- W = H.height;
1156
- if (V.toString().indexOf("%") > -1) {
1157
- V = parseInt((B(window).width() - (H.margin * 2)) * parseFloat(V) / 100, 10) + "px"
1158
- } else {
1159
- V = V == "auto" ? "auto" : V + "px"
1160
- } if (W.toString().indexOf("%") > -1) {
1161
- W = parseInt((B(window).height() - (H.margin * 2)) * parseFloat(W) / 100, 10) + "px"
1162
- } else {
1163
- W = W == "auto" ? "auto" : W + "px"
1164
- }
1165
- L.wrapInner('<div style="width:' + V + ";height:" + W + ";overflow: " + (H.scrolling == "auto" ? "auto" : (H.scrolling == "yes" ? "scroll" : "hidden")) + ';position:relative;"></div>');
1166
- H.width = L.width();
1167
- H.height = L.height();
1168
- E()
1169
- }, F = function() {
1170
- H.width = o.width;
1171
- H.height = o.height;
1172
- B("<img />").attr({
1173
- id: "fancybox-img",
1174
- src: o.src,
1175
- alt: H.title
1176
- }).appendTo(L);
1177
- E()
1178
- }, E = function() {
1179
- var W, V;
1180
- T.hide();
1181
- if (M.is(":visible") && false === G.onCleanup(y, e, G)) {
1182
- B.event.trigger("fancybox-cancel");
1183
- P = false;
1184
- return
1185
- }
1186
- P = true;
1187
- B(m.add(Q)).unbind();
1188
- B(window).unbind("resize.fb scroll.fb");
1189
- B(document).unbind("keydown.fb");
1190
- if (M.is(":visible") && G.titlePosition !== "outside") {
1191
- M.css("height", M.height())
1192
- }
1193
- y = j;
1194
- e = C;
1195
- G = H;
1196
- if (G.overlayShow) {
1197
- Q.css({
1198
- "background-color": G.overlayColor,
1199
- opacity: G.overlayOpacity,
1200
- cursor: G.hideOnOverlayClick ? "pointer" : "auto",
1201
- height: B(document).height()
1202
- });
1203
- if (!Q.is(":visible")) {
1204
- if (S) {
1205
- B("select:not(#fancybox-tmp select)").filter(function() {
1206
- return this.style.visibility !== "hidden"
1207
- }).css({
1208
- visibility: "hidden"
1209
- }).one("fancybox-cleanup", function() {
1210
- this.style.visibility = "inherit"
1211
- })
1212
- }
1213
- Q.show()
1214
- }
1215
- } else {
1216
- Q.hide()
1217
- }
1218
- c = R();
1219
- l();
1220
- if (M.is(":visible")) {
1221
- B(J.add(O).add(z)).hide();
1222
- W = M.position(), b = {
1223
- top: W.top,
1224
- left: W.left,
1225
- width: M.width(),
1226
- height: M.height()
1227
- };
1228
- V = (b.width == c.width && b.height == c.height);
1229
- m.fadeTo(G.changeFade, 0.3, function() {
1230
- var X = function() {
1231
- m.html(L.contents()).fadeTo(G.changeFade, 1, v)
1232
- };
1233
- B.event.trigger("fancybox-change");
1234
- m.empty().removeAttr("filter").css({
1235
- "border-width": G.padding,
1236
- width: c.width - G.padding * 2,
1237
- height: H.autoDimensions ? "auto" : c.height - h - G.padding * 2
1238
- });
1239
- if (V) {
1240
- X()
1241
- } else {
1242
- s.prop = 0;
1243
- B(s).animate({
1244
- prop: 1
1245
- }, {
1246
- duration: G.changeSpeed,
1247
- easing: G.easingChange,
1248
- step: U,
1249
- complete: X
1250
- })
1251
- }
1252
- });
1253
- return
1254
- }
1255
- M.removeAttr("style");
1256
- m.css("border-width", G.padding);
1257
- if (G.transitionIn == "elastic") {
1258
- b = I();
1259
- m.html(L.contents());
1260
- M.show();
1261
- if (G.opacity) {
1262
- c.opacity = 0
1263
- }
1264
- s.prop = 0;
1265
- B(s).animate({
1266
- prop: 1
1267
- }, {
1268
- duration: G.speedIn,
1269
- easing: G.easingIn,
1270
- step: U,
1271
- complete: v
1272
- });
1273
- return
1274
- }
1275
- if (G.titlePosition == "inside" && h > 0) {
1276
- A.show()
1277
- }
1278
- m.css({
1279
- width: c.width - G.padding * 2,
1280
- height: H.autoDimensions ? "auto" : c.height - h - G.padding * 2
1281
- }).html(L.contents());
1282
- M.css(c).fadeIn(G.transitionIn == "none" ? 0 : G.speedIn, v)
1283
- }, D = function(V) {
1284
- if (V && V.length) {
1285
- if (G.titlePosition == "float") {
1286
- return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + V + '</td><td id="fancybox-title-float-right"></td></tr></table>'
1287
- }
1288
- return '<div id="fancybox-title-' + G.titlePosition + '">' + V + "</div>"
1289
- }
1290
- return false
1291
- }, l = function() {
1292
- t = G.title || "";
1293
- h = 0;
1294
- A.empty().removeAttr("style").removeClass();
1295
- if (G.titleShow === false) {
1296
- A.hide();
1297
- return
1298
- }
1299
- t = B.isFunction(G.titleFormat) ? G.titleFormat(t, y, e, G) : D(t);
1300
- if (!t || t === "") {
1301
- A.hide();
1302
- return
1303
- }
1304
- A.addClass("fancybox-title-" + G.titlePosition).html(t).appendTo("body").show();
1305
- switch (G.titlePosition) {
1306
- case "inside":
1307
- A.css({
1308
- width: c.width - (G.padding * 2),
1309
- marginLeft: G.padding,
1310
- marginRight: G.padding
1311
- });
1312
- h = A.outerHeight(true);
1313
- A.appendTo(d);
1314
- c.height += h;
1315
- break;
1316
- case "over":
1317
- A.css({
1318
- marginLeft: G.padding,
1319
- width: c.width - (G.padding * 2),
1320
- bottom: G.padding
1321
- }).appendTo(d);
1322
- break;
1323
- case "float":
1324
- A.css("left", parseInt((A.width() - c.width - 40) / 2, 10) * -1).appendTo(M);
1325
- break;
1326
- default:
1327
- A.css({
1328
- width: c.width - (G.padding * 2),
1329
- paddingLeft: G.padding,
1330
- paddingRight: G.padding
1331
- }).appendTo(M);
1332
- break
1333
- }
1334
- A.hide()
1335
- }, g = function() {
1336
- if (G.enableEscapeButton || G.enableKeyboardNav) {
1337
- B(document).bind("keydown.fb", function(V) {
1338
- if (V.keyCode == 27 && G.enableEscapeButton) {
1339
- V.preventDefault();
1340
- B.fancybox.close()
1341
- } else {
1342
- if ((V.keyCode == 37 || V.keyCode == 39) && G.enableKeyboardNav && V.target.tagName !== "INPUT" && V.target.tagName !== "TEXTAREA" && V.target.tagName !== "SELECT") {
1343
- V.preventDefault();
1344
- B.fancybox[V.keyCode == 37 ? "prev" : "next"]()
1345
- }
1346
- }
1347
- })
1348
- }
1349
- if (!G.showNavArrows) {
1350
- O.hide();
1351
- z.hide();
1352
- return
1353
- }
1354
- if ((G.cyclic && y.length > 1) || e !== 0) {
1355
- O.show()
1356
- }
1357
- if ((G.cyclic && y.length > 1) || e != (y.length - 1)) {
1358
- z.show()
1359
- }
1360
- }, v = function() {
1361
- if (!B.support.opacity) {
1362
- m.get(0).style.removeAttribute("filter");
1363
- M.get(0).style.removeAttribute("filter")
1364
- }
1365
- if (H.autoDimensions) {
1366
- m.css("height", "auto")
1367
- }
1368
- M.css("height", "auto");
1369
- if (t && t.length) {
1370
- A.show()
1371
- }
1372
- if (G.showCloseButton) {
1373
- J.show()
1374
- }
1375
- g();
1376
- if (G.hideOnContentClick) {
1377
- m.bind("click", B.fancybox.close)
1378
- }
1379
- if (G.hideOnOverlayClick) {
1380
- Q.bind("click", B.fancybox.close)
1381
- }
1382
- B(window).bind("resize.fb", B.fancybox.resize);
1383
- if (G.centerOnScroll) {
1384
- B(window).bind("scroll.fb", B.fancybox.center)
1385
- }
1386
- if (G.type == "iframe") {
1387
- B('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + (B.browser.msie ? 'allowtransparency="true""' : "") + ' scrolling="' + H.scrolling + '" src="' + G.href + '"></iframe>').appendTo(m)
1388
- }
1389
- M.show();
1390
- P = false;
1391
- B.fancybox.center();
1392
- G.onComplete(y, e, G);
1393
- K()
1394
- }, K = function() {
1395
- var V, W;
1396
- if ((y.length - 1) > e) {
1397
- V = y[e + 1].href;
1398
- if (typeof V !== "undefined" && V.match(i)) {
1399
- W = new Image();
1400
- W.src = V
1401
- }
1402
- }
1403
- if (e > 0) {
1404
- V = y[e - 1].href;
1405
- if (typeof V !== "undefined" && V.match(i)) {
1406
- W = new Image();
1407
- W.src = V
1408
- }
1409
- }
1410
- }, U = function(W) {
1411
- var V = {
1412
- width: parseInt(b.width + (c.width - b.width) * W, 10),
1413
- height: parseInt(b.height + (c.height - b.height) * W, 10),
1414
- top: parseInt(b.top + (c.top - b.top) * W, 10),
1415
- left: parseInt(b.left + (c.left - b.left) * W, 10)
1416
- };
1417
- if (typeof c.opacity !== "undefined") {
1418
- V.opacity = W < 0.5 ? 0.5 : W
1419
- }
1420
- M.css(V);
1421
- m.css({
1422
- width: V.width - G.padding * 2,
1423
- height: V.height - (h * W) - G.padding * 2
1424
- })
1425
- }, u = function() {
1426
- return [B(window).width() - (G.margin * 2), B(window).height() - (G.margin * 2), B(document).scrollLeft() + G.margin, B(document).scrollTop() + G.margin]
1427
- }, R = function() {
1428
- var V = u(),
1429
- Z = {}, W = G.autoScale,
1430
- X = G.padding * 2,
1431
- Y;
1432
- if (G.width.toString().indexOf("%") > -1) {
1433
- Z.width = parseInt((V[0] * parseFloat(G.width)) / 100, 10)
1434
- } else {
1435
- Z.width = G.width + X
1436
- } if (G.height.toString().indexOf("%") > -1) {
1437
- Z.height = parseInt((V[1] * parseFloat(G.height)) / 100, 10)
1438
- } else {
1439
- Z.height = G.height + X
1440
- } if (W && (Z.width > V[0] || Z.height > V[1])) {
1441
- if (H.type == "image" || H.type == "swf") {
1442
- Y = (G.width) / (G.height);
1443
- if ((Z.width) > V[0]) {
1444
- Z.width = V[0];
1445
- Z.height = parseInt(((Z.width - X) / Y) + X, 10)
1446
- }
1447
- if ((Z.height) > V[1]) {
1448
- Z.height = V[1];
1449
- Z.width = parseInt(((Z.height - X) * Y) + X, 10)
1450
- }
1451
- } else {
1452
- Z.width = Math.min(Z.width, V[0]);
1453
- Z.height = Math.min(Z.height, V[1])
1454
- }
1455
- }
1456
- Z.top = parseInt(Math.max(V[3] - 20, V[3] + ((V[1] - Z.height - 40) * 0.5)), 10);
1457
- Z.left = parseInt(Math.max(V[2] - 20, V[2] + ((V[0] - Z.width - 40) * 0.5)), 10);
1458
- return Z
1459
- }, q = function(V) {
1460
- var W = V.offset();
1461
- W.top += parseInt(V.css("paddingTop"), 10) || 0;
1462
- W.left += parseInt(V.css("paddingLeft"), 10) || 0;
1463
- W.top += parseInt(V.css("border-top-width"), 10) || 0;
1464
- W.left += parseInt(V.css("border-left-width"), 10) || 0;
1465
- W.width = V.width();
1466
- W.height = V.height();
1467
- return W
1468
- }, I = function() {
1469
- var Y = H.orig ? B(H.orig) : false,
1470
- X = {}, W, V;
1471
- if (Y && Y.length) {
1472
- W = q(Y);
1473
- X = {
1474
- width: W.width + (G.padding * 2),
1475
- height: W.height + (G.padding * 2),
1476
- top: W.top - G.padding - 20,
1477
- left: W.left - G.padding - 20
1478
- }
1479
- } else {
1480
- V = u();
1481
- X = {
1482
- width: G.padding * 2,
1483
- height: G.padding * 2,
1484
- top: parseInt(V[3] + V[1] * 0.5, 10),
1485
- left: parseInt(V[2] + V[0] * 0.5, 10)
1486
- }
1487
- }
1488
- return X
1489
- }, a = function() {
1490
- if (!T.is(":visible")) {
1491
- clearInterval(p);
1492
- return
1493
- }
1494
- B("div", T).css("top", (N * -40) + "px");
1495
- N = (N + 1) % 12
1496
- };
1497
- B.fn.fancybox = function(V) {
1498
- if (!B(this).length) {
1499
- return this
1500
- }
1501
- B(this).data("fancybox", B.extend({}, V, (B.metadata ? B(this).metadata() : {}))).unbind("click.fb").bind("click.fb", function(X) {
1502
- X.preventDefault();
1503
- if (P) {
1504
- return
1505
- }
1506
- P = true;
1507
- B(this).blur();
1508
- j = [];
1509
- C = 0;
1510
- var W = B(this).attr("rel") || "";
1511
- if (!W || W == "" || W === "nofollow") {
1512
- j.push(this)
1513
- } else {
1514
- j = B("a[rel=" + W + "], area[rel=" + W + "]");
1515
- C = j.index(this)
1516
- }
1517
- w();
1518
- return
1519
- });
1520
- return this
1521
- };
1522
- B.fancybox = function(Y) {
1523
- var X;
1524
- if (P) {
1525
- return
1526
- }
1527
- P = true;
1528
- X = typeof arguments[1] !== "undefined" ? arguments[1] : {};
1529
- j = [];
1530
- C = parseInt(X.index, 10) || 0;
1531
- if (B.isArray(Y)) {
1532
- for (var W = 0, V = Y.length; W < V; W++) {
1533
- if (typeof Y[W] == "object") {
1534
- B(Y[W]).data("fancybox", B.extend({}, X, Y[W]))
1535
- } else {
1536
- Y[W] = B({}).data("fancybox", B.extend({
1537
- content: Y[W]
1538
- }, X))
1539
- }
1540
- }
1541
- j = jQuery.merge(j, Y)
1542
- } else {
1543
- if (typeof Y == "object") {
1544
- B(Y).data("fancybox", B.extend({}, X, Y))
1545
- } else {
1546
- Y = B({}).data("fancybox", B.extend({
1547
- content: Y
1548
- }, X))
1549
- }
1550
- j.push(Y)
1551
- } if (C > j.length || C < 0) {
1552
- C = 0
1553
- }
1554
- w()
1555
- };
1556
- B.fancybox.showActivity = function() {
1557
- clearInterval(p);
1558
- T.show();
1559
- p = setInterval(a, 66)
1560
- };
1561
- B.fancybox.hideActivity = function() {
1562
- T.hide()
1563
- };
1564
- B.fancybox.next = function() {
1565
- return B.fancybox.pos(e + 1)
1566
- };
1567
- B.fancybox.prev = function() {
1568
- return B.fancybox.pos(e - 1)
1569
- };
1570
- B.fancybox.pos = function(V) {
1571
- if (P) {
1572
- return
1573
- }
1574
- V = parseInt(V);
1575
- j = y;
1576
- if (V > -1 && V < y.length) {
1577
- C = V;
1578
- w()
1579
- } else {
1580
- if (G.cyclic && y.length > 1) {
1581
- C = V >= y.length ? 0 : y.length - 1;
1582
- w()
1583
- }
1584
- }
1585
- return
1586
- };
1587
- B.fancybox.cancel = function() {
1588
- if (P) {
1589
- return
1590
- }
1591
- P = true;
1592
- B.event.trigger("fancybox-cancel");
1593
- r();
1594
- H.onCancel(j, C, H);
1595
- P = false
1596
- };
1597
- B.fancybox.close = function() {
1598
- if (P || M.is(":hidden")) {
1599
- return
1600
- }
1601
- P = true;
1602
- if (G && false === G.onCleanup(y, e, G)) {
1603
- P = false;
1604
- return
1605
- }
1606
- r();
1607
- B(J.add(O).add(z)).hide();
1608
- B(m.add(Q)).unbind();
1609
- B(window).unbind("resize.fb scroll.fb");
1610
- B(document).unbind("keydown.fb");
1611
- m.find("iframe").attr("src", S && /^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank");
1612
- if (G.titlePosition !== "inside") {
1613
- A.empty()
1614
- }
1615
- M.stop();
1616
-
1617
- function V() {
1618
- Q.fadeOut("fast");
1619
- A.empty().hide();
1620
- M.hide();
1621
- B.event.trigger("fancybox-cleanup");
1622
- m.empty();
1623
- G.onClosed(y, e, G);
1624
- y = H = [];
1625
- e = C = 0;
1626
- G = H = {};
1627
- P = false
1628
- }
1629
- if (G.transitionOut == "elastic") {
1630
- b = I();
1631
- var W = M.position();
1632
- c = {
1633
- top: W.top,
1634
- left: W.left,
1635
- width: M.width(),
1636
- height: M.height()
1637
- };
1638
- if (G.opacity) {
1639
- c.opacity = 1
1640
- }
1641
- A.empty().hide();
1642
- s.prop = 1;
1643
- B(s).animate({
1644
- prop: 0
1645
- }, {
1646
- duration: G.speedOut,
1647
- easing: G.easingOut,
1648
- step: U,
1649
- complete: V
1650
- })
1651
- } else {
1652
- M.fadeOut(G.transitionOut == "none" ? 0 : G.speedOut, V)
1653
- }
1654
- };
1655
- B.fancybox.resize = function() {
1656
- if (Q.is(":visible")) {
1657
- Q.css("height", B(document).height())
1658
- }
1659
- var W, V;
1660
- c = R();
1661
- l();
1662
- A.show();
1663
- W = M.position(), b = {
1664
- top: W.top,
1665
- left: W.left,
1666
- width: M.width(),
1667
- height: M.height()
1668
- };
1669
- V = (b.width == c.width && b.height == c.height);
1670
- if (V) {} else {
1671
- s.prop = 0;
1672
- B(s).animate({
1673
- prop: 1
1674
- }, {
1675
- duration: G.changeSpeed,
1676
- easing: G.easingChange,
1677
- step: U
1678
- })
1679
- }
1680
- m.css({
1681
- width: c.width - G.padding * 2,
1682
- height: H.autoDimensions ? "auto" : c.height - h - G.padding * 2
1683
- });
1684
- M.css(c);
1685
- B.fancybox.center(true)
1686
- };
1687
- B.fancybox.center = function() {
1688
- var V, W;
1689
- if (P) {
1690
- return
1691
- }
1692
- W = arguments[0] === true ? 1 : 0;
1693
- V = u();
1694
- if (!W && (M.width() > V[0] || M.height() > V[1])) {
1695
- return
1696
- }
1697
- M.stop().animate({
1698
- top: parseInt(Math.max(V[3] - 20, V[3] + ((V[1] - m.height() - 40) * 0.5) - G.padding)),
1699
- left: parseInt(Math.max(V[2] - 20, V[2] + ((V[0] - m.width() - 40) * 0.5) - G.padding))
1700
- }, typeof arguments[0] == "number" ? arguments[0] : 200)
1701
- };
1702
- B.fancybox.init = function() {
1703
- if (B("#fancybox-wrap").length) {
1704
- return
1705
- }
1706
- B("body").append(L = B('<div id="fancybox-tmp"></div>'), T = B('<div id="fancybox-loading"><div></div></div>'), Q = B('<div id="fancybox-overlay"></div>'), M = B('<div id="fancybox-wrap"></div>'));
1707
- d = B('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(M);
1708
- d.append(m = B('<div id="fancybox-content"></div>'), J = B('<a id="fancybox-close"></a>'), A = B('<div id="fancybox-title"></div>'), O = B('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), z = B('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));
1709
- J.click(B.fancybox.close);
1710
- T.click(B.fancybox.cancel);
1711
- O.click(function(V) {
1712
- V.preventDefault();
1713
- B.fancybox.prev()
1714
- });
1715
- z.click(function(V) {
1716
- V.preventDefault();
1717
- B.fancybox.next()
1718
- });
1719
- if (B.fn.mousewheel) {
1720
- M.bind("mousewheel.fb", function(V, W) {
1721
- if (P) {
1722
- V.preventDefault()
1723
- } else {
1724
- if (B(V.target).get(0).clientHeight == 0 || B(V.target).get(0).scrollHeight === B(V.target).get(0).clientHeight) {
1725
- V.preventDefault();
1726
- B.fancybox[W > 0 ? "prev" : "next"]()
1727
- }
1728
- }
1729
- })
1730
- }
1731
- if (!B.support.opacity) {
1732
- M.addClass("fancybox-ie")
1733
- }
1734
- if (S) {
1735
- T.addClass("fancybox-ie6");
1736
- M.addClass("fancybox-ie6");
1737
- B('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank") + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(d)
1738
- }
1739
- };
1740
- B.fn.fancybox.defaults = {
1741
- padding: 10,
1742
- margin: 40,
1743
- opacity: false,
1744
- modal: false,
1745
- cyclic: false,
1746
- scrolling: "auto",
1747
- width: 560,
1748
- height: 340,
1749
- autoScale: true,
1750
- autoDimensions: true,
1751
- centerOnScroll: false,
1752
- ajax: {},
1753
- swf: {
1754
- wmode: "transparent"
1755
- },
1756
- hideOnOverlayClick: true,
1757
- hideOnContentClick: false,
1758
- overlayShow: true,
1759
- overlayOpacity: 0.7,
1760
- overlayColor: "#777",
1761
- titleShow: true,
1762
- titlePosition: "float",
1763
- titleFormat: null,
1764
- titleFromAlt: false,
1765
- transitionIn: "fade",
1766
- transitionOut: "fade",
1767
- speedIn: 300,
1768
- speedOut: 300,
1769
- changeSpeed: 300,
1770
- changeFade: "fast",
1771
- easingIn: "swing",
1772
- easingOut: "swing",
1773
- showCloseButton: true,
1774
- showNavArrows: true,
1775
- enableEscapeButton: true,
1776
- enableKeyboardNav: true,
1777
- onStart: function() {},
1778
- onCancel: function() {},
1779
- onComplete: function() {},
1780
- onCleanup: function() {},
1781
- onClosed: function() {},
1782
- onError: function() {}
1783
- };
1784
- B(document).ready(function() {
1785
- B.fancybox.init()
1786
- })
1787
- })(jQuery);
1788
- /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
1789
- * Licensed under the MIT License (LICENSE.txt).
1790
- *
1791
- * Version: 3.1.9
1792
- *
1793
- * Requires: jQuery 1.2.2+
1794
- */
1795
- (function(a) {
1796
- if (typeof define === "function" && define.amd) {
1797
- define(["jquery"], a)
1798
- } else {
1799
- if (typeof exports === "object") {
1800
- module.exports = a
1801
- } else {
1802
- a(jQuery)
1803
- }
1804
- }
1805
- }(function(c) {
1806
- var d = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
1807
- k = ("onwheel" in document || document.documentMode >= 9) ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"],
1808
- h = Array.prototype.slice,
1809
- j, b;
1810
- if (c.event.fixHooks) {
1811
- for (var e = d.length; e;) {
1812
- c.event.fixHooks[d[--e]] = c.event.mouseHooks
1813
- }
1814
- }
1815
- var f = c.event.special.mousewheel = {
1816
- version: "3.1.9",
1817
- setup: function() {
1818
- if (this.addEventListener) {
1819
- for (var m = k.length; m;) {
1820
- this.addEventListener(k[--m], l, false)
1821
- }
1822
- } else {
1823
- this.onmousewheel = l
1824
- }
1825
- c.data(this, "mousewheel-line-height", f.getLineHeight(this));
1826
- c.data(this, "mousewheel-page-height", f.getPageHeight(this))
1827
- },
1828
- teardown: function() {
1829
- if (this.removeEventListener) {
1830
- for (var m = k.length; m;) {
1831
- this.removeEventListener(k[--m], l, false)
1832
- }
1833
- } else {
1834
- this.onmousewheel = null
1835
- }
1836
- },
1837
- getLineHeight: function(i) {
1838
- return parseInt(c(i)["offsetParent" in c.fn ? "offsetParent" : "parent"]().css("fontSize"), 10)
1839
- },
1840
- getPageHeight: function(i) {
1841
- return c(i).height()
1842
- },
1843
- settings: {
1844
- adjustOldDeltas: true
1845
- }
1846
- };
1847
- c.fn.extend({
1848
- mousewheel: function(i) {
1849
- return i ? this.bind("mousewheel", i) : this.trigger("mousewheel")
1850
- },
1851
- unmousewheel: function(i) {
1852
- return this.unbind("mousewheel", i)
1853
- }
1854
- });
1855
-
1856
- function l(i) {
1857
- var n = i || window.event,
1858
- r = h.call(arguments, 1),
1859
- t = 0,
1860
- p = 0,
1861
- o = 0,
1862
- q = 0;
1863
- i = c.event.fix(n);
1864
- i.type = "mousewheel";
1865
- if ("detail" in n) {
1866
- o = n.detail * -1
1867
- }
1868
- if ("wheelDelta" in n) {
1869
- o = n.wheelDelta
1870
- }
1871
- if ("wheelDeltaY" in n) {
1872
- o = n.wheelDeltaY
1873
- }
1874
- if ("wheelDeltaX" in n) {
1875
- p = n.wheelDeltaX * -1
1876
- }
1877
- if ("axis" in n && n.axis === n.HORIZONTAL_AXIS) {
1878
- p = o * -1;
1879
- o = 0
1880
- }
1881
- t = o === 0 ? p : o;
1882
- if ("deltaY" in n) {
1883
- o = n.deltaY * -1;
1884
- t = o
1885
- }
1886
- if ("deltaX" in n) {
1887
- p = n.deltaX;
1888
- if (o === 0) {
1889
- t = p * -1
1890
- }
1891
- }
1892
- if (o === 0 && p === 0) {
1893
- return
1894
- }
1895
- if (n.deltaMode === 1) {
1896
- var s = c.data(this, "mousewheel-line-height");
1897
- t *= s;
1898
- o *= s;
1899
- p *= s
1900
- } else {
1901
- if (n.deltaMode === 2) {
1902
- var m = c.data(this, "mousewheel-page-height");
1903
- t *= m;
1904
- o *= m;
1905
- p *= m
1906
- }
1907
- }
1908
- q = Math.max(Math.abs(o), Math.abs(p));
1909
- if (!b || q < b) {
1910
- b = q;
1911
- if (a(n, q)) {
1912
- b /= 40
1913
- }
1914
- }
1915
- if (a(n, q)) {
1916
- t /= 40;
1917
- p /= 40;
1918
- o /= 40
1919
- }
1920
- t = Math[t >= 1 ? "floor" : "ceil"](t / b);
1921
- p = Math[p >= 1 ? "floor" : "ceil"](p / b);
1922
- o = Math[o >= 1 ? "floor" : "ceil"](o / b);
1923
- i.deltaX = p;
1924
- i.deltaY = o;
1925
- i.deltaFactor = b;
1926
- i.deltaMode = 0;
1927
- r.unshift(i, t, p, o);
1928
- if (j) {
1929
- clearTimeout(j)
1930
- }
1931
- j = setTimeout(g, 200);
1932
- return (c.event.dispatch || c.event.handle).apply(this, r)
1933
- }
1934
-
1935
- function g() {
1936
- b = null
1937
- }
1938
-
1939
- function a(m, i) {
1940
- return f.settings.adjustOldDeltas && m.type === "mousewheel" && i % 120 === 0
1941
- }
1942
- }));
1943
  // Envira functions.
1944
  function enviraGetColWidth(a, e) {
1945
  var d, c = jQuery(window).width(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  // Envira functions.
2
  function enviraGetColWidth(a, e) {
3
  var d, c = jQuery(window).width(),
assets/js/lib/fancybox.js ADDED
@@ -0,0 +1,2015 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Envirabox 2.1.5
2
+ ;(function (window, document, $, undefined) {
3
+ "use strict";
4
+
5
+ var H = $("html"),
6
+ W = $(window),
7
+ D = $(document),
8
+ F = $.envirabox = function () {
9
+ F.open.apply( this, arguments );
10
+ },
11
+ IE = navigator.userAgent.match(/msie/i),
12
+ didUpdate = null,
13
+ isTouch = document.createTouch !== undefined,
14
+
15
+ isQuery = function(obj) {
16
+ return obj && obj.hasOwnProperty && obj instanceof $;
17
+ },
18
+ isString = function(str) {
19
+ return str && $.type(str) === "string";
20
+ },
21
+ isPercentage = function(str) {
22
+ return isString(str) && str.indexOf('%') > 0;
23
+ },
24
+ isScrollable = function(el) {
25
+ return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
26
+ },
27
+ getScalar = function(orig, dim) {
28
+ var value = parseInt(orig, 10) || 0;
29
+
30
+ if (dim && isPercentage(orig)) {
31
+ value = F.getViewport()[ dim ] / 100 * value;
32
+ }
33
+
34
+ return Math.ceil(value);
35
+ },
36
+ getValue = function(value, dim) {
37
+ return getScalar(value, dim) + 'px';
38
+ };
39
+
40
+ $.extend(F, {
41
+ // The current version of envirabox
42
+ version: '2.1.5',
43
+
44
+ defaults: {
45
+ padding : 15,
46
+ margin : 40,
47
+
48
+ width : 800,
49
+ height : 600,
50
+ minWidth : 100,
51
+ minHeight : 100,
52
+ maxWidth : 9999,
53
+ maxHeight : 9999,
54
+ pixelRatio: 1, // Set to 2 for retina display support
55
+
56
+ autoSize : true,
57
+ autoHeight : false,
58
+ autoWidth : false,
59
+
60
+ autoResize : true,
61
+ autoCenter : !isTouch,
62
+ fitToView : true,
63
+ aspectRatio : false,
64
+ topRatio : 0.5,
65
+ leftRatio : 0.5,
66
+
67
+ scrolling : 'auto', // 'auto', 'yes' or 'no'
68
+ wrapCSS : '',
69
+
70
+ arrows : true,
71
+ closeBtn : true,
72
+ closeClick : false,
73
+ nextClick : false,
74
+ mouseWheel : true,
75
+ autoPlay : false,
76
+ playSpeed : 3000,
77
+ preload : 3,
78
+ modal : false,
79
+ loop : true,
80
+
81
+ ajax : {
82
+ dataType : 'html',
83
+ headers : { 'X-envirabox': true }
84
+ },
85
+ iframe : {
86
+ scrolling : 'auto',
87
+ preload : true
88
+ },
89
+ swf : {
90
+ wmode: 'transparent',
91
+ allowfullscreen : 'true',
92
+ allowscriptaccess : 'always'
93
+ },
94
+
95
+ keys : {
96
+ next : {
97
+ 13 : 'left', // enter
98
+ 34 : 'up', // page down
99
+ 39 : 'left', // right arrow
100
+ 40 : 'up' // down arrow
101
+ },
102
+ prev : {
103
+ 8 : 'right', // backspace
104
+ 33 : 'down', // page up
105
+ 37 : 'right', // left arrow
106
+ 38 : 'down' // up arrow
107
+ },
108
+ close : [27], // escape key
109
+ play : [32], // space - start/stop slideshow
110
+ toggle : [70] // letter "f" - toggle fullscreen
111
+ },
112
+
113
+ direction : {
114
+ next : 'left',
115
+ prev : 'right'
116
+ },
117
+
118
+ scrollOutside : true,
119
+
120
+ // Override some properties
121
+ index : 0,
122
+ type : null,
123
+ href : null,
124
+ content : null,
125
+ title : null,
126
+
127
+ // HTML templates
128
+ tpl: {
129
+ wrap : '<div class="envirabox-wrap" tabIndex="-1"><div class="envirabox-skin"><div class="envirabox-outer"><div class="envirabox-inner"></div></div></div></div>',
130
+ image : '<img class="envirabox-image" src="{href}" alt="" />',
131
+ iframe : '<iframe id="envirabox-frame{rnd}" name="envirabox-frame{rnd}" class="envirabox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
132
+ error : '<p class="envirabox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
133
+ closeBtn : '<a title="Close" class="envirabox-item envirabox-close" href="javascript:;"></a>',
134
+ next : '<a title="Next" class="envirabox-nav envirabox-next" href="javascript:;"><span></span></a>',
135
+ prev : '<a title="Previous" class="envirabox-nav envirabox-prev" href="javascript:;"><span></span></a>'
136
+ },
137
+
138
+ // Properties for each animation type
139
+ // Opening envirabox
140
+ openEffect : 'fade', // 'elastic', 'fade' or 'none'
141
+ openSpeed : 250,
142
+ openEasing : 'swing',
143
+ openOpacity : true,
144
+ openMethod : 'zoomIn',
145
+
146
+ // Closing envirabox
147
+ closeEffect : 'fade', // 'elastic', 'fade' or 'none'
148
+ closeSpeed : 250,
149
+ closeEasing : 'swing',
150
+ closeOpacity : true,
151
+ closeMethod : 'zoomOut',
152
+
153
+ // Changing next gallery item
154
+ nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
155
+ nextSpeed : 250,
156
+ nextEasing : 'swing',
157
+ nextMethod : 'changeIn',
158
+
159
+ // Changing previous gallery item
160
+ prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
161
+ prevSpeed : 250,
162
+ prevEasing : 'swing',
163
+ prevMethod : 'changeOut',
164
+
165
+ // Enable default helpers
166
+ helpers : {
167
+ overlay : true,
168
+ title : true
169
+ },
170
+
171
+ // Callbacks
172
+ onCancel : $.noop, // If canceling
173
+ beforeLoad : $.noop, // Before loading
174
+ afterLoad : $.noop, // After loading
175
+ beforeShow : $.noop, // Before changing in current item
176
+ afterShow : $.noop, // After opening
177
+ beforeChange : $.noop, // Before changing gallery item
178
+ beforeClose : $.noop, // Before closing
179
+ afterClose : $.noop // After closing
180
+ },
181
+
182
+ //Current state
183
+ group : {}, // Selected group
184
+ opts : {}, // Group options
185
+ previous : null, // Previous element
186
+ coming : null, // Element being loaded
187
+ current : null, // Currently loaded element
188
+ isActive : false, // Is activated
189
+ isOpen : false, // Is currently open
190
+ isOpened : false, // Have been fully opened at least once
191
+
192
+ wrap : null,
193
+ skin : null,
194
+ outer : null,
195
+ inner : null,
196
+
197
+ player : {
198
+ timer : null,
199
+ isActive : false
200
+ },
201
+
202
+ // Loaders
203
+ ajaxLoad : null,
204
+ imgPreload : null,
205
+
206
+ // Some collections
207
+ transitions : {},
208
+ helpers : {},
209
+
210
+ /*
211
+ * Static methods
212
+ */
213
+
214
+ open: function (group, opts) {
215
+ if (!group) {
216
+ return;
217
+ }
218
+
219
+ if (!$.isPlainObject(opts)) {
220
+ opts = {};
221
+ }
222
+
223
+ // Close if already active
224
+ if (false === F.close(true)) {
225
+ return;
226
+ }
227
+
228
+ // Normalize group
229
+ if (!$.isArray(group)) {
230
+ group = isQuery(group) ? $(group).get() : [group];
231
+ }
232
+
233
+ // Recheck if the type of each element is `object` and set content type (image, ajax, etc)
234
+ $.each(group, function(i, element) {
235
+ var obj = {},
236
+ href,
237
+ title,
238
+ content,
239
+ type,
240
+ rez,
241
+ hrefParts,
242
+ selector;
243
+
244
+ if ($.type(element) === "object") {
245
+ // Check if is DOM element
246
+ if (element.nodeType) {
247
+ element = $(element);
248
+ }
249
+
250
+ if (isQuery(element)) {
251
+ obj = {
252
+ href : element.data('envirabox-href') || element.attr('href'),
253
+ title : $('<div/>').text( element.data('envirabox-title') || element.attr('title') ).html(),
254
+ isDom : true,
255
+ element : element
256
+ };
257
+
258
+ if ($.metadata) {
259
+ $.extend(true, obj, element.metadata());
260
+ }
261
+
262
+ } else {
263
+ obj = element;
264
+ }
265
+ }
266
+
267
+ href = opts.href || obj.href || (isString(element) ? element : null);
268
+ title = opts.title !== undefined ? opts.title : obj.title || '';
269
+
270
+ content = opts.content || obj.content;
271
+ type = content ? 'html' : (opts.type || obj.type);
272
+
273
+ if (!type && obj.isDom) {
274
+ type = element.data('envirabox-type');
275
+
276
+ if (!type) {
277
+ rez = element.prop('class').match(/envirabox\.(\w+)/);
278
+ type = rez ? rez[1] : null;
279
+ }
280
+ }
281
+
282
+ if (isString(href)) {
283
+ // Try to guess the content type
284
+ if (!type) {
285
+ if (F.isImage(href)) {
286
+ type = 'image';
287
+
288
+ } else if (F.isSWF(href)) {
289
+ type = 'swf';
290
+
291
+ } else if (href.charAt(0) === '#') {
292
+ type = 'inline';
293
+
294
+ } else if (isString(element)) {
295
+ type = 'html';
296
+ content = element;
297
+ }
298
+ }
299
+
300
+ // Split url into two pieces with source url and content selector, e.g,
301
+ // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
302
+ if (type === 'ajax') {
303
+ hrefParts = href.split(/\s+/, 2);
304
+ href = hrefParts.shift();
305
+ selector = hrefParts.shift();
306
+ }
307
+ }
308
+
309
+ if (!content) {
310
+ if (type === 'inline') {
311
+ if (href) {
312
+ content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
313
+
314
+ } else if (obj.isDom) {
315
+ content = element;
316
+ }
317
+
318
+ } else if (type === 'html') {
319
+ content = href;
320
+
321
+ } else if (!type && !href && obj.isDom) {
322
+ type = 'inline';
323
+ content = element;
324
+ }
325
+ }
326
+
327
+ $.extend(obj, {
328
+ href : href,
329
+ type : type,
330
+ content : content,
331
+ title : title,
332
+ selector : selector
333
+ });
334
+
335
+ group[ i ] = obj;
336
+ });
337
+
338
+ // Extend the defaults
339
+ F.opts = $.extend(true, {}, F.defaults, opts);
340
+
341
+ // All options are merged recursive except keys
342
+ if (opts.keys !== undefined) {
343
+ F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
344
+ }
345
+
346
+ F.group = group;
347
+
348
+ return F._start(F.opts.index);
349
+ },
350
+
351
+ // Cancel image loading or abort ajax request
352
+ cancel: function () {
353
+ var coming = F.coming;
354
+
355
+ if (coming && false === F.trigger('onCancel')) {
356
+ return;
357
+ }
358
+
359
+ F.hideLoading();
360
+
361
+ if (!coming) {
362
+ return;
363
+ }
364
+
365
+ if (F.ajaxLoad) {
366
+ F.ajaxLoad.abort();
367
+ }
368
+
369
+ F.ajaxLoad = null;
370
+
371
+ if (F.imgPreload) {
372
+ F.imgPreload.onload = F.imgPreload.onerror = null;
373
+ }
374
+
375
+ if (coming.wrap) {
376
+ coming.wrap.stop(true, true).trigger('onReset').remove();
377
+ }
378
+
379
+ F.coming = null;
380
+
381
+ // If the first item has been canceled, then clear everything
382
+ if (!F.current) {
383
+ F._afterZoomOut( coming );
384
+ }
385
+ },
386
+
387
+ // Start closing animation if is open; remove immediately if opening/closing
388
+ close: function (event) {
389
+ F.cancel();
390
+
391
+ if (false === F.trigger('beforeClose')) {
392
+ return;
393
+ }
394
+
395
+ F.unbindEvents();
396
+
397
+ if (!F.isActive) {
398
+ return;
399
+ }
400
+
401
+ if (!F.isOpen || event === true) {
402
+ $('.envirabox-wrap').stop(true).trigger('onReset').remove();
403
+
404
+ F._afterZoomOut();
405
+
406
+ } else {
407
+ F.isOpen = F.isOpened = false;
408
+ F.isClosing = true;
409
+
410
+ $('.envirabox-item, .envirabox-nav').remove();
411
+
412
+ F.wrap.stop(true, true).removeClass('envirabox-opened');
413
+
414
+ F.transitions[ F.current.closeMethod ]();
415
+ }
416
+ },
417
+
418
+ // Manage slideshow:
419
+ // $.envirabox.play(); - toggle slideshow
420
+ // $.envirabox.play( true ); - start
421
+ // $.envirabox.play( false ); - stop
422
+ play: function ( action ) {
423
+ var clear = function () {
424
+ clearTimeout(F.player.timer);
425
+ },
426
+ set = function () {
427
+ clear();
428
+
429
+ if (F.current && F.player.isActive) {
430
+ F.player.timer = setTimeout(F.next, F.current.playSpeed);
431
+ }
432
+ },
433
+ stop = function () {
434
+ clear();
435
+
436
+ D.unbind('.player');
437
+
438
+ F.player.isActive = false;
439
+
440
+ F.trigger('onPlayEnd');
441
+ },
442
+ start = function () {
443
+ if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
444
+ F.player.isActive = true;
445
+
446
+ D.bind({
447
+ 'onCancel.player beforeClose.player' : stop,
448
+ 'onUpdate.player' : set,
449
+ 'beforeLoad.player' : clear
450
+ });
451
+
452
+ set();
453
+
454
+ F.trigger('onPlayStart');
455
+ }
456
+ };
457
+
458
+ if (action === true || (!F.player.isActive && action !== false)) {
459
+ start();
460
+ } else {
461
+ stop();
462
+ }
463
+ },
464
+
465
+ // Navigate to next gallery item
466
+ next: function ( direction ) {
467
+ var current = F.current;
468
+
469
+ if (current) {
470
+ if (!isString(direction)) {
471
+ direction = current.direction.next;
472
+ }
473
+
474
+ F.jumpto(current.index + 1, direction, 'next');
475
+ }
476
+ },
477
+
478
+ // Navigate to previous gallery item
479
+ prev: function ( direction ) {
480
+ var current = F.current;
481
+
482
+ if (current) {
483
+ if (!isString(direction)) {
484
+ direction = current.direction.prev;
485
+ }
486
+
487
+ F.jumpto(current.index - 1, direction, 'prev');
488
+ }
489
+ },
490
+
491
+ // Navigate to gallery item by index
492
+ jumpto: function ( index, direction, router ) {
493
+ var current = F.current;
494
+
495
+ if (!current) {
496
+ return;
497
+ }
498
+
499
+ index = getScalar(index);
500
+
501
+ F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
502
+ F.router = router || 'jumpto';
503
+
504
+ if (current.loop) {
505
+ if (index < 0) {
506
+ index = current.group.length + (index % current.group.length);
507
+ }
508
+
509
+ index = index % current.group.length;
510
+ }
511
+
512
+ if (current.group[ index ] !== undefined) {
513
+ F.cancel();
514
+
515
+ F._start(index);
516
+ }
517
+ },
518
+
519
+ // Center inside viewport and toggle position type to fixed or absolute if needed
520
+ reposition: function (e, onlyAbsolute) {
521
+ var current = F.current,
522
+ wrap = current ? current.wrap : null,
523
+ pos;
524
+
525
+ if (wrap) {
526
+ pos = F._getPosition(onlyAbsolute);
527
+
528
+ if (e && e.type === 'scroll') {
529
+ delete pos.position;
530
+
531
+ wrap.stop(true, true).animate(pos, 200);
532
+
533
+ } else {
534
+ wrap.css(pos);
535
+
536
+ current.pos = $.extend({}, current.dim, pos);
537
+ }
538
+ }
539
+ },
540
+
541
+ update: function (e) {
542
+ var type = (e && e.originalEvent && e.originalEvent.type),
543
+ anyway = !type || type === 'orientationchange';
544
+
545
+ if (anyway) {
546
+ clearTimeout(didUpdate);
547
+
548
+ didUpdate = null;
549
+ }
550
+
551
+ if (!F.isOpen || didUpdate) {
552
+ return;
553
+ }
554
+
555
+ didUpdate = setTimeout(function() {
556
+ var current = F.current;
557
+
558
+ if (!current || F.isClosing) {
559
+ return;
560
+ }
561
+
562
+ F.wrap.removeClass('envirabox-tmp');
563
+
564
+ if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
565
+ F._setDimension();
566
+ }
567
+
568
+ if (!(type === 'scroll' && current.canShrink)) {
569
+ F.reposition(e);
570
+ }
571
+
572
+ F.trigger('onUpdate');
573
+
574
+ didUpdate = null;
575
+
576
+ }, (anyway && !isTouch ? 0 : 300));
577
+ },
578
+
579
+ // Shrink content to fit inside viewport or restore if resized
580
+ toggle: function ( action ) {
581
+ if (F.isOpen) {
582
+ F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;
583
+
584
+ // Help browser to restore document dimensions
585
+ if (isTouch) {
586
+ F.wrap.removeAttr('style').addClass('envirabox-tmp');
587
+
588
+ F.trigger('onUpdate');
589
+ }
590
+
591
+ F.update();
592
+ }
593
+ },
594
+
595
+ hideLoading: function () {
596
+ D.unbind('.loading');
597
+
598
+ $('#envirabox-loading').remove();
599
+ },
600
+
601
+ showLoading: function () {
602
+ var el, viewport;
603
+
604
+ F.hideLoading();
605
+
606
+ el = $('<div id="envirabox-loading"><div></div></div>').click(F.cancel).appendTo('body');
607
+
608
+ // If user will press the escape-button, the request will be canceled
609
+ D.bind('keydown.loading', function(e) {
610
+ if ((e.which || e.keyCode) === 27) {
611
+ e.preventDefault();
612
+
613
+ F.cancel();
614
+ }
615
+ });
616
+
617
+ if (!F.defaults.fixed) {
618
+ viewport = F.getViewport();
619
+
620
+ el.css({
621
+ position : 'absolute',
622
+ top : (viewport.h * 0.5) + viewport.y,
623
+ left : (viewport.w * 0.5) + viewport.x
624
+ });
625
+ }
626
+
627
+ F.trigger('onLoading');
628
+ },
629
+
630
+ getViewport: function () {
631
+ var locked = (F.current && F.current.locked) || false,
632
+ rez = {
633
+ x: W.scrollLeft(),
634
+ y: W.scrollTop()
635
+ };
636
+
637
+ if (locked && locked.length) {
638
+ rez.w = locked[0].clientWidth;
639
+ rez.h = locked[0].clientHeight;
640
+
641
+ } else {
642
+ // See http://bugs.jquery.com/ticket/6724
643
+ rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width();
644
+ rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
645
+ }
646
+
647
+ return rez;
648
+ },
649
+
650
+ // Unbind the keyboard / clicking actions
651
+ unbindEvents: function () {
652
+ if (F.wrap && isQuery(F.wrap)) {
653
+ F.wrap.unbind('.fb');
654
+ }
655
+
656
+ D.unbind('.fb');
657
+ W.unbind('.fb');
658
+ },
659
+
660
+ bindEvents: function () {
661
+ var current = F.current,
662
+ keys;
663
+
664
+ if (!current) {
665
+ return;
666
+ }
667
+
668
+ // Changing document height on iOS devices triggers a 'resize' event,
669
+ // that can change document height... repeating infinitely
670
+ W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);
671
+
672
+ keys = current.keys;
673
+
674
+ if (keys) {
675
+ D.bind('keydown.fb', function (e) {
676
+ var code = e.which || e.keyCode,
677
+ target = e.target || e.srcElement;
678
+
679
+ // Skip esc key if loading, because showLoading will cancel preloading
680
+ if (code === 27 && F.coming) {
681
+ return false;
682
+ }
683
+
684
+ // Ignore key combinations and key events within form elements
685
+ if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
686
+ $.each(keys, function(i, val) {
687
+ if (current.group.length > 1 && val[ code ] !== undefined) {
688
+ F[ i ]( val[ code ] );
689
+
690
+ e.preventDefault();
691
+ return false;
692
+ }
693
+
694
+ if ($.inArray(code, val) > -1) {
695
+ F[ i ] ();
696
+
697
+ e.preventDefault();
698
+ return false;
699
+ }
700
+ });
701
+ }
702
+ });
703
+ }
704
+
705
+ if ($.fn.mousewheel && current.mouseWheel) {
706
+ F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
707
+ var target = e.target || null,
708
+ parent = $(target),
709
+ canScroll = false;
710
+
711
+ while (parent.length) {
712
+ if (canScroll || parent.is('.envirabox-skin') || parent.is('.envirabox-wrap')) {
713
+ break;
714
+ }
715
+
716
+ canScroll = isScrollable( parent[0] );
717
+ parent = $(parent).parent();
718
+ }
719
+
720
+ if (delta !== 0 && !canScroll) {
721
+ if (F.group.length > 1 && !current.canShrink) {
722
+ if (deltaY > 0 || deltaX > 0) {
723
+ F.prev( deltaY > 0 ? 'down' : 'left' );
724
+
725
+ } else if (deltaY < 0 || deltaX < 0) {
726
+ F.next( deltaY < 0 ? 'up' : 'right' );
727
+ }
728
+
729
+ e.preventDefault();
730
+ }
731
+ }
732
+ });
733
+ }
734
+ },
735
+
736
+ trigger: function (event, o) {
737
+ var ret, obj = o || F.coming || F.current;
738
+
739
+ if (obj) {
740
+ if ($.isFunction( obj[event] )) {
741
+ ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
742
+ }
743
+
744
+ if (ret === false) {
745
+ return false;
746
+ }
747
+
748
+ if (obj.helpers) {
749
+ $.each(obj.helpers, function (helper, opts) {
750
+ if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
751
+ F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
752
+ }
753
+ });
754
+ }
755
+ }
756
+
757
+ D.trigger(event);
758
+ },
759
+
760
+ isImage: function (str) {
761
+ return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
762
+ },
763
+
764
+ isSWF: function (str) {
765
+ return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
766
+ },
767
+
768
+ _start: function (index) {
769
+ var coming = {},
770
+ obj,
771
+ href,
772
+ type,
773
+ margin,
774
+ padding;
775
+
776
+ index = getScalar( index );
777
+ obj = F.group[ index ] || null;
778
+
779
+ if (!obj) {
780
+ return false;
781
+ }
782
+
783
+ coming = $.extend(true, {}, F.opts, obj);
784
+
785
+ // Convert margin and padding properties to array - top, right, bottom, left
786
+ margin = coming.margin;
787
+ padding = coming.padding;
788
+
789
+ if ($.type(margin) === 'number') {
790
+ coming.margin = [margin, margin, margin, margin];
791
+ }
792
+
793
+ if ($.type(padding) === 'number') {
794
+ coming.padding = [padding, padding, padding, padding];
795
+ }
796
+
797
+ // 'modal' propery is just a shortcut
798
+ if (coming.modal) {
799
+ $.extend(true, coming, {
800
+ closeBtn : false,
801
+ closeClick : false,
802
+ nextClick : false,
803
+ arrows : false,
804
+ mouseWheel : false,
805
+ keys : null,
806
+ helpers: {
807
+ overlay : {
808
+ closeClick : false
809
+ }
810
+ }
811
+ });
812
+ }
813
+
814
+ // 'autoSize' property is a shortcut, too
815
+ if (coming.autoSize) {
816
+ coming.autoWidth = coming.autoHeight = true;
817
+ }
818
+
819
+ if (coming.width === 'auto') {
820
+ coming.autoWidth = true;
821
+ }
822
+
823
+ if (coming.height === 'auto') {
824
+ coming.autoHeight = true;
825
+ }
826
+
827
+ /*
828
+ * Add reference to the group, so it`s possible to access from callbacks, example:
829
+ * afterLoad : function() {
830
+ * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
831
+ * }
832
+ */
833
+
834
+ coming.group = F.group;
835
+ coming.index = index;
836
+
837
+ // Give a chance for callback or helpers to update coming item (type, title, etc)
838
+ F.coming = coming;
839
+
840
+ if (false === F.trigger('beforeLoad')) {
841
+ F.coming = null;
842
+
843
+ return;
844
+ }
845
+
846
+ type = coming.type;
847
+ href = coming.href;
848
+
849
+ if (!type) {
850
+ F.coming = null;
851
+
852
+ //If we can not determine content type then drop silently or display next/prev item if looping through gallery
853
+ if (F.current && F.router && F.router !== 'jumpto') {
854
+ F.current.index = index;
855
+
856
+ return F[ F.router ]( F.direction );
857
+ }
858
+
859
+ return false;
860
+ }
861
+
862
+ F.isActive = true;
863
+
864
+ if (type === 'image' || type === 'swf') {
865
+ coming.autoHeight = coming.autoWidth = false;
866
+ coming.scrolling = 'visible';
867
+ }
868
+
869
+ if (type === 'image') {
870
+ coming.aspectRatio = true;
871
+ }
872
+
873
+ if (type === 'iframe' && isTouch) {
874
+ coming.scrolling = 'scroll';
875
+ }
876
+
877
+ // Build the neccessary markup
878
+ coming.wrap = $(coming.tpl.wrap).addClass('envirabox-' + (isTouch ? 'mobile' : 'desktop') + ' envirabox-type-' + type + ' envirabox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );
879
+
880
+ $.extend(coming, {
881
+ skin : $('.envirabox-skin', coming.wrap),
882
+ outer : $('.envirabox-outer', coming.wrap),
883
+ inner : $('.envirabox-inner', coming.wrap)
884
+ });
885
+
886
+ $.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
887
+ coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
888
+ });
889
+
890
+ F.trigger('onReady');
891
+
892
+ // Check before try to load; 'inline' and 'html' types need content, others - href
893
+ if (type === 'inline' || type === 'html') {
894
+ if (!coming.content || !coming.content.length) {
895
+ return F._error( 'content' );
896
+ }
897
+
898
+ } else if (!href) {
899
+ return F._error( 'href' );
900
+ }
901
+
902
+ if (type === 'image') {
903
+ F._loadImage();
904
+
905
+ } else if (type === 'ajax') {
906
+ F._loadAjax();
907
+
908
+ } else if (type === 'iframe') {
909
+ F._loadIframe();
910
+
911
+ } else {
912
+ F._afterLoad();
913
+ }
914
+ },
915
+
916
+ _error: function ( type ) {
917
+ $.extend(F.coming, {
918
+ type : 'html',
919
+ autoWidth : true,
920
+ autoHeight : true,
921
+ minWidth : 0,
922
+ minHeight : 0,
923
+ scrolling : 'no',
924
+ hasError : type,
925
+ content : F.coming.tpl.error
926
+ });
927
+
928
+ F._afterLoad();
929
+ },
930
+
931
+ _loadImage: function () {
932
+ // Reset preload image so it is later possible to check "complete" property
933
+ var img = F.imgPreload = new Image();
934
+
935
+ img.onload = function () {
936
+ this.onload = this.onerror = null;
937
+
938
+ F.coming.width = this.width / F.opts.pixelRatio;
939
+ F.coming.height = this.height / F.opts.pixelRatio;
940
+
941
+ F._afterLoad();
942
+ };
943
+
944
+ img.onerror = function () {
945
+ this.onload = this.onerror = null;
946
+
947
+ F._error( 'image' );
948
+ };
949
+
950
+ img.src = F.coming.href;
951
+
952
+ if (img.complete !== true) {
953
+ F.showLoading();
954
+ }
955
+ },
956
+
957
+ _loadAjax: function () {
958
+ var coming = F.coming;
959
+
960
+ F.showLoading();
961
+
962
+ F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
963
+ url: coming.href,
964
+ error: function (jqXHR, textStatus) {
965
+ if (F.coming && textStatus !== 'abort') {
966
+ F._error( 'ajax', jqXHR );
967
+
968
+ } else {
969
+ F.hideLoading();
970
+ }
971
+ },
972
+ success: function (data, textStatus) {
973
+ if (textStatus === 'success') {
974
+ coming.content = data;
975
+
976
+ F._afterLoad();
977
+ }
978
+ }
979
+ }));
980
+ },
981
+
982
+ _loadIframe: function() {
983
+ var coming = F.coming,
984
+ iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
985
+ .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
986
+ .attr('src', coming.href);
987
+
988
+ // This helps IE
989
+ $(coming.wrap).bind('onReset', function () {
990
+ try {
991
+ $(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
992
+ } catch (e) {}
993
+ });
994
+
995
+ if (coming.iframe.preload) {
996
+ F.showLoading();
997
+
998
+ iframe.one('load', function() {
999
+ $(this).data('ready', 1);
1000
+
1001
+ // iOS will lose scrolling if we resize
1002
+ if (!isTouch) {
1003
+ $(this).bind('load.fb', F.update);
1004
+ }
1005
+
1006
+ // Without this trick:
1007
+ // - iframe won't scroll on iOS devices
1008
+ // - IE7 sometimes displays empty iframe
1009
+ $(this).parents('.envirabox-wrap').width('100%').removeClass('envirabox-tmp').show();
1010
+
1011
+ F._afterLoad();
1012
+ });
1013
+ }
1014
+
1015
+ coming.content = iframe.appendTo( coming.inner );
1016
+
1017
+ if (!coming.iframe.preload) {
1018
+ F._afterLoad();
1019
+ }
1020
+ },
1021
+
1022
+ _preloadImages: function() {
1023
+ var group = F.group,
1024
+ current = F.current,
1025
+ len = group.length,
1026
+ cnt = current.preload ? Math.min(current.preload, len - 1) : 0,
1027
+ item,
1028
+ i;
1029
+
1030
+ for (i = 1; i <= cnt; i += 1) {
1031
+ item = group[ (current.index + i ) % len ];
1032
+
1033
+ if (item.type === 'image' && item.href) {
1034
+ new Image().src = item.href;
1035
+ }
1036
+ }
1037
+ },
1038
+
1039
+ _afterLoad: function () {
1040
+ var coming = F.coming,
1041
+ previous = F.current,
1042
+ placeholder = 'envirabox-placeholder',
1043
+ current,
1044
+ content,
1045
+ type,
1046
+ scrolling,
1047
+ href,
1048
+ embed;
1049
+
1050
+ F.hideLoading();
1051
+
1052
+ if (!coming || F.isActive === false) {
1053
+ return;
1054
+ }
1055
+
1056
+ if (false === F.trigger('afterLoad', coming, previous)) {
1057
+ coming.wrap.stop(true).trigger('onReset').remove();
1058
+
1059
+ F.coming = null;
1060
+
1061
+ return;
1062
+ }
1063
+
1064
+ if (previous) {
1065
+ F.trigger('beforeChange', previous);
1066
+
1067
+ previous.wrap.stop(true).removeClass('envirabox-opened')
1068
+ .find('.envirabox-item, .envirabox-nav')
1069
+ .remove();
1070
+ }
1071
+
1072
+ F.unbindEvents();
1073
+
1074
+ current = coming;
1075
+ content = coming.content;
1076
+ type = coming.type;
1077
+ scrolling = coming.scrolling;
1078
+
1079
+ $.extend(F, {
1080
+ wrap : current.wrap,
1081
+ skin : current.skin,
1082
+ outer : current.outer,
1083
+ inner : current.inner,
1084
+ current : current,
1085
+ previous : previous
1086
+ });
1087
+
1088
+ href = current.href;
1089
+
1090
+ switch (type) {
1091
+ case 'inline':
1092
+ case 'ajax':
1093
+ case 'html':
1094
+ if (current.selector) {
1095
+ content = $('<div>').html(content).find(current.selector);
1096
+
1097
+ } else if (isQuery(content)) {
1098
+ if (!content.data(placeholder)) {
1099
+ content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
1100
+ }
1101
+
1102
+ content = content.show().detach();
1103
+
1104
+ current.wrap.bind('onReset', function () {
1105
+ if ($(this).find(content).length) {
1106
+ content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
1107
+ }
1108
+ });
1109
+ }
1110
+ break;
1111
+
1112
+ case 'image':
1113
+ content = current.tpl.image.replace(/\{href\}/g, href);
1114
+ break;
1115
+
1116
+ case 'swf':
1117
+ content = '<object id="envirabox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
1118
+ embed = '';
1119
+
1120
+ $.each(current.swf, function(name, val) {
1121
+ content += '<param name="' + name + '" value="' + val + '"></param>';
1122
+ embed += ' ' + name + '="' + val + '"';
1123
+ });
1124
+
1125
+ content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
1126
+ break;
1127
+ }
1128
+
1129
+ if (!(isQuery(content) && content.parent().is(current.inner))) {
1130
+ current.inner.append( content );
1131
+ }
1132
+
1133
+ // Give a chance for helpers or callbacks to update elements
1134
+ F.trigger('beforeShow');
1135
+
1136
+ // Set scrolling before calculating dimensions
1137
+ current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
1138
+
1139
+ // Set initial dimensions and start position
1140
+ F._setDimension();
1141
+
1142
+ F.reposition();
1143
+
1144
+ F.isOpen = false;
1145
+ F.coming = null;
1146
+
1147
+ F.bindEvents();
1148
+
1149
+ if (!F.isOpened) {
1150
+ $('.envirabox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
1151
+
1152
+ } else if (previous.prevMethod) {
1153
+ F.transitions[ previous.prevMethod ]();
1154
+ }
1155
+
1156
+ F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
1157
+
1158
+ F._preloadImages();
1159
+ },
1160
+
1161
+ _setDimension: function () {
1162
+ var viewport = F.getViewport(),
1163
+ steps = 0,
1164
+ canShrink = false,
1165
+ canExpand = false,
1166
+ wrap = F.wrap,
1167
+ skin = F.skin,
1168
+ inner = F.inner,
1169
+ current = F.current,
1170
+ width = current.width,
1171
+ height = current.height,
1172
+ minWidth = current.minWidth,
1173
+ minHeight = current.minHeight,
1174
+ maxWidth = current.maxWidth,
1175
+ maxHeight = current.maxHeight,
1176
+ scrolling = current.scrolling,
1177
+ scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
1178
+ margin = current.margin,
1179
+ wMargin = getScalar(margin[1] + margin[3]),
1180
+ hMargin = getScalar(margin[0] + margin[2]),
1181
+ wPadding,
1182
+ hPadding,
1183
+ wSpace,
1184
+ hSpace,
1185
+ origWidth,
1186
+ origHeight,
1187
+ origMaxWidth,
1188
+ origMaxHeight,
1189
+ ratio,
1190
+ width_,
1191
+ height_,
1192
+ maxWidth_,
1193
+ maxHeight_,
1194
+ iframe,
1195
+ body;
1196
+
1197
+ // Reset dimensions so we could re-check actual size
1198
+ wrap.add(skin).add(inner).width('auto').height('auto').removeClass('envirabox-tmp');
1199
+
1200
+ wPadding = getScalar(skin.outerWidth(true) - skin.width());
1201
+ hPadding = getScalar(skin.outerHeight(true) - skin.height());
1202
+
1203
+ // Any space between content and viewport (margin, padding, border, title)
1204
+ wSpace = wMargin + wPadding;
1205
+ hSpace = hMargin + hPadding;
1206
+
1207
+ origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
1208
+ origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
1209
+
1210
+ if (current.type === 'iframe') {
1211
+ iframe = current.content;
1212
+
1213
+ if (current.autoHeight && iframe.data('ready') === 1) {
1214
+ try {
1215
+ if (iframe[0].contentWindow.document.location) {
1216
+ inner.width( origWidth ).height(9999);
1217
+
1218
+ body = iframe.contents().find('body');
1219
+
1220
+ if (scrollOut) {
1221
+ body.css('overflow-x', 'hidden');
1222
+ }
1223
+
1224
+ origHeight = body.outerHeight(true);
1225
+ }
1226
+
1227
+ } catch (e) {}
1228
+ }
1229
+
1230
+ } else if (current.autoWidth || current.autoHeight) {
1231
+ inner.addClass( 'envirabox-tmp' );
1232
+
1233
+ // Set width or height in case we need to calculate only one dimension
1234
+ if (!current.autoWidth) {
1235
+ inner.width( origWidth );
1236
+ }
1237
+
1238
+ if (!current.autoHeight) {
1239
+ inner.height( origHeight );
1240
+ }
1241
+
1242
+ if (current.autoWidth) {
1243
+ origWidth = inner.width();
1244
+ }
1245
+
1246
+ if (current.autoHeight) {
1247
+ origHeight = inner.height();
1248
+ }
1249
+
1250
+ inner.removeClass( 'envirabox-tmp' );
1251
+ }
1252
+
1253
+ width = getScalar( origWidth );
1254
+ height = getScalar( origHeight );
1255
+
1256
+ ratio = origWidth / origHeight;
1257
+
1258
+ // Calculations for the content
1259
+ minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
1260
+ maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
1261
+
1262
+ minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
1263
+ maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
1264
+
1265
+ // These will be used to determine if wrap can fit in the viewport
1266
+ origMaxWidth = maxWidth;
1267
+ origMaxHeight = maxHeight;
1268
+
1269
+ if (current.fitToView) {
1270
+ maxWidth = Math.min(viewport.w - wSpace, maxWidth);
1271
+ maxHeight = Math.min(viewport.h - hSpace, maxHeight);
1272
+ }
1273
+
1274
+ maxWidth_ = viewport.w - wMargin;
1275
+ maxHeight_ = viewport.h - hMargin;
1276
+
1277
+ if (current.aspectRatio) {
1278
+ if (width > maxWidth) {
1279
+ width = maxWidth;
1280
+ height = getScalar(width / ratio);
1281
+ }
1282
+
1283
+ if (height > maxHeight) {
1284
+ height = maxHeight;
1285
+ width = getScalar(height * ratio);
1286
+ }
1287
+
1288
+ if (width < minWidth) {
1289
+ width = minWidth;
1290
+ height = getScalar(width / ratio);
1291
+ }
1292
+
1293
+ if (height < minHeight) {
1294
+ height = minHeight;
1295
+ width = getScalar(height * ratio);
1296
+ }
1297
+
1298
+ } else {
1299
+ width = Math.max(minWidth, Math.min(width, maxWidth));
1300
+
1301
+ if (current.autoHeight && current.type !== 'iframe') {
1302
+ inner.width( width );
1303
+
1304
+ height = inner.height();
1305
+ }
1306
+
1307
+ height = Math.max(minHeight, Math.min(height, maxHeight));
1308
+ }
1309
+
1310
+ // Try to fit inside viewport (including the title)
1311
+ if (current.fitToView) {
1312
+ inner.width( width ).height( height );
1313
+
1314
+ wrap.width( width + wPadding );
1315
+
1316
+ // Real wrap dimensions
1317
+ width_ = wrap.width();
1318
+ height_ = wrap.height();
1319
+
1320
+ if (current.aspectRatio) {
1321
+ while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
1322
+ if (steps++ > 19) {
1323
+ break;
1324
+ }
1325
+
1326
+ height = Math.max(minHeight, Math.min(maxHeight, height - 10));
1327
+ width = getScalar(height * ratio);
1328
+
1329
+ if (width < minWidth) {
1330
+ width = minWidth;
1331
+ height = getScalar(width / ratio);
1332
+ }
1333
+
1334
+ if (width > maxWidth) {
1335
+ width = maxWidth;
1336
+ height = getScalar(width / ratio);
1337
+ }
1338
+
1339
+ inner.width( width ).height( height );
1340
+
1341
+ wrap.width( width + wPadding );
1342
+
1343
+ width_ = wrap.width();
1344
+ height_ = wrap.height();
1345
+ }
1346
+
1347
+ } else {
1348
+ width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
1349
+ height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
1350
+ }
1351
+ }
1352
+
1353
+ if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
1354
+ width += scrollOut;
1355
+ }
1356
+
1357
+ inner.width( width ).height( height );
1358
+
1359
+ wrap.width( width + wPadding );
1360
+
1361
+ width_ = wrap.width();
1362
+ height_ = wrap.height();
1363
+
1364
+ canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
1365
+ canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
1366
+
1367
+ $.extend(current, {
1368
+ dim : {
1369
+ width : getValue( width_ ),
1370
+ height : getValue( height_ )
1371
+ },
1372
+ origWidth : origWidth,
1373
+ origHeight : origHeight,
1374
+ canShrink : canShrink,
1375
+ canExpand : canExpand,
1376
+ wPadding : wPadding,
1377
+ hPadding : hPadding,
1378
+ wrapSpace : height_ - skin.outerHeight(true),
1379
+ skinSpace : skin.height() - height
1380
+ });
1381
+
1382
+ if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
1383
+ inner.height('auto');
1384
+ }
1385
+ },
1386
+
1387
+ _getPosition: function (onlyAbsolute) {
1388
+ var current = F.current,
1389
+ viewport = F.getViewport(),
1390
+ margin = current.margin,
1391
+ width = F.wrap.width() + margin[1] + margin[3],
1392
+ height = F.wrap.height() + margin[0] + margin[2],
1393
+ rez = {
1394
+ position: 'absolute',
1395
+ top : margin[0],
1396
+ left : margin[3]
1397
+ };
1398
+
1399
+ // Check for floating title and adjust height.
1400
+ if (current.helpers.title.type && 'float' == current.helpers.title.type) {
1401
+ height = height + $('.envirabox-skin .envirabox-title').height();
1402
+ }
1403
+
1404
+ if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
1405
+ rez.position = 'fixed';
1406
+
1407
+ } else if (!current.locked) {
1408
+ rez.top += viewport.y;
1409
+ rez.left += viewport.x;
1410
+ }
1411
+
1412
+ rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
1413
+ rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));
1414
+
1415
+ return rez;
1416
+ },
1417
+
1418
+ _afterZoomIn: function () {
1419
+ var current = F.current;
1420
+
1421
+ if (!current) {
1422
+ return;
1423
+ }
1424
+
1425
+ F.isOpen = F.isOpened = true;
1426
+
1427
+ F.wrap.css('overflow', 'visible').addClass('envirabox-opened').hide().show(0);
1428
+
1429
+ F.update();
1430
+
1431
+ // Assign a click event
1432
+ if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
1433
+ F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
1434
+ if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
1435
+ e.preventDefault();
1436
+
1437
+ F[ current.closeClick ? 'close' : 'next' ]();
1438
+ }
1439
+ });
1440
+ }
1441
+
1442
+ // Create a close button
1443
+ if (current.closeBtn) {
1444
+ $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
1445
+ e.preventDefault();
1446
+
1447
+ F.close();
1448
+ });
1449
+ }
1450
+
1451
+ // Create navigation arrows
1452
+ if (current.arrows && F.group.length > 1) {
1453
+ if (current.loop || current.index > 0) {
1454
+ $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
1455
+ }
1456
+
1457
+ if (current.loop || current.index < F.group.length - 1) {
1458
+ $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
1459
+ }
1460
+ }
1461
+
1462
+ F.trigger('afterShow');
1463
+
1464
+ // Stop the slideshow if this is the last item
1465
+ if (!current.loop && current.index === current.group.length - 1) {
1466
+
1467
+ F.play( false );
1468
+
1469
+ } else if (F.opts.autoPlay && !F.player.isActive) {
1470
+ F.opts.autoPlay = false;
1471
+
1472
+ F.play(true);
1473
+ }
1474
+ },
1475
+
1476
+ _afterZoomOut: function ( obj ) {
1477
+ obj = obj || F.current;
1478
+
1479
+ $('.envirabox-wrap').trigger('onReset').remove();
1480
+
1481
+ $.extend(F, {
1482
+ group : {},
1483
+ opts : {},
1484
+ router : false,
1485
+ current : null,
1486
+ isActive : false,
1487
+ isOpened : false,
1488
+ isOpen : false,
1489
+ isClosing : false,
1490
+ wrap : null,
1491
+ skin : null,
1492
+ outer : null,
1493
+ inner : null
1494
+ });
1495
+
1496
+ F.trigger('afterClose', obj);
1497
+ }
1498
+ });
1499
+
1500
+ /*
1501
+ * Default transitions
1502
+ */
1503
+
1504
+ F.transitions = {
1505
+ getOrigPosition: function () {
1506
+ var current = F.current,
1507
+ element = current.element,
1508
+ orig = current.orig,
1509
+ pos = {},
1510
+ width = 50,
1511
+ height = 50,
1512
+ hPadding = current.hPadding,
1513
+ wPadding = current.wPadding,
1514
+ viewport = F.getViewport();
1515
+
1516
+ if (!orig && current.isDom && element.is(':visible')) {
1517
+ orig = element.find('img:first');
1518
+
1519
+ if (!orig.length) {
1520
+ orig = element;
1521
+ }
1522
+ }
1523
+
1524
+ if (isQuery(orig)) {
1525
+ pos = orig.offset();
1526
+
1527
+ if (orig.is('img')) {
1528
+ width = orig.outerWidth();
1529
+ height = orig.outerHeight();
1530
+ }
1531
+
1532
+ } else {
1533
+ pos.top = viewport.y + (viewport.h - height) * current.topRatio;
1534
+ pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
1535
+ }
1536
+
1537
+ if (F.wrap.css('position') === 'fixed' || current.locked) {
1538
+ pos.top -= viewport.y;
1539
+ pos.left -= viewport.x;
1540
+ }
1541
+
1542
+ pos = {
1543
+ top : getValue(pos.top - hPadding * current.topRatio),
1544
+ left : getValue(pos.left - wPadding * current.leftRatio),
1545
+ width : getValue(width + wPadding),
1546
+ height : getValue(height + hPadding)
1547
+ };
1548
+
1549
+ return pos;
1550
+ },
1551
+
1552
+ step: function (now, fx) {
1553
+ var ratio,
1554
+ padding,
1555
+ value,
1556
+ prop = fx.prop,
1557
+ current = F.current,
1558
+ wrapSpace = current.wrapSpace,
1559
+ skinSpace = current.skinSpace;
1560
+
1561
+ if (prop === 'width' || prop === 'height') {
1562
+ ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
1563
+
1564
+ if (F.isClosing) {
1565
+ ratio = 1 - ratio;
1566
+ }
1567
+
1568
+ padding = prop === 'width' ? current.wPadding : current.hPadding;
1569
+ value = now - padding;
1570
+
1571
+ F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) );
1572
+ F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
1573
+ }
1574
+ },
1575
+
1576
+ zoomIn: function () {
1577
+ var current = F.current,
1578
+ startPos = current.pos,
1579
+ effect = current.openEffect,
1580
+ elastic = effect === 'elastic',
1581
+ endPos = $.extend({opacity : 1}, startPos);
1582
+
1583
+ // Remove "position" property that breaks older IE
1584
+ delete endPos.position;
1585
+
1586
+ if (elastic) {
1587
+ startPos = this.getOrigPosition();
1588
+
1589
+ if (current.openOpacity) {
1590
+ startPos.opacity = 0.1;
1591
+ }
1592
+
1593
+ } else if (effect === 'fade') {
1594
+ startPos.opacity = 0.1;
1595
+ }
1596
+
1597
+ F.wrap.css(startPos).animate(endPos, {
1598
+ duration : effect === 'none' ? 0 : current.openSpeed,
1599
+ easing : current.openEasing,
1600
+ step : elastic ? this.step : null,
1601
+ complete : F._afterZoomIn
1602
+ });
1603
+ },
1604
+
1605
+ zoomOut: function () {
1606
+ var current = F.current,
1607
+ effect = current.closeEffect,
1608
+ elastic = effect === 'elastic',
1609
+ endPos = {opacity : 0.1};
1610
+
1611
+ if (elastic) {
1612
+ endPos = this.getOrigPosition();
1613
+
1614
+ if (current.closeOpacity) {
1615
+ endPos.opacity = 0.1;
1616
+ }
1617
+ }
1618
+
1619
+ F.wrap.animate(endPos, {
1620
+ duration : effect === 'none' ? 0 : current.closeSpeed,
1621
+ easing : current.closeEasing,
1622
+ step : elastic ? this.step : null,
1623
+ complete : F._afterZoomOut
1624
+ });
1625
+ },
1626
+
1627
+ changeIn: function () {
1628
+ var current = F.current,
1629
+ effect = current.nextEffect,
1630
+ startPos = current.pos,
1631
+ endPos = { opacity : 1 },
1632
+ direction = F.direction,
1633
+ distance = 200,
1634
+ field;
1635
+
1636
+ startPos.opacity = 0.1;
1637
+
1638
+ if (effect === 'elastic') {
1639
+ field = direction === 'down' || direction === 'up' ? 'top' : 'left';
1640
+
1641
+ if (direction === 'down' || direction === 'right') {
1642
+ startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
1643
+ endPos[ field ] = '+=' + distance + 'px';
1644
+
1645
+ } else {
1646
+ startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
1647
+ endPos[ field ] = '-=' + distance + 'px';
1648
+ }
1649
+ }
1650
+
1651
+ // Workaround for http://bugs.jquery.com/ticket/12273
1652
+ if (effect === 'none') {
1653
+ F._afterZoomIn();
1654
+
1655
+ } else {
1656
+ F.wrap.css(startPos).animate(endPos, {
1657
+ duration : current.nextSpeed,
1658
+ easing : current.nextEasing,
1659
+ complete : F._afterZoomIn
1660
+ });
1661
+ }
1662
+ },
1663
+
1664
+ changeOut: function () {
1665
+ var previous = F.previous,
1666
+ effect = previous.prevEffect,
1667
+ endPos = { opacity : 0.1 },
1668
+ direction = F.direction,
1669
+ distance = 200;
1670
+
1671
+ if (effect === 'elastic') {
1672
+ endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
1673
+ }
1674
+
1675
+ previous.wrap.animate(endPos, {
1676
+ duration : effect === 'none' ? 0 : previous.prevSpeed,
1677
+ easing : previous.prevEasing,
1678
+ complete : function () {
1679
+ $(this).trigger('onReset').remove();
1680
+ }
1681
+ });
1682
+ }
1683
+ };
1684
+
1685
+ /*
1686
+ * Overlay helper
1687
+ */
1688
+
1689
+ F.helpers.overlay = {
1690
+ defaults : {
1691
+ closeClick : true, // if true, envirabox will be closed when user clicks on the overlay
1692
+ speedOut : 200, // duration of fadeOut animation
1693
+ showEarly : true, // indicates if should be opened immediately or wait until the content is ready
1694
+ css : {}, // custom CSS properties
1695
+ locked : !isTouch, // if true, the content will be locked into overlay
1696
+ fixed : true // if false, the overlay CSS position property will not be set to "fixed"
1697
+ },
1698
+
1699
+ overlay : null, // current handle
1700
+ fixed : false, // indicates if the overlay has position "fixed"
1701
+ el : $('html'), // element that contains "the lock"
1702
+
1703
+ // Public methods
1704
+ create : function(opts) {
1705
+ var parent;
1706
+
1707
+ opts = $.extend({}, this.defaults, opts);
1708
+
1709
+ if (this.overlay) {
1710
+ this.close();
1711
+ }
1712
+
1713
+ parent = F.coming ? F.coming.parent : opts.parent;
1714
+
1715
+ this.overlay = $('<div class="envirabox-overlay"></div>').appendTo( parent && parent.lenth ? parent : 'body' );
1716
+ this.fixed = false;
1717
+
1718
+ if (opts.fixed && F.defaults.fixed) {
1719
+ this.overlay.addClass('envirabox-overlay-fixed');
1720
+
1721
+ this.fixed = true;
1722
+ }
1723
+ },
1724
+
1725
+ open : function(opts) {
1726
+ var that = this;
1727
+
1728
+ opts = $.extend({}, this.defaults, opts);
1729
+
1730
+ if (this.overlay) {
1731
+ this.overlay.unbind('.overlay').width('auto').height('auto');
1732
+
1733
+ } else {
1734
+ this.create(opts);
1735
+ }
1736
+
1737
+ if (!this.fixed) {
1738
+ W.bind('resize.overlay', $.proxy( this.update, this) );
1739
+
1740
+ this.update();
1741
+ }
1742
+
1743
+ if (opts.closeClick) {
1744
+ this.overlay.bind('click.overlay', function(e) {
1745
+ if ($(e.target).hasClass('envirabox-overlay')) {
1746
+ if (F.isActive) {
1747
+ F.close();
1748
+ } else {
1749
+ that.close();
1750
+ }
1751
+
1752
+ return false;
1753
+ }
1754
+ });
1755
+ }
1756
+
1757
+ this.overlay.css( opts.css ).show();
1758
+ },
1759
+
1760
+ close : function() {
1761
+ W.unbind('resize.overlay');
1762
+
1763
+ if (this.el.hasClass('envirabox-lock')) {
1764
+ $('.envirabox-margin').removeClass('envirabox-margin');
1765
+
1766
+ this.el.removeClass('envirabox-lock');
1767
+
1768
+ W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );
1769
+ }
1770
+
1771
+ $('.envirabox-overlay').remove().hide();
1772
+
1773
+ $.extend(this, {
1774
+ overlay : null,
1775
+ fixed : false
1776
+ });
1777
+ },
1778
+
1779
+ // Private, callbacks
1780
+
1781
+ update : function () {
1782
+ var width = '100%', offsetWidth;
1783
+
1784
+ // Reset width/height so it will not mess
1785
+ this.overlay.width(width).height('100%');
1786
+
1787
+ // jQuery does not return reliable result for IE
1788
+ if (IE) {
1789
+ offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
1790
+
1791
+ if (D.width() > offsetWidth) {
1792
+ width = D.width();
1793
+ }
1794
+
1795
+ } else if (D.width() > W.width()) {
1796
+ width = D.width();
1797
+ }
1798
+
1799
+
1800
+ this.overlay.width(width).height(D.height());
1801
+ },
1802
+
1803
+ // This is where we can manipulate DOM, because later it would cause iframes to reload
1804
+ onReady : function (opts, obj) {
1805
+ var overlay = this.overlay;
1806
+
1807
+ $('.envirabox-overlay').stop(true, true);
1808
+
1809
+ if (!overlay) {
1810
+ this.create(opts);
1811
+ }
1812
+
1813
+ if (opts.locked && this.fixed && obj.fixed) {
1814
+ obj.locked = this.overlay.append( obj.wrap );
1815
+ obj.fixed = false;
1816
+ }
1817
+
1818
+ if (opts.showEarly === true) {
1819
+ this.beforeShow.apply(this, arguments);
1820
+ }
1821
+ },
1822
+
1823
+ beforeShow : function(opts, obj) {
1824
+ if (obj.locked && !this.el.hasClass('envirabox-lock')) {
1825
+ if (this.fixPosition !== false) {
1826
+ $('*').filter(function(){
1827
+ return ($(this).css('position') === 'fixed' && !$(this).hasClass("envirabox-overlay") && !$(this).hasClass("envirabox-wrap") );
1828
+ }).addClass('envirabox-margin');
1829
+ }
1830
+
1831
+ this.el.addClass('envirabox-margin');
1832
+
1833
+ this.scrollV = W.scrollTop();
1834
+ this.scrollH = W.scrollLeft();
1835
+
1836
+ this.el.addClass('envirabox-lock');
1837
+
1838
+ W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );
1839
+ }
1840
+
1841
+ this.open(opts);
1842
+ },
1843
+
1844
+ onUpdate : function() {
1845
+ if (!this.fixed) {
1846
+ this.update();
1847
+ }
1848
+ },
1849
+
1850
+ afterClose: function (opts) {
1851
+ // Remove overlay if exists and envirabox is not opening
1852
+ // (e.g., it is not being open using afterClose callback)
1853
+ if (this.overlay && !F.coming) {
1854
+ this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
1855
+ }
1856
+ }
1857
+ };
1858
+
1859
+ /*
1860
+ * Title helper
1861
+ */
1862
+
1863
+ F.helpers.title = {
1864
+ defaults : {
1865
+ type : 'float', // 'float', 'inside', 'outside' or 'over',
1866
+ position : 'bottom' // 'top' or 'bottom'
1867
+ },
1868
+
1869
+ beforeShow: function (opts) {
1870
+ var current = F.current,
1871
+ text = current.title,
1872
+ type = opts.type,
1873
+ title,
1874
+ target;
1875
+
1876
+ if ($.isFunction(text)) {
1877
+ text = text.call(current.element, current);
1878
+ }
1879
+
1880
+ if (!isString(text) || $.trim(text) === '') {
1881
+ return;
1882
+ }
1883
+
1884
+ title = $('<div class="envirabox-title envirabox-title-' + type + '-wrap">' + text + '</div>');
1885
+
1886
+ switch (type) {
1887
+ case 'inside':
1888
+ target = F.skin;
1889
+ break;
1890
+
1891
+ case 'outside':
1892
+ target = F.wrap;
1893
+ break;
1894
+
1895
+ case 'over':
1896
+ target = F.inner;
1897
+ break;
1898
+
1899
+ default: // 'float'
1900
+ target = F.skin;
1901
+
1902
+ title.appendTo('body');
1903
+
1904
+ if (IE) {
1905
+ title.width( title.width() );
1906
+ }
1907
+
1908
+ title.wrapInner('<span class="child"></span>');
1909
+
1910
+ //Increase bottom margin so this title will also fit into viewport
1911
+ F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
1912
+ break;
1913
+ }
1914
+
1915
+ title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target);
1916
+ }
1917
+ };
1918
+
1919
+ // jQuery plugin initialization
1920
+ $.fn.envirabox = function (options) {
1921
+ var index,
1922
+ that = $(this),
1923
+ selector = this.selector || '',
1924
+ run = function(e) {
1925
+ var what = $(this).blur(),
1926
+ idx = index,
1927
+ relType,
1928
+ relVal;
1929
+
1930
+ if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.envirabox-wrap')) {
1931
+ relType = options.groupAttr || 'data-envirabox-group';
1932
+ relVal = what.attr(relType);
1933
+
1934
+ if (!relVal) {
1935
+ relType = 'rel';
1936
+ relVal = what.get(0)[ relType ];
1937
+ }
1938
+
1939
+ if (relVal && relVal !== '' && relVal !== 'nofollow') {
1940
+ what = selector.length ? $(selector) : that;
1941
+ what = what.filter('[' + relType + '="' + relVal + '"]');
1942
+ idx = what.index(this);
1943
+ }
1944
+
1945
+ options.index = idx;
1946
+
1947
+ // Stop an event from bubbling if everything is fine
1948
+ if (F.open(what, options) !== false) {
1949
+ e.preventDefault();
1950
+ }
1951
+ }
1952
+ };
1953
+
1954
+ options = options || {};
1955
+ index = options.index || 0;
1956
+
1957
+ if (!selector || options.live === false) {
1958
+ that.unbind('click.fb-start').bind('click.fb-start', run);
1959
+
1960
+ } else {
1961
+ D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.envirabox-item, .envirabox-nav')", 'click.fb-start', run);
1962
+ }
1963
+
1964
+ this.filter('[data-envirabox-start=1]').trigger('click');
1965
+
1966
+ return this;
1967
+ };
1968
+
1969
+ // Tests that need a body at doc ready
1970
+ D.ready(function() {
1971
+ var w1, w2;
1972
+
1973
+ if ( $.scrollbarWidth === undefined ) {
1974
+ // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
1975
+ $.scrollbarWidth = function() {
1976
+ var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
1977
+ child = parent.children(),
1978
+ width = child.innerWidth() - child.height( 99 ).innerWidth();
1979
+
1980
+ parent.remove();
1981
+
1982
+ return width;
1983
+ };
1984
+ }
1985
+
1986
+ if ( $.support.fixedPosition === undefined ) {
1987
+ $.support.fixedPosition = (function() {
1988
+ var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
1989
+ fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
1990
+
1991
+ elem.remove();
1992
+
1993
+ return fixed;
1994
+ }());
1995
+ }
1996
+
1997
+ $.extend(F.defaults, {
1998
+ scrollbarWidth : $.scrollbarWidth(),
1999
+ fixed : $.support.fixedPosition,
2000
+ parent : $('body')
2001
+ });
2002
+
2003
+ //Get real width of page scroll-bar
2004
+ w1 = $(window).width();
2005
+
2006
+ H.addClass('envirabox-lock-test');
2007
+
2008
+ w2 = $(window).width();
2009
+
2010
+ H.removeClass('envirabox-lock-test');
2011
+
2012
+ $("<style type='text/css'>.envirabox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
2013
+ });
2014
+
2015
+ }(window, document, jQuery));
assets/js/lib/isotope.js ADDED
@@ -0,0 +1,950 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Isotope 1.5.26.
2
+ ;
3
+ (function(n, f, i) {
4
+ var s = n.document;
5
+ var w = s.documentElement;
6
+ var k = n.Modernizr;
7
+ var p = function(z) {
8
+ return z.charAt(0).toUpperCase() + z.slice(1)
9
+ };
10
+ var u = "Moz Webkit O Ms".split(" ");
11
+ var o = function(D) {
12
+ var C = w.style,
13
+ A;
14
+ if (typeof C[D] === "string") {
15
+ return D
16
+ }
17
+ D = p(D);
18
+ for (var B = 0, z = u.length; B < z; B++) {
19
+ A = u[B] + D;
20
+ if (typeof C[A] === "string") {
21
+ return A
22
+ }
23
+ }
24
+ };
25
+ var c = o("transform"),
26
+ v = o("transitionProperty");;
27
+ var j = {
28
+ csstransforms: function() {
29
+ return !!c
30
+ },
31
+ csstransforms3d: function() {
32
+ var B = !! o("perspective");
33
+ if (B && "webkitPerspective" in w.style) {
34
+ var A = f("<style>@media (transform-3d),(-webkit-transform-3d){#modernizr{height:3px}}</style>").appendTo("head"),
35
+ z = f('<div id="modernizr" />').appendTo("html");
36
+ B = z.height() === 3;
37
+ z.remove();
38
+ A.remove()
39
+ }
40
+ return B
41
+ },
42
+ csstransitions: function() {
43
+ return !!v
44
+ }
45
+ };
46
+ var m;
47
+ if (k) {
48
+ for (m in j) {
49
+ if (!k.hasOwnProperty(m)) {
50
+ k.addTest(m, j[m])
51
+ }
52
+ }
53
+ } else {
54
+ k = n.Modernizr = {
55
+ _version: "1.6ish: miniModernizr for Isotope"
56
+ };
57
+ var y = " ";
58
+ var q;
59
+ for (m in j) {
60
+ q = j[m]();
61
+ k[m] = q;
62
+ y += " " + (q ? "" : "no-") + m
63
+ }
64
+ f("html").addClass(y)
65
+ } if (k.csstransforms) {
66
+ var e = k.csstransforms3d ? {
67
+ translate: function(z) {
68
+ return "translate3d(" + z[0] + "px, " + z[1] + "px, 0) "
69
+ },
70
+ scale: function(z) {
71
+ return "scale3d(" + z + ", " + z + ", 1) "
72
+ }
73
+ } : {
74
+ translate: function(z) {
75
+ return "translate(" + z[0] + "px, " + z[1] + "px) "
76
+ },
77
+ scale: function(z) {
78
+ return "scale(" + z + ") "
79
+ }
80
+ };
81
+ var t = function(C, A, H) {
82
+ var F = f.data(C, "isoTransform") || {}, J = {}, B, D = {}, G;
83
+ J[A] = H;
84
+ f.extend(F, J);
85
+ for (B in F) {
86
+ G = F[B];
87
+ D[B] = e[B](G)
88
+ }
89
+ var E = D.translate || "",
90
+ I = D.scale || "",
91
+ z = E + I;
92
+ f.data(C, "isoTransform", F);
93
+ C.style[c] = z
94
+ };
95
+ f.cssNumber.scale = true;
96
+ f.cssHooks.scale = {
97
+ set: function(z, A) {
98
+ t(z, "scale", A)
99
+ },
100
+ get: function(B, A) {
101
+ var z = f.data(B, "isoTransform");
102
+ return z && z.scale ? z.scale : 1
103
+ }
104
+ };
105
+ f.fx.step.scale = function(z) {
106
+ f.cssHooks.scale.set(z.elem, z.now + z.unit)
107
+ };
108
+ f.cssNumber.translate = true;
109
+ f.cssHooks.translate = {
110
+ set: function(z, A) {
111
+ t(z, "translate", A)
112
+ },
113
+ get: function(B, A) {
114
+ var z = f.data(B, "isoTransform");
115
+ return z && z.translate ? z.translate : [0, 0]
116
+ }
117
+ }
118
+ }
119
+ var b, a;
120
+ if (k.csstransitions) {
121
+ b = {
122
+ WebkitTransitionProperty: "webkitTransitionEnd",
123
+ MozTransitionProperty: "transitionend",
124
+ OTransitionProperty: "oTransitionEnd otransitionend",
125
+ transitionProperty: "transitionend"
126
+ }[v];
127
+ a = o("transitionDuration")
128
+ }
129
+ var l = f.event,
130
+ h = f.event.handle ? "handle" : "dispatch",
131
+ d;
132
+ l.special.smartresize = {
133
+ setup: function() {
134
+ f(this).bind("resize", l.special.smartresize.handler)
135
+ },
136
+ teardown: function() {
137
+ f(this).unbind("resize", l.special.smartresize.handler)
138
+ },
139
+ handler: function(C, z) {
140
+ var B = this,
141
+ A = arguments;
142
+ C.type = "smartresize";
143
+ if (d) {
144
+ clearTimeout(d)
145
+ }
146
+ d = setTimeout(function() {
147
+ l[h].apply(B, A)
148
+ }, z === "execAsap" ? 0 : 100)
149
+ }
150
+ };
151
+ f.fn.smartresize = function(z) {
152
+ return z ? this.bind("smartresize", z) : this.trigger("smartresize", ["execAsap"])
153
+ };
154
+ f.Isotope = function(z, A, B) {
155
+ this.element = f(A);
156
+ this._create(z);
157
+ this._init(B)
158
+ };
159
+ var g = ["width", "height"];
160
+ var r = f(n);
161
+ f.Isotope.settings = {
162
+ resizable: true,
163
+ layoutMode: "masonry",
164
+ containerClass: "isotope",
165
+ itemClass: "isotope-item",
166
+ hiddenClass: "isotope-hidden",
167
+ hiddenStyle: {
168
+ opacity: 0,
169
+ scale: 0.001
170
+ },
171
+ visibleStyle: {
172
+ opacity: 1,
173
+ scale: 1
174
+ },
175
+ containerStyle: {
176
+ position: "relative",
177
+ overflow: "hidden"
178
+ },
179
+ animationEngine: "best-available",
180
+ animationOptions: {
181
+ queue: false,
182
+ duration: 800
183
+ },
184
+ sortBy: "original-order",
185
+ sortAscending: true,
186
+ resizesContainer: true,
187
+ transformsEnabled: true,
188
+ itemPositionDataEnabled: false
189
+ };
190
+ f.Isotope.prototype = {
191
+ _create: function(E) {
192
+ this.options = f.extend({}, f.Isotope.settings, E);
193
+ this.styleQueue = [];
194
+ this.elemCount = 0;
195
+ var C = this.element[0].style;
196
+ this.originalStyle = {};
197
+ var B = g.slice(0);
198
+ for (var G in this.options.containerStyle) {
199
+ B.push(G)
200
+ }
201
+ for (var F = 0, A = B.length; F < A; F++) {
202
+ G = B[F];
203
+ this.originalStyle[G] = C[G] || ""
204
+ }
205
+ this.element.css(this.options.containerStyle);
206
+ this._updateAnimationEngine();
207
+ this._updateUsingTransforms();
208
+ var D = {
209
+ "original-order": function(I, H) {
210
+ H.elemCount++;
211
+ return H.elemCount
212
+ },
213
+ random: function() {
214
+ return Math.random()
215
+ }
216
+ };
217
+ this.options.getSortData = f.extend(this.options.getSortData, D);
218
+ this.reloadItems();
219
+ this.offset = {
220
+ left: parseInt((this.element.css("padding-left") || 0), 10),
221
+ top: parseInt((this.element.css("padding-top") || 0), 10)
222
+ };
223
+ var z = this;
224
+ setTimeout(function() {
225
+ z.element.addClass(z.options.containerClass)
226
+ }, 0);
227
+ if (this.options.resizable) {
228
+ r.bind("smartresize.isotope", function() {
229
+ z.resize()
230
+ })
231
+ }
232
+ this.element.delegate("." + this.options.hiddenClass, "click", function() {
233
+ return false
234
+ })
235
+ },
236
+ _getAtoms: function(C) {
237
+ var z = this.options.itemSelector,
238
+ B = z ? C.filter(z).add(C.find(z)) : C,
239
+ A = {
240
+ position: "absolute"
241
+ };
242
+ B = B.filter(function(D, E) {
243
+ return E.nodeType === 1
244
+ });
245
+ if (this.usingTransforms) {
246
+ A.left = 0;
247
+ A.top = 0
248
+ }
249
+ B.css(A).addClass(this.options.itemClass);
250
+ this.updateSortData(B, true);
251
+ return B
252
+ },
253
+ _init: function(z) {
254
+ this.$filteredAtoms = this._filter(this.$allAtoms);
255
+ this._sort();
256
+ this.reLayout(z)
257
+ },
258
+ option: function(B) {
259
+ if (f.isPlainObject(B)) {
260
+ this.options = f.extend(true, this.options, B);
261
+ var z;
262
+ for (var A in B) {
263
+ z = "_update" + p(A);
264
+ if (this[z]) {
265
+ this[z]()
266
+ }
267
+ }
268
+ }
269
+ },
270
+ _updateAnimationEngine: function() {
271
+ var A = this.options.animationEngine.toLowerCase().replace(/[ _\-]/g, "");
272
+ var z;
273
+ switch (A) {
274
+ case "css":
275
+ case "none":
276
+ z = false;
277
+ break;
278
+ case "jquery":
279
+ z = true;
280
+ break;
281
+ default:
282
+ z = !k.csstransitions
283
+ }
284
+ this.isUsingJQueryAnimation = z;
285
+ this._updateUsingTransforms()
286
+ },
287
+ _updateTransformsEnabled: function() {
288
+ this._updateUsingTransforms()
289
+ },
290
+ _updateUsingTransforms: function() {
291
+ var z = this.usingTransforms = this.options.transformsEnabled && k.csstransforms && k.csstransitions && !this.isUsingJQueryAnimation;
292
+ if (!z) {
293
+ delete this.options.hiddenStyle.scale;
294
+ delete this.options.visibleStyle.scale
295
+ }
296
+ this.getPositionStyles = z ? this._translate : this._positionAbs
297
+ },
298
+ _filter: function(F) {
299
+ var B = this.options.filter === "" ? "*" : this.options.filter;
300
+ if (!B) {
301
+ return F
302
+ }
303
+ var E = this.options.hiddenClass,
304
+ A = "." + E,
305
+ D = F.filter(A),
306
+ z = D;
307
+ if (B !== "*") {
308
+ z = D.filter(B);
309
+ var C = F.not(A).not(B).addClass(E);
310
+ this.styleQueue.push({
311
+ $el: C,
312
+ style: this.options.hiddenStyle
313
+ })
314
+ }
315
+ this.styleQueue.push({
316
+ $el: z,
317
+ style: this.options.visibleStyle
318
+ });
319
+ z.removeClass(E);
320
+ return F.filter(B)
321
+ },
322
+ updateSortData: function(E, B) {
323
+ var A = this,
324
+ C = this.options.getSortData,
325
+ D, z;
326
+ E.each(function() {
327
+ D = f(this);
328
+ z = {};
329
+ for (var F in C) {
330
+ if (!B && F === "original-order") {
331
+ z[F] = f.data(this, "isotope-sort-data")[F]
332
+ } else {
333
+ z[F] = C[F](D, A)
334
+ }
335
+ }
336
+ f.data(this, "isotope-sort-data", z)
337
+ })
338
+ },
339
+ _sort: function() {
340
+ var C = this.options.sortBy,
341
+ B = this._getSorter,
342
+ z = this.options.sortAscending ? 1 : -1,
343
+ A = function(G, F) {
344
+ var E = B(G, C),
345
+ D = B(F, C);
346
+ if (E === D && C !== "original-order") {
347
+ E = B(G, "original-order");
348
+ D = B(F, "original-order")
349
+ }
350
+ return ((E > D) ? 1 : (E < D) ? -1 : 0) * z
351
+ };
352
+ this.$filteredAtoms.sort(A)
353
+ },
354
+ _getSorter: function(z, A) {
355
+ return f.data(z, "isotope-sort-data")[A]
356
+ },
357
+ _translate: function(z, A) {
358
+ return {
359
+ translate: [z, A]
360
+ }
361
+ },
362
+ _positionAbs: function(z, A) {
363
+ return {
364
+ left: z,
365
+ top: A
366
+ }
367
+ },
368
+ _pushPosition: function(B, A, C) {
369
+ A = Math.round(A + this.offset.left);
370
+ C = Math.round(C + this.offset.top);
371
+ var z = this.getPositionStyles(A, C);
372
+ this.styleQueue.push({
373
+ $el: B,
374
+ style: z
375
+ });
376
+ if (this.options.itemPositionDataEnabled) {
377
+ B.data("isotope-item-position", {
378
+ x: A,
379
+ y: C
380
+ })
381
+ }
382
+ },
383
+ layout: function(C, B) {
384
+ var A = this.options.layoutMode;
385
+ this["_" + A + "Layout"](C);
386
+ if (this.options.resizesContainer) {
387
+ var z = this["_" + A + "GetContainerSize"]();
388
+ this.styleQueue.push({
389
+ $el: this.element,
390
+ style: z
391
+ })
392
+ }
393
+ this._processStyleQueue(C, B);
394
+ this.isLaidOut = true
395
+ },
396
+ _processStyleQueue: function(A, P) {
397
+ var C = !this.isLaidOut ? "css" : (this.isUsingJQueryAnimation ? "animate" : "css"),
398
+ F = this.options.animationOptions,
399
+ G = this.options.onLayout,
400
+ N, D, J, K;
401
+ D = function(Q, R) {
402
+ R.$el[C](R.style, F)
403
+ };
404
+ if (this._isInserting && this.isUsingJQueryAnimation) {
405
+ D = function(Q, R) {
406
+ N = R.$el.hasClass("no-transition") ? "css" : C;
407
+ R.$el[N](R.style, F)
408
+ }
409
+ } else {
410
+ if (P || G || F.complete) {
411
+ var B = false,
412
+ I = [P, G, F.complete],
413
+ O = this;
414
+ J = true;
415
+ K = function() {
416
+ if (B) {
417
+ return
418
+ }
419
+ var S;
420
+ for (var R = 0, Q = I.length; R < Q; R++) {
421
+ S = I[R];
422
+ if (typeof S === "function") {
423
+ S.call(O.element, A, O)
424
+ }
425
+ }
426
+ B = true
427
+ };
428
+ if (this.isUsingJQueryAnimation && C === "animate") {
429
+ F.complete = K;
430
+ J = false
431
+ } else {
432
+ if (k.csstransitions) {
433
+ var H = 0,
434
+ L = this.styleQueue[0],
435
+ M = L && L.$el,
436
+ z;
437
+ while (!M || !M.length) {
438
+ z = this.styleQueue[H++];
439
+ if (!z) {
440
+ return
441
+ }
442
+ M = z.$el
443
+ }
444
+ var E = parseFloat(getComputedStyle(M[0])[a]);
445
+ if (E > 0) {
446
+ D = function(Q, R) {
447
+ R.$el[C](R.style, F).one(b, K)
448
+ };
449
+ J = false
450
+ }
451
+ }
452
+ }
453
+ }
454
+ }
455
+ f.each(this.styleQueue, D);
456
+ if (J) {
457
+ K()
458
+ }
459
+ this.styleQueue = []
460
+ },
461
+ resize: function() {
462
+ if (this["_" + this.options.layoutMode + "ResizeChanged"]()) {
463
+ this.reLayout()
464
+ }
465
+ },
466
+ reLayout: function(z) {
467
+ this["_" + this.options.layoutMode + "Reset"]();
468
+ this.layout(this.$filteredAtoms, z)
469
+ },
470
+ addItems: function(A, B) {
471
+ var z = this._getAtoms(A);
472
+ this.$allAtoms = this.$allAtoms.add(z);
473
+ if (B) {
474
+ B(z)
475
+ }
476
+ },
477
+ insert: function(A, B) {
478
+ this.element.append(A);
479
+ var z = this;
480
+ this.addItems(A, function(C) {
481
+ var D = z._filter(C);
482
+ z._addHideAppended(D);
483
+ z._sort();
484
+ z.reLayout();
485
+ z._revealAppended(D, B)
486
+ })
487
+ },
488
+ appended: function(A, B) {
489
+ var z = this;
490
+ this.addItems(A, function(C) {
491
+ z._addHideAppended(C);
492
+ z.layout(C);
493
+ z._revealAppended(C, B)
494
+ })
495
+ },
496
+ _addHideAppended: function(z) {
497
+ this.$filteredAtoms = this.$filteredAtoms.add(z);
498
+ z.addClass("no-transition");
499
+ this._isInserting = true;
500
+ this.styleQueue.push({
501
+ $el: z,
502
+ style: this.options.hiddenStyle
503
+ })
504
+ },
505
+ _revealAppended: function(A, B) {
506
+ var z = this;
507
+ setTimeout(function() {
508
+ A.removeClass("no-transition");
509
+ z.styleQueue.push({
510
+ $el: A,
511
+ style: z.options.visibleStyle
512
+ });
513
+ z._isInserting = false;
514
+ z._processStyleQueue(A, B)
515
+ }, 10)
516
+ },
517
+ reloadItems: function() {
518
+ this.$allAtoms = this._getAtoms(this.element.children())
519
+ },
520
+ remove: function(B, C) {
521
+ this.$allAtoms = this.$allAtoms.not(B);
522
+ this.$filteredAtoms = this.$filteredAtoms.not(B);
523
+ var z = this;
524
+ var A = function() {
525
+ B.remove();
526
+ if (C) {
527
+ C.call(z.element)
528
+ }
529
+ };
530
+ if (B.filter(":not(." + this.options.hiddenClass + ")").length) {
531
+ this.styleQueue.push({
532
+ $el: B,
533
+ style: this.options.hiddenStyle
534
+ });
535
+ this._sort();
536
+ this.reLayout(A)
537
+ } else {
538
+ A()
539
+ }
540
+ },
541
+ shuffle: function(z) {
542
+ this.updateSortData(this.$allAtoms);
543
+ this.options.sortBy = "random";
544
+ this._sort();
545
+ this.reLayout(z)
546
+ },
547
+ destroy: function() {
548
+ var B = this.usingTransforms;
549
+ var A = this.options;
550
+ this.$allAtoms.removeClass(A.hiddenClass + " " + A.itemClass).each(function() {
551
+ var D = this.style;
552
+ D.position = "";
553
+ D.top = "";
554
+ D.left = "";
555
+ D.opacity = "";
556
+ if (B) {
557
+ D[c] = ""
558
+ }
559
+ });
560
+ var z = this.element[0].style;
561
+ for (var C in this.originalStyle) {
562
+ z[C] = this.originalStyle[C]
563
+ }
564
+ this.element.unbind(".isotope").undelegate("." + A.hiddenClass, "click").removeClass(A.containerClass).removeData("isotope");
565
+ r.unbind(".isotope")
566
+ },
567
+ _getSegments: function(F) {
568
+ var C = this.options.layoutMode,
569
+ B = F ? "rowHeight" : "columnWidth",
570
+ A = F ? "height" : "width",
571
+ E = F ? "rows" : "cols",
572
+ G = this.element[A](),
573
+ z, D = this.options[C] && this.options[C][B] || this.$filteredAtoms["outer" + p(A)](true) || G;
574
+ z = Math.floor(G / D);
575
+ z = Math.max(z, 1);
576
+ this[C][E] = z;
577
+ this[C][B] = D
578
+ },
579
+ _checkIfSegmentsChanged: function(C) {
580
+ var A = this.options.layoutMode,
581
+ B = C ? "rows" : "cols",
582
+ z = this[A][B];
583
+ this._getSegments(C);
584
+ return (this[A][B] !== z)
585
+ },
586
+ _masonryReset: function() {
587
+ this.masonry = {};
588
+ this._getSegments();
589
+ var z = this.masonry.cols;
590
+ this.masonry.colYs = [];
591
+ while (z--) {
592
+ this.masonry.colYs.push(0)
593
+ }
594
+ },
595
+ _masonryLayout: function(B) {
596
+ var z = this,
597
+ A = z.masonry;
598
+ B.each(function() {
599
+ var G = f(this),
600
+ E = Math.ceil(G.outerWidth(true) / A.columnWidth);
601
+ E = Math.min(E, A.cols);
602
+ if (E === 1) {
603
+ z._masonryPlaceBrick(G, A.colYs)
604
+ } else {
605
+ var H = A.cols + 1 - E,
606
+ D = [],
607
+ F, C;
608
+ for (C = 0; C < H; C++) {
609
+ F = A.colYs.slice(C, C + E);
610
+ D[C] = Math.max.apply(Math, F)
611
+ }
612
+ z._masonryPlaceBrick(G, D)
613
+ }
614
+ })
615
+ },
616
+ _masonryPlaceBrick: function(C, G) {
617
+ var z = Math.min.apply(Math, G),
618
+ I = 0;
619
+ for (var B = 0, D = G.length; B < D; B++) {
620
+ if (G[B] === z) {
621
+ I = B;
622
+ break
623
+ }
624
+ }
625
+ var H = this.masonry.columnWidth * I,
626
+ F = z;
627
+ this._pushPosition(C, H, F);
628
+ var E = z + C.outerHeight(true),
629
+ A = this.masonry.cols + 1 - D;
630
+ for (B = 0; B < A; B++) {
631
+ this.masonry.colYs[I + B] = E
632
+ }
633
+ },
634
+ _masonryGetContainerSize: function() {
635
+ var z = Math.max.apply(Math, this.masonry.colYs);
636
+ return {
637
+ height: z
638
+ }
639
+ },
640
+ _masonryResizeChanged: function() {
641
+ return this._checkIfSegmentsChanged()
642
+ },
643
+ _fitRowsReset: function() {
644
+ this.fitRows = {
645
+ x: 0,
646
+ y: 0,
647
+ height: 0
648
+ }
649
+ },
650
+ _fitRowsLayout: function(C) {
651
+ var z = this,
652
+ B = this.element.width(),
653
+ A = this.fitRows;
654
+ C.each(function() {
655
+ var F = f(this),
656
+ E = F.outerWidth(true),
657
+ D = F.outerHeight(true);
658
+ if (A.x !== 0 && E + A.x > B) {
659
+ A.x = 0;
660
+ A.y = A.height
661
+ }
662
+ z._pushPosition(F, A.x, A.y);
663
+ A.height = Math.max(A.y + D, A.height);
664
+ A.x += E
665
+ })
666
+ },
667
+ _fitRowsGetContainerSize: function() {
668
+ return {
669
+ height: this.fitRows.height
670
+ }
671
+ },
672
+ _fitRowsResizeChanged: function() {
673
+ return true
674
+ },
675
+ _cellsByRowReset: function() {
676
+ this.cellsByRow = {
677
+ index: 0
678
+ };
679
+ this._getSegments();
680
+ this._getSegments(true)
681
+ },
682
+ _cellsByRowLayout: function(B) {
683
+ var z = this,
684
+ A = this.cellsByRow;
685
+ B.each(function() {
686
+ var E = f(this),
687
+ D = A.index % A.cols,
688
+ F = Math.floor(A.index / A.cols),
689
+ C = (D + 0.5) * A.columnWidth - E.outerWidth(true) / 2,
690
+ G = (F + 0.5) * A.rowHeight - E.outerHeight(true) / 2;
691
+ z._pushPosition(E, C, G);
692
+ A.index++
693
+ })
694
+ },
695
+ _cellsByRowGetContainerSize: function() {
696
+ return {
697
+ height: Math.ceil(this.$filteredAtoms.length / this.cellsByRow.cols) * this.cellsByRow.rowHeight + this.offset.top
698
+ }
699
+ },
700
+ _cellsByRowResizeChanged: function() {
701
+ return this._checkIfSegmentsChanged()
702
+ },
703
+ _straightDownReset: function() {
704
+ this.straightDown = {
705
+ y: 0
706
+ }
707
+ },
708
+ _straightDownLayout: function(A) {
709
+ var z = this;
710
+ A.each(function(B) {
711
+ var C = f(this);
712
+ z._pushPosition(C, 0, z.straightDown.y);
713
+ z.straightDown.y += C.outerHeight(true)
714
+ })
715
+ },
716
+ _straightDownGetContainerSize: function() {
717
+ return {
718
+ height: this.straightDown.y
719
+ }
720
+ },
721
+ _straightDownResizeChanged: function() {
722
+ return true
723
+ },
724
+ _masonryHorizontalReset: function() {
725
+ this.masonryHorizontal = {};
726
+ this._getSegments(true);
727
+ var z = this.masonryHorizontal.rows;
728
+ this.masonryHorizontal.rowXs = [];
729
+ while (z--) {
730
+ this.masonryHorizontal.rowXs.push(0)
731
+ }
732
+ },
733
+ _masonryHorizontalLayout: function(B) {
734
+ var z = this,
735
+ A = z.masonryHorizontal;
736
+ B.each(function() {
737
+ var G = f(this),
738
+ E = Math.ceil(G.outerHeight(true) / A.rowHeight);
739
+ E = Math.min(E, A.rows);
740
+ if (E === 1) {
741
+ z._masonryHorizontalPlaceBrick(G, A.rowXs)
742
+ } else {
743
+ var H = A.rows + 1 - E,
744
+ D = [],
745
+ F, C;
746
+ for (C = 0; C < H; C++) {
747
+ F = A.rowXs.slice(C, C + E);
748
+ D[C] = Math.max.apply(Math, F)
749
+ }
750
+ z._masonryHorizontalPlaceBrick(G, D)
751
+ }
752
+ })
753
+ },
754
+ _masonryHorizontalPlaceBrick: function(C, H) {
755
+ var z = Math.min.apply(Math, H),
756
+ F = 0;
757
+ for (var B = 0, D = H.length; B < D; B++) {
758
+ if (H[B] === z) {
759
+ F = B;
760
+ break
761
+ }
762
+ }
763
+ var I = z,
764
+ G = this.masonryHorizontal.rowHeight * F;
765
+ this._pushPosition(C, I, G);
766
+ var E = z + C.outerWidth(true),
767
+ A = this.masonryHorizontal.rows + 1 - D;
768
+ for (B = 0; B < A; B++) {
769
+ this.masonryHorizontal.rowXs[F + B] = E
770
+ }
771
+ },
772
+ _masonryHorizontalGetContainerSize: function() {
773
+ var z = Math.max.apply(Math, this.masonryHorizontal.rowXs);
774
+ return {
775
+ width: z
776
+ }
777
+ },
778
+ _masonryHorizontalResizeChanged: function() {
779
+ return this._checkIfSegmentsChanged(true)
780
+ },
781
+ _fitColumnsReset: function() {
782
+ this.fitColumns = {
783
+ x: 0,
784
+ y: 0,
785
+ width: 0
786
+ }
787
+ },
788
+ _fitColumnsLayout: function(C) {
789
+ var z = this,
790
+ B = this.element.height(),
791
+ A = this.fitColumns;
792
+ C.each(function() {
793
+ var F = f(this),
794
+ E = F.outerWidth(true),
795
+ D = F.outerHeight(true);
796
+ if (A.y !== 0 && D + A.y > B) {
797
+ A.x = A.width;
798
+ A.y = 0
799
+ }
800
+ z._pushPosition(F, A.x, A.y);
801
+ A.width = Math.max(A.x + E, A.width);
802
+ A.y += D
803
+ })
804
+ },
805
+ _fitColumnsGetContainerSize: function() {
806
+ return {
807
+ width: this.fitColumns.width
808
+ }
809
+ },
810
+ _fitColumnsResizeChanged: function() {
811
+ return true
812
+ },
813
+ _cellsByColumnReset: function() {
814
+ this.cellsByColumn = {
815
+ index: 0
816
+ };
817
+ this._getSegments();
818
+ this._getSegments(true)
819
+ },
820
+ _cellsByColumnLayout: function(B) {
821
+ var z = this,
822
+ A = this.cellsByColumn;
823
+ B.each(function() {
824
+ var E = f(this),
825
+ D = Math.floor(A.index / A.rows),
826
+ F = A.index % A.rows,
827
+ C = (D + 0.5) * A.columnWidth - E.outerWidth(true) / 2,
828
+ G = (F + 0.5) * A.rowHeight - E.outerHeight(true) / 2;
829
+ z._pushPosition(E, C, G);
830
+ A.index++
831
+ })
832
+ },
833
+ _cellsByColumnGetContainerSize: function() {
834
+ return {
835
+ width: Math.ceil(this.$filteredAtoms.length / this.cellsByColumn.rows) * this.cellsByColumn.columnWidth
836
+ }
837
+ },
838
+ _cellsByColumnResizeChanged: function() {
839
+ return this._checkIfSegmentsChanged(true)
840
+ },
841
+ _straightAcrossReset: function() {
842
+ this.straightAcross = {
843
+ x: 0
844
+ }
845
+ },
846
+ _straightAcrossLayout: function(A) {
847
+ var z = this;
848
+ A.each(function(B) {
849
+ var C = f(this);
850
+ z._pushPosition(C, z.straightAcross.x, 0);
851
+ z.straightAcross.x += C.outerWidth(true)
852
+ })
853
+ },
854
+ _straightAcrossGetContainerSize: function() {
855
+ return {
856
+ width: this.straightAcross.x
857
+ }
858
+ },
859
+ _straightAcrossResizeChanged: function() {
860
+ return true
861
+ }
862
+ };;
863
+ f.fn.imagesLoaded = function(G) {
864
+ var E = this,
865
+ C = E.find("img").add(E.filter("img")),
866
+ z = C.length,
867
+ F = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
868
+ B = [];
869
+
870
+ function D() {
871
+ G.call(E, C)
872
+ }
873
+
874
+ function A(I) {
875
+ var H = I.target;
876
+ if (H.src !== F && f.inArray(H, B) === -1) {
877
+ B.push(H);
878
+ if (--z <= 0) {
879
+ setTimeout(D);
880
+ C.unbind(".imagesLoaded", A)
881
+ }
882
+ }
883
+ }
884
+ if (!z) {
885
+ D()
886
+ }
887
+ C.bind("load.imagesLoaded error.imagesLoaded", A).each(function() {
888
+ var H = this.src;
889
+ this.src = F;
890
+ this.src = H
891
+ });
892
+ return E
893
+ };
894
+ var x = function(z) {
895
+ if (n.console) {
896
+ n.console.error(z)
897
+ }
898
+ };
899
+ f.fn.isotope = function(A, B) {
900
+ if (typeof A === "string") {
901
+ var z = Array.prototype.slice.call(arguments, 1);
902
+ this.each(function() {
903
+ var C = f.data(this, "isotope");
904
+ if (!C) {
905
+ x("cannot call methods on isotope prior to initialization; attempted to call method '" + A + "'");
906
+ return
907
+ }
908
+ if (!f.isFunction(C[A]) || A.charAt(0) === "_") {
909
+ x("no such method '" + A + "' for isotope instance");
910
+ return
911
+ }
912
+ C[A].apply(C, z)
913
+ })
914
+ } else {
915
+ this.each(function() {
916
+ var C = f.data(this, "isotope");
917
+ if (C) {
918
+ C.option(A);
919
+ C._init(B)
920
+ } else {
921
+ f.data(this, "isotope", new f.Isotope(A, this, B))
922
+ }
923
+ })
924
+ }
925
+ return this
926
+ }
927
+ })(window, jQuery);
928
+ // Isoptope custom extensions and methods.
929
+ jQuery.Isotope.prototype._getMasonryGutterColumns = function() {
930
+ var a = this.options.masonry && this.options.masonry.gutterWidth || 0;
931
+ containerWidth = this.element.width();
932
+ this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth || this.$filteredAtoms.outerWidth(true) || containerWidth;
933
+ this.masonry.columnWidth += a;
934
+ this.masonry.cols = Math.floor((containerWidth + a) / this.masonry.columnWidth);
935
+ this.masonry.cols = Math.max(this.masonry.cols, 1)
936
+ };
937
+ jQuery.Isotope.prototype._masonryReset = function() {
938
+ this.masonry = {};
939
+ this._getMasonryGutterColumns();
940
+ var a = this.masonry.cols;
941
+ this.masonry.colYs = [];
942
+ while (a--) {
943
+ this.masonry.colYs.push(0)
944
+ }
945
+ };
946
+ jQuery.Isotope.prototype._masonryResizeChanged = function() {
947
+ var a = this.masonry.cols;
948
+ this._getMasonryGutterColumns();
949
+ return (this.masonry.cols !== a)
950
+ };
assets/js/lib/mousewheel.js ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Mousewheel 3.1.12
3
+ *
4
+ * Copyright 2014 jQuery Foundation and other contributors
5
+ * Released under the MIT license.
6
+ * http://jquery.org/license
7
+ */
8
+
9
+ (function (factory) {
10
+ if ( typeof define === 'function' && define.amd ) {
11
+ // AMD. Register as an anonymous module.
12
+ define(['jquery'], factory);
13
+ } else if (typeof exports === 'object') {
14
+ // Node/CommonJS style for Browserify
15
+ module.exports = factory;
16
+ } else {
17
+ // Browser globals
18
+ factory(jQuery);
19
+ }
20
+ }(function ($) {
21
+
22
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
23
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
24
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
25
+ slice = Array.prototype.slice,
26
+ nullLowestDeltaTimeout, lowestDelta;
27
+
28
+ if ( $.event.fixHooks ) {
29
+ for ( var i = toFix.length; i; ) {
30
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
31
+ }
32
+ }
33
+
34
+ var special = $.event.special.mousewheel = {
35
+ version: '3.1.12',
36
+
37
+ setup: function() {
38
+ if ( this.addEventListener ) {
39
+ for ( var i = toBind.length; i; ) {
40
+ this.addEventListener( toBind[--i], handler, false );
41
+ }
42
+ } else {
43
+ this.onmousewheel = handler;
44
+ }
45
+ // Store the line height and page height for this particular element
46
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
47
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
48
+ },
49
+
50
+ teardown: function() {
51
+ if ( this.removeEventListener ) {
52
+ for ( var i = toBind.length; i; ) {
53
+ this.removeEventListener( toBind[--i], handler, false );
54
+ }
55
+ } else {
56
+ this.onmousewheel = null;
57
+ }
58
+ // Clean up the data we added to the element
59
+ $.removeData(this, 'mousewheel-line-height');
60
+ $.removeData(this, 'mousewheel-page-height');
61
+ },
62
+
63
+ getLineHeight: function(elem) {
64
+ var $elem = $(elem),
65
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
66
+ if (!$parent.length) {
67
+ $parent = $('body');
68
+ }
69
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
70
+ },
71
+
72
+ getPageHeight: function(elem) {
73
+ return $(elem).height();
74
+ },
75
+
76
+ settings: {
77
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
78
+ normalizeOffset: true // calls getBoundingClientRect for each event
79
+ }
80
+ };
81
+
82
+ $.fn.extend({
83
+ mousewheel: function(fn) {
84
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
85
+ },
86
+
87
+ unmousewheel: function(fn) {
88
+ return this.unbind('mousewheel', fn);
89
+ }
90
+ });
91
+
92
+
93
+ function handler(event) {
94
+ var orgEvent = event || window.event,
95
+ args = slice.call(arguments, 1),
96
+ delta = 0,
97
+ deltaX = 0,
98
+ deltaY = 0,
99
+ absDelta = 0,
100
+ offsetX = 0,
101
+ offsetY = 0;
102
+ event = $.event.fix(orgEvent);
103
+ event.type = 'mousewheel';
104
+
105
+ // Old school scrollwheel delta
106
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
107
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
108
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
109
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
110
+
111
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
112
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
113
+ deltaX = deltaY * -1;
114
+ deltaY = 0;
115
+ }
116
+
117
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
118
+ delta = deltaY === 0 ? deltaX : deltaY;
119
+
120
+ // New school wheel delta (wheel event)
121
+ if ( 'deltaY' in orgEvent ) {
122
+ deltaY = orgEvent.deltaY * -1;
123
+ delta = deltaY;
124
+ }
125
+ if ( 'deltaX' in orgEvent ) {
126
+ deltaX = orgEvent.deltaX;
127
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
128
+ }
129
+
130
+ // No change actually happened, no reason to go any further
131
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
132
+
133
+ // Need to convert lines and pages to pixels if we aren't already in pixels
134
+ // There are three delta modes:
135
+ // * deltaMode 0 is by pixels, nothing to do
136
+ // * deltaMode 1 is by lines
137
+ // * deltaMode 2 is by pages
138
+ if ( orgEvent.deltaMode === 1 ) {
139
+ var lineHeight = $.data(this, 'mousewheel-line-height');
140
+ delta *= lineHeight;
141
+ deltaY *= lineHeight;
142
+ deltaX *= lineHeight;
143
+ } else if ( orgEvent.deltaMode === 2 ) {
144
+ var pageHeight = $.data(this, 'mousewheel-page-height');
145
+ delta *= pageHeight;
146
+ deltaY *= pageHeight;
147
+ deltaX *= pageHeight;
148
+ }
149
+
150
+ // Store lowest absolute delta to normalize the delta values
151
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
152
+
153
+ if ( !lowestDelta || absDelta < lowestDelta ) {
154
+ lowestDelta = absDelta;
155
+
156
+ // Adjust older deltas if necessary
157
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
158
+ lowestDelta /= 40;
159
+ }
160
+ }
161
+
162
+ // Adjust older deltas if necessary
163
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
164
+ // Divide all the things by 40!
165
+ delta /= 40;
166
+ deltaX /= 40;
167
+ deltaY /= 40;
168
+ }
169
+
170
+ // Get a whole, normalized value for the deltas
171
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
172
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
173
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
174
+
175
+ // Normalise offsetX and offsetY properties
176
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
177
+ var boundingRect = this.getBoundingClientRect();
178
+ offsetX = event.clientX - boundingRect.left;
179
+ offsetY = event.clientY - boundingRect.top;
180
+ }
181
+
182
+ // Add information to the event object
183
+ event.deltaX = deltaX;
184
+ event.deltaY = deltaY;
185
+ event.deltaFactor = lowestDelta;
186
+ event.offsetX = offsetX;
187
+ event.offsetY = offsetY;
188
+ // Go ahead and set deltaMode to 0 since we converted to pixels
189
+ // Although this is a little odd since we overwrite the deltaX/Y
190
+ // properties with normalized deltas.
191
+ event.deltaMode = 0;
192
+
193
+ // Add event and delta to the front of the arguments
194
+ args.unshift(event, delta, deltaX, deltaY);
195
+
196
+ // Clearout lowestDelta after sometime to better
197
+ // handle multiple device types that give different
198
+ // a different lowestDelta
199
+ // Ex: trackpad = 3 and mouse wheel = 120
200
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
201
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
202
+
203
+ return ($.event.dispatch || $.event.handle).apply(this, args);
204
+ }
205
+
206
+ function nullLowestDelta() {
207
+ lowestDelta = null;
208
+ }
209
+
210
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
211
+ // If this is an older event and the delta is divisable by 120,
212
+ // then we are assuming that the browser is treating this as an
213
+ // older mouse wheel event and that we should divide the deltas
214
+ // by 40 to try and get a more usable deltaFactor.
215
+ // Side note, this actually impacts the reported scroll distance
216
+ // in older browsers and can cause scrolling to be slower than native.
217
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
218
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
219
+ }
220
+
221
+ }));
assets/js/metabox.js CHANGED
@@ -291,36 +291,49 @@
291
  );
292
  });
293
 
294
- // Open up the media modal area for modifying gallery metadata.
295
- $('#envira-gallery').on('click.enviraModify', '.envira-gallery-modify-image', function(e){
296
  e.preventDefault();
297
  var attach_id = $(this).parent().data('envira-gallery-image'),
298
  formfield = 'envira-gallery-meta-' + attach_id;
299
-
300
- // Show the modal.
301
- envira_main_frame = true;
302
- $('#' + formfield).appendTo('body').show();
303
-
304
- // Close the modal window on user action
305
- var append_and_hide = function(e){
306
- e.preventDefault();
307
- $('#' + formfield).appendTo('#' + attach_id).hide();
308
- envira_main_frame = false;
309
- $(document).off('click.enviraLink');
310
- };
311
- $(document).on('click.enviraIframe', '.media-modal-close, .media-modal-backdrop', append_and_hide);
312
- $(document).on('keydown.enviraIframe', function(e){
313
- if ( 27 == e.keyCode && envira_main_frame ) {
314
- append_and_hide(e);
315
- }
316
- });
317
- $(document).on('click.enviraLink', '.ed_button', function(){
318
- // Set custom z-index for link dialog box.
319
- $('#wp-link-backdrop').css('zIndex', '170100');
320
- $('#wp-link-wrap').css('zIndex', '171005' );
321
- });
322
  });
323
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  // Save the gallery metadata.
325
  $(document).on('click', '.envira-gallery-meta-submit', function(e){
326
  e.preventDefault();
@@ -610,7 +623,8 @@
610
  wpQueueError(pluploadL10n.security_error);
611
  break;
612
  default:
613
- wpFileError(fileObj, pluploadL10n.default_error);
 
614
  }
615
  up.refresh();
616
  });
@@ -621,13 +635,16 @@
621
  function enviraUploadError( up, file, over100mb ) {
622
  var message;
623
 
624
- if ( over100mb )
625
- message = pluploadL10n.big_upload_queued.replace('%s', file.name) + ' ' + pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>');
626
- else
627
- message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
 
 
 
628
 
629
- $('#envira-gallery-upload-error').html('<p class="error">' + message + '</p>');
630
- up.removeFile(file);
631
  }
632
  });
633
  }(jQuery));
291
  );
292
  });
293
 
294
+ // Open up the media modal area for modifying gallery metadata when clicking the info icon
295
+ $('#envira-gallery').on('click', '.envira-gallery-modify-image', function(e){
296
  e.preventDefault();
297
  var attach_id = $(this).parent().data('envira-gallery-image'),
298
  formfield = 'envira-gallery-meta-' + attach_id;
299
+
300
+ // Open modal
301
+ openModal(attach_id, formfield);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  });
303
+
304
+ // Open modal
305
+ var modal;
306
+ var openModal = function(attach_id, formfield) {
307
+
308
+ // Show the modal.
309
+ modal = $('#' + formfield).appendTo('body');
310
+ $(modal).show();
311
+
312
+ // Close modal on close button or background click
313
+ $(document).on('click', '.media-modal-close, .media-modal-backdrop', function(e) {
314
+ e.preventDefault();
315
+ closeModal();
316
+ });
317
+
318
+ // Close modal on esc keypress
319
+ $(document).on('keydown', function(e) {
320
+ if ( 27 == e.keyCode ) {
321
+ closeModal();
322
+ }
323
+ });
324
+ }
325
+
326
+ // Close modal
327
+ var closeModal = function() {
328
+ // Get modal
329
+ var formfield = $(modal).attr('id');
330
+ var formfieldArr = formfield.split('-');
331
+ var attach_id = formfieldArr[(formfieldArr.length-1)];
332
+
333
+ // Close modal
334
+ $('#' + formfield).appendTo('#' + attach_id).hide();
335
+ }
336
+
337
  // Save the gallery metadata.
338
  $(document).on('click', '.envira-gallery-meta-submit', function(e){
339
  e.preventDefault();
623
  wpQueueError(pluploadL10n.security_error);
624
  break;
625
  default:
626
+ enviraUploadError(up, error.file);
627
+ break;
628
  }
629
  up.refresh();
630
  });
635
  function enviraUploadError( up, file, over100mb ) {
636
  var message;
637
 
638
+ console.log('enviraUploadError');
639
+
640
+ if ( over100mb ) {
641
+ message = pluploadL10n.big_upload_queued.replace('%s', file.name) + ' ' + pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>');
642
+ } else {
643
+ message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
644
+ }
645
 
646
+ $('#envira-gallery-upload-error').html('<div class="error fade"><p>' + message + '</p></div>');
647
+ up.removeFile(file);
648
  }
649
  });
650
  }(jQuery));
assets/js/min/envira-min.js CHANGED
@@ -1,2 +1,2 @@
1
- function enviraGetColWidth(t,e){var i,n=jQuery(window).width(),o=t.data("envira-columns");switch(o){case 1:i=t.width();break;case 2:i=480>=n?t.width():t.width()/2;break;case 3:i=480>=n?t.width():768>=n?t.width()/2:t.width()/3;case 4:case 5:case 6:i=480>=n?t.width():768>=n?t.width()/2:1024>=n?t.width()/3:t.width()/o}return parseInt(i-e*(o-1)/o)}function enviraSetWidths(t,e){var i=enviraGetColWidth(t,e);t.children().css({width:i})}function enviraIsMobile(){var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t}function enviraThrottle(t,e){return function(){var i=this,n=[].slice(arguments);clearTimeout(t._throttleTimeout),t._throttleTimeout=setTimeout(function(){t.apply(i,n)},e)}}!function(t,e,i){var n=t.document,o=n.documentElement,s=t.Modernizr,a=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},r="Moz Webkit O Ms".split(" "),h=function(t){var e=o.style,i;if("string"==typeof e[t])return t;t=a(t);for(var n=0,s=r.length;s>n;n++)if(i=r[n]+t,"string"==typeof e[i])return i},l=h("transform"),d=h("transitionProperty"),c={csstransforms:function(){return!!l},csstransforms3d:function(){var t=!!h("perspective");if(t&&"webkitPerspective"in o.style){var i=e("<style>@media (transform-3d),(-webkit-transform-3d){#modernizr{height:3px}}</style>").appendTo("head"),n=e('<div id="modernizr" />').appendTo("html");t=3===n.height(),n.remove(),i.remove()}return t},csstransitions:function(){return!!d}},u;if(s)for(u in c)s.hasOwnProperty(u)||s.addTest(u,c[u]);else{s=t.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var f=" ",p;for(u in c)p=c[u](),s[u]=p,f+=" "+(p?"":"no-")+u;e("html").addClass(f)}if(s.csstransforms){var m=s.csstransforms3d?{translate:function(t){return"translate3d("+t[0]+"px, "+t[1]+"px, 0) "},scale:function(t){return"scale3d("+t+", "+t+", 1) "}}:{translate:function(t){return"translate("+t[0]+"px, "+t[1]+"px) "},scale:function(t){return"scale("+t+") "}},g=function(t,i,n){var o=e.data(t,"isoTransform")||{},s={},a,r={},h;s[i]=n,e.extend(o,s);for(a in o)h=o[a],r[a]=m[a](h);var d=r.translate||"",c=r.scale||"",u=d+c;e.data(t,"isoTransform",o),t.style[l]=u};e.cssNumber.scale=!0,e.cssHooks.scale={set:function(t,e){g(t,"scale",e)},get:function(t,i){var n=e.data(t,"isoTransform");return n&&n.scale?n.scale:1}},e.fx.step.scale=function(t){e.cssHooks.scale.set(t.elem,t.now+t.unit)},e.cssNumber.translate=!0,e.cssHooks.translate={set:function(t,e){g(t,"translate",e)},get:function(t,i){var n=e.data(t,"isoTransform");return n&&n.translate?n.translate:[0,0]}}}var y,v;s.csstransitions&&(y={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[d],v=h("transitionDuration"));var w=e.event,b=e.event.handle?"handle":"dispatch",x;w.special.smartresize={setup:function(){e(this).bind("resize",w.special.smartresize.handler)},teardown:function(){e(this).unbind("resize",w.special.smartresize.handler)},handler:function(t,e){var i=this,n=arguments;t.type="smartresize",x&&clearTimeout(x),x=setTimeout(function(){w[b].apply(i,n)},"execAsap"===e?0:100)}},e.fn.smartresize=function(t){return t?this.bind("smartresize",t):this.trigger("smartresize",["execAsap"])},e.Isotope=function(t,i,n){this.element=e(i),this._create(t),this._init(n)};var _=["width","height"],C=e(t);e.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},e.Isotope.prototype={_create:function(t){this.options=e.extend({},e.Isotope.settings,t),this.styleQueue=[],this.elemCount=0;var i=this.element[0].style;this.originalStyle={};var n=_.slice(0);for(var o in this.options.containerStyle)n.push(o);for(var s=0,a=n.length;a>s;s++)o=n[s],this.originalStyle[o]=i[o]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var r={"original-order":function(t,e){return e.elemCount++,e.elemCount},random:function(){return Math.random()}};this.options.getSortData=e.extend(this.options.getSortData,r),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var h=this;setTimeout(function(){h.element.addClass(h.options.containerClass)},0),this.options.resizable&&C.bind("smartresize.isotope",function(){h.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(t){var e=this.options.itemSelector,i=e?t.filter(e).add(t.find(e)):t,n={position:"absolute"};return i=i.filter(function(t,e){return 1===e.nodeType}),this.usingTransforms&&(n.left=0,n.top=0),i.css(n).addClass(this.options.itemClass),this.updateSortData(i,!0),i},_init:function(t){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(t)},option:function(t){if(e.isPlainObject(t)){this.options=e.extend(!0,this.options,t);var i;for(var n in t)i="_update"+a(n),this[i]&&this[i]()}},_updateAnimationEngine:function(){var t=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),e;switch(t){case"css":case"none":e=!1;break;case"jquery":e=!0;break;default:e=!s.csstransitions}this.isUsingJQueryAnimation=e,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var t=this.usingTransforms=this.options.transformsEnabled&&s.csstransforms&&s.csstransitions&&!this.isUsingJQueryAnimation;t||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=t?this._translate:this._positionAbs},_filter:function(t){var e=""===this.options.filter?"*":this.options.filter;if(!e)return t;var i=this.options.hiddenClass,n="."+i,o=t.filter(n),s=o;if("*"!==e){s=o.filter(e);var a=t.not(n).not(e).addClass(i);this.styleQueue.push({$el:a,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:s,style:this.options.visibleStyle}),s.removeClass(i),t.filter(e)},updateSortData:function(t,i){var n=this,o=this.options.getSortData,s,a;t.each(function(){s=e(this),a={};for(var t in o)a[t]=i||"original-order"!==t?o[t](s,n):e.data(this,"isotope-sort-data")[t];e.data(this,"isotope-sort-data",a)})},_sort:function(){var t=this.options.sortBy,e=this._getSorter,i=this.options.sortAscending?1:-1,n=function(n,o){var s=e(n,t),a=e(o,t);return s===a&&"original-order"!==t&&(s=e(n,"original-order"),a=e(o,"original-order")),(s>a?1:a>s?-1:0)*i};this.$filteredAtoms.sort(n)},_getSorter:function(t,i){return e.data(t,"isotope-sort-data")[i]},_translate:function(t,e){return{translate:[t,e]}},_positionAbs:function(t,e){return{left:t,top:e}},_pushPosition:function(t,e,i){e=Math.round(e+this.offset.left),i=Math.round(i+this.offset.top);var n=this.getPositionStyles(e,i);this.styleQueue.push({$el:t,style:n}),this.options.itemPositionDataEnabled&&t.data("isotope-item-position",{x:e,y:i})},layout:function(t,e){var i=this.options.layoutMode;if(this["_"+i+"Layout"](t),this.options.resizesContainer){var n=this["_"+i+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:n})}this._processStyleQueue(t,e),this.isLaidOut=!0},_processStyleQueue:function(t,i){var n=this.isLaidOut&&this.isUsingJQueryAnimation?"animate":"css",o=this.options.animationOptions,a=this.options.onLayout,r,h,l,d;if(h=function(t,e){e.$el[n](e.style,o)},this._isInserting&&this.isUsingJQueryAnimation)h=function(t,e){r=e.$el.hasClass("no-transition")?"css":n,e.$el[r](e.style,o)};else if(i||a||o.complete){var c=!1,u=[i,a,o.complete],f=this;if(l=!0,d=function(){if(!c){for(var e,i=0,n=u.length;n>i;i++)e=u[i],"function"==typeof e&&e.call(f.element,t,f);c=!0}},this.isUsingJQueryAnimation&&"animate"===n)o.complete=d,l=!1;else if(s.csstransitions){for(var p=0,m=this.styleQueue[0],g=m&&m.$el,w;!g||!g.length;){if(w=this.styleQueue[p++],!w)return;g=w.$el}var b=parseFloat(getComputedStyle(g[0])[v]);b>0&&(h=function(t,e){e.$el[n](e.style,o).one(y,d)},l=!1)}}e.each(this.styleQueue,h),l&&d(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(t){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,t)},addItems:function(t,e){var i=this._getAtoms(t);this.$allAtoms=this.$allAtoms.add(i),e&&e(i)},insert:function(t,e){this.element.append(t);var i=this;this.addItems(t,function(t){var n=i._filter(t);i._addHideAppended(n),i._sort(),i.reLayout(),i._revealAppended(n,e)})},appended:function(t,e){var i=this;this.addItems(t,function(t){i._addHideAppended(t),i.layout(t),i._revealAppended(t,e)})},_addHideAppended:function(t){this.$filteredAtoms=this.$filteredAtoms.add(t),t.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:t,style:this.options.hiddenStyle})},_revealAppended:function(t,e){var i=this;setTimeout(function(){t.removeClass("no-transition"),i.styleQueue.push({$el:t,style:i.options.visibleStyle}),i._isInserting=!1,i._processStyleQueue(t,e)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(t,e){this.$allAtoms=this.$allAtoms.not(t),this.$filteredAtoms=this.$filteredAtoms.not(t);var i=this,n=function(){t.remove(),e&&e.call(i.element)};t.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:t,style:this.options.hiddenStyle}),this._sort(),this.reLayout(n)):n()},shuffle:function(t){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(t)},destroy:function(){var t=this.usingTransforms,e=this.options;this.$allAtoms.removeClass(e.hiddenClass+" "+e.itemClass).each(function(){var e=this.style;e.position="",e.top="",e.left="",e.opacity="",t&&(e[l]="")});var i=this.element[0].style;for(var n in this.originalStyle)i[n]=this.originalStyle[n];this.element.unbind(".isotope").undelegate("."+e.hiddenClass,"click").removeClass(e.containerClass).removeData("isotope"),C.unbind(".isotope")},_getSegments:function(t){var e=this.options.layoutMode,i=t?"rowHeight":"columnWidth",n=t?"height":"width",o=t?"rows":"cols",s=this.element[n](),r,h=this.options[e]&&this.options[e][i]||this.$filteredAtoms["outer"+a(n)](!0)||s;r=Math.floor(s/h),r=Math.max(r,1),this[e][o]=r,this[e][i]=h},_checkIfSegmentsChanged:function(t){var e=this.options.layoutMode,i=t?"rows":"cols",n=this[e][i];return this._getSegments(t),this[e][i]!==n},_masonryReset:function(){this.masonry={},this._getSegments();var t=this.masonry.cols;for(this.masonry.colYs=[];t--;)this.masonry.colYs.push(0)},_masonryLayout:function(t){var i=this,n=i.masonry;t.each(function(){var t=e(this),o=Math.ceil(t.outerWidth(!0)/n.columnWidth);if(o=Math.min(o,n.cols),1===o)i._masonryPlaceBrick(t,n.colYs);else{var s=n.cols+1-o,a=[],r,h;for(h=0;s>h;h++)r=n.colYs.slice(h,h+o),a[h]=Math.max.apply(Math,r);i._masonryPlaceBrick(t,a)}})},_masonryPlaceBrick:function(t,e){for(var i=Math.min.apply(Math,e),n=0,o=0,s=e.length;s>o;o++)if(e[o]===i){n=o;break}var a=this.masonry.columnWidth*n,r=i;this._pushPosition(t,a,r);var h=i+t.outerHeight(!0),l=this.masonry.cols+1-s;for(o=0;l>o;o++)this.masonry.colYs[n+o]=h},_masonryGetContainerSize:function(){var t=Math.max.apply(Math,this.masonry.colYs);return{height:t}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(t){var i=this,n=this.element.width(),o=this.fitRows;t.each(function(){var t=e(this),s=t.outerWidth(!0),a=t.outerHeight(!0);0!==o.x&&s+o.x>n&&(o.x=0,o.y=o.height),i._pushPosition(t,o.x,o.y),o.height=Math.max(o.y+a,o.height),o.x+=s})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(t){var i=this,n=this.cellsByRow;t.each(function(){var t=e(this),o=n.index%n.cols,s=Math.floor(n.index/n.cols),a=(o+.5)*n.columnWidth-t.outerWidth(!0)/2,r=(s+.5)*n.rowHeight-t.outerHeight(!0)/2;i._pushPosition(t,a,r),n.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(t){var i=this;t.each(function(t){var n=e(this);i._pushPosition(n,0,i.straightDown.y),i.straightDown.y+=n.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var t=this.masonryHorizontal.rows;for(this.masonryHorizontal.rowXs=[];t--;)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(t){var i=this,n=i.masonryHorizontal;t.each(function(){var t=e(this),o=Math.ceil(t.outerHeight(!0)/n.rowHeight);if(o=Math.min(o,n.rows),1===o)i._masonryHorizontalPlaceBrick(t,n.rowXs);else{var s=n.rows+1-o,a=[],r,h;for(h=0;s>h;h++)r=n.rowXs.slice(h,h+o),a[h]=Math.max.apply(Math,r);i._masonryHorizontalPlaceBrick(t,a)}})},_masonryHorizontalPlaceBrick:function(t,e){for(var i=Math.min.apply(Math,e),n=0,o=0,s=e.length;s>o;o++)if(e[o]===i){n=o;break}var a=i,r=this.masonryHorizontal.rowHeight*n;this._pushPosition(t,a,r);var h=i+t.outerWidth(!0),l=this.masonryHorizontal.rows+1-s;for(o=0;l>o;o++)this.masonryHorizontal.rowXs[n+o]=h},_masonryHorizontalGetContainerSize:function(){var t=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:t}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(t){var i=this,n=this.element.height(),o=this.fitColumns;t.each(function(){var t=e(this),s=t.outerWidth(!0),a=t.outerHeight(!0);0!==o.y&&a+o.y>n&&(o.x=o.width,o.y=0),i._pushPosition(t,o.x,o.y),o.width=Math.max(o.x+s,o.width),o.y+=a})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(t){var i=this,n=this.cellsByColumn;t.each(function(){var t=e(this),o=Math.floor(n.index/n.rows),s=n.index%n.rows,a=(o+.5)*n.columnWidth-t.outerWidth(!0)/2,r=(s+.5)*n.rowHeight-t.outerHeight(!0)/2;i._pushPosition(t,a,r),n.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(t){var i=this;t.each(function(t){var n=e(this);i._pushPosition(n,i.straightAcross.x,0),i.straightAcross.x+=n.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},e.fn.imagesLoaded=function(t){function i(){t.call(o,s)}function n(t){var o=t.target;o.src!==r&&-1===e.inArray(o,h)&&(h.push(o),--a<=0&&(setTimeout(i),s.unbind(".imagesLoaded",n)))}var o=this,s=o.find("img").add(o.filter("img")),a=s.length,r="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",h=[];return a||i(),s.bind("load.imagesLoaded error.imagesLoaded",n).each(function(){var t=this.src;this.src=r,this.src=t}),o};var A=function(e){t.console&&t.console.error(e)};e.fn.isotope=function(t,i){if("string"==typeof t){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var i=e.data(this,"isotope");return i?e.isFunction(i[t])&&"_"!==t.charAt(0)?void i[t].apply(i,n):void A("no such method '"+t+"' for isotope instance"):void A("cannot call methods on isotope prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){var n=e.data(this,"isotope");n?(n.option(t),n._init(i)):e.data(this,"isotope",new e.Isotope(t,this,i))});return this}}(window,jQuery),jQuery.Isotope.prototype._getMasonryGutterColumns=function(){var t=this.options.masonry&&this.options.masonry.gutterWidth||0;containerWidth=this.element.width(),this.masonry.columnWidth=this.options.masonry&&this.options.masonry.columnWidth||this.$filteredAtoms.outerWidth(!0)||containerWidth,this.masonry.columnWidth+=t,this.masonry.cols=Math.floor((containerWidth+t)/this.masonry.columnWidth),this.masonry.cols=Math.max(this.masonry.cols,1)},jQuery.Isotope.prototype._masonryReset=function(){this.masonry={},this._getMasonryGutterColumns();var t=this.masonry.cols;for(this.masonry.colYs=[];t--;)this.masonry.colYs.push(0)},jQuery.Isotope.prototype._masonryResizeChanged=function(){var t=this.masonry.cols;return this._getMasonryGutterColumns(),this.masonry.cols!==t},function(t){var e,i,n,o,s,a,r,h,l,d,c=0,u={},f=[],p=0,m={},g=[],y=null,v=new Image,w=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,b=/[^\.]\.(swf)\s*$/i,x,_=1,C=0,A="",k,S,z=!1,I=t.extend(t("<div/>")[0],{prop:0}),M=t.browser.msie&&t.browser.version<7&&!window.XMLHttpRequest,T=function(){i.hide(),v.onerror=v.onload=null,y&&y.abort(),e.empty()},H=function(){return!1===u.onError(f,c,u)?(i.hide(),void(z=!1)):(u.titleShow=!1,u.width="auto",u.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),void O())},D=function(){var n=f[c],o,s,r,h,l,d;if(T(),u=t.extend({},t.fn.fancybox.defaults,"undefined"==typeof t(n).data("fancybox")?u:t(n).data("fancybox")),d=u.onStart(f,c,u),d===!1)return void(z=!1);if("object"==typeof d&&(u=t.extend(u,d)),r=u.title||(n.nodeName?t(n).attr("title"):n.title)||"",n.nodeName&&!u.orig&&(u.orig=t(n).children("img:first").length?t(n).children("img:first"):t(n)),""===r&&u.orig&&u.titleFromAlt&&(r=u.orig.attr("alt")),o=u.href||(n.nodeName?t(n).attr("href"):n.href)||null,(/^(?:javascript)/i.test(o)||"#"==o)&&(o=null),u.type?(s=u.type,o||(o=u.content)):u.content?s="html":o&&(s=o.match(w)?"image":o.match(b)?"swf":t(n).hasClass("iframe")?"iframe":0===o.indexOf("#")?"inline":"ajax"),!s)return void H();switch("inline"==s&&(n=o.substr(o.indexOf("#")),s=t(n).length>0?"inline":"ajax"),u.type=s,u.href=o,u.title=r,u.autoDimensions&&("html"==u.type||"inline"==u.type||"ajax"==u.type?(u.width="auto",u.height="auto"):u.autoDimensions=!1),u.modal&&(u.overlayShow=!0,u.hideOnOverlayClick=!1,u.hideOnContentClick=!1,u.enableEscapeButton=!1,u.showCloseButton=!1),u.padding=parseInt(u.padding,10),u.margin=parseInt(u.margin,10),e.css("padding",u.padding+u.margin),t(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){t(this).replaceWith(a.children())}),s){case"html":e.html(u.content),O();break;case"inline":if(t(n).parent().is("#fancybox-content")===!0)return void(z=!1);t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(n)).bind("fancybox-cleanup",function(){t(this).replaceWith(a.children())}).bind("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(n).appendTo(e),O();break;case"image":z=!1,t.fancybox.showActivity(),v=new Image,v.onerror=function(){H()},v.onload=function(){z=!0,v.onerror=v.onload=null,j()},v.src=o;break;case"swf":u.scrolling="no",h='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+u.width+'" height="'+u.height+'"><param name="movie" value="'+o+'"></param>',l="",t.each(u.swf,function(t,e){h+='<param name="'+t+'" value="'+e+'"></param>',l+=" "+t+'="'+e+'"'}),h+='<embed src="'+o+'" type="application/x-shockwave-flash" width="'+u.width+'" height="'+u.height+'"'+l+"></embed></object>",e.html(h),O();break;case"ajax":z=!1,t.fancybox.showActivity(),u.ajax.win=u.ajax.success,y=t.ajax(t.extend({},u.ajax,{url:o,data:u.ajax.data||{},error:function(t,e,i){t.status>0&&H()},success:function(t,n,s){var a="object"==typeof s?s:y;if(200==a.status){if("function"==typeof u.ajax.win){if(d=u.ajax.win(o,t,n,s),d===!1)return void i.hide();("string"==typeof d||"object"==typeof d)&&(t=d)}e.html(t),O()}}}));break;case"iframe":P()}},O=function(){var i=u.width,n=u.height;i=i.toString().indexOf("%")>-1?parseInt((t(window).width()-2*u.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=n.toString().indexOf("%")>-1?parseInt((t(window).height()-2*u.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==u.scrolling?"auto":"yes"==u.scrolling?"scroll":"hidden")+';position:relative;"></div>'),u.width=e.width(),u.height=e.height(),P()},j=function(){u.width=v.width,u.height=v.height,t("<img />").attr({id:"fancybox-img",src:v.src,alt:u.title}).appendTo(e),P()},P=function(){var s,y;return i.hide(),o.is(":visible")&&!1===m.onCleanup(g,p,m)?(t.event.trigger("fancybox-cancel"),void(z=!1)):(z=!0,t(a.add(n)).unbind(),t(window).unbind("resize.fb scroll.fb"),t(document).unbind("keydown.fb"),o.is(":visible")&&"outside"!==m.titlePosition&&o.css("height",o.height()),g=f,p=c,m=u,m.overlayShow?(n.css({"background-color":m.overlayColor,opacity:m.overlayOpacity,cursor:m.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||(M&&t("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),S=G(),B(),o.is(":visible")?(t(r.add(l).add(d)).hide(),s=o.position(),k={top:s.top,left:s.left,width:o.width(),height:o.height()},y=k.width==S.width&&k.height==S.height,void a.fadeTo(m.changeFade,.3,function(){var i=function(){a.html(e.contents()).fadeTo(m.changeFade,1,Q)};t.event.trigger("fancybox-change"),a.empty().removeAttr("filter").css({"border-width":m.padding,width:S.width-2*m.padding,height:u.autoDimensions?"auto":S.height-C-2*m.padding}),y?i():(I.prop=0,t(I).animate({prop:1},{duration:m.changeSpeed,easing:m.easingChange,step:E,complete:i}))})):(o.removeAttr("style"),a.css("border-width",m.padding),"elastic"==m.transitionIn?(k=X(),a.html(e.contents()),o.show(),m.opacity&&(S.opacity=0),I.prop=0,void t(I).animate({prop:1},{duration:m.speedIn,easing:m.easingIn,step:E,complete:Q})):("inside"==m.titlePosition&&C>0&&h.show(),a.css({width:S.width-2*m.padding,height:u.autoDimensions?"auto":S.height-C-2*m.padding}).html(e.contents()),void o.css(S).fadeIn("none"==m.transitionIn?0:m.speedIn,Q))))},R=function(t){return t&&t.length?"float"==m.titlePosition?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+m.titlePosition+'">'+t+"</div>":!1},B=function(){if(A=m.title||"",C=0,h.empty().removeAttr("style").removeClass(),m.titleShow===!1)return void h.hide();if(A=t.isFunction(m.titleFormat)?m.titleFormat(A,g,p,m):R(A),!A||""===A)return void h.hide();switch(h.addClass("fancybox-title-"+m.titlePosition).html(A).appendTo("body").show(),m.titlePosition){case"inside":h.css({width:S.width-2*m.padding,marginLeft:m.padding,marginRight:m.padding}),C=h.outerHeight(!0),h.appendTo(s),S.height+=C;break;case"over":h.css({marginLeft:m.padding,width:S.width-2*m.padding,bottom:m.padding}).appendTo(s);break;case"float":h.css("left",-1*parseInt((h.width()-S.width-40)/2,10)).appendTo(o);break;default:h.css({width:S.width-2*m.padding,paddingLeft:m.padding,paddingRight:m.padding}).appendTo(o)}h.hide()},L=function(){return(m.enableEscapeButton||m.enableKeyboardNav)&&t(document).bind("keydown.fb",function(e){27==e.keyCode&&m.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!m.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),m.showNavArrows?((m.cyclic&&g.length>1||0!==p)&&l.show(),void((m.cyclic&&g.length>1||p!=g.length-1)&&d.show())):(l.hide(),void d.hide())},Q=function(){t.support.opacity||(a.get(0).style.removeAttribute("filter"),o.get(0).style.removeAttribute("filter")),u.autoDimensions&&a.css("height","auto"),o.css("height","auto"),A&&A.length&&h.show(),m.showCloseButton&&r.show(),L(),m.hideOnContentClick&&a.bind("click",t.fancybox.close),m.hideOnOverlayClick&&n.bind("click",t.fancybox.close),t(window).bind("resize.fb",t.fancybox.resize),m.centerOnScroll&&t(window).bind("scroll.fb",t.fancybox.center),"iframe"==m.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(t.browser.msie?'allowtransparency="true""':"")+' scrolling="'+u.scrolling+'" src="'+m.href+'"></iframe>').appendTo(a),o.show(),z=!1,t.fancybox.center(),m.onComplete(g,p,m),W()},W=function(){var t,e;g.length-1>p&&(t=g[p+1].href,"undefined"!=typeof t&&t.match(w)&&(e=new Image,e.src=t)),p>0&&(t=g[p-1].href,"undefined"!=typeof t&&t.match(w)&&(e=new Image,e.src=t))},E=function(t){var e={width:parseInt(k.width+(S.width-k.width)*t,10),height:parseInt(k.height+(S.height-k.height)*t,10),top:parseInt(k.top+(S.top-k.top)*t,10),left:parseInt(k.left+(S.left-k.left)*t,10)};"undefined"!=typeof S.opacity&&(e.opacity=.5>t?.5:t),o.css(e),a.css({width:e.width-2*m.padding,height:e.height-C*t-2*m.padding})},F=function(){return[t(window).width()-2*m.margin,t(window).height()-2*m.margin,t(document).scrollLeft()+m.margin,t(document).scrollTop()+m.margin]},G=function(){var t=F(),e={},i=m.autoScale,n=2*m.padding,o;return e.width=m.width.toString().indexOf("%")>-1?parseInt(t[0]*parseFloat(m.width)/100,10):m.width+n,e.height=m.height.toString().indexOf("%")>-1?parseInt(t[1]*parseFloat(m.height)/100,10):m.height+n,i&&(e.width>t[0]||e.height>t[1])&&("image"==u.type||"swf"==u.type?(o=m.width/m.height,e.width>t[0]&&(e.width=t[0],e.height=parseInt((e.width-n)/o+n,10)),e.height>t[1]&&(e.height=t[1],e.width=parseInt((e.height-n)*o+n,10))):(e.width=Math.min(e.width,t[0]),e.height=Math.min(e.height,t[1]))),e.top=parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-e.height-40)),10),e.left=parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-e.width-40)),10),e},N=function(t){var e=t.offset();return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},X=function(){var e=u.orig?t(u.orig):!1,i={},n,o;return e&&e.length?(n=N(e),i={width:n.width+2*m.padding,height:n.height+2*m.padding,top:n.top-m.padding-20,left:n.left-m.padding-20}):(o=F(),i={width:2*m.padding,height:2*m.padding,top:parseInt(o[3]+.5*o[1],10),left:parseInt(o[2]+.5*o[0],10)}),i},Y=function(){return i.is(":visible")?(t("div",i).css("top",-40*_+"px"),void(_=(_+1)%12)):void clearInterval(x)};t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).unbind("click.fb").bind("click.fb",function(e){if(e.preventDefault(),!z){z=!0,t(this).blur(),f=[],c=0;var i=t(this).attr("rel")||"";i&&""!=i&&"nofollow"!==i?(f=t("a[rel="+i+"], area[rel="+i+"]"),c=f.index(this)):f.push(this),D()}}),this):this},t.fancybox=function(e){var i;if(!z){if(z=!0,i="undefined"!=typeof arguments[1]?arguments[1]:{},f=[],c=parseInt(i.index,10)||0,t.isArray(e)){for(var n=0,o=e.length;o>n;n++)"object"==typeof e[n]?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i));f=jQuery.merge(f,e)}else"object"==typeof e?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),f.push(e);(c>f.length||0>c)&&(c=0),D()}},t.fancybox.showActivity=function(){clearInterval(x),i.show(),x=setInterval(Y,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(p+1)},t.fancybox.prev=function(){return t.fancybox.pos(p-1)},t.fancybox.pos=function(t){z||(t=parseInt(t),f=g,t>-1&&t<g.length?(c=t,D()):m.cyclic&&g.length>1&&(c=t>=g.length?0:g.length-1,D()))},t.fancybox.cancel=function(){z||(z=!0,t.event.trigger("fancybox-cancel"),T(),u.onCancel(f,c,u),z=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),h.empty().hide(),o.hide(),t.event.trigger("fancybox-cleanup"),a.empty(),m.onClosed(g,p,m),g=u=[],p=c=0,m=u={},z=!1}if(!z&&!o.is(":hidden")){if(z=!0,m&&!1===m.onCleanup(g,p,m))return void(z=!1);if(T(),t(r.add(l).add(d)).hide(),t(a.add(n)).unbind(),t(window).unbind("resize.fb scroll.fb"),t(document).unbind("keydown.fb"),a.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==m.titlePosition&&h.empty(),o.stop(),"elastic"==m.transitionOut){k=X();var i=o.position();S={top:i.top,left:i.left,width:o.width(),height:o.height()},m.opacity&&(S.opacity=1),h.empty().hide(),I.prop=1,t(I).animate({prop:0},{duration:m.speedOut,easing:m.easingOut,step:E,complete:e})}else o.fadeOut("none"==m.transitionOut?0:m.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height());var e,i;S=G(),B(),h.show(),e=o.position(),k={top:e.top,left:e.left,width:o.width(),height:o.height()},i=k.width==S.width&&k.height==S.height,i||(I.prop=0,t(I).animate({prop:1},{duration:m.changeSpeed,easing:m.easingChange,step:E})),a.css({width:S.width-2*m.padding,height:u.autoDimensions?"auto":S.height-C-2*m.padding}),o.css(S),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;z||(e=arguments[0]===!0?1:0,t=F(),(e||!(o.width()>t[0]||o.height()>t[1]))&&o.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-a.height()-40)-m.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-a.width()-40)-m.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),o=t('<div id="fancybox-wrap"></div>')),s=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(o),s.append(a=t('<div id="fancybox-content"></div>'),r=t('<a id="fancybox-close"></a>'),h=t('<div id="fancybox-title"></div>'),l=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),d=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),r.click(t.fancybox.close),i.click(t.fancybox.cancel),l.click(function(e){e.preventDefault(),t.fancybox.prev()
2
- }),d.click(function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&o.bind("mousewheel.fb",function(e,i){z?e.preventDefault():(0==t(e.target).get(0).clientHeight||t(e.target).get(0).scrollHeight===t(e.target).get(0).clientHeight)&&(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),t.support.opacity||o.addClass("fancybox-ie"),M&&(i.addClass("fancybox-ie6"),o.addClass("fancybox-ie6"),t('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(s)))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},t(document).ready(function(){t.fancybox.init()})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var o=e||window.event,s=a.call(arguments,1),l=0,d=0,c=0,u=0;if(e=t.event.fix(o),e.type="mousewheel","detail"in o&&(c=-1*o.detail),"wheelDelta"in o&&(c=o.wheelDelta),"wheelDeltaY"in o&&(c=o.wheelDeltaY),"wheelDeltaX"in o&&(d=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(d=-1*c,c=0),l=0===c?d:c,"deltaY"in o&&(c=-1*o.deltaY,l=c),"deltaX"in o&&(d=o.deltaX,0===c&&(l=-1*d)),0!==c||0!==d){if(1===o.deltaMode){var f=t.data(this,"mousewheel-line-height");l*=f,c*=f,d*=f}else if(2===o.deltaMode){var p=t.data(this,"mousewheel-page-height");l*=p,c*=p,d*=p}return u=Math.max(Math.abs(c),Math.abs(d)),(!h||h>u)&&(h=u,n(o,u)&&(h/=40)),n(o,u)&&(l/=40,d/=40,c/=40),l=Math[l>=1?"floor":"ceil"](l/h),d=Math[d>=1?"floor":"ceil"](d/h),c=Math[c>=1?"floor":"ceil"](c/h),e.deltaX=d,e.deltaY=c,e.deltaFactor=h,e.deltaMode=0,s.unshift(e,l,d,c),r&&clearTimeout(r),r=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,s)}}function i(){h=null}function n(t,e){return d.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],a=Array.prototype.slice,r,h;if(t.event.fixHooks)for(var l=o.length;l;)t.event.fixHooks[o[--l]]=t.event.mouseHooks;var d=t.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var i=s.length;i;)this.addEventListener(s[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",d.getLineHeight(this)),t.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=s.length;t;)this.removeEventListener(s[--t],e,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(t(e)["offsetParent"in t.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})});
1
+ function enviraGetColWidth(t,e){var i,n=jQuery(window).width(),o=t.data("envira-columns");switch(o){case 1:i=t.width();break;case 2:i=480>=n?t.width():t.width()/2;break;case 3:i=480>=n?t.width():768>=n?t.width()/2:t.width()/3;case 4:case 5:case 6:i=480>=n?t.width():768>=n?t.width()/2:1024>=n?t.width()/3:t.width()/o}return parseInt(i-e*(o-1)/o)}function enviraSetWidths(t,e){var i=enviraGetColWidth(t,e);t.children().css({width:i})}function enviraIsMobile(){var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t}function enviraThrottle(t,e){return function(){var i=this,n=[].slice(arguments);clearTimeout(t._throttleTimeout),t._throttleTimeout=setTimeout(function(){t.apply(i,n)},e)}}!function(t,e,i){var n=t.document,o=n.documentElement,s=t.Modernizr,r=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},a="Moz Webkit O Ms".split(" "),l=function(t){var e=o.style,i;if("string"==typeof e[t])return t;t=r(t);for(var n=0,s=a.length;s>n;n++)if(i=a[n]+t,"string"==typeof e[i])return i},h=l("transform"),c=l("transitionProperty"),d={csstransforms:function(){return!!h},csstransforms3d:function(){var t=!!l("perspective");if(t&&"webkitPerspective"in o.style){var i=e("<style>@media (transform-3d),(-webkit-transform-3d){#modernizr{height:3px}}</style>").appendTo("head"),n=e('<div id="modernizr" />').appendTo("html");t=3===n.height(),n.remove(),i.remove()}return t},csstransitions:function(){return!!c}},u;if(s)for(u in d)s.hasOwnProperty(u)||s.addTest(u,d[u]);else{s=t.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var p=" ",f;for(u in d)f=d[u](),s[u]=f,p+=" "+(f?"":"no-")+u;e("html").addClass(p)}if(s.csstransforms){var m=s.csstransforms3d?{translate:function(t){return"translate3d("+t[0]+"px, "+t[1]+"px, 0) "},scale:function(t){return"scale3d("+t+", "+t+", 1) "}}:{translate:function(t){return"translate("+t[0]+"px, "+t[1]+"px) "},scale:function(t){return"scale("+t+") "}},g=function(t,i,n){var o=e.data(t,"isoTransform")||{},s={},r,a={},l;s[i]=n,e.extend(o,s);for(r in o)l=o[r],a[r]=m[r](l);var c=a.translate||"",d=a.scale||"",u=c+d;e.data(t,"isoTransform",o),t.style[h]=u};e.cssNumber.scale=!0,e.cssHooks.scale={set:function(t,e){g(t,"scale",e)},get:function(t,i){var n=e.data(t,"isoTransform");return n&&n.scale?n.scale:1}},e.fx.step.scale=function(t){e.cssHooks.scale.set(t.elem,t.now+t.unit)},e.cssNumber.translate=!0,e.cssHooks.translate={set:function(t,e){g(t,"translate",e)},get:function(t,i){var n=e.data(t,"isoTransform");return n&&n.translate?n.translate:[0,0]}}}var v,y;s.csstransitions&&(v={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[c],y=l("transitionDuration"));var w=e.event,x=e.event.handle?"handle":"dispatch",b;w.special.smartresize={setup:function(){e(this).bind("resize",w.special.smartresize.handler)},teardown:function(){e(this).unbind("resize",w.special.smartresize.handler)},handler:function(t,e){var i=this,n=arguments;t.type="smartresize",b&&clearTimeout(b),b=setTimeout(function(){w[x].apply(i,n)},"execAsap"===e?0:100)}},e.fn.smartresize=function(t){return t?this.bind("smartresize",t):this.trigger("smartresize",["execAsap"])},e.Isotope=function(t,i,n){this.element=e(i),this._create(t),this._init(n)};var _=["width","height"],C=e(t);e.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},e.Isotope.prototype={_create:function(t){this.options=e.extend({},e.Isotope.settings,t),this.styleQueue=[],this.elemCount=0;var i=this.element[0].style;this.originalStyle={};var n=_.slice(0);for(var o in this.options.containerStyle)n.push(o);for(var s=0,r=n.length;r>s;s++)o=n[s],this.originalStyle[o]=i[o]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var a={"original-order":function(t,e){return e.elemCount++,e.elemCount},random:function(){return Math.random()}};this.options.getSortData=e.extend(this.options.getSortData,a),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var l=this;setTimeout(function(){l.element.addClass(l.options.containerClass)},0),this.options.resizable&&C.bind("smartresize.isotope",function(){l.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(t){var e=this.options.itemSelector,i=e?t.filter(e).add(t.find(e)):t,n={position:"absolute"};return i=i.filter(function(t,e){return 1===e.nodeType}),this.usingTransforms&&(n.left=0,n.top=0),i.css(n).addClass(this.options.itemClass),this.updateSortData(i,!0),i},_init:function(t){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(t)},option:function(t){if(e.isPlainObject(t)){this.options=e.extend(!0,this.options,t);var i;for(var n in t)i="_update"+r(n),this[i]&&this[i]()}},_updateAnimationEngine:function(){var t=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),e;switch(t){case"css":case"none":e=!1;break;case"jquery":e=!0;break;default:e=!s.csstransitions}this.isUsingJQueryAnimation=e,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var t=this.usingTransforms=this.options.transformsEnabled&&s.csstransforms&&s.csstransitions&&!this.isUsingJQueryAnimation;t||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=t?this._translate:this._positionAbs},_filter:function(t){var e=""===this.options.filter?"*":this.options.filter;if(!e)return t;var i=this.options.hiddenClass,n="."+i,o=t.filter(n),s=o;if("*"!==e){s=o.filter(e);var r=t.not(n).not(e).addClass(i);this.styleQueue.push({$el:r,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:s,style:this.options.visibleStyle}),s.removeClass(i),t.filter(e)},updateSortData:function(t,i){var n=this,o=this.options.getSortData,s,r;t.each(function(){s=e(this),r={};for(var t in o)r[t]=i||"original-order"!==t?o[t](s,n):e.data(this,"isotope-sort-data")[t];e.data(this,"isotope-sort-data",r)})},_sort:function(){var t=this.options.sortBy,e=this._getSorter,i=this.options.sortAscending?1:-1,n=function(n,o){var s=e(n,t),r=e(o,t);return s===r&&"original-order"!==t&&(s=e(n,"original-order"),r=e(o,"original-order")),(s>r?1:r>s?-1:0)*i};this.$filteredAtoms.sort(n)},_getSorter:function(t,i){return e.data(t,"isotope-sort-data")[i]},_translate:function(t,e){return{translate:[t,e]}},_positionAbs:function(t,e){return{left:t,top:e}},_pushPosition:function(t,e,i){e=Math.round(e+this.offset.left),i=Math.round(i+this.offset.top);var n=this.getPositionStyles(e,i);this.styleQueue.push({$el:t,style:n}),this.options.itemPositionDataEnabled&&t.data("isotope-item-position",{x:e,y:i})},layout:function(t,e){var i=this.options.layoutMode;if(this["_"+i+"Layout"](t),this.options.resizesContainer){var n=this["_"+i+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:n})}this._processStyleQueue(t,e),this.isLaidOut=!0},_processStyleQueue:function(t,i){var n=this.isLaidOut&&this.isUsingJQueryAnimation?"animate":"css",o=this.options.animationOptions,r=this.options.onLayout,a,l,h,c;if(l=function(t,e){e.$el[n](e.style,o)},this._isInserting&&this.isUsingJQueryAnimation)l=function(t,e){a=e.$el.hasClass("no-transition")?"css":n,e.$el[a](e.style,o)};else if(i||r||o.complete){var d=!1,u=[i,r,o.complete],p=this;if(h=!0,c=function(){if(!d){for(var e,i=0,n=u.length;n>i;i++)e=u[i],"function"==typeof e&&e.call(p.element,t,p);d=!0}},this.isUsingJQueryAnimation&&"animate"===n)o.complete=c,h=!1;else if(s.csstransitions){for(var f=0,m=this.styleQueue[0],g=m&&m.$el,w;!g||!g.length;){if(w=this.styleQueue[f++],!w)return;g=w.$el}var x=parseFloat(getComputedStyle(g[0])[y]);x>0&&(l=function(t,e){e.$el[n](e.style,o).one(v,c)},h=!1)}}e.each(this.styleQueue,l),h&&c(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(t){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,t)},addItems:function(t,e){var i=this._getAtoms(t);this.$allAtoms=this.$allAtoms.add(i),e&&e(i)},insert:function(t,e){this.element.append(t);var i=this;this.addItems(t,function(t){var n=i._filter(t);i._addHideAppended(n),i._sort(),i.reLayout(),i._revealAppended(n,e)})},appended:function(t,e){var i=this;this.addItems(t,function(t){i._addHideAppended(t),i.layout(t),i._revealAppended(t,e)})},_addHideAppended:function(t){this.$filteredAtoms=this.$filteredAtoms.add(t),t.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:t,style:this.options.hiddenStyle})},_revealAppended:function(t,e){var i=this;setTimeout(function(){t.removeClass("no-transition"),i.styleQueue.push({$el:t,style:i.options.visibleStyle}),i._isInserting=!1,i._processStyleQueue(t,e)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(t,e){this.$allAtoms=this.$allAtoms.not(t),this.$filteredAtoms=this.$filteredAtoms.not(t);var i=this,n=function(){t.remove(),e&&e.call(i.element)};t.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:t,style:this.options.hiddenStyle}),this._sort(),this.reLayout(n)):n()},shuffle:function(t){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(t)},destroy:function(){var t=this.usingTransforms,e=this.options;this.$allAtoms.removeClass(e.hiddenClass+" "+e.itemClass).each(function(){var e=this.style;e.position="",e.top="",e.left="",e.opacity="",t&&(e[h]="")});var i=this.element[0].style;for(var n in this.originalStyle)i[n]=this.originalStyle[n];this.element.unbind(".isotope").undelegate("."+e.hiddenClass,"click").removeClass(e.containerClass).removeData("isotope"),C.unbind(".isotope")},_getSegments:function(t){var e=this.options.layoutMode,i=t?"rowHeight":"columnWidth",n=t?"height":"width",o=t?"rows":"cols",s=this.element[n](),a,l=this.options[e]&&this.options[e][i]||this.$filteredAtoms["outer"+r(n)](!0)||s;a=Math.floor(s/l),a=Math.max(a,1),this[e][o]=a,this[e][i]=l},_checkIfSegmentsChanged:function(t){var e=this.options.layoutMode,i=t?"rows":"cols",n=this[e][i];return this._getSegments(t),this[e][i]!==n},_masonryReset:function(){this.masonry={},this._getSegments();var t=this.masonry.cols;for(this.masonry.colYs=[];t--;)this.masonry.colYs.push(0)},_masonryLayout:function(t){var i=this,n=i.masonry;t.each(function(){var t=e(this),o=Math.ceil(t.outerWidth(!0)/n.columnWidth);if(o=Math.min(o,n.cols),1===o)i._masonryPlaceBrick(t,n.colYs);else{var s=n.cols+1-o,r=[],a,l;for(l=0;s>l;l++)a=n.colYs.slice(l,l+o),r[l]=Math.max.apply(Math,a);i._masonryPlaceBrick(t,r)}})},_masonryPlaceBrick:function(t,e){for(var i=Math.min.apply(Math,e),n=0,o=0,s=e.length;s>o;o++)if(e[o]===i){n=o;break}var r=this.masonry.columnWidth*n,a=i;this._pushPosition(t,r,a);var l=i+t.outerHeight(!0),h=this.masonry.cols+1-s;for(o=0;h>o;o++)this.masonry.colYs[n+o]=l},_masonryGetContainerSize:function(){var t=Math.max.apply(Math,this.masonry.colYs);return{height:t}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(t){var i=this,n=this.element.width(),o=this.fitRows;t.each(function(){var t=e(this),s=t.outerWidth(!0),r=t.outerHeight(!0);0!==o.x&&s+o.x>n&&(o.x=0,o.y=o.height),i._pushPosition(t,o.x,o.y),o.height=Math.max(o.y+r,o.height),o.x+=s})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(t){var i=this,n=this.cellsByRow;t.each(function(){var t=e(this),o=n.index%n.cols,s=Math.floor(n.index/n.cols),r=(o+.5)*n.columnWidth-t.outerWidth(!0)/2,a=(s+.5)*n.rowHeight-t.outerHeight(!0)/2;i._pushPosition(t,r,a),n.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(t){var i=this;t.each(function(t){var n=e(this);i._pushPosition(n,0,i.straightDown.y),i.straightDown.y+=n.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var t=this.masonryHorizontal.rows;for(this.masonryHorizontal.rowXs=[];t--;)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(t){var i=this,n=i.masonryHorizontal;t.each(function(){var t=e(this),o=Math.ceil(t.outerHeight(!0)/n.rowHeight);if(o=Math.min(o,n.rows),1===o)i._masonryHorizontalPlaceBrick(t,n.rowXs);else{var s=n.rows+1-o,r=[],a,l;for(l=0;s>l;l++)a=n.rowXs.slice(l,l+o),r[l]=Math.max.apply(Math,a);i._masonryHorizontalPlaceBrick(t,r)}})},_masonryHorizontalPlaceBrick:function(t,e){for(var i=Math.min.apply(Math,e),n=0,o=0,s=e.length;s>o;o++)if(e[o]===i){n=o;break}var r=i,a=this.masonryHorizontal.rowHeight*n;this._pushPosition(t,r,a);var l=i+t.outerWidth(!0),h=this.masonryHorizontal.rows+1-s;for(o=0;h>o;o++)this.masonryHorizontal.rowXs[n+o]=l},_masonryHorizontalGetContainerSize:function(){var t=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:t}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(t){var i=this,n=this.element.height(),o=this.fitColumns;t.each(function(){var t=e(this),s=t.outerWidth(!0),r=t.outerHeight(!0);0!==o.y&&r+o.y>n&&(o.x=o.width,o.y=0),i._pushPosition(t,o.x,o.y),o.width=Math.max(o.x+s,o.width),o.y+=r})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(t){var i=this,n=this.cellsByColumn;t.each(function(){var t=e(this),o=Math.floor(n.index/n.rows),s=n.index%n.rows,r=(o+.5)*n.columnWidth-t.outerWidth(!0)/2,a=(s+.5)*n.rowHeight-t.outerHeight(!0)/2;i._pushPosition(t,r,a),n.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(t){var i=this;t.each(function(t){var n=e(this);i._pushPosition(n,i.straightAcross.x,0),i.straightAcross.x+=n.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},e.fn.imagesLoaded=function(t){function i(){t.call(o,s)}function n(t){var o=t.target;o.src!==a&&-1===e.inArray(o,l)&&(l.push(o),--r<=0&&(setTimeout(i),s.unbind(".imagesLoaded",n)))}var o=this,s=o.find("img").add(o.filter("img")),r=s.length,a="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",l=[];return r||i(),s.bind("load.imagesLoaded error.imagesLoaded",n).each(function(){var t=this.src;this.src=a,this.src=t}),o};var k=function(e){t.console&&t.console.error(e)};e.fn.isotope=function(t,i){if("string"==typeof t){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var i=e.data(this,"isotope");return i?e.isFunction(i[t])&&"_"!==t.charAt(0)?void i[t].apply(i,n):void k("no such method '"+t+"' for isotope instance"):void k("cannot call methods on isotope prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){var n=e.data(this,"isotope");n?(n.option(t),n._init(i)):e.data(this,"isotope",new e.Isotope(t,this,i))});return this}}(window,jQuery),jQuery.Isotope.prototype._getMasonryGutterColumns=function(){var t=this.options.masonry&&this.options.masonry.gutterWidth||0;containerWidth=this.element.width(),this.masonry.columnWidth=this.options.masonry&&this.options.masonry.columnWidth||this.$filteredAtoms.outerWidth(!0)||containerWidth,this.masonry.columnWidth+=t,this.masonry.cols=Math.floor((containerWidth+t)/this.masonry.columnWidth),this.masonry.cols=Math.max(this.masonry.cols,1)},jQuery.Isotope.prototype._masonryReset=function(){this.masonry={},this._getMasonryGutterColumns();var t=this.masonry.cols;for(this.masonry.colYs=[];t--;)this.masonry.colYs.push(0)},jQuery.Isotope.prototype._masonryResizeChanged=function(){var t=this.masonry.cols;return this._getMasonryGutterColumns(),this.masonry.cols!==t},function(t,e,$,i){"use strict";var n=$("html"),o=$(t),s=$(e),r=$.envirabox=function(){r.open.apply(this,arguments)},a=navigator.userAgent.match(/msie/i),l=null,h=e.createTouch!==i,c=function(t){return t&&t.hasOwnProperty&&t instanceof $},d=function(t){return t&&"string"===$.type(t)},u=function(t){return d(t)&&t.indexOf("%")>0},p=function(t){return t&&!(t.style.overflow&&"hidden"===t.style.overflow)&&(t.clientWidth&&t.scrollWidth>t.clientWidth||t.clientHeight&&t.scrollHeight>t.clientHeight)},f=function(t,e){var i=parseInt(t,10)||0;return e&&u(t)&&(i=r.getViewport()[e]/100*i),Math.ceil(i)},m=function(t,e){return f(t,e)+"px"};$.extend(r,{version:"2.1.5",defaults:{padding:15,margin:40,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!h,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-envirabox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="envirabox-wrap" tabIndex="-1"><div class="envirabox-skin"><div class="envirabox-outer"><div class="envirabox-inner"></div></div></div></div>',image:'<img class="envirabox-image" src="{href}" alt="" />',iframe:'<iframe id="envirabox-frame{rnd}" name="envirabox-frame{rnd}" class="envirabox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(a?' allowtransparency="true"':"")+"></iframe>",error:'<p class="envirabox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="envirabox-item envirabox-close" href="javascript:;"></a>',next:'<a title="Next" class="envirabox-nav envirabox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="envirabox-nav envirabox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeChange:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(t,e){return t&&($.isPlainObject(e)||(e={}),!1!==r.close(!0))?($.isArray(t)||(t=c(t)?$(t).get():[t]),$.each(t,function(n,o){var s={},a,l,h,u,p,f,m;"object"===$.type(o)&&(o.nodeType&&(o=$(o)),c(o)?(s={href:o.data("envirabox-href")||o.attr("href"),title:$("<div/>").text(o.data("envirabox-title")||o.attr("title")).html(),isDom:!0,element:o},$.metadata&&$.extend(!0,s,o.metadata())):s=o),a=e.href||s.href||(d(o)?o:null),l=e.title!==i?e.title:s.title||"",h=e.content||s.content,u=h?"html":e.type||s.type,!u&&s.isDom&&(u=o.data("envirabox-type"),u||(p=o.prop("class").match(/envirabox\.(\w+)/),u=p?p[1]:null)),d(a)&&(u||(r.isImage(a)?u="image":r.isSWF(a)?u="swf":"#"===a.charAt(0)?u="inline":d(o)&&(u="html",h=o)),"ajax"===u&&(f=a.split(/\s+/,2),a=f.shift(),m=f.shift())),h||("inline"===u?a?h=$(d(a)?a.replace(/.*(?=#[^\s]+$)/,""):a):s.isDom&&(h=o):"html"===u?h=a:u||a||!s.isDom||(u="inline",h=o)),$.extend(s,{href:a,type:u,content:h,title:l,selector:m}),t[n]=s}),r.opts=$.extend(!0,{},r.defaults,e),e.keys!==i&&(r.opts.keys=e.keys?$.extend({},r.defaults.keys,e.keys):!1),r.group=t,r._start(r.opts.index)):void 0},cancel:function(){var t=r.coming;t&&!1===r.trigger("onCancel")||(r.hideLoading(),t&&(r.ajaxLoad&&r.ajaxLoad.abort(),r.ajaxLoad=null,r.imgPreload&&(r.imgPreload.onload=r.imgPreload.onerror=null),t.wrap&&t.wrap.stop(!0,!0).trigger("onReset").remove(),r.coming=null,r.current||r._afterZoomOut(t)))},close:function(t){r.cancel(),!1!==r.trigger("beforeClose")&&(r.unbindEvents(),r.isActive&&(r.isOpen&&t!==!0?(r.isOpen=r.isOpened=!1,r.isClosing=!0,$(".envirabox-item, .envirabox-nav").remove(),r.wrap.stop(!0,!0).removeClass("envirabox-opened"),r.transitions[r.current.closeMethod]()):($(".envirabox-wrap").stop(!0).trigger("onReset").remove(),r._afterZoomOut())))},play:function(t){var e=function(){clearTimeout(r.player.timer)},i=function(){e(),r.current&&r.player.isActive&&(r.player.timer=setTimeout(r.next,r.current.playSpeed))},n=function(){e(),s.unbind(".player"),r.player.isActive=!1,r.trigger("onPlayEnd")},o=function(){r.current&&(r.current.loop||r.current.index<r.group.length-1)&&(r.player.isActive=!0,s.bind({"onCancel.player beforeClose.player":n,"onUpdate.player":i,"beforeLoad.player":e}),i(),r.trigger("onPlayStart"))};t===!0||!r.player.isActive&&t!==!1?o():n()},next:function(t){var e=r.current;e&&(d(t)||(t=e.direction.next),r.jumpto(e.index+1,t,"next"))},prev:function(t){var e=r.current;e&&(d(t)||(t=e.direction.prev),r.jumpto(e.index-1,t,"prev"))},jumpto:function(t,e,n){var o=r.current;o&&(t=f(t),r.direction=e||o.direction[t>=o.index?"next":"prev"],r.router=n||"jumpto",o.loop&&(0>t&&(t=o.group.length+t%o.group.length),t%=o.group.length),o.group[t]!==i&&(r.cancel(),r._start(t)))},reposition:function(t,e){var i=r.current,n=i?i.wrap:null,o;n&&(o=r._getPosition(e),t&&"scroll"===t.type?(delete o.position,n.stop(!0,!0).animate(o,200)):(n.css(o),i.pos=$.extend({},i.dim,o)))},update:function(t){var e=t&&t.originalEvent&&t.originalEvent.type,i=!e||"orientationchange"===e;i&&(clearTimeout(l),l=null),r.isOpen&&!l&&(l=setTimeout(function(){var n=r.current;n&&!r.isClosing&&(r.wrap.removeClass("envirabox-tmp"),(i||"load"===e||"resize"===e&&n.autoResize)&&r._setDimension(),"scroll"===e&&n.canShrink||r.reposition(t),r.trigger("onUpdate"),l=null)},i&&!h?0:300))},toggle:function(t){r.isOpen&&(r.current.fitToView="boolean"===$.type(t)?t:!r.current.fitToView,h&&(r.wrap.removeAttr("style").addClass("envirabox-tmp"),r.trigger("onUpdate")),r.update())},hideLoading:function(){s.unbind(".loading"),$("#envirabox-loading").remove()},showLoading:function(){var t,e;r.hideLoading(),t=$('<div id="envirabox-loading"><div></div></div>').click(r.cancel).appendTo("body"),s.bind("keydown.loading",function(t){27===(t.which||t.keyCode)&&(t.preventDefault(),r.cancel())}),r.defaults.fixed||(e=r.getViewport(),t.css({position:"absolute",top:.5*e.h+e.y,left:.5*e.w+e.x})),r.trigger("onLoading")},getViewport:function(){var e=r.current&&r.current.locked||!1,i={x:o.scrollLeft(),y:o.scrollTop()};return e&&e.length?(i.w=e[0].clientWidth,i.h=e[0].clientHeight):(i.w=h&&t.innerWidth?t.innerWidth:o.width(),i.h=h&&t.innerHeight?t.innerHeight:o.height()),i},unbindEvents:function(){r.wrap&&c(r.wrap)&&r.wrap.unbind(".fb"),s.unbind(".fb"),o.unbind(".fb")},bindEvents:function(){var t=r.current,e;t&&(o.bind("orientationchange.fb"+(h?"":" resize.fb")+(t.autoCenter&&!t.locked?" scroll.fb":""),r.update),e=t.keys,e&&s.bind("keydown.fb",function(n){var o=n.which||n.keyCode,s=n.target||n.srcElement;return 27===o&&r.coming?!1:void(n.ctrlKey||n.altKey||n.shiftKey||n.metaKey||s&&(s.type||$(s).is("[contenteditable]"))||$.each(e,function(e,s){return t.group.length>1&&s[o]!==i?(r[e](s[o]),n.preventDefault(),!1):$.inArray(o,s)>-1?(r[e](),n.preventDefault(),!1):void 0}))}),$.fn.mousewheel&&t.mouseWheel&&r.wrap.bind("mousewheel.fb",function(e,i,n,o){for(var s=e.target||null,a=$(s),l=!1;a.length&&!(l||a.is(".envirabox-skin")||a.is(".envirabox-wrap"));)l=p(a[0]),a=$(a).parent();0===i||l||r.group.length>1&&!t.canShrink&&(o>0||n>0?r.prev(o>0?"down":"left"):(0>o||0>n)&&r.next(0>o?"up":"right"),e.preventDefault())}))},trigger:function(t,e){var i,n=e||r.coming||r.current;if(n){if($.isFunction(n[t])&&(i=n[t].apply(n,Array.prototype.slice.call(arguments,1))),i===!1)return!1;n.helpers&&$.each(n.helpers,function(e,i){i&&r.helpers[e]&&$.isFunction(r.helpers[e][t])&&r.helpers[e][t]($.extend(!0,{},r.helpers[e].defaults,i),n)})}s.trigger(t)},isImage:function(t){return d(t)&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(t){return d(t)&&t.match(/\.(swf)((\?|#).*)?$/i)},_start:function(t){var e={},i,n,o,s,a;if(t=f(t),i=r.group[t]||null,!i)return!1;if(e=$.extend(!0,{},r.opts,i),s=e.margin,a=e.padding,"number"===$.type(s)&&(e.margin=[s,s,s,s]),"number"===$.type(a)&&(e.padding=[a,a,a,a]),e.modal&&$.extend(!0,e,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),e.autoSize&&(e.autoWidth=e.autoHeight=!0),"auto"===e.width&&(e.autoWidth=!0),"auto"===e.height&&(e.autoHeight=!0),e.group=r.group,e.index=t,r.coming=e,!1===r.trigger("beforeLoad"))return void(r.coming=null);if(o=e.type,n=e.href,!o)return r.coming=null,r.current&&r.router&&"jumpto"!==r.router?(r.current.index=t,r[r.router](r.direction)):!1;if(r.isActive=!0,("image"===o||"swf"===o)&&(e.autoHeight=e.autoWidth=!1,e.scrolling="visible"),"image"===o&&(e.aspectRatio=!0),"iframe"===o&&h&&(e.scrolling="scroll"),e.wrap=$(e.tpl.wrap).addClass("envirabox-"+(h?"mobile":"desktop")+" envirabox-type-"+o+" envirabox-tmp "+e.wrapCSS).appendTo(e.parent||"body"),$.extend(e,{skin:$(".envirabox-skin",e.wrap),outer:$(".envirabox-outer",e.wrap),inner:$(".envirabox-inner",e.wrap)}),$.each(["Top","Right","Bottom","Left"],function(t,i){e.skin.css("padding"+i,m(e.padding[t]))}),r.trigger("onReady"),"inline"===o||"html"===o){if(!e.content||!e.content.length)return r._error("content")}else if(!n)return r._error("href");"image"===o?r._loadImage():"ajax"===o?r._loadAjax():"iframe"===o?r._loadIframe():r._afterLoad()},_error:function(t){$.extend(r.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:t,content:r.coming.tpl.error}),r._afterLoad()},_loadImage:function(){var t=r.imgPreload=new Image;t.onload=function(){this.onload=this.onerror=null,r.coming.width=this.width/r.opts.pixelRatio,r.coming.height=this.height/r.opts.pixelRatio,r._afterLoad()},t.onerror=function(){this.onload=this.onerror=null,r._error("image")},t.src=r.coming.href,t.complete!==!0&&r.showLoading()},_loadAjax:function(){var t=r.coming;r.showLoading(),r.ajaxLoad=$.ajax($.extend({},t.ajax,{url:t.href,error:function(t,e){r.coming&&"abort"!==e?r._error("ajax",t):r.hideLoading()},success:function(e,i){"success"===i&&(t.content=e,r._afterLoad())}}))},_loadIframe:function(){var t=r.coming,e=$(t.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",h?"auto":t.iframe.scrolling).attr("src",t.href);$(t.wrap).bind("onReset",function(){try{$(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(t){}}),t.iframe.preload&&(r.showLoading(),e.one("load",function(){$(this).data("ready",1),h||$(this).bind("load.fb",r.update),$(this).parents(".envirabox-wrap").width("100%").removeClass("envirabox-tmp").show(),r._afterLoad()})),t.content=e.appendTo(t.inner),t.iframe.preload||r._afterLoad()},_preloadImages:function(){var t=r.group,e=r.current,i=t.length,n=e.preload?Math.min(e.preload,i-1):0,o,s;for(s=1;n>=s;s+=1)o=t[(e.index+s)%i],"image"===o.type&&o.href&&((new Image).src=o.href)},_afterLoad:function(){var t=r.coming,e=r.current,i="envirabox-placeholder",n,o,s,a,l,h;if(r.hideLoading(),t&&r.isActive!==!1){if(!1===r.trigger("afterLoad",t,e))return t.wrap.stop(!0).trigger("onReset").remove(),void(r.coming=null);switch(e&&(r.trigger("beforeChange",e),e.wrap.stop(!0).removeClass("envirabox-opened").find(".envirabox-item, .envirabox-nav").remove()),r.unbindEvents(),n=t,o=t.content,s=t.type,a=t.scrolling,$.extend(r,{wrap:n.wrap,skin:n.skin,outer:n.outer,inner:n.inner,current:n,previous:e}),l=n.href,s){case"inline":case"ajax":case"html":n.selector?o=$("<div>").html(o).find(n.selector):c(o)&&(o.data(i)||o.data(i,$('<div class="'+i+'"></div>').insertAfter(o).hide()),o=o.show().detach(),n.wrap.bind("onReset",function(){$(this).find(o).length&&o.hide().replaceAll(o.data(i)).data(i,!1)}));break;case"image":o=n.tpl.image.replace(/\{href\}/g,l);break;case"swf":o='<object id="envirabox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+l+'"></param>',h="",$.each(n.swf,function(t,e){o+='<param name="'+t+'" value="'+e+'"></param>',h+=" "+t+'="'+e+'"'}),o+='<embed src="'+l+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}c(o)&&o.parent().is(n.inner)||n.inner.append(o),r.trigger("beforeShow"),n.inner.css("overflow","yes"===a?"scroll":"no"===a?"hidden":a),r._setDimension(),r.reposition(),r.isOpen=!1,r.coming=null,r.bindEvents(),r.isOpened?e.prevMethod&&r.transitions[e.prevMethod]():$(".envirabox-wrap").not(n.wrap).stop(!0).trigger("onReset").remove(),r.transitions[r.isOpened?n.nextMethod:n.openMethod](),r._preloadImages()
2
+ }},_setDimension:function(){var t=r.getViewport(),e=0,i=!1,n=!1,o=r.wrap,s=r.skin,a=r.inner,l=r.current,h=l.width,c=l.height,d=l.minWidth,p=l.minHeight,g=l.maxWidth,v=l.maxHeight,y=l.scrolling,w=l.scrollOutside?l.scrollbarWidth:0,x=l.margin,b=f(x[1]+x[3]),_=f(x[0]+x[2]),C,k,A,S,M,z,H,R,T,W,P,L,O,I,D;if(o.add(s).add(a).width("auto").height("auto").removeClass("envirabox-tmp"),C=f(s.outerWidth(!0)-s.width()),k=f(s.outerHeight(!0)-s.height()),A=b+C,S=_+k,M=u(h)?(t.w-A)*f(h)/100:h,z=u(c)?(t.h-S)*f(c)/100:c,"iframe"===l.type){if(I=l.content,l.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(a.width(M).height(9999),D=I.contents().find("body"),w&&D.css("overflow-x","hidden"),z=D.outerHeight(!0))}catch(E){}}else(l.autoWidth||l.autoHeight)&&(a.addClass("envirabox-tmp"),l.autoWidth||a.width(M),l.autoHeight||a.height(z),l.autoWidth&&(M=a.width()),l.autoHeight&&(z=a.height()),a.removeClass("envirabox-tmp"));if(h=f(M),c=f(z),T=M/z,d=f(u(d)?f(d,"w")-A:d),g=f(u(g)?f(g,"w")-A:g),p=f(u(p)?f(p,"h")-S:p),v=f(u(v)?f(v,"h")-S:v),H=g,R=v,l.fitToView&&(g=Math.min(t.w-A,g),v=Math.min(t.h-S,v)),L=t.w-b,O=t.h-_,l.aspectRatio?(h>g&&(h=g,c=f(h/T)),c>v&&(c=v,h=f(c*T)),d>h&&(h=d,c=f(h/T)),p>c&&(c=p,h=f(c*T))):(h=Math.max(d,Math.min(h,g)),l.autoHeight&&"iframe"!==l.type&&(a.width(h),c=a.height()),c=Math.max(p,Math.min(c,v))),l.fitToView)if(a.width(h).height(c),o.width(h+C),W=o.width(),P=o.height(),l.aspectRatio)for(;(W>L||P>O)&&h>d&&c>p&&!(e++>19);)c=Math.max(p,Math.min(v,c-10)),h=f(c*T),d>h&&(h=d,c=f(h/T)),h>g&&(h=g,c=f(h/T)),a.width(h).height(c),o.width(h+C),W=o.width(),P=o.height();else h=Math.max(d,Math.min(h,h-(W-L))),c=Math.max(p,Math.min(c,c-(P-O)));w&&"auto"===y&&z>c&&L>h+C+w&&(h+=w),a.width(h).height(c),o.width(h+C),W=o.width(),P=o.height(),i=(W>L||P>O)&&h>d&&c>p,n=l.aspectRatio?H>h&&R>c&&M>h&&z>c:(H>h||R>c)&&(M>h||z>c),$.extend(l,{dim:{width:m(W),height:m(P)},origWidth:M,origHeight:z,canShrink:i,canExpand:n,wPadding:C,hPadding:k,wrapSpace:P-s.outerHeight(!0),skinSpace:s.height()-c}),!I&&l.autoHeight&&c>p&&v>c&&!n&&a.height("auto")},_getPosition:function(t){var e=r.current,i=r.getViewport(),n=e.margin,o=r.wrap.width()+n[1]+n[3],s=r.wrap.height()+n[0]+n[2],a={position:"absolute",top:n[0],left:n[3]};return e.helpers.title.type&&"float"==e.helpers.title.type&&(s+=$(".envirabox-skin .envirabox-title").height()),e.autoCenter&&e.fixed&&!t&&s<=i.h&&o<=i.w?a.position="fixed":e.locked||(a.top+=i.y,a.left+=i.x),a.top=m(Math.max(a.top,a.top+(i.h-s)*e.topRatio)),a.left=m(Math.max(a.left,a.left+(i.w-o)*e.leftRatio)),a},_afterZoomIn:function(){var t=r.current;t&&(r.isOpen=r.isOpened=!0,r.wrap.css("overflow","visible").addClass("envirabox-opened").hide().show(0),r.update(),(t.closeClick||t.nextClick&&r.group.length>1)&&r.inner.css("cursor","pointer").bind("click.fb",function(e){$(e.target).is("a")||$(e.target).parent().is("a")||(e.preventDefault(),r[t.closeClick?"close":"next"]())}),t.closeBtn&&$(t.tpl.closeBtn).appendTo(r.skin).bind("click.fb",function(t){t.preventDefault(),r.close()}),t.arrows&&r.group.length>1&&((t.loop||t.index>0)&&$(t.tpl.prev).appendTo(r.outer).bind("click.fb",r.prev),(t.loop||t.index<r.group.length-1)&&$(t.tpl.next).appendTo(r.outer).bind("click.fb",r.next)),r.trigger("afterShow"),t.loop||t.index!==t.group.length-1?r.opts.autoPlay&&!r.player.isActive&&(r.opts.autoPlay=!1,r.play(!0)):r.play(!1))},_afterZoomOut:function(t){t=t||r.current,$(".envirabox-wrap").trigger("onReset").remove(),$.extend(r,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null}),r.trigger("afterClose",t)}}),r.transitions={getOrigPosition:function(){var t=r.current,e=t.element,i=t.orig,n={},o=50,s=50,a=t.hPadding,l=t.wPadding,h=r.getViewport();return!i&&t.isDom&&e.is(":visible")&&(i=e.find("img:first"),i.length||(i=e)),c(i)?(n=i.offset(),i.is("img")&&(o=i.outerWidth(),s=i.outerHeight())):(n.top=h.y+(h.h-s)*t.topRatio,n.left=h.x+(h.w-o)*t.leftRatio),("fixed"===r.wrap.css("position")||t.locked)&&(n.top-=h.y,n.left-=h.x),n={top:m(n.top-a*t.topRatio),left:m(n.left-l*t.leftRatio),width:m(o+l),height:m(s+a)}},step:function(t,e){var i,n,o,s=e.prop,a=r.current,l=a.wrapSpace,h=a.skinSpace;("width"===s||"height"===s)&&(i=e.end===e.start?1:(t-e.start)/(e.end-e.start),r.isClosing&&(i=1-i),n="width"===s?a.wPadding:a.hPadding,o=t-n,r.skin[s](f("width"===s?o:o-l*i)),r.inner[s](f("width"===s?o:o-l*i-h*i)))},zoomIn:function(){var t=r.current,e=t.pos,i=t.openEffect,n="elastic"===i,o=$.extend({opacity:1},e);delete o.position,n?(e=this.getOrigPosition(),t.openOpacity&&(e.opacity=.1)):"fade"===i&&(e.opacity=.1),r.wrap.css(e).animate(o,{duration:"none"===i?0:t.openSpeed,easing:t.openEasing,step:n?this.step:null,complete:r._afterZoomIn})},zoomOut:function(){var t=r.current,e=t.closeEffect,i="elastic"===e,n={opacity:.1};i&&(n=this.getOrigPosition(),t.closeOpacity&&(n.opacity=.1)),r.wrap.animate(n,{duration:"none"===e?0:t.closeSpeed,easing:t.closeEasing,step:i?this.step:null,complete:r._afterZoomOut})},changeIn:function(){var t=r.current,e=t.nextEffect,i=t.pos,n={opacity:1},o=r.direction,s=200,a;i.opacity=.1,"elastic"===e&&(a="down"===o||"up"===o?"top":"left","down"===o||"right"===o?(i[a]=m(f(i[a])-s),n[a]="+="+s+"px"):(i[a]=m(f(i[a])+s),n[a]="-="+s+"px")),"none"===e?r._afterZoomIn():r.wrap.css(i).animate(n,{duration:t.nextSpeed,easing:t.nextEasing,complete:r._afterZoomIn})},changeOut:function(){var t=r.previous,e=t.prevEffect,i={opacity:.1},n=r.direction,o=200;"elastic"===e&&(i["down"===n||"up"===n?"top":"left"]=("up"===n||"left"===n?"-":"+")+"="+o+"px"),t.wrap.animate(i,{duration:"none"===e?0:t.prevSpeed,easing:t.prevEasing,complete:function(){$(this).trigger("onReset").remove()}})}},r.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!h,fixed:!0},overlay:null,fixed:!1,el:$("html"),create:function(t){var e;t=$.extend({},this.defaults,t),this.overlay&&this.close(),e=r.coming?r.coming.parent:t.parent,this.overlay=$('<div class="envirabox-overlay"></div>').appendTo(e&&e.lenth?e:"body"),this.fixed=!1,t.fixed&&r.defaults.fixed&&(this.overlay.addClass("envirabox-overlay-fixed"),this.fixed=!0)},open:function(t){var e=this;t=$.extend({},this.defaults,t),this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(t),this.fixed||(o.bind("resize.overlay",$.proxy(this.update,this)),this.update()),t.closeClick&&this.overlay.bind("click.overlay",function(t){return $(t.target).hasClass("envirabox-overlay")?(r.isActive?r.close():e.close(),!1):void 0}),this.overlay.css(t.css).show()},close:function(){o.unbind("resize.overlay"),this.el.hasClass("envirabox-lock")&&($(".envirabox-margin").removeClass("envirabox-margin"),this.el.removeClass("envirabox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH)),$(".envirabox-overlay").remove().hide(),$.extend(this,{overlay:null,fixed:!1})},update:function(){var t="100%",i;this.overlay.width(t).height("100%"),a?(i=Math.max(e.documentElement.offsetWidth,e.body.offsetWidth),s.width()>i&&(t=s.width())):s.width()>o.width()&&(t=s.width()),this.overlay.width(t).height(s.height())},onReady:function(t,e){var i=this.overlay;$(".envirabox-overlay").stop(!0,!0),i||this.create(t),t.locked&&this.fixed&&e.fixed&&(e.locked=this.overlay.append(e.wrap),e.fixed=!1),t.showEarly===!0&&this.beforeShow.apply(this,arguments)},beforeShow:function(t,e){e.locked&&!this.el.hasClass("envirabox-lock")&&(this.fixPosition!==!1&&$("*").filter(function(){return"fixed"===$(this).css("position")&&!$(this).hasClass("envirabox-overlay")&&!$(this).hasClass("envirabox-wrap")}).addClass("envirabox-margin"),this.el.addClass("envirabox-margin"),this.scrollV=o.scrollTop(),this.scrollH=o.scrollLeft(),this.el.addClass("envirabox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH)),this.open(t)},onUpdate:function(){this.fixed||this.update()},afterClose:function(t){this.overlay&&!r.coming&&this.overlay.fadeOut(t.speedOut,$.proxy(this.close,this))}},r.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(t){var e=r.current,i=e.title,n=t.type,o,s;if($.isFunction(i)&&(i=i.call(e.element,e)),d(i)&&""!==$.trim(i)){switch(o=$('<div class="envirabox-title envirabox-title-'+n+'-wrap">'+i+"</div>"),n){case"inside":s=r.skin;break;case"outside":s=r.wrap;break;case"over":s=r.inner;break;default:s=r.skin,o.appendTo("body"),a&&o.width(o.width()),o.wrapInner('<span class="child"></span>'),r.current.margin[2]+=Math.abs(f(o.css("margin-bottom")))}o["top"===t.position?"prependTo":"appendTo"](s)}}},$.fn.envirabox=function(t){var e,i=$(this),n=this.selector||"",o=function(o){var s=$(this).blur(),a=e,l,h;o.ctrlKey||o.altKey||o.shiftKey||o.metaKey||s.is(".envirabox-wrap")||(l=t.groupAttr||"data-envirabox-group",h=s.attr(l),h||(l="rel",h=s.get(0)[l]),h&&""!==h&&"nofollow"!==h&&(s=n.length?$(n):i,s=s.filter("["+l+'="'+h+'"]'),a=s.index(this)),t.index=a,r.open(s,t)!==!1&&o.preventDefault())};return t=t||{},e=t.index||0,n&&t.live!==!1?s.undelegate(n,"click.fb-start").delegate(n+":not('.envirabox-item, .envirabox-nav')","click.fb-start",o):i.unbind("click.fb-start").bind("click.fb-start",o),this.filter("[data-envirabox-start=1]").trigger("click"),this},s.ready(function(){var e,o;$.scrollbarWidth===i&&($.scrollbarWidth=function(){var t=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),e=t.children(),i=e.innerWidth()-e.height(99).innerWidth();return t.remove(),i}),$.support.fixedPosition===i&&($.support.fixedPosition=function(){var t=$('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===t[0].offsetTop||15===t[0].offsetTop;return t.remove(),e}()),$.extend(r.defaults,{scrollbarWidth:$.scrollbarWidth(),fixed:$.support.fixedPosition,parent:$("body")}),e=$(t).width(),n.addClass("envirabox-lock-test"),o=$(t).width(),n.removeClass("envirabox-lock-test"),$("<style type='text/css'>.envirabox-margin{margin-right:"+(o-e)+"px;}</style>").appendTo("head")})}(window,document,jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function($){function t(t){var n=t||window.event,o=s.call(arguments,1),l=0,c=0,d=0,u=0,p=0,f=0;if(t=$.event.fix(n),t.type="mousewheel","detail"in n&&(d=-1*n.detail),"wheelDelta"in n&&(d=n.wheelDelta),"wheelDeltaY"in n&&(d=n.wheelDeltaY),"wheelDeltaX"in n&&(c=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(c=-1*d,d=0),l=0===d?c:d,"deltaY"in n&&(d=-1*n.deltaY,l=d),"deltaX"in n&&(c=n.deltaX,0===d&&(l=-1*c)),0!==d||0!==c){if(1===n.deltaMode){var m=$.data(this,"mousewheel-line-height");l*=m,d*=m,c*=m}else if(2===n.deltaMode){var g=$.data(this,"mousewheel-page-height");l*=g,d*=g,c*=g}if(u=Math.max(Math.abs(d),Math.abs(c)),(!a||a>u)&&(a=u,i(n,u)&&(a/=40)),i(n,u)&&(l/=40,c/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/a),c=Math[c>=1?"floor":"ceil"](c/a),d=Math[d>=1?"floor":"ceil"](d/a),h.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();p=t.clientX-v.left,f=t.clientY-v.top}return t.deltaX=c,t.deltaY=d,t.deltaFactor=a,t.offsetX=p,t.offsetY=f,t.deltaMode=0,o.unshift(t,l,c,d),r&&clearTimeout(r),r=setTimeout(e,200),($.event.dispatch||$.event.handle).apply(this,o)}}function e(){a=null}function i(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice,r,a;if($.event.fixHooks)for(var l=n.length;l;)$.event.fixHooks[n[--l]]=$.event.mouseHooks;var h=$.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t;$.data(this,"mousewheel-line-height",h.getLineHeight(this)),$.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null;$.removeData(this,"mousewheel-line-height"),$.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var e=$(t),i=e["offsetParent"in $.fn?"offsetParent":"parent"]();return i.length||(i=$("body")),parseInt(i.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(t){return $(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};$.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})});
assets/js/min/metabox-min.js CHANGED
@@ -1 +1 @@
1
- !function($){$(function(){function e(){var e={action:"envira_gallery_refresh",post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.refresh_nonce};$(".envira-media-library").after('<span class="spinner envira-gallery-spinner envira-gallery-spinner-refresh"></span>'),$(".envira-gallery-spinner-refresh").css({display:"inline-block","margin-top":"-3px"}),$.post(envira_gallery_metabox.ajax,e,function(e){e&&e.success&&($("#envira-gallery-output").html(e.success),$("#envira-gallery-output").find(".wp-editor-wrap").each(function(e,a){var r=$(a).find(".quicktags-toolbar");if(!(r.length>0)){var i=$(a).attr("id").split("-"),n=i.slice(4,-1).join("-");quicktags({id:"envira-gallery-caption-"+n,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()}}),$("#envira-gallery-output").trigger({type:"enviraRefreshed",html:e.success,id:envira_gallery_metabox.id})),$(".envira-gallery-spinner-refresh").fadeOut(300,function(){$(this).remove()})},"json")}function a(){var e=$("#envira-config-crop"),a=$("#envira-config-mobile"),r=$("#envira-config-lightbox-toolbar");e.is(":checked")&&$("#envira-config-crop-size-box").fadeIn(300),e.on("change",function(){$(this).is(":checked")?$("#envira-config-crop-size-box").fadeIn(300):$("#envira-config-crop-size-box").fadeOut(300)}),a.is(":checked")&&$("#envira-config-mobile-size-box").fadeIn(300),a.on("change",function(){$(this).is(":checked")?$("#envira-config-mobile-size-box").fadeIn(300):$("#envira-config-mobile-size-box").fadeOut(300)}),r.is(":checked")&&$("#envira-config-lightbox-toolbar-position-box").fadeIn(300),r.on("change",function(){$(this).is(":checked")?$("#envira-config-lightbox-toolbar-position-box").fadeIn(300):$("#envira-config-lightbox-toolbar-position-box").fadeOut(300)})}function r(){$("#envira-gallery .drag-drop-inside").append('<div class="envira-progress-bar"><div></div></div>'),d=new plupload.Uploader(envira_gallery_metabox.plupload);var e=$("#envira-gallery .envira-progress-bar"),a=$("#envira-gallery .envira-progress-bar div"),r=$("#envira-gallery-output");d&&($("#envira-gallery .max-upload-size").append(' <a class="envira-media-library button button-primary" href="#" title="'+envira_gallery_metabox.gallery+'" style="vertical-align: baseline;">'+envira_gallery_metabox.gallery+"</a>"),d.bind("Init",function(e){var a=$("#envira-gallery-plupload-upload-ui");e.features.dragdrop&&!$(document.body).hasClass("mobile")?(a.addClass("drag-drop"),$("#envira-gallery-drag-drop-area").bind("dragover.wp-uploader",function(){a.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){a.removeClass("drag-over")})):(a.removeClass("drag-drop"),$("#envira-gallery-drag-drop-area").unbind(".wp-uploader")),"html4"==e.runtime&&$(".upload-flash-bypass").hide()}),d.init(),d.bind("FilesAdded",function(a,r){var n=104857600,l=parseInt(a.settings.max_file_size,10);$("#envira-gallery-upload-error").html(""),$(e).show().css("display","block"),plupload.each(r,function(e){l>n&&e.size>n&&"html5"!=a.runtime&&i(a,e,!0)}),a.refresh(),a.start()}),d.bind("UploadProgress",function(e,r){$(a).css("width",e.total.percent+"%")}),d.bind("FileUploaded",function(e,a,i){$.post(envira_gallery_metabox.ajax,{action:"envira_gallery_load_image",nonce:envira_gallery_metabox.load_image,id:i.response,post_id:envira_gallery_metabox.id},function(e){$(r).append(e),$(e).find(".wp-editor-container").each(function(e,a){var r=$(a).attr("id").split("-")[4];quicktags({id:"envira-gallery-caption-"+r,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()})},"json")}),d.bind("UploadComplete",function(){$(e).hide().css("display","none"),$(a).removeAttr("style")}),d.bind("Error",function(e,a){var r=104857600,n=$("#envira-gallery-upload-error"),l;switch(a){case plupload.FAILED:case plupload.FILE_EXTENSION_ERROR:n.html('<p class="error">'+pluploadL10n.upload_failed+"</p>");break;case plupload.FILE_SIZE_ERROR:i(e,a.file);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(fileObj,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(fileObj,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(fileObj,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:l=parseInt(uploader.settings.max_file_size,10),l>r&&fileObj.size>r?wpFileError(fileObj,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:$(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(fileObj,pluploadL10n.default_error)}e.refresh()}))}function i(e,a,r){var i;i=r?pluploadL10n.big_upload_queued.replace("%s",a.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",a.name),$("#envira-gallery-upload-error").html('<p class="error">'+i+"</p>"),e.removeFile(a)}var n=$("#envira-tabs"),l=$("#envira-tabs-nav"),t=window.location.hash,o=window.location.hash.replace("!","");if(t&&t.indexOf("envira-tab-")>=0){$(".envira-active").removeClass("envira-active"),l.find('li a[href="'+o+'"]').parent().addClass("envira-active"),n.find(o).addClass("envira-active").show();var s=$("#post").attr("action");s&&(s=s.split("#")[0],$("#post").attr("action",s+t))}$(document).on("click","#envira-tabs-nav li a",function(e){e.preventDefault();var a=$(this);if(!a.parent().hasClass("envira-active")){window.location.hash=t=this.hash.split("#").join("#!");var r=l.find(".envira-active").removeClass("envira-active").find("a").attr("href");a.parent().addClass("envira-active"),n.find(r).removeClass("envira-active").hide(),n.find(a.attr("href")).addClass("envira-active").show();var i=$("#post").attr("action");i&&(i=i.split("#")[0],$("#post").attr("action",i+t))}});var d;r(),a(),0!==$(".envira-helper-needed").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),$(document).on("click",".envira-meta-icon",function(e){e.preventDefault();var a=$(this),r=a.parent(),i=a.next();i.is(":visible")?($(".envira-meta-helper-overlay").remove(),r.removeClass("envira-helper-active")):(0===$(".envira-meta-helper-overlay").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),r.addClass("envira-helper-active"))}),$(document).on("click",".envira-media-library",function(e){e.preventDefault(),v=!0,$("#envira-gallery-upload-ui").appendTo("body").show()}),$(".envira-gallery-gallery").on("click",".thumbnail, .check, .media-modal-icon",function(e){e.preventDefault(),$(this).parent().parent().hasClass("envira-gallery-in-gallery")||($(this).parent().parent().hasClass("selected")?$(this).parent().parent().removeClass("details selected"):$(this).parent().parent().addClass("details selected"))}),$(".envira-gallery-load-library").on("click",function(e){e.preventDefault();var a=$(this);a.next().css({display:"inline-block","margin-top":"14px","margin-left":"-5px"});var r={action:"envira_gallery_load_library",offset:parseInt(a.attr("data-envira-gallery-offset")),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.load_gallery};$.post(envira_gallery_metabox.ajax,r,function(e){a.attr("data-envira-gallery-offset",parseInt(a.attr("data-envira-gallery-offset"))+20),e&&e.html&&a.hasClass("has-search")?($(".envira-gallery-gallery").html(e.html),a.removeClass("has-search")):$(".envira-gallery-gallery").append(e.html),a.next().hide()},"json")}),$(document).on("keyup keydown","#envira-gallery-gallery-search",function(){var e=$(this);e.prev().css({display:"inline-block","margin-top":"1px","vertical-align":"middle","margin-right":"4px"});var a=$(this).val(),r={action:"envira_gallery_library_search",nonce:envira_gallery_metabox.library_search,post_id:envira_gallery_metabox.id,search:a};p(function(){$.post(envira_gallery_metabox.ajax,r,function(a){$(".envira-load-library").addClass("has-search").attr("data-envira-offset",parseInt(0)),a&&$(".envira-gallery-gallery").html(a.html),e.prev().hide()},"json")},"500")}),$(document).on("click",".envira-gallery-media-insert",function(e){e.preventDefault();var a=$(this),r=$(this).text(),i={action:"envira_gallery_insert_images",nonce:envira_gallery_metabox.insert_nonce,post_id:envira_gallery_metabox.id,images:{}},n=!1,l=e;a.text(envira_gallery_metabox.inserting),$(".envira-gallery-media-frame").find(".attachment.selected:not(.envira-gallery-in-gallery)").each(function(e,a){i.images[e]=$(a).attr("data-attachment-id"),n=!0}),$.post(envira_gallery_metabox.ajax,i,function(e){setTimeout(function(){u(l),a.text(r),n&&$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")},500)},"json")});var c=$("#envira-gallery-output");c.sortable({containment:"#envira-gallery-output",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(e,a){var r={url:envira_gallery_metabox.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_gallery_sort_images",order:c.sortable("toArray").toString(),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.sort},success:function(e){},error:function(e,a,r){}};$.ajax(r)}}),$("#envira-gallery").on("click",".envira-gallery-remove-image",function(e){e.preventDefault();var a=confirm(envira_gallery_metabox.remove);if(a){var r=$(this).parent().attr("id"),i={action:"envira_gallery_remove_image",attachment_id:r,post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.remove_nonce};$.post(envira_gallery_metabox.ajax,i,function(e){$("#"+r).fadeOut("normal",function(){$(this).remove(),$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")})},"json")}}),$("#envira-gallery").on("click.enviraModify",".envira-gallery-modify-image",function(e){e.preventDefault();var a=$(this).parent().data("envira-gallery-image"),r="envira-gallery-meta-"+a;v=!0,$("#"+r).appendTo("body").show();var i=function(e){e.preventDefault(),$("#"+r).appendTo("#"+a).hide(),v=!1,$(document).off("click.enviraLink")};$(document).on("click.enviraIframe",".media-modal-close, .media-modal-backdrop",i),$(document).on("keydown.enviraIframe",function(e){27==e.keyCode&&v&&i(e)}),$(document).on("click.enviraLink",".ed_button",function(){$("#wp-link-backdrop").css("zIndex","170100"),$("#wp-link-wrap").css("zIndex","171005")})}),$(document).on("click",".envira-gallery-meta-submit",function(e){e.preventDefault();var a=$(this),r=a.text(),i=a.data("envira-gallery-item"),n="envira-gallery-meta-"+i,l={};a.text(envira_gallery_metabox.saving),l.title=$("#envira-gallery-meta-table-"+i).find('textarea[name="_envira_gallery[meta_title]"]').val(),$("#envira-gallery-meta-table-"+i).find(":input").not(".ed_button").each(function(e,a){$(this).data("envira-meta")&&(l[$(this).data("envira-meta")]=$(this).val())});var t={action:"envira_gallery_save_meta",nonce:envira_gallery_metabox.save_nonce,attach_id:i,post_id:envira_gallery_metabox.id,meta:l};$.post(envira_gallery_metabox.ajax,t,function(e){setTimeout(function(){$("#"+n).appendTo("#"+i).hide(),a.text(r)},500)},"json")}),$("#envira-gallery-import-submit").on("click",function(e){$(this).next().css("display","inline-block"),0===$("#envira-config-import-gallery").val().length&&(e.preventDefault(),$(this).next().hide(),alert(envira_gallery_metabox["import"]))});var p=function(){var e=0;return function(a,r){clearTimeout(e),e=setTimeout(a,r)}}(),v=!1,u=function(a){a.preventDefault(),$("#envira-gallery-upload-ui").appendTo("#envira-gallery-upload-ui-wrapper").hide(),e(),v=!1};$(document).on("click","#envira-gallery-upload-ui .media-modal-close, #envira-gallery-upload-ui .media-modal-backdrop",u),$(document).on("keydown",function(e){27==e.keyCode&&v&&u(e)})})}(jQuery);
1
+ !function($){$(function(){function e(){var e={action:"envira_gallery_refresh",post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.refresh_nonce};$(".envira-media-library").after('<span class="spinner envira-gallery-spinner envira-gallery-spinner-refresh"></span>'),$(".envira-gallery-spinner-refresh").css({display:"inline-block","margin-top":"-3px"}),$.post(envira_gallery_metabox.ajax,e,function(e){e&&e.success&&($("#envira-gallery-output").html(e.success),$("#envira-gallery-output").find(".wp-editor-wrap").each(function(e,a){var r=$(a).find(".quicktags-toolbar");if(!(r.length>0)){var i=$(a).attr("id").split("-"),n=i.slice(4,-1).join("-");quicktags({id:"envira-gallery-caption-"+n,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()}}),$("#envira-gallery-output").trigger({type:"enviraRefreshed",html:e.success,id:envira_gallery_metabox.id})),$(".envira-gallery-spinner-refresh").fadeOut(300,function(){$(this).remove()})},"json")}function a(){var e=$("#envira-config-crop"),a=$("#envira-config-mobile"),r=$("#envira-config-lightbox-toolbar");e.is(":checked")&&$("#envira-config-crop-size-box").fadeIn(300),e.on("change",function(){$(this).is(":checked")?$("#envira-config-crop-size-box").fadeIn(300):$("#envira-config-crop-size-box").fadeOut(300)}),a.is(":checked")&&$("#envira-config-mobile-size-box").fadeIn(300),a.on("change",function(){$(this).is(":checked")?$("#envira-config-mobile-size-box").fadeIn(300):$("#envira-config-mobile-size-box").fadeOut(300)}),r.is(":checked")&&$("#envira-config-lightbox-toolbar-position-box").fadeIn(300),r.on("change",function(){$(this).is(":checked")?$("#envira-config-lightbox-toolbar-position-box").fadeIn(300):$("#envira-config-lightbox-toolbar-position-box").fadeOut(300)})}function r(){$("#envira-gallery .drag-drop-inside").append('<div class="envira-progress-bar"><div></div></div>'),d=new plupload.Uploader(envira_gallery_metabox.plupload);var e=$("#envira-gallery .envira-progress-bar"),a=$("#envira-gallery .envira-progress-bar div"),r=$("#envira-gallery-output");d&&($("#envira-gallery .max-upload-size").append(' <a class="envira-media-library button button-primary" href="#" title="'+envira_gallery_metabox.gallery+'" style="vertical-align: baseline;">'+envira_gallery_metabox.gallery+"</a>"),d.bind("Init",function(e){var a=$("#envira-gallery-plupload-upload-ui");e.features.dragdrop&&!$(document.body).hasClass("mobile")?(a.addClass("drag-drop"),$("#envira-gallery-drag-drop-area").bind("dragover.wp-uploader",function(){a.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){a.removeClass("drag-over")})):(a.removeClass("drag-drop"),$("#envira-gallery-drag-drop-area").unbind(".wp-uploader")),"html4"==e.runtime&&$(".upload-flash-bypass").hide()}),d.init(),d.bind("FilesAdded",function(a,r){var n=104857600,l=parseInt(a.settings.max_file_size,10);$("#envira-gallery-upload-error").html(""),$(e).show().css("display","block"),plupload.each(r,function(e){l>n&&e.size>n&&"html5"!=a.runtime&&i(a,e,!0)}),a.refresh(),a.start()}),d.bind("UploadProgress",function(e,r){$(a).css("width",e.total.percent+"%")}),d.bind("FileUploaded",function(e,a,i){$.post(envira_gallery_metabox.ajax,{action:"envira_gallery_load_image",nonce:envira_gallery_metabox.load_image,id:i.response,post_id:envira_gallery_metabox.id},function(e){$(r).append(e),$(e).find(".wp-editor-container").each(function(e,a){var r=$(a).attr("id").split("-")[4];quicktags({id:"envira-gallery-caption-"+r,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()})},"json")}),d.bind("UploadComplete",function(){$(e).hide().css("display","none"),$(a).removeAttr("style")}),d.bind("Error",function(e,a){var r=104857600,n=$("#envira-gallery-upload-error"),l;switch(a){case plupload.FAILED:case plupload.FILE_EXTENSION_ERROR:n.html('<p class="error">'+pluploadL10n.upload_failed+"</p>");break;case plupload.FILE_SIZE_ERROR:i(e,a.file);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(fileObj,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(fileObj,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(fileObj,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:l=parseInt(uploader.settings.max_file_size,10),l>r&&fileObj.size>r?wpFileError(fileObj,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:$(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:i(e,a.file)}e.refresh()}))}function i(e,a,r){var i;console.log("enviraUploadError"),i=r?pluploadL10n.big_upload_queued.replace("%s",a.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",a.name),$("#envira-gallery-upload-error").html('<div class="error fade"><p>'+i+"</p></div>"),e.removeFile(a)}var n=$("#envira-tabs"),l=$("#envira-tabs-nav"),t=window.location.hash,o=window.location.hash.replace("!","");if(t&&t.indexOf("envira-tab-")>=0){$(".envira-active").removeClass("envira-active"),l.find('li a[href="'+o+'"]').parent().addClass("envira-active"),n.find(o).addClass("envira-active").show();var s=$("#post").attr("action");s&&(s=s.split("#")[0],$("#post").attr("action",s+t))}$(document).on("click","#envira-tabs-nav li a",function(e){e.preventDefault();var a=$(this);if(!a.parent().hasClass("envira-active")){window.location.hash=t=this.hash.split("#").join("#!");var r=l.find(".envira-active").removeClass("envira-active").find("a").attr("href");a.parent().addClass("envira-active"),n.find(r).removeClass("envira-active").hide(),n.find(a.attr("href")).addClass("envira-active").show();var i=$("#post").attr("action");i&&(i=i.split("#")[0],$("#post").attr("action",i+t))}});var d;r(),a(),0!==$(".envira-helper-needed").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),$(document).on("click",".envira-meta-icon",function(e){e.preventDefault();var a=$(this),r=a.parent(),i=a.next();i.is(":visible")?($(".envira-meta-helper-overlay").remove(),r.removeClass("envira-helper-active")):(0===$(".envira-meta-helper-overlay").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),r.addClass("envira-helper-active"))}),$(document).on("click",".envira-media-library",function(e){e.preventDefault(),m=!0,$("#envira-gallery-upload-ui").appendTo("body").show()}),$(".envira-gallery-gallery").on("click",".thumbnail, .check, .media-modal-icon",function(e){e.preventDefault(),$(this).parent().parent().hasClass("envira-gallery-in-gallery")||($(this).parent().parent().hasClass("selected")?$(this).parent().parent().removeClass("details selected"):$(this).parent().parent().addClass("details selected"))}),$(".envira-gallery-load-library").on("click",function(e){e.preventDefault();var a=$(this);a.next().css({display:"inline-block","margin-top":"14px","margin-left":"-5px"});var r={action:"envira_gallery_load_library",offset:parseInt(a.attr("data-envira-gallery-offset")),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.load_gallery};$.post(envira_gallery_metabox.ajax,r,function(e){a.attr("data-envira-gallery-offset",parseInt(a.attr("data-envira-gallery-offset"))+20),e&&e.html&&a.hasClass("has-search")?($(".envira-gallery-gallery").html(e.html),a.removeClass("has-search")):$(".envira-gallery-gallery").append(e.html),a.next().hide()},"json")}),$(document).on("keyup keydown","#envira-gallery-gallery-search",function(){var e=$(this);e.prev().css({display:"inline-block","margin-top":"1px","vertical-align":"middle","margin-right":"4px"});var a=$(this).val(),r={action:"envira_gallery_library_search",nonce:envira_gallery_metabox.library_search,post_id:envira_gallery_metabox.id,search:a};g(function(){$.post(envira_gallery_metabox.ajax,r,function(a){$(".envira-load-library").addClass("has-search").attr("data-envira-offset",parseInt(0)),a&&$(".envira-gallery-gallery").html(a.html),e.prev().hide()},"json")},"500")}),$(document).on("click",".envira-gallery-media-insert",function(e){e.preventDefault();var a=$(this),r=$(this).text(),i={action:"envira_gallery_insert_images",nonce:envira_gallery_metabox.insert_nonce,post_id:envira_gallery_metabox.id,images:{}},n=!1,l=e;a.text(envira_gallery_metabox.inserting),$(".envira-gallery-media-frame").find(".attachment.selected:not(.envira-gallery-in-gallery)").each(function(e,a){i.images[e]=$(a).attr("data-attachment-id"),n=!0}),$.post(envira_gallery_metabox.ajax,i,function(e){setTimeout(function(){f(l),a.text(r),n&&$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")},500)},"json")});var c=$("#envira-gallery-output");c.sortable({containment:"#envira-gallery-output",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(e,a){var r={url:envira_gallery_metabox.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_gallery_sort_images",order:c.sortable("toArray").toString(),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.sort},success:function(e){},error:function(e,a,r){}};$.ajax(r)}}),$("#envira-gallery").on("click",".envira-gallery-remove-image",function(e){e.preventDefault();var a=confirm(envira_gallery_metabox.remove);if(a){var r=$(this).parent().attr("id"),i={action:"envira_gallery_remove_image",attachment_id:r,post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.remove_nonce};$.post(envira_gallery_metabox.ajax,i,function(e){$("#"+r).fadeOut("normal",function(){$(this).remove(),$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")})},"json")}}),$("#envira-gallery").on("click",".envira-gallery-modify-image",function(e){e.preventDefault();var a=$(this).parent().data("envira-gallery-image"),r="envira-gallery-meta-"+a;v(a,r)});var p,v=function(e,a){p=$("#"+a).appendTo("body"),$(p).show(),$(document).on("click",".media-modal-close, .media-modal-backdrop",function(e){e.preventDefault(),u()}),$(document).on("keydown",function(e){27==e.keyCode&&u()})},u=function(){var e=$(p).attr("id"),a=e.split("-"),r=a[a.length-1];$("#"+e).appendTo("#"+r).hide()};$(document).on("click",".envira-gallery-meta-submit",function(e){e.preventDefault();var a=$(this),r=a.text(),i=a.data("envira-gallery-item"),n="envira-gallery-meta-"+i,l={};a.text(envira_gallery_metabox.saving),l.title=$("#envira-gallery-meta-table-"+i).find('textarea[name="_envira_gallery[meta_title]"]').val(),$("#envira-gallery-meta-table-"+i).find(":input").not(".ed_button").each(function(e,a){$(this).data("envira-meta")&&(l[$(this).data("envira-meta")]=$(this).val())});var t={action:"envira_gallery_save_meta",nonce:envira_gallery_metabox.save_nonce,attach_id:i,post_id:envira_gallery_metabox.id,meta:l};$.post(envira_gallery_metabox.ajax,t,function(e){setTimeout(function(){$("#"+n).appendTo("#"+i).hide(),a.text(r)},500)},"json")}),$("#envira-gallery-import-submit").on("click",function(e){$(this).next().css("display","inline-block"),0===$("#envira-config-import-gallery").val().length&&(e.preventDefault(),$(this).next().hide(),alert(envira_gallery_metabox["import"]))});var g=function(){var e=0;return function(a,r){clearTimeout(e),e=setTimeout(a,r)}}(),m=!1,f=function(a){a.preventDefault(),$("#envira-gallery-upload-ui").appendTo("#envira-gallery-upload-ui-wrapper").hide(),e(),m=!1};$(document).on("click","#envira-gallery-upload-ui .media-modal-close, #envira-gallery-upload-ui .media-modal-backdrop",f),$(document).on("keydown",function(e){27==e.keyCode&&m&&f(e)})})}(jQuery);
assets/scss/.sass-cache/9f73c5ea7e9af27ecf0a2c0b5c8c2f634d4a9f0d/envira.scssc ADDED
Binary file
assets/scss/envira.scss ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ==========================================================================
2
+ Envira Gallery Styles
3
+ ========================================================================== */
4
+
5
+ /**
6
+ * Envira Gallery - Reset
7
+ */
8
+ .envira-gallery-wrap,
9
+ .envira-gallery-wrap *,
10
+ .envira-tags-filter-list,
11
+ .envira-tags-filter-list * {
12
+ background:none;
13
+ border:0 none;
14
+ border-radius:0;
15
+ -webkit-border-radius:0;
16
+ -moz-border-radius:0;
17
+ float:none;
18
+ font-size:100%;
19
+ height:auto;
20
+ letter-spacing:normal;
21
+ list-style:none;
22
+ outline:none;
23
+ position:static;
24
+ text-decoration:none;
25
+ text-indent:0;
26
+ text-shadow:none;
27
+ text-transform:none;
28
+ width:auto;
29
+ visibility:visible;
30
+ overflow:visible;
31
+ margin:0;
32
+ padding:0;
33
+ line-height:1;
34
+ box-sizing:border-box;
35
+ -webkit-box-sizing:border-box;
36
+ -moz-box-sizing:border-box;
37
+ -webkit-box-shadow:none;
38
+ -moz-box-shadow:none;
39
+ -ms-box-shadow:none;
40
+ -o-box-shadow:none;
41
+ box-shadow:none;
42
+ -webkit-appearance:none;
43
+ transition: none;
44
+ -webkit-transition: none;
45
+ -moz-transition: none;
46
+ -o-transition: none;
47
+ -ms-transition: none;
48
+ }
49
+
50
+ /**
51
+ * Main Wrapper
52
+ */
53
+ .envira-gallery-wrap {
54
+ width: 100%;
55
+ margin: 0 auto 20px auto;
56
+
57
+ /**
58
+ * Inner Wrapper
59
+ */
60
+ .envira-gallery-public {
61
+ width: 100%;
62
+ margin: 0 auto 20px auto;
63
+ -webkit-box-sizing: border-box;
64
+ -moz-box-sizing: border-box;
65
+ box-sizing: border-box;
66
+
67
+ /**
68
+ * Clearing
69
+ */
70
+ &.envira-clear {
71
+ clear: both;
72
+
73
+ &:after {
74
+ clear: both;
75
+ content: '.';
76
+ display: block;
77
+ height: 0;
78
+ line-height: 0;
79
+ overflow: auto;
80
+ visibility: hidden;
81
+ zoom: 1;
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Gallery Item
87
+ */
88
+ .envira-gallery-item {
89
+ float: left;
90
+
91
+ /**
92
+ * Link
93
+ */
94
+ > .envira-gallery-link {
95
+ display: block;
96
+ outline: none;
97
+ border: 0 none;
98
+ position: relative;
99
+ }
100
+
101
+ /**
102
+ * Image
103
+ */
104
+ img {
105
+ display: block;
106
+ margin: 0 auto;
107
+ max-width: 100%;
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ /**
114
+ * RTL Support
115
+ */
116
+ .envira-gallery-wrap.envira-gallery-rtl {
117
+ /**
118
+ * Inner Wrapper
119
+ */
120
+ .envira-gallery-public {
121
+ /**
122
+ * Gallery Item
123
+ */
124
+ .envira-gallery-item {
125
+ float: right;
126
+ }
127
+ }
128
+ }
129
+
130
+ /* ==========================================================================
131
+ Envira Lightbox Gallery Styles
132
+ ========================================================================== */
133
+
134
+ /*! envirabox v2.1.5 fancyapps.com | fancyapps.com/envirabox/#license */
135
+ .envirabox-wrap,
136
+ .envirabox-skin,
137
+ .envirabox-outer,
138
+ .envirabox-inner,
139
+ .envirabox-image,
140
+ .envirabox-wrap iframe,
141
+ .envirabox-wrap object,
142
+ .envirabox-nav,
143
+ .envirabox-nav span,
144
+ .envirabox-tmp,
145
+ .envirabox-buttons,
146
+ .envirabox-thumbs,
147
+ .envirabox-wrap *,
148
+ .envirabox-thumbs *,
149
+ .envirabox-buttons *
150
+ {
151
+ background:none;
152
+ border:0 none;
153
+ border-radius:0;
154
+ -webkit-border-radius:0;
155
+ -moz-border-radius:0;
156
+ float:none;
157
+ font-size:100%;
158
+ height:auto;
159
+ letter-spacing:normal;
160
+ list-style:none;
161
+ outline:none;
162
+ position:static;
163
+ text-decoration:none;
164
+ text-indent:0;
165
+ text-shadow:none;
166
+ text-transform:none;
167
+ width:auto;
168
+ visibility:visible;
169
+ overflow:visible;
170
+ margin:0;
171
+ padding:0;
172
+ line-height:1;
173
+ box-sizing:border-box;
174
+ -webkit-box-sizing:border-box;
175
+ -moz-box-sizing:border-box;
176
+ -webkit-box-shadow:none;
177
+ -moz-box-shadow:none;
178
+ -ms-box-shadow:none;
179
+ -o-box-shadow:none;
180
+ box-shadow:none;
181
+ -webkit-appearance:none;
182
+ transition: none;
183
+ -webkit-transition: none;
184
+ -moz-transition: none;
185
+ -o-transition: none;
186
+ -ms-transition: none;
187
+ }
188
+
189
+ .envirabox-wrap {
190
+ position: absolute;
191
+ top: 0;
192
+ left: 0;
193
+ z-index: 988020;
194
+ }
195
+
196
+ .envirabox-skin {
197
+ position: relative;
198
+ background: #f9f9f9;
199
+ color: #444;
200
+ text-shadow: none;
201
+ -webkit-border-radius: 4px;
202
+ -moz-border-radius: 4px;
203
+ border-radius: 4px;
204
+ }
205
+
206
+ .envirabox-opened {
207
+ z-index: 988030;
208
+ }
209
+
210
+ .envirabox-opened .envirabox-skin {
211
+ -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
212
+ -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
213
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
214
+ }
215
+
216
+ .envirabox-outer, .envirabox-inner {
217
+ position: relative;
218
+ }
219
+
220
+ .envirabox-inner {
221
+ overflow: hidden;
222
+ }
223
+
224
+ .envirabox-type-iframe .envirabox-inner {
225
+ -webkit-overflow-scrolling: touch;
226
+ }
227
+
228
+ .envirabox-error {
229
+ color: #444;
230
+ font: 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
231
+ margin: 0;
232
+ padding: 15px;
233
+ white-space: nowrap;
234
+ }
235
+
236
+ .envirabox-image, .envirabox-iframe {
237
+ display: block;
238
+ width: 100%;
239
+ height: 100%;
240
+ }
241
+
242
+ .envirabox-image {
243
+ max-width: 100%;
244
+ max-height: 100%;
245
+ }
246
+
247
+ #envirabox-loading, .envirabox-close, .envirabox-prev span, .envirabox-next span {
248
+ background-image: url('images/envirabox_sprite.png');
249
+ }
250
+
251
+ #envirabox-loading {
252
+ position: fixed;
253
+ top: 50%;
254
+ left: 50%;
255
+ margin-top: -22px;
256
+ margin-left: -22px;
257
+ background-position: 0 -108px;
258
+ opacity: 0.8;
259
+ cursor: pointer;
260
+ z-index: 988060;
261
+ }
262
+
263
+ #envirabox-loading div {
264
+ width: 44px;
265
+ height: 44px;
266
+ background: url('images/envirabox_loading.gif') center center no-repeat;
267
+ }
268
+
269
+ .envirabox-close {
270
+ position: absolute;
271
+ top: -18px;
272
+ right: -18px;
273
+ width: 36px;
274
+ height: 36px;
275
+ cursor: pointer;
276
+ z-index: 988040;
277
+ }
278
+
279
+ .envirabox-nav {
280
+ position: absolute;
281
+ top: 0;
282
+ width: 40%;
283
+ height: 100%;
284
+ cursor: pointer;
285
+ text-decoration: none;
286
+ background: transparent url('images/blank.gif'); /* helps IE */
287
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
288
+ z-index: 988040;
289
+ }
290
+
291
+ .envirabox-prev {
292
+ left: 0;
293
+ }
294
+
295
+ .envirabox-next {
296
+ right: 0;
297
+ }
298
+
299
+ .envirabox-nav span {
300
+ position: absolute;
301
+ top: 50%;
302
+ width: 36px;
303
+ height: 34px;
304
+ margin-top: -18px;
305
+ cursor: pointer;
306
+ z-index: 988040;
307
+ visibility: hidden;
308
+ }
309
+
310
+ .envirabox-prev span {
311
+ left: 10px;
312
+ background-position: 0 -36px;
313
+ }
314
+
315
+ .envirabox-next span {
316
+ right: 10px;
317
+ background-position: 0 -72px;
318
+ }
319
+
320
+ .envirabox-nav:hover span {
321
+ visibility: visible;
322
+ }
323
+
324
+ .envirabox-tmp {
325
+ position: absolute;
326
+ top: -99999px;
327
+ left: -99999px;
328
+ max-width: 99999px;
329
+ max-height: 99999px;
330
+ overflow: visible !important;
331
+ }
332
+
333
+ a.envirabox-close,
334
+ a.envirabox-nav,
335
+ a.fancy-close:hover,
336
+ a.envirabox-nav:hover {
337
+ border: 0;
338
+ }
339
+
340
+ /* Overlay helper */
341
+
342
+ .envirabox-lock {
343
+ overflow: visible !important;
344
+ width: auto;
345
+ }
346
+
347
+ .envirabox-lock body {
348
+ overflow: hidden !important;
349
+ }
350
+
351
+ .envirabox-lock-test {
352
+ overflow-y: hidden !important;
353
+ }
354
+
355
+ .envirabox-overlay {
356
+ position: absolute;
357
+ top: 0;
358
+ left: 0;
359
+ overflow: hidden;
360
+ display: none;
361
+ z-index: 988010;
362
+ background: url('images/envirabox_overlay.png');
363
+ }
364
+
365
+ .envirabox-overlay-fixed {
366
+ position: fixed;
367
+ bottom: 0;
368
+ right: 0;
369
+ }
370
+
371
+ .envirabox-lock .envirabox-overlay {
372
+ overflow: auto;
373
+ overflow-y: scroll;
374
+ }
375
+
376
+ /* Title helper */
377
+
378
+ .envirabox-title {
379
+ visibility: hidden;
380
+ font-size: 13px;
381
+ line-height: 20px;
382
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
383
+ position: relative;
384
+ text-shadow: none;
385
+ z-index: 988090;
386
+ }
387
+
388
+ .envirabox-opened .envirabox-title {
389
+ visibility: visible;
390
+ }
391
+
392
+ .envirabox-title-float-wrap {
393
+ position: absolute;
394
+ bottom: auto;
395
+ right: 50%;
396
+ margin-top: 20px;
397
+ z-index: 988050;
398
+ text-align: center;
399
+ }
400
+
401
+ .envirabox-title-float-wrap .child {
402
+ display: inline-block;
403
+ margin-right: -100%;
404
+ padding: 2px 20px;
405
+ background: transparent; /* Fallback for web browsers that doesn't support RGBa */
406
+ background: rgba(0, 0, 0, 0.8);
407
+ -webkit-border-radius: 15px;
408
+ -moz-border-radius: 15px;
409
+ border-radius: 15px;
410
+ text-shadow: 0 1px 2px #222;
411
+ color: #FFF;
412
+ line-height: 24px;
413
+ white-space: nowrap;
414
+ }
415
+
416
+ .envirabox-title-outside-wrap {
417
+ position: relative;
418
+ margin-top: 10px;
419
+ color: #fff;
420
+ }
421
+
422
+ .envirabox-title-inside-wrap {
423
+ padding-top: 10px;
424
+ }
425
+
426
+ .envirabox-title-over-wrap {
427
+ position: absolute;
428
+ bottom: 0;
429
+ left: 0;
430
+ color: #fff;
431
+ padding: 10px;
432
+ background: #000;
433
+ background: rgba(0, 0, 0, .8);
434
+ }
435
+
436
+ #envirabox-buttons {
437
+ position: fixed;
438
+ left: 0;
439
+ width: 100%;
440
+ z-index: 988050;
441
+ }
442
+
443
+ #envirabox-buttons.top {
444
+ top: 10px;
445
+ }
446
+
447
+ #envirabox-buttons.bottom {
448
+ bottom: 10px;
449
+ }
450
+
451
+ /* Allows for thumbnails to be displayed */
452
+ #envirabox-buttons.bottom.has-padding {
453
+ bottom: 80px;
454
+ }
455
+ #envirabox-buttons.top.has-padding {
456
+ top: 80px;
457
+ }
458
+
459
+ #envirabox-buttons ul {
460
+ display: block;
461
+ width: auto;
462
+ height: 30px;
463
+ margin: 0 auto;
464
+ padding: 0;
465
+ list-style: none;
466
+ border: 1px solid #111;
467
+ border-radius: 3px;
468
+ -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
469
+ -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
470
+ box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
471
+ background: rgb(50,50,50);
472
+ background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
473
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
474
+ background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
475
+ background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
476
+ background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
477
+ background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
478
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
479
+ }
480
+
481
+ #envirabox-buttons ul li {
482
+ float: left;
483
+ margin: 0;
484
+ padding: 0;
485
+ }
486
+
487
+ #envirabox-buttons ul li#envirabox-buttons-title span {
488
+ display: inline-block;
489
+ padding: 0 10px;
490
+ color: #fff;
491
+ }
492
+
493
+ #envirabox-buttons a {
494
+ display: block;
495
+ width: 30px;
496
+ height: 30px;
497
+ text-indent: -9999px;
498
+ background-color: transparent;
499
+ background-image: url('images/envirabox_buttons.png');
500
+ background-repeat: no-repeat;
501
+ outline: none;
502
+ opacity: 0.8;
503
+ }
504
+
505
+ #envirabox-buttons a:hover {
506
+ opacity: 1;
507
+ }
508
+
509
+ #envirabox-buttons a.btnPrev {
510
+ background-position: 5px 0;
511
+ }
512
+
513
+ #envirabox-buttons a.btnNext {
514
+ background-position: -33px 0;
515
+ border-right: 1px solid #3e3e3e;
516
+ }
517
+
518
+ #envirabox-buttons a.btnPlay {
519
+ background-position: 0 -30px;
520
+ }
521
+
522
+ #envirabox-buttons a.btnPlayOn {
523
+ background-position: -30px -30px;
524
+ }
525
+
526
+ #envirabox-buttons a.btnToggle,
527
+ #envirabox-buttons a.btnFullscreen {
528
+ background-position: 3px -60px;
529
+ border-left: 1px solid #111;
530
+ border-right: 1px solid #3e3e3e;
531
+ width: 35px
532
+ }
533
+
534
+ #envirabox-buttons a.btnToggleOn,
535
+ #envirabox-buttons a.btnFullscreenOn {
536
+ background-position: -27px -60px;
537
+ }
538
+
539
+ #envirabox-buttons a.btnClose {
540
+ border-left: 1px solid #111;
541
+ width: 35px;
542
+ background-position: -56px 0px;
543
+ }
544
+
545
+ #envirabox-buttons a.btnDisabled {
546
+ opacity : 0.4;
547
+ cursor: default;
548
+ }
549
+
550
+ #envirabox-thumbs {
551
+ position: fixed;
552
+ left: 0;
553
+ width: 100%;
554
+ overflow: hidden;
555
+ z-index: 988050;
556
+ }
557
+
558
+ #envirabox-thumbs.bottom {
559
+ bottom: 2px;
560
+ }
561
+
562
+ #envirabox-thumbs.top {
563
+ top: 2px;
564
+ }
565
+
566
+ #envirabox-thumbs ul {
567
+ position: relative;
568
+ list-style: none;
569
+ margin: 0;
570
+ padding: 0;
571
+ }
572
+
573
+ #envirabox-thumbs ul li {
574
+ border: 3px solid #fff;
575
+ float: left;
576
+ margin: 5px;
577
+ opacity: 1;
578
+ }
579
+
580
+ #envirabox-thumbs ul li.active {
581
+ opacity: 0.75;
582
+ border: 3px solid #888;
583
+ }
584
+
585
+ #envirabox-thumbs ul li:hover {
586
+ opacity: 0.75;
587
+ }
588
+
589
+ #envirabox-thumbs ul li a {
590
+ display: block;
591
+ position: relative;
592
+ overflow: hidden;
593
+ border: 1px solid #222;
594
+ background: #111;
595
+ outline: none;
596
+ }
597
+
598
+ #envirabox-thumbs ul li img {
599
+ display: block;
600
+ position: relative;
601
+ border: 0;
602
+ padding: 0;
603
+ max-width: none;
604
+ }
605
+
606
+ /* Retina stuff */
607
+ @media
608
+ only screen and (-webkit-min-device-pixel-ratio: 2),
609
+ only screen and ( min--moz-device-pixel-ratio: 2),
610
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
611
+ only screen and ( min-device-pixel-ratio: 2),
612
+ only screen and ( min-resolution: 192dpi),
613
+ only screen and ( min-resolution: 2dppx) {
614
+
615
+ #envirabox-loading, .envirabox-close, .envirabox-prev span, .envirabox-next span {
616
+ background-image: url('images/envirabox_sprite@2x.png');
617
+ background-size: 44px 152px;
618
+ }
619
+
620
+ #envirabox-loading div {
621
+ background-image: url('images/envirabox_loading@2x.gif');
622
+ background-size: 24px 24px;
623
+ }
624
+
625
+ }
config.codekit ADDED
@@ -0,0 +1,1251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
+ "creatorBuild": "18493",
4
+ "files": {
5
+ "\/assets\/css\/images\/delete.png": {
6
+ "fileType": 32768,
7
+ "ignore": 0,
8
+ "ignoreWasSetByUser": 0,
9
+ "initialSize": 1222,
10
+ "inputAbbreviatedPath": "\/assets\/css\/images\/delete.png",
11
+ "outputAbbreviatedPath": "\/assets\/css\/images\/delete.png",
12
+ "outputPathIsOutsideProject": 0,
13
+ "outputPathIsSetByUser": 0,
14
+ "processed": 0
15
+ },
16
+ "\/assets\/css\/images\/delete@2x.png": {
17
+ "fileType": 32768,
18
+ "ignore": 0,
19
+ "ignoreWasSetByUser": 0,
20
+ "initialSize": 1618,
21
+ "inputAbbreviatedPath": "\/assets\/css\/images\/delete@2x.png",
22
+ "outputAbbreviatedPath": "\/assets\/css\/images\/delete@2x.png",
23
+ "outputPathIsOutsideProject": 0,
24
+ "outputPathIsSetByUser": 0,
25
+ "processed": 0
26
+ },
27
+ "\/assets\/css\/images\/envirabox_buttons.png": {
28
+ "fileType": 32768,
29
+ "ignore": 0,
30
+ "ignoreWasSetByUser": 0,
31
+ "initialSize": 1080,
32
+ "inputAbbreviatedPath": "\/assets\/css\/images\/envirabox_buttons.png",
33
+ "outputAbbreviatedPath": "\/assets\/css\/images\/envirabox_buttons.png",
34
+ "outputPathIsOutsideProject": 0,
35
+ "outputPathIsSetByUser": 0,
36
+ "processed": 0
37
+ },
38
+ "\/assets\/css\/images\/envirabox_overlay.png": {
39
+ "fileType": 32768,
40
+ "ignore": 0,
41
+ "ignoreWasSetByUser": 0,
42
+ "initialSize": 1003,
43
+ "inputAbbreviatedPath": "\/assets\/css\/images\/envirabox_overlay.png",
44
+ "outputAbbreviatedPath": "\/assets\/css\/images\/envirabox_overlay.png",
45
+ "outputPathIsOutsideProject": 0,
46
+ "outputPathIsSetByUser": 0,
47
+ "processed": 0
48
+ },
49
+ "\/assets\/css\/images\/envirabox_sprite.png": {
50
+ "fileType": 32768,
51
+ "ignore": 0,
52
+ "ignoreWasSetByUser": 0,
53
+ "initialSize": 1362,
54
+ "inputAbbreviatedPath": "\/assets\/css\/images\/envirabox_sprite.png",
55
+ "outputAbbreviatedPath": "\/assets\/css\/images\/envirabox_sprite.png",
56
+ "outputPathIsOutsideProject": 0,
57
+ "outputPathIsSetByUser": 0,
58
+ "processed": 0
59
+ },
60
+ "\/assets\/css\/images\/envirabox_sprite@2x.png": {
61
+ "fileType": 32768,
62
+ "ignore": 0,
63
+ "ignoreWasSetByUser": 0,
64
+ "initialSize": 6553,
65
+ "inputAbbreviatedPath": "\/assets\/css\/images\/envirabox_sprite@2x.png",
66
+ "outputAbbreviatedPath": "\/assets\/css\/images\/envirabox_sprite@2x.png",
67
+ "outputPathIsOutsideProject": 0,
68
+ "outputPathIsSetByUser": 0,
69
+ "processed": 0
70
+ },
71
+ "\/assets\/css\/images\/menu-icon.png": {
72
+ "fileType": 32768,
73
+ "ignore": 0,
74
+ "ignoreWasSetByUser": 0,
75
+ "initialSize": 1158,
76
+ "inputAbbreviatedPath": "\/assets\/css\/images\/menu-icon.png",
77
+ "outputAbbreviatedPath": "\/assets\/css\/images\/menu-icon.png",
78
+ "outputPathIsOutsideProject": 0,
79
+ "outputPathIsSetByUser": 0,
80
+ "processed": 0
81
+ },
82
+ "\/assets\/css\/images\/menu-icon@2x.png": {
83
+ "fileType": 32768,
84
+ "ignore": 0,
85
+ "ignoreWasSetByUser": 0,
86
+ "initialSize": 1427,
87
+ "inputAbbreviatedPath": "\/assets\/css\/images\/menu-icon@2x.png",
88
+ "outputAbbreviatedPath": "\/assets\/css\/images\/menu-icon@2x.png",
89
+ "outputPathIsOutsideProject": 0,
90
+ "outputPathIsSetByUser": 0,
91
+ "processed": 0
92
+ },
93
+ "\/assets\/css\/images\/meta-active.png": {
94
+ "fileType": 32768,
95
+ "ignore": 0,
96
+ "ignoreWasSetByUser": 0,
97
+ "initialSize": 1219,
98
+ "inputAbbreviatedPath": "\/assets\/css\/images\/meta-active.png",
99
+ "outputAbbreviatedPath": "\/assets\/css\/images\/meta-active.png",
100
+ "outputPathIsOutsideProject": 0,
101
+ "outputPathIsSetByUser": 0,
102
+ "processed": 0
103
+ },
104
+ "\/assets\/css\/images\/meta-active@2x.png": {
105
+ "fileType": 32768,
106
+ "ignore": 0,
107
+ "ignoreWasSetByUser": 0,
108
+ "initialSize": 1521,
109
+ "inputAbbreviatedPath": "\/assets\/css\/images\/meta-active@2x.png",
110
+ "outputAbbreviatedPath": "\/assets\/css\/images\/meta-active@2x.png",
111
+ "outputPathIsOutsideProject": 0,
112
+ "outputPathIsSetByUser": 0,
113
+ "processed": 0
114
+ },
115
+ "\/assets\/css\/images\/meta.png": {
116
+ "fileType": 32768,
117
+ "ignore": 0,
118
+ "ignoreWasSetByUser": 0,
119
+ "initialSize": 1256,
120
+ "inputAbbreviatedPath": "\/assets\/css\/images\/meta.png",
121
+ "outputAbbreviatedPath": "\/assets\/css\/images\/meta.png",
122
+ "outputPathIsOutsideProject": 0,
123
+ "outputPathIsSetByUser": 0,
124
+ "processed": 0
125
+ },
126
+ "\/assets\/css\/images\/meta@2x.png": {
127
+ "fileType": 32768,
128
+ "ignore": 0,
129
+ "ignoreWasSetByUser": 0,
130
+ "initialSize": 1608,
131
+ "inputAbbreviatedPath": "\/assets\/css\/images\/meta@2x.png",
132
+ "outputAbbreviatedPath": "\/assets\/css\/images\/meta@2x.png",
133
+ "outputPathIsOutsideProject": 0,
134
+ "outputPathIsSetByUser": 0,
135
+ "processed": 0
136
+ },
137
+ "\/assets\/css\/images\/modify.png": {
138
+ "fileType": 32768,
139
+ "ignore": 0,
140
+ "ignoreWasSetByUser": 0,
141
+ "initialSize": 1263,
142
+ "inputAbbreviatedPath": "\/assets\/css\/images\/modify.png",
143
+ "outputAbbreviatedPath": "\/assets\/css\/images\/modify.png",
144
+ "outputPathIsOutsideProject": 0,
145
+ "outputPathIsSetByUser": 0,
146
+ "processed": 0
147
+ },
148
+ "\/assets\/css\/images\/modify@2x.png": {
149
+ "fileType": 32768,
150
+ "ignore": 0,
151
+ "ignoreWasSetByUser": 0,
152
+ "initialSize": 1566,
153
+ "inputAbbreviatedPath": "\/assets\/css\/images\/modify@2x.png",
154
+ "outputAbbreviatedPath": "\/assets\/css\/images\/modify@2x.png",
155
+ "outputPathIsOutsideProject": 0,
156
+ "outputPathIsSetByUser": 0,
157
+ "processed": 0
158
+ },
159
+ "\/assets\/css\/images\/social.png": {
160
+ "fileType": 32768,
161
+ "ignore": 0,
162
+ "ignoreWasSetByUser": 0,
163
+ "initialSize": 3810,
164
+ "inputAbbreviatedPath": "\/assets\/css\/images\/social.png",
165
+ "outputAbbreviatedPath": "\/assets\/css\/images\/social.png",
166
+ "outputPathIsOutsideProject": 0,
167
+ "outputPathIsSetByUser": 0,
168
+ "processed": 0
169
+ },
170
+ "\/assets\/css\/images\/social@2x.png": {
171
+ "fileType": 32768,
172
+ "ignore": 0,
173
+ "ignoreWasSetByUser": 0,
174
+ "initialSize": 7474,
175
+ "inputAbbreviatedPath": "\/assets\/css\/images\/social@2x.png",
176
+ "outputAbbreviatedPath": "\/assets\/css\/images\/social@2x.png",
177
+ "outputPathIsOutsideProject": 0,
178
+ "outputPathIsSetByUser": 0,
179
+ "processed": 0
180
+ },
181
+ "\/assets\/css\/metabox.css": {
182
+ "fileType": 16,
183
+ "ignore": 0,
184
+ "ignoreWasSetByUser": 0,
185
+ "inputAbbreviatedPath": "\/assets\/css\/metabox.css",
186
+ "outputAbbreviatedPath": "No Output Path",
187
+ "outputPathIsOutsideProject": 0,
188
+ "outputPathIsSetByUser": 0
189
+ },
190
+ "\/assets\/js\/editor.js": {
191
+ "fileType": 64,
192
+ "ignore": 0,
193
+ "ignoreWasSetByUser": 0,
194
+ "inputAbbreviatedPath": "\/assets\/js\/editor.js",
195
+ "outputAbbreviatedPath": "\/assets\/js\/min\/editor-min.js",
196
+ "outputPathIsOutsideProject": 0,
197
+ "outputPathIsSetByUser": 0,
198
+ "outputStyle": 1,
199
+ "syntaxCheckerStyle": 1
200
+ },
201
+ "\/assets\/js\/envira.js": {
202
+ "fileType": 64,
203
+ "ignore": 0,
204
+ "ignoreWasSetByUser": 0,
205
+ "inputAbbreviatedPath": "\/assets\/js\/envira.js",
206
+ "outputAbbreviatedPath": "\/assets\/js\/min\/envira-min.js",
207
+ "outputPathIsOutsideProject": 0,
208
+ "outputPathIsSetByUser": 0,
209
+ "outputStyle": 1,
210
+ "syntaxCheckerStyle": 0
211
+ },
212
+ "\/assets\/js\/lib\/fancybox.js": {
213
+ "fileType": 64,
214
+ "ignore": 1,
215
+ "ignoreWasSetByUser": 0,
216
+ "inputAbbreviatedPath": "\/assets\/js\/lib\/fancybox.js",
217
+ "outputAbbreviatedPath": "\/assets\/js\/lib\/min\/fancybox-min.js",
218
+ "outputPathIsOutsideProject": 0,
219
+ "outputPathIsSetByUser": 0,
220
+ "outputStyle": 1,
221
+ "syntaxCheckerStyle": 1
222
+ },
223
+ "\/assets\/js\/lib\/isotope.js": {
224
+ "fileType": 64,
225
+ "ignore": 1,
226
+ "ignoreWasSetByUser": 0,
227
+ "inputAbbreviatedPath": "\/assets\/js\/lib\/isotope.js",
228
+ "outputAbbreviatedPath": "\/assets\/js\/lib\/min\/isotope-min.js",
229
+ "outputPathIsOutsideProject": 0,
230
+ "outputPathIsSetByUser": 0,
231
+ "outputStyle": 1,
232
+ "syntaxCheckerStyle": 1
233
+ },
234
+ "\/assets\/js\/lib\/mousewheel.js": {
235
+ "fileType": 64,
236
+ "ignore": 1,
237
+ "ignoreWasSetByUser": 0,
238
+ "inputAbbreviatedPath": "\/assets\/js\/lib\/mousewheel.js",
239
+ "outputAbbreviatedPath": "\/assets\/js\/lib\/min\/mousewheel-min.js",
240
+ "outputPathIsOutsideProject": 0,
241
+ "outputPathIsSetByUser": 0,
242
+ "outputStyle": 1,
243
+ "syntaxCheckerStyle": 1
244
+ },
245
+ "\/assets\/js\/metabox.js": {
246
+ "fileType": 64,
247
+ "ignore": 0,
248
+ "ignoreWasSetByUser": 0,
249
+ "inputAbbreviatedPath": "\/assets\/js\/metabox.js",
250
+ "outputAbbreviatedPath": "\/assets\/js\/min\/metabox-min.js",
251
+ "outputPathIsOutsideProject": 0,
252
+ "outputPathIsSetByUser": 0,
253
+ "outputStyle": 1,
254
+ "syntaxCheckerStyle": 0
255
+ },
256
+ "\/assets\/js\/min\/envira-min.js": {
257
+ "fileType": 64,
258
+ "ignore": 1,
259
+ "ignoreWasSetByUser": 0,
260
+ "inputAbbreviatedPath": "\/assets\/js\/min\/envira-min.js",
261
+ "outputAbbreviatedPath": "\/assets\/js\/min\/min\/envira-min-min.js",
262
+ "outputPathIsOutsideProject": 0,
263
+ "outputPathIsSetByUser": 0,
264
+ "outputStyle": 1,
265
+ "syntaxCheckerStyle": 1
266
+ },
267
+ "\/assets\/js\/min\/metabox-min.js": {
268
+ "fileType": 64,
269
+ "ignore": 1,
270
+ "ignoreWasSetByUser": 0,
271
+ "inputAbbreviatedPath": "\/assets\/js\/min\/metabox-min.js",
272
+ "outputAbbreviatedPath": "\/assets\/js\/min\/min\/metabox-min-min.js",
273
+ "outputPathIsOutsideProject": 0,
274
+ "outputPathIsSetByUser": 0,
275
+ "outputStyle": 1,
276
+ "syntaxCheckerStyle": 1
277
+ },
278
+ "\/assets\/scss\/envira.scss": {
279
+ "createSourceMap": 0,
280
+ "debugStyle": 0,
281
+ "decimalPrecision": 10,
282
+ "fileType": 4,
283
+ "ignore": 0,
284
+ "ignoreWasSetByUser": 0,
285
+ "inputAbbreviatedPath": "\/assets\/scss\/envira.scss",
286
+ "outputAbbreviatedPath": "\/assets\/css\/envira.css",
287
+ "outputPathIsOutsideProject": 0,
288
+ "outputPathIsSetByUser": 0,
289
+ "outputStyle": 3,
290
+ "shouldRunAutoprefixer": 0,
291
+ "shouldRunBless": 0,
292
+ "useLibsass": 0
293
+ },
294
+ "\/envira-gallery-lite.php": {
295
+ "fileType": 8192,
296
+ "ignore": 0,
297
+ "ignoreWasSetByUser": 0,
298
+ "inputAbbreviatedPath": "\/envira-gallery-lite.php",
299
+ "outputAbbreviatedPath": "No Output Path",
300
+ "outputPathIsOutsideProject": 0,
301
+ "outputPathIsSetByUser": 0
302
+ },
303
+ "\/includes\/admin\/ajax.php": {
304
+ "fileType": 8192,
305
+ "ignore": 0,
306
+ "ignoreWasSetByUser": 0,
307
+ "inputAbbreviatedPath": "\/includes\/admin\/ajax.php",
308
+ "outputAbbreviatedPath": "No Output Path",
309
+ "outputPathIsOutsideProject": 0,
310
+ "outputPathIsSetByUser": 0
311
+ },
312
+ "\/includes\/admin\/common.php": {
313
+ "fileType": 8192,
314
+ "ignore": 0,
315
+ "ignoreWasSetByUser": 0,
316
+ "inputAbbreviatedPath": "\/includes\/admin\/common.php",
317
+ "outputAbbreviatedPath": "No Output Path",
318
+ "outputPathIsOutsideProject": 0,
319
+ "outputPathIsSetByUser": 0
320
+ },
321
+ "\/includes\/admin\/editor.php": {
322
+ "fileType": 8192,
323
+ "ignore": 0,
324
+ "ignoreWasSetByUser": 0,
325
+ "inputAbbreviatedPath": "\/includes\/admin\/editor.php",
326
+ "outputAbbreviatedPath": "No Output Path",
327
+ "outputPathIsOutsideProject": 0,
328
+ "outputPathIsSetByUser": 0
329
+ },
330
+ "\/includes\/admin\/media.php": {
331
+ "fileType": 8192,
332
+ "ignore": 0,
333
+ "ignoreWasSetByUser": 0,
334
+ "inputAbbreviatedPath": "\/includes\/admin\/media.php",
335
+ "outputAbbreviatedPath": "No Output Path",
336
+ "outputPathIsOutsideProject": 0,
337
+ "outputPathIsSetByUser": 0
338
+ },
339
+ "\/includes\/admin\/metaboxes.php": {
340
+ "fileType": 8192,
341
+ "ignore": 0,
342
+ "ignoreWasSetByUser": 0,
343
+ "inputAbbreviatedPath": "\/includes\/admin\/metaboxes.php",
344
+ "outputAbbreviatedPath": "No Output Path",
345
+ "outputPathIsOutsideProject": 0,
346
+ "outputPathIsSetByUser": 0
347
+ },
348
+ "\/includes\/admin\/posttype.php": {
349
+ "fileType": 8192,
350
+ "ignore": 0,
351
+ "ignoreWasSetByUser": 0,
352
+ "inputAbbreviatedPath": "\/includes\/admin\/posttype.php",
353
+ "outputAbbreviatedPath": "No Output Path",
354
+ "outputPathIsOutsideProject": 0,
355
+ "outputPathIsSetByUser": 0
356
+ },
357
+ "\/includes\/admin\/utils.php": {
358
+ "fileType": 8192,
359
+ "ignore": 0,
360
+ "ignoreWasSetByUser": 0,
361
+ "inputAbbreviatedPath": "\/includes\/admin\/utils.php",
362
+ "outputAbbreviatedPath": "No Output Path",
363
+ "outputPathIsOutsideProject": 0,
364
+ "outputPathIsSetByUser": 0
365
+ },
366
+ "\/includes\/global\/common.php": {
367
+ "fileType": 8192,
368
+ "ignore": 0,
369
+ "ignoreWasSetByUser": 0,
370
+ "inputAbbreviatedPath": "\/includes\/global\/common.php",
371
+ "outputAbbreviatedPath": "No Output Path",
372
+ "outputPathIsOutsideProject": 0,
373
+ "outputPathIsSetByUser": 0
374
+ },
375
+ "\/includes\/global\/posttype.php": {
376
+ "fileType": 8192,
377
+ "ignore": 0,
378
+ "ignoreWasSetByUser": 0,
379
+ "inputAbbreviatedPath": "\/includes\/global\/posttype.php",
380
+ "outputAbbreviatedPath": "No Output Path",
381
+ "outputPathIsOutsideProject": 0,
382
+ "outputPathIsSetByUser": 0
383
+ },
384
+ "\/includes\/global\/shortcode.php": {
385
+ "fileType": 8192,
386
+ "ignore": 0,
387
+ "ignoreWasSetByUser": 0,
388
+ "inputAbbreviatedPath": "\/includes\/global\/shortcode.php",
389
+ "outputAbbreviatedPath": "No Output Path",
390
+ "outputPathIsOutsideProject": 0,
391
+ "outputPathIsSetByUser": 0
392
+ },
393
+ "\/README.md": {
394
+ "enableFootnoteSupport": 0,
395
+ "enableSmartyPants": 1,
396
+ "expandTabs": 1,
397
+ "fileType": 4096,
398
+ "ignore": 0,
399
+ "ignoreWasSetByUser": 0,
400
+ "inputAbbreviatedPath": "\/README.md",
401
+ "outputAbbreviatedPath": "\/README.html",
402
+ "outputPathIsOutsideProject": 0,
403
+ "outputPathIsSetByUser": 0
404
+ }
405
+ },
406
+ "hooks": [
407
+ ],
408
+ "lastSavedByUser": "Tim Carr",
409
+ "manualImportLinks": {
410
+ "\/assets\/js\/envira.js": [
411
+ {
412
+ "followForSyntaxChecking": 1,
413
+ "linkedFileAbbreviatedPath": "\/assets\/js\/lib\/isotope.js",
414
+ "position": 0,
415
+ "type": 0
416
+ },
417
+ {
418
+ "followForSyntaxChecking": 1,
419
+ "linkedFileAbbreviatedPath": "\/assets\/js\/lib\/fancybox.js",
420
+ "position": 1,
421
+ "type": 0
422
+ },
423
+ {
424
+ "followForSyntaxChecking": 1,
425
+ "linkedFileAbbreviatedPath": "\/assets\/js\/lib\/mousewheel.js",
426
+ "position": 2,
427
+ "type": 0
428
+ }
429
+ ]
430
+ },
431
+ "projectAttributes": {
432
+ "bowerAbbreviatedPath": "",
433
+ "displayValue": "Envira Gallery Lite",
434
+ "displayValueWasSetByUser": 1,
435
+ "iconImageName": "compass_blue"
436
+ },
437
+ "projectSettings": {
438
+ "alwaysUseExternalServer": 0,
439
+ "animateCSSInjections": 1,
440
+ "autoApplyPSLanguageSettingsStyle": 0,
441
+ "autoprefixerBrowserString": "> 1%, last 2 versions, Firefox ESR, Opera 12.1",
442
+ "autoSyncProjectSettingsFile": 1,
443
+ "browserRefreshDelay": 0,
444
+ "coffeeAutoOutputPathEnabled": 1,
445
+ "coffeeAutoOutputPathFilenamePattern": "*.js",
446
+ "coffeeAutoOutputPathRelativePath": "",
447
+ "coffeeAutoOutputPathReplace1": "",
448
+ "coffeeAutoOutputPathReplace2": "",
449
+ "coffeeAutoOutputPathStyle": 0,
450
+ "coffeeCreateSourceMap": 0,
451
+ "coffeeLintFlags2": {
452
+ "arrow_spacing": {
453
+ "active": 0,
454
+ "flagValue": -1
455
+ },
456
+ "camel_case_classes": {
457
+ "active": 1,
458
+ "flagValue": -1
459
+ },
460
+ "colon_assignment_spacing": {
461
+ "active": 0,
462
+ "flagValue": 1
463
+ },
464
+ "cyclomatic_complexity": {
465
+ "active": 0,
466
+ "flagValue": 10
467
+ },
468
+ "duplicate_key": {
469
+ "active": 1,
470
+ "flagValue": -1
471
+ },
472
+ "empty_constructor_needs_parens": {
473
+ "active": 0,
474
+ "flagValue": -1
475
+ },
476
+ "ensure_comprehensions": {
477
+ "active": 1,
478
+ "flagValue": -1
479
+ },
480
+ "indentation": {
481
+ "active": 1,
482
+ "flagValue": 2
483
+ },
484
+ "line_endings": {
485
+ "active": 0,
486
+ "flagValue": 0
487
+ },
488
+ "max_line_length": {
489
+ "active": 0,
490
+ "flagValue": 150
491
+ },
492
+ "missing_fat_arrows": {
493
+ "active": 0,
494
+ "flagValue": -1
495
+ },
496
+ "newlines_after_classes": {
497
+ "active": 0,
498
+ "flagValue": 3
499
+ },
500
+ "no_backticks": {
501
+ "active": 1,
502
+ "flagValue": -1
503
+ },
504
+ "no_debugger": {
505
+ "active": 1,
506
+ "flagValue": -1
507
+ },
508
+ "no_empty_functions": {
509
+ "active": 0,
510
+ "flagValue": -1
511
+ },
512
+ "no_empty_param_list": {
513
+ "active": 0,
514
+ "flagValue": -1
515
+ },
516
+ "no_implicit_braces": {
517
+ "active": 1,
518
+ "flagValue": -1
519
+ },
520
+ "no_implicit_parens": {
521
+ "active": 0,
522
+ "flagValue": -1
523
+ },
524
+ "no_interpolation_in_single_quotes": {
525
+ "active": 0,
526
+ "flagValue": -1
527
+ },
528
+ "no_plusplus": {
529
+ "active": 0,
530
+ "flagValue": -1
531
+ },
532
+ "no_stand_alone_at": {
533
+ "active": 1,
534
+ "flagValue": -1
535
+ },
536
+ "no_tabs": {
537
+ "active": 1,
538
+ "flagValue": -1
539
+ },
540
+ "no_throwing_strings": {
541
+ "active": 1,
542
+ "flagValue": -1
543
+ },
544
+ "no_trailing_semicolons": {
545
+ "active": 1,
546
+ "flagValue": -1
547
+ },
548
+ "no_trailing_whitespace": {
549
+ "active": 1,
550
+ "flagValue": -1
551
+ },
552
+ "no_unnecessary_double_quotes": {
553
+ "active": 0,
554
+ "flagValue": -1
555
+ },
556
+ "no_unnecessary_fat_arrows": {
557
+ "active": 1,
558
+ "flagValue": -1
559
+ },
560
+ "non_empty_constructor_needs_parens": {
561
+ "active": 0,
562
+ "flagValue": -1
563
+ },
564
+ "prefer_english_operator": {
565
+ "active": 0,
566
+ "flagValue": -1
567
+ },
568
+ "space_operators": {
569
+ "active": 0,
570
+ "flagValue": -1
571
+ },
572
+ "spacing_after_comma": {
573
+ "active": 1,
574
+ "flagValue": -1
575
+ }
576
+ },
577
+ "coffeeMinifyOutput": 1,
578
+ "coffeeOutputStyle": 0,
579
+ "coffeeSyntaxCheckerStyle": 1,
580
+ "externalServerAddress": "http:\/\/localhost:8888",
581
+ "externalServerPreviewPathAddition": "",
582
+ "genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp",
583
+ "hamlAutoOutputPathEnabled": 1,
584
+ "hamlAutoOutputPathFilenamePattern": "*.html",
585
+ "hamlAutoOutputPathRelativePath": "",
586
+ "hamlAutoOutputPathReplace1": "",
587
+ "hamlAutoOutputPathReplace2": "",
588
+ "hamlAutoOutputPathStyle": 0,
589
+ "hamlEscapeHTMLCharacters": 0,
590
+ "hamlNoEscapeInAttributes": 0,
591
+ "hamlOutputFormat": 2,
592
+ "hamlOutputStyle": 0,
593
+ "hamlUseCDATA": 0,
594
+ "hamlUseDoubleQuotes": 0,
595
+ "hamlUseUnixNewlines": 0,
596
+ "jadeAutoOutputPathEnabled": 1,
597
+ "jadeAutoOutputPathFilenamePattern": "*.html",
598
+ "jadeAutoOutputPathRelativePath": "",
599
+ "jadeAutoOutputPathReplace1": "",
600
+ "jadeAutoOutputPathReplace2": "",
601
+ "jadeAutoOutputPathStyle": 0,
602
+ "jadeCompileDebug": 1,
603
+ "jadeOutputStyle": 0,
604
+ "javascriptAutoOutputPathEnabled": 1,
605
+ "javascriptAutoOutputPathFilenamePattern": "*-min.js",
606
+ "javascriptAutoOutputPathRelativePath": "\/min",
607
+ "javascriptAutoOutputPathReplace1": "",
608
+ "javascriptAutoOutputPathReplace2": "",
609
+ "javascriptAutoOutputPathStyle": 2,
610
+ "javascriptCreateSourceMap": 1,
611
+ "javascriptOutputStyle": 1,
612
+ "javascriptSyntaxCheckerStyle": 1,
613
+ "jsCheckerReservedNamesString": "",
614
+ "jsHintFlags2": {
615
+ "asi": {
616
+ "active": 0,
617
+ "flagValue": -1
618
+ },
619
+ "bitwise": {
620
+ "active": 1,
621
+ "flagValue": -1
622
+ },
623
+ "boss": {
624
+ "active": 0,
625
+ "flagValue": -1
626
+ },
627
+ "browser": {
628
+ "active": 1,
629
+ "flagValue": -1
630
+ },
631
+ "browserify": {
632
+ "active": 0,
633
+ "flagValue": -1
634
+ },
635
+ "camelcase": {
636
+ "active": 0,
637
+ "flagValue": -1
638
+ },
639
+ "couch": {
640
+ "active": 0,
641
+ "flagValue": -1
642
+ },
643
+ "curly": {
644
+ "active": 1,
645
+ "flagValue": -1
646
+ },
647
+ "debug": {
648
+ "active": 0,
649
+ "flagValue": -1
650
+ },
651
+ "devel": {
652
+ "active": 0,
653
+ "flagValue": -1
654
+ },
655
+ "dojo": {
656
+ "active": 0,
657
+ "flagValue": -1
658
+ },
659
+ "elision": {
660
+ "active": 1,
661
+ "flagValue": -1
662
+ },
663
+ "eqeqeq": {
664
+ "active": 1,
665
+ "flagValue": -1
666
+ },
667
+ "eqnull": {
668
+ "active": 0,
669
+ "flagValue": -1
670
+ },
671
+ "es3": {
672
+ "active": 0,
673
+ "flagValue": -1
674
+ },
675
+ "esnext": {
676
+ "active": 0,
677
+ "flagValue": -1
678
+ },
679
+ "evil": {
680
+ "active": 0,
681
+ "flagValue": -1
682
+ },
683
+ "expr": {
684
+ "active": 0,
685
+ "flagValue": -1
686
+ },
687
+ "forin": {
688
+ "active": 0,
689
+ "flagValue": -1
690
+ },
691
+ "freeze": {
692
+ "active": 1,
693
+ "flagValue": -1
694
+ },
695
+ "funcscope": {
696
+ "active": 0,
697
+ "flagValue": -1
698
+ },
699
+ "globalstrict": {
700
+ "active": 0,
701
+ "flagValue": -1
702
+ },
703
+ "immed": {
704
+ "active": 0,
705
+ "flagValue": -1
706
+ },
707
+ "indent": {
708
+ "active": 0,
709
+ "flagValue": 4
710
+ },
711
+ "iterator": {
712
+ "active": 0,
713
+ "flagValue": -1
714
+ },
715
+ "jasmine": {
716
+ "active": 0,
717
+ "flagValue": -1
718
+ },
719
+ "jquery": {
720
+ "active": 1,
721
+ "flagValue": -1
722
+ },
723
+ "lastsemic": {
724
+ "active": 0,
725
+ "flagValue": -1
726
+ },
727
+ "latedef": {
728
+ "active": 1,
729
+ "flagValue": -1
730
+ },
731
+ "laxbreak": {
732
+ "active": 0,
733
+ "flagValue": -1
734
+ },
735
+ "laxcomma": {
736
+ "active": 0,
737
+ "flagValue": -1
738
+ },
739
+ "loopfunc": {
740
+ "active": 0,
741
+ "flagValue": -1
742
+ },
743
+ "maxcomplexity": {
744
+ "active": 0,
745
+ "flagValue": 10
746
+ },
747
+ "maxdepth": {
748
+ "active": 0,
749
+ "flagValue": 3
750
+ },
751
+ "maxlen": {
752
+ "active": 0,
753
+ "flagValue": 150
754
+ },
755
+ "maxparams": {
756
+ "active": 0,
757
+ "flagValue": 3
758
+ },
759
+ "maxstatements": {
760
+ "active": 0,
761
+ "flagValue": 4
762
+ },
763
+ "mocha": {
764
+ "active": 0,
765
+ "flagValue": -1
766
+ },
767
+ "mootools": {
768
+ "active": 0,
769
+ "flagValue": -1
770
+ },
771
+ "moz": {
772
+ "active": 0,
773
+ "flagValue": -1
774
+ },
775
+ "multistr": {
776
+ "active": 0,
777
+ "flagValue": -1
778
+ },
779
+ "newcap": {
780
+ "active": 1,
781
+ "flagValue": -1
782
+ },
783
+ "noarg": {
784
+ "active": 1,
785
+ "flagValue": -1
786
+ },
787
+ "node": {
788
+ "active": 0,
789
+ "flagValue": -1
790
+ },
791
+ "noempty": {
792
+ "active": 0,
793
+ "flagValue": -1
794
+ },
795
+ "nonbsp": {
796
+ "active": 0,
797
+ "flagValue": -1
798
+ },
799
+ "nonew": {
800
+ "active": 1,
801
+ "flagValue": -1
802
+ },
803
+ "nonstandard": {
804
+ "active": 0,
805
+ "flagValue": -1
806
+ },
807
+ "notypeof": {
808
+ "active": 1,
809
+ "flagValue": -1
810
+ },
811
+ "noyield": {
812
+ "active": 0,
813
+ "flagValue": -1
814
+ },
815
+ "onecase": {
816
+ "active": 0,
817
+ "flagValue": -1
818
+ },
819
+ "phantom": {
820
+ "active": 0,
821
+ "flagValue": -1
822
+ },
823
+ "plusplus": {
824
+ "active": 0,
825
+ "flagValue": -1
826
+ },
827
+ "proto": {
828
+ "active": 0,
829
+ "flagValue": -1
830
+ },
831
+ "prototypejs": {
832
+ "active": 0,
833
+ "flagValue": -1
834
+ },
835
+ "qunit": {
836
+ "active": 0,
837
+ "flagValue": -1
838
+ },
839
+ "regexp": {
840
+ "active": 1,
841
+ "flagValue": -1
842
+ },
843
+ "rhino": {
844
+ "active": 0,
845
+ "flagValue": -1
846
+ },
847
+ "scripturl": {
848
+ "active": 0,
849
+ "flagValue": -1
850
+ },
851
+ "shadow": {
852
+ "active": 0,
853
+ "flagValue": -1
854
+ },
855
+ "shelljs": {
856
+ "active": 0,
857
+ "flagValue": -1
858
+ },
859
+ "singleGroups": {
860
+ "active": 0,
861
+ "flagValue": -1
862
+ },
863
+ "strict": {
864
+ "active": 0,
865
+ "flagValue": -1
866
+ },
867
+ "sub": {
868
+ "active": 0,
869
+ "flagValue": -1
870
+ },
871
+ "supernew": {
872
+ "active": 0,
873
+ "flagValue": -1
874
+ },
875
+ "typed": {
876
+ "active": 0,
877
+ "flagValue": -1
878
+ },
879
+ "undef": {
880
+ "active": 1,
881
+ "flagValue": -1
882
+ },
883
+ "unused": {
884
+ "active": 1,
885
+ "flagValue": -1
886
+ },
887
+ "withstmt": {
888
+ "active": 0,
889
+ "flagValue": -1
890
+ },
891
+ "worker": {
892
+ "active": 0,
893
+ "flagValue": -1
894
+ },
895
+ "wsh": {
896
+ "active": 0,
897
+ "flagValue": -1
898
+ },
899
+ "yui": {
900
+ "active": 0,
901
+ "flagValue": -1
902
+ }
903
+ },
904
+ "jsLintFlags2": {
905
+ "ass": {
906
+ "active": 0,
907
+ "flagValue": -1
908
+ },
909
+ "bitwise": {
910
+ "active": 0,
911
+ "flagValue": -1
912
+ },
913
+ "browser": {
914
+ "active": 1,
915
+ "flagValue": -1
916
+ },
917
+ "closure": {
918
+ "active": 0,
919
+ "flagValue": -1
920
+ },
921
+ "continue": {
922
+ "active": 0,
923
+ "flagValue": -1
924
+ },
925
+ "debug": {
926
+ "active": 0,
927
+ "flagValue": -1
928
+ },
929
+ "devel": {
930
+ "active": 0,
931
+ "flagValue": -1
932
+ },
933
+ "eqeq": {
934
+ "active": 0,
935
+ "flagValue": -1
936
+ },
937
+ "evil": {
938
+ "active": 0,
939
+ "flagValue": -1
940
+ },
941
+ "forin": {
942
+ "active": 0,
943
+ "flagValue": -1
944
+ },
945
+ "indent": {
946
+ "active": 0,
947
+ "flagValue": 4
948
+ },
949
+ "maxlen": {
950
+ "active": 0,
951
+ "flagValue": 150
952
+ },
953
+ "newcap": {
954
+ "active": 0,
955
+ "flagValue": -1
956
+ },
957
+ "node": {
958
+ "active": 0,
959
+ "flagValue": -1
960
+ },
961
+ "nomen": {
962
+ "active": 0,
963
+ "flagValue": -1
964
+ },
965
+ "plusplus": {
966
+ "active": 0,
967
+ "flagValue": -1
968
+ },
969
+ "properties": {
970
+ "active": 0,
971
+ "flagValue": -1
972
+ },
973
+ "regexp": {
974
+ "active": 0,
975
+ "flagValue": -1
976
+ },
977
+ "rhino": {
978
+ "active": 0,
979
+ "flagValue": -1
980
+ },
981
+ "sloppy": {
982
+ "active": 0,
983
+ "flagValue": -1
984
+ },
985
+ "stupid": {
986
+ "active": 0,
987
+ "flagValue": -1
988
+ },
989
+ "sub": {
990
+ "active": 0,
991
+ "flagValue": -1
992
+ },
993
+ "todo": {
994
+ "active": 0,
995
+ "flagValue": -1
996
+ },
997
+ "unparam": {
998
+ "active": 0,
999
+ "flagValue": -1
1000
+ },
1001
+ "vars": {
1002
+ "active": 0,
1003
+ "flagValue": -1
1004
+ },
1005
+ "white": {
1006
+ "active": 0,
1007
+ "flagValue": -1
1008
+ }
1009
+ },
1010
+ "kitAutoOutputPathEnabled": 1,
1011
+ "kitAutoOutputPathFilenamePattern": "*.html",
1012
+ "kitAutoOutputPathRelativePath": "",
1013
+ "kitAutoOutputPathReplace1": "",
1014
+ "kitAutoOutputPathReplace2": "",
1015
+ "kitAutoOutputPathStyle": 0,
1016
+ "lessAllowInsecureImports": 0,
1017
+ "lessAutoOutputPathEnabled": 1,
1018
+ "lessAutoOutputPathFilenamePattern": "*.css",
1019
+ "lessAutoOutputPathRelativePath": "..\/css",
1020
+ "lessAutoOutputPathReplace1": "less",
1021
+ "lessAutoOutputPathReplace2": "css",
1022
+ "lessAutoOutputPathStyle": 2,
1023
+ "lessCreateSourceMap": 0,
1024
+ "lessDisableJavascript": 0,
1025
+ "lessIeCompatibility": 1,
1026
+ "lessOutputStyle": 0,
1027
+ "lessRelativeURLS": 0,
1028
+ "lessStrictImports": 0,
1029
+ "lessStrictMath": 0,
1030
+ "lessStrictUnits": 0,
1031
+ "markdownAutoOutputPathEnabled": 1,
1032
+ "markdownAutoOutputPathFilenamePattern": "*.html",
1033
+ "markdownAutoOutputPathRelativePath": "",
1034
+ "markdownAutoOutputPathReplace1": "",
1035
+ "markdownAutoOutputPathReplace2": "",
1036
+ "markdownAutoOutputPathStyle": 0,
1037
+ "markdownEnableFootnotes": 0,
1038
+ "markdownEnableSmartyPants": 1,
1039
+ "markdownExpandTabs": 1,
1040
+ "reloadFileURLs": 0,
1041
+ "sassAutoOutputPathEnabled": 1,
1042
+ "sassAutoOutputPathFilenamePattern": "*.css",
1043
+ "sassAutoOutputPathRelativePath": "..\/css",
1044
+ "sassAutoOutputPathReplace1": "sass",
1045
+ "sassAutoOutputPathReplace2": "css",
1046
+ "sassAutoOutputPathStyle": 2,
1047
+ "sassCreateSourceMap": 0,
1048
+ "sassDebugStyle": 0,
1049
+ "sassDecimalPrecision": 10,
1050
+ "sassOutputStyle": 0,
1051
+ "sassUseLibsass": 0,
1052
+ "shouldRunAutoprefixer": 0,
1053
+ "shouldRunBless": 0,
1054
+ "skippedItemsString": ".svn, .git, .hg, log, _logs, _cache, cache, logs, node_modules",
1055
+ "slimAutoOutputPathEnabled": 1,
1056
+ "slimAutoOutputPathFilenamePattern": "*.html",
1057
+ "slimAutoOutputPathRelativePath": "",
1058
+ "slimAutoOutputPathReplace1": "",
1059
+ "slimAutoOutputPathReplace2": "",
1060
+ "slimAutoOutputPathStyle": 0,
1061
+ "slimCompileOnly": 0,
1062
+ "slimLogicless": 0,
1063
+ "slimOutputFormat": 0,
1064
+ "slimOutputStyle": 1,
1065
+ "slimRailsCompatible": 0,
1066
+ "stylusAutoOutputPathEnabled": 1,
1067
+ "stylusAutoOutputPathFilenamePattern": "*.css",
1068
+ "stylusAutoOutputPathRelativePath": "..\/css",
1069
+ "stylusAutoOutputPathReplace1": "stylus",
1070
+ "stylusAutoOutputPathReplace2": "css",
1071
+ "stylusAutoOutputPathStyle": 2,
1072
+ "stylusCreateSourceMap": 0,
1073
+ "stylusDebugStyle": 0,
1074
+ "stylusImportCSS": 0,
1075
+ "stylusOutputStyle": 0,
1076
+ "stylusResolveRelativeURLS": 0,
1077
+ "typescriptAutoOutputPathEnabled": 1,
1078
+ "typescriptAutoOutputPathFilenamePattern": "*.js",
1079
+ "typescriptAutoOutputPathRelativePath": "\/js",
1080
+ "typescriptAutoOutputPathReplace1": "",
1081
+ "typescriptAutoOutputPathReplace2": "",
1082
+ "typescriptAutoOutputPathStyle": 2,
1083
+ "typescriptCreateDeclarationFile": 0,
1084
+ "typescriptCreateSourceMap": 0,
1085
+ "typescriptMinifyOutput": 0,
1086
+ "typescriptModuleType": 0,
1087
+ "typescriptNoImplicitAny": 0,
1088
+ "typescriptPreserveConstEnums": 0,
1089
+ "typescriptRemoveComments": 0,
1090
+ "typescriptSuppressImplicitAnyIndexErrors": 0,
1091
+ "typescriptTargetECMAVersion": 0,
1092
+ "uglifyDefinesString": "",
1093
+ "uglifyFlags2": {
1094
+ "ascii-only": {
1095
+ "active": 0,
1096
+ "flagValue": -1
1097
+ },
1098
+ "booleans": {
1099
+ "active": 1,
1100
+ "flagValue": -1
1101
+ },
1102
+ "bracketize": {
1103
+ "active": 0,
1104
+ "flagValue": -1
1105
+ },
1106
+ "cascade": {
1107
+ "active": 1,
1108
+ "flagValue": -1
1109
+ },
1110
+ "comments": {
1111
+ "active": 1,
1112
+ "flagValue": -1
1113
+ },
1114
+ "comparisons": {
1115
+ "active": 1,
1116
+ "flagValue": -1
1117
+ },
1118
+ "compress": {
1119
+ "active": 1,
1120
+ "flagValue": -1
1121
+ },
1122
+ "conditionals": {
1123
+ "active": 1,
1124
+ "flagValue": -1
1125
+ },
1126
+ "dead_code": {
1127
+ "active": 0,
1128
+ "flagValue": -1
1129
+ },
1130
+ "drop_console": {
1131
+ "active": 0,
1132
+ "flagValue": -1
1133
+ },
1134
+ "drop_debugger": {
1135
+ "active": 1,
1136
+ "flagValue": -1
1137
+ },
1138
+ "eval": {
1139
+ "active": 0,
1140
+ "flagValue": -1
1141
+ },
1142
+ "evaluate": {
1143
+ "active": 1,
1144
+ "flagValue": -1
1145
+ },
1146
+ "hoist_funs": {
1147
+ "active": 1,
1148
+ "flagValue": -1
1149
+ },
1150
+ "hoist_vars": {
1151
+ "active": 0,
1152
+ "flagValue": -1
1153
+ },
1154
+ "if_return": {
1155
+ "active": 1,
1156
+ "flagValue": -1
1157
+ },
1158
+ "indent-level": {
1159
+ "active": 0,
1160
+ "flagValue": 4
1161
+ },
1162
+ "indent-start": {
1163
+ "active": 0,
1164
+ "flagValue": 0
1165
+ },
1166
+ "inline-script": {
1167
+ "active": 0,
1168
+ "flagValue": -1
1169
+ },
1170
+ "join_vars": {
1171
+ "active": 1,
1172
+ "flagValue": -1
1173
+ },
1174
+ "keep_fargs": {
1175
+ "active": 0,
1176
+ "flagValue": -1
1177
+ },
1178
+ "loops": {
1179
+ "active": 1,
1180
+ "flagValue": -1
1181
+ },
1182
+ "mangle": {
1183
+ "active": 1,
1184
+ "flagValue": -1
1185
+ },
1186
+ "max-line-len": {
1187
+ "active": 1,
1188
+ "flagValue": 32000
1189
+ },
1190
+ "negate_iife": {
1191
+ "active": 1,
1192
+ "flagValue": -1
1193
+ },
1194
+ "properties": {
1195
+ "active": 1,
1196
+ "flagValue": -1
1197
+ },
1198
+ "pure_getters": {
1199
+ "active": 0,
1200
+ "flagValue": -1
1201
+ },
1202
+ "quote-keys": {
1203
+ "active": 0,
1204
+ "flagValue": -1
1205
+ },
1206
+ "screw-ie8": {
1207
+ "active": 0,
1208
+ "flagValue": -1
1209
+ },
1210
+ "semicolons": {
1211
+ "active": 1,
1212
+ "flagValue": -1
1213
+ },
1214
+ "sequences": {
1215
+ "active": 1,
1216
+ "flagValue": -1
1217
+ },
1218
+ "sort": {
1219
+ "active": 0,
1220
+ "flagValue": -1
1221
+ },
1222
+ "space-colon": {
1223
+ "active": 1,
1224
+ "flagValue": -1
1225
+ },
1226
+ "toplevel": {
1227
+ "active": 0,
1228
+ "flagValue": -1
1229
+ },
1230
+ "unsafe": {
1231
+ "active": 0,
1232
+ "flagValue": -1
1233
+ },
1234
+ "unused": {
1235
+ "active": 0,
1236
+ "flagValue": -1
1237
+ },
1238
+ "warnings": {
1239
+ "active": 0,
1240
+ "flagValue": -1
1241
+ },
1242
+ "width": {
1243
+ "active": 1,
1244
+ "flagValue": 80
1245
+ }
1246
+ },
1247
+ "uglifyReservedNamesString": "$",
1248
+ "websiteRelativeRoot": ""
1249
+ },
1250
+ "settingsFileVersion": "2"
1251
+ }
envira-gallery-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
- * Version: 1.1.4
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Envira_Gallery_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '1.1.4';
58
 
59
  /**
60
  * The name of the plugin.
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
+ * Version: 1.1.6
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '1.1.6';
58
 
59
  /**
60
  * The name of the plugin.
includes/admin/metaboxes.php CHANGED
@@ -109,7 +109,7 @@ class Envira_Gallery_Metaboxes_Lite {
109
  wp_enqueue_media( array( 'post' => $post_id ) );
110
 
111
  // Load necessary metabox scripts.
112
- wp_register_script( $this->base->plugin_slug . '-metabox-script', plugins_url( 'assets/js/metabox.js', $this->base->file ), array( 'jquery', 'plupload-handlers', 'quicktags', 'jquery-ui-sortable' ), $this->base->version, true );
113
  wp_enqueue_script( $this->base->plugin_slug . '-metabox-script' );
114
  wp_localize_script(
115
  $this->base->plugin_slug . '-metabox-script',
109
  wp_enqueue_media( array( 'post' => $post_id ) );
110
 
111
  // Load necessary metabox scripts.
112
+ wp_register_script( $this->base->plugin_slug . '-metabox-script', plugins_url( 'assets/js/min/metabox-min.js', $this->base->file ), array( 'jquery', 'plupload-handlers', 'quicktags', 'jquery-ui-sortable' ), $this->base->version, true );
113
  wp_enqueue_script( $this->base->plugin_slug . '-metabox-script' );
114
  wp_localize_script(
115
  $this->base->plugin_slug . '-metabox-script',
includes/global/shortcode.php CHANGED
@@ -225,7 +225,7 @@ class Envira_Gallery_Shortcode_Lite {
225
 
226
  <?php
227
  foreach ( $data['gallery'] as $imageID => $image ) {
228
- $title = str_replace( "\n", "", nl2br( $image['title'] ) );
229
  ?>
230
  titles_<?php echo $data['id']; ?>.push('<?php echo $title; ?>');
231
  <?php
@@ -248,7 +248,7 @@ class Envira_Gallery_Shortcode_Lite {
248
  envira_container_<?php echo $data['id']; ?>.css('overflow', 'visible');
249
  <?php do_action( 'envira_gallery_api_enviratope_layout', $data ); ?>
250
  }
251
- }, enviraOnFinished<?php echo $data['id']; ?>);
252
 
253
  var enviraApplyIsotope<?php echo $data['id']; ?> = enviraThrottle(function(){
254
  envira_container_<?php echo $data['id']; ?>.isotope('reLayout');
@@ -301,7 +301,7 @@ class Envira_Gallery_Shortcode_Lite {
301
  <?php do_action( 'envira_gallery_api_isotope', $data ); // Deprecated. ?>
302
  <?php do_action( 'envira_gallery_api_enviratope', $data ); ?>
303
 
304
- $('.envira-gallery-<?php echo $data['id']; ?>').fancybox({
305
  <?php do_action( 'envira_gallery_api_config', $data ); ?>
306
  cyclic: true,
307
  centerOnScroll: true,
@@ -309,8 +309,8 @@ class Envira_Gallery_Shortcode_Lite {
309
  onStart: function(data, index, opts){
310
  $(window).on({
311
  'resize' : function(){
312
- $.fancybox.resize();
313
- $.fancybox.center();
314
  }
315
  });
316
 
@@ -465,25 +465,6 @@ class Envira_Gallery_Shortcode_Lite {
465
 
466
  }
467
 
468
- /**
469
- * Helper method to minify a string of data.
470
- *
471
- * @since 1.0.4
472
- *
473
- * @param string $string String of data to minify.
474
- * @return string $string Minified string of data.
475
-
476
- public function minify( $string ) {
477
-
478
- return $string;
479
-
480
- $clean = preg_replace( '/((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/', '', $string );
481
- $clean = str_replace( array( "\r\n", "\r", "\t", "\n", ' ', ' ', ' ' ), '', $clean );
482
- return apply_filters( 'envira_gallery_minified_string', $clean, $string );
483
-
484
- }
485
- */
486
-
487
  /**
488
  * Helper method to minify a string of data.
489
  *
@@ -493,6 +474,8 @@ class Envira_Gallery_Shortcode_Lite {
493
  * @return string $string Minified string of data.
494
  */
495
  public function minify( $string, $stripDoubleForwardslashes = true ) {
 
 
496
 
497
  // Added a switch for stripping double forwardslashes
498
  // This can be disabled when using URLs in JS, to ensure http:// doesn't get removed
@@ -514,7 +497,7 @@ class Envira_Gallery_Shortcode_Lite {
514
  * I'm sure some plugins mean well, but they go a bit too far trying to reduce
515
  * conflicts without thinking of the consequences.
516
  *
517
- * 1. Prevents Foobox from completely borking Fancybox as if Foobox rules the world.
518
  *
519
  * @since 1.0.0
520
  */
225
 
226
  <?php
227
  foreach ( $data['gallery'] as $imageID => $image ) {
228
+ $title = addslashes( str_replace( "\n", "", nl2br( $image['title'] ) ) );
229
  ?>
230
  titles_<?php echo $data['id']; ?>.push('<?php echo $title; ?>');
231
  <?php
248
  envira_container_<?php echo $data['id']; ?>.css('overflow', 'visible');
249
  <?php do_action( 'envira_gallery_api_enviratope_layout', $data ); ?>
250
  }
251
+ });
252
 
253
  var enviraApplyIsotope<?php echo $data['id']; ?> = enviraThrottle(function(){
254
  envira_container_<?php echo $data['id']; ?>.isotope('reLayout');
301
  <?php do_action( 'envira_gallery_api_isotope', $data ); // Deprecated. ?>
302
  <?php do_action( 'envira_gallery_api_enviratope', $data ); ?>
303
 
304
+ $('.envira-gallery-<?php echo $data['id']; ?>').envirabox({
305
  <?php do_action( 'envira_gallery_api_config', $data ); ?>
306
  cyclic: true,
307
  centerOnScroll: true,
309
  onStart: function(data, index, opts){
310
  $(window).on({
311
  'resize' : function(){
312
+ $.envirabox.resize();
313
+ $.envirabox.center();
314
  }
315
  });
316
 
465
 
466
  }
467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  /**
469
  * Helper method to minify a string of data.
470
  *
474
  * @return string $string Minified string of data.
475
  */
476
  public function minify( $string, $stripDoubleForwardslashes = true ) {
477
+
478
+ return $string;
479
 
480
  // Added a switch for stripping double forwardslashes
481
  // This can be disabled when using URLs in JS, to ensure http:// doesn't get removed
497
  * I'm sure some plugins mean well, but they go a bit too far trying to reduce
498
  * conflicts without thinking of the consequences.
499
  *
500
+ * 1. Prevents Foobox from completely borking Envirabox as if Foobox rules the world.
501
  *
502
  * @since 1.0.0
503
  */
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: griffinjt
3
  Tags: wordpress gallery, gallery, wordpress gallery plugin, gallery plugin, responsive, responsive gallery, image gallery, image gallery plugin, responsive gallery plugin, responsive image gallery, responsive image gallery plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery gallery, javascript gallery, jquery rotator, javascript rotator, picture gallery, photo gallery, photo rotator, shortcode, template tag, custom post type, media uploader, ajax, wordpress galleries, responsive galleries, fullscreen, deeplinking, best wordpress gallery, best wordpress gallery plugin, best gallery plugin, best gallery, best responsive gallery, best responsive wordpress gallery, best wp gallery
4
  Requires at least: 3.8
5
- Tested up to: 4.1
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
@@ -57,6 +57,14 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
 
 
60
  = 1.1.4 =
61
  * Added: Metadata - Image Alt Text Helpful Tip
62
  * Fix: Metadata - wp_editor too large for smaller screen resolutions
2
  Contributors: griffinjt
3
  Tags: wordpress gallery, gallery, wordpress gallery plugin, gallery plugin, responsive, responsive gallery, image gallery, image gallery plugin, responsive gallery plugin, responsive image gallery, responsive image gallery plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery gallery, javascript gallery, jquery rotator, javascript rotator, picture gallery, photo gallery, photo rotator, shortcode, template tag, custom post type, media uploader, ajax, wordpress galleries, responsive galleries, fullscreen, deeplinking, best wordpress gallery, best wordpress gallery plugin, best gallery plugin, best gallery, best responsive gallery, best responsive wordpress gallery, best wp gallery
4
  Requires at least: 3.8
5
+ Tested up to: 4.2
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.1.6 =
61
+ * Fix: Upgraded Fancybox to 2.1.5
62
+ * Fix: Improved error message UI when uploading files exceeding WordPress / PHP file size limits
63
+
64
+ = 1.1.5 =
65
+ * Fix: Metadata - close window would not always work after uploading new images
66
+ * Fix: Support single quotation character in Image Title
67
+
68
  = 1.1.4 =
69
  * Added: Metadata - Image Alt Text Helpful Tip
70
  * Fix: Metadata - wp_editor too large for smaller screen resolutions